17 December 2023, 14:18 | #1 |
Mostly Harmless
Join Date: Aug 2004
Location: Northern Ireland
Posts: 1,109
|
CD32 eject / disc stop interrupt handling
I've had a look about and can't find anything on this.
When the CD drive in a CD32 spins down (eg: if you open the lid), a level 2 interrupt is fired, INTF_PORTS is set in INTREQR, and it seems to fire continually after this. I guess Akiko raises this? Is there any information on how to respond to and clear this interrupt without using cd.device? I'm aware of the devkit note about not messing with INT2 or else this will happen, I just wondered if there was a solution that didn't require cd.device. I'm porting Rogue Declan to CD32 and reworking it to leave the OS in place enough isn't an option. The game loads fine, it's just that it crashes and/or hangs if the disc spins down. |
17 December 2023, 15:50 | #2 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,506
|
CD player sends status info when state changes and Akiko sends interrupt when CD has pending data.
If you mean how to disable interrupt in hardware level: Clear $B80008. It is Akiko interrupt enable register (long word register, normal read/write, not like chipset registers) Save the register contents, clear it, restore value if system needs to be restored. Reading the pending data is much more complex (and isn't necessary) akiko.cpp in WinUAE sources has Akiko register descriptions. |
17 December 2023, 16:27 | #3 |
Mostly Harmless
Join Date: Aug 2004
Location: Northern Ireland
Posts: 1,109
|
Thanks. I'd found those sources and was trying clearing 0xB80018.b but the interrupts kept coming. Clearing 0xB80008.l seems to have done the trick
|
17 December 2023, 16:36 | #4 |
This cat is no more
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,164
|
My technique is to use a whdload slave and CD32load on it. I remember Toni helping me with all this interrupt crap & also audio CD stuff.
The documentation is nonexistent, which doesn't help a lot. Sometimes you create something that runs with WinUAE but not on the real hardware, which is super frustrating, specially because you have to burn a CD each time to test it... Fortunately I used a TF328 to store my test code and CD data doesn't need burning over and over. It's also faster. |
17 December 2023, 17:44 | #5 |
Mostly Harmless
Join Date: Aug 2004
Location: Northern Ireland
Posts: 1,109
|
Is there a similar interrupt when an IDE CD (on an A1200) is ejected?
EDIT: seems so, in FS-UAE at least. I'm not going to handle this one as the CD controller could be many things. Last edited by girv; 17 December 2023 at 22:18. |
17 December 2023, 22:28 | #6 |
Mostly Harmless
Join Date: Aug 2004
Location: Northern Ireland
Posts: 1,109
|
I'm also confused with the keyboard handshake. The same code I use on the ADF version, which AFAIK works everywhere, ends up with the first key-up interrupt endlessly repeating (with the correct keycode).
Fixed: my keyboard handshake in the cd32 one had a typo Last edited by girv; 17 December 2023 at 22:57. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Questions regarding INT2 interrupt handling | Niklas | support.Hardware | 2 | 28 January 2019 08:09 |
CD32 promo disc | toples50 | project.CD32 Conversion | 3 | 30 May 2018 20:28 |
CD32 Disc backups | Gordon | support.Hardware | 1 | 07 August 2009 12:22 |
CD32 Demoscene Disc? | ant512 | Amiga scene | 20 | 14 June 2007 00:00 |
Bootable cd32 disc | lpopman | Coders. General | 3 | 22 December 2004 13:46 |
|
|