src/mess/drivers/esq5505.c
| r15373 | r15374 | |
| 2 | 2 | |
| 3 | 3 | esq5505.c - Ensoniq ES5505 + ES5510 based synthesizers and samplers |
| 4 | 4 | |
| 5 | | Ensoniq VFX, VFX-SD, EPS-16 Plus, SD-1, SD-1 32, and SQ-1 (SQ-1 Plus, SQ-2, |
| 6 | | and KS-32 are known to also be this architecture). |
| 5 | Ensoniq VFX, VFX-SD, EPS, EPS-16 Plus, SD-1, SD-1 32, and SQ-1 (SQ-1 Plus, |
| 6 | SQ-2, and KS-32 are known to also be this architecture). |
| 7 | 7 | |
| 8 | 8 | The Taito sound system in taito_en.c is directly derived from the SQ-1. |
| 9 | 9 | |
| r15373 | r15374 | |
| 13 | 13 | |
| 14 | 14 | 0x000000-0x00ffff work RAM low |
| 15 | 15 | 0x200000-0x20001f OTTO(5505) regs |
| 16 | | 0x240000-0x24003f ??? regs |
| 16 | 0x240000-0x2400ff DMAC (68450) regs (EPS/EPS-16) |
| 17 | 17 | 0x260000-0x2601ff ESP (5510) regs |
| 18 | 18 | 0x280000-0x28001f DUART (68681) regs |
| 19 | | 0x2C0000-0x2C0003 Floppy (WD1772) regs (VFX-SD, SD-1, and EPS-16) |
| 20 | | 0x300000-0x300003 EPS-16 SCSI (WD33C93, register at 300001, data at 300003) |
| 21 | | 0x340000-0x3bffff EPS-16 sample RAM |
| 19 | 0x2C0000-0x2C0003 Floppy (WD1772) regs (VFX-SD, SD-1, and EPS/EPS-16) |
| 20 | 0x300000-0x300003 EPS/EPS-16 SCSI (WD33C93, register at 300001, data at 300003) |
| 21 | 0x340000-0x3bffff EPS/EPS-16 sample RAM |
| 22 | 22 | 0xc00000-0xc3ffff OS ROM |
| 23 | 23 | 0xff0000-0xffffff work RAM hi (may or may not be mirrored with work RAM low) |
| 24 | 24 | |
| r15373 | r15374 | |
| 33 | 33 | #include "sound/es5506.h" |
| 34 | 34 | #include "machine/68681.h" |
| 35 | 35 | #include "machine/wd1772.h" |
| 36 | #include "machine/hd63450.h" // compatible with MC68450, which is what these really have |
| 36 | 37 | #include "formats/esq16_dsk.h" |
| 37 | 38 | #include "formats/mfi_dsk.h" |
| 38 | 39 | #include "formats/dfi_dsk.h" |
| r15373 | r15374 | |
| 54 | 55 | m_fdc(*this, "wd1772"), |
| 55 | 56 | m_epsvfd(*this, "epsvfd"), |
| 56 | 57 | m_sq1vfd(*this, "sq1vfd"), |
| 57 | | m_vfd(*this, "vfd") |
| 58 | m_vfd(*this, "vfd"), |
| 59 | m_dmac(*this, "mc68450") |
| 58 | 60 | { } |
| 59 | 61 | |
| 60 | 62 | required_device<device_t> m_maincpu; |
| r15373 | r15374 | |
| 63 | 65 | optional_device<esq1x22_t> m_epsvfd; |
| 64 | 66 | optional_device<esq2x40_sq1_t> m_sq1vfd; |
| 65 | 67 | optional_device<esq2x40_t> m_vfd; |
| 68 | optional_device<device_t> m_dmac; |
| 66 | 69 | |
| 67 | 70 | virtual void machine_reset(); |
| 68 | 71 | |
| r15373 | r15374 | |
| 215 | 218 | static ADDRESS_MAP_START( eps_map, AS_PROGRAM, 16, esq5505_state ) |
| 216 | 219 | AM_RANGE(0x000000, 0x00ffff) AM_RAM AM_MIRROR(0x30000) AM_SHARE("osram") |
| 217 | 220 | AM_RANGE(0x200000, 0x20001f) AM_DEVREADWRITE_LEGACY("ensoniq", es5505_r, es5505_w) |
| 221 | AM_RANGE(0x240000, 0x2400ff) AM_DEVREADWRITE_LEGACY("mc68450", hd63450_r, hd63450_w) |
| 218 | 222 | AM_RANGE(0x280000, 0x28001f) AM_DEVREADWRITE8_LEGACY("duart", duart68681_r, duart68681_w, 0x00ff) |
| 219 | 223 | AM_RANGE(0x2c0000, 0x2c0007) AM_DEVREADWRITE8("wd1772", wd1772_t, read, write, 0x00ff) |
| 220 | 224 | AM_RANGE(0x580000, 0x77ffff) AM_RAM // sample RAM? |
| r15373 | r15374 | |
| 264 | 268 | static void duart_output(device_t *device, UINT8 data) |
| 265 | 269 | { |
| 266 | 270 | esq5505_state *state = device->machine().driver_data<esq5505_state>(); |
| 271 | floppy_connector *con = device->machine().device<floppy_connector>("fd0"); |
| 272 | floppy_image_device *floppy = con ? con->get_device() : 0; |
| 267 | 273 | |
| 268 | 274 | state->m_duart_io = data; |
| 275 | |
| 276 | if (floppy) |
| 277 | { |
| 278 | floppy->ss_w((data & 2)>>1); |
| 279 | } |
| 280 | |
| 269 | 281 | // printf("DUART output: %02x (PC=%x)\n", data, cpu_get_pc(state->m_maincpu)); |
| 270 | 282 | } |
| 271 | 283 | |
| r15373 | r15374 | |
| 329 | 341 | 1000000, 1000000, // IP5, IP6 |
| 330 | 342 | }; |
| 331 | 343 | |
| 344 | static void esq_dma_end(running_machine &machine, int channel, int irq) |
| 345 | { |
| 346 | device_t *device = machine.device("mc68450"); |
| 347 | |
| 348 | if (irq != 0) |
| 349 | { |
| 350 | printf("DMAC IRQ, vector = %x\n", hd63450_get_vector(device, channel)); |
| 351 | } |
| 352 | } |
| 353 | |
| 354 | static void esq_dma_error(running_machine &machine, int channel, int irq) |
| 355 | { |
| 356 | device_t *device = machine.device("mc68450"); |
| 357 | if(irq != 0) |
| 358 | { |
| 359 | printf("DMAC error, vector = %x\n", hd63450_get_error_vector(device, channel)); |
| 360 | } |
| 361 | } |
| 362 | |
| 363 | static int esq_fdc_read_byte(running_machine &machine, int addr) |
| 364 | { |
| 365 | esq5505_state *state = machine.driver_data<esq5505_state>(); |
| 366 | |
| 367 | return state->m_fdc->data_r(); |
| 368 | } |
| 369 | |
| 370 | static void esq_fdc_write_byte(running_machine &machine, int addr, int data) |
| 371 | { |
| 372 | esq5505_state *state = machine.driver_data<esq5505_state>(); |
| 373 | state->m_fdc->data_w(data & 0xff); |
| 374 | } |
| 375 | |
| 376 | static const hd63450_intf dmac_interface = |
| 377 | { |
| 378 | "maincpu", // CPU - 68000 |
| 379 | {attotime::from_usec(32),attotime::from_nsec(450),attotime::from_usec(4),attotime::from_hz(15625/2)}, // Cycle steal mode timing (guesstimate) |
| 380 | {attotime::from_usec(32),attotime::from_nsec(450),attotime::from_nsec(50),attotime::from_nsec(50)}, // Burst mode timing (guesstimate) |
| 381 | esq_dma_end, |
| 382 | esq_dma_error, |
| 383 | { esq_fdc_read_byte, 0, 0, 0 }, // ch 0 = fdc, ch 1 = 340001 (ADC?) |
| 384 | { esq_fdc_write_byte, 0, 0, 0 } |
| 385 | }; |
| 386 | |
| 332 | 387 | static const es5505_interface es5505_config = |
| 333 | 388 | { |
| 334 | 389 | "waverom", /* Bank 0 */ |
| r15373 | r15374 | |
| 366 | 421 | |
| 367 | 422 | MCFG_WD1772x_ADD("wd1772", 8000000) |
| 368 | 423 | MCFG_FLOPPY_DRIVE_ADD("fd0", ensoniq_floppies, "35dd", 0, esq5505_state::floppy_formats) |
| 424 | |
| 425 | MCFG_HD63450_ADD( "mc68450", dmac_interface ) // MC68450 compatible |
| 369 | 426 | MACHINE_CONFIG_END |
| 370 | 427 | |
| 371 | 428 | static MACHINE_CONFIG_DERIVED(vfxsd, vfx) |