Hacker News

Top stories

Live mirror
30 storiesupdated just nowView source snapshot
  1. Laya the open source version of Jev(convaiinnovations.com ↗)
    142comments
  2. A graphical desktop for the ZX Spectrum(github.com/mindbox77 ↗)
    50comments
  3. AI-generated posters don’t have to be horrible(john.hartnup.uk ↗)
    459comments
  4. Human brain is two separate organs, Stanford Medicine-led research finds(stanford.edu ↗)
    181comments
  5. Tin: full-text search for Postgres(planetscale.com ↗)
    43comments
  6. Supabase (YC S20) Is Hiring for OrioleDB(supabase.link ↗)
    discuss
  7. Asking Authors About Their Own Papers(medium.com/tmlrorg ↗)
    37comments
  8. “The Secret Life of Circuits” is here(coredump.cx ↗)
    51comments
  9. Black Holes or Black Hole Stars? Astronomers Spar over 'Little Red Dots'(quantamagazine.org ↗)
    14comments
  10. Android 17 is the first since 3.x to add new APIs without releasing to the AOSP(grapheneos.social ↗)
    552comments
  11. I built the fastest PHP webserver in the world(qbixserver.com ↗)
    30comments
  12. San Francisco Onion Futures Company(onionfutures.com ↗)
    117comments
  13. New evidence for hidden chambers beyond Tutankhamun's tomb(nature.com ↗)
    5comments
  14. GPT-6 Astra Solves a WWI German Radio Cipher(prinzai.com ↗)
    132comments
  15. If math is more than proof, we need to better celebrate the rest of it(terrytao.wordpress.com ↗)
    193comments
  16. Agreement between the USA and Denmark (1951,2004) [pdf](state.gov ↗)
    17comments
  17. What Zig felt like, coming from Rust(besok.github.io ↗)
    108comments
  18. Cloudflare Quick Tunnels(cloudflare.com ↗)
    301comments
  19. How to Write with an LLM(sockpuppet.org ↗)
    360comments
  20. You can run Git on object storage if you re-make packfiles(tigrisdata.com ↗)
    24comments
  21. Communication by means of modulated Johnson noise(pnas.org ↗)
    18comments
  22. Saving another 100TB of RAM(cloudflare.com ↗)
    89comments
  23. SDCC – Small Device C Compiler(sourceforge.net ↗)
    23comments
  24. Ray Ozzie and the Optimism of Being Early(reproof.app ↗)
    11comments
  25. Science Is Open Software(jepedersen.dk ↗)
    51comments
  26. Why building a Rust LSP is hard(rust-glancer.github.io ↗)
    44comments
  27. The first new cat species discovered in 100 years(nationalgeographic.com ↗)
    122comments
  28. Ctenophores: Wonders of Biology(quantamagazine.org ↗)
    7comments
  29. OpenJev(openjev.com ↗)
    280comments
  30. From Stonemasons to Carpenters(thelastsoftwareengineer.substack.com ↗)
    4comments

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.

3h 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?

3h 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

3h agoHN ↗

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