
INTRODUCTION
The TED chip is the graphics and sound chip of these computers. For a good description
and a memory map of it, read this article:
http://www.canberra.edu.au/~scott/C=Hacking/C-Hacking12/gfx.html
Complete Memory maps of the Plus4/C16:
http://www.funet.fi/pub/cbm/maps/C16.MemoryMap
http://plus4.emucamp.com/tools/rommap/index.php
SLOW/FAST
These computers run at two processor speeds (~1.7MHz) and a slow (~0.9MHz) at the same
time. Well, not at the same time, but it constantly switches between the fast and slow
processor speeds. It's slow whenever the raster beam is on the visible screen, and
fast otherwise. The resulting speed is about 1.1MHz for NTSC and 1.2MHz for PAL. If
you switch off the display, it will run on the fast speed all the time. You can use
this from Basic, just as the FAST and SLOW commands on the C128:
POKE 65286,0 (the screen goes blank) and back: POKE 65286,27
RESTORE KEY?
If you have used a vic20/c64/c128, then you might wonder where the "restore" key is?
But there is none! To perform something like it, hold down run/stop and press the
reset button. This enters the monitor. Type X and hit return to return to basic. The
basic program remains in memory.
I don't know about you, but I find that procedure a little awkward. So why not make
your own restore key instead? When programming Basic, the most common reason to use
the vic20/c64/c128s restore key is to restore the colors, sound and graphics mode to
the default. But this can be done with SYS commands! So let's define a function key:
KEY 1,"{clr home}SYS65418:SYS65409:SYS65412"+CHR$(13)
Then to perform the equivalence to the c64's runstop-restore, first press run/stop to
break the program (if it's running), release and then press F1. How nice! If you like,
you can put LIST in there too, because that is probably the command you most often
like to do after the restore:
KEY 1,"{clr home}SYS65418:SYS65409:SYS65412:LIST"+CHR$(13)
If you like, you can also put this line in the program you are working on so that you
don't need to type it in every time you turn on the computer.
The sys commands used are RESTOR, CINT and IOINIT from the Kernal.
Another little tip (if you don't have made your own restore key) and you just want to
get out of a basic graphics mode without having to type GRAPHIC 0. Then just press any
key followed by return. The basic will then answer with ?SYNTAX ERROR and go to
GRAPHIC 0 by itself to display the error message.
WINDOW COMMAND
The C128 has a WINDOW basic command to set the output window to just a part of the
screen. The C16/Plus4 has the same feature but no specific command for it. You can do
it with Esc codes (Look at page 6 for the whole list) or with pokes. The Esc codes to
use are Esc-T to set top of window, Esc-B to set bottom and Esc-N for the full screen
(and clearing it). Also, pressing the Home key twice returns to full screen without
clearing it. The pokes to use are 2021 (Screen bottom), 2022 (Screen top), 2023
(Screen left) and 2024 (Screen right). Also, the CHAR command restores the window to
the whole screen without clearing it. If you only use the pokes, then you need to
follow up with a PRINT"{home}"; or the output could start outside of the new window.
So for something like the C128's window command, you could use this line (which
probably is the shortest way of doing it):
CHAR, X1,Y1,CHR$(27)+"T":POKE2024,X2:POKE2021,Y2
Where (X1,Y1) is the top position and (X2,Y2) is the bottom position.
2
Comentarios a estos manuales