shave some bytes

This commit is contained in:
Peter Ferrie 2021-10-17 21:30:52 -07:00
parent 32eaba3605
commit 9f048fd869
3 changed files with 6 additions and 10 deletions

View File

@ -232,6 +232,7 @@ build_addon
; setspeed must be self-modified before use (setspeed_x and ; setspeed must be self-modified before use (setspeed_x and
; setspeed_y). ; setspeed_y).
; ;
; all return with Z=0
;----------------------------------------------------------- ;-----------------------------------------------------------
; Function #1: Apple IIc+ ; Function #1: Apple IIc+
@ -250,17 +251,17 @@ iicplus !pseudopc DisableAccelerator {
; cgga calls save X and Y regs but sets $0 to 0 ; cgga calls save X and Y regs but sets $0 to 0
; (this will get a laugh from C programmers) ; (this will get a laugh from C programmers)
php
lda $0 lda $0
pha pha
php
sei ; timing sensitive sei ; timing sensitive
jsr @jiggerypokery jsr @jiggerypokery
lda gMachineInDHGRMode lda gMachineInDHGRMode
bne + ; DHGR mode doesn't need fix bne + ; DHGR mode doesn't need fix
sta $C05B ; fix HGR-mode colouring sta $C05B ; fix HGR-mode colouring
+ plp ; restore interrupt state + pla
pla
sta $0 sta $0
plp ; restore interrupt state
rts rts
@jiggerypokery @jiggerypokery

View File

@ -10,8 +10,8 @@
EnableAcceleratorAndSwitchToBank1 EnableAcceleratorAndSwitchToBank1
jsr EnableAccelerator jsr EnableAccelerator
jmp SwitchToBank1 bne + ; always taken
DisableAcceleratorAndSwitchToBank1 DisableAcceleratorAndSwitchToBank1
jsr DisableAccelerator jsr DisableAccelerator
jmp SwitchToBank1 + jmp SwitchToBank1

View File

@ -35,8 +35,3 @@ DrawCenteredString
jsr SwitchToBank2 jsr SwitchToBank2
jsr DrawCenteredStringInternal jsr DrawCenteredStringInternal
bmi JmpSwitch ; always bmi JmpSwitch ; always
DrawBuffer
jsr SwitchToBank2
jsr DrawBufferInternal
bmi JmpSwitch ; always