Skip to content

Commit

Permalink
TEMP: Work to figure out.
Browse files Browse the repository at this point in the history
  • Loading branch information
jpd002 committed Apr 20, 2023
1 parent ee8b20b commit 60be36a
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Source/Ps2Const.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace PS2
{
enum
{
EE_RAM_SIZE = 0x02000000
EE_RAM_SIZE = 0x04000000
};

enum
Expand Down Expand Up @@ -35,7 +35,7 @@ namespace PS2

enum
{
IOP_RAM_SIZE = 0x00200000
IOP_RAM_SIZE = 0x00400000
};

enum
Expand Down
18 changes: 18 additions & 0 deletions Source/ee/SIF.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,9 @@ uint32 CSIF::ReceiveDMA6(uint32 nSrcAddr, uint32 nSize, uint32 nDstAddr, bool is

switch(hdr->commandId)
{
case 3:
Cmd_AcFlash(hdr);
break;
case 0x80000000:
Cmd_SetEERecvAddr(hdr);
break;
Expand Down Expand Up @@ -489,6 +492,21 @@ void CSIF::LoadState_RequestEnd(const CStructFile& file, SIFRPCREQUESTEND& reque
//SIF Commands
/////////////////////////////////////////////////////////

void CSIF::Cmd_AcFlash(const SIFCMDHEADER* hdr)
{
struct ACFLASH_REPLY
{
SIFCMDHEADER header;
uint32 val[3];
};
static_assert(sizeof(ACFLASH_REPLY) == 0x1C, "sizeof(ACFLASH_REPLY) must be 28 bytes.");

ACFLASH_REPLY reply = {};
reply.header.commandId = 4;
reply.header.packetSize = sizeof(ACFLASH_REPLY);
SendPacket(&reply, sizeof(ACFLASH_REPLY));
}

void CSIF::Cmd_SetEERecvAddr(const SIFCMDHEADER* hdr)
{
assert(0);
Expand Down
1 change: 1 addition & 0 deletions Source/ee/SIF.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ class CSIF
static void LoadState_RpcCall(const CStructFile&, SIFRPCCALL&);
static void LoadState_RequestEnd(const CStructFile&, SIFRPCREQUESTEND&);

void Cmd_AcFlash(const SIFCMDHEADER*);
void Cmd_SetEERecvAddr(const SIFCMDHEADER*);
void Cmd_Initialize(const SIFCMDHEADER*);
void Cmd_Bind(const SIFCMDHEADER*);
Expand Down
6 changes: 3 additions & 3 deletions Source/iop/IopBios.h
Original file line number Diff line number Diff line change
Expand Up @@ -343,16 +343,16 @@ class CIopBios : public Iop::CBiosBase
enum
{
MAX_THREAD = 128,
MAX_MEMORYBLOCK = 1024,
MAX_MEMORYBLOCK = 512,
MAX_SEMAPHORE = 128,
MAX_EVENTFLAG = 128,
MAX_INTRHANDLER = 32,
MAX_VBLANKHANDLER = 8,
MAX_MESSAGEBOX = 32,
MAX_FPL = 16,
MAX_VPL = 16,
MAX_MODULESTARTREQUEST = 32,
MAX_LOADEDMODULE = 32,
MAX_MODULESTARTREQUEST = 4,
MAX_LOADEDMODULE = 48,
};

enum WEF_FLAGS
Expand Down
2 changes: 2 additions & 0 deletions Source/iop/Iop_PadMan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ void CPadMan::Invoke(CMIPS& context, unsigned int functionId)

bool CPadMan::Invoke(uint32 method, uint32* args, uint32 argsSize, uint32* ret, uint32 retSize, uint8* ram)
{
//Taiko no Tatsujin will crash due to some mismatching return from this module HLE
return true;
assert(method == 1);
method = args[0];
switch(method)
Expand Down

0 comments on commit 60be36a

Please sign in to comment.