Log In  

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

P#36793 2017-01-27 22:11 ( Edited 2017-01-28 19:20)

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.

P#36794 2017-01-27 22:22 ( Edited 2017-01-28 18:34)

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.

P#36795 2017-01-27 22:31 ( Edited 2017-01-28 09:04)

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!

P#36817 2017-01-28 14:20 ( Edited 2017-01-28 19:20)

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-03-28 20:52:22 | 0.010s | Q:17