Hacker News new | ask | show | jobs
by lauriewired 1061 days ago
CPUlator has played an instrumental role in my ARM-based Assembly explorations. One can simulate a full system, including not just the processor, but also the peripherals and the system-on-a-chip interconnects, mimicking a real system's behavior. I really appreciate the ability to inspect the memory as well as the individual registers as you are running a program.

The possibility to show real-time visual feedback and debugging capabilities provides an excellent avenue for people to understand the nuances of computer architecture. Through CPUlator, I have been able to guide learners through the use of ARMv7 assembly instructions and their usage who might not have access to ARM hardware themselves. I can't recommend this tool enough.

1 comments

I wonder if MAME would work as an open-source alternative for these simulations. The built-in debugger and memory views cover most of that, and it doesn't take much to write a minimal driver that messes with some input file [1].

But if you do want some visual feedback like LEDs and such, you would have to write a layout and input logic for that (AFAIK has been done for MIDI synths).

It would also be more appropriate for shellcode / nostdlib experiments, although it's not clear how well CPUlator handles dynamic linking / relocations in their ELF executable support (seems like they build on their server [2], but run in a custom interpreter?)

[1]: https://qufb.gitlab.io/writeups/2023/02/26/Put-A-Sonic-On-It... [2]: https://cpulator.01xz.net/doc/#compiling