SofaSet 1.0 released

SofaSet 1.0 released

by ro on 02-01-2017, 09:05
Topic: Software
Tags: BIOS
Languages:

MRC user Louthrax has been working hard during the Christmas holidays to finish a new tool called SofaSet. It allows you to control and preview everything in your MSX ClockChip using a user-interface.

Setting date, time, screen, beep etc with BASIC commands is something all MSX users are familiar with. Now, with SofaSet this gets even easier. Select the parameter with joystick or keyboard, adjust it and then preview your new settings. The tool is still in development, the "password" settings is still missing for example.

You can download the SS.COM file here.
A demo video is available on youTube.

Comments (6)

By NYYRIKKI

Enlighted (4399)

NYYRIKKI's picture

02-01-2017, 12:58

Here is how you generate password hash in BASIC or XBASIC...

MSX-BASIC: ?USR(PW$)
X-BASIC: ?USR(VARPTR(PW$))

	DEFB #FE
	DEFW BEGIN
	DEFW END
	DEFW START

	ORG #C000

USR0:	EQU #F39A
USR:	EQU #F7F8
VALTYP:	EQU #F663

BEGIN:
START:
	LD HL,CODE
	LD (USR0),HL
	RET

CODE:
	LD	A,(VALTYP)
	CP	2
	LD	HL,(USR)
	LD	A,(HL)
	INC	HL
	JR	Z,XBASIC	; USR(VARPTR(X$)) in XBASIC
	LD	E,(HL)	; USR(X$) in BASIC
	INC	HL
	LD	D,(HL)
	EX	DE,HL
XBASIC:
	CALL	HASH
	LD	A,2
	LD	(VALTYP),A
	LD	(USR),DE
	RET

HASH:
	LD	DE,0000H
	LD	C,A
	OR	A
	RET	Z
	SCF
X2E08H:	PUSH	AF
X2E09H:	LD	B,08H
X2E0BH:	POP	AF
	PUSH	AF
	JR	NC,X2E11H
	RLC	(HL)
X2E11H:	RL	E
	RL	D
	JR	NC,X2E1FH
	LD	A,D
	XOR	80H
	LD	D,A
	LD	A,E
	XOR	05H
	LD	E,A
X2E1FH:	DJNZ	X2E0BH
	INC	HL
	DEC	C
	JR	NZ,X2E09H
	POP	AF
	RET	NC
	OR	A
	LD	C,02H
	JR	X2E08H

END:

By Louthrax

Paladin (994)

Louthrax's picture

02-01-2017, 13:48

So that's the thing I planned to investigate these days... will just make a copy paste then, thanks Nyyrikki :-) !
Of course the password can't be displayed-back after having been set (and can also be any length up to 255 characters), need to figure how to handle that in the UI...

By Louthrax

Paladin (994)

Louthrax's picture

02-01-2017, 14:42

I now have a question about a very obscure feature of the clockhip: the "Even/Odd" field. The "Interlacing" field works OK and is restored when you reset the MSX, but the "Even/odd" bit does not seem to have any impact on the VDP registers after reset (I checked in different screen modes).

The documentation says the 2 bits (Interlace & Even/odd) should save the last parameter of the screen command (screen ,,,,,x) which can be 0 to 3 (0:Normal, 1:Interlaced (same page), 2:Normal (Even/Odd pages), 3:Interlaced (Even/Odd pages).

Maybe this "Even/odd" bit was designed for specific applications that would check its value? I'm currently setting it to the VDP accordingly to the value in SofaSet but this does not match what you get after a reset (I should just ignore it). Quite weird !

By Louthrax

Paladin (994)

Louthrax's picture

04-01-2017, 12:40

I investigated the meaning of this even/odd pages bit in RTC Clock: it's always set to 0 in all sub-BIOS ROMs I have seen (following is the code called by a "set screen" in BASIC):

#FCB0 is the address of the text screen mode (0 or 1).
#FFE8 is the address of VDP register 10.

There's a "and #02" after reading VDP register 10, so only the "interlace" bit is kept.

Keeping the "even/odd" pages bit could have made sense if the MSX draw instructions were supporting 512*424 screen (interlaced mode with 2 pages displayed), but this has never been the case.

I'll just remove this field from SofaSet and always set that bit to 0 (or better, keep the existing value).

By Louthrax

Paladin (994)

Louthrax's picture

10-01-2017, 00:10

Version 1.1 has just been released on my website, along with SofaRun 2.8. An individual ZIP file for SofaSet can also be downloaded.

Changes are:

  • Password handling.
  • No more even/odd pages setting (which does not seem to be handled by MSX, see above).
  • Character selection screen:

By Philip

Master (135)

Philip's picture

10-01-2017, 15:31

Very nice, thanks !

My MSX profile