32 Column Screen query

Basic and Machine Language

Moderator: Moderators

Post Reply
KingTrode
Vic 20 Hobbyist
Posts: 133
Joined: Tue Apr 13, 2010 2:32 am

32 Column Screen query

Post by KingTrode »

Hi All

I did a search on the forums and found that this has been discussed before, but no mention of it being coded up by any member.

IE: a 24 column double height screen giving 192 pixels wide using a 6x8 font to give 32 columns.

If I'm correct one could only have 20x8 pixel rows (chars 0-239) which is a fair trade off I guess.

Questions:

1) Will 24 cols fit on the TV screen (particularly on NTSC)?

2) Has anyone actually done something similar and has code to share, I wouldn't necessarily want to re-invent the wheel.

3) Or maybe someone has even developed a proportional font routine?


KingTrode / Jim
User avatar
Kweepa
Vic 20 Scientist
Posts: 1314
Joined: Fri Jan 04, 2008 5:11 pm
Location: Austin, Texas
Occupation: Game maker

Post by Kweepa »

I wrote a proportional font routine for my adventure game.
http://sleepingelephant.com/ipw-web/bul ... php?t=5569
The source code is here if you're interested. It's for cc65 so you should be able to use it, or get some ideas. The screen resolution is 160x192, if I remember correctly.
http://www.kweepa.com/step/vic20/cometfall_20120110.zip
Last edited by Kweepa on Tue Mar 26, 2013 2:42 am, edited 1 time in total.
KingTrode
Vic 20 Hobbyist
Posts: 133
Joined: Tue Apr 13, 2010 2:32 am

Post by KingTrode »

Kweepa wrote:I wrote a proportional font routine for my adventure game.
http://sleepingelephant.com/ipw-web/bul ... php?t=5569
The source code is here if you're interested. It's for cc65 so you should be able to use it, or get some ideas. The screen resolution is 160x192, if I remember correctly.
http://www.kweepa.com/step/vic20/games/ ... 120110.zip
Hi Kweepa

I'm getting a "404 Not Found" error on the link to the source code file :cry:


KingTrode /Jim
User avatar
Kweepa
Vic 20 Scientist
Posts: 1314
Joined: Fri Jan 04, 2008 5:11 pm
Location: Austin, Texas
Occupation: Game maker

Post by Kweepa »

Apologies. Post edited :)
KingTrode
Vic 20 Hobbyist
Posts: 133
Joined: Tue Apr 13, 2010 2:32 am

Post by KingTrode »

Kweepa wrote:Apologies. Post edited :)
Thanks Kweepa.

I have downloaded it now and shall take a look.


Cheers


KingTrode / Jim
User avatar
Mike
Herr VC
Posts: 4816
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: 32 Column Screen query

Post by Mike »

KingTrode wrote:1) Will 24 cols fit on the TV screen (particularly on NTSC)?
With PAL, not a problem at all, but it's on the edge for NTSC. Like here, where the biggest displayable screen size ended up at 23 columns. :(

Otherwise 192x160 needs exactly the same memory as the 160x192 resolution of MINIGRAFIK. Double-height characters, both 'text' screen and character definitions start at $1000 and the first character used is 'P', pointing to $1100 - preferably column-wise arrangement of the characters, so that the (),Y addressing mode of the 6502 works well on the bitmap. :)

Which encoding are you going to use for the font? ASCII?

For the Acorn Archimedes, I once constructed a proportional font inspired by MS Sans Serif (full ISO 8859-1 with some extensions). It easily does 35 .. 40 characters per line on a 160x192 bitmap, but the glyphs are 15 pixels high, so only 12 lines fit on screen. I already used it in some programs, but did the screens 'off-line'. Maybe I should finally port the font over to the VIC-20? :?:
KingTrode
Vic 20 Hobbyist
Posts: 133
Joined: Tue Apr 13, 2010 2:32 am

Re: 32 Column Screen query

Post by KingTrode »

Mike wrote:
KingTrode wrote:1) Will 24 cols fit on the TV screen (particularly on NTSC)?
With PAL, not a problem at all, but it's on the edge for NTSC. Like here, where the biggest displayable screen size ended up at 23 columns. :(
I had a feeling that this might be the case with NTSC being pretty tight on the number of columns visible.
Mike wrote:Otherwise 192x160 needs exactly the same memory as the 160x192 resolution of MINIGRAFIK. Double-height characters, both 'text' screen and character definitions start at $1000 and the first character used is 'P', pointing to $1100 - preferably column-wise arrangement of the characters, so that the (),Y addressing mode of the 6502 works well on the bitmap. :)
I think this is probably the better option in the grand scheme of things and still gives 29 columns.
Mike wrote:Which encoding are you going to use for the font? ASCII?
Very likely - yes.
Mike wrote:For the Acorn Archimedes, I once constructed a proportional font inspired by MS Sans Serif (full ISO 8859-1 with some extensions). It easily does 35 .. 40 characters per line on a 160x192 bitmap, but the glyphs are 15 pixels high, so only 12 lines fit on screen. I already used it in some programs, but did the screens 'off-line'. Maybe I should finally port the font over to the VIC-20? :?:
It would be great if you could find some time to port it over and share it with us :D, Kweepa was kind enough to share his source but as it's a mix of C with inline assembler I'm really struggling to make sense of it at this point in time :roll:.

The main reason for my interest in this area being I'm planning to do an Adventure/RPG/Rogue game and would really like more flexibility than 22 columns on the text front:

Options Being:
40 columns @ 4x8 font.
29 columns @ 6x8 font.
?? columns @ Proportional font.

I have written my own 40 column routine but it's certainly not the best especially from a performance point of view that's for sure.

I have also coded up a 29 column 6x8 routine today, but it's pretty shabby ATM (though it does work).

And I usually end up asking for help optimizing, so maybe your good self or others who have well refined routines for any of the above might share some documented source code to highlight the error of my ways :oops:


Cheers


KingTrode / Jim
User avatar
Mike
Herr VC
Posts: 4816
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: 32 Column Screen query

Post by Mike »

KingTrode wrote:I have written my own 40 column routine but it's certainly not the best especially from a performance point of view that's for sure.
If you'd like to use the routines of MG BROWSE with your project, go ahead. The source is included.

Besides the text display routines, there are also routines provided for fast scrolling up- and downwards, inverting a line and to read in an ASCII text file, which is then formatted to 40 characters per line.
It would be great if you could find some time to port it over and share it with us :D [...]
I've put it on my to-do-list, but will only be able to start on this in April ... next weekend I'll be busy with Revision. ;)
KingTrode
Vic 20 Hobbyist
Posts: 133
Joined: Tue Apr 13, 2010 2:32 am

Re: 32 Column Screen query

Post by KingTrode »

Mike wrote:If you'd like to use the routines of MG BROWSE with your project, go ahead. The source is included.

Besides the text display routines, there are also routines provided for fast scrolling up- and downwards, inverting a line and to read in an ASCII text file, which is then formatted to 40 characters per line.
Cheers Mike, I shall have a look at the source code.
Mike wrote:It would be great if you could find some time to port it over and share it with us :D [...]
I've put it on my to-do-list, but will only be able to start on this in April ... next weekend I'll be busy with Revision. ;)
Very kind of you to do so, and Revision sounds like good fun, hope you have a great time there.


KingTrode / Jim
Post Reply