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,477
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
174
Trophies
1
XP
909
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,477
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,477
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
  • No one is chatting at the moment.
  • SylverReZ @ SylverReZ:
    @ZeroT21, Why not stick to your other machine, no?
  • ZeroT21 @ ZeroT21:
    my other machine is old, mostly used for just browsing , some multimedia stuff as it's just old
  • ZeroT21 @ ZeroT21:
    some tasks like hacking wii mini consoles
  • SylverReZ @ SylverReZ:
    @ZeroT21, You running Windows XP in 2024?
  • K3Nv2 @ K3Nv2:
    Whore yourself out 12 times for $100 and go buy a pc
    +1
  • ZeroT21 @ ZeroT21:
    i got xp but running it off usb only, no way ima keep that
  • ZeroT21 @ ZeroT21:
    it gets hacked/corrupted if i just leave it online for an hour
  • SylverReZ @ SylverReZ:
    @ZeroT21, The Russians are after you lol.
  • K3Nv2 @ K3Nv2:
    Send me your ip I'll remotely fix it
  • ZeroT21 @ ZeroT21:
    @K3Nv2 my head needs fixing if I believe you
  • ZeroT21 @ ZeroT21:
    it's kinda fun watching it happen tho
  • K3Nv2 @ K3Nv2:
    It needs fixing for other things but your pc I can fix
  • ZeroT21 @ ZeroT21:
    over 300+ virus/trojians/worms after scanning, what did I do to deserve this attention lol
  • ZeroT21 @ ZeroT21:
    tho I find it funny when i receive other people's pc/laptops in this state
  • ZeroT21 @ ZeroT21:
    i wont be upgrading unless I cant run the games i want anymore
  • K3Nv2 @ K3Nv2:
    Spill water on it good excuse
  • ZeroT21 @ ZeroT21:
    @K3Nv2 that's like a valid option if someone else is paying for ya
  • K3Nv2 @ K3Nv2:
    Daddy's wallet
  • K3Nv2 @ K3Nv2:
    Ngl hogwarts legacy has good pooping music
  • OctoAori20 @ OctoAori20:
    That's uh-
  • OctoAori20 @ OctoAori20:
    That's certainly a Dairy Queen sign lmao
  • K3Nv2 @ K3Nv2:
    You should see his help wanted signs
    K3Nv2 @ K3Nv2: You should see his help wanted signs