Changes
/* The Vectored Interrupt Bug */
Following discussions on cpcwiki involving roudoudou, Longshot, gerald, arnoldemu and dragon the cause of the bug has been identified, through testing and from analysis by gerald with his logic analyzer and a workaround has been identified.
The bug relates to the raster interrupt. When a raster interrupt is acknowledged under some conditions (which are described below) sometimes the vector will be 6 (for raster interrupt) or 4 (for dma channel 0). it has been found that if - the instruction which is being interrupted is located in a memory region where A13=1 (i.e. &2000-&3fff, &6000-&7fff, &a000-&cfff, &e000-&fffflowest priority interrupt) then the bug will not occur.
See http://www.cpcwiki.eu/imgs/8/84/CPC_Plus_CPU_Schematic.jpg
Logic analysis:
http://www.cpcwiki.eu/index.php/File:IM2_Plus_Ack_Bug.png
When a raster interrupt is pending it has been found that the ASIC sees two interrupt acknowledge from the Z80.
With the first, it will auto-clear the raster interrupt, record the information in the DCSR register and output the raster interrupt vector onto the bus.
When it sees the second, because the raster interrupt has been seen and no DMA interrupts are pending, it defaults to the the vector for DMA channel 0.
The logic around the Z80 shortens or lengthens the IORQ based on A13 and that is why the bug doesn't happen when A13=1.