Raw APU (SPC700) access — IPL upload and execution. More...
#include <snes/types.h>Go to the source code of this file.
Functions | |
| void | apuExecute (u16 spcAddr) |
| End the upload session and start APU execution. | |
| void | apuReset (void) |
| Hot-swap: return a cooperating APU program to the IPL ROM. | |
| void | apuUpload (const u8 *src, u16 spcAddr, u16 size) |
| Upload a memory block into APU RAM via the IPL protocol. | |
| void | apuWaitBoot (void) |
| Block until the IPL ROM signals readiness ($AA/$BB). | |
Raw APU (SPC700) access — IPL upload and execution.
The S-SMP boots into a 64-byte IPL ROM speaking a handshake protocol over the APU I/O ports ($2140-$2143). This module drives it from C: wait for boot, push a wla-spc700-assembled binary into APU RAM, and start it. It is the modern, ABI-verified alternative to the legacy snesmod path for projects that want direct DSP control.
Build side: list your APU program in the example Makefile's SPCSRC (e.g. SPCSRC := player.spc700.asm); common.mk assembles it with wla-spc700 against templates/memmap_spc700.inc into a flat player.spc700.bin you .incbin and upload.
| void apuExecute | ( | u16 | spcAddr | ) |
End the upload session and start APU execution.
| spcAddr | Entry point in APU RAM (typically the upload base) |
| void apuReset | ( | void | ) |
Hot-swap: return a cooperating APU program to the IPL ROM.
Writes APU_RESET_MAGIC ($FE) to I/O port 0 and blocks until the IPL boot ROM signals ready again. The running APU program must cooperate by polling for the magic and running the APU_CHECK_RESET idiom from templates/memmap_spc700.inc (silence the DSP, ack on its output ports, jump back to the IPL at $FFC0).
On return, upload the next program with apuUpload()/apuExecute() — do NOT call apuWaitBoot() again (apuReset() already consumed the ready handshake).
Upload a memory block into APU RAM via the IPL protocol.
| src | Source in ROM/WRAM (far pointer — the bank byte is honoured, SUPERFREE sections are fine) |
| spcAddr | Destination address in APU RAM (e.g. 0x0200) |
| size | Byte count |
| void apuWaitBoot | ( | void | ) |
Block until the IPL ROM signals readiness ($AA/$BB).
Call once after reset before any upload. consoleInit() does not touch the APU.