Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: Fledge68/WiiFlow_Lite
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v5.5.2
Choose a base ref
...
head repository: Fledge68/WiiFlow_Lite
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Loading
Showing with 12,384 additions and 8,450 deletions.
  1. +15 −15 .github/workflows/main.yml
  2. +5 −1 README.md
  3. BIN data/images/wfsplash.png
  4. BIN out/bins/app_booter.bin
  5. BIN out/bins/ext_booter.bin
  6. BIN out/boot.dol
  7. +2 −2 portlibs/include/libfatversion.h
  8. BIN portlibs/lib/libcustomfat.a
  9. +1 −1 resources/app_booter/Makefile
  10. +4 −1 resources/wiiflow_game_booter/source/ChannelHandler.cpp
  11. +1 −1 resources/wiiflow_game_booter/source/ChannelHandler.hpp
  12. +1 −0 resources/wiiflow_game_booter/source/Config.hpp
  13. +31 −24 resources/wiiflow_game_booter/source/apploader.c
  14. +8 −1 resources/wiiflow_game_booter/source/apploader.h
  15. +6 −3 resources/wiiflow_game_booter/source/disc.c
  16. +4,193 −0 resources/wiiflow_game_booter/source/kirbypatch.c
  17. +8 −0 resources/wiiflow_game_booter/source/kirbypatch.h
  18. +3 −3 resources/wiiflow_game_booter/source/main.cpp
  19. +53 −5 resources/wiiflow_game_booter/source/patchcode.c
  20. +1 −0 resources/wiiflow_game_booter/source/patchcode.h
  21. +1 −0 source/booter/Config.h
  22. +3 −2 source/booter/external_booter.cpp
  23. +1 −1 source/booter/external_booter.hpp
  24. +1 −0 source/channel/identify.c
  25. +1 −1 source/channel/nand.cpp
  26. +5 −0 source/channel/nand.hpp
  27. +31 −3 source/channel/nand_save.cpp
  28. +1 −0 source/channel/nand_save.hpp
  29. +10 −0 source/config/config.cpp
  30. +1 −0 source/config/config.hpp
  31. +7 −1 source/defines.h
  32. +3 −1 source/devicemounter/DeviceHandler.cpp
  33. +19 −13 source/devicemounter/PartitionHandle.cpp
  34. +23 −0 source/devicemounter/usbstorage_libogc.c
  35. +1 −1 source/gc/gcdisc.cpp
  36. +4 −0 source/gecko/gecko.cpp
  37. +79 −7 source/gui/coverflow.cpp
  38. +4 −2 source/gui/coverflow.hpp
  39. +134 −131 source/gui/gui.cpp
  40. +1 −3 source/gui/gui.hpp
  41. +12 −7 source/gui/text.cpp
  42. +2 −2 source/gui/text.hpp
  43. +10 −1 source/gui/texture.cpp
  44. +0 −13 source/gui/video.cpp
  45. +0 −1 source/gui/video.hpp
  46. +14 −13 source/homebrew/homebrew.cpp
  47. +1 −1 source/hw/aes.c
  48. +1 −1 source/hw/aes.h
  49. +2 −2 source/libwbfs/wiidisc.c
  50. +90 −37 source/list/ListGenerator.cpp
  51. +2 −2 source/list/ListGenerator.hpp
  52. +11 −14 source/loader/cios.c
  53. +3 −2 source/loader/disc.h
  54. +973 −973 source/loader/ehcmodule_5.c
  55. +25 −41 source/loader/mload_modules.c
  56. +571 −299 source/loader/odip_frag.c
  57. +2 −0 source/loader/sys.h
  58. +21 −72 source/main.cpp
  59. +273 −259 source/menu/menu.cpp
  60. +389 −676 source/menu/menu.hpp
  61. +2 −2 source/menu/menu_about.cpp
  62. +0 −209 source/menu/menu_boot.cpp
  63. +40 −84 source/menu/menu_categories.cpp
  64. +143 −148 source/menu/menu_cheat.cpp
  65. +4 −2 source/menu/menu_code.cpp
  66. +0 −249 source/menu/menu_config.cpp
  67. +0 −167 source/menu/menu_config3.cpp
  68. +0 −180 source/menu/menu_config4.cpp
  69. +0 −468 source/menu/menu_config7.cpp
  70. +0 −229 source/menu/menu_config_adv.cpp
  71. +166 −0 source/menu/menu_config_boot.cpp
  72. +34 −69 source/menu/menu_config_coverbnr.cpp
  73. +552 −1,195 source/menu/menu_config_game.cpp
  74. +92 −206 source/menu/menu_config_gc.cpp
  75. +732 −0 source/menu/menu_config_gc_game.cpp
  76. +55 −106 source/menu/menu_config_hb.cpp
  77. +1,071 −0 source/menu/menu_config_main.cpp
  78. +0 −154 source/menu/menu_config_screen.cpp
  79. +45 −90 source/menu/menu_config_source.cpp
  80. +0 −176 source/menu/menu_configsnd.cpp
  81. +240 −304 source/menu/menu_download.cpp
  82. +26 −30 source/menu/menu_error.cpp
  83. +76 −46 source/menu/menu_game.cpp
  84. +123 −75 source/menu/menu_game_boot.cpp
  85. +5 −5 source/menu/menu_gameinfo.cpp
  86. +88 −67 source/menu/menu_home.cpp
  87. +126 −170 source/menu/menu_main.cpp
  88. +440 −618 source/menu/menu_nandemu.cpp
  89. +74 −132 source/menu/menu_partitions.cpp
  90. +50 −76 source/menu/menu_paths.cpp
  91. +51 −67 source/menu/menu_plugin.cpp
  92. +69 −76 source/menu/menu_sm_editor.cpp
  93. +52 −16 source/menu/menu_source.cpp
  94. +92 −13 source/menu/menu_wad.cpp
  95. +20 −11 source/menu/menu_wbfs.cpp
  96. +4 −1 source/music/MusicPlayer.cpp
  97. +5 −0 source/plugin/plugin.cpp
  98. +1 −0 source/plugin/plugin.hpp
  99. +2 −2 wii/apps/wiiflow/meta.xml
  100. +6 −2 wii/wiiflow/Languages/brazilian.ini
  101. +2 −2 wii/wiiflow/Languages/chinese_s.ini
  102. +2 −2 wii/wiiflow/Languages/chinese_t.ini
  103. +2 −2 wii/wiiflow/Languages/danish.ini
  104. +6 −2 wii/wiiflow/Languages/dutch.ini
  105. +39 −39 wii/wiiflow/Languages/english.ini
  106. +6 −2 wii/wiiflow/Languages/french.ini
  107. +41 −51 wii/wiiflow/Languages/german.ini
  108. +6 −2 wii/wiiflow/Languages/italian.ini
  109. +2 −2 wii/wiiflow/Languages/japanese.ini
  110. +60 −60 wii/wiiflow/Languages/korean.ini
  111. +6 −2 wii/wiiflow/Languages/polish.ini
  112. +542 −132 wii/wiiflow/Languages/russian.ini
  113. +61 −68 wii/wiiflow/Languages/spanish.ini
  114. +59 −0 wii/wiiflow/help/russian.txt
30 changes: 15 additions & 15 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -4,44 +4,44 @@ on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Cache
id: cache-2
uses: actions/cache@v2
id: cache-1
uses: actions/cache@v3
with:
path: cache
key: ${{ runner.os }}-cache-2
key: ${{ runner.os }}-cache-1

- name: Download devkitPPC r39, libogc 2.3.1 and required tools
if: steps.cache-2.outputs.cache-hit != 'true'
- name: Download devkitPPC r42.2-1, libogc 2.4.0 and required tools
if: steps.cache-1.outputs.cache-hit != 'true'
# general-tools is needed for bin2s and gamecube-tools is needed for elf2dol
run: |
mkdir cache && cd cache
wget "https://wii.leseratte10.de/devkitPro/file.php/devkitPPC-r39-2-linux_x86_64.pkg.tar.xz"
wget "https://wii.leseratte10.de/devkitPro/file.php/devkitPPC-r42.2-1-linux_x86_64.pkg.tar.zst"
wget "https://wii.leseratte10.de/devkitPro/file.php/devkitppc-rules-1.1.1-1-any.pkg.tar.xz"
wget "https://wii.leseratte10.de/devkitPro/file.php/libogc-2.3.1-1-any.pkg.tar.xz"
wget "https://wii.leseratte10.de/devkitPro/file.php/libogc-2.4.0-1-any.pkg.tar.zst"
wget "https://wii.leseratte10.de/devkitPro/file.php/general-tools-1.2.0-2-linux_x86_64.pkg.tar.xz"
wget "https://wii.leseratte10.de/devkitPro/file.php/gamecube-tools-1.0.3-1-linux_x86_64.pkg.tar.xz"
cd ..
- name: Extract downloaded files
# general-tools is needed for bin2s and gamecube-tools is needed for elf2dol
run: |
tar -xf cache/devkitPPC-r39-2-linux_x86_64.pkg.tar.xz --strip-components=1
tar -xf cache/devkitPPC-r42.2-1-linux_x86_64.pkg.tar.zst --strip-components=1
tar -xf cache/devkitppc-rules-1.1.1-1-any.pkg.tar.xz --strip-components=1
tar -xf cache/libogc-2.3.1-1-any.pkg.tar.xz --strip-components=1
tar -xf cache/libogc-2.4.0-1-any.pkg.tar.zst --strip-components=1
tar -xf cache/general-tools-1.2.0-2-linux_x86_64.pkg.tar.xz --strip-components=1
tar -xf cache/gamecube-tools-1.0.3-1-linux_x86_64.pkg.tar.xz --strip-components=1
- name: Compile
run: |
PATH=$(pwd)/devkitpro/devkitPPC/bin:$PATH DEVKITPPC=$(pwd)/devkitpro/devkitPPC DEVKITPRO=$(pwd)/devkitpro make
- name: Package
id: pack
run: |
cp -r wii/apps apps
mkdir -p apps/wiiflow/
@@ -51,12 +51,12 @@ jobs:
mkdir -p wiiflow
cp -r wii/wiiflow/Languages wiiflow/languages
cp -r wii/wiiflow/themes_lite wiiflow/themes_lite
echo "::set-output name=sha::$(echo ${GITHUB_SHA} | head -c 7)"
echo "sha=$(git rev-parse --short=7 HEAD)" >> $GITHUB_ENV
- name: Upload binaries
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: wiiflow_lite_${{ steps.pack.outputs.sha }}
name: wiiflow_lite_${{ env.sha }}
path: |
apps
wiiflow
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -22,6 +22,10 @@ Other wiiflow lite themes can be found on the wiki linked below. but they need t
## Useful Links
[WiiFlow Lite GBATemp thread](https://gbatemp.net/threads/wiiflow-lite.422685/)

[WiiFlow Wiki](https://sites.google.com/site/wiiflowiki4/)
[WiiFlow Wiki](https://web.archive.org/web/20220414124727/https://sites.google.com/site/wiiflowiki4/)

[Newer Wiki WIP](https://sites.google.com/view/wiiflow-wiki/welcome)

[Github Wiki](https://github.com/Fledge68/WiiFlow_Lite/wiki)

[Old Sourceforge Project Repository](https://sourceforge.net/projects/wiiflow-lite/)
Binary file removed data/images/wfsplash.png
Binary file not shown.
Binary file modified out/bins/app_booter.bin
Binary file not shown.
Binary file modified out/bins/ext_booter.bin
Binary file not shown.
Binary file modified out/boot.dol
Binary file not shown.
4 changes: 2 additions & 2 deletions portlibs/include/libfatversion.h
Original file line number Diff line number Diff line change
@@ -3,8 +3,8 @@

#define _LIBFAT_MAJOR_ 1
#define _LIBFAT_MINOR_ 1
#define _LIBFAT_PATCH_ 1
#define _LIBFAT_PATCH_ 5

#define _LIBFAT_STRING "libFAT Release 1.1.1"
#define _LIBFAT_STRING "libFAT Release 1.1.5"

#endif // __LIBFATVERSION_H__
Binary file modified portlibs/lib/libcustomfat.a
Binary file not shown.
2 changes: 1 addition & 1 deletion resources/app_booter/Makefile
Original file line number Diff line number Diff line change
@@ -37,7 +37,7 @@ INCLUDES :=
#---------------------------------------------------------------------------------
MACHDEP := -mno-eabi -mno-sdata -mcpu=750
CFLAGS := -Wall -W -O1 -ffreestanding -std=gnu99 -Wstrict-aliasing=2 $(MACHDEP) $(INCLUDE)
LDFLAGS := -nostartfiles -nostdlib $(MACHDEP)
LDFLAGS := -nostartfiles -nostdlib $(MACHDEP) -Wl,--no-warn-rwx-segments

#---------------------------------------------------------------------------------
# move loader to another location - THANKS CREDIAR - 0x81330000 for HBC
5 changes: 4 additions & 1 deletion resources/wiiflow_game_booter/source/ChannelHandler.cpp
Original file line number Diff line number Diff line change
@@ -206,7 +206,7 @@ u32 LoadChannel(u64 title, bool dol, u32 *IOS)
}

void PatchChannel(u8 vidMode, GXRModeObj *vmode, bool vipatch, bool countryString, u8 patchVidModes, int aspectRatio,
u32 returnTo, u8 private_server, const char *server_addr, bool patchFix480p, u8 deflicker, u8 bootType)
u32 returnTo, u8 private_server, const char *server_addr, u8 videoWidth, bool patchFix480p, u8 deflicker, u8 bootType)
{
u8 vfilter_off[7] = {0, 0, 21, 22, 21, 0, 0};
u8 vfilter_low[7] = {4, 4, 16, 16, 16, 4, 4};
@@ -232,6 +232,9 @@ void PatchChannel(u8 vidMode, GXRModeObj *vmode, bool vipatch, bool countryStrin
if(hooktype != 0 && hookpatched == false)
hookpatched = dogamehooks(dolchunkoffset[i], dolchunksize[i], true);

if (videoWidth == WIDTH_FRAMEBUFFER)
patch_width(dolchunkoffset[i], dolchunksize[i]);

if (deflicker == DEFLICKER_ON_LOW)
{
patch_vfilters(dolchunkoffset[i], dolchunksize[i], vfilter_low);
2 changes: 1 addition & 1 deletion resources/wiiflow_game_booter/source/ChannelHandler.hpp
Original file line number Diff line number Diff line change
@@ -14,7 +14,7 @@ typedef struct _dolheader
} ATTRIBUTE_PACKED dolheader;

void PatchChannel(u8 vidMode, GXRModeObj *vmode, bool vipatch, bool countryString, u8 patchVidModes, int aspectRatio,
u32 returnTo, u8 private_server, const char *server_addr, bool patchFix480p, u8 deflicker, u8 bootType);
u32 returnTo, u8 private_server, const char *server_addr, u8 videoWidth, bool patchFix480p, u8 deflicker, u8 bootType);
u32 LoadChannel(u64 title, bool dol, u32 *IOS);

extern bool isForwarder;
1 change: 1 addition & 0 deletions resources/wiiflow_game_booter/source/Config.hpp
Original file line number Diff line number Diff line change
@@ -49,6 +49,7 @@ struct the_CFG {
s8 aspectRatio;
bool patchFix480p;
u8 deflicker;
u8 videoWidth;
u8 private_server;
char server_addr[24];
u8 *cheats;
55 changes: 31 additions & 24 deletions resources/wiiflow_game_booter/source/apploader.c
Original file line number Diff line number Diff line change
@@ -13,6 +13,7 @@
#include "gecko.h"
#include "memory.h"
#include "video_tinyload.h"
#include "kirbypatch.h"

/* Apploader function pointers */
typedef int (*app_main)(void **dst, int *size, int *offset);
@@ -25,8 +26,8 @@ static u8 *appldr = (u8*)0x81200000;
static const char *GameID = (const char*)0x80000000;

/* Constants */
#define APPLDR_OFFSET 0x910
#define APPLDR_CODE 0x918
#define APPLDR_OFFSET 0x910// usblgx uses 0x2440 -huh?
#define APPLDR_CODE 0x918// usblgx uses APPLDR_OFFSET + 0x20 - huh?

void maindolpatches(void *dst, int len, u8 vidMode, GXRModeObj *vmode, bool vipatch, bool countryString, u8 patchVidModes, int aspectRatio,
u32 returnTo, bool patchregion, u8 private_server, const char *server_addr, u8 deflicker, u8 bootType);
@@ -38,18 +39,19 @@ static void NewSuperMarioBrosPatch();
static void Patch_23400_and_MKWii_vulnerability();
bool hookpatched = false;

// wiiflow uses a struct to hold the appldr hdr and usblgx uses a u32 buffer[32] array to hold it.
/* Thanks Tinyload */
static struct
{
char revision[16];
void *entry;
s32 size;
s32 trailersize;
s32 padding;
} apploader_hdr ATTRIBUTE_ALIGN(32);
char revision[16];//[0-3] 16 divided by 4 bytes = 4
void *entry;// [4] 4 bytes
s32 size;//[5] 4 bytes
s32 trailersize;// [6] 4 bytes
s32 padding;// [7] 4 bytes
} apploader_hdr ATTRIBUTE_ALIGN(32);// 16+4+4+4+4=32 bytes

u32 Apploader_Run(u8 vidMode, GXRModeObj *vmode, bool vipatch, bool countryString, u8 patchVidModes, int aspectRatio, u32 returnTo,
bool patchregion , u8 private_server, const char *server_addr, bool patchFix480p, u8 deflicker, u8 bootType)
bool patchregion , u8 private_server, const char *server_addr, u8 videoWidth, bool patchFix480p, u8 deflicker, u8 bootType)
{
//! Disable private server for games that still have official servers.
if(memcmp(GameID, "SC7", 3) == 0 || memcmp(GameID, "RJA", 3) == 0 ||
@@ -117,6 +119,12 @@ u32 Apploader_Run(u8 vidMode, GXRModeObj *vmode, bool vipatch, bool countryStrin
prog(20);
}
free_wip();

patch_kirby((u8 *)0x80000000);// can't be done during maindolpatches.

if(videoWidth == WIDTH_FRAMEBUFFER)
patch_width((void*)0x80000000, 0x900000);

if(hooktype != 0 && hookpatched)
ocarina_do_code();

@@ -152,35 +160,28 @@ void maindolpatches(void *dst, int len, u8 vidMode, GXRModeObj *vmode, bool vipa
u8 vfilter_medium[7] = {4, 8, 12, 16, 12, 8, 4};
u8 vfilter_high[7] = {8, 8, 10, 12, 10, 8, 8};

do_wip_code((u8 *)dst, len);
Remove_001_Protection(dst, len);
if(CurrentIOS.Type == IOS_TYPE_WANIN && CurrentIOS.Revision < 13)
Anti_002_fix(dst, len);
if((CurrentIOS.Type == IOS_TYPE_WANIN && CurrentIOS.Revision < 13) || CurrentIOS.Type == IOS_TYPE_HERMES)
patch_NoDiscinDrive(dst, len);
patchVideoModes(dst, len, vidMode, vmode, patchVidModes, bootType);

if(debuggerselect == 2)
Patch_fwrite(dst, len);
if(hooktype != 0 && hookpatched == false)
hookpatched = dogamehooks(dst, len, false);
if(patchVidModes > 0)
PatchVideoSneek(dst, len);
if(vipatch)
vidolpatcher(dst, len);
if(patchVidModes > 0)
PatchVideoSneek(dst, len);
if(configbytes[0] != 0xCD)
langpatcher(dst, len);
if(countryString)
PatchCountryStrings(dst, len); // Country Patch by WiiPower
if(aspectRatio != -1)
PatchAspectRatio(dst, len, aspectRatio);
if(returnTo)
PatchReturnTo(dst, len, returnTo);
do_wip_code((u8 *)dst, len);
Remove_001_Protection(dst, len);
if(CurrentIOS.Type == IOS_TYPE_WANIN && CurrentIOS.Revision < 13)
Anti_002_fix(dst, len);
if((CurrentIOS.Type == IOS_TYPE_WANIN && CurrentIOS.Revision < 13) || CurrentIOS.Type == IOS_TYPE_HERMES)
patch_NoDiscinDrive(dst, len);
if(patchregion)
PatchRegion(dst, len);
if(private_server)
PrivateServerPatcher(dst, len, private_server, serverAddr);

if(deflicker == DEFLICKER_ON_LOW)
{
patch_vfilters(dst, len, vfilter_low);
@@ -204,6 +205,12 @@ void maindolpatches(void *dst, int len, u8 vidMode, GXRModeObj *vmode, bool vipa
if (deflicker == DEFLICKER_OFF_EXTENDED)
deflicker_patch(dst, len);
}
if(returnTo)
PatchReturnTo(dst, len, returnTo);
if(aspectRatio != -1)
PatchAspectRatio(dst, len, aspectRatio);
if(private_server)
PrivateServerPatcher(dst, len, private_server, serverAddr);
}

static void patch_NoDiscinDrive(void *buffer, u32 len)
9 changes: 8 additions & 1 deletion resources/wiiflow_game_booter/source/apploader.h
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@ extern "C" {

/* Prototypes */
u32 Apploader_Run(u8 vidMode, GXRModeObj *vmode, bool vipatch, bool countryString, u8 patchVidModes, int aspectRatio, u32 returnTo,
bool patchregion, u8 private_server, const char * server_addr, bool patchFix480p, u8 deflicker, u8 bootType);
bool patchregion, u8 private_server, const char * server_addr, u8 videoWidth, bool patchFix480p, u8 deflicker, u8 bootType);

enum
{
@@ -28,6 +28,13 @@ enum
DEFLICKER_ON_HIGH
};

enum
{
WIDTH_AUTO,
WIDTH_FRAMEBUFFER,
WIDTH_MAX
};

#ifdef __cplusplus
}
#endif /* __cplusplus */
9 changes: 6 additions & 3 deletions resources/wiiflow_game_booter/source/disc.c
Original file line number Diff line number Diff line change
@@ -42,9 +42,11 @@ void Disc_SetLowMem(void)
*OS_Thread = 0x80431A80; // Thread Init
*Dev_Debugger = 0x81800000; // Dev Debugger Monitor Address
*Simulated_Mem = 0x01800000; // Simulated Memory Size
*GameID_Address = 0x80000000; // Fix for Sam & Max (WiiPower)
*(vu32 *) 0xCD00643C = 0x00000000; // 32Mhz on Bus

//if(CurrentIOS.Type != IOS_TYPE_HERMES && CurrentIOS.Revision >= 18)
*GameID_Address = 0x80000000; // Fix for Sam & Max (WiiPower) and Back to the Future.

/* Copy Disc ID */
memcpy((void*)Online_Check, (void*)Disc_ID, 4);
}
@@ -240,13 +242,14 @@ s32 Disc_SetUSB(const u8 *id, bool frag)
/* ENABLE USB in cIOS */
if(id)
{
if(frag)
if(frag)// true for wii games in wbfs folder
return set_frag_list();
/* for WBFS partitioned drives */
s32 part = -1;
if(CurrentIOS.Type == IOS_TYPE_HERMES)
part = wbfs_part_idx ? wbfs_part_idx - 1 : 0;
return WDVD_SetUSBMode(wbfsDev, (u8*)id, part);
}
/* DISABLE USB in cIOS */
/* DISABLE USB in cIOS for actual disc */
return WDVD_SetUSBMode(0, NULL, -1);
}
Loading