Question about sprite mode 2

By Max-me

Supporter (10)

Max-me's picture

13-02-2022, 14:39


I want to use sprite mode 2 in order to put more than 4 sprites in a row on screen 2 (when running on an MSX2 or higher). According the specification it should be sufficient to write 010 to M5 M4 M3 (in stead of 001), but when I do this the sprites are messed up (i.e. wrong locations on the screen). I know the color attribute is no longer used for mode 2 (since it has a separate sprite color table) and that filed is marked as unused, but I would expect it other than that the sprite attribute table to be compatible with mode 1.

Is there something more that needs to be changed?

Login or register to post comments

By Grauw

Ascended (10581)

Grauw's picture

13-02-2022, 14:48

In sprite mode 2 the attribute + colour table size and alignment is changed from 128 bytes to 1024 bytes. Bits A7-A9 in register 5 have turned from an offset into mask bits and must be 1 unless you want mirroring to occur. See page 93 of the V9938 application manual.

So if you set bits A7-A9 to 1, and make sure the colour table is aligned to a multiple of 1024 (e.g. 1C00H) and the attribute table to a multiple of 1024 + 512 (e.g. 1E00H), I think it will solve your issue.

By Max-me

Supporter (10)

Max-me's picture

13-02-2022, 14:49

Ah great thanks. BTW I also noticed by coincidence a difference between the wiki and the application manual for R1:
The wiki states bit4 is M2 and bit3 is M1, but the application manual states it the other way around.

Which one is correct here? For me it doesn't matter for now since both are 0, but it looks like one of the two is wrong.

By mars2000you

Enlighted (6221)

mars2000you's picture

13-02-2022, 14:58

You are probably right, see this page before it was modified by other people: