Register | Login | |||||
Main
| Memberlist
| Active users
| Calendar
| Chat
| Online users Ranks | FAQ | ACS | Stats | Color Chart | Search | Photo album |
| |
0 users currently in ROM Hacking. |
Acmlm's Board - I3 Archive - ROM Hacking - Hacking music, but have quick question | New poll | | |
Add to favorites | Next newer thread | Next older thread |
User | Post | ||
Keitaro Mole Since: 11-18-05 From: Massachusetts Last post: 6589 days Last view: 6589 days |
| ||
I know the N-SPC format and have been hacking it for a good couple years, so before anyone goes off, I know my stuff. This is mostly geared towards blackhole (who apparently dosn't check his PMs ), or anyone who'd actualy be able to ANSWER this, but yeah.
Anyways, I'm making a hack, in dw3, which uses more instruments than the table (3D00 and 3E00 in an actual SMAS rom) allows. In the SPC itself theres more than enough space, however in the rom there isnt enough extra bytes to place in the two extra instruments I want to add. I think its only the one at 3E00 that's giving me trouble. Anyways, what I want to know is how would I go about physically repointing this table, and not in SPC memory. Like it would still be at 3E00, or whatever, but just a different physical location in the ROM...I don't know if I'm explaining this too well but yeah. I'd be seriously appreciative if someone could help me out, as this is one of the only thing preventing me from properly completing my music hacks. Also, one other quick question. As for the format of the instruments, I know it goes XXYYYYYYZZZZ, where XX is the number of the instrument, YY is the attack, sustain, etc. and ZZ is the frequency. I'm curious though as to what order each part of YY is...which is attack, which is sustain, decay, etc (as I have forgotten ) and also...how exactly ZZ determines the frequency. I havn't been able to figure out how exactly it translates into an actual frequency...or how an actual frequency would translate to THAT, and it'd be seriously helpfull if someone could shed some light on to this. Thanks a ton. |
|||
Yoronosuku Toss Tortoise Since: 11-17-05 From: Massachusetts is my new home.. Last post: 6430 days Last view: 6430 days |
| ||
I thiiink...attack, sustain, release, decay. Kind of standard..I havn't fooled around with it too much to help you with the rest of it, tho. Since I have never needed to repoint that table, myself =|
Edit: You mean..the physical intrument table and not the table of sample pointers, right? There has to be some kind of pointer for that..I did a search and I know theres a reference to 003D in SMAS, which did effect it. That means there is a similar one for DW3. But that is an SPC relative pointer, as you said you didn't want that...I'm out of ideas, sorry =| Ionno how you would change its physical position and still have it somehow translate to 3E00 in SPC memory, anyway.. (edited by Yoronosuku on 12-05-05 05:41 PM) (edited by Yoronosuku on 12-05-05 05:43 PM) |
|||
d4s Shyguy Since: 12-01-05 Last post: 6553 days Last view: 6451 days |
| ||
Originally posted by Keitaro im not sure if i understood your question correctly, so i'm gonna reword it. you have a table in the rom thats at some point uploaded to the spcs memory. the table is loacted between other data in the rom, giving you no room for expansion. thus, you want to put it somewhere else in the rom. once the table is uploaded to the spcs memory, theres plenty of free space behind it so you dont have to worry about expanding it there, right? i dont have the rom here, so i cant check that for myself ok, this is how you do it (you probably know some of this already): -locate the table in the rom. -fire up geigers snes debugger. -set a read breakpoint to an adress in the table (remember: snes lorom adress) this will give you the routine(s) that access the table. most likely, it will just be one. trace back how it sets up the pointer to the table using the cpu logging feature. it will most likely be totally static, for example something like ldx #$3e00 lda #$00 stx $00 sta $02 jsl UploadStuffToSpc and then it will most likely load from that pointer like so: lda [$00],y or it will load the pointer from a pointertable, probably 2byte with fixed bank. what you will want to do is modify the pointer to the table. mind you, i dont know how the game does that in detail. you have to tell me what rom youre using exactly in order to help you there. regular smas? smw + demo world 3 patch? oh, and by the way: rom adresses have nothing to do with spc adresses. it doesnt matter to the game where your table is in the rom. the table will most likely be part of a data set. the actual upload location for that table is either passed to the spc seperately (often in form of a small header in front of the actual data thats uploaded) or the spc already knows where to put it. either way, you dont have to worry that it will be uploaded to a different location if you just change the rom adress of the data. (edited by d4s on 12-06-05 06:46 AM) (edited by d4s on 12-06-05 06:47 AM) |
|||
Hamtaro126 Red Goomba stupid as as OSHT BAN Since: 11-20-05 From: Hacktown, Usa Last post: 6692 days Last view: 6430 days |
| ||
Can anyone find the ROM Address for the ''Demo World 3''
(Super Mario Bros 3) Music in hex? (Both Beginning and End of the music addresses) So I can make custom music in my hex editor! I could not find a good enough Address for it! -Hamtaro126 |
|||
Kailieann Since: 11-18-05 Last post: 6430 days Last view: 6430 days |
| ||
.. can't you just use your hex editor to compare the original and patched roms to see where the music was added? | |||
Bloodstar 660 blue boar boobies Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 35 bytes) in /var/www/acmlm.org/board/profile.php on line 42 Since: 11-17-05 Last post: 6431 days Last view: 6430 days |
| ||
Originally posted by Hamtaro126 Good luck actually DOING something. |
|||
blackhole89 Moronic Thread Bodycount: 17 (since 2006-08-21 09:50 EST) F5 F5 F5 F5 F5 Since: 12-31-69 From: Dresden/SN/DE Last post: 6433 days Last view: 6430 days |
| ||
hamtaro126: bank 0 starts at $304204 and bank one starts at $308204 (both PC addresses).
Keitaro: Sorry, I read your PM at school, after which it vanished off the new PMs and I kinda forgot about it Anyway, from what I can tell, there is generally enough space in that bank. You need to find the N-SPC copier header for the instrument table (they were built up like Hope that helps. ~blackhole89. (btw, this post made me think about picking it up again and doing the last few lacking pieces of SST) |
|||
DJ Bouche Koopa Since: 11-22-05 From: Bligh Park, NSW, Australia Last post: 6593 days Last view: 6593 days |
| ||
That header is actually standard for all SPC700 data transfers. But yes the length word should be adjusted to match the total size of the instrument data you want to transfer..
Anyhow in DW3, IIRC the ASM that loads the pointer into the memory before calling the magical and wonderful SPC uploader subroutine goes a little something like: (in 8-bit accumulator mode) LDA #$LL STA $00 LDA #$HH STA $01 LDA #$BB STA $02 JSL $magicalandwonderfulSPCuploadersubroutine (The direct page addresses $00/$01/$02 might be wrong, this is how they were in SMAS, they might have been different in SMW, I do not remember.) where LL is the low byte of the address, HH the high byte, and BB the bank byte (BB:HHLL), which the SPC data to be uploaded is located. The format of that data should be as follows: AA AA BB BB xx xx xx xx ...... [ AA AA BB BB xx xx xx xx .... [ AA AA BB BB xx xx xx xx ...... [ etc ] ] 00 00 00 06 (everything is little endian byte order.) Where A is the address in the SPC memory to upload to, B is the length of the data. Then x is the data to write. After the data you can specify another block of data to upload, but after your final block of data to upload you must specify 00 00 00 06 (address = 0000, length = 0600) which tells the SPC that it is the end of the transfer and to set the PC to $0600 (which is where the SMAS engine (used in DW3) program begins). Hope that helps a bit. |
|||
Hamtaro126 Red Goomba stupid as as OSHT BAN Since: 11-20-05 From: Hacktown, Usa Last post: 6692 days Last view: 6430 days |
| ||
THANK YOU!! You are so kind and generous! Now i can work on more of my music
stuff! |
|||
DJ Bouche Koopa Since: 11-22-05 From: Bligh Park, NSW, Australia Last post: 6593 days Last view: 6593 days |
| ||
My bad.... length word actually comes first, then the destination address.
And the address on which the code starts is actually 0500 (which makes the end tag 00 00 00 05) The NSPC engine is a bitch of a thing, if you ever want to upload a bank manually yourself through your own process... write the value $FF to address $2141 and wait a vblank or so (if you don't your upload code will infinitely loop )... then do the upload :x (this makes the NSPC program jump to the boot code at $FFC0 in the SPC700 where the normal wait for upload process takes place). Also, although I don't remember this with the song banks in SMW, when a bank needs to be uploaded, sometimes they transfer the data to 7F:0000 first, using DMA or something. |
|||
Keitaro Mole Since: 11-18-05 From: Massachusetts Last post: 6589 days Last view: 6589 days |
| ||
Ah! Thanks a ton..that's exactly what I was trying to do, I'll fool around with it tonight and see if I get any results. Thanks again | |||
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: 6431 days Last view: 6431 days |
| ||
Hm, this is a bit off-topic, but it's an interesting idea I thought I should note. If one were to write their own SPC engine they could use it to debug the main game. The game engine sends various information to the SPC700 (just a simple 1 or 2 byte code that tells what it's doing, eg, handling vblank, starting DMA, processing sprite code, etc). One of these (I imagine vblank) would have to be sent at a specific interval. If the SPC700 were to detect that this signal is suddenly not coming anymore (or a lot if the program were to get stuck in a loop sending it), it could stop the music and beep. The status code itself determines length and frequency, and from the sound, you could tell what happened.
Maybe not feasible, but interesting anyway. |
|||
DJ Bouche Koopa Since: 11-22-05 From: Bligh Park, NSW, Australia Last post: 6593 days Last view: 6593 days |
| ||
That's actually a pretty cool idea HH , something I might try if I ever create my own SPC700 engine (gotta learn SPC700 assembler alksjglrdjgol4weg..).
I'm still trying to find out the absolute correct way to tell NSPC you wanna upload shit, and correct way of waiting... :x |
|||
Sukasa Birdo Not quite as active as before. Xkeeper supporter Xk > ||bass I IP Banned myself! Twice! Since: 11-17-05 From: Somewhere over there Last post: 6432 days Last view: 6430 days |
| ||
I beleive blackhole89 might know the offset in the ROM of the routine that uploads music bank 02 to the SPC700, try asking him?
I'd help you out, but... my cookie to the archive expired and I can't log in to get my private messages that were there. |
|||
DJ Bouche Koopa Since: 11-22-05 From: Bligh Park, NSW, Australia Last post: 6593 days Last view: 6593 days |
| ||
I'm doing most of my N-SPC upload testing on a minor SNES demo program I'm writing, just basically trying to familiarise myself programming the SNES hardware and such at the same time before I move on to a certain project I won't name here but you will all find out eventually. (I think it might be the first hack I've released since "MY-SMW" (which btw was a TERRIBLE hack) back in 2000/2001 or so. I've had a lot of bad luck with previous hacks, not backing up often enough and stuff getting corrupted, or plain not releasing hacks. Thankfully I didn't because looking back, the ones that are releasable aren't too good anyway . ) Good thing is I'm getting very comfortable with SNES stuff... just being slow and lazy are my biggest burdens . (edited by DJ Bouche on 12-19-05 11:33 PM) |
|||
Stifu Since: 11-18-05 From: Your mom's bed Last post: 6432 days Last view: 6430 days |
| ||
I would pay for a (decent) SPC maker...
By the way, Sukasa, it's not that your cookies expired, it's just that it's no longer possible to log in on the previous board. When this new board just opened, I suggested to make it possible to log in again on the old board to check our PMs (even if we can't post anymore), but my request got ignored. Anyway, I wish that by the time Epic Racers (the hack I'm working on with Ok Impala!) is ready (ie sometimes next year), Bouche or blackhole will have come up with a program that lets you compose SPC... |
|||
Sukasa Birdo Not quite as active as before. Xkeeper supporter Xk > ||bass I IP Banned myself! Twice! Since: 11-17-05 From: Somewhere over there Last post: 6432 days Last view: 6430 days |
| ||
No, I was logged in to that board before, but still after it crashed. I just didn't go there for a while.
I know you may not believe me, but that did work. BTW, I'm wokring on an SPC engine for my own game, if you want I could send a finished cop yto you in the future. |
|||
Stifu Since: 11-18-05 From: Your mom's bed Last post: 6432 days Last view: 6430 days |
| ||
Originally posted by Sukasa Not that I don't believe you, but I just wanted to state that the fact you can't log in anymore isn't related to cookies expiring, but to the fact they made it that way on purpose, or because of the new board... Originally posted by Sukasa Sounds great... Thanks for the offer. Is that for SMW ? Because my hack is an SMK one... The SMW sound engine is close to the one of SMK though, from what I heard. Making such an engine must be quite hard, no ? It must require solid programming skills, as well as a good knowledge of the SPC format... I didn't know there were other people who were working on something like that. |
Add to favorites | Next newer thread | Next older thread |
Acmlm's Board - I3 Archive - ROM Hacking - Hacking music, but have quick question | | |