Show HN: Tamagotchi P1 for FPGAs

(github.com)

61 points | by agg23 7 days ago

8 comments

  • magicalhippo 14 hours ago
    Very nice project. Playing with FPGAs can be difficult, but also a lot of fun.

    Must say the code was nicely organized and easy to follow. My own code is a bit of a mess in comparison.

    Did you try out plain Verilog before going with System Verilog? My plan was to move on to generators like nMigen, now called Amaranth[1], and they spit out Verilog IIRC so decided to learn that for debugging.

    Then life happened and got sidetracked, but been wanting to pick it up again.

    How was it to program for the Analogue Pocket? I was recently looking at it as just a portable retro gaming device, but if it's easy to double as a fun FPGA platform then that would be great.

    [1]: https://github.com/amaranth-lang/amaranth

    • agg23 2 hours ago
      I wrote my first project in VHDL (https://github.com/agg23/openfpga-pong) due to the type safety, then learned that the US (and Analogue team) primarily use Verilog, so I switched. I don't use many System Verilog features, but I saw no need to use older versions unnecessarily.

      I've talked to the Amaranth people. I'm not incredibly interested in using real programming languages to write HDL, but I think I like keeping programming and hardware separate in some ways.

      The Analogue Pocket is fantastic for getting started with FPGAs because everything you need is built into the device and it's not "too" expensive. You do lack Pmods. There is the fully open source Game Bub (https://www.crowdsupply.com/second-bedroom/game-bub) as a cool new platform to target, but it will have orders of magnitude fewer users than the Pocket. NOTE: I am extremely biased about the Pocket; I have a working relationship with Analogue and own the main platform ports to the Pocket (for example NES, SNES, and many more).

  • magicalhippo 20 hours ago
    Man, I'm kicking myself for not having a backup, but there was this game programming contest around early 2000s where they had to make a game in a day or less.

    It was either hosted by flipcode[1] or linked to from there.

    One of the entries was a faithful reimplementation of Tamagotchi for Windows, except instead of a small creature to look after it was a small rock, and the game was called Tamagraniti (I'm pretty sure).

    You could do all the same things, water your rock, give it a pet pebble and such.

    I just really loved the silliness of it, and the implementation was really well done in that it mimicked the little device with the LCD screen.

    Been trying to find it but seems gone...

    [1] https://www.flipcode.com

  • dempedempe 3 hours ago
    Now I finally have an incentive to buy an Analogue Pocket. Nice work and really great idea for a project!
  • brian-armstrong 21 hours ago
    Very cool project!

    Anything surprise you about working on this? Any tips you found about implementing for FPGA?

    • agg23 2 hours ago
      As someone with no hardware experience, I find working with HDLs to be a very different environment and potentially hard to reason with. I did my best to document things from a software perspective (particularly for the Analogue Pocket) (https://github.com/agg23/analogue-pocket-utils/wiki). My code is also running in some capacity in most of the main core ports to the Pocket.
  • ozarkerD 1 day ago
    That's insanely cool! I love fun applications of FPGA like this.
  • FredPret 22 hours ago
    1800x turbo?

    What happens if you fast-forward a whole lot, any easter eggs?

    • agg23 2 hours ago
      That ends up not actually being that fast. The real goal was to be able to wake the Pocket/Tamagotchi core and have it automatically fast forward time as if the device was running that whole time. But when the FPGA fabric (and my design) limits us to 1800x, that means we get a whopping 30 minutes of sim time per every 1 second of real time. So even if you slept the device for a day, it's unreasonable to wait for it to fast forward.

      Nothing special happens when fast forwarding, other than you can kill your Tamagotchi very quickly :P

  • crims0n 23 hours ago
    This is awesome, nice work!
  • ginko 12 hours ago
    Great stuff. Reminds me of some of my favorite CCC talks about reverse-engineering tamagotchis:

    https://www.youtube.com/watch?v=c4PkcZScBV8

    https://www.youtube.com/watch?v=qbTgDfB0cao