A playable recreation of Dr. Mario written entirely in MIPS assembly for the University of Toronto's CSC258 course. The game renders directly to the MARS bitmap display and implements its gameplay, graphics, keyboard input, collision detection, and sound effects at the assembly level.
- Randomly generated two-colour capsules and viruses
- Capsule movement and rotation
- Collision and boundary detection
- Horizontal and vertical colour matching
- Block removal and cascading after matches
- Score-based increase in falling speed
- MIDI sound effects for rotation, landing, matching, and game over
- Pause, restart, and game-over states
- Custom pixel-art bottle, Dr. Mario, virus display, and game-over screen
- MARS MIPS Simulator
The game relies on MARS-specific syscalls for timing, random-number generation, sleeping, and MIDI output.
-
Open
drmario.asmin MARS. -
Open Tools → Bitmap Display and use the following configuration:
Setting Value Unit Width in Pixels 2Unit Height in Pixels 2Display Width in Pixels 64Display Height in Pixels 64Base Address for Display 0x10008000 ($gp) -
Select Connect to MIPS in the Bitmap Display window.
-
Open Tools → Keyboard and Display MMIO Simulator and select Connect to MIPS.
-
Assemble and run the program.
-
Enter controls through the keyboard input area of the MMIO simulator.
| Key | Action |
|---|---|
A |
Move capsule left |
D |
Move capsule right |
S |
Move capsule down |
W |
Rotate capsule |
P |
Pause or resume |
R |
Restart after game over |
Q |
Quit |
Controls are read as lowercase keyboard input by the simulator.
The game is contained in a single MIPS assembly source file. It uses memory-mapped I/O for the bitmap display and keyboard, maintains gameplay state directly in memory, and draws each visual element using custom pixel and line routines. Capsule behaviour, matching, clearing, gravity, scoring, and state transitions are implemented without a game engine or external library.
- Jiakun Chen
- John Ding
Developed as a CSC258 final project at the University of Toronto.
This repository is shared as a portfolio project and for educational reference. If you are currently taking CSC258 or a similar course, do not copy or submit any part of this project as your own work.
Dr. Mario is a property of Nintendo. This is a non-commercial student recreation created for educational purposes and is not affiliated with or endorsed by Nintendo.
No open-source license is provided.