That's correct. I don't know the names by heart. But I think their names start with "copy_" or "write_". There are X and Y fields in "uns", change those. A loop then converts the data from the "uns" into OAM format but not at the final location. A second loop writes the prepared data to the real Object Attribute Memory.
Hey knizz, 's been a long time, no? I need your help now. I know you have much experience in OAM fields, and i need to know something. As the OAM memory is refreshed every frame, i can't "runtime" edit it to create an OAM. What i need to know (firered) is: Is there any routine like "Create OAM" or something? And if not, how could i go edit the OAM position? Is there a routine that changes its coordinates or something?
Also, if it helps, i know that this is all related to the "unknown_structure" you documented in your DB!
What I did is create an enumeration with the numbers you need to put in R1 to select the property of the pokemon you want to get or set. When you have
mov R0, blabla
mov R1, #45
mov R2, fubar
You can right click #45 and choose the correct property from one of the submenus.
Use Ctrl+Z (or was it alt+q?) to force zero offsets [R1, 0] to be interpreted as structure [R01, #npc_state.field1]
Yeah, i just arrived from my finalist-trip and downloaded your db. But i checked the routines get/set_pokemon_data... What exactly did you do? Srry xD
Also: As i've told you before, i'm making a emerald ida database. When i was checking somethings, i've come across a problem. You see, when there is, for example, ldrb r0, [r0, #1], i can successfully convert it in LDRB R0, [R1,#npc_state.field1]. Now, in this case, LDRB R0, [R1], instead of appearing LDRB R0, [R1,#npc_state.bitfield_DX], it just appears LDRB R0, [R1,#npc_state] in my IDA database. This is very annoying, as i can't figure out what is the first field of some structures just by sheer looking. Could you help me on this issue, please?
But your domain is small. Only 1280 cases!
And only the end result has to be in less than 0x49. Right?
You can just pre-calculate all situations and put the table into your software
uint a = table1[bignum];
uint b = bignum/a;
int c = bignum-a*b;
Hey knizz! Today i'm here to ask for help (again, you must be like this -.-').
But its rather more maths than ASM this time.
My problem is the following: I have a system where a byte max value can only be 0x49.
I want to get values in a range of 0-0x500 (HEX). To do it, i must use 3 bytes: Multiply first two and add the third. (lets say 0x196. 1st byte 0x28, 2nd byte 0xA, 3rd byte 0x6. 0x196 = 0x28 * 0xA + 0x6.)
Now what i want is a routine that given a value of that range, automatically finds the 1, 2 and 3 bytes needed for the final result using the formula above.
I'm not asking you to make the routine, but help me with the conditions/logic (like, i know that if the value i want is 0, then i just need one of the 2 bytes be 0 and the 3rd be 0 too, becaus X*0 = 0 + 0 = 0)
My problem is that there are thousands of ways to do it, and thats what is confusing me.