Update parallel-rdp properly
This commit is contained in:
@@ -31,13 +31,6 @@ void App::Run() {
|
|||||||
core.PollInputs(event);
|
core.PollInputs(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(core.romLoaded) {
|
core.Run(window);
|
||||||
core.Run(window);
|
|
||||||
UpdateScreenParallelRdp(window, core.GetVI());
|
|
||||||
} else {
|
|
||||||
UpdateScreenParallelRdpNoGame(window);
|
|
||||||
}
|
|
||||||
|
|
||||||
SDL_Delay(1);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,16 +22,22 @@ void Core::LoadROM(const std::string& rom) {
|
|||||||
void Core::Run(Window& window) {
|
void Core::Run(Window& window) {
|
||||||
MMIO& mmio = mem.mmio;
|
MMIO& mmio = mem.mmio;
|
||||||
for(mmio.vi.current = 0; mmio.vi.current < 262; mmio.vi.current++) {
|
for(mmio.vi.current = 0; mmio.vi.current < 262; mmio.vi.current++) {
|
||||||
for (int i = 0; i < 6000; i++) {
|
if(romLoaded) {
|
||||||
cpu.Step(mem);
|
for (int i = 0; i < 6000; i++) {
|
||||||
mmio.rsp.Step(mmio.mi, cpu.regs, mmio.rdp);
|
cpu.Step(mem);
|
||||||
mmio.rsp.Step(mmio.mi, cpu.regs, mmio.rdp);
|
mmio.rsp.Step(mmio.mi, cpu.regs, mmio.rdp);
|
||||||
mmio.rsp.Step(mmio.mi, cpu.regs, mmio.rdp);
|
mmio.rsp.Step(mmio.mi, cpu.regs, mmio.rdp);
|
||||||
mmio.rsp.Step(mmio.mi, cpu.regs, mmio.rdp);
|
mmio.rsp.Step(mmio.mi, cpu.regs, mmio.rdp);
|
||||||
}
|
mmio.rsp.Step(mmio.mi, cpu.regs, mmio.rdp);
|
||||||
|
}
|
||||||
|
|
||||||
if ((mmio.vi.current & 0x3FE) == mmio.vi.intr) {
|
if ((mmio.vi.current & 0x3FE) == mmio.vi.intr) {
|
||||||
InterruptRaise(mmio.mi, cpu.regs, Interrupt::VI);
|
InterruptRaise(mmio.mi, cpu.regs, Interrupt::VI);
|
||||||
|
}
|
||||||
|
|
||||||
|
UpdateScreenParallelRdp(window, GetVI());
|
||||||
|
} else {
|
||||||
|
UpdateScreenParallelRdpNoGame(window);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user