mirror of
https://github.com/a2-4am/4cade.git
synced 2024-11-19 02:10:39 +00:00
we can't defeat broken
This commit is contained in:
parent
7a9c633157
commit
2d80f38186
@ -32,7 +32,7 @@ Has64K
|
||||
; out: C set if 128K detected
|
||||
; C clear if 128K not detected
|
||||
; all other flags and registers clobbered
|
||||
; zp $80-$D2 clobbered
|
||||
; zp $80-$9F clobbered
|
||||
; ROM in memory (not LC RAM bank)
|
||||
;
|
||||
; adapted from "Prince of Persia" by Jordan Mechner
|
||||
@ -50,11 +50,6 @@ Has128K
|
||||
ldx #@checklen
|
||||
- lda @checker,x
|
||||
sta $80,x
|
||||
sta SETAUXZP ; also copy to aux zp in case we pass
|
||||
sta $80,x
|
||||
cmp $80,x
|
||||
bne @no
|
||||
sta CLRAUXZP
|
||||
dex
|
||||
bpl -
|
||||
jmp $80 ; check if auxmem actually works
|
||||
@ -62,41 +57,21 @@ Has128K
|
||||
lda #$EE
|
||||
sta WRITEAUXMEM
|
||||
sta READAUXMEM
|
||||
@x1 sta $0C00
|
||||
sta $0C00
|
||||
sta $0800
|
||||
@x2 lda $0C00
|
||||
lda $0C00
|
||||
cmp #$EE
|
||||
bne @no
|
||||
@x3 asl $0C00
|
||||
asl $0C00
|
||||
asl
|
||||
@x4 cmp $0C00
|
||||
cmp $0C00
|
||||
bne @no
|
||||
cmp $0800
|
||||
beq @no
|
||||
|
||||
; now test the rest of memory, and bank 2 of LC
|
||||
|
||||
clc
|
||||
lda <($80+(@x1-@checker)+2)
|
||||
adc #$20
|
||||
bcs @finish
|
||||
@x5 sta <($80+(@x1-@checker)+2)
|
||||
sta <($80+(@x2-@checker)+2)
|
||||
sta <($80+(@x3-@checker)+2)
|
||||
sta <($80+(@x4-@checker)+2)
|
||||
cmp #$CC
|
||||
bne @checker
|
||||
sta SETAUXZP
|
||||
+READ_RAM2_WRITE_RAM2
|
||||
lda #$D0
|
||||
bne @x5 ; always
|
||||
|
||||
@yes sec
|
||||
+HIDE_NEXT_BYTE
|
||||
bne @yes
|
||||
@no clc
|
||||
+HIDE_NEXT_BYTE
|
||||
@yes sec
|
||||
@finish sta WRITEMAINMEM
|
||||
sta READMAINMEM
|
||||
sta CLRAUXZP
|
||||
+READ_ROM_NO_WRITE
|
||||
rts
|
||||
@checklen=*-@checker
|
||||
|
Loading…
Reference in New Issue
Block a user