Bucket Mouse
Active member
The script I wrote to enable upper and lowercase text shifting works in version 4.5 with a few alterations. Here's how to make it happen.
First you want to pick a spot on your graphics bank for the extra set of characters, and remember to keep it in the same spot on every screen. A good method is to store them in the Path area, as I've done here. Make a note of what address those characters begin at. For paths it begins at #$80. The default text characters are stored beginning at #$C0.
Next, make two new User Variables: capslock and shift (with no capitalization).
Now open doDrawText.asm and find these two lines of code:
CMP #$FF
BNE notEndOfText
Directly above them (and below LDA Temp), paste this in:
Now scroll to the bottom of doDrawText. You'll see a part that says "updateNormalTextCharacter." Directly below that, paste this:
The final step: add "capsOn" below the next three lines, like this:
You should be good to go. Except for finding a satisfying font.
First you want to pick a spot on your graphics bank for the extra set of characters, and remember to keep it in the same spot on every screen. A good method is to store them in the Path area, as I've done here. Make a note of what address those characters begin at. For paths it begins at #$80. The default text characters are stored beginning at #$C0.
Next, make two new User Variables: capslock and shift (with no capitalization).
Now open doDrawText.asm and find these two lines of code:
CMP #$FF
BNE notEndOfText
Directly above them (and below LDA Temp), paste this in:
Code:
;; THIS IS THE PART WE ADD TO CHECK THE CHARACTERS TO TURN ON CAPS
CMP #_USER_0
BNE notchar1
INC capslock
JMP skipthischaracter
notchar1:
CMP #_USER_1
BNE notchar2
DEC capslock
JMP skipthischaracter
notchar2:
CMP #_USER_2
BNE notchar3
INC shift
skipthischaracter:
LDA textPointer
CLC
ADC #$01
STA textPointer
LDA textPointer+1
ADC #$00
STA textPointer+1
JMP doneWithText
notchar3:
;; END OF ADDED MATERIAL
Now scroll to the bottom of doDrawText. You'll see a part that says "updateNormalTextCharacter." Directly below that, paste this:
Code:
;;;;;;;;;;;; MORE CAPS MATERIAL STARTS HERE
LDX capslock ;; checks for capslock symbol
CPX #$01
BEQ capshappens ;; if it's on, it branches to caps letter bank
LDX shift ;; if there's no capslock symbol, it checks for the shift symbol
CPX #$01
BNE skipCaps ;; if it's not on, it branches to the lowercase letter bank
capshappens:
LDA temp
CLC
ADC #$80
LDX #$00 ;; this line and the one below it resets the caps flag
STX shift
JMP capsOn
skipCaps:
The final step: add "capsOn" below the next three lines, like this:
Code:
LDA temp
CLC
ADC #$C0
capsOn:
You should be good to go. Except for finding a satisfying font.