SCREEN 8 with 192 lines

By Eugeny_Brychkov

Paragon (1088)

Eugeny_Brychkov's picture

20-05-2017, 08:36

I see that MSX2's SCREEN8 command, by default, initializes screen into 212 lines (bit LN=1). Is there any way to make it initialize with 192 lines without modifying VDP registers directly after initialization is done (e.g. VDP(10)=2)? Altering FFE8 should have no result as it is being overwritten by 82h during screen initialization.

Login or register to post comments

By NYYRIKKI

Enlighted (5365)

NYYRIKKI's picture

20-05-2017, 10:31

No, the LN-bit is always forced. See the routine in SUB-ROM address #D36 (MSX2) #DD8 (2+) #DD5 (tR)

For BASIC I think this should do it (I didn't test it though)

        ; Jump here from: #FFC0
        CP 8
        RET NZ
        POP IX
        LD IX,#159
        CALL #15F
        DI
        LD A,(#FFE8)
        AND #7F
        OUT (#99),A
        LD (#FFE8),A
        LD A,#89
        OUT (#99),A
        RET

By igal

Master (211)

igal's picture

20-05-2017, 10:55

In Basic i use => VDP(10)=VDP(10)-128 (Thx to Jipe Face )
I'm not sure that's the question. (Sorry for my english oO

10 SCREEN 8 *(=>212 Lines)
20 VDP(10)=VDP(10)-128 *(=>192 Lines)
30 SET PAGE x,y *(=> all set page reinitialise in 212 Lines)
40 VDP(10)=VDP(10)-128 *(=>192 Lines)
50 VDP(10)=0 (=> 50Hz or 60Hz dont change the number of Lines)
60 BLOAD"212Lines.SC8",S (=>212 Lines)
70 VDP(10)=VDP(10)-128 (=>Force the 192 Lines view with an image make in 212 Lines)

By Eugeny_Brychkov

Paragon (1088)

Eugeny_Brychkov's picture

20-05-2017, 20:26

Thank you both for your help and support.

Edit: the issue seems that VDP(10) value is being constantly reset by any graphical command I used, for example SETPAGE resets it back to having bit 7 set (212 lines).

I also can not disable screen using BL bit in register 1, screen is immediately being re-enabled (I guess by interrupt servicing routine).

My goal is set SCREEN 8 using BASIC, somehow making it using 192 lines (without resetting to default 212 lines). During operations with VRAM (e.g. loading pictures) I would want to have screen disabled, and then re-enable it at specific moment.

Do you think it is possible purely in BASIC?

By Manuel

Ascended (15686)

Manuel's picture

20-05-2017, 20:40

AFAIk you can use the DISSCR and ENASCR BIOS routines to disable the screen from BASIC. IIRC it's on 0x41 and 0x44.

By Eugeny_Brychkov

Paragon (1088)

Eugeny_Brychkov's picture

20-05-2017, 21:02

Great, 0x41 really disables screen, but then SETPAGE re-enables it! So I can not change pages with screen disabled...
No, I am wrong. SCREEN 8 enables it. SETPAGE seems does nothing regarding screen enable/disable.

Thus code looks like:

10 screen 8
20 defusr=&h41:a=usr(0)
30 ...
40 VDP(10)=VDP(10) and 127
50 defusr=&h44:a=usr(0)
60 ' now screen is visible