mirror of
https://github.com/JaCzekanski/Avocado.git
synced 2024-05-10 00:23:47 -04:00
system: disable BIOS hooks by default
This commit is contained in:
parent
6fe429ee76
commit
ea84c175d3
|
@ -21,6 +21,13 @@ newoption {
|
|||
filter "options:enable-io-log"
|
||||
defines "ENABLE_IO_LOG"
|
||||
|
||||
newoption {
|
||||
trigger = "enable-bios-hooks",
|
||||
description = "Enable BIOS hooks/log",
|
||||
}
|
||||
filter "options:enable-bios-hooks"
|
||||
defines "ENABLE_BIOS_HOOKS"
|
||||
|
||||
newoption {
|
||||
trigger = "asan",
|
||||
description = "Build with Address Sanitizer enabled"
|
||||
|
|
|
@ -78,9 +78,10 @@ INLINE uint32_t CPU::fetchInstruction(uint32_t address) {
|
|||
|
||||
bool CPU::executeInstructions(int count) {
|
||||
for (int i = 0; i < count; i++) {
|
||||
// HACK: BIOS hooks
|
||||
#ifdef ENABLE_BIOS_HOOKS
|
||||
uint32_t maskedPc = PC & 0x1fff'ffff;
|
||||
if (maskedPc == 0xa0 || maskedPc == 0xb0 || maskedPc == 0xc0) sys->handleBiosFunction();
|
||||
#endif
|
||||
|
||||
saveStateForException();
|
||||
checkForInterrupts();
|
||||
|
|
|
@ -33,6 +33,14 @@
|
|||
* Enables IO access buffer log
|
||||
*/
|
||||
|
||||
/**
|
||||
* #define ENABLE_BIOS_HOOKS
|
||||
* Switch --enable-bios-hooks
|
||||
* Default: false
|
||||
*
|
||||
* Enables BIOS syscall hooking/logging
|
||||
*/
|
||||
|
||||
namespace bios {
|
||||
struct Function;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue