03-14-2024, 07:47 AM
Alright, so I understand most of this. Thanks so much for your help thus far. My code will be at insertion address 0x8078894C (for NTSC-U):
That's lwz r31, 0x008C (r3). We got that from the code viewer.
This part I would have no idea how to do, I don't know how to do logic within ASM yet. But at least I know that star = 09.
That will be either
lwz r3, 0x0 (r27)
lwz r3, 0x0 (r3)
lbz r3, 0x10 (r3)
or
lwz r3, 0x0 (r29)
lwz r3, 0x0 (r3)
lbz r3, 0x10 (r3)
Yeah, same issue as #2 unfortunately...not sure how to do this.
Well, once I get the logic parts down, I understand that you can write to the EVA like this:
lis r12, 0x8000 #Set the upper 16 bits of the EVA
stb rX, 0x164F (r12) #Store rX to the EVA at address 8000164F
So maybe that 0 or 1 would need to go in a register first?
(03-13-2024, 11:36 PM)Vega Wrote: 1. Original instruction
That's lwz r31, 0x008C (r3). We got that from the code viewer.
(03-13-2024, 11:36 PM)Vega Wrote: 2. Check for Star, if item not Star, end code (write 0 flag to EVA)
This part I would have no idea how to do, I don't know how to do logic within ASM yet. But at least I know that star = 09.
(03-13-2024, 11:36 PM)Vega Wrote: 3. Slot loading code
That will be either
lwz r3, 0x0 (r27)
lwz r3, 0x0 (r3)
lbz r3, 0x10 (r3)
or
lwz r3, 0x0 (r29)
lwz r3, 0x0 (r3)
lbz r3, 0x10 (r3)
(03-13-2024, 11:36 PM)Vega Wrote: 4. Is slot value 0 thru 3?
Yeah, same issue as #2 unfortunately...not sure how to do this.
(03-13-2024, 11:36 PM)Vega Wrote: 5. If yes, write 1 flag to EVA. if not write 0 flag to EVA
Well, once I get the logic parts down, I understand that you can write to the EVA like this:
lis r12, 0x8000 #Set the upper 16 bits of the EVA
stb rX, 0x164F (r12) #Store rX to the EVA at address 8000164F
So maybe that 0 or 1 would need to go in a register first?