Lesson P27+20 - Sound on the SNES / Super Famicom: the SPC700

Programming the SNES - covers hardware via 6502 emulation mode (65816 coming next year!)
Post Reply
User avatar
akuyou
Posts: 240
Joined: Mon Apr 22, 2019 3:19 am

Lesson P27+20 - Sound on the SNES / Super Famicom: the SPC700

Post by akuyou » Mon Sep 02, 2019 9:35 pm



http://www.chibiakumas.com/6502/platform3.php#LessonP27

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



http://www.chibiakumas.com/6502/platform3.php#LessonP28

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!
Chibi Akuma(s) Comedy-Horror 8-bit Bullet Hell shooter! // 「チビ悪魔」可笑しいゴシックSTG ! // Work in Progress: ChibiAliens

Interested in CPU's :Z80,6502,68000,6809,ARM,8086,RISC-V
Learning: 65816,ARM,8086,6809

SleepingBurrito
Posts: 4
Joined: Wed Aug 07, 2019 1:00 pm

Re: Lesson P27+20 - Sound on the SNES / Super Famicom: the SPC700

Post by SleepingBurrito » Mon Sep 16, 2019 1:02 pm

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.

beethead
Posts: 1
Joined: Sun Sep 15, 2019 5:07 am

Re: Lesson P27+20 - Sound on the SNES / Super Famicom: the SPC700

Post by beethead » Mon Sep 16, 2019 3:39 pm

SleepingBurrito wrote:
Mon Sep 16, 2019 1:02 pm
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.

User avatar
akuyou
Posts: 240
Joined: Mon Apr 22, 2019 3:19 am

Re: Lesson P27+20 - Sound on the SNES / Super Famicom: the SPC700

Post by akuyou » Mon Sep 16, 2019 9:21 pm

beethead wrote:
Mon Sep 16, 2019 3:39 pm
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...

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
Chibi Akuma(s) Comedy-Horror 8-bit Bullet Hell shooter! // 「チビ悪魔」可笑しいゴシックSTG ! // Work in Progress: ChibiAliens

Interested in CPU's :Z80,6502,68000,6809,ARM,8086,RISC-V
Learning: 65816,ARM,8086,6809

Post Reply

Return to “Super Nintendo Assembly Programming”