I've been looking at the ASM code of NIRVANA, and while NIRVANAENGINE.txt mentions NIRVANA_spriteT, it doesn't appear in the ASM listing. I can see the (presumably modified elsewhere) code for the eight tiles of drawing near the top of main_engine, but I can't see either NIRVANA_spriteT nor any other code that appears to modify the tile drawing calls.
Have I missed something? Is there better documentation or examples / tutorials somewhere?
NIRVANA NIRVANA_spriteT routine… where?
Re: NIRVANA NIRVANA_spriteT routine… where?
This is one for @Einar Saukas.
I don't know why that section of the code isn't labelled, but knowing Einar I suspect there will be a reason for it. Whenever I've used Nirvana, I used my own routine the poke the addresses in the draw routine from 56468.
I don't know why that section of the code isn't labelled, but knowing Einar I suspect there will be a reason for it. Whenever I've used Nirvana, I used my own routine the poke the addresses in the draw routine from 56468.
Re: NIRVANA NIRVANA_spriteT routine… where?
I just found there's a serviceable NIRVANAspriteT routine in the ZX Basic interface linked to from here.
- Einar Saukas
- Bugaboo
- Posts: 3169
- Joined: Wed Nov 15, 2017 2:48 pm
Re: NIRVANA NIRVANA_spriteT routine… where?
My apologies for not explaining it better in the manual!
The section of the manual about "NIRVANA API" doesn't refer to the source code. It refers to the provided API for ZX Basic (available from the link you mentioned) and z88dk (currently inside the official z88dk distribution).
If you are programming in Assembly and looking directly at the NIRVANA source code, it's more straightforward to POKE these "sprites" directly, instead of calling a routine to POKE them for you.
Anyway using the ZX Basic interface as reference is a great idea. Notice that this API shows 2 different ways to calculate these POKE addresses: reimplementing function NIRVANAspriteT or POKEing addresses provided by macros SPRITECOL, SPRITELIN, SPRITEVAL.
The section of the manual about "NIRVANA API" doesn't refer to the source code. It refers to the provided API for ZX Basic (available from the link you mentioned) and z88dk (currently inside the official z88dk distribution).
If you are programming in Assembly and looking directly at the NIRVANA source code, it's more straightforward to POKE these "sprites" directly, instead of calling a routine to POKE them for you.
Anyway using the ZX Basic interface as reference is a great idea. Notice that this API shows 2 different ways to calculate these POKE addresses: reimplementing function NIRVANAspriteT or POKEing addresses provided by macros SPRITECOL, SPRITELIN, SPRITEVAL.