Tezz Posted December 25, 2010 Share Posted December 25, 2010 (edited) 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 December 25, 2010 by Tezz Quote Link to comment Share on other sites More sharing options...
emkay Posted December 25, 2010 Share Posted December 25, 2010 ? Two charsets, switched by DLI- Both charsets use the same char. First charset shows upper half, second charset shows lower half ? Quote Link to comment Share on other sites More sharing options...
analmux Posted December 25, 2010 Share Posted December 25, 2010 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. Quote Link to comment Share on other sites More sharing options...
analmux Posted December 25, 2010 Share Posted December 25, 2010 ...and, just thinking of the VSCROLL = $08 trick to copy a line without doing second LMS, but at least in emulator there's some issues. The interrupt, changing font#, is still needed anyway. Quote Link to comment Share on other sites More sharing options...
Tezz Posted December 25, 2010 Author Share Posted December 25, 2010 Thanks for the replies, I'm hoping it's possible to acheive just using the one font only by manipulating the row. ....example picture attached. Quote Link to comment Share on other sites More sharing options...
Rybags Posted December 26, 2010 Share Posted December 26, 2010 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. Quote Link to comment Share on other sites More sharing options...
Tezz Posted December 26, 2010 Author Share Posted December 26, 2010 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. Quote Link to comment Share on other sites More sharing options...
Heaven/TQA Posted December 26, 2010 Share Posted December 26, 2010 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! ) Quote Link to comment Share on other sites More sharing options...
Tezz Posted December 26, 2010 Author Share Posted December 26, 2010 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. Quote Link to comment Share on other sites More sharing options...
Synthpopalooza Posted December 27, 2010 Share Posted December 27, 2010 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.