Skip to content

Commit

Permalink
fixed IO pads during reset
Browse files Browse the repository at this point in the history
  • Loading branch information
ogamespec committed Sep 1, 2023
1 parent 85b172f commit fe6c87e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Breaknes/BreaksCore/NESBoard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ namespace Breaknes
TriState ppu_outputs[(size_t)PPUSim::OutputPad::Max]{};

ppu_inputs[(size_t)PPUSim::InputPad::CLK] = CLK;
ppu_inputs[(size_t)PPUSim::InputPad::n_RES] = pendingReset_PPU ? TriState::Zero : TriState::One;; // NES Board specific ⚠️
ppu_inputs[(size_t)PPUSim::InputPad::n_RES] = pendingReset_PPU ? TriState::Zero : TriState::One; // NES Board specific ⚠️
ppu_inputs[(size_t)PPUSim::InputPad::RnW] = CPU_RnW;
ppu_inputs[(size_t)PPUSim::InputPad::RS0] = FromByte((addr_bus >> 0) & 1);
ppu_inputs[(size_t)PPUSim::InputPad::RS1] = FromByte((addr_bus >> 1) & 1);
Expand Down
8 changes: 8 additions & 0 deletions BreaksAPU/APUSim/pads.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,11 +128,19 @@ namespace APUSim
{
from_pad = NOT(in_latch.nget());
}
else
{
from_pad = TriState::Z;
}

if (NOT(rd) == TriState::One)
{
pad_out = NOT(NOR(out_latch.get(), rd));
}
else
{
pad_out = TriState::Z;
}
}

void BIDIR::sim_Input(TriState pad_in, TriState& from_pad, TriState rd)
Expand Down

0 comments on commit fe6c87e

Please sign in to comment.