Skip to content

Commit

Permalink
Merge pull request #414 from ogamespec/main
Browse files Browse the repository at this point in the history
DMCRDY fix
  • Loading branch information
ogamespec authored May 21, 2023
2 parents 037030c + 4a669bf commit 32a138f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
5 changes: 4 additions & 1 deletion Breaknes/Breaknes/FormMain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ public partial class FormMain : Form
public FormMain()
{
InitializeComponent();
AllocConsole();
}

private void aboutToolStripMenuItem_Click(object sender, EventArgs e)
Expand All @@ -38,6 +37,10 @@ private void FormMain_Load(object sender, EventArgs e)
{
original_title = Text;
var settings = FormSettings.LoadSettings();
if (settings.AllocConsole)
{
AllocConsole();
}
board.onUpdateWaves += OnUpdateWaves;
board.CreateBoard(BoardDescriptionLoader.Load(), settings.MainBoard);
backgroundWorker1.RunWorkerAsync();
Expand Down
6 changes: 6 additions & 0 deletions Breaknes/Breaknes/FormSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ static BreaknesSettings SetDefaultSettings()
settings.DumpAudioDir = "";
settings.DumpVideo = false;
settings.DumpVideoDir = "";
settings.AllocConsole = false;

SaveSettings(settings);

Expand Down Expand Up @@ -116,6 +117,11 @@ public class BreaknesSettings
[DefaultValue("")]
[EditorAttribute(typeof(System.Windows.Forms.Design.FolderNameEditor), typeof(System.Drawing.Design.UITypeEditor))]
public string DumpVideoDir { get; set; }

[Category("Debug")]
[Description("Turn on the debug console. Requires a restart.")]
[DefaultValue(false)]
public bool AllocConsole { get; set; }
}

// https://stackoverflow.com/questions/24503462/how-to-show-drop-down-control-in-property-grid
Expand Down
2 changes: 1 addition & 1 deletion BreaksAPU/APUSim/dpcm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ namespace APUSim

apu->wire.RUNDMC = run_latch2.nget();
apu->wire.n_DMC_AB = rdy_ff.get();
apu->wire.DMCRDY = NOR(start_ff.get(), rdy_ff.get());
apu->wire.DMCRDY = NOR(start_ff.get(), rdy_ff.nget());
}

void DpcmChan::sim_SampleCounterControl()
Expand Down

0 comments on commit 32a138f

Please sign in to comment.