mirror of
https://github.com/deater/dos33fsprogs.git
synced 2024-12-26 11:30:12 +00:00
pt3_test: add IIc support
weird interrupt handler nonsense
This commit is contained in:
parent
73d9b710c7
commit
3bdc522ec7
@ -13,7 +13,7 @@
|
||||
TIME_OFFSET EQU 13
|
||||
|
||||
interrupt_handler:
|
||||
; pha ; save A ; 3
|
||||
pha ; save A ; 3
|
||||
; A is saved in $45 by firmware
|
||||
txa
|
||||
pha ; save X
|
||||
@ -145,8 +145,12 @@ exit_interrupt:
|
||||
tay ; restore Y
|
||||
pla
|
||||
tax ; restore X
|
||||
pla ; restore a ; 4
|
||||
|
||||
|
||||
; on II+/IIe (but not IIc) we need to do this?
|
||||
interrupt_smc:
|
||||
lda $45 ; restore A
|
||||
; pla ; restore a ; 4
|
||||
|
||||
rti ; return from interrupt ; 6
|
||||
|
||||
|
@ -27,11 +27,39 @@ pt3_setup:
|
||||
|
||||
lda $FBB3 ; IIe and newer is $06
|
||||
cmp #6
|
||||
beq apple_iie
|
||||
beq apple_iie_or_newer
|
||||
|
||||
lda #1 ; set if older than a IIe
|
||||
sta apple_ii
|
||||
apple_iie:
|
||||
jmp done_apple_detect
|
||||
apple_iie_or_newer:
|
||||
lda $FBC0 ; 0 on a IIc
|
||||
bne done_apple_detect
|
||||
apple_iic:
|
||||
; activate IIc mockingboard?
|
||||
; this might only be necessary to allow detection
|
||||
; I get the impression the Mockingboard 4c activates
|
||||
; when you access any of the 6522 ports in Slot 4
|
||||
lda #$ff
|
||||
sta $C403
|
||||
sta $C404
|
||||
|
||||
; bypass the firmware interrupt handler
|
||||
; should we do this on IIe too? probably faster
|
||||
|
||||
sei ; disable interrupts
|
||||
lda $c08b ; disable ROM (enable language card)
|
||||
lda $c08b
|
||||
lda #<interrupt_handler
|
||||
sta $fffe
|
||||
lda #>interrupt_handler
|
||||
sta $ffff
|
||||
|
||||
lda #$EA ; nop out the "lda $45" in the irq hand
|
||||
sta interrupt_smc
|
||||
sta interrupt_smc+1
|
||||
|
||||
done_apple_detect:
|
||||
|
||||
;===============
|
||||
; init variables
|
||||
|
@ -288,14 +288,12 @@ quiet_exit:
|
||||
done_key:
|
||||
exit_interrupt:
|
||||
|
||||
; pla ; restore a ; 4
|
||||
|
||||
pla
|
||||
tay ; restore Y
|
||||
pla
|
||||
tax ; restore X
|
||||
lda $45 ; restore A
|
||||
|
||||
; pla ; restore a ; 4
|
||||
|
||||
rti ; return from interrupt ; 6
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user