-
Notifications
You must be signed in to change notification settings - Fork 9
How to build
The following variable strings are included in codes:
| Variable String | Replacement String | Example |
|---|---|---|
$CAP_FILE_VER |
File version | 2.0.0.0 |
$CAP_PRODUCT_VER |
Product version | 2.0.0 |
$YEAR |
Current year | 2024 |
$DSP_ALIGN |
(v2.20.5+) Align adjustment of DSP memory address Details: If ERROR 104 occurs when started SPCPLAY |
0 |
These variables are not automatically replaced, so please replace them yourself.
I recommend copying the files and replacing them automatically with a batch file.
:: Required v2.20.1+ ::
Required software for build:
- Free Pascal 3.2.2 (Intel x86/i386)
Build commands:
windres.exe -l 0x411 -D "NDEBUG" -i spcplay.rc -o spcplay.res
fpc.exe -dFREEPASCAL -Pi386 -Twin32 -vewin -ospcplay.exe spcplay.dpr
strip.exe -s -x spcplay.exe
:: Required v2.18.0 - v2.20.0 ::
Required software for build:
- Borland Delphi 6 UP2 RTL3
Build commands:
brcc32.exe -l 0x411 -d "NDEBUG" -fo spcplay.res spcplay.rc
dcc32.exe spcplay.dpr
:: Required v2.18.0+ ::
Required software for build:
- Microsoft Visual C++ 6.0 Service Pack 6
- Netwide Assembler 2.10.09
Build commands:
mkdir Release
nasm.exe -D WIN32 -D STDCALL -O2 -w-macro-params -f win32 -o Release\SPC700.obj SPC700.asm
nasm.exe -D WIN32 -D STDCALL -O2 -w-macro-params -f win32 -o Release\DSP.obj DSP.asm
nasm.exe -D WIN32 -D STDCALL -O2 -w-macro-params -f win32 -o Release\APU.obj APU.asm
rc.exe /l 0x411 /d "NDEBUG" /fo Release\version.res version.rc
cl.exe @option\snesapu-cl.txt
link.exe @option\snesapu-link.txt
For 3rd-party players:
copy /y thirdparty\* .
: (nasm, rc, cl)
link.exe @option\snesapu-3rd-link.txt
ERROR 104 is a memory map error, SPCPLAY has stopped the operation of SNESAPU for safety reasons.
In this state, the address to a certain variable is invalid, which could lead to memory-leak and buffer-overflow.
Depending on the environment or builder state, you may need to adjust memory map.
How to fix:
- Change
$DSP_ALIGNvariable to0,64,128, or192, and rebuild. - Change this value to other until the ERROR 104 does not occur.
The builder may generate a map file.
If "SNESAPU.map" file output to the "Release" folder after built, this will give you a hint.
Build will be successful when the address of "_mix" ends with 00.
0002:00123300 _mix 10130300 DSP.obj
⬆️ ⬆️