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 »

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: 681
Joined: Thu Jan 25, 2018 9:31 pm

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

Post by hlide »

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 »

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 »

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).
Sharpals
Posts: 27
Joined: Sat Jul 14, 2018 5:39 am

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

Post by Sharpals »

Ok ist very old, but read the manual and you i'll find

PATTERN
( PAT. )
800 Allows the user to define his own graphics pattern. It is used in the form PATTERN [PC,sm]n,text data
The colour specification consists of palette code and superimpose mode, although this can be omitted, in which case the current colour specification will be used. The command must be followed by the number of rows of 8 dots, and the actual format of each row is controlled by the text data which must correspond to the binary representation of the dot patterns.
fitus
Posts: 60
Joined: Tue Jun 12, 2018 8:52 pm

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

Post by fitus »

PATTERN was a very nice feature of Sharp MZ 800 Basic, but it was quite slow, as I remember.
BASIC with direct capability of programmable character generator was X Basic Compiler made by BBG Germany. And this was fast. Some nice games were made in this BASIC compiler- I remember Arkanoids. This was one of the best BASIC modifications made for 8 bit computers, with many features of Pascal. It was available for Sharp MZ 800, 700 and Amstrad CPC
Post Reply