## Re: [stella] Need Help with 13 - character display routine.

 Subject: Re: [stella] Need Help with 13 - character display routine. From: R Mundschau Date: Fri, 5 Dec 2003 21:48:01 -0600

On Friday, December 5, 2003, at 09:09 AM, Thomas Jentzsch wrote:

Okay, here's how it works. The guesses are all close to the mark, but the devil is in the details.

Each character is 3 PF blocks wide. The letters are all packed together with no blank PF columns to separate them from each other. I should note that the color of the letters is the COLUBK value. I use all the objects set to the same color as COLUPF to create a vertical strip 4 pixels wide every 12 pixels. Each strip covers 2 pixels of the letter on its left and right sides producing the necessary separation.

There are 13 characters, so we need 14 strips. M0 is set to 8 pixels wide, it wraps the screen covering the 2 right most pixels and the 6 left hand pixels. The left-most PF block is not used (40 / 3 = 13.3). P0 is set to quad width and set to %01001001. So it produces 3 strips in the middle of the screen. I use that time to set the right side PF registers.
P1 is set to two-copies wide (64 pixels) and is set so that it wraps the screen 64 - 4 [from unused PF spot] = 60 / 12 [column spacing] = 5. So by wrapping P1 it can produce 2 columns. M1 is used the same way. So we have M0=2 + P0=3 + P1=2 + M1=2 = 9 of the 14 columns accounted for. We use the Ball to produce the remaining 5 columns on each scanline.

The first time I tried this routine, I used writes to RESBL to a shadow copy of the register outside of zero-page. The plan was each write would take 4 cycles * 3 color clocks = 12 pixels = the desired width. Then all the RESBL writes could be packed together. It made the routine very clean and it used fewer cycles because I could set P1 to quad and get 3 columns from it. Stella for Mac did not like it at all, however, I just got a black screen. So I rewrote the routine to use the zerpage instances of RESBL. I could have set X to 0 and said STA RESBL,X to get 4 cycles, but I wanted to use X for other purposes. So A staggered the use of the ball through the 14 columns so there is always at least one non-ball column between 2 ball columns.

The current routine uses a single NOP instruction to stay in sync, all of the other cycles are consumed per scanline, but I am doing some funky stuff in the routine that allows it to draw text at all different vertical heights using the same routine. If you used a fixed font height the code could be simplified freeing up some cycles.

In the demo you can see all the columns made up by the ball because in the Rainbow portion of the demo those columns are not maintained by calls to RESBL.

Right now the routine draws from images stored in ROM. I can easily convert it to draw from RAM, and I plan to do so now that the ROM version works. Rendering from RAM will require 30 bytes minimum assuming a vertical resolution of 5, but it could be reduced to 25 if enough cycles are freed up to pack the two PF0 nybbles into a single byte.

```Cheers!
Rob```

Rob Mundschau wrote:
I got distracted by the possibility of a 13 character display routine.

Wow, that one is really cool!

```But how did you do that??? Inverse graphics with double size players
for masking the PF? And then?```

I will be happy to share the source code once I get this beast working. I
want to put together a demo program highlighting the display mode before I
release the source.

Could you explain that code please or post the source code ASAP? Else I can't
wait and *have to* DiStella it myself. ;-)

```Have?fun!
Thomas
_______________________________________________________
Thomas?Jentzsch?????????|?***?Every?bit?is?sacred?!?***
tjentzsch?at?web?dot?de?|```

```______________________________________________________________________________
WEB.DE FreeMail wird 5 Jahre jung! Feiern Sie mit uns und
nutzen Sie die neuen Funktionen http://f.web.de/features/?mc=021130```

```----------------------------------------------------------------------------------------------
Archives (includes files) at http://www.biglist.com/lists/stella/archives/
Unsub & more at http://www.biglist.com/lists/stella/```

```----------------------------------------------------------------------------------------------
Archives (includes files) at http://www.biglist.com/lists/stella/archives/
Unsub & more at http://www.biglist.com/lists/stella/```