Register | Login
Views: 19364387
Main | Memberlist | Active users | ACS | Commons | Calendar | Online users
Ranks | FAQ | Color Chart | Photo album | IRC Chat
11-02-05 12:59 PM
1 user currently in Rom Hacking: hukka | 2 guests
Acmlm's Board - I2 Archive - Rom Hacking - Music ASM Hack Question
  
User name:
Password:
Reply:
 

UserPost
d4s
Posts: 165/325
Originally posted by ||bass
If I threw some code together to take some spc data and just dump it straight into the SPC700 chip, would that actually work?


please be more specific.
do you want to play back an *.spc file ripped from a game(aka a dump of a running song)
or do you want to execute your own code on the spc700?

playing back an *.spc file on the snes is very well possible, theres a tool out there that will make a smc rom out of spcs, spc2rom, get it here:
http://www.alpha-ii.com/Download/SPC2R110.rar
it will upload the spc file to the spc700s ram, then set all registers (well, at least the writeable ones).

putting a random spc file into another existing snes game is very difficult though and a totally different story.
the problem here is that the spc700 is totally independent from the 65816 and can
only be accessed through 4 8bit ports.
that means the 65816 cant write to its ram directly, reset it or receive some sort of irq from it (the spc can generate an irq, but its not connected physically).

In other words:
theres no generic way to control or stop the spc700 once you upload a program to it and start execution.

at the _very_ least, you'd have to hack every *.spc file you want to use to include a reset handler that mutes the dsp, reenables the ipl rom and jumps to it at $ffc0.

to execute code on the spc700,
youd have to upload data to it using a simple protocol thats automatically executed when the chip recovers from reset.

byuus spc disassembler is quite useful for reverse-engineering stuff.
i use wla dx to compile code for the spc700.
Geiger
Posts: 351/460
Yes, but there is some chip setup involved. If there were not, then you could just stuff the music data from any game in any ROM and have it work wonderfully. Most games are not compatible, and many of the ones that are have single-direction compatibility or only partial compatibility.

---T.Geiger
Dish
Posts: 332/596
Originally posted by ||bass
If I threw some code together to take some spc data and just dump it straight into the SPC700 chip, would that actually work?


I'm no expert on the subject of SPCs, but I'd imagine that'd work just fine -- and in fact, that's exactly what most games probably do. AFAIK the SPC has its own seperate processor, so if you feed it an executable and get it up and running, the music will play itself.
blackhole89
Posts: 639/971
I don't think it would be as easy, since you can't make the boot code of the SPC write to hardware registers like the program counter, thus being unable to restore the exact state an SPC dump conserves. Then again, I might be wrong... I never actually thought about that myself, to be honest.
Tweaker
Posts: 10/57
I don't know much about the SNES hardware, but I believe that as long as your code was written to interpret the SPC music format, it should work. Think of it as an SPC player ported to the SNES. It should work if you do that.
||bass
Posts: 306/817
If I threw some code together to take some spc data and just dump it straight into the SPC700 chip, would that actually work?
Acmlm's Board - I2 Archive - Rom Hacking - Music ASM Hack Question


ABII


AcmlmBoard vl.ol (11-01-05)
© 2000-2005 Acmlm, Emuz, et al



Page rendered in 0.011 seconds.