Live data from Hacker News

Battery-free Game Boy (2020)

freethegameboy.info

61–70 of 170 posts

Re: Battery-free Game Boy (2020)

#61

Looks like they used an existing emulator and this was mostly a hardware and memory integrity experiment. I’d love to see this approached from the perspective of “how clever can we get with the emulator itself to save power?” When I wrote mine, something I ran into was realizing that often the CPU and PPU are just doing the same thing over and over and over. If only I could cache all that work. For example, you don’t…

Great contribution to the space, my friend

Re: Battery-free Game Boy (2020)

#62
post #10

Earlier quoted context omitted.

That was a pleasure to read through. Made me think of literate code.

Am I the only one that thinks this is a normal level of comments? Ok maybe slightly more than I would normally do... But if I was reading it my thought would be "thank god they wrote comments" not "they commented the heck out of this!"

you must also have really good commenting habits. I've rarely seen this at work, let alone for a passion project

Re: Battery-free Game Boy (2020)

#63

When I was a kid I had a toy electronics kit and one of the circuits was an AM radio that worked without batteries. A normal radio station signal is strong enough to drive a pair of earbuds without any additional power. Since then I've always wondered if you could harvest that same radio energy to power other things without batteries, maybe even a Game Boy. There's electromagnetic radiation in the air all around us.…

I heard a tale in the days of yore where a radio station was not getting the range promised by the laws of physics. When they did some investigating they found an engineer that lived next door to the tower was syphoning power from the radio waves as part of a home experiment. I'm not qualified to determine the plausibility of this, but I hope it's true.

It’s a nice ‘Edison vs Tesla’ type story - but I’m pretty skeptical that there’s any truth to it. It just doesn’t seem viable enough to bother doing, for how much of a hardware setup you’d need versus how much electricity you’d be ‘harvesting’, to the extent that it meaningfully impacts the signal range itself.

Like unless this engineer built the Russian woodpecker array

Re: Battery-free Game Boy (2020)

#64

When I was a kid I had a toy electronics kit and one of the circuits was an AM radio that worked without batteries. A normal radio station signal is strong enough to drive a pair of earbuds without any additional power. Since then I've always wondered if you could harvest that same radio energy to power other things without batteries, maybe even a Game Boy. There's electromagnetic radiation in the air all around us.…

That sounds like the field of energy harvesting [1], specifically the "ambient radiation sources" category [2].

The page is ... not short, more people have been thinking about this!

[1]: https://en.wikipedia.org/wiki/Energy_harvesting

[2]: https://en.wikipedia.org/wiki/Energy_harvesting#Ambient-radi...

Re: Battery-free Game Boy (2020)

#65
post #10

Earlier quoted context omitted.

That was a pleasure to read through. Made me think of literate code.

Am I the only one that thinks this is a normal level of comments? Ok maybe slightly more than I would normally do... But if I was reading it my thought would be "thank god they wrote comments" not "they commented the heck out of this!"

It sticks out to me. The regular mode for me when reading code is guessing. Even more rare are comprehensive comments which are actually up to date. Documenting something which never changes (like a gameboy) lends itself more to such. (Even though the code can still change, the device it emulates at least never does.)

Re: Battery-free Game Boy (2020)

#66

When I was a kid I had a toy electronics kit and one of the circuits was an AM radio that worked without batteries. A normal radio station signal is strong enough to drive a pair of earbuds without any additional power. Since then I've always wondered if you could harvest that same radio energy to power other things without batteries, maybe even a Game Boy. There's electromagnetic radiation in the air all around us.…

That seems potentially influential for human health long term. Let alone radio waves are one of the weakest forms.

We've since enveloped the planet with SpaceX satellites. Last I saw a gif, it was terrifying

Re: Battery-free Game Boy (2020)

#67

Oddly enough, the "energy harvesting switches" they used in this are commercial products! https://www.digikey.com/en/products/detail/zf-electronics/AF... https://switches-sensors.zf.com/us/product/energy-harvesting...

is this how they make wireless doorbells that dont need a battery?

Re: Battery-free Game Boy (2020)

#68
post #6

This is definitely achievable! When I was a young, we'd take long road trips and my Gameboy (original) would run out of battery. I'd use a small solar panel (in place of one of the batteries) from a science kit to keep going, propped up against the back window. The wires and panel were held in place with chewing gum (yes, kids can be gross). I did have the "frequent power failures". Props to the team on fixing this :…

I used to play with one of these attached:

https://rembo.me/unsorted/gameboy-mods-january/#lg=1&slide=1...

It's why my forearm muscles are so toned ;-)

Re: Battery-free Game Boy (2020)

#69

When I was a kid I had a toy electronics kit and one of the circuits was an AM radio that worked without batteries. A normal radio station signal is strong enough to drive a pair of earbuds without any additional power. Since then I've always wondered if you could harvest that same radio energy to power other things without batteries, maybe even a Game Boy. There's electromagnetic radiation in the air all around us.…

Funny, but I thought about the same thing. I guess AM radio waves don't have a big amount of energy by the time they hit the receiver.

I think Nicola Tesla experimented with sending energy wireless, at longer distances, over the air. I don't remember what his results were, but man, that guy was so ahead of its time.

Re: Battery-free Game Boy (2020)

#70
post #10

Earlier quoted context omitted.

That was a pleasure to read through. Made me think of literate code.

Am I the only one that thinks this is a normal level of comments? Ok maybe slightly more than I would normally do... But if I was reading it my thought would be "thank god they wrote comments" not "they commented the heck out of this!"

From the perspective of someone who generally writes far fewer comments than this, I find that this code has a number of comments which is well-justified due to the complexity of the subject, poor availability of external documentation describing the interface it implements, and the nature of the code. However, the code can be written in a manner which is still readable with fewer comments.

Here's a sample from the file:

    // For sprites, color 0 is transparency so don't draw anything.
    if color == 0 {
        continue;
    }
This comment is probably not necessary: it would be equally clear if it were written as something like the following:

    if color == SPRITE_COLOR_TRANSPARENT {
        continue;
    }
A few lines up is another comment:

    // Is this specific pixel not on the screen? We already check that x_pos is not off
    // the left side earlier, so only need to check that it's not off the right side.
    if x_pos + p >= 160 {
        continue;
    }
If the code were written with a constant, then it would only need to clarify why we don't check the left side here (the only non-obvious thing about the code), so:

    // Note: bounds testing on the left side is handled earlier
    if x_pos + p >= SCREEN_WIDTH {
        continue;
    }
One last example:

    // We want to iterate through 160 pixels to draw one scanline.
    for col in 0..160u8 {
No comment, similar level of readability:

    for col in ppu.iterscanlines() {
Post reply on HN