PDA

View Full Version : IBM EGA: Unused 8x14 characters



roytam1
December 12th, 2013, 06:17 PM
I tried grabbing fonts from IBM EGA ROM (from here (http://www.minuszerodegrees.net/rom/rom.htm)), and I found that there is some unused characters between 8x14 font and 8x8 font:
http://i.imgur.com/1UFcbBD.png

Trixter
December 13th, 2013, 07:48 AM
You are viewing 8x8 font data in a program expecting 8x14 data. Your understanding of the 8x8 data is incorrect, and what is displayed in the lower window in your screenshot is mangled.

roytam1
December 13th, 2013, 02:36 PM
You are viewing 8x8 font data in a program expecting 8x14 data. Your understanding of the 8x8 data is incorrect, and what is displayed in the lower window in your screenshot is mangled.

The upper is 8x14 without doubt.
The lower window is 8x15 to show those unused character data in number of 19. They are 8x14 with garbage data padding in 1st line, in result 8x15.
Then the real 8x8 font comes, which looks mangled in screenshot since the lower window is showing 8x15 instead of 8x8.

JohnElliott
December 13th, 2013, 03:07 PM
I suspect that the 8x14 font in the ROM is for an 8-pixel-wide character cell, and the bitmaps that follow are alternate forms for text modes with a 9-pixel-wide character cell. The first byte isn't garbage; it's the character number to redefine. Take a look at the code at 0FC0h in the ROM:


║seg002:0FC0 loc_0_FC0: ; CODE XREF: sub_0_E9A+121
║seg002:0FC0 mov bp, 3030h ; Offset of the "8x15" characters
║seg002:0FC3 mov bx, 0E00h ; Define characters with 14 rows
║seg002:0FC6
║seg002:0FC6 loc_0_FC6: ; CODE XREF: sub_0_E9A+140
║seg002:0FC6 push cs
║seg002:0FC7 pop es
║seg002:0FC8 assume es:seg002
║seg002:0FC8 mov dx, es:[bp+0] ; DX = character number to load
║seg002:0FCC or dx, dx
║seg002:0FCE jz loc_0_FDC ; 0 => end of table
║seg002:0FD0 mov cx, 1 ; Count of patterns to store
║seg002:0FD3 inc bp ; ES:BP -> user table
║seg002:0FD4 call sub_0_1EF6 ; Redefine character, cf INT 10h / AX = 1100h
║seg002:0FD7 add bp, 0Eh
║seg002:0FDA jmp short loc_0_FC6

roytam1
December 13th, 2013, 08:08 PM
Thanks!