From af5011b2be589d0d88a9cefd9eba95cc1aaf08c3 Mon Sep 17 00:00:00 2001 From: Jonathan Campbell Date: Wed, 25 Sep 2019 00:04:49 -0700 Subject: [PATCH] VGA TMODESET: Also capture BIOS data area per video mode in video mode dump --- hw/vga/tmodeset.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/hw/vga/tmodeset.c b/hw/vga/tmodeset.c index f377fbb1d..e8a5c627b 100644 --- a/hw/vga/tmodeset.c +++ b/hw/vga/tmodeset.c @@ -370,6 +370,22 @@ void dump_to_file(int automated) { pop ax } } + + /* ============= BIOS data area ============ */ +#if TARGET_MSDOS == 32 + for (i=0;i < 256;i++) rdump[i] = *((uint8_t*)(0x400+i)); +#else + for (i=0;i < 256;i++) rdump[i] = *((uint8_t far*)MK_FP(0x40,i)); +#endif + + /* ----- write */ + sprintf(tmpname,"%s.BDA",nname); + if ((fp=fopen(tmpname,"wb")) != NULL) { + fwrite(rdump,256,1,fp); + fclose(fp); + } + + /* resume */ vga_moveto(0,6); vga_sync_bios_cursor();