Fonzie wrote:I tried that, kega still says "tray opened", "tray closed"... I cannot check on real hardware actualy.
Before we go nuts...
You are already bored?
Quite the contrary... this is where the fun begins.
The cause seems to be an abrupt change in the CDD status. I don't know the exact status after a CDD reset but we might be able to keep the bios from freaking out. Hopefully we won't have to hack into the bios.
Here's something to try. Before trying the following, the drive needs to be paused with ROMPAUSEON to where CDBSTAT returns 0505 (paused in data mode). If CDBSTAT reads as stopped [0000], this probably won't work.
Before disabling interrupts:
- call CDBPAUSE with value 0
- call CDBSTAT until drive is stopped (status == 0000)
- disable interrupts immediately
- call CDBPAUSE with value 4500 [decimal] <restores the default value>
You can then halt and do whatever you need. After you unhalt the subcpu, just do as before: kick start the CDD then unmask interrupts. You can try it without the kick start but I think we figured out that it needs to be reset.
Good luck. It gets messy from here on out.