Here are some details:
- Runs .hack files directly out of your assembler.
- Comes with Pong preloaded! Just click START!
- Control over how many cpu cycles per frame to execute, and how many frames per second.
- Keyboard is routed to the KBD register at any moment.
- RAM registers can be manually written before running a program.
- Personalized screen colors.
- Brief tutorial.
- More coming!
Last but not least, visit github if you want to see the code or even contribute! The code is a mess but improving... next weekend.
Nice. A few other folks have done similar things, so you might look for their threads and see if they are doing something that might give you ideas on how to extend what you've got or maybe ways to improve what you've already got.
I have seen a tendency to run code in the VM emulator because it does not have a limit of code lines. And the other simulators I have seen as well are VM simulators. On way to expand this project requires an optimized VM translator, which not many (and not me for now) have done! But yes, I will slowly start to explore the forum, I just signed up
It's very hard to make a VM emulator aware of code size limitations precisely because it IS emulating a machine that doesn't exist. Furthermore, any code size limitation would apply to the machine that is being emulated, which is NOT the Hack CPU.
But I agree that people tend to ignore the reality of the Hack's ROM space limits (and potentially the stack and heap space limits, as well, though I think the supplied emulator might be aware of those -- which arguably it shouldn't be as those are not part of the VM definition, but rather the mapping onto the Hack CPU, which is a separate issue).
A problem with trying to address this with an "optimized" VM translator is that the end result only applies to that particular optimized translator. Code that won't fit using that translate might using a different one and vice-versa. There's no such thing as a perfectly optimized translator.