Sega Dreamcast VMU development - Raining Squares
Last updated on April 2, 2015, 9:15 by Sebastian Mihai
Raining Squares is a Sega Dreamcast VMU homebrew tech demo. The VMU is also sometimes called VMS. The background is animated, the player controls a pixel, moving it left right, and there are falling squares which appear at random X positions, and have random sizes. There is a delay every time the player's pixel collides with a falling square.

Just like Sony's PocketStation, Sega's Dreamcast VMU (or VMS) is essentially a memory card plus controls, speaker, and LCD screen. The brain of the VMS is a LC86000-compatible micro controller. Its display resolution is an amusing 48x32 pixels.

While there exist other demos of how to program the Dreamcast VMS, I wrote my own pixel routines, which can set, clear, and get the value of a single pixel, given its row and column. This is because I consider this kind of routines fundamental, and found nothing similar in the freely-available demos I've analyzed. This was not trivial because of the way the LCD is driven. Once I had pixels, I could draw squares!

The assembly language of this chip is more rudimentary than the x86 assembly, to which I'm more accustomed. For example:
- there are no "string" opcodes, such as x86's lodsb, stosb, etc.
- there are no numeric comparison opcodes, such as x86's ja, jg, etc.; comparing two numbers requires a subtraction and then a carry flag check
- there are fewer registers to work with

Downloads


ROM the Raining Squares ROM. Should play in most VMU emulators (I recommend DirectVMS)

source the Raining Squares source code. Use it with the SDK below
VMU SDK use this to develop your own Dreamcast VMU homebrew. It relies on a version of the assembler below compiled under Cygwin. Requires Cygwin. It contains the source code for Raining Squares.

VMS assembler source the VMS assembler source code, in case you'd like to compile the assembler yourself under Linux or Cygwin
VMS assembler compiled under Linux compiled under Linux from the source code above
If you use the materials on this page, or any other page on this web site, you do so at your own risk. They are provided "as is". No warranty is provided or implied. I neither guarantee that the materials will work, nor that they will not be harmful in any way.

ZX Spectrum development - Husband Chores (in Z80 assembly language)

Intellivision development - Hotel Bunny

Coverage of my projects

My homebrew cartridges

No Snakes! - a multiplayer game over serial port

Sega Dreamcast development - Overbearing Burgers

Snowdrop OS - my operating system from scratch, in assembly language

libzx - ZX Spectrum game programming library (Z80 assembly language)

Compact Pong - game in C# for the Pocket PC (Windows Mobile 2003)

TOTP (time-based one-time password) authenticator in C# (.Net)

aSMtris - Tetris in assembly language (x86, 16-bit)

Balanced Diet (GBA) limited edition

Gameboy Advance development - Balanced Diet

Atari 7800 development - Poetiru

Arcade ROM hacking - Knights of the Round translation

PocketStation development - Pocket Worm

Sega Game Gear development - Burgers of Hanoi GG

Pokemon Mini development - Mini Cookie

Magnavox Odyssey2 development - Red Green

Sega Dreamcast VMU development - Raining Squares

Nintendo GameCube development - Mama Bear Puzzle

Nintendo Wii development - Groundhog Puzzle

Sega Saturn development - Saturnade

Atari Jaguar development - Jagmatch

Sega CD development - Blackjack CD

Nintendo 64 development - Don't Be Square

Commodore 64 development - Tube64

Sega 32x development - Eight Queens

WonderSwan (Mono) development - Swan Driving BW

WonderSwan Color development - Swan Driving

Animal Keeper - a JavaScript and HTML5 Canvas game

3DO development - Space Invaders Invaders

Sony PlayStation development - The 11th Power

Sony PSP development - Newton Voyage

Nintendo DS development - Geoincursion

Gold of the Kingdoms - an XNA/C# homebrew game

Blue Elf 2 309-in-1 JAMMA PCB - troubleshoot controls not working

Fractals in JavaScript and HTML5 Canvas

Angry Video Game Nerd (AVGN) theme song on the Gameboy Advance

Novice calligraphy - Gothic hand, with letter guide

Video compilation of my classic console homebrew games

Seven segment display circuit with the 4511 decoder and the 4029 counter

A simple Atari 2600 joystick tester circuit

555 timer and 4017 decade counter - traffic lights circuit

Catch That LED! - an electronic game circuit

Capacitor study circuit

BlackBerry PlayBook development - Sheepish Bearings (Native SDK, OpenGL)

Neo Geo Pocket Color development - NGCollector

Neo Geo development - Neo Thunder

Atari 5200 development - Shooting Gallery

ZX Spectrum development - simple input/graphics example

Vectrex development - Scalar Ownage

Nintendo Virtual Boy development - Real Danger

Gameboy Color development - Burly Bear vs. The Mean Foxes (GBC version)

Sega Master System development - Burgers of Hanoi

Colecovision development - Mowleco

TurboGrafx-16/PC Engine development - Alddee

Atari Lynx development - Catkanoid

Nintendo NES development - Invaders must die!

Atari 2600 development - Snappy (batari basic)

Super Nintendo development - Bucket

Gameboy Advance development - smgbalib library

Airplane Vegas slot machine

Sega Genesis development - Gen Poker

(2004) Project One - first university game programming club project

Gameboy development - Burly Bear vs. The Mean Foxes

(2006) RGB Overdose - university programming contest entry