(Link to AcmlmWiki) Offline: thank ||bass
Register | Login
Views: 13,040,846
Main | Memberlist | Active users | Calendar | Chat | Online users
Ranks | FAQ | ACS | Stats | Color Chart | Search | Photo album
05-05-24 01:04 PM
0 users currently in ROM Hacking.
Acmlm's Board - I3 Archive - ROM Hacking - Interested in .SPC altering within a ROM New poll | |
Pages: 1 2Add to favorites | Next newer thread | Next older thread
User Post
S.N.N.
wtf


 





Since: 11-17-05
From: Ontario, Canada

Last post: 6291 days
Last view: 6285 days
Posted on 05-20-06 09:25 PM Link | Quote
I've finally developed an interest in altering the SPC data in a ROM. I have played around with it enough that I know the basic-basics, so I'm sure that will come in handy. I was just curious though - would anyone happen to have a link to an SPC tutorial/have one of their own they'd be willing to share?

Thanks in advance
C:/xkas bio.asm
Compiled ASM code








Since: 11-17-05

Last post: 6286 days
Last view: 6285 days
Posted on 05-20-06 11:47 PM Link | Quote
you will have to learn the SPC-700 ASM wich is more tricky that the 65816, because:

1.there isn't a lot of SPC-700 (dis)assambler around here
2.I don't renember seeing any debugger that can trace it
3.all hex value for oppcode are way different from the 65816(and 6502) one

the only thing I could do to help you is that doc found on Zophar: link

Good luck


(edited by Bio on 05-20-06 10:48 PM)
never-obsolete

Paragoomba








Since: 05-14-06
From: AZ

Last post: 6287 days
Last view: 6287 days
Posted on 05-21-06 12:11 AM Link | Quote
i might write a assembler/disassembler for it, though would anyone be interested in this?


(edited by never-obsolete on 05-21-06 12:24 AM)
MathOnNapkins

1100

In SPC700 HELL


 





Since: 11-18-05

Last post: 6285 days
Last view: 6285 days
Posted on 05-21-06 03:35 AM Link | Quote
There are already assemblers and disassemblers for SPC-700. Byuu's come to mind, though I have to tell him about a bug in his disassembler...

For 3 byte branch commands it doesn't properly calculate the target addresses.
Keitaro

Mole


 





Since: 11-18-05
From: Massachusetts

Last post: 6443 days
Last view: 6443 days
Posted on 05-21-06 01:54 PM Link | Quote
Assuming you're hacking Yoshi's Island? Correct me if otherwise. That being the case, I've done some somewhat extensiveish work with that game's sound to a point, I may or may not be able to assist you in some ways (I have some detailedish tutorials that I plan on updating at some point, offsets, all that jazz). Just let me know if you're interested and I'll gladly provide you with necessary resources


(edited by Keitaro on 05-21-06 12:56 PM)
S.N.N.
wtf


 





Since: 11-17-05
From: Ontario, Canada

Last post: 6291 days
Last view: 6285 days
Posted on 05-21-06 02:29 PM Link | Quote
Thanks for all the help guys

Yes Keitaro, I am hacking YI (too obvious ) Any of those resources you could send me would be golden, and would surely help a ton. Thanks in advance
HyperHacker

Star Mario
Finally being paid to code in VB! If only I still enjoyed that. <_<
Wii #7182 6487 4198 1828


 





Since: 11-18-05
From: Canada, w00t!
My computer's specs, if anyone gives a damn.
STOP TRUNCATING THIS >8^(

Last post: 6286 days
Last view: 6286 days
Posted on 05-21-06 04:51 PM Link | Quote
Originally posted by never-obsolete
i might write a assembler/disassembler for it, though would anyone be interested in this?

If it's good, absolutely.
never-obsolete

Paragoomba








Since: 05-14-06
From: AZ

Last post: 6287 days
Last view: 6287 days
Posted on 05-21-06 06:15 PM Link | Quote
by "good" do you mean non-dos or what? i havent had a problem with asemblers before. i dont see how a disassembler could be bad, it does one thing that is easy to implement. assemblers can be tricky on the other hand, but ive already written one for the 65xx, so i think i got a grasp on the idea.


(edited by never-obsolete on 05-21-06 05:17 PM)
HyperHacker

Star Mario
Finally being paid to code in VB! If only I still enjoyed that. <_<
Wii #7182 6487 4198 1828


 





Since: 11-18-05
From: Canada, w00t!
My computer's specs, if anyone gives a damn.
STOP TRUNCATING THIS >8^(

Last post: 6286 days
Last view: 6286 days
Posted on 05-21-06 06:39 PM Link | Quote
I mean it doesn't have a lot of stupid/annoying bugs, isn't a pain to use, etc.
never-obsolete

Paragoomba








Since: 05-14-06
From: AZ

Last post: 6287 days
Last view: 6287 days
Posted on 05-21-06 06:43 PM Link | Quote
so basically non-command line and bugless...got it. but if there's already one out there i dont see the point in re-inventing the wheel.
HyperHacker

Star Mario
Finally being paid to code in VB! If only I still enjoyed that. <_<
Wii #7182 6487 4198 1828


 





Since: 11-18-05
From: Canada, w00t!
My computer's specs, if anyone gives a damn.
STOP TRUNCATING THIS >8^(

Last post: 6286 days
Last view: 6286 days
Posted on 05-21-06 07:11 PM Link | Quote
There's nothing wrong with being a command line app.
never-obsolete

Paragoomba








Since: 05-14-06
From: AZ

Last post: 6287 days
Last view: 6287 days
Posted on 05-21-06 08:05 PM Link | Quote
you and i dont think so, but i find more and more people that:

a. dont know how to use the command prompt and batch files or
b. dont even know they exist

for ease of use, a simple gui could be constructed.
MathOnNapkins

1100

In SPC700 HELL


 





Since: 11-18-05

Last post: 6285 days
Last view: 6285 days
Posted on 05-21-06 08:25 PM Link | Quote
The problem I have with command line apps is that working with files that are in distant folders from the application, typing the full address is painful. And what if you have multiple files in different folders you need to address? When I use Xkas, I put all my files in the same folder and shorten their names to 3 letters + 3 letter extension. No wonder I want to write a front end for it.

And I had someone show me how to write batch files a while ago, but I forgot most of it. I did not grow up on DOS b/c I had a Mac when I was younger. And yeah you can still look it up on the web, but it's more of a pain than just having a simple gui handle it all.
S.N.N.
wtf


 





Since: 11-17-05
From: Ontario, Canada

Last post: 6291 days
Last view: 6285 days
Posted on 05-21-06 08:52 PM Link | Quote
Apparently I made a new "breakthrough" for myself (I think) I dumped the SPC data of the YI World Map (all completed) and played around with it. I think I may have discovered one of the sound channels:



As soon as i changed every byte in $3D00 - $3D60 to 11, the sound wouldn't even start.

Have I discovered a sound channel, or is it false hope?
C:/xkas bio.asm
Compiled ASM code








Since: 11-17-05

Last post: 6286 days
Last view: 6285 days
Posted on 05-21-06 09:04 PM Link | Quote
maybe they are spc-700 ASM oppcode, try changing all of these to 00(wich is NOP in the spc-700 ASM)
MathOnNapkins

1100

In SPC700 HELL


 





Since: 11-18-05

Last post: 6285 days
Last view: 6285 days
Posted on 05-21-06 09:13 PM Link | Quote
If it's Nintendo it's likely N-SPC, and therefore likely that $3D00 is your instrument table. The sample table is usually at $3C00. But without knowing your methods, I can't say for sure what you found.
S.N.N.
wtf


 





Since: 11-17-05
From: Ontario, Canada

Last post: 6291 days
Last view: 6285 days
Posted on 05-21-06 09:17 PM Link | Quote
My methods? You mean my methods of finding it?

I kinda searched the SPC file for the song pointer, then swapped them and jumped to that offset. Then I found....that.

So if that's my instrument tables, that will be what controls the song, correct? And by changing those all to 11, I royally screwed the file

EDIT: @Bio: I did what you said and changed them all to 00. The good news is, it didn't crash on me. The bad news is, all I hear is a bunch of *clicking* type noises.


(edited by SoNotNormal on 05-21-06 08:21 PM)
MathOnNapkins

1100

In SPC700 HELL


 





Since: 11-18-05

Last post: 6285 days
Last view: 6285 days
Posted on 05-21-06 09:33 PM Link | Quote
Um... I'm not sure if you know what you're editing exactly. I'd at least read up a bit on the SPC's and the DSP's registers, and how they work. I'll have to dig through my own notes to see how the instrument table is formatted.
S.N.N.
wtf


 





Since: 11-17-05
From: Ontario, Canada

Last post: 6291 days
Last view: 6285 days
Posted on 05-21-06 09:35 PM Link | Quote
Originally posted by MathOnNapkins
Um... I'm not sure if you know what you're editing exactly. I'd at least read up a bit on the SPC's and the DSP's registers, and how they work. I'll have to dig through my own notes to see how the instrument table is formatted.


I know, I have no clue what I'm editing That's why I'm trying to figure out how to do this the right way. That's actually why I started this whole thread up in the first place - to get info on the SPC stuff.

Meh....could take a lot of work to get this whole thing working
MathOnNapkins

1100

In SPC700 HELL


 





Since: 11-18-05

Last post: 6285 days
Last view: 6285 days
Posted on 05-21-06 09:50 PM Link | Quote
Well what I have in the NSPC for Zelda 3 is the following code:


0CA4: F7 14 MOV A,($14)+Y

0CA6: C9 F2 00 MOV $00F2,X ; Take the first four bytes of the instrument block and write them to
0CA9: C5 F3 00 MOV $00F3,A ; Dsp registers $00v4 through $00v7. See SPC docs for more info.
0CAC: 3D INC X ; The loop writes to the SRCN, ADSR1 and ADSR2, and Gain.
0CAD: FC INC Y
0CAE: AD 04 CMP Y,#$04

0CB0: D0 F2 BNE $0CA4

0CB2: CE POP X
0CB3: F7 14 MOV A,($14)+Y
0CB5: D5 21 02 MOV $0221+X,A ; This is a big endian encoding. The last 2 bytes of the six byte instrument block
0CB8: FC INC Y ; Are stored to [$0220-1]+X
0CB9: F7 14 MOV A,($14)+Y
0CBB: D5 20 02 MOV $0220+X,A
0CBE: 6F RET


SRCN = source number or the index into the sample table. This denotes what sample to use.

ADSR1 and ADSR2, and GAIN are a little more complicated and you should find some documentation. The last two bytes of the block are... some kind of multipliers for the instrument that I haven't totally figured out yet. It's a lot of code to look through and a lot of guesswork at first.
Pages: 1 2Add to favorites | Next newer thread | Next older thread
Acmlm's Board - I3 Archive - ROM Hacking - Interested in .SPC altering within a ROM |


ABII

Acmlmboard 1.92.999, 9/17/2006
©2000-2006 Acmlm, Emuz, Blades, Xkeeper

Page rendered in 0.037 seconds; used 445.88 kB (max 576.08 kB)