z88dk SP1 software sprite library

The place for codemasters or beginners to talk about programming any language for the Spectrum.
Post Reply
User avatar
PeterJ
Site Admin
Posts: 125
Joined: Thu Nov 09, 2017 7:19 pm
Location: Surrey, UK

z88dk SP1 software sprite library

Post by PeterJ » Mon Nov 20, 2017 8:39 pm

Over the years I have had a go with z88dk. I have a basic grasp of C and have been able to write simple text based routines.

I thought I would have a go with graphics and found the sprite library, but can't find any tutorials or documentation (apart from information as to what it is) online:

https://www.z88dk.org/wiki/doku.php?id= ... prites:sp1

I also found the Spectrum specific functions here:

https://www.z88dk.org/wiki/doku.php?id= ... zxspectrum

Would anybody be willing to share some simple examples? (Especially of the uint zx_attr(uchar row, uchar col) and uint zx_screenstr(uchar row, uchar col) functions)

Thanks in advance.
0 x

User avatar
bob_fossil
Berk
Posts: 31
Joined: Mon Nov 13, 2017 6:09 pm

Re: z88dk SP1 software sprite library

Post by bob_fossil » Mon Nov 20, 2017 10:23 pm

Hi Peter,

I haven't used the SP1 library so far but it is used here, I think:

https://github.com/z88dk/z88dk/tree/mas ... /BlackStar

Can't vouch for the game itself but the source was useful in getting my head around some of the compiler quirks that can arise when using z88dk and assembly code with the sdcc compiler instead of sccz80.

Bob Fossil
0 x

dfzx
Berk
Posts: 14
Joined: Mon Nov 13, 2017 6:55 pm

Re: z88dk SP1 software sprite library

Post by dfzx » Tue Nov 21, 2017 7:54 am

I wrote a series of getting started articles for Z88DK earlier this year, but stopped before doing SP1. It's a rather intimidating library which is poorly documented. The docs which are there appear to be a bit out of date.

The examples and Blackstar source are probably your best bet, but learning a library by reading source code isn't easy.
0 x

User avatar
PeterJ
Site Admin
Posts: 125
Joined: Thu Nov 09, 2017 7:19 pm
Location: Surrey, UK

Re: z88dk SP1 software sprite library

Post by PeterJ » Tue Nov 21, 2017 8:42 am

Would you be able to.post a link to your tutorials? Thanks
0 x

dfzx
Berk
Posts: 14
Joined: Mon Nov 13, 2017 6:55 pm

Re: z88dk SP1 software sprite library

Post by dfzx » Tue Nov 21, 2017 9:42 am

PeterJ wrote:
Tue Nov 21, 2017 8:42 am
Would you be able to.post a link to your tutorials? Thanks
This is the first one:

https://github.com/z88dk/z88dk/blob/mas ... Started.md

Currently 7 in the series.
1 x

User avatar
PeterJ
Site Admin
Posts: 125
Joined: Thu Nov 09, 2017 7:19 pm
Location: Surrey, UK

Re: z88dk SP1 software sprite library

Post by PeterJ » Fri Nov 24, 2017 7:16 am

This really is a fantastic piece of work. Thank you.
0 x

dfzx
Berk
Posts: 14
Joined: Mon Nov 13, 2017 6:55 pm

Re: z88dk SP1 software sprite library

Post by dfzx » Fri Nov 24, 2017 10:49 am

PeterJ wrote:
Fri Nov 24, 2017 7:16 am
This really is a fantastic piece of work. Thank you.
Thank you! It's my only contribution to the Speccy scene so I'm grateful for the appreciation. :)
0 x

hikoki
Berk
Posts: 22
Joined: Thu Nov 16, 2017 10:54 am

Re: z88dk SP1 software sprite library

Post by hikoki » Fri Nov 24, 2017 12:00 pm

Do you know FASE ?
It allows coding in z88dk's C and Boriel Basic. It's said to manage many sprites at 50Hz.
Andy Dansby is writing a game making-of on his blog : http://andyspeccysite.simplesite.com
0 x

andydansby
Berk
Posts: 5
Joined: Fri Nov 24, 2017 5:09 pm

Re: z88dk SP1 software sprite library

Post by andydansby » Fri Nov 24, 2017 5:43 pm

I do have a link for SPLib2 which is older than SP1, but the concepts I believe are the same.

Check out http://www.mojontwins.com/warehouse/splib2-tutorial.pdf

You should be able to carry the concepts of splib to SP1, written by the same person.

I am starting to mess around with FASE, but it always seems to be 1 step forward and 2 steps back. Trying to clear my brain before I start attacking FASE again.

Andy Dansby
1 x

Post Reply