Skip to content
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

Use retail console type for GC, instead of devkit #8564

Open
wants to merge 1 commit into
base: master
from

Conversation

@Pokechu22
Copy link
Contributor

Pokechu22 commented Jan 15, 2020

This removes some old hack where Gamecube games are marked as running on a devkit; YAGCD §4.2.1.1.2 explains the different values for 0x8000002C. Note that Wii titles already use the production version (except when actually running development titles):

u32 board_model = console_type == IOS::HLE::IOSC::ConsoleType::RVT ? 0x10000021 : 0x00000023;
Memory::Write_U32(board_model, 0x0000002c); // Board Model

I don't know too much of the context of the old hack, but blaming does give some very old comments that claim it is related to DSP timing. Since that's improved a lot in the past decade, I doubt this hack is no longer needed.

I have not tested this myself, as I do not own Ikaruga.

@jordan-woyak

This comment has been minimized.

Copy link
Member

jordan-woyak commented Jan 15, 2020

FYI, Ikaruga still boots and loads the memory card with the change.

Copy link
Member

BhaaLseN left a comment

I think it's about time Dolphin became a real console :)
And if anyone does need it to report a DevKit, they can probably hack it in themselves (or make a nice option if they really want to.)

@leoetlino

This comment has been minimized.

Copy link
Member

leoetlino commented Jan 16, 2020

IIRC (it's been a very long while so I could be misremembering), one downside of setting the console type to retail is that some games will no longer print OSReports.

@delroth

This comment has been minimized.

Copy link
Member

delroth commented Jan 16, 2020

Getting OSReport was the main original motivation IIRC. They're super useful and we should make sure this patch does not impact our ability to log them.

@BhaaLseN

This comment has been minimized.

Copy link
Member

BhaaLseN commented Jan 16, 2020

For the most part (read as: your average Dolphin end-user) we don't really care too much about them.
For dev purposes, I do agree. But any dev is likely smart enough to just change that single line themselves.

We could opt to leave the DevKit setting as reminder-comment, but you probably hate commented out code as much as I do.

@mbc07

This comment has been minimized.

Copy link
Contributor

mbc07 commented Jan 16, 2020

What about setting the console type to retail by default but changing it at runtime to devkit if, for example, the debugging GUI is enabled, or by setting a value to true in Dolphin.ini?

@Pokechu22

This comment has been minimized.

Copy link
Contributor Author

Pokechu22 commented Jan 16, 2020

I assumed all games had stubbed out OSReport functions, which wouldn't do anything without HLE patches anyways (which is the case with the Wii IIRC). Looking at the actual code (in "Alien Hominid") it seems like that's not the case and it's doing something.

That said, I also have seen that game can give different output based on the boot magic word at 0x80000020 (I know the DVD code gives a bit more debug logging about the disc header if it's set to jtag). That is currently hardcoded at bootrom:

// Booted from bootrom. 0xE5207C22 = booted from jtag
PowerPC::HostWrite_U32(0x0D15EA5E, 0x80000020);

I did some testing, and it looks like OSReport does actually work directly when the console type is set to devkit. Patching HLE functions (after first generating symbols from the signature database) previously caused OSReport output to show up twice (once from whatever it's doing internally, and once from the HLE patch). With this change, there is no direct OSReport output immediately, but it still shows up fine after doing the HLE patch.

If we do want to have it be configurable, it would probably be best to allow setting both the boot type and the console type from the UI (probably as a dropdown with all of the options, not just a checkbox to switch between "retail 3" and "latest devkit HW").

@shuffle2

This comment has been minimized.

Copy link
Contributor

shuffle2 commented Jan 19, 2020

Yes, last time this came up, it was decided to leave the type indicator as devkit for reasons such as debug logs. Probably the comment about Ikaruga should be removed (the code path is different, but practically it doesn't matter anymore).

IIRC, HLE patching debug logs may also find other debug functions which have been compiled out (e.g. int dbglog(char*,...) { return 0; }), so it can be considered a superset of normal debug log functions.

There doesn't really seem to be a reason to change the default, unless there is some known compat issue which would be solved. Otherwise it just seems like adding Yet Another Option for no discernible benefit.

@shuffle2

This comment has been minimized.

Copy link
Contributor

shuffle2 commented Jan 19, 2020

previously caused OSReport output to show up twice

This sounds like a bug/regression in the HLE system.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked issues

Successfully merging this pull request may close these issues.

None yet

7 participants
You can’t perform that action at this time.