Previous 15994 Revisions Next

r1586 Monday 21st January, 2008 at 23:33:16 UTC by Wilbert Pol
[GBCOLOR] Small fix to prevent timing problems during hdma.
[src/mess/video]gb.c

src/mess/video/gb.c
r1585r1586
6464static UINT8   *gbc_chrgen;   /* Character generator           */
6565static UINT8   *gbc_bgdtab;   /* Background character table    */
6666static UINT8   *gbc_wndtab;   /* Window character table        */
67static int      gb_do_not_check_time;
6768
6869struct layer_struct {
6970   UINT8  enabled;
r1585r1586
11451146   int   i;
11461147   int vram_size = 0x2000;
11471148
1149   gb_do_not_check_time = 0;
11481150   switch( mode ) {
11491151   case GB_VIDEO_CGB:   vram_size = 0x4000; break;
11501152   }
r1585r1586
12831285static void gbc_hdma(UINT16 length) {
12841286   UINT16 src, dst;
12851287
1288   gb_do_not_check_time = 1;
12861289   src = ((UINT16)HDMA1 << 8) | (HDMA2 & 0xF0);
12871290   dst = ((UINT16)(HDMA3 & 0x1F) << 8) | (HDMA4 & 0xF0);
12881291   dst |= 0x8000;
r1585r1586
12991302      HDMA5 = 0xff;
13001303      gbc_hdma_enabled = 0;
13011304   }
1305   gb_do_not_check_time = 0;
13021306}
13031307
13041308static void gb_increment_scanline( void ) {
r1585r1586
18071811
18081812/* Make sure the video information is up to date */
18091813void gb_video_up_to_date( void ) {
1814   if ( gb_do_not_check_time ) {
1815      return;
1816   }
18101817   timer_set_global_time(timer_get_time());
18111818}
18121819

Previous 15994 Revisions Next


© 1998-2018 The MESS Team