Add cpu idling and int checks to instructions, refactor branching

This commit is contained in:
scawful
2024-04-22 19:09:00 -04:00
parent 365811739a
commit f301976316
6 changed files with 338 additions and 141 deletions

View File

@@ -27,24 +27,6 @@ void Spc700::Reset(bool hard) {
reset_wanted_ = true;
}
void Spc700::BootIplRom() {
PC = 0xFFC0;
A = 0;
X = 0;
Y = 0;
int i = 0;
while (PC != 0xFFC0 + 0x3F) {
uint8_t opcode = read(PC);
ExecuteInstructions(opcode);
PC++;
i++;
if (i > 1000) {
break;
}
}
}
void Spc700::RunOpcode() {
if (reset_wanted_) {
// based on 6502, brk without writes

View File

@@ -130,8 +130,6 @@ class Spc700 {
void Reset(bool hard = false);
void BootIplRom();
void RunOpcode();
void ExecuteInstructions(uint8_t opcode);