trs-80 target - Graphics for animation and sprites

Discussion about other targets
Post Reply
pedgarcia
New member
Posts: 3
Joined: Tue Nov 10, 2020 11:04 pm

trs-80 target - Graphics for animation and sprites

Post by pedgarcia »

Hi,

I am beginning to experiment with z88dk creating some graphics/animation for the TRS-80 Model 3. At first, I create a very slow sprite function using plot/unplot but I am not happy with the results.

I noticed that there are sprite related functions in the SDK, but it is my understanding they are not meant for the TRS-80 low-res graphics. I wonder if there is something already out there that shows how to design a sprite function..

Did anyone here manage to do something similar for this platform?

Thanks!
User avatar
dom
Well known member
Posts: 1194
Joined: Sun Jul 15, 2007 10:01 pm

Re: trs-80 target - Graphics for animation and sprites

Post by dom »

The putsprite() function should work on the TRS80, it similarly uses plot/unplot but may well be a bit quicker than what you've written, however, given that we're printing characters rather than pixels there's only so fast it can go!

It's possible to create optimised putsprite() functions for a target, for example, the Colour Genie has one, but I can't see anything for a vanilla TRS80.
pedgarcia
New member
Posts: 3
Joined: Tue Nov 10, 2020 11:04 pm

Re: trs-80 target - Graphics for animation and sprites

Post by pedgarcia »

Thanks, dom, I will take a look at putsprite. I was trying to use the "bksave" first, but I got all sorts of errors so I assume these functions weren't supported.

I just found under examples folder a graphics folder so I was trying to compile the spritest.c with the command:

Code: Select all

zcc +trs80 -vn spritest.c -create-app -subtype=disk -lndos -lm -o spritest
But I got these errors:

Code: Select all

Error at file 'getsprite.asm' line 59: symbol 'pixeladdress' not defined
Error at file 'getsprite.asm' line 105: symbol 'pixeladdress' not defined
Errors in source file /Users/pgarcia/_privcloud/z88dk/lib/config/../..//lib/target/trs80/classic/trs80_crt0.asm:
Error at file 'getsprite.asm' line 59: symbol 'pixeladdress' not defined
Error at file 'getsprite.asm' line 105: symbol 'pixeladdress' not defined
Am I missing a parameter or something? (Not sure if matters but I am using macOS with zcc version v16905-8b62708-20200825)

Thanks again

Paulo
pedgarcia
New member
Posts: 3
Joined: Tue Nov 10, 2020 11:04 pm

Re: trs-80 target - Graphics for animation and sprites

Post by pedgarcia »

I just found some examples that are working (wall, dstar, microman). I think I can now have a better understanding of the putsprite function!

Thanks
Post Reply