How to detect the SCC?

ページ 2/4
1 | | 3 | 4

By gdx

Enlighted (5512)

gdx さんの画像

04-08-2021, 15:47

By Metalion

Paragon (1513)

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 ?

By Grauw

Ascended (10582)

Grauw さんの画像

04-08-2021, 21:27

Yes, indeed.

By Metalion

Paragon (1513)

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 ?

By Grauw

Ascended (10582)

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.

By aoineko

Champion (451)

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.

By ARTRAG

Enlighted (6845)

ARTRAG さんの画像

22-01-2022, 14:39

By aoineko

Champion (451)

aoineko さんの画像

22-01-2022, 18:02

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

By aoineko

Champion (451)

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

By ARTRAG

Enlighted (6845)

ARTRAG さんの画像

22-01-2022, 18:43

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

ページ 2/4
1 | | 3 | 4