src/mess/machine/c128.c
| r4737 | r4738 | |
| 17 | 17 | |
| 18 | 18 | #include "includes/cbm.h" |
| 19 | 19 | #include "includes/cbmserb.h" |
| 20 | #include "includes/cbmdrive.h" |
| 20 | 21 | #include "includes/vc1541.h" |
| 21 | 22 | #include "video/vic6567.h" |
| 22 | 23 | #include "video/vdc8563.h" |
| r4737 | r4738 | |
| 75 | 76 | static UINT8 c128_keyline[3] = {0xff, 0xff, 0xff}; |
| 76 | 77 | |
| 77 | 78 | static int c128_va1617; |
| 79 | static int c128_cia1_on = 1; |
| 78 | 80 | static UINT8 serial_clock, serial_data, serial_atn; |
| 79 | 81 | static UINT8 vicirq = 0; |
| 80 | 82 | |
| r4737 | r4738 | |
| 1164 | 1166 | // drive_config (machine, type_1541, 0, 0, 1, 8); |
| 1165 | 1167 | } |
| 1166 | 1168 | |
| 1167 | | #if 0 |
| 1169 | MACHINE_START( c128 ) |
| 1170 | { |
| 1171 | if (c128_cia1_on) |
| 1172 | { |
| 1173 | cbm_serial_config(machine, &cbm_sim_drive_interface); |
| 1174 | cbm_serial_reset_write (machine, 0); |
| 1175 | cbm_drive_0_config (SERIAL, 8); |
| 1176 | cbm_drive_1_config (SERIAL, 9); |
| 1177 | serial_clock = serial_data = serial_atn = 1; |
| 1178 | } |
| 1179 | |
| 1168 | 1180 | // This was in MACHINE_START( c64 ), but never called |
| 1169 | 1181 | // TO DO: find its correct use, when fixing c64 mode |
| 1170 | | MACHINE_START( c128 ) |
| 1171 | | { |
| 1172 | 1182 | if (c64mode) |
| 1173 | 1183 | c128_bankswitch_64(machine, 1); |
| 1174 | 1184 | } |
| 1175 | | #endif |
| 1176 | 1185 | |
| 1177 | 1186 | MACHINE_RESET( c128 ) |
| 1178 | 1187 | { |
| 1179 | | c64_common_init_machine(machine); |
| 1180 | 1188 | c128_vicaddr = c64_vicaddr = c64_memory; |
| 1181 | 1189 | c64mode = 0; |
| 1182 | 1190 | c128_mmu8722_reset (machine); |
src/mess/machine/c64.c
| r4737 | r4738 | |
| 71 | 71 | static UINT8 serial_clock, serial_data, serial_atn; |
| 72 | 72 | static UINT8 vicirq = 0; |
| 73 | 73 | |
| 74 | | static int is_c65(running_machine *machine) |
| 75 | | { |
| 76 | | return !strncmp(machine->gamedrv->name, "c65", 3); |
| 77 | | } |
| 78 | | |
| 79 | 74 | static void c64_nmi(running_machine *machine) |
| 80 | 75 | { |
| 81 | 76 | static int nmilevel = 0; |
| r4737 | r4738 | |
| 620 | 615 | } |
| 621 | 616 | } |
| 622 | 617 | |
| 623 | | if (is_c65(device->machine)) |
| 624 | | { |
| 625 | | // NPW 8-Feb-2004 - Don't know why I have to do this |
| 626 | | //c65_bankswitch(machine); |
| 627 | | } |
| 628 | | |
| 629 | 618 | else if (!ultimax) |
| 630 | 619 | c64_bankswitch(device->machine, 0); |
| 631 | 620 | |
| r4737 | r4738 | |
| 645 | 634 | data |= 0x10; |
| 646 | 635 | } |
| 647 | 636 | |
| 648 | | if (is_c65(device->machine)) |
| 649 | | { |
| 650 | | if (input_port_read(device->machine, "SPECIAL") & 0x20) /* Check Caps Lock */ |
| 651 | | data &= ~0x40; |
| 652 | | else |
| 653 | | data |= 0x40; |
| 654 | | } |
| 655 | | |
| 656 | 637 | return data; |
| 657 | 638 | } |
| 658 | 639 | |
| r4737 | r4738 | |
| 873 | 854 | drive_config (machine, type_1541, 0, 0, 1, 8); |
| 874 | 855 | } |
| 875 | 856 | |
| 876 | | void c64_common_init_machine (running_machine *machine) |
| 857 | static void c64_common_init_machine (running_machine *machine) |
| 877 | 858 | { |
| 878 | 859 | if (is_sx64) |
| 879 | 860 | { |