src/mess/drivers/pcw.c
| r6139 | r6140 | |
| 738 | 738 | |
| 739 | 739 | static MACHINE_RESET( pcw ) |
| 740 | 740 | { |
| 741 | UINT8* code = memory_region(machine,"bootcode"); |
| 742 | int x; |
| 741 | 743 | /* ram paging is actually undefined at power-on */ |
| 742 | 744 | pcw_bank_force = 0x00; |
| 743 | 745 | |
| r6139 | r6140 | |
| 750 | 752 | pcw_update_mem(machine, 1, pcw_banks[1]); |
| 751 | 753 | pcw_update_mem(machine, 2, pcw_banks[2]); |
| 752 | 754 | 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 | |
| 753 | 762 | } |
| 754 | 763 | |
| 755 | 764 | static DRIVER_INIT(pcw) |
| 756 | 765 | { |
| 757 | | UINT8* code = memory_region(machine,"bootcode"); |
| 758 | | int x; |
| 759 | 766 | pcw_boot = 0; |
| 760 | 767 | |
| 761 | 768 | cpu_set_input_line_vector(cputag_get_cpu(machine, "maincpu"), 0, 0x0ff); |
| 762 | 769 | |
| 763 | | /* copy boot code into RAM - yes, it's skipping a step, |
| 764 | | but there is no verified dump of the boot sequence */ |
| 765 | 770 | |
| 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 | | |
| 770 | 771 | /* lower 4 bits are interrupt counter */ |
| 771 | 772 | pcw_system_status = 0x000; |
| 772 | 773 | pcw_system_status &= ~((1<<6) | (1<<5) | (1<<4)); |