Page 1 of 3

Super Sprite Generator issues

Posted: Fri Oct 09, 2020 7:32 pm
by Andrew
I started to play a bit with SuperSprite Generator v4.0 and encountered some issues.
Has anyone any ideas how to fix these? Is there something wrong in my code ?
Or is it a bug in sprite_code ?
Can someone check sprite_code ? I can provide the asm code, but I am helpless at assembler

Desription of bugs

The manual says:
Its main features are:
* Up to 16 different sprites on the screen at a time.
* Up to 256 sprites can be available at any one time.
Issues that I found:

1. Only 15 sprites on the screen at a time: if you try to have 16 then the first sprite is not drawn
Run program Test_bas (edit line 1 to set your path)
At first run when asked "Number of sprites (15 or 16):" input 15
Press space to have the next sprite drawn on the screen
The program will draw 15 sprites at in the correct positions

At second run use run 290 (or reset QL, load Test_bas and Run)
At first run when asked "Number of sprites (15 or 16):" input 16
Press space to have the next sprite drawn on the screen
Sprite 1 will not be drawn
Sprite 2 will be drawn but at incorrect position
Sprites 3 to 16 will be drawn at correct position

2. Documentation says that you can have up to 16 sprites animated on the screen and up to 256 total sprites (up to 240 sprites off-screen, that can be shown on screen only when swaped with an on-screen sprite)
I could not find a way to do a swap. Only first swap works, but subsequent swaps will not work ok, They will not raise an error, but nothing will be drawn on screen
The test program Test_2 bas loads 20 sprites and the first 10 are set to active (can be shown on-screen)
Then it swaps sprite 3 with 17 - and will draw sprite 17
press space
Then it swaps sprite 18 with 17 (which we set on-screen) - and will draw sprite 18
etc
Only first swap works - but not the others
Sometimes the QL freezes after 3-4 swaps

Observation:
Same bugs found in both SSG v4.0 and SSG v3.0
I only know of 2 programs written with SSG - Night Nurse and Cavern Frenzy. Both are using only 11 sprites. The sprite_code they use is SSG v4.0 and has the same issues.

Re: Super Sprite Generator issues

Posted: Sat Oct 10, 2020 10:10 am
by RWAP
It is worth sharing the assembler - it sounds as though 16 bytes was supposed to be sprite 0 to sprite 15 (rather than 1 to 16).

The swap suggests that the it is not a double swap - ie the unused sprite overwrites the used one, but does not store the original sprite in the unused area.

Re: Super Sprite Generator issues

Posted: Sat Oct 10, 2020 11:29 am
by Andrew
RWAP wrote:It is worth sharing the assembler - it sounds as though 16 bytes was supposed to be sprite 0 to sprite 15 (rather than 1 to 16).

The swap suggests that the it is not a double swap - ie the unused sprite overwrites the used one, but does not store the original sprite in the unused area.
I thought of that - but any call with sprite 0 results in "bad parameter"

I believe the swap is just a logical swap in the list with sprite numbers / pointers - but the sprite definitions (pixels and colors) are not swaped.

The code:

Re: Super Sprite Generator issues

Posted: Sat Oct 10, 2020 8:11 pm
by Derek_Stewart
Hi,

I started to disassemble the SPRITE_CODE extensions, but I see ghis has already been done.

I have a look at the disassembley to see if I see anything.

Re: Super Sprite Generator issues

Posted: Sat Oct 10, 2020 9:05 pm
by Andrew
Derek_Stewart wrote: I have a look at the disassembley to see if I see anything.
Thank you very much Derek! I am totally usesless when it comes to assembler - and we need a working sprite library for the QL!

Re: Super Sprite Generator issues

Posted: Wed Oct 14, 2020 12:06 pm
by Tesla
Does SSG 4.0 work with rom Minerva? I have SSg 3.0 but never I tested it. :(

Cheers, Marco

Re: Super Sprite Generator issues

Posted: Wed Oct 14, 2020 2:28 pm
by Andrew
The sprite_code for SSG3 and SSG4 work with Minerva, but suffers of the same bugs described in my first post
But the programs for creating sprites (Design and Construct) need JS ROM

Re: Super Sprite Generator issues

Posted: Sat Oct 24, 2020 7:58 pm
by Andrew
Did anyone had time to check the SSG asm code ? Pretty please with sugar on top !

Re: Super Sprite Generator issues

Posted: Sat Oct 24, 2020 9:39 pm
by dilwyn
I had a look at SSG 4.0 sources, but it's all uncommented assembler, so would have taken far too much time, even if I could understand it, sorry.

Dilwyn

Re: Super Sprite Generator issues

Posted: Sun Oct 25, 2020 8:16 pm
by Derek_Stewart
Hi,

I had a look at the disassembley and tried disassembling the SSG Sprite extensions, with DISA.

I am trying to understand what the code is doing, still in progress I am afraid.

There are other sprite systems, is it worth considering?

Can QPTR Sprites be used in games?