X16Community / x16-rom

Other
43 stars 27 forks source link

[KERNAL] ioinit now disables interrupt sources #344

Closed mooinglemur closed 2 months ago

mooinglemur commented 3 months ago

On the C64, ioinit disables interrupt sources entirely, until cint enables the default one. After this change, the same thing now happens on the X16.

Ultimately, this allows the default NMI and BRK handlers to successfully give control to the user (in BASIC or MONITOR) even when the interrupted program uses VIA timers, LINE interrupts, YM2151 IRQs, or other IRQ sources on VERA.

mooinglemur commented 2 months ago

As a side note: it might be good to add some notes to the docs somewhere to suggest a custom BRK/NMI handler for user programs that enable add-on hardware IRQ sources, such as serial cards, so that they may disable the IRQ source, then chain to the default handler to allow the monitor or warm basic start to function.