Snake Game in MIPS Assembly
- Download the "Mars4_5A.jar" file and open it (It is the MARS MIPS simulator with some changes. The old one stopped working after a few minutes of playing
- Open the "snakeV3.asm" file from the simulator
- In the main window click on "Tools" > "Bitmap Display"
- In the "Bitmap Display" window choose 16px for "Unit Width in Pixels" and "Unit Height in Pixels"
- In the "Bitmap Display" window choose 512px for "Display Width in Pixels" and "Display Height in Pixels"
- Pull the bottom edge of the "Bitmap Display" window down so you will see the square black display
- In the "Bitmap Display" window click on "Connect to MIPS"
- In the main window click on "Tools" > "Keyboard and Display MMIO Simulator"
- In the "Keyboard and Display MMIO Simulator" window click on "Connect to MIPS"
- In the main window click on "Assemble the current file"
- In the main window click on "Run the current program"
- You will see a white board with a red snake in the middle (on the "Bitmap Display" window)
- You will control the snake with the "Keyboard and Display MMIO Simulator" window
Key | Control |
---|---|
i | up |
k | down |
j | left |
l | right |
p | pause |
q | quit |
r | reset |
(Working only if you are in Play mode. If you are in Game Over mode, the controls will not work and you will need to run the program again)