src/mess/video/gamecom.c
| r3848 | r3849 | |
| 5 | 5 | |
| 6 | 6 | static int scanline; |
| 7 | 7 | static unsigned int base_address; |
| 8 | static emu_timer *scanline_timer; |
| 8 | 9 | |
| 9 | | #ifdef UNUSED_FUNCTION |
| 10 | | void gamecom_video_init( void ) { |
| 11 | | scanline = 0; |
| 12 | | } |
| 13 | | #endif |
| 14 | | |
| 15 | | INTERRUPT_GEN( gamecom_scanline ) { |
| 10 | static TIMER_CALLBACK( gamecom_scanline ) { |
| 16 | 11 | // draw line |
| 17 | 12 | if ( scanline == 0 ) { |
| 18 | 13 | base_address = ( internal_registers[SM8521_LCDC] & 0x40 ) ? 0x2000 : 0x0000; |
| r3848 | r3849 | |
| 67 | 62 | scanline = ( scanline + 1 ) % Y_PIXELS; |
| 68 | 63 | } |
| 69 | 64 | |
| 65 | VIDEO_START( gamecom ) |
| 66 | { |
| 67 | VIDEO_START_CALL( generic_bitmapped ); |
| 68 | scanline_timer = timer_alloc( machine, gamecom_scanline, NULL ); |
| 69 | timer_adjust_periodic( scanline_timer, video_screen_get_time_until_pos( machine->primary_screen, 0, 0 ), 0, video_screen_get_scan_period( machine->primary_screen ) ); |
| 70 | |
| 71 | } |
| 72 | |
src/mess/drivers/gamecom.c
| r3848 | r3849 | |
| 16 | 16 | ***************************************************************************/ |
| 17 | 17 | |
| 18 | 18 | #include "driver.h" |
| 19 | | #include "deprecat.h" |
| 20 | 19 | #include "includes/gamecom.h" |
| 21 | 20 | #include "cpu/sm8500/sm8500.h" |
| 22 | 21 | #include "devices/cartslot.h" |
| r3848 | r3849 | |
| 94 | 93 | MDRV_CPU_ADD( "main", SM8500, XTAL_11_0592MHz/2 ) /* actually it's an sm8521 microcontroller containing an sm8500 cpu */ |
| 95 | 94 | MDRV_CPU_PROGRAM_MAP( gamecom_mem_map, 0 ) |
| 96 | 95 | MDRV_CPU_CONFIG( gamecom_cpu_config ) |
| 97 | | MDRV_CPU_VBLANK_INT_HACK(gamecom_scanline, 200) |
| 98 | 96 | |
| 99 | 97 | MDRV_SCREEN_ADD("main", LCD) |
| 100 | 98 | MDRV_SCREEN_REFRESH_RATE( 59.732155 ) |
| r3848 | r3849 | |
| 104 | 102 | MDRV_MACHINE_RESET( gamecom ) |
| 105 | 103 | |
| 106 | 104 | /* video hardware */ |
| 107 | | MDRV_VIDEO_START( generic_bitmapped ) |
| 105 | MDRV_VIDEO_START( gamecom ) |
| 108 | 106 | MDRV_VIDEO_UPDATE( generic_bitmapped ) |
| 109 | 107 | |
| 110 | 108 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |