6Bit audio:

Using, learning, programming and modding the Gigatron and anything related.
Forum rules
Be nice. No drama.
Post Reply
at67
Posts: 223
Joined: 14 May 2018, 08:29

6Bit audio:

Post by at67 »

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:
Audio_4bit.JPG
Audio_4bit.JPG (128.28 KiB) Viewed 125 times
6Bit:
Audio_6bit.JPG
Audio_6bit.JPG (99.33 KiB) Viewed 125 times
Audio Editor:
Audio_Editor.JPG
Audio_Editor.JPG (75.63 KiB) Viewed 125 times
Sugarplum
Posts: 14
Joined: 30 Sep 2020, 22:19

Re: 6Bit audio:

Post by Sugarplum »

Neat! That looks a bit cleaner. I would love to hear a comparison.
at67
Posts: 223
Joined: 14 May 2018, 08:29

Re: 6Bit audio:

Post by at67 »

Sugarplum wrote: 13 Jan 2021, 19:23 Neat! That looks a bit cleaner. I would love to hear a comparison.
Yeah it is much cleaner, visually and audibly, you can listen to the results in the emulator as well. Just click the 4Bit/6Bit button whilst a MIDI is playing and the quantisation noise difference is immediately obvious.

The signal to noise power formula is something like this from memory (1.76 + (6*n))dB where n is number of bits.

Code: Select all

    n = 4 gives 25.76dB
    n = 6 gives 37.76dB
    n = 8 gives 49.76dB
The human ear can discern the quantisation noise between n=4 and n=6 to a greater degree than between n=6 and n=8.
Post Reply