Homebrew GBA DS Option Pack Multiboot Support?

gudenau

Largely ignored
OP
Member
Joined
Jul 7, 2010
Messages
3,882
Trophies
2
Location
/dev/random
Website
www.gudenau.net
XP
5,423
Country
United States
Would it be possible to use the DS memory expansion pack and the DS rumble pack in a GBA with homebrew?

An example of using the memory pack being useful might be a highly compressed payload that's supported by a "fast loader" stub that can be pushed first. That would allow an extra 8MiB, which should be more than enough for anything you want to push down a link cable.

I attempted to write a memtest program that did the magic poke to enable it then write a bunch of data to 0x09000000 but the console never printed anything. I'm guessing there's no way to debug this with an emulator because why would you need to support this.

I haven't touched the rumble pack myself, but I'm sure there's a way to make it work too.
 

patters

Well-Known Member
Member
Joined
Jan 28, 2006
Messages
172
Trophies
1
XP
896
Country
I added EZ-Flash IV PSRAM support to PCEAdvance recently so I know a little about this. On a GBA the cart port address mapping is 0x8000000 (versus 0x9000000 on the DS) so I think the firmware of the device would have to be created with that in mind.
My own EZ-Flash IV for instance doesn't work on the DS memtest when apparently it should - I put this down to the newer firmware which removed DS support. So the same problem would likely apply to you in reverse, unless that product was intended to be used with the GBA.

I did think it would be cool to get Drill Dozer working with the EZ-Flash 3in1 rumble, but even that is problematic. I think in rumble mode it will only have 8MB of PSRAM mapped, or maybe none at all, I can't remember which.
 

gudenau

Largely ignored
OP
Member
Joined
Jul 7, 2010
Messages
3,882
Trophies
2
Location
/dev/random
Website
www.gudenau.net
XP
5,423
Country
United States
I added EZ-Flash IV PSRAM support to PCEAdvance recently so I know a little about this. On a GBA the cart port address mapping is 0x8000000 (versus 0x9000000 on the DS) so I think the firmware of the device would have to be created with that in mind.
My own EZ-Flash IV for instance doesn't work on the DS memtest when apparently it should - I put this down to the newer firmware which removed DS support. So the same problem would likely apply to you in reverse, unless that product was intended to be used with the GBA.

I did think it would be cool to get Drill Dozer working with the EZ-Flash 3in1 rumble, but even that is problematic. I think in rumble mode it will only have 8MB of PSRAM mapped, or maybe none at all, I can't remember which.

The base address is the same on the GBA and the DS, the memory pack just has the memory start an extra 0x01000000 up so you can't dump a ROM on it and reboot into the ROM to pirate stuff.

A little petty, but it doesn't change much in this context.
 

gudenau

Largely ignored
OP
Member
Joined
Jul 7, 2010
Messages
3,882
Trophies
2
Location
/dev/random
Website
www.gudenau.net
XP
5,423
Country
United States
This is the source code for my little test program, not sure what's wrong with it:

C:
#include <stdio.h>
#include <stdlib.h>

#include <gba_console.h>
#include <gba_video.h>
#include <gba_interrupt.h>
#include <gba_systemcalls.h>
#include <gba_input.h>

int main(void) {
    // the vblank interrupt must be enabled for VBlankIntrWait() to work
    // since the default dispatcher handles the bios flags no vblank handler
    // is required
    irqInit();
    irqEnable(IRQ_VBLANK);

    consoleDemoInit();

    // ansi escape sequence to set print co-ordinates
    // /x1b[line;columnH
    iprintf("\x1b[10;10HHello World!\n");

    *(vu16*)0x08240000 = 1;
    *(vu16*)0x09000000 = 0xDEAD;
    if(*(vu16*)0x09000000 != 0xDEAD) {
        iprintf("No memory pack?\n");
        goto loop;
    }

    iprintf("Testing...\n");
    VBlankIntrWait();

    for(int i = 0; i < 8 * 1024 * 1024; i += 2) {
        *(vu16*)0x09000000 = 0xBEEF;
        if(*(vu16*)0x09000000 != 0xBEEF) {
            iprintf("Test failed at 0x%08X\n", 0x09000000 + i);
            goto loop;
        }
        if((i & 0x3FF) == 0) {
            iprintf("0x%08X\n", 0x09000000 + i);
            VBlankIntrWait();
        }
    }
    iprintf("Test succeeded!\n");

    loop:
    for (;;) {
        VBlankIntrWait();
    }
}
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    The Real Jdbye @ The Real Jdbye: or fucking Clu Clu Land for that matter