diff options
| author | cheapie <cheapiephp@gmail.com> | 2026-06-26 10:28:41 -0500 |
|---|---|---|
| committer | cheapie <cheapiephp@gmail.com> | 2026-06-26 10:28:41 -0500 |
| commit | a027ec08dad3977defe90fbbfda0621f7cd04589 (patch) | |
| tree | 4b6d305a5e83c1d40ee431732353ff19435cc13b /rvcontroller.lua | |
| parent | ca28b45e758e2f36be5a93c5ae0a5cdfe91d5db9 (diff) | |
| download | rvcontroller-a027ec08dad3977defe90fbbfda0621f7cd04589.tar rvcontroller-a027ec08dad3977defe90fbbfda0621f7cd04589.tar.gz rvcontroller-a027ec08dad3977defe90fbbfda0621f7cd04589.tar.bz2 rvcontroller-a027ec08dad3977defe90fbbfda0621f7cd04589.tar.xz rvcontroller-a027ec08dad3977defe90fbbfda0621f7cd04589.zip | |
Don't check the timer interrupt periodically when waiting if it's not even enabled
Diffstat (limited to 'rvcontroller.lua')
| -rw-r--r-- | rvcontroller.lua | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/rvcontroller.lua b/rvcontroller.lua index e6e86e5..f3a85d2 100644 --- a/rvcontroller.lua +++ b/rvcontroller.lua @@ -3399,6 +3399,8 @@ elseif event.iid == "checkinterrupt" and mem.interruptwaiting then digiline_send("monitordisp","CPU started") interrupt(1/CLOCK_SPEED,"tick") else + local miebits = explodebits(mem.csr[0x304],32) + if not miebits[7] then return end -- No need to keep checking the timer if it's not even on interrupt(1,"checkinterrupt",mem.csr[0x800]%2 == 1) end end |
