Previous 15994 Revisions Next

r1459 Sunday 30th December, 2007 at 19:33:45 UTC by Wilbert Pol
[GBCOLOR] In some cases writing to the STAT register triggers an interrupt.
[src/mess/video]gb.c

src/mess/video/gb.c
r1458r1459
17011701      break;
17021702   case 0x01:      /* STAT - LCD Status */
17031703      data = 0x80 | (data & 0x78) | (LCDSTAT & 0x07);
1704      if ( LCDCONT & 0x80 ) {
1705         /*
1706            - 0x20 -> 0x08/0x18/0x28/0x48 (mode 0, after m2int) - trigger
1707         */
1708         if ( gb_lcd.mode_irq && gb_lcd.mode == 0 && ( LCDSTAT & 0x28 ) == 0x20 && ( data & 0x08 ) ) {
1709            cpunum_set_input_line(0, LCD_INT, HOLD_LINE);
1710         }
1711      }
17041712      break;
17051713   case 0x07:      /* BGP - GB background palette */
17061714      /* Some GBC games are lazy and still call this */

Previous 15994 Revisions Next


© 1998-2018 The MESS Team