VPOKE with v9938

Par PingPong

Prophet (4086)

Portrait de PingPong

06-12-2022, 16:10

Hi, how does the vpoke stmt work in v9938 ?
the address argument is 16 bits wide so how can i vpoke to an address > &HFFFF ?
How does it work in screen 4-5-6-7-8 ?

thx

!login ou Inscrivez-vous pour poster

Par badsector

Rookie (27)

Portrait de badsector

06-12-2022, 16:28

You could use the SET PAGE <DisplayPage>,<ActivePage> command. By setting the ActivePage to 1 (in screen 7 or 8) or to 2 (screen 5,6) all vpoke commands will write to the upper 64KB.
I haven't tried anything like this in other screen modes, so I don't know if it will work there.

Par PingPong

Prophet (4086)

Portrait de PingPong

06-12-2022, 16:34

thx, most probably it does not work on screen 4, even if the vdp support 128k

Par NYYRIKKI

Enlighted (6010)

Portrait de NYYRIKKI

06-12-2022, 17:40

Indeed... In SCREEN 4 I think only way around it is to do POKE &HFCAF,8 and then poke the 17th bit to &HFAF6... Not a pretty solution and it still does not allow graphics commands to be used.

Par PingPong

Prophet (4086)

Portrait de PingPong

06-12-2022, 19:50

msx basic lack 32 bit integer support... how does the V9990 basic handle vpoke address range?

Par NYYRIKKI

Enlighted (6010)

Portrait de NYYRIKKI

07-12-2022, 01:13

AFAIK V9990 BASIC handles VPOKE addresses same way as MSX2 does... Actually this is not so much of a BASIC problem, it is more MSX2 BIOS problem. TBH I think it was a bit of a design flaw to start messing up with routines like SETWRT or SETRD. They should have left them as they were in MSX1 because they anyway moved in to using NSTWRT and NSETRD variants. Im my opinion R#15 update should have been added to mode change routines instead (ie. to SUB-ROM routine starting @ #B22)

Summing this up: In SCREEN 0-4 BASIC does not allow you to access later 64KB at all. in SCREEN 5-6 the SET PAGE-command (ACPAGE) * 32KB offset is added to 16bit VPOKE. In SCREEN 7-12 the (ACPAGE) * 64KB offset is added to 16bit VPOKE address.

Par gdx

Enlighted (5984)

Portrait de gdx

07-12-2022, 01:08

PingPong wrote:

thx, most probably it does not work on screen 4, even if the vdp support 128k

Have you tried changing the value of register #2 for example?

Par NYYRIKKI

Enlighted (6010)

Portrait de NYYRIKKI

07-12-2022, 01:24

gdx wrote:
PingPong wrote:

thx, most probably it does not work on screen 4, even if the vdp support 128k

Have you tried changing the value of register #2 for example?

BASIC does not obey VDP register copies... Only BASE can be used... and those values are limited to 14bits.

Par PingPong

Prophet (4086)

Portrait de PingPong

07-12-2022, 12:53

NYYRIKKI wrote:

TBH I think it was a bit of a design flaw to start messing up with routines like SETWRT or SETRD. They should have left them as they were in MSX1 because they anyway moved in to using NSTWRT and NSETRD variants.

I Agree. And even more than this: the V9938 shoudl had an alternative, more faster, way to set vram, more like the V9990 does.
- The old way was here with the old bios calls.
- The new way has to be used, maybe avoiding some stupid things (like using the higher bits of second byte on #99 port to select the register access instead of vram ptr or to signal read or write). just write out the 17bit address to some other port numbers (new, dedicated ones) and go....