Homebrew postLoader4

Garfunkiel

Active Member
Newcomer
Joined
Mar 11, 2010
Messages
28
Trophies
1
XP
518
Country
United States
postLoader 3.71.3 doesn't seem to load Majora's Mask using cios38rev17b (in slot 248) - it code dumps and the nb.log file says that decompression failed. I did some looking through the source, compared to Mighty Channels 11.1 (which does work for my setup, but I prefer PL), and found that there's a key difference in Nandbooter's lz77.c:

Code:
if (compressedPos > inputLen || decompressedPos > decompressedSize)
{
return -1;
}

I commented these lines out in both __decompressLZ77_11 and __decompressLZ77_10, and Majora's Mask booted perfectly. Are these lines there for a reason, or can they just be removed? Here's my nb.log file from when it failed:

nandBooter (b4): postLoader triiforce mod...
CONF: 248, 0, -1, 0, 0, 0, 0
NAND: 1,
videooption = 0
languageoption = -1
videopatchoption = 0
hooktypeoption = 0
ocarinaoption = 0
bootmethodoption = 0
Starting nand emu...
Nand_Mount: ios_rev = 17
Nand_Mount: IOS_Ioctlv = 0
Enabling Nand
Nand_Enable IOS_Ioctl = 0
Nand Mounted= 0
ISFS_Initialize: 0
Running search_and_read_dol
Reading TMD...done
Searching for main DOL...
Found DOL --> 00000001.app
Loading DOL: /title/00010001/4e415245/content/00000001.app
Decompressing...ERR: (search_and_read_dol) Decompression failed
ERR: (bootTitle) .dol loading failed
Things are gone wrong, disabling emulator...
Trying to write error log to sd...

Regardless, if anyone else can't play Majora's Mask with postLoader, do this:
* Install cios38rev17b to a slot you aren't already using. I recommend using ModMii for this - see Advanced Downloads.
* Compile postLoader, removing the above lines from addon/nandbooter/source/lz77.c.
* Make sure to set postLoader's game option for Majora's Mask to use the IOS slot in which you installed cios38rev17b.

Just posting in hopes that this gets fixed officially (I'm thinking there's probably an off by one problem causing a _Pos to be greater than the _Len or _Size variable once it gets to the final check) and helps others with the same problem.

Anyway, thanks for creating postLoader; it's a great SM replacement!
 

kuwanger

Well-Known Member
Member
Joined
Jul 26, 2006
Messages
1,510
Trophies
0
XP
1,783
Country
United States
Looking at the code, I don't readily see any off-by one errors, and from what I know of LZ77/LZSS, it looks like it's properly implemented (I'm guessing on the 0x11 variant, but it just seems to be an extended version to allow greater runs). Certainly, I'd be rather weary of removing those checks because if nothing else they could lead to silent corruption of the stack/heap which could lead to all sorts of problems down the road.

If it really is simply an off-by-one error, it'd be safer to over malloc one byte and fix all the checks accordingly. But, it'd seem best to confirm that it's a harmless quirk by ripping out the relevant code and compiling it on a PC--to be able to debug it--then actually breaking at the point when there's the actual issue, to know exactly how and why it's breaking instead of just doing the quick hack solution. :/ But, then, maybe the MC developers did all the above. Unfortunately, I don't have MM to test/debug.
 

zfa

Well-Known Member
Member
Joined
Sep 13, 2011
Messages
151
Trophies
1
XP
154
Country
stfour why not add something similar to MC which manages/updates the NANDS SYSCONF? That way Mighty Channels at this point would become pretty much obsolete. Is it possible?

I think it would be useful, unless of course there is already a method to do this with the current PL3?

I suggested this probably 6 months or so ago but I don't think it was considered useful.
 

stfour

Well-Known Member
OP
Member
Joined
May 24, 2011
Messages
1,592
Trophies
0
XP
350
Country
Italy
I suggested this probably 6 months or so ago but I don't think it was considered useful.

Yes, you are right, this is something that I left behind. But I doesn't considered it not usefull. Simply there are priorities and sometime my memory fails.. ;)

postLoader 3.71.3 doesn't seem to load Majora's Mask using cios38rev17b (in slot 248) - it code dumps and the nb.log file says that decompression failed. I did some looking through the source, compared to Mighty Channels 11.1 (which does work for my setup, but I prefer PL), and found that there's a key difference in Nandbooter's lz77.c:

....cut...

Thank you for pointing that... I will check what is causing this issue ;)
 

stfour

Well-Known Member
OP
Member
Joined
May 24, 2011
Messages
1,592
Trophies
0
XP
350
Country
Italy
postLoader 3.71.5

* nandbooter: removed an lz77 decompression check that may fail (thx Garfunkiel)

postLoader 3.71.4

* Added the capability to transfer SYSCONF and/or MII from real nand to current emunand ([HOME]->Nand options)
 
  • Like
Reactions: 2 people

DaFees

Well-Known Member
Member
Joined
Jul 16, 2008
Messages
206
Trophies
0
Age
36
Location
PA, USA
XP
257
Country
United States
I'm not sure how much help this will be but here's the deal I have a 2TB hard drive in an external enclosure. I have one 40GB partition formatted fat32 with 32KB cluster size, the rest is one large NTFS partition. Using priibootergui, if I try to autoboot to PL through priiloader, it says it can't find postloader.dol. If I try to load PL via HBC it says it needs somewhere to save config files and gives me the option to create them on my SD card or boot to Wii menu. I've used the latest version of PL and first tried autobooting and then booting via HBC but without creating any config files on the SD card.

Attached is a copy of a ploader.log I did.

-[postLoader 3.71.5]----------------------------------------
Device 0->sd
Device 1->(null)
Device 2->usb2
Device 3->(null)
Device 4->(null)
Default device is 'sd'
Shutdown !
snd_Stop
ConfigWrite()
CoverCache_Stop
CoverCache_Stop: thread was already stopped
 

DaFees

Well-Known Member
Member
Joined
Jul 16, 2008
Messages
206
Trophies
0
Age
36
Location
PA, USA
XP
257
Country
United States
Unless Windows is lying to me and I've attached an image (disc 9 as labeled in the image is my drive in question) below to prove myself, my FAT32 partition IS marked primary/active.

diskmanagement.png
 

stfour

Well-Known Member
OP
Member
Joined
May 24, 2011
Messages
1,592
Trophies
0
XP
350
Country
Italy
I never tested Postloader with NTFS in advance of fat32... probably it is a my fault. Anyway I doesn't understand why you first partition isn't detected.

I need to setup a hdd like your, but starting from tomorrow I will be in holiday for some days... so you need to wait :(
 

stfour

Well-Known Member
OP
Member
Joined
May 24, 2011
Messages
1,592
Trophies
0
XP
350
Country
Italy
meanwhile you can try this old version of postloader

please get > and run it with an sd inside the wii.

it will create on sd the following files

mbr.dat
part0.dat
part1.dat
etc..
etc..

If you send them to me it will be very usefull to understand what is happaning. ;)

EDIT... probably this version will crash on 4K sector drive...
 

DaFees

Well-Known Member
Member
Joined
Jul 16, 2008
Messages
206
Trophies
0
Age
36
Location
PA, USA
XP
257
Country
United States
Well as an update I tried the debug version you suggested, then unsuggested. That version had the same issues as the latest in that I couldn't autoboot to it and loading via HBC didn't work. It did generate the files in question though so I'll send those to you. Now for kicks I picked an old version of PL (3.57.1 to b exact) and it worked exactly as it should. I mean I still couldn't autoboot to it but loading via HBC worked as expected. So some where between that version and the latest version PL stopped working with my hard drive. Also the latest priibootergui then seems not to recognize my drive either.

Oh and I'm including the ploader.log of the working version.

-----[postLoader 3.57.1]-----
Initialization done !
neek = 0
Autoboot = 0
Video_LoadTheme(1)
theme.frameBack = 0x81146A28
begin ReadFile2Buffer usb://ploader/theme/theme.cfg
end ReadFile2Buffer, readed 282 of 282 bytes
theme block#1
theme block#2
theme block#3
inverting tex
AppBrowser
AppsFree
InitializeGui
AppsFree
ConfigWrite: usb://ploader/ploader.cfg
AppsFree
ChnBrowser
chbrowser: begin Redraw
chbrowser: Draw bk icons
chbrowser: Draw fg icons
chbrowser: begin Redraw
begin ChnBrowse
GetCacheFileName usb://ploader/nand.dat
begin ReadFile2Buffer usb://ploader/nand.dat
end ReadFile2Buffer, readed 499 of 499 bytes
end ChnBrowse
ConfigWrite: usb://ploader/ploader.cfg
chbrowser: begin Redraw
chbrowser: Draw bk icons
chbrowser: Draw fg icons
chbrowser: begin Redraw
AppBrowser
AppsFree
InitializeGui
AppsFree
ConfigWrite: usb://ploader/ploader.cfg
AppsFree
GameBrowser
theme.frameBack = 0x81146A28 0x81146A28
begin GameBrowse
ScanWBFS: [FN] usb2://wbfs/RSPE01_SPORConfigRead: sd://ploader/ploader.cfg
ConfigRead: usb://ploader/ploader.cfg
GameBrowse [begin]
end GameBrowse
ConfigWrite: usb://ploader/ploader.cfg
GameBrowser
theme.frameBack = 0x81146A28 0x81146A28
begin GameBrowse
GameBrowse [begin]
end GameBrowse
ConfigWrite: usb://ploader/ploader.cfg
GameBrowser
theme.frameBack = 0x81146A28 0x81146A28
begin GameBrowse
GameBrowse [begin]
end GameBrowse
ConfigWrite: usb://ploader/ploader.cfg
GameBrowser
theme.frameBack = 0x81146A28 0x81146A28
begin GameBrowse
DML: scanning sd://games
DML: scanning usb://ngc
GameBrowse [begin]
end GameBrowse
ConfigWrite: usb://ploader/ploader.cfg
GameBrowser
theme.frameBack = 0x81146A28 0x81146A28
begin GameBrowse
DML: scanning sd://games
DML: scanning usb://ngc
GameBrowse [begin]
end GameBrowse
ConfigWrite: usb://ploader/ploader.cfg
GameBrowser
theme.frameBack = 0x81146A28 0x81146A28
begin GameBrowse
DML: scanning sd://games
DML: scanning usb://ngc
GameBrowse [begin]
end GameBrowse
ConfigWrite: usb://ploader/ploader.cfg
GameBrowser
theme.frameBack = 0x81146A28 0x81146A28
begin GameBrowse
DML: scanning sd://games
DML: scanning usb://ngc
GameBrowse [begin]
end GameBrowse
ConfigWrite: usb://ploader/ploader.cfg
GameBrowser
theme.frameBack = 0x81146A28 0x81146A28
begin GameBrowse
GameBrowse [begin]
end GameBrowse
ConfigWrite: usb://ploader/ploader.cfg
GameBrowser
theme.frameBack = 0x81146A28 0x81146A28
begin GameBrowse
GameBrowse [begin]
end GameBrowse
ConfigWrite: usb://ploader/ploader.cfg
GameBrowser
theme.frameBack = 0x81146A28 0x81146A28
begin GameBrowse
GameBrowse [begin]
end GameBrowse
ConfigWrite: usb://ploader/ploader.cfg
ChnBrowser
chbrowser: begin Redraw
chbrowser: Draw bk icons
chbrowser: Draw fg icons
chbrowser: begin Redraw
begin ChnBrowse
GetCacheFileName usb://ploader/nand.dat
begin ReadFile2Buffer usb://ploader/nand.dat
end ReadFile2Buffer, readed 499 of 499 bytes
end ChnBrowse
ConfigWrite: usb://ploader/ploader.cfg
chbrowser: begin Redraw
chbrowser: Draw bk icons
chbrowser: Draw fg icons
chbrowser: begin Redraw
AppBrowser
AppsFree
InitializeGui
AppsFree
ConfigWrite: usb://ploader/ploader.cfg
AppsFree
ChnBrowser
chbrowser: begin Redraw
chbrowser: Draw bk icons
chbrowser: Draw fg icons
chbrowser: begin Redraw
begin ChnBrowse
GetCacheFileName usb://ploader/nand.dat
begin ReadFile2Buffer usb://ploader/nand.dat
end ReadFile2Buffer, readed 499 of 499 bytes
end ChnBrowse
ConfigWrite: usb://ploader/ploader.cfg
chbrowser: begin Redraw
chbrowser: Draw bk icons
chbrowser: Draw fg icons
chbrowser: begin Redraw
ChnBrowser
chbrowser: begin Redraw
chbrowser: Draw bk icons
chbrowser: Draw fg icons
chbrowser: begin Redraw
begin ChnBrowse
GetCacheFileName usb://ploader/nand.dat
begin ReadFile2Buffer usb://ploader/nand.dat
end ReadFile2Buffer, readed 499 of 499 bytes
end ChnBrowse
ConfigWrite: usb://ploader/ploader.cfg
chbrowser: begin Redraw
chbrowser: Draw bk icons
chbrowser: Draw fg icons
chbrowser: begin Redraw
ChnBrowser
chbrowser: begin Redraw
chbrowser: Draw bk icons
chbrowser: Draw fg icons
chbrowser: begin Redraw
begin ChnBrowse
GetCacheFileName usb://ploader/nand.dat
begin ReadFile2Buffer usb://ploader/nand.dat
end ReadFile2Buffer, readed 499 of 499 bytes
end ChnBrowse
ConfigWrite: usb://ploader/ploader.cfg
chbrowser: begin Redraw
chbrowser: Draw bk icons
chbrowser: Draw fg icons
chbrowser: begin Redraw
AppBrowser
AppsFree
InitializeGui
AppsFree
ConfigWrite: usb://ploader/ploader.cfg
AppsFree
AppBrowser
AppsFree
InitializeGui
AppsFree
ConfigWrite: usb://ploader/ploader.cfg
AppsFree
ChnBrowser
chbrowser: begin Redraw
chbrowser: Draw bk icons
chbrowser: Draw fg icons
chbrowser: begin Redraw
begin ChnBrowse
GetCacheFileName usb://ploader/nand.dat
begin ReadFile2Buffer usb://ploader/nand.dat
end ReadFile2Buffer, readed 499 of 499 bytes
end ChnBrowse
ConfigWrite: usb://ploader/ploader.cfg
chbrowser: begin Redraw
chbrowser: Draw bk icons
chbrowser: Draw fg icons
chbrowser: begin Redraw
chbrowser: begin Redraw
chbrowser: Draw bk icons
chbrowser: Draw fg icons
chbrowser: begin Redraw
chbrowser: begin Redraw
chbrowser: Draw bk icons
chbrowser: Draw fg icons
chbrowser: begin Redraw
chbrowser: begin Redraw
chbrowser: Draw bk icons
chbrowser: Draw fg icons
chbrowser: begin Redraw
GameBrowser
theme.frameBack = 0x81146A28 0x81146A28
begin GameBrowse
DML: scanning sd://games
DML: scanning usb://ngc
GameBrowse [begin]
end GameBrowse
ConfigWrite: usb://ploader/ploader.cfg
GameBrowser
theme.frameBack = 0x81146A28 0x81146A28
begin GameBrowse
GameBrowse [begin]
end GameBrowse
ConfigWrite: usb://ploader/ploader.cfg
GameBrowser
theme.frameBack = 0x81146A28 0x81146A28
begin GameBrowse
GameBrowse [begin]
end GameBrowse
ConfigWrite: usb://ploader/ploader.cfg
GameBrowser
theme.frameBack = 0x81146A28 0x81146A28
begin GameBrowse
GameBrowse [begin]
end GameBrowse
ConfigWrite: usb://ploader/ploader.cfg
GameBrowser
theme.frameBack = 0x81146A28 0x81146A28
begin GameBrowse
DML: scanning sd://games
DML: scanning usb://ngc
GameBrowse [begin]
end GameBrowse
ConfigWrite: usb://ploader/ploader.cfg
ChnBrowser
chbrowser: begin Redraw
chbrowser: Draw bk icons
chbrowser: Draw fg icons
chbrowser: begin Redraw
begin ChnBrowse
GetCacheFileName usb://ploader/nand.dat
begin ReadFile2Buffer usb://ploader/nand.dat
end ReadFile2Buffer, readed 499 of 499 bytes
end ChnBrowse
ConfigWrite: usb://ploader/ploader.cfg
chbrowser: begin Redraw
chbrowser: Draw bk icons
chbrowser: Draw fg icons
chbrowser: begin Redraw
ChnBrowser
chbrowser: begin Redraw
chbrowser: Draw bk icons
chbrowser: Draw fg icons
chbrowser: begin Redraw
begin ChnBrowse
GetCacheFileName usb://ploader/nand.dat
begin ReadFile2Buffer usb://ploader/nand.dat
end ReadFile2Buffer, readed 499 of 499 bytes
end ChnBrowse
ConfigWrite: usb://ploader/ploader.cfg
chbrowser: begin Redraw
chbrowser: Draw bk icons
chbrowser: Draw fg icons
chbrowser: begin Redraw
AppBrowser
AppsFree
InitializeGui
AppsFree
ConfigWrite: usb://ploader/ploader.cfg
AppsFree
Video_LoadTheme(0)
ConfigWrite: usb://ploader/ploader.cfg
 

zfa

Well-Known Member
Member
Joined
Sep 13, 2011
Messages
151
Trophies
1
XP
154
Country
Hi stfour,

v3.71.5 running under neek2o still has a 'set default loader' option available under the 'game options' menu. I'm guessing this is a mistake and should be removed - shouldn't all disc based games be running by whatever-it-is-that-neek-uses-to-run-games-with-di?? I think the option should be removed as it's confusing to have it there.

Cheers.
 

DaFees

Well-Known Member
Member
Joined
Jul 16, 2008
Messages
206
Trophies
0
Age
36
Location
PA, USA
XP
257
Country
United States
Hey stfour,

I wanted to let you know so as to may be save you some unnecessary work, but I figured out what my problem was all along. My FAT32 parition was primary and active BUT NOT first. With a little work I was able to switch the partition around and suddenly everything worked. So yes PL now works as expected and all is good for now until I have any questions getting PL to work together my neek2o setup, :)
 

stfour

Well-Known Member
OP
Member
Joined
May 24, 2011
Messages
1,592
Trophies
0
XP
350
Country
Italy
Yes, I've read it from the neek2o thread... anyway I think that this wrong behaveur of pl should be fixed ;)
 

DaFees

Well-Known Member
Member
Joined
Jul 16, 2008
Messages
206
Trophies
0
Age
36
Location
PA, USA
XP
257
Country
United States
Ok Well I've read through the readmii and now I have a question about getting my neek2o setup to play with PL. I currently (using priibootergui) autoboot to PL and then if I don't enter interactive mode PL will autoboot to CFG. Now I know that using the neek2o channel or loading bootmii through HBC or renaming a folder on my SD card I can access my neek2o setup. Is there some way to view/use my neek2o setup from with PL? I have PL installed on my emunand and when I boot into my neek2o setup I can load the PL channel but then PL tells me it needs somewhere to save the cfg files and I don't want to let it do so without knowing what will happen because I don't want these new files for the emunand to interfer with the files PL uses when loaded from my real nand.

I basically want to mantain the autoboot settings I have now but also be able to access and use my neek2o setup while in PL. Oh and yes my emunand is in a folder called pl_us which is in a folder called nands which is on the root of my drive.

Also, how do you change themes in PL? I gave each theme its own folder with in the main theme folder but when I try to change to them in PL, it tells me it can't find them. Do I just pick which theme I want and copy that theme's files over top the default theme found on the root of the theme folder?
 

brownbailey

Member
Newcomer
Joined
Dec 15, 2011
Messages
11
Trophies
0
XP
31
Country
Canada
I'm hoping (once again) that I'm in the right forum.
I have a 4.3U softmodded Wii. I'm using neek2o to launch my emulated nand (uneek+di), and am trying to load all my games through Joyflow.

My question is this: I swear I was able to do all of this before without having to use an SD (besides the initial set up). Currently I'm unable to play any games through Joyflow without the SD, and I can't launch Postloader either, (neekbooter: postloader not found).

Do I have to make a second partition on my USB and use it somewhat as an emulated SD? or is it just a matter of copying some files over or injecting some wads?

A SD-free solution would be most appreciated. Anyone know how?
 

obcd

Well-Known Member
Member
Joined
Apr 5, 2011
Messages
1,594
Trophies
0
XP
432
Country
Belgium
This sounds like the issue people were having when they used neek2o rev. 70 - 73.
I fixed it on rev. 74 (for uneek2o) and rev. 75 (for sneek2o) (Those revisions show a wrong rev. number.)

So, any chanche you changed your neek2o rev. and the problems started from that moment?
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    K3Nv2 @ K3Nv2: Like for micro