Skip to main content
gamedev.net
🔒 Locked

Text mode question

Started by Boops 3 replies 250+ views
Original Post
Boops
Boops
the default text mode in DOS is 640x400 with 80x25 characters, and the characters being 8x16 pixels each, right? 80*8=640 so the 80 characters from left to right fit perfectly in the screen. You know these half foreground half background characters, like this:
 o o o o
o o o o
 o o o o
o o o o
 o o o o
o o o o
 o o o o
o o o o
 
It's exactly 8 pixels wide and 16 pixels high, so two of these next to each other should tile perfectly:
 o o o o o o o o
o o o o o o o o 
 o o o o o o o o
o o o o o o o o 
 o o o o o o o o
o o o o o o o o 
 o o o o o o o o
o o o o o o o o 
 
But in text mode, I see a line between both characters!!
 o o o o  o o o o 
o o o o  o o o o  
 o o o o  o o o o 
o o o o  o o o o  
 o o o o  o o o o 
o o o o  o o o o  
 o o o o  o o o o 
o o o o  o o o o 
 
That ugly line screws up text mode demos in my opinion!!! So they're actually 9x16 pixels! But then the 80 pixels width would require a screen resolution of 720 pixels wide, but the menu of my monitor clearly said it's 640. If you followed, how's this possible? Thanks a lot. [edited by - Boops on October 11, 2003 7:41:27 PM]
Boops
Boops
quote:
Original post by Raduprv
The actual character is 7 pixels wide, all of them have an empty line, so they won't get into eachother.

Height Map Editor | Eternal Lands | Fast User Directory


No, I can clearly count them on the screen! It's 9 pixels wide...


o o o o o o o o
o o o o o o o o
o o o o o o o o
o o o o o o o o
o o o o o o o o
o o o o o o o o
o o o o o o o o
o o o o o o o o
123456789123456789


I can see that the character itself is 8 pixels because both rows of dots clearly have 4 dots, and next to these 8 pixels is very clearly a 9th column! Just check it in a fullscreen textmode window and print character 177!

[edited by - Boops on October 11, 2003 8:02:00 PM]
Boops
Boops
Nobody knows?? :S
Ilici
Ilici
First of all the screen is 640x200 d0h!!

So - 80 chars / line => 1 char - width = 8
25 chars / column => 1 char - height = 8

Chars are stored on screen with 2 bytes:
first = color, background, blink(MSB)
second = the actual character

the other parts are for you to figure out how to fix

EDIT: the menu on your monitor says the actual screen resolution which is set (720x400 for text and old DOS graphics) but the memory layout is the same as in DOS (80x25x2 bytes for 0xB800 and 320x200x1 for 0xA000)

[ My Site ]
'I wish life was not so short,' he thought. 'Languages take such a time, and so do all the things one wants to know about.' - J.R.R Tolkien
/*ilici*/


[edited by - Ilici on October 12, 2003 6:26:23 AM]

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.