Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Show HN: A talking board game in a 2k program and 128 bytes of RAM (amazonaws.com)
60 points by makapuf on March 8, 2024 | hide | past | favorite | 21 comments


a 2k program, 128 bytes of ram... and 4 megabits of flash! still super cool

i really appreciate the filesystem design notes

i've been wanting to do something like this without the 4 megabits of flash; wondering if i can use lpc-10 on an atmega328, since it has a hardware multiplier (unlike the attiny45 and attiny2313s i have)

i've been thinking that it would be nice to get a speaker driver circuit that eliminates the dc bias from the speaker current that this transistor-switch driver is providing. you can't just put an ac-coupling capacitor in series with the speaker like you normally would because the cap charges up to 3 volts and stays there, with no way to ever discharge. you could of course ground the emitter through an inductor or resistor, but is there a better way?


Use speech synthesis rather than sampled audio — Speak & Spell did comprehensible speech with a few kilobytes of ROM in 1978.

With the benefit of a modern microcontroller, I imagine you could do natural-ish speech with only moderately larger parameter sets.


yeah, the lpc-10 voice codec i mentioned uses the same linear predictive coding approach the chip in the speak & spell used; it requires about 10 multiplications per output sample, which is about 80000 per second, which may be challenging on an attiny2313 or attiny45 where you have to do the multiplications with repeated shifts and adds, but i think ought to be doable on the atmega328


I should have mentioned that the project is 11 years old (2012) so things were a but different (rpi were just out, no Chinese padauk-like 5cts microcontrollers but also attinys were less expensive pre covid !) And yes it uses a 512k flash :)


Ah that makes sense!

I think I'd use a rasperry pi pico now-a-days for about the same cost but with enough flash built in (2MB) and enough processor to play mp3 files.

See this example project which makes a pi pico into an mp3 player from a PWM pin.

https://embeddedcomputing.com/technology/processing/interfac...


I'm a cheapo, I'd use a ch32v003 an stm8 or a modern attiny ;) or maybe a stm32 with 128k of flash and a dac and would compress the audio.. much more choices now ! Speech synthesis on a cheap mcu would be awesome


only about 4$ of parts [cost] have been used to build a complete amplified audio game with 1 minute Audio storage and many sentences.

For truly low-cost MCUs with similar capabilities and applications, look at Generalplus/Sunplus ICs -- sub-$1 prices, bare die/COB, and widely used in commercial products. E.g. GPC22C170A has 256B of RAM and 512KB of ROM.

https://www.generalplus.com/1LVlangLN14SVprot_noSNproduct


Those are really neat, but what kind of tool chain do they have, can you use something like the arduino editor to program them?


Not Arduino for sure. This is traditional "real product" stuff.


2KiB ROM and 128B RAM happens to be exactly what the Atari 2600 launch titles used. Interesting that the same numbers would pop up in newer hardware projects.


Wondering if QOA would work for the audio? https://qoaformat.org/ it's a pretty small implementation with decent compression, but not sure if it'd work in those constraints

(I'm guessing not. QOA's format includes 128 bytes of lms_state per channel even before it comes to the samples; way too big)


No footage of the game?



"Unfortunately so far it only translates into an incomprehensible dead language."


I'm guessing it wouldn't transmit well because it's an audio game (a support for playing the Goose game)


it still would be nice have a footage of the board in action at the end of the page.

It's like reading a romance book building a climax through the chapters just for an inconclusive ending.


There is a video at the top of the page, does it show ? Ah maybe not on mobile I'll try to figure why not.


I don't see it either on a desktop pc.

I see an `iframe` with this url [1] but the `<body>` of the document is empty. It's very likely you have to change the protocol to `https` (instead of `http`), otherwise the browser refuses to load the url automatically.

[1]: http://player.vimeo.com/video/68089370


it is that - if you turn on the setting "Enable HTTPS mode in all windows" in firefox, the http is automatically converted to an https link and it works.


It doesn’t (Safari, iOS)


Brilliant. Like the straightforward approach and yes those programmers are awesome!




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: