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