Questions about Qoob SX and iplboot?

ViperGC/Qoob/etc
Post Reply
botman
Posts: 3
Joined: Tue Sep 22, 2020 9:19 am

Questions about Qoob SX and iplboot?

Post by botman » Tue Sep 22, 2020 9:42 am

Hi all,
I have some questions about Qoob SX and iplboot. It would be great if someone could help me.

- Can I still boot swiss off a dvd and different region games after flashing iplboot?
- If iplboot isn't working for some reasons, can I reflash the original Qoob SX bios and try again? If yes, then how?
- What is the right way to flash iplboot to Qoob SX? Are you supposed to boot into swiss and run the "qoob_sx_iplboot_upgrade.dol" file? What is the purpose of the "iplboot_xz.dol" file then?

Any help would be greatly appreciated. Thanks!
User avatar
emu_kidid
Site Admin
Posts: 4927
Joined: Mon Mar 29, 2010 10:06 am
Location: Australia
Contact:

Re: Questions about Qoob SX and iplboot?

Post by emu_kidid » Wed Sep 23, 2020 11:57 pm

botman wrote:
Tue Sep 22, 2020 9:42 am
- Can I still boot swiss off a dvd and different region games after flashing iplboot?
Yes, but you'd need to boot something like Swiss from the SD card using iplboot.
botman wrote:
Tue Sep 22, 2020 9:42 am
- If iplboot isn't working for some reasons, can I reflash the original Qoob SX bios and try again? If yes, then how?
Yes, just boot the official Qoob SX bios .elf using iplboot from a SD card (you might need to use doltool to turn it into a .dol)
botman wrote:
Tue Sep 22, 2020 9:42 am
- What is the right way to flash iplboot to Qoob SX? Are you supposed to boot into swiss and run the "qoob_sx_iplboot_upgrade.dol" file? What is the purpose of the "iplboot_xz.dol" file then?
iplboot_xz.dol is if you're booting it manually from say inside swiss. qoob_sx_iplboot_upgrade.dol is the official Qoob flasher with iplboot embedded so that when you run it, it will flash iplboot instead of the Qoob SX bios.

Please note that iplboot doesn't support SD2SP2 so you'd need a memory card slot based SD adapter.
Image
botman
Posts: 3
Joined: Tue Sep 22, 2020 9:19 am

Re: Questions about Qoob SX and iplboot?

Post by botman » Thu Sep 24, 2020 12:52 pm

Thanks for your reply, emu_kidid. I just watched MVG's video about your N64 cartridge dumper. Love it!

I ran into a problem when I tried to flash iplboot with Swiss. It said "must be booted in flash mode!". I used doltool with "qoob_sx_13c_upgrade.elf" file and it did not work either.
Image
After spending some time googling Qoob SX flash mode, I believe that flash mode can be accessed if you hold DPAD LEFT when booting the console. However when I tried it, Swiss can no longer be booted.
Image
I also found this in the qoob_13c.nfo file:
--------------| NOTE for SX users:

YOU CAN *NOT* BREAK YOUR SX BY FLASHING WRONG FIRMWARE
INTO IT.

The SX has an integrated "backup" bios. You can go
into it by holding the D-Pad to the left (D-pad is
the small digital pad at the lower left of the controller).
Do not boot the disc, you also have to press 'B'.

You *need* to start the upgrader from this bios. This
is done due to protect you from evil applications which
could otherwise erase your bios. Still, the backup
bios is read only and can't be erased.

So there's absolutely no way to kill your SX. If you flash
something else to it, all it would do is to stop
booting until you boot into the recovery bios.

To summarize it:

- Don't panic. You can't break your SX by flashing.
- You can't flash .GCB files, you need the .ELF updaters.
- To flash via DVD, you need to hold "D-Pad-Left" while
booting. Be sure to pad your disc to at least ~1GB of
data!
- To flash via Network, you need to hold "D-Pad-Left"+"B"
while booting. IP address will be 192.168.1.32. There's
no way to change that.
So, it seems like the only way to flash a bios to Qoob SX is either a burned DVD or a BBA. This sucks for me because I don't have a BBA and I have burned more than 10 dvd copies and none of them work (I have to order my Swiss copy from china). This also leads me to question the function of "qoob_sx_iplboot_upgrade.dol" file as you can't use it with Swiss then what is the purpose of it?
User avatar
emu_kidid
Site Admin
Posts: 4927
Joined: Mon Mar 29, 2010 10:06 am
Location: Australia
Contact:

Re: Questions about Qoob SX and iplboot?

Post by emu_kidid » Mon Sep 28, 2020 12:04 am

Ah! I'd completely forgot about that functionality in the Qoob BIOS. How are you booting Swiss now, can you boot a ISO9660 disc with the .dol on it? (Pad it out with other useless junk to fill it to 1GB or so).

If you're having a hard time finding 8cm discs, just as a one off try some 12cm media and attempt this process with the GameCube lid removed and the lid switch held down.
Image
botman
Posts: 3
Joined: Tue Sep 22, 2020 9:19 am

Re: Questions about Qoob SX and iplboot?

Post by botman » Fri Oct 02, 2020 8:18 am

After wasting more money on mini DVD-R from China, I finally could flash iplboot after few tries. Now my GameCube is running Swiss without a disc. I'm so glad.

Thank you for your help!
Undead Sega
Posts: 111
Joined: Sun Jun 14, 2015 7:34 pm

Re: Questions about Qoob SX and iplboot?

Post by Undead Sega » Wed Oct 07, 2020 9:14 pm

I thought you could always flash Swiss onto a Qoob Pro, right?
User avatar
emu_kidid
Site Admin
Posts: 4927
Joined: Mon Mar 29, 2010 10:06 am
Location: Australia
Contact:

Re: Questions about Qoob SX and iplboot?

Post by emu_kidid » Mon Oct 12, 2020 11:28 pm

yes, but he has a Qoob SX
Image
Undead Sega
Posts: 111
Joined: Sun Jun 14, 2015 7:34 pm

Re: Questions about Qoob SX and iplboot?

Post by Undead Sega » Wed Oct 21, 2020 12:55 pm

But doesn't the Qoob SX have the inability to flash new firmware unlike the Pro? :?:
User avatar
emu_kidid
Site Admin
Posts: 4927
Joined: Mon Mar 29, 2010 10:06 am
Location: Australia
Contact:

Re: Questions about Qoob SX and iplboot?

Post by emu_kidid » Thu Oct 22, 2020 1:12 am

Undead Sega wrote:
Wed Oct 21, 2020 12:55 pm
But doesn't the Qoob SX have the inability to flash new firmware unlike the Pro? :?:
Officially it can flash update via a .elf.
Image
Undead Sega
Posts: 111
Joined: Sun Jun 14, 2015 7:34 pm

Re: Questions about Qoob SX and iplboot?

Post by Undead Sega » Mon Nov 09, 2020 2:20 pm

emu_kidid wrote:
Thu Oct 22, 2020 1:12 am
Undead Sega wrote:
Wed Oct 21, 2020 12:55 pm
But doesn't the Qoob SX have the inability to flash new firmware unlike the Pro? :?:
Officially it can flash update via a .elf.
Ohh right, it was always my understanding that you really couldn't. Interesting.

So really, the only thing that separates the SX and the Pro is just the flash memory size?
User avatar
Papy.G
Posts: 916
Joined: Mon Mar 04, 2019 6:14 am
Location: France, Occitanie
Contact:

Re: Questions about Qoob SX and iplboot?

Post by Papy.G » Tue Nov 10, 2020 7:58 am

Once able to force the console to run arbitrary code, one of the big difference between various chip is the amount of memory that remains available to store the said code.

The smaller may be able to modify some bytes from the disc drive on the fly (IE: no-zone chips), one step bigger you can load a Dolauncher or SWISS.gci from a Memory card, one more step you can load SWISS straight from an SD card, while the bigger can store the whole SWISS and run it from there (sometimes helped by an extended memory capacity, in the form of an onboard SD card, such as the GC-Loader).

Better than the hardware, the software design usually determines the ability for a chip to achieve something that it should be able to do. For example, a Xeno chip might be able to do a little more than just booting DVD-R backups or foreign discs (At least some people around there said it is, I personally don't know much on this hardware to tell).
DMG/MultiFreq OC/EDGB/EZF Jr, AGB/SC miniSD, NTR/NeoMK3, USG/flashme V8/SC miniSD
DOL001(EUR)/RGB/GCPlug/GBP/SD2SP2, RVL 001(EUR)/RGB/CMP/WiiSD

Zelda WW with Tingle Tuner in split screen was what the GC RF modulator was made for! (Video)
yoppie
Posts: 2
Joined: Thu Dec 03, 2020 1:39 am

Re: Questions about Qoob SX and iplboot?

Post by yoppie » Thu Dec 03, 2020 1:43 am

botman wrote:
Fri Oct 02, 2020 8:18 am
After wasting more money on mini DVD-R from China, I finally could flash iplboot after few tries. Now my GameCube is running Swiss without a disc. I'm so glad.

Thank you for your help!
my friend botman, can you share dvd iso? thanks
catb50
Posts: 2
Joined: Mon Apr 18, 2022 2:13 am

Re: Questions about Qoob SX and iplboot?

Post by catb50 » Mon Apr 18, 2022 3:19 am

After doing some research on the Qoob SX and IPLBoot and the size limitations. I am wondering if it is actually possible to add SD2SP2 support adding two lines of code in the main.c file in the source and compiling it. The new revision iplboot r6 supports sd2sp2 which is nice. I have tested from running directly from Swiss with only a sd2sp2 card.

So I guess compiling the older revision that could be flashed to Qoob_SX with the new lines

Code: Select all

 if (load_fat("sd2", &__io_gcsd2)) goto load;
          
Would it take up that much more space? if so couldn't we just remove one of the card reader checks for the ipl.dol in the front essentially replacing Mem slot B check with the SD2SP2 instead?



If somebody has a compiler environment setup to add the source from iplboot r5.2 here is the changed "main.c" file just changed slot B to the SD2SP2 needs to be compiled into the qoob_sx.elf which could be flashed and should boot "ipl.dol" from SD2SP2 making a clean setup. When SD2SP2 is removed gamecube would function as normal.

Code: Select all

#include <stdio.h>
#include <stdlib.h>
#include <sdcard/gcsd.h>
#include <malloc.h>
#include <unistd.h>
#include <ogc/lwp_watchdog.h>
#include <fcntl.h>
#include "sidestep.h"
#include "ffshim.h"
#include "fatfs/ff.h"

u8 *dol = NULL;

void dol_alloc(int size)
{
    int mram_size = (SYS_GetArenaHi() - SYS_GetArenaLo());
    kprintf("Memory available: %iB\n", mram_size);

    kprintf("DOL size is %iB\n", size);

    if (size <= 0)
    {
        kprintf("Empty DOL\n");
        return;
    }

    if (size >= (AR_GetSize() - (64 * 1024)))
    {
        kprintf("DOL too big\n");
        return;
    }

    dol = (u8 *) memalign(32, size);

    if (!dol)
    {
        kprintf("Couldn't allocate memory\n");
    }
}

int load_fat(const char *slot_name, const DISC_INTERFACE *iface_)
{
    int res = 1;

    kprintf("Trying %s\n", slot_name);

    FATFS fs;
    iface = iface_;
    if (f_mount(&fs, "", 1) != FR_OK)
    {
        kprintf("Couldn't mount %s\n", slot_name);
        res = 0;
        goto end;
    }

    char name[256];
    f_getlabel(slot_name, name, NULL);
    kprintf("Mounted %s as %s\n", name, slot_name);

    kprintf("Reading ipl.dol\n");
    FIL file;
    if (f_open(&file, "/ipl.dol", FA_READ) != FR_OK)
    {
        kprintf("Failed to open file\n");
        res = 0;
        goto unmount;
    }

    size_t size = f_size(&file);
    dol_alloc(size);
    if (!dol)
    {
        res = 0;
        goto unmount;
    }
    UINT _;
    f_read(&file, dol, size, &_);
    f_close(&file);

unmount:
    kprintf("Unmounting %s\n", slot_name);
    iface->shutdown();
    iface = NULL;

end:
    return res;
}

unsigned int convert_int(unsigned int in)
{
    unsigned int out;
    char *p_in = (char *) &in;
    char *p_out = (char *) &out;
    p_out[0] = p_in[3];
    p_out[1] = p_in[2];
    p_out[2] = p_in[1];
    p_out[3] = p_in[0];
    return out;
}

#define PC_READY 0x80
#define PC_OK    0x81
#define GC_READY 0x88
#define GC_OK    0x89

int load_usb(char slot)
{
    kprintf("Trying USB Gecko in slot %c\n", slot);

    int channel, res = 1;

    switch (slot)
    {
    case 'B':
        channel = 1;
        break;

    case 'A':
    default:
        channel = 0;
        break;
    }

    if (!usb_isgeckoalive(channel))
    {
        kprintf("Not present\n");
        res = 0;
        goto end;
    }

    usb_flush(channel);

    char data;

    kprintf("Sending ready\n");
    data = GC_READY;
    usb_sendbuffer_safe(channel, &data, 1);

    kprintf("Waiting for ack...\n");
    while ((data != PC_READY) && (data != PC_OK))
        usb_recvbuffer_safe(channel, &data, 1);

    if(data == PC_READY)
    {
        kprintf("Respond with OK\n");
        // Sometimes the PC can fail to receive the byte, this helps
        usleep(100000);
        data = GC_OK;
        usb_sendbuffer_safe(channel, &data, 1);
    }

    kprintf("Getting DOL size\n");
    int size;
    usb_recvbuffer_safe(channel, &size, 4);
    size = convert_int(size);

    dol_alloc(size);
    unsigned char* pointer = dol;

    if(!dol)
    {
        res = 0;
        goto end;
    }

    kprintf("Receiving file...\n");
    while (size > 0xF7D8)
    {
        usb_recvbuffer_safe(channel, (void *) pointer, 0xF7D8);
        size -= 0xF7D8;
        pointer += 0xF7D8;
    }
    if(size)
        usb_recvbuffer_safe(channel, (void *) pointer, size);

end:
    return res;
}

int main()
{
    VIDEO_Init();
    GXRModeObj *rmode = VIDEO_GetPreferredMode(NULL);
    void *xfb = MEM_K0_TO_K1(SYS_AllocateFramebuffer(rmode));
    VIDEO_Configure(rmode);
    VIDEO_SetNextFramebuffer(xfb);
    VIDEO_SetBlack(FALSE);
    VIDEO_Flush();
    VIDEO_WaitVSync();
    if (rmode->viTVMode & VI_NON_INTERLACE)
        VIDEO_WaitVSync();
    console_init(xfb, 20, 20, rmode->fbWidth, rmode->xfbHeight, rmode->fbWidth * 2);

    kprintf("\n\nIPLboot\n");

    *(volatile unsigned long *) 0xCC00643C = 0x00000000; // Enable 27MHz EXI

    // Disable Qoob
    u32 val = 6 << 24;
    u32 addr = 0xC0000000;
    EXI_Lock(EXI_CHANNEL_0, EXI_DEVICE_1, NULL);
    EXI_Select(EXI_CHANNEL_0, EXI_DEVICE_1, EXI_SPEED8MHZ);
    EXI_Imm(EXI_CHANNEL_0, &addr, 4, EXI_WRITE, NULL);
    EXI_Sync(EXI_CHANNEL_0);
    EXI_Imm(EXI_CHANNEL_0, &val, 4, EXI_WRITE, NULL);
    EXI_Sync(EXI_CHANNEL_0);
    EXI_Deselect(EXI_CHANNEL_0);
    EXI_Unlock(EXI_CHANNEL_0);

    // Set the timebase properly for games
    // Note: fuck libogc and dkppc
    u32 t = ticks_to_secs(SYS_Time());
    settime(secs_to_ticks(t));

    if (load_usb('B')) goto load;

    if (load_fat("sd2", &__io_gcsd2)) goto load;

    if (load_usb('A')) goto load;

    if (load_fat("sda", &__io_gcsda)) goto load;

load:
    if (dol)
    {
        DOLtoARAM(dol, 0, NULL);
    }

    // If we reach here, all attempts to load a DOL failed
    // Since we've disabled the Qoob, we wil reboot to the Nintendo IPL
    return 0;
}
User avatar
webhdx
Posts: 105
Joined: Sun Jul 03, 2011 10:40 am

Re: Questions about Qoob SX and iplboot?

Post by webhdx » Mon Apr 18, 2022 12:20 pm

It won't work because in order to have SD2SP2 support you need newer revision of devkitPPC which produces much bigger binaries.
MUSHROOM420
Posts: 1
Joined: Fri May 20, 2022 8:42 am

Re: Questions about Qoob SX and iplboot?

Post by MUSHROOM420 » Fri May 20, 2022 8:50 am

Aye mates can some one help me i can't update my cube i have de qoob sx version i burn the disc with the .elf file and It run ok even says done! Like It flashes well but in the BIOS version It says hw1 (c) qoob and also when i boot the disc It stops when the iplboot install screen shows but i can still flash but Is this normal? Hope somebody can help me:(
Post Reply