#46128 - wintermute - Mon Jun 20, 2005 4:59 pm
#46130 - DiscoStew - Mon Jun 20, 2005 5:21 pm
Does this release also include the fix for the error in the GBA crtl?
Other than that, I'm glad to see progress being continued with this.
_________________
DS - It's all about DiscoStew
#46166 - wintermute - Tue Jun 21, 2005 5:07 am
DiscoStew wrote: |
Does this release also include the fix for the error in the GBA crtl?
|
It certainly does.
I'm planning on some method to make updates to the crtls easier for end users to install in future.
#46493 - chishm - Sun Jun 26, 2005 7:25 am
There seems to be a problem with this version of DKArm in that it doesn't initialise all memory on startup, which is fine for most programs, however it causes problems when compiling for the GBA movie player. This problem may also apply to earlier versions, however ROMs compiled using r8 are fine.
The problem is as follows: I build any of my multiboot programs using DKArm r8 and they work with both an Xboo cable and a GBAMP. I then compile using r13 and the ROMs work perfectly well using an Xboo cable, but when loaded with the GBAMP there are various problems. For instance, my text library doesn't show any text, and the PCX test built with my CF driver will not load the PCX. Both of these rely on global variables, but I am not sure if this is the problem. Sorry I can't be more specific.
#46514 - tepples - Sun Jun 26, 2005 3:10 pm
I ought to write a variation on Multiboot Menu that acts as a test harness for startup code, filling IWRAM and EWRAM with pseudorandom values before loading a .mb file. Would this help?
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#46518 - Lord Graga - Sun Jun 26, 2005 5:47 pm
I seem to have the same problem as Chism with my F2A cart, using a loader.
#46532 - chishm - Sun Jun 26, 2005 11:41 pm
tepples wrote: |
I ought to write a variation on Multiboot Menu that acts as a test harness for startup code, filling IWRAM and EWRAM with pseudorandom values before loading a .mb file. Would this help? |
It may help for flash carts, but probably not for the GBAMP. It copies the multiboot binary directly to EWRAM then jumps to it. This means any loader that overwrites EWRAM would also overwrite the game.
#46533 - wintermute - Sun Jun 26, 2005 11:49 pm
#46537 - chishm - Mon Jun 27, 2005 1:03 am
RegisterRamReset is fine in r8 as long as I don't reset IWRAM or EWRAM, in which case the GBA freezes no matter what (as expected). Using it in r13 doesn't make any difference, it behaves as in the above post.
SoftReset (RAM_RESTART) freezes on a white screen with either revision or boot method and SoftReset (ROM_RESTART) starts from the cart (as expected).
#46542 - tepples - Mon Jun 27, 2005 4:08 am
chishm wrote: |
tepples wrote: | I ought to write a variation on Multiboot Menu that acts as a test harness for startup code, filling IWRAM and EWRAM with pseudorandom values before loading a .mb file. |
It may help for flash carts, but probably not for the GBAMP. It copies the multiboot binary directly to EWRAM then jumps to it. This means any loader that overwrites EWRAM would also overwrite the game. |
Multiboot Menu is designed for flash carts. The next version will overwrite almost all of EWRAM (except the last 1040 bytes or so, which are reserved for use by PogoShell) with PRNG trash and then overwrites the beginning of the trash with the game. If the init code can't handle the trash, the .mb program dies. The thinking is that if a program is compatible with the trash version of mbmenu, then it'll be more likely compatible with GBAMP.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#46546 - chishm - Mon Jun 27, 2005 5:11 am
tepples wrote: |
Multiboot Menu is designed for flash carts. The next version will overwrite almost all of EWRAM (except the last 1040 bytes or so, which are reserved for use by PogoShell) with PRNG trash and then overwrites the beginning of the trash with the game. If the init code can't handle the trash, the .mb program dies. The thinking is that if a program is compatible with the trash version of mbmenu, then it'll be more likely compatible with GBAMP. |
Sorry. I misunderstood you before. Yes that would help fix problems with startup code. Unfortunately the startup code is part of the linker or CRT.0 or something. As you can tell I am not totally sure how to rewrite the startup code, as I don't know ASM.
#47184 - chishm - Wed Jul 06, 2005 5:59 am
I have worked out the cause to the problem. In gba_crt0.s it has:
Code: |
@---------------------------------------------------------------------------------
@ Clear SBSS section to 0x00
@---------------------------------------------------------------------------------
ldr r0, =__sbss_start
ldr r1, =__sbss_end
sub r1, r0
bl ClearMem |
But this is either clearing out parts of the program from SBSS that it shouldn't, or, more likely, it is not properly clearing the GBAMP garbage from IWRAM. Changing the above to bss fixes it.
#47187 - wintermute - Wed Jul 06, 2005 6:28 am
hmm, that's quite weird
Code: |
mov r0, #3
lsl r0, #24 @ r0 = 0x3000000
ldr r1, =__iwram_end
sub r1,r0
bl ClearMem
|
should be clearing all of iwram, including bss.
if you replace the iwram code above with
Code: |
@---------------------------------------------------------------------------------
@ Clear BSS section to 0x00
@---------------------------------------------------------------------------------
ldr r0, =__bss_start
ldr r1, =__bss_end
sub r1, r0
bl ClearMem
|
retaining the SBSS clear does it still work, or does it exhibit the problems?
#47194 - chishm - Wed Jul 06, 2005 8:01 am
wintermute wrote: |
if you replace the iwram code above with
*SNIP*
retaining the SBSS clear does it still work, or does it exhibit the problems? |
Replacing the code fixes it. In fact, just adding the code fixes it. So obviously the IWRAM was not being properly cleared before. Works great now, except I've noticed that DevKitARM r13 adds about 3 KiB to the size of the ROM over r8. Is there any particular reason for this?