From 6163d0c8ca3ce2d6f2000464de9ce1b1a8b331cd Mon Sep 17 00:00:00 2001 From: Alex Date: Sun, 30 Aug 2026 19:47:39 +0300 Subject: [PATCH] Initial commit --- XMPLAY.WMF | Bin 0 -> 15360 bytes build.bat | 48 ++ obj/crt0.rel | 21 + obj/hdr.asm | 547 +++++++++++++++ obj/hdr.bin | Bin 0 -> 512 bytes obj/hdr.hex | 17 + obj/hdr.lk | 9 + obj/hdr.lst | 548 +++++++++++++++ obj/hdr.map | 52 ++ obj/hdr.noi | 20 + obj/hdr.rel | 102 +++ obj/hdr.sym | 27 + obj/out.asm | 1820 +++++++++++++++++++++++++++++++++++++++++++++++ obj/out.bin | Bin 0 -> 14848 bytes obj/out.hex | 99 +++ obj/out.lk | 11 + obj/out.lst | 1836 ++++++++++++++++++++++++++++++++++++++++++++++++ obj/out.map | 173 +++++ obj/out.noi | 93 +++ obj/out.rel | 795 +++++++++++++++++++++ obj/out.sym | 166 +++++ src/crt0.s | 24 + src/esp32.c | 154 ++++ src/main.c | 500 +++++++++++++ src/tsconf.h | 195 +++++ src/wc_api.c | 41 ++ src/wc_api.h | 309 ++++++++ src/wc_h.c | 26 + src/wc_h.h | 36 + vgm_wc_api.lib | Bin 0 -> 28770 bytes 30 files changed, 7669 insertions(+) create mode 100644 XMPLAY.WMF create mode 100644 build.bat create mode 100644 obj/crt0.rel create mode 100644 obj/hdr.asm create mode 100644 obj/hdr.bin create mode 100644 obj/hdr.hex create mode 100644 obj/hdr.lk create mode 100644 obj/hdr.lst create mode 100644 obj/hdr.map create mode 100644 obj/hdr.noi create mode 100644 obj/hdr.rel create mode 100644 obj/hdr.sym create mode 100644 obj/out.asm create mode 100644 obj/out.bin create mode 100644 obj/out.hex create mode 100644 obj/out.lk create mode 100644 obj/out.lst create mode 100644 obj/out.map create mode 100644 obj/out.noi create mode 100644 obj/out.rel create mode 100644 obj/out.sym create mode 100644 src/crt0.s create mode 100644 src/esp32.c create mode 100644 src/main.c create mode 100644 src/tsconf.h create mode 100644 src/wc_api.c create mode 100644 src/wc_api.h create mode 100644 src/wc_h.c create mode 100644 src/wc_h.h create mode 100644 vgm_wc_api.lib diff --git a/XMPLAY.WMF b/XMPLAY.WMF new file mode 100644 index 0000000000000000000000000000000000000000..e876fae8389e5b96c91b31f284a5657471c3e582 GIT binary patch literal 15360 zcmeHOZERE589vvai3v1@Ef8qgy<`h6YaGX+A@SfcKGUts$DoS)p^}8gi2}qHA>alR z%ZX=L{DWz#ghZ=l-LxOkw8^Yfle?e6a#Um843s7siVmB#T_l#?PEMCXAddH*YdbiE zj{Vr5Y3Cx}d+zgooO7P@zONmL7onAxz4KJt0asU7tFz6~U3c&Ydc+{~!b+Xox7X{~ z*X!OqT3MG1{x`=dxL}gTQ?0#@?yqpH{tBGJ&txEcZBX_wLbQS3FzM!*NqcD0K4b4y zp1gX}oe`)e2{xnrYan=U6ib*x2-nQdr)^iL%-HR3%-FGeF@)Vo>|Vm|6!tE{0Nzso z6V$o%G>sH!C}J>bPm!tc0*1XWgH-yK0L_1!2ueL6`nRhdr z$=L~PQQ1kxffr5MlU@LmUf4j=tDdwgUJ{9WiW5EYpqTeDq0Msd1tzpb?p-!!LeImS zmr2&Ek|nX4*f;htp;CgVU|^Da6(8V}Fvkxtq3r-|p9$%!7l==BOTV$@@4%w?r~Y^% zQJJ1HZ+Xfr#SQqF1~+N3Q-|C2p7B)k`H7UhZzAQoFp=u`_@m#O)=7~mo)J0Ut+Dt| zSqywVMe7qOqZ40Jnf@GwH?=tH%WTDoc$N66kN=C9=QFbP={50dz-4n00!~AKiT|GC`x#VZ_@*|E82wiV zHv8AHhq}96-5iV1x&o%&#U47^SZQV396gSAdK_&WK^xBYu&#Et%hBcP?qyBwou?dZ zkITg#@9cPy$VsU<-uli-)Fclc9_j(P}z6f z1v3zMx$dy%D$Ev?Jr3@(RLuhaOTtv)_6$>h%YC!yg*_$%+^1Ehys*p9=Y>!E`2up& z&R5EBsf8U{L44THRS0L4W3%Q9wtTSBgu=T6TmhNA9^rdTmPeZP0Ul4FL&wLvhEurq<%=OiU&Aax-(0b0cENr~4( z81Zo+faq~I^+f4s{fPwj-pB5FT=gZgsaml6K6cKRf&x-WAW8e)(T|TMaMN7cRWUxh zhnEJEdu$bg z3!?T@pINKKGw>|!Pz&j0^K-d}w3>MS!)M5Uu~M!SrgP#j_*MTY&j26)eoaU7E0Qemy!`Eu2+>Y9D~4;(ync-eTq z?qGZ>Vr)a{h!F1#&KeC!d@(rY8Mml9TS}w|ysr|*LF!hkb7UC{h0$!9L8Ktbyj#jG zeqvZiBp8Gu>)ImXZWzBBd72iHjQw!RY&b989`u+E;F!e zN=mA10K+FKFW6Rm) zBj6rDFj?w- ztukRpxv*OIxyQOnB#FNY*wFAOyH+#}jPeYt;#F2O4A7qIj)1jHu$l#HxnQ*j;!FNf zb`6x^>8m&14TLW%=>tg|4T#^pB>v&jIq@_k`SyQT^U3Lxd==F`QTh*+HAI<|kDou= za|m?9rGxSrMzH1y@&SX8XVnYa)Pj6eE73@R(NLI1(T==WWR4*F1N9AF)PV zp?qTFdltsOS3XhrW%F!Qm*01)6vbYUPsm3sO!3~0h4Zn(#^&Xpboj7_w}`qHCHdcW zi8F(OH<>6!b*okmEa~nHVxLqyb_-&~Fx|UmUVh-0mu)=XD zx5Od1;5TPS&vb^p1@p@e6M46lu_o7f*1Ib0GgR9k|Bg$gk38K4YM1}FoR0m=YnfHFWCpbSt3Ck38K4YM1}FoR0m=YnfHFWC_`hQy+o%Ek7}%@VS6AbhrWD7tML4E| zkG{x*uV~KWA#EQX(p|tqddqr1d5~@eE%<1*ZqjI8*>wF$z3Q(Kq?wr7iLHwmcRXne z4L58=`5)!kM#L4(Qabj6{w~uHD~YX_PvF=htSkwuT7pliD7Md}0c@N!C0@~BZxW^= sZAU{oX!U@}s!KBx=tWEmph($ literal 0 HcmV?d00001 diff --git a/build.bat b/build.bat new file mode 100644 index 0000000..fe70689 --- /dev/null +++ b/build.bat @@ -0,0 +1,48 @@ +REM NOTE: xmplay pins its OWN SDCC version here, independent of the rest of +REM ft812sdk (which stays on 4.0.0 for ABI reasons - see project memory on +REM the earlier shared-lib ABI mismatch incident). 4.6.0 is needed here +REM specifically for --sdcccall 1, required to link demyanenko-d/ +REM VGMPLAY.WMF's wc_api library (vgm_wc_api.lib) - our own hand-rolled +REM PRSRW+PRIAT implementations corrupted esp32 file loading in three +REM different shapes and were abandoned in favor of their tested code. +set SDCC=E:\SDCC\4.6.0 +set path=%SDCC%\bin;E:\zx-evo-master\pentevo\tools\hex2bin;%path% + +if not exist obj md obj +del /q /s obj >nul + +sdasz80 -o obj/crt0.rel src/crt0.s +if errorlevel 1 pause & exit + +sdcc -Isrc -I../lib/sdk -I../../../esp32/src/main -mz80 --sdcccall 1 --std-sdcc11 --opt-code-speed --no-std-crt0 obj/crt0.rel --code-loc 0x8003 --data-loc 0xA800 src/main.c vgm_wc_api.lib -o obj/out.hex +if errorlevel 1 pause & exit +if exist obj/out.hex hex2bin obj/out.hex >nul + +for %%i in (obj/out.bin) do set sz=%%~zi +set /a sz=(%sz% - 1) / 512 + 1 + +REM A WC plugin page is exactly 16KB = 32 512-byte blocks (WALK in WCVW.ASM +REM loads N_BLK0 blocks straight off disk into the #C000-#FFFF window as +REM one contiguous chunk - anything past 32 blocks overflows that window). +REM This is what broke ftview's [PLUGINS] autoload (33 blocks needed, only +REM 32 available) - fixed there by moving --data-loc from 0xAE00 down to +REM 0xA800, applied here too for consistency and headroom as xmplay grows. +if %sz% GTR 32 ( + echo ERROR: build needs %sz% x 512-byte blocks, but a single WC plugin page holds only 32 - shrink the code or lower --data-loc's headroom above it. + pause + exit +) + +REM Pad obj/out.bin up to a whole number of 512-byte blocks (sz*512 bytes). +REM hex2bin only emits the bytes actually present in the hex file, which +REM generally is NOT block-aligned, while N_BLK0 above always rounds up - +REM technically short of what the header promises, though not the cause +REM of the overflow bug above. +set /a padded=%sz% * 512 +powershell -NoProfile -Command "$fs=[System.IO.File]::Open('obj\out.bin',[System.IO.FileMode]::Open,[System.IO.FileAccess]::Write); $fs.SetLength(%padded%); $fs.Close()" + +sdcc -DN_BLK0=%sz% -Isrc -I../lib/sdk --no-std-crt0 -mz80 --std-sdcc11 --opt-code-speed src/wc_h.c -o obj/hdr.hex +if errorlevel 1 pause & exit +if exist obj/hdr.hex hex2bin obj/hdr.hex >nul + +copy /b obj\hdr.bin + obj\out.bin xmplay.wmf >nul diff --git a/obj/crt0.rel b/obj/crt0.rel new file mode 100644 index 0000000..cca375d --- /dev/null +++ b/obj/crt0.rel @@ -0,0 +1,21 @@ +XL4 +H C areas 2 global symbols +M crt0 +S _main Ref00000000 +S .__.ABS. Def00000000 +A _CODE size 0 flags 0 addr 0 +A _HEADER size 0 flags 8 addr 0 +A _HEADER0 size 3 flags 8 addr 8000 +A _HOME size 0 flags 0 addr 0 +A _INITIALIZER size 0 flags 0 addr 0 +A _GSINIT size 0 flags 0 addr 0 +A _GSFINAL size 0 flags 0 addr 0 +A _DATA size 0 flags 0 addr 0 +A _INITIALIZED size 0 flags 0 addr 0 +A _BSEG size 0 flags 0 addr 0 +A _BSS size 0 flags 0 addr 0 +A _HEAP size 0 flags 0 addr 0 +T 00 80 00 00 +R 00 00 02 00 +T 00 80 00 00 C3 00 00 +R 00 00 02 00 02 05 00 00 diff --git a/obj/hdr.asm b/obj/hdr.asm new file mode 100644 index 0000000..20887ac --- /dev/null +++ b/obj/hdr.asm @@ -0,0 +1,547 @@ +;-------------------------------------------------------- +; File Created by SDCC : free open source ISO C Compiler +; Version 4.6.0 #16555 (MINGW64) +;-------------------------------------------------------- + .module wc_h + + .optsdcc -mz80 sdcccall(1) +;-------------------------------------------------------- +; Public variables in this module +;-------------------------------------------------------- +;-------------------------------------------------------- +; special function registers +;-------------------------------------------------------- +;-------------------------------------------------------- +; ram data +;-------------------------------------------------------- + .area _DATA +;-------------------------------------------------------- +; ram data +;-------------------------------------------------------- + .area _INITIALIZED +;-------------------------------------------------------- +; absolute ram data +;-------------------------------------------------------- + .area _DABS (ABS) + .area _DABS (ABS) +;-------------------------------------------------------- +; global & static initialisations +;-------------------------------------------------------- + .area _HOME + .area _GSINIT + .area _GSFINAL + .area _GSINIT +;-------------------------------------------------------- +; Home +;-------------------------------------------------------- + .area _HOME + .area _HOME +;-------------------------------------------------------- +; code +;-------------------------------------------------------- + .area _CODE + .area _CODE +_hdr: + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db #0x57 ; 87 'W' + .db #0x69 ; 105 'i' + .db #0x6c ; 108 'l' + .db #0x64 ; 100 'd' + .db #0x43 ; 67 'C' + .db #0x6f ; 111 'o' + .db #0x6d ; 109 'm' + .db #0x6d ; 109 'm' + .db #0x61 ; 97 'a' + .db #0x6e ; 110 'n' + .db #0x64 ; 100 'd' + .db #0x65 ; 101 'e' + .db #0x72 ; 114 'r' + .db #0x4d ; 77 'M' + .db #0x44 ; 68 'D' + .db #0x4c ; 76 'L' + .db #0x07 ; 7 + .db 0x00 + .db #0x01 ; 1 + .db #0x00 ; 0 + .db #0x00 ; 0 + .db #0x1d ; 29 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db #0x58 ; 88 'X' + .db #0x4d ; 77 'M' + .db #0x20 ; 32 + .db #0x58 ; 88 'X' + .db #0x4d ; 77 'M' + .db #0x5a ; 90 'Z' + .db #0x53 ; 83 'S' + .db #0x33 ; 51 '3' + .db #0x4d ; 77 'M' + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .byte #0xff, #0xff, #0xff, #0xff ; 4294967295 + .ascii "XM Player" + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db #0x03 ; 3 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .db 0x00 + .area _INITIALIZER + .area _CABS (ABS) diff --git a/obj/hdr.bin b/obj/hdr.bin new file mode 100644 index 0000000000000000000000000000000000000000..ccb8290ce54ef273e46bfc59eebeffc9ec475345 GIT binary patch literal 512 zcmZQzKn3BMIVsNhxw(mXDXB%iEOpd|r0 SiIu5EI1FaSAwDWhFa!Ym5fAYI literal 0 HcmV?d00001 diff --git a/obj/hdr.hex b/obj/hdr.hex new file mode 100644 index 0000000..76a8915 --- /dev/null +++ b/obj/hdr.hex @@ -0,0 +1,17 @@ +:200200000000000000000000000000000000000057696C64436F6D6D616E6465724D444CDB +:2002200007000100001D000000000000000000000000000000000000000000000000000099 +:20024000584D20584D5A53334D000000000000000000000000000000000000000000000007 +:2002600000000000000000000000000000000000000000000000000000000000000000007E +:2002800000000000000000000000000000000000000000000000000000000000000000005E +:2002A00000FFFFFFFF584D20506C6179657200000000000000000000000000000000000010 +:2002C00000000000000300000000000000000000000000000000000000000000000000001B +:2002E0000000000000000000000000000000000000000000000000000000000000000000FE +:200300000000000000000000000000000000000000000000000000000000000000000000DD +:200320000000000000000000000000000000000000000000000000000000000000000000BD +:2003400000000000000000000000000000000000000000000000000000000000000000009D +:2003600000000000000000000000000000000000000000000000000000000000000000007D +:2003800000000000000000000000000000000000000000000000000000000000000000005D +:2003A00000000000000000000000000000000000000000000000000000000000000000003D +:2003C00000000000000000000000000000000000000000000000000000000000000000001D +:2003E0000000000000000000000000000000000000000000000000000000000000000000FD +:00000001FF diff --git a/obj/hdr.lk b/obj/hdr.lk new file mode 100644 index 0000000..7dc0999 --- /dev/null +++ b/obj/hdr.lk @@ -0,0 +1,9 @@ +-mjwx +-i obj/hdr.hex +-b _CODE = 0x0200 +-b _DATA = 0x8000 +-k E:\SDCC\4.6.0\bin\..\lib\z80 +-l z80 +obj/hdr.rel + +-e diff --git a/obj/hdr.lst b/obj/hdr.lst new file mode 100644 index 0000000..45d035e --- /dev/null +++ b/obj/hdr.lst @@ -0,0 +1,548 @@ + 1 ;-------------------------------------------------------- + 2 ; File Created by SDCC : free open source ISO C Compiler + 3 ; Version 4.6.0 #16555 (MINGW64) + 4 ;-------------------------------------------------------- + 5 .module wc_h + 6 + 7 .optsdcc -mz80 sdcccall(1) + 8 ;-------------------------------------------------------- + 9 ; Public variables in this module + 10 ;-------------------------------------------------------- + 11 ;-------------------------------------------------------- + 12 ; special function registers + 13 ;-------------------------------------------------------- + 14 ;-------------------------------------------------------- + 15 ; ram data + 16 ;-------------------------------------------------------- + 17 .area _DATA + 18 ;-------------------------------------------------------- + 19 ; ram data + 20 ;-------------------------------------------------------- + 21 .area _INITIALIZED + 22 ;-------------------------------------------------------- + 23 ; absolute ram data + 24 ;-------------------------------------------------------- + 25 .area _DABS (ABS) + 26 .area _DABS (ABS) + 27 ;-------------------------------------------------------- + 28 ; global & static initialisations + 29 ;-------------------------------------------------------- + 30 .area _HOME + 31 .area _GSINIT + 32 .area _GSFINAL + 33 .area _GSINIT + 34 ;-------------------------------------------------------- + 35 ; Home + 36 ;-------------------------------------------------------- + 37 .area _HOME + 38 .area _HOME + 39 ;-------------------------------------------------------- + 40 ; code + 41 ;-------------------------------------------------------- + 42 .area _CODE + 43 .area _CODE + 00000000 44 _hdr: + 00000000 00 45 .db 0x00 + 00000001 00 46 .db 0x00 + 00000002 00 47 .db 0x00 + 00000003 00 48 .db 0x00 + 00000004 00 49 .db 0x00 + 00000005 00 50 .db 0x00 + 00000006 00 51 .db 0x00 + 00000007 00 52 .db 0x00 + 00000008 00 53 .db 0x00 + 00000009 00 54 .db 0x00 + 0000000A 00 55 .db 0x00 + 0000000B 00 56 .db 0x00 + 0000000C 00 57 .db 0x00 + 0000000D 00 58 .db 0x00 + 0000000E 00 59 .db 0x00 + 0000000F 00 60 .db 0x00 + 00000010 57 61 .db #0x57 ; 87 'W' + 00000011 69 62 .db #0x69 ; 105 'i' + 00000012 6C 63 .db #0x6c ; 108 'l' + 00000013 64 64 .db #0x64 ; 100 'd' + 00000014 43 65 .db #0x43 ; 67 'C' + 00000015 6F 66 .db #0x6f ; 111 'o' + 00000016 6D 67 .db #0x6d ; 109 'm' + 00000017 6D 68 .db #0x6d ; 109 'm' + 00000018 61 69 .db #0x61 ; 97 'a' + 00000019 6E 70 .db #0x6e ; 110 'n' + 0000001A 64 71 .db #0x64 ; 100 'd' + 0000001B 65 72 .db #0x65 ; 101 'e' + 0000001C 72 73 .db #0x72 ; 114 'r' + 0000001D 4D 74 .db #0x4d ; 77 'M' + 0000001E 44 75 .db #0x44 ; 68 'D' + 0000001F 4C 76 .db #0x4c ; 76 'L' + 00000020 07 77 .db #0x07 ; 7 + 00000021 00 78 .db 0x00 + 00000022 01 79 .db #0x01 ; 1 + 00000023 00 80 .db #0x00 ; 0 + 00000024 00 81 .db #0x00 ; 0 + 00000025 1D 82 .db #0x1d ; 29 + 00000026 00 83 .db 0x00 + 00000027 00 84 .db 0x00 + 00000028 00 85 .db 0x00 + 00000029 00 86 .db 0x00 + 0000002A 00 87 .db 0x00 + 0000002B 00 88 .db 0x00 + 0000002C 00 89 .db 0x00 + 0000002D 00 90 .db 0x00 + 0000002E 00 91 .db 0x00 + 0000002F 00 92 .db 0x00 + 00000030 00 93 .db 0x00 + 00000031 00 94 .db 0x00 + 00000032 00 95 .db 0x00 + 00000033 00 96 .db 0x00 + 00000034 00 97 .db 0x00 + 00000035 00 98 .db 0x00 + 00000036 00 99 .db 0x00 + 00000037 00 100 .db 0x00 + 00000038 00 101 .db 0x00 + 00000039 00 102 .db 0x00 + 0000003A 00 103 .db 0x00 + 0000003B 00 104 .db 0x00 + 0000003C 00 105 .db 0x00 + 0000003D 00 106 .db 0x00 + 0000003E 00 107 .db 0x00 + 0000003F 00 108 .db 0x00 + 00000040 58 109 .db #0x58 ; 88 'X' + 00000041 4D 110 .db #0x4d ; 77 'M' + 00000042 20 111 .db #0x20 ; 32 + 00000043 58 112 .db #0x58 ; 88 'X' + 00000044 4D 113 .db #0x4d ; 77 'M' + 00000045 5A 114 .db #0x5a ; 90 'Z' + 00000046 53 115 .db #0x53 ; 83 'S' + 00000047 33 116 .db #0x33 ; 51 '3' + 00000048 4D 117 .db #0x4d ; 77 'M' + 00000049 00 118 .db 0x00 + 0000004A 00 119 .db 0x00 + 0000004B 00 120 .db 0x00 + 0000004C 00 121 .db 0x00 + 0000004D 00 122 .db 0x00 + 0000004E 00 123 .db 0x00 + 0000004F 00 124 .db 0x00 + 00000050 00 125 .db 0x00 + 00000051 00 126 .db 0x00 + 00000052 00 127 .db 0x00 + 00000053 00 128 .db 0x00 + 00000054 00 129 .db 0x00 + 00000055 00 130 .db 0x00 + 00000056 00 131 .db 0x00 + 00000057 00 132 .db 0x00 + 00000058 00 133 .db 0x00 + 00000059 00 134 .db 0x00 + 0000005A 00 135 .db 0x00 + 0000005B 00 136 .db 0x00 + 0000005C 00 137 .db 0x00 + 0000005D 00 138 .db 0x00 + 0000005E 00 139 .db 0x00 + 0000005F 00 140 .db 0x00 + 00000060 00 141 .db 0x00 + 00000061 00 142 .db 0x00 + 00000062 00 143 .db 0x00 + 00000063 00 144 .db 0x00 + 00000064 00 145 .db 0x00 + 00000065 00 146 .db 0x00 + 00000066 00 147 .db 0x00 + 00000067 00 148 .db 0x00 + 00000068 00 149 .db 0x00 + 00000069 00 150 .db 0x00 + 0000006A 00 151 .db 0x00 + 0000006B 00 152 .db 0x00 + 0000006C 00 153 .db 0x00 + 0000006D 00 154 .db 0x00 + 0000006E 00 155 .db 0x00 + 0000006F 00 156 .db 0x00 + 00000070 00 157 .db 0x00 + 00000071 00 158 .db 0x00 + 00000072 00 159 .db 0x00 + 00000073 00 160 .db 0x00 + 00000074 00 161 .db 0x00 + 00000075 00 162 .db 0x00 + 00000076 00 163 .db 0x00 + 00000077 00 164 .db 0x00 + 00000078 00 165 .db 0x00 + 00000079 00 166 .db 0x00 + 0000007A 00 167 .db 0x00 + 0000007B 00 168 .db 0x00 + 0000007C 00 169 .db 0x00 + 0000007D 00 170 .db 0x00 + 0000007E 00 171 .db 0x00 + 0000007F 00 172 .db 0x00 + 00000080 00 173 .db 0x00 + 00000081 00 174 .db 0x00 + 00000082 00 175 .db 0x00 + 00000083 00 176 .db 0x00 + 00000084 00 177 .db 0x00 + 00000085 00 178 .db 0x00 + 00000086 00 179 .db 0x00 + 00000087 00 180 .db 0x00 + 00000088 00 181 .db 0x00 + 00000089 00 182 .db 0x00 + 0000008A 00 183 .db 0x00 + 0000008B 00 184 .db 0x00 + 0000008C 00 185 .db 0x00 + 0000008D 00 186 .db 0x00 + 0000008E 00 187 .db 0x00 + 0000008F 00 188 .db 0x00 + 00000090 00 189 .db 0x00 + 00000091 00 190 .db 0x00 + 00000092 00 191 .db 0x00 + 00000093 00 192 .db 0x00 + 00000094 00 193 .db 0x00 + 00000095 00 194 .db 0x00 + 00000096 00 195 .db 0x00 + 00000097 00 196 .db 0x00 + 00000098 00 197 .db 0x00 + 00000099 00 198 .db 0x00 + 0000009A 00 199 .db 0x00 + 0000009B 00 200 .db 0x00 + 0000009C 00 201 .db 0x00 + 0000009D 00 202 .db 0x00 + 0000009E 00 203 .db 0x00 + 0000009F 00 204 .db 0x00 + 000000A0 00 205 .db 0x00 + 000000A1 FF FF FF FF 206 .byte #0xff, #0xff, #0xff, #0xff ; 4294967295 + 000000A5 58 4D 20 50 6C 61 79 207 .ascii "XM Player" + 65 72 + 000000AE 00 208 .db 0x00 + 000000AF 00 209 .db 0x00 + 000000B0 00 210 .db 0x00 + 000000B1 00 211 .db 0x00 + 000000B2 00 212 .db 0x00 + 000000B3 00 213 .db 0x00 + 000000B4 00 214 .db 0x00 + 000000B5 00 215 .db 0x00 + 000000B6 00 216 .db 0x00 + 000000B7 00 217 .db 0x00 + 000000B8 00 218 .db 0x00 + 000000B9 00 219 .db 0x00 + 000000BA 00 220 .db 0x00 + 000000BB 00 221 .db 0x00 + 000000BC 00 222 .db 0x00 + 000000BD 00 223 .db 0x00 + 000000BE 00 224 .db 0x00 + 000000BF 00 225 .db 0x00 + 000000C0 00 226 .db 0x00 + 000000C1 00 227 .db 0x00 + 000000C2 00 228 .db 0x00 + 000000C3 00 229 .db 0x00 + 000000C4 00 230 .db 0x00 + 000000C5 03 231 .db #0x03 ; 3 + 000000C6 00 232 .db 0x00 + 000000C7 00 233 .db 0x00 + 000000C8 00 234 .db 0x00 + 000000C9 00 235 .db 0x00 + 000000CA 00 236 .db 0x00 + 000000CB 00 237 .db 0x00 + 000000CC 00 238 .db 0x00 + 000000CD 00 239 .db 0x00 + 000000CE 00 240 .db 0x00 + 000000CF 00 241 .db 0x00 + 000000D0 00 242 .db 0x00 + 000000D1 00 243 .db 0x00 + 000000D2 00 244 .db 0x00 + 000000D3 00 245 .db 0x00 + 000000D4 00 246 .db 0x00 + 000000D5 00 247 .db 0x00 + 000000D6 00 248 .db 0x00 + 000000D7 00 249 .db 0x00 + 000000D8 00 250 .db 0x00 + 000000D9 00 251 .db 0x00 + 000000DA 00 252 .db 0x00 + 000000DB 00 253 .db 0x00 + 000000DC 00 254 .db 0x00 + 000000DD 00 255 .db 0x00 + 000000DE 00 256 .db 0x00 + 000000DF 00 257 .db 0x00 + 000000E0 00 258 .db 0x00 + 000000E1 00 259 .db 0x00 + 000000E2 00 260 .db 0x00 + 000000E3 00 261 .db 0x00 + 000000E4 00 262 .db 0x00 + 000000E5 00 263 .db 0x00 + 000000E6 00 264 .db 0x00 + 000000E7 00 265 .db 0x00 + 000000E8 00 266 .db 0x00 + 000000E9 00 267 .db 0x00 + 000000EA 00 268 .db 0x00 + 000000EB 00 269 .db 0x00 + 000000EC 00 270 .db 0x00 + 000000ED 00 271 .db 0x00 + 000000EE 00 272 .db 0x00 + 000000EF 00 273 .db 0x00 + 000000F0 00 274 .db 0x00 + 000000F1 00 275 .db 0x00 + 000000F2 00 276 .db 0x00 + 000000F3 00 277 .db 0x00 + 000000F4 00 278 .db 0x00 + 000000F5 00 279 .db 0x00 + 000000F6 00 280 .db 0x00 + 000000F7 00 281 .db 0x00 + 000000F8 00 282 .db 0x00 + 000000F9 00 283 .db 0x00 + 000000FA 00 284 .db 0x00 + 000000FB 00 285 .db 0x00 + 000000FC 00 286 .db 0x00 + 000000FD 00 287 .db 0x00 + 000000FE 00 288 .db 0x00 + 000000FF 00 289 .db 0x00 + 00000100 00 290 .db 0x00 + 00000101 00 291 .db 0x00 + 00000102 00 292 .db 0x00 + 00000103 00 293 .db 0x00 + 00000104 00 294 .db 0x00 + 00000105 00 295 .db 0x00 + 00000106 00 296 .db 0x00 + 00000107 00 297 .db 0x00 + 00000108 00 298 .db 0x00 + 00000109 00 299 .db 0x00 + 0000010A 00 300 .db 0x00 + 0000010B 00 301 .db 0x00 + 0000010C 00 302 .db 0x00 + 0000010D 00 303 .db 0x00 + 0000010E 00 304 .db 0x00 + 0000010F 00 305 .db 0x00 + 00000110 00 306 .db 0x00 + 00000111 00 307 .db 0x00 + 00000112 00 308 .db 0x00 + 00000113 00 309 .db 0x00 + 00000114 00 310 .db 0x00 + 00000115 00 311 .db 0x00 + 00000116 00 312 .db 0x00 + 00000117 00 313 .db 0x00 + 00000118 00 314 .db 0x00 + 00000119 00 315 .db 0x00 + 0000011A 00 316 .db 0x00 + 0000011B 00 317 .db 0x00 + 0000011C 00 318 .db 0x00 + 0000011D 00 319 .db 0x00 + 0000011E 00 320 .db 0x00 + 0000011F 00 321 .db 0x00 + 00000120 00 322 .db 0x00 + 00000121 00 323 .db 0x00 + 00000122 00 324 .db 0x00 + 00000123 00 325 .db 0x00 + 00000124 00 326 .db 0x00 + 00000125 00 327 .db 0x00 + 00000126 00 328 .db 0x00 + 00000127 00 329 .db 0x00 + 00000128 00 330 .db 0x00 + 00000129 00 331 .db 0x00 + 0000012A 00 332 .db 0x00 + 0000012B 00 333 .db 0x00 + 0000012C 00 334 .db 0x00 + 0000012D 00 335 .db 0x00 + 0000012E 00 336 .db 0x00 + 0000012F 00 337 .db 0x00 + 00000130 00 338 .db 0x00 + 00000131 00 339 .db 0x00 + 00000132 00 340 .db 0x00 + 00000133 00 341 .db 0x00 + 00000134 00 342 .db 0x00 + 00000135 00 343 .db 0x00 + 00000136 00 344 .db 0x00 + 00000137 00 345 .db 0x00 + 00000138 00 346 .db 0x00 + 00000139 00 347 .db 0x00 + 0000013A 00 348 .db 0x00 + 0000013B 00 349 .db 0x00 + 0000013C 00 350 .db 0x00 + 0000013D 00 351 .db 0x00 + 0000013E 00 352 .db 0x00 + 0000013F 00 353 .db 0x00 + 00000140 00 354 .db 0x00 + 00000141 00 355 .db 0x00 + 00000142 00 356 .db 0x00 + 00000143 00 357 .db 0x00 + 00000144 00 358 .db 0x00 + 00000145 00 359 .db 0x00 + 00000146 00 360 .db 0x00 + 00000147 00 361 .db 0x00 + 00000148 00 362 .db 0x00 + 00000149 00 363 .db 0x00 + 0000014A 00 364 .db 0x00 + 0000014B 00 365 .db 0x00 + 0000014C 00 366 .db 0x00 + 0000014D 00 367 .db 0x00 + 0000014E 00 368 .db 0x00 + 0000014F 00 369 .db 0x00 + 00000150 00 370 .db 0x00 + 00000151 00 371 .db 0x00 + 00000152 00 372 .db 0x00 + 00000153 00 373 .db 0x00 + 00000154 00 374 .db 0x00 + 00000155 00 375 .db 0x00 + 00000156 00 376 .db 0x00 + 00000157 00 377 .db 0x00 + 00000158 00 378 .db 0x00 + 00000159 00 379 .db 0x00 + 0000015A 00 380 .db 0x00 + 0000015B 00 381 .db 0x00 + 0000015C 00 382 .db 0x00 + 0000015D 00 383 .db 0x00 + 0000015E 00 384 .db 0x00 + 0000015F 00 385 .db 0x00 + 00000160 00 386 .db 0x00 + 00000161 00 387 .db 0x00 + 00000162 00 388 .db 0x00 + 00000163 00 389 .db 0x00 + 00000164 00 390 .db 0x00 + 00000165 00 391 .db 0x00 + 00000166 00 392 .db 0x00 + 00000167 00 393 .db 0x00 + 00000168 00 394 .db 0x00 + 00000169 00 395 .db 0x00 + 0000016A 00 396 .db 0x00 + 0000016B 00 397 .db 0x00 + 0000016C 00 398 .db 0x00 + 0000016D 00 399 .db 0x00 + 0000016E 00 400 .db 0x00 + 0000016F 00 401 .db 0x00 + 00000170 00 402 .db 0x00 + 00000171 00 403 .db 0x00 + 00000172 00 404 .db 0x00 + 00000173 00 405 .db 0x00 + 00000174 00 406 .db 0x00 + 00000175 00 407 .db 0x00 + 00000176 00 408 .db 0x00 + 00000177 00 409 .db 0x00 + 00000178 00 410 .db 0x00 + 00000179 00 411 .db 0x00 + 0000017A 00 412 .db 0x00 + 0000017B 00 413 .db 0x00 + 0000017C 00 414 .db 0x00 + 0000017D 00 415 .db 0x00 + 0000017E 00 416 .db 0x00 + 0000017F 00 417 .db 0x00 + 00000180 00 418 .db 0x00 + 00000181 00 419 .db 0x00 + 00000182 00 420 .db 0x00 + 00000183 00 421 .db 0x00 + 00000184 00 422 .db 0x00 + 00000185 00 423 .db 0x00 + 00000186 00 424 .db 0x00 + 00000187 00 425 .db 0x00 + 00000188 00 426 .db 0x00 + 00000189 00 427 .db 0x00 + 0000018A 00 428 .db 0x00 + 0000018B 00 429 .db 0x00 + 0000018C 00 430 .db 0x00 + 0000018D 00 431 .db 0x00 + 0000018E 00 432 .db 0x00 + 0000018F 00 433 .db 0x00 + 00000190 00 434 .db 0x00 + 00000191 00 435 .db 0x00 + 00000192 00 436 .db 0x00 + 00000193 00 437 .db 0x00 + 00000194 00 438 .db 0x00 + 00000195 00 439 .db 0x00 + 00000196 00 440 .db 0x00 + 00000197 00 441 .db 0x00 + 00000198 00 442 .db 0x00 + 00000199 00 443 .db 0x00 + 0000019A 00 444 .db 0x00 + 0000019B 00 445 .db 0x00 + 0000019C 00 446 .db 0x00 + 0000019D 00 447 .db 0x00 + 0000019E 00 448 .db 0x00 + 0000019F 00 449 .db 0x00 + 000001A0 00 450 .db 0x00 + 000001A1 00 451 .db 0x00 + 000001A2 00 452 .db 0x00 + 000001A3 00 453 .db 0x00 + 000001A4 00 454 .db 0x00 + 000001A5 00 455 .db 0x00 + 000001A6 00 456 .db 0x00 + 000001A7 00 457 .db 0x00 + 000001A8 00 458 .db 0x00 + 000001A9 00 459 .db 0x00 + 000001AA 00 460 .db 0x00 + 000001AB 00 461 .db 0x00 + 000001AC 00 462 .db 0x00 + 000001AD 00 463 .db 0x00 + 000001AE 00 464 .db 0x00 + 000001AF 00 465 .db 0x00 + 000001B0 00 466 .db 0x00 + 000001B1 00 467 .db 0x00 + 000001B2 00 468 .db 0x00 + 000001B3 00 469 .db 0x00 + 000001B4 00 470 .db 0x00 + 000001B5 00 471 .db 0x00 + 000001B6 00 472 .db 0x00 + 000001B7 00 473 .db 0x00 + 000001B8 00 474 .db 0x00 + 000001B9 00 475 .db 0x00 + 000001BA 00 476 .db 0x00 + 000001BB 00 477 .db 0x00 + 000001BC 00 478 .db 0x00 + 000001BD 00 479 .db 0x00 + 000001BE 00 480 .db 0x00 + 000001BF 00 481 .db 0x00 + 000001C0 00 482 .db 0x00 + 000001C1 00 483 .db 0x00 + 000001C2 00 484 .db 0x00 + 000001C3 00 485 .db 0x00 + 000001C4 00 486 .db 0x00 + 000001C5 00 487 .db 0x00 + 000001C6 00 488 .db 0x00 + 000001C7 00 489 .db 0x00 + 000001C8 00 490 .db 0x00 + 000001C9 00 491 .db 0x00 + 000001CA 00 492 .db 0x00 + 000001CB 00 493 .db 0x00 + 000001CC 00 494 .db 0x00 + 000001CD 00 495 .db 0x00 + 000001CE 00 496 .db 0x00 + 000001CF 00 497 .db 0x00 + 000001D0 00 498 .db 0x00 + 000001D1 00 499 .db 0x00 + 000001D2 00 500 .db 0x00 + 000001D3 00 501 .db 0x00 + 000001D4 00 502 .db 0x00 + 000001D5 00 503 .db 0x00 + 000001D6 00 504 .db 0x00 + 000001D7 00 505 .db 0x00 + 000001D8 00 506 .db 0x00 + 000001D9 00 507 .db 0x00 + 000001DA 00 508 .db 0x00 + 000001DB 00 509 .db 0x00 + 000001DC 00 510 .db 0x00 + 000001DD 00 511 .db 0x00 + 000001DE 00 512 .db 0x00 + 000001DF 00 513 .db 0x00 + 000001E0 00 514 .db 0x00 + 000001E1 00 515 .db 0x00 + 000001E2 00 516 .db 0x00 + 000001E3 00 517 .db 0x00 + 000001E4 00 518 .db 0x00 + 000001E5 00 519 .db 0x00 + 000001E6 00 520 .db 0x00 + 000001E7 00 521 .db 0x00 + 000001E8 00 522 .db 0x00 + 000001E9 00 523 .db 0x00 + 000001EA 00 524 .db 0x00 + 000001EB 00 525 .db 0x00 + 000001EC 00 526 .db 0x00 + 000001ED 00 527 .db 0x00 + 000001EE 00 528 .db 0x00 + 000001EF 00 529 .db 0x00 + 000001F0 00 530 .db 0x00 + 000001F1 00 531 .db 0x00 + 000001F2 00 532 .db 0x00 + 000001F3 00 533 .db 0x00 + 000001F4 00 534 .db 0x00 + 000001F5 00 535 .db 0x00 + 000001F6 00 536 .db 0x00 + 000001F7 00 537 .db 0x00 + 000001F8 00 538 .db 0x00 + 000001F9 00 539 .db 0x00 + 000001FA 00 540 .db 0x00 + 000001FB 00 541 .db 0x00 + 000001FC 00 542 .db 0x00 + 000001FD 00 543 .db 0x00 + 000001FE 00 544 .db 0x00 + 000001FF 00 545 .db 0x00 + 546 .area _INITIALIZER + 547 .area _CABS (ABS) diff --git a/obj/hdr.map b/obj/hdr.map new file mode 100644 index 0000000..e503f9e --- /dev/null +++ b/obj/hdr.map @@ -0,0 +1,52 @@ + ASxxxx Linker V05.50.4-SDLD, page 1. +Hexadecimal [32-Bits] + +Area Addr Size Decimal Bytes (Attributes) +-------------------------------- ---- ---- ------- ----- ------------ +. .ABS. 00000000 00000000 = 0. bytes (ABS,CON) + + Value Global Global Defined In Module + ----- -------------------------------- ------------------------ + 00000000 .__.ABS. wc_h + 00000000 l__CABS + 00000000 l__DABS + 00000000 l__DATA + 00000000 l__GSFINAL + 00000000 l__GSINIT + 00000000 l__HOME + 00000000 l__INITIALIZED + 00000000 l__INITIALIZER + 00000000 s__CABS + 00000000 s__DABS + 00000200 l__CODE + 00000200 s__CODE + 00008000 s__DATA + 00008000 s__GSFINAL + 00008000 s__GSINIT + 00008000 s__HOME + 00008000 s__INITIALIZED + 00008000 s__INITIALIZER + + ASxxxx Linker V05.50.4-SDLD, page 2. +Hexadecimal [32-Bits] + +Area Addr Size Decimal Bytes (Attributes) +-------------------------------- ---- ---- ------- ----- ------------ +_CODE 00000200 00000200 = 512. bytes (REL,CON) + + Value Global Global Defined In Module + ----- -------------------------------- ------------------------ + ASxxxx Linker V05.50.4-SDLD, page 3. + +Files Linked [ module(s) ] + +obj/hdr.rel [ wc_h ] + + ASxxxx Linker V05.50.4-SDLD, page 4. + +User Base Address Definitions + +_CODE = 0x0200 +_DATA = 0x8000 + + \ No newline at end of file diff --git a/obj/hdr.noi b/obj/hdr.noi new file mode 100644 index 0000000..259bf13 --- /dev/null +++ b/obj/hdr.noi @@ -0,0 +1,20 @@ +DEF .__.ABS. 0x0 +DEF l__CABS 0x0 +DEF l__DABS 0x0 +DEF l__DATA 0x0 +DEF l__GSFINAL 0x0 +DEF l__GSINIT 0x0 +DEF l__HOME 0x0 +DEF l__INITIALIZED 0x0 +DEF l__INITIALIZER 0x0 +DEF s__CABS 0x0 +DEF s__DABS 0x0 +DEF l__CODE 0x200 +DEF s__CODE 0x200 +DEF s__DATA 0x8000 +DEF s__GSFINAL 0x8000 +DEF s__GSINIT 0x8000 +DEF s__HOME 0x8000 +DEF s__INITIALIZED 0x8000 +DEF s__INITIALIZER 0x8000 +LOAD obj/hdr.ihx diff --git a/obj/hdr.rel b/obj/hdr.rel new file mode 100644 index 0000000..67ebad8 --- /dev/null +++ b/obj/hdr.rel @@ -0,0 +1,102 @@ +XL4 +H 9 areas 1 global symbols +M wc_h +O -mz80 sdcccall(1) +S .__.ABS. Def00000000 +A _CODE size 200 flags 0 addr 0 +A _DATA size 0 flags 0 addr 0 +A _INITIALIZED size 0 flags 0 addr 0 +A _DABS size 0 flags 8 addr 0 +A _HOME size 0 flags 0 addr 0 +A _GSINIT size 0 flags 0 addr 0 +A _GSFINAL size 0 flags 0 addr 0 +A _INITIALIZER size 0 flags 0 addr 0 +A _CABS size 0 flags 8 addr 0 +T 00 00 00 00 +R 00 00 00 00 +T 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +R 00 00 00 00 +T 0C 00 00 00 00 00 00 00 57 69 6C 64 43 6F 6D 6D +R 00 00 00 00 +T 18 00 00 00 61 6E 64 65 72 4D 44 4C 07 00 01 00 +R 00 00 00 00 +T 24 00 00 00 00 1D 00 00 00 00 00 00 00 00 00 00 +R 00 00 00 00 +T 30 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +R 00 00 00 00 +T 3C 00 00 00 00 00 00 00 58 4D 20 58 4D 5A 53 33 +R 00 00 00 00 +T 48 00 00 00 4D 00 00 00 00 00 00 00 00 00 00 00 +R 00 00 00 00 +T 54 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +R 00 00 00 00 +T 60 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +R 00 00 00 00 +T 6C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +R 00 00 00 00 +T 78 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +R 00 00 00 00 +T 84 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +R 00 00 00 00 +T 90 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +R 00 00 00 00 +T 9C 00 00 00 00 00 00 00 00 FF FF FF FF 58 4D 20 +R 00 00 00 00 +T A8 00 00 00 50 6C 61 79 65 72 00 00 00 00 00 00 +R 00 00 00 00 +T B4 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +R 00 00 00 00 +T C0 00 00 00 00 00 00 00 00 03 00 00 00 00 00 00 +R 00 00 00 00 +T CC 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +R 00 00 00 00 +T D8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +R 00 00 00 00 +T E4 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +R 00 00 00 00 +T F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +R 00 00 00 00 +T FC 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +R 00 00 00 00 +T 08 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +R 00 00 00 00 +T 14 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +R 00 00 00 00 +T 20 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +R 00 00 00 00 +T 2C 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +R 00 00 00 00 +T 38 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +R 00 00 00 00 +T 44 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +R 00 00 00 00 +T 50 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +R 00 00 00 00 +T 5C 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +R 00 00 00 00 +T 68 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +R 00 00 00 00 +T 74 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +R 00 00 00 00 +T 80 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +R 00 00 00 00 +T 8C 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +R 00 00 00 00 +T 98 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +R 00 00 00 00 +T A4 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +R 00 00 00 00 +T B0 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +R 00 00 00 00 +T BC 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +R 00 00 00 00 +T C8 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +R 00 00 00 00 +T D4 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +R 00 00 00 00 +T E0 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +R 00 00 00 00 +T EC 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +R 00 00 00 00 +T F8 01 00 00 00 00 00 00 00 00 00 00 +R 00 00 00 00 diff --git a/obj/hdr.sym b/obj/hdr.sym new file mode 100644 index 0000000..9e4bdd5 --- /dev/null +++ b/obj/hdr.sym @@ -0,0 +1,27 @@ + ASxxxx Assembler V05.50.4+NoICE+SDCCmods-WIP-R14 (Zilog Z80 / Hitachi HD64180 / ZX-Next / eZ80 / R800) Page 1 +Hexadecimal [32-Bits] + +Symbol Table + + .__.$$$. = 00002710 L + .__.ABS. = 00000000 G + .__.CPU. = 00000000 L + .__.H$L. = 00000000 L + 0 _hdr 00000000 R + + + ASxxxx Assembler V05.50.4+NoICE+SDCCmods-WIP-R14 (Zilog Z80 / Hitachi HD64180 / ZX-Next / eZ80 / R800) Page 2 +Hexadecimal [32-Bits] + +Area Table + + 0 _CODE size 200 flags 0 + 1 _DATA size 0 flags 0 + 2 _INITIALIZED size 0 flags 0 + 3 _DABS size 0 flags 8 + 4 _HOME size 0 flags 0 + 5 _GSINIT size 0 flags 0 + 6 _GSFINAL size 0 flags 0 + 7 _INITIALIZER size 0 flags 0 + 8 _CABS size 0 flags 8 + diff --git a/obj/out.asm b/obj/out.asm new file mode 100644 index 0000000..0d3721b --- /dev/null +++ b/obj/out.asm @@ -0,0 +1,1820 @@ +;-------------------------------------------------------- +; File Created by SDCC : free open source ISO C Compiler +; Version 4.6.0 #16555 (MINGW64) +;-------------------------------------------------------- + .module main + + .optsdcc -mz80 sdcccall(1) +;-------------------------------------------------------- +; Public variables in this module +;-------------------------------------------------------- + .globl _main + .globl _main_start + .globl _xm_update_info + .globl _xm_draw_stats_labels + .globl _put_time + .globl _put_dec3 + .globl _put_hex2 + .globl _xm_draw_static_labels + .globl _copy_file_name + .globl _error_playback + .globl _error_oom + .globl _error_esp + .globl _about + .globl _wait_frames + .globl _wait_esc_key + .globl _play_xm + .globl _esp_init + .globl _esp_create_obj + .globl _esp_wait_status + .globl _esp_rd_end + .globl _esp_send_dma + .globl _esp_wr_end + .globl _esp_wr_reg32 + .globl _esp_wr_reg8 + .globl _esp_rd_regs + .globl _esp_rd_reg32 + .globl _esp_rd_reg8 + .globl _esp_cmd + .globl _wc_exit + .globl _wc_prsrw_attr + .globl _wc_prsrw + .globl _wc_key_pgdn + .globl _wc_key_pgup + .globl _wc_key_esc + .globl _wc_load512 + .globl _wc_rresb + .globl _wc_prwow + .globl _strlen + .globl _xm_handle + .globl _total_samples + .globl _file_name + .globl _p_file_name + .globl _last_esp_status + .globl _call_type + .globl _file_ext + .globl _filesize + .globl _ret_sp + .globl _fs_buf + .globl _state_esp + .globl _win_about + .globl _win_xm + .globl _err_playback + .globl _err_out_of_mem + .globl _err_no_esp + .globl _esp_wait_busy +;-------------------------------------------------------- +; special function registers +;-------------------------------------------------------- +_SPI_DATA = 0x0057 +_SPI_CTRL = 0x0077 +_BORDER = 0x00fe +_TS_VCONFIG = 0x00af +_TS_STATUS = 0x00af +_TS_VPAGE = 0x01af +_TS_GXOFFSL = 0x02af +_TS_GXOFFSH = 0x03af +_TS_GYOFFSL = 0x04af +_TS_GYOFFSH = 0x05af +_TS_TSCONFIG = 0x06af +_TS_PALSEL = 0x07af +_TS_BORDER = 0x0faf +_TS_PAGE0 = 0x10af +_TS_PAGE1 = 0x11af +_TS_PAGE2 = 0x12af +_TS_PAGE3 = 0x13af +_TS_FMADDR = 0x15af +_TS_TMPAGE = 0x16af +_TS_T0GPAGE = 0x17af +_TS_T1GPAGE = 0x18af +_TS_SGPAGE = 0x19af +_TS_DMASADDRL = 0x1aaf +_TS_DMASADDRH = 0x1baf +_TS_DMASADDRX = 0x1caf +_TS_DMADADDRL = 0x1daf +_TS_DMADADDRH = 0x1eaf +_TS_DMADADDRX = 0x1faf +_TS_SYSCONFIG = 0x20af +_TS_MEMCONFIG = 0x21af +_TS_HSINT = 0x22af +_TS_VSINTL = 0x23af +_TS_VSINTH = 0x24af +_TS_DMAWPD = 0x25af +_TS_DMALEN = 0x26af +_TS_DMACTR = 0x27af +_TS_DMASTATUS = 0x27af +_TS_DMANUM = 0x28af +_TS_FDDVIRT = 0x29af +_TS_INTMASK = 0x2aaf +_TS_CACHECONF = 0x2baf +_TS_DMANUMH = 0x2caf +_TS_DMAWPA = 0x2daf +_TS_T0XOFFSL = 0x40af +_TS_T0XOFFSH = 0x41af +_TS_T0YOFFSL = 0x42af +_TS_T0YOFFSH = 0x43af +_TS_T1XOFFSL = 0x44af +_TS_T1XOFFSH = 0x45af +_TS_T1YOFFSL = 0x46af +_TS_T1YOFFSH = 0x47af +;-------------------------------------------------------- +; ram data +;-------------------------------------------------------- + .area _DATA +_state_esp:: + .ds 1 +_fs_buf:: + .ds 4096 +_ret_sp:: + .ds 2 +_filesize:: + .ds 4 +_file_ext:: + .ds 1 +_call_type:: + .ds 1 +_last_esp_status:: + .ds 1 +_p_file_name:: + .ds 2 +_file_name:: + .ds 33 +_total_samples:: + .ds 4 +_xm_handle:: + .ds 1 +_hexbuf: + .ds 2 +_decbuf: + .ds 3 +_timebuf: + .ds 5 +;-------------------------------------------------------- +; ram data +;-------------------------------------------------------- + .area _INITIALIZED +;-------------------------------------------------------- +; absolute ram data +;-------------------------------------------------------- + .area _DABS (ABS) + .area _DABS (ABS) +;-------------------------------------------------------- +; global & static initialisations +;-------------------------------------------------------- + .area _HOME + .area _GSINIT + .area _GSFINAL + .area _GSINIT +;-------------------------------------------------------- +; Home +;-------------------------------------------------------- + .area _HOME + .area _HOME +;-------------------------------------------------------- +; code +;-------------------------------------------------------- + .area _CODE +;src/wc_api.c:34: void wc_exit(u8 rc) __naked +; --------------------------------- +; Function wc_exit +; --------------------------------- +_wc_exit:: +;src/wc_api.c:40: __endasm; + ld sp, (_ret_sp) + ret +;src/wc_api.c:41: } +;src/esp32.c:18: void esp_cmd(u8 cmd) +; --------------------------------- +; Function esp_cmd +; --------------------------------- +_esp_cmd:: + ld c, a +;src/esp32.c:20: SPI_CTRL = SPI_ESP_CS_ON; + ld a, #0x13 + out (_SPI_CTRL), a +;src/esp32.c:21: SPI_DATA = ESP_SPI_CMD_WR_REGS; + ld a, #0x01 + out (_SPI_DATA), a +;src/esp32.c:22: SPI_DATA = ESP_REG_COMMAND; + xor a, a + out (_SPI_DATA), a +;src/esp32.c:23: SPI_DATA; // dummy + in a, (_SPI_DATA) +;src/esp32.c:24: SPI_DATA = cmd; // Command + ld a, c + out (_SPI_DATA), a +;src/esp32.c:25: SPI_DATA = ESP_ST_IDLE; // Reset status + xor a, a + out (_SPI_DATA), a +;src/esp32.c:26: SPI_CTRL = SPI_ESP_CS_OFF; + ld a, #0x03 + out (_SPI_CTRL), a +;src/esp32.c:27: } + ret +;src/esp32.c:29: u8 esp_rd_reg8(u8 reg) +; --------------------------------- +; Function esp_rd_reg8 +; --------------------------------- +_esp_rd_reg8:: + ld c, a +;src/esp32.c:31: SPI_CTRL = SPI_ESP_CS_ON; + ld a, #0x13 + out (_SPI_CTRL), a +;src/esp32.c:32: SPI_DATA = ESP_SPI_CMD_RD_REGS; + ld a, #0x02 + out (_SPI_DATA), a +;src/esp32.c:33: SPI_DATA = reg; + ld a, c + out (_SPI_DATA), a +;src/esp32.c:34: SPI_DATA; // dummy + in a, (_SPI_DATA) +;src/esp32.c:35: SPI_DATA; // dummy + in a, (_SPI_DATA) +;src/esp32.c:36: u8 rc = SPI_DATA; + in a, (_SPI_DATA) + ld c, a +;src/esp32.c:37: SPI_CTRL = SPI_ESP_CS_OFF; + ld a, #0x03 + out (_SPI_CTRL), a +;src/esp32.c:39: return rc; + ld a, c +;src/esp32.c:40: } + ret +;src/esp32.c:42: u32 esp_rd_reg32(u8 reg) +; --------------------------------- +; Function esp_rd_reg32 +; --------------------------------- +_esp_rd_reg32:: + push ix + ld ix, #0 + add ix, sp + push af + push af + ld c, a +;src/esp32.c:44: SPI_CTRL = SPI_ESP_CS_ON; + ld a, #0x13 + out (_SPI_CTRL), a +;src/esp32.c:45: SPI_DATA = ESP_SPI_CMD_RD_REGS; + ld a, #0x02 + out (_SPI_DATA), a +;src/esp32.c:46: SPI_DATA = reg; + ld a, c + out (_SPI_DATA), a +;src/esp32.c:47: SPI_DATA; // dummy + in a, (_SPI_DATA) +;src/esp32.c:48: SPI_DATA; // dummy + in a, (_SPI_DATA) +;src/esp32.c:49: u32 rc = SPI_DATA; + in a, (_SPI_DATA) + ld c, a +;src/esp32.c:50: rc |= (u32)SPI_DATA << 8; + in a, (_SPI_DATA) + ld d, a + ld e, c +;src/esp32.c:51: rc |= (u32)SPI_DATA << 16; + in a, (_SPI_DATA) + ld -4 (ix), a + xor a, a + ld -3 (ix), a + ld -2 (ix), a + ld -1 (ix), a + ld a, -4 (ix) + ld -2 (ix), a + xor a, a + ld -1 (ix), a + ld -4 (ix), a + ld -3 (ix), a + ld l, -2 (ix) +;src/esp32.c:52: rc |= (u32)SPI_DATA << 24; + in a, (_SPI_DATA) + ld -4 (ix), a + xor a, a + ld -3 (ix), a + ld -2 (ix), a + ld -1 (ix), a + ld a, -4 (ix) + ld -1 (ix), a + xor a, a + ld -4 (ix), a + ld -3 (ix), a + ld -2 (ix), a + ld h, -1 (ix) +;src/esp32.c:53: SPI_CTRL = SPI_ESP_CS_OFF; + ld a, #0x03 + out (_SPI_CTRL), a +;src/esp32.c:55: return rc; +;src/esp32.c:56: } + ld sp, ix + pop ix + ret +;src/esp32.c:58: void esp_rd_regs(u8 reg, void *data, u8 size) +; --------------------------------- +; Function esp_rd_regs +; --------------------------------- +_esp_rd_regs:: + ld c, a +;src/esp32.c:60: u8 *d = (u8*)data; +;src/esp32.c:62: SPI_CTRL = SPI_ESP_CS_ON; + ld a, #0x13 + out (_SPI_CTRL), a +;src/esp32.c:63: SPI_DATA = ESP_SPI_CMD_RD_REGS; + ld a, #0x02 + out (_SPI_DATA), a +;src/esp32.c:64: SPI_DATA = reg; + ld a, c + out (_SPI_DATA), a +;src/esp32.c:65: SPI_DATA; // dummy + in a, (_SPI_DATA) +;src/esp32.c:66: SPI_DATA; // dummy + in a, (_SPI_DATA) +;src/esp32.c:67: while (size--) *d++ = SPI_DATA; + ld iy, #2 + add iy, sp + ld c, 0 (iy) +00101$: + ld a, c + dec c + or a, a + jr z, 00103$ + in a, (_SPI_DATA) + ld (de), a + inc de + jp 00101$ +00103$: +;src/esp32.c:68: SPI_CTRL = SPI_ESP_CS_OFF; + ld a, #0x03 + out (_SPI_CTRL), a +;src/esp32.c:69: } + pop hl + inc sp + jp (hl) +;src/esp32.c:71: void esp_wr_reg8(u8 reg, u8 data) +; --------------------------------- +; Function esp_wr_reg8 +; --------------------------------- +_esp_wr_reg8:: + ld b, a + ld c, l +;src/esp32.c:73: SPI_CTRL = SPI_ESP_CS_ON; + ld a, #0x13 + out (_SPI_CTRL), a +;src/esp32.c:74: SPI_DATA = ESP_SPI_CMD_WR_REGS; + ld a, #0x01 + out (_SPI_DATA), a +;src/esp32.c:75: SPI_DATA = reg; + ld a, b + out (_SPI_DATA), a +;src/esp32.c:76: SPI_DATA; // dummy + in a, (_SPI_DATA) +;src/esp32.c:77: SPI_DATA = data; + ld a, c + out (_SPI_DATA), a +;src/esp32.c:78: SPI_CTRL = SPI_ESP_CS_OFF; + ld a, #0x03 + out (_SPI_CTRL), a +;src/esp32.c:79: } + ret +;src/esp32.c:81: void esp_wr_reg32(u8 reg, u32 data) +; --------------------------------- +; Function esp_wr_reg32 +; --------------------------------- +_esp_wr_reg32:: + ld c, a +;src/esp32.c:83: SPI_CTRL = SPI_ESP_CS_ON; + ld a, #0x13 + out (_SPI_CTRL), a +;src/esp32.c:84: SPI_DATA = ESP_SPI_CMD_WR_REGS; + ld a, #0x01 + out (_SPI_DATA), a +;src/esp32.c:85: SPI_DATA = reg; + ld a, c + out (_SPI_DATA), a +;src/esp32.c:86: SPI_DATA; // dummy + in a, (_SPI_DATA) +;src/esp32.c:87: SPI_DATA = (u8)data; + ld iy, #2 + add iy, sp + ld a, 0 (iy) + out (_SPI_DATA), a +;src/esp32.c:88: SPI_DATA = (u8)(data >> 8); + ld a, 1 (iy) + out (_SPI_DATA), a +;src/esp32.c:89: SPI_DATA = (u8)(data >> 16); + ld a, 2 (iy) + out (_SPI_DATA), a +;src/esp32.c:90: SPI_DATA = (u8)(data >> 24); + ld a, 3 (iy) + out (_SPI_DATA), a +;src/esp32.c:91: SPI_CTRL = SPI_ESP_CS_OFF; + ld a, #0x03 + out (_SPI_CTRL), a +;src/esp32.c:92: } + pop hl + pop af + pop af + jp (hl) +;src/esp32.c:94: void esp_wr_end() +; --------------------------------- +; Function esp_wr_end +; --------------------------------- +_esp_wr_end:: +;src/esp32.c:96: SPI_CTRL = SPI_ESP_CS_ON; + ld a, #0x13 + out (_SPI_CTRL), a +;src/esp32.c:97: SPI_DATA = ESP_SPI_CMD_W_END; + ld a, #0x07 + out (_SPI_DATA), a +;src/esp32.c:98: SPI_DATA; // dummy + in a, (_SPI_DATA) +;src/esp32.c:99: SPI_CTRL = SPI_ESP_CS_OFF; + ld a, #0x03 + out (_SPI_CTRL), a +;src/esp32.c:100: } + ret +;src/esp32.c:102: void esp_send_dma(u16 a, u8 p, u16 l, u16 n) +; --------------------------------- +; Function esp_send_dma +; --------------------------------- +_esp_send_dma:: + ld a, l +;src/esp32.c:105: TS_DMASADDRL = (u8)a; + ld bc, #_TS_DMASADDRL + out (c), a +;src/esp32.c:106: TS_DMASADDRH = (u8)((u16)a >> 8); + ld a, h + ld bc, #_TS_DMASADDRH + out (c), a +;src/esp32.c:107: TS_DMASADDRX = p; + ld iy, #2 + add iy, sp + ld a, 0 (iy) + ld bc, #_TS_DMASADDRX + out (c), a +;src/esp32.c:108: TS_DMALEN = (u8)((l >> 1) - 1); + ld a, 1 (iy) + ld c, 2 (iy) + inc iy + srl c + rr a + dec a + ld bc, #_TS_DMALEN + out (c), a +;src/esp32.c:109: TS_DMANUM = (u8)(n - 1); + ld a, 2 (iy) + dec a + ld bc, #_TS_DMANUM + out (c), a +;src/esp32.c:111: SPI_CTRL = SPI_ESP_CS_ON; + ld a, #0x13 + out (_SPI_CTRL), a +;src/esp32.c:112: SPI_DATA = ESP_SPI_CMD_WR_DATA; + ld a, #0x03 + out (_SPI_DATA), a +;src/esp32.c:113: SPI_DATA; // dummy + in a, (_SPI_DATA) +;src/esp32.c:114: SPI_DATA; // dummy + in a, (_SPI_DATA) +;src/esp32.c:115: TS_DMACTR = TS_DMA_RAM_SPI; + ld a, #0x82 + ld bc, #_TS_DMACTR + out (c), a +;src/esp32.c:116: while (TS_DMASTATUS & 0x80); +00101$: + ld a, #>(_TS_DMASTATUS) + in a, (#<(_TS_DMASTATUS)) + rlca + jr c, 00101$ +;src/esp32.c:117: SPI_CTRL = SPI_ESP_CS_OFF; + ld a, #0x03 + out (_SPI_CTRL), a +;src/esp32.c:119: esp_wr_end(); + call _esp_wr_end +;src/esp32.c:120: esp_wait_busy(60000); + ld de, #0xea60 + ld hl, #0x0000 + call _esp_wait_busy +;src/esp32.c:121: } + pop hl + pop af + pop af + inc sp + jp (hl) +;src/esp32.c:123: void esp_rd_end() +; --------------------------------- +; Function esp_rd_end +; --------------------------------- +_esp_rd_end:: +;src/esp32.c:125: SPI_CTRL = SPI_ESP_CS_ON; + ld a, #0x13 + out (_SPI_CTRL), a +;src/esp32.c:126: SPI_DATA = ESP_SPI_CMD_R_END; + ld a, #0x08 + out (_SPI_DATA), a +;src/esp32.c:127: SPI_DATA; // dummy + in a, (_SPI_DATA) +;src/esp32.c:128: SPI_CTRL = SPI_ESP_CS_OFF; + ld a, #0x03 + out (_SPI_CTRL), a +;src/esp32.c:129: } + ret +;src/esp32.c:131: u32 esp_wait_status(u8 status, u32 timeout) +; --------------------------------- +; Function esp_wait_status +; --------------------------------- +_esp_wait_status:: + push ix + ld ix, #0 + add ix, sp + ld c, a +;src/esp32.c:133: while (--timeout) if (esp_rd_reg8(ESP_REG_STATUS) == status) break; + ld e, 4 (ix) + ld d, 5 (ix) + ld l, 6 (ix) + ld h, 7 (ix) +00103$: + ld a, e + add a, #0xff + ld e, a + ld a, d + adc a, #0xff + ld d, a + ld a, l + adc a, #0xff + ld l, a + ld a, h + adc a, #0xff + ld h, a + or a, l + or a, d + or a, e + jr z, 00105$ + push hl + push bc + push de + ld a, #0x01 + call _esp_rd_reg8 + pop de + pop bc + pop hl + sub a, c + jr nz, 00103$ +00105$: +;src/esp32.c:135: return timeout; +;src/esp32.c:136: } + pop ix + ret +;src/esp32.c:138: u32 esp_wait_busy(u32 timeout) +; --------------------------------- +; Function esp_wait_busy +; --------------------------------- +_esp_wait_busy:: +;src/esp32.c:140: while (--timeout) if (esp_rd_reg8(ESP_REG_STATUS) != ESP_ST_BUSY) break; +00103$: + ld a, e + add a, #0xff + ld e, a + ld a, d + adc a, #0xff + ld d, a + ld a, l + adc a, #0xff + ld l, a + ld a, h + adc a, #0xff + ld h, a + or a, l + or a, d + or a, e + ret z + push hl + push de + ld a, #0x01 + call _esp_rd_reg8 + pop de + pop hl + cp a, #0x02 + jr z, 00103$ +;src/esp32.c:142: return timeout; +;src/esp32.c:143: } + ret +;src/esp32.c:145: int esp_create_obj(u32 size, u8 type) +; --------------------------------- +; Function esp_create_obj +; --------------------------------- +_esp_create_obj:: +;src/esp32.c:147: esp_wr_reg32(ESP_REG_DATA_SIZE, size); + push hl + push de + ld a, #0x03 + call _esp_wr_reg32 +;src/esp32.c:148: esp_wr_reg8(ESP_REG_OBJ_TYPE, type); + ld iy, #2 + add iy, sp + ld l, 0 (iy) + ld a, #0x02 + call _esp_wr_reg8 +;src/esp32.c:149: esp_cmd(ESP_CMD_MAKE_OBJECT); + ld a, #0xe0 + call _esp_cmd +;src/esp32.c:150: esp_wait_busy(20000); + ld de, #0x4e20 + ld hl, #0x0000 + call _esp_wait_busy +;src/esp32.c:153: return esp_rd_reg8(ESP_REG_OBJ_HANDLE); + ld a, #0x0b + call _esp_rd_reg8 + ld e, a + ld d, #0x00 +;src/esp32.c:154: } + pop hl + inc sp + jp (hl) +;src/main.c:129: bool esp_init() +; --------------------------------- +; Function esp_init +; --------------------------------- +_esp_init:: +;src/main.c:131: esp_cmd(ESP_CMD_NOP); + xor a, a + call _esp_cmd +;src/main.c:132: esp_rd_end(); + call _esp_rd_end +;src/main.c:133: esp_wr_end(); + call _esp_wr_end +;src/main.c:137: return true; + ld a, #0x01 +;src/main.c:138: } + ret +_err_no_esp: + .db #0x01 ; 1 + .db #0x00 ; 0 + .db #0x18 ; 24 + .db #0x0a ; 10 + .db #0x20 ; 32 + .db #0x05 ; 5 + .db #0x2f ; 47 + .db #0x00 ; 0 + .dw #0x0000 + .db #0x00 ; 0 + .db #0x00 ; 0 + .dw __str_0 + .dw __str_1 + .dw __str_2 +_err_out_of_mem: + .db #0x01 ; 1 + .db #0x00 ; 0 + .db #0xff ; 255 + .db #0xff ; 255 + .db #0x20 ; 32 + .db #0x05 ; 5 + .db #0x2f ; 47 + .db #0x00 ; 0 + .dw #0x0000 + .db #0x00 ; 0 + .db #0x00 ; 0 + .dw __str_0 + .dw __str_1 + .dw __str_3 +_err_playback: + .db #0x01 ; 1 + .db #0x00 ; 0 + .db #0xff ; 255 + .db #0xff ; 255 + .db #0x20 ; 32 + .db #0x05 ; 5 + .db #0x2f ; 47 + .db #0x00 ; 0 + .dw #0x0000 + .db #0x00 ; 0 + .db #0x00 ; 0 + .dw __str_0 + .dw __str_1 + .dw __str_4 +_win_xm: + .db #0x81 ; 129 + .db #0x00 ; 0 + .db #0x19 ; 25 + .db #0x0a ; 10 + .db #0x28 ; 40 + .db #0x0b ; 11 + .db #0x4f ; 79 'O' + .db #0x00 ; 0 + .dw #0x0000 + .db #0x00 ; 0 + .db #0x00 ; 0 + .dw __str_5 + .dw __str_1 + .dw __str_6 +_win_about: + .db #0x01 ; 1 + .db #0x00 ; 0 + .db #0x16 ; 22 + .db #0x0a ; 10 + .db #0x24 ; 36 + .db #0x05 ; 5 + .db #0x4f ; 79 'O' + .db #0x00 ; 0 + .dw #0x0000 + .db #0x00 ; 0 + .db #0x00 ; 0 + .dw __str_7 + .dw __str_1 + .dw __str_8 +__str_0: + .db 0x0e + .ascii " Error! " + .db 0x00 +__str_1: + .db 0x00 +__str_2: + .db 0x0e + .db 0x0c + .db 0x01 + .ascii "No ESP32 detected!" + .db 0x00 +__str_3: + .db 0x0e + .db 0x0c + .db 0x01 + .ascii "Out of memory (file too big)" + .db 0x00 +__str_4: + .db 0x0e + .db 0x0c + .db 0x01 + .ascii "Playback error (bad file?)" + .db 0x00 +__str_5: + .db 0x0e + .ascii " XM/XMZ/S3M Player " + .db 0x00 +__str_6: + .db 0x0e + .db 0x0c + .db 0x01 + .ascii "Playing..." + .db 0x00 +__str_7: + .db 0x0e + .ascii " About " + .db 0x00 +__str_8: + .db 0x0e + .db 0x0c + .db 0x01 + .ascii "XM Player v1.0" + .db 0x00 +;src/main.c:142: bool play_xm() +; --------------------------------- +; Function play_xm +; --------------------------------- +_play_xm:: + push ix + ld ix, #0 + add ix, sp + ld hl, #-20 + add hl, sp + ld sp, hl +;src/main.c:144: esp_cmd(ESP_CMD_TRACK_STOP); + ld a, #0xa2 + call _esp_cmd +;src/main.c:145: esp_wait_busy(10000); + ld de, #0x2710 + ld hl, #0x0000 + call _esp_wait_busy +;src/main.c:146: esp_cmd(ESP_CMD_KILL_OBJECTS); + ld a, #0xe4 + call _esp_cmd +;src/main.c:147: esp_wait_busy(10000); + ld de, #0x2710 + ld hl, #0x0000 + call _esp_wait_busy +;src/main.c:150: switch (file_ext) + ld a, (_file_ext) + dec a + jr z, 00101$ + ld a, (_file_ext) + sub a, #0x02 + jr z, 00102$ + jp 00103$ +;src/main.c:152: case EXT_XMZ: obj_type = OBJ_TYPE_ZIP; break; +00101$: + ld a, #0x08 + jp 00104$ +;src/main.c:153: case EXT_S3M: obj_type = OBJ_TYPE_S3M; break; +00102$: + ld a, #0x0c + jp 00104$ +;src/main.c:154: default: obj_type = OBJ_TYPE_XM; break; +00103$: + ld a, #0x05 +;src/main.c:155: } +00104$: +;src/main.c:157: xm_handle = esp_create_obj(filesize, obj_type); + push af + inc sp + ld de, (_filesize) + ld hl, (_filesize + 2) + call _esp_create_obj + ld hl, #_xm_handle + ld (hl), e +;src/main.c:158: last_esp_status = esp_rd_reg8(ESP_REG_STATUS); + ld a, #0x01 + call _esp_rd_reg8 + ld (#_last_esp_status), a +;src/main.c:159: if (last_esp_status != ESP_ST_READY) + ld a, (_last_esp_status) + dec a + jr z, 00106$ +;src/main.c:160: return false; + xor a, a + jp 00116$ +00106$: +;src/main.c:162: u32 sz = filesize; + ld hl, #12 + add hl, sp + ex de, hl + ld hl, #_filesize + ld bc, #4 + ldir +;src/main.c:163: u32 offs = 0; + xor a, a + ld -4 (ix), a + ld -3 (ix), a + ld -2 (ix), a + ld -1 (ix), a +;src/main.c:165: while (sz) +00107$: + ld a, -5 (ix) + or a, -6 (ix) + or a, -7 (ix) + or a, -8 (ix) + jp z, 00109$ +;src/main.c:167: u32 s = min(sz, FS_BUF_SIZE); + ld a, -7 (ix) + sub a, #0x10 + ld a, -6 (ix) + sbc a, #0x00 + ld a, -5 (ix) + sbc a, #0x00 + jr nc, 00118$ + ld hl, #0 + add hl, sp + ex de, hl + ld hl, #12 + add hl, sp + ld bc, #4 + ldir + jp 00119$ +00118$: + ld -20 (ix), #0x00 + ld -19 (ix), #0x10 + xor a, a + ld -18 (ix), a + ld -17 (ix), a +00119$: + ld hl, #5 + add hl, sp + ex de, hl + ld hl, #0 + add hl, sp + ld bc, #4 + ldir +;src/main.c:168: u8 sec = (s + 511) >> 9; + ld a, -15 (ix) + add a, #0xff + ld a, -14 (ix) + adc a, #0x01 + ld b, a + ld a, #0x00 + adc a, #0x00 + ld e, a + ld a, #0x00 + adc a, #0x00 + ld d, a + ld c, b + ld b, e + ld e, d + srl e + rr b + rr c +;src/main.c:170: wc_load512((u16)fs_buf, sec); + ld -9 (ix), c + ld a, c + push af + inc sp + ld hl, #_fs_buf + call _wc_load512 +;src/main.c:172: esp_wr_reg32(ESP_REG_DATA_SIZE, s); + ld hl, #0x0 + push hl + ld l, -15 (ix) + ld h, -14 (ix) + push hl + ld a, #0x03 + call _esp_wr_reg32 +;src/main.c:173: esp_wr_reg32(ESP_REG_DATA_OFFSET, offs); + ld l, -2 (ix) + ld h, -1 (ix) + push hl + ld l, -4 (ix) + ld h, -3 (ix) + push hl + ld a, #0x07 + call _esp_wr_reg32 +;src/main.c:174: esp_cmd(ESP_CMD_WRITE_OBJECT); + ld a, #0xe1 + call _esp_cmd +;src/main.c:175: esp_wait_status(ESP_ST_DATA_M2S, 2000); + ld hl, #0x0000 + push hl + ld hl, #0x07d0 + push hl + ld a, #0x03 + call _esp_wait_status + pop af + pop af +;src/main.c:176: esp_send_dma((u16)fs_buf, *(u8*)_PAGE2, 512, sec); + ld a, -9 (ix) + ld -11 (ix), a + ld -10 (ix), #0x00 + ld a, (#0x6002) + ld -9 (ix), a + ld l, -11 (ix) + ld h, #0x00 + push hl + ld hl, #0x0200 + push hl + ld a, -9 (ix) + push af + inc sp + ld hl, #_fs_buf + call _esp_send_dma +;src/main.c:178: offs += s; + ld e, -15 (ix) + ld d, -14 (ix) + ld l, -4 (ix) + ld h, -3 (ix) + add hl, de + ld -4 (ix), l + ld -3 (ix), h + ld a, -2 (ix) + adc a, -13 (ix) + ld -2 (ix), a + jr nc, 00197$ + inc -1 (ix) +00197$: +;src/main.c:179: sz -= s; + ld a, -8 (ix) + sub a, -15 (ix) + ld -8 (ix), a + ld a, -7 (ix) + sbc a, -14 (ix) + ld -7 (ix), a + ld a, -6 (ix) + sbc a, -13 (ix) + ld -6 (ix), a + ld a, -5 (ix) + sbc a, -12 (ix) + ld -5 (ix), a + jp 00107$ +00109$: +;src/main.c:182: if (file_ext == EXT_XMZ) + ld a, (_file_ext) + dec a + jr nz, 00113$ +;src/main.c:187: esp_wr_reg8(ESP_REG_OBJ_HANDLE, xm_handle); + ld a, (_xm_handle) + ld l, a + ld a, #0x0b + call _esp_wr_reg8 +;src/main.c:188: esp_wr_reg8(ESP_REG_OBJ_TYPE, OBJ_TYPE_XM); + ld l, #0x05 + ld a, #0x02 + call _esp_wr_reg8 +;src/main.c:189: esp_wr_reg32(ESP_REG_DATA_SIZE, filesize); + ld hl, (_filesize + 2) + push hl + ld hl, (_filesize) + push hl + ld a, #0x03 + call _esp_wr_reg32 +;src/main.c:190: esp_cmd(ESP_CMD_UNZIP); + ld a, #0xf2 + call _esp_cmd +;src/main.c:191: esp_wait_busy(10000); + ld de, #0x2710 + ld hl, #0x0000 + call _esp_wait_busy +;src/main.c:193: last_esp_status = esp_rd_reg8(ESP_REG_STATUS); + ld a, #0x01 + call _esp_rd_reg8 + ld (#_last_esp_status), a +;src/main.c:194: if (last_esp_status != ESP_ST_READY) + ld a, (_last_esp_status) + dec a + jr z, 00113$ +;src/main.c:195: return false; + xor a, a + jp 00116$ +00113$: +;src/main.c:198: esp_cmd(ESP_CMD_TRACK_INIT); + ld a, #0xa0 + call _esp_cmd +;src/main.c:199: esp_wait_busy(10000); + ld de, #0x2710 + ld hl, #0x0000 + call _esp_wait_busy +;src/main.c:201: last_esp_status = esp_rd_reg8(ESP_REG_STATUS); + ld a, #0x01 + call _esp_rd_reg8 + ld (#_last_esp_status), a +;src/main.c:202: if (last_esp_status != ESP_ST_READY) + ld a, (_last_esp_status) + dec a + jr z, 00115$ +;src/main.c:203: return false; + xor a, a + jp 00116$ +00115$: +;src/main.c:205: esp_cmd(ESP_CMD_TRACK_PLAY); + ld a, #0xa1 + call _esp_cmd +;src/main.c:206: esp_wait_busy(10000); + ld de, #0x2710 + ld hl, #0x0000 + call _esp_wait_busy +;src/main.c:208: return true; + ld a, #0x01 +00116$: +;src/main.c:209: } + ld sp, ix + pop ix + ret +;src/main.c:212: void wait_esc_key() +; --------------------------------- +; Function wait_esc_key +; --------------------------------- +_wait_esc_key:: +;src/main.c:214: while (1) +00104$: +;src/main.c:218: __endasm; + halt +;src/main.c:220: if (wc_key_esc()) + call _wc_key_esc + or a, a + jr z, 00104$ +;src/main.c:221: break; +;src/main.c:223: } + ret +;src/main.c:225: void wait_frames(u8 n) +; --------------------------------- +; Function wait_frames +; --------------------------------- +_wait_frames:: + ld c, a +;src/main.c:227: while (n--) +00101$: + ld a, c + dec c + or a, a + ret z +;src/main.c:231: __endasm; + halt +;src/main.c:233: } + jp 00101$ +;src/main.c:235: void about() +; --------------------------------- +; Function about +; --------------------------------- +_about:: +;src/main.c:237: wc_prwow(&win_about); + ld hl, #_win_about + call _wc_prwow +;src/main.c:238: wait_esc_key(); + call _wait_esc_key +;src/main.c:239: wc_rresb(&win_about); + ld hl, #_win_about + call _wc_rresb +;src/main.c:240: wc_exit(WC_EXIT); + xor a, a +;src/main.c:241: } + jp _wc_exit +;src/main.c:243: void error_esp() +; --------------------------------- +; Function error_esp +; --------------------------------- +_error_esp:: +;src/main.c:245: wc_prwow(&err_no_esp); + ld hl, #_err_no_esp + call _wc_prwow +;src/main.c:246: wait_esc_key(); + call _wait_esc_key +;src/main.c:247: wc_rresb(&err_no_esp); + ld hl, #_err_no_esp + call _wc_rresb +;src/main.c:248: wc_exit(WC_EXIT); + xor a, a +;src/main.c:249: } + jp _wc_exit +;src/main.c:251: void error_oom() +; --------------------------------- +; Function error_oom +; --------------------------------- +_error_oom:: +;src/main.c:253: wc_prwow(&err_out_of_mem); + ld hl, #_err_out_of_mem + call _wc_prwow +;src/main.c:254: wait_frames(50); // show the error for ~1 second (50Hz), then auto-advance + ld a, #0x32 + call _wait_frames +;src/main.c:255: wc_rresb(&err_out_of_mem); + ld hl, #_err_out_of_mem + call _wc_rresb +;src/main.c:256: wc_exit(WC_NEXT_FILE); + ld a, #0x02 +;src/main.c:257: } + jp _wc_exit +;src/main.c:259: void error_playback() +; --------------------------------- +; Function error_playback +; --------------------------------- +_error_playback:: +;src/main.c:261: wc_prwow(&err_playback); + ld hl, #_err_playback + call _wc_prwow +;src/main.c:262: wait_frames(50); // show the error for ~1 second (50Hz), then auto-advance + ld a, #0x32 + call _wait_frames +;src/main.c:263: wc_rresb(&err_playback); + ld hl, #_err_playback + call _wc_rresb +;src/main.c:264: wc_exit(WC_NEXT_FILE); + ld a, #0x02 +;src/main.c:265: } + jp _wc_exit +;src/main.c:272: void copy_file_name() +; --------------------------------- +; Function copy_file_name +; --------------------------------- +_copy_file_name:: +;src/main.c:274: u8 *src = (u8*)p_file_name; + ld bc, (_p_file_name) +;src/main.c:277: while (src[i] && i < sizeof(file_name) - 1) + ld e, #0x00 +00102$: + ld l, e + ld h, #0x00 + add hl, bc + ld d, (hl) +;src/main.c:279: file_name[i] = src[i]; + ld a, #<(_file_name) + add a, e + ld l, a + ld a, #>(_file_name) + adc a, #0x00 + ld h, a +;src/main.c:277: while (src[i] && i < sizeof(file_name) - 1) + ld a, d + or a, a + jr z, 00104$ + ld a, e + sub a, #0x20 + jr nc, 00104$ +;src/main.c:279: file_name[i] = src[i]; + ld (hl), d +;src/main.c:280: i++; + inc e + jp 00102$ +00104$: +;src/main.c:282: file_name[i] = 0; + ld (hl), #0x00 +;src/main.c:283: } + ret +;src/main.c:291: void xm_draw_static_labels() +; --------------------------------- +; Function xm_draw_static_labels +; --------------------------------- +_xm_draw_static_labels:: +;src/main.c:293: wc_prsrw_attr(&win_xm, "File:", ROW_FILE, 1, 5, ATTR_CAPTION); + ld a, #0x45 + push af + inc sp + ld hl, #0x0005 + push hl + ld hl, #0x101 + push hl + ld de, #___str_9 + ld hl, #_win_xm + call _wc_prsrw_attr +;src/main.c:294: wc_prsrw(&win_xm, file_name, ROW_FILE, 7, strlen(file_name)); + ld hl, #_file_name + call _strlen + push de + ld hl, #0x701 + push hl + ld de, #_file_name + ld hl, #_win_xm + call _wc_prsrw +;src/main.c:295: } + ret +___str_9: + .ascii "File:" + .db 0x00 +;src/main.c:304: void put_hex2(char *dst, u8 val) +; --------------------------------- +; Function put_hex2 +; --------------------------------- +_put_hex2:: + push ix + ld ix, #0 + add ix, sp + ex de, hl +;src/main.c:307: dst[0] = hexch[(val >> 4) & 0xF]; + ld bc, #_put_hex2_hexch_10000_105+0 + ld a, 4 (ix) + rlca + rlca + rlca + rlca + and a, #0xf + ld l, a + ld h, #0x00 + add hl, bc + ld a, (hl) + ld (de), a +;src/main.c:308: dst[1] = hexch[val & 0xF]; + inc de + ld a, 4 (ix) + and a, #0x0f + ld l, a + ld h, #0x00 + add hl, bc + ld a, (hl) + ld (de), a +;src/main.c:309: } + pop ix + pop hl + inc sp + jp (hl) +_put_hex2_hexch_10000_105: + .ascii "0123456789ABCDEF" + .db 0x00 +;src/main.c:311: void put_dec3(char *dst, u16 val) +; --------------------------------- +; Function put_dec3 +; --------------------------------- +_put_dec3:: + push ix + ld ix, #0 + add ix, sp + push af + ld c, l + ld b, h +;src/main.c:313: dst[0] = '0' + (val / 100) % 10; + pop hl + push de + push bc + ld de, #0x0064 + ld l, -2 (ix) + ld h, -1 (ix) + call __divuint + ex de, hl + ld de, #0x000a + call __moduint + pop bc + ld a, e + add a, #0x30 + ld (bc), a +;src/main.c:314: dst[1] = '0' + (val / 10) % 10; + ld l, c + ld h, b + inc hl + push hl + push bc + ld de, #0x000a + ld l, -2 (ix) + ld h, -1 (ix) + call __divuint + ex de, hl + ld de, #0x000a + call __moduint + pop bc + pop hl + ld a, e + add a, #0x30 + ld (hl), a +;src/main.c:315: dst[2] = '0' + val % 10; + inc bc + inc bc + push bc + ld de, #0x000a + ld l, -2 (ix) + ld h, -1 (ix) + call __moduint + pop bc + ld a, e + add a, #0x30 + ld (bc), a +;src/main.c:316: } + ld sp, ix + pop ix + ret +;src/main.c:318: void put_time(char *dst, u32 sec) +; --------------------------------- +; Function put_time +; --------------------------------- +_put_time:: + push ix + ld ix, #0 + add ix, sp + push hl +;src/main.c:320: u8 m = (sec / 60) % 100; + ld hl, #0x0000 + push hl + ld l, #0x3c + push hl + ld e, 4 (ix) + ld d, 5 (ix) + ld l, 6 (ix) + ld h, 7 (ix) + call __divulong + pop af + pop af + ld bc, #0x0000 + push bc + ld c, #0x64 + push bc + call __modulong + pop af + pop af + ld c, e +;src/main.c:321: u8 s = sec % 60; + push bc + ld hl, #0x0000 + push hl + ld l, #0x3c + push hl + ld e, 4 (ix) + ld d, 5 (ix) + ld l, 6 (ix) + ld h, 7 (ix) + call __modulong + pop af + pop af + pop bc +;src/main.c:323: dst[0] = '0' + (m / 10) % 10; + ld d, c + push de + ld l, #0x0a + ld a, d + call __divuchar + ld a, e + ld l, #0x0a + call __moduchar + ld a, e + pop de + add a, #0x30 + pop hl + push hl + ld (hl), a +;src/main.c:324: dst[1] = '0' + m % 10; + pop bc + push bc + inc bc + push bc + push de + ld l, #0x0a + ld a, d + call __moduchar + ld a, e + pop de + pop bc + add a, #0x30 + ld (bc), a +;src/main.c:325: dst[2] = ':'; + pop hl + push hl + inc hl + inc hl + ld (hl), #0x3a +;src/main.c:326: dst[3] = '0' + (s / 10) % 10; + pop bc + push bc + inc bc + inc bc + inc bc + push bc + push de + ld l, #0x0a + ld a, e + call __divuchar + ld a, e + ld l, #0x0a + call __moduchar + ld a, e + pop de + pop bc + add a, #0x30 + ld (bc), a +;src/main.c:327: dst[4] = '0' + s % 10; + ld a, -2 (ix) + add a, #0x04 + ld c, a + ld a, -1 (ix) + adc a, #0x00 + ld b, a + push bc + ld l, #0x0a + ld a, e + call __moduchar + ld a, e + pop bc + add a, #0x30 + ld (bc), a +;src/main.c:328: } + ld sp, ix + pop ix + pop hl + pop af + pop af + jp (hl) +;src/main.c:330: void xm_draw_stats_labels() +; --------------------------------- +; Function xm_draw_stats_labels +; --------------------------------- +_xm_draw_stats_labels:: +;src/main.c:332: wc_prsrw(&win_xm, "Pattern:#", ROW_STATS, 1, 9); + ld hl, #0x0009 + push hl + ld hl, #0x103 + push hl + ld de, #___str_11 + ld hl, #_win_xm + call _wc_prsrw +;src/main.c:333: wc_prsrw(&win_xm, " Row:#", ROW_STATS, 12, 7); + ld hl, #0x0007 + push hl + ld hl, #0xc03 + push hl + ld de, #___str_12 + ld hl, #_win_xm + call _wc_prsrw +;src/main.c:334: wc_prsrw(&win_xm, " BPM:", ROW_STATS, 21, 6); + ld hl, #0x0006 + push hl + ld hl, #0x1503 + push hl + ld de, #___str_13 + ld hl, #_win_xm + call _wc_prsrw +;src/main.c:336: wc_prsrw(&win_xm, "Time:", ROW_TIME, 1, 5); + ld hl, #0x0005 + push hl + ld hl, #0x105 + push hl + ld de, #___str_14 + ld hl, #_win_xm + call _wc_prsrw +;src/main.c:337: wc_prsrw(&win_xm, " / ", ROW_TIME, 12, 3); + ld hl, #0x0003 + push hl + ld hl, #0xc05 + push hl + ld de, #___str_15 + ld hl, #_win_xm + call _wc_prsrw +;src/main.c:338: } + ret +___str_11: + .ascii "Pattern:#" + .db 0x00 +___str_12: + .ascii " Row:#" + .db 0x00 +___str_13: + .ascii " BPM:" + .db 0x00 +___str_14: + .ascii "Time:" + .db 0x00 +___str_15: + .ascii " / " + .db 0x00 +;src/main.c:353: void xm_update_info() +; --------------------------------- +; Function xm_update_info +; --------------------------------- +_xm_update_info:: + push ix + ld ix, #0 + add ix, sp + ld hl, #-8 + add hl, sp + ld sp, hl +;src/main.c:359: esp_wr_reg8(ESP_REG_OBJ_HANDLE, xm_handle); + ld a, (_xm_handle) + ld l, a + ld a, #0x0b + call _esp_wr_reg8 +;src/main.c:360: esp_cmd(ESP_CMD_TRACK_GET_INFO); + ld a, #0xa8 + call _esp_cmd +;src/main.c:361: esp_wait_busy(2000); + ld de, #0x07d0 + ld hl, #0x0000 + call _esp_wait_busy +;src/main.c:363: pattern = esp_rd_reg8(ESP_REG_TRACK_PATTERN); + ld a, #0x2b + call _esp_rd_reg8 + ld -6 (ix), a +;src/main.c:364: row = esp_rd_reg8(ESP_REG_TRACK_ROW); + ld a, #0x2c + call _esp_rd_reg8 + ld -5 (ix), a +;src/main.c:365: esp_rd_regs(ESP_REG_TRACK_BPM, &bpm, 2); + ld a, #0x02 + push af + inc sp + ld hl, #1 + add hl, sp + ex de, hl + ld a, #0x31 + call _esp_rd_regs +;src/main.c:366: samples = esp_rd_reg32(ESP_REG_TRACK_SAMPLES); + ld a, #0x2d + call _esp_rd_reg32 + ld -4 (ix), e + ld -3 (ix), d + ld -2 (ix), l + ld -1 (ix), h +;src/main.c:368: if (!total_samples) + ld a, (_total_samples+3) + ld iy, #_total_samples + or a, 2 (iy) + or a, 1 (iy) + or a, 0 (iy) + jr nz, 00102$ +;src/main.c:369: total_samples = esp_rd_reg32(ESP_REG_TRACK_TOTAL_SAMPLES); + ld a, #0x36 + call _esp_rd_reg32 + ld (_total_samples), de + ld (_total_samples + 2), hl +00102$: +;src/main.c:371: put_hex2(hexbuf, pattern); + ld a, -6 (ix) + push af + inc sp + ld hl, #_hexbuf + call _put_hex2 +;src/main.c:372: wc_prsrw(&win_xm, hexbuf, ROW_STATS, 10, 2); + ld hl, #0x0002 + push hl + ld hl, #0xa03 + push hl + ld de, #_hexbuf + ld hl, #_win_xm + call _wc_prsrw +;src/main.c:374: put_hex2(hexbuf, row); + ld a, -5 (ix) + push af + inc sp + ld hl, #_hexbuf + call _put_hex2 +;src/main.c:375: wc_prsrw(&win_xm, hexbuf, ROW_STATS, 19, 2); + ld hl, #0x0002 + push hl + ld hl, #0x1303 + push hl + ld de, #_hexbuf + ld hl, #_win_xm + call _wc_prsrw +;src/main.c:377: put_dec3(decbuf, bpm); + pop de + push de + ld hl, #_decbuf + call _put_dec3 +;src/main.c:378: wc_prsrw(&win_xm, decbuf, ROW_STATS, 27, 3); + ld hl, #0x0003 + push hl + ld hl, #0x1b03 + push hl + ld de, #_decbuf + ld hl, #_win_xm + call _wc_prsrw +;src/main.c:380: put_time(timebuf, samples / 44100UL); + ld hl, #0x0000 + push hl + ld hl, #0xac44 + push hl + ld e, -4 (ix) + ld d, -3 (ix) + ld l, -2 (ix) + ld h, -1 (ix) + call __divulong + pop af + ex (sp),hl + push de + ld hl, #_timebuf + call _put_time +;src/main.c:381: wc_prsrw(&win_xm, timebuf, ROW_TIME, 7, 5); + ld hl, #0x0005 + push hl + ld hl, #0x705 + push hl + ld de, #_timebuf + ld hl, #_win_xm + call _wc_prsrw +;src/main.c:383: put_time(timebuf, total_samples / 44100UL); + ld hl, #0x0000 + push hl + ld hl, #0xac44 + push hl + ld de, (_total_samples) + ld hl, (_total_samples + 2) + call __divulong + pop af + ex (sp),hl + push de + ld hl, #_timebuf + call _put_time +;src/main.c:384: wc_prsrw(&win_xm, timebuf, ROW_TIME, 15, 5); + ld hl, #0x0005 + push hl + ld hl, #0xf05 + push hl + ld de, #_timebuf + ld hl, #_win_xm + call _wc_prsrw +;src/main.c:388: } + ld sp, ix + pop ix + ret +;src/main.c:390: void main_start() +; --------------------------------- +; Function main_start +; --------------------------------- +_main_start:: +;src/main.c:394: copy_file_name(); + call _copy_file_name +;src/main.c:396: if (!state_esp) + ld a, (_state_esp+0) + or a, a + jr nz, 00102$ +;src/main.c:397: state_esp = esp_init() ? 1 : 2; + call _esp_init + or a, a + ld a, #0x01 + jr nz, 00122$ + ld a, #0x02 +00122$: + ld (#_state_esp), a +00102$: +;src/main.c:399: if (state_esp != 1) + ld a, (_state_esp) +;src/main.c:401: error_esp(); +;src/main.c:402: return; +;src/main.c:405: total_samples = 0; + dec a + jp nz,_error_esp + ld (_total_samples+0), a + ld (_total_samples+1), a + ld (_total_samples+2), a + ld (_total_samples+3), a +;src/main.c:407: if (!play_xm()) + call _play_xm + or a, a + jr nz, 00109$ +;src/main.c:409: if (last_esp_status == ESP_ERR_OUT_OF_MEMORY) + ld a, (_last_esp_status) + sub a, #0x99 + jp z, _error_oom +;src/main.c:410: error_oom(); +;src/main.c:412: error_playback(); +;src/main.c:413: return; + jp _error_playback +00109$: +;src/main.c:419: wc_prwow(&win_xm); + ld hl, #_win_xm + call _wc_prwow +;src/main.c:420: xm_draw_static_labels(); + call _xm_draw_static_labels +;src/main.c:421: xm_draw_stats_labels(); + call _xm_draw_stats_labels +;src/main.c:422: xm_update_info(); // single call for now - periodic re-calling is a separate step, once this is confirmed stable + call _xm_update_info +;src/main.c:427: while (1) +00117$: +;src/main.c:431: __endasm; + halt +;src/main.c:442: if (wc_key_pgdn()) // PgDn - unload and go to next file + call _wc_key_pgdn + or a, a + jr z, 00111$ +;src/main.c:444: esp_cmd(ESP_CMD_TRACK_STOP); + ld a, #0xa2 + call _esp_cmd +;src/main.c:445: esp_wait_busy(10000); + ld de, #0x2710 + ld hl, #0x0000 + call _esp_wait_busy +;src/main.c:446: esp_cmd(ESP_CMD_KILL_OBJECTS); + ld a, #0xe4 + call _esp_cmd +;src/main.c:447: esp_wait_busy(10000); + ld de, #0x2710 + ld hl, #0x0000 + call _esp_wait_busy +;src/main.c:448: wc_rresb(&win_xm); + ld hl, #_win_xm + call _wc_rresb +;src/main.c:449: wc_exit(WC_NEXT_FILE); + ld a, #0x02 + call _wc_exit +00111$: +;src/main.c:452: if (wc_key_pgup()) // PgUp - unload and go to previous file + call _wc_key_pgup + or a, a + jr z, 00113$ +;src/main.c:454: esp_cmd(ESP_CMD_TRACK_STOP); + ld a, #0xa2 + call _esp_cmd +;src/main.c:455: esp_wait_busy(10000); + ld de, #0x2710 + ld hl, #0x0000 + call _esp_wait_busy +;src/main.c:456: esp_cmd(ESP_CMD_KILL_OBJECTS); + ld a, #0xe4 + call _esp_cmd +;src/main.c:457: esp_wait_busy(10000); + ld de, #0x2710 + ld hl, #0x0000 + call _esp_wait_busy +;src/main.c:458: wc_rresb(&win_xm); + ld hl, #_win_xm + call _wc_rresb +;src/main.c:459: wc_exit(WC_PREV_FILE); + ld a, #0x04 + call _wc_exit +00113$: +;src/main.c:462: if (wc_key_esc()) // Esc - unload and exit + call _wc_key_esc + or a, a + jr z, 00117$ +;src/main.c:464: esp_cmd(ESP_CMD_TRACK_STOP); + ld a, #0xa2 + call _esp_cmd +;src/main.c:465: esp_wait_busy(10000); + ld de, #0x2710 + ld hl, #0x0000 + call _esp_wait_busy +;src/main.c:466: esp_cmd(ESP_CMD_KILL_OBJECTS); + ld a, #0xe4 + call _esp_cmd +;src/main.c:467: esp_wait_busy(10000); + ld de, #0x2710 + ld hl, #0x0000 + call _esp_wait_busy +;src/main.c:468: wc_rresb(&win_xm); + ld hl, #_win_xm + call _wc_rresb +;src/main.c:469: wc_exit(WC_EXIT); + xor a, a + call _wc_exit +;src/main.c:472: } + jp 00117$ +;src/main.c:475: void main() +; --------------------------------- +; Function main +; --------------------------------- +_main:: +;src/main.c:485: __endasm; + ld (_ret_sp), sp + ld (_call_type), a + ld (_p_file_name), bc + ex af, af + ld (_file_ext), a + ld (_filesize), hl + ld (_filesize + 2), de +;src/main.c:487: switch (call_type) + ld a, (_call_type+0) + or a, a + jp z, _main_start + ld a, (_call_type) + sub a, #0x03 + jp z, _about +;src/main.c:489: case WC_CALL_EXT: +;src/main.c:490: main_start(); +;src/main.c:491: break; +;src/main.c:493: case WC_CALL_MENU: +;src/main.c:494: about(); +;src/main.c:495: break; +;src/main.c:497: default: +;src/main.c:498: wc_exit(WC_EXIT); + xor a, a +;src/main.c:499: } +;src/main.c:500: } + jp _wc_exit + .area _CODE + .area _INITIALIZER + .area _CABS (ABS) diff --git a/obj/out.bin b/obj/out.bin new file mode 100644 index 0000000000000000000000000000000000000000..56d42b1d788c56c1e9afc0df4225217ccdb0c710 GIT binary patch literal 14848 zcmeI3ZA@F&8OP7{3kHXzIN3-@y6oPt5jQKwn3RB*+$^tjt9V&b;j~o)NqG@@!3rU9 ziGyWeP6{6~O_d^L(^xm{1DZBD>r}Y=NGzi|)@6w(Xc2m{S=)`2(c8&%G$Fxw&$+e< z3DL5z(~gm^&;36y_nhB3&#^ynLf89MFDFH6#dQ-Nk(+P@CtTC6F6~p)Pk7P>-2~O9 zwZB@bcSS$}fe@&in@hz$KF=eG9-0}0 zT9WipFb}a6-AD*JlBi77kgnAuR@1a=?YhvYpL)m2?pIZ32J?P;Fv~`QL)1o+PT(UG zu7nT8gbxRh@aZR9T9$bHzLvy9Gic%6TyUe>b&(5hQoELdx!}uq=i?GJxf9{FJ<7KHwW-mQ5gSZxs z8lc_??OD)b@{T1NE{rE#-Q!93#qnh8Cm;X8x<(04ikvL?Z;!@)!UOVpj@PG3+9$TC zv;HN5cY1lopB_p(5q0use(|qzw%@|nr1~VT!juj91epd=m#_3-k3}xRkqu_vSVHLQ z$Gz8jf7;8DWOBK3eT8zXw}%v%t*dIas4p-|-^Y=B^S6vC#nN}JcVpig{y;~EyF=g! zS(D4vxcLKz>&hH_Q*&qYd!5Zq0#$3zb@J{O{&e$ccSjd*ZD~8z%y+uo{PDKdSE#-2 z)UmGP$KE^1H`7$S_4u(So;vMDD}SWAy+nOfz_vLp^leEif#_N>MnjLcYiP@nuePS-X80X5= zcl6RWqa;7-5lW@A+O#=xBxerB7=odl0U?)E&Io#mGZ6LqvTC3u^caR8!SFl`KfD?F z5%}h(^1%1#EH!QH6uynCDQCfhOgd&=78Hq6j zK>dVUChGL_o_HL555O}A`SD>wKgZH=<9^hkg(cx_jlO0eO$s zxG@k6>HWfM83`L{sftRXL;ik1z~+qsQAZu$dZJ=8t*URBrOo7I5y`0+bNk$)G)`JC zj9AUyDc)}EcscZ&Kskws2au={@p7DE`7$7!?3KL(LarqLX<$;|Oo}B}qMB_Wau935 zxwM#PxNlzqpTUH$doQ{18NRja@IKRq7#6?1)KRwmwelSmm3#K?+kfETQt({${@7&L z(nL}#LcZHSV=)u?m4Q+3m|fS_Sg3^YeuXiHR*zo4%$APOh-S(RR|-*VJC)^|pB$3n zagLDinx?S46WecupXWs_qd%OqnJ>t9`n@)@yk)?9d(0kFJfmTKSktL8ik*xpg@xr# zl(9c(@Gc9WW?YM7hFb6?$4OO~nlVn(@kg7M*_|*LTA!x zml8s;lo-|}hPlKr;d8}ubWsl%OIu1LtU8Q#Nb-CDzk6{=X2s%2uPH3Vr)}$=*lte> z+aN~~K zwi0Qj?@Ld7wUs3QI^ZNjBm8RF+B+h0yiU|P$Ph}qZZroR#gfA&IZ7mlU6Nnz8{t>s z7Cd$B=KF!r6|H=*h$8{{dza-uUOq3M!6M)KpZ0t@`?OwVypn(747XdF z5L1X7Gp!dU17GgkQo?xl9j$Fxo;;IXm&zHes#Sk4B$Mi1+F5aZ=1F2fs+D9fMt~7u z1Q-EEfDvE>7y(9r5nu!u0Y-okU<4QeMt~7u1Q-EEfDvE>7y(9r5nu!u0Y-okU<4Qe zMt~7u1Q-EEfDvE>7y(9r5nu%V9|>d*YT$Vc@R>{%6%aKPLDZNJ(JXwM^1X1?Z~+F5 z-7uJS5e7~6wWx|{-HcxNHf-KtFucCu#> 8); + 00000101 FD 7E 01 [19] 400 ld a, 1 (iy) + 00000104 D3 57 [11] 401 out (_SPI_DATA), a + 402 ;src/esp32.c:89: SPI_DATA = (u8)(data >> 16); + 00000106 FD 7E 02 [19] 403 ld a, 2 (iy) + 00000109 D3 57 [11] 404 out (_SPI_DATA), a + 405 ;src/esp32.c:90: SPI_DATA = (u8)(data >> 24); + 0000010B FD 7E 03 [19] 406 ld a, 3 (iy) + 0000010E D3 57 [11] 407 out (_SPI_DATA), a + 408 ;src/esp32.c:91: SPI_CTRL = SPI_ESP_CS_OFF; + 00000110 3E 03 [ 7] 409 ld a, #0x03 + 00000112 D3 77 [11] 410 out (_SPI_CTRL), a + 411 ;src/esp32.c:92: } + 00000114 E1 [10] 412 pop hl + 00000115 F1 [10] 413 pop af + 00000116 F1 [10] 414 pop af + 00000117 E9 [ 4] 415 jp (hl) + 416 ;src/esp32.c:94: void esp_wr_end() + 417 ; --------------------------------- + 418 ; Function esp_wr_end + 419 ; --------------------------------- + 00000118 420 _esp_wr_end:: + 421 ;src/esp32.c:96: SPI_CTRL = SPI_ESP_CS_ON; + 00000118 3E 13 [ 7] 422 ld a, #0x13 + 0000011A D3 77 [11] 423 out (_SPI_CTRL), a + 424 ;src/esp32.c:97: SPI_DATA = ESP_SPI_CMD_W_END; + 0000011C 3E 07 [ 7] 425 ld a, #0x07 + 0000011E D3 57 [11] 426 out (_SPI_DATA), a + 427 ;src/esp32.c:98: SPI_DATA; // dummy + 00000120 DB 57 [11] 428 in a, (_SPI_DATA) + 429 ;src/esp32.c:99: SPI_CTRL = SPI_ESP_CS_OFF; + 00000122 3E 03 [ 7] 430 ld a, #0x03 + 00000124 D3 77 [11] 431 out (_SPI_CTRL), a + 432 ;src/esp32.c:100: } + 00000126 C9 [10] 433 ret + 434 ;src/esp32.c:102: void esp_send_dma(u16 a, u8 p, u16 l, u16 n) + 435 ; --------------------------------- + 436 ; Function esp_send_dma + 437 ; --------------------------------- + 00000127 438 _esp_send_dma:: + 00000127 7D [ 4] 439 ld a, l + 440 ;src/esp32.c:105: TS_DMASADDRL = (u8)a; + 00000128 01 AF 1A [10] 441 ld bc, #_TS_DMASADDRL + 0000012B ED 79 [12] 442 out (c), a + 443 ;src/esp32.c:106: TS_DMASADDRH = (u8)((u16)a >> 8); + 0000012D 7C [ 4] 444 ld a, h + 0000012E 01 AF 1B [10] 445 ld bc, #_TS_DMASADDRH + 00000131 ED 79 [12] 446 out (c), a + 447 ;src/esp32.c:107: TS_DMASADDRX = p; + 00000133 FD 21 02 00 [14] 448 ld iy, #2 + 00000137 FD 39 [15] 449 add iy, sp + 00000139 FD 7E 00 [19] 450 ld a, 0 (iy) + 0000013C 01 AF 1C [10] 451 ld bc, #_TS_DMASADDRX + 0000013F ED 79 [12] 452 out (c), a + 453 ;src/esp32.c:108: TS_DMALEN = (u8)((l >> 1) - 1); + 00000141 FD 7E 01 [19] 454 ld a, 1 (iy) + 00000144 FD 4E 02 [19] 455 ld c, 2 (iy) + 00000147 FD 23 [10] 456 inc iy + 00000149 CB 39 [ 8] 457 srl c + 0000014B CB 1F [ 8] 458 rr a + 0000014D 3D [ 4] 459 dec a + 0000014E 01 AF 26 [10] 460 ld bc, #_TS_DMALEN + 00000151 ED 79 [12] 461 out (c), a + 462 ;src/esp32.c:109: TS_DMANUM = (u8)(n - 1); + 00000153 FD 7E 02 [19] 463 ld a, 2 (iy) + 00000156 3D [ 4] 464 dec a + 00000157 01 AF 28 [10] 465 ld bc, #_TS_DMANUM + 0000015A ED 79 [12] 466 out (c), a + 467 ;src/esp32.c:111: SPI_CTRL = SPI_ESP_CS_ON; + 0000015C 3E 13 [ 7] 468 ld a, #0x13 + 0000015E D3 77 [11] 469 out (_SPI_CTRL), a + 470 ;src/esp32.c:112: SPI_DATA = ESP_SPI_CMD_WR_DATA; + 00000160 3E 03 [ 7] 471 ld a, #0x03 + 00000162 D3 57 [11] 472 out (_SPI_DATA), a + 473 ;src/esp32.c:113: SPI_DATA; // dummy + 00000164 DB 57 [11] 474 in a, (_SPI_DATA) + 475 ;src/esp32.c:114: SPI_DATA; // dummy + 00000166 DB 57 [11] 476 in a, (_SPI_DATA) + 477 ;src/esp32.c:115: TS_DMACTR = TS_DMA_RAM_SPI; + 00000168 3E 82 [ 7] 478 ld a, #0x82 + 0000016A 01 AF 27 [10] 479 ld bc, #_TS_DMACTR + 0000016D ED 79 [12] 480 out (c), a + 481 ;src/esp32.c:116: while (TS_DMASTATUS & 0x80); + 0000016F 482 00101$: + 0000016F 3E 27 [ 7] 483 ld a, #>(_TS_DMASTATUS) + 00000171 DB AF [11] 484 in a, (#<(_TS_DMASTATUS)) + 00000173 07 [ 4] 485 rlca + 00000174 38 F9 [12] 486 jr c, 00101$ + 487 ;src/esp32.c:117: SPI_CTRL = SPI_ESP_CS_OFF; + 00000176 3E 03 [ 7] 488 ld a, #0x03 + 00000178 D3 77 [11] 489 out (_SPI_CTRL), a + 490 ;src/esp32.c:119: esp_wr_end(); + 0000017A CDr18r01 [17] 491 call _esp_wr_end + 492 ;src/esp32.c:120: esp_wait_busy(60000); + 0000017D 11 60 EA [10] 493 ld de, #0xea60 + 00000180 21 00 00 [10] 494 ld hl, #0x0000 + 00000183 CDrD5r01 [17] 495 call _esp_wait_busy + 496 ;src/esp32.c:121: } + 00000186 E1 [10] 497 pop hl + 00000187 F1 [10] 498 pop af + 00000188 F1 [10] 499 pop af + 00000189 33 [ 6] 500 inc sp + 0000018A E9 [ 4] 501 jp (hl) + 502 ;src/esp32.c:123: void esp_rd_end() + 503 ; --------------------------------- + 504 ; Function esp_rd_end + 505 ; --------------------------------- + 0000018B 506 _esp_rd_end:: + 507 ;src/esp32.c:125: SPI_CTRL = SPI_ESP_CS_ON; + 0000018B 3E 13 [ 7] 508 ld a, #0x13 + 0000018D D3 77 [11] 509 out (_SPI_CTRL), a + 510 ;src/esp32.c:126: SPI_DATA = ESP_SPI_CMD_R_END; + 0000018F 3E 08 [ 7] 511 ld a, #0x08 + 00000191 D3 57 [11] 512 out (_SPI_DATA), a + 513 ;src/esp32.c:127: SPI_DATA; // dummy + 00000193 DB 57 [11] 514 in a, (_SPI_DATA) + 515 ;src/esp32.c:128: SPI_CTRL = SPI_ESP_CS_OFF; + 00000195 3E 03 [ 7] 516 ld a, #0x03 + 00000197 D3 77 [11] 517 out (_SPI_CTRL), a + 518 ;src/esp32.c:129: } + 00000199 C9 [10] 519 ret + 520 ;src/esp32.c:131: u32 esp_wait_status(u8 status, u32 timeout) + 521 ; --------------------------------- + 522 ; Function esp_wait_status + 523 ; --------------------------------- + 0000019A 524 _esp_wait_status:: + 0000019A DD E5 [15] 525 push ix + 0000019C DD 21 00 00 [14] 526 ld ix, #0 + 000001A0 DD 39 [15] 527 add ix, sp + 000001A2 4F [ 4] 528 ld c, a + 529 ;src/esp32.c:133: while (--timeout) if (esp_rd_reg8(ESP_REG_STATUS) == status) break; + 000001A3 DD 5E 04 [19] 530 ld e, 4 (ix) + 000001A6 DD 56 05 [19] 531 ld d, 5 (ix) + 000001A9 DD 6E 06 [19] 532 ld l, 6 (ix) + 000001AC DD 66 07 [19] 533 ld h, 7 (ix) + 000001AF 534 00103$: + 000001AF 7B [ 4] 535 ld a, e + 000001B0 C6 FF [ 7] 536 add a, #0xff + 000001B2 5F [ 4] 537 ld e, a + 000001B3 7A [ 4] 538 ld a, d + 000001B4 CE FF [ 7] 539 adc a, #0xff + 000001B6 57 [ 4] 540 ld d, a + 000001B7 7D [ 4] 541 ld a, l + 000001B8 CE FF [ 7] 542 adc a, #0xff + 000001BA 6F [ 4] 543 ld l, a + 000001BB 7C [ 4] 544 ld a, h + 000001BC CE FF [ 7] 545 adc a, #0xff + 000001BE 67 [ 4] 546 ld h, a + 000001BF B5 [ 4] 547 or a, l + 000001C0 B2 [ 4] 548 or a, d + 000001C1 B3 [ 4] 549 or a, e + 000001C2 28 0E [12] 550 jr z, 00105$ + 000001C4 E5 [11] 551 push hl + 000001C5 C5 [11] 552 push bc + 000001C6 D5 [11] 553 push de + 000001C7 3E 01 [ 7] 554 ld a, #0x01 + 000001C9 CDr1Er00 [17] 555 call _esp_rd_reg8 + 000001CC D1 [10] 556 pop de + 000001CD C1 [10] 557 pop bc + 000001CE E1 [10] 558 pop hl + 000001CF 91 [ 4] 559 sub a, c + 000001D0 20 DD [12] 560 jr nz, 00103$ + 000001D2 561 00105$: + 562 ;src/esp32.c:135: return timeout; + 563 ;src/esp32.c:136: } + 000001D2 DD E1 [14] 564 pop ix + 000001D4 C9 [10] 565 ret + 566 ;src/esp32.c:138: u32 esp_wait_busy(u32 timeout) + 567 ; --------------------------------- + 568 ; Function esp_wait_busy + 569 ; --------------------------------- + 000001D5 570 _esp_wait_busy:: + 571 ;src/esp32.c:140: while (--timeout) if (esp_rd_reg8(ESP_REG_STATUS) != ESP_ST_BUSY) break; + 000001D5 572 00103$: + 000001D5 7B [ 4] 573 ld a, e + 000001D6 C6 FF [ 7] 574 add a, #0xff + 000001D8 5F [ 4] 575 ld e, a + 000001D9 7A [ 4] 576 ld a, d + 000001DA CE FF [ 7] 577 adc a, #0xff + 000001DC 57 [ 4] 578 ld d, a + 000001DD 7D [ 4] 579 ld a, l + 000001DE CE FF [ 7] 580 adc a, #0xff + 000001E0 6F [ 4] 581 ld l, a + 000001E1 7C [ 4] 582 ld a, h + 000001E2 CE FF [ 7] 583 adc a, #0xff + 000001E4 67 [ 4] 584 ld h, a + 000001E5 B5 [ 4] 585 or a, l + 000001E6 B2 [ 4] 586 or a, d + 000001E7 B3 [ 4] 587 or a, e + 000001E8 C8 [11] 588 ret z + 000001E9 E5 [11] 589 push hl + 000001EA D5 [11] 590 push de + 000001EB 3E 01 [ 7] 591 ld a, #0x01 + 000001ED CDr1Er00 [17] 592 call _esp_rd_reg8 + 000001F0 D1 [10] 593 pop de + 000001F1 E1 [10] 594 pop hl + 000001F2 FE 02 [ 7] 595 cp a, #0x02 + 000001F4 28 DF [12] 596 jr z, 00103$ + 597 ;src/esp32.c:142: return timeout; + 598 ;src/esp32.c:143: } + 000001F6 C9 [10] 599 ret + 600 ;src/esp32.c:145: int esp_create_obj(u32 size, u8 type) + 601 ; --------------------------------- + 602 ; Function esp_create_obj + 603 ; --------------------------------- + 000001F7 604 _esp_create_obj:: + 605 ;src/esp32.c:147: esp_wr_reg32(ESP_REG_DATA_SIZE, size); + 000001F7 E5 [11] 606 push hl + 000001F8 D5 [11] 607 push de + 000001F9 3E 03 [ 7] 608 ld a, #0x03 + 000001FB CDrE8r00 [17] 609 call _esp_wr_reg32 + 610 ;src/esp32.c:148: esp_wr_reg8(ESP_REG_OBJ_TYPE, type); + 000001FE FD 21 02 00 [14] 611 ld iy, #2 + 00000202 FD 39 [15] 612 add iy, sp + 00000204 FD 6E 00 [19] 613 ld l, 0 (iy) + 00000207 3E 02 [ 7] 614 ld a, #0x02 + 00000209 CDrD1r00 [17] 615 call _esp_wr_reg8 + 616 ;src/esp32.c:149: esp_cmd(ESP_CMD_MAKE_OBJECT); + 0000020C 3E E0 [ 7] 617 ld a, #0xe0 + 0000020E CDr05r00 [17] 618 call _esp_cmd + 619 ;src/esp32.c:150: esp_wait_busy(20000); + 00000211 11 20 4E [10] 620 ld de, #0x4e20 + 00000214 21 00 00 [10] 621 ld hl, #0x0000 + 00000217 CDrD5r01 [17] 622 call _esp_wait_busy + 623 ;src/esp32.c:153: return esp_rd_reg8(ESP_REG_OBJ_HANDLE); + 0000021A 3E 0B [ 7] 624 ld a, #0x0b + 0000021C CDr1Er00 [17] 625 call _esp_rd_reg8 + 0000021F 5F [ 4] 626 ld e, a + 00000220 16 00 [ 7] 627 ld d, #0x00 + 628 ;src/esp32.c:154: } + 00000222 E1 [10] 629 pop hl + 00000223 33 [ 6] 630 inc sp + 00000224 E9 [ 4] 631 jp (hl) + 632 ;src/main.c:129: bool esp_init() + 633 ; --------------------------------- + 634 ; Function esp_init + 635 ; --------------------------------- + 00000225 636 _esp_init:: + 637 ;src/main.c:131: esp_cmd(ESP_CMD_NOP); + 00000225 AF [ 4] 638 xor a, a + 00000226 CDr05r00 [17] 639 call _esp_cmd + 640 ;src/main.c:132: esp_rd_end(); + 00000229 CDr8Br01 [17] 641 call _esp_rd_end + 642 ;src/main.c:133: esp_wr_end(); + 0000022C CDr18r01 [17] 643 call _esp_wr_end + 644 ;src/main.c:137: return true; + 0000022F 3E 01 [ 7] 645 ld a, #0x01 + 646 ;src/main.c:138: } + 00000231 C9 [10] 647 ret + 00000232 648 _err_no_esp: + 00000232 01 649 .db #0x01 ; 1 + 00000233 00 650 .db #0x00 ; 0 + 00000234 18 651 .db #0x18 ; 24 + 00000235 0A 652 .db #0x0a ; 10 + 00000236 20 653 .db #0x20 ; 32 + 00000237 05 654 .db #0x05 ; 5 + 00000238 2F 655 .db #0x2f ; 47 + 00000239 00 656 .db #0x00 ; 0 + 0000023A 00 00 657 .dw #0x0000 + 0000023C 00 658 .db #0x00 ; 0 + 0000023D 00 659 .db #0x00 ; 0 + 0000023Er8Cr02 660 .dw __str_0 + 00000240r96r02 661 .dw __str_1 + 00000242r97r02 662 .dw __str_2 + 00000244 663 _err_out_of_mem: + 00000244 01 664 .db #0x01 ; 1 + 00000245 00 665 .db #0x00 ; 0 + 00000246 FF 666 .db #0xff ; 255 + 00000247 FF 667 .db #0xff ; 255 + 00000248 20 668 .db #0x20 ; 32 + 00000249 05 669 .db #0x05 ; 5 + 0000024A 2F 670 .db #0x2f ; 47 + 0000024B 00 671 .db #0x00 ; 0 + 0000024C 00 00 672 .dw #0x0000 + 0000024E 00 673 .db #0x00 ; 0 + 0000024F 00 674 .db #0x00 ; 0 + 00000250r8Cr02 675 .dw __str_0 + 00000252r96r02 676 .dw __str_1 + 00000254rADr02 677 .dw __str_3 + 00000256 678 _err_playback: + 00000256 01 679 .db #0x01 ; 1 + 00000257 00 680 .db #0x00 ; 0 + 00000258 FF 681 .db #0xff ; 255 + 00000259 FF 682 .db #0xff ; 255 + 0000025A 20 683 .db #0x20 ; 32 + 0000025B 05 684 .db #0x05 ; 5 + 0000025C 2F 685 .db #0x2f ; 47 + 0000025D 00 686 .db #0x00 ; 0 + 0000025E 00 00 687 .dw #0x0000 + 00000260 00 688 .db #0x00 ; 0 + 00000261 00 689 .db #0x00 ; 0 + 00000262r8Cr02 690 .dw __str_0 + 00000264r96r02 691 .dw __str_1 + 00000266rCDr02 692 .dw __str_4 + 00000268 693 _win_xm: + 00000268 81 694 .db #0x81 ; 129 + 00000269 00 695 .db #0x00 ; 0 + 0000026A 19 696 .db #0x19 ; 25 + 0000026B 0A 697 .db #0x0a ; 10 + 0000026C 28 698 .db #0x28 ; 40 + 0000026D 0B 699 .db #0x0b ; 11 + 0000026E 4F 700 .db #0x4f ; 79 'O' + 0000026F 00 701 .db #0x00 ; 0 + 00000270 00 00 702 .dw #0x0000 + 00000272 00 703 .db #0x00 ; 0 + 00000273 00 704 .db #0x00 ; 0 + 00000274rEBr02 705 .dw __str_5 + 00000276r96r02 706 .dw __str_1 + 00000278r00r03 707 .dw __str_6 + 0000027A 708 _win_about: + 0000027A 01 709 .db #0x01 ; 1 + 0000027B 00 710 .db #0x00 ; 0 + 0000027C 16 711 .db #0x16 ; 22 + 0000027D 0A 712 .db #0x0a ; 10 + 0000027E 24 713 .db #0x24 ; 36 + 0000027F 05 714 .db #0x05 ; 5 + 00000280 4F 715 .db #0x4f ; 79 'O' + 00000281 00 716 .db #0x00 ; 0 + 00000282 00 00 717 .dw #0x0000 + 00000284 00 718 .db #0x00 ; 0 + 00000285 00 719 .db #0x00 ; 0 + 00000286r0Er03 720 .dw __str_7 + 00000288r96r02 721 .dw __str_1 + 0000028Ar17r03 722 .dw __str_8 + 0000028C 723 __str_0: + 0000028C 0E 724 .db 0x0e + 0000028D 20 45 72 72 6F 72 21 725 .ascii " Error! " + 20 + 00000295 00 726 .db 0x00 + 00000296 727 __str_1: + 00000296 00 728 .db 0x00 + 00000297 729 __str_2: + 00000297 0E 730 .db 0x0e + 00000298 0C 731 .db 0x0c + 00000299 01 732 .db 0x01 + 0000029A 4E 6F 20 45 53 50 33 733 .ascii "No ESP32 detected!" + 32 20 64 65 74 65 63 + 74 65 64 21 + 000002AC 00 734 .db 0x00 + 000002AD 735 __str_3: + 000002AD 0E 736 .db 0x0e + 000002AE 0C 737 .db 0x0c + 000002AF 01 738 .db 0x01 + 000002B0 4F 75 74 20 6F 66 20 739 .ascii "Out of memory (file too big)" + 6D 65 6D 6F 72 79 20 + 28 66 69 6C 65 20 74 + 6F 6F 20 62 69 67 29 + 000002CC 00 740 .db 0x00 + 000002CD 741 __str_4: + 000002CD 0E 742 .db 0x0e + 000002CE 0C 743 .db 0x0c + 000002CF 01 744 .db 0x01 + 000002D0 50 6C 61 79 62 61 63 745 .ascii "Playback error (bad file?)" + 6B 20 65 72 72 6F 72 + 20 28 62 61 64 20 66 + 69 6C 65 3F 29 + 000002EA 00 746 .db 0x00 + 000002EB 747 __str_5: + 000002EB 0E 748 .db 0x0e + 000002EC 20 58 4D 2F 58 4D 5A 749 .ascii " XM/XMZ/S3M Player " + 2F 53 33 4D 20 50 6C + 61 79 65 72 20 + 000002FF 00 750 .db 0x00 + 00000300 751 __str_6: + 00000300 0E 752 .db 0x0e + 00000301 0C 753 .db 0x0c + 00000302 01 754 .db 0x01 + 00000303 50 6C 61 79 69 6E 67 755 .ascii "Playing..." + 2E 2E 2E + 0000030D 00 756 .db 0x00 + 0000030E 757 __str_7: + 0000030E 0E 758 .db 0x0e + 0000030F 20 41 62 6F 75 74 20 759 .ascii " About " + 00000316 00 760 .db 0x00 + 00000317 761 __str_8: + 00000317 0E 762 .db 0x0e + 00000318 0C 763 .db 0x0c + 00000319 01 764 .db 0x01 + 0000031A 58 4D 20 50 6C 61 79 765 .ascii "XM Player v1.0" + 65 72 20 76 31 2E 30 + 00000328 00 766 .db 0x00 + 767 ;src/main.c:142: bool play_xm() + 768 ; --------------------------------- + 769 ; Function play_xm + 770 ; --------------------------------- + 00000329 771 _play_xm:: + 00000329 DD E5 [15] 772 push ix + 0000032B DD 21 00 00 [14] 773 ld ix, #0 + 0000032F DD 39 [15] 774 add ix, sp + 00000331 21 EC FF [10] 775 ld hl, #-20 + 00000334 39 [11] 776 add hl, sp + 00000335 F9 [ 6] 777 ld sp, hl + 778 ;src/main.c:144: esp_cmd(ESP_CMD_TRACK_STOP); + 00000336 3E A2 [ 7] 779 ld a, #0xa2 + 00000338 CDr05r00 [17] 780 call _esp_cmd + 781 ;src/main.c:145: esp_wait_busy(10000); + 0000033B 11 10 27 [10] 782 ld de, #0x2710 + 0000033E 21 00 00 [10] 783 ld hl, #0x0000 + 00000341 CDrD5r01 [17] 784 call _esp_wait_busy + 785 ;src/main.c:146: esp_cmd(ESP_CMD_KILL_OBJECTS); + 00000344 3E E4 [ 7] 786 ld a, #0xe4 + 00000346 CDr05r00 [17] 787 call _esp_cmd + 788 ;src/main.c:147: esp_wait_busy(10000); + 00000349 11 10 27 [10] 789 ld de, #0x2710 + 0000034C 21 00 00 [10] 790 ld hl, #0x0000 + 0000034F CDrD5r01 [17] 791 call _esp_wait_busy + 792 ;src/main.c:150: switch (file_ext) + 00000352 3Ar07r10 [13] 793 ld a, (_file_ext) + 00000355 3D [ 4] 794 dec a + 00000356 28 0A [12] 795 jr z, 00101$ + 00000358 3Ar07r10 [13] 796 ld a, (_file_ext) + 0000035B D6 02 [ 7] 797 sub a, #0x02 + 0000035D 28 08 [12] 798 jr z, 00102$ + 0000035F C3r6Cr03 [10] 799 jp 00103$ + 800 ;src/main.c:152: case EXT_XMZ: obj_type = OBJ_TYPE_ZIP; break; + 00000362 801 00101$: + 00000362 3E 08 [ 7] 802 ld a, #0x08 + 00000364 C3r6Er03 [10] 803 jp 00104$ + 804 ;src/main.c:153: case EXT_S3M: obj_type = OBJ_TYPE_S3M; break; + 00000367 805 00102$: + 00000367 3E 0C [ 7] 806 ld a, #0x0c + 00000369 C3r6Er03 [10] 807 jp 00104$ + 808 ;src/main.c:154: default: obj_type = OBJ_TYPE_XM; break; + 0000036C 809 00103$: + 0000036C 3E 05 [ 7] 810 ld a, #0x05 + 811 ;src/main.c:155: } + 0000036E 812 00104$: + 813 ;src/main.c:157: xm_handle = esp_create_obj(filesize, obj_type); + 0000036E F5 [11] 814 push af + 0000036F 33 [ 6] 815 inc sp + 00000370 ED 5Br03r10 [20] 816 ld de, (_filesize) + 00000374 2Ar05r10 [16] 817 ld hl, (_filesize + 2) + 00000377 CDrF7r01 [17] 818 call _esp_create_obj + 0000037A 21r31r10 [10] 819 ld hl, #_xm_handle + 0000037D 73 [ 7] 820 ld (hl), e + 821 ;src/main.c:158: last_esp_status = esp_rd_reg8(ESP_REG_STATUS); + 0000037E 3E 01 [ 7] 822 ld a, #0x01 + 00000380 CDr1Er00 [17] 823 call _esp_rd_reg8 + 00000383 32r09r10 [13] 824 ld (#_last_esp_status), a + 825 ;src/main.c:159: if (last_esp_status != ESP_ST_READY) + 00000386 3Ar09r10 [13] 826 ld a, (_last_esp_status) + 00000389 3D [ 4] 827 dec a + 0000038A 28 04 [12] 828 jr z, 00106$ + 829 ;src/main.c:160: return false; + 0000038C AF [ 4] 830 xor a, a + 0000038D C3r39r05 [10] 831 jp 00116$ + 00000390 832 00106$: + 833 ;src/main.c:162: u32 sz = filesize; + 00000390 21 0C 00 [10] 834 ld hl, #12 + 00000393 39 [11] 835 add hl, sp + 00000394 EB [ 4] 836 ex de, hl + 00000395 21r03r10 [10] 837 ld hl, #_filesize + 00000398 01 04 00 [10] 838 ld bc, #4 + 0000039B ED B0 [21] 839 ldir + 840 ;src/main.c:163: u32 offs = 0; + 0000039D AF [ 4] 841 xor a, a + 0000039E DD 77 FC [19] 842 ld -4 (ix), a + 000003A1 DD 77 FD [19] 843 ld -3 (ix), a + 000003A4 DD 77 FE [19] 844 ld -2 (ix), a + 000003A7 DD 77 FF [19] 845 ld -1 (ix), a + 846 ;src/main.c:165: while (sz) + 000003AA 847 00107$: + 000003AA DD 7E FB [19] 848 ld a, -5 (ix) + 000003AD DD B6 FA [19] 849 or a, -6 (ix) + 000003B0 DD B6 F9 [19] 850 or a, -7 (ix) + 000003B3 DD B6 F8 [19] 851 or a, -8 (ix) + 000003B6 CArC6r04 [10] 852 jp z, 00109$ + 853 ;src/main.c:167: u32 s = min(sz, FS_BUF_SIZE); + 000003B9 DD 7E F9 [19] 854 ld a, -7 (ix) + 000003BC D6 10 [ 7] 855 sub a, #0x10 + 000003BE DD 7E FA [19] 856 ld a, -6 (ix) + 000003C1 DE 00 [ 7] 857 sbc a, #0x00 + 000003C3 DD 7E FB [19] 858 ld a, -5 (ix) + 000003C6 DE 00 [ 7] 859 sbc a, #0x00 + 000003C8 30 11 [12] 860 jr nc, 00118$ + 000003CA 21 00 00 [10] 861 ld hl, #0 + 000003CD 39 [11] 862 add hl, sp + 000003CE EB [ 4] 863 ex de, hl + 000003CF 21 0C 00 [10] 864 ld hl, #12 + 000003D2 39 [11] 865 add hl, sp + 000003D3 01 04 00 [10] 866 ld bc, #4 + 000003D6 ED B0 [21] 867 ldir + 000003D8 C3rEAr03 [10] 868 jp 00119$ + 000003DB 869 00118$: + 000003DB DD 36 EC 00 [19] 870 ld -20 (ix), #0x00 + 000003DF DD 36 ED 10 [19] 871 ld -19 (ix), #0x10 + 000003E3 AF [ 4] 872 xor a, a + 000003E4 DD 77 EE [19] 873 ld -18 (ix), a + 000003E7 DD 77 EF [19] 874 ld -17 (ix), a + 000003EA 875 00119$: + 000003EA 21 05 00 [10] 876 ld hl, #5 + 000003ED 39 [11] 877 add hl, sp + 000003EE EB [ 4] 878 ex de, hl + 000003EF 21 00 00 [10] 879 ld hl, #0 + 000003F2 39 [11] 880 add hl, sp + 000003F3 01 04 00 [10] 881 ld bc, #4 + 000003F6 ED B0 [21] 882 ldir + 883 ;src/main.c:168: u8 sec = (s + 511) >> 9; + 000003F8 DD 7E F1 [19] 884 ld a, -15 (ix) + 000003FB C6 FF [ 7] 885 add a, #0xff + 000003FD DD 7E F2 [19] 886 ld a, -14 (ix) + 00000400 CE 01 [ 7] 887 adc a, #0x01 + 00000402 47 [ 4] 888 ld b, a + 00000403 3E 00 [ 7] 889 ld a, #0x00 + 00000405 CE 00 [ 7] 890 adc a, #0x00 + 00000407 5F [ 4] 891 ld e, a + 00000408 3E 00 [ 7] 892 ld a, #0x00 + 0000040A CE 00 [ 7] 893 adc a, #0x00 + 0000040C 57 [ 4] 894 ld d, a + 0000040D 48 [ 4] 895 ld c, b + 0000040E 43 [ 4] 896 ld b, e + 0000040F 5A [ 4] 897 ld e, d + 00000410 CB 3B [ 8] 898 srl e + 00000412 CB 18 [ 8] 899 rr b + 00000414 CB 19 [ 8] 900 rr c + 901 ;src/main.c:170: wc_load512((u16)fs_buf, sec); + 00000416 DD 71 F7 [19] 902 ld -9 (ix), c + 00000419 79 [ 4] 903 ld a, c + 0000041A F5 [11] 904 push af + 0000041B 33 [ 6] 905 inc sp + 0000041C 21r01r00 [10] 906 ld hl, #_fs_buf + 0000041F CDr00r00 [17] 907 call _wc_load512 + 908 ;src/main.c:172: esp_wr_reg32(ESP_REG_DATA_SIZE, s); + 00000422 21 00 00 [10] 909 ld hl, #0x0 + 00000425 E5 [11] 910 push hl + 00000426 DD 6E F1 [19] 911 ld l, -15 (ix) + 00000429 DD 66 F2 [19] 912 ld h, -14 (ix) + 0000042C E5 [11] 913 push hl + 0000042D 3E 03 [ 7] 914 ld a, #0x03 + 0000042F CDrE8r00 [17] 915 call _esp_wr_reg32 + 916 ;src/main.c:173: esp_wr_reg32(ESP_REG_DATA_OFFSET, offs); + 00000432 DD 6E FE [19] 917 ld l, -2 (ix) + 00000435 DD 66 FF [19] 918 ld h, -1 (ix) + 00000438 E5 [11] 919 push hl + 00000439 DD 6E FC [19] 920 ld l, -4 (ix) + 0000043C DD 66 FD [19] 921 ld h, -3 (ix) + 0000043F E5 [11] 922 push hl + 00000440 3E 07 [ 7] 923 ld a, #0x07 + 00000442 CDrE8r00 [17] 924 call _esp_wr_reg32 + 925 ;src/main.c:174: esp_cmd(ESP_CMD_WRITE_OBJECT); + 00000445 3E E1 [ 7] 926 ld a, #0xe1 + 00000447 CDr05r00 [17] 927 call _esp_cmd + 928 ;src/main.c:175: esp_wait_status(ESP_ST_DATA_M2S, 2000); + 0000044A 21 00 00 [10] 929 ld hl, #0x0000 + 0000044D E5 [11] 930 push hl + 0000044E 21 D0 07 [10] 931 ld hl, #0x07d0 + 00000451 E5 [11] 932 push hl + 00000452 3E 03 [ 7] 933 ld a, #0x03 + 00000454 CDr9Ar01 [17] 934 call _esp_wait_status + 00000457 F1 [10] 935 pop af + 00000458 F1 [10] 936 pop af + 937 ;src/main.c:176: esp_send_dma((u16)fs_buf, *(u8*)_PAGE2, 512, sec); + 00000459 DD 7E F7 [19] 938 ld a, -9 (ix) + 0000045C DD 77 F5 [19] 939 ld -11 (ix), a + 0000045F DD 36 F6 00 [19] 940 ld -10 (ix), #0x00 + 00000463 3A 02 60 [13] 941 ld a, (#0x6002) + 00000466 DD 77 F7 [19] 942 ld -9 (ix), a + 00000469 DD 6E F5 [19] 943 ld l, -11 (ix) + 0000046C 26 00 [ 7] 944 ld h, #0x00 + 0000046E E5 [11] 945 push hl + 0000046F 21 00 02 [10] 946 ld hl, #0x0200 + 00000472 E5 [11] 947 push hl + 00000473 DD 7E F7 [19] 948 ld a, -9 (ix) + 00000476 F5 [11] 949 push af + 00000477 33 [ 6] 950 inc sp + 00000478 21r01r00 [10] 951 ld hl, #_fs_buf + 0000047B CDr27r01 [17] 952 call _esp_send_dma + 953 ;src/main.c:178: offs += s; + 0000047E DD 5E F1 [19] 954 ld e, -15 (ix) + 00000481 DD 56 F2 [19] 955 ld d, -14 (ix) + 00000484 DD 6E FC [19] 956 ld l, -4 (ix) + 00000487 DD 66 FD [19] 957 ld h, -3 (ix) + 0000048A 19 [11] 958 add hl, de + 0000048B DD 75 FC [19] 959 ld -4 (ix), l + 0000048E DD 74 FD [19] 960 ld -3 (ix), h + 00000491 DD 7E FE [19] 961 ld a, -2 (ix) + 00000494 DD 8E F3 [19] 962 adc a, -13 (ix) + 00000497 DD 77 FE [19] 963 ld -2 (ix), a + 0000049A 30 03 [12] 964 jr nc, 00197$ + 0000049C DD 34 FF [23] 965 inc -1 (ix) + 0000049F 966 00197$: + 967 ;src/main.c:179: sz -= s; + 0000049F DD 7E F8 [19] 968 ld a, -8 (ix) + 000004A2 DD 96 F1 [19] 969 sub a, -15 (ix) + 000004A5 DD 77 F8 [19] 970 ld -8 (ix), a + 000004A8 DD 7E F9 [19] 971 ld a, -7 (ix) + 000004AB DD 9E F2 [19] 972 sbc a, -14 (ix) + 000004AE DD 77 F9 [19] 973 ld -7 (ix), a + 000004B1 DD 7E FA [19] 974 ld a, -6 (ix) + 000004B4 DD 9E F3 [19] 975 sbc a, -13 (ix) + 000004B7 DD 77 FA [19] 976 ld -6 (ix), a + 000004BA DD 7E FB [19] 977 ld a, -5 (ix) + 000004BD DD 9E F4 [19] 978 sbc a, -12 (ix) + 000004C0 DD 77 FB [19] 979 ld -5 (ix), a + 000004C3 C3rAAr03 [10] 980 jp 00107$ + 000004C6 981 00109$: + 982 ;src/main.c:182: if (file_ext == EXT_XMZ) + 000004C6 3Ar07r10 [13] 983 ld a, (_file_ext) + 000004C9 3D [ 4] 984 dec a + 000004CA 20 3D [12] 985 jr nz, 00113$ + 986 ;src/main.c:187: esp_wr_reg8(ESP_REG_OBJ_HANDLE, xm_handle); + 000004CC 3Ar31r10 [13] 987 ld a, (_xm_handle) + 000004CF 6F [ 4] 988 ld l, a + 000004D0 3E 0B [ 7] 989 ld a, #0x0b + 000004D2 CDrD1r00 [17] 990 call _esp_wr_reg8 + 991 ;src/main.c:188: esp_wr_reg8(ESP_REG_OBJ_TYPE, OBJ_TYPE_XM); + 000004D5 2E 05 [ 7] 992 ld l, #0x05 + 000004D7 3E 02 [ 7] 993 ld a, #0x02 + 000004D9 CDrD1r00 [17] 994 call _esp_wr_reg8 + 995 ;src/main.c:189: esp_wr_reg32(ESP_REG_DATA_SIZE, filesize); + 000004DC 2Ar05r10 [16] 996 ld hl, (_filesize + 2) + 000004DF E5 [11] 997 push hl + 000004E0 2Ar03r10 [16] 998 ld hl, (_filesize) + 000004E3 E5 [11] 999 push hl + 000004E4 3E 03 [ 7] 1000 ld a, #0x03 + 000004E6 CDrE8r00 [17] 1001 call _esp_wr_reg32 + 1002 ;src/main.c:190: esp_cmd(ESP_CMD_UNZIP); + 000004E9 3E F2 [ 7] 1003 ld a, #0xf2 + 000004EB CDr05r00 [17] 1004 call _esp_cmd + 1005 ;src/main.c:191: esp_wait_busy(10000); + 000004EE 11 10 27 [10] 1006 ld de, #0x2710 + 000004F1 21 00 00 [10] 1007 ld hl, #0x0000 + 000004F4 CDrD5r01 [17] 1008 call _esp_wait_busy + 1009 ;src/main.c:193: last_esp_status = esp_rd_reg8(ESP_REG_STATUS); + 000004F7 3E 01 [ 7] 1010 ld a, #0x01 + 000004F9 CDr1Er00 [17] 1011 call _esp_rd_reg8 + 000004FC 32r09r10 [13] 1012 ld (#_last_esp_status), a + 1013 ;src/main.c:194: if (last_esp_status != ESP_ST_READY) + 000004FF 3Ar09r10 [13] 1014 ld a, (_last_esp_status) + 00000502 3D [ 4] 1015 dec a + 00000503 28 04 [12] 1016 jr z, 00113$ + 1017 ;src/main.c:195: return false; + 00000505 AF [ 4] 1018 xor a, a + 00000506 C3r39r05 [10] 1019 jp 00116$ + 00000509 1020 00113$: + 1021 ;src/main.c:198: esp_cmd(ESP_CMD_TRACK_INIT); + 00000509 3E A0 [ 7] 1022 ld a, #0xa0 + 0000050B CDr05r00 [17] 1023 call _esp_cmd + 1024 ;src/main.c:199: esp_wait_busy(10000); + 0000050E 11 10 27 [10] 1025 ld de, #0x2710 + 00000511 21 00 00 [10] 1026 ld hl, #0x0000 + 00000514 CDrD5r01 [17] 1027 call _esp_wait_busy + 1028 ;src/main.c:201: last_esp_status = esp_rd_reg8(ESP_REG_STATUS); + 00000517 3E 01 [ 7] 1029 ld a, #0x01 + 00000519 CDr1Er00 [17] 1030 call _esp_rd_reg8 + 0000051C 32r09r10 [13] 1031 ld (#_last_esp_status), a + 1032 ;src/main.c:202: if (last_esp_status != ESP_ST_READY) + 0000051F 3Ar09r10 [13] 1033 ld a, (_last_esp_status) + 00000522 3D [ 4] 1034 dec a + 00000523 28 04 [12] 1035 jr z, 00115$ + 1036 ;src/main.c:203: return false; + 00000525 AF [ 4] 1037 xor a, a + 00000526 C3r39r05 [10] 1038 jp 00116$ + 00000529 1039 00115$: + 1040 ;src/main.c:205: esp_cmd(ESP_CMD_TRACK_PLAY); + 00000529 3E A1 [ 7] 1041 ld a, #0xa1 + 0000052B CDr05r00 [17] 1042 call _esp_cmd + 1043 ;src/main.c:206: esp_wait_busy(10000); + 0000052E 11 10 27 [10] 1044 ld de, #0x2710 + 00000531 21 00 00 [10] 1045 ld hl, #0x0000 + 00000534 CDrD5r01 [17] 1046 call _esp_wait_busy + 1047 ;src/main.c:208: return true; + 00000537 3E 01 [ 7] 1048 ld a, #0x01 + 00000539 1049 00116$: + 1050 ;src/main.c:209: } + 00000539 DD F9 [10] 1051 ld sp, ix + 0000053B DD E1 [14] 1052 pop ix + 0000053D C9 [10] 1053 ret + 1054 ;src/main.c:212: void wait_esc_key() + 1055 ; --------------------------------- + 1056 ; Function wait_esc_key + 1057 ; --------------------------------- + 0000053E 1058 _wait_esc_key:: + 1059 ;src/main.c:214: while (1) + 0000053E 1060 00104$: + 1061 ;src/main.c:218: __endasm; + 0000053E 76 [ 4] 1062 halt + 1063 ;src/main.c:220: if (wc_key_esc()) + 0000053F CDr00r00 [17] 1064 call _wc_key_esc + 00000542 B7 [ 4] 1065 or a, a + 00000543 28 F9 [12] 1066 jr z, 00104$ + 1067 ;src/main.c:221: break; + 1068 ;src/main.c:223: } + 00000545 C9 [10] 1069 ret + 1070 ;src/main.c:225: void wait_frames(u8 n) + 1071 ; --------------------------------- + 1072 ; Function wait_frames + 1073 ; --------------------------------- + 00000546 1074 _wait_frames:: + 00000546 4F [ 4] 1075 ld c, a + 1076 ;src/main.c:227: while (n--) + 00000547 1077 00101$: + 00000547 79 [ 4] 1078 ld a, c + 00000548 0D [ 4] 1079 dec c + 00000549 B7 [ 4] 1080 or a, a + 0000054A C8 [11] 1081 ret z + 1082 ;src/main.c:231: __endasm; + 0000054B 76 [ 4] 1083 halt + 1084 ;src/main.c:233: } + 0000054C C3r47r05 [10] 1085 jp 00101$ + 1086 ;src/main.c:235: void about() + 1087 ; --------------------------------- + 1088 ; Function about + 1089 ; --------------------------------- + 0000054F 1090 _about:: + 1091 ;src/main.c:237: wc_prwow(&win_about); + 0000054F 21r7Ar02 [10] 1092 ld hl, #_win_about + 00000552 CDr00r00 [17] 1093 call _wc_prwow + 1094 ;src/main.c:238: wait_esc_key(); + 00000555 CDr3Er05 [17] 1095 call _wait_esc_key + 1096 ;src/main.c:239: wc_rresb(&win_about); + 00000558 21r7Ar02 [10] 1097 ld hl, #_win_about + 0000055B CDr00r00 [17] 1098 call _wc_rresb + 1099 ;src/main.c:240: wc_exit(WC_EXIT); + 0000055E AF [ 4] 1100 xor a, a + 1101 ;src/main.c:241: } + 0000055F C3r00r00 [10] 1102 jp _wc_exit + 1103 ;src/main.c:243: void error_esp() + 1104 ; --------------------------------- + 1105 ; Function error_esp + 1106 ; --------------------------------- + 00000562 1107 _error_esp:: + 1108 ;src/main.c:245: wc_prwow(&err_no_esp); + 00000562 21r32r02 [10] 1109 ld hl, #_err_no_esp + 00000565 CDr00r00 [17] 1110 call _wc_prwow + 1111 ;src/main.c:246: wait_esc_key(); + 00000568 CDr3Er05 [17] 1112 call _wait_esc_key + 1113 ;src/main.c:247: wc_rresb(&err_no_esp); + 0000056B 21r32r02 [10] 1114 ld hl, #_err_no_esp + 0000056E CDr00r00 [17] 1115 call _wc_rresb + 1116 ;src/main.c:248: wc_exit(WC_EXIT); + 00000571 AF [ 4] 1117 xor a, a + 1118 ;src/main.c:249: } + 00000572 C3r00r00 [10] 1119 jp _wc_exit + 1120 ;src/main.c:251: void error_oom() + 1121 ; --------------------------------- + 1122 ; Function error_oom + 1123 ; --------------------------------- + 00000575 1124 _error_oom:: + 1125 ;src/main.c:253: wc_prwow(&err_out_of_mem); + 00000575 21r44r02 [10] 1126 ld hl, #_err_out_of_mem + 00000578 CDr00r00 [17] 1127 call _wc_prwow + 1128 ;src/main.c:254: wait_frames(50); // show the error for ~1 second (50Hz), then auto-advance + 0000057B 3E 32 [ 7] 1129 ld a, #0x32 + 0000057D CDr46r05 [17] 1130 call _wait_frames + 1131 ;src/main.c:255: wc_rresb(&err_out_of_mem); + 00000580 21r44r02 [10] 1132 ld hl, #_err_out_of_mem + 00000583 CDr00r00 [17] 1133 call _wc_rresb + 1134 ;src/main.c:256: wc_exit(WC_NEXT_FILE); + 00000586 3E 02 [ 7] 1135 ld a, #0x02 + 1136 ;src/main.c:257: } + 00000588 C3r00r00 [10] 1137 jp _wc_exit + 1138 ;src/main.c:259: void error_playback() + 1139 ; --------------------------------- + 1140 ; Function error_playback + 1141 ; --------------------------------- + 0000058B 1142 _error_playback:: + 1143 ;src/main.c:261: wc_prwow(&err_playback); + 0000058B 21r56r02 [10] 1144 ld hl, #_err_playback + 0000058E CDr00r00 [17] 1145 call _wc_prwow + 1146 ;src/main.c:262: wait_frames(50); // show the error for ~1 second (50Hz), then auto-advance + 00000591 3E 32 [ 7] 1147 ld a, #0x32 + 00000593 CDr46r05 [17] 1148 call _wait_frames + 1149 ;src/main.c:263: wc_rresb(&err_playback); + 00000596 21r56r02 [10] 1150 ld hl, #_err_playback + 00000599 CDr00r00 [17] 1151 call _wc_rresb + 1152 ;src/main.c:264: wc_exit(WC_NEXT_FILE); + 0000059C 3E 02 [ 7] 1153 ld a, #0x02 + 1154 ;src/main.c:265: } + 0000059E C3r00r00 [10] 1155 jp _wc_exit + 1156 ;src/main.c:272: void copy_file_name() + 1157 ; --------------------------------- + 1158 ; Function copy_file_name + 1159 ; --------------------------------- + 000005A1 1160 _copy_file_name:: + 1161 ;src/main.c:274: u8 *src = (u8*)p_file_name; + 000005A1 ED 4Br0Ar10 [20] 1162 ld bc, (_p_file_name) + 1163 ;src/main.c:277: while (src[i] && i < sizeof(file_name) - 1) + 000005A5 1E 00 [ 7] 1164 ld e, #0x00 + 000005A7 1165 00102$: + 000005A7 6B [ 4] 1166 ld l, e + 000005A8 26 00 [ 7] 1167 ld h, #0x00 + 000005AA 09 [11] 1168 add hl, bc + 000005AB 56 [ 7] 1169 ld d, (hl) + 1170 ;src/main.c:279: file_name[i] = src[i]; + 000005AC 3Er0C [ 7] 1171 ld a, #<(_file_name) + 000005AE 83 [ 4] 1172 add a, e + 000005AF 6F [ 4] 1173 ld l, a + 000005B0 3Es10 [ 7] 1174 ld a, #>(_file_name) + 000005B2 CE 00 [ 7] 1175 adc a, #0x00 + 000005B4 67 [ 4] 1176 ld h, a + 1177 ;src/main.c:277: while (src[i] && i < sizeof(file_name) - 1) + 000005B5 7A [ 4] 1178 ld a, d + 000005B6 B7 [ 4] 1179 or a, a + 000005B7 28 0A [12] 1180 jr z, 00104$ + 000005B9 7B [ 4] 1181 ld a, e + 000005BA D6 20 [ 7] 1182 sub a, #0x20 + 000005BC 30 05 [12] 1183 jr nc, 00104$ + 1184 ;src/main.c:279: file_name[i] = src[i]; + 000005BE 72 [ 7] 1185 ld (hl), d + 1186 ;src/main.c:280: i++; + 000005BF 1C [ 4] 1187 inc e + 000005C0 C3rA7r05 [10] 1188 jp 00102$ + 000005C3 1189 00104$: + 1190 ;src/main.c:282: file_name[i] = 0; + 000005C3 36 00 [10] 1191 ld (hl), #0x00 + 1192 ;src/main.c:283: } + 000005C5 C9 [10] 1193 ret + 1194 ;src/main.c:291: void xm_draw_static_labels() + 1195 ; --------------------------------- + 1196 ; Function xm_draw_static_labels + 1197 ; --------------------------------- + 000005C6 1198 _xm_draw_static_labels:: + 1199 ;src/main.c:293: wc_prsrw_attr(&win_xm, "File:", ROW_FILE, 1, 5, ATTR_CAPTION); + 000005C6 3E 45 [ 7] 1200 ld a, #0x45 + 000005C8 F5 [11] 1201 push af + 000005C9 33 [ 6] 1202 inc sp + 000005CA 21 05 00 [10] 1203 ld hl, #0x0005 + 000005CD E5 [11] 1204 push hl + 000005CE 21 01 01 [10] 1205 ld hl, #0x101 + 000005D1 E5 [11] 1206 push hl + 000005D2 11rF0r05 [10] 1207 ld de, #___str_9 + 000005D5 21r68r02 [10] 1208 ld hl, #_win_xm + 000005D8 CDr00r00 [17] 1209 call _wc_prsrw_attr + 1210 ;src/main.c:294: wc_prsrw(&win_xm, file_name, ROW_FILE, 7, strlen(file_name)); + 000005DB 21r0Cr10 [10] 1211 ld hl, #_file_name + 000005DE CDr00r00 [17] 1212 call _strlen + 000005E1 D5 [11] 1213 push de + 000005E2 21 01 07 [10] 1214 ld hl, #0x701 + 000005E5 E5 [11] 1215 push hl + 000005E6 11r0Cr10 [10] 1216 ld de, #_file_name + 000005E9 21r68r02 [10] 1217 ld hl, #_win_xm + 000005EC CDr00r00 [17] 1218 call _wc_prsrw + 1219 ;src/main.c:295: } + 000005EF C9 [10] 1220 ret + 000005F0 1221 ___str_9: + 000005F0 46 69 6C 65 3A 1222 .ascii "File:" + 000005F5 00 1223 .db 0x00 + 1224 ;src/main.c:304: void put_hex2(char *dst, u8 val) + 1225 ; --------------------------------- + 1226 ; Function put_hex2 + 1227 ; --------------------------------- + 000005F6 1228 _put_hex2:: + 000005F6 DD E5 [15] 1229 push ix + 000005F8 DD 21 00 00 [14] 1230 ld ix, #0 + 000005FC DD 39 [15] 1231 add ix, sp + 000005FE EB [ 4] 1232 ex de, hl + 1233 ;src/main.c:307: dst[0] = hexch[(val >> 4) & 0xF]; + 000005FF 01r22r06 [10] 1234 ld bc, #_put_hex2_hexch_10000_105+0 + 00000602 DD 7E 04 [19] 1235 ld a, 4 (ix) + 00000605 07 [ 4] 1236 rlca + 00000606 07 [ 4] 1237 rlca + 00000607 07 [ 4] 1238 rlca + 00000608 07 [ 4] 1239 rlca + 00000609 E6 0F [ 7] 1240 and a, #0xf + 0000060B 6F [ 4] 1241 ld l, a + 0000060C 26 00 [ 7] 1242 ld h, #0x00 + 0000060E 09 [11] 1243 add hl, bc + 0000060F 7E [ 7] 1244 ld a, (hl) + 00000610 12 [ 7] 1245 ld (de), a + 1246 ;src/main.c:308: dst[1] = hexch[val & 0xF]; + 00000611 13 [ 6] 1247 inc de + 00000612 DD 7E 04 [19] 1248 ld a, 4 (ix) + 00000615 E6 0F [ 7] 1249 and a, #0x0f + 00000617 6F [ 4] 1250 ld l, a + 00000618 26 00 [ 7] 1251 ld h, #0x00 + 0000061A 09 [11] 1252 add hl, bc + 0000061B 7E [ 7] 1253 ld a, (hl) + 0000061C 12 [ 7] 1254 ld (de), a + 1255 ;src/main.c:309: } + 0000061D DD E1 [14] 1256 pop ix + 0000061F E1 [10] 1257 pop hl + 00000620 33 [ 6] 1258 inc sp + 00000621 E9 [ 4] 1259 jp (hl) + 00000622 1260 _put_hex2_hexch_10000_105: + 00000622 30 31 32 33 34 35 36 1261 .ascii "0123456789ABCDEF" + 37 38 39 41 42 43 44 + 45 46 + 00000632 00 1262 .db 0x00 + 1263 ;src/main.c:311: void put_dec3(char *dst, u16 val) + 1264 ; --------------------------------- + 1265 ; Function put_dec3 + 1266 ; --------------------------------- + 00000633 1267 _put_dec3:: + 00000633 DD E5 [15] 1268 push ix + 00000635 DD 21 00 00 [14] 1269 ld ix, #0 + 00000639 DD 39 [15] 1270 add ix, sp + 0000063B F5 [11] 1271 push af + 0000063C 4D [ 4] 1272 ld c, l + 0000063D 44 [ 4] 1273 ld b, h + 1274 ;src/main.c:313: dst[0] = '0' + (val / 100) % 10; + 0000063E E1 [10] 1275 pop hl + 0000063F D5 [11] 1276 push de + 00000640 C5 [11] 1277 push bc + 00000641 11 64 00 [10] 1278 ld de, #0x0064 + 00000644 DD 6E FE [19] 1279 ld l, -2 (ix) + 00000647 DD 66 FF [19] 1280 ld h, -1 (ix) + 0000064A CDr00r00 [17] 1281 call __divuint + 0000064D EB [ 4] 1282 ex de, hl + 0000064E 11 0A 00 [10] 1283 ld de, #0x000a + 00000651 CDr00r00 [17] 1284 call __moduint + 00000654 C1 [10] 1285 pop bc + 00000655 7B [ 4] 1286 ld a, e + 00000656 C6 30 [ 7] 1287 add a, #0x30 + 00000658 02 [ 7] 1288 ld (bc), a + 1289 ;src/main.c:314: dst[1] = '0' + (val / 10) % 10; + 00000659 69 [ 4] 1290 ld l, c + 0000065A 60 [ 4] 1291 ld h, b + 0000065B 23 [ 6] 1292 inc hl + 0000065C E5 [11] 1293 push hl + 0000065D C5 [11] 1294 push bc + 0000065E 11 0A 00 [10] 1295 ld de, #0x000a + 00000661 DD 6E FE [19] 1296 ld l, -2 (ix) + 00000664 DD 66 FF [19] 1297 ld h, -1 (ix) + 00000667 CDr00r00 [17] 1298 call __divuint + 0000066A EB [ 4] 1299 ex de, hl + 0000066B 11 0A 00 [10] 1300 ld de, #0x000a + 0000066E CDr00r00 [17] 1301 call __moduint + 00000671 C1 [10] 1302 pop bc + 00000672 E1 [10] 1303 pop hl + 00000673 7B [ 4] 1304 ld a, e + 00000674 C6 30 [ 7] 1305 add a, #0x30 + 00000676 77 [ 7] 1306 ld (hl), a + 1307 ;src/main.c:315: dst[2] = '0' + val % 10; + 00000677 03 [ 6] 1308 inc bc + 00000678 03 [ 6] 1309 inc bc + 00000679 C5 [11] 1310 push bc + 0000067A 11 0A 00 [10] 1311 ld de, #0x000a + 0000067D DD 6E FE [19] 1312 ld l, -2 (ix) + 00000680 DD 66 FF [19] 1313 ld h, -1 (ix) + 00000683 CDr00r00 [17] 1314 call __moduint + 00000686 C1 [10] 1315 pop bc + 00000687 7B [ 4] 1316 ld a, e + 00000688 C6 30 [ 7] 1317 add a, #0x30 + 0000068A 02 [ 7] 1318 ld (bc), a + 1319 ;src/main.c:316: } + 0000068B DD F9 [10] 1320 ld sp, ix + 0000068D DD E1 [14] 1321 pop ix + 0000068F C9 [10] 1322 ret + 1323 ;src/main.c:318: void put_time(char *dst, u32 sec) + 1324 ; --------------------------------- + 1325 ; Function put_time + 1326 ; --------------------------------- + 00000690 1327 _put_time:: + 00000690 DD E5 [15] 1328 push ix + 00000692 DD 21 00 00 [14] 1329 ld ix, #0 + 00000696 DD 39 [15] 1330 add ix, sp + 00000698 E5 [11] 1331 push hl + 1332 ;src/main.c:320: u8 m = (sec / 60) % 100; + 00000699 21 00 00 [10] 1333 ld hl, #0x0000 + 0000069C E5 [11] 1334 push hl + 0000069D 2E 3C [ 7] 1335 ld l, #0x3c + 0000069F E5 [11] 1336 push hl + 000006A0 DD 5E 04 [19] 1337 ld e, 4 (ix) + 000006A3 DD 56 05 [19] 1338 ld d, 5 (ix) + 000006A6 DD 6E 06 [19] 1339 ld l, 6 (ix) + 000006A9 DD 66 07 [19] 1340 ld h, 7 (ix) + 000006AC CDr00r00 [17] 1341 call __divulong + 000006AF F1 [10] 1342 pop af + 000006B0 F1 [10] 1343 pop af + 000006B1 01 00 00 [10] 1344 ld bc, #0x0000 + 000006B4 C5 [11] 1345 push bc + 000006B5 0E 64 [ 7] 1346 ld c, #0x64 + 000006B7 C5 [11] 1347 push bc + 000006B8 CDr00r00 [17] 1348 call __modulong + 000006BB F1 [10] 1349 pop af + 000006BC F1 [10] 1350 pop af + 000006BD 4B [ 4] 1351 ld c, e + 1352 ;src/main.c:321: u8 s = sec % 60; + 000006BE C5 [11] 1353 push bc + 000006BF 21 00 00 [10] 1354 ld hl, #0x0000 + 000006C2 E5 [11] 1355 push hl + 000006C3 2E 3C [ 7] 1356 ld l, #0x3c + 000006C5 E5 [11] 1357 push hl + 000006C6 DD 5E 04 [19] 1358 ld e, 4 (ix) + 000006C9 DD 56 05 [19] 1359 ld d, 5 (ix) + 000006CC DD 6E 06 [19] 1360 ld l, 6 (ix) + 000006CF DD 66 07 [19] 1361 ld h, 7 (ix) + 000006D2 CDr00r00 [17] 1362 call __modulong + 000006D5 F1 [10] 1363 pop af + 000006D6 F1 [10] 1364 pop af + 000006D7 C1 [10] 1365 pop bc + 1366 ;src/main.c:323: dst[0] = '0' + (m / 10) % 10; + 000006D8 51 [ 4] 1367 ld d, c + 000006D9 D5 [11] 1368 push de + 000006DA 2E 0A [ 7] 1369 ld l, #0x0a + 000006DC 7A [ 4] 1370 ld a, d + 000006DD CDr00r00 [17] 1371 call __divuchar + 000006E0 7B [ 4] 1372 ld a, e + 000006E1 2E 0A [ 7] 1373 ld l, #0x0a + 000006E3 CDr00r00 [17] 1374 call __moduchar + 000006E6 7B [ 4] 1375 ld a, e + 000006E7 D1 [10] 1376 pop de + 000006E8 C6 30 [ 7] 1377 add a, #0x30 + 000006EA E1 [10] 1378 pop hl + 000006EB E5 [11] 1379 push hl + 000006EC 77 [ 7] 1380 ld (hl), a + 1381 ;src/main.c:324: dst[1] = '0' + m % 10; + 000006ED C1 [10] 1382 pop bc + 000006EE C5 [11] 1383 push bc + 000006EF 03 [ 6] 1384 inc bc + 000006F0 C5 [11] 1385 push bc + 000006F1 D5 [11] 1386 push de + 000006F2 2E 0A [ 7] 1387 ld l, #0x0a + 000006F4 7A [ 4] 1388 ld a, d + 000006F5 CDr00r00 [17] 1389 call __moduchar + 000006F8 7B [ 4] 1390 ld a, e + 000006F9 D1 [10] 1391 pop de + 000006FA C1 [10] 1392 pop bc + 000006FB C6 30 [ 7] 1393 add a, #0x30 + 000006FD 02 [ 7] 1394 ld (bc), a + 1395 ;src/main.c:325: dst[2] = ':'; + 000006FE E1 [10] 1396 pop hl + 000006FF E5 [11] 1397 push hl + 00000700 23 [ 6] 1398 inc hl + 00000701 23 [ 6] 1399 inc hl + 00000702 36 3A [10] 1400 ld (hl), #0x3a + 1401 ;src/main.c:326: dst[3] = '0' + (s / 10) % 10; + 00000704 C1 [10] 1402 pop bc + 00000705 C5 [11] 1403 push bc + 00000706 03 [ 6] 1404 inc bc + 00000707 03 [ 6] 1405 inc bc + 00000708 03 [ 6] 1406 inc bc + 00000709 C5 [11] 1407 push bc + 0000070A D5 [11] 1408 push de + 0000070B 2E 0A [ 7] 1409 ld l, #0x0a + 0000070D 7B [ 4] 1410 ld a, e + 0000070E CDr00r00 [17] 1411 call __divuchar + 00000711 7B [ 4] 1412 ld a, e + 00000712 2E 0A [ 7] 1413 ld l, #0x0a + 00000714 CDr00r00 [17] 1414 call __moduchar + 00000717 7B [ 4] 1415 ld a, e + 00000718 D1 [10] 1416 pop de + 00000719 C1 [10] 1417 pop bc + 0000071A C6 30 [ 7] 1418 add a, #0x30 + 0000071C 02 [ 7] 1419 ld (bc), a + 1420 ;src/main.c:327: dst[4] = '0' + s % 10; + 0000071D DD 7E FE [19] 1421 ld a, -2 (ix) + 00000720 C6 04 [ 7] 1422 add a, #0x04 + 00000722 4F [ 4] 1423 ld c, a + 00000723 DD 7E FF [19] 1424 ld a, -1 (ix) + 00000726 CE 00 [ 7] 1425 adc a, #0x00 + 00000728 47 [ 4] 1426 ld b, a + 00000729 C5 [11] 1427 push bc + 0000072A 2E 0A [ 7] 1428 ld l, #0x0a + 0000072C 7B [ 4] 1429 ld a, e + 0000072D CDr00r00 [17] 1430 call __moduchar + 00000730 7B [ 4] 1431 ld a, e + 00000731 C1 [10] 1432 pop bc + 00000732 C6 30 [ 7] 1433 add a, #0x30 + 00000734 02 [ 7] 1434 ld (bc), a + 1435 ;src/main.c:328: } + 00000735 DD F9 [10] 1436 ld sp, ix + 00000737 DD E1 [14] 1437 pop ix + 00000739 E1 [10] 1438 pop hl + 0000073A F1 [10] 1439 pop af + 0000073B F1 [10] 1440 pop af + 0000073C E9 [ 4] 1441 jp (hl) + 1442 ;src/main.c:330: void xm_draw_stats_labels() + 1443 ; --------------------------------- + 1444 ; Function xm_draw_stats_labels + 1445 ; --------------------------------- + 0000073D 1446 _xm_draw_stats_labels:: + 1447 ;src/main.c:332: wc_prsrw(&win_xm, "Pattern:#", ROW_STATS, 1, 9); + 0000073D 21 09 00 [10] 1448 ld hl, #0x0009 + 00000740 E5 [11] 1449 push hl + 00000741 21 03 01 [10] 1450 ld hl, #0x103 + 00000744 E5 [11] 1451 push hl + 00000745 11r93r07 [10] 1452 ld de, #___str_11 + 00000748 21r68r02 [10] 1453 ld hl, #_win_xm + 0000074B CDr00r00 [17] 1454 call _wc_prsrw + 1455 ;src/main.c:333: wc_prsrw(&win_xm, " Row:#", ROW_STATS, 12, 7); + 0000074E 21 07 00 [10] 1456 ld hl, #0x0007 + 00000751 E5 [11] 1457 push hl + 00000752 21 03 0C [10] 1458 ld hl, #0xc03 + 00000755 E5 [11] 1459 push hl + 00000756 11r9Dr07 [10] 1460 ld de, #___str_12 + 00000759 21r68r02 [10] 1461 ld hl, #_win_xm + 0000075C CDr00r00 [17] 1462 call _wc_prsrw + 1463 ;src/main.c:334: wc_prsrw(&win_xm, " BPM:", ROW_STATS, 21, 6); + 0000075F 21 06 00 [10] 1464 ld hl, #0x0006 + 00000762 E5 [11] 1465 push hl + 00000763 21 03 15 [10] 1466 ld hl, #0x1503 + 00000766 E5 [11] 1467 push hl + 00000767 11rA5r07 [10] 1468 ld de, #___str_13 + 0000076A 21r68r02 [10] 1469 ld hl, #_win_xm + 0000076D CDr00r00 [17] 1470 call _wc_prsrw + 1471 ;src/main.c:336: wc_prsrw(&win_xm, "Time:", ROW_TIME, 1, 5); + 00000770 21 05 00 [10] 1472 ld hl, #0x0005 + 00000773 E5 [11] 1473 push hl + 00000774 21 05 01 [10] 1474 ld hl, #0x105 + 00000777 E5 [11] 1475 push hl + 00000778 11rACr07 [10] 1476 ld de, #___str_14 + 0000077B 21r68r02 [10] 1477 ld hl, #_win_xm + 0000077E CDr00r00 [17] 1478 call _wc_prsrw + 1479 ;src/main.c:337: wc_prsrw(&win_xm, " / ", ROW_TIME, 12, 3); + 00000781 21 03 00 [10] 1480 ld hl, #0x0003 + 00000784 E5 [11] 1481 push hl + 00000785 21 05 0C [10] 1482 ld hl, #0xc05 + 00000788 E5 [11] 1483 push hl + 00000789 11rB2r07 [10] 1484 ld de, #___str_15 + 0000078C 21r68r02 [10] 1485 ld hl, #_win_xm + 0000078F CDr00r00 [17] 1486 call _wc_prsrw + 1487 ;src/main.c:338: } + 00000792 C9 [10] 1488 ret + 00000793 1489 ___str_11: + 00000793 50 61 74 74 65 72 6E 1490 .ascii "Pattern:#" + 3A 23 + 0000079C 00 1491 .db 0x00 + 0000079D 1492 ___str_12: + 0000079D 20 20 52 6F 77 3A 23 1493 .ascii " Row:#" + 000007A4 00 1494 .db 0x00 + 000007A5 1495 ___str_13: + 000007A5 20 20 42 50 4D 3A 1496 .ascii " BPM:" + 000007AB 00 1497 .db 0x00 + 000007AC 1498 ___str_14: + 000007AC 54 69 6D 65 3A 1499 .ascii "Time:" + 000007B1 00 1500 .db 0x00 + 000007B2 1501 ___str_15: + 000007B2 20 2F 20 1502 .ascii " / " + 000007B5 00 1503 .db 0x00 + 1504 ;src/main.c:353: void xm_update_info() + 1505 ; --------------------------------- + 1506 ; Function xm_update_info + 1507 ; --------------------------------- + 000007B6 1508 _xm_update_info:: + 000007B6 DD E5 [15] 1509 push ix + 000007B8 DD 21 00 00 [14] 1510 ld ix, #0 + 000007BC DD 39 [15] 1511 add ix, sp + 000007BE 21 F8 FF [10] 1512 ld hl, #-8 + 000007C1 39 [11] 1513 add hl, sp + 000007C2 F9 [ 6] 1514 ld sp, hl + 1515 ;src/main.c:359: esp_wr_reg8(ESP_REG_OBJ_HANDLE, xm_handle); + 000007C3 3Ar31r10 [13] 1516 ld a, (_xm_handle) + 000007C6 6F [ 4] 1517 ld l, a + 000007C7 3E 0B [ 7] 1518 ld a, #0x0b + 000007C9 CDrD1r00 [17] 1519 call _esp_wr_reg8 + 1520 ;src/main.c:360: esp_cmd(ESP_CMD_TRACK_GET_INFO); + 000007CC 3E A8 [ 7] 1521 ld a, #0xa8 + 000007CE CDr05r00 [17] 1522 call _esp_cmd + 1523 ;src/main.c:361: esp_wait_busy(2000); + 000007D1 11 D0 07 [10] 1524 ld de, #0x07d0 + 000007D4 21 00 00 [10] 1525 ld hl, #0x0000 + 000007D7 CDrD5r01 [17] 1526 call _esp_wait_busy + 1527 ;src/main.c:363: pattern = esp_rd_reg8(ESP_REG_TRACK_PATTERN); + 000007DA 3E 2B [ 7] 1528 ld a, #0x2b + 000007DC CDr1Er00 [17] 1529 call _esp_rd_reg8 + 000007DF DD 77 FA [19] 1530 ld -6 (ix), a + 1531 ;src/main.c:364: row = esp_rd_reg8(ESP_REG_TRACK_ROW); + 000007E2 3E 2C [ 7] 1532 ld a, #0x2c + 000007E4 CDr1Er00 [17] 1533 call _esp_rd_reg8 + 000007E7 DD 77 FB [19] 1534 ld -5 (ix), a + 1535 ;src/main.c:365: esp_rd_regs(ESP_REG_TRACK_BPM, &bpm, 2); + 000007EA 3E 02 [ 7] 1536 ld a, #0x02 + 000007EC F5 [11] 1537 push af + 000007ED 33 [ 6] 1538 inc sp + 000007EE 21 01 00 [10] 1539 ld hl, #1 + 000007F1 39 [11] 1540 add hl, sp + 000007F2 EB [ 4] 1541 ex de, hl + 000007F3 3E 31 [ 7] 1542 ld a, #0x31 + 000007F5 CDrA5r00 [17] 1543 call _esp_rd_regs + 1544 ;src/main.c:366: samples = esp_rd_reg32(ESP_REG_TRACK_SAMPLES); + 000007F8 3E 2D [ 7] 1545 ld a, #0x2d + 000007FA CDr37r00 [17] 1546 call _esp_rd_reg32 + 000007FD DD 73 FC [19] 1547 ld -4 (ix), e + 00000800 DD 72 FD [19] 1548 ld -3 (ix), d + 00000803 DD 75 FE [19] 1549 ld -2 (ix), l + 00000806 DD 74 FF [19] 1550 ld -1 (ix), h + 1551 ;src/main.c:368: if (!total_samples) + 00000809 3Ar30r10 [13] 1552 ld a, (_total_samples+3) + 0000080C FD 21r2Dr10 [14] 1553 ld iy, #_total_samples + 00000810 FD B6 02 [19] 1554 or a, 2 (iy) + 00000813 FD B6 01 [19] 1555 or a, 1 (iy) + 00000816 FD B6 00 [19] 1556 or a, 0 (iy) + 00000819 20 0C [12] 1557 jr nz, 00102$ + 1558 ;src/main.c:369: total_samples = esp_rd_reg32(ESP_REG_TRACK_TOTAL_SAMPLES); + 0000081B 3E 36 [ 7] 1559 ld a, #0x36 + 0000081D CDr37r00 [17] 1560 call _esp_rd_reg32 + 00000820 ED 53r2Dr10 [20] 1561 ld (_total_samples), de + 00000824 22r2Fr10 [16] 1562 ld (_total_samples + 2), hl + 00000827 1563 00102$: + 1564 ;src/main.c:371: put_hex2(hexbuf, pattern); + 00000827 DD 7E FA [19] 1565 ld a, -6 (ix) + 0000082A F5 [11] 1566 push af + 0000082B 33 [ 6] 1567 inc sp + 0000082C 21r32r10 [10] 1568 ld hl, #_hexbuf + 0000082F CDrF6r05 [17] 1569 call _put_hex2 + 1570 ;src/main.c:372: wc_prsrw(&win_xm, hexbuf, ROW_STATS, 10, 2); + 00000832 21 02 00 [10] 1571 ld hl, #0x0002 + 00000835 E5 [11] 1572 push hl + 00000836 21 03 0A [10] 1573 ld hl, #0xa03 + 00000839 E5 [11] 1574 push hl + 0000083A 11r32r10 [10] 1575 ld de, #_hexbuf + 0000083D 21r68r02 [10] 1576 ld hl, #_win_xm + 00000840 CDr00r00 [17] 1577 call _wc_prsrw + 1578 ;src/main.c:374: put_hex2(hexbuf, row); + 00000843 DD 7E FB [19] 1579 ld a, -5 (ix) + 00000846 F5 [11] 1580 push af + 00000847 33 [ 6] 1581 inc sp + 00000848 21r32r10 [10] 1582 ld hl, #_hexbuf + 0000084B CDrF6r05 [17] 1583 call _put_hex2 + 1584 ;src/main.c:375: wc_prsrw(&win_xm, hexbuf, ROW_STATS, 19, 2); + 0000084E 21 02 00 [10] 1585 ld hl, #0x0002 + 00000851 E5 [11] 1586 push hl + 00000852 21 03 13 [10] 1587 ld hl, #0x1303 + 00000855 E5 [11] 1588 push hl + 00000856 11r32r10 [10] 1589 ld de, #_hexbuf + 00000859 21r68r02 [10] 1590 ld hl, #_win_xm + 0000085C CDr00r00 [17] 1591 call _wc_prsrw + 1592 ;src/main.c:377: put_dec3(decbuf, bpm); + 0000085F D1 [10] 1593 pop de + 00000860 D5 [11] 1594 push de + 00000861 21r34r10 [10] 1595 ld hl, #_decbuf + 00000864 CDr33r06 [17] 1596 call _put_dec3 + 1597 ;src/main.c:378: wc_prsrw(&win_xm, decbuf, ROW_STATS, 27, 3); + 00000867 21 03 00 [10] 1598 ld hl, #0x0003 + 0000086A E5 [11] 1599 push hl + 0000086B 21 03 1B [10] 1600 ld hl, #0x1b03 + 0000086E E5 [11] 1601 push hl + 0000086F 11r34r10 [10] 1602 ld de, #_decbuf + 00000872 21r68r02 [10] 1603 ld hl, #_win_xm + 00000875 CDr00r00 [17] 1604 call _wc_prsrw + 1605 ;src/main.c:380: put_time(timebuf, samples / 44100UL); + 00000878 21 00 00 [10] 1606 ld hl, #0x0000 + 0000087B E5 [11] 1607 push hl + 0000087C 21 44 AC [10] 1608 ld hl, #0xac44 + 0000087F E5 [11] 1609 push hl + 00000880 DD 5E FC [19] 1610 ld e, -4 (ix) + 00000883 DD 56 FD [19] 1611 ld d, -3 (ix) + 00000886 DD 6E FE [19] 1612 ld l, -2 (ix) + 00000889 DD 66 FF [19] 1613 ld h, -1 (ix) + 0000088C CDr00r00 [17] 1614 call __divulong + 0000088F F1 [10] 1615 pop af + 00000890 E3 [19] 1616 ex (sp),hl + 00000891 D5 [11] 1617 push de + 00000892 21r37r10 [10] 1618 ld hl, #_timebuf + 00000895 CDr90r06 [17] 1619 call _put_time + 1620 ;src/main.c:381: wc_prsrw(&win_xm, timebuf, ROW_TIME, 7, 5); + 00000898 21 05 00 [10] 1621 ld hl, #0x0005 + 0000089B E5 [11] 1622 push hl + 0000089C 21 05 07 [10] 1623 ld hl, #0x705 + 0000089F E5 [11] 1624 push hl + 000008A0 11r37r10 [10] 1625 ld de, #_timebuf + 000008A3 21r68r02 [10] 1626 ld hl, #_win_xm + 000008A6 CDr00r00 [17] 1627 call _wc_prsrw + 1628 ;src/main.c:383: put_time(timebuf, total_samples / 44100UL); + 000008A9 21 00 00 [10] 1629 ld hl, #0x0000 + 000008AC E5 [11] 1630 push hl + 000008AD 21 44 AC [10] 1631 ld hl, #0xac44 + 000008B0 E5 [11] 1632 push hl + 000008B1 ED 5Br2Dr10 [20] 1633 ld de, (_total_samples) + 000008B5 2Ar2Fr10 [16] 1634 ld hl, (_total_samples + 2) + 000008B8 CDr00r00 [17] 1635 call __divulong + 000008BB F1 [10] 1636 pop af + 000008BC E3 [19] 1637 ex (sp),hl + 000008BD D5 [11] 1638 push de + 000008BE 21r37r10 [10] 1639 ld hl, #_timebuf + 000008C1 CDr90r06 [17] 1640 call _put_time + 1641 ;src/main.c:384: wc_prsrw(&win_xm, timebuf, ROW_TIME, 15, 5); + 000008C4 21 05 00 [10] 1642 ld hl, #0x0005 + 000008C7 E5 [11] 1643 push hl + 000008C8 21 05 0F [10] 1644 ld hl, #0xf05 + 000008CB E5 [11] 1645 push hl + 000008CC 11r37r10 [10] 1646 ld de, #_timebuf + 000008CF 21r68r02 [10] 1647 ld hl, #_win_xm + 000008D2 CDr00r00 [17] 1648 call _wc_prsrw + 1649 ;src/main.c:388: } + 000008D5 DD F9 [10] 1650 ld sp, ix + 000008D7 DD E1 [14] 1651 pop ix + 000008D9 C9 [10] 1652 ret + 1653 ;src/main.c:390: void main_start() + 1654 ; --------------------------------- + 1655 ; Function main_start + 1656 ; --------------------------------- + 000008DA 1657 _main_start:: + 1658 ;src/main.c:394: copy_file_name(); + 000008DA CDrA1r05 [17] 1659 call _copy_file_name + 1660 ;src/main.c:396: if (!state_esp) + 000008DD 3Ar00r00 [13] 1661 ld a, (_state_esp+0) + 000008E0 B7 [ 4] 1662 or a, a + 000008E1 20 0D [12] 1663 jr nz, 00102$ + 1664 ;src/main.c:397: state_esp = esp_init() ? 1 : 2; + 000008E3 CDr25r02 [17] 1665 call _esp_init + 000008E6 B7 [ 4] 1666 or a, a + 000008E7 3E 01 [ 7] 1667 ld a, #0x01 + 000008E9 20 02 [12] 1668 jr nz, 00122$ + 000008EB 3E 02 [ 7] 1669 ld a, #0x02 + 000008ED 1670 00122$: + 000008ED 32r00r00 [13] 1671 ld (#_state_esp), a + 000008F0 1672 00102$: + 1673 ;src/main.c:399: if (state_esp != 1) + 000008F0 3Ar00r00 [13] 1674 ld a, (_state_esp) + 1675 ;src/main.c:401: error_esp(); + 1676 ;src/main.c:402: return; + 1677 ;src/main.c:405: total_samples = 0; + 000008F3 3D [ 4] 1678 dec a + 000008F4 C2r62r05 [10] 1679 jp nz,_error_esp + 000008F7 32r2Dr10 [13] 1680 ld (_total_samples+0), a + 000008FA 32r2Er10 [13] 1681 ld (_total_samples+1), a + 000008FD 32r2Fr10 [13] 1682 ld (_total_samples+2), a + 00000900 32r30r10 [13] 1683 ld (_total_samples+3), a + 1684 ;src/main.c:407: if (!play_xm()) + 00000903 CDr29r03 [17] 1685 call _play_xm + 00000906 B7 [ 4] 1686 or a, a + 00000907 20 0B [12] 1687 jr nz, 00109$ + 1688 ;src/main.c:409: if (last_esp_status == ESP_ERR_OUT_OF_MEMORY) + 00000909 3Ar09r10 [13] 1689 ld a, (_last_esp_status) + 0000090C D6 99 [ 7] 1690 sub a, #0x99 + 0000090E CAr75r05 [10] 1691 jp z, _error_oom + 1692 ;src/main.c:410: error_oom(); + 1693 ;src/main.c:412: error_playback(); + 1694 ;src/main.c:413: return; + 00000911 C3r8Br05 [10] 1695 jp _error_playback + 00000914 1696 00109$: + 1697 ;src/main.c:419: wc_prwow(&win_xm); + 00000914 21r68r02 [10] 1698 ld hl, #_win_xm + 00000917 CDr00r00 [17] 1699 call _wc_prwow + 1700 ;src/main.c:420: xm_draw_static_labels(); + 0000091A CDrC6r05 [17] 1701 call _xm_draw_static_labels + 1702 ;src/main.c:421: xm_draw_stats_labels(); + 0000091D CDr3Dr07 [17] 1703 call _xm_draw_stats_labels + 1704 ;src/main.c:422: xm_update_info(); // single call for now - periodic re-calling is a separate step, once this is confirmed stable + 00000920 CDrB6r07 [17] 1705 call _xm_update_info + 1706 ;src/main.c:427: while (1) + 00000923 1707 00117$: + 1708 ;src/main.c:431: __endasm; + 00000923 76 [ 4] 1709 halt + 1710 ;src/main.c:442: if (wc_key_pgdn()) // PgDn - unload and go to next file + 00000924 CDr00r00 [17] 1711 call _wc_key_pgdn + 00000927 B7 [ 4] 1712 or a, a + 00000928 28 27 [12] 1713 jr z, 00111$ + 1714 ;src/main.c:444: esp_cmd(ESP_CMD_TRACK_STOP); + 0000092A 3E A2 [ 7] 1715 ld a, #0xa2 + 0000092C CDr05r00 [17] 1716 call _esp_cmd + 1717 ;src/main.c:445: esp_wait_busy(10000); + 0000092F 11 10 27 [10] 1718 ld de, #0x2710 + 00000932 21 00 00 [10] 1719 ld hl, #0x0000 + 00000935 CDrD5r01 [17] 1720 call _esp_wait_busy + 1721 ;src/main.c:446: esp_cmd(ESP_CMD_KILL_OBJECTS); + 00000938 3E E4 [ 7] 1722 ld a, #0xe4 + 0000093A CDr05r00 [17] 1723 call _esp_cmd + 1724 ;src/main.c:447: esp_wait_busy(10000); + 0000093D 11 10 27 [10] 1725 ld de, #0x2710 + 00000940 21 00 00 [10] 1726 ld hl, #0x0000 + 00000943 CDrD5r01 [17] 1727 call _esp_wait_busy + 1728 ;src/main.c:448: wc_rresb(&win_xm); + 00000946 21r68r02 [10] 1729 ld hl, #_win_xm + 00000949 CDr00r00 [17] 1730 call _wc_rresb + 1731 ;src/main.c:449: wc_exit(WC_NEXT_FILE); + 0000094C 3E 02 [ 7] 1732 ld a, #0x02 + 0000094E CDr00r00 [17] 1733 call _wc_exit + 00000951 1734 00111$: + 1735 ;src/main.c:452: if (wc_key_pgup()) // PgUp - unload and go to previous file + 00000951 CDr00r00 [17] 1736 call _wc_key_pgup + 00000954 B7 [ 4] 1737 or a, a + 00000955 28 27 [12] 1738 jr z, 00113$ + 1739 ;src/main.c:454: esp_cmd(ESP_CMD_TRACK_STOP); + 00000957 3E A2 [ 7] 1740 ld a, #0xa2 + 00000959 CDr05r00 [17] 1741 call _esp_cmd + 1742 ;src/main.c:455: esp_wait_busy(10000); + 0000095C 11 10 27 [10] 1743 ld de, #0x2710 + 0000095F 21 00 00 [10] 1744 ld hl, #0x0000 + 00000962 CDrD5r01 [17] 1745 call _esp_wait_busy + 1746 ;src/main.c:456: esp_cmd(ESP_CMD_KILL_OBJECTS); + 00000965 3E E4 [ 7] 1747 ld a, #0xe4 + 00000967 CDr05r00 [17] 1748 call _esp_cmd + 1749 ;src/main.c:457: esp_wait_busy(10000); + 0000096A 11 10 27 [10] 1750 ld de, #0x2710 + 0000096D 21 00 00 [10] 1751 ld hl, #0x0000 + 00000970 CDrD5r01 [17] 1752 call _esp_wait_busy + 1753 ;src/main.c:458: wc_rresb(&win_xm); + 00000973 21r68r02 [10] 1754 ld hl, #_win_xm + 00000976 CDr00r00 [17] 1755 call _wc_rresb + 1756 ;src/main.c:459: wc_exit(WC_PREV_FILE); + 00000979 3E 04 [ 7] 1757 ld a, #0x04 + 0000097B CDr00r00 [17] 1758 call _wc_exit + 0000097E 1759 00113$: + 1760 ;src/main.c:462: if (wc_key_esc()) // Esc - unload and exit + 0000097E CDr00r00 [17] 1761 call _wc_key_esc + 00000981 B7 [ 4] 1762 or a, a + 00000982 28 9F [12] 1763 jr z, 00117$ + 1764 ;src/main.c:464: esp_cmd(ESP_CMD_TRACK_STOP); + 00000984 3E A2 [ 7] 1765 ld a, #0xa2 + 00000986 CDr05r00 [17] 1766 call _esp_cmd + 1767 ;src/main.c:465: esp_wait_busy(10000); + 00000989 11 10 27 [10] 1768 ld de, #0x2710 + 0000098C 21 00 00 [10] 1769 ld hl, #0x0000 + 0000098F CDrD5r01 [17] 1770 call _esp_wait_busy + 1771 ;src/main.c:466: esp_cmd(ESP_CMD_KILL_OBJECTS); + 00000992 3E E4 [ 7] 1772 ld a, #0xe4 + 00000994 CDr05r00 [17] 1773 call _esp_cmd + 1774 ;src/main.c:467: esp_wait_busy(10000); + 00000997 11 10 27 [10] 1775 ld de, #0x2710 + 0000099A 21 00 00 [10] 1776 ld hl, #0x0000 + 0000099D CDrD5r01 [17] 1777 call _esp_wait_busy + 1778 ;src/main.c:468: wc_rresb(&win_xm); + 000009A0 21r68r02 [10] 1779 ld hl, #_win_xm + 000009A3 CDr00r00 [17] 1780 call _wc_rresb + 1781 ;src/main.c:469: wc_exit(WC_EXIT); + 000009A6 AF [ 4] 1782 xor a, a + 000009A7 CDr00r00 [17] 1783 call _wc_exit + 1784 ;src/main.c:472: } + 000009AA C3r23r09 [10] 1785 jp 00117$ + 1786 ;src/main.c:475: void main() + 1787 ; --------------------------------- + 1788 ; Function main + 1789 ; --------------------------------- + 000009AD 1790 _main:: + 1791 ;src/main.c:485: __endasm; + 000009AD ED 73r01r10 [20] 1792 ld (_ret_sp), sp + 000009B1 32r08r10 [13] 1793 ld (_call_type), a + 000009B4 ED 43r0Ar10 [20] 1794 ld (_p_file_name), bc + 000009B8 08 [ 4] 1795 ex af, af + 000009B9 32r07r10 [13] 1796 ld (_file_ext), a + 000009BC 22r03r10 [16] 1797 ld (_filesize), hl + 000009BF ED 53r05r10 [20] 1798 ld (_filesize + 2), de + 1799 ;src/main.c:487: switch (call_type) + 000009C3 3Ar08r10 [13] 1800 ld a, (_call_type+0) + 000009C6 B7 [ 4] 1801 or a, a + 000009C7 CArDAr08 [10] 1802 jp z, _main_start + 000009CA 3Ar08r10 [13] 1803 ld a, (_call_type) + 000009CD D6 03 [ 7] 1804 sub a, #0x03 + 000009CF CAr4Fr05 [10] 1805 jp z, _about + 1806 ;src/main.c:489: case WC_CALL_EXT: + 1807 ;src/main.c:490: main_start(); + 1808 ;src/main.c:491: break; + 1809 ;src/main.c:493: case WC_CALL_MENU: + 1810 ;src/main.c:494: about(); + 1811 ;src/main.c:495: break; + 1812 ;src/main.c:497: default: + 1813 ;src/main.c:498: wc_exit(WC_EXIT); + 000009D2 AF [ 4] 1814 xor a, a + 1815 ;src/main.c:499: } + 1816 ;src/main.c:500: } + 000009D3 C3r00r00 [10] 1817 jp _wc_exit + 1818 .area _CODE + 1819 .area _INITIALIZER + 1820 .area _CABS (ABS) diff --git a/obj/out.map b/obj/out.map new file mode 100644 index 0000000..df03d97 --- /dev/null +++ b/obj/out.map @@ -0,0 +1,173 @@ + ASxxxx Linker V05.50.4-SDLD, page 1. +Hexadecimal [32-Bits] + +Area Addr Size Decimal Bytes (Attributes) +-------------------------------- ---- ---- ------- ----- ------------ +. .ABS. 00000000 00000000 = 0. bytes (ABS,CON) + + Value Global Global Defined In Module + ----- -------------------------------- ------------------------ + 00000000 .__.ABS. wc_key_pgup + 00000000 l__BSEG + 00000000 l__BSS + 00000000 l__CABS + 00000000 l__DABS + 00000000 l__GSFINAL + 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 + 00000003 l__HEADER0 + 0000010A l__HOME + 00000AEC l__CODE + 0000103C 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 + + ASxxxx Linker V05.50.4-SDLD, page 2. +Hexadecimal [32-Bits] + +Area Addr Size Decimal Bytes (Attributes) +-------------------------------- ---- ---- ------- ----- ------------ +_CODE 00008003 00000AEC = 2796. 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 + + ASxxxx Linker V05.50.4-SDLD, page 3. +Hexadecimal [32-Bits] + +Area Addr Size Decimal Bytes (Attributes) +-------------------------------- ---- ---- ------- ----- ------------ +_DATA 0000A800 0000103C = 4156. 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 + + ASxxxx Linker V05.50.4-SDLD, page 4. +Hexadecimal [32-Bits] + +Area Addr Size Decimal Bytes (Attributes) +-------------------------------- ---- ---- ------- ----- ------------ +_HOME 0000B83C 0000010A = 266. bytes (REL,CON) + + Value Global Global Defined In Module + ----- -------------------------------- ------------------------ + 0000B83C __modulong _modulong + 0000B8C3 __divulong _divulong + + ASxxxx Linker V05.50.4-SDLD, page 5. +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. + +Files Linked [ module(s) ] + +obj/out.rel [ main ] +obj/crt0.rel [ crt0 ] + + +Libraries Linked [ object file ] + +E:\SDCC\4.6.0\bin\..\lib\z80/z80.lib [ divunsigned.rel ] +vgm_wc_api.lib [ wc_load512.rel ] +E:\SDCC\4.6.0\bin\..\lib\z80/z80.lib [ modunsigned.rel ] +vgm_wc_api.lib [ wc_prsrw.rel ] +vgm_wc_api.lib [ wc_prwow.rel ] +E:\SDCC\4.6.0\bin\..\lib\z80/z80.lib [ _modulong.rel ] +E:\SDCC\4.6.0\bin\..\lib\z80/z80.lib [ _divulong.rel ] +vgm_wc_api.lib [ wc_key_pgdn.rel ] +vgm_wc_api.lib [ wc_prsrw_attr.rel ] +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 ] + + ASxxxx Linker V05.50.4-SDLD, page 7. + +User Base Address Definitions + +_CODE = 0x8003 +_DATA = 0xa800 + + \ No newline at end of file diff --git a/obj/out.noi b/obj/out.noi new file mode 100644 index 0000000..94f7d7d --- /dev/null +++ b/obj/out.noi @@ -0,0 +1,93 @@ +DEF .__.ABS. 0x0 +DEF l__BSEG 0x0 +DEF l__BSS 0x0 +DEF l__CABS 0x0 +DEF l__DABS 0x0 +DEF l__GSFINAL 0x0 +DEF l__GSINIT 0x0 +DEF l__HEADER 0x0 +DEF l__HEAP 0x0 +DEF l__INITIALIZED 0x0 +DEF l__INITIALIZER 0x0 +DEF s__CABS 0x0 +DEF s__DABS 0x0 +DEF s__HEADER 0x0 +DEF s__HEADER0 0x0 +DEF l__HEADER0 0x3 +DEF l__HOME 0x10A +DEF l__CODE 0xAEC +DEF l__DATA 0x103C +DEF s__CODE 0x8003 +DEF s__DATA 0xA800 +DEF s__HOME 0xB83C +DEF s__INITIALIZED 0xB83C +DEF s__BSEG 0xB946 +DEF s__BSS 0xB946 +DEF s__GSFINAL 0xB946 +DEF s__GSINIT 0xB946 +DEF s__HEAP 0xB946 +DEF s__INITIALIZER 0xB946 +DEF _wc_exit 0x8003 +DEF _esp_cmd 0x8008 +DEF _esp_rd_reg8 0x8021 +DEF _esp_rd_reg32 0x803A +DEF _esp_rd_regs 0x80A8 +DEF _esp_wr_reg8 0x80D4 +DEF _esp_wr_reg32 0x80EB +DEF _esp_wr_end 0x811B +DEF _esp_send_dma 0x812A +DEF _esp_rd_end 0x818E +DEF _esp_wait_status 0x819D +DEF _esp_wait_busy 0x81D8 +DEF _esp_create_obj 0x81FA +DEF _esp_init 0x8228 +DEF _err_no_esp 0x8235 +DEF _err_out_of_mem 0x8247 +DEF _err_playback 0x8259 +DEF _win_xm 0x826B +DEF _win_about 0x827D +DEF _play_xm 0x832C +DEF _wait_esc_key 0x8541 +DEF _wait_frames 0x8549 +DEF _about 0x8552 +DEF _error_esp 0x8565 +DEF _error_oom 0x8578 +DEF _error_playback 0x858E +DEF _copy_file_name 0x85A4 +DEF _xm_draw_static_labels 0x85C9 +DEF _put_hex2 0x85F9 +DEF _put_dec3 0x8636 +DEF _put_time 0x8693 +DEF _xm_draw_stats_labels 0x8740 +DEF _xm_update_info 0x87B9 +DEF _main_start 0x88DD +DEF _main 0x89B0 +DEF __divuchar 0x89D9 +DEF __divu8 0x89DB +DEF __divu16 0x89DE +DEF __divuint 0x89DE +DEF _wc_load512 0x8A0D +DEF __moduchar 0x8A22 +DEF __moduint 0x8A29 +DEF _wc_prsrw 0x8A2E +DEF _wc_prwow 0x8A64 +DEF _wc_key_pgdn 0x8A71 +DEF _wc_prsrw_attr 0x8A7B +DEF _wc_rresb 0x8AC2 +DEF _strlen 0x8ACF +DEF _wc_key_esc 0x8ADB +DEF _wc_key_pgup 0x8AE5 +DEF _state_esp 0xA800 +DEF _fs_buf 0xA801 +DEF _ret_sp 0xB801 +DEF _filesize 0xB803 +DEF _file_ext 0xB807 +DEF _call_type 0xB808 +DEF _last_esp_status 0xB809 +DEF _p_file_name 0xB80A +DEF _file_name 0xB80C +DEF _total_samples 0xB82D +DEF _xm_handle 0xB831 +DEF __modulong 0xB83C +DEF __divulong 0xB8C3 +LOAD obj/out.ihx diff --git a/obj/out.rel b/obj/out.rel new file mode 100644 index 0000000..5c4803e --- /dev/null +++ b/obj/out.rel @@ -0,0 +1,795 @@ +XL4 +H 9 areas 3E global symbols +M main +O -mz80 sdcccall(1) +S __divuint Ref00000000 +S _wc_load512 Ref00000000 +S __moduchar Ref00000000 +S __divuchar Ref00000000 +S _wc_prsrw Ref00000000 +S _wc_prwow Ref00000000 +S .__.ABS. Def00000000 +S __modulong Ref00000000 +S __divulong Ref00000000 +S _wc_key_pgdn Ref00000000 +S _wc_prsrw_attr Ref00000000 +S _wc_rresb Ref00000000 +S _strlen Ref00000000 +S _wc_key_esc Ref00000000 +S _wc_key_pgup Ref00000000 +S __moduint Ref00000000 +A _CODE size 9D6 flags 0 addr 0 +S _esp_send_dma Def00000127 +S _esp_wr_reg8 Def000000D1 +S _main Def000009AD +S _esp_wr_end Def00000118 +S _put_time Def00000690 +S _xm_draw_static_labels Def000005C6 +S _err_no_esp Def00000232 +S _err_playback Def00000256 +S _put_hex2 Def000005F6 +S _main_start Def000008DA +S _wc_exit Def00000000 +S _esp_create_obj Def000001F7 +S _wait_esc_key Def0000053E +S _play_xm Def00000329 +S _copy_file_name Def000005A1 +S _esp_wait_busy Def000001D5 +S _esp_rd_reg32 Def00000037 +S _win_about Def0000027A +S _esp_rd_regs Def000000A5 +S _error_playback Def0000058B +S _error_esp Def00000562 +S _err_out_of_mem Def00000244 +S _win_xm Def00000268 +S _esp_rd_reg8 Def0000001E +S _esp_wr_reg32 Def000000E8 +S _wait_frames Def00000546 +S _xm_draw_stats_labels Def0000073D +S _xm_update_info Def000007B6 +S _esp_rd_end Def0000018B +S _error_oom Def00000575 +S _put_dec3 Def00000633 +S _esp_cmd Def00000005 +S _esp_init Def00000225 +S _about Def0000054F +S _esp_wait_status Def0000019A +A _DATA size 103C flags 0 addr 0 +S _p_file_name Def0000100A +S _xm_handle Def00001031 +S _fs_buf Def00000001 +S _total_samples Def0000102D +S _call_type Def00001008 +S _state_esp Def00000000 +S _ret_sp Def00001001 +S _file_ext Def00001007 +S _filesize Def00001003 +S _last_esp_status Def00001009 +S _file_name Def0000100C +A _INITIALIZED size 0 flags 0 addr 0 +A _DABS size 0 flags 8 addr 0 +A _HOME size 0 flags 0 addr 0 +A _GSINIT size 0 flags 0 addr 0 +A _GSFINAL size 0 flags 0 addr 0 +A _INITIALIZER size 0 flags 0 addr 0 +A _CABS size 0 flags 8 addr 0 +T 00 00 00 00 +R 00 00 01 00 +T 00 00 00 00 +R 00 00 01 00 +T 01 00 00 00 +R 00 00 01 00 +T 01 00 00 00 +R 00 00 01 00 +T 01 10 00 00 +R 00 00 01 00 +T 01 10 00 00 +R 00 00 01 00 +T 03 10 00 00 +R 00 00 01 00 +T 03 10 00 00 +R 00 00 01 00 +T 07 10 00 00 +R 00 00 01 00 +T 07 10 00 00 +R 00 00 01 00 +T 08 10 00 00 +R 00 00 01 00 +T 08 10 00 00 +R 00 00 01 00 +T 09 10 00 00 +R 00 00 01 00 +T 09 10 00 00 +R 00 00 01 00 +T 0A 10 00 00 +R 00 00 01 00 +T 0A 10 00 00 +R 00 00 01 00 +T 0C 10 00 00 +R 00 00 01 00 +T 0C 10 00 00 +R 00 00 01 00 +T 2D 10 00 00 +R 00 00 01 00 +T 2D 10 00 00 +R 00 00 01 00 +T 31 10 00 00 +R 00 00 01 00 +T 31 10 00 00 +R 00 00 01 00 +T 32 10 00 00 +R 00 00 01 00 +T 32 10 00 00 +R 00 00 01 00 +T 34 10 00 00 +R 00 00 01 00 +T 34 10 00 00 +R 00 00 01 00 +T 37 10 00 00 +R 00 00 01 00 +T 37 10 00 00 +R 00 00 01 00 +T 00 00 00 00 +R 00 00 00 00 +T 00 00 00 00 ED 7B 01 10 C9 +R 00 00 00 00 00 06 01 00 +T 05 00 00 00 +R 00 00 00 00 +T 05 00 00 00 4F 3E 13 D3 77 3E 01 D3 57 AF D3 57 +R 00 00 00 00 +T 11 00 00 00 DB 57 79 D3 57 AF D3 57 3E 03 D3 77 +R 00 00 00 00 +T 1D 00 00 00 C9 +R 00 00 00 00 +T 1E 00 00 00 +R 00 00 00 00 +T 1E 00 00 00 4F 3E 13 D3 77 3E 02 D3 57 79 D3 57 +R 00 00 00 00 +T 2A 00 00 00 DB 57 DB 57 DB 57 4F 3E 03 D3 77 79 +R 00 00 00 00 +T 36 00 00 00 C9 +R 00 00 00 00 +T 37 00 00 00 +R 00 00 00 00 +T 37 00 00 00 DD E5 DD 21 00 00 DD 39 F5 F5 4F 3E +R 00 00 00 00 +T 43 00 00 00 13 D3 77 3E 02 D3 57 79 D3 57 DB 57 +R 00 00 00 00 +T 4F 00 00 00 DB 57 DB 57 4F DB 57 57 59 DB 57 DD +R 00 00 00 00 +T 5B 00 00 00 77 FC AF DD 77 FD DD 77 FE DD 77 FF +R 00 00 00 00 +T 67 00 00 00 DD 7E FC DD 77 FE AF DD 77 FF DD 77 +R 00 00 00 00 +T 73 00 00 00 FC DD 77 FD DD 6E FE DB 57 DD 77 FC +R 00 00 00 00 +T 7F 00 00 00 AF DD 77 FD DD 77 FE DD 77 FF DD 7E +R 00 00 00 00 +T 8B 00 00 00 FC DD 77 FF AF DD 77 FC DD 77 FD DD +R 00 00 00 00 +T 97 00 00 00 77 FE DD 66 FF 3E 03 D3 77 DD F9 DD +R 00 00 00 00 +T A3 00 00 00 E1 C9 +R 00 00 00 00 +T A5 00 00 00 +R 00 00 00 00 +T A5 00 00 00 4F 3E 13 D3 77 3E 02 D3 57 79 D3 57 +R 00 00 00 00 +T B1 00 00 00 DB 57 DB 57 FD 21 02 00 FD 39 FD 4E +R 00 00 00 00 +T BD 00 00 00 00 +R 00 00 00 00 +T BE 00 00 00 +R 00 00 00 00 +T BE 00 00 00 79 0D B7 28 07 DB 57 12 13 C3 BE 00 +R 00 00 00 00 00 0E 00 00 +T CA 00 00 00 +R 00 00 00 00 +T CA 00 00 00 3E 03 D3 77 E1 33 E9 +R 00 00 00 00 +T D1 00 00 00 +R 00 00 00 00 +T D1 00 00 00 47 4D 3E 13 D3 77 3E 01 D3 57 78 D3 +R 00 00 00 00 +T DD 00 00 00 57 DB 57 79 D3 57 3E 03 D3 77 C9 +R 00 00 00 00 +T E8 00 00 00 +R 00 00 00 00 +T E8 00 00 00 4F 3E 13 D3 77 3E 01 D3 57 79 D3 57 +R 00 00 00 00 +T F4 00 00 00 DB 57 FD 21 02 00 FD 39 FD 7E 00 D3 +R 00 00 00 00 +T 00 01 00 00 57 FD 7E 01 D3 57 FD 7E 02 D3 57 FD +R 00 00 00 00 +T 0C 01 00 00 7E 03 D3 57 3E 03 D3 77 E1 F1 F1 E9 +R 00 00 00 00 +T 18 01 00 00 +R 00 00 00 00 +T 18 01 00 00 3E 13 D3 77 3E 07 D3 57 DB 57 3E 03 +R 00 00 00 00 +T 24 01 00 00 D3 77 C9 +R 00 00 00 00 +T 27 01 00 00 +R 00 00 00 00 +T 27 01 00 00 7D 01 AF 1A ED 79 7C 01 AF 1B ED 79 +R 00 00 00 00 +T 33 01 00 00 FD 21 02 00 FD 39 FD 7E 00 01 AF 1C +R 00 00 00 00 +T 3F 01 00 00 ED 79 FD 7E 01 FD 4E 02 FD 23 CB 39 +R 00 00 00 00 +T 4B 01 00 00 CB 1F 3D 01 AF 26 ED 79 FD 7E 02 3D +R 00 00 00 00 +T 57 01 00 00 01 AF 28 ED 79 3E 13 D3 77 3E 03 D3 +R 00 00 00 00 +T 63 01 00 00 57 DB 57 DB 57 3E 82 01 AF 27 ED 79 +R 00 00 00 00 +T 6F 01 00 00 +R 00 00 00 00 +T 6F 01 00 00 3E 27 DB AF 07 38 F9 3E 03 D3 77 CD +R 00 00 00 00 +T 7B 01 00 00 18 01 11 60 EA 21 00 00 CD D5 01 E1 +R 00 00 00 00 00 04 00 00 00 0D 00 00 +T 87 01 00 00 F1 F1 33 E9 +R 00 00 00 00 +T 8B 01 00 00 +R 00 00 00 00 +T 8B 01 00 00 3E 13 D3 77 3E 08 D3 57 DB 57 3E 03 +R 00 00 00 00 +T 97 01 00 00 D3 77 C9 +R 00 00 00 00 +T 9A 01 00 00 +R 00 00 00 00 +T 9A 01 00 00 DD E5 DD 21 00 00 DD 39 4F DD 5E 04 +R 00 00 00 00 +T A6 01 00 00 DD 56 05 DD 6E 06 DD 66 07 +R 00 00 00 00 +T AF 01 00 00 +R 00 00 00 00 +T AF 01 00 00 7B C6 FF 5F 7A CE FF 57 7D CE FF 6F +R 00 00 00 00 +T BB 01 00 00 7C CE FF 67 B5 B2 B3 28 0E E5 C5 D5 +R 00 00 00 00 +T C7 01 00 00 3E 01 CD 1E 00 D1 C1 E1 91 20 DD +R 00 00 00 00 00 07 00 00 +T D2 01 00 00 +R 00 00 00 00 +T D2 01 00 00 DD E1 C9 +R 00 00 00 00 +T D5 01 00 00 +R 00 00 00 00 +T D5 01 00 00 +R 00 00 00 00 +T D5 01 00 00 7B C6 FF 5F 7A CE FF 57 7D CE FF 6F +R 00 00 00 00 +T E1 01 00 00 7C CE FF 67 B5 B2 B3 C8 E5 D5 3E 01 +R 00 00 00 00 +T ED 01 00 00 CD 1E 00 D1 E1 FE 02 28 DF C9 +R 00 00 00 00 00 05 00 00 +T F7 01 00 00 +R 00 00 00 00 +T F7 01 00 00 E5 D5 3E 03 CD E8 00 FD 21 02 00 FD +R 00 00 00 00 00 09 00 00 +T 03 02 00 00 39 FD 6E 00 3E 02 CD D1 00 3E E0 CD +R 00 00 00 00 00 0B 00 00 +T 0F 02 00 00 05 00 11 20 4E 21 00 00 CD D5 01 3E +R 00 00 00 00 00 04 00 00 00 0D 00 00 +T 1B 02 00 00 0B CD 1E 00 5F 16 00 E1 33 E9 +R 00 00 00 00 00 06 00 00 +T 25 02 00 00 +R 00 00 00 00 +T 25 02 00 00 AF CD 05 00 CD 8B 01 CD 18 01 3E 01 +R 00 00 00 00 00 06 00 00 00 09 00 00 00 0C 00 00 +T 31 02 00 00 C9 +R 00 00 00 00 +T 32 02 00 00 +R 00 00 00 00 +T 32 02 00 00 01 00 18 0A 20 05 2F 00 00 00 00 00 +R 00 00 00 00 +T 3E 02 00 00 8C 02 96 02 97 02 +R 00 00 00 00 00 04 00 00 00 06 00 00 00 08 00 00 +T 44 02 00 00 +R 00 00 00 00 +T 44 02 00 00 01 00 FF FF 20 05 2F 00 00 00 00 00 +R 00 00 00 00 +T 50 02 00 00 8C 02 96 02 AD 02 +R 00 00 00 00 00 04 00 00 00 06 00 00 00 08 00 00 +T 56 02 00 00 +R 00 00 00 00 +T 56 02 00 00 01 00 FF FF 20 05 2F 00 00 00 00 00 +R 00 00 00 00 +T 62 02 00 00 8C 02 96 02 CD 02 +R 00 00 00 00 00 04 00 00 00 06 00 00 00 08 00 00 +T 68 02 00 00 +R 00 00 00 00 +T 68 02 00 00 81 00 19 0A 28 0B 4F 00 00 00 00 00 +R 00 00 00 00 +T 74 02 00 00 EB 02 96 02 00 03 +R 00 00 00 00 00 04 00 00 00 06 00 00 00 08 00 00 +T 7A 02 00 00 +R 00 00 00 00 +T 7A 02 00 00 01 00 16 0A 24 05 4F 00 00 00 00 00 +R 00 00 00 00 +T 86 02 00 00 0E 03 96 02 17 03 +R 00 00 00 00 00 04 00 00 00 06 00 00 00 08 00 00 +T 8C 02 00 00 +R 00 00 00 00 +T 8C 02 00 00 0E 20 45 72 72 6F 72 21 20 00 +R 00 00 00 00 +T 96 02 00 00 +R 00 00 00 00 +T 96 02 00 00 00 +R 00 00 00 00 +T 97 02 00 00 +R 00 00 00 00 +T 97 02 00 00 0E 0C 01 4E 6F 20 45 53 50 33 32 20 +R 00 00 00 00 +T A3 02 00 00 64 65 74 65 63 74 65 64 21 00 +R 00 00 00 00 +T AD 02 00 00 +R 00 00 00 00 +T AD 02 00 00 0E 0C 01 4F 75 74 20 6F 66 20 6D 65 +R 00 00 00 00 +T B9 02 00 00 6D 6F 72 79 20 28 66 69 6C 65 20 74 +R 00 00 00 00 +T C5 02 00 00 6F 6F 20 62 69 67 29 00 +R 00 00 00 00 +T CD 02 00 00 +R 00 00 00 00 +T CD 02 00 00 0E 0C 01 50 6C 61 79 62 61 63 6B 20 +R 00 00 00 00 +T D9 02 00 00 65 72 72 6F 72 20 28 62 61 64 20 66 +R 00 00 00 00 +T E5 02 00 00 69 6C 65 3F 29 00 +R 00 00 00 00 +T EB 02 00 00 +R 00 00 00 00 +T EB 02 00 00 0E 20 58 4D 2F 58 4D 5A 2F 53 33 4D +R 00 00 00 00 +T F7 02 00 00 20 50 6C 61 79 65 72 20 00 +R 00 00 00 00 +T 00 03 00 00 +R 00 00 00 00 +T 00 03 00 00 0E 0C 01 50 6C 61 79 69 6E 67 2E 2E +R 00 00 00 00 +T 0C 03 00 00 2E 00 +R 00 00 00 00 +T 0E 03 00 00 +R 00 00 00 00 +T 0E 03 00 00 0E 20 41 62 6F 75 74 20 00 +R 00 00 00 00 +T 17 03 00 00 +R 00 00 00 00 +T 17 03 00 00 0E 0C 01 58 4D 20 50 6C 61 79 65 72 +R 00 00 00 00 +T 23 03 00 00 20 76 31 2E 30 00 +R 00 00 00 00 +T 29 03 00 00 +R 00 00 00 00 +T 29 03 00 00 DD E5 DD 21 00 00 DD 39 21 EC FF 39 +R 00 00 00 00 +T 35 03 00 00 F9 3E A2 CD 05 00 11 10 27 21 00 00 +R 00 00 00 00 00 08 00 00 +T 41 03 00 00 CD D5 01 3E E4 CD 05 00 11 10 27 21 +R 00 00 00 00 00 05 00 00 00 0A 00 00 +T 4D 03 00 00 00 00 CD D5 01 3A 07 10 3D 28 0A 3A +R 00 00 00 00 00 07 00 00 00 0A 01 00 +T 59 03 00 00 07 10 D6 02 28 08 C3 6C 03 +R 00 00 00 00 00 04 01 00 00 0B 00 00 +T 62 03 00 00 +R 00 00 00 00 +T 62 03 00 00 3E 08 C3 6E 03 +R 00 00 00 00 00 07 00 00 +T 67 03 00 00 +R 00 00 00 00 +T 67 03 00 00 3E 0C C3 6E 03 +R 00 00 00 00 00 07 00 00 +T 6C 03 00 00 +R 00 00 00 00 +T 6C 03 00 00 3E 05 +R 00 00 00 00 +T 6E 03 00 00 +R 00 00 00 00 +T 6E 03 00 00 F5 33 ED 5B 03 10 2A 05 10 CD F7 01 +R 00 00 00 00 00 08 01 00 00 0B 01 00 00 0E 00 00 +T 7A 03 00 00 21 31 10 73 3E 01 CD 1E 00 32 09 10 +R 00 00 00 00 00 05 01 00 00 0B 00 00 00 0E 01 00 +T 86 03 00 00 3A 09 10 3D 28 04 AF C3 39 05 +R 00 00 00 00 00 05 01 00 00 0C 00 00 +T 90 03 00 00 +R 00 00 00 00 +T 90 03 00 00 21 0C 00 39 EB 21 03 10 01 04 00 ED +R 00 00 00 00 00 0A 01 00 +T 9C 03 00 00 B0 AF DD 77 FC DD 77 FD DD 77 FE DD +R 00 00 00 00 +T A8 03 00 00 77 FF +R 00 00 00 00 +T AA 03 00 00 +R 00 00 00 00 +T AA 03 00 00 DD 7E FB DD B6 FA DD B6 F9 DD B6 F8 +R 00 00 00 00 +T B6 03 00 00 CA C6 04 DD 7E F9 D6 10 DD 7E FA DE +R 00 00 00 00 00 05 00 00 +T C2 03 00 00 00 DD 7E FB DE 00 30 11 21 00 00 39 +R 00 00 00 00 +T CE 03 00 00 EB 21 0C 00 39 01 04 00 ED B0 C3 +R 00 00 00 00 +T D9 03 00 00 EA 03 +R 00 00 00 00 00 04 00 00 +T DB 03 00 00 +R 00 00 00 00 +T DB 03 00 00 DD 36 EC 00 DD 36 ED 10 AF DD 77 EE +R 00 00 00 00 +T E7 03 00 00 DD 77 EF +R 00 00 00 00 +T EA 03 00 00 +R 00 00 00 00 +T EA 03 00 00 21 05 00 39 EB 21 00 00 39 01 04 00 +R 00 00 00 00 +T F6 03 00 00 ED B0 DD 7E F1 C6 FF DD 7E F2 CE 01 +R 00 00 00 00 +T 02 04 00 00 47 3E 00 CE 00 5F 3E 00 CE 00 57 48 +R 00 00 00 00 +T 0E 04 00 00 43 5A CB 3B CB 18 CB 19 DD 71 F7 79 +R 00 00 00 00 +T 1A 04 00 00 F5 33 21 01 00 CD 00 00 21 00 00 E5 +R 00 00 00 00 00 07 01 00 02 0A 01 00 +T 26 04 00 00 DD 6E F1 DD 66 F2 E5 3E 03 CD E8 00 +R 00 00 00 00 00 0E 00 00 +T 32 04 00 00 DD 6E FE DD 66 FF E5 DD 6E FC DD 66 +R 00 00 00 00 +T 3E 04 00 00 FD E5 3E 07 CD E8 00 3E E1 CD 05 00 +R 00 00 00 00 00 09 00 00 00 0E 00 00 +T 4A 04 00 00 21 00 00 E5 21 D0 07 E5 3E 03 CD +R 00 00 00 00 +T 55 04 00 00 9A 01 F1 F1 DD 7E F7 DD 77 F5 DD 36 +R 00 00 00 00 00 04 00 00 +T 61 04 00 00 F6 00 3A 02 60 DD 77 F7 DD 6E F5 26 +R 00 00 00 00 +T 6D 04 00 00 00 E5 21 00 02 E5 DD 7E F7 F5 33 21 +R 00 00 00 00 +T 79 04 00 00 01 00 CD 27 01 DD 5E F1 DD 56 F2 DD +R 00 00 00 00 00 04 01 00 00 07 00 00 +T 85 04 00 00 6E FC DD 66 FD 19 DD 75 FC DD 74 FD +R 00 00 00 00 +T 91 04 00 00 DD 7E FE DD 8E F3 DD 77 FE 30 03 DD +R 00 00 00 00 +T 9D 04 00 00 34 FF +R 00 00 00 00 +T 9F 04 00 00 +R 00 00 00 00 +T 9F 04 00 00 DD 7E F8 DD 96 F1 DD 77 F8 DD 7E F9 +R 00 00 00 00 +T AB 04 00 00 DD 9E F2 DD 77 F9 DD 7E FA DD 9E F3 +R 00 00 00 00 +T B7 04 00 00 DD 77 FA DD 7E FB DD 9E F4 DD 77 FB +R 00 00 00 00 +T C3 04 00 00 C3 AA 03 +R 00 00 00 00 00 05 00 00 +T C6 04 00 00 +R 00 00 00 00 +T C6 04 00 00 3A 07 10 3D 20 3D 3A 31 10 6F 3E 0B +R 00 00 00 00 00 05 01 00 00 0B 01 00 +T D2 04 00 00 CD D1 00 2E 05 3E 02 CD D1 00 2A +R 00 00 00 00 00 05 00 00 00 0C 00 00 +T DD 04 00 00 05 10 E5 2A 03 10 E5 3E 03 CD E8 00 +R 00 00 00 00 00 04 01 00 00 08 01 00 00 0E 00 00 +T E9 04 00 00 3E F2 CD 05 00 11 10 27 21 00 00 CD +R 00 00 00 00 00 07 00 00 +T F5 04 00 00 D5 01 3E 01 CD 1E 00 32 09 10 3A +R 00 00 00 00 00 04 00 00 00 09 00 00 00 0C 01 00 +T 00 05 00 00 09 10 3D 28 04 AF C3 39 05 +R 00 00 00 00 00 04 01 00 00 0B 00 00 +T 09 05 00 00 +R 00 00 00 00 +T 09 05 00 00 3E A0 CD 05 00 11 10 27 21 00 00 CD +R 00 00 00 00 00 07 00 00 +T 15 05 00 00 D5 01 3E 01 CD 1E 00 32 09 10 3A +R 00 00 00 00 00 04 00 00 00 09 00 00 00 0C 01 00 +T 20 05 00 00 09 10 3D 28 04 AF C3 39 05 +R 00 00 00 00 00 04 01 00 00 0B 00 00 +T 29 05 00 00 +R 00 00 00 00 +T 29 05 00 00 3E A1 CD 05 00 11 10 27 21 00 00 CD +R 00 00 00 00 00 07 00 00 +T 35 05 00 00 D5 01 3E 01 +R 00 00 00 00 00 04 00 00 +T 39 05 00 00 +R 00 00 00 00 +T 39 05 00 00 DD F9 DD E1 C9 +R 00 00 00 00 +T 3E 05 00 00 +R 00 00 00 00 +T 3E 05 00 00 +R 00 00 00 00 +T 3E 05 00 00 76 CD 00 00 B7 28 F9 C9 +R 00 00 00 00 02 06 0D 00 +T 46 05 00 00 +R 00 00 00 00 +T 46 05 00 00 4F +R 00 00 00 00 +T 47 05 00 00 +R 00 00 00 00 +T 47 05 00 00 79 0D B7 C8 76 C3 47 05 +R 00 00 00 00 00 0A 00 00 +T 4F 05 00 00 +R 00 00 00 00 +T 4F 05 00 00 21 7A 02 CD 00 00 CD 3E 05 21 +R 00 00 00 00 00 05 00 00 02 08 05 00 00 0B 00 00 +T 59 05 00 00 7A 02 CD 00 00 AF C3 00 00 +R 00 00 00 00 00 04 00 00 02 07 0B 00 00 0B 00 00 +T 62 05 00 00 +R 00 00 00 00 +T 62 05 00 00 21 32 02 CD 00 00 CD 3E 05 21 +R 00 00 00 00 00 05 00 00 02 08 05 00 00 0B 00 00 +T 6C 05 00 00 32 02 CD 00 00 AF C3 00 00 +R 00 00 00 00 00 04 00 00 02 07 0B 00 00 0B 00 00 +T 75 05 00 00 +R 00 00 00 00 +T 75 05 00 00 21 44 02 CD 00 00 3E 32 CD 46 05 21 +R 00 00 00 00 00 05 00 00 02 08 05 00 00 0D 00 00 +T 81 05 00 00 44 02 CD 00 00 3E 02 C3 00 00 +R 00 00 00 00 00 04 00 00 02 07 0B 00 00 0C 00 00 +T 8B 05 00 00 +R 00 00 00 00 +T 8B 05 00 00 21 56 02 CD 00 00 3E 32 CD 46 05 21 +R 00 00 00 00 00 05 00 00 02 08 05 00 00 0D 00 00 +T 97 05 00 00 56 02 CD 00 00 3E 02 C3 00 00 +R 00 00 00 00 00 04 00 00 02 07 0B 00 00 0C 00 00 +T A1 05 00 00 +R 00 00 00 00 +T A1 05 00 00 ED 4B 0A 10 1E 00 +R 00 00 00 00 00 06 01 00 +T A7 05 00 00 +R 00 00 00 00 +T A7 05 00 00 6B 26 00 09 56 3E 0C 10 00 00 83 6F +R 00 00 00 00 09 0A 01 00 +T B0 05 00 00 3E 0C 10 00 00 CE 00 67 7A B7 28 0A +R 00 00 00 00 89 05 01 00 +T B9 05 00 00 7B D6 20 30 05 72 1C C3 A7 05 +R 00 00 00 00 00 0C 00 00 +T C3 05 00 00 +R 00 00 00 00 +T C3 05 00 00 36 00 C9 +R 00 00 00 00 +T C6 05 00 00 +R 00 00 00 00 +T C6 05 00 00 3E 45 F5 33 21 05 00 E5 21 01 01 E5 +R 00 00 00 00 +T D2 05 00 00 11 F0 05 21 68 02 CD 00 00 21 +R 00 00 00 00 00 05 00 00 00 08 00 00 02 0B 0A 00 +T DC 05 00 00 0C 10 CD 00 00 D5 21 01 07 E5 11 +R 00 00 00 00 00 04 01 00 02 07 0C 00 +T E7 05 00 00 0C 10 21 68 02 CD 00 00 C9 +R 00 00 00 00 00 04 01 00 00 07 00 00 02 0A 04 00 +T F0 05 00 00 +R 00 00 00 00 +T F0 05 00 00 46 69 6C 65 3A 00 +R 00 00 00 00 +T F6 05 00 00 +R 00 00 00 00 +T F6 05 00 00 DD E5 DD 21 00 00 DD 39 EB 01 22 06 +R 00 00 00 00 00 0E 00 00 +T 02 06 00 00 DD 7E 04 07 07 07 07 E6 0F 6F 26 00 +R 00 00 00 00 +T 0E 06 00 00 09 7E 12 13 DD 7E 04 E6 0F 6F 26 00 +R 00 00 00 00 +T 1A 06 00 00 09 7E 12 DD E1 E1 33 E9 +R 00 00 00 00 +T 22 06 00 00 +R 00 00 00 00 +T 22 06 00 00 30 31 32 33 34 35 36 37 38 39 41 42 +R 00 00 00 00 +T 2E 06 00 00 43 44 45 46 00 +R 00 00 00 00 +T 33 06 00 00 +R 00 00 00 00 +T 33 06 00 00 DD E5 DD 21 00 00 DD 39 F5 4D 44 E1 +R 00 00 00 00 +T 3F 06 00 00 D5 C5 11 64 00 DD 6E FE DD 66 FF CD +R 00 00 00 00 +T 4B 06 00 00 00 00 EB 11 0A 00 CD 00 00 C1 7B C6 +R 00 00 00 00 02 04 00 00 02 0B 0F 00 +T 57 06 00 00 30 02 69 60 23 E5 C5 11 0A 00 DD 6E +R 00 00 00 00 +T 63 06 00 00 FE DD 66 FF CD 00 00 EB 11 0A 00 CD +R 00 00 00 00 02 09 00 00 +T 6F 06 00 00 00 00 C1 E1 7B C6 30 77 03 03 C5 11 +R 00 00 00 00 02 04 0F 00 +T 7B 06 00 00 0A 00 DD 6E FE DD 66 FF CD 00 00 C1 +R 00 00 00 00 02 0D 0F 00 +T 87 06 00 00 7B C6 30 02 DD F9 DD E1 C9 +R 00 00 00 00 +T 90 06 00 00 +R 00 00 00 00 +T 90 06 00 00 DD E5 DD 21 00 00 DD 39 E5 21 00 00 +R 00 00 00 00 +T 9C 06 00 00 E5 2E 3C E5 DD 5E 04 DD 56 05 DD 6E +R 00 00 00 00 +T A8 06 00 00 06 DD 66 07 CD 00 00 F1 F1 01 00 00 +R 00 00 00 00 02 09 08 00 +T B4 06 00 00 C5 0E 64 C5 CD 00 00 F1 F1 4B C5 21 +R 00 00 00 00 02 09 07 00 +T C0 06 00 00 00 00 E5 2E 3C E5 DD 5E 04 DD 56 05 +R 00 00 00 00 +T CC 06 00 00 DD 6E 06 DD 66 07 CD 00 00 F1 F1 C1 +R 00 00 00 00 02 0B 07 00 +T D8 06 00 00 51 D5 2E 0A 7A CD 00 00 7B 2E 0A CD +R 00 00 00 00 02 0A 03 00 +T E4 06 00 00 00 00 7B D1 C6 30 E1 E5 77 C1 C5 03 +R 00 00 00 00 02 04 02 00 +T F0 06 00 00 C5 D5 2E 0A 7A CD 00 00 7B D1 C1 C6 +R 00 00 00 00 02 0A 02 00 +T FC 06 00 00 30 02 E1 E5 23 23 36 3A C1 C5 03 03 +R 00 00 00 00 +T 08 07 00 00 03 C5 D5 2E 0A 7B CD 00 00 7B 2E 0A +R 00 00 00 00 02 0B 03 00 +T 14 07 00 00 CD 00 00 7B D1 C1 C6 30 02 DD 7E FE +R 00 00 00 00 02 05 02 00 +T 20 07 00 00 C6 04 4F DD 7E FF CE 00 47 C5 2E 0A +R 00 00 00 00 +T 2C 07 00 00 7B CD 00 00 7B C1 C6 30 02 DD F9 DD +R 00 00 00 00 02 06 02 00 +T 38 07 00 00 E1 E1 F1 F1 E9 +R 00 00 00 00 +T 3D 07 00 00 +R 00 00 00 00 +T 3D 07 00 00 21 09 00 E5 21 03 01 E5 11 93 07 21 +R 00 00 00 00 00 0D 00 00 +T 49 07 00 00 68 02 CD 00 00 21 07 00 E5 21 03 0C +R 00 00 00 00 00 04 00 00 02 07 04 00 +T 55 07 00 00 E5 11 9D 07 21 68 02 CD 00 00 21 +R 00 00 00 00 00 06 00 00 00 09 00 00 02 0C 04 00 +T 60 07 00 00 06 00 E5 21 03 15 E5 11 A5 07 21 +R 00 00 00 00 00 0C 00 00 +T 6B 07 00 00 68 02 CD 00 00 21 05 00 E5 21 05 01 +R 00 00 00 00 00 04 00 00 02 07 04 00 +T 77 07 00 00 E5 11 AC 07 21 68 02 CD 00 00 21 +R 00 00 00 00 00 06 00 00 00 09 00 00 02 0C 04 00 +T 82 07 00 00 03 00 E5 21 05 0C E5 11 B2 07 21 +R 00 00 00 00 00 0C 00 00 +T 8D 07 00 00 68 02 CD 00 00 C9 +R 00 00 00 00 00 04 00 00 02 07 04 00 +T 93 07 00 00 +R 00 00 00 00 +T 93 07 00 00 50 61 74 74 65 72 6E 3A 23 00 +R 00 00 00 00 +T 9D 07 00 00 +R 00 00 00 00 +T 9D 07 00 00 20 20 52 6F 77 3A 23 00 +R 00 00 00 00 +T A5 07 00 00 +R 00 00 00 00 +T A5 07 00 00 20 20 42 50 4D 3A 00 +R 00 00 00 00 +T AC 07 00 00 +R 00 00 00 00 +T AC 07 00 00 54 69 6D 65 3A 00 +R 00 00 00 00 +T B2 07 00 00 +R 00 00 00 00 +T B2 07 00 00 20 2F 20 00 +R 00 00 00 00 +T B6 07 00 00 +R 00 00 00 00 +T B6 07 00 00 DD E5 DD 21 00 00 DD 39 21 F8 FF 39 +R 00 00 00 00 +T C2 07 00 00 F9 3A 31 10 6F 3E 0B CD D1 00 3E A8 +R 00 00 00 00 00 06 01 00 00 0C 00 00 +T CE 07 00 00 CD 05 00 11 D0 07 21 00 00 CD D5 01 +R 00 00 00 00 00 05 00 00 00 0E 00 00 +T DA 07 00 00 3E 2B CD 1E 00 DD 77 FA 3E 2C CD +R 00 00 00 00 00 07 00 00 +T E5 07 00 00 1E 00 DD 77 FB 3E 02 F5 33 21 01 00 +R 00 00 00 00 00 04 00 00 +T F1 07 00 00 39 EB 3E 31 CD A5 00 3E 2D CD 37 00 +R 00 00 00 00 00 09 00 00 00 0E 00 00 +T FD 07 00 00 DD 73 FC DD 72 FD DD 75 FE DD 74 FF +R 00 00 00 00 +T 09 08 00 00 3A 30 10 FD 21 2D 10 FD B6 02 FD B6 +R 00 00 00 00 00 05 01 00 00 09 01 00 +T 15 08 00 00 01 FD B6 00 20 0C 3E 36 CD 37 00 ED +R 00 00 00 00 00 0D 00 00 +T 21 08 00 00 53 2D 10 22 2F 10 +R 00 00 00 00 00 05 01 00 00 08 01 00 +T 27 08 00 00 +R 00 00 00 00 +T 27 08 00 00 DD 7E FA F5 33 21 32 10 CD F6 05 21 +R 00 00 00 00 00 0A 01 00 00 0D 00 00 +T 33 08 00 00 02 00 E5 21 03 0A E5 11 32 10 21 +R 00 00 00 00 00 0C 01 00 +T 3E 08 00 00 68 02 CD 00 00 DD 7E FB F5 33 21 +R 00 00 00 00 00 04 00 00 02 07 04 00 +T 49 08 00 00 32 10 CD F6 05 21 02 00 E5 21 03 13 +R 00 00 00 00 00 04 01 00 00 07 00 00 +T 55 08 00 00 E5 11 32 10 21 68 02 CD 00 00 D1 D5 +R 00 00 00 00 00 06 01 00 00 09 00 00 02 0C 04 00 +T 61 08 00 00 21 34 10 CD 33 06 21 03 00 E5 21 +R 00 00 00 00 00 05 01 00 00 08 00 00 +T 6C 08 00 00 03 1B E5 11 34 10 21 68 02 CD 00 00 +R 00 00 00 00 00 08 01 00 00 0B 00 00 02 0E 04 00 +T 78 08 00 00 21 00 00 E5 21 44 AC E5 DD 5E FC DD +R 00 00 00 00 +T 84 08 00 00 56 FD DD 6E FE DD 66 FF CD 00 00 F1 +R 00 00 00 00 02 0D 08 00 +T 90 08 00 00 E3 D5 21 37 10 CD 90 06 21 05 00 E5 +R 00 00 00 00 00 07 01 00 00 0A 00 00 +T 9C 08 00 00 21 05 07 E5 11 37 10 21 68 02 CD +R 00 00 00 00 00 09 01 00 00 0C 00 00 +T A7 08 00 00 00 00 21 00 00 E5 21 44 AC E5 ED 5B +R 00 00 00 00 02 04 04 00 +T B3 08 00 00 2D 10 2A 2F 10 CD 00 00 F1 E3 D5 21 +R 00 00 00 00 00 04 01 00 00 07 01 00 02 0A 08 00 +T BF 08 00 00 37 10 CD 90 06 21 05 00 E5 21 05 0F +R 00 00 00 00 00 04 01 00 00 07 00 00 +T CB 08 00 00 E5 11 37 10 21 68 02 CD 00 00 DD F9 +R 00 00 00 00 00 06 01 00 00 09 00 00 02 0C 04 00 +T D7 08 00 00 DD E1 C9 +R 00 00 00 00 +T DA 08 00 00 +R 00 00 00 00 +T DA 08 00 00 CD A1 05 3A 00 00 B7 20 0D CD 25 02 +R 00 00 00 00 00 05 00 00 00 08 01 00 00 0E 00 00 +T E6 08 00 00 B7 3E 01 20 02 3E 02 +R 00 00 00 00 +T ED 08 00 00 +R 00 00 00 00 +T ED 08 00 00 32 00 00 +R 00 00 00 00 00 05 01 00 +T F0 08 00 00 +R 00 00 00 00 +T F0 08 00 00 3A 00 00 3D C2 62 05 32 2D 10 32 +R 00 00 00 00 00 05 01 00 00 09 00 00 00 0C 01 00 +T FB 08 00 00 2E 10 32 2F 10 32 30 10 CD +R 00 00 00 00 00 04 01 00 00 07 01 00 00 0A 01 00 +T 04 09 00 00 29 03 B7 20 0B 3A 09 10 D6 99 CA +R 00 00 00 00 00 04 00 00 00 0A 01 00 +T 0F 09 00 00 75 05 C3 8B 05 +R 00 00 00 00 00 04 00 00 00 07 00 00 +T 14 09 00 00 +R 00 00 00 00 +T 14 09 00 00 21 68 02 CD 00 00 CD C6 05 CD +R 00 00 00 00 00 05 00 00 02 08 05 00 00 0B 00 00 +T 1E 09 00 00 3D 07 CD B6 07 +R 00 00 00 00 00 04 00 00 00 07 00 00 +T 23 09 00 00 +R 00 00 00 00 +T 23 09 00 00 76 CD 00 00 B7 28 27 3E A2 CD 05 00 +R 00 00 00 00 02 06 09 00 00 0E 00 00 +T 2F 09 00 00 11 10 27 21 00 00 CD D5 01 3E E4 CD +R 00 00 00 00 00 0B 00 00 +T 3B 09 00 00 05 00 11 10 27 21 00 00 CD D5 01 21 +R 00 00 00 00 00 04 00 00 00 0D 00 00 +T 47 09 00 00 68 02 CD 00 00 3E 02 CD 00 00 +R 00 00 00 00 00 04 00 00 02 07 0B 00 00 0C 00 00 +T 51 09 00 00 +R 00 00 00 00 +T 51 09 00 00 CD 00 00 B7 28 27 3E A2 CD 05 00 11 +R 00 00 00 00 02 05 0E 00 00 0D 00 00 +T 5D 09 00 00 10 27 21 00 00 CD D5 01 3E E4 CD +R 00 00 00 00 00 0A 00 00 +T 68 09 00 00 05 00 11 10 27 21 00 00 CD D5 01 21 +R 00 00 00 00 00 04 00 00 00 0D 00 00 +T 74 09 00 00 68 02 CD 00 00 3E 04 CD 00 00 +R 00 00 00 00 00 04 00 00 02 07 0B 00 00 0C 00 00 +T 7E 09 00 00 +R 00 00 00 00 +T 7E 09 00 00 CD 00 00 B7 28 9F 3E A2 CD 05 00 11 +R 00 00 00 00 02 05 0D 00 00 0D 00 00 +T 8A 09 00 00 10 27 21 00 00 CD D5 01 3E E4 CD +R 00 00 00 00 00 0A 00 00 +T 95 09 00 00 05 00 11 10 27 21 00 00 CD D5 01 21 +R 00 00 00 00 00 04 00 00 00 0D 00 00 +T A1 09 00 00 68 02 CD 00 00 AF CD 00 00 C3 +R 00 00 00 00 00 04 00 00 02 07 0B 00 00 0B 00 00 +T AB 09 00 00 23 09 +R 00 00 00 00 00 04 00 00 +T AD 09 00 00 +R 00 00 00 00 +T AD 09 00 00 ED 73 01 10 32 08 10 ED 43 0A 10 08 +R 00 00 00 00 00 06 01 00 00 09 01 00 00 0D 01 00 +T B9 09 00 00 32 07 10 22 03 10 ED 53 05 10 3A +R 00 00 00 00 00 05 01 00 00 08 01 00 00 0C 01 00 +T C4 09 00 00 08 10 B7 CA DA 08 3A 08 10 D6 03 CA +R 00 00 00 00 00 04 01 00 00 08 00 00 00 0B 01 00 +T D0 09 00 00 4F 05 AF C3 00 00 +R 00 00 00 00 00 04 00 00 00 08 00 00 diff --git a/obj/out.sym b/obj/out.sym new file mode 100644 index 0000000..9e1a444 --- /dev/null +++ b/obj/out.sym @@ -0,0 +1,166 @@ + ASxxxx Assembler V05.50.4+NoICE+SDCCmods-WIP-R14 (Zilog Z80 / Hitachi HD64180 / ZX-Next / eZ80 / R800) Page 1 +Hexadecimal [32-Bits] + +Symbol Table + + .__.$$$. = 00002710 L + .__.ABS. = 00000000 G + .__.CPU. = 00000000 L + .__.H$L. = 00000000 L + _BORDER = 000000FE + _SPI_CTRL = 00000077 + _SPI_DATA = 00000057 + _TS_BORDER = 00000FAF + _TS_CACHECONF = 00002BAF + _TS_DMACTR = 000027AF + _TS_DMADADDRH = 00001EAF + _TS_DMADADDRL = 00001DAF + _TS_DMADADDRX = 00001FAF + _TS_DMALEN = 000026AF + _TS_DMANUM = 000028AF + _TS_DMANUMH = 00002CAF + _TS_DMASADDRH = 00001BAF + _TS_DMASADDRL = 00001AAF + _TS_DMASADDRX = 00001CAF + _TS_DMASTATUS = 000027AF + _TS_DMAWPA = 00002DAF + _TS_DMAWPD = 000025AF + _TS_FDDVIRT = 000029AF + _TS_FMADDR = 000015AF + _TS_GXOFFSH = 000003AF + _TS_GXOFFSL = 000002AF + _TS_GYOFFSH = 000005AF + _TS_GYOFFSL = 000004AF + _TS_HSINT = 000022AF + _TS_INTMASK = 00002AAF + _TS_MEMCONFIG = 000021AF + _TS_PAGE0 = 000010AF + _TS_PAGE1 = 000011AF + _TS_PAGE2 = 000012AF + _TS_PAGE3 = 000013AF + _TS_PALSEL = 000007AF + _TS_SGPAGE = 000019AF + _TS_STATUS = 000000AF + _TS_SYSCONFIG = 000020AF + _TS_T0GPAGE = 000017AF + _TS_T0XOFFSH = 000041AF + _TS_T0XOFFSL = 000040AF + _TS_T0YOFFSH = 000043AF + _TS_T0YOFFSL = 000042AF + _TS_T1GPAGE = 000018AF + _TS_T1XOFFSH = 000045AF + _TS_T1XOFFSL = 000044AF + _TS_T1YOFFSH = 000047AF + _TS_T1YOFFSL = 000046AF + _TS_TMPAGE = 000016AF + _TS_TSCONFIG = 000006AF + _TS_VCONFIG = 000000AF + _TS_VPAGE = 000001AF + _TS_VSINTH = 000024AF + _TS_VSINTL = 000023AF + ASxxxx Assembler V05.50.4+NoICE+SDCCmods-WIP-R14 (Zilog Z80 / Hitachi HD64180 / ZX-Next / eZ80 / R800) Page 2 +Hexadecimal [32-Bits] + +Symbol Table + + 0 ___str_11 00000793 R + 0 ___str_12 0000079D R + 0 ___str_13 000007A5 R + 0 ___str_14 000007AC R + 0 ___str_15 000007B2 R + 0 ___str_9 000005F0 R + __divuchar ******** GX + __divuint ******** GX + __divulong ******** GX + __moduchar ******** GX + __moduint ******** GX + __modulong ******** GX + 0 __str_0 0000028C R + 0 __str_1 00000296 R + 0 __str_2 00000297 R + 0 __str_3 000002AD R + 0 __str_4 000002CD R + 0 __str_5 000002EB R + 0 __str_6 00000300 R + 0 __str_7 0000030E R + 0 __str_8 00000317 R + 0 _about 0000054F GR + 1 _call_type 00001008 GR + 0 _copy_file_name 000005A1 GR + 1 _decbuf 00001034 R + 0 _err_no_esp 00000232 GR + 0 _err_out_of_mem 00000244 GR + 0 _err_playback 00000256 GR + 0 _error_esp 00000562 GR + 0 _error_oom 00000575 GR + 0 _error_playback 0000058B GR + 0 _esp_cmd 00000005 GR + 0 _esp_create_obj 000001F7 GR + 0 _esp_init 00000225 GR + 0 _esp_rd_end 0000018B GR + 0 _esp_rd_reg32 00000037 GR + 0 _esp_rd_reg8 0000001E GR + 0 _esp_rd_regs 000000A5 GR + 0 _esp_send_dma 00000127 GR + 0 _esp_wait_busy 000001D5 GR + 0 _esp_wait_status 0000019A GR + 0 _esp_wr_end 00000118 GR + 0 _esp_wr_reg32 000000E8 GR + 0 _esp_wr_reg8 000000D1 GR + 1 _file_ext 00001007 GR + 1 _file_name 0000100C GR + 1 _filesize 00001003 GR + 1 _fs_buf 00000001 GR + 1 _hexbuf 00001032 R + 1 _last_esp_status 00001009 GR + 0 _main 000009AD GR + 0 _main_start 000008DA GR + 1 _p_file_name 0000100A GR + 0 _play_xm 00000329 GR + 0 _put_dec3 00000633 GR + ASxxxx Assembler V05.50.4+NoICE+SDCCmods-WIP-R14 (Zilog Z80 / Hitachi HD64180 / ZX-Next / eZ80 / R800) Page 3 +Hexadecimal [32-Bits] + +Symbol Table + + 0 _put_hex2 000005F6 GR + 0 _put_hex2_hexch_10000_105 00000622 R + 0 _put_time 00000690 GR + 1 _ret_sp 00001001 GR + 1 _state_esp 00000000 GR + _strlen ******** GX + 1 _timebuf 00001037 R + 1 _total_samples 0000102D GR + 0 _wait_esc_key 0000053E GR + 0 _wait_frames 00000546 GR + 0 _wc_exit 00000000 GR + _wc_key_esc ******** GX + _wc_key_pgdn ******** GX + _wc_key_pgup ******** GX + _wc_load512 ******** GX + _wc_prsrw ******** GX + _wc_prsrw_attr ******** GX + _wc_prwow ******** GX + _wc_rresb ******** GX + 0 _win_about 0000027A GR + 0 _win_xm 00000268 GR + 0 _xm_draw_static_labels 000005C6 GR + 0 _xm_draw_stats_labels 0000073D GR + 1 _xm_handle 00001031 GR + 0 _xm_update_info 000007B6 GR + + ASxxxx Assembler V05.50.4+NoICE+SDCCmods-WIP-R14 (Zilog Z80 / Hitachi HD64180 / ZX-Next / eZ80 / R800) Page 4 +Hexadecimal [32-Bits] + +Area Table + + 0 _CODE size 9D6 flags 0 + 1 _DATA size 103C flags 0 + 2 _INITIALIZED size 0 flags 0 + 3 _DABS size 0 flags 8 + 4 _HOME size 0 flags 0 + 5 _GSINIT size 0 flags 0 + 6 _GSFINAL size 0 flags 0 + 7 _INITIALIZER size 0 flags 0 + 8 _CABS size 0 flags 8 + diff --git a/src/crt0.s b/src/crt0.s new file mode 100644 index 0000000..23b53f5 --- /dev/null +++ b/src/crt0.s @@ -0,0 +1,24 @@ + + .module crt0 + .globl _main + + .area _HEADER (ABS) + .org 0x8000 + jp _main + + ;; Ordering of segments for the linker. + .area _HOME + .area _CODE + .area _INITIALIZER + .area _GSINIT + .area _GSFINAL + + .area _DATA + .area _INITIALIZED + .area _BSEG + .area _BSS + .area _HEAP + + .area _GSINIT + .area _GSFINAL + diff --git a/src/esp32.c b/src/esp32.c new file mode 100644 index 0000000..6b61226 --- /dev/null +++ b/src/esp32.c @@ -0,0 +1,154 @@ + +// Local, trimmed copy of ../lib/esp32/esp32.c - only the functions xmplay +// actually calls (esp_cmdd/esp_cmdp1/esp_cmdp/esp_send/esp_recv/esp_recv_dma/ +// esp_wait_not_status are unused here). Vendored per-project instead of +// shared, same reasoning as the SDCC-version-per-project split in build.bat: +// keeps xmplay's dependency surface to exactly what it uses. Bodies are +// unchanged from the shared original and cross-checked against +// esp32/doc/esp32-spi-wifi.md (WR_REGS=0x01/RD_REGS=0x02/RD_DATA=0x04 match +// the doc exactly; W_END=0x07/R_END=0x08 aren't in that doc at all, but they +// come from the same esp_spi_defs.h shared with the ESP32 firmware, which is +// the authoritative source - the doc is just an older, partial write-up). + +#define SPI_ESP_CS_ON 0x13 +#define SPI_ESP_CS_OFF 0x03 + +u32 esp_wait_busy(u32 timeout); + +void esp_cmd(u8 cmd) +{ + SPI_CTRL = SPI_ESP_CS_ON; + SPI_DATA = ESP_SPI_CMD_WR_REGS; + SPI_DATA = ESP_REG_COMMAND; + SPI_DATA; // dummy + SPI_DATA = cmd; // Command + SPI_DATA = ESP_ST_IDLE; // Reset status + SPI_CTRL = SPI_ESP_CS_OFF; +} + +u8 esp_rd_reg8(u8 reg) +{ + SPI_CTRL = SPI_ESP_CS_ON; + SPI_DATA = ESP_SPI_CMD_RD_REGS; + SPI_DATA = reg; + SPI_DATA; // dummy + SPI_DATA; // dummy + u8 rc = SPI_DATA; + SPI_CTRL = SPI_ESP_CS_OFF; + + return rc; +} + +u32 esp_rd_reg32(u8 reg) +{ + SPI_CTRL = SPI_ESP_CS_ON; + SPI_DATA = ESP_SPI_CMD_RD_REGS; + SPI_DATA = reg; + SPI_DATA; // dummy + SPI_DATA; // dummy + u32 rc = SPI_DATA; + rc |= (u32)SPI_DATA << 8; + rc |= (u32)SPI_DATA << 16; + rc |= (u32)SPI_DATA << 24; + SPI_CTRL = SPI_ESP_CS_OFF; + + return rc; +} + +void esp_rd_regs(u8 reg, void *data, u8 size) +{ + u8 *d = (u8*)data; + + SPI_CTRL = SPI_ESP_CS_ON; + SPI_DATA = ESP_SPI_CMD_RD_REGS; + SPI_DATA = reg; + SPI_DATA; // dummy + SPI_DATA; // dummy + while (size--) *d++ = SPI_DATA; + SPI_CTRL = SPI_ESP_CS_OFF; +} + +void esp_wr_reg8(u8 reg, u8 data) +{ + SPI_CTRL = SPI_ESP_CS_ON; + SPI_DATA = ESP_SPI_CMD_WR_REGS; + SPI_DATA = reg; + SPI_DATA; // dummy + SPI_DATA = data; + SPI_CTRL = SPI_ESP_CS_OFF; +} + +void esp_wr_reg32(u8 reg, u32 data) +{ + SPI_CTRL = SPI_ESP_CS_ON; + SPI_DATA = ESP_SPI_CMD_WR_REGS; + SPI_DATA = reg; + SPI_DATA; // dummy + SPI_DATA = (u8)data; + SPI_DATA = (u8)(data >> 8); + SPI_DATA = (u8)(data >> 16); + SPI_DATA = (u8)(data >> 24); + SPI_CTRL = SPI_ESP_CS_OFF; +} + +void esp_wr_end() +{ + SPI_CTRL = SPI_ESP_CS_ON; + SPI_DATA = ESP_SPI_CMD_W_END; + SPI_DATA; // dummy + SPI_CTRL = SPI_ESP_CS_OFF; +} + +void esp_send_dma(u16 a, u8 p, u16 l, u16 n) +{ + + TS_DMASADDRL = (u8)a; + TS_DMASADDRH = (u8)((u16)a >> 8); + TS_DMASADDRX = p; + TS_DMALEN = (u8)((l >> 1) - 1); + TS_DMANUM = (u8)(n - 1); + + SPI_CTRL = SPI_ESP_CS_ON; + SPI_DATA = ESP_SPI_CMD_WR_DATA; + SPI_DATA; // dummy + SPI_DATA; // dummy + TS_DMACTR = TS_DMA_RAM_SPI; + while (TS_DMASTATUS & 0x80); + SPI_CTRL = SPI_ESP_CS_OFF; + + esp_wr_end(); + esp_wait_busy(60000); +} + +void esp_rd_end() +{ + SPI_CTRL = SPI_ESP_CS_ON; + SPI_DATA = ESP_SPI_CMD_R_END; + SPI_DATA; // dummy + SPI_CTRL = SPI_ESP_CS_OFF; +} + +u32 esp_wait_status(u8 status, u32 timeout) +{ + while (--timeout) if (esp_rd_reg8(ESP_REG_STATUS) == status) break; + + return timeout; +} + +u32 esp_wait_busy(u32 timeout) +{ + while (--timeout) if (esp_rd_reg8(ESP_REG_STATUS) != ESP_ST_BUSY) break; + + return timeout; +} + +int esp_create_obj(u32 size, u8 type) +{ + esp_wr_reg32(ESP_REG_DATA_SIZE, size); + esp_wr_reg8(ESP_REG_OBJ_TYPE, type); + esp_cmd(ESP_CMD_MAKE_OBJECT); + esp_wait_busy(20000); + // +++ check error + + return esp_rd_reg8(ESP_REG_OBJ_HANDLE); +} diff --git a/src/main.c b/src/main.c new file mode 100644 index 0000000..49d4c99 --- /dev/null +++ b/src/main.c @@ -0,0 +1,500 @@ + +#include +#include +#include +#include +#include "tsconf.h" +#include + +#include +#include + +// This used to be `const u8 state_esp = 0;`, written to via `*(u8*)&state_esp` +// as a code-size trick (skip GSINIT zero-init - a const's value is already +// known at compile time). That's undefined behavior (modifying a const +// object), and SDCC 4.6.0's more aggressive optimizer actually exploits it: +// it folds `state_esp != 1` to a compile-time-constant `true` (since the +// const's initializer is 0), permanently ignoring the "write" - which is +// exactly why esp32 detection always failed after the 4.0.0->4.6.0 bump. +// Plain (non-const) global; BSS zero-init already makes it start at 0. +u8 state_esp; + +#define FS_BUF_SIZE 0x1000 +u8 fs_buf[FS_BUF_SIZE]; // at 0xAE00 (_PAGE2 to get page) + +u16 ret_sp; +u32 filesize; +u8 file_ext; +u8 call_type; +u8 last_esp_status; // set by play_xm() on failure, so the caller can pick a specific error message + +// STEP 2 of the gradual reintroduction: filename capture, re-enabled. +u16 p_file_name; // pointer to the open file's name, valid only at entry (#4000-#7FFF window) +char file_name[33]; + +// STEP 3 of the gradual reintroduction: live stats. +u32 total_samples; +u8 xm_handle; + +// --- Extensions --------------------------- +// file_ext is the matched entry's index into wc_h.c's ext[] table, so this +// enum must stay in the same order as that array (XM, XMZ, S3M). +enum +{ + EXT_XM, + EXT_XMZ, + EXT_S3M, +}; + +// --- Windows ------------------------------ +const WC_TX_WINDOW err_no_esp = +{ + /* window with header and text */ WC_WIND_HDR_TXT, + /* cursor color mask */ 0, + /* X,Y (position) */ 24, 10, + /* W,H (size) */ 32, 5, + /* paper/ink (window color) */ 0x2F, + /* -reserved- */ 0, + /* window restore buffer address */ 0, + /* separators */ 0, 0, + /* header text */ "\x0E" " Error! ", + /* footer text */ "", + /* window text */ "\x0E\x0C\x01" "No ESP32 detected!", +}; + +const WC_TX_WINDOW err_out_of_mem = +{ + /* window with header and text */ WC_WIND_HDR_TXT, + /* cursor color mask */ 0, + /* X,Y (position) */ 255, 255, + /* W,H (size) */ 32, 5, + /* paper/ink (window color) */ 0x2F, + /* -reserved- */ 0, + /* window restore buffer address */ 0, + /* separators */ 0, 0, + /* header text */ "\x0E" " Error! ", + /* footer text */ "", + /* window text */ "\x0E\x0C\x01" "Out of memory (file too big)", +}; + +const WC_TX_WINDOW err_playback = +{ + /* window with header and text */ WC_WIND_HDR_TXT, + /* cursor color mask */ 0, + /* X,Y (position) */ 255, 255, + /* W,H (size) */ 32, 5, + /* paper/ink (window color) */ 0x2F, + /* -reserved- */ 0, + /* window restore buffer address */ 0, + /* separators */ 0, 0, + /* header text */ "\x0E" " Error! ", + /* footer text */ "", + /* window text */ "\x0E\x0C\x01" "Playback error (bad file?)", +}; + +// STEP 1 of the gradual reintroduction: bigger, fixed position (not +// auto-center) - no wc_prsrw() calls yet, still just static wnd_txt like +// before. This exact size/position was already confirmed stable on its own +// earlier (before wc_prsrw/live-info were layered on top). +const WC_TX_WINDOW win_xm = +{ + /* window with header and text + shadow (0x80) */ WC_WIND_HDR_TXT | 0x80, + /* cursor color mask */ 0, + /* X,Y (position) */ 25, 10, + /* W,H (size) */ 40, 11, + /* paper/ink (window color) */ 0x4F, + /* -reserved- */ 0, + /* window restore buffer address */ 0, + /* separators */ 0, 0, + /* header text */ "\x0E" " XM/XMZ/S3M Player ", + /* footer text */ "", + /* window text */ "\x0E\x0C\x01" "Playing..." +}; + +const WC_TX_WINDOW win_about = +{ + /* window with header and text */ WC_WIND_HDR_TXT, + /* cursor color mask */ 0, + /* X,Y (position) */ 22, 10, + /* W,H (size) */ 36, 5, + /* paper/ink (window color) */ 0x4F, + /* -reserved- */ 0, + /* window restore buffer address */ 0, + /* separators */ 0, 0, + /* header text */ "\x0E" " About ", + /* footer text */ "", + /* window text */ "\x0E\x0C\x01" "XM Player v1.0" +}; + +bool esp_init() +{ + esp_cmd(ESP_CMD_NOP); + esp_rd_end(); + esp_wr_end(); + + // +++ detect + + return true; +} + +// Returns false on ESP_ERR_OUT_OF_MEMORY (e.g. file too large for the esp32 +// to allocate) so the caller can show an error instead of silently failing. +bool play_xm() +{ + esp_cmd(ESP_CMD_TRACK_STOP); + esp_wait_busy(10000); + esp_cmd(ESP_CMD_KILL_OBJECTS); + esp_wait_busy(10000); + + u8 obj_type; + switch (file_ext) + { + case EXT_XMZ: obj_type = OBJ_TYPE_ZIP; break; + case EXT_S3M: obj_type = OBJ_TYPE_S3M; break; + default: obj_type = OBJ_TYPE_XM; break; + } + + xm_handle = esp_create_obj(filesize, obj_type); + last_esp_status = esp_rd_reg8(ESP_REG_STATUS); + if (last_esp_status != ESP_ST_READY) + return false; + + u32 sz = filesize; + u32 offs = 0; + + while (sz) + { + u32 s = min(sz, FS_BUF_SIZE); + u8 sec = (s + 511) >> 9; + + wc_load512((u16)fs_buf, sec); + + esp_wr_reg32(ESP_REG_DATA_SIZE, s); + esp_wr_reg32(ESP_REG_DATA_OFFSET, offs); + esp_cmd(ESP_CMD_WRITE_OBJECT); + esp_wait_status(ESP_ST_DATA_M2S, 2000); + esp_send_dma((u16)fs_buf, *(u8*)_PAGE2, 512, sec); + + offs += s; + sz -= s; + } + + if (file_ext == EXT_XMZ) + { + // ESP_CMD_UNZIP's contract (esp_spi_defs.h) is + // i: ESP_REG_OBJ_HANDLE, ESP_REG_DATA_SIZE, ESP_REG_OBJ_TYPE - the handle + // must be (re)written explicitly, it's not implied by the last created object. + esp_wr_reg8(ESP_REG_OBJ_HANDLE, xm_handle); + esp_wr_reg8(ESP_REG_OBJ_TYPE, OBJ_TYPE_XM); + esp_wr_reg32(ESP_REG_DATA_SIZE, filesize); + esp_cmd(ESP_CMD_UNZIP); + esp_wait_busy(10000); + + last_esp_status = esp_rd_reg8(ESP_REG_STATUS); + if (last_esp_status != ESP_ST_READY) + return false; + } + + esp_cmd(ESP_CMD_TRACK_INIT); + esp_wait_busy(10000); + + last_esp_status = esp_rd_reg8(ESP_REG_STATUS); + if (last_esp_status != ESP_ST_READY) + return false; + + esp_cmd(ESP_CMD_TRACK_PLAY); + esp_wait_busy(10000); + + return true; +} + +// --- Aux functions ------------------------ +void wait_esc_key() +{ + while (1) + { + __asm + halt + __endasm; + + if (wc_key_esc()) + break; + } +} + +void wait_frames(u8 n) +{ + while (n--) + { + __asm + halt + __endasm; + } +} + +void about() +{ + wc_prwow(&win_about); + wait_esc_key(); + wc_rresb(&win_about); + wc_exit(WC_EXIT); +} + +void error_esp() +{ + wc_prwow(&err_no_esp); + wait_esc_key(); + wc_rresb(&err_no_esp); + wc_exit(WC_EXIT); +} + +void error_oom() +{ + wc_prwow(&err_out_of_mem); + wait_frames(50); // show the error for ~1 second (50Hz), then auto-advance + wc_rresb(&err_out_of_mem); + wc_exit(WC_NEXT_FILE); +} + +void error_playback() +{ + wc_prwow(&err_playback); + wait_frames(50); // show the error for ~1 second (50Hz), then auto-advance + wc_rresb(&err_playback); + wc_exit(WC_NEXT_FILE); +} + +// STEP 2 of the gradual reintroduction: filename capture, re-enabled. +// Copies the filename out of WC's own buffer (valid only right at entry, +// in the #4000-#7FFF window per plugins/READ_ME.TXT) into our own memory, +// before any paging/esp32 activity might disturb that window. +// TESTED: disabling this alone did NOT fix the "wrong file loading" bug. +void copy_file_name() +{ + u8 *src = (u8*)p_file_name; + u8 i = 0; + + while (src[i] && i < sizeof(file_name) - 1) + { + file_name[i] = src[i]; + i++; + } + file_name[i] = 0; +} + +// Coloring (PRIAT) via demyanenko-d/VGMPLAY.WMF's wc_prsrw_attr() - our own +// three hand-rolled attempts all corrupted esp32 file loading; retesting +// with their library now that build.bat pins SDCC 4.6.0 + --sdcccall 1. +#define ROW_FILE 1 +#define ATTR_CAPTION 0x45 // cyan ink - "File:" caption + +void xm_draw_static_labels() +{ + wc_prsrw_attr(&win_xm, "File:", ROW_FILE, 1, 5, ATTR_CAPTION); + wc_prsrw(&win_xm, file_name, ROW_FILE, 7, strlen(file_name)); +} + +// --- Live status display (STEP 3, no coloring - plain wc_prsrw only) ----- +#define ROW_STATS 3 +#define ROW_TIME 5 +#define ROW_BAR 6 +#define BAR_X 1 +#define BAR_WIDTH 34 + +void put_hex2(char *dst, u8 val) +{ + static const char hexch[] = "0123456789ABCDEF"; + dst[0] = hexch[(val >> 4) & 0xF]; + dst[1] = hexch[val & 0xF]; +} + +void put_dec3(char *dst, u16 val) +{ + dst[0] = '0' + (val / 100) % 10; + dst[1] = '0' + (val / 10) % 10; + dst[2] = '0' + val % 10; +} + +void put_time(char *dst, u32 sec) +{ + u8 m = (sec / 60) % 100; + u8 s = sec % 60; + + dst[0] = '0' + (m / 10) % 10; + dst[1] = '0' + m % 10; + dst[2] = ':'; + dst[3] = '0' + (s / 10) % 10; + dst[4] = '0' + s % 10; +} + +void xm_draw_stats_labels() +{ + wc_prsrw(&win_xm, "Pattern:#", ROW_STATS, 1, 9); + wc_prsrw(&win_xm, " Row:#", ROW_STATS, 12, 7); + wc_prsrw(&win_xm, " BPM:", ROW_STATS, 21, 6); + + wc_prsrw(&win_xm, "Time:", ROW_TIME, 1, 5); + wc_prsrw(&win_xm, " / ", ROW_TIME, 12, 3); +} + +// wc_prsrw()'s text pointer MUST be in #8000-#BFFF (our own code/data +// window) - but this plugin runs on WC's OWN stack, which lives in a +// DIFFERENT window (#4000-#7FFF, per plugins/READ_ME.TXT: "Ñ�тек... в Win 1 +// #4000-#7FFF"). Local (stack-allocated) char buffers passed to wc_prsrw() +// are therefore in the WRONG memory window entirely - this is almost +// certainly why xm_draw_static_labels() (string literal + a global array, +// both correctly in #8000-#BFFF) worked, while xm_update_info()'s hexbuf/ +// decbuf/timebuf (local variables, silently on WC's stack) corrupted the +// screen. Made static (i.e. real globals in our own DATA segment) to fix. +static char hexbuf[2]; +static char decbuf[3]; +static char timebuf[5]; + +void xm_update_info() +{ + u8 pattern, row; + u16 bpm; + u32 samples; + + esp_wr_reg8(ESP_REG_OBJ_HANDLE, xm_handle); + esp_cmd(ESP_CMD_TRACK_GET_INFO); + esp_wait_busy(2000); + + pattern = esp_rd_reg8(ESP_REG_TRACK_PATTERN); + row = esp_rd_reg8(ESP_REG_TRACK_ROW); + esp_rd_regs(ESP_REG_TRACK_BPM, &bpm, 2); + samples = esp_rd_reg32(ESP_REG_TRACK_SAMPLES); + + if (!total_samples) + total_samples = esp_rd_reg32(ESP_REG_TRACK_TOTAL_SAMPLES); + + put_hex2(hexbuf, pattern); + wc_prsrw(&win_xm, hexbuf, ROW_STATS, 10, 2); + + put_hex2(hexbuf, row); + wc_prsrw(&win_xm, hexbuf, ROW_STATS, 19, 2); + + put_dec3(decbuf, bpm); + wc_prsrw(&win_xm, decbuf, ROW_STATS, 27, 3); + + put_time(timebuf, samples / 44100UL); + wc_prsrw(&win_xm, timebuf, ROW_TIME, 7, 5); + + put_time(timebuf, total_samples / 44100UL); + wc_prsrw(&win_xm, timebuf, ROW_TIME, 15, 5); + + // Progress bar skipped for now per user request - reintroduce as its own + // separate step once Pattern/Row/BPM/Time are confirmed stable. +} + +void main_start() +{ + u8 frame_ctr; + + copy_file_name(); + + if (!state_esp) + state_esp = esp_init() ? 1 : 2; + + if (state_esp != 1) + { + error_esp(); + return; + } + + total_samples = 0; + + if (!play_xm()) + { + if (last_esp_status == ESP_ERR_OUT_OF_MEMORY) + error_oom(); + else + error_playback(); + return; + } + + // Draw the status window only AFTER play_xm() has already finished the + // file transfer and issued TRACK_INIT/TRACK_PLAY - drawing a window + // beforehand previously corrupted the esp32 transfer (see project memory). + wc_prwow(&win_xm); + xm_draw_static_labels(); + xm_draw_stats_labels(); + xm_update_info(); // single call for now - periodic re-calling is a separate step, once this is confirmed stable + + frame_ctr = 0; + + // poll keys + while (1) + { + __asm + halt + __endasm; + + // DEBUG: periodic xm_update_info() disabled - isolating whether repeated + // wc_prsrw() calls over time (not just one initial call) is what causes + // the screen to fill with garbage after a while. + // if (++frame_ctr >= 10) // ~5 updates/sec at 50Hz + // { + // frame_ctr = 0; + // xm_update_info(); + // } + + if (wc_key_pgdn()) // PgDn - unload and go to next file + { + esp_cmd(ESP_CMD_TRACK_STOP); + esp_wait_busy(10000); + esp_cmd(ESP_CMD_KILL_OBJECTS); + esp_wait_busy(10000); + wc_rresb(&win_xm); + wc_exit(WC_NEXT_FILE); + } + + if (wc_key_pgup()) // PgUp - unload and go to previous file + { + esp_cmd(ESP_CMD_TRACK_STOP); + esp_wait_busy(10000); + esp_cmd(ESP_CMD_KILL_OBJECTS); + esp_wait_busy(10000); + wc_rresb(&win_xm); + wc_exit(WC_PREV_FILE); + } + + if (wc_key_esc()) // Esc - unload and exit + { + esp_cmd(ESP_CMD_TRACK_STOP); + esp_wait_busy(10000); + esp_cmd(ESP_CMD_KILL_OBJECTS); + esp_wait_busy(10000); + wc_rresb(&win_xm); + wc_exit(WC_EXIT); + } + } +} + +// ------------------------------------------ +void main() +{ + __asm + ld (_ret_sp), sp + ld (_call_type), a + ld (_p_file_name), bc + ex af, af + ld (_file_ext), a + ld (_filesize), hl + ld (_filesize + 2), de + __endasm; + + switch (call_type) + { + case WC_CALL_EXT: + main_start(); + break; + + case WC_CALL_MENU: + about(); + break; + + default: + wc_exit(WC_EXIT); + } +} diff --git a/src/tsconf.h b/src/tsconf.h new file mode 100644 index 0000000..7adb4ef --- /dev/null +++ b/src/tsconf.h @@ -0,0 +1,195 @@ + +#pragma once + +__sfr __at 0x57 SPI_DATA; +__sfr __at 0x77 SPI_CTRL; + +__sfr __at 0xFE BORDER; + +__sfr __banked __at 0x00AF TS_VCONFIG; +__sfr __banked __at 0x00AF TS_STATUS; +__sfr __banked __at 0x01AF TS_VPAGE; +__sfr __banked __at 0x02AF TS_GXOFFSL; +__sfr __banked __at 0x03AF TS_GXOFFSH; +__sfr __banked __at 0x04AF TS_GYOFFSL; +__sfr __banked __at 0x05AF TS_GYOFFSH; +__sfr __banked __at 0x06AF TS_TSCONFIG; +__sfr __banked __at 0x07AF TS_PALSEL; +__sfr __banked __at 0x0FAF TS_BORDER; +__sfr __banked __at 0x10AF TS_PAGE0; +__sfr __banked __at 0x11AF TS_PAGE1; +__sfr __banked __at 0x12AF TS_PAGE2; +__sfr __banked __at 0x13AF TS_PAGE3; +__sfr __banked __at 0x15AF TS_FMADDR; +__sfr __banked __at 0x16AF TS_TMPAGE; +__sfr __banked __at 0x17AF TS_T0GPAGE; +__sfr __banked __at 0x18AF TS_T1GPAGE; +__sfr __banked __at 0x19AF TS_SGPAGE; +__sfr __banked __at 0x1AAF TS_DMASADDRL; +__sfr __banked __at 0x1BAF TS_DMASADDRH; +__sfr __banked __at 0x1CAF TS_DMASADDRX; +__sfr __banked __at 0x1DAF TS_DMADADDRL; +__sfr __banked __at 0x1EAF TS_DMADADDRH; +__sfr __banked __at 0x1FAF TS_DMADADDRX; +__sfr __banked __at 0x20AF TS_SYSCONFIG; +__sfr __banked __at 0x21AF TS_MEMCONFIG; +__sfr __banked __at 0x22AF TS_HSINT; +__sfr __banked __at 0x23AF TS_VSINTL; +__sfr __banked __at 0x24AF TS_VSINTH; +__sfr __banked __at 0x25AF TS_DMAWPD; +__sfr __banked __at 0x26AF TS_DMALEN; +__sfr __banked __at 0x27AF TS_DMACTR; +__sfr __banked __at 0x27AF TS_DMASTATUS; +__sfr __banked __at 0x28AF TS_DMANUM; +__sfr __banked __at 0x29AF TS_FDDVIRT; +__sfr __banked __at 0x2AAF TS_INTMASK; +__sfr __banked __at 0x2BAF TS_CACHECONF; +__sfr __banked __at 0x2CAF TS_DMANUMH; +__sfr __banked __at 0x2DAF TS_DMAWPA; +__sfr __banked __at 0x40AF TS_T0XOFFSL; +__sfr __banked __at 0x41AF TS_T0XOFFSH; +__sfr __banked __at 0x42AF TS_T0YOFFSL; +__sfr __banked __at 0x43AF TS_T0YOFFSH; +__sfr __banked __at 0x44AF TS_T1XOFFSL; +__sfr __banked __at 0x45AF TS_T1XOFFSH; +__sfr __banked __at 0x46AF TS_T1YOFFSL; +__sfr __banked __at 0x47AF TS_T1YOFFSH; + +// TS parameters +#define TS_FM_EN 0x10 + +// FPGA arrays +#define TS_FM_CRAM 0x0000 +#define TS_FM_SFILE 0x0200 + +// VIDEO +#define TS_VID_256X192 0x00 +#define TS_VID_320X200 0x40 +#define TS_VID_320X240 0x80 +#define TS_VID_360X288 0xC0 +#define TS_VID_RASTER_BS 6 + +#define TS_VID_ZX 0x00 +#define TS_VID_16C 0x01 +#define TS_VID_256C 0x02 +#define TS_VID_TEXT 0x03 +#define TS_VID_FT812 0x04 +#define TS_VID_NOGFX 0x20 +#define TS_VID_MODE_BS 0 + +// PALSEL +#define TS_PAL_GPAL_MASK 0x0F +#define TS_PAL_GPAL_BS 0 +#define TS_PAL_T0PAL_MASK 0x30 +#define TS_PAL_T0PAL_BS 4 +#define TS_PAL_T1PAL_MASK 0xC0 +#define TS_PAL_T1PAL_BS 6 + +// TSU +#define TS_TSU_T0ZEN 0x04 +#define TS_TSU_T1ZEN 0x08 +#define TS_TSU_T0EN 0x20 +#define TS_TSU_T1EN 0x40 +#define TS_TSU_SEN 0x80 + +// SYSTEM +#define TS_SYS_ZCLK3_5 0x00 +#define TS_SYS_ZCLK7 0x01 +#define TS_SYS_ZCLK14 0x02 +#define TS_SYS_ZCLK_BS 0 + +#define TS_SYS_CACHEEN 0x04 + +// MEMORY +#define TS_MEM_ROM128 0x01 +#define TS_MEM_W0WE 0x02 +#define TS_MEM_W0MAP_N 0x04 +#define TS_MEM_W0RAM 0x08 + +#define TS_MEM_LCK512 0x00 +#define TS_MEM_LCK128 0x40 +#define TS_MEM_LCKAUTO 0x80 +#define TS_MEM_LCK1024 0xC0 +#define TS_MEM_LCK_BS 6 + +// INT +#define TS_INT_VEC_FRAME 0xFF +#define TS_INT_VEC_LINE 0xFD +#define TS_INT_VEC_DMA 0xFB +#define TS_INT_VEC_WTP 0xF9 + +#define TS_INT_MSK_FRAME 0x01 +#define TS_INT_MSK_LINE 0x02 +#define TS_INT_MSK_DMA 0x04 +#define TS_INT_MSK_WTP 0x08 + +// DMA +#define TS_DMA_WNR 0x80 +#define TS_DMA_SALGN 0x20 +#define TS_DMA_DALGN 0x10 +#define TS_DMA_ASZ 0x08 + +#define TS_DMA_RAM 0x01 +#define TS_DMA_BLT 0x81 +#define TS_DMA_FILL 0x04 +#define TS_DMA_SPI_RAM 0x02 +#define TS_DMA_WTP_RAM 0x07 +#define TS_DMA_RAM_SPI 0x82 +#define TS_DMA_IDE_RAM 0x03 +#define TS_DMA_RAM_IDE 0x83 +#define TS_DMA_RAM_CRAM 0x84 +#define TS_DMA_RAM_SFILE 0x85 + +#define TS_WPD_GLU 0 +#define TS_WPD_COM 1 + +// SPRITES +#define TS_SP_XF 0x80 +#define TS_SP_YF 0x80 +#define TS_SP_LEAP 0x40 +#define TS_SP_ACT 0x20 + +#define TS_SP_SIZE8 0x00 +#define TS_SP_SIZE16 0x02 +#define TS_SP_SIZE24 0x04 +#define TS_SP_SIZE32 0x06 +#define TS_SP_SIZE40 0x08 +#define TS_SP_SIZE48 0x0A +#define TS_SP_SIZE56 0x0C +#define TS_SP_SIZE64 0x0E +#define TS_SP_SIZE_BS 1 + +#define TS_SP_PAL_MASK 0xF0 + +#define TS_SP_XF_W 0x8000 +#define TS_SP_YF_W 0x8000 +#define TS_SP_LEAP_W 0x4000 +#define TS_SP_ACT_W 0x2000 + +#define TS_SP_SIZE8_W 0x0000 +#define TS_SP_SIZE16_W 0x0200 +#define TS_SP_SIZE24_W 0x0400 +#define TS_SP_SIZE32_W 0x0600 +#define TS_SP_SIZE40_W 0x0800 +#define TS_SP_SIZE48_W 0x0A00 +#define TS_SP_SIZE56_W 0x0C00 +#define TS_SP_SIZE64_W 0x0E00 +#define TS_SP_SIZE_BS_W 9 + +#define TS_SP_X_MASK_W 0x01FF +#define TS_SP_Y_MASK_W 0x01FF +#define TS_SP_TNUM_MASK_W 0x0FFF +#define TS_SP_PAL_MASK_W 0xF000 + +// TILES +#define TS_TL_XF 0x40 +#define TS_TL_YF 0x80 +#define TS_TL_PAL_MASK 0x30 +#define TS_TL_PAL_BS 4 + +#define TS_TL_XF_W 0x4000 +#define TS_TL_YF_W 0x8000 + +#define TS_TL_TNUM_MASK_W 0x0FFF +#define TS_TL_PAL_MASK_W 0x3000 +#define TS_TL_PAL_BS_W 12 diff --git a/src/wc_api.c b/src/wc_api.c new file mode 100644 index 0000000..76b5a5c --- /dev/null +++ b/src/wc_api.c @@ -0,0 +1,41 @@ + +// This project now builds under SDCC 4.6.0 + `--sdcccall 1` (SDCC's +// register calling convention) - see build.bat for why this is pinned +// PER-PROJECT, independent of the rest of ft812sdk (which stays on 4.0.0). +// This lets us link directly against demyanenko-d/VGMPLAY.WMF's real, +// hardware-tested wc_api library (vgm_wc_api.lib, assembled verbatim from +// their src_sdcc/lib/wc_api/*.s with the SAME SDCC 4.6.0's sdasz80) instead +// of our own hand-rolled __naked wrappers - our attempts at PRSRW+PRIAT (in +// three different shapes: globals-based single function, two separate +// naked functions, and a stack-based hand-port of their EXX logic) all +// corrupted esp32 file loading in ways never fully root-caused. +// +// Their key-check constants (wc_key_esc=0x17, wc_key_pgup=0x19, +// wc_key_pgdn=0x1A) were confirmed to exactly match our own _ESC/_PGU/_PGD +// constants in wc_api.h before relying on them - same underlying WC #6006 +// API, just a different project's wrapper names. +// +// Everything below is just extern declarations for symbols the linker +// pulls out of vgm_wc_api.lib (added to build.bat) - no bodies here. +void wc_prwow(void *win); +void wc_rresb(void *win); +u8 wc_load512(u16 dest, u8 blocks); +u8 wc_key_esc(void); +u8 wc_key_pgup(void); +u8 wc_key_pgdn(void); +void wc_prsrw(void *win, const u8 *text, u8 y, u8 x, u16 len); +void wc_prsrw_attr(void *win, const u8 *text, u8 y, u8 x, u16 len, u8 attr); + +// wc_exit is ours, not theirs - it unwinds our own crt0.s's saved SP +// (_ret_sp) to return control to WC, so there's no equivalent in their +// library to borrow. Adjusted for sdcccall(1): a single u8 argument now +// arrives directly in A (per their types.h's documented convention), +// not on the stack. +void wc_exit(u8 rc) __naked +{ + rc; // to avoid SDCC warning + __asm + ld sp, (_ret_sp) + ret + __endasm; +} diff --git a/src/wc_api.h b/src/wc_api.h new file mode 100644 index 0000000..423e64e --- /dev/null +++ b/src/wc_api.h @@ -0,0 +1,309 @@ + +// WildCommander API Header +// Refer to plugins/READ_ME.TXT + +#pragma once + +//--------------------------------------- +// Addresses +#define _WCINT 0x5BFF // àäðåñ îáðàáîòêè int wild commander + +#define _PAGE0 0x6000 // íîìåð ñòðàíèöû ïîäêëþ÷åííîé ñ àäðåñà 0x0000-0x3fff +#define _PAGE1 0x6001 // íîìåð ñòðàíèöû ïîäêëþ÷åííîé ñ àäðåñà 0x4000-0x7fff +#define _PAGE2 0x6002 // íîìåð ñòðàíèöû ïîäêëþ÷åííîé ñ àäðåñà 0x8000-0xdfff +#define _PAGE3 0x6003 // íîìåð ñòðàíèöû ïîäêëþ÷åííîé ñ àäðåñà 0xc000-0xffff +#define _ABT 0x6004 // ôëàã âûñòàâëÿåòñÿ, åñëè áûë íàæàò ESC +#define _ENT 0x6005 // ôëàã âûñòàâëÿåòñÿ, åñëè áûë íàæàò ENTER +#define _WCAPI 0x6006 // òî÷êà äîñòóïà ê ôóíêöèÿì +#define _TMN 0x6009 // ñèíõðà. ïåðåìåííàÿ-òàéìåð, èíêðåìåíòèòñÿ ïî èíòó + +//--------------------------------------- +// API functions +#define _MNGC_PL 0x00 // âêëþ÷åíèå ñòðàíèöû íà 0xC000 (èç âûäåëåííîãî áëîêà) + // íóìåðàöèÿ ñîâïàäàåò ñ èñïîëüçóþùåéñÿ â +36 + // i:A' - íîìåð ñòðàíèöû (îò 0) + // 0xFF - ñòðàíèöà ñ ôîíòîì (1ãî òåêñòîâîãî ýêðàíà) + // 0xFE - ïåðâûé òåêñòîâûé ýêðàí (â í¸ì ïàíåëè) +#define _MNG0_PL 0x78 +#define _MNG8_PL 0x79 + +#define _PRWOW 0x01 // âûâîä îêíà íà ýêðàí + // i:IX - àäðåñ ïî êîòîðîìó ëåæèò ñòðóêòóðà îêíà (SOW) + +#define _RRESB 0x02 // còèðàíèå îêíà (âîññòàíîâëåíèå èíôîðìàöèè) + // i:IX - SOW + +#define _PRSRW 0x03 // ïå÷àòü ñòðîêè â îêíå + // i:IX - SOW + // HL - Text addres (äîëæåí áûòü â 0x8000-0xBFFF!) + // D - Y + // E - X + // BC - Length + +#define _PRIAT 0x04 // âûñòàâëåíèå öâåòà (âûçûâàåòñÿ ñðàçó ïîñëå PRSRW) + // i:PRSRW - âûñòàâëåííûå êîîðäèíàòû è äëèíà + // A' - öâåò + +#define _GADRW 0x05 // ïîëó÷åíèå àäðåñà â îêíå + // i:IX - SOW + // D - Y + // E - X + // o:HL - Address + +#define _CURSOR 0x06 // ïå÷àòü êóðñîðà + // i:IX - SOW + +#define _CURSER 0x07 // ñòèðàíèå êóðñîðà (âîññòàíîâëåíèå öâåòà) + // i:IX - SOW + +#define _YN 0x08 // ìåíþ ok/cancel + // i:A' + // 0x01 - èíèöèàëèçàöèÿ (âû÷èñëÿåò êîîðäèíàòû) + // 0x00 - îáðàáîòêà íàæàòèé (âûçûâàòü ðàç â ôðåéì) + // 0xFF - âûõîä + // o:NZ - âûáðàí CANCEL + // Z - âûáðàí OK + +#define _ISTR 0x09 // ðåäàêòèðîâàíèå ñòðîêè + // i:A' + // 0xFF - èíèöèàëèçàöèÿ (ðèñóåò êóðñîð) + // i:HL - àäðåñ ñòðîêè + // DE - CURMAX+CURNOW (äëèíà ñòðîêè + íà÷àëüíàÿ ïîçèöèÿ êóðñîðà â íåé) + // 0x00 - îïðîñ êëàâèàòóðû + // >îïðàøèâàåò LF,RG,BackSpace + // >ñîáñòâåííî ðåäàêòèðóåòñÿ ñòðîêà + // >íóæíî âûçûâàòü êàæäûé ôðåéì + // 0x01 - âûõîä (ñòèðàåò êóðñîð) + +#define _NORK 0x0A // ïåðåâîä áàéòà â HEX (òåêñòîâûé ôîðìàò) + // i:HL - Text Address + // A - Value + +#define _DMAPL 0x0D // ðàáîòà ñ DMA + // i: A' - òèï îïåðàöèè + // 0x00 - èíèò S è D (BHL - Source, CDE - Destination) + // 0x01 - èíèò S (BHL) + // 0x02 - èíèò D (CDE) + // 0x03 - èíèò S ñ ïàãîé èç îêíà (HL, B - 0-3 [íîìåð îêíà]) + // 0x04 - èíèò D ñ ïàãîé èç îêíà (HL, B - 0-3 [íîìåð îêíà]) + // 0x05 - âûñòàâëåíèå DMA_T (B - êîë-âî á¸ðñòîâ) + // 0x06 - âûñòàâëåíèå DMA_N (B - ðàçìåð á¸ðñòà) + // + // 0xFD - çàïóñê áåç îæèäàíèÿ çàâåðøåíèÿ (o:NZ - DMA çàíÿòà) + // 0xFE - çàïóñê ñ îæèäàíèåì çàâåðøåíèÿ (o:NZ - DMA çàíÿòà) + // 0xFF - îæèäàíèå ãîòîâíîñòè äìà + // + // â ôóíêöèÿõ 0x00-0x02 ôîðìàò B/C ñëåäóþùèé: + // [7]:%1 - âûáîð ñòðàíèöû èç áëîêà âûäåëåííîãî ïëàãèíó (0-5) + // %0 - âûáîð ñòðàíèöû èç âèäåî áóôåðîâ (0-31) + // [6-0]:íîìåð ñòðàíèöû + +#define _TURBOPL 0x0E // i:B - âûáîð Z80/AY + // 0x00 - ìåíÿåòñÿ ÷àñòîòà Z80 + // i:C - %00 - 3.5 MHz + // %01 - 7 MHz + // %10 - 14 MHz + // %11 - 28 MHz (â äàííûé ìîìåíò 14MHz) + // 0x01 - ìåíÿåòñÿ ÷àñòîòà AY + // i:C - %00 - 1.75 MHz + // %01 - 1.7733 MHz + // %10 - 3.5 MHz + // %11 - 3.546 MHz + +#define _GEDPL 0x0F // âîññòàíîâëåíèå ïàëèòðû, âñåõ îôñåòîâ è txt ðåæèìà + // ! îáÿçàòåëüíî âûçûâàòü ïðè çàïóñêå ïëàãèíà! + // (âêëþ÷àåò îñíîâíîé txt ýêðàí) + // i:none + +// êëàâèàòóðà: NZ - êëàâèøà íàæàòà +//-------------------------------------------------- +#define _SPKE 0x10 // (SPACE) +#define _UPPP 0x11 // (UP Arrow) +#define _DWWW 0x12 // (Down Arrow) +#define _LFFF 0x13 // (Left Arrow) +#define _RGGG 0x14 // (Right Arrow) +#define _TABK 0x15 // (Tab) +#define _ENKE 0x16 // (Enter) +#define _ESC 0x17 // (Escape) +#define _BSPC 0x18 // (Backspace) +#define _PGU 0x19 // (pgUP) +#define _PGD 0x1A // (pgDN) +#define _HOME 0x1B +#define _END 0x1C +#define _F1 0x1D +#define _F2 0x1E +#define _F3 0x1F +#define _F4 0x20 +#define _F5 0x21 +#define _F6 0x22 +#define _F7 0x23 +#define _F8 0x24 +#define _F9 0x25 +#define _F10 0x26 +#define _ALT 0x27 +#define _SHIFT 0x28 +#define _CTRL 0x29 +#define _KBSCN 0x2A // îïðîñ êëàâèø + // i:A' - îáðàáîò÷èê + // 0x00 - ó÷èòûâàåò SHIFT (TAI1/TAI2) + // 0x01 - âñåãäà âûäàåò êîä èç TAI1 + // o: NZ: A - TAI1/TAI2 (see PS2P.ASM) + // Z: A=0x00 - unknown key + // A=0xFF - buffer end + +#define _CAPS 0x2C // (Caps Lock) +#define _ANYK 0x2D // any key +#define _USPO 0x2E // pause for keyboard ready (recomended for NUSP) +#define _NUSP 0x2F // waiting for any key + +// ðàáîòà ñ ôàéëàìè: +//--------------------------------------- +#define _LOAD512 0x30 // ïîòîêîâàÿ çàãðóçêà ôàéëà + // i:HL - Address + // B - Blocks (512b) + // o:HL - New Value + +#define _SAVE512 0x31 // ïîòîêîâàÿ çàïèñü ôàéëà + // i:HL - Address + // B - Blocks (512b) + // o:HL - New Value + +#define _GIPAGPL 0x32 // ïîçèöèîíèðîâàòü íà íà÷àëî ôàéëà + // (ñðàçó ïîñëå çàïóñêà ïëàãèíà — óæå âûçâàíà) + +#define _TENTRY 0x33 // ïîëó÷èòü ENTRY(32) èç êîììàíäåðà + // (ñòðóêòóðà êàê â êàòàëîãå FAT32) + // i:DE - Address + // o:DE(32) - ENTRY + +#define _CHTOSEP 0x34 // ðàçëîæåíèå öåïî÷êè àêòèâíîãî ôàéëà â ñåêòîðà + // i:DE - BUFFER (êóäà êèäàòü íîìåðà ñåêòîðîâ) + // BC - BUFFER END (=BUFFER+BUFFERlenght) + +#define _TENTRYN 0x35 // reserved ??? + +#define _TMRKDFL 0x36 // ïîëó÷èòü çàãîëîâîê ìàðêèðîâàííîãî ôàéëà + // i:HL - File number (1-2047) + // DE - Address (32byte buffer) [0x8000-0xBFFF!] + // (if HL=0// o:BC - count of marked files) + // o:NZ - File not found or other error + // Z - Buffer updated + // >òàê æå äåëàåòñÿ ïîçèöèîíèðîâàíèåíà íà íà÷àëî ýòîãî ôàéëà!!! + // >ñîîòâ. ôóíêöèè LOAD512/SAVE512 áóäóò ÷èòàòü/ïèñàòü ýòîò ôàéë îò íà÷àëà. + +#define _TMRKNXT 0x37 // reserved ??? + +#define _STREAM 0x39 // ðàáîòà ñ ïîòîêàìè + // i:D - íîìåð ïîòîêà (0/1) + // B - óñòðîéñòâî: 0-SD(ZC) + // 1-Nemo IDE Master + // 2-Nemo IDE Slave + // C - ðàçäåë (íå ó÷èòûâàåòñÿ) + // BC=0xFFFF: âêëþ÷àåò ïîòîê èç D (íå âîçâðàùàåò ôëàãîâ) + // èíà÷å ñîçäàåò/ïåðåñîçäàåò ïîòîê. + // o:NZ - óñòðîéñòâî èëè ðàçäåë íå íàéäåíû + // Z - ìîæíî íà÷èíàòü ðàáîòàòü ñ ïîòîêîì + +#define _MKFILE 0x3A // ñîçäàíèå ôàéëà â àêòèâíîì êàòàëîãå + // i:DE(12) - name(8)+ext(3)+flag(1) + // HL(4) - File Size + // o:NZ - Operation failed + // A - type of error (in next versions!) + // Z - File created + // ENTRY(32) [use TENTRY] + +#define _FENTRY 0x3B // ïîèñê ôàéëà/êàòàëîãà â àêòèâíîé äèðåêòîðèè + // i:HL - flag(1),name(1-12),0x00 + // flag:0x00 - file + // 0x10 - dir + // name:"NAME.TXT","DIR"... + // o: Z - entry not found + // NZ - CALL GFILE/GDIR for activating file/dir + // [DE,HL] - file length + +#define _LOAD256 0x3C // reserved ??? +#define _LOADNONE 0x3D // reserved ??? + +#define _GFILE 0x3E // âûñòàâèòü óêàçàòåëü íà íà÷àëî íàéäåííîãî ôàéëà + // (âûçûâàåòñÿ ïîñëå FENTRY!) + +#define _GDIR 0x3F // ñäåëàòü íàéäåííûé êàòàëîã àêòèâíûì + // (âûçûâàåòñÿ ïîñëå FENTRY!) + +// ðàáîòà ñ ðåæèìàìè ãðàôèêè +//--------------------------------------- +#define _MNGV_PL 0x40 // âêëþ÷åíèå âèäåî ñòðàíèöû + // i:A' - íîìåð âèäåî ñòðàíèöû + // 0x00 - îñíîâíîé ýêðàí (òõò) + // >ïàëèòðà âûñòàâëÿåòñÿ àâòîìàòîì + // >êàê è âñå ðåæèìû è ñìåùåíèÿ + // 0x01 - 1é âèäåî áóôåð (16 ñòðàíèö) + // 0x02 - 2é âèäåî áóôåð (16 ñòðàíèö) + +#define _MNGCVPL 0x41 // âêëþ÷åíèå ñòðàíèöû èç âèäåî áóôåðîâ + // i:A' - íîìåð ñòðàíèöû + // 0x00-0x0F - ñòðàíèöû èç 1ãî âèäåî áóôåðà + // 0x10-0x1F - ñòðàíèöû èç 2ãî âèäåî áóôåðà + +#define _GVmod 0x42 // âêëþ÷åíèå âèäåî ðåæèìà (ðàçðåøåíèå+òèï) + // i:A' - âèäåî ðåæèì + // [7-6]: %00 - 256x192 + // %01 - 320x200 + // %10 - 320x240 + // %11 - 360x288 + // [5-2]: %0000 + // [1-0]: %00 - ZX + // %01 - 16c + // %10 - 256c + // %11 - txt + +#define _GYoff 0x43 // âûñòàâëåíèå ñìåùåíèÿ ýêðàíà ïî Y + // i:HL - Y (0-511) + +#define _GXoff 0x44 // âûñòàâëåíèå ñìåùåíèÿ ýêðàíà ïî X + // i:HL - X (0-511) + +#define _GVtm 0x69 // âûñòàâëåíèå ñòðàíèöû äëÿ TileMap +#define _GVtl 0x70 // âûñòàâëåíèå ñòðàíèöû äëÿ TileGraphics +#define _GVsgp 0x71 // âûñòàâëåíèå ñòðàíèöû äëÿ SpriteGraphics + +typedef enum +{ + WC_WIND_HDR_TXT = 1, +} WC_WIND_TYPE; + +typedef struct +{ + WC_WIND_TYPE type; + u8 curs_col_mask; + u8 x_pos; + u8 y_pos; + u8 x_size; + u8 y_size; + u8 attr; + u8 res0; + u16 restore_addr; + u8 div0; + u8 div1; + u16 *hdr_txt; + u16 *ftr_txt; + u16 *wnd_txt; +} WC_TX_WINDOW; + +typedef enum +{ + WC_CALL_EXT = 0x00, + WC_CALL_ONLOAD = 0x01, + WC_CALL_TIMER = 0x02, + WC_CALL_MENU = 0x03, + WC_CALL_EDIT = 0x14, +} WC_CALL_TYPE; + +typedef enum +{ + WC_EXIT = 0, + WC_TYPE_UNK = 1, + WC_NEXT_FILE = 2, + WC_REREAD_DIR = 3, + WC_PREV_FILE = 4, +} WC_EXIT_SIGNAL; diff --git a/src/wc_h.c b/src/wc_h.c new file mode 100644 index 0000000..3b5b827 --- /dev/null +++ b/src/wc_h.c @@ -0,0 +1,26 @@ + +#include +#include + +static const WC_HDR hdr = +{ + /* +00 -reserved- */ "", + /* +16 Magic string */ {'W', 'i', 'l', 'd', 'C', 'o', 'm', 'm', 'a', 'n', 'd', 'e', 'r', 'M', 'D', 'L'}, + /* +32 Format version */ 7, + /* +33 -reserved- */ "", + /* +34 Number of pages */ 1, + /* +35 Page at 0x8000 */ 0, + /* +36 Page definitions */ { + /* +0 Page, +1 NBlocks */ {0, N_BLK0} + /* */ }, + /* +48 -reserved- */ "", + /* +64 Extensions */ { + /* */ {'X', 'M', ' '}, + /* */ {'X', 'M', 'Z'}, + /* */ {'S', '3', 'M'} + /* */ }, + /* +160 0x00 */ "", + /* +161 Max file size */ 0xFFFFFFFF, + /* +165 Plugin name */ "XM Player", + /* +197 Starting condition */ SC_MENU // also run by extension +}; diff --git a/src/wc_h.h b/src/wc_h.h new file mode 100644 index 0000000..d32d3dc --- /dev/null +++ b/src/wc_h.h @@ -0,0 +1,36 @@ + +#pragma once + +#include + +typedef enum +{ + SC_EXT, + SC_ONLOAD, + SC_TIMER, + SC_MENU, +} SCOND; + +typedef struct +{ + u8 page; + u8 size; +} WC_HDR_BLK; + +typedef struct +{ + u8 res0[16]; /* +00 reserved */ + char mdl[16]; /* +16 Magic string */ + u8 ver; /* +32 Format version */ + u8 res1[1]; /* +33 reserved */ + u8 num_pages; /* +34 Number of pages */ + u8 page2; /* +35 Page at 0x8000 */ + WC_HDR_BLK blk[6]; /* +36 Page definitions */ + u8 res2[16]; /* +48 -reserved- */ + char ext[32][3]; /* +64 Extensions */ + u8 res3[1]; /* +160 0x00 */ + u32 file_max_size; /* +161 Max file size */ + char name[32]; /* +165 Plugin name */ + SCOND cond; /* +197 Starting condition */ + u8 res4[314]; /* +198 -reserved- */ +} WC_HDR; diff --git a/vgm_wc_api.lib b/vgm_wc_api.lib new file mode 100644 index 0000000000000000000000000000000000000000..61222b03e2627099f4de5f99d55dba05183324b5 GIT binary patch literal 28770 zcmds=JB%br5kONI7^4FYgpNPdiQn;?u5WkGaU3@@J;Mp^19uBLemC3GzvRc%&MuVjxHfF+F12ucSTpd zjEszo{LJG|b(g)XrwaDU|pAoaC`{rBL4Y0?GSdQ3~Y)mn0utD24K& zACP?br%IuGLpMdX2`Q-0OKJ}(jD4+fl$rFE7 z3gt8ZBKaIV6UyfwCHaD*6w2WtN#hx%P+Yig6z@AE{*_WF!I~ueky0qp&q$iTPzt5> zE0Xqal|niC1Id$bDTVUIKa)K5ccoCi^ly?czg;PmXC5OtenKgflP5_|pHm8@1NVb+ zHY7R!p;9Pcfx19>_8%l)Z7PNGwP#75e_AP&7vOi47jKb#y{{C?H{iKYUit~i%Wo)! zatodZ<(t1F`PQ3Cp}g`4$+urs3gx@sBl$jj4&_x~j&cEYhI0EM$)!>XrFTfuf1nh~ za7{A$u~I1GCrMs|dqtT57nJE|NoJsL_VDoH;_&$7-0)xlz_1Ooo%}rTuAlVH6Dqv-R>i`?2A8)}IYtUuR24-Tv~vQDoimXwWym zVKf|12F7*cMR#O1u0hCOQ%U+)khepx0RWzQhFU)(OvWu(k ztUoask5_Ah@SV$5ZTeYn^WlLlm$6uVNO|;Q`XEWYvq)+bIOkFva9*j zFi3pn@hpe>WB?62(t z``z*SqMK)H`km!qGU%?1FPO}`eLpf7V`1bO6^Vtj`OLU}I(YCPdw0`2mSdRSvE9IQ zHgfNoO%MyMb_s>;yid0CKH1CrWH0ZN_pHL%e0eAPEQ{sT`qW~%GF_oAy6CP=AF){8 zpBr9tIhb`#16&SP<32RTi(YqPwCK%Suic#*_O*of48vG;?+vVaTlJO`>o&lh4Z4Qs zgtFDZu-0`>53!yu@AS>yWqo&fIXA0w{rY-gxXtUCYM6muHte&0^W88myL|vXW!6m} zf>k%LSbHvXXqgh-05c`J?PW`_*=0(ShGZAUZD{kxw&piQn<~TFv`eufH>KF?>tFBz zH}P(ijdwlQZ8jm&_1!q!b#5QL@?3cEtm8RdsK%A!JEO_`vO95B*VD`SWOeYo6NeNB zFFT0?b2@{e8~+>}I~S)fcFvsD_`$$AafXxbXazxbx8GknE?ks^B$Juyyv)Wr_*uHA}2U=g0^$oap2yYt}gVP(<9?zxY;<`AsD43!fGU9FBc z9eEIp(09TU=j=pN2@NU+65x5d1)NJvhk~*7loQ*wA&%|zv~m$JtwF>K><7Vl$jfc* zgV#K1ZFTUPFQvTZ%l+|cN_puaMBXfEz-za3i|7!#v)aXGxtv!Y~O`EXAq!;yS_pC2-DiViKM7;I{jqVwy3o^`zkZ77K!u?C}U zg+diWHR#K9e;+`VSl9btDarL#b)lagRg0#BYV`%mS=Ck0Vd2e*DhrSW=UZe1%L)uN z2h789?bff@bL%9Z2n61pl!VJ9fq948NT6~N2~;2@0cOF8VMdg7B^G79jPD**Ya66o z#DY|aY4|)Em~Q6VMYSkqgvwbg3L-kKU`G<^hz`b^Wu}2%6Z7o#u>j>V7NB597U&`) zCp^dTV`z>abF&aQ!H}RR&&M>Y+Qpg|=zGnA4j=ALgaUxroqecdu&`zIx9R>K37R9y zxTm(dVr^6FDW7A-ycW*+$V_TI6=94mDiyyJbjC;mr=t=S<$kx?C|WCLp(qMU@a{w` z&@jwYmff^;RD!c`wUI#OA`+-TOd=?CxJZIB*fEMyoA9cQ_((YmMM3vN8g^un?tfqy zQP%%7l81}qjZzwrM5Z5Jo+&$7z@k!+0M2UKkq-4p&}PohF-HzBEJioFVJqB6Yl3;3 zq*;~rSwY2UAChhZm`~gXq2<4Hl~P`vuG6bZn26Td2HIMUmiMY z%Rm~l>l$gyuEjKF*J2vwY2t(iu5i&fN^QfdmOI0WMdeZ)s6)yFJVse3m+-)~J+<*b zGZqA`-KJ%#P4s zz$(;|MX5=@I&9X-qA6z46tm#Rpu<+3ELvg~EinsT24DM&cAYHRVivFjTi8Z;^E#Tv zQJpM~#4KR3nUF>KWMAShaD$Piu^E{ZMO!;$y->N72I`RV@c83+*jh!#QOcv@suMIk zP%gy*Dx@?bzIEW9vf8Wzl}mA;4k-_h??rJpU2Qy2xs(U$5c4RXPD#86?jx*`$6elH zoEs)o@CL;^7&*~Kn9KfpCM?~+AlM>NNq(orF zeQAW=XeGIu8i_1mcc7REDv=U_g&?IwaE2PXMc6W2U!M!gr941|mou zfn8?w!_NiEJ?b9(DPuI-I7-%*aobAbZTKvbeX~;YNc2c;#AjrG8XhdSO#PHbsjwV? zekyW_w+`=xO{`1IhnFdg&j?_8l#2UcV&yC>UcpY7SceD)B-V4*#=?%45SD4#Df!gq z+`yW(D%etlF&^G3Y|*ceB`6oO1Reh?mR28E!V*uUV8+YUc0glAp>h_?g5_9=4iQXP zxen_DgYxMfur54}gG>utRGB9WVShjsPln1_G=eaHEg&iop(xs~hRXp<_p9MHHOLRr zHZ^@d0d8~C+YoUp+p*Qg(`x}cNAZ~k1)JTRj=6vE7MxGE-LD2U2+Qd=;alsNvEMC7 zHoL*JAM8-1f7YTztaUtbC8_qZTCcj_ODktpd%>VlD-cyXzzZ28Mol8M;j5fPwVs?# zv5}$J$BwU%F)~6HbifX?rvZ;&$rq4v7K{St7~kKHmXThq3VWhAEvsNrQOpAl^Qn&q zD3|g86?@CL@K~kVc%X724^*)S9#Q%5i0lJTl&X)1+&=LB_P_)7FY)XH57VlR z2PzlZ2ddZy53YUSIb!wkklP2|-yV2Cyuq^%JVLED9;jSsAE;svJVF)^JUxzJKu1~{ zdsN&zipp6qiuR78f*n!NlC#|LF>41GC0&?(vn&z?dE1O40f_*PumuuE+d*HV&oZvd zmuTgz=P&RjTEULbjU9Z-t7A8BF1Iy!z+RA)W45dYXvN1o6R*eSVA|O8ydwrL@aNbH?ikE(&h)X z0O$TtOpH-7O_x9ktU8a60JO|E9Ut#u-Xz+FFq@b-9iv#^pN@+tipj5eeFQqUN3M7Z z3!HiZ=c}_Sz92nL8bs9|(ad4_)Cu|&efT?*M$oQy3JWP`(SXfM`OQGzp9n{;N1+Tx zPIR7b1u)8jm1cB&H;fn|=WycbBVoz2dyZ$HR+(-EXC3Fn?DlRs-tlIB(6Zswd(Npo zp!5{hJDGEgP;YcVKeOKaidIa@S@l+6#iT)0ZSnE1>A|rM%X4YapC({>bLfeyjCJF` zd%(is7npIZLk6Tc+Y#B>inJZaxs7Dn+nCGN`3u_;Q>V6Cxee?DHu($4@0{K|%8maB zz&5wB_2ZU{M%$*pDZ#5vAA*rewMoiZwOMd3a(sWH$_$}{)o$7?pR~hBS^r6mxVe{R znL{{^w-OWldmStyu(B@KP3zke0l6WU7u~$ZW4o3^r||Y{-Qf3G)(uNLa+4{Rfn#l6 z)7}TFqq0aosOYb*d3ztAPspvx>s_}!ke7ja#KBH#tpffEC#gfK+ddmQ?WOWgS%