public static void cps2_eeprom_port_bh(int data) { data = (data & 0xff) << 8; Eeprom.eeprom_write_bit(data & 0x1000); Eeprom.eeprom_set_clock_line(((data & 0x2000) != 0) ? LineState.ASSERT_LINE : LineState.CLEAR_LINE); Eeprom.eeprom_set_cs_line(((data & 0x4000) != 0) ? LineState.CLEAR_LINE : LineState.ASSERT_LINE); }
public static void cps1_eeprom_port_w(int data) { /* * bit 0 = data * bit 6 = clock * bit 7 = cs */ Eeprom.eeprom_write_bit(data & 0x01); Eeprom.eeprom_set_cs_line(((data & 0x80) != 0) ? LineState.CLEAR_LINE : LineState.ASSERT_LINE); Eeprom.eeprom_set_clock_line(((data & 0x40) != 0) ? LineState.ASSERT_LINE : LineState.CLEAR_LINE); }
public static void cps2_eeprom_port_w(int data) { //high 8 bits { /* bit 0 - Unused */ /* bit 1 - Unused */ /* bit 2 - Unused */ /* bit 3 - Unused? */ /* bit 4 - Eeprom data */ /* bit 5 - Eeprom clock */ /* bit 6 - */ /* bit 7 - */ /* EEPROM */ Eeprom.eeprom_write_bit(data & 0x1000); Eeprom.eeprom_set_clock_line(((data & 0x2000) != 0) ? LineState.ASSERT_LINE : LineState.CLEAR_LINE); Eeprom.eeprom_set_cs_line(((data & 0x4000) != 0) ? LineState.CLEAR_LINE : LineState.ASSERT_LINE); } //low 8 bits { /* bit 0 - coin counter 1 */ /* bit 0 - coin counter 2 */ /* bit 2 - Unused */ /* bit 3 - Allows access to Z80 address space (Z80 reset) */ /* bit 4 - lock 1 */ /* bit 5 - lock 2 */ /* bit 6 - */ /* bit 7 - */ /* Z80 Reset */ Cpuint.cpunum_set_input_line(1, (int)LineState.INPUT_LINE_RESET, ((data & 0x0008) != 0) ? LineState.CLEAR_LINE : LineState.ASSERT_LINE); Generic.coin_counter_w(0, data & 0x0001); Generic.coin_counter_w(1, data & 0x0002); Generic.coin_lockout_w(0, ~data & 0x0010); Generic.coin_lockout_w(1, ~data & 0x0020); Generic.coin_lockout_w(2, ~data & 0x0040); Generic.coin_lockout_w(3, ~data & 0x0080); /* * set_led_status(0,data & 0x01); * set_led_status(1,data & 0x10); * set_led_status(2,data & 0x20); */ } }
public static void machine_start() { switch (Machine.sBoard) { case "CPS-1": case "CPS-1(QSound)": case "CPS2": Palette.palette_init(); Tilemap.tilemap_init(); Eeprom.eeprom_init(); CPS.video_start_cps(); machine_reset_callback = CPS.machine_reset_cps; break; case "Neo Geo": Neogeo.nvram_handler_load_neogeo(); Neogeo.machine_start_neogeo(); Neogeo.video_start_neogeo(); machine_reset_callback = Neogeo.machine_reset_neogeo; break; case "Namco System 1": Palette.palette_init(); Tilemap.tilemap_init(); Namcos1.driver_init(); Namcos1.video_start_namcos1(); machine_reset_callback = Namcos1.machine_reset_namcos1; break; case "IGS011": Palette.palette_init(); IGS011.video_start_igs011(); machine_reset_callback = IGS011.machine_reset_igs011; break; case "PGM": Palette.palette_init(); Tilemap.tilemap_init(); PGM.device_init(); PGM.video_start_pgm(); machine_reset_callback = PGM.machine_reset_pgm; break; } }
public static void machine_start() { switch (Machine.sBoard) { case "CPS-1": case "CPS-1(QSound)": case "CPS2": Palette.palette_init(); //Tilemap.tilemap_init(); Eeprom.eeprom_init(); CPS.video_start_cps(); machine_reset_callback = CPS.machine_reset_cps; break; /*case "Neo Geo": * Neogeo.nvram_handler_load_neogeo(); * Neogeo.machine_start_neogeo(); * Neogeo.video_start_neogeo(); * machine_reset_callback = Neogeo.machine_reset_neogeo; * break; * case "Namco System 1": * Palette.palette_init(); * Tilemap.tilemap_init(); * Namcos1.driver_init(); * Namcos1.video_start_namcos1(); * machine_reset_callback = Namcos1.machine_reset_namcos1; * break; * case "IGS011": * Palette.palette_init(); * IGS011.video_start_igs011(); * machine_reset_callback = IGS011.machine_reset_igs011; * break; * case "PGM": * Palette.palette_init(); * Tilemap.tilemap_init(); * PGM.device_init(); * PGM.video_start_pgm(); * machine_reset_callback = PGM.machine_reset_pgm; * break; * case "M72": * Palette.palette_init(); * Tilemap.tilemap_init(); * M72.machine_start_m72(); * M72.video_start_m72(); * machine_reset_callback = M72.machine_reset_m72; * switch (Machine.sName) * { * case "ltswords": * case "kengo": * case "kengoa": * machine_reset_callback = M72.machine_reset_kengo; * break; * } * break; * case "M92": * Palette.palette_init(); * Tilemap.tilemap_init(); * M92.machine_start_m92(); * M92.video_start_m92(); * machine_reset_callback = M92.machine_reset_m92; * break;*/ } }
public static int cps1_eeprom_port_r() { return(Eeprom.eeprom_read_bit()); }