(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-02-24 01:31 AM
0 users currently in ROM Hacking.
Acmlm's Board - I3 Archive - ROM Hacking - Questions on Zelda 3 Music Engine New poll | |
Add to favorites | Next newer thread | Next older thread
User Post
richyawyingtmv

Bouncy


 





Since: 11-18-05
From: England

Last post: 6284 days
Last view: 6282 days
Posted on 07-22-06 09:23 AM Link | Quote
Over the past month or so, I've been messing around with the music editor in Hyrule Magic - basically replacing the music in the game with other music - for example, I recently replaced the dungeon theme with the Zelda 2 palace theme.

The thing is, there is a bit of a space issue. If I expanded the rom, would I be able to re-point the music data to be written at the end of the rom? I've already tried doing this using Lunar Expand and the CallLoop function in the HM music editor (which basically repoints the music data), but I cant input an address larger than 4 bytes to repoint the music to - eg. $FFFF is the limit. The free space at the end of the rom after being expanded starts at $100210. I may be doing something completely wrong here though - I havent worked with a hex editor for years.

Another thing I've been trying out is replacing the instrument samples used in the music with samples from other sources (eg. taken from other games, recorded myself from live instruments). This works, but I am restricted by the limitations - most samples have to be very short in length as there is a space issue. I'm wondering, is there any way to, just like what I want to do with the music data, repoint the samples to be stored at and accessed from the free space at the end of the rom after being expanded? Or is this impossible with the music engine used in Z3? If possible at all, this would greatly improve the music I can achieve with the editor.

Thanks in advance to anyone who can help me.


(edited by richyawyingtmv on 07-22-06 08:24 AM)
(edited by richyawyingtmv on 07-22-06 08:24 AM)
(edited by richyawyingtmv on 07-22-06 08:25 AM)
(edited by richyawyingtmv on 07-22-06 08:26 AM)
(edited by richyawyingtmv on 07-22-06 08:27 AM)
(edited by richyawyingtmv on 07-22-06 08:30 AM)
(edited by richyawyingtmv on 07-22-06 08:31 AM)
d4s

Shyguy








Since: 12-01-05

Last post: 6404 days
Last view: 6302 days
Posted on 07-22-06 10:12 AM Link | Quote
Originally posted by richyawyingtmv
If I expanded the rom, would I be able to re-point the music data to be written at the end of the rom?


yes, but read on.

Originally posted by richyawyingtmv

I've already tried doing this using Lunar Expand and the CallLoop function in the HM music editor (which basically repoints the music data), but I cant input an address larger than 4 bytes to repoint the music to - eg. $FFFF is the limit.


the limit here isnt rom space, but the spc work ram.
it only has 64kb of ram, so youre probably restricted to that for one song with the z3 music engine (and basically 99% of all snes music engines aswell, for that matter).
I have never looked at how z3 does the music, but it may be entirely possible that it even has ALL songs loaded into spc-ram all the time, which would limit your available space even more.

if thats the case, you'd have to write your own loader that uploads individual songs during gameplay, which would be pretty hardcore for someone without assembler programming knowledge.

better ask mathonnapkins, i think he's the most intelligible person around when it comes to z3.

if z3 loads songs individually, you'd have to find the songs in the rom. there'd be a pointertable pointing to each of them. you'll then have to move the songs somewhere else and update the pointers accordingly.

these are just some wild guesses of mine, havent had a look at z3 for over 2 years.


(edited by d4s on 07-22-06 09:15 AM)
(edited by d4s on 07-22-06 09:16 AM)
Euclid



 





Since: 11-17-05
From: Australia
hmm...

Last post: 6288 days
Last view: 6282 days
Posted on 07-22-06 12:49 PM Link | Quote
z3 has 3 "banks" of music data, one bank is loaded into the game at specific times, you can tell what songs are in which "bank" in the HM music editor.

but What i find strange is all the song data is stored in less than 64kb of space in the rom, I'm guessing there's some compression going on there but who knows.
richyawyingtmv

Bouncy


 





Since: 11-18-05
From: England

Last post: 6284 days
Last view: 6282 days
Posted on 07-22-06 12:58 PM Link | Quote
Originally posted by Euclid
z3 has 3 "banks" of music data, one bank is loaded into the game at specific times, you can tell what songs are in which "bank" in the HM music editor.

but What i find strange is all the song data is stored in less than 64kb of space in the rom, I'm guessing there's some compression going on there but who knows.



Apparently, the music data is compressed. Correct me if im wrong, but HM decompresses it so it can be edited, then it recompresses the data before saving to the rom.
MathOnNapkins

1100

In SPC700 HELL


 





Since: 11-18-05

Last post: 6282 days
Last view: 6282 days
Posted on 07-22-06 02:50 PM Link | Quote
Uh... no. It's not compressed.
richyawyingtmv

Bouncy


 





Since: 11-18-05
From: England

Last post: 6284 days
Last view: 6282 days
Posted on 07-22-06 03:01 PM Link | Quote
Originally posted by MathOnNapkins
Uh... no. It's not compressed.


Aha, ok. Thought so. Orochimaru said he had heard it was, and I went with that. Guess he was wrong though.
d4s

Shyguy








Since: 12-01-05

Last post: 6404 days
Last view: 6302 days
Posted on 07-22-06 04:07 PM Link | Quote
Originally posted by richyawyingtmv
Apparently, the music data is compressed.


Originally posted by richyawyingtmv
Originally posted by MathOnNapkins
Uh... no. It's not compressed.


Aha, ok. Thought so.


:>
Euclid



 





Since: 11-17-05
From: Australia
hmm...

Last post: 6288 days
Last view: 6282 days
Posted on 07-23-06 12:35 AM Link | Quote
gee read the dates, it's 2 year old info

When i first looked at the data it doesn't seem to fit the hex values in HM (like change a note changes more than one hex value), which is the reason why i think it's compressed.
MathOnNapkins

1100

In SPC700 HELL


 





Since: 11-18-05

Last post: 6282 days
Last view: 6282 days
Posted on 07-23-06 12:50 AM Link | Quote
In moving it from the S-CPU to the SPC there is no decompression. There might be some bit shifting and expansion on the SPC side, I could check on that. But I would hardly call that compression.
Yoronosuku

Toss Tortoise


 





Since: 11-17-05
From: Massachusetts is my new home..

Last post: 6282 days
Last view: 6282 days
Skype
Posted on 07-23-06 10:44 AM Link | Quote
There's no compression -.- game uses N-SPC and all the data is present as-is, raw hex. If you mean the samples are compressed, I wouldnt so much call BRR a compression so much as an encoding (or maybe it is a compression, but we're talking about the data itself right?) Theres no funny compression going on. As to answer the question, you can repoint the data anywhere in the ROM as long as the game still knows to upload from the new area in to SPC memory. If you go over the SPC memory limit, stuff will break.
DJ Bouche

Koopa


 





Since: 11-22-05
From: Bligh Park, NSW, Australia

Last post: 6444 days
Last view: 6444 days
Posted on 07-23-06 09:46 PM Link | Quote
The data is the raw interpreted music data, not compressed in any way as already stated above. Zelda 3's music is in fact in 3 banks (being an older game, similar games using N-SPC at the time also practiced this), newer games tended to use only a few songs that would stay in the same location in the SPC-RAM, and one other song that would be uploaded to the SPC only just prior to playing when needed (for example, the main level type music), SMW2: Yoshi's Island uses this practice. In order to utilise more of the SPC-RAM you'll have to rewrite the music changing code on the S-CPU side of things to dynamically upload single songs, as well as re-organise your music data. This requires assembly hacking knowledge and SCPU-SPC700 communications knowledge, and was originally a key part of a new music changing engine I was trying to implement years ago in the newer N-SPC hack for SMW.

But yes, the addressing in the Z3 music editor itself refers to the SPC-RAM.

While on the topic of N-SPC, how goes the disassembly, Math?
Add to favorites | Next newer thread | Next older thread
Acmlm's Board - I3 Archive - ROM Hacking - Questions on Zelda 3 Music Engine |


ABII

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

Page rendered in 0.068 seconds; used 399.70 kB (max 499.01 kB)