Hacking DevolutionCCBR - Remapped Classic Controller buttons small mod

  • Thread starter Cisz
  • Start date
  • Views 9,031
  • Replies 20
  • Likes 3

Cisz

Active Member
OP
Newcomer
Joined
Aug 3, 2013
Messages
34
Trophies
0
XP
164
Country
Hi!
I found it a bit of a mindwarp having to the B button on the Wii CC controller when the GC game prompted me to press the A button so I wanted to change that. Luckily tueidj added a flag to the Devolution Engine to allow just the buttons to be mapped in accordance with the button letters. This is my first time compiling something for Wii. I hope this mod will be useful for those who can't compile on their own.

This Devolution mod, DevolutionCCBR, is just a slight mod of the original, with Wiimote and Classic Controller buttons remapped to always match their letters. For example, if it says "press A" on the screen, you press A on the classic Controller. Same thing the other letter buttons i.e. B=B, X=X and Y=Y. I also added some instructions on how to use Classic Controllers for Devolution, which might be useful for new players.

In the zip-file I bundled three versions which you can pick from. One keeps the source prompt but the other two jumps straight to selecting games (from either SD or USB) so if you only load games from one location you can rid of the source prompt.

Download:
http://bit.ly/DevolutionCCBR-r266
Uses Devolution r266 from August 2015


BTW: I tried to add allow for PAL TimeSplitters: Future Perfect to be booted with NTSC signal since doing so I other loaders allow for 480p. When I used the "GXRModeObj-video mode string" that works for NTSC-games, vidmode = &TVNtsc480IntDf;, I just got sound with black screen. Does anyone know what the appropriate "GXRModeObj-video mode string" is for booting a PAL-game with NTSC-signal on PAL-console is? Help much appreciated!
 
Last edited by Cisz,

Maxternal

Peanut Gallery Spokesman
Member
Joined
Nov 15, 2011
Messages
5,210
Trophies
0
Age
40
Location
Deep in GBAtemp addiction
Website
gbadev.googlecode.com
XP
1,709
Country
Hate to sound like a whistle blower or anything but could you link the modded open source plz

Mostly I'm just curious since my mod which intended to do the same thing, people were saying it didn't work. I was wondering what you did to make it work differently.
 

Cisz

Active Member
OP
Newcomer
Joined
Aug 3, 2013
Messages
34
Trophies
0
XP
164
Country
Ah, sure! Basically I sent the flag to Devolution Engine through the config-options (which does the trick for games) and switched around values in input.c. Source coming up in a sec!
 

Cisz

Active Member
OP
Newcomer
Joined
Aug 3, 2013
Messages
34
Trophies
0
XP
164
Country
Hate to sound like a whistle blower or anything but could you link the modded open source plz

Mostly I'm just curious since my mod which intended to do the same thing, people were saying it didn't work. I was wondering what you did to make it work differently.
Right, source code is included in the zip-file now. Thanks for calling it out! :)
 

Cyan

GBATemp's lurking knight
Former Staff
Joined
Oct 27, 2002
Messages
23,749
Trophies
4
Age
45
Location
Engine room, learning
XP
15,648
Country
France
BTW: I tried to add allow for PAL TimeSplitters: Future Perfect to be booted with NTSC signal since doing so I other loaders allow for 480p. When I used the "GXRModeObj-video mode string" that works for NTSC-games, vidmode = &TVNtsc480IntDf;, I just got sound with black screen. Does anyone know what the appropriate "GXRModeObj-video mode string" is for booting a PAL-game with NTSC-signal on PAL-console is? Help much appreciated!
PAL game on PAL console, but you want NTSC Signal?
Did you try to set the Video_Mode to VI_NTSC ?

Code:
#define	 Video_Mode		((vu32*) 0x800000CC)
static u32 rmode_reg = VI_NTSC; // VI_NTSC, VI_PAL, VI_MPAL, VI_EURGB60
GXRModeObj *rmode = &TVNtsc480IntDf;

/* Set video mode register */
*Video_Mode = rmode_reg;
DCFlushRange((void *) Video_Mode, 4);

/* configure video mode */
// VIDEO_Configure(rmode); // libogc video init
initialize(rmode); //Devolution's video init
Maybe you should try to set rmode_reg to VI_PAL and rmode to NTSC, to display NTSC on PAL console.

Tueidj said to not select a different video mode, and not force video mode at all.
But you can try if it fix your game display. It might result in lags and slowdowns.
Old revisions of USBLoaderGX allowed user to set different video modes, and users suffered from lags when not using the video mode matching the game's region.


The rmode_reg is also included in (rmode->viTVMode&0x0003), you might want to use a video mode matching the TV Signal you need.

There's also Sram Flags to set NTSC/PAL and 50/60Hz, but I don't know if GameCube games are really checking these flags.
I modded a version of usbGX to add Sram patcher, and two testers said it didn't have any effect with devolution. but some games even ignore the language flag, while it works fine with DIOS MIOS, maybe devolution prevent the game from reading sram correctly.

I'm currently working on video mode, you can send me a PM if you want to test something with USBGX and video mode or sram.
 

Cisz

Active Member
OP
Newcomer
Joined
Aug 3, 2013
Messages
34
Trophies
0
XP
164
Country
Thanks for the info, Cyan. I don't really know how Video Mode setup works in Wii programming so I didn't really know where to put the parts of the code that you posted here. The attempts I made didn't work. I've also tried looking at how GeckoOS does it, because that can boot PAL TimeSplittersFP in 480P. In GeckoOS I would just force NTSC. I don't have time to learn how everything works, so unless it is a quick fix I think I might just leave it, and from what I could tell they used SRAM patching which is to hard for me to work into Devolution...

Code relating Video Mode to in Devolution:
Code:
// this is where Devolution looks for the config struct
static gconfig *DEVO_CONFIG = (gconfig*)0x80000020;
 
// basic video setup, nothing special here
static void initialize(GXRModeObj *rmode)
{
    static void *xfb = NULL;
 
    if (xfb)
        free(MEM_K1_TO_K0(xfb));
 
    xfb = SYS_AllocateFramebuffer(rmode);
    VIDEO_ClearFrameBuffer(rmode, xfb, COLOR_BLACK);
    xfb = MEM_K0_TO_K1(xfb);
    console_init(xfb,20,20,rmode->fbWidth,rmode->xfbHeight,rmode->fbWidth*VI_DISPLAY_PIX_SZ);
    VIDEO_Configure(rmode);
    VIDEO_SetNextFramebuffer(xfb);
    VIDEO_SetBlack(FALSE);
    VIDEO_Flush();
    VIDEO_WaitVSync();
    VIDEO_WaitVSync();
}
And further down, in main()
Code:
int main(int argc, char **argv)
{
    GXRModeObj *rmode, *vidmode;
    int real_memcard;
    s32 card_sector_size, card_size;
 
// Enable for USB gecko logging
//    CON_EnableGecko(1, 1);
 
    VIDEO_Init();
 
    rmode = VIDEO_GetPreferredMode(NULL);
 
    initialize(rmode);
[continued...]
Further down in main() when launching game
Code:
        else //This happens when Devolution launches a PAL game
        {
            vidmode = &TVPal528IntDf;
        }
    }
 
    // make sure we loaded an ISO successfully
    if (read32(0))
    {
        input_shutdown();
        // switch video mode if necessary
        if (vidmode != rmode)
        {
            printf("Switching video mode...\n");
            rmode = vidmode;
            initialize(rmode);
        }
        // Go!
        LAUNCH();
        printf("What!? Devolution engine failed to launch.\n");
        input_startup();
    }
 

Cyan

GBATemp's lurking knight
Former Staff
Joined
Oct 27, 2002
Messages
23,749
Trophies
4
Age
45
Location
Engine room, learning
XP
15,648
Country
France
Devolution sets the video mode based on the game region found in GameID.
If it's USA or JPN, it sets &TVNtsc480IntDf, otherwise it's using &TVPal528IntDf.

There are three PAL progressive mode available.
You can try to set the PAL video mode to either: TVEurgb60Hz480Prog, TVEurgb60Hz480ProgSoft or TVEurgb60Hz480ProgAa.
There's no certitude that it will work, but you can try.
 

Cisz

Active Member
OP
Newcomer
Joined
Aug 3, 2013
Messages
34
Trophies
0
XP
164
Country
Devolution sets the video mode based on the game region found in GameID.
If it's USA or JPN, it sets &TVNtsc480IntDf, otherwise it's using &TVPal528IntDf.

There are three PAL progressive mode available.
You can try to set the PAL video mode to either: TVEurgb60Hz480Prog, TVEurgb60Hz480ProgSoft or TVEurgb60Hz480ProgAa.
There's no certitude that it will work, but you can try.
I have identified when gameID=G3FP and that is when I prompt the user if he wants to launch as NTSC. I tried now to set vidmode = &TVEurgb60Hz480Prog; and vidmode = &TVEurgb60Hz480Prog; but neither worked. They just launched the game as PAL and sent me to the 50Hz/60Hz-prompt screen.
 

Cyan

GBATemp's lurking knight
Former Staff
Joined
Oct 27, 2002
Messages
23,749
Trophies
4
Age
45
Location
Engine room, learning
XP
15,648
Country
France
The wiki says it set to 480p if NTSC signal is detected, I don't know why it didn't work when you tested that.
Did you try to set NTSC480intDf only for all games ? (it's the faster way to mod it and test).

replace
Code:
	if ((read32(0)&0xFF)=='E' || (read32(0)&0xFF)=='J')
		vidmode = &TVNtsc480IntDf;
	else
		vidmode = &TVPal528IntDf;
by just :
vidmode = &TVNtsc480IntDf;


You can also try to launch a game using USBloaderGX + DM(L) + Video mode : force 480p + DML Video mode : use game's setting.
It will set the "Progressive" flag in Sram. (the one used by the console to remember if you already played a progressive game once, and use it automatically next time you play a compatible game).
And as said on the wiki, games should use progressive automatically if your wii is in 480p, but I guess it's only when using MIOS.
 

Cisz

Active Member
OP
Newcomer
Joined
Aug 3, 2013
Messages
34
Trophies
0
XP
164
Country
That worked with USBLoaderGX!

Well I had already fixed so that it launched the game with vidmode = &TVNtsc480IntDf; for the right game by checking the ID, so that wasn't the problem :)

Code:
Code:
    // set the video mode based on the ISO's region
    // DO NOT SKIP THIS STEP OR TRY TO FORCE A DIFFERENT MODE
    // if you don't use the native video mode the game will probably complain
    if ((read32(0)&0xFF)=='E' || (read32(0)&0xFF)=='J')
    {
        vidmode = &TVNtsc480IntDf;
    }
    else
    {
        //TODO: NOT WORKING! Offer choice of video mode for 480p compatible games e.g. PAL TimeSplitters (G3FB)
        if ((read32(0)&0xFFFFFFFF)==0x47334650)
        {
            printf("Press A for 576i/480i or B for 480p/480i\n");
           
            while (1)
            {
                u32 pressed;
                get_input(NULL, &pressed);
                VIDEO_WaitVSync();
 
                if (pressed & INPUT_BUTTON_OK)
                {
                    vidmode = &TVPal528IntDf;
                    break;
                }
 
                if (pressed & INPUT_BUTTON_CANCEL)
                {
                    vidmode = &TVNtsc480Prog;
                    break;
                }
            }
        }
        else
        {
            vidmode = &TVPal528IntDf;
        }
 

Cyan

GBATemp's lurking knight
Former Staff
Joined
Oct 27, 2002
Messages
23,749
Trophies
4
Age
45
Location
Engine room, learning
XP
15,648
Country
France
what do you want? the button remapping, or the above game in 480p?
if you want the buttons only, there are options in USBLoaders that you can enable to remap each buttons to match their own name. (A=A; B=B, etc.)
Of course you'll have to setup the loader correctly in order to launch the games (put the games in the correct folders which differ from the official loader, etc.)


If you want the patch to run Timesplitter PAL in 480p (which I doubt as you live in USA), it wasn't available as download. It's only a patch he made for himself and provided the changes.
 

Whogie

New Member
Newbie
Joined
Oct 2, 2013
Messages
4
Trophies
0
Age
36
Location
San Francisco Bay Area
XP
94
Country
United States
Since the link is dead, and I wanted button remapping, I figured out how to compile it myself.

1. Download and install devkitPro (devkitProUpdater)
2. Get the source code
3. Unpack and open gc_devo\source\main.c
You'll see the flags listed on the top.

Insert DEVO_CONFIG->options |= CONFIG_D_BUTTONS; in the code under the Wifi flag
ie
Code:
DEVO_CONFIG->options |= CONFIG_WIFILOG; //This was already here
DEVO_CONFIG->options |= CONFIG_D_BUTTONS; //Add this line
Compile by going into command prompt, navigate to the gc_devo folder, and type
Code:
make
It'll produce a boot.dol in the gc_devo folder.
Anyways, here's the one I compiled while it lasts: http://www.fileswap.com/dl/KNUPrwEWgA/
 

Quicksilver88

Well-Known Member
Member
Joined
Jan 26, 2013
Messages
618
Trophies
1
Age
54
XP
753
Country
United States
Hey thanks for the modified version....I prefer the A=A button mapping over the original skewed one. I am using the WiiU pro controller and other than the fact that it has no analogue triggers it feels pretty good as a GC controller.....still love the WaveBird above all else but the pro controller works well.
 

Cisz

Active Member
OP
Newcomer
Joined
Aug 3, 2013
Messages
34
Trophies
0
XP
164
Country
Yeah, for me it felt a bit counter-intuitive to press X when prompted Y. I do love the Gamecube controller but the WaveBird was always to expensive for me. Personally I'm using Interworks golden Classic Controller Pro (which looks just like a WiiU pro controller but has integrated WiiMote) and it works great, with rumble even!
BTW I re-uploaded the old file to the same host as Whogie used so it should be downloadable again.
 

Quicksilver88

Well-Known Member
Member
Joined
Jan 26, 2013
Messages
618
Trophies
1
Age
54
XP
753
Country
United States
What would be really cool (and I PMed the Devolution author to inquire on this, but he didn't respond) is if Devolution would allow custom button mapping and just pull the config from a user modifiable text file. I would really like to be able to reprogram the unused shoulder button to either be a regular button or even a macro string. I always liked being able to use a shoulder button in RPGs to advance the text bubbles as it just makes your thumb hurt to keep pressing A all the time...lol.

I think I said this prior but StarFox Adventures looks fucking incredible up-scaled to 1080p. The fur effects on Fox and the quality of facial animations is really superior to most things done today. Parts of the game are just too easy but overall I think that game was underappreciated back in the day because it has aged incredibly well. From what I understand some of Rare's original people have now started an Indy company and are working on a small scale WiiU title. Some times I just wish Nintendo wasn't so damned conservative with their spending and would do something like fund the old Rare departed to make a new great game.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    ButterScott101 @ ButterScott101: +1