pt3_lib: make apple iic support conditional

This commit is contained in:
Vince Weaver 2021-05-30 21:13:26 -04:00
parent e3f4822d77
commit 51f6dac0e8
3 changed files with 15 additions and 0 deletions

View File

@ -39,6 +39,7 @@ mockingboard_detect:
; I get the impression the Mockingboard 4c activates
; when you access any of the 6522 ports in Slot 4
.ifdef PT3_ENABLE_APPLE_IIC
lda APPLEII_MODEL
cmp #'C'
bne not_iic
@ -49,6 +50,7 @@ mockingboard_detect:
sta MOCK_6522_DDRA1
sta MOCK_6522_T1CL
.endif
not_iic:
lda #$00

View File

@ -170,6 +170,7 @@ clear_ay_end:
;=============================
mockingboard_setup_interrupt:
.ifdef PT3_ENABLE_APPLE_IIC
lda APPLEII_MODEL
cmp #'C'
bne done_iic_hack
@ -216,6 +217,7 @@ write_rom_loop:
lda #$EA ; nop out the "lda $45" in the irq handler
sta interrupt_smc
sta interrupt_smc+1
.endif
done_iic_hack:

View File

@ -20,6 +20,12 @@ PT3_LOC = song
; PT3_USE_ZERO_PAGE = 1
; Comment this to disable Apple IIc support which will free a small amount
; of room
PT3_ENABLE_APPLE_IIC = 1
;=============================
; Setup
;=============================
@ -43,7 +49,9 @@ pt3_setup:
; IRQ setup is different on IIc
; You can possibly skip this if you only care about II+/IIe
.ifdef PT3_ENABLE_APPLE_IIC
jsr detect_appleii_model
.endif
;=======================
; Detect mockingboard
@ -208,7 +216,10 @@ found_message: .asciiz "FOUND SLOT#4"
;routines
;=========
.ifdef PT3_ENABLE_APPLE_IIC
.include "pt3_lib_detect_model.s"
.endif
.include "pt3_lib_core.s"
.include "pt3_lib_init.s"
.include "pt3_lib_mockingboard_setup.s"