mirror of https://github.com/PCSX2/pcsx2.git
R5900: Add an enum class for SYSCALL
v2: Fix indentation on switch-case.
This commit is contained in:
parent
95d70db153
commit
6bc6d20a87
|
@ -883,8 +883,11 @@ void SYSCALL()
|
||||||
|
|
||||||
BIOS_LOG("Bios call: %s (%x)", R5900::bios[call], call);
|
BIOS_LOG("Bios call: %s (%x)", R5900::bios[call], call);
|
||||||
|
|
||||||
switch (call) {
|
|
||||||
case 2: {
|
switch (static_cast<Syscall>(call))
|
||||||
|
{
|
||||||
|
case Syscall::SetGsCrt:
|
||||||
|
{
|
||||||
//Function "SetGsCrt(Interlace, Mode, Field)"
|
//Function "SetGsCrt(Interlace, Mode, Field)"
|
||||||
//Useful for fetching information of interlace/video/field display parameters of the Graphics Synthesizer
|
//Useful for fetching information of interlace/video/field display parameters of the Graphics Synthesizer
|
||||||
|
|
||||||
|
@ -940,22 +943,12 @@ void SYSCALL()
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 13:
|
case Syscall::SetVTLBRefillHandler:
|
||||||
DevCon.Warning("A tlb refill handler is set. New handler %x", (u32*)PSM(cpuRegs.GPR.n.a1.UL[0]));
|
DevCon.Warning("A tlb refill handler is set. New handler %x", (u32*)PSM(cpuRegs.GPR.n.a1.UL[0]));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x7c:
|
|
||||||
{
|
|
||||||
if(cpuRegs.GPR.n.a0.UL[0] == 0x10)
|
|
||||||
{
|
|
||||||
eeConLog( ShiftJIS_ConvertString((char*)PSM(memRead32(cpuRegs.GPR.n.a1.UL[0]))) );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
__Deci2Call( cpuRegs.GPR.n.a0.UL[0], (u32*)PSM(cpuRegs.GPR.n.a1.UL[0]) );
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 0x77:
|
case Syscall::sceSifSetDma:
|
||||||
// The only thing this code is used for is the one log message, so don't execute it if we aren't logging bios messages.
|
// The only thing this code is used for is the one log message, so don't execute it if we aren't logging bios messages.
|
||||||
if (SysTraceActive(EE.Bios))
|
if (SysTraceActive(EE.Bios))
|
||||||
{
|
{
|
||||||
|
@ -981,6 +974,17 @@ void SYSCALL()
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case Syscall::Deci2Call:
|
||||||
|
{
|
||||||
|
if (cpuRegs.GPR.n.a0.UL[0] == 0x10)
|
||||||
|
{
|
||||||
|
eeConLog(ShiftJIS_ConvertString((char*)PSM(memRead32(cpuRegs.GPR.n.a1.UL[0]))));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
__Deci2Call(cpuRegs.GPR.n.a0.UL[0], (u32*)PSM(cpuRegs.GPR.n.a1.UL[0]));
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,6 +17,14 @@
|
||||||
|
|
||||||
#include "Pcsx2Defs.h"
|
#include "Pcsx2Defs.h"
|
||||||
|
|
||||||
|
enum Syscall : u8
|
||||||
|
{
|
||||||
|
SetGsCrt = 2,
|
||||||
|
SetVTLBRefillHandler = 13,
|
||||||
|
sceSifSetDma = 119,
|
||||||
|
Deci2Call = 124
|
||||||
|
};
|
||||||
|
|
||||||
// TODO : Move these into the OpcodeTables namespace
|
// TODO : Move these into the OpcodeTables namespace
|
||||||
extern void (*Int_COP2PrintTable[32])();
|
extern void (*Int_COP2PrintTable[32])();
|
||||||
extern void (*Int_COP2BC2PrintTable[32])();
|
extern void (*Int_COP2BC2PrintTable[32])();
|
||||||
|
|
Loading…
Reference in New Issue