hgr: star_lady: fix music

autopatch for the lose
This commit is contained in:
Vince Weaver
2025-11-15 20:54:55 -05:00
parent bb3bf68aca
commit 5252a52e5b
4 changed files with 110 additions and 4 deletions
+1
View File
@@ -116,6 +116,7 @@ music.inc: generate_common MUSIC
./generate_common -a 0xd000 -s clear_ay_both music.lst >> music.inc
./generate_common -a 0xd000 -s mockingboard_setup_interrupt music.lst >> music.inc
./generate_common -a 0xd000 -s mockingboard_disable_interrupt music.lst >> music.inc
./generate_common -a 0xd000 -s mockingboard_patch music.lst >> music.inc
./generate_common -a 0xd000 -s done_pt3_irq_handler music.lst >> music.inc
./generate_common -a 0xd000 -s PT3_LOC music.lst >> music.inc
./generate_common -a 0xd000 -s current_pattern_smc music.lst >> music.inc
@@ -5,7 +5,7 @@
; this is the brute force version, we have to patch 39 locations
; see further below if you want to try a smaller, more dangerous, patch
.if 0
mockingboard_patch:
lda MB_ADDR_H
@@ -66,8 +66,11 @@ mockingboard_patch:
sta setup_irq_smc5+2 ; 38
sta setup_irq_smc6+2 ; 39
sta disable_irq_smc1+2 ; 40
sta disable_irq_smc2+2 ; 41
rts
.endif
;===================================================================
; dangerous code to patch mockingboard if not in slot#4
@@ -80,7 +83,8 @@ mockingboard_patch:
; only do this if 2 bytes after a LDA/STA/LDX/STX
; count total and if not 39 then print error message
mockingboard_patch:
.if 0
mockingboard_autopatch:
; from mockingboard_init $1BBF
; to done_pt3_irq_handler $1D85
@@ -119,3 +123,4 @@ mb_patch_done:
stx MB_ADDR_H ; restore slot for later
rts
.endif
+100
View File
@@ -0,0 +1,100 @@
;=================================
;=================================
; Zero Page Usage for PT3 Player
;=================================
;=================================
.if 0
;==========================
; $70-$7F for PT3 Player
;==========================
AY_REGISTERS = $70
A_FINE_TONE = $70
A_COARSE_TONE = $71
B_FINE_TONE = $72
B_COARSE_TONE = $73
C_FINE_TONE = $74
C_COARSE_TONE = $75
NOISE = $76
ENABLE = $77
PT3_MIXER_VAL = $77
A_VOLUME = $78
B_VOLUME = $79
C_VOLUME = $7A
ENVELOPE_FINE = $7B
ENVELOPE_COARSE = $7C
ENVELOPE_SHAPE = $7D
PATTERN_L = $7E
PATTERN_H = $7F
;============================
; $80-$8D rest of pt3_player
;============================
PT3_TEMP = $80
ORNAMENT_L = $81
ORNAMENT_H = $82
SAMPLE_L = $83
SAMPLE_H = $84
LOOP = $85
MB_VALUE = $86
MB_ADDR_L = $87
MB_ADDR_H = $88
DONE_PLAYING = $89
DONE_SONG = $8A
APPLEII_MODEL = $8B
SOUND_STATUS = $8C
SOUND_DISABLED = $80
SOUND_IN_LC = $01 ; $01 sound effects in language card
SOUND_MOCKINGBOARD = $02 ; mockingboard detected
IRQ_COUNTDOWN = $8D
.endif
;==========================
; $70-$7F for PT3 Player
;==========================
AY_REGISTERS = $E0
A_FINE_TONE = $E0
A_COARSE_TONE = $E1
B_FINE_TONE = $E2
B_COARSE_TONE = $E3
C_FINE_TONE = $E4
C_COARSE_TONE = $E5
NOISE = $E6
ENABLE = $E7
PT3_MIXER_VAL = $e7
A_VOLUME = $E8
B_VOLUME = $E9
C_VOLUME = $EA
ENVELOPE_FINE = $EB
ENVELOPE_COARSE = $EC
ENVELOPE_SHAPE = $ED
PATTERN_L = $EE
PATTERN_H = $EF
;============================
; $80-$8D rest of pt3_player
;============================
PT3_TEMP = $F0
ORNAMENT_L = $F1
ORNAMENT_H = $F2
SAMPLE_L = $F3
SAMPLE_H = $F4
LOOP = $F5
MB_VALUE = $F6
MB_ADDR_L = $F7
MB_ADDR_H = $F8
DONE_PLAYING = $F9
DONE_SONG = $FA
APPLEII_MODEL = $FB
SOUND_STATUS = $FC
SOUND_DISABLED = $80
SOUND_IN_LC = $01 ; $01 sound effects in language card
SOUND_MOCKINGBOARD = $02 ; mockingboard detected
IRQ_COUNTDOWN = $FD
+1 -1
View File
@@ -100,7 +100,7 @@ PT3_ENABLE_APPLE_IIC = 1
.include "wait_keypress.s"
.include "zx02_optim.s"
.include "gs_interrupt.s"
.include "pt3_lib_mockingboard_patch.s"
; .include "pt3_lib_mockingboard_patch.s"
.include "hardware_detect.s"
; .include "gr_page_flip.s"
.include "hgr_clear_screen.s"