Re: RS-232 on VIC-20

From: Christian Johansson (c64_at_comhem.se)
Date: 2004-06-30 22:03:04

----- Original Message ----- 
From: "Marko Mäkelä" <marko.makela@hut.fi>
To: <cbm-hackers@cling.gu.se>
Sent: Monday, June 21, 2004 8:12 PM
Subject: Re: RS-232 on VIC-20


> On Mon, Jun 21, 2004 at 07:51:54PM +0200, Christian Johansson wrote:
> > > Well, actually, the biggest problem is badlines - and they're 40 us
> > > long even in 2 MHz mode. In 80 column mode with the VIC screen closed
> > > it's possible to use 9600 bps though.
> >
> > I'm not very familiar with badlines. Does that problem exist even if I
blank
> > the screen in 40-column mode?
>
> No.  In 2 MHz mode, there are no badlines, but the system will run at 1
MHz
> during memory refresh (5 slow cycles on every rasterline), making the
total
> number of cycles per raster line equal 63*2-5 on PAL systems and 65*2-5 on
> NTSC.  Maybe MagerValp was thinking the TED, which doesn't show garbage on
> the screen, but slows down the processor to 1 MHz during graphics DMA.
The
> TED also has two badlines for every line of text.
>

[CJ] Does this only apply if the 40-column screen is used in 2 MHz mode,
i.e. the system runs at 2 MHz all the time if using 80-column mode in 2 MHz
mode?

> > What I want to know is if the Hug routine I posted in my
> > previous email could perhaps be used to get at least 4800 bps by making
some
> > small modifications to it.
>
> You may need to take the DRAM refresh cycles into consideration.  The bit
time
> for 4800 bps is 17734472/18/4800 = 205 slow cycles on the PAL C128 and
> 14318181/14/4800 = 213 slow cycles on the NTSC C128.  Okay, maybe you can
> ignore the DRAM refresh even at 9600 bps.

[CJ] Forgive me my ignorance but does this mean that the system clock
frequency on a PAL machine is derived from an oscillator running at 17734472
Hz that is divided by 18 by a clock divider (I guess this is described
somewhere in the C64 Programmer's Reference Guide but I can't find it right
now)?

[CJ] I think that your calculations may not be correct for the Hug routine.
These are the values used by that routine and they are different from what I
get with your calculations:

;       Start bit times.
;
strt24  .word   459     ; 2400
strt12  .word   1090    ; 1200
strt03  .word   4915    ;  300
;
;       Full bit times.
;
full24  .word   421     ; 2400
full12  .word   845     ; 1200
full03  .word   3410    ;  300


>
> Marko
>
>        Message was sent through the cbm-hackers mailing list



       Message was sent through the cbm-hackers mailing list

Archive generated by hypermail pre-2.1.8.