WHDLoad Booter Updates (#290)
* WHDBooter Itegration * Further WHDBoot development * Clean-ups and beginning of kick-rom checking * Loads matching .whd (database) config file from game-data folder, and .uae from /confs/ - start of host options * Fixes problem with saving of equally-named config. Some Host options being set from hard-code variables. (WIP) * Solution for host controller settings implemented * Example Template files (not final versions) * Game information (future database info) is imported from .whd file, .controls (customs) also loaded * Tidies up auto-loading of existing .uae config * Separates WHDLoad Booter into it's own module. `amiberry_whdbooter.cpp` * Many options now implemented from .whd (cpu speed and memory to-do) * Y offset, Memory , Clock Speed options added - all needed options now being implemented * Compatibility settings now correctly read from XML file (or fall-back to individual game file) and are applied * Custom controls now imported from XML. * Hostconfig options and general near-completion of WHDBooter * Final change and example XML file provided * Missed changes from merge * Bug fix for Auto WHDLoad ... sound on/off from host settings incorrectly read * Improved WHDBooter with splash screen * WHDLoad booter minor fixes and improvements * WHDLoad Booter XML file produced from slave file scanning.
This commit is contained in:
parent
92df2f1a18
commit
beb3e4f599
2 changed files with 45176 additions and 49 deletions
|
@ -64,6 +64,7 @@ struct game_options
|
|||
TCHAR chipset[256] = "nul\0";
|
||||
TCHAR jit[256] = "nul\0";
|
||||
TCHAR cpu_comp[256] = "nul\0";
|
||||
TCHAR cpu_24bit[256] = "nul\0";
|
||||
TCHAR sprites[256] = "nul\0";
|
||||
TCHAR scr_height[256] = "nul\0";
|
||||
TCHAR y_offset[256] = "nul\0";
|
||||
|
@ -248,6 +249,7 @@ struct game_options get_game_settings(char* HW)
|
|||
strcpy(output_detail.clock, find_whdload_game_option("CLOCK", HW));
|
||||
strcpy(output_detail.chipset, find_whdload_game_option("CHIPSET", HW));
|
||||
strcpy(output_detail.jit, find_whdload_game_option("JIT", HW));
|
||||
strcpy(output_detail.cpu_24bit, find_whdload_game_option("CPU_24BITADDRESSING", HW));
|
||||
strcpy(output_detail.cpu_comp, find_whdload_game_option("CPU_COMPATIBLE", HW));
|
||||
strcpy(output_detail.sprites, find_whdload_game_option("SPRITES", HW));
|
||||
strcpy(output_detail.scr_height, find_whdload_game_option("SCREEN_HEIGHT", HW));
|
||||
|
@ -438,6 +440,8 @@ void whdload_auto_prefs(struct uae_prefs* p, char* filepath)
|
|||
|
||||
if (zfile_exists(whd_config)) // use XML database
|
||||
{
|
||||
//printf("XML exists %s\n",game_name);
|
||||
|
||||
char buffer[4096];
|
||||
|
||||
const auto doc = xmlParseFile(whd_config);
|
||||
|
@ -451,16 +455,20 @@ void whdload_auto_prefs(struct uae_prefs* p, char* filepath)
|
|||
const auto attr = xmlGetProp(game_node, reinterpret_cast<const xmlChar *>("filename"));
|
||||
if (attr != nullptr)
|
||||
{
|
||||
// printf ("%s\n",attr);
|
||||
if (strcmpi(reinterpret_cast<const char*>(attr),game_name) == 0)
|
||||
{
|
||||
// now get the <hardware> and <custom_controls> items
|
||||
|
||||
//printf("found game in XML?\n");
|
||||
auto temp_node = game_node->xmlChildrenNode;
|
||||
temp_node = get_node(temp_node, "hardware");
|
||||
if (xmlNodeGetContent(temp_node) != nullptr)
|
||||
{
|
||||
_stprintf(hardware_settings, "%p", xmlNodeGetContent(temp_node));
|
||||
_stprintf(hardware_settings, "%s", xmlNodeGetContent(temp_node));
|
||||
// printf("%s\n",hardware_settings);
|
||||
game_detail = get_game_settings(hardware_settings);
|
||||
|
||||
}
|
||||
|
||||
temp_node = game_node->xmlChildrenNode;
|
||||
|
@ -775,7 +783,7 @@ void whdload_auto_prefs(struct uae_prefs* p, char* filepath)
|
|||
_stprintf(txt2, "fastmem_size=%d", temp_ram);
|
||||
cfgfile_parse_line(p, txt2, 0);
|
||||
}
|
||||
if (strcmpi(game_detail.fast,"nul") != 0)
|
||||
if (strcmpi(game_detail.z3,"nul") != 0)
|
||||
{
|
||||
temp_ram = atol(game_detail.z3);
|
||||
_stprintf(txt2, "z3mem_size=%d", temp_ram);
|
||||
|
@ -838,6 +846,14 @@ void whdload_auto_prefs(struct uae_prefs* p, char* filepath)
|
|||
cfgfile_parse_line(p, txt2, 0);
|
||||
}
|
||||
|
||||
// COMPATIBLE CPU
|
||||
if (strcmpi(game_detail.cpu_comp,"false") == 0)
|
||||
{
|
||||
_stprintf(txt2, "cpu_24bit_addressing=false");
|
||||
cfgfile_parse_line(p, txt2, 0);
|
||||
}
|
||||
|
||||
|
||||
// NTSC
|
||||
if (strcmpi(game_detail.ntsc,"true") == 0)
|
||||
{
|
||||
|
|
45153
whdboot/game-data/whdload_db.xml
Executable file → Normal file
45153
whdboot/game-data/whdload_db.xml
Executable file → Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue