mirror of
https://github.com/deater/dos33fsprogs.git
synced 2025-01-26 16:33:43 +00:00
mboard: properly setup pt3 backround playing for PRODOS
doesn't work under LOGO though
This commit is contained in:
parent
a0c57872c4
commit
119c29db2a
12
linker_scripts/apple2_4c00.inc
Normal file
12
linker_scripts/apple2_4c00.inc
Normal file
@ -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;
|
||||
}
|
BIN
logo/dsks/ProDOS_2_4_2.dsk
Normal file
BIN
logo/dsks/ProDOS_2_4_2.dsk
Normal file
Binary file not shown.
@ -6,20 +6,33 @@ EMPTY_DISK = ../../empty_disk/empty.po
|
||||
HGR2PNG = ../../utils/hgr-utils/png2hgr
|
||||
LINKER_SCRIPTS = ../../linker_scripts
|
||||
|
||||
all: mboard_logo.dsk
|
||||
all: mboard_logo.dsk mboard_prodos.dsk
|
||||
|
||||
mboard_logo.dsk: LOGO3 MUSIC
|
||||
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 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.DATA
|
||||
# $(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/ADV.GRAPHICS
|
||||
$(PRODOS) -y mboard_logo.dsk DELETE SAMPLES/MEMORY
|
||||
$(PRODOS) -y mboard_logo.dsk DELETE SAMPLES/MEMORY.DOC
|
||||
$(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 DELETE SAMPLES/POLYSPI.PLUS
|
||||
# $(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.DOC
|
||||
# $(PRODOS) -y mboard_logo.dsk DELETE SAMPLES/LOGO.SINGS
|
||||
$(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
|
||||
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 \
|
||||
zp.inc hardware.inc nozp.inc \
|
||||
|
@ -18,13 +18,18 @@
|
||||
; to be sure status flag and accumulator set properly
|
||||
|
||||
interrupt_handler:
|
||||
php ; save status flags
|
||||
pha ; save A ; 3
|
||||
cld ; must be first in ProDOS handler
|
||||
|
||||
; no need to save, ProDOS does it for us?
|
||||
|
||||
|
||||
; php ; save status flags
|
||||
; pha ; save A ; 3
|
||||
; A is saved in $45 by firmware
|
||||
txa
|
||||
pha ; save X
|
||||
tya
|
||||
pha ; save Y
|
||||
; txa
|
||||
; pha ; save X
|
||||
; tya
|
||||
; pha ; save Y
|
||||
|
||||
|
||||
|
||||
@ -122,19 +127,26 @@ itsnot:
|
||||
|
||||
; jsr display_credits
|
||||
|
||||
|
||||
done_match:
|
||||
pla
|
||||
tay ; restore Y
|
||||
pla
|
||||
tax ; restore X
|
||||
pla ; restore a ; 4
|
||||
|
||||
clc ; tell ProDOS we handled things
|
||||
|
||||
rts ; ProDOS handles rti?
|
||||
|
||||
|
||||
; pla
|
||||
; 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
|
||||
plp
|
||||
; lda $45 ; restore A
|
||||
; plp
|
||||
|
||||
rti ; return from interrupt ; 6
|
||||
; rti ; return from interrupt ; 6
|
||||
|
||||
;============
|
||||
; typical
|
||||
|
@ -5,9 +5,7 @@
|
||||
; Zero Page
|
||||
.include "zp.inc"
|
||||
.include "hardware.inc"
|
||||
.include "nozp.inc"
|
||||
|
||||
STROUT = $db3a
|
||||
|
||||
NONE = 0
|
||||
DO_LOAD = 1
|
||||
@ -17,15 +15,11 @@ DO_CREDITS = 4
|
||||
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
|
||||
@ -50,6 +44,8 @@ start_interrupts:
|
||||
|
||||
cli
|
||||
|
||||
rts
|
||||
|
||||
mockingboard_not_found:
|
||||
|
||||
.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
|
||||
.include "pt3_lib_mockingboard_detect.s"
|
||||
|
||||
PT3_LOC = song
|
||||
.align $100
|
||||
.include "nozp.inc"
|
||||
|
||||
|
||||
PT3_LOC = $2000
|
||||
;.align $100
|
||||
song:
|
||||
;.incbin "../../demos/applebot_demo/music/mAZE_-_The_Upbeated_Eaten_Apple.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
|
||||
|
||||
lda $FBB3 ; IIe and newer is $06
|
||||
cmp #6
|
||||
beq apple_iie_or_newer
|
||||
; there's other ways to detect this on ProDOS?
|
||||
|
||||
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:
|
||||
lda $FBC0 ; 0 on a IIc
|
||||
bne done_apple_detect
|
||||
; lda $FBC0 ; 0 on a IIc
|
||||
; bne done_apple_detect
|
||||
apple_iic:
|
||||
; activate IIc mockingboard?
|
||||
; this might only be necessary to allow detection
|
||||
@ -213,17 +215,17 @@ apple_iic:
|
||||
; 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
|
||||
; 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
|
||||
; lda #$EA ; nop out the "lda $45" in the irq hand
|
||||
; sta interrupt_smc
|
||||
; sta interrupt_smc+1
|
||||
|
||||
done_apple_detect:
|
||||
|
||||
@ -234,10 +236,15 @@ done_apple_detect:
|
||||
; Vector address goes to 0x3fe/0x3ff
|
||||
; FIXME: should chain any existing handler
|
||||
|
||||
lda #<interrupt_handler
|
||||
sta $03fe
|
||||
lda #>interrupt_handler
|
||||
sta $03ff
|
||||
; lda #<interrupt_handler
|
||||
; sta $03fe
|
||||
; lda #>interrupt_handler
|
||||
; sta $03ff
|
||||
|
||||
jsr $BF00 ; prodos MLI interface
|
||||
.byte $40 ; ALLOC_INTERRUPT
|
||||
.word interrupt_parms
|
||||
|
||||
|
||||
;============================
|
||||
; Enable 50Hz clock on 6522
|
||||
@ -273,3 +280,8 @@ setup_irq_smc6:
|
||||
; clear interrupt and start counting
|
||||
|
||||
rts
|
||||
|
||||
interrupt_parms:
|
||||
.byte $02 ; number of paramaters
|
||||
.byte $00 ; priority
|
||||
.word interrupt_handler
|
||||
|
Loading…
x
Reference in New Issue
Block a user