mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-02-04 21:39:54 +00:00
More fixes and fixes to previous fixes
This commit is contained in:
parent
be50130c3f
commit
78a92c7d43
@ -206,8 +206,6 @@ namespace fmt
|
||||
{
|
||||
throw "Invalid formatting (u8): " + std::string(fmt, len);
|
||||
}
|
||||
|
||||
return{};
|
||||
}
|
||||
};
|
||||
|
||||
@ -228,8 +226,6 @@ namespace fmt
|
||||
{
|
||||
throw "Invalid formatting (u16): " + std::string(fmt, len);
|
||||
}
|
||||
|
||||
return{};
|
||||
}
|
||||
};
|
||||
|
||||
@ -250,8 +246,6 @@ namespace fmt
|
||||
{
|
||||
throw "Invalid formatting (u32): " + std::string(fmt, len);
|
||||
}
|
||||
|
||||
return{};
|
||||
}
|
||||
};
|
||||
|
||||
@ -272,8 +266,6 @@ namespace fmt
|
||||
{
|
||||
throw "Invalid formatting (u64): " + std::string(fmt, len);
|
||||
}
|
||||
|
||||
return{};
|
||||
}
|
||||
};
|
||||
|
||||
@ -294,8 +286,6 @@ namespace fmt
|
||||
{
|
||||
throw "Invalid formatting (s8): " + std::string(fmt, len);
|
||||
}
|
||||
|
||||
return{};
|
||||
}
|
||||
};
|
||||
|
||||
@ -316,8 +306,6 @@ namespace fmt
|
||||
{
|
||||
throw "Invalid formatting (s16): " + std::string(fmt, len);
|
||||
}
|
||||
|
||||
return{};
|
||||
}
|
||||
};
|
||||
|
||||
@ -378,8 +366,6 @@ namespace fmt
|
||||
{
|
||||
throw "Invalid formatting (float): " + std::string(fmt, len);
|
||||
}
|
||||
|
||||
return{};
|
||||
}
|
||||
};
|
||||
|
||||
@ -400,8 +386,6 @@ namespace fmt
|
||||
{
|
||||
throw "Invalid formatting (double): " + std::string(fmt, len);
|
||||
}
|
||||
|
||||
return{};
|
||||
}
|
||||
};
|
||||
|
||||
@ -426,8 +410,6 @@ namespace fmt
|
||||
{
|
||||
throw "Invalid formatting (bool): " + std::string(fmt, len);
|
||||
}
|
||||
|
||||
return{};
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -62,7 +62,8 @@ public:
|
||||
|
||||
public:
|
||||
iterator(vfsDirBase* parent)
|
||||
: data(parent->First())
|
||||
: parent(parent)
|
||||
, data(parent->First())
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -289,7 +289,7 @@ u16 RSXVertexTexture::GetMipmap() const
|
||||
u8 RSXVertexTexture::GetWrapS() const
|
||||
{
|
||||
return 1;
|
||||
return ((methodRegisters[NV4097_SET_VERTEX_TEXTURE_ADDRESS + (m_index * 32)]) & 0xf);
|
||||
//return ((methodRegisters[NV4097_SET_VERTEX_TEXTURE_ADDRESS + (m_index * 32)]) & 0xf);
|
||||
}
|
||||
|
||||
u8 RSXVertexTexture::GetWrapT() const
|
||||
@ -301,7 +301,7 @@ u8 RSXVertexTexture::GetWrapT() const
|
||||
u8 RSXVertexTexture::GetWrapR() const
|
||||
{
|
||||
return 1;
|
||||
return ((methodRegisters[NV4097_SET_VERTEX_TEXTURE_ADDRESS + (m_index * 32)] >> 16) & 0xf);
|
||||
//return ((methodRegisters[NV4097_SET_VERTEX_TEXTURE_ADDRESS + (m_index * 32)] >> 16) & 0xf);
|
||||
}
|
||||
|
||||
u8 RSXVertexTexture::GetUnsignedRemap() const
|
||||
|
@ -542,16 +542,15 @@ int cellGcmSetSecondVFrequency(u32 freq)
|
||||
switch (freq)
|
||||
{
|
||||
case CELL_GCM_DISPLAY_FREQUENCY_59_94HZ:
|
||||
cellGcmSys->Todo("Unimplemented display frequency: 59.94Hz"); break;
|
||||
Emu.GetGSManager().GetRender().m_frequency_mode = freq; cellGcmSys->Todo("Unimplemented display frequency: 59.94Hz"); break;
|
||||
case CELL_GCM_DISPLAY_FREQUENCY_SCANOUT:
|
||||
cellGcmSys->Todo("Unimplemented display frequency: Scanout"); break;
|
||||
Emu.GetGSManager().GetRender().m_frequency_mode = freq; cellGcmSys->Todo("Unimplemented display frequency: Scanout"); break;
|
||||
case CELL_GCM_DISPLAY_FREQUENCY_DISABLE:
|
||||
Emu.GetGSManager().GetRender().m_frequency_mode = freq; break;
|
||||
|
||||
default: return CELL_EINVAL;
|
||||
Emu.GetGSManager().GetRender().m_frequency_mode = freq; cellGcmSys->Todo("Unimplemented display frequency: Disabled"); break;
|
||||
default: cellGcmSys->Error("Improper display frequency specified!"); return;
|
||||
}
|
||||
|
||||
return CELL_OK;
|
||||
return;
|
||||
}
|
||||
|
||||
int cellGcmSetTileInfo(u8 index, u8 location, u32 offset, u32 size, u32 pitch, u8 comp, u16 base, u8 bank)
|
||||
|
@ -11,17 +11,24 @@ extern Module *sys_io;
|
||||
int cellKbInit(u32 max_connect)
|
||||
{
|
||||
sys_io->Warning("cellKbInit(max_connect=%d)", max_connect);
|
||||
if(Emu.GetKeyboardManager().IsInited()) return CELL_KB_ERROR_ALREADY_INITIALIZED;
|
||||
if(max_connect > 7) return CELL_KB_ERROR_INVALID_PARAMETER;
|
||||
|
||||
if (Emu.GetKeyboardManager().IsInited())
|
||||
return CELL_KB_ERROR_ALREADY_INITIALIZED;
|
||||
if (max_connect > 7)
|
||||
return CELL_KB_ERROR_INVALID_PARAMETER;
|
||||
|
||||
Emu.GetKeyboardManager().Init(max_connect);
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int cellKbEnd()
|
||||
{
|
||||
sys_io->Log("cellKbEnd()");
|
||||
if(!Emu.GetKeyboardManager().IsInited()) return CELL_KB_ERROR_UNINITIALIZED;
|
||||
|
||||
if (!Emu.GetKeyboardManager().IsInited())
|
||||
return CELL_KB_ERROR_UNINITIALIZED;
|
||||
|
||||
Emu.GetKeyboardManager().Close();
|
||||
return CELL_OK;
|
||||
}
|
||||
@ -29,8 +36,12 @@ int cellKbEnd()
|
||||
int cellKbClearBuf(u32 port_no)
|
||||
{
|
||||
sys_io->Log("cellKbClearBuf(port_no=%d)", port_no);
|
||||
if(!Emu.GetKeyboardManager().IsInited()) return CELL_KB_ERROR_UNINITIALIZED;
|
||||
if(port_no >= Emu.GetKeyboardManager().GetKeyboards().size()) return CELL_KB_ERROR_INVALID_PARAMETER;
|
||||
|
||||
if (!Emu.GetKeyboardManager().IsInited())
|
||||
return CELL_KB_ERROR_UNINITIALIZED;
|
||||
|
||||
if (port_no >= Emu.GetKeyboardManager().GetKeyboards().size())
|
||||
return CELL_KB_ERROR_INVALID_PARAMETER;
|
||||
|
||||
//?
|
||||
|
||||
@ -42,12 +53,10 @@ u16 cellKbCnvRawCode(u32 arrange, u32 mkey, u32 led, u16 rawcode)
|
||||
sys_io->Log("cellKbCnvRawCode(arrange=%d,mkey=%d,led=%d,rawcode=%d)", arrange, mkey, led, rawcode);
|
||||
|
||||
// CELL_KB_RAWDAT
|
||||
if ((rawcode >= 0x00 && rawcode <= 0x03) || rawcode == 0x29 || rawcode == 0x35 ||
|
||||
(rawcode >= 0x39 && rawcode <= 0x53) || rawcode == 0x65 || rawcode == 0x88 ||
|
||||
rawcode == 0x8A || rawcode == 0x8B)
|
||||
{
|
||||
return rawcode | 0x8000;
|
||||
}
|
||||
if (rawcode <= 0x03 || rawcode == 0x29 || rawcode == 0x35 || (rawcode >= 0x39 && rawcode <= 0x53) || rawcode == 0x65 || rawcode == 0x88 || rawcode == 0x8A || rawcode == 0x8B)
|
||||
{
|
||||
return rawcode | 0x8000;
|
||||
}
|
||||
|
||||
// CELL_KB_NUMPAD
|
||||
if (rawcode >= 0x59 && rawcode <= 0x61) return (rawcode - 0x28) | 0x4000; // '1' - '9'
|
||||
@ -88,13 +97,16 @@ u16 cellKbCnvRawCode(u32 arrange, u32 mkey, u32 led, u16 rawcode)
|
||||
int cellKbGetInfo(vm::ptr<CellKbInfo> info)
|
||||
{
|
||||
sys_io->Log("cellKbGetInfo(info_addr=0x%x)", info.addr());
|
||||
if(!Emu.GetKeyboardManager().IsInited()) return CELL_KB_ERROR_UNINITIALIZED;
|
||||
|
||||
if (!Emu.GetKeyboardManager().IsInited())
|
||||
return CELL_KB_ERROR_UNINITIALIZED;
|
||||
|
||||
const KbInfo& current_info = Emu.GetKeyboardManager().GetInfo();
|
||||
info->max_connect = current_info.max_connect;
|
||||
info->now_connect = current_info.now_connect;
|
||||
info->info = current_info.info;
|
||||
for(u32 i=0; i<CELL_KB_MAX_KEYBOARDS; i++)
|
||||
|
||||
for (u32 i=0; i<CELL_KB_MAX_KEYBOARDS; i++)
|
||||
{
|
||||
info->status[i] = current_info.status[i];
|
||||
}
|
||||
@ -107,14 +119,18 @@ int cellKbRead(u32 port_no, vm::ptr<CellKbData> data)
|
||||
sys_io->Log("cellKbRead(port_no=%d,info_addr=0x%x)", port_no, data.addr());
|
||||
|
||||
const std::vector<Keyboard>& keyboards = Emu.GetKeyboardManager().GetKeyboards();
|
||||
if(!Emu.GetKeyboardManager().IsInited()) return CELL_KB_ERROR_UNINITIALIZED;
|
||||
if(port_no >= keyboards.size()) return CELL_KB_ERROR_INVALID_PARAMETER;
|
||||
if (!Emu.GetKeyboardManager().IsInited())
|
||||
return CELL_KB_ERROR_UNINITIALIZED;
|
||||
|
||||
if (port_no >= keyboards.size())
|
||||
return CELL_KB_ERROR_INVALID_PARAMETER;
|
||||
|
||||
KbData& current_data = Emu.GetKeyboardManager().GetData(port_no);
|
||||
data->led = current_data.led;
|
||||
data->mkey = current_data.mkey;
|
||||
data->len = std::min((u32)current_data.len, CELL_KB_MAX_KEYCODES);
|
||||
for(s32 i=0; i<current_data.len; i++)
|
||||
|
||||
for (s32 i=0; i<current_data.len; i++)
|
||||
{
|
||||
data->keycode[i] = current_data.keycode[i];
|
||||
}
|
||||
@ -127,7 +143,9 @@ int cellKbRead(u32 port_no, vm::ptr<CellKbData> data)
|
||||
int cellKbSetCodeType(u32 port_no, u32 type)
|
||||
{
|
||||
sys_io->Log("cellKbSetCodeType(port_no=%d,type=%d)", port_no, type);
|
||||
if(!Emu.GetKeyboardManager().IsInited()) return CELL_KB_ERROR_UNINITIALIZED;
|
||||
|
||||
if (!Emu.GetKeyboardManager().IsInited())
|
||||
return CELL_KB_ERROR_UNINITIALIZED;
|
||||
|
||||
KbConfig& current_config = Emu.GetKeyboardManager().GetConfig(port_no);
|
||||
current_config.code_type = type;
|
||||
@ -143,7 +161,9 @@ int cellKbSetLEDStatus(u32 port_no, u8 led)
|
||||
int cellKbSetReadMode(u32 port_no, u32 rmode)
|
||||
{
|
||||
sys_io->Log("cellKbSetReadMode(port_no=%d,rmode=%d)", port_no, rmode);
|
||||
if(!Emu.GetKeyboardManager().IsInited()) return CELL_KB_ERROR_UNINITIALIZED;
|
||||
|
||||
if (!Emu.GetKeyboardManager().IsInited())
|
||||
return CELL_KB_ERROR_UNINITIALIZED;
|
||||
|
||||
KbConfig& current_config = Emu.GetKeyboardManager().GetConfig(port_no);
|
||||
current_config.read_mode = rmode;
|
||||
@ -154,7 +174,9 @@ int cellKbSetReadMode(u32 port_no, u32 rmode)
|
||||
int cellKbGetConfiguration(u32 port_no, vm::ptr<CellKbConfig> config)
|
||||
{
|
||||
sys_io->Log("cellKbGetConfiguration(port_no=%d,config_addr=0x%x)", port_no, config.addr());
|
||||
if(!Emu.GetKeyboardManager().IsInited()) return CELL_KB_ERROR_UNINITIALIZED;
|
||||
|
||||
if (!Emu.GetKeyboardManager().IsInited())
|
||||
return CELL_KB_ERROR_UNINITIALIZED;
|
||||
|
||||
const KbConfig& current_config = Emu.GetKeyboardManager().GetConfig(port_no);
|
||||
config->arrange = current_config.arrange;
|
||||
|
@ -127,8 +127,8 @@ s32 cellMsgDialogOpen2(u32 type, vm::ptr<const char> msgString, vm::ptr<CellMsgD
|
||||
{
|
||||
switch (type & CELL_MSGDIALOG_TYPE_SE_TYPE)
|
||||
{
|
||||
case CELL_MSGDIALOG_TYPE_SE_TYPE_NORMAL: LOG_WARNING(TTY, "%s\n", msg.c_str()); break;
|
||||
case CELL_MSGDIALOG_TYPE_SE_TYPE_ERROR: LOG_ERROR(TTY, "%s\n", msg.c_str()); break;
|
||||
case CELL_MSGDIALOG_TYPE_SE_TYPE_NORMAL: LOG_WARNING(HLE, "%s", msg.c_str()); break;
|
||||
case CELL_MSGDIALOG_TYPE_SE_TYPE_ERROR: LOG_ERROR(HLE, "%s", msg.c_str()); break;
|
||||
}
|
||||
|
||||
switch (type & CELL_MSGDIALOG_TYPE_SE_MUTE) // TODO
|
||||
@ -264,7 +264,11 @@ s32 cellMsgDialogOpenErrorCode(u32 errorCode, vm::ptr<CellMsgDialogCallback> cal
|
||||
}
|
||||
|
||||
char errorCodeHex[12];
|
||||
#if __STDC_WANT_SECURE_LIB__ && !_WIN32_WCE
|
||||
sprintf_s(errorCodeHex, "\n(%08x)", errorCode);
|
||||
#else
|
||||
sprintf(errorCodeHex, "\n(%08x)", errorCode);
|
||||
#endif
|
||||
errorMessage.append(errorCodeHex);
|
||||
|
||||
u64 status;
|
||||
|
@ -1060,8 +1060,11 @@ s32 syncLFQueueGetPushPointer(vm::ptr<CellSyncLFQueue> queue, s32& pointer, u32
|
||||
res = CELL_SYNC_ERROR_AGAIN;
|
||||
if (!push.m_h7.data() || res)
|
||||
{
|
||||
// TODO: This condition is always true - wrong implementation?
|
||||
return res;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
else if (!useEventQueue)
|
||||
{
|
||||
@ -1436,8 +1439,11 @@ s32 syncLFQueueGetPopPointer(vm::ptr<CellSyncLFQueue> queue, s32& pointer, u32 i
|
||||
res = CELL_SYNC_ERROR_AGAIN;
|
||||
if (!pop.m_h3.data() || res)
|
||||
{
|
||||
// TODO: This condition is always true - wrong implementation?
|
||||
return res;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
else if (!useEventQueue)
|
||||
{
|
||||
|
@ -210,91 +210,91 @@ void CompilerELF::OnUpdate(wxCommandEvent& event)
|
||||
DoAnalyzeCode(false);
|
||||
|
||||
return;
|
||||
/*asm_list->Freeze();
|
||||
asm_list->SetStyle(0, asm_list->GetValue().Len(), wxTextAttr("Black"));
|
||||
//asm_list->Freeze();
|
||||
//asm_list->SetStyle(0, asm_list->GetValue().Len(), wxTextAttr("Black"));
|
||||
|
||||
/*
|
||||
for(u32 i=0; i<instr_count; ++i)
|
||||
{
|
||||
SetOpStyle(m_instructions[i].name, "Blue");
|
||||
}
|
||||
*/
|
||||
|
||||
/*SetOpStyle(".int", "Blue");
|
||||
SetOpStyle(".string", "Blue");
|
||||
SetOpStyle(".strlen", "Blue");
|
||||
SetOpStyle(".buf", "Blue");
|
||||
SetOpStyle(".srl", "Blue");
|
||||
SetOpStyle(".srr", "Blue");
|
||||
SetOpStyle(".mul", "Blue");
|
||||
SetOpStyle(".div", "Blue");
|
||||
SetOpStyle(".add", "Blue");
|
||||
SetOpStyle(".sub", "Blue");
|
||||
SetOpStyle(".and", "Blue");
|
||||
SetOpStyle(".or", "Blue");
|
||||
SetOpStyle(".xor", "Blue");
|
||||
SetOpStyle(".not", "Blue");
|
||||
SetOpStyle(".nor", "Blue");
|
||||
///*
|
||||
//for(u32 i=0; i<instr_count; ++i)
|
||||
//{
|
||||
// SetOpStyle(m_instructions[i].name, "Blue");
|
||||
//}
|
||||
//*/
|
||||
//
|
||||
//SetOpStyle(".int", "Blue");
|
||||
//SetOpStyle(".string", "Blue");
|
||||
//SetOpStyle(".strlen", "Blue");
|
||||
//SetOpStyle(".buf", "Blue");
|
||||
//SetOpStyle(".srl", "Blue");
|
||||
//SetOpStyle(".srr", "Blue");
|
||||
//SetOpStyle(".mul", "Blue");
|
||||
//SetOpStyle(".div", "Blue");
|
||||
//SetOpStyle(".add", "Blue");
|
||||
//SetOpStyle(".sub", "Blue");
|
||||
//SetOpStyle(".and", "Blue");
|
||||
//SetOpStyle(".or", "Blue");
|
||||
//SetOpStyle(".xor", "Blue");
|
||||
//SetOpStyle(".not", "Blue");
|
||||
//SetOpStyle(".nor", "Blue");
|
||||
|
||||
SetTextStyle("[", "Red");
|
||||
SetTextStyle("]", "Red");
|
||||
SetTextStyle(":", "Red");
|
||||
SetTextStyle(",", "Red");
|
||||
//SetTextStyle("[", "Red");
|
||||
//SetTextStyle("]", "Red");
|
||||
//SetTextStyle(":", "Red");
|
||||
//SetTextStyle(",", "Red");
|
||||
|
||||
for(int p=0; (p = asm_list->GetValue().find('#', p)) >= 0;)
|
||||
{
|
||||
const int from = p++;
|
||||
p = asm_list->GetValue().find('\n', p);
|
||||
//for(int p=0; (p = asm_list->GetValue().find('#', p)) >= 0;)
|
||||
//{
|
||||
// const int from = p++;
|
||||
// p = asm_list->GetValue().find('\n', p);
|
||||
|
||||
if(p < 0) p = asm_list->GetValue().Len();
|
||||
// if(p < 0) p = asm_list->GetValue().Len();
|
||||
|
||||
asm_list->SetStyle(from, p, wxTextAttr(0x009900));
|
||||
}
|
||||
|
||||
for(int p=0; (p = asm_list->GetValue().find('"', p)) >= 0;)
|
||||
{
|
||||
const int from = p++;
|
||||
const int p1 = asm_list->GetValue().find('\n', p);
|
||||
// asm_list->SetStyle(from, p, wxTextAttr(0x009900));
|
||||
//}
|
||||
//
|
||||
//for(int p=0; (p = asm_list->GetValue().find('"', p)) >= 0;)
|
||||
//{
|
||||
// const int from = p++;
|
||||
// const int p1 = asm_list->GetValue().find('\n', p);
|
||||
|
||||
int p2 = p;
|
||||
for(;;)
|
||||
{
|
||||
p2 = asm_list->GetValue().find('"', p2);
|
||||
if(p2 == -1) break;
|
||||
// int p2 = p;
|
||||
// for(;;)
|
||||
// {
|
||||
// p2 = asm_list->GetValue().find('"', p2);
|
||||
// if(p2 == -1) break;
|
||||
|
||||
if(asm_list->GetValue()[p2 - 1] == '\\')
|
||||
{
|
||||
if(p2 > 2 && asm_list->GetValue()[p2 - 2] == '\\') break;
|
||||
// if(asm_list->GetValue()[p2 - 1] == '\\')
|
||||
// {
|
||||
// if(p2 > 2 && asm_list->GetValue()[p2 - 2] == '\\') break;
|
||||
|
||||
p2++;
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
}
|
||||
// p2++;
|
||||
// continue;
|
||||
// }
|
||||
// break;
|
||||
// }
|
||||
|
||||
if(p1 < 0 && p2 < 0)
|
||||
{
|
||||
p = asm_list->GetValue().Len();
|
||||
}
|
||||
else if(p1 >= 0 && p2 < 0)
|
||||
{
|
||||
p = p1;
|
||||
}
|
||||
else if(p2 >= 0 && p1 < 0)
|
||||
{
|
||||
p = p2 + 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
p = p1 > p2 ? p2 + 1 : p1;
|
||||
}
|
||||
// if(p1 < 0 && p2 < 0)
|
||||
// {
|
||||
// p = asm_list->GetValue().Len();
|
||||
// }
|
||||
// else if(p1 >= 0 && p2 < 0)
|
||||
// {
|
||||
// p = p1;
|
||||
// }
|
||||
// else if(p2 >= 0 && p1 < 0)
|
||||
// {
|
||||
// p = p2 + 1;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// p = p1 > p2 ? p2 + 1 : p1;
|
||||
// }
|
||||
|
||||
asm_list->SetStyle(from, p, wxTextAttr(0x000099));
|
||||
}
|
||||
// asm_list->SetStyle(from, p, wxTextAttr(0x000099));
|
||||
//}
|
||||
|
||||
asm_list->Thaw();
|
||||
//asm_list->Thaw();
|
||||
|
||||
UpdateScroll(true, wxVERTICAL);*/
|
||||
//UpdateScroll(true, wxVERTICAL);
|
||||
}
|
||||
|
||||
void CompilerELF::OnScroll(wxScrollWinEvent& event)
|
||||
|
Loading…
x
Reference in New Issue
Block a user