Programming the SNES - covers hardware via 6502 emulation mode (65816 coming next year!)
4 posts • Page 1 of 1
The SNES has a dedicated sound processor - which is a pain!, unfortunately it's a custom chip which uses a totally different instruction set - which makes it a total F ing pain!
Lets learn how we can 'tame' the SPC700
OK, the SPC700 now has our driver running on it, and it will make whatever register changes we ask.
Now we can use this to write ChibiSound on the 65816, and get our sound effects playing!
Wow that is a lot to go though. I wonder what other people use for the SPC700. Also was the SPC700 only for the snes, googling it only shows up snes stuff but it may just be them main thing that used it.
WLA-DX, bass and Asar assemblers support SPC700 and 65816. Also, there's an SPC700 macro set for CA65. One of the oldest ways was to use Table Assembler with an SPC700 opcode/instruction table which can still be found online. Some of those assemblers use a 6502-like instruction instead of the standard SPC700 mnemonics.
Thanks for the advice on the Assemblers - using vasm and cobbling together an 'assembler' like I did here wasn't really a good solution, but I was only trying to do a very basic job here and didn't want to source and learn an assembler...beethead wrote: ↑Mon Sep 16, 2019 3:39 pmWLA-DX, bass and Asar assemblers support SPC700 and 65816. Also, there's an SPC700 macro set for CA65. One of the oldest ways was to use Table Assembler with an SPC700 opcode/instruction table which can still be found online. Some of those assemblers use a 6502-like instruction instead of the standard SPC700 mnemonics.
It would have been a big help if I had a SNES emulator with a built in SPC700 debugger - so I could check what the processor was doing... when I was learning and testing the code, I was programming 'blind' - unable to see what the SPC700 CPU was actually doing or if it had crashed.
To help debug it, I would write register values and fixed values to the ports, and print them from the 65816 - so I could figure out what's going on, and check things were working...
It's a shame, the CPU seems a nice processor - but learning a whole CPU just for a sound chip - when a Z80 or regular 6502 feel like they could have done the job was annoying