Re: [stella] 12 chars/line!?

Subject: Re: [stella] 12 chars/line!?
From: Jim Nitchals <jimn8@xxxxxxxxxx>
Date: Fri, 26 Sep 1997 13:42:19 -0700 (PDT)
> 
> Yes, this will need just one mask operation (2 cycles) vs. 4 ASLs (8
> cycles), or a savings of 6 cycles per byte written, or 180 cycles for a
> 30 byte transfer.  But still, at a minimum, you will be:
> 
>  	reading the first character (min. 4 cycles)
> 	reading the second character (min. 4 cycles)
> 	masking the second character (2 cycles)
> 	combining the characters (3 cycles)
> 	writing the combined character (min. 4 cycles)
> 	adjusting indexes (min. 4 cycles)
> 	looping (3 cycles)

If you use two font tables, you can skip the mask.

I've got the code to render text this way.  It works.  But...

The BIGGER problem is: how do you *really* display it?  Using two players,
three copies mode, there are only 2 2/3 CPU cycles between needs to write
to GRP0 and GRP1 (alternately.)

It's going to be a squeaker.  Best as I can tell, the leftmost bit of the
last byte of graphics will not come through correctly:

Preload GRP0 and GRP1 with the left two bytes of graphic data, and 
load A, X, Y with the next 3.

1/3 cycle before GRP0 starts displaying (have to find a horizontal pos.
that works for that), write A to GRP0.  The write finishes at cycle 2 2/3,
exactly as GRP1 starts displaying.

Write X to GRP1.  The write finishes at cycle 5 2/3, 1/3 cycle past the
start of the next GRP0 display.

Write Y to GRP0.  The write finishes at cycle 8 2/3, 2/3 cycle past the
start of the next GRP1 display.

You're out of CPU time.  A LDA #0, STA GRP1 takes 5 cycles, putting you
at cycle 13 2/3.  You're 1/3 of a cycle late, and the last image is trashed.
The only question is how badly... could be just the leftmost pixel.


--
Archives updated once/day at http://www.biglist.com/lists/stella/archives/
Unsubscribing and other info at http://www.biglist.com/lists/stella/stella.html

Current Thread