Using MSX DOS in a higher lines/screen mode?

Page 1/2
| 2

By WORP3

Paladin (827)

WORP3's picture

29-06-2021, 16:01

Just wondering if someone ever came across a simple tool to put MSX DOS in a screen 0 mode using 80 cols and 26 rows instead of the default 24 rows mode?

Login or register to post comments

By MsxKun

Paladin (1012)

MsxKun's picture

29-06-2021, 16:32

Depends.
In the time I made the HHGTTG patches with cute colors and stuffs, I was playing with it. Put the 26 row mode is easy, but not sure the DOS itself made use of them, i think not, so I made a TSR to put custom messages on that extra lines.
In the end I prefered to use the space to put custom FKEYS like in Basic, for usual MSX-DOS commands, like DIR /W or others.
And with custom colors it looked nice. But it seems that last 1 line (and a half) was mostly unuseful anyway...
So it was really 24 lines + 1 extra for FKeys

By WORP3

Paladin (827)

WORP3's picture

29-06-2021, 16:33

Just made a quick workaround, setting 0xF3B9 to 26 and VDP(10) to 128 will make it work.
Hope there is some program out there to switch to more lines/screen, if not then I will make some myself later.

By WORP3

Paladin (827)

WORP3's picture

29-06-2021, 16:38

MsxKun wrote:

Depends.
In the time I made the HHGTTG patches with cute colors and stuffs, I was playing with it. Put the 26 row mode is easy, but not sure the DOS itself made use of them, i think not, so I made a TSR to put custom messages on that extra lines.
In the end I prefered to use the space to put custom FKEYS like in Basic, for usual MSX-DOS commands, like DIR /W or others.
And with custom colors it looked nice. But it seems that last 1 line (and a half) was mostly unuseful anyway...
So it was really 24 lines + 1 extra for FKeys

It kinds of works, at least DOS will display on the extra lines which is just great for my as I was just two lines short Smile
But trying to enter a command on those two additional lines isn't echo-in the types charakters.

By gdx

Enlighted (4630)

gdx's picture

29-06-2021, 16:51

This program should be fast to done by setting 0xF3B1 to 26, set the bit 7 of register 9 and initialize the VRAM for the 2 additional lines. You must also take into account KEY ON / OFF and the MSX version or better, to detect the VDP type.

By WORP3

Paladin (827)

WORP3's picture

29-06-2021, 17:06

gdx wrote:

This program should be fast to done by setting 0xF3B1 to 26, set the bit 7 of register 9 and initialize the VRAM for the 2 additional lines. You must also take into account KEY ON / OFF and the MSX version or better, to detect the VDP type.

Yes that's what I was saying here above, but what do you mean with the Key on/off part?

By sdsnatcher73

Prophet (2143)

sdsnatcher73's picture

29-06-2021, 18:32

I think KEY ON / OFF handles whether the function key display is on or off, and as such whether the 2 extra lines are available for normal use. At least in BASIC that would work that way.

By ducasp

Champion (454)

ducasp's picture

29-06-2021, 20:59

Is it usable? because it will end-up with 26.5 lines, so I'm guessing the last line won't have the full content readable...

By Grauw

Ascended (10010)

Grauw's picture

29-06-2021, 21:11

From what I remember setting CRTCNT to a value larger than 24 didn’t really work properly…

Just tried it again, yep, CLS doesn’t clear the lines below the 24th line, and although the scrolling does work it scrolls in invalid characters, you can’t type commands on those lines. I think it isn’t any better in MSX-DOS. A BIOS and possibly DiskROM patch is needed for it to work.

By WORP3

Paladin (827)

WORP3's picture

30-06-2021, 09:50

Grauw wrote:

From what I remember setting CRTCNT to a value larger than 24 didn’t really work properly…

Just tried it again, yep, CLS doesn’t clear the lines below the 24th line, and although the scrolling does work it scrolls in invalid characters, you can’t type commands on those lines. I think it isn’t any better in MSX-DOS. A BIOS and possibly DiskROM patch is needed for it to work.

That's about right, DOS can't handle those extra lines while taking command's but it will give you two extra lines visually. So if you just need some additional space to put some info on (Like me at the moment) then it's kind of useful. A DOS/diskrom patch would be nice off-coarse, shame that those 24 lines are hard coded inside DOS/DISKROM Sad

By gdx

Enlighted (4630)

gdx's picture

30-06-2021, 11:33

I quickly made a very basic command to use 26 lines instead 24. It works fine if the current screen is in 80 columns mode. It needs many improvements to be truly usable.
Obviously, the commands like CLS.COM that not support 26 lines not works properly and before to go under BASIC you have to back in 24 lines otherwise, bugs and even freeze can occur especially after a _SYSTEM.

; 26LINES

RDSLT	equ	0000Ch
RG9SAV	equ	0FFE8h

	org	0100h

	ld	a,(0fcc1h)
	ld	hl,002dh
	call	RDSLT
	or	a
	ret	z	; Back if MSX1

	ld	a,26
	ld	(0F3B1h),a

	ld	a,(0fcc1h)
	ld	hl,0007h
	call	RDSLT

	ld	c,a
	inc	c

	ld	a,(RG9SAV)
	or	080h
	di
	ld	(RG9SAV),a
	out (c),a
	ld a,80h+9
	ei
	out (c),a		; Set the bit 7 of register 9
;
; clear 3 lines
;
	ld a,080h
	di
	out (c),a

	ld a,047h
	out (c),a
	ei
	dec c
	ld a,32		;Space
	ld b,240	;clear 3 lines
LOOP:
	out	(c),a
	djnz	LOOP
	ret

Command to back in 24 lines:

; 24LINES

RDSLT	equ	0000Ch
RG9SAV	equ	0FFE8h
CSRY	equ	0F3DCh

	org	0100h

	ld	a,(0fcc1h)
	ld	hl,002dh
	call	RDSLT
	or	a
	ret	z	; Back if MSX1

	ld	a,24
	ld	(0F3B1h),a

	ld	a,(0fcc1h)
	ld	hl,0007h
	call	RDSLT

	ld	c,a
	inc	c

	ld	a,(RG9SAV)
	and	07Fh
	di
	ld	(RG9SAV),a
	out	(c),a
	ld	a,80h+9
	ei
	out	(c),a		; Clear the bit 7 of register 9
;
; clear all lines
;
	ld	a,000h
	di
	out	(c),a

	ld	a,040h
	out	(c),a
	ei
	dec	c
	ld	h,26	;26 lines
LNLOOP:
	ld	a,32	;Space
	ld	b,80
LOOP:
	out	(c),a
	djnz	LOOP
	dec	h
	jr	nz,LNLOOP
	
	ld	a,0
	ld	(CSRY),a
	ret
Page 1/2
| 2