Three gems fall. You shuffle. Gravity wins — unless you don't.
A full Columns puzzle game written in MIPS assembly for the CSC258 computer organization final project. No frameworks. No runtime. Just registers, syscalls, and raw pixel writes to a bitmap display.
┌─────────────────────────┐
│ ░░░░░░░░░░░░░░░░░░░░░ │ ← grey border
│ ░ 🟣 ░ │
│ ░ 🟡 match 3+ ░ │ pink #ff7aa9
│ ░ 🟢 vertically ░ │ orange #ffb67a
│ ░ ░ │ yellow #fffd7a
│ ░ C O L U M N S ░ │ green #9dff7a
│ ░ ░ │ blue #7adcff
│ ░░░░░░░░░░░░░░░░░░░░░ │ purple #ab7aff
└─────────────────────────┘
Remember Sega's Columns? Gems stack in a narrow well. You control a falling column of three colored pieces — move left and right, rotate their order, and drop them fast. Line up three or more of the same color in a row (vertically, in this build) and they vanish. Gems above fall. Chain reactions feel incredible.
This implementation runs on the MARS / Logisim Saturn MIPS simulator with a connected bitmap display and keyboard.
| Key | Action | Sound |
|---|---|---|
A |
Move column left | Low piano note |
D |
Move column right | Mid piano note |
W |
Shuffle gems (rotate order) | Synth blip |
S |
Soft drop (move down one row) | Bass thump |
L |
Save current board state | — |
F |
Restore saved state | — |
Q |
Quit (plays a farewell riff) | Exit melody |
Focus the keyboard panel in the simulator before playing.
- Pixel-perfect playfield — 5-wide × 13-tall well inside a hand-drawn grey border
- Title screen — "COLUMNS" spelled out in bitmap letter art on boot
- Procedural columns — each new piece spawns with 3 random gems from 6 colors
- Match detection — vertical streaks of 3+ trigger elimination
- Gravity — surviving gems cascade down after clears
- MIDI feedback — every action and combo has its own note
- Save / restore — stash your board mid-game with
L/F - Full soundtrack —
play_songroutine with a multi-bar piano arrangement (commented in at startup if enabled)
| Component | Address / Detail |
|---|---|
| Bitmap display | 0x10008000 |
| Keyboard | 0xffff0000 |
| Display size | 256 × 256 px (8 × 8 unit cells) |
| Play area | 5 columns × 13 rows |
| Language | MIPS32 assembly |
| Syscalls | Random (42), MIDI out (31), sleep (32), exit (10) |
Pixels are written with sw to display memory. Each pixel is 4 bytes. Moving right = +4. Moving down a row = +128.
- MARS MIPS Simulator or the Logisim Saturn environment used in CSC258 labs
- Bitmap Display tool connected to the program
- Keyboard tool connected at
0xFFFF0000
- Open
columns.asmin MARS / your simulator - Assemble (
F3in MARS) - Connect Bitmap Display and Keyboard peripherals
- Run (
F5) - Click the keyboard panel, then play
| File | Purpose |
|---|---|
columns.asm |
Main game — play this one |
bitmap_display.asm |
Minimal demo: border + random column |
keyboard.asm |
Minimal demo: read keypresses |
Documentation/ |
Milestone notes and assembly explainers |
main
│
├─► draw border + title
├─► spawn random 3-gem column
│
└─► game loop ◄──────────────────┐
│ │
├─ poll keyboard │
├─ move / shuffle / drop │
├─ scan for vertical matches │
├─ delete + apply gravity │
└─ spawn new column ───────┘
Match scanning walks each column top-to-bottom, tracking streak length. Three in a row? Paint them black, play a rising triad, and let gravity pull everything above into place.
Rodoshi Mondal · Tess Madison
CSC258 — Computer Organization, University of Toronto
Academic project. All game logic is original work for the CSC258 final project.
built one lw at a time · no garbage collector required