SPAT update on V9990

صفحة 1/3
| 2 | 3

بواسطة Metalion

Paragon (1628)

صورة 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 أوregister لوضع تعليقاتك

بواسطة msd

Paragon (1532)

صورة msd

16-10-2022, 14:47

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

بواسطة SjaaQ

Champion (381)

صورة 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).

بواسطة thegeps

Paragon (1251)

صورة 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...

بواسطة aoineko

Paragon (1137)

صورة aoineko

20-10-2022, 18:20

V9990 SAT entries are also 4 bytes large.

بواسطة Manel46

Paladin (674)

صورة 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...

بواسطة Manel46

Paladin (674)

صورة 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...

بواسطة SjaaQ

Champion (381)

صورة 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.

بواسطة Manel46

Paladin (674)

صورة 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.

بواسطة aoineko

Paragon (1137)

صورة 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.

بواسطة SjaaQ

Champion (381)

صورة 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.

صفحة 1/3
| 2 | 3