0 Members and 1 Guest are viewing this topic.
memset(SCREEN_BASE_ADDRESS, 0xFF, 320*240);
memcpy (SCREEN_BASE_ADDRESS + SCREENOFFSET, screens[0], SCREENWIDTH*SCREENHEIGHT);
memset(SCREEN_BASE_ADDRESS, 0x00, 320*240);
This might be it! :A screen buffer is equal to SCREEN_WIDTH*SCREEN_HEIGTH/2, so this would be 320*240/2, not 320*240Try using the constant "SCREEN_BYTES_SIZE" for the third argument of memcpy!
Quote from: apcalc on January 31, 2011, 03:23:23 pmThis might be it! :A screen buffer is equal to SCREEN_WIDTH*SCREEN_HEIGTH/2, so this would be 320*240/2, not 320*240Try using the constant "SCREEN_BYTES_SIZE" for the third argument of memcpy! The screen buffer's that size only if you're in 4bpp mode... I'm using 8bpp (so I don't have to bother with nibble->byte conversion), where the screen buffer is indeed 320*240 (hence using SCREEN_BYTES_SIZE gives you only half the screen in this mode).