Please fix launching titles with arguments

JoostinOnline
Posts: 18
Joined: Fri Apr 27, 2012 6:05 am
Location: The Twilight Zone
Contact:

Please fix launching titles with arguments

Post by JoostinOnline » Fri Apr 27, 2012 6:14 am

WII_LaunchTitleWithArgs has been broken since v1.8.7, and I've had to compile my own version each time. I would really appreciate it if you would fix it.

WinterMute
Site Admin
Posts: 1853
Joined: Tue Aug 09, 2005 3:21 am
Location: UK
Contact:

Re: Please fix launching titles with arguments

Post by WinterMute » Sun Apr 29, 2012 12:19 am

Please provide details of the problem and the fix here, don't link to random sites and expect us to somehow glean the information from snide comments.

Better yet, since you're compiling your own version which I assume works, provide a patch at http://sourceforge.net/tracker/?group_i ... tid=668553
Help keep devkitPro toolchains free, Donate today

Personal Blog

JoostinOnline
Posts: 18
Joined: Fri Apr 27, 2012 6:05 am
Location: The Twilight Zone
Contact:

Re: Please fix launching titles with arguments

Post by JoostinOnline » Sun Apr 29, 2012 12:38 am

A patch has already been submitted by DacoTaco, whose original patch broke wiilaunch. I've just been removing the changes made in 1.8.7 (which I don't like doing, as I don't know how it might affect everything else), so I can't confirm if it works, only that the pre-compiled libogc doesn't. I'll try to test it out tonight.

Sorry I linked to wiibrew, I didn't know you considered it a random site.

WinterMute
Site Admin
Posts: 1853
Joined: Tue Aug 09, 2005 3:21 am
Location: UK
Contact:

Re: Please fix launching titles with arguments

Post by WinterMute » Sun Apr 29, 2012 10:23 am

Said patch was committed a while ago & provided with the libogc 1.8.11 release - http://devkitpro.org/viewtopic.php?f=13&t=3094
Help keep devkitPro toolchains free, Donate today

Personal Blog

JoostinOnline
Posts: 18
Joined: Fri Apr 27, 2012 6:05 am
Location: The Twilight Zone
Contact:

Re: Please fix launching titles with arguments

Post by JoostinOnline » Sun Apr 29, 2012 8:09 pm

I see no mention of it in the changelog. Is there a place I can look at the entire history for each release?

WinterMute
Site Admin
Posts: 1853
Joined: Tue Aug 09, 2005 3:21 am
Location: UK
Contact:

Re: Please fix launching titles with arguments

Post by WinterMute » Mon Apr 30, 2012 9:28 am

It wasn't part of the changeset fpr 1.8.11, that's merely the most recent release.

As it happens it was part of the changeset from 1.8.9 to 1.8.10 which I never got around to doing a release announcement for. The entire history is exactly where you'd expect it to be ...

The important question here is - does precompiled 1.8.11 libogc work?
Help keep devkitPro toolchains free, Donate today

Personal Blog

JoostinOnline
Posts: 18
Joined: Fri Apr 27, 2012 6:05 am
Location: The Twilight Zone
Contact:

Re: Please fix launching titles with arguments

Post by JoostinOnline » Mon Apr 30, 2012 4:10 pm

WinterMute wrote:It wasn't part of the changeset fpr 1.8.11, that's merely the most recent release.

As it happens it was part of the changeset from 1.8.9 to 1.8.10 which I never got around to doing a release announcement for. The entire history is exactly where you'd expect it to be ...

The important question here is - does precompiled 1.8.11 libogc work?
It does, but with one problem. Here is a piece of code from Settings Editor GUI:

Code: Select all

/* 
Prompt the user on whether or not to save, then load the Internet Settings page
*/
void InternetSettings(void) {
	if (Prompt2Save()) return;
	WII_Initialize();
	fadeOut();
	/*
	Detect Priiloader's Autoboot and Return To settings from loader.ini.
	If they aren't both set to System Menu (and Priiloader is installed),
	use magic word to launch the System Menu instead.
	*/
	if (!GetIni()){
		Message("Returning to System Menu.");
		sleep(2);
		*(vu32*)0x8132FFFB = 0x50756e65; // magicword "Pune"
		DCFlushRange((void*)0x8132FFFB, 4); // Thanks to entropy for this line
		ICInvalidateRange((void *)(0x8132FFFB), 4); // Thanks to FIX94 for this line
	}
	WII_ReturnToSettingsPage(SETTINGS_INTERNET);
	} // InternetSettings
Using ICInvalidateRange causes the app to code dump if I chose not to save settings, and go to black screen if I choose to save settings. If I comment it out our downgrade libogc, it works fine.

I am new to C, and by no means an expert coder. I don't understand why I was told to use ICInvalidateRange or even what it does. I just figured it was worth mentioning.

WinterMute
Site Admin
Posts: 1853
Joined: Tue Aug 09, 2005 3:21 am
Location: UK
Contact:

Re: Please fix launching titles with arguments

Post by WinterMute » Mon Apr 30, 2012 8:35 pm

ICInvalidateRange will tell the cpu that the instruction cache for a given range is now invalid so that instructions will be refetched from physical RAM. I really don't see why you'd need that tbh, you're writing data in that range, not instructions.

Something also worth noting is that the address 0x8132FFFB is somewhere within your application's heap space - if anything is allocated around there then it's going to be corrupted. I'm also reliably informed that the address in question will be overwritten when the system menu loads anyway.

What is that code even supposed to do?
Help keep devkitPro toolchains free, Donate today

Personal Blog

JoostinOnline
Posts: 18
Joined: Fri Apr 27, 2012 6:05 am
Location: The Twilight Zone
Contact:

Re: Please fix launching titles with arguments

Post by JoostinOnline » Mon Apr 30, 2012 10:12 pm

It tells Priiloader to ignore the current autoboot/return to settings and load the System Menu instead. Priiloader will interfere with WII_ReturnToSettingsPage(SETTINGS_INTERNET) if they both aren't set to System Menu, so I use magic word (that's the name of the code) to force loading the SM if necessary. It's not a perfect solution, but it's the only way for a user to get access to Internet Settings without changing their Priiloader settings.

If Priiloader's settings are both set to load the System Menu, the Internet Settings page will load fine.

WinterMute
Site Admin
Posts: 1853
Joined: Tue Aug 09, 2005 3:21 am
Location: UK
Contact:

Re: Please fix launching titles with arguments

Post by WinterMute » Tue May 01, 2012 12:02 am

OK, I spoke to Daco earlier about this oddness & he's going to change the "magic word" address to something sensible instead of in the middle of RAM.

The ICInvalidateRange call is bogus and shouldn't be there, I wish I knew why it caused a crash though. In theory it should be harmless.

I did some digging and found the source code for your Settings Editor GUI which won't build as is for me. This kind of suggests that your devkit is installed improperly - have you installed the portlibs in your libogc folder or something? See http://devkitpro.org/wiki/portlibs

I've created a diff of the changes I had to make locally & attached to this post

[The extension diff has been deactivated and can no longer be displayed.]

Really you should look at setting up source control somewhere - googlecode, github etc.
Help keep devkitPro toolchains free, Donate today

Personal Blog

Post Reply

Who is online

Users browsing this forum: No registered users and 8 guests