Screen Width/CD32 specific changes etc (#485)
* Bugfix for 2nd controller selection * ignore netbeans project * Add experimental `-autocd=` loading of files (.cue works very well - .iso should also) * CD Autoloading adapted to include .uae file check and hostconf controller options * Beginning of Booter Panel implentation * Booter Panel development .. start on XML reading for picked LHA file * New WHDLoad booter, included updated boot-data.zip, plus new hostprefs FIXED_HEIGHT= option and bugfixes for XML reading, and symlink ROM scan. Plus updated XML * Upload of .RTB files that need to accompany the Symlinked Kickstarts, for WHDLoad compatibility. * Allows for additional libraries from `boot-data.zip` to be linked on load, to aid compatibility (e.g. Dungeon Master), plus new XML * Fix hardware settings tab issues from XML reading, plus additional write_log reports for debugging WHD booter. * Code cleanup (non-essential) * XML Download button added to paths panel including date checking * WHDLoad local copy * Updated button to download WHDLoad and .RTB files (if not present) with XML file. * Creates a 'fall back' for the WHDLoad file if not present - should fix issues with RetroPie install not correctly providing this file. * Fixes bug in D-pad / AXIS handling * bugfix for sprites in whd game prefs, plus added screen widths. * Download of `boot-data.zip` does not appear to be in the latest branch * new hostprefs options: Fixed width, and fixed width/height for CD32 autobooter
This commit is contained in:
parent
99e13859ed
commit
b723e47ad8
2 changed files with 79 additions and 4 deletions
|
@ -49,6 +49,7 @@ struct game_options
|
|||
TCHAR cpu_24bit[256] = "nul\0";
|
||||
TCHAR sprites[256] = "nul\0";
|
||||
TCHAR scr_height[256] = "nul\0";
|
||||
TCHAR scr_width[256] = "nul\0";
|
||||
TCHAR y_offset[256] = "nul\0";
|
||||
TCHAR ntsc[256] = "nul\0";
|
||||
TCHAR chip[256] = "nul\0";
|
||||
|
@ -77,6 +78,9 @@ struct host_options
|
|||
TCHAR aspect_ratio[256] = "nul\0";
|
||||
TCHAR line_double[256] = "nul\0";
|
||||
TCHAR fixed_height[256] = "nul\0";
|
||||
TCHAR fixed_width[256] = "nul\0";
|
||||
TCHAR fixed_cd32_height[256] = "nul\0";
|
||||
TCHAR fixed_cd32_width[256] = "nul\0";
|
||||
};
|
||||
|
||||
static xmlNode* get_node(xmlNode* node, const char* name)
|
||||
|
@ -238,6 +242,7 @@ struct game_options get_game_settings(char* HW)
|
|||
strcpy(output_detail.cpu_comp, find_whdload_game_option("CPU_COMPATIBLE", HW).c_str());
|
||||
strcpy(output_detail.sprites, find_whdload_game_option("SPRITES", HW).c_str());
|
||||
strcpy(output_detail.scr_height, find_whdload_game_option("SCREEN_HEIGHT", HW).c_str());
|
||||
strcpy(output_detail.scr_width, find_whdload_game_option("SCREEN_WIDTH", HW).c_str());
|
||||
strcpy(output_detail.y_offset, find_whdload_game_option("SCREEN_Y_OFFSET", HW).c_str());
|
||||
strcpy(output_detail.ntsc, find_whdload_game_option("NTSC", HW).c_str());
|
||||
strcpy(output_detail.fast, find_whdload_game_option("FAST_RAM", HW).c_str());
|
||||
|
@ -268,7 +273,10 @@ struct host_options get_host_settings(char* HW)
|
|||
strcpy(output_detail.frameskip, find_whdload_game_option("FRAMESKIP", HW).c_str());
|
||||
strcpy(output_detail.line_double, find_whdload_game_option("LINE_DOUBLING", HW).c_str());
|
||||
strcpy(output_detail.fixed_height, find_whdload_game_option("FIXED_HEIGHT", HW).c_str());
|
||||
|
||||
strcpy(output_detail.fixed_width, find_whdload_game_option("FIXED_WIDTH", HW).c_str());
|
||||
strcpy(output_detail.fixed_cd32_height, find_whdload_game_option("FIXED_CD32_HEIGHT", HW).c_str());
|
||||
strcpy(output_detail.fixed_cd32_width, find_whdload_game_option("FIXED_CD32_WIDTH", HW).c_str());
|
||||
|
||||
return output_detail;
|
||||
}
|
||||
|
||||
|
@ -415,6 +423,17 @@ void cd_auto_prefs(struct uae_prefs* p, char* filepath)
|
|||
host_detail = get_host_settings(hardware_settings);
|
||||
}
|
||||
|
||||
|
||||
write_log("AutoBooter - Host: Controller 1 : %s \n", host_detail.controller1);
|
||||
write_log("AutoBooter - Host: Controller 2 : %s \n", host_detail.controller2);
|
||||
write_log("AutoBooter - Host: Controller 3 : %s \n", host_detail.controller3);
|
||||
write_log("AutoBooter - Host: Controller 4 : %s \n", host_detail.controller4);
|
||||
write_log("AutoBooter - Host: Mouse 1 : %s \n", host_detail.mouse1);
|
||||
write_log("AutoBooter - Host: Mouse 2 : %s \n", host_detail.mouse2);
|
||||
write_log("AutoBooter - Host: Fixed CD32 Hei't: %s \n", host_detail.fixed_cd32_height);
|
||||
write_log("AutoBooter - Host: Fixed CD32 Width: %s \n", host_detail.fixed_cd32_width);
|
||||
|
||||
|
||||
//
|
||||
// *** EMULATED HARDWARE ***
|
||||
//
|
||||
|
@ -509,6 +528,29 @@ void cd_auto_prefs(struct uae_prefs* p, char* filepath)
|
|||
_stprintf(txt2, "%s=joy1", _T("joyport1"));
|
||||
cfgfile_parse_line(p, txt2, 0);
|
||||
}
|
||||
|
||||
|
||||
if (strcmpi(host_detail.fixed_cd32_height, "nul") != 0)
|
||||
{
|
||||
_stprintf(txt2, "gfx_height=%s", host_detail.fixed_cd32_height);
|
||||
cfgfile_parse_line(p, txt2, 0);
|
||||
_stprintf(txt2, "gfx_height_windowed=%s", host_detail.fixed_cd32_height);
|
||||
cfgfile_parse_line(p, txt2, 0);
|
||||
_stprintf(txt2, "gfx_height_fullscreen=%s", host_detail.fixed_cd32_height);
|
||||
cfgfile_parse_line(p, txt2, 0);
|
||||
}
|
||||
|
||||
if (strcmpi(host_detail.fixed_cd32_width, "nul") != 0)
|
||||
{
|
||||
_stprintf(txt2, "gfx_width=%s", host_detail.fixed_cd32_width);
|
||||
cfgfile_parse_line(p, txt2, 0);
|
||||
_stprintf(txt2, "gfx_width_windowed=%s", host_detail.fixed_cd32_width);
|
||||
cfgfile_parse_line(p, txt2, 0);
|
||||
_stprintf(txt2, "gfx_width_fullscreen=%s", host_detail.fixed_cd32_width);
|
||||
cfgfile_parse_line(p, txt2, 0);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -796,7 +838,9 @@ void whdload_auto_prefs(struct uae_prefs* p, char* filepath)
|
|||
write_log("WHDBooter - Game: Chipset : %s \n", game_detail.chipset);
|
||||
write_log("WHDBooter - Game: JIT : %s \n", game_detail.jit);
|
||||
write_log("WHDBooter - Game: CPU Compat : %s \n", game_detail.cpu_comp);
|
||||
write_log("WHDBooter - Game: Sprite Col : %s \n", game_detail.sprites);
|
||||
write_log("WHDBooter - Game: Scr Height : %s \n", game_detail.scr_height);
|
||||
write_log("WHDBooter - Game: Scr Width : %s \n", game_detail.scr_width);
|
||||
write_log("WHDBooter - Game: Scr YOffset: %s \n", game_detail.y_offset);
|
||||
write_log("WHDBooter - Game: NTSC : %s \n", game_detail.ntsc);
|
||||
write_log("WHDBooter - Game: Fast Ram : %s \n", game_detail.fast);
|
||||
|
@ -821,6 +865,10 @@ void whdload_auto_prefs(struct uae_prefs* p, char* filepath)
|
|||
//printf("aspect: %s \n", host_detail.aspect_ratio);
|
||||
//printf("frames: %s \n", host_detail.frameskip);
|
||||
write_log("WHDBooter - Host: Fixed Height : %s \n", host_detail.fixed_height);
|
||||
write_log("WHDBooter - Host: Fixed Width : %s \n", host_detail.fixed_width);
|
||||
write_log("WHDBooter - Host: Fixed CD32 Hei't: %s \n", host_detail.fixed_cd32_height);
|
||||
write_log("WHDBooter - Host: Fixed CD32 Width: %s \n", host_detail.fixed_cd32_width);
|
||||
|
||||
//
|
||||
// *** EMULATED HARDWARE ***
|
||||
//
|
||||
|
@ -1245,6 +1293,25 @@ void whdload_auto_prefs(struct uae_prefs* p, char* filepath)
|
|||
cfgfile_parse_line(p, txt2, 0);
|
||||
}
|
||||
|
||||
if (strcmpi(host_detail.fixed_width, "nul") != 0)
|
||||
{
|
||||
_stprintf(txt2, "gfx_width=%s", host_detail.fixed_width);
|
||||
cfgfile_parse_line(p, txt2, 0);
|
||||
_stprintf(txt2, "gfx_width_windowed=%s", host_detail.fixed_width);
|
||||
cfgfile_parse_line(p, txt2, 0);
|
||||
_stprintf(txt2, "gfx_width_fullscreen=%s", host_detail.fixed_width);
|
||||
cfgfile_parse_line(p, txt2, 0);
|
||||
}
|
||||
else if (strcmpi(game_detail.scr_width, "nul") != 0)
|
||||
{
|
||||
_stprintf(txt2, "gfx_width=%s", game_detail.scr_width);
|
||||
cfgfile_parse_line(p, txt2, 0);
|
||||
_stprintf(txt2, "gfx_width_windowed=%s", game_detail.scr_width);
|
||||
cfgfile_parse_line(p, txt2, 0);
|
||||
_stprintf(txt2, "gfx_width_fullscreen=%s", game_detail.scr_width);
|
||||
cfgfile_parse_line(p, txt2, 0);
|
||||
}
|
||||
|
||||
// Y OFFSET
|
||||
if (strcmpi(game_detail.y_offset, "nul") != 0)
|
||||
{
|
||||
|
@ -1253,7 +1320,7 @@ void whdload_auto_prefs(struct uae_prefs* p, char* filepath)
|
|||
}
|
||||
|
||||
// SPRITE COLLISION
|
||||
if (strcmpi(game_detail.scr_height, "nul") != 0)
|
||||
if (strcmpi(game_detail.sprites, "nul") != 0)
|
||||
{
|
||||
_stprintf(txt2, "collision_level=%s", game_detail.sprites);
|
||||
cfgfile_parse_line(p, txt2, 0);
|
||||
|
|
|
@ -206,12 +206,20 @@ public:
|
|||
{ auto afile = popen(download_command, "r");
|
||||
pclose(afile);
|
||||
}
|
||||
|
||||
// download boot-data.zip
|
||||
snprintf(xml_path, MAX_DPATH, "%s/whdboot/boot-data.zip", start_path_data);
|
||||
snprintf(download_command, MAX_DPATH, "wget -np -nv -O %s https://github.com/midwan/amiberry/blob/master/whdboot/boot-data.zip?raw=true",xml_path);
|
||||
if (!zfile_exists(xml_path)) // ??
|
||||
{ auto afile = popen(download_command, "r");
|
||||
pclose(afile);
|
||||
}
|
||||
|
||||
// download kickstart RTB files for maximum compatibility
|
||||
snprintf(xml_path, MAX_DPATH, "kick33180.A500.RTB");
|
||||
download_rtb(xml_path);
|
||||
snprintf(xml_path, MAX_DPATH, "kick33192.A500.RTB");
|
||||
download_rtb(xml_path);
|
||||
//snprintf(xml_path, MAX_DPATH, "kick33192.A500.RTB");
|
||||
//download_rtb(xml_path);
|
||||
snprintf(xml_path, MAX_DPATH, "kick34005.A500.RTB");
|
||||
download_rtb(xml_path);
|
||||
snprintf(xml_path, MAX_DPATH, "kick40063.A600.RTB");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue