-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some arm7 interrupt documentation #201
Conversation
If we know what the function is, can we just add it with a different name (doesn't have to be this PR though)? I think it's better to have it somewhere than not. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, thanks! I'm not 100% sure if I like duplicating the function names (since pmdsky.h
has one global namespace), but seeing as these are actually mirrored functions, I suppose it's okay. We can revisit this later if needed.
We can do that but only once we know a bit about its purpose, otherwise I'm not even sure what its name should be lol xP |
Where is that function located? |
Right after 02385f28h |
Bits 0 trhrough 4 contain the execution mode of the processor, so that's what the function seems to be returning. I'd call it
|
I'll do a pr. Should I include this table in the description for reference? |
Seems a bit excessive, it's general ARM knowledge. Maybe you could define an enum with each state and use it as the return type, but it might not be worth it. |
Sure, I'll leave it out. |
I was working on some arm7 reversing and found some mirrored code between arm9 and arm7 where
EnableIrqFlag
andSetIrqFlag
were being used, and from there I was able to find a few more arm9 interrupt functions in the arm7 as well. Interestingly although all of these ones are identical, the last interrupt functionGetIrqFlag
is not, and it does anand
with a different mask, so I didn't include it here.Also a note for all future arm7 documentation: I did a checksum on the
arm7.bin
of all three editions of EoS and they are all identical (SHA256 CB2A9B26D77A6E7D0ADD85C27E3642105918695D040D02F70D5EBC1D52C9495B
), and since they are also all loaded at0x2380000
, addresses for all editions will be identical if the function is in the binary. There do appear to be some functions that seem to be written in during runtime though, so this might not apply for those ones.