mirror of
https://github.com/deater/dos33fsprogs.git
synced 2025-01-13 22:30:49 +00:00
pt3_player: add iic support
This commit is contained in:
parent
3bdc522ec7
commit
0efd367bfa
@ -13,7 +13,8 @@
|
||||
TIME_OFFSET EQU 13
|
||||
|
||||
interrupt_handler:
|
||||
; pha ; save A ; 3
|
||||
php
|
||||
pha ; save A ; 3
|
||||
; A is saved in $45 by firmware
|
||||
txa
|
||||
pha ; save X
|
||||
@ -292,8 +293,13 @@ exit_interrupt:
|
||||
tay ; restore Y
|
||||
pla
|
||||
tax ; restore X
|
||||
|
||||
pla ; restore a ; 4
|
||||
|
||||
; this is needed on II+/IIe not not IIc
|
||||
interrupt_smc:
|
||||
lda $45 ; restore A
|
||||
; pla ; restore a ; 4
|
||||
plp
|
||||
|
||||
rti ; return from interrupt ; 6
|
||||
|
||||
|
@ -27,18 +27,47 @@ pt3_setup:
|
||||
jsr clear_screens
|
||||
|
||||
|
||||
;=======================
|
||||
; Check for Apple II/II+
|
||||
;=======================
|
||||
;===============================
|
||||
; Check for Apple II/II+/IIe/IIc
|
||||
;===============================
|
||||
; this is used to see if we have lowecase support
|
||||
|
||||
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 disk code
|
||||
|
@ -73,8 +73,9 @@ rts_init:
|
||||
sta mlsmc04+1
|
||||
sta mlsmc05+1
|
||||
|
||||
jsr $fe93 ; clear COUT
|
||||
jsr $fe89 ; clear KEYIN
|
||||
; Are these needed? they break on iic as we have ROM turned off
|
||||
; jsr $fe93 ; clear COUT
|
||||
; jsr $fe89 ; clear KEYIN
|
||||
|
||||
;========================
|
||||
; Create nibble table
|
||||
|
Loading…
x
Reference in New Issue
Block a user