gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

DS development > One asm problem (In NDS)

#55885 - RoTTe - Mon Oct 03, 2005 8:22 pm

I have this:

0237:F0A4 MOV LR, PC
0237:F0A8 BX R0
0237:F0AC LDMFD SP!, {LR}
0237:F0B0 BX LR

R0 = 0xBA9

If R0 = 0xBA9, and BX oper. PC <- R0, and knowing the code to which jumps really makes something, where does the execution go to (PC)? I am confused :(

Thank's :D

P.S: I am really sure that R0 only contains 0xBA9

#55886 - Mighty Max - Mon Oct 03, 2005 8:30 pm

if r0 is 0xBA9 then the arm will jumpt to 0xBA8 while switching to Thumb mode.

lr points to arm32 bit command (no thumb) 0237:F0AC. So it exits thumb again on the BX lr.
_________________
GBAMP Multiboot

#55899 - RoTTe - Mon Oct 03, 2005 10:21 pm

But... 0xBA8, is a region of memory....? Any Bios function?

P.S: The code running in the ARM7.

#55924 - NEiM0D - Tue Oct 04, 2005 3:05 pm

I doubt anyone will help you once they find out you're trying to disassemble patcher code for use with illegal .NDS roms...

#55932 - Lord Graga - Tue Oct 04, 2005 6:40 pm

Try:
0237:F0A4 ADD LR, PC, #4
0237:F0A8 BX R0
0237:F0AC LDMFD SP!, {LR}
0237:F0B0 BX LR

#55967 - RoTTe - Wed Oct 05, 2005 12:42 am

NEiM0D wrote:
I doubt anyone will help you once they find out you're trying to disassemble patcher code for use with illegal .NDS roms...


I remember... that..
I don't need disasm for that.

I do this one just for fun. Actually I'm very old to play with the console.
If I wanted to use this to execute "illegal" roms on it, dont you think it would be easier for me to play than disasm?

Sorry BAD BAD BAD, english...

#55975 - Ethos - Wed Oct 05, 2005 2:24 am

RoTTe wrote:
I have this:

0237:F0A4 MOV LR, PC
0237:F0A8 BX R0
0237:F0AC LDMFD SP!, {LR}
0237:F0B0 BX LR

R0 = 0xBA9

If R0 = 0xBA9, and BX oper. PC <- R0, and knowing the code to which jumps really makes something, where does the execution go to (PC)? I am confused :(

Thank's :D

P.S: I am really sure that R0 only contains 0xBA9




Blah, Blah...

STMFD SP!, {LR} where art thou?
_________________
Ethos' Homepage (Demos/NDS 3D Tutorial)

#56080 - NEiM0D - Wed Oct 05, 2005 10:07 pm

RoTTe wrote:
NEiM0D wrote:
I doubt anyone will help you once they find out you're trying to disassemble patcher code for use with illegal .NDS roms...


I remember... that..
I don't need disasm for that.

I do this one just for fun. Actually I'm very old to play with the console.
If I wanted to use this to execute "illegal" roms on it, dont you think it would be easier for me to play than disasm?

Sorry BAD BAD BAD, english...


Or perhaps you're just another Neoflash trying to pierce your way into the pirate flashcard market using NDS patcher tools.

Of course, you'd actually need to know how those work by reverse engineering them.

#56984 - RoTTe - Wed Oct 12, 2005 9:50 pm

I've already found the solution, and the code is already 'disasm'. If anyone is interested about it, it has some interesting functions for the bank switch/page flipping in the ne*ofl*a*sh or x*g*2 cartridges. Now I'm about to implement these for pogoshell.

*Saludos*