Skip to content

Commit

Permalink
VGA TMODESET: Also capture BIOS data area per video mode in video mod…
Browse files Browse the repository at this point in the history
…e dump
  • Loading branch information
joncampbell123 committed Sep 25, 2019
1 parent 409bfd9 commit af5011b
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions hw/vga/tmodeset.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down

0 comments on commit af5011b

Please sign in to comment.