Compare commits

...

22 Commits
V1.0 ... master

Author SHA1 Message Date
Stefan Wessels
ca3332d2a4 Added make of .po 2023-08-31 23:35:52 -07:00
StewBC
2eab133084 Bad Label Fix 2021-08-18 17:13:42 -07:00
StewBC
2468b8a300 Version to 1.1A 2021-07-13 17:55:01 -07:00
StewBC
e9802e906e Fixed Game Speed 2021-07-13 17:42:29 -07:00
StewBC
4ab8bdd6aa April 30, 2021 Update
April 30, 2021 Update
2021-04-30 18:36:27 -07:00
StewBC
ffe3d2d1ad Update README.md
Table Update
2021-04-30 18:33:52 -07:00
StewBC
2cf027fc1c April 30, 2021 Update 2021-04-30 18:12:38 -07:00
StewBC
b65242cb0c Updated 2021-04-30 14:19:53 -07:00
StewBC
232e348e28 Rewrote screenDrawLevel and screenDrawWilly 2021-04-30 14:19:30 -07:00
StewBC
69a9bd0d3c Change tab spacing and removed HIMEM segment 2021-04-30 14:18:37 -07:00
StewBC
579373335d Remove unused tilesColorCollapsing 2021-04-30 14:18:00 -07:00
StewBC
dfa049472d Text drawing works with modified font 2021-04-30 14:17:31 -07:00
StewBC
565f343bdd Text to Uppercase 2021-04-30 14:16:50 -07:00
StewBC
a59f40b539 Add table for unrolled rendering 2021-04-30 14:16:14 -07:00
StewBC
91d2db486b collapseHeight now a byte-skip 2021-04-30 14:15:28 -07:00
StewBC
de25a4cfb2 Remove some symbols and lowercase letters 2021-04-30 14:14:38 -07:00
StewBC
7909d6e051 Game delay based on rendering, render Willy twice 2021-04-30 14:14:12 -07:00
StewBC
68e9db4f51 Artificial delay when in-game music is off 2021-04-30 14:13:01 -07:00
StewBC
fffac7219e Removed trailing whitespace 2021-04-30 14:11:32 -07:00
StewBC
a3cfe02135 Update README.md
Fixed how I wrote ProDOS
2020-04-23 14:50:00 -07:00
StewBC
685dc1e80b Update README.md
Mention make OPTIONS=...
2020-04-22 23:06:33 -07:00
StewBC
8421abb2f7 Formatting & Video
Fixed some formatting and added a video link
2020-04-22 19:28:34 -07:00
21 changed files with 3125 additions and 1323 deletions

4
.gitignore vendored
View File

@ -1,8 +1,4 @@
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
*.code-workspace
/obj/
/Makefile.options

32
Makefile-po.mk Normal file
View File

@ -0,0 +1,32 @@
# This requires at least cadius v 1.3.0 (https://github.com/mach-kernel/cadius/releases;
# Tested with cadius v 1.4.5) - support for file's type and auxtype via the filename needed.
PO = $(NAME).po
CA ?= cadius
# Unix or Windows
ifeq ($(shell echo),)
CP = cp $1
MV = mv
RM = rm
else
CP = copy $(subst /,\,$1)
MV = ren
RM = del
endif
REMOVES += $(PO)
.PHONY: po
po: $(PO)
$(NAME).system:
cp $(NAME).apple2.loader $(NAME).system#FF2000
$(PO): $(NAME).apple2 $(NAME).system
$(call CP, apple2/template.po $@)
$(MV) $(NAME).apple2 $(NAME)#064000
$(CA) addfile $(NAME).po /mminer $(NAME).system#FF2000
$(CA) addfile $(NAME).po /mminer $(NAME)#064000
$(RM) $(NAME).system#FF2000
$(RM) $(NAME)#064000

153
README.md
View File

@ -1,6 +1,13 @@
# Manic Miner
Remake of the ZX Spectrum game for the Apple II.
Updates:
i. 30 April 2021 - I Sped up rendering for a more even experience, especially
in The Vat and The Warehouse. The Apple II vesrsion is marginally slower than
the ZX Spectrum version (I think - tested with Speccy) but feels pretty good.
To make room for the fully unrolled level rendering, I sacrificed the lower
case letters in the font. I updated the table of timings, below.
1. INTRODUCTION
This is a game I have always loved, from the moment I saw it in a computer shop
@ -17,6 +24,8 @@ The game is complete.
There's a pre-built Apple II disk of the project, mminer.dsk under the
releases tab. This can be played directly in emulators.
There's also a video of the game here: https://youtu.be/OGxj_g1ImhM
3. DIFFERENCES FROM THE ORIGINAL
There are several differences that all have to do with Apple II hardware
@ -32,7 +41,7 @@ limitation. If I did use some of the ROM memory for RAM, I could probably fix
this, but I didn't want to trash ProDOS and I didn't want to have to reboot the
Apple II when the program is quit.
The biggest differences have to do with the screen and keys.
The biggest differences have to do with the screen and keys.
The ZX Spectrum has a 32 column, 8 pixel per column, color display (256 pixels).
The Apple II can only display 20 7-pixel color columns (140 pixels). This means
@ -86,35 +95,47 @@ as much as is possible given the limitations.
4. TECHNICAL DETAILS
The game is written in 6502 assembly language using the ca65 assembler. The
game uses memory from $0800 to $B52C.
game uses memory from $0800 to $BE4B.
Below is a CPU cycle profile of 1 game frame in stage 1 after a couple of
seconds of being on the level. The door isn't visible so this renders only the
one enemy and Willy, as well as the level tiles. The auidoPlayNote includes an
artificial delay that's based on the number of tiles rendered. If I didn't have
that, the really empty levels such as SkyLab would play the in-game music way
too fast. However, this does mean that the game experience is smoother with the
music turned off, since there's no artificial delay.
one enemy and Willy, as well as the level tiles. gameDelay is an artificial
delay based on how many tiles were rendered, which smooths out the gameplay,
and thus song tempo across levels. If the music is turned off, audioPlayNote
will also create an artificial delay to simulate the delay incurred by
toggling the speaker.
Cycle counts are not constant across all frames so all timings below are
approximate.
Hex | Dec | Frame % | Item
--- | --- | --- | ---
18A72 | 100978 | 100% | Total Frame
1267F | 75391 | 100% | Total Frame
18 | 24 | 0% | inputGet
E8 | 232 | 0% | willyMove
80 | 128 | 0% | gameAI
5EF3 | 24307 | 24% | screenClear
5EF3 | 24307 | 32% | screenClear
123 | 291 | 0% | tilesAnimateKeys
47 | 71 | 0% | tilesAnimateConveyor
6EB | 1771 | 2% | screenDrawSprites
C55 | 3157 | 3% | screenDrawWilly
C6FD | 50941 | 50% | screenDrawLevel
DDA | 3546 | 4% | uiUpdate
3A | 58 | 0% | screenDrawSprite (door)
26 | 38 | 0% | screenSwap
51BD | 20925 | 21% | audioPlayNote
A07 | 2567 | 3% | screenDrawWilly (collision)
71D7 | 29143 | 39% | screenDrawLevel
8D1 | 2257 | 3% | screenDrawWilly (view)
3A | 58 | 0% | uiUpdate
3A | 58 | 0% | screenDrawSprite (door)
28 | 40 | 0% | screenSwap
1D1F | 7455 | 10% | audioPlayNote
1F76 | 8054 | 11% | gameDelay
As can be seen, clearing the area where the world will be drawn takes almost 24%
of the frame and drawing the level tiles takes about 50% of the frame!
As can be seen, clearing the area where the world will be drawn takes almost
32% of the frame and drawing the level tiles takes about 39%, plus 3% to
re-render willy, of the total frame. Drawing is almost 80% of the frame.
The ZX Spectrum version had Willy under the level tiles, but I prefer Willy
in front, so I re-render willy without collision detection once the level tiles
have been drawn, so he is always in front (but before the door is drawn so he is
behind the door).
5. KEYS
@ -127,7 +148,7 @@ shows help and keys, but these are the keys:
* B - Toggle Black and White / Color mode
* C - Toggle scrolling mode
* M - Turn the music on/off
* S - Turn in-game audio on/off
* S - Turn in-game audio on/off
* ESC - Quit level or in UI, return to ProDOS
The game also supports the cheat mode, as in the original. In game, enter the
@ -174,56 +195,60 @@ I tried to thoroughly comment all the code.
There are actually 2 programs in this. The 1st is the game, and it's in
src/apple2.
* audio.inc - Routines to make the speaker beep
* defs.inc - Constants and definitions used throughout
* game.inc - The in-game logic, AI etc. The bulk of the "game"
* input.inc - User controls for game and editor
* level.inc - Decompress a level and place the keys
* logo.hgr - 8Kb splash screen in HGR format
* logo.inc - File that simply does an incbin on logo.hgr
* mminer.asm - Where the game starts, initial setup, etc.
* mminer.cfg - ca65 configuration file
* roaudio.inc - Frequency and timing data for music and SFX
* rofont.inc - A ZX Spectrum font
* rolevels.inc - Level layout, tile usage, sprite positions, etc.
* rosprites.inc - Sprite definitions
* rosystem.inc - Helper tables (multiplication, color masks, etc.)
* rotext.inc - All text used in the game
* rotiles.inc - Background tile definitions
* screen.inc - Code related to drawing tiles, sprites, etc.
* sprite.inc - Code for making instances of sprites, coloring them, etc.
* text.inc - In game text and print functions
* ui.inc - User facing screens (title, scroller)
* variables.inc - All variables (scores, instance buffers, positions, etc.)
* Willy.inc - All logic relating to the movement of the main character, Willy
File | Desc
--- | ---
audio.inc | Routines to make the speaker beep
defs.inc | Constants and definitions used throughout
game.inc | The in-game logic, AI etc. The bulk of the "game"
input.inc | User controls for game and editor
level.inc | Decompress a level and place the keys
logo.hgr | 8Kb splash screen in HGR format
logo.inc | File that simply does an incbin on logo.hgr
mminer.asm | Where the game starts, initial setup, etc.
mminer.cfg | ca65 configuration file
roaudio.inc | Frequency and timing data for music and SFX
rofont.inc | A ZX Spectrum font
rolevels.inc | Level layout, tile usage, sprite positions, etc.
rosprites.inc | Sprite definitions
rosystem.inc | Helper tables (multiplication, color masks, etc.)
rotext.inc | All text used in the game
rotiles.inc | Background tile definitions
screen.inc | Code related to drawing tiles, sprites, etc.
sprite.inc | Code for making instances of sprites, coloring them, etc.
text.inc | In game text and print functions
ui.inc | User facing screens (title, scroller)
variables.inc | All variables (scores, instance buffers, positions, etc.)
Willy.inc | All logic relating to the movement of the main character, Willy
The second is the ProDos loader that will auto-load the game. It's in the
The second is the ProDOS loader that will auto-load the game. It's in the
src/apple2.loader folder. It has these files (all provided to me by Oliver
Schmidt)
* loader.cfg - ca65 configuration file
* loader.s - file to load and start the game
File | Desc
--- | ---
loader.cfg | ca65 configuration file
loader.s | file to load and start the game
7. BUILDING THE GAME
Making the game has a few steps. Use make and the Makefile on all OSs, that
would be the easiest.
would be the easiest.
Start by making the loader - this needs to be done once only.
Start by making the loader - this needs to be done once only.
make TARGETS=apple2.loader
Next, make the game with:
Next, make the game with:
make
The next step is to make a bootable disk image. For this, you will need 3rd
party software. I use AppleCommander. This software will put the loader and
game into the disk image. You will need to install Java to use AppleCommander.
game into the disk image. You will need to install Java to use AppleCommander.
The apple2/template.dsk is a "blank ProDos floppy" that has the loader and the
The apple2/template.dsk is a "blank ProDOS floppy" that has the loader and the
game placed on it by AppleCommander.
To make the disc image, set an environment variable to point at apple commander
(see notes) and then use the command:
(see notes) and then use the command:
make dsk
This will make a disc named mminer.dsk which can be loaded up in an emulator.
@ -236,26 +261,29 @@ necessary.
If you use AppleWin and you have sed installed, you can also uncomment the
PREEMUCMD := sed... command which will copy the game symbols to the emulator for
use.
use. For that to really make sense, you should to do this make command once:
make OPTIONS=mapfile,labelfile,listing,debugfile. That will make a file called
Makefile.options that will be re-used, and will generate a label file with all
the labels.
Once done, you can build and play the game with the command: make dsk test
NOTES:
1) Find AppleCommander here (I used Version 1.6.0):
https://github.com/AppleCommander/AppleCommander/releases
https://github.com/AppleCommander/AppleCommander/releases
2) Set the environment variable (or change the Makefile-dsk.md) to point at the
apple commander jar file. Here's how it's done for different shell's:
Powershell:
$env:AC = "path to apple commander.jar"
cmd.exe
set AC="path to apple commander.jar"
bash (Unix or MacOS terminal):
export AC="path to apple commander.jar"
apple commander jar file. Here's how it's done for different shell's:
Powershell:
$env:AC = "path to apple commander.jar"
cmd.exe
set AC="path to apple commander.jar"
bash (Unix or MacOS terminal):
export AC="path to apple commander.jar"
8. CREDITS
* Matthew Smith and BUG-BYTE for creating and publishing the game in
1983. Matthew later re-released the game with minor tweaks under the
1983. Matthew later re-released the game with minor tweaks under the
Software Projects banner. This is not that version.
* A special call-out to Oliver Schmidt who provided me with invaluable
advice and support.
@ -263,12 +291,13 @@ apple commander jar file. Here's how it's done for different shell's:
GIMP exported BMP.
* Everyone involved in the Apple II projects (AppleWin | AppleCommander).
* Everyone involved in making the cc65 tools, it's very good.
* Ian Brumby for showing me how you really unroll a draw loop.
9. CONTACT
Feel free to contact me at swessels@email.com if you have thoughts or
suggestions.
Thank you
Stefan Wessels
21 April 2020 - Initial Revision
Thank you
Stefan Wessels
21 April 2020 - Initial Revision

BIN
apple2/template.po Normal file

Binary file not shown.

View File

@ -9,7 +9,7 @@
.segment "CODE"
;-----------------------------------------------------------------------------
.proc audioPlayTitleNote
.proc audioPlayTitleNote
fixedDuration = srcPtrL
noteDuration = srcPtrH
@ -48,7 +48,7 @@ play:
sta freqTimer1
ldx #11 ; delay about 20 clock cycles
:
dex
dex
bne :-
:
dec freqTimer2 ; dec timer 2
@ -58,7 +58,7 @@ play:
sta freqTimer2
ldx #11 ; and waste 20 clock cycles
:
dex
dex
bne :-
:
dec fixedDuration ; dec the fixed repeat count
@ -75,7 +75,7 @@ leave:
inc musicH
clc ; leave with carry clear
:
rts
rts
reset:
lda #<titleMusic ; played the whole tune
@ -84,9 +84,9 @@ reset:
sta musicH
sec ; and leave with carry set
rts
rts
.endproc
.endproc
;-----------------------------------------------------------------------------
.proc audioPlayNote
@ -95,28 +95,15 @@ reset:
lda audioMask ; see if the music is on
and #AUDIO_MUSIC
bne :+
rts ; if not, return
beq done
:
lda #$FF ; calculate a delay
sec ; based on how many tiles were rendered
sbc tilesRendered ; this lets the music sound
cmp #80 ; better, esp. when a level is
bcc :+ ; very sparse (SkyLab for example)
lsr
lsr
lsr
lsr
tay
jsr uiDelay::ySet
:
play:
ldx musicL ; get the index into the in-game music
inc musicL ; and advance that index
lda inGameMusic, x ; get the note at the index
bne :+ ; if non-zero it's a valid note
sta musicL ; reset the index to the start of the song
beq :-
beq play
:
ldy #$08 ; fixed number of iterations
@ -124,8 +111,7 @@ freq: ; external entry point for custo
sta delayTime ; store it in a delay counter
lda audioMask ; see if
and #AUDIO_SOUND ; audio is enabled
bne loop ; and play or ignore audio accordingly
rts
beq done ; and play or ignore audio accordingly
loop:
lda SPEAKER ; toggle the speaker
@ -136,6 +122,7 @@ loop:
dey ; then repeat
bne loop ; for the fixed iterations
done:
rts ; and return
.endproc
.endproc

View File

@ -24,31 +24,37 @@ playLoop:
lda demoMode ; check for demo mode
beq :+ ; if not demo, move willy
jsr gameDemoTick ; tick the demo if demo mode
jmp :++ ; skip moving willy
jsr gameDemoTick ; demo mode so run demo
jmp ai ; skip moving willy
:
jsr willyMove ; move the main character based on user input (or conveyor or gravity)
:
ai:
jsr gameAI ; run all the monster AI
ldx fullScreenClearCount ; get the flag for what level of screen clear is needed
jsr screenClear ; and clear the screen
jsr tilesAnimateKeys ; copy the 16 bytes for the next "key" frame into place
jsr tilesAnimateKeys ; copy the 16 bytes for the next "key" frame into place
jsr tilesAnimateConveyor ; update the conveyor tile
jsr screenDrawSprites ; draw all the enemies
lda demoMode ; get the event state
bne :+ ; if so skip showing willy
beq :+ ; 0 - not demo, full flow
jsr screenDrawLevel ; show all the tiles in demo mode
jmp ui
:
lda #$ff ; Enable Collision detection
jsr screenDrawWilly ; not demo - draw willy with collision detection
bcc :+ ; carry set is a collision, clear is no problem
bcc level ; carry set is a collision, clear is no problem
lda eventState ; on collision, set the die event
ora #EVENT_DIED
sta eventState
:
level:
jsr screenDrawLevel ; show all the tiles
lda #0 ; No collision detection
jsr screenDrawWilly ; Now draw willy over self and level, no collision
ui:
lda updateUICount ; see if the UI needs an update
beq :+
jsr uiUpdate ; if needed, update the appropriate UI components
@ -59,6 +65,7 @@ playLoop:
jsr screenSwap ; swap to the newly rendered screen
jsr audioPlayNote ; play in-game music if needed
jsr gameDelay ; waste time to get all screens to run at same rate
lda eventState ; see if any events fired
beq playLoop ; keep looping while no events
@ -77,13 +84,39 @@ playLoop:
jsr textCheckHighScore ; game over - see if a new high score was set
rts
.endproc
.endproc
;-----------------------------------------------------------------------------
.proc gameDelay
delayTime = tmpBot + 0
lda #$10
sta delayTime
delayCalc:
sec
lda #$D0
sbc tilesRendered
bcc done
tax
:
ldy delayTime
:
dey
bne :-
dex ; and do it for all tiles not rendered (<$80)
bne :--
done:
rts
.endproc
;-----------------------------------------------------------------------------
.proc gameNewGame
lda #START_LIVES ; init player number of lives
sta lives
sta lives
lda #LEVEL_Central_Cavern ; Init these game vars to 0
sta currLevel
@ -95,12 +128,12 @@ playLoop:
lda #'0' ; load a with '0'
:
sta score, x ; set all 6 score digits to '0'
dex
dex
bpl :-
rts
rts
.endproc
.endproc
;-----------------------------------------------------------------------------
.proc gameInitStage
@ -110,7 +143,7 @@ playLoop:
instanceIdx = tmpBot + 2
ldy currLevel ; Skip some stuff for "Game Over" pseudo-level
cpy #20
cpy #20
bcs notDemo
jsr levelUnpack ; decompress a level to levelLayout
@ -185,17 +218,17 @@ next:
sta spriteXPos, x ; from 0 .. numSprites - 1
lda sprites_y, y ; the addressing is unfortunate - sta ,x is zero-page 2 byte
sta spriteYPos, x ; but it's not worth swapping x and y for this bit of code
lda sprites_min, y
sta spriteMin, x
lda sprites_max, y
sta spriteMax, x
lda sprites_speed, y
sta spriteSpeed, x
sta spriteTick, x
lda sprites_dir, y
sta spriteDir, x
lda sprites_min, y
sta spriteMin, x
lda sprites_max, y
sta spriteMax, x
lda sprites_speed, y
sta spriteSpeed, x
sta spriteTick, x
lda sprites_dir, y
sta spriteDir, x
lda sprites_class, y
sta spriteClass, x
sta spriteClass, x
lda sprites_colors, y ; get the color
sta spriteColor, x
@ -204,9 +237,9 @@ next:
ldx instanceIdx ; restore y
cpx numSprites
beq prep
beq prep
lda spriteClass, x
lda spriteClass, x
bit bit1Mask ; CLASS_FOUR_FRAME
beq :+
lda #4
@ -214,15 +247,15 @@ next:
:
lda #8
:
adc spriteFramesIdx, x
adc spriteFramesIdx, x
sta spriteFramesIdx + 1, x
ldy spriteIdx
iny ; next sprite in sprite table
inx ; next instance
dec count
dec count
beq prep
jmp next
jmp next
prep:
ldx currLevel ; some levels need special handling
@ -246,35 +279,35 @@ kong:
:
cpx #LEVEL_Skylab_Landing_Bay ; skylab needs satellites to get X values
bne :+
bne :+
ldx #2 ; init the falling satellites
skyLabPos:
lda skylabXPos, x
sta spriteXPos, x
txa
lda skylabXPos, x
sta spriteXPos, x
txa
sta spriteTick, x
dex
dex
bpl skyLabPos
:
cpx #LEVEL_The_Final_Barrier
bne fixDoor
bne fixDoor
dec numSprites ; hide the victory door sprite
fixDoor:
jmp spriteDoorSetup ; sprites are set up - door is special
.endproc
.endproc
;-----------------------------------------------------------------------------
.proc gameAI
.proc gameAI
lda fullScreenClearCount ; get the state
beq :+ ; if it's zero, move on
dec fullScreenClearCount ; count this down
:
dec airFlow ; deal with the air countdown. airFlow is "time" counter
bne airDone
bne airDone
jsr gameAirDecrease
airDone:
@ -326,7 +359,7 @@ right:
lda #0 ; no, reset
sta spriteFrame, x ; frame to 0
beq next ; BRA. done with this sprite
rightEnd:
rightEnd:
dec spriteXPos, x ; set back to last valid x
lda #1 ; load left
sta spriteDir, x ; and set direction left
@ -339,7 +372,7 @@ fix4:
beq next ; if not, done with this sprite (frame 7 is good)
lda #3 ; drop the 7 to 3
sta spriteFrame, x ; set the frame
jmp next
jmp next
left:
dec spriteFrame, x ; move the frame
@ -375,12 +408,12 @@ postVMove:
:
bit CLASS_SKYLAB ; skylab
beq :+
jmp skylab
jmp skylab
:
inc spriteFrame, x ; otherwise go to next frame
lda spriteFrame, x
lda spriteFrame, x
and #3
sta spriteFrame, x
sta spriteFrame, x
next:
dex ; get previous sprite
@ -389,15 +422,15 @@ next:
goTop:
jmp loop
vertical:
lda spriteDir, x ; get direction 1 = UP, 0 = DOWN
beq down
beq down
bmi postVMove ; if the spriteDir is lt $ff, stationary sprite
up:
lda spriteYPos, x ; get the Y position
sec
sec
sbc spriteSpeed, x ; move up by the speed
cmp spriteMin, x ; see if at top
bcc upEnd ; overshot top
@ -414,7 +447,7 @@ upEnd:
down:
lda spriteYPos, x ; get the Y
clc
clc
adc spriteSpeed, x ; add the speed
cmp spriteMax, x ; see of at end
bcs downEnd ; at or past end
@ -426,11 +459,11 @@ downEnd:
bit CLASS_HOLDATEND
bne stop
lda #1 ; but mark for moving UP (1)
sta spriteDir, x
sta spriteDir, x
bne postVMove ; BRA maybe down?
stop:
lda #$ff ; set the direction to -1 (lt 0)
sta spriteDir, x
sta spriteDir, x
bne postVMove ; BRA
door:
@ -452,14 +485,14 @@ eugene:
lda #0 ; all keys - force eugene down
sta spriteDir, x
inc spriteFrame, x ; cycle through the 5 colors
lda spriteFrame, x
lda spriteFrame, x
cmp #4
bcc :+
lda #0
:
sta spriteFrame, x ; save the new frame
eugeneNormal:
jmp next
jmp next
kong:
lda spriteMax, x ; if kong's max is 0 he's still up
@ -493,16 +526,16 @@ skylab:
lda spriteDir, x ; get the direction of the falling satellite
cmp #$ff ; see if it's reached its end
beq :+ ; yes it has
jmp next
jmp next
:
inc spriteFrame, x ; advance the collapsing frame
lda spriteFrame, x ; load that frame
cmp #8 ; see if it's the last
bcs :+ ; yes
jmp next
jmp next
:
lda spriteTick, x ; get the tick (hich is an index in this case)
clc
clc
adc #3 ; advance by 3 (3 satellites at a time) so next index for this satellite
cmp #12 ; (3*4 is 12) - there are 4 stating locations per satellite
bcc :+ ; not rolled over
@ -513,12 +546,12 @@ skylab:
lda skylabXPos, y ; get the actual start position, based on y, for this satellite
sta spriteXPos, x ; put that into the satellite
lda #0 ; reset the frame, position and direction all to 0
sta spriteFrame, x
sta spriteYPos, x
sta spriteDir, x
jmp next
sta spriteFrame, x
sta spriteYPos, x
sta spriteDir, x
jmp next
.endproc
.endproc
;-----------------------------------------------------------------------------
@ -531,16 +564,16 @@ skylab:
lda #UI_COMPONENT_NAME ; mark the level name as needing an update
jsr uiUpdateComponent
lda leftEdge ; scroll the screen
clc
clc
adc demoDirection ; based on the scrolling direction
sta leftEdge
sta leftEdge
beq nextDemoLevel ; if the edge is 0 then done with level
cmp #12 ; at 12, the level flips scroll direction
bne :+
lda #$ff ; at 12, the scroll direction becomes -1
sta demoDirection
:
rts
rts
nextDemoLevel:
lda #DEMO_TIMER_INITAL ; set for a longer initial hold at a new level
@ -554,7 +587,7 @@ nextDemoLevel:
sta eventState
rts
.endproc
.endproc
;-----------------------------------------------------------------------------
.proc gameEvent
@ -569,7 +602,7 @@ nextDemoLevel:
lda #EVENT_LEVEL_RESTART ; still alive so restart the level
rts
:
:
bit bit4Mask ; EVENT_CHEAT_JUMP
bne done ; if jumping, just go
lda currLevel ; check the level
@ -591,7 +624,7 @@ nextDemoLevel:
sta tmpBot
jsr screenInvertVisibleScreen
ldx sizeL
dex
dex
bne :-
lda demoMode ; is this demo mode
@ -610,7 +643,7 @@ airLoop:
jsr gameAirDecrease ; run the decrease air
lda airCols ; get the remaining bar length
asl ; mult * 4
asl
asl
eor #$7f ; and reverse (ignore MSB which is 0) - this is the freq
ldy #6 ; duration for the freq
jsr audioPlayNote::freq ; make a sound of this freq and duration
@ -637,9 +670,9 @@ died:
done:
lda #EVENT_NEXT_LEVEL ; return in a the action (next level)
rts
.endproc
rts
.endproc
;-----------------------------------------------------------------------------
.proc gameAirDecrease
@ -657,7 +690,7 @@ done:
cmp maskGreen, x ; if it's all green, time to drop another column
beq colDec
lsr ; not all green, so adjust the tip by dropping 2 bits (1 white pixel)
lsr
lsr
ora maskGreenHi, x ; and replace that with a green pixel (appropriate for odd/even column)
bne airOk
@ -689,7 +722,7 @@ airOk:
bootPart:
ldx #20 ; game over level is 20 (0 based)
stx currLevel
jsr gameInitStage
jsr gameInitStage
ldx #0 ; clear the top part of the screen
jsr screenClear
@ -702,7 +735,7 @@ bootPart:
lda #1 ; pretend there's a key so Boot (EUGENE) doesn't animate
sta keysToCollect ; and the "door" doesn't switch to the second frame
tax ; also draw the pedestal (door)
jsr screenDrawSprite ; draw the boot
@ -717,11 +750,11 @@ bootLoop:
dec iter ; raise freq
dec iter
lda audioMask ; see if the audio will play or skip
and #AUDIO_SOUND
and #AUDIO_SOUND
beq otherDelay ; audio won't delay so "fake" an audio delay
lda iter ; get the freq
ldy #$80 ; duration for the freq (also slows the boot down)
jsr audioPlayNote::freq ; make a sound of this freq and duration
@ -729,8 +762,8 @@ bootLoop:
otherDelay:
lda iter
lsr
lsr
lsr
lsr
tay
jsr uiDelay::ySet
:
@ -748,7 +781,7 @@ gameOverPart:
textL = tmpBot + 4 ; string pointer
textH = tmpBot + 5
len = tmpBot + 6 ; how many characters (0 based)
lda #$20
sta iter ; how many times to loop
lda #(7*8) ; Y for string
@ -757,9 +790,9 @@ gameOverPart:
sta color
cycleLoop:
lda #4 ; print GAME at x 4
sta xPos
sta xPos
lda #<roTextGame ; point at GAME text
sta textL
sta textL
lda #>roTextGame
sta textH
lda #4 ; 0-3 characters
@ -767,9 +800,9 @@ cycleLoop:
jsr textColorCycle ; show the text in color
lda #13 ; print OVER at x 13
sta xPos
sta xPos
lda #<roTextOver ; point at OVER text
sta textL
sta textL
lda #>roTextOver
sta textH
lda #4 ; also 0-3 characters in length
@ -791,7 +824,7 @@ cycleLoop:
lda #19 ; put willy above the door
sta willyXPos ; outside the caverns
lda #0
sta willyFrame
sta willyFrame
lda #2*8
sta willyYPos
@ -802,7 +835,7 @@ cycleLoop:
jsr screenDrawWilly ; not demo - draw willy with collision detection
jsr screenDrawLevel ; show all the tiles
ldx numSprites ; The door's index
inx
inx
jsr screenDrawSprite ; render the door over everything else, no collision
jsr screenSwap ; swap to the newly rendered screen
@ -812,10 +845,10 @@ audioPart:
iteration = tmpBot + 2 ; iteration
lda #50 ; 50 iterations
sta iteration
sta iteration
lda #0 ; init freq and duration
sta freq
sta duration
sta freq
sta duration
loop:
lda duration ; start with the duration
@ -833,7 +866,7 @@ loop:
:
dex ; but I want the audio code to all go through the
bne :- ; same "API" for consistency
dey
dey
bne :--
beq postFreq
@ -844,6 +877,6 @@ audioOn:
postFreq:
dec iteration ; dec the iterations
bne loop ; loop till all iterations done
rts
rts
.endproc
.endproc

View File

@ -26,18 +26,18 @@ hasKey:
bit KBDSTRB
and #$5f ; strip MSB and upper/lower case (to upper)
tax
tax
lda demoMode
beq :+
beq :+
jmp premusic
:
txa
txa
bne right ; $5f clears space so a is 0 for jump
jump:
lda userKeyMask
eor #MASK_AIR ; AIR marks the start of a jump
sta userKeyMask
sta userKeyMask
rts
right:
@ -71,7 +71,7 @@ camera:
eor cameraMode
sta cameraMode
rts ; done, can't be any other key
cheat:
ora #%00100000 ; make "normal" characters
ldx cheatActive ; see if the cheat mode is on
@ -113,7 +113,7 @@ checkJump:
bcc :+
lda #0
:
sta currLevel
sta currLevel
setJmpEvent:
lda #EVENT_CHEAT_JUMP ; set the jump event active
ora eventState
@ -138,7 +138,7 @@ music:
LDA audioMask
eor #AUDIO_MUSIC
sta audioMask
rts
rts
:
cmp #'B'
@ -154,7 +154,7 @@ music:
LDA audioMask
eor #AUDIO_SOUND
sta audioMask
rts
rts
:
cmp #$1B ; ESC
@ -165,15 +165,15 @@ music:
quit:
lda #0 ; set lives to zero so this die event quits
sta lives
sta lives
inc demoMode ; turn demo mode if not on, so there's no end-of-level stuff
lda eventState ; and make a death event
ora #EVENT_DIED
sta eventState
done:
rts
rts
.endproc
;-----------------------------------------------------------------------------
@ -212,20 +212,20 @@ showMono:
showColor:
printXY #7, #(17*8), roTextColor, #4 ; show Color on in both buffers
jsr screenSwap::valueSwap
dec currLevel
dec currLevel
bpl showColor
doneB:
lda #0 ; if all is well, return with 0 in a
rts
rts
: ; non-music/color toggle key
cmp #$1b ; see if it's esc
beq exit ; exit if it is
stop:
lda #1 ; non-M, B or ESC (non toggle) returns 1 (start game)
rts
rts
exit:
lda #$ff ; -1 on ESC (quit application)
rts
.endproc
.endproc

View File

@ -37,9 +37,9 @@ loop:
iny ; point y at next byte
lsr ; get high repeat nibble into low nibble
lsr
lsr
lsr
lsr
lsr
lsr
tax ; but result in X
lda (srcPtrL), y ; read the next byte from level (values)
@ -47,9 +47,9 @@ loop:
iny ; advance y to next rep counts
lsr ; get high value nibble into low nibble
lsr
lsr
lsr
lsr
lsr
lsr
jsr :+ ; store value repeat times into level decode area
pla ; restore the rep byte
@ -73,7 +73,7 @@ store:
bpl store ; repeat for all repetitions
lda len ; get the repeat length
clc
clc
adc store + 1 ; advance the stor pointer by the length
sta store + 1
bcc done

View File

@ -23,7 +23,7 @@ loop:
quit:
jsr MLI ; quit using the prodos mli
.byte $65 ; ProDOS Quit request
.addr * + 2
.byte 4
@ -69,7 +69,7 @@ quit:
sta cheatActive
sta cheatIndex
sta monochrome
lda #AUDIO_MUSIC | AUDIO_SOUND ; turn the music and in-game sounds on
sta audioMask
@ -84,6 +84,6 @@ quit:
dex
bpl :-
rts
rts
.endproc
.endproc

View File

@ -20,56 +20,56 @@ font00:
.byte $80, $80 ; -------------- = --------------
.byte $80, $80 ; -------------- = --------------
font01:
.byte $80, $80 ; -------------- = --------------
.byte $B0, $80 ; -XX----------- = ----XX--------
.byte $B0, $80 ; -XX----------- = ----XX--------
.byte $B0, $80 ; -XX----------- = ----XX--------
.byte $B0, $80 ; -XX----------- = ----XX--------
.byte $80, $80 ; -------------- = --------------
.byte $B0, $80 ; -XX----------- = ----XX--------
.byte $80, $80 ; -------------- = --------------
font02:
.byte $80, $80 ; -------------- = --------------
.byte $8C, $86 ; ---XX------XX- = --XX----XX----
.byte $8C, $86 ; ---XX------XX- = --XX----XX----
.byte $80, $80 ; -------------- = --------------
.byte $80, $80 ; -------------- = --------------
.byte $80, $80 ; -------------- = --------------
.byte $80, $80 ; -------------- = --------------
.byte $80, $80 ; -------------- = --------------
font03:
.byte $80, $80 ; -------------- = --------------
.byte $8C, $86 ; ---XX------XX- = --XX----XX----
.byte $FF, $9F ; XXXXXXX--XXXXX = XXXXXXXXXXXX--
.byte $8C, $86 ; ---XX------XX- = --XX----XX----
.byte $8C, $86 ; ---XX------XX- = --XX----XX----
.byte $FF, $9F ; XXXXXXX--XXXXX = XXXXXXXXXXXX--
.byte $8C, $86 ; ---XX------XX- = --XX----XX----
.byte $80, $80 ; -------------- = --------------
font04:
.byte $80, $80 ; -------------- = --------------
.byte $C0, $81 ; X------------X = ------XX------
.byte $F0, $9F ; XXX------XXXXX = ----XXXXXXXX--
.byte $CC, $81 ; X--XX--------X = --XX--XX------
.byte $F0, $87 ; XXX--------XXX = ----XXXXXX----
.byte $C0, $99 ; X--------XX--X = ------XX--XX--
.byte $FC, $87 ; XXXXX------XXX = --XXXXXXXX----
.byte $C0, $81 ; X------------X = ------XX------
font05:
.byte $80, $80 ; -------------- = --------------
.byte $8F, $98 ; ---XXXX--XX--- = XXXX------XX--
.byte $8F, $86 ; ---XXXX----XX- = XXXX----XX----
.byte $C0, $81 ; X------------X = ------XX------
.byte $B0, $80 ; -XX----------- = ----XX--------
.byte $8C, $9E ; ---XX----XXXX- = --XX----XXXX--
.byte $83, $9E ; -----XX--XXXX- = XX------XXXX--
.byte $80, $80 ; -------------- = --------------
;font01:
;.byte $80, $80 ; -------------- = --------------
;.byte $B0, $80 ; -XX----------- = ----XX--------
;.byte $B0, $80 ; -XX----------- = ----XX--------
;.byte $B0, $80 ; -XX----------- = ----XX--------
;.byte $B0, $80 ; -XX----------- = ----XX--------
;.byte $80, $80 ; -------------- = --------------
;.byte $B0, $80 ; -XX----------- = ----XX--------
;.byte $80, $80 ; -------------- = --------------
;
;font02:
;.byte $80, $80 ; -------------- = --------------
;.byte $8C, $86 ; ---XX------XX- = --XX----XX----
;.byte $8C, $86 ; ---XX------XX- = --XX----XX----
;.byte $80, $80 ; -------------- = --------------
;.byte $80, $80 ; -------------- = --------------
;.byte $80, $80 ; -------------- = --------------
;.byte $80, $80 ; -------------- = --------------
;.byte $80, $80 ; -------------- = --------------
;
;font03:
;.byte $80, $80 ; -------------- = --------------
;.byte $8C, $86 ; ---XX------XX- = --XX----XX----
;.byte $FF, $9F ; XXXXXXX--XXXXX = XXXXXXXXXXXX--
;.byte $8C, $86 ; ---XX------XX- = --XX----XX----
;.byte $8C, $86 ; ---XX------XX- = --XX----XX----
;.byte $FF, $9F ; XXXXXXX--XXXXX = XXXXXXXXXXXX--
;.byte $8C, $86 ; ---XX------XX- = --XX----XX----
;.byte $80, $80 ; -------------- = --------------
;
;font04:
;.byte $80, $80 ; -------------- = --------------
;.byte $C0, $81 ; X------------X = ------XX------
;.byte $F0, $9F ; XXX------XXXXX = ----XXXXXXXX--
;.byte $CC, $81 ; X--XX--------X = --XX--XX------
;.byte $F0, $87 ; XXX--------XXX = ----XXXXXX----
;.byte $C0, $99 ; X--------XX--X = ------XX--XX--
;.byte $FC, $87 ; XXXXX------XXX = --XXXXXXXX----
;.byte $C0, $81 ; X------------X = ------XX------
;
;font05:
;.byte $80, $80 ; -------------- = --------------
;.byte $8F, $98 ; ---XXXX--XX--- = XXXX------XX--
;.byte $8F, $86 ; ---XXXX----XX- = XXXX----XX----
;.byte $C0, $81 ; X------------X = ------XX------
;.byte $B0, $80 ; -XX----------- = ----XX--------
;.byte $8C, $9E ; ---XX----XXXX- = --XX----XXXX--
;.byte $83, $9E ; -----XX--XXXX- = XX------XXXX--
;.byte $80, $80 ; -------------- = --------------
;
font06:
.byte $80, $80 ; -------------- = --------------
.byte $B0, $80 ; -XX----------- = ----XX--------
@ -90,46 +90,46 @@ font07:
.byte $80, $80 ; -------------- = --------------
.byte $80, $80 ; -------------- = --------------
font08:
.byte $80, $80 ; -------------- = --------------
.byte $80, $86 ; -----------XX- = --------XX----
.byte $C0, $81 ; X------------X = ------XX------
.byte $C0, $81 ; X------------X = ------XX------
.byte $C0, $81 ; X------------X = ------XX------
.byte $C0, $81 ; X------------X = ------XX------
.byte $80, $86 ; -----------XX- = --------XX----
.byte $80, $80 ; -------------- = --------------
font09:
.byte $80, $80 ; -------------- = --------------
.byte $8C, $80 ; ---XX--------- = --XX----------
.byte $B0, $80 ; -XX----------- = ----XX--------
.byte $B0, $80 ; -XX----------- = ----XX--------
.byte $B0, $80 ; -XX----------- = ----XX--------
.byte $B0, $80 ; -XX----------- = ----XX--------
.byte $8C, $80 ; ---XX--------- = --XX----------
.byte $80, $80 ; -------------- = --------------
font0A:
.byte $80, $80 ; -------------- = --------------
.byte $80, $80 ; -------------- = --------------
.byte $B0, $86 ; -XX--------XX- = ----XX--XX----
.byte $C0, $81 ; X------------X = ------XX------
.byte $FC, $9F ; XXXXX----XXXXX = --XXXXXXXXXX--
.byte $C0, $81 ; X------------X = ------XX------
.byte $B0, $86 ; -XX--------XX- = ----XX--XX----
.byte $80, $80 ; -------------- = --------------
font0B:
.byte $80, $80 ; -------------- = --------------
.byte $80, $80 ; -------------- = --------------
.byte $C0, $81 ; X------------X = ------XX------
.byte $C0, $81 ; X------------X = ------XX------
.byte $FC, $9F ; XXXXX----XXXXX = --XXXXXXXXXX--
.byte $C0, $81 ; X------------X = ------XX------
.byte $C0, $81 ; X------------X = ------XX------
.byte $80, $80 ; -------------- = --------------
;font08:
;.byte $80, $80 ; -------------- = --------------
;.byte $80, $86 ; -----------XX- = --------XX----
;.byte $C0, $81 ; X------------X = ------XX------
;.byte $C0, $81 ; X------------X = ------XX------
;.byte $C0, $81 ; X------------X = ------XX------
;.byte $C0, $81 ; X------------X = ------XX------
;.byte $80, $86 ; -----------XX- = --------XX----
;.byte $80, $80 ; -------------- = --------------
;
;font09:
;.byte $80, $80 ; -------------- = --------------
;.byte $8C, $80 ; ---XX--------- = --XX----------
;.byte $B0, $80 ; -XX----------- = ----XX--------
;.byte $B0, $80 ; -XX----------- = ----XX--------
;.byte $B0, $80 ; -XX----------- = ----XX--------
;.byte $B0, $80 ; -XX----------- = ----XX--------
;.byte $8C, $80 ; ---XX--------- = --XX----------
;.byte $80, $80 ; -------------- = --------------
;
;font0A:
;.byte $80, $80 ; -------------- = --------------
;.byte $80, $80 ; -------------- = --------------
;.byte $B0, $86 ; -XX--------XX- = ----XX--XX----
;.byte $C0, $81 ; X------------X = ------XX------
;.byte $FC, $9F ; XXXXX----XXXXX = --XXXXXXXXXX--
;.byte $C0, $81 ; X------------X = ------XX------
;.byte $B0, $86 ; -XX--------XX- = ----XX--XX----
;.byte $80, $80 ; -------------- = --------------
;
;font0B:
;.byte $80, $80 ; -------------- = --------------
;.byte $80, $80 ; -------------- = --------------
;.byte $C0, $81 ; X------------X = ------XX------
;.byte $C0, $81 ; X------------X = ------XX------
;.byte $FC, $9F ; XXXXX----XXXXX = --XXXXXXXXXX--
;.byte $C0, $81 ; X------------X = ------XX------
;.byte $C0, $81 ; X------------X = ------XX------
;.byte $80, $80 ; -------------- = --------------
;
font0C:
.byte $80, $80 ; -------------- = --------------
.byte $80, $80 ; -------------- = --------------
@ -600,365 +600,365 @@ font3A:
.byte $FF, $9F ; XXXXXXX--XXXXX = XXXXXXXXXXXX--
.byte $80, $80 ; -------------- = --------------
font3B:
.byte $80, $80 ; -------------- = --------------
.byte $C0, $9F ; X--------XXXXX = ------XXXXXX--
.byte $C0, $81 ; X------------X = ------XX------
.byte $C0, $81 ; X------------X = ------XX------
.byte $C0, $81 ; X------------X = ------XX------
.byte $C0, $81 ; X------------X = ------XX------
.byte $C0, $9F ; X--------XXXXX = ------XXXXXX--
.byte $80, $80 ; -------------- = --------------
; font3B:
; .byte $80, $80 ; -------------- = --------------
; .byte $C0, $9F ; X--------XXXXX = ------XXXXXX--
; .byte $C0, $81 ; X------------X = ------XX------
; .byte $C0, $81 ; X------------X = ------XX------
; .byte $C0, $81 ; X------------X = ------XX------
; .byte $C0, $81 ; X------------X = ------XX------
; .byte $C0, $9F ; X--------XXXXX = ------XXXXXX--
; .byte $80, $80 ; -------------- = --------------
font3C:
.byte $80, $80 ; -------------- = --------------
.byte $80, $80 ; -------------- = --------------
.byte $83, $80 ; -----XX------- = XX------------
.byte $8C, $80 ; ---XX--------- = --XX----------
.byte $B0, $80 ; -XX----------- = ----XX--------
.byte $C0, $81 ; X------------X = ------XX------
.byte $80, $86 ; -----------XX- = --------XX----
.byte $80, $80 ; -------------- = --------------
; font3C:
; .byte $80, $80 ; -------------- = --------------
; .byte $80, $80 ; -------------- = --------------
; .byte $83, $80 ; -----XX------- = XX------------
; .byte $8C, $80 ; ---XX--------- = --XX----------
; .byte $B0, $80 ; -XX----------- = ----XX--------
; .byte $C0, $81 ; X------------X = ------XX------
; .byte $80, $86 ; -----------XX- = --------XX----
; .byte $80, $80 ; -------------- = --------------
font3D:
.byte $80, $80 ; -------------- = --------------
.byte $BF, $80 ; -XXXXXX------- = XXXXXX--------
.byte $B0, $80 ; -XX----------- = ----XX--------
.byte $B0, $80 ; -XX----------- = ----XX--------
.byte $B0, $80 ; -XX----------- = ----XX--------
.byte $B0, $80 ; -XX----------- = ----XX--------
.byte $BF, $80 ; -XXXXXX------- = XXXXXX--------
.byte $80, $80 ; -------------- = --------------
; font3D:
; .byte $80, $80 ; -------------- = --------------
; .byte $BF, $80 ; -XXXXXX------- = XXXXXX--------
; .byte $B0, $80 ; -XX----------- = ----XX--------
; .byte $B0, $80 ; -XX----------- = ----XX--------
; .byte $B0, $80 ; -XX----------- = ----XX--------
; .byte $B0, $80 ; -XX----------- = ----XX--------
; .byte $BF, $80 ; -XXXXXX------- = XXXXXX--------
; .byte $80, $80 ; -------------- = --------------
font3E:
.byte $80, $80 ; -------------- = --------------
.byte $B0, $80 ; -XX----------- = ----XX--------
.byte $FC, $81 ; XXXXX--------X = --XXXXXX------
.byte $B3, $86 ; -XX--XX----XX- = XX--XX--XX----
.byte $B0, $80 ; -XX----------- = ----XX--------
.byte $B0, $80 ; -XX----------- = ----XX--------
.byte $B0, $80 ; -XX----------- = ----XX--------
.byte $80, $80 ; -------------- = --------------
; font3E:
; .byte $80, $80 ; -------------- = --------------
; .byte $B0, $80 ; -XX----------- = ----XX--------
; .byte $FC, $81 ; XXXXX--------X = --XXXXXX------
; .byte $B3, $86 ; -XX--XX----XX- = XX--XX--XX----
; .byte $B0, $80 ; -XX----------- = ----XX--------
; .byte $B0, $80 ; -XX----------- = ----XX--------
; .byte $B0, $80 ; -XX----------- = ----XX--------
; .byte $80, $80 ; -------------- = --------------
font3F:
.byte $80, $80 ; -------------- = --------------
.byte $80, $80 ; -------------- = --------------
.byte $80, $80 ; -------------- = --------------
.byte $80, $80 ; -------------- = --------------
.byte $80, $80 ; -------------- = --------------
.byte $80, $80 ; -------------- = --------------
.byte $80, $80 ; -------------- = --------------
.byte $FF, $FF ; XXXXXXXXXXXXXX = XXXXXXXXXXXXXX
; font3F:
; .byte $80, $80 ; -------------- = --------------
; .byte $80, $80 ; -------------- = --------------
; .byte $80, $80 ; -------------- = --------------
; .byte $80, $80 ; -------------- = --------------
; .byte $80, $80 ; -------------- = --------------
; .byte $80, $80 ; -------------- = --------------
; .byte $80, $80 ; -------------- = --------------
; .byte $FF, $FF ; XXXXXXXXXXXXXX = XXXXXXXXXXXXXX
font40:
.byte $80, $80 ; -------------- = --------------
.byte $F0, $87 ; XXX--------XXX = ----XXXXXX----
.byte $8C, $98 ; ---XX----XX--- = --XX------XX--
.byte $FF, $81 ; XXXXXXX------X = XXXXXXXX------
.byte $8C, $80 ; ---XX--------- = --XX----------
.byte $8C, $80 ; ---XX--------- = --XX----------
.byte $FF, $9F ; XXXXXXX--XXXXX = XXXXXXXXXXXX--
.byte $80, $80 ; -------------- = --------------
; font40:
; .byte $80, $80 ; -------------- = --------------
; .byte $F0, $87 ; XXX--------XXX = ----XXXXXX----
; .byte $8C, $98 ; ---XX----XX--- = --XX------XX--
; .byte $FF, $81 ; XXXXXXX------X = XXXXXXXX------
; .byte $8C, $80 ; ---XX--------- = --XX----------
; .byte $8C, $80 ; ---XX--------- = --XX----------
; .byte $FF, $9F ; XXXXXXX--XXXXX = XXXXXXXXXXXX--
; .byte $80, $80 ; -------------- = --------------
font41:
.byte $80, $80 ; -------------- = --------------
.byte $80, $80 ; -------------- = --------------
.byte $F0, $87 ; XXX--------XXX = ----XXXXXX----
.byte $80, $98 ; ---------XX--- = ----------XX--
.byte $F0, $9F ; XXX------XXXXX = ----XXXXXXXX--
.byte $8C, $98 ; ---XX----XX--- = --XX------XX--
.byte $F0, $9F ; XXX------XXXXX = ----XXXXXXXX--
.byte $80, $80 ; -------------- = --------------
; font41:
; .byte $80, $80 ; -------------- = --------------
; .byte $80, $80 ; -------------- = --------------
; .byte $F0, $87 ; XXX--------XXX = ----XXXXXX----
; .byte $80, $98 ; ---------XX--- = ----------XX--
; .byte $F0, $9F ; XXX------XXXXX = ----XXXXXXXX--
; .byte $8C, $98 ; ---XX----XX--- = --XX------XX--
; .byte $F0, $9F ; XXX------XXXXX = ----XXXXXXXX--
; .byte $80, $80 ; -------------- = --------------
font42:
.byte $80, $80 ; -------------- = --------------
.byte $8C, $80 ; ---XX--------- = --XX----------
.byte $8C, $80 ; ---XX--------- = --XX----------
.byte $FC, $87 ; XXXXX------XXX = --XXXXXXXX----
.byte $8C, $98 ; ---XX----XX--- = --XX------XX--
.byte $8C, $98 ; ---XX----XX--- = --XX------XX--
.byte $FC, $87 ; XXXXX------XXX = --XXXXXXXX----
.byte $80, $80 ; -------------- = --------------
; font42:
; .byte $80, $80 ; -------------- = --------------
; .byte $8C, $80 ; ---XX--------- = --XX----------
; .byte $8C, $80 ; ---XX--------- = --XX----------
; .byte $FC, $87 ; XXXXX------XXX = --XXXXXXXX----
; .byte $8C, $98 ; ---XX----XX--- = --XX------XX--
; .byte $8C, $98 ; ---XX----XX--- = --XX------XX--
; .byte $FC, $87 ; XXXXX------XXX = --XXXXXXXX----
; .byte $80, $80 ; -------------- = --------------
font43:
.byte $80, $80 ; -------------- = --------------
.byte $80, $80 ; -------------- = --------------
.byte $F0, $87 ; XXX--------XXX = ----XXXXXX----
.byte $8C, $80 ; ---XX--------- = --XX----------
.byte $8C, $80 ; ---XX--------- = --XX----------
.byte $8C, $80 ; ---XX--------- = --XX----------
.byte $F0, $87 ; XXX--------XXX = ----XXXXXX----
.byte $80, $80 ; -------------- = --------------
; font43:
; .byte $80, $80 ; -------------- = --------------
; .byte $80, $80 ; -------------- = --------------
; .byte $F0, $87 ; XXX--------XXX = ----XXXXXX----
; .byte $8C, $80 ; ---XX--------- = --XX----------
; .byte $8C, $80 ; ---XX--------- = --XX----------
; .byte $8C, $80 ; ---XX--------- = --XX----------
; .byte $F0, $87 ; XXX--------XXX = ----XXXXXX----
; .byte $80, $80 ; -------------- = --------------
font44:
.byte $80, $80 ; -------------- = --------------
.byte $80, $98 ; ---------XX--- = ----------XX--
.byte $80, $98 ; ---------XX--- = ----------XX--
.byte $F0, $9F ; XXX------XXXXX = ----XXXXXXXX--
.byte $8C, $98 ; ---XX----XX--- = --XX------XX--
.byte $8C, $98 ; ---XX----XX--- = --XX------XX--
.byte $F0, $9F ; XXX------XXXXX = ----XXXXXXXX--
.byte $80, $80 ; -------------- = --------------
; font44:
; .byte $80, $80 ; -------------- = --------------
; .byte $80, $98 ; ---------XX--- = ----------XX--
; .byte $80, $98 ; ---------XX--- = ----------XX--
; .byte $F0, $9F ; XXX------XXXXX = ----XXXXXXXX--
; .byte $8C, $98 ; ---XX----XX--- = --XX------XX--
; .byte $8C, $98 ; ---XX----XX--- = --XX------XX--
; .byte $F0, $9F ; XXX------XXXXX = ----XXXXXXXX--
; .byte $80, $80 ; -------------- = --------------
font45:
.byte $80, $80 ; -------------- = --------------
.byte $80, $80 ; -------------- = --------------
.byte $F0, $87 ; XXX--------XXX = ----XXXXXX----
.byte $8C, $98 ; ---XX----XX--- = --XX------XX--
.byte $FC, $87 ; XXXXX------XXX = --XXXXXXXX----
.byte $8C, $80 ; ---XX--------- = --XX----------
.byte $F0, $87 ; XXX--------XXX = ----XXXXXX----
.byte $80, $80 ; -------------- = --------------
; font45:
; .byte $80, $80 ; -------------- = --------------
; .byte $80, $80 ; -------------- = --------------
; .byte $F0, $87 ; XXX--------XXX = ----XXXXXX----
; .byte $8C, $98 ; ---XX----XX--- = --XX------XX--
; .byte $FC, $87 ; XXXXX------XXX = --XXXXXXXX----
; .byte $8C, $80 ; ---XX--------- = --XX----------
; .byte $F0, $87 ; XXX--------XXX = ----XXXXXX----
; .byte $80, $80 ; -------------- = --------------
font46:
.byte $80, $80 ; -------------- = --------------
.byte $C0, $87 ; X----------XXX = ------XXXX----
.byte $B0, $80 ; -XX----------- = ----XX--------
.byte $F0, $81 ; XXX----------X = ----XXXX------
.byte $B0, $80 ; -XX----------- = ----XX--------
.byte $B0, $80 ; -XX----------- = ----XX--------
.byte $B0, $80 ; -XX----------- = ----XX--------
.byte $80, $80 ; -------------- = --------------
; font46:
; .byte $80, $80 ; -------------- = --------------
; .byte $C0, $87 ; X----------XXX = ------XXXX----
; .byte $B0, $80 ; -XX----------- = ----XX--------
; .byte $F0, $81 ; XXX----------X = ----XXXX------
; .byte $B0, $80 ; -XX----------- = ----XX--------
; .byte $B0, $80 ; -XX----------- = ----XX--------
; .byte $B0, $80 ; -XX----------- = ----XX--------
; .byte $80, $80 ; -------------- = --------------
font47:
.byte $80, $80 ; -------------- = --------------
.byte $80, $80 ; -------------- = --------------
.byte $F0, $9F ; XXX------XXXXX = ----XXXXXXXX--
.byte $8C, $98 ; ---XX----XX--- = --XX------XX--
.byte $8C, $98 ; ---XX----XX--- = --XX------XX--
.byte $F0, $9F ; XXX------XXXXX = ----XXXXXXXX--
.byte $80, $98 ; ---------XX--- = ----------XX--
.byte $F0, $87 ; XXX--------XXX = ----XXXXXX----
; font47:
; .byte $80, $80 ; -------------- = --------------
; .byte $80, $80 ; -------------- = --------------
; .byte $F0, $9F ; XXX------XXXXX = ----XXXXXXXX--
; .byte $8C, $98 ; ---XX----XX--- = --XX------XX--
; .byte $8C, $98 ; ---XX----XX--- = --XX------XX--
; .byte $F0, $9F ; XXX------XXXXX = ----XXXXXXXX--
; .byte $80, $98 ; ---------XX--- = ----------XX--
; .byte $F0, $87 ; XXX--------XXX = ----XXXXXX----
font48:
.byte $80, $80 ; -------------- = --------------
.byte $8C, $80 ; ---XX--------- = --XX----------
.byte $8C, $80 ; ---XX--------- = --XX----------
.byte $FC, $87 ; XXXXX------XXX = --XXXXXXXX----
.byte $8C, $98 ; ---XX----XX--- = --XX------XX--
.byte $8C, $98 ; ---XX----XX--- = --XX------XX--
.byte $8C, $98 ; ---XX----XX--- = --XX------XX--
.byte $80, $80 ; -------------- = --------------
; font48:
; .byte $80, $80 ; -------------- = --------------
; .byte $8C, $80 ; ---XX--------- = --XX----------
; .byte $8C, $80 ; ---XX--------- = --XX----------
; .byte $FC, $87 ; XXXXX------XXX = --XXXXXXXX----
; .byte $8C, $98 ; ---XX----XX--- = --XX------XX--
; .byte $8C, $98 ; ---XX----XX--- = --XX------XX--
; .byte $8C, $98 ; ---XX----XX--- = --XX------XX--
; .byte $80, $80 ; -------------- = --------------
font49:
.byte $80, $80 ; -------------- = --------------
.byte $C0, $81 ; X------------X = ------XX------
.byte $80, $80 ; -------------- = --------------
.byte $F0, $81 ; XXX----------X = ----XXXX------
.byte $C0, $81 ; X------------X = ------XX------
.byte $C0, $81 ; X------------X = ------XX------
.byte $F0, $87 ; XXX--------XXX = ----XXXXXX----
.byte $80, $80 ; -------------- = --------------
; font49:
; .byte $80, $80 ; -------------- = --------------
; .byte $C0, $81 ; X------------X = ------XX------
; .byte $80, $80 ; -------------- = --------------
; .byte $F0, $81 ; XXX----------X = ----XXXX------
; .byte $C0, $81 ; X------------X = ------XX------
; .byte $C0, $81 ; X------------X = ------XX------
; .byte $F0, $87 ; XXX--------XXX = ----XXXXXX----
; .byte $80, $80 ; -------------- = --------------
font4A:
.byte $80, $80 ; -------------- = --------------
.byte $80, $86 ; -----------XX- = --------XX----
.byte $80, $80 ; -------------- = --------------
.byte $80, $86 ; -----------XX- = --------XX----
.byte $80, $86 ; -----------XX- = --------XX----
.byte $80, $86 ; -----------XX- = --------XX----
.byte $8C, $86 ; ---XX------XX- = --XX----XX----
.byte $F0, $81 ; XXX----------X = ----XXXX------
; font4A:
; .byte $80, $80 ; -------------- = --------------
; .byte $80, $86 ; -----------XX- = --------XX----
; .byte $80, $80 ; -------------- = --------------
; .byte $80, $86 ; -----------XX- = --------XX----
; .byte $80, $86 ; -----------XX- = --------XX----
; .byte $80, $86 ; -----------XX- = --------XX----
; .byte $8C, $86 ; ---XX------XX- = --XX----XX----
; .byte $F0, $81 ; XXX----------X = ----XXXX------
font4B:
.byte $80, $80 ; -------------- = --------------
.byte $8C, $80 ; ---XX--------- = --XX----------
.byte $CC, $81 ; X--XX--------X = --XX--XX------
.byte $BC, $80 ; -XXXX--------- = --XXXX--------
.byte $BC, $80 ; -XXXX--------- = --XXXX--------
.byte $CC, $81 ; X--XX--------X = --XX--XX------
.byte $8C, $86 ; ---XX------XX- = --XX----XX----
.byte $80, $80 ; -------------- = --------------
; font4B:
; .byte $80, $80 ; -------------- = --------------
; .byte $8C, $80 ; ---XX--------- = --XX----------
; .byte $CC, $81 ; X--XX--------X = --XX--XX------
; .byte $BC, $80 ; -XXXX--------- = --XXXX--------
; .byte $BC, $80 ; -XXXX--------- = --XXXX--------
; .byte $CC, $81 ; X--XX--------X = --XX--XX------
; .byte $8C, $86 ; ---XX------XX- = --XX----XX----
; .byte $80, $80 ; -------------- = --------------
font4C:
.byte $80, $80 ; -------------- = --------------
.byte $B0, $80 ; -XX----------- = ----XX--------
.byte $B0, $80 ; -XX----------- = ----XX--------
.byte $B0, $80 ; -XX----------- = ----XX--------
.byte $B0, $80 ; -XX----------- = ----XX--------
.byte $B0, $80 ; -XX----------- = ----XX--------
.byte $C0, $87 ; X----------XXX = ------XXXX----
.byte $80, $80 ; -------------- = --------------
; font4C:
; .byte $80, $80 ; -------------- = --------------
; .byte $B0, $80 ; -XX----------- = ----XX--------
; .byte $B0, $80 ; -XX----------- = ----XX--------
; .byte $B0, $80 ; -XX----------- = ----XX--------
; .byte $B0, $80 ; -XX----------- = ----XX--------
; .byte $B0, $80 ; -XX----------- = ----XX--------
; .byte $C0, $87 ; X----------XXX = ------XXXX----
; .byte $80, $80 ; -------------- = --------------
font4D:
.byte $80, $80 ; -------------- = --------------
.byte $80, $80 ; -------------- = --------------
.byte $BC, $86 ; -XXXX------XX- = --XXXX--XX----
.byte $CC, $99 ; X--XX----XX--X = --XX--XX--XX--
.byte $CC, $99 ; X--XX----XX--X = --XX--XX--XX--
.byte $CC, $99 ; X--XX----XX--X = --XX--XX--XX--
.byte $CC, $99 ; X--XX----XX--X = --XX--XX--XX--
.byte $80, $80 ; -------------- = --------------
; font4D:
; .byte $80, $80 ; -------------- = --------------
; .byte $80, $80 ; -------------- = --------------
; .byte $BC, $86 ; -XXXX------XX- = --XXXX--XX----
; .byte $CC, $99 ; X--XX----XX--X = --XX--XX--XX--
; .byte $CC, $99 ; X--XX----XX--X = --XX--XX--XX--
; .byte $CC, $99 ; X--XX----XX--X = --XX--XX--XX--
; .byte $CC, $99 ; X--XX----XX--X = --XX--XX--XX--
; .byte $80, $80 ; -------------- = --------------
font4E:
.byte $80, $80 ; -------------- = --------------
.byte $80, $80 ; -------------- = --------------
.byte $FC, $87 ; XXXXX------XXX = --XXXXXXXX----
.byte $8C, $98 ; ---XX----XX--- = --XX------XX--
.byte $8C, $98 ; ---XX----XX--- = --XX------XX--
.byte $8C, $98 ; ---XX----XX--- = --XX------XX--
.byte $8C, $98 ; ---XX----XX--- = --XX------XX--
.byte $80, $80 ; -------------- = --------------
; font4E:
; .byte $80, $80 ; -------------- = --------------
; .byte $80, $80 ; -------------- = --------------
; .byte $FC, $87 ; XXXXX------XXX = --XXXXXXXX----
; .byte $8C, $98 ; ---XX----XX--- = --XX------XX--
; .byte $8C, $98 ; ---XX----XX--- = --XX------XX--
; .byte $8C, $98 ; ---XX----XX--- = --XX------XX--
; .byte $8C, $98 ; ---XX----XX--- = --XX------XX--
; .byte $80, $80 ; -------------- = --------------
font4F:
.byte $80, $80 ; -------------- = --------------
.byte $80, $80 ; -------------- = --------------
.byte $F0, $87 ; XXX--------XXX = ----XXXXXX----
.byte $8C, $98 ; ---XX----XX--- = --XX------XX--
.byte $8C, $98 ; ---XX----XX--- = --XX------XX--
.byte $8C, $98 ; ---XX----XX--- = --XX------XX--
.byte $F0, $87 ; XXX--------XXX = ----XXXXXX----
.byte $80, $80 ; -------------- = --------------
; font4F:
; .byte $80, $80 ; -------------- = --------------
; .byte $80, $80 ; -------------- = --------------
; .byte $F0, $87 ; XXX--------XXX = ----XXXXXX----
; .byte $8C, $98 ; ---XX----XX--- = --XX------XX--
; .byte $8C, $98 ; ---XX----XX--- = --XX------XX--
; .byte $8C, $98 ; ---XX----XX--- = --XX------XX--
; .byte $F0, $87 ; XXX--------XXX = ----XXXXXX----
; .byte $80, $80 ; -------------- = --------------
font50:
.byte $80, $80 ; -------------- = --------------
.byte $80, $80 ; -------------- = --------------
.byte $FC, $87 ; XXXXX------XXX = --XXXXXXXX----
.byte $8C, $98 ; ---XX----XX--- = --XX------XX--
.byte $8C, $98 ; ---XX----XX--- = --XX------XX--
.byte $FC, $87 ; XXXXX------XXX = --XXXXXXXX----
.byte $8C, $80 ; ---XX--------- = --XX----------
.byte $8C, $80 ; ---XX--------- = --XX----------
; font50:
; .byte $80, $80 ; -------------- = --------------
; .byte $80, $80 ; -------------- = --------------
; .byte $FC, $87 ; XXXXX------XXX = --XXXXXXXX----
; .byte $8C, $98 ; ---XX----XX--- = --XX------XX--
; .byte $8C, $98 ; ---XX----XX--- = --XX------XX--
; .byte $FC, $87 ; XXXXX------XXX = --XXXXXXXX----
; .byte $8C, $80 ; ---XX--------- = --XX----------
; .byte $8C, $80 ; ---XX--------- = --XX----------
font51:
.byte $80, $80 ; -------------- = --------------
.byte $80, $80 ; -------------- = --------------
.byte $FC, $87 ; XXXXX------XXX = --XXXXXXXX----
.byte $83, $86 ; -----XX----XX- = XX------XX----
.byte $83, $86 ; -----XX----XX- = XX------XX----
.byte $FC, $87 ; XXXXX------XXX = --XXXXXXXX----
.byte $80, $86 ; -----------XX- = --------XX----
.byte $80, $98 ; ---------XX--- = ----------XX--
; font51:
; .byte $80, $80 ; -------------- = --------------
; .byte $80, $80 ; -------------- = --------------
; .byte $FC, $87 ; XXXXX------XXX = --XXXXXXXX----
; .byte $83, $86 ; -----XX----XX- = XX------XX----
; .byte $83, $86 ; -----XX----XX- = XX------XX----
; .byte $FC, $87 ; XXXXX------XXX = --XXXXXXXX----
; .byte $80, $86 ; -----------XX- = --------XX----
; .byte $80, $98 ; ---------XX--- = ----------XX--
font52:
.byte $80, $80 ; -------------- = --------------
.byte $80, $80 ; -------------- = --------------
.byte $F0, $87 ; XXX--------XXX = ----XXXXXX----
.byte $8C, $80 ; ---XX--------- = --XX----------
.byte $8C, $80 ; ---XX--------- = --XX----------
.byte $8C, $80 ; ---XX--------- = --XX----------
.byte $8C, $80 ; ---XX--------- = --XX----------
.byte $80, $80 ; -------------- = --------------
; font52:
; .byte $80, $80 ; -------------- = --------------
; .byte $80, $80 ; -------------- = --------------
; .byte $F0, $87 ; XXX--------XXX = ----XXXXXX----
; .byte $8C, $80 ; ---XX--------- = --XX----------
; .byte $8C, $80 ; ---XX--------- = --XX----------
; .byte $8C, $80 ; ---XX--------- = --XX----------
; .byte $8C, $80 ; ---XX--------- = --XX----------
; .byte $80, $80 ; -------------- = --------------
font53:
.byte $80, $80 ; -------------- = --------------
.byte $80, $80 ; -------------- = --------------
.byte $F0, $87 ; XXX--------XXX = ----XXXXXX----
.byte $8C, $80 ; ---XX--------- = --XX----------
.byte $F0, $87 ; XXX--------XXX = ----XXXXXX----
.byte $80, $98 ; ---------XX--- = ----------XX--
.byte $FC, $87 ; XXXXX------XXX = --XXXXXXXX----
.byte $80, $80 ; -------------- = --------------
; font53:
; .byte $80, $80 ; -------------- = --------------
; .byte $80, $80 ; -------------- = --------------
; .byte $F0, $87 ; XXX--------XXX = ----XXXXXX----
; .byte $8C, $80 ; ---XX--------- = --XX----------
; .byte $F0, $87 ; XXX--------XXX = ----XXXXXX----
; .byte $80, $98 ; ---------XX--- = ----------XX--
; .byte $FC, $87 ; XXXXX------XXX = --XXXXXXXX----
; .byte $80, $80 ; -------------- = --------------
font54:
.byte $80, $80 ; -------------- = --------------
.byte $B0, $80 ; -XX----------- = ----XX--------
.byte $FC, $81 ; XXXXX--------X = --XXXXXX------
.byte $B0, $80 ; -XX----------- = ----XX--------
.byte $B0, $80 ; -XX----------- = ----XX--------
.byte $B0, $80 ; -XX----------- = ----XX--------
.byte $C0, $87 ; X----------XXX = ------XXXX----
.byte $80, $80 ; -------------- = --------------
; font54:
; .byte $80, $80 ; -------------- = --------------
; .byte $B0, $80 ; -XX----------- = ----XX--------
; .byte $FC, $81 ; XXXXX--------X = --XXXXXX------
; .byte $B0, $80 ; -XX----------- = ----XX--------
; .byte $B0, $80 ; -XX----------- = ----XX--------
; .byte $B0, $80 ; -XX----------- = ----XX--------
; .byte $C0, $87 ; X----------XXX = ------XXXX----
; .byte $80, $80 ; -------------- = --------------
font55:
.byte $80, $80 ; -------------- = --------------
.byte $80, $80 ; -------------- = --------------
.byte $8C, $98 ; ---XX----XX--- = --XX------XX--
.byte $8C, $98 ; ---XX----XX--- = --XX------XX--
.byte $8C, $98 ; ---XX----XX--- = --XX------XX--
.byte $8C, $98 ; ---XX----XX--- = --XX------XX--
.byte $F0, $87 ; XXX--------XXX = ----XXXXXX----
.byte $80, $80 ; -------------- = --------------
; font55:
; .byte $80, $80 ; -------------- = --------------
; .byte $80, $80 ; -------------- = --------------
; .byte $8C, $98 ; ---XX----XX--- = --XX------XX--
; .byte $8C, $98 ; ---XX----XX--- = --XX------XX--
; .byte $8C, $98 ; ---XX----XX--- = --XX------XX--
; .byte $8C, $98 ; ---XX----XX--- = --XX------XX--
; .byte $F0, $87 ; XXX--------XXX = ----XXXXXX----
; .byte $80, $80 ; -------------- = --------------
font56:
.byte $80, $80 ; -------------- = --------------
.byte $80, $80 ; -------------- = --------------
.byte $8C, $98 ; ---XX----XX--- = --XX------XX--
.byte $8C, $98 ; ---XX----XX--- = --XX------XX--
.byte $B0, $86 ; -XX--------XX- = ----XX--XX----
.byte $B0, $86 ; -XX--------XX- = ----XX--XX----
.byte $C0, $81 ; X------------X = ------XX------
.byte $80, $80 ; -------------- = --------------
; font56:
; .byte $80, $80 ; -------------- = --------------
; .byte $80, $80 ; -------------- = --------------
; .byte $8C, $98 ; ---XX----XX--- = --XX------XX--
; .byte $8C, $98 ; ---XX----XX--- = --XX------XX--
; .byte $B0, $86 ; -XX--------XX- = ----XX--XX----
; .byte $B0, $86 ; -XX--------XX- = ----XX--XX----
; .byte $C0, $81 ; X------------X = ------XX------
; .byte $80, $80 ; -------------- = --------------
font57:
.byte $80, $80 ; -------------- = --------------
.byte $80, $80 ; -------------- = --------------
.byte $8C, $98 ; ---XX----XX--- = --XX------XX--
.byte $CC, $99 ; X--XX----XX--X = --XX--XX--XX--
.byte $CC, $99 ; X--XX----XX--X = --XX--XX--XX--
.byte $CC, $99 ; X--XX----XX--X = --XX--XX--XX--
.byte $B0, $86 ; -XX--------XX- = ----XX--XX----
.byte $80, $80 ; -------------- = --------------
; font57:
; .byte $80, $80 ; -------------- = --------------
; .byte $80, $80 ; -------------- = --------------
; .byte $8C, $98 ; ---XX----XX--- = --XX------XX--
; .byte $CC, $99 ; X--XX----XX--X = --XX--XX--XX--
; .byte $CC, $99 ; X--XX----XX--X = --XX--XX--XX--
; .byte $CC, $99 ; X--XX----XX--X = --XX--XX--XX--
; .byte $B0, $86 ; -XX--------XX- = ----XX--XX----
; .byte $80, $80 ; -------------- = --------------
font58:
.byte $80, $80 ; -------------- = --------------
.byte $80, $80 ; -------------- = --------------
.byte $8C, $98 ; ---XX----XX--- = --XX------XX--
.byte $B0, $86 ; -XX--------XX- = ----XX--XX----
.byte $C0, $81 ; X------------X = ------XX------
.byte $B0, $86 ; -XX--------XX- = ----XX--XX----
.byte $8C, $98 ; ---XX----XX--- = --XX------XX--
.byte $80, $80 ; -------------- = --------------
; font58:
; .byte $80, $80 ; -------------- = --------------
; .byte $80, $80 ; -------------- = --------------
; .byte $8C, $98 ; ---XX----XX--- = --XX------XX--
; .byte $B0, $86 ; -XX--------XX- = ----XX--XX----
; .byte $C0, $81 ; X------------X = ------XX------
; .byte $B0, $86 ; -XX--------XX- = ----XX--XX----
; .byte $8C, $98 ; ---XX----XX--- = --XX------XX--
; .byte $80, $80 ; -------------- = --------------
font59:
.byte $80, $80 ; -------------- = --------------
.byte $80, $80 ; -------------- = --------------
.byte $8C, $98 ; ---XX----XX--- = --XX------XX--
.byte $8C, $98 ; ---XX----XX--- = --XX------XX--
.byte $8C, $98 ; ---XX----XX--- = --XX------XX--
.byte $F0, $9F ; XXX------XXXXX = ----XXXXXXXX--
.byte $80, $98 ; ---------XX--- = ----------XX--
.byte $F0, $87 ; XXX--------XXX = ----XXXXXX----
; font59:
; .byte $80, $80 ; -------------- = --------------
; .byte $80, $80 ; -------------- = --------------
; .byte $8C, $98 ; ---XX----XX--- = --XX------XX--
; .byte $8C, $98 ; ---XX----XX--- = --XX------XX--
; .byte $8C, $98 ; ---XX----XX--- = --XX------XX--
; .byte $F0, $9F ; XXX------XXXXX = ----XXXXXXXX--
; .byte $80, $98 ; ---------XX--- = ----------XX--
; .byte $F0, $87 ; XXX--------XXX = ----XXXXXX----
font5A:
.byte $80, $80 ; -------------- = --------------
.byte $80, $80 ; -------------- = --------------
.byte $FC, $9F ; XXXXX----XXXXX = --XXXXXXXXXX--
.byte $80, $86 ; -----------XX- = --------XX----
.byte $C0, $81 ; X------------X = ------XX------
.byte $B0, $80 ; -XX----------- = ----XX--------
.byte $FC, $9F ; XXXXX----XXXXX = --XXXXXXXXXX--
.byte $80, $80 ; -------------- = --------------
; font5A:
; .byte $80, $80 ; -------------- = --------------
; .byte $80, $80 ; -------------- = --------------
; .byte $FC, $9F ; XXXXX----XXXXX = --XXXXXXXXXX--
; .byte $80, $86 ; -----------XX- = --------XX----
; .byte $C0, $81 ; X------------X = ------XX------
; .byte $B0, $80 ; -XX----------- = ----XX--------
; .byte $FC, $9F ; XXXXX----XXXXX = --XXXXXXXXXX--
; .byte $80, $80 ; -------------- = --------------
font5B:
.byte $80, $80 ; -------------- = --------------
.byte $80, $9E ; ---------XXXX- = --------XXXX--
.byte $C0, $81 ; X------------X = ------XX------
.byte $BC, $80 ; -XXXX--------- = --XXXX--------
.byte $C0, $81 ; X------------X = ------XX------
.byte $C0, $81 ; X------------X = ------XX------
.byte $80, $9E ; ---------XXXX- = --------XXXX--
.byte $80, $80 ; -------------- = --------------
; font5B:
; .byte $80, $80 ; -------------- = --------------
; .byte $80, $9E ; ---------XXXX- = --------XXXX--
; .byte $C0, $81 ; X------------X = ------XX------
; .byte $BC, $80 ; -XXXX--------- = --XXXX--------
; .byte $C0, $81 ; X------------X = ------XX------
; .byte $C0, $81 ; X------------X = ------XX------
; .byte $80, $9E ; ---------XXXX- = --------XXXX--
; .byte $80, $80 ; -------------- = --------------
font5C:
.byte $80, $80 ; -------------- = --------------
.byte $C0, $81 ; X------------X = ------XX------
.byte $C0, $81 ; X------------X = ------XX------
.byte $C0, $81 ; X------------X = ------XX------
.byte $C0, $81 ; X------------X = ------XX------
.byte $C0, $81 ; X------------X = ------XX------
.byte $C0, $81 ; X------------X = ------XX------
.byte $80, $80 ; -------------- = --------------
; font5C:
; .byte $80, $80 ; -------------- = --------------
; .byte $C0, $81 ; X------------X = ------XX------
; .byte $C0, $81 ; X------------X = ------XX------
; .byte $C0, $81 ; X------------X = ------XX------
; .byte $C0, $81 ; X------------X = ------XX------
; .byte $C0, $81 ; X------------X = ------XX------
; .byte $C0, $81 ; X------------X = ------XX------
; .byte $80, $80 ; -------------- = --------------
font5D:
.byte $80, $80 ; -------------- = --------------
.byte $BC, $80 ; -XXXX--------- = --XXXX--------
.byte $C0, $81 ; X------------X = ------XX------
.byte $80, $9E ; ---------XXXX- = --------XXXX--
.byte $C0, $81 ; X------------X = ------XX------
.byte $C0, $81 ; X------------X = ------XX------
.byte $BC, $80 ; -XXXX--------- = --XXXX--------
.byte $80, $80 ; -------------- = --------------
; font5D:
; .byte $80, $80 ; -------------- = --------------
; .byte $BC, $80 ; -XXXX--------- = --XXXX--------
; .byte $C0, $81 ; X------------X = ------XX------
; .byte $80, $9E ; ---------XXXX- = --------XXXX--
; .byte $C0, $81 ; X------------X = ------XX------
; .byte $C0, $81 ; X------------X = ------XX------
; .byte $BC, $80 ; -XXXX--------- = --XXXX--------
; .byte $80, $80 ; -------------- = --------------
font5E:
.byte $80, $80 ; -------------- = --------------
.byte $B0, $86 ; -XX--------XX- = ----XX--XX----
.byte $CC, $81 ; X--XX--------X = --XX--XX------
.byte $80, $80 ; -------------- = --------------
.byte $80, $80 ; -------------- = --------------
.byte $80, $80 ; -------------- = --------------
.byte $80, $80 ; -------------- = --------------
.byte $80, $80 ; -------------- = --------------
; font5E:
; .byte $80, $80 ; -------------- = --------------
; .byte $B0, $86 ; -XX--------XX- = ----XX--XX----
; .byte $CC, $81 ; X--XX--------X = --XX--XX------
; .byte $80, $80 ; -------------- = --------------
; .byte $80, $80 ; -------------- = --------------
; .byte $80, $80 ; -------------- = --------------
; .byte $80, $80 ; -------------- = --------------
; .byte $80, $80 ; -------------- = --------------
font5F:
.byte $F0, $87 ; XXX--------XXX = ----XXXXXX----

View File

@ -225,7 +225,7 @@ levelsH:
; the level. The switch looks the same in both kong levels (only place it
; is present) so it doesn't need/get an entry. The door "tile" isn't seen,
; so isn't rendered. It's below the door sprite for collision purposes only.
;
;
; floor1, floor2, conveyor, wall, bush, rock, collapse, key - door & switch not here
levelTiles:
.byte $31, $00, $1C, $1F, $0D, $28, $27, $09 ; Level 1
@ -278,8 +278,9 @@ levelMasks:
.byte $01, $02, $00, $02, $01, $02, $04, $00 ; Level 19
.byte $02, $02, $04, $01, $00, $02, $04, $00 ; Level 20
; The number of bytes to skip when calling a tileDrawP*R* routine for a collapsing platform
collapseHeight:
.byte 8, 7, 6, 5, 4, 3, 2, 1
.byte 12*0, 12*1, 12*2, 12*3, 12*4, 12*5, 12*6, 12*7
conveyorDirections:
.byte 2, 1, 2, 1, 2, 2, 2, 1, 1, 2, 2, 1, 1, 2

View File

@ -1805,76 +1805,76 @@ sprite62:
.byte $08, $D3 ; ----X---XX-X--XX = ------------XXXX--XXXXXX----
sprite63:
.byte $00, $00 ; ---------------- = ----------------------------
.byte $00, $00 ; ---------------- = ----------------------------
.byte $00, $00 ; ---------------- = ----------------------------
.byte $0C, $30 ; ----XX----XX---- = ----------XXXXXXXX----------
.byte $83, $C1 ; X-----XXXX-----X = ------XXXX--------XXXX------
.byte $40, $02 ; -X------------X- = ----XX----------------XX----
.byte $20, $04 ; --X----------X-- = --XX--------------------XX--
.byte $10, $08 ; ---X--------X--- = XX------------------------XX
.byte $10, $08 ; ---X--------X--- = XX------------------------XX
.byte $10, $08 ; ---X--------X--- = XX------------------------XX
.byte $20, $04 ; --X----------X-- = --XX--------------------XX--
.byte $50, $0A ; -X-X--------X-X- = XX--XX----------------XX--XX
.byte $A3, $C5 ; X-X---XXXX---X-X = --XX--XXXX--------XXXX--XX--
.byte $9D, $B9 ; X--XXX-XX-XXX--X = XX----XX--XXXXXXXX--XX----XX
.byte $44, $22 ; -X---X----X---X- = ----XX----XX----XX----XX----
.byte $04, $20 ; -----X----X----- = ----------XX----XX----------
.byte $00, $00 ; ---------------- = ----------------------------
.byte $00, $00 ; ---------------- = ----------------------------
.byte $00, $00 ; ---------------- = ----------------------------
.byte $0C, $30 ; ----XX----XX---- = ----------XXXXXXXX----------
.byte $83, $C1 ; X-----XXXX-----X = ------XXXX--------XXXX------
.byte $40, $02 ; -X------------X- = ----XX----------------XX----
.byte $20, $04 ; --X----------X-- = --XX--------------------XX--
.byte $10, $08 ; ---X--------X--- = XX------------------------XX
.byte $10, $08 ; ---X--------X--- = XX------------------------XX
.byte $10, $08 ; ---X--------X--- = XX------------------------XX
.byte $20, $04 ; --X----------X-- = --XX--------------------XX--
.byte $50, $0A ; -X-X--------X-X- = XX--XX----------------XX--XX
.byte $A3, $C5 ; X-X---XXXX---X-X = --XX--XXXX--------XXXX--XX--
.byte $9D, $B9 ; X--XXX-XX-XXX--X = XX----XX--XXXXXXXX--XX----XX
.byte $44, $22 ; -X---X----X---X- = ----XX----XX----XX----XX----
.byte $04, $20 ; -----X----X----- = ----------XX----XX----------
sprite64:
.byte $00, $00 ; ---------------- = ----------------------------
.byte $00, $00 ; ---------------- = ----------------------------
.byte $00, $00 ; ---------------- = ----------------------------
.byte $0C, $30 ; ----XX----XX---- = ----------XXXXXXXX----------
.byte $83, $C1 ; X-----XXXX-----X = ------XXXX--------XXXX------
.byte $40, $02 ; -X------------X- = ----XX----------------XX----
.byte $20, $04 ; --X----------X-- = --XX--------------------XX--
.byte $10, $08 ; ---X--------X--- = XX------------------------XX
.byte $F1, $8F ; XXXX---XX---XXXX = XXXXXXXX------------XXXXXXXX
.byte $5E, $7A ; -X-XXXX--XXXX-X- = XX--XX--XXXXXXXXXXXX--XX--XX
.byte $AD, $B5 ; X-X-XX-XX-XX-X-X = --XX--XX--XXXXXXXX--XX--XX--
.byte $44, $22 ; -X---X----X---X- = ----XX----XX----XX----XX----
.byte $83, $C1 ; X-----XXXX-----X = ------XXXX--------XXXX------
.byte $0C, $30 ; ----XX----XX---- = ----------XXXXXXXX----------
.byte $00, $00 ; ---------------- = ----------------------------
.byte $00, $00 ; ---------------- = ----------------------------
.byte $00, $00 ; ---------------- = ----------------------------
.byte $00, $00 ; ---------------- = ----------------------------
.byte $00, $00 ; ---------------- = ----------------------------
.byte $0C, $30 ; ----XX----XX---- = ----------XXXXXXXX----------
.byte $83, $C1 ; X-----XXXX-----X = ------XXXX--------XXXX------
.byte $40, $02 ; -X------------X- = ----XX----------------XX----
.byte $20, $04 ; --X----------X-- = --XX--------------------XX--
.byte $10, $08 ; ---X--------X--- = XX------------------------XX
.byte $F1, $8F ; XXXX---XX---XXXX = XXXXXXXX------------XXXXXXXX
.byte $5E, $7A ; -X-XXXX--XXXX-X- = XX--XX--XXXXXXXXXXXX--XX--XX
.byte $AD, $B5 ; X-X-XX-XX-XX-X-X = --XX--XX--XXXXXXXX--XX--XX--
.byte $44, $22 ; -X---X----X---X- = ----XX----XX----XX----XX----
.byte $83, $C1 ; X-----XXXX-----X = ------XXXX--------XXXX------
.byte $0C, $30 ; ----XX----XX---- = ----------XXXXXXXX----------
.byte $00, $00 ; ---------------- = ----------------------------
.byte $00, $00 ; ---------------- = ----------------------------
sprite65:
.byte $02, $40 ; ------X--X------ = --------XX--------XX--------
.byte $02, $40 ; ------X--X------ = --------XX--------XX--------
.byte $44, $22 ; -X---X----X---X- = ----XX----XX----XX----XX----
.byte $9D, $B9 ; X--XXX-XX-XXX--X = XX----XX--XXXXXXXX--XX----XX
.byte $A3, $C5 ; X-X---XXXX---X-X = --XX--XXXX--------XXXX--XX--
.byte $4C, $32 ; -X--XX----XX--X- = ----XX----XXXXXXXX----XX----
.byte $2E, $74 ; --X-XXX--XXX-X-- = --XX----XXXXXXXXXXXX----XX--
.byte $16, $68 ; ---X-XX--XX-X--- = XX------XXXX----XXXX------XX
.byte $16, $68 ; ---X-XX--XX-X--- = XX------XXXX----XXXX------XX
.byte $1E, $78 ; ---XXXX--XXXX--- = XX------XXXXXXXXXXXX------XX
.byte $2C, $34 ; --X-XX----XX-X-- = --XX------XXXXXXXX------XX--
.byte $40, $02 ; -X------------X- = ----XX----------------XX----
.byte $83, $C1 ; X-----XXXX-----X = ------XXXX--------XXXX------
.byte $0C, $30 ; ----XX----XX---- = ----------XXXXXXXX----------
.byte $00, $00 ; ---------------- = ----------------------------
.byte $00, $00 ; ---------------- = ----------------------------
.byte $02, $40 ; ------X--X------ = --------XX--------XX--------
.byte $02, $40 ; ------X--X------ = --------XX--------XX--------
.byte $44, $22 ; -X---X----X---X- = ----XX----XX----XX----XX----
.byte $9D, $B9 ; X--XXX-XX-XXX--X = XX----XX--XXXXXXXX--XX----XX
.byte $A3, $C5 ; X-X---XXXX---X-X = --XX--XXXX--------XXXX--XX--
.byte $4C, $32 ; -X--XX----XX--X- = ----XX----XXXXXXXX----XX----
.byte $2E, $74 ; --X-XXX--XXX-X-- = --XX----XXXXXXXXXXXX----XX--
.byte $16, $68 ; ---X-XX--XX-X--- = XX------XXXX----XXXX------XX
.byte $16, $68 ; ---X-XX--XX-X--- = XX------XXXX----XXXX------XX
.byte $1E, $78 ; ---XXXX--XXXX--- = XX------XXXXXXXXXXXX------XX
.byte $2C, $34 ; --X-XX----XX-X-- = --XX------XXXXXXXX------XX--
.byte $40, $02 ; -X------------X- = ----XX----------------XX----
.byte $83, $C1 ; X-----XXXX-----X = ------XXXX--------XXXX------
.byte $0C, $30 ; ----XX----XX---- = ----------XXXXXXXX----------
.byte $00, $00 ; ---------------- = ----------------------------
.byte $00, $00 ; ---------------- = ----------------------------
sprite66:
.byte $00, $00 ; ---------------- = ----------------------------
.byte $00, $00 ; ---------------- = ----------------------------
.byte $00, $00 ; ---------------- = ----------------------------
.byte $0C, $30 ; ----XX----XX---- = ----------XXXXXXXX----------
.byte $83, $C1 ; X-----XXXX-----X = ------XXXX--------XXXX------
.byte $44, $22 ; -X---X----X---X- = ----XX----XX----XX----XX----
.byte $A5, $A5 ; X-X--X-XX-X--X-X = --XX--XX--XX----XX--XX--XX--
.byte $DF, $FB ; XX-XXXXXXXXXX-XX = XX--XXXXXXXXXXXXXXXXXXXX--XX
.byte $76, $EF ; -XXX-XX-XXX-XXXX = XXXXXX--XXXX----XXXXXXXXXXXX
.byte $1E, $78 ; ---XXXX--XXXX--- = XX------XXXXXXXXXXXX------XX
.byte $2C, $34 ; --X-XX----XX-X-- = --XX------XXXXXXXX------XX--
.byte $40, $02 ; -X------------X- = ----XX----------------XX----
.byte $83, $C1 ; X-----XXXX-----X = ------XXXX--------XXXX------
.byte $0C, $30 ; ----XX----XX---- = ----------XXXXXXXX----------
.byte $00, $00 ; ---------------- = ----------------------------
.byte $00, $00 ; ---------------- = ----------------------------
.byte $00, $00 ; ---------------- = ----------------------------
.byte $00, $00 ; ---------------- = ----------------------------
.byte $00, $00 ; ---------------- = ----------------------------
.byte $0C, $30 ; ----XX----XX---- = ----------XXXXXXXX----------
.byte $83, $C1 ; X-----XXXX-----X = ------XXXX--------XXXX------
.byte $44, $22 ; -X---X----X---X- = ----XX----XX----XX----XX----
.byte $A5, $A5 ; X-X--X-XX-X--X-X = --XX--XX--XX----XX--XX--XX--
.byte $DF, $FB ; XX-XXXXXXXXXX-XX = XX--XXXXXXXXXXXXXXXXXXXX--XX
.byte $76, $EF ; -XXX-XX-XXX-XXXX = XXXXXX--XXXX----XXXXXXXXXXXX
.byte $1E, $78 ; ---XXXX--XXXX--- = XX------XXXXXXXXXXXX------XX
.byte $2C, $34 ; --X-XX----XX-X-- = --XX------XXXXXXXX------XX--
.byte $40, $02 ; -X------------X- = ----XX----------------XX----
.byte $83, $C1 ; X-----XXXX-----X = ------XXXX--------XXXX------
.byte $0C, $30 ; ----XX----XX---- = ----------XXXXXXXX----------
.byte $00, $00 ; ---------------- = ----------------------------
.byte $00, $00 ; ---------------- = ----------------------------
sprite67:
.byte $60, $30 ; -XX-------XX---- = --XXXX--------XXXX----------

View File

@ -23,29 +23,95 @@ rowH:
.endrep
;-----------------------------------------------------------------------------
; multiplication lookup tables
mult1024H:
.byte $00, $04, $08, $0C, $10, $14, $18, $1C, $20
; Jump table for screen tile rendering, per row - unrolled loops
rowDrawL:
.byte <tileDrawP0R0
.byte <tileDrawP0R1
.byte <tileDrawP0R2
.byte <tileDrawP0R3
.byte <tileDrawP0R4
.byte <tileDrawP0R5
.byte <tileDrawP0R6
.byte <tileDrawP0R7
.byte <tileDrawP0R8
.byte <tileDrawP0R9
.byte <tileDrawP0RA
.byte <tileDrawP0RB
.byte <tileDrawP0RC
.byte <tileDrawP0RD
.byte <tileDrawP0RE
.byte <tileDrawP0RF
.byte <tileDrawP1R0 ; Page 1
.byte <tileDrawP1R1
.byte <tileDrawP1R2
.byte <tileDrawP1R3
.byte <tileDrawP1R4
.byte <tileDrawP1R5
.byte <tileDrawP1R6
.byte <tileDrawP1R7
.byte <tileDrawP1R8
.byte <tileDrawP1R9
.byte <tileDrawP1RA
.byte <tileDrawP1RB
.byte <tileDrawP1RC
.byte <tileDrawP1RD
.byte <tileDrawP1RE
.byte <tileDrawP1RF
rowDrawH:
.byte >tileDrawP0R0
.byte >tileDrawP0R1
.byte >tileDrawP0R2
.byte >tileDrawP0R3
.byte >tileDrawP0R4
.byte >tileDrawP0R5
.byte >tileDrawP0R6
.byte >tileDrawP0R7
.byte >tileDrawP0R8
.byte >tileDrawP0R9
.byte >tileDrawP0RA
.byte >tileDrawP0RB
.byte >tileDrawP0RC
.byte >tileDrawP0RD
.byte >tileDrawP0RE
.byte >tileDrawP0RF
.byte >tileDrawP1R0 ; Page 1
.byte >tileDrawP1R1
.byte >tileDrawP1R2
.byte >tileDrawP1R3
.byte >tileDrawP1R4
.byte >tileDrawP1R5
.byte >tileDrawP1R6
.byte >tileDrawP1R7
.byte >tileDrawP1R8
.byte >tileDrawP1R9
.byte >tileDrawP1RA
.byte >tileDrawP1RB
.byte >tileDrawP1RC
.byte >tileDrawP1RD
.byte >tileDrawP1RE
.byte >tileDrawP1RF
;-----------------------------------------------------------------------------
mult64H:
.repeat MAX_SPRITE_IFRAMES, Row
.byte >(Row * 64)
.endrep
.endrep
mult64L:
.repeat MAX_SPRITE_IFRAMES, Row
.byte <(Row * 64)
.endrep
.endrep
mult32H:
.repeat 15, Row
.byte >(Row * 32)
.endrep
.endrep
mult32L:
.repeat 15, Row
.byte <(Row * 32)
.endrep
.endrep
mult16:
.repeat 9, Row
@ -73,13 +139,13 @@ masksRight:
.byte %00101010 ; 01 0-BITS-01..0 Purple
.byte %10101010 ; 02 1-BITS-01..0 Blue
maskGreen:
maskGreen:
.byte %00101010, %01010101 ; Green
maskOrange:
maskOrange:
.byte %10101010, %11010101 ; Orange
maskGreenHi:
maskGreenHi:
.byte %00100000, %01000000 ; Green
maskNewTip:

View File

@ -9,26 +9,26 @@
.segment "RODATA"
roTextLevel:
.byte " Central Cavern "
.byte " The Cold Room "
.byte " The Menagerie "
.byte " Abandoned Uranium Workings "
.byte " Eugene's Lair "
.byte " Processing Plant "
.byte " The Vat "
.byte "Miner Willy meets the Kong Beast"
.byte " Wacky Amoebatrons "
.byte " The Endorian Forest "
.byte "Attack of the Mutant Telephones "
.byte " Return of the Alien Kong Beast "
.byte " Ore Refinery "
.byte " Skylab Landing Bay "
.byte " The Bank "
.byte " The Sixteenth Cavern "
.byte " The Warehouse "
.byte " Amoebatrons' Revenge "
.byte " Solar Power Generator "
.byte " The Final Barrier "
.BYTE " CENTRAL CAVERN "
.BYTE " THE COLD ROOM "
.BYTE " THE MENAGERIE "
.BYTE " ABANDONED URANIUM WORKINGS "
.BYTE " EUGENE+S LAIR "
.BYTE " PROCESSING PLANT "
.BYTE " THE VAT "
.BYTE "MINER WILLY MEETS THE KONG BEAST"
.BYTE " WACKY AMOEBATRONS "
.BYTE " THE ENDORIAN FOREST "
.BYTE "ATTACK OF THE MUTANT TELEPHONES "
.BYTE " RETURN OF THE ALIEN KONG BEAST "
.BYTE " ORE REFINERY "
.BYTE " SKYLAB LANDING BAY "
.BYTE " THE BANK "
.BYTE " THE SIXTEENTH CAVERN "
.BYTE " THE WAREHOUSE "
.BYTE " AMOEBATRONS+ REVENGE "
.BYTE " SOLAR POWER GENERATOR "
.BYTE " THE FINAL BARRIER "
roTextAir:
.byte "AIR "
roTextScore:
@ -43,15 +43,15 @@ roTextPressEnter:
.byte "PRESS ENTER TO START"
roTextEnter := (roTextPressEnter + 6)
roTextAppleIIVersion:
.byte "Apple II version by"
.BYTE " APPLE II V1.1A BY "
roTextStefan:
.byte "Stefan Wessels, 2020"
.BYTE "STEFAN WESSELS, 2020"
roTextIntro:
.byte ". . . . . . . MANIC MINER . . ", $7f, " BUG-BYTE ltd. 1983 . . By "
.byte "Matthew Smith . . . Q, O & W, P = Left & Right . . Space = Jump . . M = Music "
.byte "On/Off . . S = In Game Sound On/Off . . B = Monochrome/Color . . "
.byte "C = Level scroll mode . . ESC = Quit . . . Guide Miner Willy through 20 lethal "
.byte "caverns . . . . . . ", 0
.BYTE ". . . . . . . MANIC MINER . . [ BUG-BYTE LTD. 1983 . . BY "
.BYTE "MATTHEW SMITH . . . Q, O * W, P = LEFT * RIGHT . . SPACE = JUMP . . M = MUSIC "
.BYTE "ON/OFF . . S = IN GAME SOUND ON/OFF . . B = MONOCHROME/COLOR . . "
.BYTE "C = LEVEL SCROLL MODE . . ESC = QUIT . . . GUIDE MINER WILLY THROUGH 20 LETHAL "
.BYTE "CAVERNS . . . . . . ", 0
roTextMono:
.byte " MONO"
roTextColor:

File diff suppressed because it is too large Load Diff

View File

@ -18,31 +18,31 @@
ldy #0
hiCopy:
dec sizeH
dec sizeH
bmi lowCopy
:
lda (srcPtrL), y
sta (dstPtrL), y
dey
dey
bne :-
inc srcPtrH
inc srcPtrH
inc dstPtrH
bne hiCopy
lowCopy:
ldy sizeL
dey
dey
bmi done
:
lda (srcPtrL), y
sta (dstPtrL), y
dey
dey
bpl :-
done:
rts
rts
.endproc
.endproc
;-----------------------------------------------------------------------------
; Look up the color, and apply those masks to the frames
@ -61,8 +61,8 @@ done:
tay ; put color index in y
lda masksLeft, y ; look up the masks for the color
sta colMaskL
lda masksRight, y
sta colMaskL
lda masksRight, y
sta colMaskR
lda mult64L, x ; build a pointer to the frame
@ -70,10 +70,10 @@ done:
lda mult64H, x
adc #>spriteInstances
sta srcPtrH
ldy numFrames ; convert frames to bytes
lda mult64H, y
sta sizeH
lda mult64H, y
sta sizeH
lda mult64L, y
sta sizeL
@ -85,32 +85,32 @@ hiPass:
lda (srcPtrL), y ; do a left hand byte
and colMaskL
sta (srcPtrL), y
dey
dey
lda (srcPtrL), y ; then a right hand byte
and colMaskR
sta (srcPtrL), y
dey
dey
bne :- ; for 256 bytes
inc dstPtrH ; advance the dest ptr Hi
bne hiPass ; BRA
lowPass:
lowPass:
ldy sizeL ; do bytes remaining lt 256
dey
dey
bmi done ; keep going till all done
:
lda (srcPtrL), y
and colMaskL
sta (srcPtrL), y
dey
dey
lda (srcPtrL), y
and colMaskR
sta (srcPtrL), y
dey
dey
bpl :-
done:
rts
rts
.endproc
@ -125,29 +125,29 @@ done:
originalFrame = tmpBot + 4
newFrame = tmpBot + 5
clc
clc
ldx originalFrame ; point srcPtr at the original frame
lda mult64L, x
sta srcPtrL
lda mult64H, x
lda mult64H, x
adc #>spriteInstances
sta srcPtrH
ldx newFrame ; point dstPtr at the target frame
lda mult64L, x
sta dstPtrL
lda mult64H, x
lda mult64H, x
adc #>spriteInstances
sta dstPtrH
lda #0 ; 256 or less bytes (no Hi)
sta sizeH
sta sizeH
lda #64 ; just 64 bytes to copy
sta sizeL
jsr spriteCopyMemSrcToDst ; use copymem to copy a 64 byte frame
rts
rts
.endproc
@ -157,7 +157,7 @@ done:
; x = frame number
.proc spriteInvertFrame
clc
clc
lda mult64L, x ; make srcPtr point at the frame
sta srcPtrL
lda mult64H, x
@ -172,7 +172,7 @@ done:
dey ; one less byte to do
bpl :- ; do for all bytes
rts
rts
.endproc
@ -203,7 +203,7 @@ done:
dey ; previous byte in frame
bpl :- ; do for all, incl. zero'th byte
rts
rts
.endproc
@ -278,8 +278,8 @@ copyFrames:
lda (srcPtrL), y ; get a (left) src byte at the source index
pha ; save so the right nibble can be expanded later
lsr ; make the left nibble the low nibble
lsr
lsr
lsr
lsr
lsr
tax ; put the value in x
lda binDouble, x ; look up the "pixel doubled" value
@ -307,7 +307,7 @@ copyFrames:
bne copyFrames ; do max 256 bytes = 8 * 32 byte src frames
done:
rts
rts
.endproc
@ -320,33 +320,33 @@ done:
ldx numSprites ; numSprites is the door sprite index
lda spriteFramesIdx, x
tax
tax
stx originalFrame
inx
inx
stx newFrame
jsr spriteCopyFrameToFrame ; make a copy y = instanceIdx, a = srcFrame, x = dstFrame
ldx newFrame
ldx newFrame
jsr spriteInvertFrame ; invert the instance frame bits (leave msb alone)
ldx currLevel
lda door_color1, x
lda door_color1, x
beq :+
ldx originalFrame
ldy #1
jsr spriteApplyMaskToFrames
ldx currLevel
lda door_color2, x
lda door_color2, x
beq :+
ldx newFrame
ldy #1
jmp spriteApplyMaskToFrames
:
rts
rts
.endproc
.endproc
;-----------------------------------------------------------------------------
; Make 4 copies of Eugene frame 0 into frames 1-4 and apply a different
@ -369,7 +369,7 @@ done:
stx count
:
jsr spriteCopyFrameToFrame ; make a copy of eugene, x = ori, y = new
lda count ; get the count in a (as a color mask index)
ldx newFrame ; the frame in x
ldy #1 ; and the number of frames to process in Y

View File

@ -31,13 +31,16 @@ read:
lda PLACEHOLDER, x ; get the character in the string
sec
sbc #32 ; the font only starts at space (char 32 or $20)
beq :+
sbc #9 ; gap after space
asl ; mult by 16 as that's how wide a char is in bytes
asl
asl
rol fontH
asl
asl
rol fontH
asl
asl
rol fontH ; srcPtr now points at the char but $0000 based
:
adc #<font ; add the font start
sta fontL
lda fontH
@ -91,29 +94,29 @@ done:
; Macro that takes a lo and hi for the text with optional color and invert wanted
; sets up what's needed to call textShow which does the printing
.macro printXYlh xpos, ypos, textL, textH, len, colorMask, inverse
.local color, strIndex
.local color, strIndex
color = dstPtrL ; textShow expects color masks in dstPtr(L and H)
strIndex = sizeL
.ifblank colorMask
.ifblank colorMask
lda #$ff ; no color (white) is a mask of $ff left and right
sta color
sta color
sta color + 1
.else
.else
ldx colorMask ; this is an index into mask[Left|Right]
lda masksLeft, x
sta color
sta color
lda masksRight, x
sta color + 1
.endif
.ifblank inverse
lda #0 ; eor o is not inverse
.else
.else
lda #$7f ; eor $7f inverts the color (leave MSB)
.endif
.endif
sta textSHowText::eorMask + 1 ; set the eor in the code
@ -129,7 +132,7 @@ done:
ldy ypos
jsr textSHowText ; print that string
.endmacro
.endmacro
;-----------------------------------------------------------------------------
; macro to take text address and split it into lo and hi (shorthand)
@ -146,12 +149,12 @@ done:
lda #0
sta sizeL ; index into string
sta read + 2 ; hi byte of string address
lda currLevel ; start with the level
asl ; multiply by 32
asl
asl
asl
asl
asl
asl
rol read + 2
asl
rol read + 2
@ -177,13 +180,16 @@ read:
lda PLACEHOLDER, x ; get the character in the string
sec
sbc #32 ; the font only starts at space (char 32 or $20)
beq :+ ; gap after space
sbc #9
asl ; mult by 16 as that's how wide a char is in bytes
asl
asl
rol srcPtrH
asl
asl
rol srcPtrH
asl
asl
rol srcPtrH ; srcPtr now points at the char but $0000 based
:
adc #<font ; add the font start
sta srcPtrL
lda srcPtrH
@ -220,14 +226,14 @@ step:
dec sizeH ; done one line
bne lrLoop ; if any lines left, keep going
sec
sec
lda write + 1
sbc #<((64*8)-2)
sta write + 1
lda write + 2
sbc #>((64*8)-2)
sta write + 2
clc
clc
inc sizeL ; move to the next character in the string
dec dstPtrL ; see if 32 characters were done
@ -236,7 +242,7 @@ step:
done:
rts
.endproc
.endproc
;-----------------------------------------------------------------------------
; x has digit (5 means 1's, 4 means 10's, etc)
@ -247,7 +253,7 @@ done:
adc score, x ; get the current digit
cmp #'9'+1 ; has it rolled over
bcc okay ; then simply increment
sec
sec
sbc #10
sta score, x ; and save over the 9
lda #1
@ -255,7 +261,7 @@ done:
bmi over ; if it rolls over 999999
cpx #1 ; if the digit is now the 010000 (1)
bne textAddScore ; no, then work with this digit
ldy lives
ldy lives
cpy #9 ; max out at 9 lives (keeps cheat boot on-screen)
bcs textAddScore
inc lives ; yes, then add a life
@ -269,7 +275,7 @@ over:
done:
rts
.endproc
.endproc
;-----------------------------------------------------------------------------
.proc textCheckHighScore
@ -285,14 +291,14 @@ done:
bcc :- ; x is 5 or less, keep checking digits
done:
rts
rts
newHigh:
ldx #5 ; copy the 6 score digits over the highscore digits
:
lda score, x
sta highScore, x
dex
lda score, x
sta highScore, x
dex
bpl :-
lda #UI_COMPONENT_HIGHSCORE
jmp uiUpdateComponent
@ -327,6 +333,6 @@ prntLoop:
jmp prntLoop ;and print this character
done:
rts
rts
.endproc

View File

@ -30,10 +30,10 @@ mask:
jsr tilesPrepKeysTiles ; make animated keys from the key tile
jmp tilesPrepConveyorTiles ; Make rotated conveyor tiles into conveyorAnimTiles
.endproc
.endproc
;-----------------------------------------------------------------------------
.proc tilesMakeInstances
.proc tilesMakeInstances
numTiles = sizeL
iLevelTile = sizeH
@ -42,7 +42,7 @@ mask:
tileMemH = srcPtrH
lda #TILES_PER_LEVEL ; for all tiles used in a level
sta numTiles
sta numTiles
lda #TILE_BYTES - 1 ; start at the end of tile memory
sta iWrite
@ -59,20 +59,20 @@ loop:
lda levelTiles, x ; and get the id for the tile from the table
asl ; mult tile offset * 16 (width of a tile)
asl
asl
asl
asl
rol tileMemH
asl
asl
rol tileMemH ; offset of tile start (from background) now in tileMem ptr
adc #<tiles ; add tiles base address
sta tileMemL
lda #>tiles
adc tileMemH
lda #>tiles
adc tileMemH
sta tileMemH ; tileMem pointer now points at memory for the tile
ldy #TILE_BYTES - 1 ; 0 based, copy all the bytes of the tile
ldx iWrite
:
lda (tileMemL), y ; get the tile byte
sta tilesInstances, x ; and save it to instance 0
@ -84,19 +84,15 @@ loop:
beq copyDone ; see if all tiles done
lda iWrite ; more tiles to do, adjust the tile write ptr
clc
clc
adc #TILE_BYTES ; by moving it to the end of the next tile
sta iWrite
sta iWrite
inc iLevelTile ; and advance the index into the table to the next tile
bne loop ; BRA to do the next tile
copyDone:
rts
.endproc
.proc tilesColorCollapsing
rts
.endproc
;-----------------------------------------------------------------------------
@ -118,7 +114,7 @@ copyDone:
ldy currLevel ; get the offset of the tiles in the level tile table
lda mult8, y
clc
clc
adc iLevelTile ; and add the parameter offset (0 for color and 3 for mono)
sta iLevelTile
@ -127,7 +123,7 @@ loop:
lda levelMasks, y ; and extract the masks for this tile
tay
lda masksLeft, y
sta colMaskL
sta colMaskL
lda masksRight, y
sta colMaskR
@ -154,7 +150,7 @@ loop:
rts
.endproc
.endproc
;-----------------------------------------------------------------------------
@ -184,7 +180,7 @@ colorLoopLeft:
dex ; and do the next color for that instance
bne colorLoopLeft ; repeat for all 4 color frames
tya ; move Y back 63 bytes, to the next white key byte
sec
sec
sbc #63
tay
@ -198,14 +194,14 @@ colorLoopRight:
and masksRight, x
sta keyAnimTiles, y
tya
tya
adc #TILE_BYTES
tay
dex
dex
bne colorLoopRight
tya
sec
tya
sec
sbc #63
tay ; y is now pointing at the next left byte
cpy #TILE_BYTES ; see if the whole key has been processes
@ -231,25 +227,25 @@ colorLoopRight:
ldx currLevel
lda conveyorDirections, x ; get a local copy of the conveyor direction
sta dir
sta dir
clc ; point srcPtr at the conveyor tile
lda #DATA_CONVEYOR - TILE_BYTES
sta srcPtrL
lda #>tilesInstances
lda #>tilesInstances
sta srcPtrH
lda #<conveyorAnimTiles ; point dstPtr at the first animated tile
sta dstPtrL
lda #>conveyorAnimTiles
lda #>conveyorAnimTiles
sta dstPtrH
ldy #TILE_BYTES - 1 ; copy the tile to the animated tiles
:
lda (srcPtrL), y
lda (srcPtrL), y
and #$7F ; clear the MSB, will be fixed later
sta (dstPtrL), y
dey
dey
bpl :-
ldy #CONVEYOR_FRAMES - 1 ; set a counter for how many frames to process
@ -259,10 +255,10 @@ processTile:
clc ; move srcPtr to dstPtr (the new src)
lda dstPtrL ; and move dstPtr to the next frame to animate
sta srcPtrL
sta srcPtrL
adc #TILE_BYTES
sta dstPtrL
lda dstPtrH
lda dstPtrH
sta srcPtrH
bcc :+
inc dstPtrH
@ -276,7 +272,7 @@ processTile:
lda dir ; different algorithm for each direction
cmp #2
beq left
beq left
right:
ldy #0 ; top row
@ -287,9 +283,9 @@ right:
left:
ldy #0
jsr shiftRight
jsr shiftRight
ldy #4
jsr shiftLeft
jsr shiftLeft
nextFrame:
ldy frame
@ -304,11 +300,11 @@ shiftRight:
asl ; shift 1/2 a pixel, bit 1 and 0 clear
sta (dstPtrL), y ; save left shifted. carry has a pixel bit that needs to move
iny
iny
lda (dstPtrL), y
rol ; shift right byte once, carry goes in, MSB bit out in carry
asl ; shift second time, bit 0 is now a zero, carry bit needs moving left
sta (dstPtrL), y
sta (dstPtrL), y
dey
lda #0 ; start fresh
@ -329,7 +325,7 @@ shiftRight:
ora (dstPtrL), y ; add to bit0 of left byte
sta (dstPtrL), y ; and save
rts
rts
shiftLeft:
ldx #1
@ -339,20 +335,20 @@ shiftLeft:
sta (dstPtrL), y ; save byte
lda #0 ; move bit in for next byte to bit 6
ror
lsr
ror
lsr
sta carry
iny
iny
lda (dstPtrL), y
ror ; move right byte one over (carry needs to go left now)
ora carry ; add bit from left
sta (dstPtrL), y ; save
lda #0 ; start fresh
ror ; move carry to bit 6
lsr
dey
lsr
dey
ora (dstPtrL), y ; add to left byte
dex
dex
bpl :-
sta (dstPtrL), y ; save
@ -367,7 +363,7 @@ finalFix:
lda #$80 ; if set, set color on for all frames
ora conveyorAnimTiles, y
sta conveyorAnimTiles, y
dey
dey
bpl :-
bmi done
@ -375,13 +371,13 @@ clear:
lda #$7f ; if not set, make sure color isn't on for all
and conveyorAnimTiles, y
sta conveyorAnimTiles, y
dey
dey
bpl clear
done:
rts
rts
.endproc
.endproc
;-----------------------------------------------------------------------------
; Copy a pre-animated key tile into the tilesInstances so it looks as
@ -404,13 +400,13 @@ done:
:
lda keyAnimTiles, x ; read the frame and write to key tile
sta tilesInstances + DATA_KEY - TILE_BYTES, y
dex
dey
dex
dey
bpl :-
rts
rts
.endproc
.endproc
;-----------------------------------------------------------------------------
; Copy a pre-animated conveyor lines over the lines in the conveyor frame tile,
@ -428,14 +424,14 @@ done:
lda conveyorAnimTiles, x ; copy the 4 animated bytes for
sta tilesInstances + DATA_CONVEYOR - TILE_BYTES
inx
lda conveyorAnimTiles, x ; instance 0 over
sta tilesInstances + DATA_CONVEYOR - TILE_BYTES + 1
inx ; to the tile area 0
inx
inx
inx
lda conveyorAnimTiles, x
sta tilesInstances + DATA_CONVEYOR - TILE_BYTES + 4
@ -443,6 +439,6 @@ done:
lda conveyorAnimTiles, x
sta tilesInstances + DATA_CONVEYOR - TILE_BYTES + 5
rts
rts
.endproc
.endproc

View File

@ -16,9 +16,9 @@
lda #2
sta updateUICount
rts
rts
.endproc
.endproc
;-----------------------------------------------------------------------------
.proc uiUpdate
@ -66,13 +66,13 @@
lda #0
sta uiComponent
:
rts
.endproc
rts
.endproc
;-----------------------------------------------------------------------------
; 28209 cycle delay from start till after rts
.proc uiDelay
.proc uiDelay
ldy #$80
ySet:
@ -80,12 +80,12 @@ ySet:
:
dex
bne :-
dey
dey
bne :-
rts
.endproc
.endproc
;-----------------------------------------------------------------------------
; This routine shows the MANIC and MINER text on screen.
@ -108,29 +108,29 @@ ySet:
dc = tmpBot + 4
dw = tmpBot + 5
pr = tmpBot + 6
sty row
sty row
stx col
lda #0
sta offset
sta index
sta offset
sta index
strLoop:
ldx index
colorLoc:
lda PLACEHOLDER, x ; unpack the color masks
tay
lda masksLeft, y
tay
lda masksLeft, y
sta colMaskL
lda masksRight, y
lda masksRight, y
sta colMaskR
lda #6 ; the text is 6 rows high
sta height
lda row
sta height
lda row
sta dr ; set the working counter to the row
charLoop:
lda col
lda col
sta dc ; set the working counter to the column
ldx index ; get the index to the character in the string
widthLoc:
@ -151,12 +151,12 @@ colLoop:
sta pr ; save row draw counter
lda dr ; load the screen draw row where drawing should happen
asl ; * 8
asl
asl
asl
tay ; store the row in Y
lda dc ; get the column
and #1 ; and see if the column is odd or even (for color mask)
tax
tax
:
lda dc ; start with the column
adc rowL, y ; and calculate the hi-res row/col address
@ -180,8 +180,8 @@ skipPlot:
dec height ; one less row to do
bpl charLoop ; keep going till the whole character height done
lda width ; move the draw col by the width of the character just drawn
clc
adc col
clc
adc col
sta col
inc index ; and move the string index to the next character
lda index
@ -189,25 +189,25 @@ skipPlot:
bcc strLoop ; if not all 5 characters (MANIC or MINER) done, keep going
rts
.endproc
.endproc
;-----------------------------------------------------------------------------
; Prep uiShowMMText internal variables with data relevant for the
; specific text the macro is called with
.macro uiShowMMTextXY column, row, data, widths, colors
.macro uiShowMMTextXY column, row, data, widths, colors
lda #<data ; MANIC or MINER bit-arrays
sta uiShowMMText::dataLoc + 1
lda #>data
lda #>data
sta uiShowMMText::dataLoc + 2
lda #<widths
lda #<widths
sta uiShowMMText::widthLoc + 1 ; array of letter-widths in MANIC or MINER
lda #>widths
lda #>widths
sta uiShowMMText::widthLoc + 2
lda #<colors ; array of letter colors in the words
sta uiShowMMText::colorLoc + 1
lda #>colors
lda #>colors
sta uiShowMMText::colorLoc + 2
ldx column ; screen location passed in x/y
ldy row
@ -231,7 +231,7 @@ skipPlot:
lda #11*8 ; position willy for the UI
sta willyYPos
lda #0
sta willyFrame
sta willyFrame
lda #18
sta willyXPos
@ -273,7 +273,7 @@ mainLoop:
beq stayInUI ; no key
bpl playGame ; go to game
lda #EVENT_EXIT_GAME ; quit
bne exit
bne exit
playGame:
lda #EVENT_OK
exit:
@ -319,26 +319,26 @@ introScroll: ; show the scrolling message
lda #16 ; 16 rows from his Y
sta sizeL ; track rows in sizeL
:
clc
clc
lda willyXPos ; start with his X
asl ; * 2 for screen coordinates
adc rowL, y ; get the hires coordinates
sta writeZero + 1
lda rowH, y
lda rowH, y
adc currPageH
sta writeZero + 2
lda #0 ; write 4 zero-bytes to each row
ldx #3
writeZero:
sta PLACEHOLDER, x
dex
sta PLACEHOLDER, x
dex
bpl writeZero
iny ; next hi-res row
dec sizeL ; one more row done
bne :-
lda willyFrame ; get the current frame
clc
clc
adc #2 ; advance by 2
and #7 ; and keep in the frame range
sta willyFrame ; update the frame
@ -373,9 +373,9 @@ demoTime:
done:
sta demoMode
rts
rts
.endproc
.endproc
;-----------------------------------------------------------------------------
.proc uiWaitForIntroEnter
@ -399,9 +399,9 @@ done:
cycleLoop:
lda #6 ; print ENTER at x 4
sta xPos
sta xPos
lda #<roTextEnter ; point at ENTER text
sta textL
sta textL
lda #>roTextEnter
sta textH
lda #5
@ -422,4 +422,4 @@ cycleLoop:
ldx #1
jmp screenClear ; all clear page 2
.endproc
.endproc

View File

@ -9,84 +9,84 @@
.segment "ZEROPAGE"
;-----------------------------------------------------------------------------
currPageH: .res 1 ; $02 or $04 - Hi for screen buffer to draw t0
backPage: .res 1 ; 0 or 1 - just used to toggle HISCR or LOSCR
monochrome: .res 1 ; 0 for color, 1 for black and white
leftEdge: .res 1 ; distance the screen has scrolled to the right
currPageH: .res 1 ; $02 or $04 - Hi for screen buffer to draw t0
backPage: .res 1 ; 0 or 1 - just used to toggle HISCR or LOSCR
monochrome: .res 1 ; 0 for color, 1 for black and white
leftEdge: .res 1 ; distance the screen has scrolled to the right
cameraMode: .res 1
tilesRendered: .res 1 ; count the number of tiles shown in a screen. Used to time music delay
tilesRendered: .res 1 ; count the number of tiles shown in a screen. Used to time music delay
willyXPos: .res 1 ; column for willy
willyYPos: .res 1 ; pixel-row for willy
willyYRow: .res 1 ; row (YPos / 8) for willy
willyFrame: .res 1 ; willy animation frame
willyDir: .res 1 ; direction willy is facing
willyJumpCounter: .res 1 ; what phase of a jump willy is in
willyFallFromJump: .res 1 ; 0 or 1. 1 when willy starts jumping. Affects falling death
willyXPos: .res 1 ; column for willy
willyYPos: .res 1 ; pixel-row for willy
willyYRow: .res 1 ; row (YPos / 8) for willy
willyFrame: .res 1 ; willy animation frame
willyDir: .res 1 ; direction willy is facing
willyJumpCounter: .res 1 ; what phase of a jump willy is in
willyFallFromJump: .res 1 ; 0 or 1. 1 when willy starts jumping. Affects falling death
numSprites: .res 1 ; how many sprites (excl. willy) to draw in a level (door is last)
spriteXPos: .res MAX_SPRITES ; col position of the sprite
spriteYPos: .res MAX_SPRITES ; pixel row
spriteDir: .res MAX_SPRITES ; facing direction
spriteMin: .res MAX_SPRITES ; min (turn/hold) point for path
spriteMax: .res MAX_SPRITES ; max point for path
spriteSpeed: .res MAX_SPRITES ; speed (frames/pixels) to move the sprite
spriteTick: .res MAX_SPRITES ; counter how often a sprite animates (spritespeed as init)
spriteFramesIdx: .res MAX_SPRITES ; Index into
spriteFrame: .res MAX_SPRITES ; which frame the sprite is on
spriteClass: .res MAX_SPRITES ; see CLASS_* in defs.inc for masks
spriteColor: .res MAX_SPRITES ; index into masks<Left|Right> in rosystem.inc
numSprites: .res 1 ; how many sprites (excl. willy) to draw in a level (door is last)
spriteXPos: .res MAX_SPRITES ; col position of the sprite
spriteYPos: .res MAX_SPRITES ; pixel row
spriteDir: .res MAX_SPRITES ; facing direction
spriteMin: .res MAX_SPRITES ; min (turn/hold) point for path
spriteMax: .res MAX_SPRITES ; max point for path
spriteSpeed: .res MAX_SPRITES ; speed (frames/pixels) to move the sprite
spriteTick: .res MAX_SPRITES ; counter how often a sprite animates (spritespeed as init)
spriteFramesIdx: .res MAX_SPRITES ; Index into
spriteFrame: .res MAX_SPRITES ; which frame the sprite is on
spriteClass: .res MAX_SPRITES ; see CLASS_* in defs.inc for masks
spriteColor: .res MAX_SPRITES ; index into masks<Left|Right> in rosystem.inc
movementMask: .res 1 ; movement that happened in willyMove. See MASK_* in defs.inc
userKeyMask: .res 1 ; user desire to move based on keys pressed. See MASK_* in defs.inc
conveyorMask: .res 1 ; 0, willy not on conveyor, 2 for left, 1 for right
movementMask: .res 1 ; movement that happened in willyMove. See MASK_* in defs.inc
userKeyMask: .res 1 ; user desire to move based on keys pressed. See MASK_* in defs.inc
conveyorMask: .res 1 ; 0, willy not on conveyor, 2 for left, 1 for right
currLevel: .res 1 ; level that's active
lives: .res 1 ; lives in reserve
airCols: .res 1 ; screen columns that have an air bar in them
airTipGfx: .res 1 ; the bit pattern for the tip of the air bar
airFlow: .res 1 ; the "tick" till a unit of air is decreased
livesFrame: .res 1 ; anim frame for the walking willy's at the bottom
keysFrameNum: .res 1 ; animation frame for keys in the level (color)
conveyorFrameNum: .res 1 ; animation frame for conveyor tile to be active
keysToCollect: .res 1 ; number of keys that remain to be collected
currLevel: .res 1 ; level that's active
lives: .res 1 ; lives in reserve
airCols: .res 1 ; screen columns that have an air bar in them
airTipGfx: .res 1 ; the bit pattern for the tip of the air bar
airFlow: .res 1 ; the "tick" till a unit of air is decreased
livesFrame: .res 1 ; anim frame for the walking willy's at the bottom
keysFrameNum: .res 1 ; animation frame for keys in the level (color)
conveyorFrameNum: .res 1 ; animation frame for conveyor tile to be active
keysToCollect: .res 1 ; number of keys that remain to be collected
eventState: .res 1 ; see EVENT_* in defs.inc for bitmask values
updateUICount: .res 1 ; updateUI is called when non-zero
uiComponent: .res 1 ; See UI_COMPONENT_* in defs.inc for mask values. What UI to update
fullScreenClearCount: .res 1 ; 0 - clear only top, non-zero all. Is counted down by gameAI
eventState: .res 1 ; see EVENT_* in defs.inc for bitmask values
updateUICount: .res 1 ; updateUI is called when non-zero
uiComponent: .res 1 ; See UI_COMPONENT_* in defs.inc for mask values. What UI to update
fullScreenClearCount: .res 1 ; 0 - clear only top, non-zero all. Is counted down by gameAI
musicL: .res 1 ; pointer or index for playing music
musicH: .res 1 ; hi pointer for playing UI music
audioMask: .res 1 ; see AUDIO_* in defs.inc
musicL: .res 1 ; pointer or index for playing music
musicH: .res 1 ; hi pointer for playing UI music
audioMask: .res 1 ; see AUDIO_* in defs.inc
demoMode: .res 1 ; 0 - not a demo, 1 when demo mode active
demoTimer: .res 1 ; in demo mode, scroll when counter is 0
demoDirection: .res 1 ; direction the demo scroll will move the screen
demoMode: .res 1 ; 0 - not a demo, 1 when demo mode active
demoTimer: .res 1 ; in demo mode, scroll when counter is 0
demoDirection: .res 1 ; direction the demo scroll will move the screen
cheatIndex: .res 1 ; count cheat code entry or when active, if 6 is down
cheatActive: .res 1 ; non-zero when the cheat was successfully entered
cheatIndex: .res 1 ; count cheat code entry or when active, if 6 is down
cheatActive: .res 1 ; non-zero when the cheat was successfully entered
;-----------------------------------------------------------------------------
tempBlock: .res 13 ; widely used z-page general memory
srcPtrL := tempBlock + 0 ; often a pointer Lo
srcPtrH := tempBlock + 1 ; often a pointer Hi
dstPtrL := tempBlock + 2 ; often a pointer Lo
dstPtrH := tempBlock + 3 ; often a pointer Hi
sizeL := tempBlock + 4 ; sometimes a size used in ptr operations
sizeH := tempBlock + 5 ; sometimes a size used in ptr operations
tmpBot := tempBlock + 6 ; start of block of 6 zp values used randomly
tempBlock: .res 13 ; widely used z-page general memory
srcPtrL := tempBlock + 0 ; often a pointer Lo
srcPtrH := tempBlock + 1 ; often a pointer Hi
dstPtrL := tempBlock + 2 ; often a pointer Lo
dstPtrH := tempBlock + 3 ; often a pointer Hi
sizeL := tempBlock + 4 ; sometimes a size used in ptr operations
sizeH := tempBlock + 5 ; sometimes a size used in ptr operations
tmpBot := tempBlock + 6 ; start of block of 6 zp values used randomly
;-----------------------------------------------------------------------------
bitMasks: ; constant - used mostly for bit instruction
bit0Mask: .res 1 ; 1
bit1Mask: .res 1 ; 2
bit2Mask: .res 1 ; 4
bit3Mask: .res 1 ; 8
bit4Mask: .res 1 ; 16
bit5Mask: .res 1 ; 32
bit6Mask: .res 1 ; 64
bit7Mask: .res 1 ; 128
bitMasks: ; constant - used mostly for bit instruction
bit0Mask: .res 1 ; 1
bit1Mask: .res 1 ; 2
bit2Mask: .res 1 ; 4
bit3Mask: .res 1 ; 8
bit4Mask: .res 1 ; 16
bit5Mask: .res 1 ; 32
bit6Mask: .res 1 ; 64
bit7Mask: .res 1 ; 128
;-----------------------------------------------------------------------------
.segment "LOWMEM"
@ -112,6 +112,3 @@ highScore:
.byte "000000"
score:
.byte "000000"
;-----------------------------------------------------------------------------
.segment "HIMEM"

View File

@ -20,7 +20,7 @@
willyFrameBackup = tmpBot + 3
willyFloor = tmpBot + 4
lda movementMask
lda movementMask
bit bit2Mask ; MASK_AIR
beq checkHorzKeys ; on ground - check horizontal keys
jmp selectDirection ; in air - check horizontal motion
@ -64,7 +64,7 @@ left:
lda #0 ; when turning, no direction
sta movementMask
lda #1 ; was facing right, so turn around
sta willyDir
sta willyDir
lda willyFrame ; flip the facing frame to left
ora #4
sta willyFrame
@ -97,7 +97,7 @@ right:
sta movementMask ; and clear the movement mask
lda willyFrame
and #3 ; set right facing frame
sta willyFrame
sta willyFrame
jmp vertical
moveRight:
@ -171,16 +171,16 @@ vertMove:
lsr ; / 2
sec
sbc #4 ; -4, so -4, -4, -3, -3, -2, -2, -1, -1, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4
clc
clc
adc willyYPos ; adjust willy height
sta willyYPos
ldx willyJumpCounter ; get the current jump counter for height calculation
lda jumpFreq, x
lda jumpFreq, x
ldy #$08 ; duration for the freq
jsr audioPlayNote::freq ; make a sound of this freq and duration
inc willyJumpCounter
lda willyJumpCounter
cmp #9
bcs willyCollisionFeet ; and move the jump counter along
@ -213,7 +213,7 @@ falling:
lda willyJumpCounter ; get the current jump counter for height calculation
and #$0f
tax
lda fallFreq, x
lda fallFreq, x
ldy #$08 ; duration for the freq
jsr audioPlayNote::freq ; make a sound of this freq and duration
inc willyJumpCounter ; and move the jump counter along
@ -222,7 +222,7 @@ falling:
and #<~(MASK_LEFT | MASK_RIGHT)
sta movementMask
lda willyYPos ; get willy's height
clc
clc
adc #4 ; move him 4 down (fall speed)
sta willyYPos
@ -269,7 +269,7 @@ checkFloor:
and #<~(MASK_LEFT | MASK_RIGHT) ; clear left and right
ora #MASK_AIR ; set the mask that he's now in the air (fall)
sta movementMask
positionScreen: ; this is also called from gameInitStage
lda cameraMode ; see which "camera mode" is active
@ -281,7 +281,7 @@ camera3Zone: ; zone 1: 0-19, 2: 6-25, 3: 12-3
bcs zone2or3 ; ge 10 means zone 2 or 3
lda leftEdge ; zone 1 - see where the edge is
cmp #0 ; if it's at 0 all is well
beq done
beq done
cameraLess:
dec leftEdge ; edge is gt 0, so move it left
bpl moveName ; BRA
@ -304,13 +304,13 @@ moveName: ; if the edge moves the text nee
lda #UI_COMPONENT_NAME ; and mark the name as needing to scroll too
jsr uiUpdateComponent
rts
rts
cameraScroll:
lda willyXPos
sec ; col is in accumulator
sbc #$0a ; see if willy is past column 10
bcs :+
bcs :+
lda #0 ; not, so set the left edge to the left
bne :++ ; BRA
:
@ -319,7 +319,7 @@ cameraScroll:
lda #$0c ; col is 13 or greater, so clamp to 12
:
cmp leftEdge ; see if the edge needs to move
beq :+ ; don't move
beq done ; don't move
sta leftEdge ; set the new left edge
lda #UI_COMPONENT_NAME ; and mark the name as needing to scroll too
jsr uiUpdateComponent
@ -333,9 +333,9 @@ done:
; from willyFloorCollision. on exit, carry set means wall collision
.proc willyWorldCollision
clc
clc
cmp #DATA_BUSH ; bushes kill willy
beq willyDies
beq willyDies
cmp #DATA_ROCK ; rocks kill willy
bne :+
@ -377,7 +377,7 @@ done:
clc ; for unhandled (floor tiles), just clear carry
rts
.endproc
.endproc
;-----------------------------------------------------------------------------
.proc willyFloorCollision
@ -427,16 +427,16 @@ notFromAir:
jsr willyCollapse ; collapse a platform tile, returns with carry clear
bcc landed ; BRA to land code
.endproc
.endproc
;-----------------------------------------------------------------------------
.proc willyHitSwitch1
clc
clc
adc #1 ; DATA_SWITCH1 becomes DATA_SWITCH1_OPEN
sta (srcPtrL), y ; make this switch draw open
lda #0
lda #0
sta levelLayout+11*32+17 ; make a hole in the wall
sta levelLayout+12*32+17
@ -445,14 +445,14 @@ notFromAir:
extend:
sta spriteMax, x ; make the new max active
clc ; must leave with carry clear - not a wall collision
rts
rts
.endproc
;-----------------------------------------------------------------------------
.proc willyHitSwitch2
clc
clc
adc #1 ; DATA_SWITCH2 becomes DATA_SWITCH2_OPEN
sta (srcPtrL), y ; make this switch draw open
@ -462,7 +462,7 @@ extend:
ldx #3 ; kong is at index 3
lda #14*8-5 ; put the fallen-down destination for kong in place
sta spriteMax, x
sta spriteMax, x
lda #2 ; turn kong upside down
sta spriteFrame, x
@ -470,9 +470,9 @@ extend:
lda #0 ; set kong's direction to down
sta spriteDir, x
rts
rts
.endproc
.endproc
;-----------------------------------------------------------------------------
.proc willyCollapse
@ -485,7 +485,7 @@ extend:
clc
:
sta (srcPtrL), y ; make the change in the level
rts
rts
.endproc
@ -515,7 +515,7 @@ putDoor:
done:
ldx tempX ; restore the saved x
clc ; make sure carry is clear
rts
rts
.endproc
@ -524,11 +524,11 @@ putDoor:
lda willyYPos ; get the height
lsr ; divide by 8
lsr
lsr
lsr
sta willyYRow ; save the row willy's in
tax ; put the row in Y
clc
clc
lda mult32L, x ; row * 32
adc willyXPos ; and add the X position (levelLayout is aligned so no need to add lo)
sta srcPtrL ; the low byte of the pos in the level
@ -536,6 +536,6 @@ putDoor:
adc #>levelLayout ; and offset into the level
sta srcPtrH ; and now srcPtr points at willy in the level
rts
rts
.endproc