mirror of
https://github.com/retro100/dosbox-wii.git
synced 2025-01-12 10:19:11 +01:00
fix USB support (patch by Yardape8000)
This commit is contained in:
parent
ccd97a1f39
commit
cb45f613f8
@ -17,8 +17,8 @@
|
||||
*/
|
||||
|
||||
{
|
||||
EAPoint seg_base;
|
||||
Bit16u off;
|
||||
EAPoint seg_base = 0;
|
||||
Bit16u off = 0;
|
||||
switch ((inst.rm_mod<<3)|inst.rm_eai) {
|
||||
case 0x00:
|
||||
off=reg_bx+reg_si;
|
||||
@ -145,8 +145,8 @@
|
||||
};
|
||||
static Bit32u SIBZero=0;
|
||||
static Bit32u * SIBIndex[8]= { ®_eax,®_ecx,®_edx,®_ebx,&SIBZero,®_ebp,®_esi,®_edi };
|
||||
EAPoint seg_base;
|
||||
Bit32u off;
|
||||
EAPoint seg_base = 0;
|
||||
Bit32u off = 0;
|
||||
switch ((inst.rm_mod<<3)|inst.rm_eai) {
|
||||
case 0x00:
|
||||
off=reg_eax;
|
||||
|
@ -20,7 +20,7 @@
|
||||
EAPoint si_base,di_base;
|
||||
Bitu si_index,di_index;
|
||||
Bitu add_mask;
|
||||
Bitu count,count_left;
|
||||
Bitu count,count_left = 0;
|
||||
Bits add_index;
|
||||
|
||||
if (inst.prefix & PREFIX_SEG) si_base=inst.seg.base;
|
||||
|
@ -32,7 +32,7 @@ static void DoString(STRING_OP type) {
|
||||
PhysPt si_base,di_base;
|
||||
Bitu si_index,di_index;
|
||||
Bitu add_mask;
|
||||
Bitu count,count_left;
|
||||
Bitu count,count_left = 0;
|
||||
Bits add_index;
|
||||
|
||||
si_base=BaseDS;
|
||||
|
@ -1976,8 +1976,9 @@ int main(int argc, char* argv[]) {
|
||||
|
||||
/* Parse configuration files */
|
||||
std::string config_file,config_path;
|
||||
|
||||
Cross::GetPlatformConfigDir(config_path);
|
||||
|
||||
|
||||
//First parse -userconf
|
||||
if(control->cmdline->FindExist("-userconf",true)){
|
||||
config_file.clear();
|
||||
@ -2052,16 +2053,8 @@ int main(int argc, char* argv[]) {
|
||||
MAPPER_Init();
|
||||
if (control->cmdline->FindExist("-startmapper")) MAPPER_RunInternal();
|
||||
#ifdef HW_RVL
|
||||
bool cMounted = false;
|
||||
|
||||
// mount the current directory as C, if not loading from apps/dosbox-wii
|
||||
if(strlen(appPath) > 0 && strcmp(appPath, "apps/dosbox-wii") != 0)
|
||||
if(MountDOSBoxDir('C', appPath))
|
||||
cMounted = true;
|
||||
if(cMounted)
|
||||
MountDOSBoxDir('D', "sd:/DOSBox");
|
||||
else
|
||||
MountDOSBoxDir('C', "sd:/DOSBox");
|
||||
Cross::GetPlatformConfigDir(config_path);
|
||||
MountDOSBoxDir('C', config_path.c_str());
|
||||
#endif
|
||||
/* Start up main machine */
|
||||
control->StartUp();
|
||||
|
@ -66,7 +66,7 @@ void Cross::GetPlatformConfigDir(std::string& in) {
|
||||
in = "~/Library/Preferences";
|
||||
ResolveHomedir(in);
|
||||
#elif defined(HW_RVL)
|
||||
in = "sd:/DOSBox";
|
||||
in = std::string(appDrive) + "/DOSBox";
|
||||
#else
|
||||
in = "~/.dosbox";
|
||||
ResolveHomedir(in);
|
||||
@ -97,7 +97,7 @@ void Cross::CreatePlatformConfigDir(std::string& in) {
|
||||
ResolveHomedir(in);
|
||||
//Don't create it. Assume it exists
|
||||
#elif defined(HW_RVL)
|
||||
in = "sd:/DOSBox";
|
||||
in = std::string(appDrive) + "/DOSBox";
|
||||
CreateDir(in);
|
||||
#else
|
||||
in = "~/.dosbox";
|
||||
|
@ -33,7 +33,8 @@ extern void WII_VideoStop();
|
||||
void MAPPER_CheckEvent(SDL_Event * event);
|
||||
void HomeMenu();
|
||||
|
||||
char appPath[1024];
|
||||
char appDrive[MAX_APP_DRIVE_LEN];
|
||||
char appPath[MAX_APP_PATH_LEN];
|
||||
char dosboxCommand[1024] = { 0 };
|
||||
static lwp_t keythread = LWP_THREAD_NULL;
|
||||
static char shiftkey[130];
|
||||
@ -221,17 +222,16 @@ void CreateAppPath(char origpath[])
|
||||
if (loc != NULL)
|
||||
*loc = 0; // strip file name
|
||||
|
||||
int pos = 0;
|
||||
strncpy(appPath, path, MAX_APP_PATH_LEN);
|
||||
appPath[MAX_APP_PATH_LEN - 1] = 0;
|
||||
|
||||
loc = strchr(path,'/');
|
||||
if (loc != NULL)
|
||||
*loc = 0; // strip path
|
||||
|
||||
strncpy(appDrive, path, MAX_APP_DRIVE_LEN);
|
||||
appDrive[MAX_APP_DRIVE_LEN - 1] = 0;
|
||||
|
||||
// replace fat:/ with sd:/
|
||||
if(strncmp(path, "fat:/", 5) == 0)
|
||||
{
|
||||
pos++;
|
||||
path[1] = 's';
|
||||
path[2] = 'd';
|
||||
}
|
||||
strncpy(appPath, &path[pos], MAXPATHLEN);
|
||||
appPath[MAXPATHLEN-1] = 0;
|
||||
free(path);
|
||||
}
|
||||
|
||||
|
@ -7,12 +7,16 @@
|
||||
#define WIIHARDWARE_H
|
||||
#include <wiiuse/wpad.h>
|
||||
|
||||
#define MAX_APP_DRIVE_LEN 16
|
||||
#define MAX_APP_PATH_LEN 128
|
||||
|
||||
void WiiInit();
|
||||
void WiiMenu();
|
||||
void CreateAppPath(char origpath[]);
|
||||
void WiiFinished();
|
||||
|
||||
extern char appPath[1024];
|
||||
extern char appDrive[MAX_APP_DRIVE_LEN];
|
||||
extern char appPath[MAX_APP_PATH_LEN];
|
||||
extern char dosboxCommand[1024];
|
||||
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user