Windjammers disassembly - Part 0: Introduction

2022-01-10,

Introduction

For the last couple of years I worked on the online adaptation of the original Windjammers for the Sony PlayStation 4, Sony PlayStation Vita and the Nintendo Switch and later on on the sequel, Windjammers 2, out for Windows, Sony PlayStation 4, Nintendo Switch and Microsoft Xbox One.

Now that the sequel is about to be released I would like to take some times to write about what I discovered about the original Neo-Geo game. The adaptation was using emulation and during the process of porting the game to PlayStation 4 I had to search the ROM of the original Neo-Geo game to understand its mechanics. While developing the sequel, I had to understand all of the subtleties of the original game and had to almost completely disassemble the game.

Windjammers was programmed by Data East Corporation programmers Shinji Hirao (平尾真士), Wataru Iida (飯田亘) and Kagenobu Murata (村田景信).

Coordinate system

The Neo-Geo resolution is 320×224 pixels but most of the games restricts theirs resolution to 304×224. The Video Processing Unit uses 16×16 pixels tiles to render its graphics, so a lot of the game elements are somewhat tied to this constraint. For example, the disc has a diameter of 16 pixels, and the courts use a collision map made of 16×16 tiles. On the following screenshot the net was replaced with the debug grid graphics the original programmers left in the game.

Windjammers debug grid

The origin is located in the upper-left corner of the screen. Notice how the graphic elements nicely fit into 16×16 tiles.

The game stores most of its coordinates in 16.16 fixed point variables. The fractional part is used for sub-pixel precision to deal with everything that is related to moving objects like the disc and the players.

Binary radians

As you can guess, trigonometry is used quite a bit in Windjammers. The game uses 8-bits binary radians for its directions (or angles). Angle 00h is up, 40h is right, 80h is down and C0h is left.

That said, many angles end up using 16-bits variables, using the low 8-bits as the angle, and the uppermost 8-bits to count turns.

Identifiers

Elements in the game are either identified with their absolute address in the ROM or with numbers: courts, characters, sounds, sprites, etc.

Court id

Identifier Court name
0 Lawn
1 Beach
2 Tiled
3 Stadium
4 Clay
5 Concrete
6 Bowling
7 Dog Distance
8 How to play

Character id

Identifier Character name
00h Gary Scott
04h Jordi Costa
08h Klaus Wessel
0Ch Steve Miller
10h Loris Biaggi
14h Hiromi Mita

Character codes are not sequential because they are often used as offset in jump tables and addresses are 32-bits for the Neo-Geo CPU.

Trivia: The order of the characters gives us a hint at the order they were designed. Gary Scott was probably the first character to be implemented in the game. He is the only character to have a “charge out” animated effect when throwing a super shot. The effect is rather subtle and the development team might have decided it was not worth the work to make one for the other characters.

To be continued…

Thank you for reading.

In the upcoming articles, we will have a closer look at how the game works. Until then, take care!