Sporadic Posted November 23, 2015 Share Posted November 23, 2015 (edited) Hi all, I have been messing around with poking the blitter from rb+. The ultimate goal is to either draw coloured lines or copy a chunk of a sprite to another sprite. In a simple program I have got this to work with a sprite copy to another sprite and i've drawn a line (and block of colour) over a sprite too. However, I wanted to start using these functions within a loop as a test before using them proper for a game but it seems I get weird behavour/crashes. I have attached an example rb+ project. What it does (for testing purposes) is to copy the top half of a sprite over to another sprite, then it should repeat. If you run the program as is, you will see this effect working. It loops 32 times and calls " LPOKE B_CMD,LFU_REPLACE|SRCEN " which copies a line and advances to the next line ready for the next iteration. If you then edit the listing and uncomment out the c=0 near the bottom of the listing, you will see the screen just clears and nothing can be seen. I know ultimately, adding that line in won't visually show anything different because the sprite will just copy over the top of the destination again but it shouldn't make anything disappear either! I would expect the c=0 to force it to start from the top again and copy the top half again. Separately, if you uncomment the vsync at the bottom, you will also see the sprites for a moment and then they vanish. You don't need the vsync to see all the blitter pokes but if this gets incorporated into a game then I imagine I will need a vsync for other sprites to update etc. So there looks like 2 separate problems here. Any help greatly appreciated! Thanks blitter.zip Edited November 23, 2015 by Sporadic Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.