From 92ca5488b922d12e306c73db361cf623308a6b10 Mon Sep 17 00:00:00 2001 From: ripsaw8080 Date: Tue, 6 Jan 2015 16:51:22 +0000 Subject: [PATCH] The emulated floppy drive does not use DMA, but make it look like it does when booting. Fixes CGA graphics in the Demon's Forge booter. Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3879 --- src/dos/dos_programs.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/dos/dos_programs.cpp b/src/dos/dos_programs.cpp index 8c1e3111..2a9e8fcb 100644 --- a/src/dos/dos_programs.cpp +++ b/src/dos/dos_programs.cpp @@ -36,6 +36,8 @@ #include "bios_disk.h" #include "setup.h" #include "control.h" +#include "inout.h" +#include "dma.h" #if defined(OS2) @@ -590,7 +592,7 @@ public: FILE *usefile_1=NULL; FILE *usefile_2=NULL; Bitu i=0; - Bit32u floppysize; + Bit32u floppysize=0; Bit32u rombytesize_1=0; Bit32u rombytesize_2=0; Bit8u drive = 'A'; @@ -825,6 +827,9 @@ public: WriteOut(MSG_Get("PROGRAM_BOOT_BOOT"), drive); for(i=0;i<512;i++) real_writeb(0, 0x7c00 + i, bootarea.rawdata[i]); + /* create appearance of floppy drive DMA usage (Demon's Forge) */ + if (!IS_TANDY_ARCH && floppysize!=0) GetDMAChannel(2)->tcount=true; + /* revector some dos-allocated interrupts */ real_writed(0,0x01*4,0xf000ff53); real_writed(0,0x03*4,0xf000ff53);