mirror of
https://github.com/deater/dos33fsprogs.git
synced 2025-01-07 12:31:57 +00:00
demo: re-arrange
not much room :(
This commit is contained in:
parent
58a853bcf3
commit
647adeb54f
@ -42,7 +42,7 @@ ESCAPE: escape.o
|
||||
escape.o: escape.s \
|
||||
logo_intro.s \
|
||||
ay3_write_regs.s escape.s interrupt_handler.s \
|
||||
play_frame.s amp.s \
|
||||
play_frame.s \
|
||||
mA2E_4.s mockingboard_constants.s mockingboard_init.s tracker_init.s
|
||||
ca65 -o escape.o escape.s -l escape.lst
|
||||
|
||||
|
@ -1,89 +0,0 @@
|
||||
; pattern 0
|
||||
; 0 -> F
|
||||
; 48-> C
|
||||
; 50-> A
|
||||
; 52-> 9
|
||||
; 54-> 8
|
||||
; 56-> 7
|
||||
; 58-> 6
|
||||
; 60-> 5
|
||||
; 62-> 4
|
||||
bamps0:
|
||||
; 0 15 30 45 48 50 52 54 56 58 60 62
|
||||
.byte $FF,$FF,$FF,$3F,$2C,$2A,$29,$28,$27,$26,$25,$24
|
||||
|
||||
; pattern 1
|
||||
; 0 -> F
|
||||
; 9 -> C
|
||||
;10 -> F
|
||||
;20 -> C
|
||||
;22 -> F
|
||||
;29 -> C
|
||||
;30 -> F
|
||||
;31 -> C
|
||||
;32 -> F
|
||||
;40 -> C
|
||||
; 48-> A
|
||||
; 50-> 9
|
||||
; 52-> 8
|
||||
; 54-> 7
|
||||
; 56-> 6
|
||||
; 58-> 5
|
||||
; 60-> 4
|
||||
; 62-> 3
|
||||
bamps1:
|
||||
; 0 9 10 20 22 29 30 31 32 40 48 50 52 54 56 58 60 62
|
||||
.byte $9F,$1C,$AF,$2C,$7F,$1C,$1F,$1C,$8F,$8C,$2A,$29,$28,$27,$26,$25,$24,$23
|
||||
|
||||
; pattern 2
|
||||
; 0 ->F
|
||||
; 13->C
|
||||
; 14->F
|
||||
; 15->C
|
||||
; 16->F
|
||||
; 24->C
|
||||
; 26->9
|
||||
; 28->8
|
||||
; 30->7
|
||||
; 32->F
|
||||
; 45->C
|
||||
; 46->F
|
||||
; 47->C
|
||||
; 48->F
|
||||
; 56->C
|
||||
; 58->9
|
||||
; 60->7
|
||||
; 62->6
|
||||
bamps2:
|
||||
; 0 13 14 15 16 24 26 28 30 32 45 46 47 48 56 58 60 62
|
||||
.byte $DF,$1C,$1F,$1C,$8F,$2C,$29,$28,$27,$DF,$1C,$1F,$1C,$8F,$2C,$29,$27,$26
|
||||
|
||||
; pattern3
|
||||
; 0->F
|
||||
; 24->C
|
||||
; 26->9
|
||||
; 28->8
|
||||
; 30->7
|
||||
; 32->F
|
||||
; 45->C
|
||||
; 46->F
|
||||
; 47->C
|
||||
; 48->F
|
||||
; 56->C
|
||||
; 58->9
|
||||
; 60->7
|
||||
; 62->6
|
||||
bamps3:
|
||||
; 0 15 24 26 28 30 32 45 46 47 48 56 58 60 62
|
||||
.byte $FF,$9F,$2C,$29,$28,$27,$DF,$1C,$1F,$1C,$8F,$2C,$29,$27,$26
|
||||
|
||||
; pattern4
|
||||
; 0->0
|
||||
; 60->F
|
||||
; 61->C
|
||||
; 62->F
|
||||
; 63->C
|
||||
|
||||
bamps4:
|
||||
; 0 15 30 45 60 61 62 63
|
||||
.byte $F0,$F0,$F0,$F0,$1F,$1C,$1F,$1C
|
@ -42,9 +42,6 @@ game_loop:
|
||||
.include "interrupt_handler.s"
|
||||
.include "mockingboard_constants.s"
|
||||
|
||||
; music
|
||||
.include "mA2E_4.s"
|
||||
|
||||
; logo
|
||||
letter_d:
|
||||
.include "./letters/d.inc"
|
||||
@ -56,3 +53,8 @@ letter_i:
|
||||
.include "./letters/i.inc"
|
||||
letter_r:
|
||||
.include "./letters/r.inc"
|
||||
|
||||
; music
|
||||
.include "mA2E_4.s"
|
||||
|
||||
|
||||
|
@ -1,5 +1,134 @@
|
||||
peasant_song:
|
||||
; register init
|
||||
; Octave 0 : 0 0 0 3 0 3 0 3 3 0 16 0
|
||||
; Octave 1 : 45 0 0 19 0 23 0 0 0 0 5 0
|
||||
; Octave 2 : 14 0 2 6 0 8 0 0 0 0 0 0
|
||||
; Octave 3 : 0 0 0 1 0 1 0 2 0 0 2 0
|
||||
; Octave 4 : 4 0 1 5 2 5 0 7 0 2 4 0
|
||||
; Octave 5 : 3 0 4 1 5 2 0 0 0 0 0 0
|
||||
; 30 notes allocated
|
||||
;.byte 12,55,24,64,10,62,60,15,17,58,22,57,8,7,5,3,53,52,29,27,26,65,63,51,50,48,46,39,41,43,
|
||||
|
||||
frequencies_low:
|
||||
.byte $D1,$51,$E8,$30,$49,$36,$3D,$36
|
||||
.byte $DC,$44,$24,$48,$CF,$18,$B8,$6C
|
||||
.byte $5B,$60,$6E,$9B,$B3,$2D,$33,$66
|
||||
.byte $6C,$7A,$89,$CD,$B7,$A3
|
||||
|
||||
frequencies_high:
|
||||
.byte $03,$00,$01,$00,$04,$00,$00,$03,$02,$00,$02,$00,$04,$05,$05,$06,$00,$00,$01,$01,$01,$00,$00,$00,$00,$00,$00,$00,$00,$00
|
||||
; total len=61
|
||||
|
||||
; pattern 0
|
||||
; 0 -> F
|
||||
; 48-> C
|
||||
; 50-> A
|
||||
; 52-> 9
|
||||
; 54-> 8
|
||||
; 56-> 7
|
||||
; 58-> 6
|
||||
; 60-> 5
|
||||
; 62-> 4
|
||||
bamps0:
|
||||
; 0 15 30 45 48 50 52 54 56 58 60 62
|
||||
.byte $FF,$FF,$FF,$3F,$2C,$2A,$29,$28,$27,$26,$25,$24
|
||||
|
||||
; pattern 1
|
||||
; 0 -> F
|
||||
; 9 -> C
|
||||
;10 -> F
|
||||
;20 -> C
|
||||
;22 -> F
|
||||
;29 -> C
|
||||
;30 -> F
|
||||
;31 -> C
|
||||
;32 -> F
|
||||
;40 -> C
|
||||
; 48-> A
|
||||
; 50-> 9
|
||||
; 52-> 8
|
||||
; 54-> 7
|
||||
; 56-> 6
|
||||
; 58-> 5
|
||||
; 60-> 4
|
||||
; 62-> 3
|
||||
bamps1:
|
||||
; 0 9 10 20 22 29 30 31 32 40 48 50 52 54 56 58 60 62
|
||||
.byte $9F,$1C,$AF,$2C,$7F,$1C,$1F,$1C,$8F,$8C,$2A,$29,$28,$27,$26,$25,$24,$23
|
||||
|
||||
; pattern 2
|
||||
; 0 ->F
|
||||
; 13->C
|
||||
; 14->F
|
||||
; 15->C
|
||||
; 16->F
|
||||
; 24->C
|
||||
; 26->9
|
||||
; 28->8
|
||||
; 30->7
|
||||
; 32->F
|
||||
; 45->C
|
||||
; 46->F
|
||||
; 47->C
|
||||
; 48->F
|
||||
; 56->C
|
||||
; 58->9
|
||||
; 60->7
|
||||
; 62->6
|
||||
bamps2:
|
||||
; 0 13 14 15 16 24 26 28 30 32 45 46 47 48 56 58 60 62
|
||||
.byte $DF,$1C,$1F,$1C,$8F,$2C,$29,$28,$27,$DF,$1C,$1F,$1C,$8F,$2C,$29,$27,$26
|
||||
|
||||
; pattern3
|
||||
; 0->F
|
||||
; 24->C
|
||||
; 26->9
|
||||
; 28->8
|
||||
; 30->7
|
||||
; 32->F
|
||||
; 45->C
|
||||
; 46->F
|
||||
; 47->C
|
||||
; 48->F
|
||||
; 56->C
|
||||
; 58->9
|
||||
; 60->7
|
||||
; 62->6
|
||||
bamps3:
|
||||
; 0 15 24 26 28 30 32 45 46 47 48 56 58 60 62
|
||||
.byte $FF,$9F,$2C,$29,$28,$27,$DF,$1C,$1F,$1C,$8F,$2C,$29,$27,$26
|
||||
|
||||
; pattern4
|
||||
; 0->0
|
||||
; 60->F
|
||||
; 61->C
|
||||
; 62->F
|
||||
; 63->C
|
||||
|
||||
bamps4:
|
||||
; 0 15 30 45 60 61 62 63
|
||||
.byte $F0,$F0,$F0,$F0,$1F,$1C,$1F,$1C
|
||||
|
||||
|
||||
.align $100
|
||||
|
||||
channel_a_volume:
|
||||
.byte 14,14,14,14,11,11,10,10
|
||||
|
||||
lengths:
|
||||
.byte 0*8,1*8,2*8,4*8
|
||||
|
||||
tracks_l:
|
||||
.byte <track4,<track0,<track1,<track2,<track3
|
||||
|
||||
; assume all on same page
|
||||
; tracks_h:
|
||||
; .byte >track4,>track0,>track1,>track2,>track3
|
||||
|
||||
bamps_l:
|
||||
.byte <bamps4,<bamps0,<bamps1,<bamps2,<bamps3
|
||||
; bamps_h:
|
||||
; .byte >bamps4,>bamps0,>bamps1,>bamps2,>bamps3
|
||||
|
||||
|
||||
|
||||
track0:
|
||||
|
||||
@ -423,16 +552,5 @@ track4:
|
||||
; last: a=-1 b=16 len=2
|
||||
.byte $85 ; frame=64 B=16 L=2
|
||||
.byte $FF ; end
|
||||
; Octave 0 : 0 0 0 3 0 3 0 3 3 0 16 0
|
||||
; Octave 1 : 45 0 0 19 0 23 0 0 0 0 5 0
|
||||
; Octave 2 : 14 0 2 6 0 8 0 0 0 0 0 0
|
||||
; Octave 3 : 0 0 0 1 0 1 0 2 0 0 2 0
|
||||
; Octave 4 : 4 0 1 5 2 5 0 7 0 2 4 0
|
||||
; Octave 5 : 3 0 4 1 5 2 0 0 0 0 0 0
|
||||
; 30 notes allocated
|
||||
;.byte 12,55,24,64,10,62,60,15,17,58,22,57,8,7,5,3,53,52,29,27,26,65,63,51,50,48,46,39,41,43,
|
||||
frequencies_low:
|
||||
.byte $D1,$51,$E8,$30,$49,$36,$3D,$36,$DC,$44,$24,$48,$CF,$18,$B8,$6C,$5B,$60,$6E,$9B,$B3,$2D,$33,$66,$6C,$7A,$89,$CD,$B7,$A3
|
||||
frequencies_high:
|
||||
.byte $03,$00,$01,$00,$04,$00,$00,$03,$02,$00,$02,$00,$04,$05,$05,$06,$00,$00,$01,$01,$01,$00,$00,$00,$00,$00,$00,$00,$00,$00
|
||||
; total len=61
|
||||
|
||||
|
||||
|
@ -11,7 +11,7 @@ init_values:
|
||||
.byte $ff,$ff ; set the data direction for all pins of PortA/PortB to be output
|
||||
.byte $40,$7f
|
||||
.byte $C0,$C0
|
||||
.byte $e7,$4f ; c7ce / 1.023e6 = .050s, 20Hz
|
||||
.byte $e7,$4f ; 50Hz
|
||||
.byte MOCK_AY_RESET,MOCK_AY_INACTIVE
|
||||
|
||||
; c7ce / 1.023e6 = .050s, 20Hz
|
||||
|
@ -1,22 +1,5 @@
|
||||
play_frame:
|
||||
|
||||
;===============================
|
||||
;===============================
|
||||
; things that happen every frame
|
||||
;===============================
|
||||
;===============================
|
||||
|
||||
|
||||
;=================================
|
||||
; rotate through channel A volume
|
||||
|
||||
lda FRAME ; repeating 8-long pattern
|
||||
and #$7
|
||||
tay
|
||||
lda channel_a_volume,Y
|
||||
sta AY_REGS+8 ; A volume
|
||||
|
||||
|
||||
|
||||
;============================
|
||||
; see if still counting down
|
||||
@ -52,13 +35,13 @@ track_smc:
|
||||
no_wrap:
|
||||
lda tracks_l,Y
|
||||
sta track_smc+1
|
||||
lda tracks_h,Y
|
||||
sta track_smc+2
|
||||
; lda tracks_h,Y
|
||||
; sta track_smc+2
|
||||
|
||||
lda bamps_l,Y
|
||||
sta bamp_smc+1
|
||||
lda bamps_h,Y
|
||||
sta bamp_smc+2
|
||||
; lda bamps_h,Y
|
||||
; sta bamp_smc+2
|
||||
|
||||
lda #0
|
||||
sta SONG_OFFSET
|
||||
@ -125,34 +108,33 @@ done_update_song:
|
||||
|
||||
dec SONG_COUNTDOWN
|
||||
bmi set_notes_loop
|
||||
bpl skip_data
|
||||
|
||||
channel_a_volume:
|
||||
.byte 14,14,14,14,11,11,10,10
|
||||
|
||||
lengths:
|
||||
.byte 0*8,1*8,2*8,4*8
|
||||
|
||||
tracks_l:
|
||||
.byte <track4,<track0,<track1,<track2,<track3
|
||||
tracks_h:
|
||||
.byte >track4,>track0,>track1,>track2,>track3
|
||||
|
||||
bamps_l:
|
||||
.byte <bamps4,<bamps0,<bamps1,<bamps2,<bamps3
|
||||
bamps_h:
|
||||
.byte >bamps4,>bamps0,>bamps1,>bamps2,>bamps3
|
||||
|
||||
|
||||
.include "amp.s"
|
||||
|
||||
skip_data:
|
||||
|
||||
;===============================
|
||||
;===============================
|
||||
; things that happen every frame
|
||||
;===============================
|
||||
;===============================
|
||||
|
||||
|
||||
;=================================
|
||||
; rotate through channel A volume
|
||||
|
||||
lda FRAME ; repeating 8-long pattern
|
||||
and #$7
|
||||
tay
|
||||
lda channel_a_volume,Y
|
||||
sta AY_REGS+8 ; A volume
|
||||
|
||||
|
||||
;=================================
|
||||
; handle channel B volume
|
||||
chanb:
|
||||
lda FRAME
|
||||
and #$7
|
||||
; lda FRAME
|
||||
; and #$7
|
||||
tya
|
||||
bne bamps_skip
|
||||
|
||||
lda BAMP_COUNTDOWN
|
||||
|
Loading…
Reference in New Issue
Block a user