-
Notifications
You must be signed in to change notification settings - Fork 233
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VC crash screen + load progress #2153
base: Dev
Are you sure you want to change the base?
Conversation
@Rebbacus Could you post a screenshot of the load screen as well please? |
We've been discussing this internally and some concerns have been raised:
|
|
Main.py
Outdated
if wad_app1_sha1 in wad_app1_sha1_usa: | ||
if wad_app5_sha1 in wad_app5_sha1_usa: | ||
wad_patch_name = "ootr_usa.gzi" | ||
else: | ||
raise Exception('Base WAD file is not a valid OoT USA or JPN wad.') | ||
elif wad_app1_sha1 in wad_app1_sha1_jpn: | ||
if wad_app5_sha1 in wad_app5_sha1_jpn: | ||
wad_patch_name = "ootr_jpn.gzi" | ||
else: | ||
raise Exception('Base WAD file is not a valid OoT USA or JPN wad.') | ||
else: | ||
raise Exception('Base WAD file is not a valid OoT USA or JPN wad.') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that instead of having a bunch of branches here,you should pull out the values being checked into individual booleans e.g.
isUsaApp1 = wad_app1_sha1 in wad_app1_sha1_usa
isUsaApp5 = ...
isUsaWad = isUsaApp1 && isUsaApp5
[...]
if isUsaWad:
wad_patch_name = ...
elif isJapanWad:
[...]
else:
raise Exception(...)
Also the exception should either be a user defined class derived from Exception, RuntimeException, or one of the other concrete exceptions. You should not use the raw Exception base class.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That makes more sense, sure 1841b22
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, you should probably still use the repo's standard for variable naming. I wrote them using camelcase in the suggestion out of habit from work.
A port of the VC functions I did for the Majora's Mask Randomizer VC - load progress of the ROM and custom crash screens.
The PPC assembly was converted to gzi commands and is placed in the unused spaces of app1. The hooks are in the exception handler, the start-up and rom loading routines, and in cpuFindFunction to save a register value when it finds an illegal instruction.
I've played for a little bit on dolphin and wii and it seems okay.
The wii crash addresses, N64 registers and last entered recomp node
An N64 stack trace is attempted. Due to how the VC doesn't really keep track of the program counter, a guess is made on where to start. This often fails however, and can result in incorrect info or the page showing unavailable.
Wii GP registers
Wii Back Chain
Some recomp code heap stuff
Couldn't get controller polling to work, so the crash pages advance on a timer, and this doesn't include any random crash patches yet - I'd like to see what crashes get reported first.