mirror of
https://github.com/deater/dos33fsprogs.git
synced 2025-01-14 13:33:48 +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
|
TIME_OFFSET EQU 13
|
||||||
|
|
||||||
interrupt_handler:
|
interrupt_handler:
|
||||||
; pha ; save A ; 3
|
pha ; save A ; 3
|
||||||
; A is saved in $45 by firmware
|
; A is saved in $45 by firmware
|
||||||
txa
|
txa
|
||||||
pha ; save X
|
pha ; save X
|
||||||
@ -145,8 +145,12 @@ exit_interrupt:
|
|||||||
tay ; restore Y
|
tay ; restore Y
|
||||||
pla
|
pla
|
||||||
tax ; restore X
|
tax ; restore X
|
||||||
|
pla ; restore a ; 4
|
||||||
|
|
||||||
|
|
||||||
|
; on II+/IIe (but not IIc) we need to do this?
|
||||||
|
interrupt_smc:
|
||||||
lda $45 ; restore A
|
lda $45 ; restore A
|
||||||
; pla ; restore a ; 4
|
|
||||||
|
|
||||||
rti ; return from interrupt ; 6
|
rti ; return from interrupt ; 6
|
||||||
|
|
||||||
|
@ -27,11 +27,39 @@ pt3_setup:
|
|||||||
|
|
||||||
lda $FBB3 ; IIe and newer is $06
|
lda $FBB3 ; IIe and newer is $06
|
||||||
cmp #6
|
cmp #6
|
||||||
beq apple_iie
|
beq apple_iie_or_newer
|
||||||
|
|
||||||
lda #1 ; set if older than a IIe
|
lda #1 ; set if older than a IIe
|
||||||
sta apple_ii
|
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
|
; init variables
|
||||||
|
@ -288,14 +288,12 @@ quiet_exit:
|
|||||||
done_key:
|
done_key:
|
||||||
exit_interrupt:
|
exit_interrupt:
|
||||||
|
|
||||||
; pla ; restore a ; 4
|
|
||||||
|
|
||||||
pla
|
pla
|
||||||
tay ; restore Y
|
tay ; restore Y
|
||||||
pla
|
pla
|
||||||
tax ; restore X
|
tax ; restore X
|
||||||
lda $45 ; restore A
|
lda $45 ; restore A
|
||||||
|
; pla ; restore a ; 4
|
||||||
|
|
||||||
rti ; return from interrupt ; 6
|
rti ; return from interrupt ; 6
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user