src/mess/machine/aim65.c
| r4375 | r4376 | |
| 9 | 9 | #include "includes/aim65.h" |
| 10 | 10 | |
| 11 | 11 | /* Peripheral chips */ |
| 12 | | #include "machine/6821pia.h" |
| 12 | #include "machine/6821new.h" |
| 13 | 13 | #include "machine/6522via.h" |
| 14 | 14 | |
| 15 | 15 | /* DL1416A display chip */ |
| r4375 | r4376 | |
| 81 | 81 | } |
| 82 | 82 | |
| 83 | 83 | |
| 84 | | static WRITE8_HANDLER( aim65_pia_a_w ) |
| 84 | WRITE8_DEVICE_HANDLER(aim65_pia_a_w) |
| 85 | 85 | { |
| 86 | 86 | pia_a = data; |
| 87 | | aim65_pia(space->machine); |
| 87 | aim65_pia(device->machine); |
| 88 | 88 | } |
| 89 | 89 | |
| 90 | 90 | |
| 91 | | static WRITE8_HANDLER( aim65_pia_b_w ) |
| 91 | WRITE8_DEVICE_HANDLER(aim65_pia_b_w) |
| 92 | 92 | { |
| 93 | 93 | pia_b = data; |
| 94 | | aim65_pia(space->machine); |
| 94 | aim65_pia(device->machine); |
| 95 | 95 | } |
| 96 | 96 | |
| 97 | 97 | |
| 98 | | static const pia6821_interface pia = |
| 99 | | { |
| 100 | | NULL, // read8_machine_func in_a_func, |
| 101 | | NULL, // read8_machine_func in_b_func, |
| 102 | | NULL, // read8_machine_func in_ca1_func, |
| 103 | | NULL, // read8_machine_func in_cb1_func, |
| 104 | | NULL, // read8_machine_func in_ca2_func, |
| 105 | | NULL, // read8_machine_func in_cb2_func, |
| 106 | | aim65_pia_a_w, |
| 107 | | aim65_pia_b_w, |
| 108 | | NULL, // write8_machine_func out_ca2_func, |
| 109 | | NULL, // write8_machine_func out_cb2_func, |
| 110 | | NULL, // void (*irq_a_func)(int state), |
| 111 | | NULL, // void (*irq_b_func)(int state), |
| 112 | | }; |
| 113 | | |
| 114 | | |
| 115 | 98 | void aim65_update_ds1(const device_config *device, int digit, int data) |
| 116 | 99 | { |
| 117 | 100 | output_set_digit_value(0 + (digit ^ 3), data); |
| r4375 | r4376 | |
| 194 | 177 | if (mess_ram_size < 4 * 1024) |
| 195 | 178 | memory_install_readwrite8_handler(space, mess_ram_size, 0x0fff, 0, 0, SMH_NOP, SMH_NOP); |
| 196 | 179 | |
| 197 | | pia_config(machine, 0, &pia); |
| 198 | | |
| 199 | 180 | via_cb1_w(via_0, 1, 1); |
| 200 | 181 | via_ca1_w(via_0, 1, 0); |
| 201 | 182 | } |
src/mess/drivers/aim65.c
| r4375 | r4376 | |
| 12 | 12 | |
| 13 | 13 | ******************************************************************************/ |
| 14 | 14 | |
| 15 | | /* Core includes */ |
| 16 | 15 | #include "driver.h" |
| 17 | | #include "cpu/m6502/m6502.h" |
| 18 | 16 | #include "includes/aim65.h" |
| 19 | | |
| 20 | | /* peripheral chips */ |
| 17 | #include "cpu/m6502/m6502.h" |
| 21 | 18 | #include "video/dl1416.h" |
| 22 | 19 | #include "machine/6522via.h" |
| 23 | 20 | #include "machine/6532riot.h" |
| 24 | | #include "machine/6821pia.h" |
| 25 | | |
| 26 | | /* cartridge device */ |
| 21 | #include "machine/6821new.h" |
| 27 | 22 | #include "devices/cartslot.h" |
| 28 | | |
| 29 | | /* Layout */ |
| 30 | 23 | #include "aim65.lh" |
| 31 | 24 | |
| 32 | 25 | |
| 26 | /*************************************************************************** |
| 27 | ADDRESS MAPS |
| 28 | ***************************************************************************/ |
| 33 | 29 | |
| 34 | | /****************************************************************************** |
| 35 | | Memory Maps |
| 36 | | ******************************************************************************/ |
| 37 | | |
| 38 | | |
| 39 | 30 | /* Note: RAM is mapped dynamically in machine/aim65.c */ |
| 40 | 31 | static ADDRESS_MAP_START( aim65_mem, ADDRESS_SPACE_PROGRAM, 8 ) |
| 41 | 32 | AM_RANGE( 0x1000, 0x9fff ) AM_NOP /* User available expansions */ |
| r4375 | r4376 | |
| 44 | 35 | AM_RANGE( 0xa480, 0xa497 ) AM_DEVREADWRITE(RIOT6532, "riot", riot6532_r, riot6532_w) |
| 45 | 36 | AM_RANGE( 0xa498, 0xa7ff ) AM_NOP /* Not available */ |
| 46 | 37 | AM_RANGE( 0xa800, 0xa80f ) AM_MIRROR(0x3f0) AM_DEVREADWRITE(VIA6522, "via6522_0", via_r, via_w) |
| 47 | | AM_RANGE( 0xac00, 0xac03 ) AM_READWRITE(pia_0_r, pia_0_w) |
| 38 | AM_RANGE( 0xac00, 0xac03 ) AM_DEVREADWRITE(PIA6821, "pia6821", pia_r, pia_w) |
| 48 | 39 | AM_RANGE( 0xac04, 0xac43 ) AM_RAM /* PIA RAM */ |
| 49 | 40 | AM_RANGE( 0xac44, 0xafff ) AM_NOP /* Not available */ |
| 50 | 41 | AM_RANGE( 0xb000, 0xffff ) AM_ROM /* 5 ROM sockets */ |
| 51 | 42 | ADDRESS_MAP_END |
| 52 | 43 | |
| 53 | 44 | |
| 45 | /*************************************************************************** |
| 46 | INPUT PORTS |
| 47 | ***************************************************************************/ |
| 54 | 48 | |
| 55 | | /****************************************************************************** |
| 56 | | Input Ports |
| 57 | | ******************************************************************************/ |
| 58 | | |
| 59 | | |
| 60 | 49 | static INPUT_PORTS_START( aim65 ) |
| 61 | 50 | PORT_START("keyboard_0") |
| 62 | 51 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Space") PORT_CODE(KEYCODE_SPACE) PORT_CHAR(32) |
| r4375 | r4376 | |
| 146 | 135 | INPUT_PORTS_END |
| 147 | 136 | |
| 148 | 137 | |
| 138 | /*************************************************************************** |
| 139 | DEVICE INTERFACES |
| 140 | ***************************************************************************/ |
| 149 | 141 | |
| 150 | | /****************************************************************************** |
| 151 | | Device interfaces |
| 152 | | ******************************************************************************/ |
| 153 | | |
| 154 | | /* riot interface */ |
| 155 | 142 | static const riot6532_interface aim65_riot_interface = |
| 156 | 143 | { |
| 157 | 144 | NULL, |
| r4375 | r4376 | |
| 187 | 174 | DEVCB_CPU_INPUT_LINE("maincpu", M6502_IRQ_LINE) |
| 188 | 175 | }; |
| 189 | 176 | |
| 190 | | /****************************************************************************** |
| 191 | | Machine Drivers |
| 192 | | ******************************************************************************/ |
| 177 | static const pia6821_interface aim65_pia_config = |
| 178 | { |
| 179 | DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, |
| 180 | DEVCB_HANDLER(aim65_pia_a_w), DEVCB_HANDLER(aim65_pia_b_w), |
| 181 | DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL |
| 182 | }; |
| 193 | 183 | |
| 184 | |
| 185 | /*************************************************************************** |
| 186 | MACHINE DRIVERS |
| 187 | ***************************************************************************/ |
| 188 | |
| 194 | 189 | static MACHINE_DRIVER_START( aim65 ) |
| 195 | 190 | /* basic machine hardware */ |
| 196 | 191 | MDRV_CPU_ADD("maincpu", M6502, AIM65_CLOCK) /* 1 MHz */ |
| r4375 | r4376 | |
| 213 | 208 | MDRV_RIOT6532_ADD("riot", AIM65_CLOCK, aim65_riot_interface) |
| 214 | 209 | MDRV_VIA6522_ADD("via6522_0", 0, aim65_system_via) |
| 215 | 210 | MDRV_VIA6522_ADD("via6522_1", 0, aim65_user_via) |
| 211 | MDRV_PIA6821_ADD("pia6821", aim65_pia_config) |
| 216 | 212 | |
| 217 | 213 | MDRV_CARTSLOT_ADD("cart1") |
| 218 | 214 | MDRV_CARTSLOT_EXTENSION_LIST("z26") |
| r4375 | r4376 | |
| 226 | 222 | MACHINE_DRIVER_END |
| 227 | 223 | |
| 228 | 224 | |
| 225 | /*************************************************************************** |
| 226 | ROM DEFINITIONS |
| 227 | ***************************************************************************/ |
| 229 | 228 | |
| 230 | | /****************************************************************************** |
| 231 | | ROM Definitions |
| 232 | | ******************************************************************************/ |
| 233 | | |
| 234 | | |
| 235 | 229 | ROM_START( aim65 ) |
| 236 | 230 | ROM_REGION(0x10000, "maincpu", 0) |
| 237 | 231 | ROM_CART_LOAD("cart1", 0xb000, 0x1000, ROM_OPTIONAL) |
| r4375 | r4376 | |
| 265 | 259 | */ |
| 266 | 260 | |
| 267 | 261 | |
| 262 | /*************************************************************************** |
| 263 | SYSTEM CONFIG |
| 264 | ***************************************************************************/ |
| 268 | 265 | |
| 269 | | /****************************************************************************** |
| 270 | | System Config |
| 271 | | ******************************************************************************/ |
| 272 | | |
| 273 | | |
| 274 | 266 | static SYSTEM_CONFIG_START( aim65 ) |
| 275 | 267 | CONFIG_RAM_DEFAULT(4 * 1024) /* 4KB RAM */ |
| 276 | 268 | CONFIG_RAM (3 * 1024) /* 3KB RAM */ |
| r4375 | r4376 | |
| 279 | 271 | SYSTEM_CONFIG_END |
| 280 | 272 | |
| 281 | 273 | |
| 274 | /*************************************************************************** |
| 275 | GAME DRIVERS |
| 276 | ***************************************************************************/ |
| 282 | 277 | |
| 283 | | /****************************************************************************** |
| 284 | | Drivers |
| 285 | | ******************************************************************************/ |
| 286 | | |
| 287 | | |
| 288 | 278 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT CONFIG COMPANY FULLNAME FLAGS */ |
| 289 | 279 | COMP(1977, aim65, 0, 0, aim65, aim65, 0, aim65, "Rockwell", "AIM 65", 0) |