New macro (#81)

I've updated HERO and made a new macro for the lang card routine.
This commit is contained in:
frankmilliron 2019-12-23 16:24:55 -08:00 committed by 4am
parent 3a906762c4
commit 8e49aca42e
7 changed files with 23 additions and 65 deletions

15
src/macros.a Normal file → Executable file
View File

@ -204,3 +204,18 @@
sta .addr+5
+RESET_VECTOR .addr
}
; for 64k games on ][+ which either hang or restart
; updates reset hook to reboot on ctrl-reset
!macro LC_REBOOT {
lda #$82 ; (assumes LC is switched in)
sta $101
lda #$A6
sta $104
lda #$FA
sta $105 ; update reset hook to reboot
lda #0
sta $FFFC
lda #1
sta $FFFD ; LC reset vector fix
}

View File

@ -24,19 +24,10 @@
lda $c08b
jsr $ee1f
lda #$82
sta $101
lda #$A6
sta $104
lda #$FA
sta $105 ; update TR hook to reboot
lda #0
sta $FFFC
lda #1
sta $FFFD ; reset vector fix
+LC_REBOOT
lda #$2C
sta $600
sta $603 ; BIT setting the reset
sta $603 ; BIT changing reset
jmp $981

View File

@ -11,16 +11,7 @@
sta $9DE
jsr $800 ; decompress
lda #$82
sta $101
lda #$A6
sta $104
lda #$FA
sta $105 ; update TR hook to reboot
lda #0
sta $FFFC
lda #1
sta $FFFD ; reset vector fix
+LC_REBOOT
lda #8 ; x=45, y=1 here
jmp $B800

View File

@ -17,17 +17,9 @@
lda #$a5
sta $1cb0 ; patch - don't decrease lives
+
lda #$82 ; READ_ROM_NO_WRITE
sta $101
lda #$A6
sta $104
lda #$FA
sta $105 ; update TR hook to reboot
+READ_RAM2_WRITE_RAM2
lda #0
sta $FFFC
lda #1
sta $FFFD ; LC reset vector fix
+LC_REBOOT
+DISABLE_ACCEL
jmp $8000

View File

@ -30,19 +30,7 @@
lda #$A6
sta $6041 ; reset vector cloned from $603F
; $100 gets trashed so put it at $300
lda #$2C
sta $300
lda #$88
sta $301
lda #$C0
sta $302
lda #$6C ; JMP ($FFFC)
sta $303 ; 'Reenter'
lda #$FC
sta $304
lda #$FF
sta $305 ; re-establish LC hook
+NEW_RESET_VECTOR $300
+DISABLE_ACCEL
jmp $6000

View File

@ -20,16 +20,7 @@
sta $4018
jsr $4000 ; LC switched in
lda #$82
sta $101
lda #$A6
sta $104
lda #$FA
sta $105 ; update TR hook to reboot
lda #0
sta $FFFC
lda #1
sta $FFFD ; reset vector fix
+LC_REBOOT
jmp $800

View File

@ -12,17 +12,7 @@
sta $820
jsr $800 ; decompress
lda #$82
sta $101
lda #$A6
sta $104
lda #$FA
sta $105 ; update TR hook to reboot
lda #0
sta $FFFC
lda #1
sta $FFFD ; LC reset vector patch
+LC_REBOOT
+DISABLE_ACCEL
jmp $6000