SPAT update on V9990

Page 1/3
| 2 | 3

Par Metalion

Paragon (1622)

Portrait de Metalion

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 ou Inscrivez-vous pour poster

Par msd

Paragon (1510)

Portrait de msd

16-10-2022, 14:47

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

Par SjaaQ

Champion (372)

Portrait de SjaaQ

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).

Par thegeps

Paragon (1176)

Portrait de thegeps

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...

Par aoineko

Paladin (899)

Portrait de aoineko

20-10-2022, 18:20

V9990 SAT entries are also 4 bytes large.

Par Manel46

Paladin (674)

Portrait de Manel46

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...

Par Manel46

Paladin (674)

Portrait de Manel46

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...

Par SjaaQ

Champion (372)

Portrait de SjaaQ

21-10-2022, 16:16

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

Par Manel46

Paladin (674)

Portrait de Manel46

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.

Par aoineko

Paladin (899)

Portrait de aoineko

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.

Par SjaaQ

Champion (372)

Portrait de SjaaQ

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