almost partyfinal

This commit is contained in:
wbcbz7 2025-08-21 23:44:12 +07:00
parent 7f9e3b7396
commit 3c86ab9070
22 changed files with 77 additions and 45 deletions

View file

@ -10,4 +10,10 @@ the repo is a mess at this moment, code quality is not great as well. sorry :)
## build instructions
1.
-- artёmka 14.o8.2o25

Binary file not shown.

View file

@ -58,40 +58,40 @@ start:
; draw vu meters
ld bc, 0x4000+2048*2+32*7+0
call vumeter.draw_e
call vumeter.draw_0
.vu0 equ $-2
ld bc, 0x4000+2048*2+32*7+1
call vumeter.draw_e
call vumeter.draw_0
.vu1 equ $-2
ld bc, 0x4000+2048*2+32*7+2
call vumeter.draw_e
call vumeter.draw_0
.vu2 equ $-2
ld bc, 0x4000+2048*2+32*7+3
call vumeter.draw_e
call vumeter.draw_0
.vu3 equ $-2
ld bc, 0x4000+2048*2+32*7+4
call vumeter.draw_e
call vumeter.draw_0
.vu4 equ $-2
ld bc, 0x4000+2048*2+32*7+5
call vumeter.draw_e
call vumeter.draw_0
.vu5 equ $-2
ld bc, 0x4000+2048*2+32*7+6
call vumeter.draw_e
call vumeter.draw_0
.vu6 equ $-2
ld bc, 0x4000+2048*2+32*7+7
call vumeter.draw_e
call vumeter.draw_0
.vu7 equ $-2
ld bc, 0x4000+2048*2+32*7+8
call vumeter.draw_e
call vumeter.draw_0
.vu8 equ $-2
ld bc, 0x4000+2048*2+32*7+9
call vumeter.draw_e
call vumeter.draw_0
.vu9 equ $-2
ld bc, 0x4000+2048*2+32*7+10
call vumeter.draw_e
call vumeter.draw_0
.vu10 equ $-2
ld bc, 0x4000+2048*2+32*7+11
call vumeter.draw_e
call vumeter.draw_0
.vu11 equ $-2
ld iy, reg_buffer
@ -226,7 +226,7 @@ vumeter:
db "this time for the ZX Spectrum 128 + TurboSound FM! (2 x YM2203)", 10
db 10
db "player code - artemka", 10
db "splash screen - rui8bit", 10
db "splash screen - Rui8bit and Grongy", 10
db "music - Abstract 64, Alex Winston, Natt, nIk0, Pator and Rei8bit", 10
db "support and tools - AArt1526", 10
db 10
@ -266,8 +266,10 @@ vumeter:
db 10
db "p.p.s. come to Multimatograf 2026 - the party that cares about the demoscene - spring 2026 - events.retroscene.org", 10
music_p0_ch1:
incbin "tsfm_done_optimized/tsfm_done_optimized_ch1.bin"
music_p0_ch3:
incbin "tsfm_2108_0500_optimized/tsfm_2108_0500_optimized_ch3.bin"
incbin "tsfm_done_optimized/tsfm_done_optimized_ch3.bin"
code_end
@ -277,9 +279,9 @@ code_end
emptytap "page0.tap"
org 0xC000
music_p0_ch12:
incbin "tsfm_2108_0500_optimized/tsfm_2108_0500_optimized_ch12.bin"
music_p0_ch0:
incbin "tsfm_2108_0500_optimized/tsfm_2108_0500_optimized_ch0.bin"
incbin "tsfm_done_optimized/tsfm_done_optimized_ch12.bin"
music_p0_ch13:
incbin "tsfm_done_optimized/tsfm_done_optimized_ch13.bin"
savetap "page0.tap",CODE,"page0",0xC000,$-0xC000
; ------------------------------------------------
@ -287,11 +289,9 @@ music_p0_ch0:
emptytap "page1.tap"
org 0xC000
music_p0_ch14:
incbin "tsfm_2108_0500_optimized/tsfm_2108_0500_optimized_ch14.bin"
incbin "tsfm_done_optimized/tsfm_done_optimized_ch14.bin"
music_p0_ch7:
incbin "tsfm_2108_0500_optimized/tsfm_2108_0500_optimized_ch7.bin"
music_p0_ch15:
incbin "tsfm_2108_0500_optimized/tsfm_2108_0500_optimized_ch15.bin"
incbin "tsfm_done_optimized/tsfm_done_optimized_ch7.bin"
savetap "page1.tap",CODE,"page1",0xC000,$-0xC000
; ------------------------------------------------
@ -299,9 +299,9 @@ music_p0_ch15:
emptytap "page3.tap"
org 0xC000
music_p0_ch10:
incbin "tsfm_2108_0500_optimized/tsfm_2108_0500_optimized_ch10.bin"
music_p0_ch1:
incbin "tsfm_2108_0500_optimized/tsfm_2108_0500_optimized_ch1.bin"
incbin "tsfm_done_optimized/tsfm_done_optimized_ch10.bin"
music_p0_ch9:
incbin "tsfm_done_optimized/tsfm_done_optimized_ch9.bin"
savetap "page3.tap",CODE,"page3",0xC000,$-0xC000
; ------------------------------------------------
@ -309,9 +309,9 @@ music_p0_ch1:
emptytap "page4.tap"
org 0xC000
music_p0_ch2:
incbin "tsfm_2108_0500_optimized/tsfm_2108_0500_optimized_ch2.bin"
music_p0_ch8:
incbin "tsfm_2108_0500_optimized/tsfm_2108_0500_optimized_ch8.bin"
incbin "tsfm_done_optimized/tsfm_done_optimized_ch2.bin"
music_p0_ch0:
incbin "tsfm_done_optimized/tsfm_done_optimized_ch0.bin"
savetap "page4.tap",CODE,"page4",0xC000,$-0xC000
; ------------------------------------------------
@ -319,11 +319,9 @@ music_p0_ch8:
emptytap "page6.tap"
org 0xC000
music_p0_ch11:
incbin "tsfm_2108_0500_optimized/tsfm_2108_0500_optimized_ch11.bin"
music_p0_ch13:
incbin "tsfm_2108_0500_optimized/tsfm_2108_0500_optimized_ch13.bin"
music_p0_ch5:
incbin "tsfm_2108_0500_optimized/tsfm_2108_0500_optimized_ch5.bin"
incbin "tsfm_done_optimized/tsfm_done_optimized_ch11.bin"
music_p0_ch8:
incbin "tsfm_done_optimized/tsfm_done_optimized_ch8.bin"
savetap "page6.tap",CODE,"page6",0xC000,$-0xC000
; ------------------------------------------------
@ -331,11 +329,13 @@ music_p0_ch5:
emptytap "page7.tap"
org 0xC000
music_p0_ch4:
incbin "tsfm_2108_0500_optimized/tsfm_2108_0500_optimized_ch4.bin"
incbin "tsfm_done_optimized/tsfm_done_optimized_ch4.bin"
music_p0_ch6:
incbin "tsfm_2108_0500_optimized/tsfm_2108_0500_optimized_ch6.bin"
music_p0_ch9:
incbin "tsfm_2108_0500_optimized/tsfm_2108_0500_optimized_ch9.bin"
incbin "tsfm_done_optimized/tsfm_done_optimized_ch6.bin"
music_p0_ch5:
incbin "tsfm_done_optimized/tsfm_done_optimized_ch5.bin"
music_p0_ch15:
incbin "tsfm_done_optimized/tsfm_done_optimized_ch15.bin"
savetap "page7.tap",CODE,"page7",0xC000,$-0xC000
; splash screen
@ -344,7 +344,8 @@ music_p0_ch9:
splash:
;block 6144, 0
;block 768, (0<<3)|(7<<0)
incbin "!gfx/tsfm2.scr"
;incbin "!gfx/tsfm2.scr"
incbin "!gfx/tsfm_fin3.scr"
savetap "splash.tap",CODE,"splash",0x4000,$-0x4000
endmodule

View file

@ -43,22 +43,22 @@ ssg_r7 block 2, 0
; instantinate structures
align 256
player_channels:
channel_struct_t 0, music_p0_ch0 ; TODO: fill start offsets here
channel_struct_t 3, music_p0_ch1
channel_struct_t 4, music_p0_ch0 ; TODO: fill start offsets here
channel_struct_t 2, music_p0_ch1
channel_struct_t 4, music_p0_ch2
channel_struct_t 0, music_p0_ch3
channel_struct_t 2, music_p0_ch3
channel_struct_t 7, music_p0_ch4
channel_struct_t 6, music_p0_ch5
channel_struct_t 7, music_p0_ch5
channel_struct_t 7, music_p0_ch6
channel_struct_t 1, music_p0_ch7
channel_struct_t 4, music_p0_ch8
channel_struct_t 7, music_p0_ch9
channel_struct_t 6, music_p0_ch8
channel_struct_t 3, music_p0_ch9
channel_struct_t 3, music_p0_ch10
channel_struct_t 6, music_p0_ch11
channel_struct_t 0, music_p0_ch12
channel_struct_t 6, music_p0_ch13
channel_struct_t 0, music_p0_ch13
channel_struct_t 1, music_p0_ch14
channel_struct_t 1, music_p0_ch15
channel_struct_t 7, music_p0_ch15
player_struct player_struct_t player_channels+(channel_struct_t*(3+0)+channel_struct_t.reg_extch3_fhi), player_channels+(channel_struct_t*(3+8)+channel_struct_t.reg_extch3_fhi)
@ -490,6 +490,16 @@ parse_fm_control_stream:
; HL - stream data, IX- channel context, IY - register buffer, CF - do next op
parse_fm_channel_stream:
ld b, [hl]
ld a, b
cp 0xFA
jp nz, 1f
inc hl
scf
ret
1:
; if ((*(data) & 0xC0) == OPM_FM_ADSR) {
ld a, b : and 0xC0 : cp OPM_FM_ADSR
jp nz, .not_adsr
@ -676,6 +686,8 @@ parse_stream:
jp z, .tok_end_of_stream
cp OPM_STREAM_END_FRAME
jp z, .tok_end_of_frame
;cp OPM_STREAM_LOOP
;jp z, .tok_loop_point
; call stream parser proc
call 0 ; :grins:
@ -714,6 +726,10 @@ parse_stream:
; fetch next token until it's end of frame
jp .tok_loop
.tok_loop_point:
inc hl
jp .tok_loop
.tok_end_of_stream:
ld de, -1
ld [ix + channel_struct_t.delay], de

View file

@ -0,0 +1,9 @@
; autogenerated, edit with care!
ifndef MUSIC_INC
define MUSIC_INC
TICK_RATE equ 50
TOTAL_FRAMES equ 8860
TOTAL_CHANNELS equ 16
FILEPATH equ "tsfm_done_optimized/tsfm_done_optimized"
endif