From 5a0272a52b3aa705f928a021c3b7a74a12fd2379 Mon Sep 17 00:00:00 2001 From: Ivo van Poorten Date: Thu, 16 Jan 2025 20:18:33 +0100 Subject: [PATCH] OSI: Fix RAM top detection. Real hardware does not read 0xff when there's no RAM, but it returns the MSB of the address. Test RAM with a value that is not equal to the MSB of the address. --- src/arch/osi/osi.S | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/arch/osi/osi.S b/src/arch/osi/osi.S index 757a9b1f..fcb8157e 100644 --- a/src/arch/osi/osi.S +++ b/src/arch/osi/osi.S @@ -163,10 +163,12 @@ init: lda ptr+1 cmp #$c0 zbreakif_eq + lda #$3f sta (ptr),y cmp (ptr),y zuntil_ne + lda ptr+1 sec sbc #PAGES_PER_TRACK sta ptrkbuf ; put track buffer at ramtop