VOGONS

Common searches


First post, by Yushatak

User metadata
Rank Member
Rank
Member

I wish DOSBox was integrated into Windows like NTVDM, and I've coded things to do it, and found that while it can be done, it causes some bugs that can't be avoided due to (bad) code on Microsoft's end.

Since I can't completely achieve that dream, I'd like to at least make DOSBox look like the NTVDM or command prompt - make it fit in better. How can I change the font file to an 8x12 raster font instead of whatever size it's using now? Is there a way to do this at all, or would I have to go editing the emulated video BIOS someplace (if so I'm not sure I'm up to that, 😜)?

Reply 1 of 11, by mr_bigmouth_502

User metadata
Rank Oldbie
Rank
Oldbie

You would probably have to do some editing to the emulated BIOS. 🤣 I know that the "DOS font" is located in the BIOS on real PCs, so it must be the same for DosBox.

Reply 2 of 11, by Anapan

User metadata
Rank Newbie
Rank
Newbie

I'm not completely sure what you're after, but you can use a TSR or bios font changer to apply many different sized fonts 8/9 wide x 1-32 tall, so it shouldn't bee too difficult to get dosbox showing a font at the size you want.
The best dos font editor is Font Edit II by Ivan Llanas:
http://www.geocities.ws/ivan_llanas/software/index.html
edit: bad link on the creator's site so here's my copy with a couple of extra programs:
http://www3.telus.net/anapan8/feditii.zip

I don't seem to have an 8x12 FNT format font, but I did find an 8x11 one that you can edit to 8x12 fairly easily using FEII (use the Edit -> Number of Lines option and fill in the bottom of the ansi-lineart extended characters):
http://www3.telus.net/anapan8/8X11SNSF.zip
I also have some 8x12 fonts in windows FON format as well as Dwarf Fortress BMP format that you may be able to convert here:
http://www3.telus.net/anapan8/8x12fonts.zip

Last edited by Anapan on 2011-03-02, 04:49. Edited 2 times in total.

norefuge7.png
attitude1.png

Reply 4 of 11, by TeaRex

User metadata
Rank Member
Rank
Member

If you're interested I've got a patch that makes the fonts look like those from a real IBM VGA card (except there's still no 9x14 and 9x16 specific character shapes for vgaonly mode, only the 8x14 and 8x16 shapes). IMHO they do look slightly better, e.g. if you type "MMMMMM" the M's won't stick together any more. But I guess that's not what you want, is it?

tearex

Reply 5 of 11, by Anapan

User metadata
Rank Newbie
Rank
Newbie

I converted the best one of the 8x12 fonts I have (the MSI one) to DOS *.fnt format using dospcxfont and Font Edit II. You can use setfont.com from Font Edit II's directory I linked earlier to activate it, or load it into Font Edit II and save it as a TSR program to make it permanent.
DosPCXFont & 8x12MSI.fnt
8x12msi.gif

norefuge7.png
attitude1.png

Reply 6 of 11, by Yushatak

User metadata
Rank Member
Rank
Member

Changing fonts via setfont or dosfont both stop being in effect upon CLS. I would continue to investigate that, but I also noticed that it did not change the height of the DOSBox window - no screen mode change, number of lines, font height..

In Windows it's 80x25 (rows/cols) by default in a command prompt, and it is as well under DOS, but in DOS and DOSBox it seems to stretch those 25 lines to the virtual screen, rather than adjust the screen to match the font height at 25 lines.

If I attempt to change the DOSBox window resolution from the default "original" (which I presume is 640x480, as selecting that produces no change) to 640x200 (I use ykhwong's build, and it allows on-the-fly changing of resolution), which should be a bit less than half the height, it does not produce a 640-wide screen, and instead seems to adjust to some other smaller resolution, 320x200 it looks like, by eyeing it.

The font you provided, the 8x12MSI, looks very close to what I want when previewed, but unfortunately does not turn out that way when applied.

At this point I believe it to be futile, DOSBox doesn't seem to accept odd low-end resolutions, which would be required for the size of window of a command prompt on Windows NT+.

Thanks for the assistance in investigating this, and for the resources, though.

Reply 7 of 11, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

The Windows command prompt can use several raster and TrueType fonts; the 8x12 raster font is just the default. You can also define the number of rows and columns. In DOSBox, as with real video hardware, the fonts are 8 pixels wide, but can vary in height.

The attached archive contains a TSR program that will set the 8x12 font (copied from bitmap), and it will allow the font to persist through mode changes and CLS. In DOSBox the CLS command sets mode 3, which restores the default font; but in real DOS the CLS command uses the video BIOS ScrollWindow function to clear the screen, which preserves the current font. In any case, when mode 3 is set, including by DOSBox's CLS, the TSR will re-activate the 8x12 font.

There are several copies of the TSR, each setting a different number of text rows. They're all the same program, but with some small differences for adjusting the display size. 25 text rows is the normal screen size that many programs expect, but some programs will adapt to a different number of rows. I've also included the raw font pattern data and the assembler source code.

Attachments

  • Filename
    8X12FONT.ZIP
    File size
    10.31 KiB
    Downloads
    973 downloads
    File license
    Fair use/fair dealing exception

Reply 8 of 11, by Andrew4096

User metadata
Rank Newbie
Rank
Newbie

The problem with TSR replacement fonts is that they go away sometimes and one needs to keep reloading them. By modifying the video BIOS, the font is always there and survives when the screen is cleared with CLS.

I've hacked the BIOS font on a number of video cards over the years, because I don't particularly care for IBM's screen font, emulated by many clone builders. My first PC clone was an ITT XTRA, and it used a thin font that was easy on the eyes. For every card that I modified to look like the ITT XTRA screen font, I had to get the binary image of the font ROM or video BIOS ROM off the video card, usually by removing the chip and reading out its contents in a PROM programmer, then substituting the binary code for my font, programming a replacement EPROM chip and installing it on the card. On later cards with Flash PROM, it was possible to hack a copy of the latest firmware upgrade and load it into the card under program control, without having to physically replace the video BIOS chip.

Maybe something similar can be done with DOSBox. The question is, does DOSBox have the video BIOS integrated with the system BIOS, or is it kept separate, as in a real, physical machine?

Reply 9 of 11, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

The problem with TSR replacement fonts is that they go away sometimes and one needs to keep reloading them.

Depends on the TSR. It's not difficult to design them to react to interrupts, such as mode changes on INT 10h. However, reacting to hardware port I/O is complicated, and AFAIK can only be done with port access exceptions in V86 mode.

By modifying the video BIOS, the font is always there

This is assuming that the font you want to make "permanent" is replacing the 8, 14, or 16 line font in BIOS. A 12 line font, like the one discussed in this thread for example, isn't going to work correctly without also modifying the BIOS code.

The question is, does DOSBox have the video BIOS integrated with the system BIOS, or is it kept separate

Separate. The video BIOS is emulated as a 32K ROM at segment C000h, which is like real systems. DOSBox has the LDGFXROM internal program on the Z: drive that can load and initialize video ROM images; however, it is only available in debug builds unless the source code is modified to make it available in non-debug builds. In case it's not obvious, any loaded video BIOS should be compatible with the selected machine type in DOSBox; and you're pretty much on your own with such tinkerings, so don't expect support if you run into problems.

Reply 10 of 11, by carmageddon

User metadata
Rank Newbie
Rank
Newbie
Anapan wrote:
I'm not completely sure what you're after, but you can use a TSR or bios font changer to apply many different sized fonts 8/9 wi […]
Show full quote

I'm not completely sure what you're after, but you can use a TSR or bios font changer to apply many different sized fonts 8/9 wide x 1-32 tall, so it shouldn't bee too difficult to get dosbox showing a font at the size you want.
The best dos font editor is Font Edit II by Ivan Llanas:
http://www.geocities.ws/ivan_llanas/software/index.html
edit: bad link on the creator's site so here's my copy with a couple of extra programs:
http://www3.telus.net/anapan8/feditii.zip

Hi. Can you or anyone else please post a new link to font edit II ?
Thanks.

Reply 11 of 11, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author
carmageddon wrote:

Can you or anyone else please post a new link to font edit II ?

The Internet Archive is your friend: http://web.archive.org/web/20131001094941/htt … /fontedit2.html