From e3ac78ae7ba30101e388236f6312a04c79a94c35 Mon Sep 17 00:00:00 2001 From: Jonathan Campbell Date: Thu, 21 Apr 2016 07:02:09 -0700 Subject: [PATCH] modex draw char use rom font height, do not assume 8. --- src/lib/modex16/16render.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/modex16/16render.c b/src/lib/modex16/16render.c index 902d450f..77598fa5 100755 --- a/src/lib/modex16/16render.c +++ b/src/lib/modex16/16render.c @@ -443,6 +443,7 @@ void modexDrawChar(page_t *page, int x/*for planar selection only*/, word t, wor * so, we enumerate over columns (not rows!) to draw every 4th pixel. bit masks are used because of the font bitmap. * * NTS: addr defines what VGA memory address we use, "x" is redundant except to specify which of the 4 pixels we select in the map mask register. */ + word rows = romFonts[t].charSize; word drawaddr; word colm, row; byte fontbyte; @@ -455,7 +456,7 @@ void modexDrawChar(page_t *page, int x/*for planar selection only*/, word t, wor for (colm=0;colm < 4;colm++) { drawaddr = addr; modexSelectPlane(PLANE(plane)); - for (row=0;row < 8;row++) { + for (row=0;row < rows;row++) { fontbyte = romFontsData.l[row]; vga_state.vga_graphics_ram[drawaddr ] = (fontbyte & m1) ? col : bgcol; vga_state.vga_graphics_ram[drawaddr+1] = (fontbyte & m2) ? col : bgcol; -- 2.39.5