[Coco] Proposed change on coVDG (level1)
Luis Antoniosi (CoCoDemus)
retrocanada76 at gmail.com
Thu Jan 29 22:06:04 EST 2015
hey,
One thing that drives me crazy on level1 is the velocity, or lack of, to
output on screen.
I've checked the CoVDG Write and I found a bit awkward code.
If you examine it you will see it priorizes the wrong stuff, first comes
graphic blocks, then several characters
replacements and at the very end of the compare chains you get the text.
I propose this one instead, very short and text oriented. it seems to work
good. the commented code is the old one. I do a direct
mapping of the characters except by '`' that becomes reverse apostrophe
(good for spotting the differnce).
Other good change is that this mapping is automatically applied:
| = up arrow
^ = reverse up arrow
{ = reverse [
| = reverse \
} = reverse ]
~ = reverse left arrow
_ = left arrow
What do you think ? Any reason for that old code ?
Write
* new code
cmpa #$1F
bls Dispatch
ldb <V.CFlag,u
cmpa #$40 numbers ?
bcc L0001
adda #$40
bra L00D0
L0001 cmpa #$60 lowercase ?
beq L0003 '`'
ble L00D0 uppercase
L0002 tsta
bmi L00D0 graphic blocks
suba #$60
bra L00D0 lowercase
L0003 lda #$27
bra L00D0
* old code
* tsta
* bmi L00D0
* cmpa #$1F byte $1F?
* bls Dispatch branch if lower or same
* ldb <V.CFlag,u
* beq L00B0
* cmpa #$5E '^' ?
* bne L00A0
* lda #$00
* bra L00D0
*L00A0 cmpa #$5F '_' ?
* bne L00A8
* lda #$1F
* bra L00D0
*L00A8 cmpa #$60 '`' ?
* bne L00C0
* lda #$67
* bra L00D0
*L00B0 cmpa #$7C '|' ?
* bne L00B8
* lda #$21
* bra L00D0
*L00B8 cmpa #$7E '~' ?
* bne L00C0
* lda #$2D
* bra L00D0
*L00C0 cmpa #$60 lowercase ?
* bcs L00C8
* suba #$60
* bra L00D0
*L00C8 cmpa #$40 uppercase ?
* bcs L00CE
* suba #$40
*L00CE eora #$40
L00D0 ldx <V.CrsrA,u get cursor address in X
sta ,x+ store character at address
stx <V.CrsrA,u update cursor address
cmpx <V.ScrnE,u end of screen?
bcs L00DF branch if not
bsr SScrl else if at end of screen, scroll it
L00DF bsr ShowCrsr ends with a CLRB/RTS anyhow
More information about the Coco
mailing list