Hacking WiiFlow - an open source GUI USB-Loader

  • Thread starter Thread starter zorglub07
  • Start date Start date
  • Views Views 3,099,965
  • Replies Replies 16,228
  • Likes Likes 6
Would it be possible for Wiiflow to have an override where even if neek is set to autoboot something, you can still go to neek system menu though Exit to Neek?
 
Hi !

I don't know why but the coverflow don't change (1/2 buttons) with the last official release 4.2.1.

I use the default theme.

An idea ?
 
hello!
FIX94 can u add gciTOnmm on wiiflow? i have the source of gciTOnmm 0.2, and that feature is awesome directly to loader, for take save from memcard and store it to games folder in NMM format!


code of gciTOnmm 0.2
Code:
// Copyright (C) 2012 tueidj
 
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, version 2.0.
 
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License 2.0 for more details.
 
// A copy of the GPL 2.0 should have been included with the program.
// If not, see http://www.gnu.org/licenses/
 
// Original bugs are faithfully reproduced in this code :p
 
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
 
#ifdef _WIN32
#include <direct.h>
typedef unsigned char uint8_t;
typedef unsigned short uint16_t;
typedef unsigned int uint32_t;
#define mkdir(a, b) _mkdir(a)
#define chdir _chdir
#else
#include <unistd.h>
#include <stdint.h>
#endif
 
#define be16(x) ((((x)>>8)&0xFF)|(((x)<<8))&0xFF00)
#define be32(x) (((x)<<24)|(((x)>>8)&0xFF00)|(((x)<<8)&0xFF0000)|((x)>>24))
 
// names/offsets from dolphin
typedef struct _gcifile
{
    uint32_t Gamecode;              // 00
    uint16_t Makercode;              // 04
    uint8_t pad0;                    // 06
    uint8_t BIFlags;                // 07
    char Filename[32];              // 08
    uint32_t ModTime;                // 28
    uint32_t ImageOffset;            // 2C
    uint16_t IconFmt;                // 30
    uint16_t AnimSpeed;              // 32
    uint8_t Permissions;            // 34
    uint8_t CopyCounter;            // 35
    uint16_t FirstBlock;            // 36
    uint16_t BlockCount;            // 38
    uint16_t pad1;                  // 3A
    uint32_t CommentsAddr;          // 3C
    uint8_t data[0];                // 40
} gcifile;
 
typedef struct CARDStat
{
    // read-only (Set by CARDGetStatus)
/* 0x00 */    char fileName[32];   
/* 0x20 */    uint32_t  length;
/* 0x24 */    uint32_t  time;          // seconds since 01/01/2000 midnight
/* 0x28 */    uint32_t  gameName;
/* 0x2C */    uint16_t  company;
 
    // read/write (Set by CARDGetStatus/CARDSetStatus)
/* 0x2E */    uint8_t  bannerFormat;
/* 0x30 */    uint32_t  iconAddr;      // offset to the banner, bannerTlut, icon, iconTlut data set.
/* 0x34 */    uint16_t  iconFormat;
/* 0x36 */    uint16_t  iconSpeed;
/* 0x38 */    uint32_t  commentAddr;  // offset to the pair of 32 byte character strings.
 
    // read-only (Set by CARDGetStatus)
/* 0x3C */    uint32_t  offsetBanner;
/* 0x40 */    uint32_t  offsetBannerTlut;
/* 0x44 */    uint32_t  offsetIcon[8];
/* 0x64 */    uint32_t  offsetIconTlut;
/* 0x68 */    uint32_t  offsetData;
} CARDStat;
 
static void calc_offsets(CARDStat *card)
{
    int hasTlut = 0;
    int i;
    uint32_t offset = be32(card->iconAddr);
 
    if (card->bannerFormat&1)
    {
        card->offsetBanner = be32(offset);
        offset += 0xC00;
        card->offsetBannerTlut = be32(offset);
        offset += 0x200;
    }
    else
    {
        card->offsetBannerTlut = -1;
        if (card->bannerFormat&2)
        {
            card->offsetBanner = be32(offset);
            offset += 0x1800;
        }
        else
            card->offsetBanner = -1;
    }
 
    for (i=0; i < 8; i++)
    {
        uint16_t flags = (be16(card->iconFormat)>>2*i)&3;
        if (flags&1)
        {
            card->offsetIcon[i] = be32(offset);
            offset += 0x400;
            hasTlut = 1;
        }
        else if (flags&2)
        {
            card->offsetIcon[i] = be32(offset);
            offset += 0x800;
        }
        else
            card->offsetIcon[i] = -1;
    }
   
    if (hasTlut)
    {
        card->offsetIconTlut = be32(offset);
        offset += 0x200;
    }
    else
        card->offsetIconTlut = -1;
 
    card->offsetData = be32(offset);
}
 
int main(int argc, char **argv)
{
    FILE *f;
    size_t i;
    gcifile *gci;
    CARDStat cstat;
 
    printf("gci2nmm v0.1b by tueidj\n");
    printf("Built: " __TIME__ " " __DATE__ "\n");
    printf("Copyright 2012 tueidj <[email protected]>\n"
          "Licensed under the terms of the GNU GPL, version 2\n"
          "http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt\n\n");
 
    if (argc < 2)
    {
        printf("Usage:\n gci2nmm.exe save.gci\n");
        return -1;
    }
 
    f = fopen(argv[1], "rb");
    if (f==NULL)
    {
        printf("Failed to open:\"%s\"\n", argv[1]);
        perror("");
        return -1;
    }
   
    fseek(f, 0, SEEK_END);
    i = ftell(f);
    gci = (gcifile*)malloc(i);
    fseek(f, 0, SEEK_SET);
    fread(gci, 1, i, f);
    fclose(f);
 
    if (be16(gci->BlockCount)*0x2000 + 0x40 != i)
    {
        printf("This doesn't seem to be a valid gci file\n");
        printf("Size mismatch, expected %u, file is %u\n", i, be16(gci->BlockCount)*0x2000 + 0x40);
        free(gci);
        return -2;
    }
 
    printf("GameID:%.4s\n", &gci->Gamecode);
    printf("Blocks:%u Size:0x%x\n", be16(gci->BlockCount), be16(gci->BlockCount)*0x2000);
    printf("FileName:%s\n", gci->Filename);
 
    gci->pad0 = '\0';
    mkdir((char*)&gci->Gamecode, 0777);
    chdir((char*)&gci->Gamecode);
 
    f = fopen(gci->Filename, "wb");
    fwrite(gci->data, 1, be16(gci->BlockCount)*0x2000, f);
    fclose(f);
 
    f = fopen("stats.bin", "wb");
    if (f==NULL)
    {
        printf("Failed to create:\"stats.bin\"\n");
        perror("");
        free(gci);
        return -3;
    }
 
    memset(&cstat, 0, sizeof(cstat));
    for (i=0; i < 128; i++)
        fwrite(&cstat, sizeof(cstat), 1, f);
 
    memcpy(cstat.fileName, gci->Filename, 32);
    cstat.length = be32(be16(gci->BlockCount)*0x2000);
    cstat.time = gci->ModTime;
    cstat.gameName = gci->Gamecode;
    cstat.company = gci->Makercode;
    cstat.bannerFormat = gci->BIFlags;
    cstat.iconAddr = gci->ImageOffset;
    cstat.iconFormat = gci->IconFmt;
    cstat.iconSpeed = gci->AnimSpeed;
    cstat.commentAddr = gci->CommentsAddr;
    calc_offsets(&cstat);
 
    fseek(f, 0, SEEK_SET);
    fwrite(&cstat, sizeof(cstat), 1, f);
    fclose(f);
 
    return 0;
}
 
Hi !

I don't know why but the coverflow don't change (1/2 buttons) with the last official release 4.2.1.

I use the default theme.

An idea ?
Yes it's because there is no default.ini in the themes folder to change coverflows. You can pick one up from abz masterpack extracted folder.

EDIT: Hooray we're back!! Hiya WiiFlow'ers!
 
  • Like
Reactions: spacepimp
wiiflow4.1.2
starting GameCube games from DVD backup everything ok
immediately after starting a game from SD
always starts
GameCube Backup Loader v1.1

R1055 all ok
can be remedied
thanks
 
wiiflow4.1.2
starting GameCube games from DVD backup everything ok
immediately after starting a game from SD
always starts
GameCube Backup Loader v1.1

R1055 all ok
can be remedied
thanks
are you saying that loading GC games from an SD don't work? Or that if WiiFlow is on SD and you want to launch a burned GC DVD backup, that the game does not load?
 
are you saying that loading GC games from an SD don't work? Or that if WiiFlow is on SD and you want to launch a burned GC DVD backup, that the game does not load?

wiiflow folders are the HD in FAT32
start a game from the GameCube Backup DVD everything ok
immediately after start a game from the SD
always starts
GameCube Backup Loader v1.1
 
wiiflow folders are the HD in FAT32
start a game from the GameCube Backup DVD everything ok
immediately after start a game from the SD
always starts
GameCube Backup Loader v1.1
Sounds like it's installing the cMIOS to be able to run the DVD-R GC backup but then not re-installing DML in order to run the GC game from SD.
 
I'm sure many are aware, but it's new to me - at emumovies.com, There's a shedload large database of in-game footage for use with PC game-launcher frontends, such as hyperspin. If wiiflow could display the video, i believe it's MP4, or even a conversion of them -

there's an existing set of emulator per-game banners.

In fact they're better than banners, because they actually show you footage from the game!

In game footage in action from about 3.30 :



EDIT: It's good to see wiiflow is way ahead of the game:)
Although I like the idea of specifically showing detail of the controller when selecting 'sources' - maybe an idea for the full cover set?
 
  • Like
Reactions: Th3-Blu3BoMb3r
implementing this into wiiflow sounds awesome. FIX94 from the point of development, is it even possible for this much stuff? i know the wii has a tiny bit of RAM available.

im of course not asking you to do it, just if its technically even possible :wink:
 
  • Like
Reactions: Th3-Blu3BoMb3r

Site & Scene News

Popular threads in this forum