How to detect the SCC?

Pagina 2/5
1 | | 3 | 4 | 5

Van gdx

Enlighted (5999)

afbeelding van gdx

04-08-2021, 15:47

Van Metalion

Paragon (1616)

afbeelding van Metalion

04-08-2021, 16:10

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 ?

Van Grauw

Ascended (10681)

afbeelding van Grauw

04-08-2021, 21:27

Yes, indeed.

Van Metalion

Paragon (1616)

afbeelding van Metalion

04-08-2021, 22:46

Grauw wrote:

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 ?

Van Grauw

Ascended (10681)

afbeelding van Grauw

04-08-2021, 23:31

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.

Van aoineko

Paladin (806)

afbeelding van aoineko

22-01-2022, 14:32

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.

Van ARTRAG

Enlighted (6914)

afbeelding van ARTRAG

22-01-2022, 14:39

Van aoineko

Paladin (806)

afbeelding van aoineko

22-01-2022, 18:02

Your routine work fine.
It's a pity if the wiki one doesn't work.

Van aoineko

Paladin (806)

afbeelding van aoineko

22-01-2022, 18:35

@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

Van ARTRAG

Enlighted (6914)

afbeelding van ARTRAG

22-01-2022, 18:43

Interesting, do you have any idea about what goes wrong?

Pagina 2/5
1 | | 3 | 4 | 5