Previous 15994 Revisions Next

r5793 Friday 18th September, 2009 at 18:20:23 UTC by Wilbert Pol
[SUPERGB] Removed special video initialization code. The bios now sets up the video hardware.
[src/mess/video]gb.c

src/mess/video/gb.c
r5792r5793
12871287   }
12881288
12891289   LCDSTAT = 0x80;
1290   LCDCONT = 0x00;
1290   LCDCONT = 0x00;      /* Video hardware is turned off at boot time */
12911291   gb_lcd.current_line = CURLINE = CMPLINE = 0x00;
12921292   SCROLLX = SCROLLY = 0x00;
12931293   SPR0PAL = SPR1PAL = 0xFF;
r5792r5793
13481348      /* set the scanline update function */
13491349      update_scanline = sgb_update_scanline;
13501350
1351      /* Initialize part of VRAM. This code must be deleted when we have added the bios dump */
1352      for( i = 1; i < 0x0D; i++ )
1353      {
1354         gb_vram[ 0x1903 + i ] = i;
1355         gb_vram[ 0x1923 + i ] = i + 0x0C;
1356      }
1357      gb_vram[ 0x1910 ] = 0x19;
1358
1359      /* Make sure the VBlank interrupt is set when the first instruction gets executed */
1360      timer_set(machine,  cputag_clocks_to_attotime(machine, "maincpu", 1), NULL, 0, gb_video_init_vbl );
1361
1362      /* Initialize some video registers */
1363      gb_video_w( space, 0x0, 0x91 );    /* LCDCONT */
1364      gb_video_w( space, 0x7, 0xFC );    /* BGRDPAL */
1365      gb_video_w( space, 0x8, 0xFC );    /* SPR0PAL */
1366      gb_video_w( space, 0x9, 0xFC );    /* SPR1PAL */
1367
1368      CURLINE = gb_lcd.current_line = 0;
1369      LCDSTAT = ( LCDSTAT & 0xF8 ) | 0x05;
1370      gb_lcd.mode = 1;
1371      timer_adjust_oneshot(gb_lcd.lcd_timer, cputag_clocks_to_attotime(machine, "maincpu", 60), GB_LCD_STATE_LY00_M0);
1372
13731351      break;
1352
13741353   case GB_VIDEO_CGB:
13751354      gb_lcd.lcd_timer = timer_alloc(machine,  gbc_lcd_timer_proc , NULL);
13761355

Previous 15994 Revisions Next


© 1998-2018 The MESS Team