1
0
mirror of https://github.com/cc65/cc65.git synced 2024-11-19 21:32:19 +00:00
cc65/libsrc/atari5200/y2k.inc

40 lines
1.2 KiB
PHP
Raw Normal View History

2014-03-01 16:20:09 +00:00
;-----------------------------------------------------------
; Y2K FIX by Alan Davis, Dennis Debro, and Ronen Habot
;-----------------------------------------------------------
Y2K LDY #$00 ; Copy BIOS opening screen to RAM
LDA #$FD
STA TEMPH
LDA #$58 ; Assume 2 port system
LDX $FD32
CPX #$E8 ; Is this a 4 port?
BNE Y2K0 ; Jump if not
LDA #$42 ; Yes, 4 port system
2022-04-17 14:06:22 +00:00
Y2K0 STA TEMPL
Y2K1 LDA (TEMPL),Y
2014-03-01 16:20:09 +00:00
STA $0600,Y
2022-04-17 14:06:22 +00:00
INY
2014-03-01 16:20:09 +00:00
BNE Y2K1
LDY #$50
INC TEMPH
2022-04-17 14:06:22 +00:00
Y2K2 LDA (TEMPL),Y
2014-03-01 16:20:09 +00:00
STA $0700,Y
2022-04-17 14:06:22 +00:00
DEY
2014-03-01 16:20:09 +00:00
BPL Y2K2
LDA #$D4 ; Point to copyright string
STA $0724
LDA #$BF
STA $0725
LDX #$0B ; Store NOP's @ end
LDA #$EA
2022-04-17 14:06:22 +00:00
Y2K3 STA $0732,X
DEX
2014-03-01 16:20:09 +00:00
BPL Y2K3
LDA #$60 ; Store RTS opcode @ end
STA $0750
JSR $0600 ; Show title screen
2021-05-08 16:50:08 +00:00
LDY #<$0600 ; Clear RAM from $0600-$3FFF
2014-03-01 16:20:09 +00:00
STY $80
2021-05-08 16:50:08 +00:00
LDA #>$0600
2014-03-01 16:20:09 +00:00
STA $81
2021-05-08 16:50:08 +00:00
JMP CLRRAM