You've already forked Microtransactions64
mirror of
https://github.com/Print-and-Panic/Microtransactions64.git
synced 2026-01-21 10:17:19 -08:00
Added emulator detection (#651)
* Added emulator detection * Fixed missing assignments * Disable interrupts around the count factor test * Added more comments to emutest * Changed PJ64 enum values so the versions work as a bitfield * Updated README * Fixed comments * Updated enum values so you can safely AND and OR all emulator version flags together * Remove redundant gIsConsole, gIsVC, and gCacheEmulated global variables * Changed console check to be more future proof against Ares * Use assembly file instead of casting to a function pointer * Moved round_double_to_float back to its own compilation unit * Moved the ParallelN64 check before the Ares check for better future-proofing * Align pj64_get_count_factor_asm with cache lines... not that it actually matters for pj64 * Adjusted some comments * Made emulator check thread-safe on emulators that emulate PI timings * Added gIsConsole macro for backwards compatibility * Added cen64 to INSTANT_INPUT_BLACKLIST * Updated comment
This commit is contained in:
14
asm/pj64_get_count_factor_asm.s
Normal file
14
asm/pj64_get_count_factor_asm.s
Normal file
@@ -0,0 +1,14 @@
|
||||
// Used as part of emulator detection. The dynarec core of PJ64 4.0 only updates
|
||||
// the COUNT register in between recompiled functions, so this will return 0 on
|
||||
// PJ64 4.0 dynarec, but will instead return the count factor on other versions.
|
||||
|
||||
.include "macros.inc"
|
||||
.section .text, "ax"
|
||||
.set noreorder
|
||||
|
||||
.balign 32
|
||||
glabel pj64_get_count_factor_asm
|
||||
mfc0 $t0, $9 // $9 is the COUNT register
|
||||
mfc0 $t1, $9
|
||||
jr $ra
|
||||
subu $v0, $t1, $t0
|
||||
Reference in New Issue
Block a user