When I do this it copies the sprite 0 (the white x) over my grey circle.
cls(8)
circfill(32,32,5)
memcpy(0x6800,0,0x200)
However, I was trying to write my own data into the sprite bank so the other way;
cls(8)
circfill(32,32,5)
memcpy(0,0x6800,0x200)
And nothing happens. (I hit escape into the sprite editor and it is still the same). Why? Hmm.
I was going to populate it dynamically and make spr() and sspr() calls to it.
I thought generating math stuff into the sprite bank could be fun. Is it read only? Thanks
To flash the contents of RAM back into the cartridge ROM, you have to make an additional call to cstore()--e.g. cstore(0,0,0x200) for your example above.
EDIT: oh yah if you want to populate it dynamically, it's what Catatafish said—the things you draw are there, even if you can't see them when you stop execution. cstore() is a good way to debug the output though and make sure everything's being drawn in the right place.
You can do all of the above, but the reason you aren't seeing it when you check in the editor is that only shows you cart memory, which is separate from runtime memory.
If you go back to the commandline (or your _draw function) and type something like
palt(0,false);spr(0,0,0,16,16)
you'll be able to see what's in your runtime sprite memory at the moment.
I see what you mean. Thanks. I see it in the text now under "Technical note you probably don't need to know this" lol. Cool!
[Please log in to post a comment]