PokittoLib is the library needed for programming the Pokitto DIY game console (www.pokitto.com)
Fork of PokittoLib by
Diff: POKITTO_HW/HWLCD.cpp
- Revision:
- 2:968589ca3484
- Parent:
- 0:e8b8f36b4505
- Child:
- 5:9b96eaceeb30
--- a/POKITTO_HW/HWLCD.cpp Mon Sep 18 12:34:05 2017 +0000 +++ b/POKITTO_HW/HWLCD.cpp Tue Sep 19 08:47:36 2017 +0000 @@ -447,7 +447,7 @@ void Pokitto::lcdRefreshMode2(uint8_t * scrbuf, uint16_t* paletteptr) { uint16_t x,y; uint16_t scanline[2][88]; // read two nibbles = pixels at a time -uint8_t *d, yoffset=0; +uint8_t *d; write_command(0x20); // Horizontal DRAM Address write_data(0); // 0 @@ -527,9 +527,9 @@ } void Pokitto::lcdRefreshMode3(uint8_t * scrbuf, uint16_t* paletteptr) { -uint16_t x,y,xptr; +uint16_t x,y; uint16_t scanline[2][176]; // read two nibbles = pixels at a time -uint8_t *d, yoffset=0; +uint8_t *d; write_command(0x20); // Horizontal DRAM Address write_data(0); // 0 @@ -588,14 +588,14 @@ } void Pokitto::lcdRefreshGB(uint8_t * scrbuf, uint16_t* paletteptr) { -uint16_t x,y,xptr; +uint16_t x,y; uint16_t scanline[48]; uint8_t * d; #if POK_STRETCH -xptr = 8; +//uint16_t xptr = 8; #else -xptr = 26; +//xptr = 26; #endif write_command(0x20); // Horizontal DRAM Address @@ -820,13 +820,13 @@ void Pokitto::lcdRefreshAB(uint8_t * scrbuf, uint16_t* paletteptr) { -uint16_t x,y,data,xptr; +uint16_t x,y; uint16_t scanline[64]; -uint8_t *d, yoffset=0; +uint8_t *d; //lcdClear(); #if POK_STRETCH -xptr = 14; -yoffset = 24; +uint16_t xptr = 14; +uint8_t yoffset = 24; #else xptr = 0; //was 26 #endif @@ -1072,11 +1072,12 @@ void Pokitto::lcdRefreshT1(uint8_t* tilebuf, uint8_t* tilecolorbuf, uint8_t* tileset, uint16_t* paletteptr) { +#ifdef POK_TILEMODE uint16_t x,y,data,xptr; uint16_t scanline[176]; uint8_t yoffset=0, tilebyte, tileindex, tilex=0, tiley=0,xcount; -#ifdef POK_TILEMODE + if (!tileset) return; #if LCDWIDTH < POK_LCD_W