REDIVIVUS

Proposals / #1515

Mac BINK_RadTimerRead: uint32_t __cdecl (void)

checked · by KierTaylor · submitted 2026-11-08

It reads no register or stack args. On first use it fetches mach_timebase_info (0x0030b27c) and records a mach_absolute_time base. Each call takes mach_absolute_time (0x0030b252), subtracts the base, scales by numer/denom, and divides by 1000000 via __udivdi3 0x0030b10e, giving milliseconds in EAX. The callers use EAX (BinkCopyToBuffer 0x00301877: MOV EDI,EAX; then a later subtraction for elapsed time). The timer is 32-bit, as the callers use only EAX.

Changes 1, applied together

  1. Set prototype mac 0x00304315

    signatureundefined BINK_RadTimerRead(void)→uint32_t BINK_RadTimerRead(void)
    conventionunknown→__cdecl