#5462 - Quirky - Mon Apr 28, 2003 8:51 pm
I've written a plugin for PogoShell (nothing useful, pcx image files) but I'm having problems getting it to actually work. The actual pcx "decoding" works, I've tested it with .all.rodata.o pcx files, then appended data files (copy /b pcx.bin+pic.pcx pcx.gba) then the final step, as a plugin. Which is where it goes wrong.
According to the docs, when you select a file in pogoshell, a "magic value" is stored at 0x0203FC00, i.e. near the end of EWRAM. However, this value is always 0. The code I have is:
I have my theory as to why it fails - I think that Devkit adds code at the start of the rom that sets EWRAM to 0. Can anyone confirm this and suggest a work around? Oh and should the plugin be written as a multiboot image or doesn't that matter?
According to the docs, when you select a file in pogoshell, a "magic value" is stored at 0x0203FC00, i.e. near the end of EWRAM. However, this value is always 0. The code I have is:
Code: |
unsigned int *p = (unsigned int *)0x0203FC00;
if(p[0] == 0xFAB0BABE) { load_pcx((u8 *)p[-1]); } else {... debug stuff to find out why it went wrong |
I have my theory as to why it fails - I think that Devkit adds code at the start of the rom that sets EWRAM to 0. Can anyone confirm this and suggest a work around? Oh and should the plugin be written as a multiboot image or doesn't that matter?