Homebrew Official Retroarch WiiU (wip.)

Joined
Apr 19, 2015
Messages
1,023
Trophies
1
Location
Stuck in the PowerPC
Website
heyquark.com
XP
3,909
Country
Australia
But (yes I have a but) it seem the new system based on the video_driver_get_viewport_info have some counterpart .
it seem not all the physical screen respond to touch.
it make sense if the viewport is lower of the physical screen but it also seem to be clamp to the left top corner.
I 'm sure that your code is good scaleTP(vp.x, vp.x + vp.width, -0x7fff, 0x7fff, cal.x);

but in core side , unfortunately I can't guess (I presume)
the viewport x/y then I can only deal with core screenx/screeny and [-0x7FFF,0x7FFF].
and then [-0x7FFF,-0x7FFF] always mean the left corner for me :(
I don't know how handle this properly.

I'm not sure I get the problem. If you have a look at the API headers:
Code:
* The frontend is free to scale/resize this screen as it sees fit, however,
* (X, Y) = (-0x7fff, -0x7fff) will correspond to the top-left pixel of the
* game image, etc.
So; wouldn't (-0x7fff, -0x7fff) being the top-left be the intended behaviour? Why would a core know about taps outside its screen area?
 

rioray

Well-Known Member
Member
Joined
Jul 24, 2017
Messages
152
Trophies
0
Age
43
XP
402
Country
France
I'm not sure I get the problem. If you have a look at the API headers:
Code:
* The frontend is free to scale/resize this screen as it sees fit, however,
* (X, Y) = (-0x7fff, -0x7fff) will correspond to the top-left pixel of the
* game image, etc.
So; wouldn't (-0x7fff, -0x7fff) being the top-left be the intended behaviour? Why would a core know about taps outside its screen area?

hum , yes yes , but let me explain the actual behaviour with you code.

with old code , it works fine in 16/9 but when in 4/3 mode when you hit touch outside the core screen it will also react so you can have a little shift.

Code:
         if (cal.x < 12) {
            cal.x = 12;
            touchClamped = true;
         } else if (cal.x > 1268) {
            cal.x = 1268;
            touchClamped = true;
         }
         if (cal.y < 12) {
            cal.y = 12;
            touchClamped = true;
         } else if (cal.y > 708) {
            cal.y = 708;
            touchClamped = true;
         }
         /* Calibrate to libretro spec and save as axis 2 (idx 4,5) */
         analog_state[0][2][0] = (int16_t)scaleTP(12.0f, 1268.0f, -0x7fff, 0x7fff, (float)cal.x);
         analog_state[0][2][1] = (int16_t)scaleTP(12.0f, 708.0f, -0x7fff, 0x7fff, (float)cal.y);
UTNgmH7.jpg



With the new code , It seem the scale is not the same (little than before , it's only the blue surface),but always starting from the top left edge of the physical string,
so not taking account of the viewport X . the center is not the center of the physical screen , then touch became pretty unusable.


Code:
         if (cal.x < vp.x) {
            cal.x = vp.x;
            touchClamped = true;
         } else if (cal.x > vp.x + vp.width) {
            cal.x = vp.x + vp.width;
            touchClamped = true;
         }
         if (cal.y < vp.y) {
            cal.y = vp.y;
            touchClamped = true;
         } else if (cal.y > vp.y + vp.height) {
            cal.y = vp.y + vp.height;
            touchClamped = true;
         }
         /* Account for 12px clamp on VPADGetTPCalibratedPoint */
         if (vp.x < 12) vp.x = 12;
         if (vp.y < 12) vp.y = 12;
         if (vp.x + vp.width > 1268) vp.width = 1268 - vp.x;
         if (vp.y + vp.height > 708) vp.height = 708 - vp.y;
         /* Calibrate to libretro spec and save as axis 2 (idx 4,5) */
         analog_state[0][2][0] = scaleTP(vp.x, vp.x + vp.width, -0x7fff, 0x7fff, cal.x);
         analog_state[0][2][1] = scaleTP(vp.y, vp.y + vp.height, -0x7fff, 0x7fff, cal.y);
IE1nm3s.jpg


@cucholix , yes it use old touch system ,for the kyra.dat you need to put the file inside the lol folder (as it use kyra engine)
you can see the neeed files here http://wiki.scummvm.org/index.php/Datafiles and kyra.dat here
https://github.com/scummvm/scummvm/raw/master/dists/engine-data/kyra.dat

@the_randomizer I don't think so for now , I have to see what flag needed to compile with mt32 support (and get the mt32 bios).
 

cucholix

00000780 00000438
Member
Joined
Jan 17, 2017
Messages
3,246
Trophies
1
Age
44
XP
6,274
Country
Chile
@rioray the pointer is off ONLY when using Core Provided aspect ratio (and I guess any other AR different from 16:9), in 16:9 the cursor match the touch input perfectly.
LOL is working fine with kyra.dat :), btw is there any chance to add arrow keys to ScummVM? It would be pretty useful for first person rogue like games.
 
Last edited by cucholix,

Deleted member 424658

Annoying Weaboo Girl
Member
Joined
Jun 4, 2017
Messages
499
Trophies
0
Age
24
Website
www.reddit.com
XP
677
Country
United States
Does anyone have a working link for the RetroArch Channel Forwarder thing? I tried the link in OP but that said something like "Confirm full WUP files are in the folder."

Also is anyone working on porting the TGB Dual core? If it could be to work on Gamepad and TV together it'd be great for Pokemon and stuff.
 
Last edited by Deleted member 424658,

cucholix

00000780 00000438
Member
Joined
Jan 17, 2017
Messages
3,246
Trophies
1
Age
44
XP
6,274
Country
Chile
Does anyone have a working link for the RetroArch Channel Forwarder thing? I tried the link in OP but that said something like "Confirm full WUP files are in the folder."

Also is anyone working on porting the TGB Dual core? If it could be to work on Gamepad and TV together it'd be great for Pokemon and stuff.
Make sure there's not subfolders in the install folder, it should be

sd:/install/retroarch/bunch_of_wup_files
 

Deleted member 424658

Annoying Weaboo Girl
Member
Joined
Jun 4, 2017
Messages
499
Trophies
0
Age
24
Website
www.reddit.com
XP
677
Country
United States
Make sure there's not subfolders in the install folder, it should be

sd:/install/retroarch/bunch_of_wup_files
That's how it was. Trust me, I know how to install things.

Edit: Redownloaded and it worked. Must've been corrupt or something. Doesn't seem to boot though.

Edit2: Booted after restarting the console.
 
Last edited by Deleted member 424658,
D

Deleted User

Guest
Great job , The press state report nicely now !
and the value is clamp from -0x7FFF to 0x7FFF which is great as it conform to the norm!

But (yes I have a but) it seem the new system based on the video_driver_get_viewport_info
have some counterpart .
it seem not all the physical screen respond to touch .
it make sense if the viewport is lower of the physical screen but it also seem to be clamp to the left top corner.
I 'm sure that your code is good scaleTP(vp.x, vp.x + vp.width, -0x7fff, 0x7fff, cal.x);

but in core side , unfortunately I can't guess (I presume)
the viewport x/y then I can only deal with core screenx/screeny and [-0x7FFF,0x7FFF].
and then [-0x7FFF,-0x7FFF] always mean the left corner for me :(
I don't know how handle this properly.

--------------------- MERGED ---------------------------



Oh I forgot about this Fucking Shader!

I finally manage to get
(GX2UniformVar){ "unf_blur_texture_direction", GX2_VAR_TYPE_VEC3, 1, blurLocation, 0xffffffff });
(GX2UniformVar){ "unf_color_intensity", GX2_VAR_TYPE_VEC4, 1, colorIntensityLocation, 0xffffffff });
from the pixel shader of the texture2Dshader https://github.com/Maschell/libgui/blob/master/source/video/shaders/Texture2DShader.cpp
to be working with RetroArch.

Then I can finally have the Overlay Alpha working :P


https://filebin.net/tkmawycqi8bm7c73/scummvm_libretro.rpx.zip
Code:
 scummvm core (overlay+touch support WIP and maybe buggy) with engines:
ENABLE_AGI ENABLE_AGOS  ENABLE_AGOS2  ENABLE_CINE  ENABLE_CRUISE  ENABLE_DRACI  ENABLE_DRASCULA  ENABLE_EOB  ENABLE_GOB  ENABLE_GROOVIE  ENABLE_GROOVIE2  ENABLE_HE  ENABLE_IHNM  ENABLE_KYRA  ENABLE_LOL  ENABLE_LURE  ENABLE_MADE  ENABLE_MORTEVIELLE  ENABLE_PARALLACTION  ENABLE_QUEEN  ENABLE_SAGA  ENABLE_SAGA2  ENABLE_SCI  ENABLE_SCI32  ENABLE_SCUMM  ENABLE_SCUMM_7_8  ENABLE_SHERLOCK  ENABLE_SKY  ENABLE_SWORD1  ENABLE_SWORD2  ENABLE_TEENAGENT  ENABLE_TINSEL  ENABLE_TOUCHE  ENABLE_TUCKER


So scummvm works, and with touch?
I haven't been following the scene in a while due to the.. "drama" so i'm lost here..
 

The_Goss

Member
Newcomer
Joined
Mar 13, 2016
Messages
15
Trophies
0
Age
47
XP
83
Country
United States
Hi, dood. New to this whole WiiU hacking situation. Hacked many a system before, this one was fairly easy.

However, in the OP of this thread the instructions appear to be a bit... incomplete.

Unzip the retroarch rar. Where? Root? App folder? What part of it? All of it? Some of it?

And as for the channel. I installed it via WUPinstaller but there doesn't appear to be anything happening once I start it up. It just goes to a black screen and then freezes. I'm currently using CBHC. Can anyone tell me what their method for getting it going was? I literally just installed the channel, moved the retroarch folder full of cores to root and... well, that's all I did.

Edit: I threw the retroarch.prx file into the retroarch folder with the rest thinking that "Well, the channel loader must be looking for it." After I rebooted and hit the channel again, I got a memory error. Well, I guess something happening is better than nothing happening.

I can load cores individually through HBL, but that kind of takes the awesome out of using a channel dedicated to it.
 
Last edited by The_Goss,

RepeatingDigits

Well-Known Member
Member
Joined
Apr 9, 2015
Messages
183
Trophies
0
Age
30
XP
308
Country
Chile
Hi, dood. New to this whole WiiU hacking situation. Hacked many a system before, this one was fairly easy.

However, in the OP of this thread the instructions appear to be a bit... incomplete.

Unzip the retroarch rar. Where? Root? App folder? What part of it? All of it? Some of it?

And as for the channel. I installed it via WUPinstaller but there doesn't appear to be anything happening once I start it up. It just goes to a black screen and then freezes. I'm currently using CBHC. Can anyone tell me what their method for getting it going was? I literally just installed the channel, moved the retroarch folder full of cores to root and... well, that's all I did.

Edit: I threw the retroarch.prx file into the retroarch folder with the rest thinking that "Well, the channel loader must be looking for it." After I rebooted and hit the channel again, I got a memory error. Well, I guess something happening is better than nothing happening.

I can load cores individually through HBL, but that kind of takes the awesome out of using a channel dedicated to it.

make a folder in your sd card called "install". make another one inside it called RA or whatever and dump the contents of "0005000010102172" inside, there's the channel ready for install.

Now download the Retroarch Zip, "2017-11-05_RetroArch_rpx.7z", inside there are two folders, wiiu and retroarch. "retroarch" goes in your SD root, and you can either copy the wiiu folder to your SD as is, or you can just get the "retroarch" folder inside the "wiiu" folder and copy it to sd:/wiiu/apps
This will make everything work.
 
Joined
Apr 19, 2015
Messages
1,023
Trophies
1
Location
Stuck in the PowerPC
Website
heyquark.com
XP
3,909
Country
Australia
hum , yes yes , but let me explain the actual behaviour with you code.

with old code , it works fine in 16/9 but when in 4/3 mode when you hit touch outside the core screen it will also react so you can have a little shift.

Code:
         if (cal.x < 12) {
            cal.x = 12;
            touchClamped = true;
         } else if (cal.x > 1268) {
            cal.x = 1268;
            touchClamped = true;
         }
         if (cal.y < 12) {
            cal.y = 12;
            touchClamped = true;
         } else if (cal.y > 708) {
            cal.y = 708;
            touchClamped = true;
         }
         /* Calibrate to libretro spec and save as axis 2 (idx 4,5) */
         analog_state[0][2][0] = (int16_t)scaleTP(12.0f, 1268.0f, -0x7fff, 0x7fff, (float)cal.x);
         analog_state[0][2][1] = (int16_t)scaleTP(12.0f, 708.0f, -0x7fff, 0x7fff, (float)cal.y);
UTNgmH7.jpg



With the new code , It seem the scale is not the same (little than before , it's only the blue surface),but always starting from the top left edge of the physical string,
so not taking account of the viewport X . the center is not the center of the physical screen , then touch became pretty unusable.


Code:
         if (cal.x < vp.x) {
            cal.x = vp.x;
            touchClamped = true;
         } else if (cal.x > vp.x + vp.width) {
            cal.x = vp.x + vp.width;
            touchClamped = true;
         }
         if (cal.y < vp.y) {
            cal.y = vp.y;
            touchClamped = true;
         } else if (cal.y > vp.y + vp.height) {
            cal.y = vp.y + vp.height;
            touchClamped = true;
         }
         /* Account for 12px clamp on VPADGetTPCalibratedPoint */
         if (vp.x < 12) vp.x = 12;
         if (vp.y < 12) vp.y = 12;
         if (vp.x + vp.width > 1268) vp.width = 1268 - vp.x;
         if (vp.y + vp.height > 708) vp.height = 708 - vp.y;
         /* Calibrate to libretro spec and save as axis 2 (idx 4,5) */
         analog_state[0][2][0] = scaleTP(vp.x, vp.x + vp.width, -0x7fff, 0x7fff, cal.x);
         analog_state[0][2][1] = scaleTP(vp.y, vp.y + vp.height, -0x7fff, 0x7fff, cal.y);
IE1nm3s.jpg
Okay, that's weird. It worked fine with your testcore on my console; so I'll have to do some more investigation there. Is this also with the test core; or something else?
 
  • Like
Reactions: ShadowOne333

rioray

Well-Known Member
Member
Joined
Jul 24, 2017
Messages
152
Trophies
0
Age
43
XP
402
Country
France
Okay, that's weird. It worked fine with your testcore on my console; so I'll have to do some more investigation there. Is this also with the test core; or something else?
oh strange ,was also with my test core (along scummvm) , so maybe it's my RA config that cause the problem (I tweak it for overlay testing) so maybe a problem here ! I will try to find a a new SDCARD for testing (as I don't want to trash the one I use) to start RA from a fresh install.
also in the test core , I suppose you have change the code to fit our new touch driver

Code:
    int p_x = input_state_cb(0, RETRO_DEVICE_POINTER, 0, RETRO_DEVICE_ID_POINTER_X);
    int p_y = input_state_cb(0, RETRO_DEVICE_POINTER, 0, RETRO_DEVICE_ID_POINTER_Y);
    int p_press = input_state_cb(0, RETRO_DEVICE_POINTER, 0,RETRO_DEVICE_ID_POINTER_PRESSED);

   static int ptrhold=0;

   if(p_press)ptrhold++;
   else ptrhold=0;

    px=(int)((p_x+0x7fff)*320.0/0xffff);
    py=(int)((p_y+0x7fff)*240.0/0xffff);

    sprintf(STAT,"(%d,%d)(%d,%d)%d %d\0",p_x,p_y,px,py,p_press,ptrhold);

@the_randomizer I've compiled with USE_MT32EMU (and fix the makefile provide in libretro )
Code:
ifeq ($(USE_MT32EMU), 1)
#MODULES += $(CORE_DIR)/audio/softsynth/mt32
MODULES += audio/softsynth/mt32
endif

you should find in Options\Audio MT-32 emulator in the devices list (also in MT-32 tab)
only tested with MKIsland1 but I don't know if it work fine or not .
I've choose MT-32 emulator and set extra path to my MT-32 roms (MT32_CONTROL and MT32_PCM)
and the game start and sound , but I let you try to tell if it sound good or not as I'm not a expert with this.

https://filebin.net/0si5fn2wuv63r0oi/scummvm_libretro.rpx.zip
 

the_randomizer

The Temp's official fox whisperer
Member
Joined
Apr 29, 2011
Messages
31,284
Trophies
2
Age
38
Location
Dr. Wahwee's castle
XP
18,969
Country
United States
oh strange ,was also with my test core (along scummvm) , so maybe it's my RA config that cause the problem (I tweak it for overlay testing) so maybe a problem here ! I will try to find a a new SDCARD for testing (as I don't want to trash the one I use) to start RA from a fresh install.
also in the test core , I suppose you have change the code to fit our new touch driver

Code:
    int p_x = input_state_cb(0, RETRO_DEVICE_POINTER, 0, RETRO_DEVICE_ID_POINTER_X);
    int p_y = input_state_cb(0, RETRO_DEVICE_POINTER, 0, RETRO_DEVICE_ID_POINTER_Y);
    int p_press = input_state_cb(0, RETRO_DEVICE_POINTER, 0,RETRO_DEVICE_ID_POINTER_PRESSED);

   static int ptrhold=0;

   if(p_press)ptrhold++;
   else ptrhold=0;

    px=(int)((p_x+0x7fff)*320.0/0xffff);
    py=(int)((p_y+0x7fff)*240.0/0xffff);

    sprintf(STAT,"(%d,%d)(%d,%d)%d %d\0",p_x,p_y,px,py,p_press,ptrhold);

@the_randomizer I've compiled with USE_MT32EMU (and fix the makefile provide in libretro )
Code:
ifeq ($(USE_MT32EMU), 1)
#MODULES += $(CORE_DIR)/audio/softsynth/mt32
MODULES += audio/softsynth/mt32
endif

you should find in Options\Audio MT-32 emulator in the devices list (also in MT-32 tab)
only tested with MKIsland1 but I don't know if it work fine or not .
I've choose MT-32 emulator and set extra path to my MT-32 roms (MT32_CONTROL and MT32_PCM)
and the game start and sound , but I let you try to tell if it sound good or not as I'm not a expert with this.

https://filebin.net/0si5fn2wuv63r0oi/scummvm_libretro.rpx.zip

Sweet, what version of RetroArch version/build do I need to use this with? Now to see about getting the games.

@rioray How does your SD path look with the MT-32 ROMs for SCUMMVM?

SD:/MT32_CONTROL/game image? Screenshots would help.
 
Last edited by the_randomizer,

rioray

Well-Known Member
Member
Joined
Jul 24, 2017
Messages
152
Trophies
0
Age
43
XP
402
Country
France
what version of RetroArch version/build do I need to use this with? Now to see about getting the games.

hum , just throw the core in your sd:\retroarch\cores\ folder and start RA load core and choose scummvm in the list.
be sure to put in your game folder an gamename.scummvm text file (containing just the gameid)
for monkey island 1 the game id is monkey.
 

the_randomizer

The Temp's official fox whisperer
Member
Joined
Apr 29, 2011
Messages
31,284
Trophies
2
Age
38
Location
Dr. Wahwee's castle
XP
18,969
Country
United States
hum , just throw the core in your sd:\retroarch\cores\ folder and start RA load core and choose scummvm in the list.
be sure to put in your game folder an gamename.scummvm text file (containing just the gameid)
for monkey island 1 the game id is monkey.

I'd probably use the latest RA nightly since touch controls and all that, I'd think.
 

rioray

Well-Known Member
Member
Joined
Jul 24, 2017
Messages
152
Trophies
0
Age
43
XP
402
Country
France
I'd probably use the latest RA nightly since touch controls and all that, I'd think.
BTW when you load a core, you load RA. so if you load my scummvm core, you will have the version I used to build it (with touch + overlay support ) ... but when you will load another one ,you will loose all this :D
Edit:
for MT32 roms, put it where you want ,then you have to go to scummvm options\paths to set extra_path where the roms reside.
best is to load the core and start it the first time without content , then you can go to options do you conf go back and exit the menu ,
then when you launch later an scummvm file ,you will have options already set
 
Last edited by rioray,

the_randomizer

The Temp's official fox whisperer
Member
Joined
Apr 29, 2011
Messages
31,284
Trophies
2
Age
38
Location
Dr. Wahwee's castle
XP
18,969
Country
United States
BTW when you load a core, you load RA. so if you load my scummvm core, you will have the version I used to build it (with touch + overlay support ) ... but when you will load another one ,you will loose all this :D

Er, I'm talking of the version of the RA app itself, not the core per se.
 

cucholix

00000780 00000438
Member
Joined
Jan 17, 2017
Messages
3,246
Trophies
1
Age
44
XP
6,274
Country
Chile
I would think that MT32 makes overall emulation take a hit? Broken Sword sound already struggles with standart sound emulation...
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    K3Nv2 @ K3Nv2: Nut on the hill