Previous 15994 Revisions Next

r10583 Friday 25th February, 2011 at 07:50:24 UTC by Miodrag Milanović
Fix crash for pc drivers using CGA cards
[src/mess/video]pc_cga.c

src/mess/video/pc_cga.c
r10582r10583
494494         fatalerror("CGA: Bus width %d not supported", buswidth);
495495         break;
496496   }
497
497   internal_pc_cga_video_start(machine);
498498   cga.videoram_size = 0x4000;
499499   cga.videoram = auto_alloc_array(machine, UINT8, 0x4000);
500500
501501   memory_set_bankptr(machine,"bank11", cga.videoram);
502502
503   internal_pc_cga_video_start(machine);
504
505503   ntsc_decoder_init( machine, &s_ntsc, 8, 256 );
506504}
507505
r10582r10583
537535         break;
538536   }
539537
538   internal_pc_cga_video_start(machine);
539
540540   cga.videoram_size = 0x8000;
541541   cga.videoram = auto_alloc_array(machine, UINT8, 0x8000);
542542
543543   memory_set_bankptr(machine,"bank11", cga.videoram);
544544
545   internal_pc_cga_video_start(machine);
546
547545   ntsc_decoder_init( machine, &s_ntsc, 8, 256 );
548546}
549547
r10582r10583
17641762
17651763static VIDEO_START( pc1512 )
17661764{
1767   cga.videoram_size = 0x10000;
1768   cga.videoram = auto_alloc_array(machine, UINT8, 0x10000 );
1769   memory_set_bankptr(machine, "bank1", cga.videoram + videoram_offset[0]);
1770
17711765   memset( &pc1512, 0, sizeof ( pc1512 ) );
17721766   pc1512.write = 0xf;
17731767   pc1512.read = 0;
17741768
17751769   /* PC1512 cut-down 6845 */
17761770   internal_pc_cga_video_start(machine);
1777
1771   cga.videoram_size = 0x10000;
1772   cga.videoram = auto_alloc_array(machine, UINT8, 0x10000 );
1773   
17781774   address_space *space = cpu_get_address_space( machine->firstcpu, ADDRESS_SPACE_PROGRAM );
17791775   address_space *io_space = cpu_get_address_space( machine->firstcpu, ADDRESS_SPACE_IO );
17801776
17811777   memory_install_read_bank( space, 0xb8000, 0xbbfff, 0, 0x0C000, "bank1" );
1778   memory_set_bankptr(machine, "bank1", cga.videoram + videoram_offset[0]);
17821779   memory_install_write16_handler( space, 0xb8000, 0xbbfff, 0, 0x0C000, pc1512_videoram16le_w );
17831780
17841781   memory_install_read16_handler( io_space, 0x3d0, 0x3df, 0, 0, pc1512_16le_r );

Previous 15994 Revisions Next


© 1998-2018 The MESS Team