Castlevania Dungeon Forums

The Castlevania Dungeon Forums => General Castlevania Discussion => Topic started by: TheouAegis on August 16, 2022, 10:14:03 PM

Title: So I kinda cracked CV3's music programming
Post by: TheouAegis on August 16, 2022, 10:14:03 PM
I'm partly just giving up because I've been working on it for so many days now, but I'm also genuinely satisfied with what I came up with.

First thing's first: I mapped out - I'm pretty sure - every variable used in Akumajou Densetsu's audio engine. You can find it on the Data Crystal wiki over at RomHacking. I don't know yet what changes to the audio engine were made for Castlevania 3, but I didn't really care about that right now.

As it turns out, the audio engine was more extensive than I had anticipated. I'm not sure how it compares to other games on the Famicom or NES, but I certainly wasn't anticipating al segno, coda, ritenuto, or a couple other musical terms I've long since forgotten since I was last in school. I mean, they weren't called that explicitly, but my brief refresher on musical terminology lead me to those terms.

Notes could be encapsulated inside a volume envelope or pitch envelope. Envelopes could be loaded once and disabled when not wanted. There was even some sort of note sustaining going on - as in one note would stop and a previous note would play in its stead. Yeah, it was pretty complex! Because of all this, some notes could be defined by 1 byte, while others required 5, 7, or even 9 bytes to define!

There was no Triangle Wave channel. The standard Square Wave channels were hardly audible at times, even with other audio channels disabled. Disabling the wave channels allowed me to really enjoy the DPCM drum kit, but I didn't really look too deep into the drum stuff or the sound effects.

Anyway, I know that none of this is interesting to 99% of the people out there, but it was just a hobby I took up in recent weeks. I don't plan on actually modifying CV3/AkuDen music myself, but maybe someone else out there could use this.

https://gmvania.blogspot.com/2022/08/cv3-audio-system-notes.html
(click to show/hide)
Title: Re: So I kinda cracked CV3's music programming
Post by: TheouAegis on August 19, 2022, 11:09:41 PM
Update: I added Castlevania 3 (U) audio mappings to the RAM Tables on Data Crystal (https://datacrystal.romhacking.net/wiki/Castlevania_III:RAM_map). Sorry, no programming tips for Castlevania 3, although I don't think very much changed between CV3j and CV3u. The Triangle channel required some new code to be added in and a couple new variables were also added, which meant I had to spend all morning trying to figure out how Konami coded the Triangle channel. Two of the new variables were devoted entirely to cutting a triangle note off 1 frame earlier than normal. And I thought I had problems with micro-optimization! Still, I suspect my notes from the previous post still hold even for the Triangle channel.

Yet another unproductive day; but I spent some time ;) with my wife, cracked CV3u's audio, and mapped out a bunch of variables I had overlooked before. All in all, it was a far cry from my least productive day.  :)
Title: Re: So I kinda cracked CV3's music programming
Post by: mercurius on August 23, 2022, 12:24:45 PM
I should say that this is some wonderful and interesting stuff. I wish you could continue with this.
Title: Re: So I kinda cracked CV3's music programming
Post by: X on August 23, 2022, 05:38:55 PM
Most likely TheouAegis will continue on. I've not seen him quite on these things, just take a bit of a break every now and then.
Title: Re: So I kinda cracked CV3's music programming
Post by: Eric Roman on March 17, 2023, 07:31:31 PM
On this date twenty-six years ago I signed up for America OnLine and two months after that I began to celebrate (STILL) one of my favorite videogames of all time, CastleVania III: Dracula's Curse.  (And planted one of the first--if not the first--Slogra fandom flags online.  8))

So of course I'm digging all of this, technical as it is. 

I must say, while AkuDen is definitely a different audio experience (and many have lauded this in a way I can't quite grasp, like how they say X68k's {expressed by whatever MIDI hardware} sounded better than Super IV's {with its miraculous Philharmonic cum Jass Club on-a-CART}),
 having been raised on the American Version's tones and beats and hits and just gahdamn how DEJA VU was practically the first Chiptune ReMix!!!, I've long been aware of the nuances hinting at something else at work having been stripped away to leave behind something charming and immortal. 

But mebbeh that's just some of my bias. 

All that to say I'm looking forward to what more you uncover from this masterpiece that in Japan is this kind of thing and in The States, is the kind of thing modern myths are made of! 8) 8) 8) 
Title: Re: So I kinda cracked CV3's music programming
Post by: X on March 17, 2023, 09:58:17 PM
If TheouAegis keeps going he's going to strip-mine the entire game before long  :o

Weeeeell it has been quite some time since he started this quest of his. But we wait around and see what else he can dig up  :)