[Not64] Custom channel forwarder that reads meta.xml to autoboot a game?

All Wii64 related discussions here
Post Reply
User avatar
Nintendo Maniac 64
Posts: 156
Joined: Mon Dec 24, 2012 4:02 am

[Not64] Custom channel forwarder that reads meta.xml to autoboot a game?

Post by Nintendo Maniac 64 » Wed Aug 04, 2021 1:12 am

As a person using Cyan's modified bootmii file on my 2GB SD card to boot my Wii straight into USB Loader GX which I have set to "channel" view, I was hoping to make some custom channel forwarders that point to a few individual games using Not64's game-autoboot function as described at the end of the meta.xml which works when launching via the Homebrew Channel:

Code: Select all

	<arguments>
<!--	<arg>rompath = "[sd,usb]:/path/to/file"</arg>	-->
	</arguments>
	<ahb_access/>
The issue however is that the only custom channel forwarder I know of that lets you input a specific folder name for a given app is "Simple Forwarder Channel Creator"* but, sadly, it seems to ignore the meta.xml file and therefore the "rompath" argument

So I ask - is there by any chance another way to create a custom channel forwarder that does read any arguments contained within the app's meta.xml file?


(I am aware that Not64's game-autoboot function does work with the Not64 Wiiflow plugin as well as through USB Loader GX's homebrew launcher, but I'd really prefer having a dedicated channel forwarder that can be located along-side all of my other Wii, GameCube, WiiWare, and virtual console games)


*For anyone also using "Simple Forwarder Channel Creator" in-conjunction with USB Loader GX, you need to set the 'Forwarder Base' to "USB Loader GX" or else it'll just give you a black screen when loading a given forwarder channel through USB Loader GX.


----------------------------------------------------------------


EDIT: I discovered the following line at the end of Not64's settings.cfg file:

Code: Select all

rompath = ""
I believe this may be the setting that the autoboot function temporarily sets - I say this because, if you manually fill in the rompath in the settings.cfg file with something like the following:

Code: Select all

rompath = "sd:/not64/roms/game.z64"
then it'll always auto-load the according rom even if you straight-up delete the meta.xml file located in the apps/not64 folder. This also means that it even works with forwarders!... though you're stuck with only a single rom unless you want to swap SD cards in a game cartridge sort of way.


EDIT 2: It's a totally derpy work-around, but should nonetheless work. It turns out that the "sd:/not64" and "fat:/not64" paths are stored right in the boot.dol as plain text, meaning it should taking nothing more than some basic hex editing to change those according values to something like "sd:/not64-1" to create individual per-game configurations that work with custom forwarders. And when combined with the "rompath" value located in settings.cfg, should even allow for autobooting a specific game even with the likes of a custom forwarder.
Last edited by Nintendo Maniac 64 on Thu Aug 05, 2021 4:07 am, edited 1 time in total.
User avatar
saulfabreg
Posts: 16
Joined: Mon Aug 02, 2021 4:34 pm
Contact:

Re: [Not64] Custom channel forwarder that reads meta.xml to autoboot a game?

Post by saulfabreg » Thu Aug 05, 2021 3:23 am

Try making a DOL forwarder (a dol file that loads the dol file and reads the meta.xml file from a specific path) using XFlak's ModMii tool, more info here: https://gbatemp.net/threads/modmii-for- ... ic.207126/
User avatar
Nintendo Maniac 64
Posts: 156
Joined: Mon Dec 24, 2012 4:02 am

Re: [Not64] Custom channel forwarder that reads meta.xml to autoboot a game?

Post by Nintendo Maniac 64 » Thu Aug 05, 2021 3:48 am

I tried that today and I seem to be dumb in that, I can get to the point of having my custom DOL forwarder added to the download queue, but I can't seem to figure out how to then actual download/save/export the resulting DOL forwarder into an actual WAD file. I'm probably going to have to figure that out sooner rather than later though since it seems that both Wii64 and WiiSX RX purely rely on the meta.xml arguments for their game-autoboot functions, meaning I can't use "Simple Forwarder Channel Creator" since it doesn't see the meta.xml file.

At the very least my derpy work-around with changing the "sd:/not64" path via hex-edting does however solve the controller configuration issue whereby it'd let you have a different button configuration on a per-game basis, and AFAICT the same exact logic can work on Wii64 and WiiSX RX as well (alternatively, if you're someone that knows how to compile code, then that's always an option).
User avatar
saulfabreg
Posts: 16
Joined: Mon Aug 02, 2021 4:34 pm
Contact:

Re: [Not64] Custom channel forwarder that reads meta.xml to autoboot a game?

Post by saulfabreg » Thu Aug 05, 2021 2:34 pm

Nintendo Maniac 64 wrote:
Thu Aug 05, 2021 3:48 am
I tried that today and I seem to be dumb in that, I can get to the point of having my custom DOL forwarder added to the download queue, but I can't seem to figure out how to then actual download/save/export the resulting DOL forwarder into an actual WAD file. I'm probably going to have to figure that out sooner rather than later though since it seems that both Wii64 and WiiSX RX purely rely on the meta.xml arguments for their game-autoboot functions, meaning I can't use "Simple Forwarder Channel Creator" since it doesn't see the meta.xml file.

At the very least my derpy work-around with changing the "sd:/not64" path via hex-edting does however solve the controller configuration issue whereby it'd let you have a different button configuration on a per-game basis, and AFAICT the same exact logic can work on Wii64 and WiiSX RX as well (alternatively, if you're someone that knows how to compile code, then that's always an option).
Okay, once you make the DOL forwarder with ModMii, inject the resulting DOL file in an AHBPROT-enabled homebrew base WAD using Leathl's CustomizeMii (https://code.google.com/archive/p/customizemii).

For get an AHBPROT-enabled base WAD, you can go here: https://gbatemp.net/threads/x-flaks-top ... ls.205622/

Greetings
User avatar
Nintendo Maniac 64
Posts: 156
Joined: Mon Dec 24, 2012 4:02 am

Re: [Not64] Custom channel forwarder that reads meta.xml to autoboot a game?

Post by Nintendo Maniac 64 » Thu Aug 05, 2021 7:26 pm

BTW, you said that you like using this stuff straight from the Homebrew Channel running in Dolphin. I know it's really easy to get Dolphin to load straight into the Homebrew Channel by just using Fix94's "Open Homebrew Channel" WAD, but what method do you use for the emulated SD card? I've always found that creating, editing, and managing the emulated memory card to be a bit of a PITA due to Dolphin's insistence on using disk image files (compare this to something like PPSSPP which simply just looks at a sub-folder in the emulator's program directory)

saulfabreg wrote:
Thu Aug 05, 2021 2:34 pm
Okay, once you make the DOL forwarder with ModMii, inject the resulting DOL file in an AHBPROT-enabled homebrew base WAD using Leathl's CustomizeMii (https://code.google.com/archive/p/customizemii).
As I mentioned on GBATemp (I see you already liked my post over there), the issue is that AFAICT it's not actually building the custom dol forwarder. Like I get to the part after inputting the app path to the dol, but then what? It doesn't automatically save the file to my hard drive AFAICT and it says it's just saved to the download queue but, when I actually look at the download queue, it just lists a bunch of things that aren't the custom dol forwarder.
User avatar
saulfabreg
Posts: 16
Joined: Mon Aug 02, 2021 4:34 pm
Contact:

Re: [Not64] Custom channel forwarder that reads meta.xml to autoboot a game?

Post by saulfabreg » Fri Nov 12, 2021 12:46 am

I made a complete tutorial for use my custom SRLs (specially Not64) and Wii forwarder channels for make it run in Not64 as if it was a Wii VC channel.
Here https://gbatemp.net/threads/how-to-use- ... ii.602640/
User avatar
Nintendo Maniac 64
Posts: 156
Joined: Mon Dec 24, 2012 4:02 am

Re: [Not64] Custom channel forwarder that reads meta.xml to autoboot a game?

Post by Nintendo Maniac 64 » Fri Nov 12, 2021 6:25 am

saulfabreg wrote:
Fri Nov 12, 2021 12:46 am
I made a complete tutorial for use my custom SRLs (specially Not64) and Wii forwarder channels for make it run in Not64 as if it was a Wii VC channel.
Here https://gbatemp.net/threads/how-to-use- ... ii.602640/
The main issue I've been having with ModMii's forwarder is that it breaks the power button functionality of Not64.

That is, normally when one uses Not64 launched via the Homebrew Channel or the like and you're in the middle of playing an N64 game, if you press the power button on the console, Not64 will automatically write the battery save data (it'll say so on-screen) and then shut the console down.

If you try doing this process when Not64 is launched via ModMii's forwarder, as soon as you press the power button while an N64 game is running, you'll get a crash dump.
Dirtcruncher
Posts: 2
Joined: Wed Nov 24, 2021 11:43 am

Re: [Not64] Custom channel forwarder that reads meta.xml to autoboot a game?

Post by Dirtcruncher » Wed Nov 24, 2021 11:55 am

Hey OP, I want exactly what you want as well. Would you say your hex edit solution got you exactly what you wanted (namely, one forwarder per N64 game, where each game can have its own meta.xml and settings so that you don’t have to toggle FB textures and whatnot when you play them)?

And to be clear, I know that’s what SaulFabreg’s solution is supposed to achieve. But you said it didn’t work because it caused the power button to crash the emulator?

I’ve just now tried SaulFabreg’s version of Mario Party 1 + the forwarder wad he made for it (thanks Saul!!!) and I ran it from USB Loader GX, and the power button worked fine. It did the “Automatically saved to SD card” message then turned off the console. Assuming he used ModMii to make that forwarder, it seems his solution works.

I could go ahead and try ModMii myself (I intend to because I want to make a bunch of forwarders for N64 games… Glover ftw!). And when I do, I can report the results here. But I just want to make sure I understand your problem, because I think you’re saying that didn’t work for you, but I’m seeing that Saul’s method (which is the ModMii method) worked great for me.

And if I can’t get it to work on my own custom forwarders, I want to confirm whether your hex edit method worked for you, and then I’ll try that too. Cheers!

Edit: I also want to do this with Wii64 and WiiSXRX, which you said respond differently to the meta.xml than Not64 (because they don’t save the rompath in their settings, so the need the meta.xml to set the rompath every time they boot, right?). But couldn’t you also hex edit their boot.dol’s to have a custom path for reading the meta.xml so that each forwarder can read a unique one, which would have the desired settings?
User avatar
Nintendo Maniac 64
Posts: 156
Joined: Mon Dec 24, 2012 4:02 am

Re: [Not64] Custom channel forwarder that reads meta.xml to autoboot a game?

Post by Nintendo Maniac 64 » Wed Nov 24, 2021 7:56 pm

Dirtcruncher wrote:
Wed Nov 24, 2021 11:55 am
And to be clear, I know that’s what SaulFabreg’s solution is supposed to achieve. But you said it didn’t work because it caused the power button to crash the emulator?
Well, I always used my own ModMii-created forwarders - maybe he does something a bit different? I'll have to try it and report back then.

Dirtcruncher wrote:
Wed Nov 24, 2021 11:55 am
I ran it from USB Loader GX, and the power button worked fine. It did the “Automatically saved to SD card” message then turned off the console. Assuming he used ModMii to make that forwarder, it seems his solution works.
Yeah, that was exactly the situation I was trying to do but I found that 1. ModMii forwarders don't even load through USB Loader GX (this will be fixed in the next version of USB Loader GX) and 2. ModMii forwarders, when launched straight from the Wii Menu directly, gave me the power button crash issue.

Again, perhaps I'll have to try SaulFabreg's forwarders directly rather than creating my own.


Dirtcruncher wrote:
Wed Nov 24, 2021 11:55 am
I also want to do this with Wii64 and WiiSXRX, which you said respond differently to the meta.xml than Not64 (because they don’t save the rompath in their settings, so the need the meta.xml to set the rompath every time they boot, right?). But couldn’t you also hex edit their boot.dol’s to have a custom path for reading the meta.xml so that each forwarder can read a unique one, which would have the desired settings?
The hex editing thing with Not64 is because, the way Not64 handles things, you can make it autoboot a game without using a meta.xml file by putting the necessary arguments directly into its config file. If your forwarder supports meta.xml and is working correctly, then you can just make copies of the Not64/Wii64/WiiSXRX "app" folder renamed to whatever and each folder having their own individual customized meta.xml to launch what ever according game - no need to hex edit anything!

So to clarify, the hex editing is to allow one to rename the emulator's data folder on the root of your SD card (where the config file is stored), not the "app" folder that contains the boot.dol and meta.xml.

On that subject, I want to call special attention to the way Not64 handles meta.xml files in that any setting that exists in Not64's config file can be used as a meta.xml argument.

With that being said, if you want to have more than 4 controller profiles across all games, then yes the hex editing route is the only way to go. Similarly, if you want to use various other non-controller settings on a per-game basis with specifically Wii64/WiiSXRX rather than Not64, then hex editing is also the only way to go.


If you are indeed still interested in the hex editing thing, then I've been thinking about making some easy-to-use patches (IPS/BPS/xdelta/etc) that basically just make generic altered versions labeled something like "Not64_a", "Not64_b" etc and would accordingly point to a data folder on the root of your SD card named "not64_a", "not64_b" etc.
Dirtcruncher
Posts: 2
Joined: Wed Nov 24, 2021 11:43 am

Re: [Not64] Custom channel forwarder that reads meta.xml to autoboot a game?

Post by Dirtcruncher » Mon Dec 06, 2021 6:11 am

^^

I see... OK I've looked into it a bit more and I understand the problem you're talking about. An emulator's data folder (on the root of the SD card) contains the emulator's settings; so even using the ModMii forwarders to run an app with an autoboot rompath in the meta.xml, you still wouldn't be able to able to have individual settings per game (unless those settings could also be arguments in the meta.xml, which you said is possible for Not64, which is awesome).

Well, the ability to have custom settings for each game is highly desirable because I run all these games with different settings. For example, some PlayStation games require a non-analog controller, but some games are better if you turn analog on! So that's a setting I would really like to be called on a per-game basis.

If your hex-editing solution is a clean way to do that, then hell yeah I'm interested in a patcher like that. In fact, I'll try to hex edit them myself in the mean time. In fact, would it be possible to have the folders be sub-folders to a main one? (e.g., "SD:/not64_subs/not64_a", "SD:/not64_subs/not64_b") Just to keep the SD root clean since I'd end up with maybe 60 such folders, if we include Wii64 Rice & WiiSXRX, and maybe a few others.

I just care a lot about this auto-boot stuff because I've made these Wiis for relatives & friends, and I'm really happy to share it all with them. But while I can understand how to manipulate the Wii64 settings every time I use it, I don't expect my sisters to get that, or to want to learn that; and I think it'll dampen the enjoyability for the average player if they have to worry about what 2x sal textures could possibly mean when they play Banjo-Kazooie. Auto-boot & ease-of-use ftw.

EDIT:
Hm actually I might be in over my head here. I know I'm on the cusp but I sense a thousand ways this could go wrong.
wiisxrxHex.PNG
(113.4 KiB) Not downloaded yet
User avatar
Nintendo Maniac 64
Posts: 156
Joined: Mon Dec 24, 2012 4:02 am

Re: [Not64] Custom channel forwarder that reads meta.xml to autoboot a game?

Post by Nintendo Maniac 64 » Mon Dec 06, 2021 7:58 pm

Dirtcruncher wrote:
Mon Dec 06, 2021 6:11 am
unless those settings could also be arguments in the meta.xml, which you said is possible for Not64, which is awesome
Yeah AFAIK that really only works for Not64.

To make it work for Not64 is actually really easy - copy the entire line for a given setting in Not64's settings.cfg file (when opened in Notepad++ at least; in plain Notepad the line-breaks may be missing) and use it as-is as a meta.xml argument. So as a simple example, for the config line "LimitVIs = 1" which controls the framerate cap, if you want to disable it for a specific game, copy it into the meta.xml between <arg> and </arg> tags and, in the case of our test, change the 1 to 0:

<arg>LimitVIs = 0</arg>

And make sure that line itself is located after an <arguments> tag but before an </arguments> tag, so it should look something like this:

<arguments>
<arg>LimitVIs = 0</arg>
</arguments>

For reference you can add multiple <arg> tags between <arguments> tags, so you can do something like the following:

<arguments>
<arg>2xSaI = 1</arg>
<arg>LimitVIs = 0</arg>
</arguments>


Dirtcruncher wrote:
Mon Dec 06, 2021 6:11 am
Hm actually I might be in over my head here. I know I'm on the cusp but I sense a thousand ways this could go wrong.
wiisxrxHex.PNG
No that's pretty much what I was looking at.

Basically if you simply replace every instance of "usb:/wiisxrx/" with something like "usb:/wiisxrx_per-game/config_a/" and also do the same for "sd:/wiisxrx/" --to-> "sd:/wiisxrx_per-game/config_a/" then it should theoretically "just work" - you just need to make sure to actually move and/or copy the existing wiisxrx folder to that /wiisxrx_per-game/config_a/ location.
Post Reply