Author Topic: Air Zonk music engine  (Read 457 times)

Tom

  • Guest
Air Zonk music engine
« on: March 04, 2009, 11:19:56 AM »
 Here - http://pcedev.blockos.org/viewtopic.php?f=5&t=34

 I traced through the Air Zonk music engine, documented it, and wrote a music engine from scratch (source provided) that plays the song data from the Air Zonk ROM. It's a WIP, but it's almost done. There's a pre-built ROM to test out if you don't feel like assembling the source.

 :D

 Updated to ver 1.9 - I added tempo control via gamepad. Display screen shows the tempo status/value.
« Last Edit: March 10, 2009, 08:22:05 AM by Tom »

spenoza

  • Hero Member
  • *****
  • Posts: 2751
Re: Air Zonk music engine
« Reply #1 on: March 04, 2009, 12:16:00 PM »
Does Air Zonk use a music engine that's significantly different from other PCE games?
<a href="http://www.pcedaisakusen.net/2/34/103/show-collection.htm" class="bbc_link" target="_blank">My meager PC Engine Collection so far.</a><br><a href="https://www.pcenginefx.com/forums/" class="bbc_link" target="_blank">PC Engine Software Bible</a><br><a href="http://www.racketboy.com/forum/" c

Tom

  • Guest
Re: Air Zonk music engine
« Reply #2 on: March 04, 2009, 02:50:54 PM »
Does Air Zonk use a music engine that's significantly different from other PCE games?


 Not really. It's different from the BIOS music player of the CD/SCD unit and some other games, but there's nothing really special about Air Zonk engine. Pretty simple engine FX(on the notes) wise.

ParanoiaDragon

  • Hero Member
  • *****
  • Posts: 4619
Re: Air Zonk music engine
« Reply #3 on: March 04, 2009, 05:27:29 PM »
Hmm, does this mean you're one step closer to coming up with a tracker or something, to make PSG/PCM for Turbo?

Arkhan

  • Hero Member
  • *****
  • Posts: 14142
  • Fuck Elmer.
    • Incessant Negativity Software
Re: Air Zonk music engine
« Reply #4 on: March 04, 2009, 11:03:03 PM »
I haven't gotten a chance to look at it too much yet, but what is special about the AZ music engine?

Is it just MML? Or is there some extra secret parts added in??


« Last Edit: March 04, 2009, 11:04:57 PM by Arkhan »
[Fri 19:34]<nectarsis> been wanting to try that one for awhile now Ope
[Fri 19:33]<Opethian> l;ol huge dong

I'm a max level Forum Warrior.  I'm immortal.
If you're not ready to defend your claims, don't post em.

Tom

  • Guest
Re: Air Zonk music engine
« Reply #5 on: March 05, 2009, 05:26:08 PM »
I haven't gotten a chance to look at it too much yet, but what is special about the AZ music engine?

Is it just MML? Or is there some extra secret parts added in??


 There's actually nothing special about the Air Zonk engine. It's kinda simple in design. The real engine is actually pretty inefficient. It runs the whole thing off the TIMER instead of VBLANK. The engine as a whole eats up a whopping 20% cpu resource from what I clocked it at. When it should only be around 7-8%. It has a compressed samples (that have been preprocessed to make them more compression friendly), but the compression doesn't save much space and adds most of the extra overhead.

 Anyway, the engine is a command string system or MML as it's commonly referred to. It's based/similar on mml structure, but it is its own design.  The command string structure (mml) is pretty flexible in execution - more so than a typical tracker format. A single entry can contain up to 256 bytes of commands per channel, but I doubt you'll ever need that many. For example, you can reload envelope registers on every note if you wanted. I was documenting and decoding the Air Zonk engine for myself and someone who was interested in doing remixed versions. I had pretty much the whole thing figured out, so I decided to write a player for the song data as an exercise.

 HuC has the same MML player that Mkit has, it just happened to get disabled in the latest release. If you look through startup.asm, you can see where it's accidentally commented out. Dave Shadoff wrote the player based on the Bios player, but he stated that it was untested. You're probably better off writing your own anyway. It's fairly easy to write such an engine. Writing the converter ascii format to bin file is another story.

 http://pcedev.net/docs/Air_Zonk/example.txt  <- an example of the syntax(ascii version) I'm working on for a converter.

Arkhan

  • Hero Member
  • *****
  • Posts: 14142
  • Fuck Elmer.
    • Incessant Negativity Software
Re: Air Zonk music engine
« Reply #6 on: March 06, 2009, 10:02:54 PM »
hmm, from what I saw in sound.asm from HuC, alot the sound routines are gone/empty...

where at are you referring to? (and what from HuC is working sound player stuff?)

as for MML, the MSX MML format is ridiculously easy which is why I decided to start porting over some MSX stuff I have for use on the PC Engine.
« Last Edit: March 06, 2009, 10:36:50 PM by Arkhan »
[Fri 19:34]<nectarsis> been wanting to try that one for awhile now Ope
[Fri 19:33]<Opethian> l;ol huge dong

I'm a max level Forum Warrior.  I'm immortal.
If you're not ready to defend your claims, don't post em.

Tom

  • Guest
Re: Air Zonk music engine
« Reply #7 on: March 08, 2009, 05:24:27 PM »
hmm, from what I saw in sound.asm from HuC, alot the sound routines are gone/empty...

where at are you referring to? (and what from HuC is working sound player stuff?)

as for MML, the MSX MML format is ridiculously easy which is why I decided to start porting over some MSX stuff I have for use on the PC Engine.


 I was referring the sound.asm file. It was written to mimic the BIOS player. I see that some of the more advance features are not implemented though. But anyway, in startup.asm the player will never activate because someone messed up conditional IF/IFDEF statements in the file.

Once this Air Zonk player is finished, I'll make modifications/enhancements and retro fit it for HuC.

 New version  - here. Added lots of new stuff including onscreen display of channels/notes. (Just use "mml.pce' if you don't want or know how to assemble the source code.)

Tom

  • Guest
Re: Air Zonk music engine
« Reply #8 on: March 10, 2009, 08:25:29 AM »
Does Air Zonk use a music engine that's significantly different from other PCE games?

 Actually, I was tracing through Coryoon and it uses the *exact* same music engine. I mean, registers in memory are even in the same spot for the same functions - which  is a bit odd considering the source should have assembled into slightly different memory locations. I guess Air Zonk really did use Coryoon's game engine like the rumors/sites theorized.