Skip to content
This repository has been archived by the owner on Jul 3, 2024. It is now read-only.

Commit

Permalink
Added padcon with holding r-click
Browse files Browse the repository at this point in the history
+ Changed app name to "SwapDRC"
+ Revamped quick guide in app menu
  • Loading branch information
yahya14 committed Jul 25, 2017
1 parent 808aca7 commit b325df8
Show file tree
Hide file tree
Showing 6 changed files with 60 additions and 40 deletions.
20 changes: 14 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Swap DRC for TV-Only Wii U Games
# SwapDRC for TV-Only Wii U Games

Introducing Swap DRC, a homebrew application that allows you to play TV-only Wii U games on your GamePad screen.
Introducing SwapDRC, a homebrew application that allows you to play TV-only Wii U games on your GamePad screen.

Swap DRC works by switching the display buffers for the TV and the GamePad with a press of a button. This app also includes the TCPGecko and Cafiine installers for other mods or hacks. The GamePad sensor bar can also be turned on when the TV display is on the GamePad screen, so playing with Wiimotes with just the GamePad is possible.
SwapDRC works by switching the display buffers for the TV and the GamePad with a press of a button. This app also includes the TCPGecko and Cafiine installers for other mods or hacks. The GamePad sensor bar can also be turned on when the TV display is on the GamePad screen, so playing with Wiimotes with just the GamePad is possible.

Update v1.1: Audio swapping support is now available!

Expand All @@ -12,6 +12,14 @@ To swap the TV and GamePad screens, press and hold the **L shoulder button**, th

If you're playing with Splatoon's enhanced swapping controls:

#### Switch Display, Audio, and Gamepad Sensor Bar:
+ Press L and Minus together.
+ Press the TV button.

#### Switch on/off Gamepad LCD:
+ Press and hold R-Stick for 3 seconds.

#### Splatoon's Enhanced Controls:
+ Press **B** to switch screens except in-game menus.
+ Hold **A** + **D-Pad** in any direction to super jump to a teammate or the spawn point during a match.

Expand Down Expand Up @@ -42,7 +50,7 @@ If you're playing with Splatoon's enhanced swapping controls:

3. Safely remove the SD card and insert it into your Wii U, then launch the Homebrew Launcher from the [Loadiine.ovh](http://loadiine.ovh) website in your Wii U browser. If you have the [Haxchi](https://gbatemp.net/threads/haxchi-v2-0-a-persistent-wiiu-hack.451071/) Homebrew Launcher, that works too.

4. Press **A** to install Swap DRC with TCPGecko, or press **Y** to install Swap DRC with TCPGecko + Cafiine (a cafiine server on your computer is required)
4. Launch SwapDRC, then press **A** to install SwapDRC with TCPGecko, or press **Y** to install SwapDRC with TCPGecko + Cafiine (a cafiine server on your computer is required)

5. You're done! You can now switch displays anywhere (but not in the settings menu, as it re-launches the entire System Menu).

Expand All @@ -59,7 +67,7 @@ If you're playing with Splatoon's enhanced swapping controls:
"Install TCPGecko only" option, Cafiine requires you to have a server running on your computer at all
times. Don't use this if you don't want to use game file mods and have the computer running all the time.

### Can I get you banned playing online with Swap DRC in any game?
### Can I get you banned playing online with SwapDRC in any game?

Swapping displays doesn't modify the games directly but through CafeOS instead. Therefore, it is 100%
safe. However, you can still get banned with TCPGecko and/or Caffine mods if you don't use them properly.
Expand All @@ -83,4 +91,4 @@ If you're playing with Splatoon's enhanced swapping controls:
+ Dimok for function_hooks and the pygecko server
+ Brienj for the IP selector and initial UI
+ /u/MachMatic for the banner background
+ BKOOL999 for feedback & testing the Swap DRC app
+ BKOOL999 for feedback & testing the SwapDRC app
6 changes: 3 additions & 3 deletions meta/meta.xml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<app version="1">
<name>Swap DRC</name>
<name>SwapDRC</name>
<coder>OatmealDome and Yahya14</coder>
<url>https://gbatemp.net/threads/swap-drc-for-tv-only-wii-u-games.478026/#post-7458492</url>
<version>1.2</version>
<version>1.3</version>
<release_date>201707190000000</release_date>
<short_description>Switch TV display onto the gamepad</short_description>
<long_description>This tool installs Swap DRC TCPGecko and/or Cafiine into system memory.
<long_description>This tool installs SwapDRC, Padcon, TCPGecko and/or Cafiine into system memory.

Switch the TV and gamepad display and the DRC sensor bar by holding the L shoulder button and then press MINUS. Pressing the TV button also works.

Expand Down
41 changes: 14 additions & 27 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#define PRINT_TEXT2(x, y, ...) { snprintf(msg, 80, __VA_ARGS__); OSScreenPutFontEx(0, x, y, msg); OSScreenPutFontEx(1, x, y, msg); }
#define PRINT_TEXT3(x, y, _fmt, ...) { __os_snprintf(msg, 80, _fmt, __VA_ARGS__); OSScreenPutFontEx(1, x, y, msg); }

#define BUILD 1.2
#define BUILD 1.3

u8 isFirstBoot __attribute__((section(".data"))) = 1;

Expand Down Expand Up @@ -187,15 +187,15 @@ int Menu_Main()
VPADRead(0, &vpad_data, 1, &error);

// Title
PRINT_TEXT2(20, 1, "-- Swap DRC v%.1f --", BUILD);
PRINT_TEXT2(21, 1, "-- SwapDRC v%.1f --", BUILD);

if (gui_mode == 0) // IP selector
{
PRINT_TEXT2(0, 4, " IP : %3d.%3d.%3d.%3d", ip.digit[0], ip.digit[1], ip.digit[2], ip.digit[3]);
PRINT_TEXT2(0, 6, "Use the D-Pad to enter in your computer's IP address for Cafiine.");
PRINT_TEXT2(0, 8, "Press A to install with TCPGecko.");
PRINT_TEXT2(0, 9, "Press Y to install with TCPGecko + Cafiine. (needs server running)");
PRINT_TEXT2(0, 11, "Press B to view guide.");
PRINT_TEXT2(0, 11, "Press B to view quick guide.");
PRINT_TEXT2(0, 12, "Press X for credits.");
PRINT_TEXT2(0, 15, "Press Home to exit.");

Expand All @@ -206,41 +206,28 @@ int Menu_Main()
else if (gui_mode == 1) // Credits
{
PRINT_TEXT2(0, 3, "Creators:");
PRINT_TEXT2(2, 5, "* Oatmealdome and Yahya14");
PRINT_TEXT2(2, 5, "* OatmealDome and Yahya14");
PRINT_TEXT2(0, 7, "Special Thanks:");
PRINT_TEXT2(2, 9, "* Maschell for development contribution and the audio swap");
PRINT_TEXT2(2, 10, "* Dimok, Chadderz, etc for function_hooks and pygecko");
PRINT_TEXT2(2, 11, "* brienj for the IP selector and initial UI");
PRINT_TEXT2(2, 12, "* /u/MachMatic for the banner background");
PRINT_TEXT2(2, 13, "* BKOOL999 for testing the Swap DRC app");
PRINT_TEXT2(2, 13, "* BKOOL999 for testing the SwapDRC app");
PRINT_TEXT2(0, 15, "Press B to return to the menu.");
}

else if (gui_mode == 2) // Guide
{
PRINT_TEXT2(0, 2, " ___ ___ ");
PRINT_TEXT2(0, 3, " ------------------------------------- ");
PRINT_TEXT2(0, 3, "/ \\");
PRINT_TEXT2(0, 4, "| _________________ |");
PRINT_TEXT2(0, 5, "| _ | | |");
PRINT_TEXT2(0, 6, "| _| |_ | | O |");
PRINT_TEXT2(0, 7, "| |_ _| | | O O |");
PRINT_TEXT2(0, 8, "| |_| | | O |");
PRINT_TEXT2(0, 9, "| | | + |");
PRINT_TEXT2(0, 9, "| _________________ |");
PRINT_TEXT2(0,10, "| ~ - |");
PRINT_TEXT2(0,11, "|_____________________________________|");

PRINT_TEXT2(0, 1, " |||");
PRINT_TEXT2(0, 2, " vvv");
PRINT_TEXT2(0,10, " <---");


PRINT_TEXT2(0, 13, "Hold L then press Minus to swap displays.");
PRINT_TEXT2(0, 14, "You can also press the TV button.");
PRINT_TEXT2(0, 15, "Press B to return to the menu.");

PRINT_TEXT2(0, 3, "Switch Display, Audio, and Gamepad Sensor Bar:");
PRINT_TEXT2(2, 4, "* Press L and Minus together.");
PRINT_TEXT2(2, 5, "* Press the TV button.");
PRINT_TEXT2(0, 7, "Switch on/off Gamepad LCD:");
PRINT_TEXT2(2, 8, "* Press and hold R-Stick for 3 seconds.");
PRINT_TEXT2(0, 10, "Splatoon's Enhanced Controls:");
PRINT_TEXT2(2, 11, "* Press B to swap displays except in-game menus.");
PRINT_TEXT2(2, 12, "* Hold A + D-PAD to super jump to a teammate in a match.");

PRINT_TEXT2(0, 15, "Press B to return to the menu.");
}

if ((vpad_data.btns_h & VPAD_BUTTON_A) && gui_mode == 0)
Expand Down
29 changes: 25 additions & 4 deletions src/patcher/vpad_function_patcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,43 @@ DECL(int, VPADRead, int chan, VPADData *buffer, u32 buffer_size, s32 *error) {
int result = real_VPADRead(chan, buffer, buffer_size, error);
if(result <= 0) return result;

uint32_t bCombo[2] = {
uint32_t hCombo[2] = {
buffer[0].btns_h & (VPAD_BUTTON_MINUS | VPAD_BUTTON_L),
buffer[0].btns_h & VPAD_BUTTON_TV
};

// switch on L and SELECT and TV button
if (((bCombo[0] == (VPAD_BUTTON_MINUS | VPAD_BUTTON_L)) ||
(bCombo[1] == VPAD_BUTTON_TV)) && (
if (((hCombo[0] == (VPAD_BUTTON_MINUS | VPAD_BUTTON_L)) ||
(hCombo[1] == VPAD_BUTTON_TV)) && (
gHomeCoolDown == 0 && (gAppStatus != 2))) {
gHomeCoolDown = bCombo[0]? 0x1E : 0x48;
gHomeCoolDown = hCombo[0]? 0x1E : 0x48;
drcSwap();
}
else if (gHomeCoolDown > 0) {
gHomeCoolDown--;
}

// switch on/off gamepad screen
if (buffer[0].btns_h & VPAD_BUTTON_STICK_R) {
if (gLCDDelay == 0xB4) {
VPADGetLcdMode(0, &gLCDMode);
if (gLCDMode != 1) {
VPADSetLcdMode(0, 1); // Turn it off
}
else {
VPADSetLcdMode(0, 0xFF); // Turn it on
}

// reset delay
gLCDDelay = 0;
}
gLCDDelay++;
}
else {
gLCDDelay = 0;
}


// patches splatoon enhanced controls
if (isSplatoon) {
gambitPatches(buffer);
Expand Down
2 changes: 2 additions & 0 deletions src/retain_vars.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ int isSplatoon __attribute__((section(".data"))) = 0;
int drcMode __attribute__((section(".data"))) = 0;
uint32_t gAppStatus __attribute__((section(".data"))) = 0;
int gHomeCoolDown __attribute__((section(".data"))) = 0;
int gLCDDelay __attribute__((section(".data"))) = 0;
s32 gLCDMode __attribute__((section(".data"))) = 0;

uint32_t cafiine_addr __attribute__((section(".data"))) = 0;
VoiceInfo gVoiceInfos[VOICE_INFO_MAX] __attribute__((section(".data")));
Expand Down
2 changes: 2 additions & 0 deletions src/retain_vars.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ extern int isSplatoon;
extern int drcMode;
extern uint32_t gAppStatus;
extern int gHomeCoolDown;
extern int gLCDDelay;
extern s32 gLCDMode;

extern uint32_t cafiine_addr;

Expand Down

0 comments on commit b325df8

Please sign in to comment.