src/mess/video/gb.c
| r5792 | r5793 | |
| 1287 | 1287 | } |
| 1288 | 1288 | |
| 1289 | 1289 | LCDSTAT = 0x80; |
| 1290 | | LCDCONT = 0x00; |
| 1290 | LCDCONT = 0x00; /* Video hardware is turned off at boot time */ |
| 1291 | 1291 | gb_lcd.current_line = CURLINE = CMPLINE = 0x00; |
| 1292 | 1292 | SCROLLX = SCROLLY = 0x00; |
| 1293 | 1293 | SPR0PAL = SPR1PAL = 0xFF; |
| r5792 | r5793 | |
| 1348 | 1348 | /* set the scanline update function */ |
| 1349 | 1349 | update_scanline = sgb_update_scanline; |
| 1350 | 1350 | |
| 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 | | |
| 1373 | 1351 | break; |
| 1352 | |
| 1374 | 1353 | case GB_VIDEO_CGB: |
| 1375 | 1354 | gb_lcd.lcd_timer = timer_alloc(machine, gbc_lcd_timer_proc , NULL); |
| 1376 | 1355 | |