SPAT update on V9990

Page 1/3
| 2 | 3

By Metalion

Paragon (1622)

Metalion's picture

16-10-2022, 14:41

Hi everyone,

Usually, on classic VDP, you may easily update the SPAT during VBLANK, as there is only 32 entries.
With the V9990, you have 125 entries, which make for a longer update (I came up with a code taking 12600 cycles).

Is there another technique ?
Maybe splitting the update between 2 frames ?

Login or register to post comments

By msd

Paragon (1510)

msd's picture

16-10-2022, 14:47

You could store the spat update data in vram and use a vdp copy to update

By SjaaQ

Champion (372)

SjaaQ's picture

16-10-2022, 19:34

Keep a buffer in RAM and use OTIR to update it. Have the game logic update the RAM buffer whenever it wants.

If I calculate it correctly it's 125 * 4 bytes * 22 t states per byte = 11.000 t states for all 125 sprites.

You can do it even quicker by putting rolling out the OTIR to 500 seperate OUTI commands (8500 t states).

By thegeps

Paragon (1175)

thegeps's picture

20-10-2022, 15:34

Well, obviously you have to update 125 entries (don't know if each one has 4 like classic VDP or more bytes) only if you use 125 sprites... if you don't need such big quantity you can update less...

By aoineko

Paladin (899)

aoineko's picture

20-10-2022, 18:20

V9990 SAT entries are also 4 bytes large.

By Manel46

Paladin (674)

Manel46's picture

21-10-2022, 09:32

Writing on the V9990 is very fast. See this demo with all the sprites, which, of course, we are updating 125*4 bytes at each step.
We move them all together with the cursors.
https://drive.google.com/file/d/1SKecxhDEoCgdk73Kh-MZp28vA2P...

By Manel46

Paladin (674)

Manel46's picture

21-10-2022, 09:43

In case the Google Drive link doesn't work, I put this one from Mega.
https://mega.nz/file/uxkm1IYS#QhrHoofh-trtUP1CQ0AAC8JIi-Lk-i...

By SjaaQ

Champion (372)

SjaaQ's picture

21-10-2022, 16:16

Not sure how this demo demonstrates what the problem and/ or solution is. I just see 125 static sprites.

By Manel46

Paladin (674)

Manel46's picture

21-10-2022, 17:19

They are not static, they move with the cursors.
It demonstrates how fast it is to update all 125 sprites at each step.

By aoineko

Paladin (899)

aoineko's picture

21-10-2022, 18:47

Write 500 bytes take a significant amont of time on the CPU side. Nothing problematic for a tech demo but still big for a real game. But the real problem is on the gameplay side: updating 125 entities can take a huge amont of time depending on the gameplay needs. For example, don't expect to throw 100 bullets and to be able to check collision on them each frame.

By SjaaQ

Champion (372)

SjaaQ's picture

22-10-2022, 09:49

Manel46 wrote:

They are not static, they move with the cursors.
It demonstrates how fast it is to update all 125 sprites at each step.

Ah I see. Tried several keys, but not the cursor keys.

Page 1/3
| 2 | 3