KOEI SPC player

Discussion of hardware and software development for Super NES and Super Famicom. See the SNESdev wiki for more information.

Moderator: Moderators

Forum rules
  • For making cartridges of your Super NES games, see Reproduction.
Post Reply
Oziphantom
Posts: 1565
Joined: Tue Feb 07, 2017 2:03 am

KOEI SPC player

Post by Oziphantom »

does anybody know how the KOEI SPC player works from the SNES side, or what the data format is etc?
KungFuFurby
Posts: 275
Joined: Wed Jul 09, 2008 8:46 pm

Re: KOEI SPC player

Post by KungFuFurby »

What SPC player do you speak of?

Koei internally used two different sound drivers over the entire commercial SNES era. Neither are completely custom, but they are based off of an existing sound driver.

The first version used in earlier games was based off of Kankichi-kun/N-SPC. I have 12 builds recorded (though one of them is merely a single opcode difference if I recall correctly...).
For earlier versions the VCMD format generally follows standard Kankichi-kun/N-SPC minus the testing VCMDs ($FB-$FE), but my variable ARAM map tracing, which has not yet been done, tells me that at the absolute least the zero page is not consistent on the earliest versions (I haven't actually done tracing yet: I merely did a quick check for variable ARAM map compatibility with standard Kankichi-kun/N-SPC). However, later versions add three new VCMDs (I'm not done going all the way through these):
  • VCMD $FB - Repeat Section Start
  • VCMD $FC - Repeat Section End
  • VCMD $FD - Repeat Section Break?
The second version was based off of Opus's SQ/DBOOT, SQ likely referring to the SPC side and DBOOT referring to the SNES side (I know this from ROM text). The DBOOT versioning was reset compared to Opus's branch, though the SQ is initially marked V109, but it too is reset. There are 11 builds here.
I have not done tracing of VCMDs yet to this point, but I can confirm that the data is likely compressed even within ARAM itself (it uses some sort of LZ-esque methodology to decompress the data, though this isn't LZSS: I know a buffer is involved, and it can read backwards a small number of bytes or so in the buffer). Variable ARAM map tracing is also incomplete as I've only really worked on sorting out the versioning, but I know that it tends to change over time. Nevertheless, unlike N-SPC/Kankichi-kun which I can only trace the music format for due to the SFX programming being custom generally on a per-variant basis, this one is quite a bit less varied in that department, but not always. I also have a rough estimate of where exactly it branched off of versioning-wise courtesy of my versioning sorting, though that's also under construction.
Oziphantom
Posts: 1565
Joined: Tue Feb 07, 2017 2:03 am

Re: KOEI SPC player

Post by Oziphantom »

the V105 player from Brandish.
The Japanese version has a title screen song that is different the English version.. because of some copyright issue.. I'm making a content restoration patch and it would be nice to get the original song back in. I tried swapping the initial upload but it just causes the player upload code to hang.
Oziphantom
Posts: 1565
Joined: Tue Feb 07, 2017 2:03 am

Re: KOEI SPC player

Post by Oziphantom »

seems the DBOOT version is 1.00
KungFuFurby
Posts: 275
Joined: Wed Jul 09, 2008 8:46 pm

Re: KOEI SPC player

Post by KungFuFurby »

You're working with Brandish. Alright... well, build-wise you're alright, as there are no differences between the two.

So here's the problem with data implantation with DBOOT... you have to deal with the way everything is set up on the SNES side, which can also involve having to redo all of the offsets in the directory and updating the IDs. I haven't really looked at any of the internal data structures yet on the SNES side: all I have done with these games is music modifiers by command ID. I cannot guarantee that instruments/samples are consistent between the two. And then of course the music format is probably compressed, though there isn't a pointer dependency in particular.

I will redirect you to the disassembly for Super Bomberman, since that somewhat has some info on what you're dealing with on the SNES side of things. Naturally, since this is a Koei branch, it is subject to some differences. However, this might be able to provide you with some info on how the SNES side is handled data structure-wise.

And then I think of Sword Maniac and X-Kaliber 2097...
Oziphantom
Posts: 1565
Joined: Tue Feb 07, 2017 2:03 am

Re: KOEI SPC player

Post by Oziphantom »

Tthank you. I was able to find and patch the audio to work ;)
Post Reply