v2.1 ~ Omnimix v3?! QoL pushed to the maxxx ~
Version 2.1 is there with a couple bugfixes and a HUGE QoL improvement regarding omnimix
Fixes
< pfree>, <quick_retry>
Fixed a crash that could happen sometimes when pressing numpad 8 or 9 on result screen.
<quick_retry>
Fixed quick retry "option select loop" with AC Tsumtsum Medley.
This song was a special track in usaneko (unlocked by scanning a Tsum mascot on the reader), with some unique quirks: there is no chara option, no ojama, and only the jacket displayed, so it doesn't go through the same option select screen loading code, where the patch was installed.
Note: holding 8 in order to skip option select screen works in a slightly different way for this song only, on kaimei/unilab the transition is not as smooth looking (short black screen showing), and the jacket is also misplaced (looks like the part of code allowing to hide the regular option screen and display only the centered jacket is gone), but it's working fine at least.
<local_favorites>
Fixed a softlock that could happen when pressing 9 on song select screen while playing as guest.
<skip_tutorials>
Fixed a crash that could happen on mode select screen with some versions of the game.
Enhancements
<patch_db>
!!! POPNHAX CAN NOW QUICKLY GENERATE THE PATCH FILE !!!
No more loading the dll with IDA and using a python script to generate the patch file when a new popn update drops, and no risk of loading the wrong one for your data :)
The code has been optimized so it only takes 2 to 3 seconds on the old SDcab bemanipc hardware (and is pretty much instant on modern hardware), so you don't even need to store the patches files anymore, it's no biggie to let popnhax regenerate them on launch! (off topic dev rant: tfw windows doesn't have fmemopen nor open_memstream :( )
Note: If you don't collect patch files anymore then you won't be able to let popnhax autodetect the datecode based on music limit value. So make sure to either rename your popn22.dll or edit your ea3-config file to reflect the correct datecode.
Additional debug options
<patch_xml_dump>
You can use this option to write the generated patches to a file (in case it doesn't work and requires modding).
Note: patch_db will always look for a matching patch file in data_mods folder. Patch generation is only done when no matching file is found.
This means that if you dump the file then mod it, the modded version will be loaded instead.
<force_patch_xml>
This is the new name for patch_xml_filename
Useful technical details
If you ever used ida_find_addrs.py with IDA you might have noticed it contains an offset blacklist. The current blacklist has been included in popnhax code, but you can create a text file named "patches_blacklist.dat" in data_mods folder to add new "known bad offsets" without having to recompile popnhax.
File format is plain text with just one offset per line, e.g.
0x100be154
0x100be346
0x100bed91
The engine (libdisasm) is a full x86 disassembler so it should always be possible to adapt patch generation so that it keeps working in the future, just like we had to adapt the python script when unilab debuted.
<local_favorites>
Additional debug options
<local_favorites_path>
You can now set a custom folder to store favorites rather than using data_mods. This is especially useful if you want to mount a network share to access your favorites from anywhere.
<config_diag>
Not an option in the xml, but popnhax will now display more specific errors when it fails to load your config file.
popnhax: config update: xml has changed. Regenerating opt file
popnhax: FATAL ERROR: failed to load popnhax.opt. Running advanced diagnostic...
<score_challenge __type="bool">1</score_cgyjlenge>
ERROR: score_challenge: opening tag doesn't match closing tag (<score_challenge> vs </score_cgyjlenge>)
<audio_source_fix __type="u8">0</audio_source_fix>
ERROR: audio_source_fix: unexpected type (expected bool, got u8)
<audio_offset __type="s8">500</audio_offset>
ERROR: audio_offset: invalid value (should be an integer between -128 and 127, got 500)
ERROR: required option custom_categ not found
<custom_exclude_from_version __type="bool">15</custom_exclude_from_version>
ERROR: custom_exclude_from_version: invalid bool value (should be 0 or 1, got 15)
<custom_exclude_from_level __type="bool">0<custom_exclude_from_level>
ERROR: custom_exclude_from_level: malformed closing tag (should be </custom_exclude_from_level>)
Removals
<patch_xml_auto>, <patch_xml_filename>
patch_xml_filename has been renamed to force_patch_xml.
patch_xml_auto has been removed as it's just the default behavior when force_patch_xml is not set.