SPAT update on V9990

Página 1/3
| 2 | 3

Por Metalion

Paragon (1625)

Imagen del 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 sesión o register para postear comentarios

Por msd

Paragon (1515)

Imagen del msd

16-10-2022, 14:47

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

Por SjaaQ

Champion (375)

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

Por thegeps

Paragon (1191)

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

Por aoineko

Paladin (1004)

Imagen del aoineko

20-10-2022, 18:20

V9990 SAT entries are also 4 bytes large.

Por Manel46

Paladin (674)

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

Por Manel46

Paladin (674)

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

Por SjaaQ

Champion (375)

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

Por Manel46

Paladin (674)

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

Por aoineko

Paladin (1004)

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

Por SjaaQ

Champion (375)

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

Página 1/3
| 2 | 3