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,496
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
916
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,496
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,496
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.
  • S @ salazarcosplay:
    hunter x hunter
  • S @ salazarcosplay:
    he has not allowed anyone to continue it for him for example
  • Xdqwerty @ Xdqwerty:
    @salazarcosplay, theres a dragon ball af mod for budokai 3
  • Xdqwerty @ Xdqwerty:
    updated ship of harkinian, gonna install some hd texture pack
  • Xdqwerty @ Xdqwerty:
    I might download rayman revolution for my ps3
  • BigOnYa @ BigOnYa:
    I may try the new ram site, and download more RAM to my Switch. Not sure if ddr3 is the right ram
    for it tho. Edit- no it uses floppy Ram, just like @AncientBoi
    +1
  • Xdqwerty @ Xdqwerty:
    aeiou
  • BigOnYa @ BigOnYa:
    And sometimes Z
  • SylverReZ @ SylverReZ:
    @K3Nv2, MAGA supporters be wearing tin foil hats lol.
    +1
  • Xdqwerty @ Xdqwerty:
    @SylverReZ, whats maga?
  • BigOnYa @ BigOnYa:
    It stands for Maniacs Against General Acceptance
    +1
  • Xdqwerty @ Xdqwerty:
    @BigOnYa, people rejecting general consensus about stuff?
    +1
  • BigOnYa @ BigOnYa:
    Yup, nuh its really just Trump followers
  • Xdqwerty @ Xdqwerty:
    @BigOnYa, im not american so i dont care about trump
    +1
  • Xdqwerty @ Xdqwerty:
    or us elections
  • BigOnYa @ BigOnYa:
    Me niether, us north Koreans don't care
  • Xdqwerty @ Xdqwerty:
    good night
  • BakerMan @ BakerMan:
    i don't care either, even if i'm american
  • BakerMan @ BakerMan:
    truth be told, i agree with psi, i dislike both candidates, but i'd probably vote trump simply because the economy was better during his presidency
  • AngryCinnabon @ AngryCinnabon:
    Just be careful, if trump ends up winning and using project 2025 America might really change...for the worse.
  • AngryCinnabon @ AngryCinnabon:
    I'm not american and even that sends shivers down my spine.
  • AngryCinnabon @ AngryCinnabon:
    anything that offers trump an opportunity to become an actual dictator
    is bad in my book, i could care less if it wasn't for that...
  • K3Nv2 @ K3Nv2:
    Canada: America's Russia
  • NinStar @ NinStar:
    people are so dramatic that I can't even tell if they are being serious
    NinStar @ NinStar: people are so dramatic that I can't even tell if they are being serious