src/mess/machine/er59256.c
| r0 | r6945 | |
| 1 | /********************************************************************* |
| 2 | |
| 3 | er59256.c |
| 4 | |
| 5 | Microchip ER59256 serial eeprom. |
| 6 | |
| 7 | |
| 8 | *********************************************************************/ |
| 9 | |
| 10 | #include "driver.h" |
| 11 | #include "er59256.h" |
| 12 | |
| 13 | /* LOGLEVEL 0=no logging, 1=just commands and data, 2=everything ! */ |
| 14 | |
| 15 | #define LOGLEVEL 1 |
| 16 | |
| 17 | #define LOG(level,...) if(LOGLEVEL>=level) logerror(__VA_ARGS__) |
| 18 | #define LOG_BITS(bits) logerror("CS=%d CK=%d DI=%d DO=%d", (bits&CS_MASK) ? 1 : 0, (bits&CK_MASK) ? 1 : 0, (bits&DI_MASK) ? 1 : 0, (bits&DO_MASK) ? 1 : 0) |
| 19 | |
| 20 | /*************************************************************************** |
| 21 | TYPE DEFINITIONS |
| 22 | ***************************************************************************/ |
| 23 | |
| 24 | typedef struct _er59256_t er59256_t; |
| 25 | struct _er59256_t |
| 26 | { |
| 27 | /* The actual memory */ |
| 28 | UINT16 eerom[EEROM_WORDS]; |
| 29 | |
| 30 | /* Bits as they appear on the io pins, current state */ |
| 31 | UINT8 io_bits; |
| 32 | |
| 33 | /* Bits as they appear on the io pins, previous state */ |
| 34 | UINT8 old_io_bits; |
| 35 | |
| 36 | |
| 37 | /* the 16 bit shift in/out reg */ |
| 38 | UINT16 in_shifter; |
| 39 | UINT32 out_shifter; |
| 40 | |
| 41 | /* Count of bits recieved since last CS low->high */ |
| 42 | UINT8 bitcount; |
| 43 | |
| 44 | /* Command & addresss */ |
| 45 | UINT8 command; |
| 46 | |
| 47 | /* Write enable and write in progress flags */ |
| 48 | UINT8 flags; |
| 49 | }; |
| 50 | |
| 51 | /*************************************************************************** |
| 52 | FUNCTION PROTOTYPES |
| 53 | ************************************************************************/ |
| 54 | |
| 55 | void decode_command(er59256_t *er59256); |
| 56 | |
| 57 | /*************************************************************************** |
| 58 | INLINE FUNCTIONS |
| 59 | ***************************************************************************/ |
| 60 | |
| 61 | INLINE er59256_t *get_token(const device_config *device) |
| 62 | { |
| 63 | assert(device->type == ER59256); |
| 64 | return (er59256_t *) device->token; |
| 65 | } |
| 66 | |
| 67 | |
| 68 | /*************************************************************************** |
| 69 | IMPLEMENTATION |
| 70 | ***************************************************************************/ |
| 71 | |
| 72 | /*------------------------------------------------- |
| 73 | DEVICE_START( er59256 ) |
| 74 | -------------------------------------------------*/ |
| 75 | |
| 76 | static DEVICE_START( er59256 ) |
| 77 | { |
| 78 | er59256_t *er59256 = get_token(device); |
| 79 | |
| 80 | memset(er59256, 0x00, sizeof(er59256_t)); |
| 81 | |
| 82 | // Start with rom defaulted to erased |
| 83 | memset(&er59256->eerom, 0xFF, EEROM_WORDS*2); |
| 84 | |
| 85 | er59256->command=CMD_INVALID; |
| 86 | } |
| 87 | |
| 88 | static DEVICE_STOP( er59256 ) |
| 89 | { |
| 90 | /* Save contents of eerom */ |
| 91 | } |
| 92 | |
| 93 | void er59256_set_iobits(const device_config *device, UINT8 newbits) |
| 94 | { |
| 95 | er59256_t *er59256 = get_token(device); |
| 96 | |
| 97 | // Make sure we only apply valid bits |
| 98 | newbits&=ALL_MASK; |
| 99 | |
| 100 | if(LOGLEVEL>1) |
| 101 | { |
| 102 | logerror("en59256:newbits=%02X : ",newbits); |
| 103 | LOG_BITS(newbits); |
| 104 | logerror(" io_bits=%02X : ",er59256->io_bits); |
| 105 | LOG_BITS(er59256->io_bits); |
| 106 | logerror(" old_io_bits=%02X : ",er59256->old_io_bits); |
| 107 | LOG_BITS(er59256->old_io_bits); |
| 108 | logerror(" bitcount=%d, in_shifter=%04X, out_shifter=%05X, flags=%02X\n",er59256->bitcount,er59256->in_shifter,er59256->out_shifter,er59256->flags); |
| 109 | } |
| 110 | // Only do anything if the inputs have changed |
| 111 | if((newbits&IN_MASK)!=(er59256->io_bits&IN_MASK)) |
| 112 | { |
| 113 | // save the current state, then set the new one |
| 114 | er59256->old_io_bits=er59256->io_bits; |
| 115 | er59256->io_bits=newbits; |
| 116 | |
| 117 | if(CS_RISE(er59256)) |
| 118 | { |
| 119 | er59256->flags&=~FLAG_START_BIT; |
| 120 | er59256->command=CMD_INVALID; |
| 121 | } |
| 122 | |
| 123 | if(LOGLEVEL>1) |
| 124 | { |
| 125 | if(CK_RISE(er59256)) logerror("en59256:CK rise\n"); |
| 126 | if(CS_RISE(er59256)) logerror("en59256:CS rise\n"); |
| 127 | if(CK_FALL(er59256)) logerror("en59256:CK fall\n"); |
| 128 | if(CS_FALL(er59256)) logerror("en59256:CS fall\n"); |
| 129 | } |
| 130 | |
| 131 | if(CK_RISE(er59256) && CS_VALID(er59256)) |
| 132 | { |
| 133 | if((STARTED(er59256)==0) && (GET_DI(er59256)==1)) |
| 134 | { |
| 135 | er59256->bitcount=0; |
| 136 | er59256->flags|=FLAG_START_BIT; |
| 137 | } |
| 138 | else |
| 139 | { |
| 140 | SHIFT_IN(er59256); |
| 141 | er59256->bitcount++; |
| 142 | |
| 143 | if(er59256->bitcount==CMD_BITLEN) |
| 144 | decode_command(er59256); |
| 145 | |
| 146 | if((er59256->bitcount==WRITE_BITLEN) && ((er59256->command & CMD_MASK)==CMD_WRITE)) |
| 147 | { |
| 148 | er59256->eerom[er59256->command & ADDR_MASK]=er59256->in_shifter; |
| 149 | LOG(1,"en59256:write[%02X]=%04X\n",(er59256->command & ADDR_MASK),er59256->in_shifter); |
| 150 | er59256->command=CMD_INVALID; |
| 151 | } |
| 152 | SHIFT_OUT(er59256); |
| 153 | } |
| 154 | |
| 155 | LOG(2,"io_bits:out=%02X\n",er59256->io_bits); |
| 156 | } |
| 157 | } |
| 158 | } |
| 159 | |
| 160 | UINT8 er59256_get_iobits(const device_config *device) |
| 161 | { |
| 162 | er59256_t *er59256 = get_token(device); |
| 163 | |
| 164 | return er59256->io_bits; |
| 165 | } |
| 166 | |
| 167 | |
| 168 | void decode_command(er59256_t *er59256) |
| 169 | { |
| 170 | er59256->out_shifter=0x0000; |
| 171 | er59256->command=(er59256->in_shifter & (CMD_MASK | ADDR_MASK)); |
| 172 | |
| 173 | switch(er59256->command & CMD_MASK) |
| 174 | { |
| 175 | case CMD_READ : er59256->out_shifter=er59256->eerom[er59256->command & ADDR_MASK]; |
| 176 | LOG(1,"en59256:read[%02X]=%04X\n",(er59256->command&ADDR_MASK),er59256->eerom[er59256->command & ADDR_MASK]); |
| 177 | break; |
| 178 | case CMD_WRITE : break; |
| 179 | case CMD_ERASE : if (WRITE_ENABLED(er59256)) er59256->eerom[er59256->command & ADDR_MASK]=0xFF; |
| 180 | LOG(1,"en59256:erase[%02X]\n",(er59256->command&ADDR_MASK)); |
| 181 | break; |
| 182 | case CMD_EWEN : er59256->flags|=FLAG_WRITE_EN; |
| 183 | LOG(1,"en59256:erase/write enabled\n"); |
| 184 | break; |
| 185 | case CMD_EWDS : er59256->flags&=~FLAG_WRITE_EN; |
| 186 | LOG(1,"en59256:erase/write disabled\n"); |
| 187 | break; |
| 188 | case CMD_ERAL : if (WRITE_ENABLED(er59256)) memset(&er59256->eerom, 0xFF, EEROM_WORDS*2); |
| 189 | LOG(1,"en59256:erase all\n"); |
| 190 | break; |
| 191 | } |
| 192 | |
| 193 | if ((er59256->command & CMD_MASK)!=CMD_WRITE) |
| 194 | er59256->command=CMD_INVALID; |
| 195 | } |
| 196 | |
| 197 | /*------------------------------------------------- |
| 198 | DEVICE_GET_INFO( er59256 ) |
| 199 | -------------------------------------------------*/ |
| 200 | |
| 201 | DEVICE_GET_INFO( er59256 ) |
| 202 | { |
| 203 | switch (state) |
| 204 | { |
| 205 | /* --- the following bits of info are returned as 64-bit signed integers --- */ |
| 206 | case DEVINFO_INT_TOKEN_BYTES: info->i = sizeof(er59256_t); break; |
| 207 | case DEVINFO_INT_INLINE_CONFIG_BYTES: info->i = 0; break; |
| 208 | case DEVINFO_INT_CLASS: info->i = DEVICE_CLASS_PERIPHERAL; break; |
| 209 | |
| 210 | /* --- the following bits of info are returned as pointers to data or functions --- */ |
| 211 | case DEVINFO_FCT_START: info->start = DEVICE_START_NAME(er59256); break; |
| 212 | case DEVINFO_FCT_STOP: info->stop = DEVICE_STOP_NAME(er59256); break; |
| 213 | case DEVINFO_FCT_RESET: /* Nothing */ break; |
| 214 | |
| 215 | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 216 | case DEVINFO_STR_NAME: strcpy(info->s, "Microchip ER59256 serial eeprom."); break; |
| 217 | case DEVINFO_STR_FAMILY: strcpy(info->s, "Microchip ER59256 serial eeprom."); break; |
| 218 | case DEVINFO_STR_VERSION: strcpy(info->s, "1.0"); break; |
| 219 | case DEVINFO_STR_SOURCE_FILE: strcpy(info->s, __FILE__); break; |
| 220 | case DEVINFO_STR_CREDITS: /* Nothing */ break; |
| 221 | } |
| 222 | } |
src/mess/machine/rmnimbus.c
| r6944 | r6945 | |
| 17 | 17 | #include "debug/debugcpu.h" |
| 18 | 18 | #include "debug/debugcon.h" |
| 19 | 19 | #include "devices/flopdrv.h" |
| 20 | #include "machine/er59256.h" |
| 20 | 21 | #include "machine/pic8259.h" |
| 21 | 22 | #include "machine/pit8253.h" |
| 22 | 23 | #include "machine/msm8251.h" |
| 23 | 24 | #include "machine/z80sio.h" |
| 25 | #include "sound/ay8910.h" |
| 26 | #include "sound/msm5205.h" |
| 24 | 27 | |
| 25 | 28 | #include "includes/rmnimbus.h" |
| 26 | 29 | |
| r6944 | r6945 | |
| 32 | 35 | #define LATCH_INTS 1 |
| 33 | 36 | #define LOG_PORTS 0 |
| 34 | 37 | #define LOG_INTERRUPTS 0 |
| 35 | | #define LOG_INTERRUPTS_EXT |
| 38 | #define LOG_INTERRUPTS_EXT 1 |
| 36 | 39 | #define LOG_TIMER 0 |
| 37 | 40 | #define LOG_OPTIMIZATION 0 |
| 38 | 41 | #define LOG_DMA 0 |
| r6944 | r6945 | |
| 40 | 43 | #define LOG_KEYBOARD 0 |
| 41 | 44 | #define LOG_SIO 0 |
| 42 | 45 | #define LOG_DISK 0 |
| 46 | #define LOG_PC8031 0 |
| 47 | #define LOG_PC8031_186 1 |
| 48 | #define LOG_PC8031_PORT 0 |
| 49 | #define LOG_IOU 1 |
| 50 | #define LOG_SOUND 1 |
| 43 | 51 | |
| 44 | 52 | /* 80186 internal stuff */ |
| 45 | 53 | struct mem_state |
| r6944 | r6945 | |
| 141 | 149 | } nimbus_fdc; |
| 142 | 150 | |
| 143 | 151 | |
| 152 | /* 8031 Peripheral controler */ |
| 153 | |
| 154 | UINT8 pcregs[PC8031_RAMSIZE]; |
| 155 | UINT8 reg0C0_ptr; |
| 156 | UINT8 reg0C2_ptr; |
| 157 | |
| 158 | /* IO Unit */ |
| 159 | |
| 160 | UINT8 iou_reg092; |
| 161 | UINT8 pc8031_int_pending; |
| 162 | UINT8 pc8031_inc_pending; |
| 163 | |
| 164 | /* Sound */ |
| 165 | UINT8 last_playmode; |
| 166 | |
| 144 | 167 | static void drq_callback(running_machine *machine, int which); |
| 145 | 168 | |
| 146 | 169 | static void execute_debug_irq(running_machine *machine, int ref, int params, const char *param[]); |
| r6944 | r6945 | |
| 158 | 181 | static void keyboard_reset(void); |
| 159 | 182 | static TIMER_CALLBACK(keyscan_callback); |
| 160 | 183 | |
| 184 | static void pc8031_reset(void); |
| 185 | static void iou_reset(void); |
| 186 | static void sound_reset(running_machine *machine); |
| 187 | |
| 161 | 188 | #define num_ioports 0x80 |
| 162 | 189 | static UINT16 IOPorts[num_ioports]; |
| 163 | 190 | |
| r6944 | r6945 | |
| 224 | 251 | vector=i186.intr.poll_status & 0x1f; break; |
| 225 | 252 | } |
| 226 | 253 | |
| 227 | | if (LOG_INTERRUPTS_EXT) |
| 254 | if (LOG_INTERRUPTS) |
| 228 | 255 | { |
| 229 | 256 | logerror("i186.intr.ext[0]=%04X i186.intr.ext[1]=%04X\n",i186.intr.ext[0],i186.intr.ext[1]); |
| 230 | 257 | logerror("Ext vectors : %02X %02X\n",i186.intr.ext_vector[0],i186.intr.ext_vector[1]); |
| r6944 | r6945 | |
| 1242 | 1269 | { |
| 1243 | 1270 | /* CPU */ |
| 1244 | 1271 | nimbus_cpu_reset(machine); |
| 1272 | iou_reset(); |
| 1245 | 1273 | fdc_reset(); |
| 1246 | 1274 | keyboard_reset(); |
| 1275 | pc8031_reset(); |
| 1276 | sound_reset(machine); |
| 1247 | 1277 | } |
| 1248 | 1278 | |
| 1249 | 1279 | DRIVER_INIT(nimbus) |
| r6944 | r6945 | |
| 1260 | 1290 | /* setup debug commands */ |
| 1261 | 1291 | if (machine->debug_flags & DEBUG_FLAG_ENABLED) |
| 1262 | 1292 | { |
| 1263 | | debug_console_register_command(machine, "nimbus_irq", CMDFLAG_NONE, 0, 0, 1, execute_debug_irq); |
| 1293 | debug_console_register_command(machine, "nimbus_irq", CMDFLAG_NONE, 0, 0, 2, execute_debug_irq); |
| 1264 | 1294 | debug_console_register_command(machine, "nimbus_intmasks", CMDFLAG_NONE, 0, 0, 0, execute_debug_intmasks); |
| 1265 | 1295 | |
| 1266 | 1296 | /* set up the instruction hook */ |
| r6944 | r6945 | |
| 1272 | 1302 | static void execute_debug_irq(running_machine *machine, int ref, int params, const char *param[]) |
| 1273 | 1303 | { |
| 1274 | 1304 | int IntNo; |
| 1275 | | int IntMask; |
| 1305 | int Vector; |
| 1276 | 1306 | |
| 1277 | | if(params>0) |
| 1307 | if(params>1) |
| 1278 | 1308 | { |
| 1279 | | sscanf(param[0],"%d",&IntNo); |
| 1280 | | |
| 1281 | | IntMask=0x0000; |
| 1282 | | |
| 1283 | | switch (IntNo) |
| 1284 | | { |
| 1285 | | case 0 : IntMask=0x010; break; |
| 1286 | | case 1 : IntMask=0x020; break; |
| 1287 | | case 2 : IntMask=0x040; break; |
| 1288 | | case 3 : IntMask=0x080; break; |
| 1289 | | } |
| 1290 | | |
| 1291 | | i186.intr.request |= IntMask; |
| 1292 | | update_interrupt_state(machine); |
| 1293 | | |
| 1294 | | debug_console_printf(machine,"triggering IRQ%d, IntMask=%4.4X, i186.intr.request=%4.4X\n",IntNo,IntMask,i186.intr.request); |
| 1295 | | |
| 1296 | | // cputag_set_input_line(machine, MAINCPU_TAG, IntNo, HOLD_LINE ); |
| 1297 | | // cputag_set_input_line(machine, MAINCPU_TAG, IntNo, CLEAR_LINE ); |
| 1298 | | |
| 1309 | sscanf(param[0],"%X",&IntNo); |
| 1310 | sscanf(param[1],"%X",&Vector); |
| 1311 | |
| 1312 | debug_console_printf(machine,"triggering IRQ%d, Vector=%02X\n",IntNo,Vector); |
| 1313 | external_int(machine,IntNo,Vector); |
| 1299 | 1314 | } |
| 1300 | 1315 | else |
| 1301 | 1316 | { |
| 1302 | | debug_console_printf(machine,"Error, you must supply an intno to trigger\n"); |
| 1317 | debug_console_printf(machine,"Error, you must supply an intno and vector to trigger\n"); |
| 1303 | 1318 | } |
| 1304 | 1319 | |
| 1305 | 1320 | |
| r6944 | r6945 | |
| 1438 | 1453 | case 3 : |
| 1439 | 1454 | { |
| 1440 | 1455 | set_type("t_piconet"); |
| 1456 | set_drv("d_piconet"); |
| 1457 | |
| 1441 | 1458 | switch(ax) |
| 1442 | 1459 | { |
| 1443 | | case 0 : set_func("f_get_version_number"); break; |
| 1460 | case 0 : set_func("f_get_version_number"); break; |
| 1461 | case 1 : set_func("f_get_slave_status"); break; |
| 1462 | case 2 : set_func("f_get_slave_map"); break; |
| 1463 | case 3 : set_func("f_change_slave_addr"); break; |
| 1464 | case 4 : set_func("f_read_slave_control"); break; |
| 1465 | case 5 : set_func("f_write_slave_control"); break; |
| 1466 | case 6 : set_func("f_send_data_byte"); break; |
| 1467 | case 7 : set_func("f_request_data_byte"); break; |
| 1468 | case 8 : set_func("f_send_data_block"); break; |
| 1469 | case 9 : set_func("f_request_data_block"); break; |
| 1470 | case 10 : set_func("f_reset_slave"); break; |
| 1471 | |
| 1444 | 1472 | } |
| 1445 | 1473 | }; break; |
| 1446 | 1474 | |
| r6944 | r6945 | |
| 1461 | 1489 | case 5 : |
| 1462 | 1490 | { |
| 1463 | 1491 | set_type("t_graphics_input"); |
| 1492 | |
| 1493 | switch(bx) |
| 1494 | { |
| 1495 | case 0 : set_drv("d_mouse"); break; |
| 1496 | case 1 : set_drv("d_joystick_1"); break; |
| 1497 | case 2 : set_drv("d_joystick_2"); break; |
| 1498 | } |
| 1499 | |
| 1500 | |
| 1464 | 1501 | switch(ax) |
| 1465 | 1502 | { |
| 1466 | 1503 | case 0 : set_func("f_get_version_number"); break; |
| 1504 | case 1 : set_func("f_graphics_input_cold_start"); break; |
| 1505 | case 2 : set_func("f_graphics_input_device_off"); break; |
| 1506 | case 3 : set_func("f_return_button_status"); break; |
| 1507 | case 4 : set_func("f_return_switch_and_button_stat"); break; |
| 1508 | case 5 : set_func("f_start_tracking"); break; |
| 1509 | case 6 : set_func("f_stop_tracking"); break; |
| 1510 | case 7 : set_func("f_enquire_position"); break; |
| 1511 | case 8 : set_func("f_set_position"); break; |
| 1512 | |
| 1513 | case 10 : set_func("f_return_button_press_info"); break; |
| 1514 | case 11 : set_func("f_return_button_release_info"); break; |
| 1515 | case 12 : set_func("f_set_gain/f_set_squeaks_per_pixel_ratio"); break; |
| 1516 | case 13 : set_func("f_enquire_graphics_in_misc_data"); break; |
| 1467 | 1517 | } |
| 1468 | 1518 | }; break; |
| 1469 | 1519 | |
| r6944 | r6945 | |
| 1583 | 1633 | |
| 1584 | 1634 | case 10 : |
| 1585 | 1635 | { |
| 1636 | |
| 1586 | 1637 | set_type("t_acoustics"); |
| 1587 | | switch(ax) |
| 1638 | |
| 1639 | switch(bx) |
| 1588 | 1640 | { |
| 1589 | | case 0 : set_func("f_get_version_number"); break; |
| 1590 | | } |
| 1641 | case 0 : |
| 1642 | { |
| 1643 | set_drv("d_sound"); |
| 1644 | |
| 1645 | switch(ax) |
| 1646 | { |
| 1647 | case 0 : set_func("f_get_version_number"); break; |
| 1648 | case 1 : set_func("f_sound_enable"); break; |
| 1649 | case 2 : set_func("f_play_note"); break; |
| 1650 | case 3 : set_func("f_get_queue_status"); break; |
| 1651 | } |
| 1652 | }; break; |
| 1653 | |
| 1654 | case 1 : |
| 1655 | { |
| 1656 | set_drv("d_voice"); |
| 1657 | |
| 1658 | switch(ax) |
| 1659 | { |
| 1660 | case 0 : set_func("f_get_version_number"); break; |
| 1661 | case 1 : set_func("f_talk"); break; |
| 1662 | case 2 : set_func("f_wait_and_talk"); break; |
| 1663 | case 3 : set_func("f_test_talking"); break; |
| 1664 | } |
| 1665 | } |
| 1666 | } |
| 1591 | 1667 | }; break; |
| 1592 | 1668 | |
| 1593 | 1669 | case 11 : |
| r6944 | r6945 | |
| 1868 | 1944 | sio_int_state=state; |
| 1869 | 1945 | |
| 1870 | 1946 | if(state) |
| 1871 | | external_int(device->machine,0,0x9C); |
| 1947 | external_int(device->machine,0,EXTERNAL_INT_Z80SIO); |
| 1872 | 1948 | } |
| 1873 | 1949 | } |
| 1874 | 1950 | |
| r6944 | r6945 | |
| 1908 | 1984 | if(LOG_DISK) |
| 1909 | 1985 | logerror("nimbus_fdc_intrq_w(%d)\n", state); |
| 1910 | 1986 | |
| 1911 | | if(state && nimbus_fdc.irq_enabled) |
| 1987 | if(state && (iou_reg092 & FDC_INT_ENABLE)) |
| 1912 | 1988 | { |
| 1913 | | external_int(device->machine,0,0x80); |
| 1989 | external_int(device->machine,0,EXTERNAL_INT_FDC); |
| 1914 | 1990 | } |
| 1915 | 1991 | } |
| 1916 | 1992 | |
| r6944 | r6945 | |
| 2007 | 2083 | } |
| 2008 | 2084 | } |
| 2009 | 2085 | |
| 2086 | /* 8031/8051 Peripheral controler 80186 side */ |
| 2087 | |
| 2088 | #define REG_0C2_INIT 1 |
| 2089 | #define INC_REG0C2_PTR() reg0C2_ptr++; if (reg0C2_ptr==PC8031_RAMSIZE) reg0C2_ptr=REG_0C2_INIT; |
| 2090 | #define CLEAR_PCREGS() memset(&pcregs[1],0,PC8031_RAMSIZE-1); |
| 2091 | |
| 2092 | static void pc8031_reset(void) |
| 2093 | { |
| 2094 | logerror("peripheral controler reset\n"); |
| 2095 | |
| 2096 | memset(&pcregs,0,sizeof(pcregs)); |
| 2097 | reg0C0_ptr=0; |
| 2098 | reg0C2_ptr=REG_0C2_INIT; |
| 2099 | pc8031_int_pending=0; |
| 2100 | pc8031_inc_pending=0; |
| 2101 | } |
| 2102 | |
| 2103 | static void dump_pcregs(void) |
| 2104 | { |
| 2105 | int regno; |
| 2106 | |
| 2107 | if(LOG_IOU) |
| 2108 | { |
| 2109 | logerror("pcregs: "); |
| 2110 | for(regno=0;regno<PC8031_RAMSIZE;regno++) |
| 2111 | logerror("%02X, ",pcregs[regno]); |
| 2112 | |
| 2113 | logerror("\n"); |
| 2114 | } |
| 2115 | } |
| 2116 | |
| 2117 | READ8_HANDLER( pc8031_r ) |
| 2118 | { |
| 2119 | int pc=cpu_get_pc(space->cpu); |
| 2120 | UINT8 result; |
| 2121 | |
| 2122 | switch(offset*2) |
| 2123 | { |
| 2124 | case 0x00 : result=pcregs[reg0C0_ptr]; |
| 2125 | reg0C2_ptr=REG_0C2_INIT; |
| 2126 | CLEAR_PCREGS(); |
| 2127 | break; |
| 2128 | |
| 2129 | case 0x02 : result=pcregs[reg0C2_ptr]; |
| 2130 | INC_REG0C2_PTR(); |
| 2131 | break; |
| 2132 | |
| 2133 | default : result=0; break; |
| 2134 | } |
| 2135 | |
| 2136 | if(LOG_PC8031_186) |
| 2137 | logerror("Nimbus PCIOR %08X read of %04X returns %02X reg0C2_ptr=%02X\n",pc,(offset*2)+0xC0,result,reg0C2_ptr); |
| 2138 | |
| 2139 | dump_pcregs(); |
| 2140 | |
| 2141 | return result; |
| 2142 | } |
| 2143 | |
| 2144 | WRITE8_HANDLER( pc8031_w ) |
| 2145 | { |
| 2146 | int pc=cpu_get_pc(space->cpu); |
| 2147 | |
| 2148 | switch(offset*2) |
| 2149 | { |
| 2150 | case 0x00 : pcregs[reg0C0_ptr]=data; |
| 2151 | //reg0C2_ptr=REG_0C2_INIT; |
| 2152 | //CLEAR_PCREGS(); |
| 2153 | pc8031_int_pending=1; |
| 2154 | break; |
| 2155 | |
| 2156 | case 0x02 : pcregs[reg0C2_ptr]=data; |
| 2157 | //INC_REG0C2_PTR(); |
| 2158 | pc8031_int_pending=1; |
| 2159 | pc8031_inc_pending=1; |
| 2160 | break; |
| 2161 | } |
| 2162 | |
| 2163 | if(LOG_PC8031_186) |
| 2164 | logerror("Nimbus PCIOW %08X write of %02X to %04X, reg0C2_ptr=%02X,\n",pc,data,(offset*2)+0xC0,reg0C2_ptr); |
| 2165 | |
| 2166 | dump_pcregs(); |
| 2167 | } |
| 2168 | |
| 2169 | /* 8031/8051 Peripheral controler 8031/8051 side */ |
| 2170 | |
| 2171 | READ8_HANDLER( pc8031_iou_r ) |
| 2172 | { |
| 2173 | int pc=cpu_get_pc(space->cpu); |
| 2174 | UINT8 result; |
| 2175 | |
| 2176 | result=pcregs[offset%PC8031_RAMSIZE]; |
| 2177 | |
| 2178 | if(LOG_PC8031) |
| 2179 | logerror("8031: PCIOR %04X read of %04X returns %02X\n",pc,offset,result); |
| 2180 | |
| 2181 | //if(offset==0x00) |
| 2182 | //{ |
| 2183 | // reg0C2_ptr=REG_0C2_INIT; |
| 2184 | // CLEAR_PCREGS(); |
| 2185 | //} |
| 2186 | |
| 2187 | if((offset==reg0C2_ptr) && pc8031_inc_pending) |
| 2188 | { |
| 2189 | INC_REG0C2_PTR(); |
| 2190 | pc8031_inc_pending=0; |
| 2191 | } |
| 2192 | |
| 2193 | if((iou_reg092 & PC8031_INT_ENABLE) && pc8031_int_pending) |
| 2194 | { |
| 2195 | pc8031_int_pending=0x00; |
| 2196 | external_int(space->machine,0,EXTERNAL_INT_PC8031); |
| 2197 | } |
| 2198 | |
| 2199 | return result; |
| 2200 | } |
| 2201 | |
| 2202 | WRITE8_HANDLER( pc8031_iou_w ) |
| 2203 | { |
| 2204 | int pc=cpu_get_pc(space->cpu); |
| 2205 | |
| 2206 | if(LOG_PC8031) |
| 2207 | logerror("8031 PCIOW %04X write of %02X to %04X\n",pc,data,offset); |
| 2208 | |
| 2209 | pcregs[offset%PC8031_RAMSIZE]=data; |
| 2210 | |
| 2211 | // if(offset==0x00) |
| 2212 | // { |
| 2213 | // reg0C2_ptr=REG_0C2_INIT; |
| 2214 | // CLEAR_PCREGS(); |
| 2215 | // } |
| 2216 | } |
| 2217 | |
| 2218 | READ8_HANDLER( pc8031_port_r ) |
| 2219 | { |
| 2220 | const device_config *er59256 = devtag_get_device(space->machine, ER59256_TAG); |
| 2221 | int pc=cpu_get_pc(space->cpu); |
| 2222 | UINT8 result = 0; |
| 2223 | |
| 2224 | if(LOG_PC8031_PORT) |
| 2225 | logerror("8031: PCPORTR %04X read of %04X returns %02X\n",pc,offset,result); |
| 2226 | |
| 2227 | switch(offset) |
| 2228 | { |
| 2229 | case 0x01 : result=er59256_get_iobits(er59256); |
| 2230 | } |
| 2231 | |
| 2232 | return result; |
| 2233 | } |
| 2234 | |
| 2235 | WRITE8_HANDLER( pc8031_port_w ) |
| 2236 | { |
| 2237 | const device_config *er59256 = devtag_get_device(space->machine, ER59256_TAG); |
| 2238 | int pc=cpu_get_pc(space->cpu); |
| 2239 | |
| 2240 | switch (offset) |
| 2241 | { |
| 2242 | case 0x01 : er59256_set_iobits(er59256,(data&0x0F)); |
| 2243 | } |
| 2244 | |
| 2245 | if(LOG_PC8031_PORT) |
| 2246 | logerror("8031 PCPORTW %04X write of %02X to %04X\n",pc,data,offset); |
| 2247 | } |
| 2248 | |
| 2249 | |
| 2250 | |
| 2251 | /* IO Unit */ |
| 2252 | READ8_HANDLER( iou_r ) |
| 2253 | { |
| 2254 | int pc=cpu_get_pc(space->cpu); |
| 2255 | UINT8 result=0; |
| 2256 | |
| 2257 | if(offset==0) |
| 2258 | { |
| 2259 | result=iou_reg092; |
| 2260 | } |
| 2261 | |
| 2262 | if(LOG_IOU) |
| 2263 | logerror("Nimbus IOUR %08X read of %04X returns %02X\n",pc,(offset*2)+0x92,result); |
| 2264 | |
| 2265 | return result; |
| 2266 | } |
| 2267 | |
| 2268 | WRITE8_HANDLER( iou_w ) |
| 2269 | { |
| 2270 | int pc=cpu_get_pc(space->cpu); |
| 2271 | const device_config *msm5205 = devtag_get_device(space->machine, MSM5205_TAG); |
| 2272 | |
| 2273 | if(LOG_IOU) |
| 2274 | logerror("Nimbus IOUW %08X write of %02X to %04X\n",pc,data,(offset*2)+0x92); |
| 2275 | |
| 2276 | if(offset==0) |
| 2277 | { |
| 2278 | iou_reg092=data; |
| 2279 | msm5205_reset_w(msm5205, (data & MSM5205_INT_ENABLE) ? 0 : 1); |
| 2280 | } |
| 2281 | } |
| 2282 | |
| 2283 | static void iou_reset(void) |
| 2284 | { |
| 2285 | iou_reg092=0x00; |
| 2286 | pc8031_int_pending=0; |
| 2287 | } |
| 2288 | |
| 2289 | /* |
| 2290 | Sound hardware : AY8910 |
| 2291 | |
| 2292 | I believe that the IO ports of the 8910 are used to control the ROMPack ports, however |
| 2293 | this is currently un-implemented (and may never be as I don't have any rompacks!). |
| 2294 | |
| 2295 | The registers are mapped as so : |
| 2296 | |
| 2297 | Address 0xE0 0xE2 |
| 2298 | Read Data ???? |
| 2299 | Write Register Address Data |
| 2300 | |
| 2301 | */ |
| 2302 | |
| 2303 | static void sound_reset(running_machine *machine) |
| 2304 | { |
| 2305 | //const device_config *ay8910 = devtag_get_device(machine, AY8910_TAG); |
| 2306 | const device_config *msm5205 = devtag_get_device(machine, MSM5205_TAG); |
| 2307 | |
| 2308 | //ay8910_reset_ym(ay8910); |
| 2309 | msm5205_reset_w(msm5205, 1); |
| 2310 | |
| 2311 | last_playmode=MSM5205_S48_4B; |
| 2312 | msm5205_playmode_w(msm5205,last_playmode); |
| 2313 | } |
| 2314 | |
| 2315 | READ8_HANDLER( sound_ay8910_r ) |
| 2316 | { |
| 2317 | const device_config *ay8910 = devtag_get_device(space->machine, AY8910_TAG); |
| 2318 | UINT8 result=0; |
| 2319 | |
| 2320 | if ((offset*2)==0) |
| 2321 | result=ay8910_r(ay8910,0); |
| 2322 | |
| 2323 | return result; |
| 2324 | } |
| 2325 | |
| 2326 | WRITE8_HANDLER( sound_ay8910_w ) |
| 2327 | { |
| 2328 | int pc=cpu_get_pc(space->cpu); |
| 2329 | const device_config *ay8910 = devtag_get_device(space->machine, AY8910_TAG); |
| 2330 | |
| 2331 | if(LOG_SOUND) |
| 2332 | logerror("Nimbus SoundW %05X write of %02X to %04X\n",pc,data,(offset*2)+0xE0); |
| 2333 | |
| 2334 | switch (offset*2) |
| 2335 | { |
| 2336 | case 0x00 : ay8910_data_address_w(ay8910, 1, data); break; |
| 2337 | case 0x02 : ay8910_data_address_w(ay8910, 0, data); break; |
| 2338 | } |
| 2339 | |
| 2340 | } |
| 2341 | |
| 2342 | WRITE8_HANDLER( sound_ay8910_porta_w ) |
| 2343 | { |
| 2344 | const device_config *msm5205 = devtag_get_device(space->machine, MSM5205_TAG); |
| 2345 | |
| 2346 | msm5205_data_w(msm5205, data); |
| 2347 | } |
| 2348 | |
| 2349 | WRITE8_HANDLER( sound_ay8910_portb_w ) |
| 2350 | { |
| 2351 | const device_config *msm5205 = devtag_get_device(space->machine, MSM5205_TAG); |
| 2352 | |
| 2353 | if((data & 0x07)!=last_playmode) |
| 2354 | { |
| 2355 | last_playmode=(data & 0x07); |
| 2356 | msm5205_playmode_w(msm5205, last_playmode); |
| 2357 | } |
| 2358 | } |
| 2359 | |
| 2360 | void nimbus_msm5205_vck(const device_config *device) |
| 2361 | { |
| 2362 | if(iou_reg092 & MSM5205_INT_ENABLE) |
| 2363 | external_int(device->machine,0,EXTERNAL_INT_MSM5205); |
| 2364 | } |
| 2365 | |
| 2366 | |
src/mess/drivers/rmnimbus.c
| r6944 | r6945 | |
| 16 | 16 | #include "formats/flopimg.h" |
| 17 | 17 | #include "formats/pc_dsk.h" |
| 18 | 18 | #include "includes/rmnimbus.h" |
| 19 | #include "machine/er59256.h" |
| 19 | 20 | #include "machine/z80sio.h" |
| 21 | #include "sound/ay8910.h" |
| 22 | #include "sound/msm5205.h" |
| 20 | 23 | |
| 21 | | static const unsigned char nimbus_palette[] = |
| 24 | const unsigned char nimbus_palette[SCREEN_NO_COLOURS][3] = |
| 22 | 25 | { |
| 23 | 26 | /*normal brightness */ |
| 24 | | 0x00,0x00,0x00, /* black */ |
| 25 | | 0x00,0x00,0x80, /* blue */ |
| 26 | | 0x80,0x00,0x00, /* red */ |
| 27 | | 0x80,0x00,0x80, /* magenta */ |
| 28 | | 0x00,0x80,0x00, /* green */ |
| 29 | | 0x00,0x80,0x80, /* cyan */ |
| 30 | | 0x80,0x80,0x00, /* yellow */ |
| 31 | | 0x80,0x80,0x80, /* light grey */ |
| 27 | { 0x00,0x00,0x00 }, /* black */ |
| 28 | { 0x00,0x00,0x80 }, /* blue */ |
| 29 | { 0x80,0x00,0x00 }, /* red */ |
| 30 | { 0x80,0x00,0x80 }, /* magenta */ |
| 31 | { 0x00,0x80,0x00 }, /* green */ |
| 32 | { 0x00,0x80,0x80 }, /* cyan */ |
| 33 | { 0x80,0x80,0x00 }, /* yellow */ |
| 34 | { 0x80,0x80,0x80 }, /* light grey */ |
| 32 | 35 | |
| 33 | 36 | /*enhanced brightness*/ |
| 34 | | 0x40,0x40,0x40, /* dark grey */ |
| 35 | | 0x00,0x00,0xFF, /* light blue */ |
| 36 | | 0xFF,0x00,0x00, /* light red */ |
| 37 | | 0xFF,0x00,0xFF, /* light magenta */ |
| 38 | | 0x00,0xFF,0x00, /* light green */ |
| 39 | | 0x00,0xFF,0xFF, /* light cyan */ |
| 40 | | 0xFF,0xFF,0x00, /* yellow */ |
| 41 | | 0xFF,0xFF,0xFF /* white */ |
| 37 | { 0x40,0x40,0x40 }, /* dark grey */ |
| 38 | { 0x00,0x00,0xFF }, /* light blue */ |
| 39 | { 0xFF,0x00,0x00 }, /* light red */ |
| 40 | { 0xFF,0x00,0xFF }, /* light magenta */ |
| 41 | { 0x00,0xFF,0x00 }, /* light green */ |
| 42 | { 0x00,0xFF,0xFF }, /* light cyan */ |
| 43 | { 0xFF,0xFF,0x00 }, /* yellow */ |
| 44 | { 0xFF,0xFF,0xFF } /* white */ |
| 42 | 45 | }; |
| 43 | 46 | |
| 44 | 47 | static const floppy_config nimbus_floppy_config = |
| r6944 | r6945 | |
| 53 | 56 | DO_NOT_KEEP_GEOMETRY |
| 54 | 57 | }; |
| 55 | 58 | |
| 59 | /* Null port handlers for now, I believe that the IO ports are used for */ |
| 60 | /* the nimbus rompacks */ |
| 56 | 61 | |
| 62 | static const ay8910_interface nimbus_ay8910_interface = |
| 63 | { |
| 64 | AY8910_LEGACY_OUTPUT, |
| 65 | AY8910_DEFAULT_LOADS, |
| 66 | DEVCB_NULL, /* portA read */ |
| 67 | DEVCB_NULL, /* portB read */ |
| 68 | DEVCB_MEMORY_HANDLER(MAINCPU_TAG, PROGRAM, sound_ay8910_porta_w), /* portA write */ |
| 69 | DEVCB_MEMORY_HANDLER(MAINCPU_TAG, PROGRAM, sound_ay8910_portb_w) /* portB write */ |
| 70 | }; |
| 71 | |
| 72 | static const msm5205_interface msm5205_config = |
| 73 | { |
| 74 | nimbus_msm5205_vck, /* VCK function */ |
| 75 | MSM5205_S48_4B /* 8 kHz */ |
| 76 | }; |
| 77 | |
| 78 | |
| 57 | 79 | static ADDRESS_MAP_START(nimbus_mem, ADDRESS_SPACE_PROGRAM, 16) |
| 58 | 80 | AM_RANGE( 0x00000, 0xEFFFF ) AM_RAM |
| 59 | 81 | AM_RANGE( 0xF0000, 0xFFFFF ) AM_ROM |
| r6944 | r6945 | |
| 61 | 83 | |
| 62 | 84 | static ADDRESS_MAP_START(nimbus_io, ADDRESS_SPACE_IO, 16) |
| 63 | 85 | AM_RANGE( 0x0000, 0x002f) AM_READWRITE( nimbus_video_io_r, nimbus_video_io_w) |
| 64 | | AM_RANGE( 0x0030, 0x00ef) AM_READWRITE( nimbus_io_r, nimbus_io_w) |
| 86 | AM_RANGE( 0x0030, 0x008f) AM_READWRITE( nimbus_io_r, nimbus_io_w) |
| 87 | AM_RANGE( 0x0092, 0x0093) AM_READWRITE8( iou_r, iou_w, 0x00FF) |
| 88 | AM_RANGE( 0X00c0, 0X00cf) AM_READWRITE8( pc8031_r, pc8031_w, 0x00FF) |
| 89 | AM_RANGE( 0X00e0, 0X00ef) AM_READWRITE8( sound_ay8910_r, sound_ay8910_w, 0x00FF) |
| 65 | 90 | AM_RANGE( 0X00f0, 0X00f7) AM_DEVREADWRITE8( Z80SIO_TAG, sio_r, sio_w, 0x00FF) |
| 66 | 91 | AM_RANGE( 0x0400, 0x041f) AM_READWRITE8( nimbus_fdc_r, nimbus_fdc_w, 0x00FF) |
| 67 | 92 | AM_RANGE( 0xff00, 0xffff) AM_READWRITE( i186_internal_port_r, i186_internal_port_w)/* CPU 80186 */ |
| r6944 | r6945 | |
| 80 | 105 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("6") PORT_CODE(KEYCODE_6) PORT_CHAR('6') |
| 81 | 106 | |
| 82 | 107 | PORT_START("KEY1") /* Key row 1 scancodes 08..0F */ |
| 83 | | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("7") PORT_CODE(KEYCODE_1) PORT_CHAR('7') |
| 84 | | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("8") PORT_CODE(KEYCODE_ESC) PORT_CHAR('8') |
| 85 | | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("9") PORT_CODE(KEYCODE_1) PORT_CHAR('9') |
| 86 | | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("0") PORT_CODE(KEYCODE_2) PORT_CHAR('0') |
| 108 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("7") PORT_CODE(KEYCODE_7) PORT_CHAR('7') |
| 109 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("8") PORT_CODE(KEYCODE_8) PORT_CHAR('8') |
| 110 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("9") PORT_CODE(KEYCODE_9) PORT_CHAR('9') |
| 111 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("0") PORT_CODE(KEYCODE_0) PORT_CHAR('0') |
| 87 | 112 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("-") PORT_CODE(KEYCODE_MINUS) PORT_CHAR('-') |
| 88 | 113 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("=") PORT_CODE(KEYCODE_EQUALS) PORT_CHAR('=') |
| 89 | 114 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("BSPACE") PORT_CODE(KEYCODE_BACKSPACE) PORT_CHAR(0x08) |
| r6944 | r6945 | |
| 190 | 215 | ADDRESS_MAP_UNMAP_HIGH |
| 191 | 216 | AM_RANGE(0x0000, 0x1fff) AM_ROM |
| 192 | 217 | AM_RANGE(0x2000, 0x7fff) AM_RAM |
| 193 | | //AM_RANGE(0x8000, 0x9fff) AM_ROM // EPROM |
| 194 | | //AM_RANGE(0xc000, 0xdfff) // Expansion block |
| 195 | | //AM_RANGE(0xe000, 0xffff) // Expansion block |
| 196 | 218 | ADDRESS_MAP_END |
| 197 | 219 | |
| 198 | 220 | static ADDRESS_MAP_START( nimbus_iocpu_io , ADDRESS_SPACE_IO, 8) |
| 199 | 221 | ADDRESS_MAP_UNMAP_HIGH |
| 200 | | AM_RANGE(0x0000, 0x7fff) AM_RAM |
| 201 | | //AM_RANGE(0x8000, 0x9fff) AM_ROM // EPROM |
| 202 | | //AM_RANGE(0xa000, 0xa003) AM_DEVREADWRITE("ppi8255", i8255a_r, i8255a_w) // PPI-8255 |
| 203 | | //AM_RANGE(0xc000, 0xdfff) // Expansion block |
| 204 | | //AM_RANGE(0xe000, 0xffff) // Expansion block |
| 222 | AM_RANGE(0x00000, 0x000FF) AM_READWRITE(pc8031_iou_r, pc8031_iou_w) |
| 223 | AM_RANGE(0x00010, 0x07fff) AM_RAM |
| 224 | AM_RANGE(0x20000, 0x20004) AM_READWRITE(pc8031_port_r, pc8031_port_w) |
| 205 | 225 | ADDRESS_MAP_END |
| 206 | 226 | |
| 207 | 227 | |
| 208 | 228 | static PALETTE_INIT( nimbus ) |
| 209 | 229 | { |
| 210 | | int i; |
| 230 | int colourno; |
| 211 | 231 | |
| 212 | | for ( i = 0; i < sizeof(nimbus_palette) / 3; i++ ) { |
| 213 | | palette_set_color_rgb(machine, i, nimbus_palette[i*3], nimbus_palette[i*3+1], nimbus_palette[i*3+2]); |
| 232 | for ( colourno = 0; colourno < SCREEN_NO_COLOURS; colourno++ ) |
| 233 | { |
| 234 | palette_set_color_rgb(machine, colourno, nimbus_palette[colourno][RED], nimbus_palette[colourno][GREEN], nimbus_palette[colourno][BLUE]); |
| 214 | 235 | } |
| 215 | 236 | } |
| 216 | 237 | |
| r6944 | r6945 | |
| 221 | 242 | MDRV_CPU_PROGRAM_MAP(nimbus_mem) |
| 222 | 243 | MDRV_CPU_IO_MAP(nimbus_io) |
| 223 | 244 | |
| 224 | | MDRV_CPU_ADD(IOCPU_TAG, I8031, 8000000) |
| 245 | MDRV_CPU_ADD(IOCPU_TAG, I8031, 11059200) |
| 225 | 246 | MDRV_CPU_PROGRAM_MAP(nimbus_iocpu_mem) |
| 226 | 247 | MDRV_CPU_IO_MAP(nimbus_iocpu_io) |
| 227 | 248 | |
| r6944 | r6945 | |
| 235 | 256 | MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(100)) |
| 236 | 257 | MDRV_VIDEO_ATTRIBUTES(VIDEO_UPDATE_SCANLINE) |
| 237 | 258 | |
| 238 | | MDRV_PALETTE_LENGTH(ARRAY_LENGTH(nimbus_palette) / 3) |
| 259 | MDRV_PALETTE_LENGTH(SCREEN_NO_COLOURS * 3) |
| 239 | 260 | MDRV_PALETTE_INIT( nimbus ) |
| 240 | 261 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 241 | 262 | |
| r6944 | r6945 | |
| 257 | 278 | |
| 258 | 279 | /* Peripheral chips */ |
| 259 | 280 | MDRV_Z80SIO_ADD(Z80SIO_TAG, 4000000, sio_intf) |
| 281 | |
| 282 | MDRV_ER59256_ADD(ER59256_TAG) |
| 283 | |
| 284 | /* sound hardware */ |
| 285 | MDRV_SPEAKER_STANDARD_MONO(MONO_TAG) |
| 286 | MDRV_SOUND_ADD(AY8910_TAG, AY8910, 2000000) |
| 287 | MDRV_SOUND_CONFIG(nimbus_ay8910_interface) |
| 288 | |
| 289 | MDRV_SOUND_ADD(MSM5205_TAG, MSM5205, 384000) |
| 290 | MDRV_SOUND_CONFIG(msm5205_config) |
| 291 | |
| 292 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, MONO_TAG, 0.75) |
| 260 | 293 | MACHINE_DRIVER_END |
| 261 | 294 | |
| 262 | 295 | |