5th sprite horizontal ...

By DanySoft

Champion (394)

DanySoft's picture

15-02-2014, 20:42

Hello,
I still do not quite understand how to program the software 5 ° / 8 ° sprites! Evil

I've searched the forum, but "sprflick.asm" does not exist.
I need to block all the sprites before they "disappear" from the screen after horizontal row in a maximum of 4/8 sprites.

I need a software to be able to attach asm in my games if need be!

A greeting. Smile
DanySoft

Login or register to post comments

By DanySoft

Champion (394)

DanySoft's picture

18-02-2014, 18:31

No interested in my post?

I do not understand the method of the flag of the 5/8 sprites:
the voice of the VDP which gives a 6-bit is on or off, giving the
information about sprites.

It is not yet clear if I have to rearrange the sprites doing a swap or a forward displacement of the layot​​.

So I can solve the problem:
- Not I program with more sprites if only runs on MSX1!
- Runs with shadows (non-spritehardaware) that I can change
the size of width / height in 32x14, 16x32, 16x16, etc. ...
- Turns on MSX1 games with sprites as part of v9990
because it solves the problems of the 4/8 sprites!

Bye bye
DanySoft Evil

By Daemos

Paragon (1649)

Daemos's picture

18-02-2014, 19:06

I believe to get the 5th sprite to work. You need to read out the 5th sprite flag. I have not done this myself but I believe that you need to read this flag each time you update your spritedata to see if you have reached the 5th sprite on one line limit. Once you detect in your update that you have a 5th sprite on 1line you need to start alternating between the sprites. So on the 1st frame you show the 4th sprite on the 2th frame remove it and show the 5th sprite.

Each sprite that gets added requires more alternating. How you solve that problem however is beyond my experience. As I said I never implemented 5th and 9th sprite routines myself.

Hope this info helps.

By flyguille

Prophet (3028)

flyguille's picture

18-02-2014, 20:07

hi DanySoft, sometimes MRC is not so helpfull, I experimented that fact myself.

About sprites, the VDP will inform if there is a 5th or an 9th sprite in the same horizontal line, and points out the first sprite plane that can't be shown.

Normaly if you does nothing, that 5th or 9th sprite never will be shown!.

But your program can recongnize the problem reading the VDP's status register, and resort the sprite planes assignament.

So the trick is, if there will be one sprite that can't be shown at its current XY, better hid by just one FRAME and not forever, and on the next frame lets that another sprite gets hide and that will lets the previous hidden sprite gets shown on screen. This way, all the sprite on the same horizontan line will be flicking but atleast all will be shown.

Now programming a game with dynamic sprite plane assignament is harderd than just say, sprite plane 0 & 16 = main player, 1 to 4 = bullets, etc. Dinamically reasignament of sprite planes on each frame requires some sort of lookup table, to do the assignament and then to copy that to the SAT starting at a different table element each frame. Then when you test sprite collision you needs to take that in account to know wich character collides. This is like one layer more in the sprite handling. You can chose if rounds the plane assignament all the time, or only when the VDP says that there is a sprite hidden.

Anyway, example: lets assume that the VDP say , that the sprite plane #6 is hidden, it will need to see in the lookup table wich element is currently assigned to the #6 plane, and for the next frame take the choise to start from that element and copy to the SAT plane 0, dump all the table, and round, as a cyclic buffer.

for this porpose the program must store in a variable the current start element that correspond to the SAT plane =0 .

so,

Element = (VDP_SPRITE_HIDDEN_READED_FROM_STATUS_REG - CurrentStartElement) and 1Fh

CurrentStartElement = element

and this is the pseudocode.

For sprite collision reads, the same.

Element = ( VDP_SPRITE_COLLIDES_READED - CurrentStartElement ) and 1Fh

element = the sprite that collides.

By gasparrini

Champion (287)

gasparrini's picture

18-02-2014, 20:08

Hello Danysoft,

I have a programm basic which manage the 8 sprites on same line for MSX1 SCREEN1 and SCREEN2
because it work between a register of the VDP with a little flickers.....

If you want, I can send you my programm basic.

For now is all....
(^_^) AG.

By DanySoft

Champion (394)

DanySoft's picture

18-02-2014, 23:46

Ok, but relates to the missing source the file sprflick.asm.
Your link is not available, (but I found a ROM type) But there is someone else had already downloaded a copy of the source?

That source with the 4th selection did magnificently display all the sprites in a row horizontally up to 16
(4 are visible and the rest will blink but visible)

It's called sprflick.asm or spriteflick.asm.

Bye bye
DanySoft
DanySoft

By flyguille

Prophet (3028)

flyguille's picture

19-02-2014, 00:07

DanySoft wrote:

Ok, but relates to the missing source the file sprflick.asm.
Your link is not available, (but I found a ROM type) But there is someone else had already downloaded a copy of the source?

That source with the 4th selection did magnificently display all the sprites in a row horizontally up to 16
(4 are visible and the rest will blink but visible)

It's called sprflick.asm or spriteflick.asm.

Bye bye
DanySoft
DanySoft

reassigning only the 4th sprite plane for the rest of the sprites that are in the same line, will allow tricks like, flicking only the outline of the characters but not the main pattern of the character. But that needs more smart usage of the sprite planes.

like dividing characters into forecolour and outline planes, and then prioritizing the forcolour of the characters, lets the outlines and fine details flicking.

By jltursan

Prophet (2079)

jltursan's picture

19-02-2014, 21:21

I'm sorry, my old page went bust when I changed my ISP and this file was hosted there.

I've uploaded again and it's available here: sprflick.asm

The ROM is also downloadable here

By anonymous

incognito ergo sum (109)

anonymous's picture

19-02-2014, 22:17

one of the easiest ways to do sprite flickering is to fill in the sprite attributes in opposite order each frame. so even frames 0 to 31, and odd frames 31 to 0.

you could even keep two tables, so you don't have to write the whole table every frame.

this *really* simple method allows you to do double the amount of sprites per line. After this double amount, sprites will still disappear, and in that case you will need a more complicated method like rotating (perhaps combined with this method)

By DanySoft

Champion (394)

DanySoft's picture

21-02-2014, 20:38

Ok: Big smile
the source was recovered and stored safely.
I thank you for your cooperation.

In this sprflick.asm, I take the routines n. 4, such as adapter sprites for all the games that I program myself.

Thank Infinite!! Wink
DanySoft

My MSX profile