Author [EN] [PL] [ES] [PT] [IT] [DE] [FR] [NL] [TR] [SR] [AR] [RU] [ID] Topic: HUGE assistance request: mapping CV3j's audio RAM  (Read 700 times)

0 Members and 1 Guest are viewing this topic.

Offline TheouAegis

  • Amateur Auteur of GMvania
  • Master Hunter
  • *****
  • Posts: 1857
  • Gender: Male
  • Awards The Retro Gamer: Has a heated passion for the oldschool VG Titles. The Great Defender will always defend the object of his or her fandom. Hack Master makes creations out of CV parts. (S)he makes Dr. Frankenstein proud.
    • GMvania Developer's Blog
    • Awards
  • Likes:
HUGE assistance request: mapping CV3j's audio RAM
« on: July 16, 2022, 12:43:49 AM »
EDIT: More help is always appreciated, but I have a post in the General Castlevania Forum with a RAM map and general summary about how CV3 music was coded. Treat this thread as closed.

And before you chime in with suggestions along the lines of, "Download the NSF file, open it in FamiTracker, and compare values," I've tried that. It kind of helped me map out CV1u, but this ain't an NES game I'm trying to map. CV3j (aka Akumajou Densetsu) has the VRC6 audio, which I figured would be a simple matter of studying a two or three more paragraphs on NESDev to learn how it worked, then tracing the register writes. I mean, it worked for me in CV1u. Within minutes of tracing audio routines, I encountered the tip of the CV3j Audio Iceberg.

At first all seemed well. I could tell at a glance this wasn't just a rehash of the CV1 audio code, but I was still able to easily enough recognize a couple similar subroutines. So I traced it from the initial audio track write, but when I got to the audio track initialization code, I was met with a handful of variables here, another handful of variables there, and yet more even farther away. This... was unexpected to me. CV1's variables were all neatly packaged in a tight bundle of #60 bytes or so, but the variables in CV3j were scattered far and wide. Some were in the $1XX range, some in the $3XX range nestled among enemy variables, and more still in the $6XX range. So, I cracked my knuckles and bore down on the code, tracking each of those initialized variables. Those weren't the only variables being used, however.

I've been fiddling and faddling with a few variables here and there. I'd like to think I have at least made a little bit of progress. I mapped the order of audio channels in the RAM (VRC6 Pulse 1, VRC6 Pulse 2, VRC6 Saw, BGM Square 1, BGM Square 2, SFX Square 1, SFX Square 2, Drumkit, and Noise), identified the core duty-volume and period variables, and even identified variables that did fun stuff like volume dampening, slowing down payback, and I think even one for making vibrato. And yet, I'm not even halfway done!

I would love for someone with some 6502, 2A03, and SYNTHESIZER PROGRAMMING KNOWLEDGE (although I don't think I've seen any special VRC6 code yet) to help me try to crack CV3j's audio coding. You read that right: I think I need someone with synthesizer programming knowledge. I'm pretty certain I've been staring at waveforms for the past 24 hours! I'm not certain, but I think I also just saw code suggesting some of the waveforms are interconnected, which would just be a whole other level of complexity not showing up in FamiTracker! My brain is frazzled!!  :-[ :'(
« Last Edit: August 19, 2022, 11:20:50 PM by TheouAegis »
Your mom has had more floppies put in her than a Commodore 64!

Follow my lack of progress on my game at my blog: