Homebrew RetroArch - A new multi-system emulator

Status
Not open for further replies.

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
Well, there is a dedicated forum for RA, no idea why were are discussing the release here to be honest, place is full of shitheads.


Those forums are helluva lot more useful for getting help for RA anyways. This thread here is moot, the OP hasn't even been changed in who knows how long.


not really. i got alot of help from this site.

Trust me, you'll get help faster on the libretro forums :P
 

Clydefrosch

Well-Known Member
Member
Joined
Jan 2, 2009
Messages
6,022
Trophies
2
XP
4,619
Country
Germany
I need a little help with the last update for the wii. How do I go about updating the right way?
The last time I believe, all I did was remove the old .dol files in the apps/retroarch folder and replace them with the new ones, but for some reason, this isnt working this time.
Using both a forwarder channel and the homebrew channel to start retroarch, I only arrive at black screens.

Redownloaded the 1.0.0.0 file again, still not working.

Would anyone happen to know what the problem is?
 

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
I need a little help with the last update for the wii. How do I go about updating the right way?
The last time I believe, all I did was remove the old .dol files in the apps/retroarch folder and replace them with the new ones, but for some reason, this isnt working this time.
Using both a forwarder channel and the homebrew channel to start retroarch, I only arrive at black screens.

Redownloaded the 1.0.0.0 file again, still not working.

Would anyone happen to know what the problem is?


The config files need to be deleted, it should say that on the download page I think. The emulator cores have new names, so they conflict with old config files.
 

Jacobeian

Well-Known Member
Member
Joined
May 15, 2008
Messages
1,893
Trophies
0
XP
387
Country
Cuba
@squarepusher, here is your code
I have not github account and there is no way I'm going to go throught he hassle of cloning your git repository, etc... so a basic copy/paste like in old times is all what I can offer


Code:
static void gx_input_poll(void *data)
{
   gx_input_t *gx = (gx_input_t*)data;

   gx->pad_state[0] = 0;
   gx->pad_state[1] = 0;
   gx->pad_state[2] = 0;
   gx->pad_state[3] = 0;
   gx->analog_state[0][0][0] = gx->analog_state[0][0][1] = gx->analog_state[0][1][0] = gx->analog_state[0][1][1] = 0;
   gx->analog_state[1][0][0] = gx->analog_state[1][0][1] = gx->analog_state[1][1][0] = gx->analog_state[1][1][1] = 0;
   gx->analog_state[2][0][0] = gx->analog_state[2][0][1] = gx->analog_state[2][1][0] = gx->analog_state[2][1][1] = 0;
   gx->analog_state[3][0][0] = gx->analog_state[3][0][1] = gx->analog_state[3][1][0] = gx->analog_state[3][1][1] = 0;

   u8 gcpad = PAD_ScanPads();

#ifdef HW_RVL
   WPAD_ReadPending(WPAD_CHAN_ALL, NULL);
#endif

   for (unsigned port = 0; port < MAX_PADS; port++)
   {
      uint32_t down = 0;
      uint64_t *state_cur = &gx->pad_state[port];

      if (gcpad & (1 << port))
      {
         down = PAD_ButtonsHeld(port);

         *state_cur |= (down & PAD_BUTTON_A) ? (1ULL << GX_GC_A) : 0;
         *state_cur |= (down & PAD_BUTTON_B) ? (1ULL << GX_GC_B) : 0;
         *state_cur |= (down & PAD_BUTTON_X) ? (1ULL << GX_GC_X) : 0;
         *state_cur |= (down & PAD_BUTTON_Y) ? (1ULL << GX_GC_Y) : 0;
         *state_cur |= (down & PAD_BUTTON_UP) ? (1ULL << GX_GC_UP) : 0;
         *state_cur |= (down & PAD_BUTTON_DOWN) ? (1ULL << GX_GC_DOWN) : 0;
         *state_cur |= (down & PAD_BUTTON_LEFT) ? (1ULL << GX_GC_LEFT) : 0;
         *state_cur |= (down & PAD_BUTTON_RIGHT) ? (1ULL << GX_GC_RIGHT) : 0;
         *state_cur |= (down & PAD_BUTTON_START) ? (1ULL << GX_GC_START) : 0;
         *state_cur |= (down & PAD_TRIGGER_Z) ? (1ULL << GX_GC_Z_TRIGGER) : 0;
         *state_cur |= ((down & PAD_TRIGGER_L) || PAD_TriggerL(port) > 127) ? (1ULL << GX_GC_L_TRIGGER) : 0;
         *state_cur |= ((down & PAD_TRIGGER_R) || PAD_TriggerR(port) > 127) ? (1ULL << GX_GC_R_TRIGGER) : 0;

         int16_t ls_x = (int16_t)PAD_StickX(port) * 256;
         int16_t ls_y = (int16_t)PAD_StickY(port) * -256;
         int16_t rs_x = (int16_t)PAD_SubStickX(port) * 256;
         int16_t rs_y = (int16_t)PAD_SubStickY(port) * -256;

         gx->analog_state[port][RETRO_DEVICE_INDEX_ANALOG_LEFT][RETRO_DEVICE_ID_ANALOG_X] = ls_x;
         gx->analog_state[port][RETRO_DEVICE_INDEX_ANALOG_LEFT][RETRO_DEVICE_ID_ANALOG_Y] = ls_y;
         gx->analog_state[port][RETRO_DEVICE_INDEX_ANALOG_RIGHT][RETRO_DEVICE_ID_ANALOG_X] = rs_x;
         gx->analog_state[port][RETRO_DEVICE_INDEX_ANALOG_RIGHT][RETRO_DEVICE_ID_ANALOG_Y] = rs_y;

         const uint64_t menu_combo = (1ULL << GX_GC_START) | (1ULL << GX_GC_Z_TRIGGER) | (1ULL << GX_GC_L_TRIGGER) | (1ULL << GX_GC_R_TRIGGER);
         if ((*state_cur & menu_combo) == menu_combo)
            *state_cur |= (1ULL << GX_WIIMOTE_HOME);

         if (g_settings.input.autodetect_enable)
         {
            if (strcmp(g_settings.input.device_names[port], "Gamecube Controller") != 0)
               gx_input_set_keybinds(NULL, DEVICE_GAMECUBE, port, 0, (1ULL << KEYBINDS_ACTION_SET_DEFAULT_BINDS));
         }
      }

#ifdef HW_RVL
      uint32_t ptype = 0;
      uint32_t connected = WPAD_Probe(port, &ptype);
      
      if (connected == WPAD_ERR_NONE)
      {
         WPADData *wpaddata = WPAD_Data(port);

         down = wpaddata->btns_h;

         expansion_t *exp = &wpaddata->exp;

         *state_cur |= (down & WPAD_BUTTON_A) ? (1ULL << GX_WIIMOTE_A) : 0;
         *state_cur |= (down & WPAD_BUTTON_B) ? (1ULL << GX_WIIMOTE_B) : 0;
         *state_cur |= (down & WPAD_BUTTON_1) ? (1ULL << GX_WIIMOTE_1) : 0;
         *state_cur |= (down & WPAD_BUTTON_2) ? (1ULL << GX_WIIMOTE_2) : 0;
         *state_cur |= (down & WPAD_BUTTON_PLUS) ? (1ULL << GX_WIIMOTE_PLUS) : 0;
         *state_cur |= (down & WPAD_BUTTON_MINUS) ? (1ULL << GX_WIIMOTE_MINUS) : 0;
         *state_cur |= (down & WPAD_BUTTON_HOME) ? (1ULL << GX_WIIMOTE_HOME) : 0;

         if (ptype != WPAD_EXP_NUNCHUK)
         {
            // rotated d-pad on Wiimote
            *state_cur |= (down & WPAD_BUTTON_UP) ? (1ULL << GX_WIIMOTE_LEFT) : 0;
            *state_cur |= (down & WPAD_BUTTON_DOWN) ? (1ULL << GX_WIIMOTE_RIGHT) : 0;
            *state_cur |= (down & WPAD_BUTTON_LEFT) ? (1ULL << GX_WIIMOTE_DOWN) : 0;
            *state_cur |= (down & WPAD_BUTTON_RIGHT) ? (1ULL << GX_WIIMOTE_UP) : 0;
         }

         if (ptype == WPAD_EXP_CLASSIC)
         {
            *state_cur |= (down & WPAD_CLASSIC_BUTTON_A) ? (1ULL << GX_CLASSIC_A) : 0;
            *state_cur |= (down & WPAD_CLASSIC_BUTTON_B) ? (1ULL << GX_CLASSIC_B) : 0;
            *state_cur |= (down & WPAD_CLASSIC_BUTTON_X) ? (1ULL << GX_CLASSIC_X) : 0;
            *state_cur |= (down & WPAD_CLASSIC_BUTTON_Y) ? (1ULL << GX_CLASSIC_Y) : 0;
            *state_cur |= (down & WPAD_CLASSIC_BUTTON_UP) ? (1ULL << GX_CLASSIC_UP) : 0;
            *state_cur |= (down & WPAD_CLASSIC_BUTTON_DOWN) ? (1ULL << GX_CLASSIC_DOWN) : 0;
            *state_cur |= (down & WPAD_CLASSIC_BUTTON_LEFT) ? (1ULL << GX_CLASSIC_LEFT) : 0;
            *state_cur |= (down & WPAD_CLASSIC_BUTTON_RIGHT) ? (1ULL << GX_CLASSIC_RIGHT) : 0;
            *state_cur |= (down & WPAD_CLASSIC_BUTTON_PLUS) ? (1ULL << GX_CLASSIC_PLUS) : 0;
            *state_cur |= (down & WPAD_CLASSIC_BUTTON_MINUS) ? (1ULL << GX_CLASSIC_MINUS) : 0;
            *state_cur |= (down & WPAD_CLASSIC_BUTTON_HOME) ? (1ULL << GX_CLASSIC_HOME) : 0;
            *state_cur |= (down & WPAD_CLASSIC_BUTTON_FULL_L) ? (1ULL << GX_CLASSIC_L_TRIGGER) : 0;
            *state_cur |= (down & WPAD_CLASSIC_BUTTON_FULL_R) ? (1ULL << GX_CLASSIC_R_TRIGGER) : 0;
            *state_cur |= (down & WPAD_CLASSIC_BUTTON_ZL) ? (1ULL << GX_CLASSIC_ZL_TRIGGER) : 0;
            *state_cur |= (down & WPAD_CLASSIC_BUTTON_ZR) ? (1ULL << GX_CLASSIC_ZR_TRIGGER) : 0;

            float ljs_mag = exp->classic.ljs.mag;
            float ljs_ang = exp->classic.ljs.ang;

            float rjs_mag = exp->classic.rjs.mag;
            float rjs_ang = exp->classic.rjs.ang;

            if (ljs_mag > 1.0f)
               ljs_mag = 1.0f;
            else if (ljs_mag < -1.0f)
               ljs_mag = -1.0f;

            if (rjs_mag > 1.0f)
               rjs_mag = 1.0f;
            else if (rjs_mag < -1.0f)
               rjs_mag = -1.0f;

            double ljs_val_x = ljs_mag * sin(M_PI * ljs_ang / 180.0);
            double ljs_val_y = -ljs_mag * cos(M_PI * ljs_ang / 180.0);

            double rjs_val_x = rjs_mag * sin(M_PI * rjs_ang / 180.0);
            double rjs_val_y = -rjs_mag * cos(M_PI * rjs_ang / 180.0);

            int16_t ls_x = (int16_t)(ljs_val_x * 32767.0f);
            int16_t ls_y = (int16_t)(ljs_val_y * 32767.0f);

            int16_t rs_x = (int16_t)(rjs_val_x * 32767.0f);
            int16_t rs_y = (int16_t)(rjs_val_y * 32767.0f);

            gx->analog_state[port][RETRO_DEVICE_INDEX_ANALOG_LEFT][RETRO_DEVICE_ID_ANALOG_X] = ls_x;
            gx->analog_state[port][RETRO_DEVICE_INDEX_ANALOG_LEFT][RETRO_DEVICE_ID_ANALOG_Y] = ls_y;
            gx->analog_state[port][RETRO_DEVICE_INDEX_ANALOG_RIGHT][RETRO_DEVICE_ID_ANALOG_X] = rs_x;
            gx->analog_state[port][RETRO_DEVICE_INDEX_ANALOG_RIGHT][RETRO_DEVICE_ID_ANALOG_Y] = rs_y;

            if (g_settings.input.autodetect_enable)
            {
               if (strcmp(g_settings.input.device_names[port], "Classic Controller") != 0)
                  gx_input_set_keybinds(NULL, DEVICE_CLASSIC, port, 0, (1ULL << KEYBINDS_ACTION_SET_DEFAULT_BINDS));
            }
         }
         
         else if (ptype == WPAD_EXP_NUNCHUK)
         {
            // wiimote is held upright with nunchuk, do not change d-pad orientation
            *state_cur |= (down & WPAD_BUTTON_UP) ? (1ULL << GX_WIIMOTE_UP) : 0;
            *state_cur |= (down & WPAD_BUTTON_DOWN) ? (1ULL << GX_WIIMOTE_DOWN) : 0;
            *state_cur |= (down & WPAD_BUTTON_LEFT) ? (1ULL << GX_WIIMOTE_LEFT) : 0;
            *state_cur |= (down & WPAD_BUTTON_RIGHT) ? (1ULL << GX_WIIMOTE_RIGHT) : 0;

            *state_cur |= (down & WPAD_NUNCHUK_BUTTON_Z) ? (1ULL << GX_NUNCHUK_Z) : 0;
            *state_cur |= (down & WPAD_NUNCHUK_BUTTON_C) ? (1ULL << GX_NUNCHUK_C) : 0;

            float js_mag = exp->nunchuk.js.mag;
            float js_ang = exp->nunchuk.js.ang;

            if (js_mag > 1.0f)
               js_mag = 1.0f;
            else if (js_mag < -1.0f)
               js_mag = -1.0f;

            double js_val_x = js_mag * sin(M_PI * js_ang / 180.0);
            double js_val_y = -js_mag * cos(M_PI * js_ang / 180.0);

            int16_t x = (int16_t)(js_val_x * 32767.0f);
            int16_t y = (int16_t)(js_val_y * 32767.0f);

            gx->analog_state[port][RETRO_DEVICE_INDEX_ANALOG_LEFT][RETRO_DEVICE_ID_ANALOG_X] = x;
            gx->analog_state[port][RETRO_DEVICE_INDEX_ANALOG_LEFT][RETRO_DEVICE_ID_ANALOG_Y] = y;

            if (g_settings.input.autodetect_enable)
            {
               if (strcmp(g_settings.input.device_names[port], "Wiimote + Nunchuk") != 0)
                  gx_input_set_keybinds(NULL, DEVICE_NUNCHUK, port, 0, (1ULL << KEYBINDS_ACTION_SET_DEFAULT_BINDS));
            }
         }
         else
         {
            //no attachment, assume standalone Wiimote
            if (g_settings.input.autodetect_enable)
            {
               if (strcmp(g_settings.input.device_names[port], "Wiimote") != 0)
                  gx_input_set_keybinds(NULL, DEVICE_WIIMOTE, port, 0, (1ULL << KEYBINDS_ACTION_SET_DEFAULT_BINDS));
            }
         }
      }

      for (int i = 0; i < 2; i++)
         for (int j = 0; j < 2; j++)
            if (gx->analog_state[port][i][j] == -0x8000)
               gx->analog_state[port][i][j] = -0x7fff;
#endif
   }

   uint64_t *state_p1 = &gx->pad_state[0];
   uint64_t *lifecycle_state = &g_extern.lifecycle_state;

   *lifecycle_state &= ~((1ULL << RARCH_MENU_TOGGLE));

   if (g_menu)
   {
      *state_p1 |= (1ULL << GX_WIIMOTE_HOME);
      g_menu = false;
   }

   if (*state_p1 & ((1ULL << GX_WIIMOTE_HOME)
#ifdef HW_RVL
            | (1ULL << GX_CLASSIC_HOME)
#endif
            ))
      *lifecycle_state |= (1ULL << RARCH_MENU_TOGGLE);
}

It might not fix the reported issue (which by the way I never encoutered myself... so much for questioning my motivation of helping you) but it's cleaner this way.

Now please do not turn up the situation like you always seem to do, YOU were the one coming here publically attacking people who haven't done or said anything against you, you should at least expect some reaction and deal wit it, instead of being so over defensive everytime someone criticizes your work.

I sure don't feel superior to anybody (far from it) and from what I remember, none of the Wii devs you have been attacking ever appeared that way, they are all nice people who were always very helpful when asked kindly so I am not sure why you feel the need to bash them now (especially when they basically left that scene years ago and aren't probably aware of these problems you are having) or painting them like gods or gurus who feel superior to lame users. Again, if you have an inferiority complex, deal with it but do not put it on other people who never asked you anything.
 
  • Like
Reactions: Hielkenator

mightymuffy

fatbaldpieeater
Member
Joined
Nov 6, 2002
Messages
1,983
Trophies
3
Age
48
Location
Land o't pies
XP
3,273
Country
United Kingdom
The config files need to be deleted, it should say that on the download page I think. The emulator cores have new names, so they conflict with old config files.

See randomizer, you just helped out on here, this thread IS useful, especially for those otherwise not as learned in the program.... better to have questions like Clydefrosch just asked posted on here than cluttering up the official one... besides, you're not a mod, and neither is Charco, so it's not your call is it - if you two don't like this thread then don't soddin post in it ;)

SP, I can see your point, just not sure how to reply to it! :lol: Think we all know by now your problem, so we can probably deal with anyone on here that posts about the CC problem etc - clearly these posts/this place aren't doing much for your mood, answer the stuff on your forum, but ignorance is bliss over here perhaps?
 
  • Like
Reactions: Hielkenator

Hielkenator

Well-Known Member
Member
Joined
Feb 7, 2010
Messages
4,210
Trophies
0
XP
679
Country
Netherlands
Never ever have I encountered such a hostile thread.
It's just beyond any proportion really.

let's keep the tech stuff on the official retroarch forum?

I'm no coder or dev, I'm just a gamer.
Also I'm no kid, I'm pushing 40 now, have a chronic decease, wife and kids etc.
Play games for pain relief, to put my mind on different things.
At some moment did not want to live anymore...
Gaming helped ( amongst my family ) to get through bad times.

I have no idea why libretroarch is being so hostile on the GBA temp users.

He must realize the wiiscene had been dead for a long time and those coders he mentioned barely come here anymore?
It is pointless shouting at us, Most of us don't even know who or what you are talking about.
Majority off people here are just gamers, nerds etc.
Retro lovers are known to be passionate about "their" consoles and games.
It has to do with childhood and fond memories, making those trips down memory lane.

Retroarch is probably the last project that came to the Wii worth having and worth following.
At the moment it's all I care about in gaming, passionately.
Checking this thread almost everyday.
Doesn't that mean/ tells anything to you?

Yet everytime there's release, this shit happens for no good reason.
The dev gets excessively hostile, even if we post simple experiences/bugs encountered about RA
It's horrible to me, as I mean well and want to help/ inform people on GBA temp.

I understand your problem. All that tech savvy bullshit etc...
But remember, the 'scene" you revert to, has been gone and left far before RA was released.
Your isseus with them should not be handled here, and honestly it feels somewhat out of time.
Better these issues should be solved on a professionall and personal level.
I think you would agree that your work deserves it?
Please could you try to understand?
And accept the positives as well as the negatives?
If I tell you I am experiencing problems with RA, I'm not trying to bash your work or being ungratefull.
It's that part of me wishing to get the best, wishing I could code like that.
Trying to enjoy what is left of my life.

Nothing but respect really.
 

LibretroRetroArc

Well-Known Member
Member
Joined
Aug 24, 2012
Messages
748
Trophies
0
XP
1,258
Country
Netherlands
@squarepusher, here is your code
I have not github account and there is no way I'm going to go throught he hassle of cloning your git repository, etc... so a basic copy/paste like in old times is all what I can offer


Code:
static void gx_input_poll(void *data)
{
  gx_input_t *gx = (gx_input_t*)data;
 
  gx->pad_state[0] = 0;
  gx->pad_state[1] = 0;
  gx->pad_state[2] = 0;
  gx->pad_state[3] = 0;
  gx->analog_state[0][0][0] = gx->analog_state[0][0][1] = gx->analog_state[0][1][0] = gx->analog_state[0][1][1] = 0;
  gx->analog_state[1][0][0] = gx->analog_state[1][0][1] = gx->analog_state[1][1][0] = gx->analog_state[1][1][1] = 0;
  gx->analog_state[2][0][0] = gx->analog_state[2][0][1] = gx->analog_state[2][1][0] = gx->analog_state[2][1][1] = 0;
  gx->analog_state[3][0][0] = gx->analog_state[3][0][1] = gx->analog_state[3][1][0] = gx->analog_state[3][1][1] = 0;
 
  u8 gcpad = PAD_ScanPads();
 
#ifdef HW_RVL
  WPAD_ReadPending(WPAD_CHAN_ALL, NULL);
#endif
 
  for (unsigned port = 0; port < MAX_PADS; port++)
  {
      uint32_t down = 0;
      uint64_t *state_cur = &gx->pad_state[port];
 
      if (gcpad & (1 << port))
      {
        down = PAD_ButtonsHeld(port);
 
        *state_cur |= (down & PAD_BUTTON_A) ? (1ULL << GX_GC_A) : 0;
        *state_cur |= (down & PAD_BUTTON_B) ? (1ULL << GX_GC_B) : 0;
        *state_cur |= (down & PAD_BUTTON_X) ? (1ULL << GX_GC_X) : 0;
        *state_cur |= (down & PAD_BUTTON_Y) ? (1ULL << GX_GC_Y) : 0;
        *state_cur |= (down & PAD_BUTTON_UP) ? (1ULL << GX_GC_UP) : 0;
        *state_cur |= (down & PAD_BUTTON_DOWN) ? (1ULL << GX_GC_DOWN) : 0;
        *state_cur |= (down & PAD_BUTTON_LEFT) ? (1ULL << GX_GC_LEFT) : 0;
        *state_cur |= (down & PAD_BUTTON_RIGHT) ? (1ULL << GX_GC_RIGHT) : 0;
        *state_cur |= (down & PAD_BUTTON_START) ? (1ULL << GX_GC_START) : 0;
        *state_cur |= (down & PAD_TRIGGER_Z) ? (1ULL << GX_GC_Z_TRIGGER) : 0;
        *state_cur |= ((down & PAD_TRIGGER_L) || PAD_TriggerL(port) > 127) ? (1ULL << GX_GC_L_TRIGGER) : 0;
        *state_cur |= ((down & PAD_TRIGGER_R) || PAD_TriggerR(port) > 127) ? (1ULL << GX_GC_R_TRIGGER) : 0;
 
        int16_t ls_x = (int16_t)PAD_StickX(port) * 256;
        int16_t ls_y = (int16_t)PAD_StickY(port) * -256;
        int16_t rs_x = (int16_t)PAD_SubStickX(port) * 256;
        int16_t rs_y = (int16_t)PAD_SubStickY(port) * -256;
 
        gx->analog_state[port][RETRO_DEVICE_INDEX_ANALOG_LEFT][RETRO_DEVICE_ID_ANALOG_X] = ls_x;
        gx->analog_state[port][RETRO_DEVICE_INDEX_ANALOG_LEFT][RETRO_DEVICE_ID_ANALOG_Y] = ls_y;
        gx->analog_state[port][RETRO_DEVICE_INDEX_ANALOG_RIGHT][RETRO_DEVICE_ID_ANALOG_X] = rs_x;
        gx->analog_state[port][RETRO_DEVICE_INDEX_ANALOG_RIGHT][RETRO_DEVICE_ID_ANALOG_Y] = rs_y;
 
        const uint64_t menu_combo = (1ULL << GX_GC_START) | (1ULL << GX_GC_Z_TRIGGER) | (1ULL << GX_GC_L_TRIGGER) | (1ULL << GX_GC_R_TRIGGER);
        if ((*state_cur & menu_combo) == menu_combo)
            *state_cur |= (1ULL << GX_WIIMOTE_HOME);
 
        if (g_settings.input.autodetect_enable)
        {
            if (strcmp(g_settings.input.device_names[port], "Gamecube Controller") != 0)
              gx_input_set_keybinds(NULL, DEVICE_GAMECUBE, port, 0, (1ULL << KEYBINDS_ACTION_SET_DEFAULT_BINDS));
        }
      }
 
#ifdef HW_RVL
      uint32_t ptype = 0;
      uint32_t connected = WPAD_Probe(port, &ptype);
     
      if (connected == WPAD_ERR_NONE)
      {
        WPADData *wpaddata = WPAD_Data(port);
 
        down = wpaddata->btns_h;
 
        expansion_t *exp = &wpaddata->exp;
 
        *state_cur |= (down & WPAD_BUTTON_A) ? (1ULL << GX_WIIMOTE_A) : 0;
        *state_cur |= (down & WPAD_BUTTON_B) ? (1ULL << GX_WIIMOTE_B) : 0;
        *state_cur |= (down & WPAD_BUTTON_1) ? (1ULL << GX_WIIMOTE_1) : 0;
        *state_cur |= (down & WPAD_BUTTON_2) ? (1ULL << GX_WIIMOTE_2) : 0;
        *state_cur |= (down & WPAD_BUTTON_PLUS) ? (1ULL << GX_WIIMOTE_PLUS) : 0;
        *state_cur |= (down & WPAD_BUTTON_MINUS) ? (1ULL << GX_WIIMOTE_MINUS) : 0;
        *state_cur |= (down & WPAD_BUTTON_HOME) ? (1ULL << GX_WIIMOTE_HOME) : 0;
 
        if (ptype != WPAD_EXP_NUNCHUK)
        {
            // rotated d-pad on Wiimote
            *state_cur |= (down & WPAD_BUTTON_UP) ? (1ULL << GX_WIIMOTE_LEFT) : 0;
            *state_cur |= (down & WPAD_BUTTON_DOWN) ? (1ULL << GX_WIIMOTE_RIGHT) : 0;
            *state_cur |= (down & WPAD_BUTTON_LEFT) ? (1ULL << GX_WIIMOTE_DOWN) : 0;
            *state_cur |= (down & WPAD_BUTTON_RIGHT) ? (1ULL << GX_WIIMOTE_UP) : 0;
        }
 
        if (ptype == WPAD_EXP_CLASSIC)
        {
            *state_cur |= (down & WPAD_CLASSIC_BUTTON_A) ? (1ULL << GX_CLASSIC_A) : 0;
            *state_cur |= (down & WPAD_CLASSIC_BUTTON_B) ? (1ULL << GX_CLASSIC_B) : 0;
            *state_cur |= (down & WPAD_CLASSIC_BUTTON_X) ? (1ULL << GX_CLASSIC_X) : 0;
            *state_cur |= (down & WPAD_CLASSIC_BUTTON_Y) ? (1ULL << GX_CLASSIC_Y) : 0;
            *state_cur |= (down & WPAD_CLASSIC_BUTTON_UP) ? (1ULL << GX_CLASSIC_UP) : 0;
            *state_cur |= (down & WPAD_CLASSIC_BUTTON_DOWN) ? (1ULL << GX_CLASSIC_DOWN) : 0;
            *state_cur |= (down & WPAD_CLASSIC_BUTTON_LEFT) ? (1ULL << GX_CLASSIC_LEFT) : 0;
            *state_cur |= (down & WPAD_CLASSIC_BUTTON_RIGHT) ? (1ULL << GX_CLASSIC_RIGHT) : 0;
            *state_cur |= (down & WPAD_CLASSIC_BUTTON_PLUS) ? (1ULL << GX_CLASSIC_PLUS) : 0;
            *state_cur |= (down & WPAD_CLASSIC_BUTTON_MINUS) ? (1ULL << GX_CLASSIC_MINUS) : 0;
            *state_cur |= (down & WPAD_CLASSIC_BUTTON_HOME) ? (1ULL << GX_CLASSIC_HOME) : 0;
            *state_cur |= (down & WPAD_CLASSIC_BUTTON_FULL_L) ? (1ULL << GX_CLASSIC_L_TRIGGER) : 0;
            *state_cur |= (down & WPAD_CLASSIC_BUTTON_FULL_R) ? (1ULL << GX_CLASSIC_R_TRIGGER) : 0;
            *state_cur |= (down & WPAD_CLASSIC_BUTTON_ZL) ? (1ULL << GX_CLASSIC_ZL_TRIGGER) : 0;
            *state_cur |= (down & WPAD_CLASSIC_BUTTON_ZR) ? (1ULL << GX_CLASSIC_ZR_TRIGGER) : 0;
 
            float ljs_mag = exp->classic.ljs.mag;
            float ljs_ang = exp->classic.ljs.ang;
 
            float rjs_mag = exp->classic.rjs.mag;
            float rjs_ang = exp->classic.rjs.ang;
 
            if (ljs_mag > 1.0f)
              ljs_mag = 1.0f;
            else if (ljs_mag < -1.0f)
              ljs_mag = -1.0f;
 
            if (rjs_mag > 1.0f)
              rjs_mag = 1.0f;
            else if (rjs_mag < -1.0f)
              rjs_mag = -1.0f;
 
            double ljs_val_x = ljs_mag * sin(M_PI * ljs_ang / 180.0);
            double ljs_val_y = -ljs_mag * cos(M_PI * ljs_ang / 180.0);
 
            double rjs_val_x = rjs_mag * sin(M_PI * rjs_ang / 180.0);
            double rjs_val_y = -rjs_mag * cos(M_PI * rjs_ang / 180.0);
 
            int16_t ls_x = (int16_t)(ljs_val_x * 32767.0f);
            int16_t ls_y = (int16_t)(ljs_val_y * 32767.0f);
 
            int16_t rs_x = (int16_t)(rjs_val_x * 32767.0f);
            int16_t rs_y = (int16_t)(rjs_val_y * 32767.0f);
 
            gx->analog_state[port][RETRO_DEVICE_INDEX_ANALOG_LEFT][RETRO_DEVICE_ID_ANALOG_X] = ls_x;
            gx->analog_state[port][RETRO_DEVICE_INDEX_ANALOG_LEFT][RETRO_DEVICE_ID_ANALOG_Y] = ls_y;
            gx->analog_state[port][RETRO_DEVICE_INDEX_ANALOG_RIGHT][RETRO_DEVICE_ID_ANALOG_X] = rs_x;
            gx->analog_state[port][RETRO_DEVICE_INDEX_ANALOG_RIGHT][RETRO_DEVICE_ID_ANALOG_Y] = rs_y;
 
            if (g_settings.input.autodetect_enable)
            {
              if (strcmp(g_settings.input.device_names[port], "Classic Controller") != 0)
                  gx_input_set_keybinds(NULL, DEVICE_CLASSIC, port, 0, (1ULL << KEYBINDS_ACTION_SET_DEFAULT_BINDS));
            }
        }
       
        else if (ptype == WPAD_EXP_NUNCHUK)
        {
            // wiimote is held upright with nunchuk, do not change d-pad orientation
            *state_cur |= (down & WPAD_BUTTON_UP) ? (1ULL << GX_WIIMOTE_UP) : 0;
            *state_cur |= (down & WPAD_BUTTON_DOWN) ? (1ULL << GX_WIIMOTE_DOWN) : 0;
            *state_cur |= (down & WPAD_BUTTON_LEFT) ? (1ULL << GX_WIIMOTE_LEFT) : 0;
            *state_cur |= (down & WPAD_BUTTON_RIGHT) ? (1ULL << GX_WIIMOTE_RIGHT) : 0;
 
            *state_cur |= (down & WPAD_NUNCHUK_BUTTON_Z) ? (1ULL << GX_NUNCHUK_Z) : 0;
            *state_cur |= (down & WPAD_NUNCHUK_BUTTON_C) ? (1ULL << GX_NUNCHUK_C) : 0;
 
            float js_mag = exp->nunchuk.js.mag;
            float js_ang = exp->nunchuk.js.ang;
 
            if (js_mag > 1.0f)
              js_mag = 1.0f;
            else if (js_mag < -1.0f)
              js_mag = -1.0f;
 
            double js_val_x = js_mag * sin(M_PI * js_ang / 180.0);
            double js_val_y = -js_mag * cos(M_PI * js_ang / 180.0);
 
            int16_t x = (int16_t)(js_val_x * 32767.0f);
            int16_t y = (int16_t)(js_val_y * 32767.0f);
 
            gx->analog_state[port][RETRO_DEVICE_INDEX_ANALOG_LEFT][RETRO_DEVICE_ID_ANALOG_X] = x;
            gx->analog_state[port][RETRO_DEVICE_INDEX_ANALOG_LEFT][RETRO_DEVICE_ID_ANALOG_Y] = y;
 
            if (g_settings.input.autodetect_enable)
            {
              if (strcmp(g_settings.input.device_names[port], "Wiimote + Nunchuk") != 0)
                  gx_input_set_keybinds(NULL, DEVICE_NUNCHUK, port, 0, (1ULL << KEYBINDS_ACTION_SET_DEFAULT_BINDS));
            }
        }
        else
        {
            //no attachment, assume standalone Wiimote
            if (g_settings.input.autodetect_enable)
            {
              if (strcmp(g_settings.input.device_names[port], "Wiimote") != 0)
                  gx_input_set_keybinds(NULL, DEVICE_WIIMOTE, port, 0, (1ULL << KEYBINDS_ACTION_SET_DEFAULT_BINDS));
            }
        }
      }
 
      for (int i = 0; i < 2; i++)
        for (int j = 0; j < 2; j++)
            if (gx->analog_state[port][i][j] == -0x8000)
              gx->analog_state[port][i][j] = -0x7fff;
#endif
  }
 
  uint64_t *state_p1 = &gx->pad_state[0];
  uint64_t *lifecycle_state = &g_extern.lifecycle_state;
 
  *lifecycle_state &= ~((1ULL << RARCH_MENU_TOGGLE));
 
  if (g_menu)
  {
      *state_p1 |= (1ULL << GX_WIIMOTE_HOME);
      g_menu = false;
  }
 
  if (*state_p1 & ((1ULL << GX_WIIMOTE_HOME)
#ifdef HW_RVL
            | (1ULL << GX_CLASSIC_HOME)
#endif
            ))
      *lifecycle_state |= (1ULL << RARCH_MENU_TOGGLE);
}

It might not fix the reported issue (which by the way I never encoutered myself... so much for questioning my motivation of helping you) but it's cleaner this way.

Now please do not turn up the situation like you always seem to do, YOU were the one coming here publically attacking people who haven't done or said anything against you, you should at least expect some reaction and deal wit it, instead of being so over defensive everytime someone criticizes your work.

I sure don't feel superior to anybody (far from it) and from what I remember, none of the Wii devs you have been attacking ever appeared that way, they are all nice people who were always very helpful when asked kindly so I am not sure why you feel the need to bash them now (especially when they basically left that scene years ago and aren't probably aware of these problems you are having) or painting them like gods or gurus who feel superior to lame users. Again, if you have an inferiority complex, deal with it but do not put it on other people who never asked you anything.

https://github.com/libretro/RetroArch/commit/2c7c24b45202b5cee70620489df743442a1eca1b

Pushed.

If this fixes people's problems and I don't have to hear anymore about this issue then more power to you.
 

mightymuffy

fatbaldpieeater
Member
Joined
Nov 6, 2002
Messages
1,983
Trophies
3
Age
48
Location
Land o't pies
XP
3,273
Country
United Kingdom
Aaaanyway, back to the program in question! Just tried it out on both a PAL Wii and PAL Wii U, and I've gotta say it's absolutely fantastic! Especially on Wii U (via hdmi, though it's almost as impressive on the GamePad): it makes a complete mockery of the VC games I purchased on that over xmas! It's embarrassing actually....:lol:
VBA in particular is a superb update, and speed is a real eye opener.... I'm going round updating all my friends & families Wii setup with this over the weekend just for this.
No 50hz problems with NES games here by the way, and SMWorld was fine before and after I customised the resolution...
Obviously I didn't bother with the fba core.

Clearly the pros outweigh any cons on this update, great work SP and the rest!
 

Hielkenator

Well-Known Member
Member
Joined
Feb 7, 2010
Messages
4,210
Trophies
0
XP
679
Country
Netherlands
Were are RA's video settings handled?

If anyone can help, please do!

Wii is pal, component 480p.

Roms are NTSCU.

Yet when I load them in any of the 8 bit cores, they are displayed a 50 fps.
fcue, nestopia, quicknes
It makes no sense to me as I allready, did a clean nand install.
Did a sd card format, reinstalled RA 0.9.9 ( wich worked fine before )
Still same problem....

Ra starts out at 59,9~60 fps and drops after asecond to 50~52 fps.

Really have no cleu how this could happen..
What could have caused this problem?
Any help appreciated!

EDIT: I'll try to set my Wii video output to NTSC, just to see what happens..
 

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
Were are RA's video settings handled?

If anyone can help, please do!

Wii is pal, component 480p.

Roms are NTSCU.

Yet when I load them in any of the 8 bit cores, they are displayed a 50 fps.
fcue, nestopia, quicknes
It makes no sense to me as I allready, did a clean nand install.
Did a sd card format, reinstalled RA 0.9.9 ( wich worked fine before )
Still same problem....

Ra starts out at 59,9~60 fps and drops after asecond to 50~52 fps.

Really have no cleu how this could happen..
What could have caused this problem?
Any help appreciated!

EDIT: I'll try to set my Wii video output to NTSC, just to see what happens..


I'm just wondering why they're running 20% on your end, it's baffling indeed, as my run full speed but let us know how changing the video mode to NSTC works.
 

MassiveRican

GBATemp's Unofficial Vigilante
Member
Joined
Aug 2, 2011
Messages
2,454
Trophies
1
Location
Creeping in the Shadows
XP
1,190
Country
Jacobeian thanks man. Regardless of all the frustration amongst many of us here between user 2 user, dev 2 user and user 2 dev, it shows u care enough to help, since this benefits us, the end user the most.
LibretroRetroArc bro there's a lot of love for you here, mostly from gamers & nerds and I think it couldn't have been said any better here
Retroarch is probably the last project that came to the Wii worth having and worth following.
At the moment it's all I care about in gaming, passionately.
Checking this thread almost everyday.
Doesn't that mean/ tells anything to you?
I can imagine maintaining your workload since I've had to deal with several projects under my lead with over 5 groups of 20+ people and it can be overwhelming, even more kudos to u since what I can't imagine is doing it for free. Listen, you and your team are doing something amazing, beyond Wii, Android, PC, iOS, GC, Pi ports and all that. It really is a masterpiece which is trying to integrate everything into one simple way for people to just code what they want and have it work across all platforms. I don't expect anything from u guys, you do it cuz u want to, like u said, cuz it's important to you, to maintain your integrity and high standards, to keep things open, RetroArch is like a stand for morality u know lol.

Everything you do here is important to us, and I get it man, it's frustrating as fuck to work as much as u do and feel like u get shit for it, and u feel we expect u and u alone to fix all that is wrong with our little port and that u get no help from senior devs of the scene when things get hairy or maybe out of your comfort zone since it's not something your used to dealing with. Unfortunately most of the devs left that could help don't cuz they're gone, moved onto something else or straight up just don't want to help, but again I couldn't have said it better than this;
Accept the positives as well as the negatives?
If I tell you I am experiencing problems with RA, I'm not trying to bash your work or being ungrateful.
It's that part of me wishing to get the best, wishing I could code like that.
Trying to enjoy what is left of my life.

Nothing but respect really.
Your the man here Lib, the ball is in your court all the time, you prove yourself to be a man of your word, when proven wrong you commit, you lay it all down on the table and you emotionally show everything at face value here, it's something to be appreciated and the same time, too strong for some of us. I respect you and all devs really, I have an extremely low level understanding of what you guys go through in a dedicated open source community, so I can't put myself in your shoes, but "dev scene" aside can you put yourself in ours? I believe those of us that are still here are not being ungrateful, we're reporting our experiences with your wonderful program, if you can take the time to look at it and fix it at your own leisure, wonderful if not and your priorities lie elsewhere, so be it. We appreciate whatever you can hand down to what's really an inferior console in ram/memory at least. Maybe we need a lesson in civility, what would help you see us in a better light and relieve some of the personal resentment? If reporting bugs in your repo is what you would prefer, rather then feel we're putting RA down, then absolutely, I'm sure most of us senior members can do that.

I hope that for 2014, a new year being here, we leave all the transgression and bullshit aside, start off fresh with some form of respectable progress not just amongst RA but amongst our relations as well. Please don't be angry with us, we wish we could help, but ultimately we can't and that's where our frustrations lie cuz we love RA, it's just a bunch of groupies and cheerleaders here man lol, myself included of course. Maybe with Jacobeian's patch the people who experience issues with their controllers will now be gone, if not then whatever on to the next fix, or not. I'll take it for whatever it is. I look at your blog and see amazing strides in progress, and I wish nothing but the best for all of you this year.

Sorry for the rant, now on to the gaming.
EDIT: Shitload of grammatical errors... and they persist. AHHHHHH! SO MUCH PASSION FROM ALL SIDES XD WE LOVE THIS SHIT!!!
 

NekoKat

Well-Known Member
Newcomer
Joined
Oct 18, 2013
Messages
87
Trophies
0
Age
34
XP
169
Country
Mexico
I'd just like to say, I hope this isn't the end or anything like that for this magnificent project...

Other projects I won't mention are pretty much vaporware at this point, I collectibelly call them "Homebrew Forever"...

This project, however, amazes me. The hiccups are minor, the cores work for most games (I updated tonewest version but kept the previous version's FBA and FBA CPS1 cores since those worked for me perfectly), it's a magnifecent blast from the past, nothing beats the feeling of having friends over and playing 4-player TMNT arcades, Sunset Riders, DarkStalkers...

I love seeing VBA improve, Boktai lag issues for example are a HUGE improvement, and I salute you for that!

This scene, though, in hindsight, depresses me after reading the last few pages, knowing how alive it remains in older consoles like the DreamCast, or even the Vectrex and Colecovision!

But this project is the ray of light on that. And I'll keep an eye on it.
 

LWares87

Well-Known Member
Member
Joined
Oct 19, 2008
Messages
1,706
Trophies
0
Location
Colchester, England
XP
565
Country
United Kingdom
I'll be honest and say that nowadays, i use my own Wii console to use RetroArch to play the old classics from long ago. I even use the forwarder in this thread for easy access, as well from the Wii Menu. :)
 
  • Like
Reactions: Hielkenator

Hielkenator

Well-Known Member
Member
Joined
Feb 7, 2010
Messages
4,210
Trophies
0
XP
679
Country
Netherlands
I'm just wondering why they're running 20% on your end, it's baffling indeed, as my run full speed but let us know how changing the video mode to NSTC works.

I'm baffles also as the standalone fceu gx can run the same roms at proper speeds.
I allready region chaged my Wii, even that did not fix it.
Then I thought of the naming convention (U).nes, but that did not matter also..

Could there be a problem concering folder structure?

Right now the rom folder is buried deep like this:

usb:\ROMS\Retroarch compatible\Nintendo 8-bit\ Engels talig (E) en (U)\ .roms

I remember changing that a while ago....alongside my romset.
 

Hielkenator

Well-Known Member
Member
Joined
Feb 7, 2010
Messages
4,210
Trophies
0
XP
679
Country
Netherlands
  • Like
Reactions: LWares87

Charco

Well-Known Member
Member
Joined
Nov 5, 2012
Messages
288
Trophies
1
XP
873
Country
Are there any video options toggled on that should be set to off, like the rewind option? Should be fine on an NES core but I know it caused serious slowdown for me in the past on Megadrive games when I had it on by accident.
 
Status
Not open for further replies.

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    AncientBoi @ AncientBoi: 🫂 +1