Well I have had the same issue as the GBC where ASM in a RAM location can't change ASM in the ROM location. Not sure if there are other methods but the ASM I did should have changed the ROM ASM 08XXXXXX but it didn't alter the value, sorry.
Announcement
Collapse
No announcement yet.
Need help with GBA codetypes
Collapse
X
-
I still want see the custom routine with explanation, regardless will work or notlee4 Does Not Accept Codes Requests !
When lee4 asks a question it does not mean lee4 will look at your game
*How to create and use SegaCD codes >click here<*
Comment
-
Ok later today I will post it with pictures.
Edit:
Ok so I looked at that pointer of yours and I couldn't do much with it so I decided to find RAM ASM that is executed many times a second and did a trace of in game for about 3 seconds and looked through it and found:
03000C20
so I used that as my hook to link into some free memory space 030019c0 (I assumed it was free since it was all zeros for a large block):

So the bl is a branch with link so we can jump back from the custom subroutine with a simple bx r14 . R14 holds the link address so you know for future reference.
Next I copied the same instruction I replaced with the hook aka the bl to the new routine.
So 1 and 2 are the instructions I originally replaced so we have to run those so the normal routine isn't broken.
3 is the push command which saves the values in the registers we designate in our case registers r1 to r4 (we only used 3 but I chose 4 for future changes) to the stack so we can bring them back later.
4 is loading the value we want to jump into again but into 32bit ARM instead of Thumb since we have much more flexibility with the instructions, also note that it is aligned to a 32bit address so 0,4,8,C are the locations we can jump to for ARM instructions.
5 is the branch into ARM Mode which you will see in the next picture.

On the next picture we see some 32bit ARM instructions so let me break it down:
First line is loading a pointer using the base valued address we put in R1 in the second picture and adding 24hex to it so we get the ROM address for Nolberto's code in R2.
The second line is doing the same thing but is loading the value I want to use into R3, which is 2001D101.
In case you're wondering about the pointers loading the values, I manually put the values there in those addresses which you can see in the lower half of the pictures where the memory viewer is. This way if this code worked all you would need to do for other codes to work is change those manual values with different addresses and their respective values.
Third line is storing the value of R3 into the address in R2 (this is the part that isn't working)
Fourth we POP the values previous in the registers from the stack and BX R14 back into the address after out hook took place.
Spoiler Alert! Click to view...
THE BAD GUY!!!!!!
Comment
-
Posted and I did the whole ARM instructions was because I was trying to do something different earlier and left it the way is it now since I could always make changes and ARM allows for more flexibility. If anyone see's a mistake please point it out.Spoiler Alert! Click to view...
THE BAD GUY!!!!!!
Comment
-
The following code seems to be doing this:
Shouldn't it be doing this?Code:030019CC E5912024 ldr r2,[r1,#0x24] ;@Loads a value in pointer location r1 (0x030019CC + 0x24 = 0x030019F0); the value at this pointer is 0x0802020C 030019D0 E5913028 ldr r3,[r1,#0x28] ;@This does the same except loads the value at that location + 0x28 which is the 0x2001D101 [COLOR=#ff0000]030019D4 E5832000 str r2,[r3] ;@This is storing 0x0802020C into r3, but r3 is the value at address 0x2001D101[/COLOR] 030019D8 E8BD001E pop {r1-r4} ;@Pops the registers we've preserved from the stack 030019DC E12FFF1E bx r14 ;@Return
Using your code, you should store r3 into r2.Code:030019CC E5912024 ldr r2,[r1,#0x24] ;@Loads the value at 0x030019F0 (0x0802020C) 030019D0 E5913028 ldr r3,[r1,#0x28] ;@Loads the value at 0x030019F4 (0x2001D101) [COLOR=#008000]030019D4 E5823000 str r3,[r2] ;@Stores that value into address 0x0802020C[/COLOR] 030019D8 E8BD001E ldmfd sp!,{r1-r4} ;@Pops the registers we've preserved from the stack 030019DC E12FFF1E bx lr ;@ReturnI only bother with things that interest me.
Comment
-
Unfortunately, I'm rusty as well. I'm trying to get back into ASM lately, though. All of the other instructions are equivalent except that third line.
Is there no other way to get at the ROM? Kind of sucks since this could be beneficial for AR V3 users as well with that 3-4 ROM patch limit.I only bother with things that interest me.
Comment
-
Perhaps you are correct, I am a bit rusty but using your instructions met with the same results. It won't store to ROM which sucks.
not to mention for CB/GS users but it seems nothing in RAM can alter the ROM, same shit happened with the GBC but maybe the real cheat device could make it work. Lee do you care to try the codes? you will have to break the codes down line by line from the pictures but shouldn't be too hard.Spoiler Alert! Click to view...
THE BAD GUY!!!!!!
Comment
Comment