Skip to content

Commit 938f05c

Browse files
Video debug overlay: Add information on where the display vs CPU memory banks are
1 parent f10dbf0 commit 938f05c

File tree

3 files changed

+29
-0
lines changed

3 files changed

+29
-0
lines changed

CHANGELOG

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
NEXT VERSION
2+
- Video debug overlay: For Tandy and PCjr emulation, add information on
3+
the screen that shows the line mask, display and cpu memory banks and
4+
the corresponding segment values, which may aid in debugging issues
5+
with games and reveal any remapping or page flipping (joncampbell123).
26
- Tandy emulation: Add the string "Tandy" somewhere in the DOS kernel
37
at startup if machine=tandy. The game "The Train: Escape to Normandy"
48
scans from FFFF:0000 for the string "Tandy" which of course wraps

src/gui/render.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1006,6 +1006,9 @@ void RENDER_SetSize(Bitu width,Bitu height,Bitu bpp,float fps,double scrn_ratio)
10061006
width += 8*32;
10071007
width += 4;
10081008
}
1009+
else if (machine == MCH_TANDY || machine == MCH_PCJR) {
1010+
height += 8*3;
1011+
}
10091012
else {
10101013
height += 8*2;
10111014
}

src/hardware/vga_draw.cpp

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5062,6 +5062,28 @@ void VGA_sof_debug_video_info(void) {
50625062
/* would be redundant copy of HWPAL */
50635063
}
50645064

5065+
x = 4;
5066+
y += 8;
5067+
5068+
{
5069+
uint16_t drawseg,memseg;
5070+
5071+
drawseg = vga.tandy.draw_bank * 0x400u;
5072+
memseg = vga.tandy.mem_bank * 0x400u;
5073+
if (machine == MCH_TANDY) {
5074+
drawseg += 0x8000u;
5075+
memseg += 0x8000u;
5076+
}
5077+
5078+
sprintf(tmp,"LM=%X DB=%u(%04X) MB=%u(%04X)",
5079+
(unsigned int)vga.tandy.line_mask,
5080+
(unsigned int)vga.tandy.draw_bank,
5081+
(unsigned int)drawseg,
5082+
(unsigned int)vga.tandy.mem_bank,
5083+
(unsigned int)memseg);
5084+
x = VGA_debug_screen_puts8(x,y,tmp,white) + 8;
5085+
}
5086+
50655087
x += 8;
50665088
}
50675089
}

0 commit comments

Comments
 (0)