GB IO: Pass more video registers to the video renderer

This commit is contained in:
Jeffrey Pfau 2016-01-19 22:08:46 -08:00
parent e4a17e12f4
commit dabc92bf5f
1 changed files with 10 additions and 0 deletions

View File

@ -56,8 +56,18 @@ void GBIOWrite(struct GB* gb, unsigned address, uint8_t value) {
return;
case REG_LCDC:
// TODO: handle GBC differences
value = gb->video.renderer->writeVideoRegister(gb->video.renderer, address, value);
GBVideoWriteLCDC(&gb->video, value);
break;
case REG_SCY:
case REG_SCX:
case REG_WY:
case REG_WX:
case REG_BGP:
case REG_OBP0:
case REG_OBP1:
value = gb->video.renderer->writeVideoRegister(gb->video.renderer, address, value);
break;
case REG_STAT:
GBVideoWriteSTAT(&gb->video, value);
break;