Homebrew Anybody working AHBPROT Emulator channels?

Hielkenator

Well-Known Member
OP
Member
Joined
Feb 7, 2010
Messages
4,210
Trophies
0
XP
679
Country
Netherlands
Hi,

Since with the latest update of SNESGX, FCEULTRAGX, VBAGX. AHBPROT for DVD is being used.
I can only run roms from DVD if I start from HBC.
I does'nt reckongnise my DVD if I run the emulators from my exsisting forwarder channels
Is there an easy way of modifiing my exsisting Forwarder channels to work with the new updates?
 

XFlak

Wiitired but still kicking
Member
Joined
Sep 12, 2009
Messages
13,763
Trophies
3
Age
38
Location
Cyprus, originally from Toronto
Website
modmii.github.io
XP
9,720
Country
Cyprus
there was a new wiimc forwarder channel released today that can handle all that, and I wanted to add a second forwarder path to it, so I modded the main.c of the source code to this (see below). But I am having trouble compiling it (my extra code isn't the problem, its w/e I got installed on my Windows isn't up to date enough).

If anyone happens 2 have a few minutes to spare, they can try compiling it.

@OP, u can change the paths @ line 90ish to w/e u want to create your own forwarder for w/e app, but u may want to change the splash screens first

source code
some compiling instructions


FYI, new code is only rows 92-96
QUOTE said:
/****************************************************************************
* WiiMC
* Tantric 2009-2010
***************************************************************************/

#include
#include
#include
#include

#include "pngu.h"
#include "fileop.h"

extern void __exception_closeall();
typedef void (*entrypoint) (void);
u32 load_dol_image (void *dolstart, struct __argv *argv);

extern const u8 background_png[];
extern const u32 background_png_size;
extern const u8 background_wide_png[];
extern const u32 background_wide_png_size;

void InitVideo();
void StopGX();
void Menu_Render();
void Menu_DrawImg(f32 xpos, f32 ypos, u16 width, u16 height, u8 data[], f32 degrees, f32 scaleX, f32 scaleY, u8 alphaF );

static ssize_t __out_write(struct _reent *r, int fd, const char *ptr, size_t len)
{
return -1;
}

const devoptab_t phony_out =
{ "stdout",0,NULL,NULL,__out_write,
NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,0,NULL,NULL,NULL,NULL,NULL };

#define HW_REG_BASE 0xcd800000
#define HW_ARMIRQMASK (HW_REG_BASE + 0x03c)
#define HW_ARMIRQFLAG (HW_REG_BASE + 0x038)

int have_hw_access()
{
if((*(volatile unsigned int*)HW_ARMIRQMASK)&&(*(volatile unsigned int*)HW_ARMIRQFLAG))
return 1;
return 0;
}

int main(int argc, char **argv)
{
void *buffer = (void *)0x92000000;
devoptab_list[STD_OUT] = &phony_out; // to keep libntfs happy
devoptab_list[STD_ERR] = &phony_out; // to keep libntfs happy

// only reload IOS if AHBPROT is not enabled
u32 version = IOS_GetVersion();
s32 preferred = IOS_GetPreferredVersion();

if(version != 58 && preferred > 0 && version != (u32)preferred && have_hw_access() != 1)
IOS_ReloadIOS(preferred);

InitVideo();

u8 *bg;
int bgWidth, bgHeight;
int a,i,j;

if (CONF_GetAspectRatio() == CONF_ASPECT_16_9)
bg = DecodePNG(background_wide_png, &bgWidth, &bgHeight);
else
bg = DecodePNG(background_png, &bgWidth, &bgHeight);

for(a = 0; a = 0; a-=15)
{
Menu_DrawImg(0, 0, bgWidth, bgHeight, bg, 0, 1, 1, a);
Menu_Render();
}

StopGX();
VIDEO_WaitVSync();

u32 level;
SYS_ResetSystem(SYS_SHUTDOWN, 0, 0);
_CPU_ISR_Disable(level);
__exception_closeall();
exeEntryPoint();
_CPU_ISR_Restore(level);
return 0;
}
 

Hielkenator

Well-Known Member
OP
Member
Joined
Feb 7, 2010
Messages
4,210
Trophies
0
XP
679
Country
Netherlands
Thank you for the info!
Unfortunally I have no idea what to do...

If anyone could make these channels AHBPROT compatible , it would be very appriciated!



Thank you everyone! Tantric is working on it!
 

XFlak

Wiitired but still kicking
Member
Joined
Sep 12, 2009
Messages
13,763
Trophies
3
Age
38
Location
Cyprus, originally from Toronto
Website
modmii.github.io
XP
9,720
Country
Cyprus
btw, I got it to compile, I just had to update my devkit installation. I still have to test out the forwarder dol though... should be fine

I got a Q though, for Tantric or anyone else who happens to have the answer...

Will using Tantric's WiiMC Forwarder source code to build forwarders for other apps, make them all have USB2.0 speeds (if IOS58 is installed), as well as have direct hardware access (for the apps that can handle it... and it shouldn't interfere with those that can't handle it right?). Is there any reason why I shouldn't mass produce new forwarder dols for ALL my forwarder channels?
 

Jacobeian

Well-Known Member
Member
Joined
May 15, 2008
Messages
1,893
Trophies
0
XP
387
Country
Cuba
The source code of the forwarder won't help you, it's the Channel Installer one that you need but unfortunately, I think it's closed-source.

To get DVD support without DVDX, I think all you need is to set some bits in the channel header and be sure not to reload any IOS when lauching the app in the forwarder.
USB2 support should be straight forward as long as you have IOS58 installed (snes9xGX seems to automatically reload it on startup if it is not already running, but then you lose DVD support)
 

FIX94

Former Staff
Former Staff
Joined
Dec 3, 2009
Messages
7,284
Trophies
0
Age
29
Location
???
XP
11,238
Country
Germany
Jacobeian said:
The source code of the forwarder won't help you, it's the Channel Installer one that you need but unfortunately, I think it's closed-source.

To get DVD support without DVDX, I think all you need is to set some bits in the channel header and be sure not to reload any IOS when lauching the app in the forwarder
No you only need the forwarder source, it will create a dol file that you can inject into a channel.
But the old forwarder also works for me with USB2.0 speed (the IOS202 one)
 

Jacobeian

Well-Known Member
Member
Joined
May 15, 2008
Messages
1,893
Trophies
0
XP
387
Country
Cuba
I don't think that so easy. AHBPROT requires a special channel TMD, this is not set by the forwarder but during channel installation.
USB2 support is not related to AHBPROT though, it only needs IOS58 to be loaded once then you automatically get USB2 speed when accessing the device.

To get both USB2 and DVD support, you need to have the channel header (TMD) having the special bits set and IOS field indicating IOS58 so that system menu reloads IOS58 and IOS58 enables both USB2 and DVD access. Any attempt to reload IOS after that would break DVD support.
 

XFlak

Wiitired but still kicking
Member
Joined
Sep 12, 2009
Messages
13,763
Trophies
3
Age
38
Location
Cyprus, originally from Toronto
Website
modmii.github.io
XP
9,720
Country
Cyprus
Jacobeian said:
I don't think that so easy. AHBPROT requires a special channel TMD, this is not set by the forwarder but during channel installation.
USB2 support is not related to AHBPROT though, it only needs IOS58 to be loaded once then you automatically get USB2 speed when accessing the device.

To get both USB2 and DVD support, you need to have the channel header (TMD) having the special bits set and IOS field indicating IOS58 so that system menu reloads IOS58 and IOS58 enables both USB2 and DVD access. Any attempt to reload IOS after that would break DVD support.

so... if I am to understand correctly, u are saying there is currently no open source way for me to build my own forwarder channel for WiiMC with DVD access enabled? In fact, u are saying its not even enough to install a WAD, you have to use the custom closed source installer? I wonder of YAWMM can be made to install a wad with the "special TMD" for AHBPROT.... hmmmmm

Ok, so here's a Q... 2 make a forwarder channel load an app with USB 2 speeds (no dvd support, forget about that for now), do I even need to recompile the forwarder? Or can I just change the IOS the forwarder uses (using customize mii) to use IOS58?
 

Jacobeian

Well-Known Member
Member
Joined
May 15, 2008
Messages
1,893
Trophies
0
XP
387
Country
Cuba
XFlak said:
so... if I am to understand correctly, u are saying there is currently no open source way for me to build my own forwarder channel for WiiMC with DVD access enabled? In fact, u are saying its not even enough to install a WAD, you have to use the custom closed source installer? I wonder of YAWMM can be made to install a wad with the "special TMD" for AHBPROT.... hmmmmm

I think modifying TMD is not the hardest task, not sure though, I'm no expert in channel/wad installation
the thing that makes WiiMC channel installer special is that it does not need the fakesigning bug to install channel, just like the HBC Installer, it seems to rely on another undisclosed exploit
QUOTE said:
Ok, so here's a Q... 2 make a forwarder channel load an app with USB 2 speeds (no dvd support, forget about that for now), do I even need to recompile the forwarder?

In theory, you only need to modify forwarder code so it reloads into IOS58 if this IOS is found, this is the purpose of the code that is linked some post above, look into main.c
however, the app itself should not reload later to another IOS (except a CIOS off course) or you will lose USB2 support
QUOTE
Or can I just change the IOS the forwarder uses (using customize mii) to use IOS58?

that should also work, once IOS 58 is loaded, any app compiled with the new libogc benefits of USB2 speed
But you have to make sure IOS58 is installed on the console or it will results in black screen when launching the channel
 

XFlak

Wiitired but still kicking
Member
Joined
Sep 12, 2009
Messages
13,763
Trophies
3
Age
38
Location
Cyprus, originally from Toronto
Website
modmii.github.io
XP
9,720
Country
Cyprus
So, if I understand correctly, by recompiling using the above code (instead of changing the wad's loaded IOS to 58 in customize mii/showmiiwads), the only real difference is that it will first try to use IOS58, but if its not found, it will use something else (as opposed to returning to the System Menu if IOS58 isn't found)

I think I may actually have to personally test this out to fully understand it... I am especially curious to see if I inject the compiled forwarder dol into a wad, then install the wad using yawmm or w/e, if it will have dvd access (I know we said it shouldn't... but maybe the difference between a wad install and the official WiiMC installer is that the installer doesn't need a fakesigned IOS to install the forwarder channel, but maybe the installed content is the same in either case... I don't know!)
 

Jacobeian

Well-Known Member
Member
Joined
May 15, 2008
Messages
1,893
Trophies
0
XP
387
Country
Cuba
XFlak said:
So, if I understand correctly, by recompiling using the above code (instead of changing the wad's loaded IOS to 58 in customize mii/showmiiwads), the only real difference is that it will first try to use IOS58, but if its not found, it will use something else (as opposed to returning to the System Menu if IOS58 isn't found)

no, what it does exactly is it checks if IOS58 is not already loaded AND if AHBPROT has not been set when the channel was loaded then if not, it looks for the most suitable IOS to load (could be IOS58 but I think it return the highest installed IOS number, not sure though) and reload it, that's all

QUOTEI am especially curious to see if I inject the compiled forwarder dol into a wad, then install the wad using yawmm or w/e, if it will have dvd access (I know we said it shouldn't... but maybe the difference between a wad install and the official WiiMC installer is that the installer doesn't need a fakesigned IOS to install the forwarder channel, but maybe the installed content is the same in either case... I don't know!)
No, you didn't understand. DVD support (without DVDX or CIOS) is ONLY possible if the channel was installed with some special bits set in the TMD, the installed content (.dol) has nothing to do with this.
no channel installer actually do this but it should be possible in theory, this is quite well documented I think on hackmii
 

XFlak

Wiitired but still kicking
Member
Joined
Sep 12, 2009
Messages
13,763
Trophies
3
Age
38
Location
Cyprus, originally from Toronto
Website
modmii.github.io
XP
9,720
Country
Cyprus
ok, i get it now (even though it wasn't the answer I was hoping for). Maybe you can confirm my summary below...

So basically for dvd access, WiiMC needs to be launched using the HBC or the official WiiMC channel (latest rev). USB2 support can still be put into any forwarder channel though, either by using the new source code from above, or by changing existing forwarder channels to use IOS58 with customizemii/showmiiwads. But if using the 2nd method (customize mii/showmiiwads), the channel will require IOS58 installed otherwise the channel will just return to the system menu.

I wouldn't be surprised if wad managers could be modded to install content with modified TMD's... that is beyond me... but maybe in the future, there could be another way to install forwarder channels with full hardware access without needing the closed source wiimc forwarder channel installer code.
 

UranusKiller

TranceMaster
Member
Joined
Feb 9, 2009
Messages
960
Trophies
0
Age
36
Location
Redcar, England, UK.
Website
djdynamite.freeforums.org
XP
308
Country
Don't expect that secretive code to be revealed!
tongue.gif
 

qwertymodo

Well-Known Member
Member
Joined
Feb 1, 2010
Messages
827
Trophies
0
Age
34
Website
qwertymodo.com
XP
520
Country
United States
The WiiMC forwarder is GPL, and based on past versions Tantric uses official libogc releases (instead of so many other projects that use their own custom builds... so annoying... although the IOS58 code may only be in the SVN releases so far, not sure), so using it to create other forwarders is trivial. I plan on creating a bunch of forwarders here in the next couple of days. However, there are some known issues with the latest forwarder (which causes USB HD's to not be detected at all), but Tantric said he has fixed them and will be releasing soon. I'm just waiting to get the bugs fixed before I start cranking out a bunch of forwarders based on buggy source.

Edit: Woops, missed the part about that not having anything to do with AHBPROT, but at least the new forwarders will have IOS58 support...
 

Skater4599

Well-Known Member
Member
Joined
May 29, 2008
Messages
965
Trophies
1
Location
United States
XP
1,554
Country
United States
Ive looked at tantrics new forwarder source it does infact contain the way to use the new functions AHBPROT stuff for dvd access etc. It is possible to add these to his emulators as well. I planned on updating the forwarders in my thread (in my sig). But im also leaving 202 ones up cause i personally find ios58 usb speeds much slower, and i could care less about reading roms from DVD. AHBPROT has actually been knows for some time now, it just was not that usefull until IOS58 came along with USB2.0 modules. "Officially"
 

qwertymodo

Well-Known Member
Member
Joined
Feb 1, 2010
Messages
827
Trophies
0
Age
34
Website
qwertymodo.com
XP
520
Country
United States
Skater4599 said:
AHBPROT has actually been knows for some time now, it just was not that usefull until IOS58 came along with USB2.0 modules. "Officially"

No, it was useful, and used. It's just that until now we've known it as DVDX (since DVDX was the old way of activating it, before they integrated it directly into HBC). USB2.0 has nothing to do with the usefulness of AHBPROT because AHBPROT enables direct hardware access from PPC, bypassing the restrictions of IOS for things like direct DVD reading, so it bypasses IOS entirely... meaning a new IOS has nothing to do with its usefulness.
 

Hielkenator

Well-Known Member
OP
Member
Joined
Feb 7, 2010
Messages
4,210
Trophies
0
XP
679
Country
Netherlands
For anyone who missed it, and does'nt want to get to technical,
Tantric is working on "official" forwarder channels for his emulators.

Just be patient.
In the mean time I'll load the emulators from the HBC, wich enables DVD support to the emu's ( AHBPROT)
 

cwstjdenobs

Sodomy non sapiens
Member
Joined
Mar 10, 2009
Messages
1,756
Trophies
0
Location
Ankh-Morpork
Website
Visit site
XP
205
Country
Just set the access rights field in your TMD to 3 and the IOS (sys_version) to 58 if you don't want to wait.

EDIT: So if you're handy with a hex editor that's 0x18B to 0x3A and 0x1DB to 0x03
EDIT the 2nd: Also make sure the forwarder dol you are using doesn't do any IOS reload.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
  • Sicklyboy @ Sicklyboy:
    maaaaan that's so awesome but I also don't want to fork over a hundo for it
  • Veho @ Veho:
    The fuuuuu---
  • Veho @ Veho:
    I thought it was an actual xBox at that price.
  • Sicklyboy @ Sicklyboy:
    I wanna grab a 360 Slim and a 360 E one of these days. Missed the boat of getting them at their lowest though, once they were discontinued. Could've got them for cheap back when I was a broke 20 something working at Target, but then again, I was a broke 20 something working at Target
  • Veho @ Veho:
    Being broke is no fun.
  • K3Nv2 @ K3Nv2:
    @Sicklyboy, $150 isn't that bad for a jtag slim on ebay
  • Veho @ Veho:
    I only wish it was actually playable.
  • Veho @ Veho:
    There's a guy on the Tube of You that makes playable mechanical arcade games out of Lego. This could work on the same principle.
  • Veho @ Veho:
    Just a couple of guys taking their manatee out for some fresh air, why you have to molest them?
  • Veho @ Veho:
    Stupid Chinese shop switched their shipping company and this one is slooooooow.
  • LeoTCK @ LeoTCK:
    STOP BUYING CHINESE CRAP THEN
  • LeoTCK @ LeoTCK:
    SUPPORT LOCAL PRODUCTS, MAKE REVOLUTION
  • LeoTCK @ LeoTCK:
    THEY KEEP REMOVING LOCAL SHIt AND REPLACING WItH INFERIOR CHINESE CRAP
  • LeoTCK @ LeoTCK:
    THATS WHY MY PARTNER CANT GET A GOOTWEAR HIS SIZE ANYMORE
  • LeoTCK @ LeoTCK:
    HE HAS BIG FOOT AND BIG DUCK
  • LeoTCK @ LeoTCK:
    d*ck i mean*
  • LeoTCK @ LeoTCK:
    lol
  • Veho @ Veho:
    Mkay.
  • Veho @ Veho:
    I just ordered another package from China just to spite you.
  • SylverReZ @ SylverReZ:
    Leo could not withstand communism.
  • SylverReZ @ SylverReZ:
    Its OUR products to begin with lol.
    SylverReZ @ SylverReZ: Its OUR products to begin with lol.