Skip to content

Commit

Permalink
OSI: Fix RAM top detection. Real hardware does not read 0xff when
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ivop committed Jan 16, 2025
1 parent b3de3aa commit 5a0272a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/arch/osi/osi.S
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5a0272a

Please sign in to comment.