Previous 15994 Revisions Next

r15374 Friday 1st June, 2012 at 01:45:45 UTC by R. Belmont
Ensoniq: add floppy side select control and EPS/EPS-16+'s 68450 DMAC. EPS OS now boots and says "ERROR 129" instead of crashing. [R. Belmont]
[src/mess/drivers]esq5505.c

src/mess/drivers/esq5505.c
r15373r15374
22
33    esq5505.c - Ensoniq ES5505 + ES5510 based synthesizers and samplers
44
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).
77
88    The Taito sound system in taito_en.c is directly derived from the SQ-1.
99
r15373r15374
1313 
1414    0x000000-0x00ffff   work RAM low
1515    0x200000-0x20001f   OTTO(5505) regs
16    0x240000-0x24003f   ??? regs
16    0x240000-0x2400ff   DMAC (68450) regs (EPS/EPS-16)
1717    0x260000-0x2601ff   ESP (5510) regs
1818    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
2222    0xc00000-0xc3ffff   OS ROM
2323    0xff0000-0xffffff   work RAM hi (may or may not be mirrored with work RAM low)
2424 
r15373r15374
3333#include "sound/es5506.h"
3434#include "machine/68681.h"
3535#include "machine/wd1772.h"
36#include "machine/hd63450.h"    // compatible with MC68450, which is what these really have
3637#include "formats/esq16_dsk.h"
3738#include "formats/mfi_dsk.h"
3839#include "formats/dfi_dsk.h"
r15373r15374
5455        m_fdc(*this, "wd1772"),
5556        m_epsvfd(*this, "epsvfd"),
5657        m_sq1vfd(*this, "sq1vfd"),
57        m_vfd(*this, "vfd")
58        m_vfd(*this, "vfd"),
59        m_dmac(*this, "mc68450")
5860    { }
5961
6062    required_device<device_t> m_maincpu;
r15373r15374
6365    optional_device<esq1x22_t> m_epsvfd;
6466    optional_device<esq2x40_sq1_t> m_sq1vfd;
6567    optional_device<esq2x40_t> m_vfd;
68    optional_device<device_t> m_dmac;
6669
6770    virtual void machine_reset();
6871
r15373r15374
215218static ADDRESS_MAP_START( eps_map, AS_PROGRAM, 16, esq5505_state )
216219   AM_RANGE(0x000000, 0x00ffff) AM_RAM AM_MIRROR(0x30000) AM_SHARE("osram")
217220   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)
218222    AM_RANGE(0x280000, 0x28001f) AM_DEVREADWRITE8_LEGACY("duart", duart68681_r, duart68681_w, 0x00ff)
219223    AM_RANGE(0x2c0000, 0x2c0007) AM_DEVREADWRITE8("wd1772", wd1772_t, read, write, 0x00ff)
220224    AM_RANGE(0x580000, 0x77ffff) AM_RAM         // sample RAM?
r15373r15374
264268static void duart_output(device_t *device, UINT8 data)
265269{
266270    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;
267273
268274    state->m_duart_io = data;
275
276    if (floppy)
277    {
278        floppy->ss_w((data & 2)>>1);
279    }
280
269281//    printf("DUART output: %02x (PC=%x)\n", data, cpu_get_pc(state->m_maincpu));
270282}
271283
r15373r15374
329341   1000000, 1000000, // IP5, IP6
330342};
331343
344static 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
354static 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
363static 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
370static 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
376static 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
332387static const es5505_interface es5505_config =
333388{
334389   "waverom",   /* Bank 0 */
r15373r15374
366421
367422    MCFG_WD1772x_ADD("wd1772", 8000000)
368423   MCFG_FLOPPY_DRIVE_ADD("fd0", ensoniq_floppies, "35dd", 0, esq5505_state::floppy_formats)
424
425   MCFG_HD63450_ADD( "mc68450", dmac_interface )   // MC68450 compatible
369426MACHINE_CONFIG_END
370427
371428static MACHINE_CONFIG_DERIVED(vfxsd, vfx)

Previous 15994 Revisions Next


© 1998-2018 The MESS Team