Hacker News

Top stories

Live mirror
30 storiesupdated just nowView source snapshot
  1. OpenJev(openjev.com ↗)
    96comments
  2. ZCode, the GLM coding agent, silently uploads your Git history(tokenstead.ai ↗)
    16comments
  3. Jemalloc 5.4.0(github.com/jemalloc ↗)
    54comments
  4. Microsoft exec called AI scraping 'the largest theft of labor in human history'(techcrunch.com ↗)
    180comments
  5. The scourge of x86 emulation(fex-emu.com ↗)
    35comments
  6. Cekura (YC F24) Is Hiring(ycombinator.com ↗)
    discuss
  7. Astra for Law(openai.com ↗)
    599comments
  8. Bonsai 2 27B: Near-Lossless Compression in a 9x Smaller Footprint(prismml.com ↗)
    142comments
  9. Replacing Pull Requests with Delta(zed.dev ↗)
    16comments
  10. Subnormal floating-point numbers are expensive on Intel processors(lemire.me ↗)
    1comments
  11. Bend – A language that blocks AI mistakes via proof, on CPU and GPU(bend-lang.com ↗)
    238comments
  12. Qwen 3.8 Omni Flash(qwen.ai ↗)
    88comments
  13. Hister: A private search engine for the pages you visit and the files you keep(github.com/asciimoo ↗)
    171comments
  14. Wax motor(wikipedia.org ↗)
    75comments
  15. When the fractional part of a float fixes your shader(crocidb.com ↗)
    8comments
  16. Warren Buffett Steps Down as Berkshire Chairman, Names Son to Replace Him(nytimes.com ↗)
    14comments
  17. Pre-Greek: The lost language hidden within Ancient Greek(linguisticdiscovery.com ↗)
    43comments
  18. Fujitsu launches made-in-Japan next-generation CPU FUJITSU-MONAKA(global.fujitsu ↗)
    236comments
  19. Dr Julius Neubronner's Miniature Pigeon Camera(publicdomainreview.org ↗)
    discuss
  20. How to Write with an LLM(sockpuppet.org ↗)
    127comments
  21. A heap overflow and SSO misconfiguration to compromise OpenAI internal repos(hacktron.ai ↗)
    159comments
  22. Google illegally retains customer data,and I am taking legal action against them(medium.com/istokovicsgyorgy79 ↗)
    6comments
  23. Shapelearn Qwen 3.8 27B (13.1 GB VRAM)(byteshape.com ↗)
    16comments
  24. Ask A Monk – A digital wilderness for thoughts with no immediate answer(askamonk.online ↗)
    27comments
  25. Flet 1.0 – Build cross-platform apps in Python(flet.dev ↗)
    67comments
  26. Telstra outage: The night a network decided the year was 2006(netnod.se ↗)
    29comments
  27. Diplodocus, Long Thought Exclusively American, Turns Up in Spain(sci.news ↗)
    45comments
  28. Speeding up gearhash on ARM64(sam.dev ↗)
    discuss
  29. The most important product decision is what you don't build(liamnugent.me ↗)
    41comments
  30. Why I didn’t sign the Fields medallists’ letter(gowers.wordpress.com ↗)
    374comments

Emulating a 6502 with cycle-perfect timing

84 pointsby 12y agoxania.org
20 comments
12y agoHN ↗

My 6502 is a little rusty but wasn't it always faster to decrement the index? Don't compare to 10 each time, just decrement to zero. You save one instruction, which was probably a few clock cycles.

12y agoHN ↗

Absolutely yes: I was just showing an example, not the most optimal code :)

12y agoHN ↗

To me abstraction above the hardware is like condoms. Some people say "Use three condoms, its better".

I don't want a literal C64 -- just the complete open simple access... but 64-bit and 3Ghz and multicored.

I don't want it to run on a 386, just x86_64.

12y agoHN ↗

Nothing quite so stark and sublime as hacking away with registers and memory alone, eh? Ring 0 is pretty cool place to be, I'll grant you that.

I think perhaps what I long for is the knowledge that I could gain a _total understanding_ of the hardware, ROM, timings - things were simple enough back in the day. The commodore 64 and other 8-bits are like that, and I've seen talks given on the c64 that seemed to lay bare every secret. I have so much respect for those hackers that know a device through and through with history and anecdotes related to the thing to add color to their own vast understanding.

12y agoHN ↗

Nice project zellyn; I've got one with the same creative repo name: https://github.com/pda/go6502 ;) Mine currently makes no attempt at being cycle-accurate; it's basically the dev/test environment for a breadboard 6502 computer I'm working on.

12y agoHN ↗

Very nice. I used v6502 a lot as the article shows, but the real fun comes with the cycle-stretching, which AFAICT can't be simulated using v6502.

12y agoHN ↗

Hmmm. You should be able to pull the same lines up/down or pause the clock the way the real hardware does it.

12y agoHN ↗

I think this is really awesome stuff. Now please someone turn this into a product. Take existing FPGAs and the synthesized hardware, and some place and route data, and generate cycle perfect simulations. If you do this, I can almost guarantee that you will be acquired by one of the big HDL companies, and you might even get to make a tool widely used and loved by EEs on the Internet everywhere. We've got spice online, we've got schematic capture online, now cycle accurate hardware simulation is the next target.

12y agoHN ↗

Take existing FPGAs and the synthesized hardware, and some place and route data, and generate cycle perfect simulations.

now cycle accurate hardware simulation is the next target.

Can you clarify this? Do you mean, take a 6502 HDL model, place and route it to an FPGA and back-annotate the PaR data into a simulation testbench that runs in an online simulator?

12y agoHN ↗

Yes. (could be an RTL model, something post HDL) You have that?

12y agoHN ↗

Cycle accurate models have been a product for a long time - I was writing them for a job over a decade ago.

Don't confuse them with timing accurate models, which also stimulate where in the clock cycle levels change. That's the class of model you would be interested in place and route data for.

12y agoHN ↗

I agree, I've got a copy of ModelSim which I use for that, I was wondering if someone could create a 'simulator as a service' using JS code in a browser. If you can take the RTL description of the synthesized hardware and create a model that runs in a browser, then you can have your browser do a quick check of your HDL while you are working. People compile so many things into JS these days, why not hardware?

12y agoHN ↗

Just reposting TempleOS's post (which, being hell-banned, many won't see). Plus, it's a little less ranty than usual :) Without further ado:

----------

To me abstraction above the hardware is like condoms. Some people say "Use three condoms, its better". I don't want a literal C64 -- just the complete open simple access... but 64-bit and 3Ghz and multicored. I don't want it to run on a 386, just x86_64.

12y agoHN ↗

I was trying to parse that earlier, but it doesn't make sense. Is he saying he wants something as open as a C64, but running on modern hardware?

12y agoHN ↗

he wants access to the bare metal on the same level as the C64, but with modern hardware.

POKE 53280, 0