Hacker News

Top stories

Live mirror
30 storiesupdated just nowView source snapshot
  1. Laya the open source version of Jev(convaiinnovations.com ↗)
    78comments
  2. What Zig felt like, coming from Rust(besok.github.io ↗)
    38comments
  3. A graphical desktop for the ZX Spectrum(github.com/mindbox77 ↗)
    7comments
  4. AI-generated posters don’t have to be horrible(john.hartnup.uk ↗)
    367comments
  5. Tin: full-text search for Postgres(planetscale.com ↗)
    3comments
  6. Human brain is two separate organs, Stanford Medicine-led research finds(stanford.edu ↗)
    163comments
  7. “The Secret Life of Circuits” is here(coredump.cx ↗)
    37comments
  8. Android 17 is the first since 3.x to add new APIs without releasing to the AOSP(grapheneos.social ↗)
    519comments
  9. Asking Authors About Their Own Papers(medium.com/tmlrorg ↗)
    6comments
  10. Black Holes or Black Hole Stars? Astronomers Spar over 'Little Red Dots'(quantamagazine.org ↗)
    6comments
  11. San Francisco Onion Futures Company(onionfutures.com ↗)
    92comments
  12. GPT-6 Astra Solves a WWI German Radio Cipher(prinzai.com ↗)
    120comments
  13. If math is more than proof, we need to better celebrate the rest of it(terrytao.wordpress.com ↗)
    169comments
  14. Learning Another Language May Be One of the Best Ways to Keep Your Brain Healthy(theconversation.com ↗)
    9comments
  15. AI Safety Is Mostly a Sex Cult(bsky.app ↗)
    4comments
  16. Cloudflare Quick Tunnels(cloudflare.com ↗)
    299comments
  17. Communication by means of modulated Johnson noise(pnas.org ↗)
    16comments
  18. How to Write with an LLM(sockpuppet.org ↗)
    357comments
  19. You can run Git on object storage if you re-make packfiles(tigrisdata.com ↗)
    23comments
  20. Saving another 100TB of RAM(cloudflare.com ↗)
    87comments
  21. SDCC – Small Device C Compiler(sourceforge.net ↗)
    22comments
  22. Science Is Open Software(jepedersen.dk ↗)
    47comments
  23. From Stonemasons to Carpenters(thelastsoftwareengineer.substack.com ↗)
    4comments
  24. Why building a Rust LSP is hard(rust-glancer.github.io ↗)
    44comments
  25. Ray Ozzie and the Optimism of Being Early(reproof.app ↗)
    5comments
  26. Ctenophores: Wonders of Biology(quantamagazine.org ↗)
    6comments
  27. The first new cat species discovered in 100 years(nationalgeographic.com ↗)
    119comments
  28. NASA-IBM Lunar Foundation open-Source Geospatial AI Model(usra.edu ↗)
    5comments
  29. OpenJev(openjev.com ↗)
    275comments
  30. How OpenAI Used Its Own LLMs to Design Its Jalapeño Chip(ieee.org ↗)
    115comments

Show HN: I wrote a custom assembler for CHIP-8 in C++

23 pointsby 1d agogithub.com
4 comments
I'm writing a custom assembler for CHIP-8 and just finished adding support for the DB/.byte directive so I can embed sprites in the ROM and finally get something drawn on the screen. It SHOULD support all OG CHIP-8 instructions, but still a ton of rough edges that I'm ironing out.

This is my first ever C++ project, just like the CHIP-8 emulator was my first ever C (and emudev) project. It's so satisfying to write assembly and have your program spit out a ROM that actually runs in the emulator you wrote.

All code is written by me (a lot of it livestreaming) as evident by the quality, no AI.

2h agoHN ↗

Awesome milestone! As someone diving into C and C++ right now, what was the steepest part of the learning curve for you when structuring the assembler compared to writing the emulator in C?

1h agoHN ↗

Nice, chip8 is a lot of fun. I looked at your emulator implementation too, and it looks like you have an OOB access bug in the "I" register (it can be incremented beyond the RAM array bounds). This is a very common chip8 emulator bug, which can (in some cases) be exploited to allow a malicious ROM to escape the emulator. I wrote about this here: https://www.da.vidbuchanan.co.uk/blog/bggp3.html

1h agoHN ↗

Really cool project. How much harder did the assembler feel compared to writing the emulator?