mboard: properly setup pt3 backround playing for PRODOS
doesn't work under LOGO though
This commit is contained in:
parent
a0c57872c4
commit
119c29db2a
|
@ -0,0 +1,12 @@
|
||||||
|
MEMORY {
|
||||||
|
ZP: start = $00, size = $1A, type = rw;
|
||||||
|
RAM: start = $4C00, size = $4800, file = %O;
|
||||||
|
}
|
||||||
|
|
||||||
|
SEGMENTS {
|
||||||
|
CODE: load = RAM, type = ro, align=$100;
|
||||||
|
RODATA: load = RAM, type = ro;
|
||||||
|
DATA: load = RAM, type = rw;
|
||||||
|
BSS: load = RAM, type = bss, define = yes;
|
||||||
|
ZEROPAGE: load = ZP, type = zp;
|
||||||
|
}
|
Binary file not shown.
|
@ -6,20 +6,33 @@ EMPTY_DISK = ../../empty_disk/empty.po
|
||||||
HGR2PNG = ../../utils/hgr-utils/png2hgr
|
HGR2PNG = ../../utils/hgr-utils/png2hgr
|
||||||
LINKER_SCRIPTS = ../../linker_scripts
|
LINKER_SCRIPTS = ../../linker_scripts
|
||||||
|
|
||||||
all: mboard_logo.dsk
|
all: mboard_logo.dsk mboard_prodos.dsk
|
||||||
|
|
||||||
mboard_logo.dsk: LOGO3 MUSIC
|
mboard_logo.dsk: LOGO3 MUSIC
|
||||||
cp ../dsks/apple_logo_ii.dsk ./mboard_logo.dsk
|
cp ../dsks/apple_logo_ii.dsk ./mboard_logo.dsk
|
||||||
$(PRODOS) -y mboard_logo.dsk -t BIN -a 0x2000 SAVE LOGO3
|
$(PRODOS) -y mboard_logo.dsk -t BIN -a 0x2000 SAVE LOGO3
|
||||||
|
$(PRODOS) -y mboard_logo.dsk DELETE FORMAT
|
||||||
|
$(PRODOS) -y mboard_logo.dsk DELETE FORMAT.BIN
|
||||||
|
$(PRODOS) -y mboard_logo.dsk DELETE FORMAT.HELP
|
||||||
# $(PRODOS) -y mboard_logo.dsk DELETE SAMPLES/MENU
|
# $(PRODOS) -y mboard_logo.dsk DELETE SAMPLES/MENU
|
||||||
# $(PRODOS) -y mboard_logo.dsk DELETE SAMPLES/MENU.DATA
|
# $(PRODOS) -y mboard_logo.dsk DELETE SAMPLES/MENU.DATA
|
||||||
# $(PRODOS) -y mboard_logo.dsk DELETE SAMPLES/MENU.DOC
|
# $(PRODOS) -y mboard_logo.dsk DELETE SAMPLES/MENU.DOC
|
||||||
$(PRODOS) -y mboard_logo.dsk DELETE SAMPLES/POLYSPI.PLUS
|
# $(PRODOS) -y mboard_logo.dsk DELETE SAMPLES/POLYSPI.PLUS
|
||||||
$(PRODOS) -y mboard_logo.dsk DELETE SAMPLES/ADV.GRAPHICS
|
# $(PRODOS) -y mboard_logo.dsk DELETE SAMPLES/ADV.GRAPHICS
|
||||||
$(PRODOS) -y mboard_logo.dsk DELETE SAMPLES/MEMORY
|
# $(PRODOS) -y mboard_logo.dsk DELETE SAMPLES/MEMORY
|
||||||
$(PRODOS) -y mboard_logo.dsk DELETE SAMPLES/MEMORY.DOC
|
# $(PRODOS) -y mboard_logo.dsk DELETE SAMPLES/MEMORY.DOC
|
||||||
$(PRODOS) -y mboard_logo.dsk DELETE SAMPLES/LOGO.SINGS
|
# $(PRODOS) -y mboard_logo.dsk DELETE SAMPLES/LOGO.SINGS
|
||||||
$(PRODOS) -y mboard_logo.dsk -t BIN -a 0x4800 SAVE MUSIC
|
$(PRODOS) -y mboard_logo.dsk -t BIN -a 0x4C00 SAVE MUSIC
|
||||||
|
$(PRODOS) -y mboard_logo.dsk -t BIN -a 0x2000 SAVE ./music/Fret.pt3 FRET.PT3
|
||||||
|
|
||||||
|
|
||||||
|
mboard_prodos.dsk: MUSIC
|
||||||
|
cp ../dsks/ProDOS_2_4_2.dsk ./mboard_prodos.dsk
|
||||||
|
$(PRODOS) -y mboard_prodos.dsk DELETE ADTPRO2.0.2.BIN
|
||||||
|
$(PRODOS) -y mboard_prodos.dsk -t BIN -a 0x4C00 SAVE MUSIC
|
||||||
|
$(PRODOS) -y mboard_prodos.dsk -t BIN -a 0x2000 SAVE ./music/Fret.pt3 FRET.PT3
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
####
|
####
|
||||||
|
|
||||||
|
@ -29,7 +42,7 @@ LOGO3: newlogo3.png
|
||||||
####
|
####
|
||||||
|
|
||||||
MUSIC: music.o
|
MUSIC: music.o
|
||||||
ld65 -o MUSIC music.o -C $(LINKER_SCRIPTS)/apple2_4800.inc
|
ld65 -o MUSIC music.o -C $(LINKER_SCRIPTS)/apple2_4c00.inc
|
||||||
|
|
||||||
music.o: music.s \
|
music.o: music.s \
|
||||||
zp.inc hardware.inc nozp.inc \
|
zp.inc hardware.inc nozp.inc \
|
||||||
|
|
|
@ -18,13 +18,18 @@
|
||||||
; to be sure status flag and accumulator set properly
|
; to be sure status flag and accumulator set properly
|
||||||
|
|
||||||
interrupt_handler:
|
interrupt_handler:
|
||||||
php ; save status flags
|
cld ; must be first in ProDOS handler
|
||||||
pha ; save A ; 3
|
|
||||||
|
; no need to save, ProDOS does it for us?
|
||||||
|
|
||||||
|
|
||||||
|
; php ; save status flags
|
||||||
|
; 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
|
||||||
tya
|
; tya
|
||||||
pha ; save Y
|
; pha ; save Y
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -122,19 +127,26 @@ itsnot:
|
||||||
|
|
||||||
; jsr display_credits
|
; jsr display_credits
|
||||||
|
|
||||||
|
|
||||||
done_match:
|
done_match:
|
||||||
pla
|
|
||||||
tay ; restore Y
|
clc ; tell ProDOS we handled things
|
||||||
pla
|
|
||||||
tax ; restore X
|
rts ; ProDOS handles rti?
|
||||||
pla ; restore a ; 4
|
|
||||||
|
|
||||||
|
; pla
|
||||||
|
; tay ; restore Y
|
||||||
|
; pla
|
||||||
|
; tax ; restore X
|
||||||
|
; pla ; restore a ; 4
|
||||||
|
|
||||||
; on II+/IIe (but not IIc) we need to do this?
|
; on II+/IIe (but not IIc) we need to do this?
|
||||||
interrupt_smc:
|
interrupt_smc:
|
||||||
lda $45 ; restore A
|
; lda $45 ; restore A
|
||||||
plp
|
; plp
|
||||||
|
|
||||||
rti ; return from interrupt ; 6
|
; rti ; return from interrupt ; 6
|
||||||
|
|
||||||
;============
|
;============
|
||||||
; typical
|
; typical
|
||||||
|
|
|
@ -5,9 +5,7 @@
|
||||||
; Zero Page
|
; Zero Page
|
||||||
.include "zp.inc"
|
.include "zp.inc"
|
||||||
.include "hardware.inc"
|
.include "hardware.inc"
|
||||||
.include "nozp.inc"
|
|
||||||
|
|
||||||
STROUT = $db3a
|
|
||||||
|
|
||||||
NONE = 0
|
NONE = 0
|
||||||
DO_LOAD = 1
|
DO_LOAD = 1
|
||||||
|
@ -17,15 +15,11 @@ DO_CREDITS = 4
|
||||||
DONE = 5
|
DONE = 5
|
||||||
|
|
||||||
;==========================================
|
;==========================================
|
||||||
; we are loaded at $6000
|
|
||||||
;
|
|
||||||
; since we are now decompressed here after load
|
|
||||||
; we don't have to worry about running into DOS3.3 at $9600
|
|
||||||
;
|
|
||||||
; we shouldn't need to set HIMEM as we don't use many vars
|
|
||||||
; and variable memory starts right after the program
|
|
||||||
|
|
||||||
bot_demo:
|
logo_music:
|
||||||
|
|
||||||
|
;===================
|
||||||
|
;
|
||||||
|
|
||||||
;===================
|
;===================
|
||||||
; PT3 player Setup
|
; PT3 player Setup
|
||||||
|
@ -50,6 +44,8 @@ start_interrupts:
|
||||||
|
|
||||||
cli
|
cli
|
||||||
|
|
||||||
|
rts
|
||||||
|
|
||||||
mockingboard_not_found:
|
mockingboard_not_found:
|
||||||
|
|
||||||
.include "pt3_lib_core.s"
|
.include "pt3_lib_core.s"
|
||||||
|
@ -59,9 +55,12 @@ mockingboard_not_found:
|
||||||
; if you're self patching, detect has to be after interrupt_handler.s
|
; if you're self patching, detect has to be after interrupt_handler.s
|
||||||
.include "pt3_lib_mockingboard_detect.s"
|
.include "pt3_lib_mockingboard_detect.s"
|
||||||
|
|
||||||
PT3_LOC = song
|
.include "nozp.inc"
|
||||||
.align $100
|
|
||||||
|
|
||||||
|
PT3_LOC = $2000
|
||||||
|
;.align $100
|
||||||
song:
|
song:
|
||||||
;.incbin "../../demos/applebot_demo/music/mAZE_-_The_Upbeated_Eaten_Apple.pt3"
|
;.incbin "../../demos/applebot_demo/music/mAZE_-_The_Upbeated_Eaten_Apple.pt3"
|
||||||
;.incbin "../../demos/outline2021/demo/mAZE_-_Apple_snapple_Outline.pt3"
|
;.incbin "../../demos/outline2021/demo/mAZE_-_Apple_snapple_Outline.pt3"
|
||||||
.incbin "./music/Fret.pt3"
|
;.incbin "./music/Fret.pt3"
|
||||||
|
|
|
@ -190,14 +190,16 @@ mockingboard_setup_interrupt:
|
||||||
;===========================
|
;===========================
|
||||||
; it does interrupts differently
|
; it does interrupts differently
|
||||||
|
|
||||||
lda $FBB3 ; IIe and newer is $06
|
; there's other ways to detect this on ProDOS?
|
||||||
cmp #6
|
|
||||||
beq apple_iie_or_newer
|
|
||||||
|
|
||||||
jmp done_apple_detect
|
; lda $FBB3 ; IIe and newer is $06
|
||||||
|
; cmp #6
|
||||||
|
; beq apple_iie_or_newer
|
||||||
|
|
||||||
|
; jmp done_apple_detect
|
||||||
apple_iie_or_newer:
|
apple_iie_or_newer:
|
||||||
lda $FBC0 ; 0 on a IIc
|
; lda $FBC0 ; 0 on a IIc
|
||||||
bne done_apple_detect
|
; bne done_apple_detect
|
||||||
apple_iic:
|
apple_iic:
|
||||||
; activate IIc mockingboard?
|
; activate IIc mockingboard?
|
||||||
; this might only be necessary to allow detection
|
; this might only be necessary to allow detection
|
||||||
|
@ -213,17 +215,17 @@ apple_iic:
|
||||||
; bypass the firmware interrupt handler
|
; bypass the firmware interrupt handler
|
||||||
; should we do this on IIe too? probably faster
|
; should we do this on IIe too? probably faster
|
||||||
|
|
||||||
sei ; disable interrupts
|
; sei ; disable interrupts
|
||||||
lda $c08b ; disable ROM (enable language card)
|
; lda $c08b ; disable ROM (enable language card)
|
||||||
lda $c08b
|
; lda $c08b
|
||||||
lda #<interrupt_handler
|
; lda #<interrupt_handler
|
||||||
sta $fffe
|
; sta $fffe
|
||||||
lda #>interrupt_handler
|
; lda #>interrupt_handler
|
||||||
sta $ffff
|
; sta $ffff
|
||||||
|
|
||||||
lda #$EA ; nop out the "lda $45" in the irq hand
|
; lda #$EA ; nop out the "lda $45" in the irq hand
|
||||||
sta interrupt_smc
|
; sta interrupt_smc
|
||||||
sta interrupt_smc+1
|
; sta interrupt_smc+1
|
||||||
|
|
||||||
done_apple_detect:
|
done_apple_detect:
|
||||||
|
|
||||||
|
@ -234,10 +236,15 @@ done_apple_detect:
|
||||||
; Vector address goes to 0x3fe/0x3ff
|
; Vector address goes to 0x3fe/0x3ff
|
||||||
; FIXME: should chain any existing handler
|
; FIXME: should chain any existing handler
|
||||||
|
|
||||||
lda #<interrupt_handler
|
; lda #<interrupt_handler
|
||||||
sta $03fe
|
; sta $03fe
|
||||||
lda #>interrupt_handler
|
; lda #>interrupt_handler
|
||||||
sta $03ff
|
; sta $03ff
|
||||||
|
|
||||||
|
jsr $BF00 ; prodos MLI interface
|
||||||
|
.byte $40 ; ALLOC_INTERRUPT
|
||||||
|
.word interrupt_parms
|
||||||
|
|
||||||
|
|
||||||
;============================
|
;============================
|
||||||
; Enable 50Hz clock on 6522
|
; Enable 50Hz clock on 6522
|
||||||
|
@ -273,3 +280,8 @@ setup_irq_smc6:
|
||||||
; clear interrupt and start counting
|
; clear interrupt and start counting
|
||||||
|
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
interrupt_parms:
|
||||||
|
.byte $02 ; number of paramaters
|
||||||
|
.byte $00 ; priority
|
||||||
|
.word interrupt_handler
|
||||||
|
|
Loading…
Reference in New Issue