I tried to fix the issue but I’m struggling to understand the bitmap code.
Does anyone else get an issue with having a green stripe along the right side of the sprite?
(Using a fresh copy of the Pokitto lib obtained from the master branch, after ammeding bgcolor(1) to bgcolor = 1. My fork fixing that typo can be found here.)
If you make a short example code that produces the issue we can look at it together. The 4bpp code was a real pain to get working with bitmaps of varying widths, screen edge clipping etc. because its all done by bitshifting. There may well be a special situation still where there is an issue.
I tried some actual games and they didn’t have any issue (though they were ones I had lying around so they’re probably out of date or built with an older version of the library, I’ll grab some fresh copies later to check if nobody else can reproduce this).
Here’s a list of the exact steps I made to reach this.
(Bear in mind I’m on a Windows 8.1 system.)
Download a fresh copy of the PokittoLib (the master branch, as zip).
Close all other projects.
Open the recently downloaded copy of PokittoLib.
Change mygame.display.bgcolor=0; to mygame.display.bgcolor=1;.
Build > Select target > Bitmap.
Build > Clean target.
Build > Build target.
Find the build folder.
Connect the Pokitto.
Turn the Pokitto on.
Put the Pokitto into CRP DISABLD mode.
Copy build/bitmap.bin to the CRP DISABLD drive.
Wait for the copy to finish.
Eject the Pokitto.
Wait for the Pokitto to disconnect.
Turn the Pokitto on and off again.
That’s one of the reasons I gave up looking.
By the time I’ve understood it, someone who already knows how it works could probably have spotted the problem or realised it’s not even in the drawBitmapData function.
I’m fine with shifting and masking, but I don’t know why the odd and even pixel starting lines are treated differently and there’s quite a bit of code to get through.
(Also there’s some other practices I’m not used to, like variables being declared before the scope they’re needed in.)
I am very busy, improving the sound and other things. I am now succesfully transferring data to screen buffer using DMA. So first application of DMA on Pokitto is working, and it means lots of interesting stuff we could do (for example screen scrolling with DMA )