Skip to content
Permalink
Browse files

PIC unmask IRQ option for GUS

  • Loading branch information...
joncampbell123 committed Jul 9, 2018
1 parent 4b81178 commit 34b397d499fba777ff589cf6e7aa630c78639338
Showing with 7 additions and 0 deletions.
  1. +3 −0 src/dosbox.cpp
  2. +4 −0 src/hardware/gus.cpp
@@ -2019,6 +2019,9 @@ void DOSBOX_SetupConfigSections(void) {
Pbool->Set_help("Start the DOS virtual machine with the DMA channel already unmasked at the controller.\n"
"Use this for DOS applications that expect to operate the GUS but forget to unmask the DMA channel.");

Pbool = secprop->Add_bool("pic unmask irq",Property::Changeable::WhenIdle,false);
Pbool->Set_help("Start the DOS virtual machine with the GUS IRQ already unmasked at the PIC.");

Pbool = secprop->Add_bool("startup initialized",Property::Changeable::WhenIdle,false);
Pbool->Set_help("If set, start the GF1 in a fully initialized state (as if ULTRINIT had been run).\n"
"If clear, leave the card in an uninitialized state (as if cold boot).\n"
@@ -67,6 +67,7 @@ static Bit8u const irqtable[8] = { 0/*invalid*/, 2, 5, 3, 7, 11, 12, 15 };
static Bit8u const dmatable[8] = { 0/*NO DMA*/, 1, 3, 5, 6, 7, 0/*invalid*/, 0/*invalid*/ };
static Bit8u GUSRam[1024*1024 + 16/*safety margin*/]; // 1024K of GUS Ram
static Bit32s AutoAmp = 512;
static bool unmask_irq = false;
static bool enable_autoamp = false;
static bool startup_ultrinit = false;
static Bit16u vol16bit[4096];
@@ -1981,6 +1982,7 @@ class GUS:public Module_base{
memset(&myGUS,0,sizeof(myGUS));
memset(GUSRam,0,1024*1024);

unmask_irq = section->Get_bool("pic unmask irq");
enable_autoamp = section->Get_bool("autoamp");

startup_ultrinit = section->Get_bool("startup initialized");
@@ -2145,6 +2147,8 @@ class GUS:public Module_base{

if (myGUS.initUnmaskDMA)
GetDMAChannel(myGUS.dma1)->SetMask(false);
if (unmask_irq)
PIC_SetIRQMask(myGUS.irq1,false);

gus_chan->Enable(true);

0 comments on commit 34b397d

Please sign in to comment.
You can’t perform that action at this time.