Display of TI$ in border (unex. or +3K)

Basic and Machine Language

Moderator: Moderators

User avatar
pitcalco
just pitcalco
Posts: 1272
Joined: Wed Dec 28, 2005 4:13 pm
Location: Berlin

Post by pitcalco »

WOW! Mike, aren't you just full of surprises!

I will certainly give some of what you say a try. I say "some" because I am an old timer who does not use VICE. I still use the old VIC 20 and type everything in directly. I just print off program listings from the forum and then retype the whole thing into the VIC 20.

I let you know how it goes.
There are only three kinds of people in the world: those who can count and those who can't.

Paul Lambert
Berlin
Federal Republic of Germany
carlsson
Class of '6502
Posts: 5516
Joined: Wed Mar 10, 2004 1:41 am

Post by carlsson »

Cool trick, but what's wrong with good old DOS style tokenizers like petcat, tok64, bastok and all their names? Even Schlowski's BasEdit (IIRC) would be useful in this case.
Anders Carlsson

Image Image Image Image Image
User avatar
Mike
Herr VC
Posts: 4816
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Post by Mike »

There's little wrong with them, my 4-liner is just another alternative.

But it comes in handy, when you try to enter a program that relies on a BASIC extension, which isn't covered by one of the programs given above. An off-line tokenizer which isn't aware of the new keywords will leave them as is. I'm using the tokenizer built into BASIC (and the BASIC extension), and that's guaranteed to work.

Michael

BTW I already published this utility as 5-liner in the thread 'Hires-Graphics', for similar reasons, some time ago. But I suppose it got largely unnoticed. I should add this to 'ROM-Calls and other tricks'. Edit: done
User avatar
tokra
Vic 20 Scientist
Posts: 1120
Joined: Tue Apr 27, 2010 5:32 pm
Location: Scheessel, Germany

Re: Display of TI$ in border (unex. or +3K)

Post by tokra »

Time to rejuvenate a very old thread. From a discussion in Forum64.de about clocks I downloaded this digital border clock by Mike:
Mike wrote:
I get TI$, but not in the border. It shows up in the bottom line followed by some gobbeldygook. Any ideas?
The gobbeldygook is in fact the beginning the character ROM, showing the definitions of '@' and 'A', as textual characters. The colours are essentially random, as the kernel didn't initialise these positions.
The colours are not random of course. Colour-RAM just wraps around. So a few little POKEs make this border clock behave nicely:

Code: Select all

fori=0to15:poke37888+i,peek(36879)/16:next
User avatar
Mike
Herr VC
Posts: 4816
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: Display of TI$ in border (unex. or +3K)

Post by Mike »

:lol:

At some time I actually read out the uninitialized values in the colour RAM from exactly those positions 37888..37903 on real hardware (my VIC-20 before the VFLI mod) to reproduce the original screenshot in VICE ...!

Just checked: the original (not rescaled to the correct pixel aspect ratio) *.png file of that screenshot dates from February 11th, 2004. :shock: IIRC, that was done with WinVICE around version 1.09 .. 1.11 and I had to POKE those 16 values to addresses 38912..38927 (which wouldn't work on a real VIC-20) to persuade VICE to print the characters in the intended colours: at that time VICE didn't take that wrap-around into account.

BTW, the clock itself dates back to something around 1995, when I took my VIC-20 out of the closet for the first time after 1986. I knew about that "extra" line already in the earlier time, and the 6 free characters really begged me to put TI$ into them. I just didn't know how to convert the TI jiffy clock by myself - even thorough peeks into the ROM listing of "VC-20 intern" didn't help me - and from the hindsight, the ROM routine wasn't re-entrant, anyway. Then, in 1995, I just wrote it. Didn't (and couldn't) store it, but I was happy it could be done after all. And then I rewrote it, once again, in 2002 - and this time I preserved it as text file of the DATA loader. :)

I always found those coloured characters in the rest of the extra line quite funny, and something that could quite as well been left as is. And years later they even helped to find out what happens in rasterline 0. ;)

Cheers,

Michael
Post Reply