Skip to content

Commit

Permalink
CDDA addition, CDrom and GTE updates
Browse files Browse the repository at this point in the history
  • Loading branch information
niuus committed Oct 28, 2022
1 parent 636378a commit bc48340
Show file tree
Hide file tree
Showing 40 changed files with 1,259 additions and 521 deletions.
10 changes: 5 additions & 5 deletions Gamecube/DEBUG.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ static void check_heap_space(void){
sprintf(txtbuffer,"%dKB MEM1 available", SYS_GetArena1Size()/1024);
DEBUG_print(txtbuffer,DBG_MEMFREEINFO);

sprintf(txtbuffer,"Dynarec (KB) %04d/%04d",dyna_used,dyna_total/1024);
DEBUG_print(txtbuffer,DBG_CORE1);
//sprintf(txtbuffer,"Dynarec (KB) %04d/%04d",dyna_used,dyna_total/1024);
//DEBUG_print(txtbuffer,DBG_CORE1);

sprintf(txtbuffer,"DSP is at %f%%",AESND_GetDSPProcessUsage());
DEBUG_print(txtbuffer,DBG_CORE2);
//sprintf(txtbuffer,"DSP is at %f%%",AESND_GetDSPProcessUsage());
//DEBUG_print(txtbuffer,DBG_CORE2);
}
#endif

Expand All @@ -47,7 +47,7 @@ void DEBUG_update() {
memset(text[i],0,DEBUG_TEXT_WIDTH);
}
}
//check_heap_space();
check_heap_space();
#endif
}

Expand Down
8 changes: 6 additions & 2 deletions Gamecube/MEM2.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,14 @@
#define FONT_LO (MCD2_HI)
#define FONT_HI (FONT_LO + FONT_SIZE)

// We want 256KB for fontFont
#define FONTWORK_SIZE (128*KB)
// We want 20MB for fontFont
#define FONTWORK_SIZE (20*MB)
#define FONTWORK_LO (FONT_HI)
#define FONTWORK_HI (FONTWORK_LO + FONTWORK_SIZE)

// We want 20MB for the recompiled blocks
#define RECMEM2_SIZE (20*MB)
#define RECMEM2_LO (FONTWORK_HI)
#define RECMEM2_HI (RECMEM2_LO + RECMEM2_SIZE)

#endif
4 changes: 2 additions & 2 deletions Gamecube/fileBrowser/fileBrowser.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* WiiSX - fileBrowser.h
* Copyright (C) 2007, 2008, 2009 Mike Slegeir
* Copyright (C) 2007, 2008, 2009 emu_kidid
*
*
* Standard protoypes for accessing files from anywhere
*
* Wii64 homepage: http://www.emulatemii.com
Expand All @@ -27,7 +27,7 @@

#include <stdint.h>

#define FILE_BROWSER_MAX_PATH_LEN 128
#define FILE_BROWSER_MAX_PATH_LEN 256

#define FILE_BROWSER_ATTR_DIR 0x10

Expand Down
7 changes: 6 additions & 1 deletion Gamecube/libgui/GraphicsGX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,11 @@ void Graphics::init()
GX_SetDispCopySrc(0,0,vmode->fbWidth,vmode->efbHeight);
GX_SetDispCopyDst(vmode->fbWidth,xfbHeight);
GX_SetCopyFilter(vmode->aa,vmode->sample_pattern,GX_TRUE,vmode->vfilter);
u8 sharp[7] = {0,0,21,22,21,0,0};
//u8 soft[7] = {8,8,10,12,10,8,8};
u8* vfilter = sharp; // sharp soft vmode->vfilter;
GX_SetCopyFilter(vmode->aa, vmode->sample_pattern, GX_TRUE, vfilter);

GX_SetFieldMode(vmode->field_rendering,((vmode->viHeight==2*vmode->xfbHeight)?GX_ENABLE:GX_DISABLE));

if (vmode->aa)
Expand Down Expand Up @@ -502,4 +507,4 @@ float Graphics::getCurrentTransparency(int index)
return val;
}

} //namespace menu
} //namespace menu
29 changes: 16 additions & 13 deletions Gamecube/menu/MainFrame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ MainFrame::MainFrame()
add(inputStatusBar);

for (int i = 0; i < NUM_MAIN_BUTTONS; i++)
FRAME_BUTTONS[i].button = new menu::Button(FRAME_BUTTONS[i].buttonStyle, &FRAME_BUTTONS[i].buttonString,
FRAME_BUTTONS[i].x, FRAME_BUTTONS[i].y,
FRAME_BUTTONS[i].button = new menu::Button(FRAME_BUTTONS[i].buttonStyle, &FRAME_BUTTONS[i].buttonString,
FRAME_BUTTONS[i].x, FRAME_BUTTONS[i].y,
FRAME_BUTTONS[i].width, FRAME_BUTTONS[i].height);

for (int i = 0; i < NUM_MAIN_BUTTONS; i++)
Expand All @@ -115,8 +115,8 @@ MainFrame::MainFrame()
if (FRAME_BUTTONS[i].clickedFunc) FRAME_BUTTONS[i].button->setClicked(FRAME_BUTTONS[i].clickedFunc);
if (FRAME_BUTTONS[i].returnFunc) FRAME_BUTTONS[i].button->setReturn(FRAME_BUTTONS[i].returnFunc);
add(FRAME_BUTTONS[i].button);
menu::Cursor::getInstance().addComponent(this, FRAME_BUTTONS[i].button, FRAME_BUTTONS[i].x,
FRAME_BUTTONS[i].x+FRAME_BUTTONS[i].width, FRAME_BUTTONS[i].y,
menu::Cursor::getInstance().addComponent(this, FRAME_BUTTONS[i].button, FRAME_BUTTONS[i].x,
FRAME_BUTTONS[i].x+FRAME_BUTTONS[i].width, FRAME_BUTTONS[i].y,
FRAME_BUTTONS[i].y+FRAME_BUTTONS[i].height);
}
setDefaultFocus(FRAME_BUTTONS[0].button);
Expand Down Expand Up @@ -164,9 +164,9 @@ void Func_Credits()
{
char CreditsInfo[512] = "";
#ifdef HW_RVL
sprintf(CreditsInfo,"WiiSX RX Beta 3.1\n");
sprintf(CreditsInfo,"WiiSX RX Beta 3.2-FS\n");
#else
sprintf(CreditsInfo,"CubeSX RX Beta 3.1\n");
sprintf(CreditsInfo,"CubeSX RX Beta 3.2-FS\n");
#endif
strcat(CreditsInfo,"www.github.com/niuus/WiiSXRX\n");
strcat(CreditsInfo,"WiiSX RX & logo: NiuuS\n");
Expand All @@ -175,7 +175,7 @@ void Func_Credits()
strcat(CreditsInfo,"emu_kidid - general coding\n");
strcat(CreditsInfo,"sepp256 - graphics & menu\n");
strcat(CreditsInfo,"tehpola - audio\n");
strcat(CreditsInfo,"PCSX/-df/-r/ReARMed teams\n");
strcat(CreditsInfo,"PCSX/-df/-r/-Revolution/ReARMed\n");
strcat(CreditsInfo,"\n");

char wiiDetails[30];
Expand All @@ -196,7 +196,7 @@ void Func_Credits()
strcat(CreditsInfo,"FIX94 - Wii U gamepad support\n");
strcat(CreditsInfo,"matguitarist - USB 2.0 support\n");
strcat(CreditsInfo,"Daxtsu - libwupc support\n");
strcat(CreditsInfo,"Mystro256 (WiiSXR) xjsxjs197 (_2022)\n");
strcat(CreditsInfo,"Mystro256 (WiiSXR) xjsxjs197 (WiiStation)\n");
strcat(CreditsInfo,"\n");
strcat(CreditsInfo, wiiDetails);
#endif
Expand All @@ -212,7 +212,10 @@ void Func_ExitToLoader()
if (menu::MessageBox::getInstance().askMessage("Are you sure you want to exit to loader?"))
{
shutdown = 2;
SysClose();
if (hasLoadedISO)
{
SysClose();
}
}
}

Expand All @@ -225,7 +228,7 @@ extern "C" {
extern int SaveMcd(int mcd, fileBrowser_file *savepath);
void pauseAudio(void); void pauseInput(void);
void resumeAudio(void); void resumeInput(void);
void go(void);
void go(void);
}

//void control_info_init();
Expand All @@ -243,7 +246,7 @@ void Func_PlayGame()
menu::MessageBox::getInstance().setMessage("Please load a CD first");
return;
}

//Wait until 'A' button released before play/resume game
menu::Cursor::getInstance().setFreezeAction(true);
menu::Focus::getInstance().setFreezeAction(true);
Expand Down Expand Up @@ -322,7 +325,7 @@ void Func_PlayGame()
result += SaveMcd(1,saveFile_dir);
result += SaveMcd(2,saveFile_dir);
saveFile_deinit(saveFile_dir);
if (result>=amountSaves) { //saved all of them ok
if (result>=amountSaves) { //saved all of them ok
switch (nativeSaveDevice)
{
case NATIVESAVEDEVICE_SD:
Expand All @@ -343,7 +346,7 @@ void Func_PlayGame()
else {
menu::MessageBox::getInstance().setMessage("Failed to save game"); //one or more failed to save
}

}
}
#ifdef HW_RVL
Expand Down
70 changes: 54 additions & 16 deletions Gamecube/release/apps/README
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
README : WiiSX RX / CubeSX RX
Beta 3.1
Beta 3.2

LICENSE:
This software is licensed under the GNU General Public License v2
Expand All @@ -10,20 +10,20 @@ LICENSE:
QUICK USAGE:
* Games can be .bin + .cue (Make sure .cue contains _relative_ directory!), a single .bin, .img, or .iso format
* To install: Extract the contents of WiiSXRX.zip to the root of your SD card
* For SD/USB: Put games (.bin + .cue or other formats) in the directory named /WiiSXRX/isos,
* For SD/USB: Put games (.bin + .cue or other formats) in the directory named /WiiSXRX/isos (SD / USB)
All Memory Cards will automatically be placed in /WiiSXRX/saves
All Savestates will automatically be placed in /WiiSXRX/savestates
* For DVD media: games may be anywhere on the disc (requires DVDxV2 on Wii)
* For actual BIOS: Put SCPH1001.BIN in the directory on SD/USB named /WiiSXRX/bios
* For actual BIOS: Put SCPH1001.BIN in the directory named /WiiSXRX/bios (SD / USB)
* Load the executable from the HBC or in the loader of your choice
Once the emulator is running, select 'Load CD', choose the source media, and select the game to load
(Note: to go up a directory select '..', B will exit the file browser)
* Select 'Play Game' to play
You can go back from a game to the emulator menu by pressing a configurable key combination together.
You can go back from a game to the emulator menu by pressing a configurable key combination together.
If you haven't changed it through the settings, the defaults are:
On a GC pad (START & X), Wii Classic Controller or Pro (HOME), Wiimote (- & +),
Wii U Pro Controller (HOME), or Wii U Gamepad (HOME)
Wiimote+Nunchuck (1 & 2), or the reset button
Wiimote+Nunchuck (1 & 2), or the Wii's reset button.
(Note: this must be done to save your game; it will not be done automatically)

Controls:
Expand All @@ -44,25 +44,30 @@ Settings:
* Select CPU core: choose whether to play games with pure interpreter
(better compatibility) or dynarec (better speed)
* Select BIOS: choose your own dumped BIOS file source. HLE is for the embedded open source BIOS,
which will change compatibility, so change between them if a game doesn't run with the commercial PSX BIOS
which will change compatibility, so change between them if a game doesn't run at all with the commercial PSX BIOS.
Remember to put your own PSX BIOS file (Model SCPH1001 recommended) into the BIOS folder on your drive,
or you won't be able to select it here and use it. No, different BIOS models DO NOT CHANGE compatibility.
* Boot through BIOS: boot the games with the Sony PlayStation screen, if you're using an external PSX BIOS only
* Execute BIOS: boot the PSX BIOS only
* Save settings: Save all of these settings either SD or USB (to be loaded automatically next time)
* Save settings: save all of these settings either SD or USB (to be loaded automatically next time)
* Video
* Show FPS: Display the framerate in the top-left corner of the screen
* Show FPS: display the framerate in the top-left corner of the screen
* Limit FPS: limit the framerate to 59.94 (60 Hz NTSC games) or 50 (50Hz PAL games) when using Auto.
Off will make it go as far as the console's CPU can push the framerate
* Frameskip: allows the emulator to skip some frames to maintain full speed on some games
* Screen Ratio: Select the aspect ratio of the display; 'Force 16:9' will pillar-box the in-game display
* Dithering: set the original console behavior depending on whether you want to use the feature or not.
* Screen Ratio: select the aspect ratio of the display; 'Force 16:9' will pillar-box the in-game display
* Dithering: set the original PSX console behavior, depending on whether you want to use the feature or not.
It will create some extra workload on the CPU so turn it to None, Default or Always at your discretion
* Input
* Configure Input: Select controllers to use in game
* Configure Buttons: Enter the controller configuration screen described above
* Save button configs: Save all of the controller configuration slots to SD or USB
* Configure Input: select controllers to use in game
* Configure Buttons: enter the controller configuration screen described above
* Save button configs: save all of the controller configuration slots to SD or USB
* Auto Load slot: Select which slot to automatically be loaded for each type of controller
* Audio
* Disable audio: Select to mute the sound
* Disable audio: select to mute the sound completely
* Disable XA: select to mute XA music or sounds
* Disable CDDA: select to mute CD music (Red Book format)
* Volume: choose to lower or boost the produced sound
* Saves
* Memcard Save device: Choose where to load and save native game saves
* Auto Save Memcards: When enabled, the emulator will automatically load
Expand All @@ -74,7 +79,7 @@ Settings:

REPORTING ISSUES:
Report emulator issues to https://github.com/niuus/wiisxrx/issues
Do not report individual game bugs
Do not report individual game bugs.

CODE:
Source code can be found here https://github.com/niuus/wiisxrx/
Expand All @@ -90,7 +95,7 @@ CREDITS:
* Artwork: drmr
* USB 2.0 support: matguitarist
* LibWiiDRC integration: FIX94
* https://https://github.com/FIX94/libwiidrc
* https://github.com/FIX94/libwiidrc
* LibWUPC integration: Daxtsu
* https://github.com/FIX94/libwupc
* PSX Multitap: vmartinv
Expand All @@ -100,6 +105,7 @@ CREDITS:
* pcsx team http://www.pcsx.net/
* pcsx-df http://pcsx-df.sourceforge.net/
* pcsx-r http://pcsxr.codeplex.com/
* pcsx-revolution https://code.google.com/archive/p/pcsx-revolution/downloads
* pcsx-ReARMed https://github.com/notaz/pcsx_rearmed
* pcsx 1.5-test3 mac version by Gil Pederson http://pcsx.gpost.dk/
* P.E.Op.S. PSX Gpu & SPU http://sourceforge.net/projects/peops/
Expand All @@ -112,6 +118,38 @@ CREDITS:
* www.emulatemii.com and https://code.google.com/archive/p/pcsxgc/downloads

RX CHANGE LOG:
++ Beta 3.2 - 20221027:

* CDDA is now available for use. Check the details below about the two new builds.
* Reduced loading time.
* Updates to CDrom plugin and new timer, compatibility rise.
* CDrom speedup.
* GTE updates.

------------------------------------------------------------------------------
READ CAREFULLY:
There are separate builds, one is WiiSXRX-FS and the other one is WiiSXRX-DS. Each one uses a different sound plugin.

WiiSXRX-FS is more recommended for use on the Wii, since it is lighter on resources. It can give you a speed boost that
may vary between 5-15 FPS, depending on the game. Some games may even sound better on this build, compared to -DS.
However, the sound plugin within this build does NOT read Red Book audio (CDDA).

WiiSXRX-DS is more recommended for use on the Wii U's "overclocked mode". Being more accurate, means it is heavier on
the use of the console's resources, which in turn means less FPS on limited systems like the Gamecube and Wii,
hence the recommendation. Some games do sound better or without audio glitches on this build, or even
require it to work fully, compared to -FS. The sound plugin within this build DOES include full
support for Red Book audio (CDDA).
------------------------------------------------------------------------------
Thanks goes to the PCSX / PCSX-df / PCSX-r / PCSX-Revolution / PCSX-ReARMed teams, and xjsxjs197 code adaptations.

3rd party Wii Classic Controller and Pro extended support from RX 2.7 is retained, as well as PS1 / PS2 controller support through the 3rd party Wiimote adapter.

Experimental builds with PSX Multitap support also available. Compatible titles tested are included on a TXT inside the respective .zip

Find a growing list of new playable and tested games on the second post of the official WiiSXRX thread, here:
https://gbatemp.net/threads/wiisx-rx-a-new-fork.570252/


++ Beta 3.1 - 20221016:

* Updates to CDrom plugin, compatibility rise.
Expand Down
7 changes: 5 additions & 2 deletions Gamecube/release/apps/WiiSXRX/meta.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@
<app version="2">
<name>WiiSXRX</name>
<coder>NiuuS</coder>
<version>3.1 Beta</version>
<release_date>202210161552</release_date>
<version>3.2 Beta</version>
<release_date>202210272212</release_date>
<short_description>PSX Emulator for Wii</short_description>
<long_description>
Featuring:
- PS1 / PS2 controller support through Wiimote adapter.
- 3rd party Wii Classic Controller and Pro support.
- NES / SNES Classic Controllers support.
- Gamecube controller support.
- Wii U Pro controller support.
- Wii U Gamepad controller support through VC injects.
Expand Down
2 changes: 1 addition & 1 deletion Gamecube/wiiSXconfig.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* WiiSX - wiiSXconfig.h
* Copyright (C) 2007, 2008, 2009, 2010 sepp256
*
*
* External declaration and enumeration of config variables
*
* WiiSX homepage: http://www.emulatemii.com
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ifndef ECHO
ECHO = echo
endif

VERSION = beta3.1
VERSION = beta3.0

.PHONY: all

Expand Down
2 changes: 1 addition & 1 deletion PeopsSoftGPU/changelog.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#########################################################################

Version 1.18
------------

Expand Down
1 change: 1 addition & 0 deletions PeopsSoftGPU/fps.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ unsigned long timeGetTime()
return diff_usec(0,nowTick)/10;
}

extern int newDwFrameRateTicks;
void FrameCap (void)
{
static unsigned long curticks, lastticks, _ticks_since_last_update;
Expand Down
Loading

0 comments on commit bc48340

Please sign in to comment.