Skip to content

VM emulator seems to slow down after running once #604

@plisdku

Description

@plisdku

Tool

VM Emulator

Interface

Website (https://nand2tetris.github.io/web-ide)

Contact Details

paul.c.hansen@gmail.com

What happened?

I've been noticing this while peer-reviewing submissions on Coursera. I load up somebody's program (just noticed it with a Snake implementation), and set the emulator speed to high (screenshot below), and hit run.

Image

The program runs until it's done and then the emulator stops. Fine. But if I hit run again, although the speed slider still looks like it's in the same position, the emulator runs at a crawl compared to the previous speed. It feels like the speed is reset internally but the UI is not updated.


To reproduce: compile and run this snake program. pause the emulator before the snake hits the wall on the right. reset the PC to the start of the program and start again. When I do this, on second running it goes much more slowly. If I pause, then wiggle the slider and put the slider back all the way to the right, the emulator speeds up again.

snake_game.zip

Additional Comments

No response

Do you want to try to fix this bug?

  • I want to try to add this feature!

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions