How to detect the SCC?

Страница 2/2
1 |

By gdx

Enlighted (4828)

Аватар пользователя gdx

04-08-2021, 15:47

By Metalion

Paragon (1451)

Аватар пользователя 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 (10164)

Аватар пользователя Grauw

04-08-2021, 21:27

Yes, indeed.

By Metalion

Paragon (1451)

Аватар пользователя 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 (10164)

Аватар пользователя 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.

Страница 2/2
1 |