Points of Required Attention™
Please chime in on a proposed restructuring of the ROM hacking sections.
Views: 88,442,155
Main | FAQ | Uploader | IRC chat | Radio | Memberlist | Active users | Latest posts | Calendar | Stats | Online users | Search 04-20-24 12:47 PM
Guest: Register | Login

0 users currently in ROM Hacking | 3 guests

Main - ROM Hacking - Misc. releases related to Capcom NES sound engine. New thread | New reply


Matrixz
Posted on 05-09-13 04:22 PM (rev. 2 of 05-09-13 04:54 PM) Link | Quote | ID: 153847


Ninji
Level: 35

Posts: 218/225
EXP: 266248
Next: 13688

Since: 04-07-07
From: Norway

Last post: 3100 days
Last view: 1777 days
Lately I've worked on some stuff (old and new) revolving around the sound engine used in later NES Capcom games, which is used in the Mega Man roms starting from MM3.

First, I've updated "Capcom ''6C80'' Sound Engine/Music Format Documentation".. which is mainly a music hacking guide. I've had an update in the works for long. I had a WIP version on my personal host, this is a completion of that. Compared to the document from 2006 that was uploaded on Romhacking.net until now, there is a ton of changes, it's just not the same document. Download:

http://www.romhacking.net/documents/274/

I made a commented disassembly of the sound engine, based on Mega Man 4. This can be re-assembled with the assembler ASM6. Download:

http://www.romhacking.net/documents/634/

Based on the above disassembly, I rewrote the engine so that it can utilize the two extra square channels provided by the MMC5 mapper, if the ROM is changed to use that. This can be done for both BGM and SFX. It uses some more memory than before, the extra mem has been located at $6000. (start of PRG-RAM). The .bin file can be pasted over the old sound engine code in a ROM, old BGM datas and sound effects (hacked or not) still works without them having to be changed. When new BGM's and sound effects are hacked in, they can use up to six channels.
If you think this idea sound interesting, you are welcome to try use it for your hack. (Assuming you are hacking Mega Man 3 - 6, or other compatible games..) You will need to change some constants in the .ASM file and re-assemble it though, so that MMC5 bank values are correct (which is different from game to game), and maybe change the memory layout. In the ASM file, I've described how to format sound datas to use extra channels. Download:

http://matrixz127.comoj.com/share/capcom1990_mmc5_rev2.zip

By the way.. its nice to see the hacking community "hack on" tirelessly on this board.

infidelity
Posted on 05-09-13 05:53 PM Link | Quote | ID: 153848


Fuzz Ball
Level: 66

Posts: 358/968
EXP: 2366919
Next: 94932

Since: 05-24-07

Last post: 952 days
Last view: 808 days
Ooooo! Im looking forward to taking a look at this updated document! Once I finish my Zelda project (should be within 2013) Im hoping progress can return to an old project of mine.

za909
Posted on 05-09-13 06:57 PM (rev. 3 of 05-09-13 07:05 PM) Link | Quote | ID: 153849


Cheep-cheep
Level: 32

Posts: 162/196
EXP: 188955
Next: 17487

Since: 04-27-11

Last post: 3047 days
Last view: 2757 days
This sounds great, and actually helped me understand some of the effect commands a bit more, as well as instrument behavior. It also gave me an idea on how to go about possibly writing a DPCM playing routine, based on the last byte of instruments, so that I could use noise instruments without any extra channel data to play samples. (Too bad the 2A03 has a bug when playing dpcm, and bugs PPU and controller port reads, which sadly I wouldn't be able to do anything about)

By the way, any plans on more detailed description of how the speed works? I'm safe from random noise note lenghts if I always use aa speed setting with either $00 or $80 in the low byte right? (And I suppose at that point, using 64th notes in looped triplets would give me the trademark C64-ish arpeggio sound as well)

While I'm at it...am I right about the triplet command always lasting for the next note lenght in the list? 00,24,24,24,00 would last for as long as a 44 would, and 00,44,44,44,00 would last for as long as 64 would...etc.

DurfarC
Posted on 05-10-13 01:46 AM Link | Quote | ID: 153853


Shyguy
Level: 24

Posts: 27/97
EXP: 71863
Next: 6262

Since: 10-23-08
From: Norway

Last post: 1951 days
Last view: 349 days
Awesome! I'm actually hacking Mega Man 4 these days, including its music, and I'm sure there are still a few details I have to learn - and that disassembly of the sound engine is certainly interesting. Thanks again and again!

Matrixz
Posted on 05-10-13 03:59 PM Link | Quote | ID: 153856


Ninji
Level: 35

Posts: 219/225
EXP: 266248
Next: 13688

Since: 04-07-07
From: Norway

Last post: 3100 days
Last view: 1777 days
za909: Actually.. you are only truly safe about random-ish note lengths with using a speed of 0100. At least I think so..
It depends much on the note lengths used and if you use triplets or dotted notes.
If you don't use either of those, you can use 0180 and it will not give random notes. (however 0280 would not work the same way).

To get the shortest possible duration of a note (1 frame), you would need to set the speed to 0200 and then use 64th notes in a triplet.

This is the table for how long each note lasts, for each kind of note length, taken from the disassembly. If the current speed is 0100, these are equal to how many Vblank frames each note lasts..

l8915_note_len_table_triplet:
.db $02,$04,$08,$10,$20,$40,$80
l891C_note_len_table:
.db $03,$06,$0C,$18,$30,$60,$C0


Also yes, you got it, 00,24,24,24,00 will be just as long as a normal 44.

za909
Posted on 05-11-13 05:03 PM Link | Quote | ID: 153868


Cheep-cheep
Level: 32

Posts: 163/196
EXP: 188955
Next: 17487

Since: 04-27-11

Last post: 3047 days
Last view: 2757 days
Hmm, thinking about it, maybe I'd be safe from them if I used Noise instruments that only use the Decay part ever, having a Sustain level of 0. Or would 06 00 effect work better with a release rate of my liking better? (Dunno which one is not affected by the length of the note.)

Matrixz
Posted on 05-11-13 05:54 PM Link | Quote | ID: 153869


Ninji
Level: 35

Posts: 220/225
EXP: 266248
Next: 13688

Since: 04-07-07
From: Norway

Last post: 3100 days
Last view: 1777 days
Doing the effect with Decay should work.. since if the instrument's Attack byte is $1F it will start the note at max volume and decrease with the Decay rate starting from the next frame.. regardless of the note's duration or the 06 command.

Doing 06 00 and using Release should work fine too, but.. in the case you do a connect section (command 01), it will not fade with the Release rate until it's on the last note in the combination of notes.

Kain
Posted on 05-13-13 06:39 PM Link | Quote | ID: 153891


Goomba
Level: 14

Posts: 17/31
EXP: 10952
Next: 2119

Since: 04-12-13

Last post: 3932 days
Last view: 3928 days
capmusfrm 2004: 5.55 KB
capmusfrm 2010: 17.3 KB
capmusfrm 2013: 30.5 KB


Also: almost 10 years in the making! :O

Matrixz
Posted on 05-17-13 06:14 PM Link | Quote | ID: 153922


Ninji
Level: 35

Posts: 221/225
EXP: 266248
Next: 13688

Since: 04-07-07
From: Norway

Last post: 3100 days
Last view: 1777 days
2004, that's right. I can't figure out when exactly I started it. Lately I'm trying to piece together my history, or chronology..

I got the inspiration to learn this stuff thanks to that MM3 music editor by Sephiroth3, while in "Dragon Eye Studios" hehe.

Main - ROM Hacking - Misc. releases related to Capcom NES sound engine. New thread | New reply

Acmlmboard 2.1+4δ (2023-01-15)
© 2005-2023 Acmlm, blackhole89, Xkeeper et al.

Page rendered in 0.022 seconds. (341KB of memory used)
MySQL - queries: 77, rows: 105/106, time: 0.016 seconds.