Hacking USB Loader... my turn ;)

  • Thread starter Thread starter WiiShizzza
  • Start date Start date
  • Views Views 817,631
  • Replies Replies 4,239
PNo4 said:
ZaMaster said:
Does anyone know how to compile a version with proper 16:9 support? Because all the versions in this thread still give me black borders on the left and right side of the screen.


Sadly there is no PROPER Widescreen (16:9) fix anywhere yet. Not even Homebrew Channel v1.0.1 have a PROPER Widescreen mode.

If you check on a Wii in 4:3 mode on a 4:3 TV and look at the SD-card when booting HBC v1.0.1, and compare that to a Wii in 16:9 on a 16:9 TV you will see that the SD-card actually is thicker/wider in 16:9 mode then in 4:3 mode, so the "FIX" is a small stretching codefix.

That is whats possible right now as far as I have seen (tell me if I'm wrong).

If a little more stretch to the picture is OK (you hate borders more then a stretched picture) then this is whats need to be done:

Find this place in: Video.c
Code:
void Video_SetMode(void)
{
ÂÂÂÂ/* Select preferred video mode */
ÂÂÂÂvmode = VIDEO_GetPreferredMode(NULL);
ÂÂÂÂ
ÂÂÂÂ/* Allocate memory for the framebuffer */
ÂÂÂÂframebuffer = MEM_K0_TO_K1(SYS_AllocateFramebuffer(vmode));

And change/add this to: Video.c
CODEvoid Video_SetMode(void)
{
ÂÂÂÂ/* Select preferred video mode */
ÂÂÂÂvmode = VIDEO_GetPreferredMode(NULL);
ÂÂÂÂ
ÂÂÂÂvmode->viWidth = 678;
ÂÂÂÂvmode->viXOrigin = (VI_MAX_WIDTH_PAL - 678)/2;

ÂÂÂÂ/* Allocate memory for the framebuffer */
ÂÂÂÂframebuffer = MEM_K0_TO_K1(SYS_AllocateFramebuffer(vmode));

If this is done there should no longer be any black bars on the screen.

This works!
I've just added it to my testing source.

But what happens with the screen when using this on a 4:3 Screen? I can't test that.
 
bula said:
Ruud91 said:
Hey guys

I spend my whole day (yesterday) to find out everything about wads
tongue.gif
, and after a lot of work I finnaly managed to make an animated channel with the loader from this thread
So I hope you guys like it
wink2.gif
, and hope the guys who made it don't have anything against it
ph34r.gif


Inside the zip is the wad with the adult version of the loader (V3), a movie from the loader itself (that is the 8 mb xD) and the images map

enjoy!
http://www.megaupload.com/?d=VU07AC3C

and yeah, the quality of my movie isn't that good because of the crappy cellphone
Hi Ruud91,

Is this wad made using the last v3 posted here? TY
yeah it is
biggrin.gif
 
bula said:
This is the last V3 posted, based on sorg's 1.11 release:

http://www.yafaze.com/wii/files/USB_LOADER..._VERSION_V3.rar


QUOTE(WiiShizzza @ Apr 12 2009, 06:59 PM) This works!
I've just added it to my testing source.

But what happens with the screen when using this on a 4:3 Screen? I can't test that.

Ok..I have three things:

1) How save is it that the Configuartions are saved on the HD/Game? I'm feared of corrupted Images...
unsure.gif

2) Any Chance that you could make me a 16:9 one with the version above, Shizzza? With a dark Console and a White Text? Would be awesome...
3) Oh, and could somebody also integrate the Game renaming-Function into the version above? The one from here? Or is it already in it?
 
WiiShizzza said:
PNo4 said:
ZaMaster said:
Does anyone know how to compile a version with proper 16:9 support? Because all the versions in this thread still give me black borders on the left and right side of the screen.


Sadly there is no PROPER Widescreen (16:9) fix anywhere yet. Not even Homebrew Channel v1.0.1 have a PROPER Widescreen mode.

If you check on a Wii in 4:3 mode on a 4:3 TV and look at the SD-card when booting HBC v1.0.1, and compare that to a Wii in 16:9 on a 16:9 TV you will see that the SD-card actually is thicker/wider in 16:9 mode then in 4:3 mode, so the "FIX" is a small stretching codefix.

That is whats possible right now as far as I have seen (tell me if I'm wrong).

If a little more stretch to the picture is OK (you hate borders more then a stretched picture) then this is whats need to be done:

Find this place in: Video.c
Code:
void Video_SetMode(void)
{
ÂÂÂÂ/* Select preferred video mode */
ÂÂÂÂvmode = VIDEO_GetPreferredMode(NULL);
ÂÂÂÂ
ÂÂÂÂ/* Allocate memory for the framebuffer */
ÂÂÂÂframebuffer = MEM_K0_TO_K1(SYS_AllocateFramebuffer(vmode));

And change/add this to: Video.c
CODEvoid Video_SetMode(void)
{
ÂÂÂÂ/* Select preferred video mode */
ÂÂÂÂvmode = VIDEO_GetPreferredMode(NULL);
ÂÂÂÂ
ÂÂÂÂvmode->viWidth = 678;
ÂÂÂÂvmode->viXOrigin = (VI_MAX_WIDTH_PAL - 678)/2;

ÂÂÂÂ/* Allocate memory for the framebuffer */
ÂÂÂÂframebuffer = MEM_K0_TO_K1(SYS_AllocateFramebuffer(vmode));

If this is done there should no longer be any black bars on the screen.

This works!
I've just added it to my testing source.

But what happens with the screen when using this on a 4:3 Screen? I can't test that.

Isn't it going to crop the image when using 4:3? And with this code we still have to resize the image in a way that it doesn't get out of proportions, correct?
 
ZaMaster said:
Isn't it going to crop the image when using 4:3? And with this code we still have to resize the image in a way that it doesn't get out of proportions, correct?

On a 4:3 Tv the left/right side will most likely be cropped some, thats why this OPTION should be controlled from a settings.ini or some type of manual choosing.

About the proportions. yeah, you would most likely need to make a anamorphic picture (16:9) in the 640x480 size, that means the 640x480 picture would look pressed/squeezed together, and when stretched on screen it would look correct aspect ratio.

Doing that however would most likelly also have bearing on locations of the cover and text are and sourcecode would have to be adapted to fit also.

Edit
Issue number 2 would be the COVERS, they would also needs fixing for correct aspect ratio.
 
Ruud91 said:
bula said:
Ruud91 said:
Hey guys
I spend my whole day (yesterday) to find out everything about wads
tongue.gif
, and after a lot of work I finnaly managed to make an animated channel with the loader from this thread
So I hope you guys like it
wink2.gif
, and hope the guys who made it don't have anything against it
ph34r.gif

Inside the zip is the wad with the adult version of the loader (V3), a movie from the loader itself (that is the 8 mb xD) and the images map
enjoy!
http://www.megaupload.com/?d=VU07AC3C
and yeah, the quality of my movie isn't that good because of the crappy cellphone
Hi Ruud91,
Is this wad made using the last v3 posted here? TY
yeah it is
biggrin.gif

I can't download from megaupload. Do you have another mirror?
 
Like a previous poster on this page asked, how safe is writing configuration data to the hdd? Does it somehow seek the last free space available on the drive? Does that even make sense or am I stoned and I don't know it?
 
Blue-K said:
bula said:
This is the last V3 posted, based on sorg's 1.11 release:

http://www.yafaze.com/wii/files/USB_LOADER..._VERSION_V3.rar


WiiShizzza said:
This works!
I've just added it to my testing source.

But what happens with the screen when using this on a 4:3 Screen? I can't test that.

Ok..I have three things:

1) How save is it that the Configuartions are saved on the HD/Game? I'm feared of corrupted Images...
unsure.gif

2) Any Chance that you could make me a 16:9 one with the version above, Shizzza? With a dark Console and a White Text? Would be awesome...
3) Oh, and could somebody also integrate the Game renaming-Function into the version above? The one from here? Or is it already in it?


1) I don't know.
2) Yes I will, if you point me to the latest source
wacko.gif
also I need your picture.
3) Hope hungip can do it. I'm afraid I failed on that one.

QUOTE(PNo4 @ Apr 12 2009, 06:24 PM) QUOTE(ZaMaster @ Apr 12 2009, 06:19 PM)
Isn't it going to crop the image when using 4:3? And with this code we still have to resize the image in a way that it doesn't get out of proportions, correct?
On a 4:3 Tv the left/right side will most likely be cropped some, thats why this OPTION should be controlled from a settings.ini or some type of manual choosing.
About the proportions. yeah, you would most likely need to make a anamorphic picture (16:9) in the 640x480 size, that means the 640x480 picture would look pressed/squeezed together, and when stretched on screen it would look correct aspect ratio.
Doing that however would most likelly also have bearing on locations of the cover and text are and sourcecode would have to be adapted to fit also.

Edit
Issue number 2 would be the COVERS, they would also needs fixing for correct aspect ratio.

so there should be a 4:3 and a 16:9 version. alltogether with teen versions that would make 16 versions from the loader... that is hilarious...
I've overworked the bg and the covers to fit PAL 16:9 I hope there is no difference for widescreen PAL and NTSC...

IF someone points me to the latest source, I'm on it. I'm affraid I can't do teen versions and stuff.
 
i think a self contained loader is needed also man

could be made into a .wad but all cover art loaded from inside the buffer

now where talking a 40mb .wad here but hey Opera channel and various VC are that size so why not, some people aint got a SD.
 
In the 1.3 thread someone posted a fix for the deleting bug for PC utilities. Is the source for that available so it can be fixed in this loader?
 
FenrirWolf said:
In the 1.3 thread someone posted a fix for the deleting bug for PC utilities. Is the source for that available so it can be fixed in this loader?
I believe the loaders don't have to be upgraded, just the programs that use wbfs.exe to tranfer games onto the USB drive.
 
jservs7 said:
FenrirWolf said:
In the 1.3 thread someone posted a fix for the deleting bug for PC utilities. Is the source for that available so it can be fixed in this loader?
I believe the loaders don't have to be upgraded, just the programs that use wbfs.exe to tranfer games onto the USB drive.


From my understanding it would really be anything that uses libwbfs, which would include loaders, because they can do all the format, install, uninstall options. The good news is it should be simply the matter of getting an updated (fixed) version of libwbfs (or compiling your own from the source) and then using that to recompile the loader, etc. Nothing internal to the loader needs to be changed.
 
FenrirWolf said:
So it sounds like the fix is simple. Sweet.

Posted by AllWIIdUP:

Looking at the WBFS alloc and free functions I noticed an off by 1 error, that likely frees the wrong block.

in libwbfs.c:

CODEstatic void free_block(wbfs_t *p,int bl)
{
+ int i = (bl-1)/(32);
+ int j = (bl-1)&31;
u32 v = wbfs_ntohl(p->freeblks);
p->freeblks = wbfs_htonl(v | 1freeblks);
p->freeblks = wbfs_htonl(v | 1wlba_table); // bl = info->wlba_table
if (iwlba)
free_block(p,iwlba); // should have been free_block(p,iwlba - 1);but since "alloc_block" adds the +1 then "free_block" should have the -1, otherwise someone else might introduce the bug again, if the use free_block in another place since both block functions are used for "wlba_table".



EDIT:
WiiNinja compiled and tested a windows version with the fix and all it well ;P
http://www.mediafire.com/?vvtmcmlyh32

Hi hungyip84
can you add the 1 to v3 source and recompile it. This should sove the remove problem. Thanks
 
hungyip84 said:
I am back.

Seems like the delete bug is fixed?

I will look at the image reload bug today if i have time.
good to see you....bud. This would take care of the last wish ....
 

Site & Scene News

Popular threads in this forum