Skip to content

Commit 54d5bb8

Browse files
committed
IIgs Fixes
1 parent 3430092 commit 54d5bb8

File tree

4 files changed

+24
-4
lines changed

4 files changed

+24
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ After I finished that task, I wrote the AI all in C as well. The C code is a li
2222

2323
After making the Windows/Linux/macOS version, I decided to see if I could compile the code using llvm-mos. I removed rendering, audio and input and saw that the game ticks over quite a bit faster than 60 FPS. I then stripped a lot of it down to 8-Bit (everything that doesn't have to be in int 16 is now an int 8). I added the VERA rendering and sprites. This game is awesome on the Commander X16. The CX16 audio is currently done as PCM audio (more or less the same audio as the Windows/Linux version). This isn't a great solution as only 1 stream can play at a time, but is better than nothing.
2424

25-
I then went back to the Apple IIgs version and (almost) finished it. I really started over and brought in only the code I knew I wouldn't really change, but a fair bit was rewritten. In the process I also improved the game a little, so the IIgs version is now actually the best version. At some point I'll migrate the updates back if I can remember them all. The audio implementation for Time Pilot was provided by Antoine Vignaue from Brutal Deluxe Software (as was Mr Sprite and Cadius, both of which I also use in the making of this game). A very big thank you to Brutal Deluxe Software for their support and awesome tools to this community.
25+
I then went back to the Apple IIgs version and finished it. I really started over and brought in only the code I knew I wouldn't really change, but a fair bit was rewritten. In the process I also improved the game a little, so the IIgs version is now actually the best version. At some point I'll migrate the updates back if I can remember them all. The audio implementation for Time Pilot was provided by Antoine Vignaue from Brutal Deluxe Software (as was Mr Sprite and Cadius, both of which I also use in the making of this game). A very big thank you to Brutal Deluxe Software for their support and awesome tools to this community.
2626

2727
## Differences between my version and the 1982 arcade version
2828
This game was designed for the Apple IIgs whereas the Arcade version runs on a rotated screen. The arcade version has a resolution of 224H x 256V whereas the Apple IIgs has 320H x 200V. For this reason, I moved all of the stats such as score, extra lives, etc. over to the right hand side. The Windows/Linux/macOS version also uses a horizontal resolution of 200. The Commander X16 version uses a horizontal resolution of 240 - that matches its 40x30 mode.

TimePilot-IIgs/README.md

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ These instructions are for playing the game, but mostly for converting the art a
44
## Controls
55
The game uses the keyboard or Joystick to control the player plane. To use the Joystick, simply press `J` on the title screen. If the J does not turn green (selected) then the game is not detecting the Joystick. Controls on the Joystick (in game) are Up, Down, Left, Right and fire, while the second button is Pause. In the UI, the fire button starts a 1 Player game, and the "Pause" button starts a 2 Player game.
66

7-
The keyboard controls are (and these also work when playing with the Joystick) `1` - 1 Player, `2` - 2 Player, `ESC` - back up (and quit) and `P` - Pause. The in-game keys are (and these *do not* work in joystick mode) `Option` to rotate left, `Open Apple` to rotate right, `Space` to fire (just hold, don't have to tap - I felt too sorry for the poor spacebar).
7+
The keyboard controls are (and these also work when playing with the Joystick) `1` - 1 Player, `2` - 2 Player, `ESC` - back up (and quit) and `P` - Pause. The in-game keys are (and these rotate keys *do not* work in joystick mode) `Option` to rotate left, `Open Apple` to rotate right, `Space` to fire (just hold, don't have to tap - I felt too sorry for the poor spacebar).
88

99
## Getting started
1010
The Apple IIgs version is written in 65816 assembly language, targeting the Orca/M assembler and the build process is done using `make`. Several pieces of software were used to structure the build process, listed below. Not all are free. See below.
@@ -20,7 +20,26 @@ test | use the emulator to run the game
2020
macros | use Orca/M's macgen to build the needed macro files
2121
indent | put all the source through cadius, sed and awk to format the source
2222
clean | clean up built versions of files
23-
zap | clean and remove intermediate and built files and folders
23+
zap | clean and remove intermediate and built files and folders
24+
25+
### Note about png/tpsmall.png
26+
Mr Sprite will, at the time of writing, generate code to draw tpsmall that is not correct. Under "; Line 8" it at some point generates:
27+
```
28+
LDA $CF,S
29+
AND #$F00F
30+
ORA #$0220
31+
STA $CF,S
32+
SHORT M
33+
```
34+
The manual fix I apply is to make the line `ORA #$0220` read:
35+
```
36+
LDA $CF,S
37+
AND #$F00F
38+
ORA #$0F20
39+
STA $CF,S
40+
SHORT M
41+
```
42+
Without this fix, a pixel is drawn in the play area on the left, that does not belong. It is harmless, but not nice. With the fix the pixel is drawn in the sky color so it doesn't show up.
2443

2544
## Software I use and is needed to rebuild the code and art
2645
Orca/M is an assembler that runs natively on the Apple IIgs. It is not freeware but can be bought from [juiced.gs](https://juiced.gs/). It is called the Opus ][ collection, in the store. At the time of writing this is $25 for a download version.

TimePilot-IIgs/src/data.asm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2081,6 +2081,7 @@ dt_mult_4 dc i2'0,4,8,12,16,20,24,28,32,36,40,44,48,52,56,60'
20812081
dt_mult_6 dc i2'0,6,12,18,24,30,36,42,48,54,60,66,72,78,84,90'
20822082
dt_mult_8 dc i2'0,8,16,24,32,40,48,56,64,72,80,88,96,104,112,120'
20832083
dt_mult_10 dc i2'0,10,20,30,40,50,60,70,80,90,100,110,120,130,140,150'
2084+
dt_mult_14 dc i2'0,14,28,42,56,70,84,98,112,126,140,154,168,182,196,210'
20842085
dt_mult_15 dc i2'0,15,30,45,60,75,90,105,120,135,150,165,180,195,210,225'
20852086
dt_mult_16 dc i2'0,16,32,48,64,80,96,112,128,144,160,176,192,208,224,240'
20862087
dt_mult_23 dc i2'0,23,46,69,92,115,138,161,184,207,230,253,276,299,322,345'

TimePilot-IIgs/src/draw.asm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ drawBomberPart entry
207207
lda #^BOMBER_000A_DATA
208208
sta zSpriteDataBank
209209
ldy ptImageStartY
210-
lda dt_mult_15,y
210+
lda dt_mult_14,y
211211
adc ptImageStartX
212212
sta ptImageStartX
213213
lda activeFlags,x

0 commit comments

Comments
 (0)