Skip to content

Commit

Permalink
Merge pull request #1749 from grumpycoders/kernel-hooks-speedup
Browse files Browse the repository at this point in the history
Speeding up kernel hooks a bit.
  • Loading branch information
nicolasnoble committed Sep 29, 2024
2 parents c41d972 + a37e016 commit 6b58111
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/core/r3000a.cc
Original file line number Diff line number Diff line change
Expand Up @@ -433,14 +433,14 @@ std::unique_ptr<PCSX::R3000Acpu> PCSX::Cpus::DynaRec() {
}

void PCSX::R3000Acpu::processA0KernelCall(uint32_t call) {
auto r = m_regs.GPR.n;
auto& r = m_regs.GPR.n;

switch (call) {
case 0x03: { // write
if (r.a0 != 1) break;
IO<File> memFile = g_emulator->m_mem->getMemoryAsFile();
uint32_t size = r.a2;
m_regs.GPR.n.v0 = size;
r.v0 = size;
memFile->rSeek(r.a1);
while (size--) {
g_system->biosPutc(memFile->getc());
Expand Down Expand Up @@ -468,14 +468,14 @@ void PCSX::R3000Acpu::processA0KernelCall(uint32_t call) {
}

void PCSX::R3000Acpu::processB0KernelCall(uint32_t call) {
auto r = m_regs.GPR.n;
auto& r = m_regs.GPR.n;

switch (call) {
case 0x35: { // write
if (r.a0 != 1) break;
IO<File> memFile = g_emulator->m_mem->getMemoryAsFile();
uint32_t size = r.a2;
m_regs.GPR.n.v0 = size;
r.v0 = size;
memFile->rSeek(r.a1);
while (size--) {
g_system->biosPutc(memFile->getc());
Expand Down

0 comments on commit 6b58111

Please sign in to comment.