Skip to content

Commit

Permalink
Merge branch 'emukidid:master' into wii64-wiiflow
Browse files Browse the repository at this point in the history
  • Loading branch information
saulfabregwiivc authored Dec 22, 2021
2 parents 1105a93 + 0d2a10f commit f994188
Show file tree
Hide file tree
Showing 34 changed files with 82 additions and 231 deletions.
13 changes: 13 additions & 0 deletions Makefile.Rice_gc_basic
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#Makefile MUPEN64 for Rice + MenuV2 + GC + No boxart

ELF = cube64-Rice-basic.elf
DOL = cube64-Rice-basic.dol

CXXFLAGS += -DGC_BASIC
INCLUDE =
LIB =

include Makefile.Rice
include Makefile.gc
include Makefile.base

2 changes: 1 addition & 1 deletion Makefile.Rice_gc_exp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
ELF = cube64-Rice-exp.elf
DOL = cube64-Rice-exp.dol

CXXFLAGS += -DUSE_EXPANSION
CXXFLAGS += -DUSE_EXPANSION -DGC_BASIC
INCLUDE =
LIB =

Expand Down
11 changes: 11 additions & 0 deletions Makefile.glN64_gc_basic
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#Makefile MUPEN64 for glN64_GX + MenuV2 + GC + No boxart

ELF = cube64-glN64-basic.elf
DOL = cube64-glN64-basic.dol

CXXFLAGS += -DGC_BASIC

include Makefile.glN64
include Makefile.gc
include Makefile.base

2 changes: 1 addition & 1 deletion Makefile.glN64_gc_exp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
ELF = cube64-glN64-exp.elf
DOL = cube64-glN64-exp.dol

CXXFLAGS += -DUSE_EXPANSION
CXXFLAGS += -DUSE_EXPANSION -DGC_BASIC

include Makefile.glN64
include Makefile.gc
Expand Down
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,17 @@
saves from the selected device on ROM load and save when returning to the menu or
turning off the console
## ADVANCED USAGE
### GameCube Version
### GameCube Version(s)
Wii64 also exists as Cube64, a version of the emulator with the same UI and features albeit with tighter memory restrictions and less CPU power. This version has significantly less memory available and requires heavy paging of ROM data from your storage medium into a small ARAM cache and then into main memory, this is denoted by every time you see a cartridge icon in the top right hand corner of the screen.

There's also 2 versions per graphics plugin shipped (4 .dol files total), the "-exp.dol" versions attempt to support the expansion pak by removing the mini menu, boxart and further reducing various caches, this should only really be used for expansion pak required games as it will likely crash more often due to less memory being available.
There's also 3 versions per graphics plugin shipped (6 .dol files total).

### WiiVC Version
This version isn't really supported much due to the niche nature of it, but the gist of it is that you can run Wii64 on a Wii U in "Wii mode" but with the CPU multiplier unlocked and have Wii U Game Pad support. To boot this version you'll need to be well versed in Wii U homebrew setups, but essentially there's a process that exists to inject homebrew into a WiiVC title (e.g. Wii titles were available on the Wii U via the eShop) and there's a thing called [sign_c2w_patcher](https://github.com/FIX94/sign_c2w_patcher) that you must boot before loading this title to unlock the CPU multiplier. This version is shipped as "Wii64 | Rice GFX | WiiVC" and "Wii64 | glN64 GFX | WiiVC" in the archive.
The "-exp.dol" versions attempt to support the expansion pak by removing the mini menu, boxart and further reducing various caches, this should only really be used for expansion pak required games as it will likely crash more often due to less memory being available.

The "-basic.dol" versions remove boxart support and the mini menu in an attempt to have more free memory available to avoid crashes.

### "WiiVC" Version
This version isn't really supported much due to the niche nature of it. It enables DRC (Wii U GamePad) support, and also takes advantage of unlocked CPU multiplier support if enabled. The gist of it is that you can run Wii64 on a Wii U in "Wii mode" but with Wii U Game Pad support and (optionally) the CPU multiplier unlocked. To boot this version you can either just use the vWii mode to use the GamePad, or to unlock the CPU multiplier you'll need to be well versed in Wii U homebrew setups (essentially there's a process that exists to inject homebrew into a WiiVC title - e.g. Wii titles were available on the Wii U via the eShop) and there's a thing called [sign_c2w_patcher](https://github.com/FIX94/sign_c2w_patcher) that you must boot before loading this title to unlock the CPU multiplier. This version is shipped as "Wii64 | Rice GFX | WiiVC" and "Wii64 | glN64 GFX | WiiVC" in the archive.

### Boot time arguments
The following can be passed in via wiiload or by editing the meta.xml to override settings. They can also be changed via the settings.cfg that's created upon booting up the emulator for the first time.
Expand Down
4 changes: 4 additions & 0 deletions build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ make -f Makefile.glN64_gc --jobs=5
del *.o /s
make -f Makefile.glN64_gc_exp --jobs=5
del *.o /s
make -f Makefile.glN64_gc_basic --jobs=5
del *.o /s
make -f Makefile.glN64_wii --jobs=5
del *.o /s
make -f Makefile.glN64_wiivc --jobs=5
Expand All @@ -14,6 +16,8 @@ make -f Makefile.Rice_gc --jobs=5
del *.o /s
make -f Makefile.Rice_gc_exp --jobs=5
del *.o /s
make -f Makefile.Rice_gc_basic --jobs=5
del *.o /s
make -f Makefile.Rice_wii --jobs=5
del *.o /s
make -f Makefile.Rice_wiivc --jobs=5
Expand Down
2 changes: 1 addition & 1 deletion libgui/Box3D.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* See the GNU General Public Licence for more details.
*
**/
#if !(defined(HW_DOL) && defined(USE_EXPANSION))
#if !(defined(GC_BASIC))
#include "Box3D.h"
#include "GuiResources.h"
#include "Image.h"
Expand Down
2 changes: 1 addition & 1 deletion libgui/Box3D.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* See the GNU General Public Licence for more details.
*
**/
#if !(defined(HW_DOL) && defined(USE_EXPANSION))
#if !(defined(GC_BASIC))
#ifndef BOX3D_H
#define BOX3D_H

Expand Down
2 changes: 1 addition & 1 deletion libgui/Button.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ void Button::drawComponent(Graphics& gfx)
gfx.drawImage(0, x, y, width/2, height, 0.0, width/8.0, 0.0, 1.0);
gfx.drawImage(0, x+width/2, y, width/2, height, width/8.0, 0.0, 0.0, 1.0);
break;
#if !(defined(HW_DOL) && defined(USE_EXPANSION))
#if !(defined(GC_BASIC))
case BUTTON_BOX3D:
if (getFocus())
{
Expand Down
4 changes: 2 additions & 2 deletions libgui/Button.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#define BTN_DEFAULT menu::Button::BUTTON_DEFAULT
#define BTN_A_NRM menu::Button::BUTTON_STYLEA_NORMAL
#define BTN_A_SEL menu::Button::BUTTON_STYLEA_SELECT
#if !(defined(HW_DOL) && defined(USE_EXPANSION))
#if !(defined(GC_BASIC))
#define BTN_BOX3D menu::Button::BUTTON_BOX3D
#endif

Expand Down Expand Up @@ -75,7 +75,7 @@ class Button : public Component
BUTTON_DEFAULT=0,
BUTTON_STYLEA_NORMAL,
BUTTON_STYLEA_SELECT
#if !(defined(HW_DOL) && defined(USE_EXPANSION))
#if !(defined(GC_BASIC))
,BUTTON_BOX3D
#endif
};
Expand Down
4 changes: 2 additions & 2 deletions libgui/Gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Gui::Gui()
menuLogo = new Logo();
menuLogo->setLocation(570.0, 70.0, -150.0);
menuLogo->setVisible(true);
#if !(defined(HW_DOL) && defined(USE_EXPANSION))
#if !(defined(GC_BASIC))
menuBox3D = new Box3D();
menuBox3D->setLocation(320.0, 240.0, -150.0);
menuBox3D->setVisible(true);
Expand All @@ -52,7 +52,7 @@ Gui::Gui()

Gui::~Gui()
{
#if !(defined(HW_DOL) && defined(USE_EXPANSION))
#if !(defined(GC_BASIC))
delete menuBox3D;
#endif
delete menuLogo;
Expand Down
2 changes: 1 addition & 1 deletion libgui/Gui.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class Gui
}
Graphics *gfx;
Logo* menuLogo;
#if !(defined(HW_DOL) && defined(USE_EXPANSION))
#if !(defined(GC_BASIC))
Box3D* menuBox3D;
#endif

Expand Down
6 changes: 3 additions & 3 deletions libgui/GuiResources.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Resources::Resources()
#endif
n64ControllerImage = new Image(N64ControllerTexture, 208, 200, GX_TF_I4, GX_CLAMP, GX_CLAMP, GX_FALSE);

#if !(defined(HW_DOL) && defined(USE_EXPANSION))
#if !(defined(GC_BASIC))
//Thumbnail images for current FB and state FB
currentFramebufferTexture = (u8*) memalign(32, FB_THUMB_SIZE);
stateFramebufferTexture = (u8*) memalign(32, FB_THUMB_SIZE);
Expand Down Expand Up @@ -95,7 +95,7 @@ Resources::~Resources()
delete controllerWiiUProImage;
#endif
delete n64ControllerImage;
#if !(defined(HW_DOL) && defined(USE_EXPANSION))
#if !(defined(GC_BASIC))
delete currentFramebufferImage;
delete stateFramebufferImage;
delete boxartFrontImage;
Expand Down Expand Up @@ -165,7 +165,7 @@ Image* Resources::getImage(int image)
case IMAGE_N64_CONTROLLER:
returnImage = n64ControllerImage;
break;
#if !(defined(HW_DOL) && defined(USE_EXPANSION))
#if !(defined(GC_BASIC))
case IMAGE_CURRENT_FB:
returnImage = currentFramebufferImage;
break;
Expand Down
4 changes: 2 additions & 2 deletions libgui/GuiResources.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class Resources
IMAGE_CONTROLLER_WIIUPRO,
#endif
IMAGE_N64_CONTROLLER,
#if !(defined(HW_DOL) && defined(USE_EXPANSION))
#if !(defined(GC_BASIC))
IMAGE_CURRENT_FB,
IMAGE_STATE_FB,
IMAGE_BOXART_FRONT,
Expand All @@ -88,7 +88,7 @@ class Resources
Image *controllerWiimoteImage, *controllerWiiUProImage;
#endif
Image *n64ControllerImage;
#if !(defined(HW_DOL) && defined(USE_EXPANSION))
#if !(defined(GC_BASIC))
Image *currentFramebufferImage, *stateFramebufferImage;
u8 *currentFramebufferTexture, *stateFramebufferTexture;
Image *boxartFrontImage, *boxartSpineImage, *boxartBackImage;
Expand Down
2 changes: 1 addition & 1 deletion libgui/MainInfoBar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ void MainInfoBar::drawComponent(Graphics& gfx)
#endif
gfx.setTEV(GX_PASSCLR);

#if !(defined(HW_DOL) && defined(USE_EXPANSION))
#if !(defined(GC_BASIC))
//draw current FB thumbnail
Resources::getInstance().getImage(Resources::IMAGE_CURRENT_FB)->activateImage(GX_TEXMAP0);
gfx.setTEV(GX_REPLACE);
Expand Down
2 changes: 1 addition & 1 deletion libgui/MiniInfoBar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* See the GNU General Public Licence for more details.
*
**/
#if !(defined(HW_DOL) && defined(USE_EXPANSION))
#if !(defined(GC_BASIC))
#include "MiniInfoBar.h"
#include "Gui.h"
#include "GuiResources.h"
Expand Down
2 changes: 1 addition & 1 deletion libgui/MiniInfoBar.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* See the GNU General Public Licence for more details.
*
**/
#if !(defined(HW_DOL) && defined(USE_EXPANSION))
#if !(defined(GC_BASIC))
#ifndef MINIINFOBAR_H
#define MINIINFOBAR_H

Expand Down
2 changes: 1 addition & 1 deletion main/boxart.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
- Boxart texture loading from a binary compilation
by emu_kidid
*/
#if !(defined(HW_DOL) && defined(USE_EXPANSION))
#if !(defined(GC_BASIC))
#include <string.h>
#include <stdio.h>
#include <fat.h>
Expand Down
2 changes: 1 addition & 1 deletion main/main_gc-menu2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ int main(int argc, char* argv[]) {
VIDEO_SetPostRetraceCallback (ScanPADSandReset);

// Default Settings
#if !(defined(HW_DOL) && defined(USE_EXPANSION))
#if !(defined(GC_BASIC))
miniMenuActive = MINIMENU_ENABLE; // Activate MiniMenu
#else
miniMenuActive = MINIMENU_DISABLE; // Activate MiniMenu
Expand Down
6 changes: 3 additions & 3 deletions main/savestates_gc.c
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ void savestates_save(unsigned int slot, u8* fb_tex)
//Save Header
gzwrite(f, statesmagic, 3); //Write magic "W64"
gzwrite(f, &savestates_version, sizeof(unsigned int));
#if !(defined(HW_DOL) && defined(USE_EXPANSION))
#if !(defined(GC_BASIC))
gzwrite(f, fb_tex, FB_THUMB_SIZE);
#endif

Expand Down Expand Up @@ -232,7 +232,7 @@ int savestates_load_header(unsigned int slot, u8* fb_tex, char* date, char* time
if (!f || !savestates_check_valid(f)) {
return -1;
}
#if !(defined(HW_DOL) && defined(USE_EXPANSION))
#if !(defined(GC_BASIC))
gzread(f, fb_tex, FB_THUMB_SIZE);
#endif
gzclose(f);
Expand All @@ -254,7 +254,7 @@ int savestates_load(unsigned int slot)
}
LoadingBar_showBar(progress, LOAD_STATE_MSG);

#if !(defined(HW_DOL) && defined(USE_EXPANSION))
#if !(defined(GC_BASIC))
//Skip image
gzseek(f, FB_THUMB_SIZE, SEEK_CUR);
#endif
Expand Down
4 changes: 2 additions & 2 deletions menu/CurrentRomFrame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ void Func_ResetROM()
romOpen_audio();
romOpen_input();
cpu_init();
#if !(defined(HW_DOL) && defined(USE_EXPANSION))
#if !(defined(GC_BASIC))
//Clear FB image
memset(menu::Resources::getInstance().getImage(menu::Resources::IMAGE_CURRENT_FB)->getTexture(), 0x00, FB_THUMB_SIZE);
DCFlushRange(menu::Resources::getInstance().getImage(menu::Resources::IMAGE_CURRENT_FB)->getTexture(), FB_THUMB_SIZE);
Expand Down Expand Up @@ -379,7 +379,7 @@ void Func_SaveState()
menu::MessageBox::getInstance().setMessage("Failed to create save state");
}
else {
#if !(defined(HW_DOL) && defined(USE_EXPANSION))
#if !(defined(GC_BASIC))
savestates_save(which_slot, menu::Resources::getInstance().getImage(menu::Resources::IMAGE_CURRENT_FB)->getTexture());
#else
savestates_save(which_slot, NULL);
Expand Down
2 changes: 1 addition & 1 deletion menu/FileBrowserFrame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,7 @@ void fileBrowserFrame_LoadFile(int i)
pMenuContext->getFrame(MenuContext::FRAME_FILEBROWSER)->setDefaultFocus(FRAME_BUTTONS[2].button);
menu::Focus::getInstance().clearPrimaryFocus();*/

#if !(defined(HW_DOL) && defined(USE_EXPANSION))
#if !(defined(GC_BASIC))
//Clear FB images
memset(menu::Resources::getInstance().getImage(menu::Resources::IMAGE_CURRENT_FB)->getTexture(), 0x00, FB_THUMB_SIZE);
DCFlushRange(menu::Resources::getInstance().getImage(menu::Resources::IMAGE_CURRENT_FB)->getTexture(), FB_THUMB_SIZE);
Expand Down
8 changes: 4 additions & 4 deletions menu/MainFrame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ void Func_ExitToLoader();
void Func_PlayGame();
void Func_BasicMenu();

#if !(defined(HW_DOL) && defined(USE_EXPANSION))
#if !(defined(GC_BASIC))
#define NUM_MAIN_BUTTONS 7
#else
#define NUM_MAIN_BUTTONS 6
Expand All @@ -70,7 +70,7 @@ char FRAME_STRINGS[NUM_MAIN_BUTTONS+1][20] =
"Quit",
"Play Game",
"Resume Game"
#if !(defined(HW_DOL) && defined(USE_EXPANSION))
#if !(defined(GC_BASIC))
,"Basic"
#endif
};
Expand Down Expand Up @@ -99,7 +99,7 @@ struct ButtonInfo
{ NULL, BTN_A_NRM, FRAME_STRINGS[3], 315.0, 240.0, 200.0, 56.0, 2, 4, 6, 6, Func_Credits, NULL }, // Credits
{ NULL, BTN_A_NRM, FRAME_STRINGS[4], 315.0, 300.0, 200.0, 56.0, 3, 5, 6, 6, Func_ExitToLoader, NULL }, // Exit to Loader
{ NULL, BTN_A_NRM, FRAME_STRINGS[5], 315.0, 360.0, 200.0, 56.0, 4, 0, 6, 6, Func_PlayGame, NULL }, // Play/Resume Game
#if !(defined(HW_DOL) && defined(USE_EXPANSION))
#if !(defined(GC_BASIC))
{ NULL, BTN_A_NRM, FRAME_STRINGS[7], 535.0, 360.0, 80.0, 56.0, 4, 0, 5, 5, Func_BasicMenu, NULL }, // Basic Menu
#endif
};
Expand Down Expand Up @@ -275,7 +275,7 @@ void Func_PlayGame()
_break();
#endif

#if !(defined(HW_DOL) && defined(USE_EXPANSION))
#if !(defined(GC_BASIC))
//Create Thumbnail of last Framebuffer
menu::Gui::getInstance().gfx->copyFBTex(menu::Resources::getInstance().getImage(menu::Resources::IMAGE_CURRENT_FB)->getTexture(),
FB_THUMB_WD, FB_THUMB_HT, FB_THUMB_FMT, FB_THUMB_BPP);
Expand Down
14 changes: 7 additions & 7 deletions menu/MenuContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ MenuContext *pMenuContext;
MenuContext::MenuContext(GXRModeObj *vmode)
: currentActiveFrame(0),
mainFrame(0),
#if !(defined(HW_DOL) && defined(USE_EXPANSION))
#if !(defined(GC_BASIC))
miniMenuFrame(0),
selectRomFrame(0),
#endif
Expand All @@ -48,7 +48,7 @@ MenuContext::MenuContext(GXRModeObj *vmode)
menu::Gui::getInstance().setVmode(vmode);

mainFrame = new MainFrame();
#if !(defined(HW_DOL) && defined(USE_EXPANSION))
#if !(defined(GC_BASIC))
miniMenuFrame = new MiniMenuFrame();
selectRomFrame = new SelectRomFrame();
#endif
Expand All @@ -64,7 +64,7 @@ MenuContext::MenuContext(GXRModeObj *vmode)
configureButtonsFrame = new ConfigureButtonsFrame();

menu::Gui::getInstance().addFrame(mainFrame);
#if !(defined(HW_DOL) && defined(USE_EXPANSION))
#if !(defined(GC_BASIC))
menu::Gui::getInstance().addFrame(miniMenuFrame);
menu::Gui::getInstance().addFrame(selectRomFrame);
#endif
Expand Down Expand Up @@ -97,7 +97,7 @@ MenuContext::~MenuContext()
delete currentRomFrame;
delete fileBrowserFrame;
delete loadRomFrame;
#if !(defined(HW_DOL) && defined(USE_EXPANSION))
#if !(defined(GC_BASIC))
delete selectRomFrame;
delete miniMenuFrame;
#endif
Expand Down Expand Up @@ -130,14 +130,14 @@ void MenuContext::setActiveFrame(int frameIndex)

switch(frameIndex) {
case FRAME_MAIN:
#if !(defined(HW_DOL) && defined(USE_EXPANSION))
#if !(defined(GC_BASIC))
if(useMiniMenu)
currentActiveFrame = miniMenuFrame;
else
#endif
currentActiveFrame = mainFrame;
break;
#if !(defined(HW_DOL) && defined(USE_EXPANSION))
#if !(defined(GC_BASIC))
case FRAME_SELECTROM:
currentActiveFrame = selectRomFrame;
break;
Expand Down Expand Up @@ -202,7 +202,7 @@ menu::Frame* MenuContext::getFrame(int frameIndex)
case FRAME_MAIN:
pFrame = mainFrame;
break;
#if !(defined(HW_DOL) && defined(USE_EXPANSION))
#if !(defined(GC_BASIC))
case FRAME_SELECTROM:
pFrame = selectRomFrame;
break;
Expand Down
Loading

0 comments on commit f994188

Please sign in to comment.