Browse Source

mark IVT locations as NOP or IRET depending on implementation presence

master
asie 1 year ago
parent
commit
1efd286db1
2 changed files with 20 additions and 0 deletions
  1. 10
    0
      emu_core.lua
  2. 10
    0
      emu_core_pre.lua

+ 10
- 0
emu_core.lua View File

@@ -2226,5 +2226,15 @@ end
function emu_execute()
CPU_FLAGS = 0x0202
sysconf_init()

-- set IVT locations to NOP or IRET
for i=0,255 do
if interrupt_handlers[i+1] then
RAM[0xF1100+i] = 0x90
else
RAM[0xF1100+i] = 0xCF
end
end

cpu_execute()
end

+ 10
- 0
emu_core_pre.lua View File

@@ -2243,5 +2243,15 @@ end
function emu_execute()
CPU_FLAGS = 0x0202
sysconf_init()

-- set IVT locations to NOP or IRET
for i=0,255 do
if interrupt_handlers[i+1] then
RAM[0xF1100+i] = 0x90
else
RAM[0xF1100+i] = 0xCF
end
end

cpu_execute()
end

Loading…
Cancel
Save