diff --git a/Config/Glide64.rdb b/Config/Glide64.rdb index 5ce7c52f4..f1aac62bc 100644 --- a/Config/Glide64.rdb +++ b/Config/Glide64.rdb @@ -3546,6 +3546,7 @@ filtering=1 Good Name=Tom Clancy's Rainbow Six (E) Internal Name=RAINBOW SIX depthmode=1 +fb_render=1 increase_texrect_edge=1 swapmode=0 @@ -3553,6 +3554,7 @@ swapmode=0 Good Name=Tom Clancy's Rainbow Six (F) Internal Name=RAINBOW SIX depthmode=1 +fb_render=1 increase_texrect_edge=1 swapmode=0 @@ -3560,6 +3562,7 @@ swapmode=0 Good Name=Tom Clancy's Rainbow Six (G) Internal Name=RAINBOW SIX depthmode=1 +fb_render=1 increase_texrect_edge=1 swapmode=0 @@ -3567,6 +3570,7 @@ swapmode=0 Good Name=Tom Clancy's Rainbow Six (U) Internal Name=RAINBOW SIX depthmode=1 +fb_render=1 increase_texrect_edge=1 swapmode=0 diff --git a/Config/Project64.rdb b/Config/Project64.rdb index d49fcde75..6d44b8ce6 100644 --- a/Config/Project64.rdb +++ b/Config/Project64.rdb @@ -193,6 +193,7 @@ RDRAM Size=8 Good Name=64 de Hakken!! Tamagotchi - Minna de Tamagotchi World (J) Internal Name=ÐÝÅÃÞÀϺޯÁܰÙÄÞ Status=Issues (plugin) +Plugin Note=[video] HLE incorrect sprites Counter Factor=1 Save Type=FlashRam @@ -1133,7 +1134,7 @@ RDRAM Size=8 Good Name=Conker's Bad Fur Day (E) Internal Name=CONKER BFD Status=Compatible -Plugin Note=[Glide64] broken mipmapping, certain FB effects missing. +Plugin Note=[Glide64] broken mipmapping, certain FB effects missing 32bit=No Clear Frame=2 Culling=1 @@ -1150,7 +1151,7 @@ ViRefresh=2200 Good Name=Conker's Bad Fur Day (U) (Debug Version) Internal Name=CONKER BFD DEBUG Status=Compatible -Plugin Note=[Glide64] broken mipmapping, certain FB effects missing. +Plugin Note=[Glide64] broken mipmapping, certain FB effects missing 32bit=No Clear Frame=2 Culling=1 @@ -1167,7 +1168,7 @@ ViRefresh=2200 Good Name=Conker's Bad Fur Day (U) (ECTS Demo) Internal Name=CBFD ECTS Status=Compatible -Plugin Note=[Glide64] broken mipmapping, certain FB effects missing. +Plugin Note=[Glide64] broken mipmapping, certain FB effects missing 32bit=No Clear Frame=2 Culling=1 @@ -1185,7 +1186,7 @@ ViRefresh=2200 Good Name=Conker's Bad Fur Day (U) Internal Name=CONKER BFD Status=Compatible -Plugin Note=[Glide64] broken mipmapping, certain FB effects missing. +Plugin Note=[Glide64] broken mipmapping, certain FB effects missing 32bit=No Clear Frame=2 Culling=1 @@ -3673,11 +3674,13 @@ Save Type=FlashRam Good Name=NBA Hangtime (E) Internal Name=NBA HANGTIME Status=Issues (plugin) +Plugin Note=[video] slow [4E69B487-FE18E290-C:45] Good Name=NBA Hangtime (U) Internal Name=NBA HANGTIME Status=Issues (plugin) +Plugin Note=[video] slow [36ACBA9B-F28D4D94-C:4A] Good Name=NBA In the Zone '98 (J) @@ -4677,7 +4680,7 @@ Status=Compatible Good Name=Rat Attack (E) (M6) Internal Name=RAT ATTACK Status=Issues (core) -Core Note=Interpreter only for multi +Core Note=Interpreter only for multiplayer SMM-FUNC=0 Use TLB=No @@ -4685,7 +4688,7 @@ Use TLB=No Good Name=Rat Attack (U) (M6) Internal Name=RAT ATTACK Status=Issues (core) -Core Note=Interpreter only for multi +Core Note=Interpreter only for multiplayer SMM-FUNC=0 Use TLB=No @@ -5651,13 +5654,11 @@ RDRAM Size=8 Good Name=Tetrisphere (E) Internal Name=TETRISPHERE Status=Compatible -Plugin Note=[video] slow in menus [3C1FDABE-02A4E0BA-C:45] Good Name=Tetrisphere (U) Internal Name=TETRISPHERE Status=Compatible -Plugin Note=[video] slow in menus [F82DD377-8C3FB347-C:58] Good Name=TG Rally 2 (E) @@ -6368,7 +6369,7 @@ Good Name=Twisted Edge Extreme Snowboarding (E) Internal Name=TWISTED EDGE Status=Issues (mixed) Core Note=Bad sound -Plugin Note=[video] no fog +Plugin Note=[Glide64] no fog 32bit=No Culling=1 RDRAM Size=8 @@ -6378,7 +6379,7 @@ Good Name=Twisted Edge Extreme Snowboarding (U) Internal Name=TWISTED EDGE Status=Issues (mixed) Core Note=Bad sound -Plugin Note=[video] no fog +Plugin Note=[Glide64] no fog 32bit=No Culling=1 RDRAM Size=8 @@ -6729,7 +6730,7 @@ Plugin Note=[video] HLE square bug Good Name=WinBack - Covert Operations (U) Internal Name=WIN BACK Status=Compatible -Plugin Note=[video] HLE square bug. +Plugin Note=[video] HLE square bug [54310E7D-6B5430D8-C:50] Good Name=Wipeout 64 (E) @@ -8113,8 +8114,7 @@ Status=Unsupported [00000000-00000000-C:4A] 32bit=No -Core Note=Recompiler isn't working properly -CPU Type=Interpreter +Fixed Audio=0 Good Name=64DD IPL (JPN) RDRAM Size=8 -Status=Issues (core) +Status=Compatible diff --git a/Source/Glide64/Combine.cpp b/Source/Glide64/Combine.cpp index 589fc6dc7..4ebb48c0a 100644 --- a/Source/Glide64/Combine.cpp +++ b/Source/Glide64/Combine.cpp @@ -37,6 +37,7 @@ // //**************************************************************** +#include #include "Gfx_1.3.h" #include "Util.h" #include "Combine.h" diff --git a/Source/Glide64/Debugger.cpp b/Source/Glide64/Debugger.cpp index de762f18b..325c88caa 100644 --- a/Source/Glide64/Debugger.cpp +++ b/Source/Glide64/Debugger.cpp @@ -37,6 +37,9 @@ // //**************************************************************** +#include +#include + #include "Gfx_1.3.h" #include "Util.h" #include "Debugger.h" diff --git a/Source/Glide64/Gfx_1.3.h b/Source/Glide64/Gfx_1.3.h index e4b975f35..23e5c8cda 100644 --- a/Source/Glide64/Gfx_1.3.h +++ b/Source/Glide64/Gfx_1.3.h @@ -74,7 +74,7 @@ the plugin #include "GlideExtensions.h" #include "rdp.h" #include "Keys.h" -#include "config.h" +#include "Config.h" #if defined __VISUALC__ typedef unsigned char boolean; diff --git a/Source/Glide64/Main.cpp b/Source/Glide64/Main.cpp index 28091f8e6..7cd348c15 100644 --- a/Source/Glide64/Main.cpp +++ b/Source/Glide64/Main.cpp @@ -37,6 +37,7 @@ // //**************************************************************** +#include #include #include "Gfx_1.3.h" #include "Version.h" diff --git a/Source/Glide64/MiClWr32b.h b/Source/Glide64/MiClWr32b.h index ee4307b3b..94224e714 100644 --- a/Source/Glide64/MiClWr32b.h +++ b/Source/Glide64/MiClWr32b.h @@ -41,6 +41,8 @@ // //**************************************************************** +#include + static inline void mirror32bS(uint8_t *tex, uint8_t *start, int width, int height, int mask, int line, int full, int count) { uint32_t *v8; diff --git a/Source/Glide64/TexBuffer.cpp b/Source/Glide64/TexBuffer.cpp index e47aa1db2..0f025e24f 100644 --- a/Source/Glide64/TexBuffer.cpp +++ b/Source/Glide64/TexBuffer.cpp @@ -42,6 +42,7 @@ // //**************************************************************** +#include #include "Gfx_1.3.h" #include "TexBuffer.h" #include "CRC.h" diff --git a/Source/Glide64/TexLoad.h b/Source/Glide64/TexLoad.h index 2985e1f9a..568b574e5 100644 --- a/Source/Glide64/TexLoad.h +++ b/Source/Glide64/TexLoad.h @@ -42,6 +42,8 @@ #include "TexLoad16b.h" #include "TexLoad32b.h" +#include + uint32_t LoadNone(uintptr_t /*dst*/, uintptr_t /*src*/, int /*wid_64*/, int /*height*/, int /*line*/, int /*real_width*/, int /*tile*/) { memset(texture, 0, 4096 * 4); diff --git a/Source/Glide64/Util.cpp b/Source/Glide64/Util.cpp index 013342959..6621a1455 100644 --- a/Source/Glide64/Util.cpp +++ b/Source/Glide64/Util.cpp @@ -38,6 +38,8 @@ //**************************************************************** #include +#include + #include "Gfx_1.3.h" #include "Util.h" #include "Combine.h" diff --git a/Source/Glide64/rdp.cpp b/Source/Glide64/rdp.cpp index ada376522..71983f9cd 100644 --- a/Source/Glide64/rdp.cpp +++ b/Source/Glide64/rdp.cpp @@ -38,6 +38,8 @@ //**************************************************************** #include +#include + #include "Gfx_1.3.h" #include "3dmath.h" #include "Util.h" diff --git a/Source/Project64-core/N64System/Mips/Disk.cpp b/Source/Project64-core/N64System/Mips/Disk.cpp index f41b4698a..783a6f992 100644 --- a/Source/Project64-core/N64System/Mips/Disk.cpp +++ b/Source/Project64-core/N64System/Mips/Disk.cpp @@ -201,7 +201,7 @@ void DiskBMUpdate() else { //Read Data - if (((g_Reg->ASIC_CUR_TK >> 16) & 0xFFF) == 6 && g_Reg->ASIC_CUR_SECTOR == 0) + if (((g_Reg->ASIC_CUR_TK >> 16) & 0x1FFF) == 6 && g_Reg->ASIC_CUR_SECTOR == 0) { g_Reg->ASIC_STATUS &= ~DD_STATUS_DATA_RQ; g_Reg->ASIC_BM_STATUS |= DD_BM_STATUS_MICRO; diff --git a/Source/Project64-core/N64System/Mips/Mempak.H b/Source/Project64-core/N64System/Mips/Mempak.H index e394a217c..d344dc6f2 100644 --- a/Source/Project64-core/N64System/Mips/Mempak.H +++ b/Source/Project64-core/N64System/Mips/Mempak.H @@ -16,6 +16,6 @@ public: static uint8_t CalculateCrc(uint8_t * DataToCrc); static void Load(); static void Format(int32_t Control); - static void ReadFrom(int32_t Control, uint8_t * command); - static void WriteTo(int32_t Control, uint8_t * command); + static void ReadFrom(int32_t Control, uint32_t address, uint8_t * data); + static void WriteTo(int32_t Control, uint32_t address, uint8_t * data); }; \ No newline at end of file diff --git a/Source/Project64-core/N64System/Mips/Mempak.cpp b/Source/Project64-core/N64System/Mips/Mempak.cpp index 7e1be538d..c816fbdb8 100644 --- a/Source/Project64-core/N64System/Mips/Mempak.cpp +++ b/Source/Project64-core/N64System/Mips/Mempak.cpp @@ -106,28 +106,24 @@ uint8_t Mempak::CalculateCrc(uint8_t * DataToCrc) return CRC; } -void Mempak::ReadFrom(int32_t Control, uint8_t * command) +void Mempak::ReadFrom(int32_t Control, uint32_t address, uint8_t * data) { - uint32_t address = (command[3] << 8) | (command[4] & 0xE0); - if (address < 0x8000) { - memcpy(&command[5], &Mempaks[Control][address], 0x20); + memcpy(data, &Mempaks[Control][address], 0x20); } else { - memset(&command[5], 0x00, 0x20); + memset(data, 0x00, 0x20); /* Rumble pack area */ } } -void Mempak::WriteTo(int32_t Control, uint8_t * command) +void Mempak::WriteTo(int32_t Control, uint32_t address, uint8_t * data) { - uint32_t address = (command[3] << 8) | (command[4] & 0xE0); - if (address < 0x8000) { - memcpy(&Mempaks[Control][address], &command[5], 0x20); + memcpy(&Mempaks[Control][address], data, 0x20); FILE* mempak = fopen(MempakNames[Control], "wb"); fwrite(Mempaks[Control], 1, 0x8000, mempak); diff --git a/Source/Project64-core/N64System/Mips/PifRam.cpp b/Source/Project64-core/N64System/Mips/PifRam.cpp index bb0f493c2..4257f0935 100644 --- a/Source/Project64-core/N64System/Mips/PifRam.cpp +++ b/Source/Project64-core/N64System/Mips/PifRam.cpp @@ -468,11 +468,7 @@ void CPifRam::ProcessControllerCommand(int32_t Control, uint8_t * Command) } if (bShowPifRamErrors()) { - if (Command[0] != 1) - { - g_Notify->DisplayError("What am I meant to do with this Controller Command"); - } - if (Command[1] != 3) + if (Command[0] != 1 || Command[1] != 3) { g_Notify->DisplayError("What am I meant to do with this Controller Command"); } @@ -499,11 +495,7 @@ void CPifRam::ProcessControllerCommand(int32_t Control, uint8_t * Command) case 0x01: // read controller if (bShowPifRamErrors()) { - if (Command[0] != 1) - { - g_Notify->DisplayError("What am I meant to do with this Controller Command"); - } - if (Command[1] != 4) + if (Command[0] != 1 || Command[1] != 4) { g_Notify->DisplayError("What am I meant to do with this Controller Command"); } @@ -520,21 +512,20 @@ void CPifRam::ProcessControllerCommand(int32_t Control, uint8_t * Command) } if (bShowPifRamErrors()) { - if (Command[0] != 3) - { - g_Notify->DisplayError("What am I meant to do with this Controller Command"); - } - if (Command[1] != 33) + if (Command[0] != 3 || Command[1] != 33) { g_Notify->DisplayError("What am I meant to do with this Controller Command"); } } if (Controllers[Control].Present == true) { + uint32_t address = (Command[3] << 8) | (Command[4] & 0xE0); + uint8_t* data = &Command[5]; + switch (Controllers[Control].Plugin) { - case PLUGIN_RUMBLE_PAK: Rumblepak::ReadFrom(Command); break; - case PLUGIN_MEMPAK: Mempak::ReadFrom(Control, Command); break; + case PLUGIN_RUMBLE_PAK: Rumblepak::ReadFrom(address, data); break; + case PLUGIN_MEMPAK: Mempak::ReadFrom(Control, address, data); break; case PLUGIN_TANSFER_PAK: /* TODO */; break; case PLUGIN_RAW: if (g_Plugins->Control()->ControllerCommand) { g_Plugins->Control()->ControllerCommand(Control, Command); } break; default: @@ -562,21 +553,20 @@ void CPifRam::ProcessControllerCommand(int32_t Control, uint8_t * Command) } if (bShowPifRamErrors()) { - if (Command[0] != 35) - { - g_Notify->DisplayError("What am I meant to do with this Controller Command"); - } - if (Command[1] != 1) + if (Command[0] != 35 || Command[1] != 1) { g_Notify->DisplayError("What am I meant to do with this Controller Command"); } } if (Controllers[Control].Present == true) { + uint32_t address = (Command[3] << 8) | (Command[4] & 0xE0); + uint8_t* data = &Command[5]; + switch (Controllers[Control].Plugin) { - case PLUGIN_MEMPAK: Mempak::WriteTo(Control, Command); break; - case PLUGIN_RUMBLE_PAK: Rumblepak::WriteTo(Control, Command); break; + case PLUGIN_MEMPAK: Mempak::WriteTo(Control, address, data); break; + case PLUGIN_RUMBLE_PAK: Rumblepak::WriteTo(Control, address, data); break; case PLUGIN_TANSFER_PAK: /* TODO */; break; case PLUGIN_RAW: if (g_Plugins->Control()->ControllerCommand) { g_Plugins->Control()->ControllerCommand(Control, Command); } break; } @@ -614,8 +604,7 @@ void CPifRam::ReadControllerCommand(int32_t Control, uint8_t * Command) { if (bShowPifRamErrors()) { - if (Command[0] != 1) { g_Notify->DisplayError("What am I meant to do with this Controller Command"); } - if (Command[1] != 4) { g_Notify->DisplayError("What am I meant to do with this Controller Command"); } + if (Command[0] != 1 || Command[1] != 4) { g_Notify->DisplayError("What am I meant to do with this Controller Command"); } } const uint32_t buttons = g_BaseSystem->GetButtons(Control); diff --git a/Source/Project64-core/N64System/Mips/Rumblepak.cpp b/Source/Project64-core/N64System/Mips/Rumblepak.cpp index fd1607613..811dc4747 100644 --- a/Source/Project64-core/N64System/Mips/Rumblepak.cpp +++ b/Source/Project64-core/N64System/Mips/Rumblepak.cpp @@ -15,29 +15,25 @@ #include #include -void Rumblepak::ReadFrom(uint8_t * command) +void Rumblepak::ReadFrom(uint32_t address, uint8_t * data) { - uint32_t address = (command[3] << 8) | (command[4] & 0xE0); - if ((address >= 0x8000) && (address < 0x9000)) { - memset(&command[5], 0x80, 0x20); + memset(data, 0x80, 0x20); } else { - memset(&command[5], 0x00, 0x20); + memset(data, 0x00, 0x20); } } -void Rumblepak::WriteTo(int32_t Control, uint8_t * command) +void Rumblepak::WriteTo(int32_t Control, uint32_t address, uint8_t * data) { - uint32_t address = (command[3] << 8) | (command[4] & 0xE0); - if ((address) == 0xC000) { if (g_Plugins->Control()->RumbleCommand != NULL) { - g_Plugins->Control()->RumbleCommand(Control, *(int *)(&command[5])); + g_Plugins->Control()->RumbleCommand(Control, *(int *)data); } } } \ No newline at end of file diff --git a/Source/Project64-core/N64System/Mips/Rumblepak.h b/Source/Project64-core/N64System/Mips/Rumblepak.h index 3e76eacce..7a16af175 100644 --- a/Source/Project64-core/N64System/Mips/Rumblepak.h +++ b/Source/Project64-core/N64System/Mips/Rumblepak.h @@ -13,6 +13,6 @@ class Rumblepak { public: - static void ReadFrom(uint8_t * command); - static void WriteTo(int32_t Control, uint8_t * command); + static void ReadFrom(uint32_t address, uint8_t * data); + static void WriteTo(int32_t Control, uint32_t address, uint8_t * data); }; diff --git a/Source/Project64-core/N64System/N64Class.cpp b/Source/Project64-core/N64System/N64Class.cpp index 9b49a8fb2..0771eb977 100644 --- a/Source/Project64-core/N64System/N64Class.cpp +++ b/Source/Project64-core/N64System/N64Class.cpp @@ -219,7 +219,11 @@ bool CN64System::RunFileImage(const char * FileLoc) if (g_Rom->CicChipID() == CIC_NUS_8303) { //64DD IPL - g_DDRom = g_Rom; + if (g_DDRom == NULL) + { + g_DDRom = new CN64Rom(); + } + g_DDRom->LoadN64ImageIPL(FileLoc); g_Settings->SaveString(File_DiskIPLPath, FileLoc); } diff --git a/Source/Project64-core/N64System/Recompiler/RecompilerOps.cpp b/Source/Project64-core/N64System/Recompiler/RecompilerOps.cpp index ca08d6083..c7dd1f425 100644 --- a/Source/Project64-core/N64System/Recompiler/RecompilerOps.cpp +++ b/Source/Project64-core/N64System/Recompiler/RecompilerOps.cpp @@ -5474,12 +5474,12 @@ void CRecompilerOps::COP0_MT() } break; case 13: //cause + AndConstToVariable(0xFFFFCFF, &_CP0[m_Opcode.rd], CRegName::Cop0[m_Opcode.rd]); if (IsConst(m_Opcode.rt)) { - AndConstToVariable(0xFFFFCFF, &_CP0[m_Opcode.rd], CRegName::Cop0[m_Opcode.rd]); if ((GetMipsRegLo(m_Opcode.rt) & 0x300) != 0 && bHaveDebugger()){ g_Notify->DisplayError("Set IP0 or IP1"); } } - else + else if (bHaveDebugger()) { UnknownOpcode(); return; diff --git a/Source/Settings/Settings.cpp b/Source/Settings/Settings.cpp index f8353f9ee..89e419245 100644 --- a/Source/Settings/Settings.cpp +++ b/Source/Settings/Settings.cpp @@ -77,7 +77,7 @@ __declspec(dllexport) void SetSettingInfo3 (PLUGIN_SETTINGS3 * info) g_PluginSettings3 = *info; } -BOOL SettingsInitilized ( void ) +bool SettingsInitilized(void) { return g_PluginInitilized; } diff --git a/Source/Settings/Settings.h b/Source/Settings/Settings.h index 9a8344703..6b0177981 100644 --- a/Source/Settings/Settings.h +++ b/Source/Settings/Settings.h @@ -29,7 +29,7 @@ enum SETTING_DATA_TYPE { }; // set other information about different settings -BOOL SettingsInitilized ( void ); +bool SettingsInitilized ( void ); void SetModuleName ( const char * Name ); void RegisterSetting ( short SettingID, SETTING_DATA_TYPE Type, const char * Name, const char * Category, unsigned int DefaultDW, const char * DefaultStr );