Compare commits

...

3 Commits

Author SHA1 Message Date
blondie7575 c77f1d4c84 Cooler dirt colour 2023-08-06 17:01:02 -07:00
blondie7575 a8caca07ec Much nicer 16x16 font
Also help screen improvements
2023-08-06 16:58:32 -07:00
blondie7575 06527a3f61 Added help screen 2023-08-06 15:55:42 -07:00
14 changed files with 13923 additions and 17415 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Binary file not shown.

View File

@ -1,6 +1,7 @@
#!/usr/bin/python3
import sys
import math
import PIL
from PIL import Image
from numpy import asarray
@ -160,7 +161,8 @@ def main(argv):
def scaleForFontWidth(charWidth):
output = ""
for i in range(0,(int)(charWidth/4)):
shiftCount = math.log(charWidth/2,2)
for i in range(0,(int)(shiftCount)):
output = output + "\tasl\n"
return output

View File

@ -68,7 +68,7 @@ fonts:
rm -f $(FONTBANK)
./CompileFont.py 4 5 48 0 "tinyNum" "Art/Assets/TinyNumbers.gif" > fonts.s
./CompileFont.py 8 8 32 0 "font8" "Art/Assets/Font8x8.gif" >> fonts.s
# ./CompileFont.py 16 16 32 14 "font16" "Art/Assets/Font16x16.gif" > font16x16.s
./CompileFont.py 16 16 32 0 "font16" "Art/Assets/Font16x16.gif" >> fonts.s
@PATH=$(PATH):/usr/local/bin; $(CL65) -t apple2enh -C linkerConfig --cpu 65816 --start-addr 0000 -lfontEngine.lst fontEngine.s -o $(FONTBANK)
rm -f fontEngine.o

2
dirt.s
View File

@ -273,7 +273,7 @@ updateDirtParticleContinue:
updateDirtParticleStillAlive:
; Draw new position
lda #$11
lda #$33
sta SHADOWVRAMBANK,x
; Let everyone know we did work

11844
font16x16.s

File diff suppressed because it is too large Load Diff

5542
font8x8.s

File diff suppressed because it is too large Load Diff

View File

@ -29,6 +29,7 @@ renderStringReturn:
fontJumpTable:
.addr renderString_tinyNum
.addr renderString_font8
.addr renderString_font16
.include "fonts.s"

13751
fonts.s

File diff suppressed because it is too large Load Diff

View File

@ -229,17 +229,14 @@ vblInterruptHandler:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; setBorderAtScanLine
;
; X = Scan Line Number
;
; Trashes A
;
setBorderAtScanLine:
dex ; Scanline interrupts technically fire on the previous line
BITS8A
lda $e19d00,x ; Enable interrupt on requested scanline
lda $e19d92 ; Enable interrupt on scanline 146
ora #%01000000
sta $e19d00,x
sta $e19d92
lda $e19dc7 ; Enable interrupt on scanline 199
ora #%01000000
@ -264,14 +261,17 @@ scanLineInterruptHandler:
and #%11011111
sta $e0c032
lda scanLineColorChangePhaseCounter
beq scanLineInterruptHandler0
lda $e0C02f
asl ; VA is now in the Carry flag
lda $e0C02e
rol ; Roll Carry into bit 0. A now contains line number
cmp #155
bcc scanLineInterruptHandler0
lda BORDERCOLOR ; Set border color
and #$f0
ora #$7 ; Set to sky at bottom of screen
sta BORDERCOLOR
dec scanLineColorChangePhaseCounter
bra scanLineInterruptHandlerDone
scanLineInterruptHandler0:
@ -279,15 +279,11 @@ scanLineInterruptHandler0:
and #$f0
ora #$4
sta BORDERCOLOR
inc scanLineColorChangePhaseCounter
scanLineInterruptHandlerDone:
clc
rtl
scanLineColorChangePhaseCounter:
.byte 0
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; setScanlinePalette
; Set the palette for a given scan line

17
input.s
View File

@ -239,3 +239,20 @@ kbdScanTab_store:
breakpoint:
.word 0
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; kbdWaitForAnyKey
;
; Waits for any keypress
;
; Trashes A
;
kbdWaitForAnyKey:
BITS8
kbdWaitForAnyKeyLoop:
lda KBD
bpl kbdWaitForAnyKeyLoop
sta KBDSTROBE
BITS16
rts

View File

@ -244,24 +244,23 @@ mainContinue2:
EMULATION
; Load rest of font data into bank 0 (needed if font size exceeds BUFFERSIZE)
; jsr PRODOS
; .byte $ca
; .addr fileRead
; bne ioErrorJmp
jsr PRODOS
.byte $ca
.addr fileRead
bne ioErrorJmp
; Close the file
jsr PRODOS
.byte $cc
.addr fileClose
; NATIVE
NATIVE
; Copy rest of font data into bank 5 (needed if font size exceeds BUFFERSIZE)
; ldx fileReadLen
; txa
; lda #5
; ldy #BUFFERSIZE
; jsr copyBytes
ldx fileReadLen
lda #5
ldy #BUFFERSIZE
jsr copyBytes
bra mainContinue3
@ -270,7 +269,7 @@ ioErrorJmp:
mainContinue3:
; EMULATION
EMULATION
; Open the title screen file
jsr PRODOS

View File

@ -51,7 +51,6 @@ titleScreenCopyLoop:
; Render menu text
jsr titleScreenRenderMenu
ldx #147
jsr setBorderAtScanLine
; Fade in
@ -178,6 +177,8 @@ titleScreenKeyboardMenuDown:
titleScreenKeyboardMenuGo:
lda menuSelection
beq titleScreenBeginGame
cmp #1
beq titleScreenHelp
cmp #2
beq titleScreenQuit
@ -187,8 +188,7 @@ titleScreenMainLoopEndFrame:
titleScreenBeginGame:
; Transition to gameplay
jsr unsetVBLInterruptVector
jsr unsetScanLineInterruptVector
jsr titleScreenRemoveBorderEffect
stz menuActionRequested
lda #skyPalette
sta PARAML2
@ -196,8 +196,25 @@ titleScreenBeginGame:
jmp beginGameplay
titleScreenQuit:
jsr titleScreenRemoveBorderEffect
jmp quitGame
titleScreenHelp:
jsr titleScreenRemoveBorderEffect
stz menuActionRequested
; Fade out
lda #skyPalette
sta PARAML2
jsr paletteFade
jmp titleScreenRenderHelp
titleScreenRemoveBorderEffect:
jsr unsetVBLInterruptVector
jsr unsetScanLineInterruptVector
rts
titleAnimationCounter:
.word 0
titleAnimationPos0:
@ -307,3 +324,114 @@ titleScreenUnRenderSelection:
lda #1
jsl renderStringFar
rts
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; titleScreenRenderHelp
;
; Render the help menu
;
titleScreenRenderHelp:
SAVE_AXY
; Clear screen
ldx #0
ldy #200
jsr colorFill
; Draw help text
lda #helpText0
sta PARAML0
ldy #$2c8a
lda #1
jsl renderStringFar
lda #helpText1
sta PARAML0
ldy #$32ca
lda #1
jsl renderStringFar
lda #helpText2
sta PARAML0
ldy #$390a
lda #1
jsl renderStringFar
lda #helpText3
sta PARAML0
ldy #$4bed
lda #2
jsl renderStringFar
lda #helpText4
sta PARAML0
ldy #$572d
lda #2
jsl renderStringFar
lda #helpText5
sta PARAML0
ldy #$6265
lda #2
jsl renderStringFar
lda #helpText6
sta PARAML0
ldy #$6dad
lda #2
jsl renderStringFar
lda #helpText7
sta PARAML0
ldy #$78ed
lda #2
jsl renderStringFar
lda #helpText8
sta PARAML0
ldy #$8435
lda #2
jsl renderStringFar
lda #helpText9
sta PARAML0
ldy #$90b7
lda #1
jsl renderStringFar
; Fade in
lda #titlePalette
sta PARAML2
jsr paletteFade
jsr kbdWaitForAnyKey
; Fade out
lda #skyPalette
sta PARAML2
jsr paletteFade
RESTORE_AXY
jmp titleScreen
helpText0:
pstring "SPROCKET AND TINKER DO NOT GET ALONG!"
helpText1:
pstring "YOUR GOAL IS TO ANGER THE OTHER CAT"
helpText2:
pstring "SO MUCH THAT SHE PEES AND RUNS OFF."
helpText3:
pstring "_^ AIM"
helpText4:
pstring "\] POWER"
helpText5:
pstring "`ab FIRE"
helpText6:
pstring "ef WEAPON"
helpText7:
pstring "cd SCROLL"
helpText8:
pstring "g QUIT"
helpText9:
pstring "PRESS ANY KEY"