Previous 199869 Revisions Next

r26888 Thursday 2nd January, 2014 at 08:10:23 UTC by Barry Rodewald
wicat: Hooked up FD1795, but still cannot convince the system to even attempt to boot from floppy.  Updated some notes on the WD1000.
[src/mess/drivers]wicat.c

trunk/src/mess/drivers/wicat.c
r26887r26888
4646      , m_videouart(*this,"videouart")
4747      , m_videosram(*this,"vsram")
4848      , m_chargen(*this,"g2char")
49      , m_fdc(*this,"fdc")
4950   { }
5051
5152   DECLARE_READ16_MEMBER(invalid_r);
r26887r26888
8182   DECLARE_WRITE_LINE_MEMBER(crtc_cb);
8283   DECLARE_READ8_MEMBER(hdc_r);
8384   DECLARE_WRITE8_MEMBER(hdc_w);
85   DECLARE_READ8_MEMBER(fdc_r);
86   DECLARE_WRITE8_MEMBER(fdc_w);
8487   DECLARE_WRITE_LINE_MEMBER(kb_data_ready);
8588
8689   required_shared_ptr<UINT8> m_vram;
r26887r26888
101104   required_device<im6402_device> m_videouart;
102105   required_device<x2210_device> m_videosram;
103106   required_memory_region m_chargen;
107   required_device<fd1795_device> m_fdc;
104108
105109   UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) { return 0; }
106110   virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
r26887r26888
152156   AM_RANGE(0xf00040, 0xf0005f) AM_DEVREADWRITE8("via",via6522_device,read,write,0xff00)
153157   AM_RANGE(0xf00060, 0xf0007f) AM_DEVREADWRITE8("rtc",mm58274c_device,read,write,0xff00)
154158   AM_RANGE(0xf000d0, 0xf000d1) AM_WRITE(parallel_led_w)
155   AM_RANGE(0xf00180, 0xf0018f) AM_READWRITE8(hdc_r,hdc_w,0xffff)
156   // F00190 - Floppy controller
159   AM_RANGE(0xf00180, 0xf0018f) AM_READWRITE8(hdc_r,hdc_w,0xffff)  // WD1000
160   AM_RANGE(0xf00190, 0xf0019f) AM_READWRITE8(fdc_r,fdc_w,0xffff)  // FD1795
157161   AM_RANGE(0xf00f00, 0xf00fff) AM_READWRITE(invalid_r,invalid_w)
158162ADDRESS_MAP_END
159163
r26887r26888
180184   AM_RANGE(0x9000,0x9fff) AM_ROM AM_REGION("g2char",0x0000)
181185ADDRESS_MAP_END
182186
183static ADDRESS_MAP_START(wicat_flop_mem, AS_PROGRAM, 16, wicat_state)
187static ADDRESS_MAP_START(wicat_wd1000_mem, AS_PROGRAM, 16, wicat_state)
184188   AM_RANGE(0x0000, 0x17ff) AM_ROM AM_REGION("wd3", 0x0000)
185189   AM_RANGE(0x1800, 0x1fff) AM_NOP
186190ADDRESS_MAP_END
187191
188static ADDRESS_MAP_START(wicat_flop_io, AS_IO, 8, wicat_state)
189   AM_RANGE(0x0000, 0x00ff) AM_RAM  // left bank
190   AM_RANGE(0x0100, 0x01ff) AM_RAM  // right bank  -- one of these probably is RAM...
192static ADDRESS_MAP_START(wicat_wd1000_io, AS_IO, 8, wicat_state)
193   AM_RANGE(0x0000, 0x00ff) AM_RAM  // left bank  - RAM
194   AM_RANGE(0x0100, 0x01ff) AM_RAM  // right bank - I/O ports (TODO)
191195ADDRESS_MAP_END
192196
193197
194198/* Input ports */
195199static INPUT_PORTS_START( wicat )
196200   PORT_START("kb0")
201   PORT_BIT(0x00000080,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("Tab") PORT_CODE(KEYCODE_TAB) PORT_CHAR(7)
197202   PORT_BIT(0x00000100,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("Backspace") PORT_CODE(KEYCODE_BACKSPACE) PORT_CHAR(8)
198203   PORT_BIT(0x00002000,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("Retrn") PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13)
199204
r26887r26888
240245   PORT_BIT(0x01000000,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("X") PORT_CODE(KEYCODE_X) PORT_CHAR('X')
241246   PORT_BIT(0x02000000,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("Y") PORT_CODE(KEYCODE_Y) PORT_CHAR('Y')
242247   PORT_BIT(0x04000000,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("Z") PORT_CODE(KEYCODE_Z) PORT_CHAR('Z')
248   PORT_BIT(0x80000000,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("Unknown (7F)") PORT_CODE(KEYCODE_F4)
249
250   PORT_START("kb4")
251
252   PORT_START("kb5")
253   PORT_BIT(0x00000400,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("Unknown (AA)") PORT_CODE(KEYCODE_F2)
254   PORT_BIT(0x00010000,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("Unknown (B0)") PORT_CODE(KEYCODE_F3)
255
256   PORT_START("kb6")
257
258   PORT_START("kb7")
259   PORT_BIT(0x40000000,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("Set-up (FE)") PORT_CODE(KEYCODE_F1)
260
243261INPUT_PORTS_END
244262
245263void wicat_state::driver_start()
r26887r26888
312330   UINT32 data;
313331   char kbtag[8];
314332
315   for(line=0;line<4;line++)
333   for(line=0;line<8;line++)
316334   {
317335      sprintf(kbtag,"kb%i",line);
318336      data = ioport(kbtag)->read();
r26887r26888
375393
376394READ16_MEMBER( wicat_state::invalid_r )
377395{
378   m68k_set_buserror_details(m_maincpu,0x300000+offset*2-2,0,m68k_get_fc(m_maincpu));
379   m_maincpu->set_input_line(M68K_LINE_BUSERROR, ASSERT_LINE);
380   m_maincpu->set_input_line(M68K_LINE_BUSERROR, CLEAR_LINE);
396   if(!space.debugger_access())
397   {
398      m68k_set_buserror_details(m_maincpu,0x300000+offset*2-2,0,m68k_get_fc(m_maincpu));
399      m_maincpu->set_input_line(M68K_LINE_BUSERROR, ASSERT_LINE);
400      m_maincpu->set_input_line(M68K_LINE_BUSERROR, CLEAR_LINE);
401   }
381402   return 0xff;
382403}
383404
384405WRITE16_MEMBER( wicat_state::invalid_w )
385406{
386   m68k_set_buserror_details(m_maincpu,0x300000+offset*2-2,1,m68k_get_fc(m_maincpu));
387   m_maincpu->set_input_line(M68K_LINE_BUSERROR, ASSERT_LINE);
388   m_maincpu->set_input_line(M68K_LINE_BUSERROR, CLEAR_LINE);
407   if(!space.debugger_access())
408   {
409      m68k_set_buserror_details(m_maincpu,0x300000+offset*2-2,1,m68k_get_fc(m_maincpu));
410      m_maincpu->set_input_line(M68K_LINE_BUSERROR, ASSERT_LINE);
411      m_maincpu->set_input_line(M68K_LINE_BUSERROR, CLEAR_LINE);
412   }
389413}
390414
391415// TODO
r26887r26888
409433   case 0x00:  // Error register
410434      return 0x00;
411435   case 0x06:  // Status register
412      return 0x04;
436      return 0x05;
413437   }
414438   return 0x00;
415439}
r26887r26888
418442{
419443   switch(offset)
420444   {
445   case 0x01:  // Data register
446      logerror("HDC: Data %02x\n",data);
447      break;
421448   case 0x06:  // Command register
422449      logerror("HDC: Command %1x\n",(data & 0xf0) >> 4);
423450      m_maincpu->set_input_line(M68K_IRQ_5,HOLD_LINE);
r26887r26888
425452   }
426453}
427454
455READ8_MEMBER(wicat_state::fdc_r)
456{
457   UINT8 ret = 0x00;
458
459   popmessage("FDC: read offset %02x",offset);
460   switch(offset)
461   {
462   case 0x00:
463      ret = wd17xx_status_r(this,space,0);
464      break;
465   case 0x01:
466      ret = wd17xx_track_r(this,space,0);
467      break;
468   case 0x02:
469      ret = wd17xx_sector_r(this,space,0);
470      break;
471   case 0x03:
472      ret = wd17xx_data_r(this,space,0);
473      break;
474   case 0x08:
475      // Interrupt status (TODO, not part of the FD1795)
476      break;
477   }
478   return ret;
479}
480
481WRITE8_MEMBER(wicat_state::fdc_w)
482{
483   popmessage("FDC: write offset %02x data %02x",offset,data);
484   switch(offset)
485   {
486   case 0x00:
487      wd17xx_command_w(this,space,0,data);
488      break;
489   case 0x01:
490      wd17xx_track_w(this,space,0,data);
491      break;
492   case 0x02:
493      wd17xx_sector_w(this,space,0,data);
494      break;
495   case 0x03:
496      wd17xx_data_w(this,space,0,data);
497      break;
498   case 0x08:
499      // Interrupt disable / Drive select (TODO, not part of the FD1795)
500      break;
501   }
502}
503
428504READ8_MEMBER(wicat_state::video_r)
429505{
430506   switch(offset)
r26887r26888
861937
862938   MCFG_DEFAULT_LAYOUT(layout_wicat)
863939
864   /* Winchester Floppy Controller */
940   /* Winchester Disk Controller (WD1000 + FD1795) */
865941   MCFG_CPU_ADD("floppycpu",N8X300,XTAL_8MHz)
866   MCFG_CPU_PROGRAM_MAP(wicat_flop_mem)
867   MCFG_CPU_IO_MAP(wicat_flop_io)
942   MCFG_CPU_PROGRAM_MAP(wicat_wd1000_mem)
943   MCFG_CPU_IO_MAP(wicat_wd1000_io)
868944   MCFG_FD1795_ADD("fdc",default_wd17xx_interface_2_drives)
869945
870946
r26887r26888
9381014   ROM_LOAD       ("ascii.chr",  0x00000, 0x0800, CRC(43e26e37) SHA1(f3d5d16040c66f0e827f72a35d4694ca62950949) )
9391015   ROM_LOAD       ("apl.chr",    0x00800, 0x0800, CRC(8c6d698e) SHA1(147dd9296fe2efc6140fa148a6edf673c33f9371) )
9401016
941   // Winchester Floppy Controller  (Signetics N8X300I + FD1795)
1017   // Winchester Disk Controller  (WD1000 (comprised of an 8X300 + some WD1100-xx bits), FD1795 (FDC))
9421018   ROM_REGION16_BE(0x1800, "wd3", 0)
943   ROM_LOAD16_BYTE("wd3.u96",    0x00000, 0x0800, CRC(52736e61) SHA1(71c7c9170c733c483393969cb1cb3798b3eb980c) )
944   ROM_LOAD16_BYTE("wd3.u97",    0x00001, 0x0800, CRC(a66619ec) SHA1(5d091ac7c88f2f45b4a05e78bfc7a16c206b31ff) )
945   ROM_LOAD       ("wd3.u95",    0x01000, 0x0800, CRC(80bb0617) SHA1(ac0f3194fcbef77532571baa3fec78b3010528bf) )
1019   ROM_LOAD16_BYTE("wd3.u96",    0x00000, 0x0800, CRC(52736e61) SHA1(71c7c9170c733c483393969cb1cb3798b3eb980c) )  // 8X300 code even
1020   ROM_LOAD16_BYTE("wd3.u97",    0x00001, 0x0800, CRC(a66619ec) SHA1(5d091ac7c88f2f45b4a05e78bfc7a16c206b31ff) )  // 8X300 code odd
1021   ROM_LOAD       ("wd3.u95",    0x01000, 0x0800, CRC(80bb0617) SHA1(ac0f3194fcbef77532571baa3fec78b3010528bf) )  // "Fast IO select" bytes
9461022ROM_END
9471023
9481024

Previous 199869 Revisions Next


© 1997-2024 The MAME Team