Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,11 @@ Changes since v4.406:
* File extensions .iso, .gcm, .cso, and .ciso are supported.
* The game list now colorizes game names based on their file format:
* Black: 1:1 full rip
* Dark Brown: Shrunken GCM
* Dark Brown: Shrunken
* Green: Extracted FST
* Blue: CISO
* Purple: Multi-Game
* Dark Yellow: Oversized
* Fixed an issue where pressing the Home button in the Settings menu after
changing a setting crashed the loader.
* Grayed out settings that don't apply to the current system, e.g. Wii U
Expand Down
2 changes: 1 addition & 1 deletion common/include/NintendontVersion.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#define __NINTENDONT_VERSION_H__

#define NIN_MAJOR_VERSION 6
#define NIN_MINOR_VERSION 501
#define NIN_MINOR_VERSION 503

#define NIN_VERSION ((NIN_MAJOR_VERSION << 16) | NIN_MINOR_VERSION)

Expand Down
51 changes: 51 additions & 0 deletions controllerconfigs/controller_Qanba_Drone_N2.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
[Controller (QANBA DRONE ARCADE JOYSTICK / PS4 mode)]
VID=2c22
PID=2000
Polltype=1
DPAD=1
DigitalLR=0
A=05,80
B=05,10
X=06,02
Y=05,20
Z=06,01
L=05,40
R=06,08
S=06,20
Up=05,00
Right=05,02
Left=05,06
Down=05,04
UpLeft=05,07
DownLeft=05,05
DownRight=05,03
RightUp=05,01
Power=06,10
StickX=1
StickY=2
CStickX=3
CStickY=4
MultiIn=0
LAnalog=0
RAnalog=0

#QANBA DRONE ARCADE JOYSTICK for Nintendon't
#---------------------------------------------
#Controller Type: Arcade-style
#Rumble Support: No
#Special Features: Turbo button, Switch button for Analog/D-Pad


#Button Setup:
# Joystick: GameCube D-Pad
# Green LED Mode button: Control Stick
# Red LED Mode button: C Stick
# Button Square: B
# Button Triangle: A
# Button R1: X
# Button X: Y
# Button O: L
# Button R2: R
# Button L1: Z
# Button Option: Start/Pause
# Button Share: Power off
30 changes: 30 additions & 0 deletions controllerconfigs/controller_brook_zero_pi_easy.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
[Brook Zero Pi Easy fighting board]
VID=0F0D
PID=00AA
Polltype=1
DPAD=1
DigitalLR=1
MultiIn=0
LAnalog=0
RAnalog=0
Power=1,10
Left=2,06
Down=2,04
Right=2,02
Up=2,00
RightUp=2,01
DownRight=2,03
DownLeft=2,05
UpLeft=2,07
A=0,08
B=0,01
X=0,20
Y=0,02
Z=0,10
L=0,80
R=0,40
S=1,02
StickX=3
StickY=4
CStickX=5
CStickY=6
9 changes: 8 additions & 1 deletion controllerconfigs/controller_ps4.ini
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,11 @@ StickY=2
CStickX=3
CStickY=4
LAnalog=8
RAnalog=9
RAnalog=9
Rumble=1
RumbleType=1
RumbleDataLen=06
RumbleDataOn=05,01,00,00,FF,FF
RumbleDataOff=05,01,00,00,00,00
RumbleTransferLen=06
RumbleTransfers=1
9 changes: 8 additions & 1 deletion controllerconfigs/controller_ps4v2.ini
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,11 @@ StickY=2
CStickX=3
CStickY=4
LAnalog=8
RAnalog=9
RAnalog=9
Rumble=1
RumbleType=1
RumbleDataLen=06
RumbleDataOn=05,01,00,00,FF,FF
RumbleDataOff=05,01,00,00,00,00
RumbleTransferLen=06
RumbleTransfers=1
29 changes: 29 additions & 0 deletions controllerconfigs/controller_ps5_edge.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
[DualSense Edge]
VID=054C
PID=0DF2
Polltype=1
DPAD=1
DigitalLR=2
Power=9,10
A=8,40
B=8,20
X=8,80
Y=8,10
Z=9,02
L=9,04
R=9,08
S=9,20
Left=8,06
Down=8,04
Right=8,02
Up=8,00
RightUp=8,01
DownRight=8,03
DownLeft=8,05
UpLeft=8,07
StickX=1
StickY=2
CStickX=3
CStickY=4
LAnalog=5
RAnalog=6
Binary file modified controllerconfigs/controllers.zip
Binary file not shown.
14 changes: 0 additions & 14 deletions kernel/DI.c
Original file line number Diff line number Diff line change
Expand Up @@ -590,13 +590,6 @@ void DIUpdateRegisters( void )
#endif
memcpy( NetworkCMDBuffer + roffset, (void*)Buffer, Length );
}
// Max GC disc offset
if( Offset >= 0x57058000 )
{
dbgprintf("Unhandled Media Board Write\n");
dbgprintf("GCAM:Write( 0x%08x, 0x%08x, 0x%08x )\n", Offset, Length, Buffer|0x80000000 );
Shutdown();
}
DIOK = 2;
} break;
case 0xAB:
Expand Down Expand Up @@ -758,13 +751,6 @@ void DIUpdateRegisters( void )
}
else
{
// Max GC disc offset
if( Offset >= 0x57058000 )
{
dbgprintf("Unhandled Read\n");
dbgprintf("DIP:DVDRead%02X( 0x%08x, 0x%08x, 0x%08x )\n", DIcommand, Offset, Length, rawAddr );
Shutdown();
}
if( Buffer < 0x01800000 || // Valid GC Buffer
rawAddr == 0x931C1800 ) //PSO Ep.III Hack
{
Expand Down
3 changes: 3 additions & 0 deletions kernel/HID.c
Original file line number Diff line number Diff line change
Expand Up @@ -724,6 +724,9 @@ static s32 HIDInterruptMessage(u32 isKBreq, u8 *Data, u32 Length, u32 Endpoint,
}
void HIDGCInit()
{
// Needed for some adapters clone
HIDControlMessage(0, NULL, 0, USB_REQTYPE_INTERFACE_SET, USB_REQ_SETPROTOCOL, 1, 0, NULL);

s32 ret = HIDInterruptMessage(0, gcbuf, 1, bEndpointAddressOut, 0, NULL);
if( ret < 0 )
{
Expand Down
7 changes: 7 additions & 0 deletions kernel/HID_controllers.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,16 @@ u8 RumbleDataOn_0079_0006[14] = { 0x51, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0xfa
u8 RumbleDataOff_0079_0006[14] = { 0x51, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfa, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00 };
u8 RumbleDataOn_0810_0001[5] = { 0x01, 0x00, 0x00, 0x7f, 0x7f };
u8 RumbleDataOff_0810_0001[5] = { 0x01, 0x00, 0x00, 0x00, 0x00 };
u8 RumbleDataOn_054C_05C4[6] = { 0x05, 0x01, 0x00, 0x00, 0xff, 0xff };
u8 RumbleDataOff_054C_05C4[6] = { 0x05, 0x01, 0x00, 0x00, 0x00, 0x00 };
u8 RumbleDataOn_054C_09CC[6] = { 0x05, 0x01, 0x00, 0x00, 0xff, 0xff };
u8 RumbleDataOff_054C_09CC[6] = { 0x05, 0x01, 0x00, 0x00, 0x00, 0x00 };


rumble DefRumble[] = {
{ 0x0079, 0x0006, 1, 14, 2, 7, RumbleDataOn_0079_0006, RumbleDataOff_0079_0006 },
{ 0x054C, 0x05C4, 1, 6, 1, 6, RumbleDataOn_054C_05C4, RumbleDataOff_054C_05C4 },
{ 0x054C, 0x09CC, 1, 6, 1, 6, RumbleDataOn_054C_09CC, RumbleDataOff_054C_09CC },
{ 0x0810, 0x0001, 0, 5, 1, 5, RumbleDataOn_0810_0001, RumbleDataOff_0810_0001 },
};

Expand Down
9 changes: 5 additions & 4 deletions kernel/Patch.c
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,7 @@ static void Patch31A0( void )
u32 CurBuf = read32(0x319C);
//create jump for it
PatchB(PatchOffset, 0x319C);
sync_after_write((void *)0x319C, 4);
if ((CurBuf & 0xFC000002) == 0x40000000)
{
u32 Orig = CurBuf;
Expand Down Expand Up @@ -1444,7 +1445,7 @@ void DoPatches( char *Buffer, u32 Length, u32 DiscOffset )
PatchBL(PatchCopy(SonicRidersCopy, SonicRidersCopy_size), SONICRIDERS_HOOK_PAL);
dbgprintf("Patch:Patched Sonic Riders _Main.rel PAL\r\n");
} /* Agressive Timer Patches for Nintendo Puzzle Collection */
else if( (GAME_ID) == 0x47505A4A && useipl == 0 )
else if( (TITLE_ID) == 0x47505A && useipl == 0 )
{
u32 t;
for(t = 0; t < Length; t+=4) //make sure its patched at all times
Expand Down Expand Up @@ -1698,7 +1699,7 @@ void DoPatches( char *Buffer, u32 Length, u32 DiscOffset )
{
if(TITLE_ID == 0x474D34 || TITLE_ID == 0x474B59 || TITLE_ID == 0x475445)
bbaEmuWanted = 1;
else if(GAME_ID == 0x4748454A || isPSO)
else if(TITLE_ID == 0x474845 || isPSO)
bbaEmuWanted = 2;
}
else
Expand Down Expand Up @@ -3885,7 +3886,7 @@ void DoPatches( char *Buffer, u32 Length, u32 DiscOffset )
write32(SO_HSP_LOC+0x18, SOShift << 16 | SOCurrentTotalFDs);
write32(SO_HSP_LOC+0x1C, 0); //needs to be inited
sync_after_write((void*)SO_HSP_LOC, 0x20);
if(GAME_ID == 0x4748454A)
if(TITLE_ID == 0x474845)
{
if(read32(0x6E88) == 0x4804E39D)
{
Expand All @@ -3901,7 +3902,7 @@ void DoPatches( char *Buffer, u32 Length, u32 DiscOffset )
}
}
}
else if(GAME_ID == 0x4748454A && read32(0x5DD4) == 0x480AF13D)
else if(TITLE_ID == 0x474845 && read32(0x5DD4) == 0x480AF13D)
{
write32(0x5DCC, 0x3C600402);
write32(0x5DD0, 0x60630200);
Expand Down
1 change: 1 addition & 0 deletions kernel/PatchCodes.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
#include "asm/SOClose.h"
#include "asm/SOListen.h"
#include "asm/SOAccept.h"
#include "asm/SOConnect.h"
#include "asm/SOBind.h"
#include "asm/SOShutdown.h"
#include "asm/SORecvFrom.h"
Expand Down
8 changes: 8 additions & 0 deletions kernel/asm/SOConnect.S
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#include <asm.h>
.include "constants.inc"

SOConnect:
lis 0, SOConnectAddr@h
ori 0, 0, SOConnectAddr@l
mtctr 0
bctr
1 change: 1 addition & 0 deletions kernel/asm/constants.inc
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
.set DHCP_get_gateway_Addr, IOSInterfaceAddr+0xA4
.set DHCP_get_dns_Addr, IOSInterfaceAddr+0xA8
.set DHCP_release_Addr, IOSInterfaceAddr+0xAC
.set SOConnectAddr, IOSInterfaceAddr+0xB0

/** Disc Interface **/

Expand Down
1 change: 1 addition & 0 deletions kernel/patches.c
Original file line number Diff line number Diff line change
Expand Up @@ -586,6 +586,7 @@ static FuncPattern NinSOPatterns[] =
{ 0x30C, 69, 11, 27, 23, 10, SOCleanup, SOCleanup_size, "SOCleanup", "B", FGROUP_SOCleanup, 0 },
{ 0x668, 133, 17, 45, 50, 16, SOSocket, SOSocket_size, "SOSocket", NULL, FGROUP_NONE, 0 },
{ 0x454, 82, 23, 26, 28, 23, SOClose, SOClose_size, "__SOClose", NULL, FGROUP_NONE, 0 },
{ 0x154, 13, 13, 13, 13, 1, SOConnect, SOConnect_size, "SOConnect", NULL, FGROUP_NONE, 0 },
{ 0x128, 15, 6, 4, 21, 3, SOListen, SOListen_size, "SOListen", NULL, FGROUP_NONE, 0 },
{ 0x2BC, 44, 15, 18, 29, 6, SOAccept, SOAccept_size, "SOAccept", NULL, FGROUP_NONE, 0 },
{ 0x120, 15, 4, 5, 25, 5, SOBind, SOBind_size, "SOBind", NULL, FGROUP_NONE, 0 },
Expand Down
Binary file added loader/boot.dol
Binary file not shown.
1 change: 1 addition & 0 deletions loader/include/menu.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ typedef enum
GIFLAG_FORMAT_FST = (2 << 0), // Extracted FST
GIFLAG_FORMAT_CISO = (3 << 0), // CISO format
GIFLAG_FORMAT_MULTI = (4 << 0), // Multi-game disc
GIFLAG_FORMAT_OVER = (5 << 0), // Oversized
GIFLAG_FORMAT_MASK = (7 << 0),

// Game region. (from bi2.bin)
Expand Down
Binary file modified loader/loader.dol
Binary file not shown.
2 changes: 1 addition & 1 deletion loader/source/ShowGameInfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ static void DrawGameInfoScreen(const gameinfo *gi, const MD5VerifyState_t *md5)
"Extracted FST",
"Compressed ISO (Hermes uLoader format)",
"Multi-Game Disc",
"Unknown (5)",
"Oversized",
"Unknown (6)",
"Unknown (7)",
};
Expand Down
8 changes: 7 additions & 1 deletion loader/source/menu.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ const u32 DiscFormatColors[8] =
0x00551AFF, // Extracted FST
0x001A55FF, // CISO
0x551A55FF, // Multi-Game
GRAY, // undefined
0x55551AFF, // Oversized (dark yellow)
GRAY, // undefined
GRAY, // undefined
};
Expand Down Expand Up @@ -193,6 +193,11 @@ static bool IsDiscImageValid(const char *filename, int discNumber, gameinfo *gi)
// Full 1:1 GameCube image.
gi->Flags = GIFLAG_FORMAT_FULL;
}
else if (in.obj.objsize > 1459978240)
{
// Oversized GameCube image.
gi->Flags = GIFLAG_FORMAT_OVER;
}
else
{
// Shrunken GameCube image.
Expand Down Expand Up @@ -735,6 +740,7 @@ static bool UpdateGameSelectMenu(MenuCtx *ctx)
PrintFormat(DEFAULT_SIZE, DiscFormatColors[2], MENU_POS_X+(21*10), MENU_POS_Y + 20*3, "FST");
PrintFormat(DEFAULT_SIZE, DiscFormatColors[3], MENU_POS_X+(25*10), MENU_POS_Y + 20*3, "CISO");
PrintFormat(DEFAULT_SIZE, DiscFormatColors[4], MENU_POS_X+(30*10), MENU_POS_Y + 20*3, "Multi");
PrintFormat(DEFAULT_SIZE, DiscFormatColors[5], MENU_POS_X+(36*10), MENU_POS_Y + 20*3, "Over");

// Starting position.
int gamelist_y = MENU_POS_Y + 20*5 + 10;
Expand Down
2 changes: 2 additions & 0 deletions loader/source/ppc/IOSInterface/source/_crt0.S
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
.extern DHCP_get_gateway
.extern DHCP_get_dns
.extern DHCP_release
.extern SOConnect

.globl __start
__start:
Expand Down Expand Up @@ -95,6 +96,7 @@ __start:
b DHCP_get_gateway
b DHCP_get_dns
b DHCP_release
b SOConnect

# just some helper functions
.globl disableIRQs
Expand Down
Loading