VOGONS


First post, by emendelson

User metadata
Rank Oldbie
Rank
Oldbie

Is there any documentation of the format for the bitmap font data in int10_memory.cpp? In my project, I'd like to replace the upper-case C-cedilla character with a euro symbol, but I can't figure out how to parse the data so I can edit it. Probably this obvious to any expert. I'll be grateful for any help.

Reply 1 of 10, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

It's very simple, each byte is a bitmap line of a symbol.
For example, this will change the 16-line character:

-  0x00, 0x00, 0x3c, 0x66, 0xc2, 0xc0, 0xc0, 0xc0,
- 0xc2, 0x66, 0x3c, 0x0c, 0x06, 0x7c, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x3c, 0x66, 0x60, 0xfc, 0x60,
+ 0xf8, 0x60, 0x66, 0x3c, 0x00, 0x00, 0x00, 0x00,

Maybe you'll want to change the 8-line and 14-line characters as well.

Reply 2 of 10, by emendelson

User metadata
Rank Oldbie
Rank
Oldbie

Perfect - thank you for that! And, yes, I would want to change the 8-line and 14-line characters. If you know the codes already, I'll be grateful. Otherwise I'll sort it out by trial and error.

Thank you again.

Reply 3 of 10, by lucky7456969

User metadata
Rank Oldbie
Rank
Oldbie

Are there any handly tools that can extract the current fontset in dosbox in this kind of hexadecimal format?
I want to load a bios, extact them and re-enter them into the source code.
Thanks
Jack

Reply 4 of 10, by VileR

User metadata
Rank l33t
Rank
l33t

^
Grab http://ftp.sunet.se/pub/simtelnet/msdos/screen/fntcol16.zip and give DUMPFONT a try. You can convert that to hex with a utility such as Swiss File Knife.

[ WEB ] - [ BLOG ] - [ TUBE ] - [ CODE ]

Reply 6 of 10, by emendelson

User metadata
Rank Oldbie
Rank
Oldbie

There are members who are a lot more expert in this than I am, but, as far as I understand it, the default mode 7 font is identical to the mode 3 font - both use the same bitmap font in the ROM of a VGA card. Both are 8 pixels (pixels, not points) high, in (if I remember correctly) a 16-pixel "cell." You can find some further details here:

http://damieng.com/blog/2011/03/27/typography … ts-system-fonts

Notice the comments about the difference between CGA (the original mode 3) and MDA (the original mode 7).

Also:

http://www.daemon-systems.org/man/vga.4.html

http://ece320web.groups.et.byu.net/labs/VGATe … A_Terminal.html

And other places also. But, again, there are other members of the forum who know far more about this than I do.

Reply 7 of 10, by lucky7456969

User metadata
Rank Oldbie
Rank
Oldbie

I have successfully dump 16 pixel fonts, but I don't know how to dump 8 pixel fonts and 14 pixels fonts
I tried to run vmode, but dosbox has no response in changing to that mode, are there ways I can change
to CGA/EGA mode from the prompt?
Thanks
Jack

Reply 8 of 10, by emendelson

User metadata
Rank Oldbie
Rank
Oldbie

If you're referring to vmode.exe by David Manthey (http://orbitals.com/programs/) then you should simply be able to enter the mode number (as in VMODE 7). I don't know if it has any effect to enter

config -set dosbox machine=cga

at the command prompt. But the only fonts you'll see are the ones that are built into int10_memory.cpp, which will probably tell you what you need to know. I hope someone who knows that he or she is talking about will jump in here, because I'm only stumbling around in the dark and everything I say here may be wrong.

Reply 9 of 10, by lucky7456969

User metadata
Rank Oldbie
Rank
Oldbie

Pixel 8 and 16 are okay now, when changing mode to mode 2 or 3 to dump pixel 14 fonts,
fntcol still dumps 4096 bytes of data, which is believed
to be the pixel 16 font instead.
Thanks
Jack

Reply 10 of 10, by emendelson

User metadata
Rank Oldbie
Rank
Oldbie

Could you spell out in more detail exactly what data you've got and what data you're still trying to get? Perhaps screen shots showing which fonts you have and which you don't would be useful. I'm not sure I can help (I probably can't) but someone else may chime in.