Wii on Wii U Virtual Console: Injecting Games

Discussion in 'Wii U - Tutorials' started by piratesephiroth, Sep 3, 2017.

  1. pedro702

    pedro702 GBAtemp Guru

    Member
    6,705
    2,150
    Mar 3, 2014
    Portugal
    RE4 is officialy released by nintendo as a wii vc title and even then it cannot make the gamepad work, im guessing they used the code very wierdly and nintendo couldnt patch the CC emulation.
     
    Last edited by pedro702, Sep 13, 2017
  2. ploggy

    ploggy WAKA! WAKA!

    Member
    2,149
    1,551
    Aug 29, 2007
    United Kingdom
    Yeah there's deffo something weird about that game. I'm lucky I prefer the Wiimote/Nunchuck Controls :)
     
  3. FIX94

    FIX94 Global Moderator

    Global Moderator
    7,238
    9,414
    Dec 3, 2009
    Germany
    ???
    So I pushed a library (and demo) for gamepad input that can be implemented relatively easily in homebrew.
    https://github.com/FIX94/libwiidrc

    Right now the only patches that'll make it work are for the fw.img r590 (crc32 e2f27e9b) and are as follows:
    offset 0x1478A from 0x6818 to 0x2000 (wiimote passthrough)
    Thats the wiimote patch I explained yesterday, still required.

    These next 2 are rather ugly:
    offset 0x115C2 from 2800D00349022209F004FF1D to F004FF2148022109F004FEF9 (custom function)
    offset 0x14E92 from F001FAB9 to F7FCFB95 (jump to custom function)
    Basically the gamepad memory is cached so I had to figure out a way to flush that cache after a read, turns out I had to do it in quite the ugly way.

    And lastly are these 2 short ones:
    offset 0x17A880 from 0x2000 to 0x2001 (to disable ahbprot)
    offset 0x17E81C from 0x2201 to 0x2200 (to disable memprot)
    That will allow full hardware access from homebrew just like you have when you boot homebrew with the homebrew channel, may be useful for all sorts of things, in this case it is just used to read out the actual gamepad data without having to move it.
     
    hippy dave, Pachee, DarthDub and 10 others like this.
  4. wicksand420

    wicksand420 GBAtemp Maniac

    Member
    1,419
    513
    Nov 13, 2016
    United States
    Hey guys, any way someone could start a thread on patching the fw.img? It would be nice to have it organised.
     
  5. fejich

    fejich Member

    Newcomer
    47
    30
    Nov 26, 2016
    China
    E1A907D5
    文件: D:\JUNS\Xenoblade Chronicles [VAEE01]\code\fw.img
    大小: 1789408 字节
    修改时间: 2017年9月14日, 9:12:38
    MD5: 4DF41FB30CA3D8CC43F4EB6034589A0F
    SHA1: 39BE96EB749DDC3F05BE03126F0803B778EE420C
    CRC32: E1A907D5


    4C419C0F
    文件: D:\JUNS\Donkey Kong Country Returns [VABE01]\code\fw.img
    大小: 1789485 字节
    修改时间: 2017年9月14日, 9:03:17
    MD5: 6EE856CB942091CF8AAF0F6AA2AE1AB0
    SHA1: 56187FDB96971DB77EFA290A5883442246AD7277
    CRC32: 4C419C0F

    文件: D:\JUNS\Punch-Out!! [VACE01]\code\fw.img
    大小: 1789485 字节
    修改时间: 2017年9月14日, 9:02:51
    MD5: 6EE856CB942091CF8AAF0F6AA2AE1AB0
    SHA1: 56187FDB96971DB77EFA290A5883442246AD7277
    CRC32: 4C419C0F

    文件: D:\JUNS\Metroid Prime Trilogy [VAGE01]\code\fw.img
    大小: 1789485 字节
    修改时间: 2017年9月14日, 9:01:30
    MD5: 6EE856CB942091CF8AAF0F6AA2AE1AB0
    SHA1: 56187FDB96971DB77EFA290A5883442246AD7277
    CRC32: 4C419C0F

    文件: D:\JUNS\Super Mario Galaxy 2 [VAAE01]\code\fw.img
    大小: 1789485 字节
    修改时间: 2017年9月14日, 9:13:11
    MD5: 6EE856CB942091CF8AAF0F6AA2AE1AB0
    SHA1: 56187FDB96971DB77EFA290A5883442246AD7277
    CRC32: 4C419C0F

    文件: D:\JUNS\Metroid Other M [VAHE01]\code\fw.img
    大小: 1789485 字节
    修改时间: 2017年9月14日, 9:12:10
    MD5: 6EE856CB942091CF8AAF0F6AA2AE1AB0
    SHA1: 56187FDB96971DB77EFA290A5883442246AD7277
    CRC32: 4C419C0F

    文件: D:\JUNS\Donkey Kong Country Returns [VABE01]\code\fw.img
    大小: 1789485 字节
    修改时间: 2017年9月14日, 9:03:17
    MD5: 6EE856CB942091CF8AAF0F6AA2AE1AB0
    SHA1: 56187FDB96971DB77EFA290A5883442246AD7277
    CRC32: 4C419C0F

    文件: D:\JUNS\Kirby's Adventure Wii [VADP01]\code\fw.img
    大小: 1789485 字节
    修改时间: 2017年9月14日, 9:02:02
    MD5: 6EE856CB942091CF8AAF0F6AA2AE1AB0
    SHA1: 56187FDB96971DB77EFA290A5883442246AD7277
    CRC32: 4C419C0F

    文件: D:\JUNS\New Super Mario Bros. Wii [VAFJ01]\code\fw.img
    大小: 1789485 字节
    修改时间: 2017年9月14日, 9:13:43
    MD5: 6EE856CB942091CF8AAF0F6AA2AE1AB0
    SHA1: 56187FDB96971DB77EFA290A5883442246AD7277
    CRC32: 4C419C0F

    文件: D:\JUNS\PokéPark Wii Pikachu’s Adventure [VAJE01]\code\fw.img
    大小: 1789485 字节
    修改时间: 2017年9月14日, 9:14:05
    MD5: 6EE856CB942091CF8AAF0F6AA2AE1AB0
    SHA1: 56187FDB96971DB77EFA290A5883442246AD7277
    CRC32: 4C419C0F


    E2F27E9B
    文件: D:\JUNS\PIKMIN 2 [VBTE01]\code\fw.img
    大小: 1785497 字节
    修改时间: 2017年9月14日, 9:14:57
    MD5: 3CAF52A9A440EEE4F125A3AD22E305C8
    SHA1: A5A75EBF3164874830A1D5992495DE510AB3F74E
    CRC32: E2F27E9B

    文件: D:\JUNS\PIKMIN [VBUE01]\code\fw.img
    大小: 1785497 字节
    修改时间: 2017年9月14日, 9:15:20
    MD5: 3CAF52A9A440EEE4F125A3AD22E305C8
    SHA1: A5A75EBF3164874830A1D5992495DE510AB3F74E
    CRC32: E2F27E9B

    文件: D:\JUNS\Resident Evil The Umbrella Chronicles [VBWE01]\code\fw.img
    大小: 1785497 字节
    修改时间: 2017年9月14日, 9:15:43
    MD5: 3CAF52A9A440EEE4F125A3AD22E305C8
    SHA1: A5A75EBF3164874830A1D5992495DE510AB3F74E
    CRC32: E2F27E9B

    文件: D:\JUNS\WARIO WARE SMOOTH MOVES [VBVE01]\code\fw.img
    大小: 1785497 字节
    修改时间: 2017年9月14日, 9:16:13
    MD5: 3CAF52A9A440EEE4F125A3AD22E305C8
    SHA1: A5A75EBF3164874830A1D5992495DE510AB3F74E
    CRC32: E2F27E9B

    文件: D:\JUNS\DONKEY KONG JUNGLE BEAT [VBXE01]\code\fw.img
    大小: 1785497 字节
    修改时间: 2017年9月14日, 9:16:39
    MD5: 3CAF52A9A440EEE4F125A3AD22E305C8
    SHA1: A5A75EBF3164874830A1D5992495DE510AB3F74E
    CRC32: E2F27E9B

    文件: D:\JUNS\Super Mario Galaxy [VBKJ01]\code\fw.img
    大小: 1785497 字节
    修改时间: 2017年9月14日, 9:00:27
    MD5: 3CAF52A9A440EEE4F125A3AD22E305C8
    SHA1: A5A75EBF3164874830A1D5992495DE510AB3F74E
    CRC32: E2F27E9B

    文件: D:\JUNS\Kirby's Epic Yarn [VARE01]\code\fw.img
    大小: 1785497 字节
    修改时间: 2017年9月14日, 9:05:38
    MD5: 3CAF52A9A440EEE4F125A3AD22E305C8
    SHA1: A5A75EBF3164874830A1D5992495DE510AB3F74E
    CRC32: E2F27E9B

    文件: D:\JUNS\The Legend of Zelda Skyward Sword [VANE01]\code\fw.img
    大小: 1785497 字节
    修改时间: 2017年9月14日, 9:05:12
    MD5: 3CAF52A9A440EEE4F125A3AD22E305C8
    SHA1: A5A75EBF3164874830A1D5992495DE510AB3F74E
    CRC32: E2F27E9B
     
    daxtsu likes this.
  6. leseratte

    leseratte GBAtemp Regular

    Member
    168
    47
    Jun 2, 2012
    Gambia, The
    I have been reading all the threads about the fw.img, collecting all the patches and ported them to the three different versions (however most of them are untested). I am going to create a tool to automate the patch process for all the patches and will add my documentation (the list of all the patches for all versions) when I release it.

    What about 0x119a0 from 0x138ba004 to 0x13210000 (which was part of the Wiimote patch)? Is that needed, too?
     
    daxtsu and wicksand420 like this.
  7. wicksand420

    wicksand420 GBAtemp Maniac

    Member
    1,419
    513
    Nov 13, 2016
    United States
    Sounds awesome!!
     
  8. FIX94

    FIX94 Global Moderator

    Global Moderator
    7,238
    9,414
    Dec 3, 2009
    Germany
    ???
    that one was just needed because yesterday I didnt have a way of getting full hardware access so those upper memory areas werent readable, now though with disabling ahbprot and memprot reading that area out is no problem anymore of course.
     
  9. leseratte

    leseratte GBAtemp Regular

    Member
    168
    47
    Jun 2, 2012
    Gambia, The
    So the two new patches (17a880 and 17e81c) can also replace the 0x119a0 in the "wiimote and gamepad" patch? Or does that one still require the 119a0 patch?
     
  10. VinsCool

    VinsCool Disgusted

    Member
    GBAtemp Patron
    VinsCool is a Patron of GBAtemp and is helping us stay independent!

    Our Patreon
    11,972
    28,915
    Jan 7, 2014
    Canada
    An Alternate Reality
    Oh man, that's so exciting.
    Can't wait to see more coming.
     
    zeldaism likes this.
  11. FIX94

    FIX94 Global Moderator

    Global Moderator
    7,238
    9,414
    Dec 3, 2009
    Germany
    ???
    the 0x119a0 patch was never required for anything, it was just a cheap quick hack to see if I can read out the gamepad data at all to prove its possible, but now that I have a proper library for it and have full hardware access thanks to the 0x17A880 and 0x17E81C patches its not required anymore.
     
    DarthDub, ploggy, zeldaism and 2 others like this.
  12. wolf-snake

    wolf-snake GBAtemp Advanced Fan

    Member
    999
    601
    Feb 5, 2009
    Mexico
    So do Wii games converted from WBFS to ISO work? i wanna test Metal Slug Complete (Japanese version of Metal Slug Antology for the Wii) because unlike the international versions this one support the classic controller and the only dump i managed to find for this game was a wbfs file.
     
  13. markehmus

    markehmus GBAtemp Maniac

    Member
    1,182
    365
    Jul 26, 2008
    Canada
    in the GAME
    yes they do ,theres even a script to automate the process
    https://gbatemp.net/threads/release-wiivc-injector-script.483577/
     
  14. wolf-snake

    wolf-snake GBAtemp Advanced Fan

    Member
    999
    601
    Feb 5, 2009
    Mexico
  15. ploggy

    ploggy WAKA! WAKA!

    Member
    2,149
    1,551
    Aug 29, 2007
    United Kingdom
    Thank You @FIX94 for the update :)

    Anyone fancy compiling WiiXplorer with fix94's changes? (or any other Wii Homebrew for that matter) :P
     
    ShadowOne333 likes this.
  16. piratesephiroth
    OP

    piratesephiroth I wish I could read

    Member
    3,010
    1,621
    Sep 5, 2013
    Brazil
    So the r590 of fw.img is the recommended one. I'll add that and the list of games that contain that revision to the first post.
     
  17. markehmus

    markehmus GBAtemp Maniac

    Member
    1,182
    365
    Jul 26, 2008
    Canada
    in the GAME
    piratesephiroth and fejich like this.
  18. ploggy

    ploggy WAKA! WAKA!

    Member
    2,149
    1,551
    Aug 29, 2007
    United Kingdom
    USB Loaders are starting to Boot! but they're not recognising USB :( neither is Not64.
    I tried compiling Snes9xgx. But I just cant understand it :P
     
    Last edited by ploggy, Sep 14, 2017
    DarthDub, zeldaism and wicksand420 like this.
  19. wolf-snake

    wolf-snake GBAtemp Advanced Fan

    Member
    999
    601
    Feb 5, 2009
    Mexico
    Well managed to inject Metal Slug JP version and boots fine, some garble text in some places, i even reached the option menu using the gamepad emulating a wiimote and it does indeed have classic controller support unlike the international versions but every time i try to select the classic controller the game crashes, it might be because the gamepad is emulating a sideways wiimote and once i choose Classic Controller as player one controller the game tries to do the Wiimote and classic controls inputs at the same time. Is there a way to disable that?
     
  20. wicksand420

    wicksand420 GBAtemp Maniac

    Member
    1,419
    513
    Nov 13, 2016
    United States
    Try the 1.0.5b game script on the other post and select classic controller for the gamepad, see if that works