ok, thats what I have been doing. I Also have a problem with a code I am trying. I know I have the right address because I have modified it with one of the constant write codes. here is my code so far:
Code:
023FE4D8 0A000003 - DB Code Fix
023FE424 E1833004 - D4 code executes an 'ORR'
C0000000 00000032 - loop 50 times
DB000000 22188479 - load the ammo into the data register
D4000000 00000007 - max the ammo out
D8000000 22188479 - write data back into address and increment offset by 1
DC000000 0000000D - Add 13 to the offset for a total of 14 each loop
D2000000 00000000 - end and clear loop counter and data register
023FE424 E0833004 - Set D4 back to 'ADD'
The lowest 3 bits of the value at 22188479 hold the ammo. The upper bits hold some status flags and info that CAN NOT be written to without affecting the game play. If I ORR the value with 0x7 (111b) then the lowest 3 bits will always be on and ammo will be maxed out. there are 50 units so I loop 50 times to get them all (I have also tried this without a loop on one single unit with no luck). I applied the DB code fix and loaded the value into the data register ORRed it and write it back. The next unit's data is 0xE (14) away. The DB increments the offset by one and then I add 0xD (13) to the offset to get a total of 0xE (14).
Is there a flaw in my logic? or is there a flaw in the way I set up my code? When I run the game with this code, absolutely nothing happens to my ammo. Its like the 'Dx data' is not getting written back into the address. It also causes some black lines across the screen