Logging game events to text file
#16
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):

(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?
Reply


Messages In This Thread
Logging game events to text file - by seanmcnally - 03-02-2024, 09:56 PM
RE: Logging game events to text file - by Vega - 03-04-2024, 01:38 AM
RE: Logging game events to text file - by Vega - 03-04-2024, 09:37 PM
RE: Logging game events to text file - by Vega - 03-07-2024, 01:02 AM
RE: Logging game events to text file - by Vega - 03-08-2024, 12:25 AM
RE: Logging game events to text file - by Vega - 03-08-2024, 06:44 PM
RE: Logging game events to text file - by Vega - 03-12-2024, 09:13 PM
RE: Logging game events to text file - by Vega - 03-13-2024, 11:36 PM
RE: Logging game events to text file - by seanmcnally - 03-14-2024, 07:47 AM
RE: Logging game events to text file - by Vega - 03-14-2024, 06:28 PM
RE: Logging game events to text file - by Vega - 03-16-2024, 02:23 AM
RE: Logging game events to text file - by Vega - 03-16-2024, 04:54 PM
RE: Logging game events to text file - by Vega - 03-16-2024, 11:13 PM
RE: Logging game events to text file - by Vega - 03-18-2024, 05:20 PM

Forum Jump:


Users browsing this thread: 2 Guest(s)