This commit is contained in:
Ivan Roberto de Oliveira 2016-12-14 12:31:25 -02:00
commit 1e8e6f8ae6
3 changed files with 22 additions and 17 deletions

View File

@ -176,22 +176,34 @@ typedef struct
std::vector<XboxResolution> XboxResolutions = {
{ 640, 480, XTL::X_D3DFMT_LIN_X8R8G8B8, 0, "NTSC" },
{ 640, 480, XTL::X_D3DFMT_LIN_R5G6B5, 0, "NTSC" },
{ 640, 480, XTL::X_D3DFMT_LIN_X1R5G5B5, 0, "NTSC" },
{ 640, 480, XTL::X_D3DFMT_LIN_A8R8G8B8, 0, "NTSC" },
{ 640, 576, XTL::X_D3DFMT_LIN_X8R8G8B8, 0, "PAL" },
{ 640, 576, XTL::X_D3DFMT_LIN_R5G6B5, 0, "PAL" },
{ 640, 576, XTL::X_D3DFMT_LIN_X1R5G5B5, 0, "PAL" },
{ 640, 576, XTL::X_D3DFMT_LIN_A8R8G8B8, 0, "PAL" },
{ 720, 480, XTL::X_D3DFMT_LIN_X8R8G8B8, 0, "480p" },
{ 720, 480, XTL::X_D3DFMT_LIN_R5G6B5, 0, "480p" },
{ 720, 480, XTL::X_D3DFMT_LIN_X1R5G5B5, 0, "480p" },
{ 720, 480, XTL::X_D3DFMT_LIN_A8R8G8B8, 0, "480p" },
{ 720, 576, XTL::X_D3DFMT_LIN_X8R8G8B8, 0, "PAL2" },
{ 720, 576, XTL::X_D3DFMT_LIN_R5G6B5, 0, "PAL2" },
{ 720, 576, XTL::X_D3DFMT_LIN_X1R5G5B5, 0, "PAL2" },
{ 720, 576, XTL::X_D3DFMT_LIN_A8R8G8B8, 0, "PAL2" },
{ 1280, 720, XTL::X_D3DFMT_LIN_X8R8G8B8, 0, "720p" },
{ 1280, 720, XTL::X_D3DFMT_LIN_R5G6B5, 0, "720p" },
{ 1280, 720, XTL::X_D3DFMT_LIN_X1R5G5B5, 0, "720p" },
{ 1280, 720, XTL::X_D3DFMT_LIN_A8R8G8B8, 0, "720p" },
{ 1920, 1080, XTL::X_D3DFMT_LIN_X8R8G8B8, 0, "1080i" },
{ 1920, 1080, XTL::X_D3DFMT_LIN_X1R5G5B5, 0, "1080i" }
{ 1920, 1080, XTL::X_D3DFMT_LIN_R5G6B5, 0, "1080i" },
{ 1920, 1080, XTL::X_D3DFMT_LIN_X1R5G5B5, 0, "1080i" },
{ 1920, 1080, XTL::X_D3DFMT_LIN_A8R8G8B8, 0, "1080i" }
};
bool IsValidXboxDisplayMode(XTL::D3DDISPLAYMODE PCDisplayMode, int PCModeNr)
@ -5861,8 +5873,11 @@ HRESULT WINAPI XTL::EmuIDirect3DTexture8_LockRect
if(!(Flags & 0x80) && !(Flags & 0x40) && !(Flags & 0x20) && !(Flags & 0x10) && Flags != 0)
CxbxKrnlCleanup("EmuIDirect3DTexture8_LockRect: Unknown Flags! (0x%.08X)", Flags);
pTexture8->UnlockRect(Level);
hRet = pTexture8->LockRect(Level, pLockedRect, pRect, NewFlags);
if (pTexture8 != nullptr) {
pTexture8->UnlockRect(Level);
hRet = pTexture8->LockRect(Level, pLockedRect, pRect, NewFlags);
}
pThis->Common |= X_D3DCOMMON_ISLOCKED;
}

View File

@ -423,22 +423,11 @@ NTSTATUS EmuNtSymbolicLinkObject::Init(std::string aSymbolicLinkName, std::strin
bool CxbxMountUtilityDrive(bool formatClean)
{
Xbe::Certificate* pCertificate;
std::string TitleStr;
NTSTATUS status;
// TODO -oDxbx : Select the oldest cache partition somehow.
// For now, select partition6 as 'Utility data' drive, and link it to Z:
pCertificate = (Xbe::Certificate*)CxbxKrnl_XbeHeader->dwCertificateAddr;
char szBuffer[255];
sprintf(szBuffer, "%08X", ((Xbe::Certificate*)CxbxKrnl_XbeHeader->dwCertificateAddr)->dwTitleId);
TitleStr = szBuffer;
status = CxbxCreateSymbolicLink(DriveZ, DeviceHarddisk0Partition6 + "\\Cxbx_ZDATA_" + TitleStr + "\\");
// Dxbx note : The ZDATA convention is not actually what the Xbox does, but for now
// allows us to skip the partition-selection and formatting of the Utility drive,
// by creating a unique subfolder per title.
status = CxbxCreateSymbolicLink(DriveZ, DeviceHarddisk0Partition6);
// TODO -oDxbx : Implement 'formatting' (cleaning) of the Utility drive

View File

@ -760,7 +760,9 @@ static void EmuInstallWrappers(OOVPATable *OovpaTable, uint32 OovpaTableSize, Xb
if(OovpaTable[a].lpRedirect == 0)
{
EmuInstallWrapper(pFunc, EmuXRefFailure);
// Insert breakpoint
*(uint8_t*)pFunc = 0xCC;
EmuInstallWrapper((void*)(((uint32_t)pFunc)+1), EmuXRefFailure);
}
else
{
@ -774,7 +776,6 @@ static void EmuInstallWrappers(OOVPATable *OovpaTable, uint32 OovpaTableSize, Xb
// alert for the situation where an Xref function body is hit
static void EmuXRefFailure()
{
_asm int 3;
CxbxKrnlCleanup("XRef-only function body reached. Fatal Error.");
}