Hacker News new | ask | show | jobs
by benj111 2503 days ago
"metric butt-load of mask-programmable ROM"

What would that be in this context? I'm guessing we're talking KB rather than TB?

4 comments

I'd guess about 1 MB order of magnitude. That would be a butt-load even for samples.

1 MB would be enough for 45 seconds audio at 8 bit PCM @22 kHz. If they're half competent, they could use ADPCM or much better (and cheaper to decode too!) vector quantization.

With VQ, you could go even down to ~1 bits (~6 minutes of audio per megabyte) per sample while maintaining good audio quality. Decoding is very simple, so 6502 would have plenty of oomph to do that.

Using the trivial BTc encoding, you could archive a good compression ratio and generate audio without using a DAC . https://www.romanblack.com/picsound.htm
MB == Metric Buttload.

Makes sense.

> [Vector quantization] Decoding is very simple.

Do you have an encoder/decoder to point us to?

VQ is a very well known technique. For something quick, you might be interested to check this blog post about (unmodified) C64 playing high quality audio at 44.1/48 kHz, VQ compressed down to 96-128 kbit/s: https://brokenbytes.blogspot.com/2018/03/a-48khz-digital-mus...

There's some decoder code there as well.

Arithmetic coded uniform quantization works very well and is straightforward to implement!
the poster mentioned it was for greeting cards, I remember their used to be a lot of greeting cards that would play a recording when you opened them. I bet they loaded low-quality samples into the ROM for that.
The 6502 can only address 64K, so I'd assume 32K of ROM at 8000-FFFF with 128 (not 100) bytes of RAM mapped at both 80-FF (zero page) and 180-1FF (for the stack) and 128 MMIO bytes at 00-7F. It depends on how much they've modified the base 6502 design, though; the above is for "not at all".
In such an integrated design 6502 can address exactly as much as you want/need it to.

Just implement bank switching for top 32 kB of address space. 256 banks (= one 8-bit register) * 32 kB = 8 MB. Need more? Add another bank switch register and you got up to 2 GB.

For a $0.06 part? Uh, clearly not TB...