Skip to content

Commit

Permalink
Emubase minor changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
nzeemin committed Mar 4, 2021
1 parent 1de6ada commit 55ee1f1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions emulator/emubase/Board.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,8 @@ CMotherboard::CMotherboard ()
m_pFirstMemCtl = new CFirstMemoryController();
m_pSecondMemCtl = new CSecondMemoryController();
m_pFloppyCtl = new CFloppyController();
m_pHardDrives[0] = nullptr;
m_pHardDrives[1] = nullptr;

// Connect devices
m_pCPU->AttachMemoryController(m_pFirstMemCtl);
Expand All @@ -202,8 +204,6 @@ CMotherboard::CMotherboard ()
m_pROM = static_cast<uint8_t*>(calloc(32768, 1));
m_pROMCart[0] = nullptr;
m_pROMCart[1] = nullptr;
m_pHardDrives[0] = nullptr;
m_pHardDrives[1] = nullptr;

// Prepare bus devices
m_pCpuDevices = static_cast<CBusDevice**>(calloc(6, sizeof(CBusDevice*)));
Expand Down
7 changes: 4 additions & 3 deletions emulator/emubase/Processor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -291,8 +291,8 @@ void CProcessor::Execute()

m_internalTick = 0; //ANYTHING UNKNOWN WILL CAUSE EXCEPTION (EMT)

if (!CProcessor::InterruptProcessing())
CProcessor::CommandExecution();
if (!InterruptProcessing())
CommandExecution();
}

bool CProcessor::InterruptProcessing ()
Expand Down Expand Up @@ -472,7 +472,7 @@ void CProcessor::CommandExecution()
}
}
if (m_HALTrq || m_BPT_rq || m_IOT_rq || m_EMT_rq || m_TRAPrq || m_FIS_rq)
CProcessor::InterruptProcessing ();
InterruptProcessing();
}

void CProcessor::TickEVNT()
Expand Down Expand Up @@ -2511,6 +2511,7 @@ void CProcessor::ExecuteMARK () // MARK
m_internalTick = MARK_TIMING;
}


//////////////////////////////////////////////////////////////////////
//
// CPU image format (64 bytes):
Expand Down
4 changes: 2 additions & 2 deletions emulator/emubase/Processor.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ class CProcessor
uint16_t GetCPSW() const { return m_savepsw; }
uint8_t GetLPSW() const { return (uint8_t)(m_psw & 0xff); } ///< Get PSW lower byte
void SetPSW(uint16_t word); ///< Set the processor status word register value
void SetCPSW(uint16_t word) {m_savepsw = word; }
void SetCPSW(uint16_t word) { m_savepsw = word; }
void SetLPSW(uint8_t byte);
uint16_t GetReg(int regno) const { return m_R[regno]; } ///< Get register value, regno=0..7
void SetReg(int regno, uint16_t word); ///< Set register value
Expand All @@ -104,7 +104,7 @@ class CProcessor
uint16_t GetPC() const { return m_R[7]; }
uint16_t GetCPC() const { return m_savepc; }
void SetPC(uint16_t word);
void SetCPC(uint16_t word) {m_savepc = word; }
void SetCPC(uint16_t word) { m_savepc = word; }

public: // PSW bits control
void SetC(bool bFlag);
Expand Down

0 comments on commit 55ee1f1

Please sign in to comment.