Welcome! Log In Create A New Profile

Advanced

Channel creation

Posted by whodares 
Re: Channel creation
November 26, 2008 12:52AM
Well, those ideas are better anyway :P.
Re: Channel creation
December 02, 2008 08:44AM
With thanks to comex last night, I've now got a way to test banners on my Wii... The script still needs a bit of fixing (this is an issue with me using Windows, we needed to replace sections of code).

I'm hoping, down the line, comex might modify the menu loader dol to find the addresses to patch, rather than hard code. Then I could merge the code into my banner tools, and you could run it all straight out of the box :-)



Edited 2 time(s). Last edit at 12/02/2008 09:13AM by whodares.
Re: Channel creation
December 02, 2008 11:38PM
@whodares

Could you give us more detail about the patch?
Re: Channel creation
December 03, 2008 09:18AM
Well, basically, it redirects the API requests that open, read, seek, and close the banner files down the USBGecko. A script on the PC will check if the file exists locally, and send that back, if not, it'll send a note back telling the Wii to process it normally.

I've not seen the code for the Wii menu booter, but the whole package works well. Kudos to comex :-)

I'm currently working on LZ77 compression, although I really should finish the brlyt and brlan stuff soon.
Re: Channel creation
December 17, 2008 06:32PM
so, how's it coming whodares?

I have a question regarding your tools and the HBC install.

Since 3.3 ver.2 and 3.4 block channel installs, then how does the Homebrew channel get installed on that system and how would your channel creator get around this?

also, as I was confused about a while back, (here) how do Wii's brick with a "bad" banner? I was getting it confused with the EXACT size issue that bricks, so what warrants a bricking with your banners?
Re: Channel creation
December 17, 2008 07:57PM
It's pretty much gone nowhere lately. I lost a bit of code, and I've also been spending a lot of time on a different project. I might post the code up if anybody wants to play with it/carry it on :-)

The latest updates from Nintendo block Fake Signing, however, it appears Team Twiizers have found another method of faking a valid signature. Not sure how I'll get around it (I don't have this issue, having not updated beyond v3.2). My options on that will be looked at if and when the banner tools are finished. As all sorts of other updates, patches and bugs might have been found by then.

Regarding the "exact size" issue. The size requirement is only required when replacing one image with another in an existing banner, this is due to the way the brlan and brlyt files control the drawing and moving of the image. However, as my tools would be actually creating the brlan and brlyt files, you'd be able to chose an image of any size and the files will cater for it.

Here are some things that will cause bad banner bricks (none of these have been tested, just theorised)
1. Image sizes don't match their panes in the brlyt files
2. The contents of the banner refer to files (textures, animations, etc.) that aren't actually included in the banner U8 archive
3. Internal files are corrupt (U8 archive incorrectly built, bad LZ77 compression, TPL format bad/unsupported)

From my banner tools, you won't get point 1 because the brlyt will be built with the textures. Point 2 can also be caught when compiling the banner "app" file. So only point 3 could cause a problem really.

I have done extensive tests with my U8 code, and this should not cause any issues. My LZ77 compression currently matches the format, but does not compress :-) I lost my all of the TPL encoding code I wrote, so that'll need writing again.

Thanks to comex, I have a way to test banners using USBGecko without fear of bricking the Wii. Later on, I was planning to build this into my banner tools so if you had the banner tool open on your PC connected to your Wii with the Homebrew Channel running, it would send down a system menu booter that patches banners to read from the editor.
Re: Channel creation
December 17, 2008 08:11PM
Quote
whodares
I lost a bit of code,
[...]
I might post the code up if anybody wants to play with it/carry it on :-)

You lost code? Did you accidently format your SD-Card? :D

Is [www.wiibrew.org] still up to date?



Edited 1 time(s). Last edit at 12/17/2008 08:11PM by daniel_c_w.
Re: Channel creation
December 17, 2008 08:24PM
Quote
daniel_c_w
You lost code? Did you accidently format your SD-Card? :D
lol. Actually, it was kinda similar. I have a copy on my local computer, and I also have a copy on a USB stick that I take to work (I always arrive early, so I sometimes do some coding before I start, or in my lunch hour). The only trouble is, I often forget which one is the "latest" version if I don't copy it back that night. Anyway, I had LZ77 stuff on my home and TPL encoding on the USB pen, and I forgot and copied one over the other.

Quote
daniel_c_w
Is [www.wiibrew.org] still up to date?
I've made some slight adjustments, but yes.

Edit 2: I've added an additional section, and provided a link to download the project in all it's unfinished glory :-) Whilst there is no "creation" side to it yet, I hope some of you find it useful.



Edited 1 time(s). Last edit at 12/17/2008 08:46PM by whodares.
Re: Channel creation
December 18, 2008 04:21AM
Quote
daniel_c_w
Quote
whodares
I lost a bit of code,
[...]
I might post the code up if anybody wants to play with it/carry it on :-)

You lost code? Did you accidently format your SD-Card? :D

hahaha, I thought the same thing too... that thread was epic..

anyway, whodares, always interesting to read some of your knowledge!
Re: Channel creation
December 18, 2008 08:37AM
Quote
DrLucky
hahaha, I thought the same thing too... that thread was epic..
I soooo enjoyed that thread. Funny as hell!

Quote
DrLucky
anyway, whodares, always interesting to read some of your knowledge!
You're welcome...

Edit:

For those interested in playing with my Banner Creator code. I've dropped TODO comments in all places (I can think of) that require work, they are visible from the Task List window (if you change the combo box to "Comments").
If you get stuck, or would like me explain any of it, please drop me a mail (email on my page of the Wiki), pm me, or reply to this thread :-)



Edited 1 time(s). Last edit at 12/18/2008 08:45AM by whodares.
Re: Channel creation
December 20, 2008 02:30AM
Quote
whodares
Internal files are corrupt (U8 archive incorrectly built, bad LZ77 compression, TPL format bad/unsupported)
Hm. On the N64, the games didn't do much (really, any) sanity checking of their resources, and would simply crash loading a file if it were corrupt or they ran out of memory. I bet the "system files are corrupt" message is just the System Menu's exception handler, and it doesn't do any sanity checking on the banner files, so corrupt files crash it. That would also explain why it occasionally shows up loading HBC, because some part of the loader code has a bug in it, or maybe the banner code has a race condition and crashes if you start at just the right time.



Edited 1 time(s). Last edit at 12/20/2008 02:32AM by HyperHacker.
Re: Channel creation
December 22, 2008 09:02AM
Really? I've never seen it loading the HBC. Although I have seen it once on my Wii, ages ago. I thought I'd bricked it, but after rebooting the machine everything was fine.

But yes, that's why when people "customise" banners by replacing images with the wrong sizes they get banner bricks.

I am a little disappointed that Nintendo didn't have any proper fallback on the banner code (ie, just show a black banner instead), but then before a product ships, I guess it will have gone under severe testing and thus would never expect such failures.
Re: Channel creation
December 22, 2008 05:55PM
BTW, just so people know, badly packed U8 archives will NOT cause a brick, they will cause the channel to be hidden and show up as ??? in the data management screen.
Re: Channel creation
December 22, 2008 06:04PM
whodares, since your channels wont be in a WAD format (good idea... I didn't know that it could be avoided) then you will have to creat an installer for your custom channels too right?
Re: Channel creation
December 22, 2008 08:22PM
@icefire: Really? That's good to know. I've not got that far with my testing yet

@DrLucky: Correct. There's a thread here [forum.wiibrew.org] where I was enquiring about how content installations are validated.
Re: Channel creation
December 25, 2008 04:25AM
FWIW, the only time I've actually heard of a "hard" banner brick was when a banner was *almost* valid, but had an MD5 mismatch.
Re: Channel creation
December 25, 2008 09:52AM
That's good to know. Thanks.

Shouldn't have any problems with my MD5 tho, it's written by Microsoft as part of the .NET framework :-)
Re: Channel creation
December 26, 2008 12:57AM
Quote
bushing
FWIW, the only time I've actually heard of a "hard" banner brick was when a banner was *almost* valid, but had an MD5 mismatch.

Wait, what? Why would the menu read a file with a bad hash?
Re: Channel creation
December 26, 2008 01:25AM
It doesn't, but it crashes because it needs the hash to be correct to read the content (and it can't load without the content).

Am I right?
Re: Channel creation
December 26, 2008 04:30AM
Quote
comex
Quote
bushing
FWIW, the only time I've actually heard of a "hard" banner brick was when a banner was *almost* valid, but had an MD5 mismatch.

Wait, what? Why would the menu read a file with a bad hash?

Wrong hash. I'm not talking about a SHA1 content hash that's in a TMD -- these are never verified after installation, anyway (c.f. Starfall).
There is also an "IMD5" block inside the banner that contains an MD5 hash of part of the rest of the banner (or is it the metadata?). The danger is less that you'll incorrectly calculate the MD5, but more that you will forget to update it.

Marcan is the expert here, but I spent some time very early on with him trying to RE the banner format. One interesting thing we discovered was that some parts of the spec are optional -- you don't have to actually compress stuff with LZ77, and I believe you can actually leave out the IMD5 block entirely.
Sorry, only registered users may post in this forum.

Click here to login