Previous 199869 Revisions Next

r26561 Monday 9th December, 2013 at 09:45:56 UTC by Barry Rodewald
wicat: fixed unused field, substituting INS2651s with MC2661s (they seem to be alike).
[src/mess/drivers]wicat.c

trunk/src/mess/drivers/wicat.c
r26560r26561
3838      , m_videocpu(*this,"videocpu")
3939      , m_videoctrl(*this,"video")
4040      , m_videodma(*this,"videodma")
41      , m_videouart0(*this,"videouart0")
42      , m_videouart1(*this,"videouart1")
43      , m_videouart(*this,"videouart")
4144   { }
4245
43   //DECLARE_WRITE8_MEMBER(kbd_put);
4446   DECLARE_READ16_MEMBER(invalid_r);
4547   DECLARE_WRITE16_MEMBER(invalid_w);
46   DECLARE_WRITE16_MEMBER(serial_w);
4748   DECLARE_WRITE16_MEMBER(parallel_led_w);
4849   DECLARE_READ8_MEMBER(via_a_r);
4950   DECLARE_READ8_MEMBER(via_b_r);
r26560r26561
5152   DECLARE_WRITE8_MEMBER(via_b_w);
5253   DECLARE_READ8_MEMBER(video_r);
5354   DECLARE_WRITE8_MEMBER(video_w);
55   DECLARE_READ8_MEMBER(video_uart0_r);
56   DECLARE_WRITE8_MEMBER(video_uart0_w);
57   DECLARE_READ8_MEMBER(video_uart1_r);
58   DECLARE_WRITE8_MEMBER(video_uart1_w);
5459
5560   UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) { return 0; }
5661private:
57   UINT8 m_term_data;
5862   virtual void machine_start();
5963   virtual void machine_reset();
6064   required_shared_ptr<UINT8> m_vram;
r26560r26561
7074   required_device<cpu_device> m_videocpu;
7175   required_device<i8275x_device> m_videoctrl;
7276   required_device<am9517a_device> m_videodma;
77   required_device<mc2661_device> m_videouart0;
78   required_device<mc2661_device> m_videouart1;
79   required_device<im6402_device> m_videouart;
7380
7481   UINT8 m_portA;
7582   UINT8 m_portB;
r26560r26561
104111
105112static ADDRESS_MAP_START(wicat_video_io, AS_PROGRAM, 8, wicat_state)
106113   // yet to figure out...
107   // 0x0100 - INS2651 USART #1 ?
108   // 0x0200 - INS2651 USART #2 ?
114   AM_RANGE(0x0100,0x0107) AM_READWRITE(video_uart0_r,video_uart0_w)
115   AM_RANGE(0x0200,0x0207) AM_READWRITE(video_uart1_r,video_uart1_w)
109116   AM_RANGE(0x0700,0x0700) AM_DEVREADWRITE("videouart",im6402_device,read,write)  // UART?
110117   AM_RANGE(0x0800,0x080f) AM_DEVREADWRITE("videodma",am9517a_device,read,write)  // DMA?
111118   AM_RANGE(0x0b00,0x0b03) AM_READWRITE(video_r,video_w)
r26560r26561
128135{
129136}
130137
131//WRITE8_MEMBER( wicat_state::kbd_put )
132//{
133//   m_term_data = data;
134//}
135
136WRITE16_MEMBER( wicat_state::serial_w )
137{
138   if(ACCESSING_BITS_8_15)  // even addresses
139   {
140      switch(offset)
141      {
142      //case 0x00:
143      //case 0x01:
144      //case 0x02:
145      //case 0x03:
146         //m_terminal->write(space,0,data >> 8);
147      default:
148         logerror("Serial: Unused serial port write %02x to offset %02x\n",data,offset);
149      }
150   }
151}
152
153138WRITE16_MEMBER( wicat_state::parallel_led_w )
154139{
155140   // bit 0 - parallel port A direction (0 = input)
r26560r26561
223208   }
224209}
225210
211READ8_HANDLER(wicat_state::video_uart0_r)
212{
213   UINT16 noff = offset >> 1;
214   return m_videouart0->read(space,noff);
215}
216
217WRITE8_HANDLER(wicat_state::video_uart0_w)
218{
219   UINT16 noff = offset >> 1;
220   m_videouart0->write(space,noff,data);
221}
222
223READ8_HANDLER(wicat_state::video_uart1_r)
224{
225   UINT16 noff = offset >> 1;
226   return m_videouart1->read(space,noff);
227}
228
229WRITE8_HANDLER(wicat_state::video_uart1_w)
230{
231   UINT16 noff = offset >> 1;
232   m_videouart1->write(space,noff,data);
233}
234
226235I8275_DISPLAY_PIXELS(wicat_display_pixels)
227236{
228237   //wicat_state *state = device->machine().driver_data<wicat_state>();
r26560r26561
338347   DEVCB_NULL   // XSYNC out
339348};
340349
350// terminal (2x INS2651, 1x IM6042 - one of these is for the keyboard, another communicates with the main board, the third is unknown)
351static mc2661_interface wicat_video_uart0_intf =
352{
353   0,  // RXC
354   0,  // TXC
355   DEVCB_NULL,  // RXD in
356   DEVCB_NULL,  // RXD out
357   DEVCB_CPU_INPUT_LINE("videocpu",INPUT_LINE_IRQ0),  // RXRDY out
358   DEVCB_NULL,  // TXRDY out
359   DEVCB_NULL, //DEVCB_DEVICE_LINE_MEMBER(RS232_TAG, rs232_port_device, rts_w),  // RTS out
360   DEVCB_NULL, //DEVCB_DEVICE_LINE_MEMBER(RS232_TAG, rs232_port_device, dtr_w),  // DTR out
361   DEVCB_CPU_INPUT_LINE("videocpu",INPUT_LINE_IRQ0),  // TXEMT out
362   DEVCB_NULL,  // BKDET out
363   DEVCB_NULL   // XSYNC out
364};
365
366static mc2661_interface wicat_video_uart1_intf =
367{
368   0,  // RXC
369   0,  // TXC
370   DEVCB_NULL,  // RXD in
371   DEVCB_NULL,  // RXD out
372   DEVCB_CPU_INPUT_LINE("videocpu",INPUT_LINE_IRQ0),  // RXRDY out
373   DEVCB_NULL,  // TXRDY out
374   DEVCB_NULL, //DEVCB_DEVICE_LINE_MEMBER(RS232_TAG, rs232_port_device, rts_w),  // RTS out
375   DEVCB_NULL, //DEVCB_DEVICE_LINE_MEMBER(RS232_TAG, rs232_port_device, dtr_w),  // DTR out
376   DEVCB_CPU_INPUT_LINE("videocpu",INPUT_LINE_IRQ0),  // TXEMT out
377   DEVCB_NULL,  // BKDET out
378   DEVCB_NULL   // XSYNC out
379};
380
341381struct im6402_interface wicat_video_uart_intf =
342382{
343383   0,  // RRC
r26560r26561
425465
426466   MCFG_AM9517A_ADD("videodma", XTAL_8MHz, wicat_videodma_intf)  // clock is a bit of guess
427467   MCFG_IM6402_ADD("videouart", wicat_video_uart_intf)
428   // Also 2x INS2651 USARTs, not yet emulated
468   MCFG_MC2661_ADD("videouart0", XTAL_5_0688MHz, wicat_video_uart0_intf)  // the INS2651 looks similar enough to the MC2661...
469   MCFG_MC2661_ADD("videouart1", XTAL_5_0688MHz, wicat_video_uart1_intf)
429470
430471   MCFG_SCREEN_ADD("screen",RASTER)
431472   MCFG_SCREEN_SIZE(400,300)

Previous 199869 Revisions Next


© 1997-2024 The MAME Team