Previous 15994 Revisions Next

r6140 Monday 19th October, 2009 at 19:36:51 UTC by Miodrag Milanović
[PCW] Moved ROM->RAM content copy to MACHINE_RESET
[src/mess/drivers]pcw.c

src/mess/drivers/pcw.c
r6139r6140
738738
739739static MACHINE_RESET( pcw )
740740{
741   UINT8* code = memory_region(machine,"bootcode");
742   int x;
741743   /* ram paging is actually undefined at power-on */
742744   pcw_bank_force = 0x00;
743745
r6139r6140
750752   pcw_update_mem(machine, 1, pcw_banks[1]);
751753   pcw_update_mem(machine, 2, pcw_banks[2]);
752754   pcw_update_mem(machine, 3, pcw_banks[3]);
755   /* copy boot code into RAM - yes, it's skipping a step,
756       but there is no verified dump of the boot sequence */
757
758   memset(messram_get_ptr(devtag_get_device(machine, "messram")),0x00,messram_get_size(devtag_get_device(machine, "messram")));
759   for(x=0;x<256;x++)
760      messram_get_ptr(devtag_get_device(machine, "messram"))[x+2] = code[x];
761
753762}
754763
755764static DRIVER_INIT(pcw)
756765{
757   UINT8* code = memory_region(machine,"bootcode");
758   int x;
759766   pcw_boot = 0;
760767
761768   cpu_set_input_line_vector(cputag_get_cpu(machine, "maincpu"), 0, 0x0ff);
762769
763   /* copy boot code into RAM - yes, it's skipping a step,
764       but there is no verified dump of the boot sequence */
765770
766   memset(messram_get_ptr(devtag_get_device(machine, "messram")),0x00,messram_get_size(devtag_get_device(machine, "messram")));
767   for(x=0;x<256;x++)
768      messram_get_ptr(devtag_get_device(machine, "messram"))[x+2] = code[x];
769
770771   /* lower 4 bits are interrupt counter */
771772   pcw_system_status = 0x000;
772773   pcw_system_status &= ~((1<<6) | (1<<5) | (1<<4));

Previous 15994 Revisions Next


© 1998-2018 The MESS Team