Megalextoria
Retro computing and gaming, sci-fi books, tv and movies and other geeky stuff.

Home » Archive » net.micro.cbm » 80 col C64 use with vi
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
80 col C64 use with vi [message #86010] Mon, 17 June 2013 17:35
Anonymous
Karma:
Originally posted by: rph1283@ritcv.UUCP (Robert P. Herloski)
Message-ID: <1480@ritcv.UUCP>
Date: Wed, 16-Jan-85 14:22:20 EST
Article-I.D.: ritcv.1480
Posted: Wed Jan 16 14:22:20 1985
Date-Received: Thu, 17-Jan-85 14:04:29 EST
References: <233@qumix.UUCP> <1479@ritcv.UUCP>
Distribution: net
Organization: Rochester Institute of Technology, Rochester, NY
Lines: 99

I have recently completed a project of attempting to use Screen-80 at
1200 baud with vi.  Since there have been several questions regarding
appropriate 64 termcaps and use of the 64 with vi, some of these ob-
servations may be useful to others on the net.

******************************************************************************

Screen-80 was published in the Sept. issue of Compute's Gazette, and
implements an 80 col display (marginally readable with a 1701/2) on the
64 by "painting" a hi-res screen.  It is compatible with the CHROUT
routine, and features a character set that can be customized (!!)

Vi notes:
---------
   1. The termcap I use is:

z8|c64|commodore 64:li#24:co#40:am:\
   :bs:cl=^l:ho=^f:\
   :nd=^]:up=^^:do=^k:kb=^h:\
   :kd=^k:kl=^\:kr=^]:ku=^^:


z8|c6480|commodore 64 with 80 column:li#24:co#80:am:\
   :bs:cl=^l:ho=^f:\
   :nd=^]:up=^^:do=^k:kb=^h:\
   :kd=^k:kl=^\:kr=^]:ku=^^:

    Note that I specify only 24 lines.  This'll be explained later.

   2. Pet to ascii conversion (and vice versa) is done using 2 256 byte
      lookup tables.  With this, the above termcap cursor movement def-
      initions can be changed to suit any personal taste.

   3. The 64 carriage return (CR) is really a cr + lf.  My routine, when
      it sees a CR coming in, sends to the 64 a cr + up-cursor.  When it
      sees a LF, it sends to the 64 an down-cursor.  Note that vi uses
      CR and LF quite heavily to do cursor motion, and that interpreting
      a CR as a cr + lf, and ignoring the (expected) LF is incorrect.
      Because I do not want the 64 screen to scroll unless desired, I only
      specify 24 lines, so that when (in the vi invocation) vi prints
      the "filename"...#lines#chars message, the cr afterwards will go to
      the 25th line, from which I can upcursor to the 24th, without
      scrolling.

   4. The program also traps out ^G (bell) and beeps the SID chip when
      needed.  This is especially needed in vi.


Screen-80 notes:
----------------

   1. The easiest way to get a blinking cursor is to use a sprite (4x8 dots)
      that moves as the characters are sent via CHROUT to screen-80 [e.g.,
      if a char, move sprite 4 dots to the right; if CR, move sprite to the
      left edge of the visible screen and down 8 dots; if down cursor, move
      sprite 8 dots down (unless its at the bottom, then the screen will
      scroll up), etc.]  Just check the jiffy clock every so often and blink
      appropriately.

   2. Typical NMI character reception on the "RS-232" port is done via:
         a) look for starting edge
         b) when found, delay 1/2 bit time to center of start bit
         c) delay successive bit times to get the data bits
         d) etc.
      Note that b) and c) are implemented via NMI timer countdown interrupts.
      Locations $0295-$0296 contain the timer value for b) [(1/2 bit time) *
      1.0227 - 100], where 100 is the NORMAL NMI overhead.  Locations $0299-
      $029A contain the timer value for c) [bit time * 1.0227 cycles/micro-
      second].  These locations can be changed AFTER the RS232 channel is
      opened.

      Screen-80 adds some additional NMI overhead, hence the 100 (cycles)
      that is subtracted isn't correct.  At 1200 baud, this results in some
      timing induced reception errors.  Below are the nominal and experi-
      mentally determined optimal values:

                        $0295-$0296               $0299-$029A
                        ------------             -------------
           nominal        70,1                       84,3
           preferred      200,0                      50,3*
   
        * not too sensitive

   3. I also use Custom-80 to redefine some 64 characters to the "unavailable"
      Ascii characters such as " \, |, `, {, }, ^ ".  This can't be done with
      some of the 80 col cards, because their character generators are in ROM.

   4. The only thing left to do is to move the NMI routines to RAM and change
      them to add an XON/XOFF protocol to prevent the NMI buffer from over-
      flowing (which seems to happen sometimes with this program).

*******************************************************************************

I hope that this information has been useful enough to post to the net.  Any
comments are surely welcome.

*******************************************************************************

          Robert P. Herloski              ..rochester!ritcv!rph1283
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: XMODEM
Next Topic: Re: 64 PRG Update YAUU (Yet Another Update update)
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Mar 29 03:17:22 EDT 2024

Total time taken to generate the page: 0.04591 seconds