Skip to content
This repository has been archived by the owner on Mar 17, 2022. It is now read-only.

Commit

Permalink
docs: update 3DO version notes
Browse files Browse the repository at this point in the history
  • Loading branch information
cyxx committed Jul 6, 2018
1 parent 483492f commit 3f75e79
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 14 deletions.
4 changes: 3 additions & 1 deletion README.md
Expand Up @@ -17,7 +17,7 @@ The program requires the original data files.
- 15th anniversary edition (Pak01.pak, Intro2004.wav, End2004.wav)
- 20th anniversary edition (game/*)
- Windows 3.1 (Bank, *mid)
- 3DO (GameData/*)
- [3DO](docs/3DO.md) (GameData/*)
- Macintosh (File*, *pict)

## Running
Expand All @@ -38,12 +38,14 @@ directory. This can be changed with command line switches.

In game hotkeys :

```
- Arrow Keys move Lester
- Enter/Space run/shoot
- C enter a code to start at a specific position
- P pause the game
- Alt X exit the game
- Ctrl F toggle fast mode
```

## Credits

Expand Down
40 changes: 27 additions & 13 deletions docs/3DO.md
Expand Up @@ -10,9 +10,9 @@ The bits of assembly game code were generated using the "disasm" tool.

## Assets

Type | Amiga/PC | 3DO
-------- | -------- | ---
Music | 4 channels tracker with raw signed 8bits samples (3 files) | AIFF SQR2 compressed audio (30 files)
Type | Amiga/DOS | 3DO
-------- | --------- | ---
Music | 4 channels tracker with raw signed 8bits samples (3 files) | AIFF SDX2 compressed audio (30 files)
Sound | raw signed 8bits mono (103 files) | AIFF signed 16 bits (92 files)
Bitmap | 4 bits depth paletted 320x200 (8 files) | True-color RGB555 320x200 (139 files)
Bytecode | Big-endian (Motorola 68000) | Little-endian (ARMv3)
Expand Down Expand Up @@ -48,9 +48,9 @@ This is basically what the password screen does, it looks up the entered code an
02FF: updateResources(res=16002)
```

## Game protection
## Game Copy Protection

With the original Amiga/PC version, the player has to lookup the associated symbols in the manual based on a random code.
With the original Amiga/DOS version, the player has to lookup the associated symbols in the manual based on a random code.

![Screenshot Code](screenshot-protection.png)

Expand Down Expand Up @@ -96,7 +96,7 @@ The game engine is based on a virtual machine with 30 opcodes.

### Opcodes

The game was developed on an Amiga. As the Motorola 68000 CPU was big endian, this is the byte order found in the bytecode on the original Amiga/PC versions.
The game was developed on an Amiga. As the Motorola 68000 CPU was big endian, this is the byte order found in the bytecode on the original Amiga/DOS versions.
Most of the opcodes operand size is 2 bytes, matching the register size of the target 68000 CPU.

* ALU
Expand All @@ -107,7 +107,7 @@ Num | Name | Parameters | Description
1 | op_mov | var(dst): byte, var(src): byte | dst := src
2 | op_add | var(dst): byte, var(src): byte | dst += src
3 | op_addConst | var: byte; value: word | var += value
19 | op_sub | var(dst) : byte, var(src): byte | var -= src
19 | op_sub | var(dst): byte, var(src): byte | var -= src
20 | op_and | var: byte, value: word | var &= value
21 | op_or | var: byte, value: word | var |= value
22 | op_shl | var: byte, count: word | var <<= count
Expand Down Expand Up @@ -175,11 +175,12 @@ Num | Name | Parameters | Description
As any 3DO game, the data-files are read from an OperaFS CD-ROM.

Inside the GameData/ directory
* The game data-files are numbered from 1 to 340 (File%d).
* The song files (AIFF-C) are numbered from 1 to 30 (song%d).
* The game data-files are numbered from 1 to 340 (File%d)
* The song files (AIFF-C) are numbered from 1 to 30 (song%d)
* Three cinematics files : Logo.Cine, Spintitle.Cine, ootw2.cine

The files are stored uncompressed, the only exception being the background bitmaps.
The decompression code can be found in the DOOM 3DO source code - https://github.com/Olde-Skuul/doom3do/blob/master/lib/burger/dlzss.s
The files are stored uncompressed at the exception of the background bitmaps.
The decompression code can be found in the DOOM 3DO source code - [dlzss.s](https://github.com/Olde-Skuul/doom3do/blob/master/lib/burger/dlzss.s)

## Rendering

Expand All @@ -189,7 +190,7 @@ The engine can display semi-transparent shapes such as the car lights in the int

![Screenshot Intro Amiga](screenshot-intro-amiga.png) ![Screenshot Intro 3DO](screenshot-intro-3do.png)

The original Amiga/PC game used a palette of 16 colors. The semi-transparency is achieved by allocating the upper half of the palette to the transparent colors.
The original Amiga/DOS game used a palette of 16 colors. The semi-transparency is achieved by allocating the upper half of the palette to the transparent colors.
The palette indexes 0 to 7 hold the scene colors, indexes 8 to 15 the blended colors.

![Palette Intro Amiga](palette-intro-amiga.png)
Expand All @@ -203,7 +204,7 @@ The 3DO engine leverages the console capabilities to render an alpha blended sha

### Background Bitmaps

While the original Amiga/PC game relied on polygons for most of its graphics, the game engine supports using a raster bitmap to be used as the background.
While the original Amiga/DOS game relied on polygons for most of its graphics, the game engine supports using a raster bitmap to be used as the background.
In the original game version, this is only used for 8 different screens.

![file067](file067.png) ![file068](file068.png) ![file069](file069.png) ![file070](file070.png)
Expand All @@ -216,3 +217,16 @@ The 3DO version uses the feature for all the screens of the game. For comparison

![File221](File221.png) ![File220](File220.png) ![File306](File306.png) ![File302](File302.png)

### Drawing Primitives

The original Amiga/DOS used only one primitive for all its drawing : a quad (4 vertices).

The 3DO reworked that format, probably to optimize shapes made of single pixels or straight lines.
The upper nibble of the shape color byte specifies the primitive to draw.

```
0x00 : nested/composite shape
0x20 : rectangle
0x40 : pixel
0xC0 : polygon/quad
```

0 comments on commit 3f75e79

Please sign in to comment.