memory location of screen width in screen 1?

Door Pineapple

Rookie (31)

afbeelding van Pineapple

31-05-2020, 04:46

I'm hoping someone can help.
I'm trying out x-basic, which seems great, but the lack of a WIDTH function is causing some issues with my program.
the msx2 technical handbook suggests that it's at either memory location F3AFH or F3B0H, but peeking, poking, vpeeking or vpoking these locations seems to do nothing and I can't seem to find the memory location in any of the other books I've tried.

Does anyone know the proper memory location for the text width in screen 1, or possibly an x-basic workaround for setting the width to 32?


Aangemeld of registreer om reacties te plaatsen

Van epolesi

Supporter (2)

afbeelding van epolesi

31-05-2020, 08:13

F3AFH is the width for the NEXT screen 1 mode change.
F3B0H is the width of the CURRENT text screen.
Changing none of them will change the current screen width, but.. try this:


It should set screen 1 with width 32.

Van theNestruo

Champion (351)

afbeelding van theNestruo

31-05-2020, 10:00

Actually, POKEing $F3B0 (LINLEN) and $F3B1 (CRTCNT) does affect current screen width for BASIC instructions (CLS, PRINT, ...)
Given that BASIC's PRINT "handles" the scrolling of the name table if you print beyond the last line... this POKEs can be used to print a border/HUD, then POKE those vlaues, then handle the game area using PRINT to get "automatic" scroll Smile

Dummy example:


Van thegeps

Paragon (1031)

afbeelding van thegeps

31-05-2020, 11:56

cool trick theNestruo

Van Pineapple

Rookie (31)

afbeelding van Pineapple

31-05-2020, 16:52

Thanks! looks like I had the memory location, but didn't know what to do with it.