trunk/src/mess/machine/pc9801_86.c
| r19677 | r19678 | |
| 27 | 27 | |
| 28 | 28 | READ8_MEMBER(pc9801_86_device::opn_porta_r) |
| 29 | 29 | { |
| 30 | | if(m_joy_sel == 0x80) |
| 31 | | return ioport("OPNA_PA1")->read(); |
| 30 | if(m_joy_sel & 0x80) |
| 31 | return ioport(m_joy_sel & 0x40 ? "OPNA_PA2" : "OPNA_PA1")->read(); |
| 32 | 32 | |
| 33 | | if(m_joy_sel == 0xc0) |
| 34 | | return ioport("OPNA_PA2")->read(); |
| 35 | | |
| 36 | | // 0x81? |
| 37 | | // printf("%02x\n",m_joy_sel); |
| 38 | 33 | return 0xff; |
| 39 | 34 | } |
| 40 | 35 | |
| r19677 | r19678 | |
| 78 | 73 | return MACHINE_CONFIG_NAME( pc9801_86_config ); |
| 79 | 74 | } |
| 80 | 75 | |
| 76 | // RAM |
| 77 | ROM_START( pc9801_86 ) |
| 78 | ROM_REGION( 0x100000, "opna", ROMREGION_ERASE00 ) |
| 79 | ROM_END |
| 81 | 80 | |
| 81 | const rom_entry *pc9801_86_device::device_rom_region() const |
| 82 | { |
| 83 | return ROM_NAME( pc9801_86 ); |
| 84 | } |
| 85 | |
| 86 | |
| 82 | 87 | //------------------------------------------------- |
| 83 | 88 | // input_ports - device-specific input ports |
| 84 | 89 | //------------------------------------------------- |
| r19677 | r19678 | |
| 101 | 106 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_NAME("P2 Joystick Button 1") |
| 102 | 107 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) PORT_NAME("P2 Joystick Button 2") |
| 103 | 108 | PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 109 | |
| 110 | // PORT_START("OPN_DSW") |
| 111 | // PORT_CONFNAME( 0x01, 0x01, "PC-9801-86: Port Base" ) |
| 112 | // PORT_CONFSETTING( 0x00, "0x088" ) |
| 113 | // PORT_CONFSETTING( 0x01, "0x188" ) |
| 104 | 114 | INPUT_PORTS_END |
| 105 | 115 | |
| 106 | 116 | ioport_constructor pc9801_86_device::device_input_ports() const |
| r19677 | r19678 | |
| 161 | 171 | |
| 162 | 172 | void pc9801_86_device::device_start() |
| 163 | 173 | { |
| 164 | | install_device(0x0188, 0x018f, 0, 0, read8_delegate(FUNC(pc9801_86_device::pc9801_86_r), this), write8_delegate(FUNC(pc9801_86_device::pc9801_86_w), this) ); |
| 174 | UINT16 port_base = 0x100;//(ioport("OPN_DSW")->read() & 1) << 8; |
| 175 | install_device(port_base + 0x0088, port_base + 0x008f, 0, 0, read8_delegate(FUNC(pc9801_86_device::pc9801_86_r), this), write8_delegate(FUNC(pc9801_86_device::pc9801_86_w), this) ); |
| 165 | 176 | // install_device(0xa460, 0xa463, 0, 0, read8_delegate(FUNC(pc9801_86_device::pc9801_86_ext_r), this), write8_delegate(FUNC(pc9801_86_device::pc9801_86_ext_w), this) ); |
| 177 | |
| 166 | 178 | } |
| 167 | 179 | |
| 168 | 180 | |
trunk/src/mess/machine/pc9801_118.c
| r19677 | r19678 | |
| 26 | 26 | |
| 27 | 27 | READ8_MEMBER(pc9801_118_device::opn_porta_r) |
| 28 | 28 | { |
| 29 | | if(m_joy_sel == 0x80) |
| 30 | | return ioport("OPNA_PA1")->read(); |
| 29 | if(m_joy_sel & 0x80) |
| 30 | return ioport(m_joy_sel & 0x40 ? "OPN3_PA2" : "OPN3_PA1")->read(); |
| 31 | 31 | |
| 32 | | if(m_joy_sel == 0xc0) |
| 33 | | return ioport("OPNA_PA2")->read(); |
| 34 | | |
| 35 | | // 0x81? |
| 36 | | // printf("%02x\n",m_joy_sel); |
| 37 | 32 | return 0xff; |
| 38 | 33 | } |
| 39 | 34 | |
| r19677 | r19678 | |
| 83 | 78 | //------------------------------------------------- |
| 84 | 79 | |
| 85 | 80 | static INPUT_PORTS_START( pc9801_118 ) |
| 86 | | PORT_START("OPNA_PA1") |
| 81 | PORT_START("OPN3_PA1") |
| 87 | 82 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) PORT_NAME("P1 Joystick Up") |
| 88 | 83 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) PORT_NAME("P1 Joystick Down") |
| 89 | 84 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) PORT_NAME("P1 Joystick Left") |
| r19677 | r19678 | |
| 92 | 87 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) PORT_NAME("P1 Joystick Button 2") |
| 93 | 88 | PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 94 | 89 | |
| 95 | | PORT_START("OPNA_PA2") |
| 90 | PORT_START("OPN3_PA2") |
| 96 | 91 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) PORT_NAME("P2 Joystick Up") |
| 97 | 92 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) PORT_NAME("P2 Joystick Down") |
| 98 | 93 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) PORT_NAME("P2 Joystick Left") |
| r19677 | r19678 | |
| 100 | 95 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_NAME("P2 Joystick Button 1") |
| 101 | 96 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) PORT_NAME("P2 Joystick Button 2") |
| 102 | 97 | PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 98 | |
| 99 | // PORT_START("OPN_DSW") |
| 100 | // PORT_CONFNAME( 0x01, 0x01, "PC-9801-118: Port Base" ) |
| 101 | // PORT_CONFSETTING( 0x00, "0x088" ) |
| 102 | // PORT_CONFSETTING( 0x01, "0x188" ) |
| 103 | 103 | INPUT_PORTS_END |
| 104 | 104 | |
| 105 | 105 | ioport_constructor pc9801_118_device::device_input_ports() const |
| r19677 | r19678 | |
| 107 | 107 | return INPUT_PORTS_NAME( pc9801_118 ); |
| 108 | 108 | } |
| 109 | 109 | |
| 110 | // RAM |
| 111 | ROM_START( pc9801_118 ) |
| 112 | ROM_REGION( 0x100000, "opn3", ROMREGION_ERASE00 ) |
| 113 | ROM_END |
| 114 | |
| 115 | const rom_entry *pc9801_118_device::device_rom_region() const |
| 116 | { |
| 117 | return ROM_NAME( pc9801_118 ); |
| 118 | } |
| 119 | |
| 110 | 120 | //************************************************************************** |
| 111 | 121 | // LIVE DEVICE |
| 112 | 122 | //************************************************************************** |
| r19677 | r19678 | |
| 160 | 170 | |
| 161 | 171 | void pc9801_118_device::device_start() |
| 162 | 172 | { |
| 163 | | install_device(0x0188, 0x018f, 0, 0, read8_delegate(FUNC(pc9801_118_device::pc9801_118_r), this), write8_delegate(FUNC(pc9801_118_device::pc9801_118_w), this) ); |
| 173 | UINT16 port_base = 0x100;//(ioport("OPN_DSW")->read() & 1) << 8; |
| 174 | install_device(port_base + 0x0088, port_base + 0x008f, 0, 0, read8_delegate(FUNC(pc9801_118_device::pc9801_118_r), this), write8_delegate(FUNC(pc9801_118_device::pc9801_118_w), this) ); |
| 164 | 175 | install_device(0xa460, 0xa463, 0, 0, read8_delegate(FUNC(pc9801_118_device::pc9801_118_ext_r), this), write8_delegate(FUNC(pc9801_118_device::pc9801_118_ext_w), this) ); |
| 165 | 176 | } |
| 166 | 177 | |
trunk/src/mess/machine/pc9801_26.c
| r19677 | r19678 | |
| 21 | 21 | const device_type PC9801_26 = &device_creator<pc9801_26_device>; |
| 22 | 22 | |
| 23 | 23 | |
| 24 | |
| 24 | 25 | READ8_MEMBER(pc9801_26_device::opn_porta_r) |
| 25 | 26 | { |
| 26 | | if(m_joy_sel == 0x80) |
| 27 | | return ioport("OPN_PA1")->read(); |
| 27 | if(m_joy_sel & 0x80) |
| 28 | return ioport(m_joy_sel & 0x40 ? "OPN_PA2" : "OPN_PA1")->read(); |
| 28 | 29 | |
| 29 | | if(m_joy_sel == 0xc0) |
| 30 | | return ioport("OPN_PA2")->read(); |
| 31 | | |
| 32 | | // 0x81? |
| 33 | | // printf("%02x\n",m_joy_sel); |
| 34 | 30 | return 0xff; |
| 35 | 31 | } |
| 36 | 32 | |
| r19677 | r19678 | |
| 87 | 83 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) PORT_NAME("P1 Joystick Right") |
| 88 | 84 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_NAME("P1 Joystick Button 1") |
| 89 | 85 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) PORT_NAME("P1 Joystick Button 2") |
| 90 | | PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 86 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 87 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 91 | 88 | |
| 92 | 89 | PORT_START("OPN_PA2") |
| 93 | 90 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) PORT_NAME("P2 Joystick Up") |
| r19677 | r19678 | |
| 96 | 93 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) PORT_NAME("P2 Joystick Right") |
| 97 | 94 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_NAME("P2 Joystick Button 1") |
| 98 | 95 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) PORT_NAME("P2 Joystick Button 2") |
| 99 | | PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 96 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 97 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 98 | |
| 99 | // PORT_START("OPN_DSW") |
| 100 | // PORT_CONFNAME( 0x01, 0x01, "PC-9801-26: Port Base" ) |
| 101 | // PORT_CONFSETTING( 0x00, "0x088" ) |
| 102 | // PORT_CONFSETTING( 0x01, "0x188" ) |
| 100 | 103 | INPUT_PORTS_END |
| 101 | 104 | |
| 102 | 105 | ioport_constructor pc9801_26_device::device_input_ports() const |
| r19677 | r19678 | |
| 157 | 160 | |
| 158 | 161 | void pc9801_26_device::device_start() |
| 159 | 162 | { |
| 160 | | install_device(0x0188, 0x018b, 0, 0, read8_delegate(FUNC(pc9801_26_device::pc9801_26_r), this), write8_delegate(FUNC(pc9801_26_device::pc9801_26_w), this) ); |
| 163 | UINT16 port_base = 0x100;//(ioport("OPN_DSW")->read() & 1) << 8; |
| 164 | install_device(port_base + 0x0088, port_base + 0x008b, 0, 0, read8_delegate(FUNC(pc9801_26_device::pc9801_26_r), this), write8_delegate(FUNC(pc9801_26_device::pc9801_26_w), this) ); |
| 161 | 165 | } |
| 162 | 166 | |
| 163 | 167 | |
trunk/src/mess/drivers/pc9801.c
| r19677 | r19678 | |
| 3560 | 3560 | // pic8259_ir2_w(machine().device("pic8259_master"), 0); |
| 3561 | 3561 | } |
| 3562 | 3562 | |
| 3563 | | #if 0 |
| 3564 | | static const ym2608_interface pc98_ym2608_intf = |
| 3565 | | { |
| 3566 | | { |
| 3567 | | AY8910_LEGACY_OUTPUT | AY8910_SINGLE_OUTPUT, |
| 3568 | | AY8910_DEFAULT_LOADS, |
| 3569 | | DEVCB_DRIVER_MEMBER(pc9801_state,opn_porta_r), |
| 3570 | | DEVCB_NULL,//(pc9801_state,opn_portb_r), |
| 3571 | | DEVCB_NULL,//(pc9801_state,opn_porta_w), |
| 3572 | | DEVCB_DRIVER_MEMBER(pc9801_state,opn_portb_w), |
| 3573 | | }, |
| 3574 | | pc9801_sound_irq |
| 3575 | | }; |
| 3576 | | #endif |
| 3577 | 3563 | |
| 3578 | 3564 | FLOPPY_FORMATS_MEMBER( pc9801_state::floppy_formats ) |
| 3579 | 3565 | FLOPPY_PC98FDI_FORMAT |
| r19677 | r19678 | |
| 3604 | 3590 | |
| 3605 | 3591 | static MACHINE_CONFIG_FRAGMENT( pc9801_cbus ) |
| 3606 | 3592 | MCFG_PC9801CBUS_SLOT_ADD("cbus0", pc9801_cbus, "pc9801_26", NULL) |
| 3593 | // MCFG_PC9801CBUS_SLOT_ADD("cbus1", pc9801_cbus, NULL, NULL) |
| 3607 | 3594 | // TODO: six max slots |
| 3608 | 3595 | MACHINE_CONFIG_END |
| 3609 | 3596 | |
| r19677 | r19678 | |
| 3826 | 3813 | ROM_REGION( 0x100000, "kanji", ROMREGION_ERASEFF ) \ |
| 3827 | 3814 | ROM_REGION( 0x80000, "new_chargen", ROMREGION_ERASEFF ) \ |
| 3828 | 3815 | |
| 3829 | | #define OPNA_LOAD \ |
| 3830 | | ROM_REGION( 0x100000, "opna", ROMREGION_ERASE00 ) \ |
| 3831 | | |
| 3832 | 3816 | /* |
| 3833 | 3817 | F - 8086 5 |
| 3834 | 3818 | */ |
| r19677 | r19678 | |
| 3881 | 3865 | ROM_LOAD( "font_ux.rom", 0x000000, 0x046800, BAD_DUMP CRC(19a76eeb) SHA1(96a006e8515157a624599c2b53a581ae0dd560fd) ) |
| 3882 | 3866 | |
| 3883 | 3867 | KANJI_ROMS |
| 3884 | | OPNA_LOAD |
| 3885 | 3868 | ROM_END |
| 3886 | 3869 | |
| 3887 | 3870 | /* |
| r19677 | r19678 | |
| 3900 | 3883 | ROM_LOAD( "font_rx.rom", 0x000000, 0x046800, CRC(456d9fc7) SHA1(78ba9960f135372825ab7244b5e4e73a810002ff) ) |
| 3901 | 3884 | |
| 3902 | 3885 | KANJI_ROMS |
| 3903 | | OPNA_LOAD |
| 3904 | 3886 | ROM_END |
| 3905 | 3887 | |
| 3906 | 3888 | /* |
| r19677 | r19678 | |
| 3932 | 3914 | ROM_LOAD( "font_rs.rom", 0x00000, 0x46800, BAD_DUMP CRC(da370e7a) SHA1(584d0c7fde8c7eac1f76dc5e242102261a878c5e) ) |
| 3933 | 3915 | |
| 3934 | 3916 | KANJI_ROMS |
| 3935 | | OPNA_LOAD |
| 3936 | 3917 | ROM_END |
| 3937 | 3918 | |
| 3938 | 3919 | /* |
| r19677 | r19678 | |
| 3953 | 3934 | ROM_LOAD( "font_vm.rom", 0x000000, 0x046800, BAD_DUMP CRC(456d9fc7) SHA1(78ba9960f135372825ab7244b5e4e73a810002ff) ) |
| 3954 | 3935 | |
| 3955 | 3936 | KANJI_ROMS |
| 3956 | | OPNA_LOAD |
| 3957 | 3937 | ROM_END |
| 3958 | 3938 | |
| 3959 | 3939 | /* |
| r19677 | r19678 | |
| 3977 | 3957 | ROM_LOAD( "font.rom", 0x00000, 0x46800, BAD_DUMP CRC(a61c0649) SHA1(554b87377d176830d21bd03964dc71f8e98676b1) ) |
| 3978 | 3958 | |
| 3979 | 3959 | KANJI_ROMS |
| 3980 | | OPNA_LOAD |
| 3981 | 3960 | ROM_END |
| 3982 | 3961 | |
| 3983 | 3962 | /* |
| r19677 | r19678 | |
| 3999 | 3978 | ROM_LOAD( "font_as.rom", 0x000000, 0x046800, BAD_DUMP CRC(456d9fc7) SHA1(78ba9960f135372825ab7244b5e4e73a810002ff) ) |
| 4000 | 3979 | |
| 4001 | 3980 | KANJI_ROMS |
| 4002 | | OPNA_LOAD |
| 4003 | 3981 | ROM_END |
| 4004 | 3982 | |
| 4005 | 3983 | |
| r19677 | r19678 | |
| 4022 | 4000 | ROM_LOAD( "font_ne.rom", 0x00000, 0x46800, BAD_DUMP CRC(fb213757) SHA1(61525826d62fb6e99377b23812faefa291d78c2e) ) |
| 4023 | 4001 | |
| 4024 | 4002 | KANJI_ROMS |
| 4025 | | OPNA_LOAD |
| 4026 | 4003 | ROM_END |
| 4027 | 4004 | |
| 4028 | 4005 | /* |
| r19677 | r19678 | |
| 4044 | 4021 | ROM_LOAD( "font_486mu.rom", 0x0000, 0x46800, CRC(456d9fc7) SHA1(78ba9960f135372825ab7244b5e4e73a810002ff)) |
| 4045 | 4022 | |
| 4046 | 4023 | KANJI_ROMS |
| 4047 | | OPNA_LOAD |
| 4048 | 4024 | ROM_END |
| 4049 | 4025 | |
| 4050 | 4026 | /* |
| r19677 | r19678 | |
| 4066 | 4042 | ROM_LOAD( "font_ce2.rom", 0x000000, 0x046800, CRC(d1c2702a) SHA1(e7781e9d35b6511d12631641d029ad2ba3f7daef) ) |
| 4067 | 4043 | |
| 4068 | 4044 | KANJI_ROMS |
| 4069 | | OPNA_LOAD |
| 4070 | 4045 | ROM_END |
| 4071 | 4046 | |
| 4072 | 4047 | /* |
| r19677 | r19678 | |
| 4088 | 4063 | ROM_LOAD( "font_xs.rom", 0x000000, 0x046800, BAD_DUMP CRC(c9a77d8f) SHA1(deb8563712eb2a634a157289838b95098ba0c7f2) ) |
| 4089 | 4064 | |
| 4090 | 4065 | KANJI_ROMS |
| 4091 | | OPNA_LOAD |
| 4092 | 4066 | ROM_END |
| 4093 | 4067 | |
| 4094 | 4068 | |
| r19677 | r19678 | |
| 4111 | 4085 | ROM_LOAD( "font_a.rom", 0x00000, 0x46800, BAD_DUMP CRC(c9a77d8f) SHA1(deb8563712eb2a634a157289838b95098ba0c7f2) ) |
| 4112 | 4086 | |
| 4113 | 4087 | KANJI_ROMS |
| 4114 | | OPNA_LOAD |
| 4115 | 4088 | ROM_END |
| 4116 | 4089 | |
| 4117 | 4090 | /* |
| r19677 | r19678 | |
| 4133 | 4106 | ROM_LOAD( "font_v20.rom", 0x000000, 0x046800, BAD_DUMP CRC(6244c4c0) SHA1(9513cac321e89b4edb067b30e9ecb1adae7e7be7) ) |
| 4134 | 4107 | |
| 4135 | 4108 | KANJI_ROMS |
| 4136 | | OPNA_LOAD |
| 4137 | 4109 | ROM_END |
| 4138 | 4110 | |
| 4139 | 4111 | |