Enabling turbo mode in Assembly on Panasonic 2+/Turbo R machines

Page 3/3
1 | 2 |

By Gradius2

Hero (652)

Gradius2's picture

24-07-2021, 05:24

Enable R800 mode:
Filename: CHGCPU.COM

Usage (under MSX-DOS 2):
CHGCPU 0 (for Z80 mode)
CHGCPU 1 (for R800 ROM mode)
CHGCPU 2 (for R800 DRAM mode)

	.Z80
RDSLT	EQU	0000CH		; read slot
CALSLT	EQU	0001CH		; call slot
EXPTBL	EQU	0FCC1H		; Main ROM Slot

	ld	a,(EXPTBL)
	ld	hl,2dh		; read address
	call	RDSLT		; read slot
	cp	3
	jr	nc,TURBOR
	ld	de,MSG_NOTR	; not MSX turboR
	ld	c,9		; _STROUT
	call	5
	rst	0		; return to DOS

TURBOR:
	ld	c,6fh		; _DOSVER
	call	5
	ld	a,b		; DOS version
	cp	2
	jr	c,NOTDOS2
	ld	a,d		; MSXDOS.SYS version
	cp	2
	jr	c,NOTDOS2

	ld	a,(005ch+1)	; parameter
	sub	'0'		; 0:Z80  1:R800_ROM  2:R800_RAM
	ret	c		; abort if parameter < '0'
	cp	3
	ret	nc		; abort if '3' <= parameter
	or	80h		; change LED flag
	ld	ix,180h		; CHGCPU address
	ld	iy,(EXPTBL-1)	; Main ROM Slot
	call	CALSLT		; call slot
	rst	0		; return to DOS

NOTDOS2:
	ld	de,MSG_NOTDOS2	; not MSX-DOS2
	ld	c,9		; _STROUT
	call	5
	rst	0		; return to DOS

MSG_NOTR:
	DB	'not MSX turboR', 0dh, 0ah, '$'
MSG_NOTDOS2:
	DB	'not MSX-DOS 2', 0dh, 0ah, '$'
	END

By sd_snatcher

Prophet (3659)

sd_snatcher's picture

21-05-2022, 22:59

Grauw wrote:

To check the value of bit 2 to know if turbo is available.

This test isn't reliable if you want to know if you need to adjust the PSG pitch. The Sanyo MSX2+ machines will reply exactly the same as the Panasonic MSX+ Machines. It can be used just to enable the turbo though, since it will have no effect on the Sanyo machines.

Probably Panasonic sourced the gate array masks for Sanyo, or they jointly developed it to save costs.

Quote:

Apparently the function is not implemented by the T9769 MSX-ENGINE but by a M60014 gate array in the Panasonic machines, and the Sanyo machines have a M60013 gate array.

Correct. And the only difference between the two is that the Sanyo version lacks the turbo clock generation part. Everything else is identical, inclusive the behavior of the 40h and 41h I/O ports.

Page 3/3
1 | 2 |