Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
There is a low-resolution color mode of size 160x100 pixels (lines are doubled), 16 colors.

That's one of the two available tricks to make text mode look like a low-res graphics mode. The other, easier to understand trick is the 80x50 mode that the Nibbles game (example code distributed with QBasic) used. The 160x100 mode is more difficult to achieve. The 160 part is easy to understand: it's 80 doubled, using IBM Extended ASCII block-shaped characters to split the text character cell vertically, in pretty much exactly the same way as Nibbles splits them horizontally. Getting 100 characters high instead of 25 is the hard part; apparently there's a little-known byte you can tweak someplace to change the character cell height. This is of little use normally, since with a height less than about 7 you could never read the text, so it's seldom mentioned or discussed, but there you go. (Of course, you already knew there was enough video RAM on a CGI card to hold 200 lines' worth of characters for text mode; this capability was usually used for quickly switching between several available screens, e.g., for help screens, "boss" screens, and the like.)

But if you use a "real" graphics mode (e.g., the 320x200 "medium resolution" mode), you only get four colors max, and three of them cannot be chosen independently; there are three available hardwired palettes. The fourth color is the "background" color and can be any of the 16 colors.


In reply to Re: When I count, I think of numbers as... by jonadab
in thread When I count, I think of numbers as... by ambrus

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (5)
As of 2024-03-28 19:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found