src/mess/drivers/astrocde.c
| r1889 | r1890 | |
| 50 | 50 | astrocade_sound1_w(machine, offset + 0x18, data); |
| 51 | 51 | } |
| 52 | 52 | |
| 53 | |
| 54 | |
| 55 | /************************************* |
| 56 | * |
| 57 | * Memory maps |
| 58 | * |
| 59 | *************************************/ |
| 60 | |
| 53 | 61 | static ADDRESS_MAP_START( astrocade_mem, ADDRESS_SPACE_PROGRAM, 8 ) |
| 54 | 62 | AM_RANGE(0x0000, 0x0fff) AM_READWRITE(MRA8_ROM, astrocade_magicram_w) |
| 55 | 63 | AM_RANGE(0x1000, 0x3fff) AM_ROM /* Star Fortress writes in here?? */ |
| 56 | 64 | AM_RANGE(0x4000, 0x4fff) AM_READWRITE(MRA8_RAM, astrocade_videoram_w) AM_BASE(&astrocade_videoram) AM_SIZE(&videoram_size) /* ASG */ |
| 57 | 65 | ADDRESS_MAP_END |
| 58 | 66 | |
| 67 | |
| 59 | 68 | static ADDRESS_MAP_START( astrocade_io, ADDRESS_SPACE_IO, 8 ) |
| 60 | 69 | ADDRESS_MAP_FLAGS( AMEF_ABITS(8) ) |
| 61 | 70 | AM_RANGE(0x00, 0x07) AM_WRITE(astrocade_colour_register_w) |
| r1889 | r1890 | |
| 85 | 94 | AM_RANGE(0x18, 0xff) AM_WRITE(astrocade_soundblock1_w) |
| 86 | 95 | ADDRESS_MAP_END |
| 87 | 96 | |
| 97 | |
| 98 | |
| 99 | /************************************* |
| 100 | * |
| 101 | * Input ports |
| 102 | * |
| 103 | * |
| 104 | * The Astrocade has ports for four hand controllers. Each controller has a |
| 105 | * knob on top that can be simultaneously pushed as an eight-way joystick and |
| 106 | * twisted as a paddle, in addition to a trigger button. The knob can twist |
| 107 | * through about 270 degrees, registering 256 unique positions. It does not |
| 108 | * autocenter. When selecting options on the menu, twisting the knob to the |
| 109 | * right gives lower numbers, and twisting to the left gives larger numbers. |
| 110 | * Paddle games like Clowns have more intuitive behavior -- twisting to the |
| 111 | * right moves the character right. |
| 112 | * |
| 113 | * There is a 24-key keypad on the system itself (6 rows, 4 columns). It is |
| 114 | * labeled for the built-in calculator, but overlays were released for other |
| 115 | * programs, the most popular being the BASIC cartridges, which allowed a |
| 116 | * large number of inputs by making the bottom row shift buttons. The labels |
| 117 | * below first list the calculator key, then the BASIC keys in the order of no |
| 118 | * shift, GREEN shift, RED shift, BLUE shift, WORDS shift. |
| 119 | * |
| 120 | *************************************/ |
| 121 | |
| 88 | 122 | static INPUT_PORTS_START( astrocde ) |
| 89 | 123 | PORT_START_TAG("P1_HANDLE") |
| 90 | 124 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP) PORT_PLAYER(1) PORT_8WAY |
| r1889 | r1890 | |
| 181 | 215 | |
| 182 | 216 | |
| 183 | 217 | |
| 218 | /************************************* |
| 219 | * |
| 220 | * Machine drivers |
| 221 | * |
| 222 | *************************************/ |
| 223 | |
| 184 | 224 | static MACHINE_DRIVER_START( astrocde ) |
| 185 | 225 | /* basic machine hardware */ |
| 186 | 226 | MDRV_CPU_ADD(Z80, 1789000) /* 1.789 Mhz */ |
| r1889 | r1890 | |
| 209 | 249 | MACHINE_DRIVER_END |
| 210 | 250 | |
| 211 | 251 | |
| 252 | |
| 253 | /************************************* |
| 254 | * |
| 255 | * ROM definitions |
| 256 | * |
| 257 | *************************************/ |
| 258 | |
| 212 | 259 | ROM_START( astrocde ) |
| 213 | 260 | ROM_REGION( 0x10000, REGION_CPU1, 0 ) |
| 214 | 261 | ROM_LOAD( "astro.bin", 0x0000, 0x2000, CRC(ebc77f3a) SHA1(b902c941997c9d150a560435bf517c6a28137ecc)) |
| 262 | ROM_CART_LOAD(0, "bin", 0x2000, 0x8000, ROM_OPTIONAL) |
| 215 | 263 | ROM_END |
| 216 | 264 | |
| 217 | 265 | ROM_START( astrocdw ) |
| 218 | 266 | ROM_REGION( 0x10000, REGION_CPU1, 0 ) |
| 219 | 267 | ROM_LOAD( "bioswhit.bin", 0x0000, 0x2000, CRC(6eb53e79) SHA1(d84341feec1a0a0e8aa6151b649bc3cf6ef69fbf)) |
| 268 | ROM_CART_LOAD(0, "bin", 0x2000, 0x8000, ROM_OPTIONAL) |
| 220 | 269 | ROM_END |
| 221 | 270 | |
| 222 | | static void astrocde_cartslot_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 223 | | { |
| 224 | | /* cartslot */ |
| 225 | | switch(state) |
| 226 | | { |
| 227 | | /* --- the following bits of info are returned as 64-bit signed integers --- */ |
| 228 | | case MESS_DEVINFO_INT_COUNT: info->i = 1; break; |
| 229 | 271 | |
| 230 | | /* --- the following bits of info are returned as pointers to data or functions --- */ |
| 231 | | case MESS_DEVINFO_PTR_LOAD: info->load = device_load_astrocade_rom; break; |
| 232 | 272 | |
| 233 | | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 234 | | case MESS_DEVINFO_STR_FILE_EXTENSIONS: strcpy(info->s = device_temp_str(), "bin"); break; |
| 273 | /************************************* |
| 274 | * |
| 275 | * System configs |
| 276 | * |
| 277 | *************************************/ |
| 235 | 278 | |
| 236 | | default: cartslot_device_getinfo(devclass, state, info); break; |
| 237 | | } |
| 238 | | } |
| 239 | | |
| 240 | 279 | SYSTEM_CONFIG_START(astrocde) |
| 241 | | CONFIG_DEVICE(astrocde_cartslot_getinfo) |
| 280 | CONFIG_DEVICE(cartslot_device_getinfo) |
| 242 | 281 | SYSTEM_CONFIG_END |
| 243 | 282 | |
| 244 | | /*************************************************************************** |
| 245 | 283 | |
| 246 | | Game driver(s) |
| 247 | 284 | |
| 248 | | ***************************************************************************/ |
| 285 | /************************************* |
| 286 | * |
| 287 | * Driver definitions |
| 288 | * |
| 289 | *************************************/ |
| 249 | 290 | |
| 250 | | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT CONFIG COMPANY FULLNAME */ |
| 251 | | CONS( 1978, astrocde, 0, 0, astrocde, astrocde, 0, astrocde, "Bally Manufacturing", "Bally Professional Arcade", 0) |
| 252 | | CONS( 1977, astrocdw, astrocde, 0, astrocde, astrocde, 0, astrocde, "Bally Manufacturing", "Bally Computer System", 0) |
| 291 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT CONFIG COMPANY FULLNAME FLAGS */ |
| 292 | CONS( 1978, astrocde, 0, 0, astrocde, astrocde, 0, astrocde, "Bally Manufacturing", "Bally Professional Arcade", 0) |
| 293 | CONS( 1977, astrocdw, astrocde, 0, astrocde, astrocde, 0, astrocde, "Bally Manufacturing", "Bally Computer System", 0) |