how to do software sprites for MZ-800?

Post Reply
KnaxMax
Posts: 19
Joined: Mon Feb 05, 2018 3:53 pm
Location: Munich - Germany

how to do software sprites for MZ-800?

Post by KnaxMax » Wed Feb 14, 2018 9:32 am

Hi,

I always wondered how software sprites could be done efficiently for the MZ-800 graphics mode. It seems a lot of Sharp games used MZ-700 character mode and PCG.

With "software sprite" I mean small 8x8 or 16*16 bitmaps that can be freely positioned, have a transparent color where the background is still visible, can restore the background and my have collision detection and configurable layering.

Are there any tutorials that show how this was achieved with other Z80 machines with similar bitmap graphics?

What is an estimate how many 8x8 sprites could be (re)drawn in the vertical blank period for 4 color mode or 16 color mode?

How to do horizontal pixel positioning? Is it fast enough to use rotate instructions or have precomputed/saved all 8 positions?

hlide
Posts: 313
Joined: Thu Jan 25, 2018 9:31 pm

Re: how to do software sprites for MZ-800?

Post by hlide » Wed Feb 14, 2018 12:56 pm

From what I read somewhere, drawing pixels on MZ-800 is painfully slow. So, probably a reason why there are few games with true pixel drawing.

goev
Posts: 18
Joined: Wed Jan 17, 2018 9:33 pm

Re: how to do software sprites for MZ-800?

Post by goev » Wed Feb 14, 2018 1:46 pm

I believe it uses ports to write to v-ram, in that case there will probably be many reads and writes in order to move a sprite.
I tried to find more info about the actual videomodes, but couldn't find much info...

Anyone with better knowledge about this that could write a few words?

KnaxMax
Posts: 19
Joined: Mon Feb 05, 2018 3:53 pm
Location: Munich - Germany

Re: how to do software sprites for MZ-800?

Post by KnaxMax » Wed Feb 14, 2018 2:25 pm

goev wrote:
Wed Feb 14, 2018 1:46 pm
I believe it uses ports to write to v-ram, in that case there will probably be many reads and writes in order to move a sprite.
I tried to find more info about the actual videomodes, but couldn't find much info...

Anyone with better knowledge about this that could write a few words?
It's not as bad. The IO ports are used to switch in the VRAM bank at 8000H and setup write/read modes.

But I have no idea if this modes are very helpful for other stuff than XOR or setting single pixels in a specific color.
For sprites normal read/write memory access would be separated per 'bitplane', which surely will be slow for 16 color mode.

In 4 color mode it would be possible to do double buffering (with the 16KB VRAM extension).

Post Reply