[Coco] Proposed change on coVDG (level1)

Tormod Volden lists.tormod at gmail.com
Fri Jan 30 12:27:24 EST 2015


Well, if you are making other fixes in addition to the pure
refactoring you talked about, it should be in a separate commit and
the patch should be better documented... Would make it easier to
review, as we just saw.

A good illustration of my points in the patch guide I posted the other
day, thank you for that :)

Tormod


On 1/30/15, Luis Antoniosi (CoCoDemus) <retrocanada76 at gmail.com> wrote:
> But that is intended :). $60 is acute accent.
>
> The old code replaced $60 to $67 (apostrophe). I think it should be $27
> (reverse apostrophe) to make the distinction between apostrophe and acute
> accent symbol. What do you think ? How do you know you typed apostrophe or
> acute accent if they look the same ???
>
> Luis Felipe Antoniosi
>
>
>
> On Fri, Jan 30, 2015 at 10:50 AM, Robert Gault <robert.gault at att.net> wrote:
>
>> Louis,
>>
>> There may be an algorithm that would fit your code but as is, it doesn't
>> work. For example your code converts $60 to $27 (old code $67).
>>
>> Any chance of a typo in your new code?
>>
>> Robert
>>
>>
>> Luis Antoniosi (CoCoDemus) wrote:
>>
>>> 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
>>>
>>>
>>
>> --
>> Coco mailing list
>> Coco at maltedmedia.com
>> https://pairlist5.pair.net/mailman/listinfo/coco
>>
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> https://pairlist5.pair.net/mailman/listinfo/coco
>


-- 
To mail me directly, please include the word "private" in the subject.


More information about the Coco mailing list