src/mess/video/smsvdp.c
| r761 | r762 | |
| 189 | 189 | In theory the driver could have a REGION_GFX1 and/or REGION_GFX2 memory region |
| 190 | 190 | of it's own. So this code could potentially cause a clash. |
| 191 | 191 | */ |
| 192 | | if ( VRAM == NULL ) { |
| 193 | | VRAM = new_memory_region( Machine, REGION_GFX1, VRAM_SIZE, ROM_REQUIRED ); |
| 194 | | } |
| 195 | | if ( CRAM == NULL ) { |
| 196 | | CRAM = new_memory_region( Machine, REGION_GFX2, MAX_CRAM_SIZE, ROM_REQUIRED ); |
| 197 | | } |
| 198 | | if ( lineBuffer == NULL ) { |
| 199 | | lineBuffer = auto_malloc( 256 * 5 * sizeof(int) ); |
| 200 | | memset( lineBuffer, 0, 256 * 5 * sizeof(int) ); |
| 201 | | } |
| 192 | VRAM = new_memory_region( Machine, REGION_GFX1, VRAM_SIZE, ROM_REQUIRED ); |
| 193 | CRAM = new_memory_region( Machine, REGION_GFX2, MAX_CRAM_SIZE, ROM_REQUIRED ); |
| 194 | lineBuffer = auto_malloc( 256 * 5 * sizeof(int) ); |
| 195 | memset( lineBuffer, 0, 256 * 5 * sizeof(int) ); |
| 202 | 196 | |
| 203 | 197 | /* Clear RAM */ |
| 204 | 198 | memset(reg, 0, NUM_OF_REGISTER); |
| r761 | r762 | |
| 225 | 219 | |
| 226 | 220 | set_display_settings(); |
| 227 | 221 | |
| 228 | | if ( smsvdp_display_timer == NULL ) { |
| 229 | | smsvdp_display_timer = mame_timer_alloc( smsvdp_display_callback ); |
| 230 | | } |
| 222 | smsvdp_display_timer = mame_timer_alloc( smsvdp_display_callback ); |
| 231 | 223 | mame_timer_adjust( smsvdp_display_timer, video_screen_get_time_until_pos( 0, 0, 0 ), 0, video_screen_get_scan_period( 0 ) ); |
| 232 | 224 | return (0); |
| 233 | 225 | } |