final restyling of the custom charset
This commit is contained in:
parent
fcdea3cc08
commit
90cc0dbabd
2
Makefile
2
Makefile
@ -6,7 +6,7 @@ RES=res.bin/amour.sid res.bin/levels.bin
|
||||
.PHONY: debug env clean
|
||||
|
||||
bin/snake.prg: env $(ASM) $(RES)
|
||||
dasm src/main.asm -Isrc/ -DSYSTEM=64 -DDEBUG=0 -obin/snake.prg
|
||||
dasm src/main.asm -Isrc/ -DSYSTEM=64 -DDEBUG=0 -sbuild/symbols.txt -obin/snake.prg
|
||||
|
||||
clean:
|
||||
rm -rf {build,bin,res.bin}
|
||||
|
@ -5,26 +5,6 @@ multicolor SUBROUTINE
|
||||
; Prepare data struct for MultiColor mode
|
||||
; ----------------------------------------------------------------------
|
||||
multicolorInit:
|
||||
; Make font higher half the inverse of lower one
|
||||
; TODO: merge these edits with actual font binary
|
||||
ldx #$00
|
||||
.tggsCopy
|
||||
dex
|
||||
lda tggsFont,x
|
||||
eor #$ff
|
||||
sta $2400,x
|
||||
lda tggsFont + $100,x
|
||||
eor #$ff
|
||||
sta $2500,x
|
||||
lda tggsFont + $200,x
|
||||
eor #$ff
|
||||
sta $2600,x
|
||||
lda tggsFont + $300,x
|
||||
eor #$ff
|
||||
sta $2700,x
|
||||
cpx #$0
|
||||
bne .tggsCopy
|
||||
|
||||
; Tell VIC-II to use:
|
||||
; - screen text memory at $400 = $400 * 1
|
||||
; - characters ROM at $2000 = $400 * 8
|
||||
|
@ -3,7 +3,7 @@
|
||||
; Do some math to calculate tile address in video memory
|
||||
; using x,y coordinates
|
||||
; Formula: addr = $400 + y * SCREEN_W + x
|
||||
calcTileMem:
|
||||
calcTileMem SUBROUTINE
|
||||
; Save registers
|
||||
pha
|
||||
txa
|
||||
@ -50,7 +50,7 @@ calcTileEnd: ; now multiplication is ended, so add X
|
||||
; Print a byte in hexadecimal
|
||||
; A input register for byte to print
|
||||
; Y input register for printing colum (on first line)
|
||||
printByte:
|
||||
printByte SUBROUTINE
|
||||
; Copy parameter also in X
|
||||
tax
|
||||
|
||||
@ -70,7 +70,7 @@ printByte:
|
||||
|
||||
; Print null-terminated string on status bar
|
||||
; address of string is given in input using memory location printStatusString
|
||||
printStatus:
|
||||
printStatus SUBROUTINE
|
||||
ldy #0
|
||||
printStatusLoop:
|
||||
lda (printStatusString),y
|
||||
@ -87,37 +87,55 @@ printStatusSkipSpace:
|
||||
printStatusEnd:
|
||||
rts
|
||||
|
||||
printIntro SUBROUTINE
|
||||
; Print string for intro
|
||||
; Input parameters:
|
||||
; printIntroString pointer to string to be printed (source)
|
||||
; introScreenStart pointer to text video memory on screen where to print (dest)
|
||||
printIntro:
|
||||
ldy #0
|
||||
printIntroLoop:
|
||||
.loop:
|
||||
lda (printIntroString),y ; get char from string
|
||||
beq printIntroEnd ; if zero, then end (string must be null-terminated)
|
||||
beq .end ; if zero, then end (string must be null-terminated)
|
||||
cmp #$20 ; is space?
|
||||
bne printIntroCheckPunct
|
||||
bne .checkP1
|
||||
lda #$0
|
||||
jmp printIntroEndCheck
|
||||
printIntroCheckPunct:
|
||||
cmp #$40 ; is char greater or equal to #$40 = #64 = `@' ?
|
||||
bcc printIntroEndCheck ; if not, it is less, thus it must be
|
||||
; a full stop, comma, colon or something
|
||||
; that actually has the same value in both
|
||||
; true ASCII and in PET screen codes
|
||||
; otherwise, it is greater than `@`, so must
|
||||
; subtract 64 because CBM and its encodings
|
||||
; are simply a big shit
|
||||
; TODO -- actually must be fixed with new charset
|
||||
jmp .print
|
||||
.checkP1:
|
||||
cmp #$28 ; is char '(' ?
|
||||
bne .checkP2
|
||||
lda #$1b
|
||||
jmp .print
|
||||
.checkP2:
|
||||
cmp #$29 ; is char ')' ?
|
||||
bne .checkP3
|
||||
lda #$1c
|
||||
jmp .print
|
||||
.checkP3
|
||||
cmp #$2e ; is char '.' ?
|
||||
bne .checkNumber
|
||||
lda #$1d
|
||||
jmp .print
|
||||
.checkNumber: ; is char a number?
|
||||
cmp #$2f
|
||||
bcc .nextCheck
|
||||
cmp #$3a
|
||||
bcs .nextCheck
|
||||
sec
|
||||
sbc #$30
|
||||
clc
|
||||
adc #$40
|
||||
jmp .print
|
||||
.nextCheck:
|
||||
|
||||
.isLetter:
|
||||
; defaults to an uppercase letter of ASCII set
|
||||
sec
|
||||
sbc #$40
|
||||
|
||||
printIntroEndCheck:
|
||||
.print:
|
||||
sta (introScreenStart),y ; put screen code to screen
|
||||
iny ; next char in string
|
||||
jmp printIntroLoop
|
||||
printIntroEnd:
|
||||
jmp .loop
|
||||
.end:
|
||||
rts
|
||||
|
||||
; Increment a pointer in the zeropage
|
||||
|
126
src/tggs.asm
126
src/tggs.asm
@ -269,57 +269,54 @@
|
||||
BYTE #%00000000
|
||||
|
||||
; char 0x1b, 27
|
||||
BYTE #%00111100
|
||||
BYTE #%01000010
|
||||
BYTE #%10011001
|
||||
BYTE #%10100001
|
||||
BYTE #%10100001
|
||||
BYTE #%10011001
|
||||
BYTE #%01000010
|
||||
BYTE #%00111100
|
||||
BYTE #%00011100
|
||||
BYTE #%00110000
|
||||
BYTE #%00100000
|
||||
BYTE #%01100000
|
||||
BYTE #%00100000
|
||||
BYTE #%00110000
|
||||
BYTE #%00011100
|
||||
BYTE #%00000000
|
||||
|
||||
; char 0x1c, 28
|
||||
BYTE #%00000101
|
||||
BYTE #%00101001
|
||||
BYTE #%00101011
|
||||
BYTE #%10101111
|
||||
BYTE #%01111111
|
||||
BYTE #%01011010
|
||||
BYTE #%01101010
|
||||
BYTE #%10111010
|
||||
BYTE #%00111000
|
||||
BYTE #%00001100
|
||||
BYTE #%00000100
|
||||
BYTE #%00000110
|
||||
BYTE #%00000100
|
||||
BYTE #%00001100
|
||||
BYTE #%00111000
|
||||
BYTE #%00000000
|
||||
|
||||
; char 0x1d, 29
|
||||
BYTE #%00000101
|
||||
BYTE #%01011010
|
||||
BYTE #%10101010
|
||||
BYTE #%10101111
|
||||
BYTE #%11101101
|
||||
BYTE #%11110101
|
||||
BYTE #%10110110
|
||||
BYTE #%10111010
|
||||
BYTE #%00000000
|
||||
BYTE #%00000000
|
||||
BYTE #%00000000
|
||||
BYTE #%00000000
|
||||
BYTE #%00000000
|
||||
BYTE #%00111000
|
||||
BYTE #%00111000
|
||||
BYTE #%00000000
|
||||
|
||||
; char 0x1e, 30
|
||||
BYTE #%00000000
|
||||
BYTE #%11010000
|
||||
BYTE #%01011000
|
||||
BYTE #%11101011
|
||||
BYTE #%11111110
|
||||
BYTE #%10101111
|
||||
BYTE #%10101011
|
||||
BYTE #%10111111
|
||||
BYTE #%11111111
|
||||
BYTE #%10000001
|
||||
BYTE #%10000001
|
||||
BYTE #%10000001
|
||||
BYTE #%10000001
|
||||
BYTE #%10000001
|
||||
BYTE #%10000001
|
||||
BYTE #%11111111
|
||||
|
||||
; char 0x1f, 31
|
||||
BYTE #%11111110
|
||||
BYTE #%01101111
|
||||
BYTE #%01101011
|
||||
BYTE #%01011010
|
||||
BYTE #%11101111
|
||||
BYTE #%00101010
|
||||
BYTE #%00011010
|
||||
BYTE #%00000101
|
||||
|
||||
|
||||
|
||||
BYTE #%11111111
|
||||
BYTE #%10000001
|
||||
BYTE #%10000001
|
||||
BYTE #%10000001
|
||||
BYTE #%10000001
|
||||
BYTE #%10000001
|
||||
BYTE #%10000001
|
||||
BYTE #%11111111
|
||||
|
||||
; char 0x20, 32
|
||||
BYTE #%11111111
|
||||
@ -592,33 +589,34 @@
|
||||
BYTE #%11111111
|
||||
|
||||
; char 0x3b, 59
|
||||
BYTE #%11111111
|
||||
BYTE #%10000001
|
||||
BYTE #%10000001
|
||||
BYTE #%10000001
|
||||
BYTE #%10000001
|
||||
BYTE #%10000001
|
||||
BYTE #%10000001
|
||||
; char 0x1b, 27
|
||||
BYTE #%11100011
|
||||
BYTE #%11001111
|
||||
BYTE #%11011111
|
||||
BYTE #%10011111
|
||||
BYTE #%11011111
|
||||
BYTE #%11001111
|
||||
BYTE #%11100011
|
||||
BYTE #%11111111
|
||||
|
||||
; char 0x3c, 60
|
||||
BYTE #%11111111
|
||||
BYTE #%10000001
|
||||
BYTE #%10000001
|
||||
BYTE #%10000001
|
||||
BYTE #%10000001
|
||||
BYTE #%10000001
|
||||
BYTE #%10000001
|
||||
BYTE #%11000111
|
||||
BYTE #%11110011
|
||||
BYTE #%11111011
|
||||
BYTE #%11111001
|
||||
BYTE #%11111011
|
||||
BYTE #%11110011
|
||||
BYTE #%11000111
|
||||
BYTE #%11111111
|
||||
|
||||
; char 0x3d, 61
|
||||
BYTE #%11111111
|
||||
BYTE #%10000001
|
||||
BYTE #%10000001
|
||||
BYTE #%10000001
|
||||
BYTE #%10000001
|
||||
BYTE #%10000001
|
||||
BYTE #%10000001
|
||||
BYTE #%11111111
|
||||
BYTE #%11111111
|
||||
BYTE #%11111111
|
||||
BYTE #%11111111
|
||||
BYTE #%11000111
|
||||
BYTE #%11000111
|
||||
BYTE #%11111111
|
||||
|
||||
; char 0x3e, 62
|
||||
@ -641,8 +639,6 @@
|
||||
BYTE #%10000001
|
||||
BYTE #%11111111
|
||||
|
||||
|
||||
|
||||
; char 0x40, 64
|
||||
BYTE #%00111000
|
||||
BYTE #%01101100
|
||||
|
Loading…
Reference in New Issue
Block a user