copying sprites from VRAM to VRAM

Page 1/2
| 2

By Daemos

Paragon (2044)

Daemos's picture

21-11-2013, 13:48

The title doesn' t explain too well but here is the deal. I don't want to copy around any data from RAM to VRAM to update the sprites in my engine. This is consuming too much T states on the outi's so I need a very rapid and easy method to update my sprites.

I allready have been brainstorming around a little. I have 2 pages of VRAM left so I can copy all my sprite color and character data in there. Now I need to tell the VDP to use a particular sprite from that piece of VRAM at each update.

1.) is this possible?
2.) any hint on how?

Login or register to post comments

By Maggoo

Paragon (1217)

Maggoo's picture

21-11-2013, 14:16

Yes it is possible. Are you working in a screen mode that support hardware commands (hmmm)?

You just need to store all your sprites data in the availlable pages and know to which x/y position correcponds the location pf your sprites data. The issue is that often you have to copy the pattern and color attributes separately since they are not stored in the same vram location.

By Daemos

Paragon (2044)

Daemos's picture

21-11-2013, 14:53

screen4. I think HMMM works in screen4. Not sure though..

By Guillian

Prophet (3516)

Guillian's picture

21-11-2013, 16:01

You can also change the sprite base address.

By Hrothgar

Champion (479)

Hrothgar's picture

21-11-2013, 16:50

By ARTRAG

Enlighted (6923)

ARTRAG's picture

21-11-2013, 17:20

http://www.msx.org/forum/development/msx-development/vdp-com...

It is solid code you can download from mrc

By Daemos

Paragon (2044)

Daemos's picture

21-11-2013, 18:54

thank you very much. I will look into it and see what I can make of it.

By ARTRAG

Enlighted (6923)

ARTRAG's picture

22-11-2013, 09:03

use VTEST with a plain z80
It does not support any kind of turbo

By Daemos

Paragon (2044)

Daemos's picture

22-11-2013, 19:38

looks pretty clear. Nice code. All I have to do is convert the memory adresses to coordinates and I am off to go Smile

By Daemos

Paragon (2044)

Daemos's picture

22-11-2013, 22:16

Sad it seems page 2 and 3 are in use. I can still get away with it if I try to copy the entire tileset we use in page 2 and 3 to empty spaces in page 0 and 1 and use HMMM copys to do the tileanimations. What I don't know is if the HMMM copy is fast enough to pull this off during hblank.

Page 1/2
| 2