Adopt m68kemu v1.5.0 IRQ source and simplify device/config internals - #3
Merged
Merged
Conversation
Finishes the v1.5.0 migration and the cleanup it opens up. m68kemu v1.5.0 adoption: - Build the CPU with WithDeferredReset and run Machine.Reset once during construction, making it the single reset path. This also fixes a latent bug: the ROM fast-memory window was only installed from Machine.Reset, which the desktop and headless runners never call, so the shipped binary had been running entirely on the bus path. - Route device interrupts through a single level-sensitive IRQSource (machineIRQ over GLUE/MFP/FDC) that the core samples each instruction, deleting dispatchInterrupts, maskedAutovectorPulse, the irqSources slice and the InterruptSource interface. GLUE now drives a held HBL/VBL autovector line instead of queuing pulses; a blank interrupt the CPU is masking is taken shortly after the mask clears rather than dropped. - EnableTrace disassembly comes from TraceInfo.Mnemonic; drop the direct m68kdasm dependency (m68kemu still pulls it in). Internal cleanup, no behaviour change: - PAL/NTSC raster constants and the FrameHz>=55 rule moved to config.Config.Video(); GLUE and MFP timing setup collapse to a few lines. - GLUE dropped its unused system-control register; $FF8006 is now a shared devices.ScratchRegion and GLUE is no longer bus-mapped. - DrainInterrupts removed from the devices in favour of PendingIRQ/AckIRQ plus a drainIRQ test helper. - The JSON config loader is table-driven (config.Config.jsonFields). - Removed the dead Machine.cartridge field. The CycleScheduler adoption (proposal 3.2) was re-attempted against v1.5.0 and reverted again: correct, but a 120-frame EmuTOS boot regressed ~20% because the devices advance per-quantum, not event-driven. Recorded in docs/m68kemu-api-proposal.md. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Finishes the v1.5.0 migration and the cleanup it opens up.
m68kemu v1.5.0 adoption:
Internal cleanup, no behaviour change:
The CycleScheduler adoption (proposal 3.2) was re-attempted against v1.5.0 and reverted again: correct, but a 120-frame EmuTOS boot regressed ~20% because the devices advance per-quantum, not event-driven. Recorded in docs/m68kemu-api-proposal.md.