Skip to content

Commit

Permalink
Add another missing ACCDVD function.
Browse files Browse the repository at this point in the history
  • Loading branch information
jpd002 committed Sep 17, 2024
1 parent a5966cd commit 1988803
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Source/iop/Iop_Cdvdman.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ namespace Iop

uint32 CdStandby();
uint32 CdRead(uint32, uint32, uint32, uint32);
uint32 CdSeek(uint32);
uint32 CdCallback(uint32);
uint32 CdSync(uint32);
uint32 CdStatus();
Expand All @@ -82,7 +83,6 @@ namespace Iop
};

uint32 CdInit(uint32);
uint32 CdSeek(uint32);
uint32 CdGetError();
uint32 CdSearchFile(uint32, uint32);
uint32 CdGetDiskType();
Expand Down
11 changes: 11 additions & 0 deletions Source/iop/namco_sys246/Iop_NamcoAcCdvd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ using namespace Iop::Namco;
#define FUNCTION_CDGETERROR "IopCdGetError"
#define FUNCTION_CDGETDISKTYPE "IopCdGetDiskType"
#define FUNCTION_CDSTATUS "IopCdStatus"
#define FUNCTION_CDSEEK "IopCdSeek"
#define FUNCTION_CDSTANDBY "IopCdStandby"
#define FUNCTION_CDSETMMODE "IopCdSetMmode"

Expand Down Expand Up @@ -60,6 +61,8 @@ std::string CAcCdvd::GetFunctionName(unsigned int functionId) const
return FUNCTION_CDGETDISKTYPE;
case 22:
return FUNCTION_CDSTATUS;
case 25:
return FUNCTION_CDSEEK;
case 26:
return FUNCTION_CDSTANDBY;
case 37:
Expand Down Expand Up @@ -140,6 +143,14 @@ void CAcCdvd::Invoke(CMIPS& context, unsigned int functionId)
CLog::GetInstance().Print(LOG_NAME, FUNCTION_CDSTATUS "();\r\n");
context.m_State.nGPR[CMIPS::V0].nV0 = m_cdvdman.CdStatus();
break;
case 25:
//CdSeek
{
uint32 sector = context.m_State.nGPR[CMIPS::A0].nV0;
CLog::GetInstance().Print(LOG_NAME, FUNCTION_CDSEEK "(sector = 0x%08X);\r\n", sector);
context.m_State.nGPR[CMIPS::V0].nV0 = m_cdvdman.CdSeek(sector);
}
break;
case 26:
CLog::GetInstance().Print(LOG_NAME, FUNCTION_CDSTANDBY "();\r\n");
context.m_State.nGPR[CMIPS::V0].nV0 = m_cdvdman.CdStandby();
Expand Down

0 comments on commit 1988803

Please sign in to comment.