Previous 199869 Revisions Next

r30981 Sunday 15th June, 2014 at 15:56:23 UTC by R. Belmont
Apollo updates [Hans Ostermeyer]
- Fixed ISA bus endianness, it's the same as other 680x0 systems with ISA
- Improved logging in several places
- "20 years ago" option updated to now-necessary "25 years ago"
- Fixed ISA high IRQ routing
- Fixed 3c505 to have a 16 bit ISA interface
- Fixed omti8621 and sc499 to have correct-endian ISA interfaces
[src/emu/bus/isa]3c505.c 3c505.h omti8621.c sc499.c
[src/emu/machine]mc68681.c
[src/mess/drivers]apollo.c
[src/mess/includes]apollo.h
[src/mess/machine]apollo.c

trunk/src/emu/machine/mc68681.c
r30980r30981
10071007         break;
10081008
10091009      case 3: // multidrop mode
1010         fatalerror("68681: multidrop parity not supported\n");
1010         // fatalerror("68681: multidrop parity not supported\n");
1011         // Apollo DEX CPU will test this; omit to abort the emulation
1012         logerror("68681: multidrop parity not supported\n");
10111013         break;
10121014   }
10131015
trunk/src/emu/bus/isa/omti8621.c
r30980r30981
974974{
975975   UINT16 data = 0xff;
976976   if (data_index < data_length) {
977      data = data_buffer[data_index++] << 8;
978      data |= data_buffer[data_index++];
977      data = data_buffer[data_index++];
978      data |= data_buffer[data_index++] << 8;
979979      if (data_index >= data_length) {
980980         omti_state = OMTI_STATE_STATUS;
981981         status_port |= OMTI_STATUS_IO | OMTI_STATUS_CD;
r30980r30981
994994void omti8621_device::set_data(UINT16 data)
995995{
996996   if (data_index < data_length) {
997      data_buffer[data_index++] = data & 0xff;
997998      data_buffer[data_index++] = data >> 8;
998      data_buffer[data_index++] = data & 0xff;
999999      if (data_index >= data_length) {
10001000         do_command(command_buffer, command_index);
10011001      }
r30980r30981
10131013   switch (mem_mask)
10141014   {
10151015      case 0x00ff:
1016         write8(space, offset*2+1, data, mem_mask);
1016         write8(space, offset*2, data, mem_mask);
10171017         break;
10181018
10191019      case 0xff00:
1020         write8(space, offset*2, data>>8, mem_mask>>8);
1020         write8(space, offset*2+1, data>>8, mem_mask>>8);
10211021         break;
10221022
10231023      default:
r30980r30981
11251125   switch (mem_mask)
11261126   {
11271127      case 0x00ff:
1128         return read8(space, offset*2+1, mem_mask);
1128         return read8(space, offset*2, mem_mask);
11291129      case 0xff00:
1130         return read8(space, offset*2, mem_mask >> 8) << 8;
1130         return read8(space, offset*2+1, mem_mask >> 8) << 8;
11311131      default:
11321132         return get_data();
11331133   }
r30980r30981
12121212   }
12131213   else
12141214   {
1215      LOG1(("omti8621_get_sector %x on lun %d", diskaddr, lun));
1215//      LOG1(("omti8621_get_sector %x on lun %d", diskaddr, lun));
12161216
12171217      // restrict length to size of 1 sector (i.e. 1024 Byte)
12181218      length = length < OMTI_DISK_SECTOR_SIZE ? length  : OMTI_DISK_SECTOR_SIZE;
trunk/src/emu/bus/isa/3c505.c
r30980r30981
1212 *  - http://lxr.free-electrons.com/source/drivers/net/3c505.h
1313 *  - http://lxr.free-electrons.com/source/drivers/net/3c505.c
1414 *  - http://stason.org/TULARC/pc/network-cards/O/OLIVETTI-Ethernet-NPU-9144-3C505.html
15 *  - http://www.bitsavers.org/pdf/3Com/3C500_Mar83.pdf
15 *  - http://www.bitsavers.org/pdf/3Com/3c505_Etherlink_Plus_Developers_Guide_May86.pdf'
1616 *  - http://www.bitsavers.org/pdf/3Com/1569-03_EtherLink_Plus_Technical_Reference_Jan89.pdf
17 *
1718 */
1819
1920#include "3c505.h"
r30980r30981
2223
2324static int verbose = VERBOSE;
2425
25#define LOG(x)  { logerror x; logerror ("\n"); }
26#define LOG(x)  { logerror ("%s: ", cpu_context()); logerror x; logerror ("\n"); }
2627#define LOG1(x) { if (verbose > 0) LOG(x)}
2728#define LOG2(x) { if (verbose > 1) LOG(x)}
2829
r30980r30981
295296{
296297}
297298
299threecom3c505_device::threecom3c505_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, UINT32 clock)
300   : device_t(mconfig, type, "3Com 3C505 Network Adaptor", tag, owner, clock, "3c505", __FILE__),
301   device_network_interface(mconfig, *this, 10.0f),
302   device_isa16_card_interface(mconfig, *this),
303   m_iobase(*this, "IO_BASE"),
304   m_irqdrq(*this, "IRQ_DRQ")
305{
306}
307
298308ioport_constructor threecom3c505_device::device_input_ports() const
299309{
300310   return INPUT_PORTS_NAME( tc3c505_port );
r30980r30981
369379      m_irq = m_irqdrq->read() & 0xf;
370380      m_drq = (m_irqdrq->read() >> 4) & 0x7;
371381
372      m_isa->install_device(base, base + ELP_IO_EXTENT - 1, 0, 0, read8_delegate(FUNC(threecom3c505_device::read), this), write8_delegate(FUNC(threecom3c505_device::write), this));
382      m_isa->install16_device(base, base + ELP_IO_EXTENT - 1, 0, 0, read16_delegate(FUNC(threecom3c505_device::read), this), write16_delegate(FUNC(threecom3c505_device::write), this));
373383
374384      m_installed = true;
375385   }
r30980r30981
383393{
384394   static char statebuf[64]; /* string buffer containing state description */
385395
396   device_t *cpu = machine().device(MAINCPU);
386397   osd_ticks_t t = osd_ticks();
387398   int s = t / osd_ticks_per_second();
388399   int ms = (t % osd_ticks_per_second()) / 1000;
389400
390   sprintf(statebuf, "%d.%03d:%s:", s, ms, tag());
401   /* if we have an executing CPU, output data */
402   if (cpu != NULL)
403   {
404      sprintf(statebuf, "%d.%03d %s pc=%08x - %s", s, ms, cpu->tag(),
405            cpu->safe_pcbase(), tag());
406   }
407   else
408   {
409      sprintf(statebuf, "%d.%03d", s, ms);
410   }
391411   return statebuf;
392412}
393413
r30980r30981
548568   memcpy(m_filter_list, m_station_address, ETHERNET_ADDR_SIZE);
549569   memset(m_filter_list + ETHERNET_ADDR_SIZE, 0xff, ETHERNET_ADDR_SIZE);
550570   memcpy(m_filter_list + ETHERNET_ADDR_SIZE * 2, m_multicast_list, sizeof(m_multicast_list));
571
572   int node_id = (((m_station_address[3] << 8) + m_station_address[4]) << 8) + m_station_address[5];
573   LOG2(("set_filter_list node_id=%x",node_id));
574
575   setfilter(this, node_id);
551576}
552577
553578/*-------------------------------------------------
r30980r30981
12301255               LOG(("read_command_port(): !!! failed to send Ethernet packet"));
12311256            }
12321257
1258            if (!tx_data(this, m_tx_data_buffer.get_data(), m_tx_data_buffer.get_length()))
1259            {
1260               // FIXME: failed to transmit the Ethernet packet
1261               LOG(("read_command_port(): !!! failed to transmit Ethernet packet"));
1262            }
1263
12331264            m_tx_data_buffer.reset();
12341265            if (m_command_buffer[0] != CMD_TRANSMIT_PACKET_F9)
12351266            {
r30980r30981
13471378      LOG(("write_data_port: unexpected command %02x data=%02x", m_command_buffer[0], data));
13481379   }
13491380
1350   if (m_tx_data_buffer.get_length() >= PORT_DATA_FIFO_SIZE
1381   if (m_command_buffer[0] != CMD_DOWNLOAD_PROGRAM &&
1382         m_tx_data_buffer.get_length() >= PORT_DATA_FIFO_SIZE
13511383         && m_tx_data_buffer.get_length() >= m_tx_data_length)
13521384   {
13531385      m_status &= ~HRDY; /* data register not ready */
r30980r30981
15051537   return data;
15061538}
15071539
1540
15081541/***************************************************************************
15091542 write_port
15101543 ***************************************************************************/
15111544
1512WRITE8_MEMBER(threecom3c505_device::write)
1545WRITE16_MEMBER(threecom3c505_device::write)
15131546{
1547   // make byte offset
1548   offset *= 2;
1549
15141550   m_reg[offset & 0x0f] = data;
1515   LOG2(("writing 3C505 Register at offset %02x = %02x", offset, data));
1551   LOG2(("writing 3C505 Register at offset=%02x with mem_mask=%04x = %04x", offset, mem_mask, data));
15161552
15171553   switch (offset)
15181554   {
r30980r30981
15221558   case PORT_AUXDMA: /* 0x02 write only, 8-bit */
15231559      break;
15241560   case PORT_DATA: /* 0x04 read/write, 16-bit */
1525   case PORT_DATA + 1: /* 0x04 read/write, 16-bit */
1526      write_data_port(data);
1561      write_data_port(data & 0xff);
1562      write_data_port(data >> 8);
15271563      break;
15281564   case PORT_CONTROL: /* 0x06 read/write, 8-bit */
15291565      write_control_port(data);
r30980r30981
15371573 read_port
15381574 ***************************************************************************/
15391575
1540READ8_MEMBER(threecom3c505_device::read)
1576READ16_MEMBER(threecom3c505_device::read)
15411577{
15421578   // data to omit excessive logging
1543   static UINT8 last_data = 0xff;
1579   static UINT16 last_data = 0xff;
15441580   static UINT32 last_pc = 0;
15451581
1546   UINT8 data = m_reg[offset & 0x0f];
1582   // make byte offset
1583   offset *= 2;
1584
1585   UINT16 data = m_reg[offset & 0x0f];
15471586   switch (offset)
15481587   {
15491588   case PORT_COMMAND: /* 0x00 read/write, 8-bit */
r30980r30981
15551594      // omit excessive logging
15561595      if (data == last_data)
15571596      {
1558         UINT32 pc = machine().device(MAINCPU)->safe_pcbase();
1597         UINT32 pc = space.device().safe_pcbase();
15591598         if (pc == last_pc)
15601599         {
15611600            return data;
r30980r30981
15631602         last_pc = pc;
15641603      }
15651604      last_data = data;
1566
15671605      break;
15681606   case PORT_DATA: /* 0x04 read/write, 16-bit */
1569   case PORT_DATA + 1: /* 0x04 read/write, 16-bit */
15701607      data = read_data_port();
1608      data |= (read_data_port() << 8);
15711609      break;
15721610   case PORT_CONTROL: /* 0x06 read/write, 8-bit */
15731611      data = m_control;
r30980r30981
15761614      break;
15771615   }
15781616
1579   LOG2(("reading 3C505 Register at offset %02x = %02x", offset, data));
1617   LOG2(("reading 3C505 Register at offset=%02x with mem_mask=%04x = %04x", offset, mem_mask, data));
1618
15801619   return data;
15811620}
1621
1622void threecom3c505_device::set_verbose(int on_off)
1623{
1624   verbose = on_off == 0 ? 0 : VERBOSE > 1 ? VERBOSE : 1;
1625}
1626
1627int threecom3c505_device::tx_data(device_t *device, const UINT8 data[], int length)
1628{
1629   LOG1(("threecom3c505_device::tx_data length=%d", length));
1630   return 1;
1631}
1632
1633int threecom3c505_device::setfilter(device_t *device, int node_id)
1634{
1635   return 0;
1636}
trunk/src/emu/bus/isa/3c505.h
r30980r30981
125125public:
126126   // construction/destruction
127127   threecom3c505_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
128   threecom3c505_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, UINT32 clock);
128129
129130   // device register I/O
130   DECLARE_READ8_MEMBER(read);
131   DECLARE_WRITE8_MEMBER(write);
131   virtual DECLARE_READ16_MEMBER(read);
132   virtual DECLARE_WRITE16_MEMBER(write);
132133
134   static void set_verbose(int on_off);
135
133136   required_ioport m_iobase;
134137   required_ioport m_irqdrq;
135138
139   virtual void recv_cb(UINT8 *data, int length);
140
141protected:
142   virtual int tx_data(device_t *, const UINT8 *, int);
143   virtual int setfilter(device_t *, int);
144
145   const char *cpu_context();
146
147   // device-level overrides
148   virtual void device_start();
149
136150private:
137151   // device-level overrides
138   virtual void device_start();
139152   virtual void device_reset();
140153   virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
141154   virtual ioport_constructor device_input_ports() const;
142155
143   const char *cpu_context();
144
145156   class data_buffer_fifo;
146157
147158   /* data buffer */
r30980r30981
165176      void log(const char *title) const;
166177
167178   private:
179      const char *cpu_context() { return m_device->cpu_context(); }
180
168181      threecom3c505_device *m_device; // pointer back to our device
169182      UINT16 m_length;
170183      dynamic_buffer m_data;
r30980r30981
183196      int is_empty () { return m_get_index == m_put_index; }
184197      int is_full () { return ((m_put_index + 1) % m_size) == m_get_index; }
185198   private:
199      const char *cpu_context() { return m_device->cpu_context(); }
200
186201      threecom3c505_device *m_device; // pointer back to our device
187202      UINT16 m_size;
188203      UINT16 m_count;
r30980r30981
212227   UINT8 read_status_port();
213228
214229   void do_command();
215   virtual void recv_cb(UINT8 *data, int length);
216230
217231   UINT8 m_reg[16];
218232
trunk/src/emu/bus/isa/sc499.c
r30980r30981
397397
398398      m_isa->install_device(base, base+7, 0, 0, read8_delegate(FUNC(sc499_device::read), this), write8_delegate(FUNC(sc499_device::write), this));
399399      m_isa->set_dma_channel(m_drq, this, true);
400
401      m_installed = true;
400402   }
401403}
402404
r30980r30981
10141016
10151017WRITE8_MEMBER(sc499_device::write)
10161018{
1017   switch (offset^1)
1019   switch (offset)
10181020   {
10191021   case SC499_PORT_COMMAND: // write command
10201022      write_command_port(data);
r30980r30981
10381040{
10391041   UINT8 data = 0xff;
10401042
1041   switch (offset^1)
1043   switch (offset)
10421044   {
10431045   case SC499_PORT_DATA: // read data (status data)
10441046      data = read_data_port();
trunk/src/mess/includes/apollo.h
r30980r30981
2929#include "machine/clock.h"
3030#include "bus/isa/isa.h"
3131#include "bus/isa/isa_cards.h"
32#include "bus/isa/3c505.h"
3233
3334#ifndef VERBOSE
3435#define VERBOSE 0
r30980r30981
5354#define  MAINCPU "maincpu"
5455
5556/*----------- machine/apollo_dbg.c -----------*/
57
5658int apollo_debug_instruction_hook(m68000_base_device *device, offs_t curpc);
5759
5860/*----------- drivers/apollo.c -----------*/
r30980r30981
8991#define APOLLO_DMA1_TAG "dma8237_1"
9092#define APOLLO_DMA2_TAG "dma8237_2"
9193#define APOLLO_KBD_TAG  "kbd"
94#define APOLLO_STDIO_TAG "stdio"
9295#define APOLLO_PIC1_TAG "pic8259_master"
9396#define APOLLO_PIC2_TAG "pic8259_slave"
9497#define APOLLO_PTM_TAG  "ptm"
r30980r30981
98101#define APOLLO_ETH_TAG  "3c505"
99102#define APOLLO_ISA_TAG "isabus"
100103
104// forward declaration
105class apollo_sio;
106
101107class apollo_state : public driver_device
102108{
103109public:
r30980r30981
124130   required_device<pic8259_device> m_pic8259_master;
125131   required_device<pic8259_device> m_pic8259_slave;
126132   required_device<ptm6840_device> m_ptm;
127   required_device<mc68681_device> m_sio;
128   optional_device<mc68681_device> m_sio2;
133   required_device<apollo_sio> m_sio;
134   optional_device<apollo_sio> m_sio2;
129135   required_device<mc146818_device> m_rtc;
130136   required_device<isa16_device> m_isa;
131137
r30980r30981
232238
233239   void apollo_pic_set_irq_line(int irq, int state);
234240   void select_dma_channel(int channel, bool state);
235   
241
236242   DECLARE_WRITE_LINE_MEMBER(apollo_reset_instr_callback);
237243   DECLARE_READ32_MEMBER(apollo_instruction_hook);
238244
r30980r30981
258264#define APOLLO_CONF_MONO_15I     0x0008
259265#define APOLLO_CONF_MONO_19I     0x0010
260266#define APOLLO_CONF_GERMAN_KBD   0x0020
261#define APOLLO_CONF_DATE_1990    0x0040
262#define APOLLO_CONF_NODE_ID      0x0080
263#define APOLLO_CONF_IDLE_SLEEP   0x0100
264#define APOLLO_CONF_TRAP_TRACE   0x0200
265#define APOLLO_CONF_FPU_TRACE    0x0400
266#define APOLLO_CONF_DISK_TRACE   0x0800
267#define APOLLO_CONF_NET_TRACE    0x1000
267#define APOLLO_CONF_20_YEARS_AGO 0x0040
268#define APOLLO_CONF_25_YEARS_AGO 0x0080
269#define APOLLO_CONF_NODE_ID      0x0100
270#define APOLLO_CONF_IDLE_SLEEP   0x0200
271#define APOLLO_CONF_TRAP_TRACE   0x0400
272#define APOLLO_CONF_FPU_TRACE    0x0800
273#define APOLLO_CONF_DISK_TRACE   0x1000
274#define APOLLO_CONF_NET_TRACE    0x2000
268275
269276// check configuration setting
270277int apollo_config(int mask);
r30980r30981
293300UINT16 apollo_csr_get_status_register(void);
294301void apollo_csr_set_status_register(UINT16 mask, UINT16 data);
295302
303/*----------- machine/apollo_sio.c -----------*/
304
305#define MCFG_APOLLO_SIO_ADD(_tag, _clock) \
306   MCFG_DEVICE_ADD(_tag, APOLLO_SIO, _clock)
307
308#define MCFG_APOLLO_SIO_IRQ_CALLBACK(_cb) \
309   devcb = &apollo_sio::set_irq_cb(*device, DEVCB_##_cb);
310
311#define MCFG_APOLLO_SIO_A_TX_CALLBACK(_cb) \
312   devcb = &apollo_sio::set_a_tx_cb(*device, DEVCB_##_cb);
313
314#define MCFG_APOLLO_SIO_B_TX_CALLBACK(_cb) \
315   devcb = &apollo_sio::set_b_tx_cb(*device, DEVCB_##_cb);
316
317#define MCFG_APOLLO_SIO_OUTPORT_CALLBACK(_cb) \
318   devcb = &apollo_sio::set_outport_cb(*device, DEVCB_##_cb);
319
320class apollo_sio: public mc68681_device
321{
322public:
323   apollo_sio(const machine_config &mconfig, const char *tag,
324         device_t *owner, UINT32 clock);
325
326   DECLARE_READ8_MEMBER(read);
327   DECLARE_WRITE8_MEMBER(write);
328
329protected:
330   virtual void device_reset();
331
332private:
333    UINT8 m_csrb;
334    UINT8 m_ip6;
335};
336
337extern const device_type APOLLO_SIO;
338
296339/*----------- video/apollo.c -----------*/
297340
298341#define APOLLO_SCREEN_TAG "apollo_screen"
r30980r30981
528571   running_machine *m_machine;
529572};
530573
531
532
533574extern const device_type APOLLO_GRAPHICS;
534575
535576#define MCFG_APOLLO_GRAPHICS_ADD( _tag) \
r30980r30981
559600
560601MACHINE_CONFIG_EXTERN( apollo_mono19i );
561602
562
563603#endif /* APOLLO_H_ */
trunk/src/mess/drivers/apollo.c
r30980r30981
2727#define VERBOSE 0
2828
2929#include "includes/apollo.h"
30#include "machine/apollo_kbd.h"
31
3230#include "debugger.h"
33
3431#include "cpu/m68000/m68kcpu.h"
35
3632#include "sound/beep.h"
37
3833#include "apollo_dsp.lh"
3934
35// we use set_verbose
36#include "bus/isa/omti8621.h"
37#include "bus/isa/3c505.h"
38
4039#define TERMINAL_TAG "terminal"
4140
4241// we use this to prevent excessive logging (if emulation runs amok)
r30980r30981
5655#define ATBUS_MEMORY_BASE   0x080000
5756#define ATBUS_MEMORY_END    0xffffff
5857
59#define DN3500_RAM_SIZE     16 // 8 or 16 MB
58#define DN3500_RAM_SIZE     16 // 8, 16 or 32 MB
6059
6160#if DN3500_RAM_SIZE == 8
6261#define DN3500_RAM_BASE     0x1000000
6362#define DN3500_RAM_END      0x17fffff
64#define DN3500_RAM_CONFIG_BYTE  0x64 // or 0xe8
65#else /* DN3500_RAM_SIZE == 16 */
63#define DN3500_RAM_CONFIG_BYTE  0x64 // 4-4-0-0
64#elif DN3500_RAM_SIZE == 16
6665#define DN3500_RAM_BASE     0x1000000
6766#define DN3500_RAM_END      0x1ffffff
6867#define DN3500_RAM_CONFIG_BYTE 0x60 // 4-4-4-4
69//#define DN3500_RAM_CONFIG_BYTE 0x14 // 8-8-0-0
68#else /* DN3500_RAM_SIZE == 32 */
69#define DN3500_RAM_BASE     0x1000000
70#define DN3500_RAM_END      0x3ffffff
71#define DN3500_RAM_CONFIG_BYTE 0x20 // 8-8-8-8
7072#endif
7173
7274#define DN3000_RAM_BASE     0x100000
7375#define DN3000_RAM_END      0x8fffff
74#define DN3000_RAM_CONFIG_8MB  0xA8
76#define DN3000_RAM_CONFIG_8MB  0x20 // 2-2-2-2
7577
7678#define DN5500_RAM_SIZE     32 // 16 or 32 MB
7779
r30980r30981
570572
571573READ16_MEMBER(apollo_state::apollo_atbus_io_r)
572574{
573   UINT32 isa_addr = (offset & 3) + ((offset & ~0x1ff)>>7);
575   UINT32 isa_addr = (offset & 3) + ((offset & ~0x1ff) >> 7);
574576
575   return m_isa->io16_r(space, isa_addr, mem_mask);
577   // Motorola CPU is MSB first, ISA Bus is LSB first
578   UINT16 data = m_isa->io16_swap_r(space, isa_addr, mem_mask);
579
580   SLOG2(("apollo_atbus_io_r at %08x -> %04x = %04x & %04x", offset*2, isa_addr*2, data, mem_mask));
581
582   return data;
576583}
577584
578585WRITE16_MEMBER(apollo_state::apollo_atbus_io_w)
579586{
580   UINT32 isa_addr = (offset & 3) + ((offset & ~0x1ff)>>7);
587   UINT32 isa_addr = (offset & 3) + ((offset & ~0x1ff) >> 7);
581588
582   m_isa->io16_w(space, isa_addr, data, mem_mask);
589   SLOG2(("apollo_atbus_io_w at %08x -> %04x = %04x & %04x", offset*2, isa_addr*2, data, mem_mask));
590
591   // Motorola CPU is MSB first, ISA Bus is LSB first
592   m_isa->io16_swap_w(space, isa_addr, data, mem_mask);
583593}
584594
585595/***************************************************************************
r30980r30981
671681      AM_RANGE(0x010100, 0x0101ff) AM_READWRITE16(apollo_csr_control_register_r, apollo_csr_control_register_w, 0xffffffff)
672682      AM_RANGE(0x010200, 0x0102ff) AM_READWRITE8(cache_status_register_r, cache_control_register_w, 0xffffffff )
673683      AM_RANGE(0x010300, 0x0103ff) AM_READWRITE8(task_alias_register_r , task_alias_register_w , 0xffffffff )
674      AM_RANGE(0x010400, 0x0104ff) AM_DEVREADWRITE8(APOLLO_SIO_TAG, mc68681_device, read, write, 0x00ff00ff )
684      AM_RANGE(0x010400, 0x0104ff) AM_DEVREADWRITE8(APOLLO_SIO_TAG, apollo_sio, read, write, 0xffffffff )
675685      AM_RANGE(0x010500, 0x0105ff) AM_DEVREADWRITE8(APOLLO_SIO2_TAG, mc68681_device, read, write, 0x00ff00ff )
676686      AM_RANGE(0x010800, 0x0108ff) AM_DEVREADWRITE8(APOLLO_PTM_TAG, ptm6840_device, read, write, 0x00ff00ff )
677687      AM_RANGE(0x010900, 0x0109ff) AM_READWRITE8(apollo_rtc_r, apollo_rtc_w, 0xffffffff )
r30980r30981
717727      AM_RANGE(0x010100, 0x0101ff) AM_READWRITE16(apollo_csr_control_register_r, apollo_csr_control_register_w, 0xffffffff)
718728      AM_RANGE(0x010200, 0x0102ff) AM_READWRITE8(cache_status_register_r, cache_control_register_w, 0xffffffff )
719729      AM_RANGE(0x010300, 0x0103ff) AM_READWRITE8(task_alias_register_r , task_alias_register_w , 0xffffffff )
720      AM_RANGE(0x010400, 0x0104ff) AM_DEVREADWRITE8(APOLLO_SIO_TAG, mc68681_device, read, write, 0x00ff00ff )
730      AM_RANGE(0x010400, 0x0104ff) AM_DEVREADWRITE8(APOLLO_SIO_TAG, apollo_sio, read, write, 0xffffffff )
721731      AM_RANGE(0x010500, 0x0105ff) AM_DEVREADWRITE8(APOLLO_SIO2_TAG, mc68681_device, read, write, 0x00ff00ff )
722732      AM_RANGE(0x010800, 0x0108ff) AM_DEVREADWRITE8(APOLLO_PTM_TAG, ptm6840_device, read, write, 0x00ff00ff )
723733      AM_RANGE(0x010900, 0x0109ff) AM_READWRITE8(apollo_rtc_r, apollo_rtc_w, 0xffffffff )
r30980r30981
749759      AM_RANGE(0x000000, 0x007fff) AM_WRITE(apollo_rom_w)
750760      AM_RANGE(0x008000, 0x0080ff) AM_READWRITE16(apollo_csr_status_register_r, apollo_csr_status_register_w, 0xffffffff)
751761      AM_RANGE(0x008100, 0x0081ff) AM_READWRITE16(apollo_csr_control_register_r, apollo_csr_control_register_w, 0xffffffff)
752      AM_RANGE(0x008400, 0x0087ff) AM_DEVREADWRITE8(APOLLO_SIO_TAG, mc68681_device, read, write, 0x00ff00ff )
762      AM_RANGE(0x008400, 0x0087ff) AM_DEVREADWRITE8(APOLLO_SIO_TAG, apollo_sio, read, write, 0xffffffff )
753763      AM_RANGE(0x008800, 0x0088ff) AM_DEVREADWRITE8(APOLLO_PTM_TAG, ptm6840_device, read, write, 0x00ff00ff )
754764      AM_RANGE(0x008900, 0x0089ff) AM_READWRITE8(apollo_rtc_r, apollo_rtc_w, 0xffffffff )
755765      AM_RANGE(0x009000, 0x0090ff) AM_READWRITE8(/*"dma1",*/apollo_dma_1_r, apollo_dma_1_w, 0xffffffff )
r30980r30981
784794      AM_RANGE(0x000000, 0x007fff) AM_WRITE(apollo_rom_w)
785795      AM_RANGE(0x008000, 0x0080ff) AM_READWRITE16(apollo_csr_status_register_r, apollo_csr_status_register_w, 0xffffffff)
786796      AM_RANGE(0x008100, 0x0081ff) AM_READWRITE16(apollo_csr_control_register_r, apollo_csr_control_register_w, 0xffffffff)
787      AM_RANGE(0x008400, 0x0087ff) AM_DEVREADWRITE8(APOLLO_SIO_TAG, mc68681_device, read, write, 0x00ff00ff )
797      AM_RANGE(0x008400, 0x0087ff) AM_DEVREADWRITE8(APOLLO_SIO_TAG, apollo_sio, read, write, 0xffffffff )
788798      AM_RANGE(0x008800, 0x0088ff) AM_DEVREADWRITE8(APOLLO_PTM_TAG, ptm6840_device, read, write, 0x00ff00ff )
789799      AM_RANGE(0x008900, 0x0089ff) AM_READWRITE8(apollo_rtc_r, apollo_rtc_w, 0xffffffff )
790800
r30980r30981
817827      AM_RANGE(0x010100, 0x0101ff) AM_READWRITE16(apollo_csr_control_register_r, apollo_csr_control_register_w, 0xffffffff)
818828      AM_RANGE(0x010200, 0x0102ff) AM_READWRITE8(cache_status_register_r, cache_control_register_w, 0xffffffff )
819829      AM_RANGE(0x010300, 0x0103ff) AM_READWRITE8(task_alias_register_r , task_alias_register_w , 0xffffffff )
820      AM_RANGE(0x010400, 0x0104ff) AM_DEVREADWRITE8(APOLLO_SIO_TAG, mc68681_device, read, write, 0x00ff00ff )
830      AM_RANGE(0x010400, 0x0104ff) AM_DEVREADWRITE8(APOLLO_SIO_TAG, apollo_sio, read, write, 0xffffffff )
821831      AM_RANGE(0x010500, 0x0105ff) AM_DEVREADWRITE8(APOLLO_SIO2_TAG, mc68681_device, read, write, 0x00ff00ff )
822832      AM_RANGE(0x010800, 0x0108ff) AM_DEVREADWRITE8(APOLLO_PTM_TAG, ptm6840_device, read, write, 0x00ff00ff )
823833      AM_RANGE(0x010900, 0x0109ff) AM_READWRITE8(apollo_rtc_r, apollo_rtc_w, 0xffffffff )
r30980r30981
866876      AM_RANGE(0x010100, 0x0101ff) AM_READWRITE16(apollo_csr_control_register_r, apollo_csr_control_register_w, 0xffffffff)
867877      AM_RANGE(0x010200, 0x0102ff) AM_READWRITE8(cache_status_register_r, cache_control_register_w, 0xffffffff )
868878      AM_RANGE(0x010300, 0x0103ff) AM_READWRITE8(task_alias_register_r , task_alias_register_w , 0xffffffff )
869      AM_RANGE(0x010400, 0x0104ff) AM_DEVREADWRITE8(APOLLO_SIO_TAG, mc68681_device, read, write, 0x00ff00ff )
879      AM_RANGE(0x010400, 0x0104ff) AM_DEVREADWRITE8(APOLLO_SIO_TAG, apollo_sio, read, write, 0xffffffff )
870880      AM_RANGE(0x010500, 0x0105ff) AM_DEVREADWRITE8(APOLLO_SIO2_TAG, mc68681_device, read, write, 0x00ff00ff )
871881      AM_RANGE(0x010800, 0x0108ff) AM_DEVREADWRITE8(APOLLO_PTM_TAG, ptm6840_device, read, write, 0x00ff00ff )
872882      AM_RANGE(0x010900, 0x0109ff) AM_READWRITE8(apollo_rtc_r, apollo_rtc_w, 0xffffffff )
r30980r30981
10961106   /* video hardware 19" monochrome */
10971107   MCFG_APOLLO_MONO19I_ADD(APOLLO_SCREEN_TAG)
10981108   MCFG_DEVICE_ADD(APOLLO_KBD_TAG, APOLLO_KBD, 0)
1099   MCFG_APOLLO_KBD_TX_CALLBACK(DEVWRITELINE(APOLLO_SIO_TAG, mc68681_device, rx_a_w))
1109   MCFG_APOLLO_KBD_TX_CALLBACK(DEVWRITELINE(APOLLO_SIO_TAG, apollo_sio, rx_a_w))
11001110   MCFG_APOLLO_KBD_GERMAN_CALLBACK(READLINE(apollo_state, apollo_kbd_is_german))
11011111MACHINE_CONFIG_END
11021112
r30980r30981
11041114   /* video hardware is 15" monochrome or color */
11051115   MCFG_APOLLO_GRAPHICS_ADD(APOLLO_SCREEN_TAG)
11061116   MCFG_DEVICE_ADD(APOLLO_KBD_TAG, APOLLO_KBD, 0)
1107   MCFG_APOLLO_KBD_TX_CALLBACK(DEVWRITELINE(APOLLO_SIO_TAG, mc68681_device, rx_a_w))
1117   MCFG_APOLLO_KBD_TX_CALLBACK(DEVWRITELINE(APOLLO_SIO_TAG, apollo_sio, rx_a_w))
11081118   MCFG_APOLLO_KBD_GERMAN_CALLBACK(READLINE(apollo_state, apollo_kbd_is_german))
11091119MACHINE_CONFIG_END
11101120
r30980r30981
11471157   /* video hardware 19" monochrome */
11481158   MCFG_APOLLO_MONO19I_ADD(APOLLO_SCREEN_TAG)
11491159   MCFG_DEVICE_ADD(APOLLO_KBD_TAG, APOLLO_KBD, 0)
1150   MCFG_APOLLO_KBD_TX_CALLBACK(DEVWRITELINE(APOLLO_SIO_TAG, mc68681_device, rx_a_w))
1160   MCFG_APOLLO_KBD_TX_CALLBACK(DEVWRITELINE(APOLLO_SIO_TAG, apollo_sio, rx_a_w))
11511161   MCFG_APOLLO_KBD_GERMAN_CALLBACK(READLINE(apollo_state, apollo_kbd_is_german))
11521162MACHINE_CONFIG_END
11531163
r30980r30981
11551165   /* video hardware 15" monochrome */
11561166   MCFG_APOLLO_GRAPHICS_ADD(APOLLO_SCREEN_TAG)
11571167   MCFG_DEVICE_ADD(APOLLO_KBD_TAG, APOLLO_KBD, 0)
1158   MCFG_APOLLO_KBD_TX_CALLBACK(DEVWRITELINE(APOLLO_SIO_TAG, mc68681_device, rx_a_w))
1168   MCFG_APOLLO_KBD_TX_CALLBACK(DEVWRITELINE(APOLLO_SIO_TAG, apollo_sio, rx_a_w))
11591169   MCFG_APOLLO_KBD_GERMAN_CALLBACK(READLINE(apollo_state, apollo_kbd_is_german))
11601170MACHINE_CONFIG_END
11611171
r30980r30981
11851195   /* video hardware 19" monochrome */
11861196   MCFG_APOLLO_MONO19I_ADD(APOLLO_SCREEN_TAG)
11871197   MCFG_DEVICE_ADD(APOLLO_KBD_TAG, APOLLO_KBD, 0)
1188   MCFG_APOLLO_KBD_TX_CALLBACK(DEVWRITELINE(APOLLO_SIO_TAG, mc68681_device, rx_a_w))
1198   MCFG_APOLLO_KBD_TX_CALLBACK(DEVWRITELINE(APOLLO_SIO_TAG, apollo_sio, rx_a_w))
11891199   MCFG_APOLLO_KBD_GERMAN_CALLBACK(READLINE(apollo_state, apollo_kbd_is_german))
11901200MACHINE_CONFIG_END
11911201
r30980r30981
11931203   /* video hardware 15" monochrome */
11941204   MCFG_APOLLO_GRAPHICS_ADD(APOLLO_SCREEN_TAG)
11951205   MCFG_DEVICE_ADD(APOLLO_KBD_TAG, APOLLO_KBD, 0)
1196   MCFG_APOLLO_KBD_TX_CALLBACK(DEVWRITELINE(APOLLO_SIO_TAG, mc68681_device, rx_a_w))
1206   MCFG_APOLLO_KBD_TX_CALLBACK(DEVWRITELINE(APOLLO_SIO_TAG, apollo_sio, rx_a_w))
11971207   MCFG_APOLLO_KBD_GERMAN_CALLBACK(READLINE(apollo_state, apollo_kbd_is_german))
11981208MACHINE_CONFIG_END
11991209
trunk/src/mess/machine/apollo.c
r30980r30981
1616 * - apollo_rtc.c - APOLLO DS3500 RTC MC146818
1717 * - apollo_sio.c - APOLLO DS3500 SIO
1818 * - apollo_sio2.c - APOLLO DS3500 SIO2
19 * - apollo_fdc.c - APOLLO DS3500 Floppy disk controller
19 * - apollo_stdio.c - stdio terminal for mess
20 * - apollo_3c505.h - Apollo 3C505 Ethernet controller
2021 *
2122 * see also:
2223 * - http://www.bitsavers.org/pdf/apollo/008778-03_DOMAIN_Series_3000_4000_Technical_Reference_Aug87.pdf
r30980r30981
8889      PORT_CONFSETTING(0x00, DEF_STR ( Off ) )
8990      PORT_CONFSETTING(APOLLO_CONF_GERMAN_KBD, DEF_STR ( On ) )
9091
91      PORT_CONFNAME(APOLLO_CONF_DATE_1990, APOLLO_CONF_DATE_1990, "20 Years Ago ...")
92      PORT_CONFNAME(APOLLO_CONF_20_YEARS_AGO, APOLLO_CONF_20_YEARS_AGO, "20 Years Ago ...")
9293      PORT_CONFSETTING(0x00, DEF_STR ( Off ) )
93      PORT_CONFSETTING(APOLLO_CONF_DATE_1990, DEF_STR ( On ) )
94      PORT_CONFSETTING(APOLLO_CONF_20_YEARS_AGO, DEF_STR ( On ) )
9495
96      PORT_CONFNAME(APOLLO_CONF_25_YEARS_AGO, APOLLO_CONF_25_YEARS_AGO, "25 Years Ago ...")
97      PORT_CONFSETTING(0x00, DEF_STR ( Off ) )
98      PORT_CONFSETTING(APOLLO_CONF_25_YEARS_AGO, DEF_STR ( On ) )
99
95100      PORT_CONFNAME(APOLLO_CONF_NODE_ID, APOLLO_CONF_NODE_ID, "Node ID from Disk")
96101      PORT_CONFSETTING(0x00, DEF_STR ( Off ) )
97102      PORT_CONFSETTING(APOLLO_CONF_NODE_ID, DEF_STR ( On ) )
98103
99      PORT_CONFNAME(APOLLO_CONF_IDLE_SLEEP, 0x00, "Idle Sleep")
100      PORT_CONFSETTING(0x00, DEF_STR ( Off ) )
101      PORT_CONFSETTING(APOLLO_CONF_IDLE_SLEEP, DEF_STR ( On ) )
104//      PORT_CONFNAME(APOLLO_CONF_IDLE_SLEEP, 0x00, "Idle Sleep")
105//      PORT_CONFSETTING(0x00, DEF_STR ( Off ) )
106//      PORT_CONFSETTING(APOLLO_CONF_IDLE_SLEEP, DEF_STR ( On ) )
102107
103108      PORT_CONFNAME(APOLLO_CONF_TRAP_TRACE, 0x00, "Trap Trace")
104109      PORT_CONFSETTING(0x00, DEF_STR ( Off ) )
r30980r30981
631636   }
632637}
633638
634
635639//##########################################################################
636640// machine/apollo_ptm.c - APOLLO DS3500 Programmable Timer 6840
637641//##########################################################################
r30980r30981
713717}
714718
715719//##########################################################################
716// machine/apollo_sio.c - APOLLO DS3500 SIO
720// machine/apollo_sio.c - DN3000/DS3500 SIO at 0x8400/0x10400
717721//##########################################################################
718722
723#undef VERBOSE
724#define VERBOSE 0
725
726apollo_sio::apollo_sio(const machine_config &mconfig, const char *tag,
727      device_t *owner, UINT32 clock) :
728   mc68681_device(mconfig, tag, owner, clock),
729   m_csrb(0),
730   m_ip6(0)
731{
732}
733
734void apollo_sio::device_reset()
735{
736   UINT8 input_data = apollo_get_ram_config_byte();
737   ip0_w((input_data & 0x01) ? ASSERT_LINE : CLEAR_LINE);
738   ip1_w((input_data & 0x02) ? ASSERT_LINE : CLEAR_LINE);
739   ip2_w((input_data & 0x04) ? ASSERT_LINE : CLEAR_LINE);
740   ip3_w((input_data & 0x08) ? ASSERT_LINE : CLEAR_LINE);
741   ip4_w((input_data & 0x10) ? ASSERT_LINE : CLEAR_LINE);
742   ip5_w((input_data & 0x20) ? ASSERT_LINE : CLEAR_LINE);
743//   ip6_w((input_data & 0x40) ? ASSERT_LINE : CLEAR_LINE);
744
745   // MC2681 has IP[6] (instead of /IACK on MC68681)
746   m_ip6 = (input_data & 0x40) ? ASSERT_LINE : CLEAR_LINE;
747}
748
749READ8_MEMBER( apollo_sio::read )
750{
751   static int last_read8_offset[2] = { -1, -1 };
752   static int last_read8_value[2] = { -1, -1 };
753
754   static const char * const duart68681_reg_read_names[0x10] = { "MRA", "SRA",
755         "BRG Test", "RHRA", "IPCR", "ISR", "CTU", "CTL", "MRB", "SRB",
756         "1X/16X Test", "RHRB", "IVR", "Input Ports", "Start Counter",
757         "Stop Counter" };
758
759   int data = mc68681_device::read(space, offset/2, mem_mask);
760
761   switch (offset / 2)
762   {
763   case 0x0b: /* RHRB */
764      if (m_csrb == 0x77 && data == 0xfe)
765      {
766         // special fix for the MD ROM baudrate recognition
767         // fix data only if CR is entered while baudrate is set to 2000 Baud
768
769         // Receive and transmit clock in diserial.c are not precise enough
770         // to support the baudrate recognition done in the Apollo MD ROM
771         // use 0xff instead of 0xfe to set the baudrate recognition for 9600 Bd
772         // (to prevent that the MD selftest or SK command will hang in Service mode)
773         data = 0xff;
774      }
775      break;
776   case 0x0d: /* IP */
777      // MC2681 has IP[6] (instead of /IACK on MC68681)
778      data = (data & ~0x40) | (m_ip6 ? 0x40 : 0);
779      break;
780   }
781
782   // omit logging if sio is being polled from the boot rom
783   if ((offset != last_read8_offset[1] || data != last_read8_value[1]) && \
784      (offset != last_read8_offset[0] || data != last_read8_value[0]))
785   {
786      last_read8_offset[0] = last_read8_offset[1];
787      last_read8_value[0] = last_read8_value[1];
788      last_read8_offset[1] = offset;
789      last_read8_value[1] = data;
790      CLOG2(("reading MC2681 reg %02x (%s) returned %02x",
791            offset, duart68681_reg_read_names[(offset/2) & 15], data));
792   }
793
794   return data;
795}
796
797WRITE8_MEMBER( apollo_sio::write )
798{
799   static const char * const duart68681_reg_write_names[0x10] = { "MRA",
800         "CSRA", "CRA", "THRA", "ACR", "IMR", "CRUR", "CTLR", "MRB", "CSRB",
801         "CRB", "THRB", "IVR", "OPCR", "Set OP Bits", "Reset OP Bits" };
802
803   CLOG2(("writing MC2681 reg %02x (%s) with %02x",
804         offset, duart68681_reg_write_names[(offset/2) & 15], data));
805
806   switch (offset / 2) {
807   case 0x09: /* CSRB */
808      // remember CSRB to handle MD selftest or SK command
809      m_csrb = data;
810      break;
811#if 0
812   case 0x0b: /* THRB */
813      // tee output of SIO1 to stdout
814      // sad: ceterm will get confused from '\r'
815      if (apollo_is_dsp3x00() && data != '\r') ::putchar(data);
816      break;
817#endif
818   }
819   mc68681_device::write(space, offset/2, data, mem_mask);
820}
821
822// device type definition
823const device_type APOLLO_SIO = &device_creator<apollo_sio>;
824
719825WRITE_LINE_MEMBER(apollo_state::sio_irq_handler)
720826{
721827   apollo_pic_set_irq_line(APOLLO_IRQ_SIO1, state);
r30980r30981
723829
724830WRITE8_MEMBER(apollo_state::sio_output)
725831{
832//   CLOG2(("apollo_sio - sio_output %02x", data));
833
726834   if ((data & 0x80) != (sio_output_data & 0x80))
727835   {
728836      apollo_pic_set_irq_line(APOLLO_IRQ_DIAG, (data & 0x80) ? 1 : 0);
729      sio_output_data = data;
730837   }
731}
732   // The counter/timer on the SIO chip is used for the refresh count.
733   // This is set up in the timer mode to  produce a square wave output on output OP3.
838
839   // The counter/timer on the SIO chip is used for the RAM refresh count.
840   // This is set up in the timer mode to produce a square wave output on output OP3.
734841   // The period of the output is 15 microseconds.
735842
736   // toggle memory refresh counter
737//  sio_input_data ^= 0x01;
843   if ((data & 0x08) != (sio_output_data & 0x08))
844   {
845      m_sio->ip0_w((data & 0x08) ? ASSERT_LINE : CLEAR_LINE);
846   }
738847
848   sio_output_data = data;
849}
850
739851//##########################################################################
740852// machine/apollo_sio2.c - APOLLO DS3500 SIO2
741853//##########################################################################
r30980r30981
755867static SLOT_INTERFACE_START(apollo_isa_cards)
756868   SLOT_INTERFACE("wdc", ISA16_OMTI8621)   // Combo ESDI/AT floppy controller
757869   SLOT_INTERFACE("ctape", ISA8_SC499)     // Archive SC499 cartridge tape
758   SLOT_INTERFACE("3c505", ISA16_3C505)    // 3Com 3C505 Ethernet card
870   SLOT_INTERFACE("3c505", ISA16_3C505)   // 3Com 3C505 Ethernet card
759871SLOT_INTERFACE_END
760872
761873MACHINE_CONFIG_FRAGMENT( common )
r30980r30981
806918   MCFG_MC146818_ADD( APOLLO_RTC_TAG, XTAL_32_768kHz )
807919   MCFG_MC146818_UTC( true )
808920
809   MCFG_MC68681_ADD( APOLLO_SIO2_TAG, XTAL_3_6864MHz )
810   MCFG_MC68681_IRQ_CALLBACK(WRITELINE(apollo_state, sio2_irq_handler))
921   MCFG_APOLLO_SIO_ADD( APOLLO_SIO2_TAG, XTAL_3_6864MHz )
922   MCFG_APOLLO_SIO_IRQ_CALLBACK(WRITELINE(apollo_state, sio2_irq_handler))
811923
812924   MCFG_DEVICE_ADD(APOLLO_ISA_TAG, ISA16, 0)
813925   MCFG_ISA16_CPU(":"MAINCPU)
r30980r30981
818930   MCFG_ISA_OUT_IRQ5_CB(DEVWRITELINE(APOLLO_PIC1_TAG, pic8259_device, ir5_w))
819931   MCFG_ISA_OUT_IRQ6_CB(DEVWRITELINE(APOLLO_PIC1_TAG, pic8259_device, ir6_w))
820932   MCFG_ISA_OUT_IRQ7_CB(DEVWRITELINE(APOLLO_PIC1_TAG, pic8259_device, ir7_w))
821   MCFG_ISA_OUT_IRQ10_CB(DEVWRITELINE(APOLLO_PIC2_TAG, pic8259_device, ir3_w))
822   MCFG_ISA_OUT_IRQ11_CB(DEVWRITELINE(APOLLO_PIC2_TAG, pic8259_device, ir4_w))
823   MCFG_ISA_OUT_IRQ12_CB(DEVWRITELINE(APOLLO_PIC2_TAG, pic8259_device, ir5_w))
933   MCFG_ISA_OUT_IRQ10_CB(DEVWRITELINE(APOLLO_PIC2_TAG, pic8259_device, ir2_w))
934   MCFG_ISA_OUT_IRQ11_CB(DEVWRITELINE(APOLLO_PIC2_TAG, pic8259_device, ir3_w))
935   MCFG_ISA_OUT_IRQ12_CB(DEVWRITELINE(APOLLO_PIC2_TAG, pic8259_device, ir4_w))
824936   MCFG_ISA_OUT_IRQ14_CB(DEVWRITELINE(APOLLO_PIC2_TAG, pic8259_device, ir6_w))
825937   MCFG_ISA_OUT_IRQ15_CB(DEVWRITELINE(APOLLO_PIC2_TAG, pic8259_device, ir7_w))
826938   MCFG_ISA_OUT_DRQ0_CB(DEVWRITELINE(APOLLO_DMA1_TAG, am9517a_device, dreq0_w))
r30980r30981
842954// for machines with the keyboard and a graphics head
843955MACHINE_CONFIG_FRAGMENT( apollo )
844956   MCFG_FRAGMENT_ADD(common)
845
846   MCFG_MC68681_ADD( APOLLO_SIO_TAG, XTAL_3_6864MHz )
847   MCFG_MC68681_IRQ_CALLBACK(WRITELINE(apollo_state, sio_irq_handler))
848   MCFG_MC68681_OUTPORT_CALLBACK(WRITE8(apollo_state, sio_output))
849   MCFG_MC68681_A_TX_CALLBACK(DEVWRITELINE(APOLLO_KBD_TAG, apollo_kbd_device, rx_w))
957   MCFG_APOLLO_SIO_ADD( APOLLO_SIO_TAG, XTAL_3_6864MHz )
958   MCFG_APOLLO_SIO_IRQ_CALLBACK(WRITELINE(apollo_state, sio_irq_handler))
959   MCFG_APOLLO_SIO_OUTPORT_CALLBACK(WRITE8(apollo_state, sio_output))
960   MCFG_APOLLO_SIO_A_TX_CALLBACK(DEVWRITELINE(APOLLO_KBD_TAG, apollo_kbd_device, rx_w))
850961MACHINE_CONFIG_END
851962
852963static DEVICE_INPUT_DEFAULTS_START( apollo_terminal )
r30980r30981
861972// for headless machines using a serial console
862973MACHINE_CONFIG_FRAGMENT( apollo_terminal )
863974   MCFG_FRAGMENT_ADD(common)
975   MCFG_APOLLO_SIO_ADD( APOLLO_SIO_TAG, XTAL_3_6864MHz )
976   MCFG_APOLLO_SIO_IRQ_CALLBACK(WRITELINE(apollo_state, sio_irq_handler))
977   MCFG_APOLLO_SIO_OUTPORT_CALLBACK(WRITE8(apollo_state, sio_output))
978   MCFG_APOLLO_SIO_B_TX_CALLBACK(DEVWRITELINE("rs232", rs232_port_device, write_txd))
864979
865   MCFG_MC68681_ADD( APOLLO_SIO_TAG, XTAL_3_6864MHz )
866   MCFG_MC68681_IRQ_CALLBACK(WRITELINE(apollo_state, sio_irq_handler))
867   MCFG_MC68681_OUTPORT_CALLBACK(WRITE8(apollo_state, sio_output))
868   MCFG_MC68681_B_TX_CALLBACK(DEVWRITELINE("rs232", rs232_port_device, write_txd))
980   MCFG_RS232_PORT_ADD("rs232", default_rs232_devices, "terminal")
981   MCFG_RS232_RXD_HANDLER(DEVWRITELINE(APOLLO_SIO_TAG, apollo_sio, rx_b_w))
869982
870   MCFG_RS232_PORT_ADD("rs232", default_rs232_devices, "terminal")
871   MCFG_RS232_RXD_HANDLER(DEVWRITELINE(APOLLO_SIO_TAG, mc68681_device, rx_b_w))
872983   MCFG_DEVICE_CARD_DEVICE_INPUT_DEFAULTS("terminal", apollo_terminal)
873984MACHINE_CONFIG_END
874985
875986DRIVER_INIT_MEMBER(apollo_state,apollo)
876987{
877   //MLOG1(("driver_init_apollo"));
988   MLOG1(("driver_init_apollo"));
878989}
879990
880991MACHINE_START_MEMBER(apollo_state,apollo)
881992{
882   //MLOG1(("machine_start_apollo"));
993   MLOG1(("machine_start_apollo"));
883994
884995   if (apollo_is_dn3000())
885996   {
r30980r30981
8971008   m_dma_channel = -1;
8981009   m_cur_eop = false;
8991010
900   //MLOG1(("machine_reset_apollo"));
1011   MLOG1(("machine_reset_apollo"));
9011012
9021013   // set configuration
9031014   apollo_csr_set_servicemode(apollo_config(APOLLO_CONF_SERVICE_MODE));
9041015
9051016   // change year according to configuration settings
906   if (year < 20 && apollo_config(APOLLO_CONF_DATE_1990))
1017   if (year < 20 && apollo_config(APOLLO_CONF_20_YEARS_AGO))
9071018   {
9081019      year+=80;
9091020      apollo_rtc_w(space, 9, year);
9101021   }
911   else if (year >= 80 && !apollo_config(APOLLO_CONF_DATE_1990))
1022   else if (year < 25 && apollo_config(APOLLO_CONF_25_YEARS_AGO))
9121023   {
1024      year += 75;
1025      apollo_rtc_w(space, 9, year);
1026   }
1027   else if (year >= 80 && !apollo_config(APOLLO_CONF_20_YEARS_AGO)
1028         && !apollo_config(APOLLO_CONF_25_YEARS_AGO))
1029   {
9131030      year -=80;
9141031      apollo_rtc_w(space, 9, year);
9151032   }

Previous 199869 Revisions Next


© 1997-2024 The MAME Team