Thanks for the newer and better version of the routine found there, but it does not answer my question.
How do I access SCC registers after having detected the SCC ?
Do I have to enable the SCC slot every time I need to access them ?
Yes, indeed.
Yes, indeed.
So that would be the way to write SCC registers ?
scc_on: call SCCDETECT ret c ; SCC not found ld (slot),a ret scc_write: ld a,(slot) ld h,80h call ENASLT (then write to SCC registers)
Is that correct ?
Yep, assuming the correct Konami mapper bank is already pre-selected in that page. And then switch the page back to the original slot when you’re done. Be aware that ENASLT disables interrupts so you probably want to re-enable them right after calling ENASLT.
Hi,
Are you sure the SCC detection code on the wiki is working properly?
I tried it but it does not detect an SCC extension in the cartridge slot 2 in OpenMSX.
If I force "2" (primary slot #2) as return value, everything works fine.
Not sure about wiki but this is tested
https://github.com/artrag/Uridium-msx1/blob/master/sccdetec.asm
Your routine work fine.
It's a pity if the wiki one doesn't work.
@ARTRAG I did some tests with different configurations via OpenMSX and I found a case where the SCC cartridge is not detected with your routine.
- SCC cartridge: Slot 1-0
- Game cartridge: Slot 1-1
Interesting, do you have any idea about what goes wrong?