I'm looking for details for a system variable

Page 1/2
| 2

By gdx

Paragon (1685)

gdx's picture

13-10-2017, 12:42

Hello,

I'm looking for details. For exemple, what is "Clipping"?

0FAFCh MODE 1

Flags for the type of mask to be applied for drawing on screen, available VRAM size and the Katakana/Hiragana mode.

- bit 0 = 1 if Roma to Kana conversion is possible.
- bit 1~2 = VRAM size. (00 for 16KB; 01 for 64KB; 10 for 128KB; 11 for 192KB)
- bit 3 = 1 to use the mask in SCREEN 0~3.
- bit 4 = 1 for clipping. (MSX2+~)
- bit 5 = 0/1 to draw in YJK/RGB mode in SCREEN 10.
- bit 6 = 1 if Kanji ROM is level 2. (MSX2+~)
- bit 7 = 1 conversion to Katakana; 0 conversion to Hiragana.

Login or register to post comments

By Wolverine_nl

Paladin (698)

Wolverine_nl's picture

13-10-2017, 12:54

Hi gdx,
https://en.wikipedia.org/wiki/Clipping_(computer_graphics)
This is the general meaning of it :)

By Wolverine_nl

Paladin (698)

Wolverine_nl's picture

13-10-2017, 13:06

Not sure this also applies to your question:
https://youtu.be/XJljSJqzDR0

By NYYRIKKI

Enlighted (4759)

NYYRIKKI's picture

13-10-2017, 14:00

You can test the clipping bit with following simple program:

10 screen 5
20 line (0,0)-(255,255)
30 a$=input$(1)

You can get the same effect on X-BASIC with command: '#C-

Edit: Please note! The clipping bit is inverted in your original post. By default the darn clipping is turned on to protect sprites and palette from being accidentally overwritten... The accidental overwrite is anyway possible with COPY-command since in this case only destination is clipped not the DX+NX,DY+NY

Edit2: To be more specific, the clipping actually still happens when the bit is set but instead on line 212 it happens on line 256. Please note also that this feature does not work on MSX2 (although in X-BASIC clipping can be turned off)

By gdx

Paragon (1685)

gdx's picture

13-10-2017, 14:01

According this page and the Basic manual of the Sanyo MSX2 at page 68 the clipping bit is not inverted.

'#C+ is for enable the clipping. The effect is same as POKE&HFAFC,PEEK(&HFAFC) or &H10
To disable the clipping we have input POKE&HFAFC,PEEK(&HFAFC) and &HEF

By NYYRIKKI

Enlighted (4759)

NYYRIKKI's picture

13-10-2017, 14:10

No, that is not correct...
'#C- == POKE&HFAFC,PEEK(&HFAFC) or &H10

By gdx

Paragon (1685)

gdx's picture

13-10-2017, 14:15

OK, so the clipping mask remove the limit to 191/211 for the Y coordonate of Basic, right?

By NYYRIKKI

Enlighted (4759)

NYYRIKKI's picture

13-10-2017, 14:21

It has no effect to 192 line screen modes, so practically when the bit is set the clipping happens @ line 256 instead of 212

By NYYRIKKI

Enlighted (4759)

NYYRIKKI's picture

13-10-2017, 14:32

Yet another note: CALL TURBO OFF command resets the bit back to 0

By gdx

Paragon (1685)

gdx's picture

13-10-2017, 14:48

Clipping mask ON (default) = Limit for the Y coordinate enabled as indicated in Japanese documents seems to me more logical for me.

Same for #C+. (+ for add clipping mask, - for remove it)

By NYYRIKKI

Enlighted (4759)

NYYRIKKI's picture

13-10-2017, 15:09

Yes, but the bit is still inverted in the first post.

"Clipping mask on" == bit4 eq 0 == 212 lines == '#C+ (default)
"Clipping mask off" == bit4 eq 1 == 256 lines == '#C-

(note that the clipping always happens @ some line)

Page 1/2
| 2
My MSX profile