I've made changes to the umdk menu program to support SDHC cards (so you can use cards up to 32GB). It works when I send it over using loader, but I only ever get a blank screen when I combine it with the monitor program (cat monitor.bin menu.bin > firmware.bin) and load it on to the umdk's flash.
The total size of firmware.bin is 61KB, which is slightly bigger than the previous firmware (SGDK seems to add more than it used to) but that shouldn't be an issue should it?
Is there something else that I need to do to get it to work, or are there things I can check?
The only thing different for the flash version is that it has the extra argument -Ttext=0x420000 when building, which I've made sure was set.
How to build firmware (UMDK Menu + Monitor)?
Moderators: BigEvilCorporation, prophet36
Re: How to build firmware (UMDK Menu + Monitor)?
Compiling against the same version of SGDK that was originally used gets everything working, although the makefile needs to be updated (on windows at least) otherwise you don't get the link time optimisation and the firmware will be too big.
I'm not sure what changed in SGDK that breaks it. I know there where a couple of changes to the sega.s file but I merged those in and it worked through loader so ¯\_(ツ)_/¯
EDIT: *sigh* The menu loads from flash, but it's not launching any roms
I'm not sure what changed in SGDK that breaks it. I know there where a couple of changes to the sega.s file but I merged those in and it worked through loader so ¯\_(ツ)_/¯
EDIT: *sigh* The menu loads from flash, but it's not launching any roms
Re: How to build firmware (UMDK Menu + Monitor)?
Oh for goodness sake:
main.c
The cluster size on the high capacity card means that there < 1 clusters per star for the loading screen (there should instead many stars per cluster)
main.c
Code: Select all
void doSelect(struct FileSystem *fs, s16 choice) {
...
const u16 clustersPerStar = (u16) (length / (32 * clusterLen));
...
for (i = 0; i < clustersPerStar; i++) {
//read from sd card
}
VDP_drawText("*", x, 26); //Draw loading bar
...
}
Re: How to build firmware (UMDK Menu + Monitor)?
I feel like this is working against me.
Still having trouble loading roms (most of the time), and can't connect the debugger.
It seems that there is some memory mapping issue, or something. The monitor is loaded at 0x400000, the menu program stores filenames and whatnot starting at 0x440000, the problem is that 0x400000 == 0x440000.
When writing to 0x440000 you overwrite the monitor code, I also checked 0x420000 and 0x460000 and they are also end up at the same physical location.
I mostly checked like this:
EDIT: When loading roms it also crashes after loading up 256KB (0x40000 bytes). I have no idea what is going on, the original menu firmware works. But when I compile it myself this happens.
EDIT2: Seems like there was just a poor connection, and it was just an unfortunate coincidence that the original firmware worked when I checked it
Still having trouble loading roms (most of the time), and can't connect the debugger.
It seems that there is some memory mapping issue, or something. The monitor is loaded at 0x400000, the menu program stores filenames and whatnot starting at 0x440000, the problem is that 0x400000 == 0x440000.
When writing to 0x440000 you overwrite the monitor code, I also checked 0x420000 and 0x460000 and they are also end up at the same physical location.
I mostly checked like this:
Code: Select all
u32 read = 0;
u32* write = (u32*) 0x460000;
...
*write = 0xfafafafa;
read = *((u32*) 0x420000);
if (read != 0xfafafafa)
VDP_drawText();
*write = 0x0;
read = *((u32*) 0x420000);
if (read != 0xfafafafa)
VDP_drawText();
EDIT2: Seems like there was just a poor connection, and it was just an unfortunate coincidence that the original firmware worked when I checked it
Re: How to build firmware (UMDK Menu + Monitor)?
Sorry I've not been around lately. Was it just a bad connection that was causing problems? Are you all sorted now? I intended for the basic signal test to catch things like bad connections on the cart.
BTW, feel free to send me a pull-request on GitHub to implement SDHC.
BTW, feel free to send me a pull-request on GitHub to implement SDHC.
Re: How to build firmware (UMDK Menu + Monitor)?
Yeah bad connection (between the MD and the cart)
And then I started getting some other weird errors, the result being I've bought a bunch of bad cypress usb chips and it seems I was lucky that this one worked at all (for a while anyway).
Everything I go to look at recently isn't working right (not just the UMDK), I feel like I'm cursed.
And then I started getting some other weird errors, the result being I've bought a bunch of bad cypress usb chips and it seems I was lucky that this one worked at all (for a while anyway).
Everything I go to look at recently isn't working right (not just the UMDK), I feel like I'm cursed.