6Bit audio:
Posted: 13 Jan 2021, 17:44
I've been meaning to experiment with 6Bit audio for over 2 years now; I finally got around to it...
I've added some experimental code to my emulator to enable/disable 6Bit audio mode on the fly with the audio editor, (CTRL+A). This lets you see/hear the stark contrast in quality between 4Bit and 6Bit mode. Try it with a running .gtMID file and you'll get an idea.
The way that it works, is that it patches the native ROM to output the full 6Bit mixed sample, instead of the normal truncated 4Bit mixed sample. The code changes were fairly trivial and I will document them here later, but there are some caveats:
1) It only works with ROMv5a and DEVROM currently, seeing as it is an experimental feature this seems appropriate.
2) You lose the ability to control the two most significant LED's and these same LED's now respond to the 2 lower order bits of the 6bit mixed output sample.
3) It is currently emulation only, I will be building a tiny daughter board that replaces the SIL resistor pack soon and testing these 6Bit theories on real hardware, (it will need bodge wires for the 2 LED outputs and power as well).
4) You can experiment in the Audio Editor in the new MIDI section and in .gbas code using the '_enable6BitAudioEmu_ <ON/OFF>' pragma. Neither modes do anything unless you are running ROMv5a or DEVROM.
5) You can hear as well see as the difference in audio quality; I always wondered why Marcel went to the trouble of storing, fetching, mixing 6 bit samples and then truncating and outputting only the highest 4 bits. It's a shame there wasn't a simple configurable software switch to switch between 4Bits:4LEDS and 6Bits:2LEDS. This would have required a minor altercation to the board and a different SIP resistor pack, but all worth it IMHO.
Here's a few pics to get the drift:
4Bit: 6Bit: Audio Editor:
I've added some experimental code to my emulator to enable/disable 6Bit audio mode on the fly with the audio editor, (CTRL+A). This lets you see/hear the stark contrast in quality between 4Bit and 6Bit mode. Try it with a running .gtMID file and you'll get an idea.
The way that it works, is that it patches the native ROM to output the full 6Bit mixed sample, instead of the normal truncated 4Bit mixed sample. The code changes were fairly trivial and I will document them here later, but there are some caveats:
1) It only works with ROMv5a and DEVROM currently, seeing as it is an experimental feature this seems appropriate.
2) You lose the ability to control the two most significant LED's and these same LED's now respond to the 2 lower order bits of the 6bit mixed output sample.
3) It is currently emulation only, I will be building a tiny daughter board that replaces the SIL resistor pack soon and testing these 6Bit theories on real hardware, (it will need bodge wires for the 2 LED outputs and power as well).
4) You can experiment in the Audio Editor in the new MIDI section and in .gbas code using the '_enable6BitAudioEmu_ <ON/OFF>' pragma. Neither modes do anything unless you are running ROMv5a or DEVROM.
5) You can hear as well see as the difference in audio quality; I always wondered why Marcel went to the trouble of storing, fetching, mixing 6 bit samples and then truncating and outputting only the highest 4 bits. It's a shame there wasn't a simple configurable software switch to switch between 4Bits:4LEDS and 6Bits:2LEDS. This would have required a minor altercation to the board and a different SIP resistor pack, but all worth it IMHO.
Here's a few pics to get the drift:
4Bit: 6Bit: Audio Editor: