Repository navigation
Rachael's SPC700 in C, with its APU - #104
Merged
Merged
Conversation
lib/rachael/spc700.c ports dampf's SPC700 (all 256 opcodes, cycle by cycle); apu.c puts it on Rachael's audio RAM with the I/O registers, the timers and the ports of dampf.emu.Apu, without the boot ROM. Not used by the library yet: that is step 2. RachaelSpc700Test runs it against dampf's SPC700 on 200 random states per opcode in every build, against the SingleStepTests suite with -PcpuTests, and runs small APU programs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
skerkewitz
approved these changes
Nov 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
This is step 1 of "Krautrecker's songs on the desktop and the web": an SPC700 in C for Rachael, with the APU around it. The step comes from the decision that the desktop plays Krautrecker's songs by running its driver on Rachael, not the preview's WAVs (ADR-6G3QXFJ0). The library doesn't use it yet; step 2 connects it through the ports.
How
lib/rachael/spc700.cis a port ofdampf.emu.Spc700: all 256 opcodes, cycle by cycle, through a bus of three function pointers (read, write, idle). The structure follows the Java version function for function.lib/rachael/apu.cputs it on Rachael's audio RAM (sdevkit__sound.aram), asdampf.emu.Apudoes:$F0-$FF;$F3writes going to her DSP (sdevkit__dsp_write), and reads of$F3returning the register as last written.apu.cdoes differently from the Java APU:sdevkit__apu_jump, with the registers the boot ROM leaves).rachael.h. The desktop and web builds compile both files, unused for now.Verified
./gradlew build: 1300 tests, 0 failed, including the desktop and web builds of every example, now with these two files.RachaelSpc700Test, which compiles the C withcc -Wall -Wextra -Werror:-PcpuTests=1000: 161,095 of 161,095 pass, every cycle included.$F2/$F3and reads back, CONTROL$30clears the ports from the CPU, and a read at$FFC0with the boot ROM mapped is counted.What follows
docs/roadmap.md;docs/testing.md; therachael/row oflib/README.md.Open
Step 2: the library talks to Rachael through the ports, and the SPC700's time has to line up with the desktop's frames.
🤖 Generated with Claude Code