Fix esp32 detection, add colored caption, live stats, single-loop playback
- Fix state_esp init bug: crt0.s never runs GSINIT and hex2bin fills unbacked memory with 0xFF (not 0), so a plain zero-init global always read 0xFF on load; give it a real 0xFF sentinel initializer instead. - Vendor demyanenko-d/VGMPLAY.WMF's wc_api library (SDCC 4.6.0 + --sdcccall 1) instead of hand-rolled PRSRW/PRIAT wrappers, which corrupted esp32 file loading in three different shapes; colored "File:" caption now works. - Trim shared-file footprint: vendor only the esp32.c functions actually used, drop unused sdklib.h/sdk.lib linkage. - Re-enable periodic live stats (Pattern/Row/BPM/Time/progress bar). - Limit playback to one loop via TRACK_SET_PARAMS/MAX_LOOP_COUNT, and auto-advance to the next file when a track finishes on its own (detected via a PLAYING->STOPPED ESP_REG_TRACK_STATUS transition). - Pin the Z80 clock to 14MHz for the whole plugin lifetime so esp32 SPI wait-loop timeouts (raw iteration counts, not real time) don't depend on whatever turbo setting was active before the plugin started. - Pad TRACK_INIT's timeout well past the firmware's 5s song-length measurement cap (XM_MEASURE_MAX_US). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
+117
-83
@@ -7,7 +7,7 @@ Area Addr Size Decimal Bytes (A
|
||||
|
||||
Value Global Global Defined In Module
|
||||
----- -------------------------------- ------------------------
|
||||
00000000 .__.ABS. wc_key_pgup
|
||||
00000000 .__.ABS. mul
|
||||
00000000 l__BSEG
|
||||
00000000 l__BSS
|
||||
00000000 l__CABS
|
||||
@@ -16,130 +16,162 @@ Area Addr Size Decimal Bytes (A
|
||||
00000000 l__GSINIT
|
||||
00000000 l__HEADER
|
||||
00000000 l__HEAP
|
||||
00000000 l__INITIALIZED
|
||||
00000000 l__INITIALIZER
|
||||
00000000 s__CABS
|
||||
00000000 s__DABS
|
||||
00000000 s__HEADER
|
||||
00000000 s__HEADER0
|
||||
00000001 l__INITIALIZED
|
||||
00000001 l__INITIALIZER
|
||||
00000003 l__HEADER0
|
||||
0000010A l__HOME
|
||||
00000AEC l__CODE
|
||||
0000103C l__DATA
|
||||
000001ED l__HOME
|
||||
00000C33 l__CODE
|
||||
0000105E l__DATA
|
||||
00008003 s__CODE
|
||||
0000A800 s__DATA
|
||||
0000B83C s__HOME
|
||||
0000B83C s__INITIALIZED
|
||||
0000B946 s__BSEG
|
||||
0000B946 s__BSS
|
||||
0000B946 s__GSFINAL
|
||||
0000B946 s__GSINIT
|
||||
0000B946 s__HEAP
|
||||
0000B946 s__INITIALIZER
|
||||
0000B85E s__INITIALIZED
|
||||
0000B85F s__HOME
|
||||
0000BA4C s__GSFINAL
|
||||
0000BA4C s__GSINIT
|
||||
0000BA4C s__INITIALIZER
|
||||
0000BA4D s__BSEG
|
||||
0000BA4D s__BSS
|
||||
0000BA4D s__HEAP
|
||||
|
||||
ASxxxx Linker V05.50.4-SDLD, page 2.
|
||||
Hexadecimal [32-Bits]
|
||||
|
||||
Area Addr Size Decimal Bytes (Attributes)
|
||||
-------------------------------- ---- ---- ------- ----- ------------
|
||||
_CODE 00008003 00000AEC = 2796. bytes (REL,CON)
|
||||
_CODE 00008003 00000C33 = 3123. bytes (REL,CON)
|
||||
|
||||
Value Global Global Defined In Module
|
||||
----- -------------------------------- ------------------------
|
||||
00008003 _wc_exit main
|
||||
00008008 _esp_cmd main
|
||||
00008021 _esp_rd_reg8 main
|
||||
0000803A _esp_rd_reg32 main
|
||||
000080A8 _esp_rd_regs main
|
||||
000080D4 _esp_wr_reg8 main
|
||||
000080EB _esp_wr_reg32 main
|
||||
0000811B _esp_wr_end main
|
||||
0000812A _esp_send_dma main
|
||||
0000818E _esp_rd_end main
|
||||
0000819D _esp_wait_status main
|
||||
000081D8 _esp_wait_busy main
|
||||
000081FA _esp_create_obj main
|
||||
00008228 _esp_init main
|
||||
00008235 _err_no_esp main
|
||||
00008247 _err_out_of_mem main
|
||||
00008259 _err_playback main
|
||||
0000826B _win_xm main
|
||||
0000827D _win_about main
|
||||
0000832C _play_xm main
|
||||
00008541 _wait_esc_key main
|
||||
00008549 _wait_frames main
|
||||
00008552 _about main
|
||||
00008565 _error_esp main
|
||||
00008578 _error_oom main
|
||||
0000858E _error_playback main
|
||||
000085A4 _copy_file_name main
|
||||
000085C9 _xm_draw_static_labels main
|
||||
000085F9 _put_hex2 main
|
||||
00008636 _put_dec3 main
|
||||
00008693 _put_time main
|
||||
00008740 _xm_draw_stats_labels main
|
||||
000087B9 _xm_update_info main
|
||||
000088DD _main_start main
|
||||
000089B0 _main main
|
||||
000089D9 __divuchar divunsigned
|
||||
000089DB __divu8 divunsigned
|
||||
000089DE __divu16 divunsigned
|
||||
000089DE __divuint divunsigned
|
||||
00008A0D _wc_load512 wc_load512
|
||||
00008A22 __moduchar modunsigned
|
||||
00008A29 __moduint modunsigned
|
||||
00008A2E _wc_prsrw wc_prsrw
|
||||
00008A64 _wc_prwow wc_prwow
|
||||
00008A71 _wc_key_pgdn wc_key_pgdn
|
||||
00008A7B _wc_prsrw_attr wc_prsrw_attr
|
||||
00008AC2 _wc_rresb wc_rresb
|
||||
00008ACF _strlen strlen
|
||||
00008ADB _wc_key_esc wc_key_esc
|
||||
00008AE5 _wc_key_pgup wc_key_pgup
|
||||
|
||||
00008008 _wc_set_freq_14mhz main
|
||||
00008011 _esp_cmd main
|
||||
0000802A _esp_rd_reg8 main
|
||||
00008043 _esp_rd_reg32 main
|
||||
000080B1 _esp_rd_regs main
|
||||
000080DD _esp_wr_reg8 main
|
||||
000080F4 _esp_wr_reg32 main
|
||||
00008124 _esp_wr_end main
|
||||
00008133 _esp_send_dma main
|
||||
00008197 _esp_rd_end main
|
||||
000081A6 _esp_wait_status main
|
||||
000081E1 _esp_wait_busy main
|
||||
00008203 _esp_create_obj main
|
||||
00008231 _esp_init main
|
||||
0000823E _err_no_esp main
|
||||
00008250 _err_out_of_mem main
|
||||
00008262 _err_playback main
|
||||
00008274 _win_xm main
|
||||
00008286 _win_about main
|
||||
00008335 _play_xm main
|
||||
00008568 _wait_esc_key main
|
||||
00008570 _wait_frames main
|
||||
00008579 _about main
|
||||
0000858C _error_esp main
|
||||
0000859F _error_oom main
|
||||
000085B5 _error_playback main
|
||||
000085CB _copy_file_name main
|
||||
000085F0 _xm_draw_static_labels main
|
||||
00008620 _put_hex2 main
|
||||
0000865D _put_dec3 main
|
||||
000086BA _put_time main
|
||||
00008767 _xm_draw_stats_labels main
|
||||
000087E0 _draw_progress_bar main
|
||||
00008863 _xm_update_info main
|
||||
000089D3 _main_start main
|
||||
00008AE0 _main main
|
||||
00008B09 __divuchar divunsigned
|
||||
00008B0B __divu8 divunsigned
|
||||
00008B0E __divu16 divunsigned
|
||||
00008B0E __divuint divunsigned
|
||||
00008B3D _wc_load512 wc_load512
|
||||
00008B52 __moduchar modunsigned
|
||||
00008B59 __moduint modunsigned
|
||||
00008B5E _wc_prsrw wc_prsrw
|
||||
00008B94 _wc_prwow wc_prwow
|
||||
00008BA1 _wc_key_pgdn wc_key_pgdn
|
||||
00008BAB _wc_prsrw_attr wc_prsrw_attr
|
||||
00008BF2 _wc_rresb wc_rresb
|
||||
00008BFF _strlen strlen
|
||||
ASxxxx Linker V05.50.4-SDLD, page 3.
|
||||
Hexadecimal [32-Bits]
|
||||
|
||||
Area Addr Size Decimal Bytes (Attributes)
|
||||
-------------------------------- ---- ---- ------- ----- ------------
|
||||
_DATA 0000A800 0000103C = 4156. bytes (REL,CON)
|
||||
_CODE 00008003 00000C33 = 3123. bytes (REL,CON)
|
||||
|
||||
Value Global Global Defined In Module
|
||||
----- -------------------------------- ------------------------
|
||||
0000A800 _state_esp main
|
||||
0000A801 _fs_buf main
|
||||
0000B801 _ret_sp main
|
||||
0000B803 _filesize main
|
||||
0000B807 _file_ext main
|
||||
0000B808 _call_type main
|
||||
0000B809 _last_esp_status main
|
||||
0000B80A _p_file_name main
|
||||
0000B80C _file_name main
|
||||
0000B82D _total_samples main
|
||||
0000B831 _xm_handle main
|
||||
|
||||
00008C0B _wc_key_esc wc_key_esc
|
||||
00008C15 _wc_key_pgup wc_key_pgup
|
||||
00008C1F __mulint mul
|
||||
00008C21 __mul16 mul
|
||||
ASxxxx Linker V05.50.4-SDLD, page 4.
|
||||
Hexadecimal [32-Bits]
|
||||
|
||||
Area Addr Size Decimal Bytes (Attributes)
|
||||
-------------------------------- ---- ---- ------- ----- ------------
|
||||
_HOME 0000B83C 0000010A = 266. bytes (REL,CON)
|
||||
_DATA 0000A800 0000105E = 4190. bytes (REL,CON)
|
||||
|
||||
Value Global Global Defined In Module
|
||||
----- -------------------------------- ------------------------
|
||||
0000B83C __modulong _modulong
|
||||
0000B8C3 __divulong _divulong
|
||||
0000A800 _fs_buf main
|
||||
0000B800 _ret_sp main
|
||||
0000B802 _filesize main
|
||||
0000B806 _file_ext main
|
||||
0000B807 _call_type main
|
||||
0000B808 _last_esp_status main
|
||||
0000B809 _p_file_name main
|
||||
0000B80B _file_name main
|
||||
0000B82C _total_samples main
|
||||
0000B830 _xm_handle main
|
||||
0000B831 _last_track_status main
|
||||
|
||||
ASxxxx Linker V05.50.4-SDLD, page 5.
|
||||
Hexadecimal [32-Bits]
|
||||
|
||||
Area Addr Size Decimal Bytes (Attributes)
|
||||
-------------------------------- ---- ---- ------- ----- ------------
|
||||
_INITIALIZED 0000B85E 00000001 = 1. bytes (REL,CON)
|
||||
|
||||
Value Global Global Defined In Module
|
||||
----- -------------------------------- ------------------------
|
||||
0000B85E _state_esp main
|
||||
|
||||
ASxxxx Linker V05.50.4-SDLD, page 6.
|
||||
Hexadecimal [32-Bits]
|
||||
|
||||
Area Addr Size Decimal Bytes (Attributes)
|
||||
-------------------------------- ---- ---- ------- ----- ------------
|
||||
_HOME 0000B85F 000001ED = 493. bytes (REL,CON)
|
||||
|
||||
Value Global Global Defined In Module
|
||||
----- -------------------------------- ------------------------
|
||||
0000B85F __modulong _modulong
|
||||
0000B8E6 __divulong _divulong
|
||||
0000B969 __mullong _mullong
|
||||
ASxxxx Linker V05.50.4-SDLD, page 7.
|
||||
Hexadecimal [32-Bits]
|
||||
|
||||
Area Addr Size Decimal Bytes (Attributes)
|
||||
-------------------------------- ---- ---- ------- ----- ------------
|
||||
_INITIALIZER 0000BA4C 00000001 = 1. bytes (REL,CON)
|
||||
|
||||
Value Global Global Defined In Module
|
||||
----- -------------------------------- ------------------------
|
||||
ASxxxx Linker V05.50.4-SDLD, page 8.
|
||||
Hexadecimal [32-Bits]
|
||||
|
||||
Area Addr Size Decimal Bytes (Attributes)
|
||||
-------------------------------- ---- ---- ------- ----- ------------
|
||||
_HEADER0 00000000 00000003 = 3. bytes (ABS,CON)
|
||||
|
||||
Value Global Global Defined In Module
|
||||
----- -------------------------------- ------------------------
|
||||
ASxxxx Linker V05.50.4-SDLD, page 6.
|
||||
ASxxxx Linker V05.50.4-SDLD, page 9.
|
||||
|
||||
Files Linked [ module(s) ]
|
||||
|
||||
@@ -162,8 +194,10 @@ vgm_wc_api.lib [ wc_rresb.rel ]
|
||||
E:\SDCC\4.6.0\bin\..\lib\z80/z80.lib [ strlen.rel ]
|
||||
vgm_wc_api.lib [ wc_key_esc.rel ]
|
||||
vgm_wc_api.lib [ wc_key_pgup.rel ]
|
||||
E:\SDCC\4.6.0\bin\..\lib\z80/z80.lib [ _mullong.rel ]
|
||||
E:\SDCC\4.6.0\bin\..\lib\z80/z80.lib [ mul.rel ]
|
||||
|
||||
ASxxxx Linker V05.50.4-SDLD, page 7.
|
||||
ASxxxx Linker V05.50.4-SDLD, page 10.
|
||||
|
||||
User Base Address Definitions
|
||||
|
||||
|
||||
Reference in New Issue
Block a user