EnableDisplayHeader
From WikiPrizm
Revision as of 11:58, 15 February 2015 by ProgrammerNerd (talk | contribs)
Contents
Synopsis
Header: fxcg/display.h
Syscall index: 0x1D7F
Function signature: void EnableDisplayHeader(int action, int value)
The function of this syscall is still unknown.
Parameters
- action If action == 0 clear 0xFD80178C. If action == 2 set 0xFD80178C to value. If action is any other value return 0xFD80178C unmodified.
- value Used only if action == 2
Returns
The final value of 0xFD80178C which may be modified depending on the value of action.
Comments
Similar functions have been proven to use different addresses depending on the OS version. Versions of this code from other OS versions have not been documented. Unless it is proven that all OS versions use the same address use this function instead of relying on 0xFD80178C being the same for all OS versions.
! If r4==0 clear 0xFD80178C ! If r4==2 set 0xFD80178C to r5 ! Other values of r4 will cause the function to simply return the contents of 0xFD80178C EnableDisplayHeader: tst r4, r4 bf r4NonZero ! Branch if r4 is non-zero mov.l #unk_FD80178C, r4 ! If r4 is zero set r4 to 0xFD80178C mov #0, r2 bra EnableDisplayHeader_exit mov.l r2, @r4 ! Before branching clear the contents of 0xFD80178C ! --------------------------------------------------------------------------- r4NonZero: mov r4, r0 cmp/eq #2, r0 bf EnableDisplayHeader_exit ! Branch if r4!=2 without delay mov.l #unk_FD80178C, r4 mov.l r5, @r4 EnableDisplayHeader_exit: mov.l #unk_FD80178C, r4 rts mov.l @r4, r0 ! Return the contents of 0xFD80178C ! End of function EnableDisplayHeader