Jump to content
IGNORED

Double height font.


Tezz

Recommended Posts

What would be the simplest way to display a mode 2 (gr.0) row of text in my dlist at twice the height (i.e 16 pixels high)? Can it possibly be done via dli manipulation repeating scanlines, or is it only possible to achieve it by drawing the font in mode F (gr.8 )?

 

Thanks,

Tezz.

Edited by Tezz
Link to comment
Share on other sites

Not sure whether I get the point of your question/problem, but here's a try:

 

Antic F is not needed.

You can repeat the same line of font-gfx by doing a second LMS.

Then change font during DLI.

 

example dlist:

dlistaddress := $3f00
$70 $70 $70  % 24 blank scanlines
$c2 $00 $40  % LMS mode 2 at address $4000, DLI enabled.
$42 $00 $40  % LMS mode 2 at address $4000
$41 $00 $3f  % return to top of screen

 

During VBI, just set font at f.e. page $30, and during DLI set font at f.e. page $34. Make sure you do a STA WSYNC then.

Font $30 is top part of all chars, font $34 is bottom part of all chars.

 

...at least, that's what I would do.

Link to comment
Share on other sites

You can't use any tricks to make Mode 2 repeat scanlines adjacently like that example.

 

You could do a redefined Chset which e.g. puts the top half in the lower-case letters and bottom half in the caps... kinda wasteful though.

 

Realistically the best way would be to just have DLI LMS instructions which repeat the memory-scan to duplicate each row, and have "top half" and "bottom half" character sets that get toggled each character row.

 

The VSCROL trick doesn't work because if you set VSCROL = 8, Antic then gets confused and gives blank scanlines due to the logic thinking you're in Mode 3.

Link to comment
Share on other sites

You can't use any tricks to make Mode 2 repeat scanlines adjacently like that example.

 

You could do a redefined Chset which e.g. puts the top half in the lower-case letters and bottom half in the caps... kinda wasteful though.

 

Realistically the best way would be to just have DLI LMS instructions which repeat the memory-scan to duplicate each row, and have "top half" and "bottom half" character sets that get toggled each character row.

 

The VSCROL trick doesn't work because if you set VSCROL = 8, Antic then gets confused and gives blank scanlines due to the logic thinking you're in Mode 3.

Thanks, that's a shame, I thought there might be a solution to it. It was just one row on this occassion that I needed to display at double height, the rest are standard rows in various modes. I guess I'll just have to define a separate double height font using two chars after all.
Link to comment
Share on other sites

Tezz... depends on what you want to do with the double height? if only using for "score" etc? simply go the VIC20 way and define them as chars in a normal charset... ;=) don't waste 2 fonts. or use 2 fonts but only the first chars in both leaving you rest for lookup tables etc... ;)

 

sometimes I forget even the simples solutions... but Jeff's work remind me these issues when porting his 3,5 kb games (3,5 KB! ;))

Link to comment
Share on other sites

Tezz... depends on what you want to do with the double height? if only using for "score" etc? simply go the VIC20 way and define them as chars in a normal charset... ;=) don't waste 2 fonts. or use 2 fonts but only the first chars in both leaving you rest for lookup tables etc... ;)

 

sometimes I forget even the simples solutions... but Jeff's work remind me these issues when porting his 3,5 kb games (3,5 KB! ;))

:) I was just looking at that possibilty whether there are enough free chars in the font, I've counted the chars in text to be displayed double height and defining the two chars for each letter, I'd need 27 chars so it might be possible. It's for a title screen btw, I'm working on enhancing another classic game.
Link to comment
Share on other sites

Here's how I'd do it:

 

You need two character sets, each one representing either the top or lower half of the char set.

 

You need a DLI to switch the character set every 2nd line

 

Here's the complex part: You need an altered display list, like so:

 

(remember SAVMSC = DPEEK(88) start of screen memory)

 

Mode 2 + LMS+DLI (DLI: set 1)

SAVMSC (lo)

SAVMSC (hi)

Mode 2 + LMS + DLI (DLI: set 2)

SAVMSC (lo)

SAVMSC (hi)

Mode 2 + DLI (DLI: set 1)

Mode 2 + LMS + DLI (DLI: set 2)

SAVMSC+40 (lo)

SAVMSC+40 (hi)

Mode 2 + DLI (DLI: set 1)

Mode 2 + LMS + DLI (DLI: set 2)

SAVMSC+80 (lo)

SAVMSC+80 (hi)

 

... etc. Repeating the last 4 instructions until you reach the 24th row. This should give you 40x12 character mode with 8x16 characters. Keeping in mind, only the first two lines of the display need an LMS instruction. Every line of the display after that which displays the bottom half of the char set needs an LMS instruction to point back to the same row in screen memory. Leaving the LMS off of the top half char set display allows the screen to progress onto the next row in screen memory.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...