G2 IRQ

Before acquiring the 32-channel logic analyser, I decded to write a G2 bus plugin for it. It’s not perfect and the waveforms seem to be hit-or-miss coming from the logic analyser. The G2 clock seems to get lost sometimes. A day after the plugin was written, the Kingst LA5032 arrived and the results were mostly usable. I might be using the wrong approach by relying on the clock.

I’ve learnt that while there are three lines which appear to be dedicated to external devices (external device 0, 1, and development), none are used. I knew that the Broadband Adapter (BBA) didn’t have connections for them and used the IREXT# signal. It makes me wonder if the Zip drive+USB device were going to use them. Since it wasn’t released, there’s no way of knowing.

Going through the reverse-engineered program using the BBA, there are calls which add an external interrupt handler to a list for handling multiple devices. It reads the DMA Transfer Request Assign (DMATRA) register and checks if bit 0 is set (which should be prohibited, according to what I’ve read). If this is true then the function assigned to the interrupt handler is called. For the purposes of testing, the dummy G2 interface triggers once every three seconds and is held until 0x0000 is written to the DMATRA. This could be any register. For the BBA, it clears the Realtek’s IMR.

With the BBA in situ, there are problems with the IRQ line floating. However, when it’s initialised, there are no problems and the program proceeds as normal. To keep this test program simple, I’ve opted to remove the BBA.

It’s not a very exciting update, though I have moved the memory over to a Wishbone interface and separated the G2 bus module from the rest of the code. To compensate, here’s a video of the IRQ being handled. It gets less exciting as it goes on, and there are still timing issues that need to be addressed which don’t appear in this video, but I assure you they are present.

The next thing to address is the timing issues. After that, DMA transfers should be the last major step for getting data moved as fast as possible. I doubt that the full 50MB/s is viable simply due to the fact that there will need to be time allocated to the rest of the program and not just data transfer.

Something I’m also looking to acquire soon (before the end of the year) is a Karaoke unit, as I’d like to have compatibility with it. With my efforts to reverse engineer the Karaoke program so far, I couldn’t see any time that a DMA transfer takes place, except for the BBA. I’m curious how the data from the microphones make it over to the Dreamcast.