Skip to content

Commit

Permalink
Merge pull request #18 from adekto/patch-1
Browse files Browse the repository at this point in the history
mode15
  • Loading branch information
pokitto committed Mar 25, 2018
2 parents ce488ec + dfd5654 commit c2f733f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
12 changes: 11 additions & 1 deletion Pokitto/POKITTO_HW/HWLCD.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1815,7 +1815,17 @@ for(x=0;x<220;x++)
}
}


void Pokitto::lcdRefreshMode15(uint16_t* pal, uint8_t* scrbuf){
write_command(0x03); write_data(0x1038); //realy only need to call this once
write_command(0x20); write_data(0);
write_command(0x21); write_data(0);

write_command(0x22);
for (int x=0; x<0x4BA0;x++) {
write_data(pal[(((scrbuf[x]) & 0xf0) >> 4)]);
write_data(pal[( (scrbuf[x]) & 0x0f)]);
}
}


void Pokitto::blitWord(uint16_t c) {
Expand Down
3 changes: 3 additions & 0 deletions Pokitto/POKITTO_HW/HWLCD.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ extern void lcdRefreshMode2(uint8_t *, uint16_t*);
extern void lcdRefreshMode3(uint8_t *, uint16_t*);
extern void lcdRefreshModeGBC(uint8_t *, uint16_t*);
extern void lcdRefreshMode13(uint8_t *, uint16_t*, uint8_t);

extern void lcdRefreshMode15(uint16_t*, uint8_t*);


/** Update LCD from 1-bit tile mode */
extern void lcdRefreshT1(uint8_t*, uint8_t*, uint8_t*, uint16_t*);
Expand Down

0 comments on commit c2f733f

Please sign in to comment.