Most emulators work by running everything through a single “loop”. This makes sound emulation easy because everything is synchronised. However, microM8 doesn’t operate this way. Each component of microM8 (video, sound, CPU) functions on its own, communicating with each other the way a real computer system does. However, because microM8 is a software program and not hardware, there is latency (sometimes a lot of latency) – and this causes serious problems for sound emulation.
So, while emulating an AY-3-8910 is practical for other emulators, it wasn’t practical in microM8. So instead, microM8 has its own synthesiser, which understands the same commands as the AY-3-8910 and generates similar-sounding output. This provides higher-quality sound and additional mixing options.
It also creates an opportunity: since the Mockingboard events are translated to synthesiser events, we can record that stream of events. But what can we do with that stream once we have it?
.pak is a new file format used in microM8 to contain configuration files and assets used in the “upcycling” of classic games. For example, in the “pak” version of Montezuma’s Revenge, we’ve placed a brick background behind the action. Configuration files specify colour remapping and voxel depth information, and a control program runs in a parallel Applesoft BASIC interpreter, keeping track of the joystick position and rotating the camera around the 3D model appropriately. All of these combine together to create a unique and new experience. .pak files bundle all of these files together in a compressed format, to allow for portability and ease of use.
You can create your own .pak files by navigating (in the microM8 catalog) to the disk, binary or BASIC program you wish to be the primary executable in the new .pak, and pressing control-shift-P. The new microPak is created in your /local directory (or root directory, if logged in to microLink). A predefined set of configuration files is automatically generated inside the .pak, and you can copy your desired asset and control programs into it. To boot it, you just select the .pak.
In the audio.cfg file inside the .pak is an option to play additional audio from a file. If we copy the recorded Mockingboard stream (with the .rst extension from the local/MyAudio folder) into the .pak, and then specify that file in the audio.cfg (under music/source, replacing the default value music.ogg with the name of the .rst file) then when the .pak is “booted” the music will play. There are other parameters inside the audio.cfg file that allow for delayed start of the music, to set a different stereo balance, change the speaker volume level etc.
If you want to get fancier, you can play the .rst file using the @audio.play function inside a control program, and then you could trap a game end event and reset the music, for example. But that’s something we can explore another time.
You can get microM8 from the microM8 Apple II Emulator page.
Be the first to comment