Previous 199869 Revisions Next

r26890 Thursday 2nd January, 2014 at 09:54:49 UTC by Barry Rodewald
wicat: switched to modern wd_fdc.
[src/mess/drivers]wicat.c

trunk/src/mess/drivers/wicat.c
r26889r26890
2020#include "video/i8275x.h"
2121#include "machine/am9517a.h"
2222#include "machine/x2212.h"
23#include "machine/wd17xx.h"
23#include "machine/wd_fdc.h"
2424#include "wicat.lh"
2525
2626class wicat_state : public driver_device
r26889r26890
104104   required_device<im6402_device> m_videouart;
105105   required_device<x2210_device> m_videosram;
106106   required_memory_region m_chargen;
107   required_device<fd1795_device> m_fdc;
107   required_device<fd1795_t> m_fdc;
108108
109109   UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) { return 0; }
110110   virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
r26889r26890
460460   switch(offset)
461461   {
462462   case 0x00:
463      ret = wd17xx_status_r(this,space,0);
463      ret = m_fdc->status_r(space,0);
464464      break;
465465   case 0x01:
466      ret = wd17xx_track_r(this,space,0);
466      ret = m_fdc->track_r(space,0);
467467      break;
468468   case 0x02:
469      ret = wd17xx_sector_r(this,space,0);
469      ret = m_fdc->sector_r(space,0);
470470      break;
471471   case 0x03:
472      ret = wd17xx_data_r(this,space,0);
472      ret = m_fdc->data_r(space,0);
473473      break;
474474   case 0x08:
475475      // Interrupt status (TODO, not part of the FD1795)
r26889r26890
484484   switch(offset)
485485   {
486486   case 0x00:
487      wd17xx_command_w(this,space,0,data);
487      m_fdc->cmd_w(space,0,data);
488488      break;
489489   case 0x01:
490      wd17xx_track_w(this,space,0,data);
490      m_fdc->track_w(space,0,data);
491491      break;
492492   case 0x02:
493      wd17xx_sector_w(this,space,0,data);
493      m_fdc->sector_w(space,0,data);
494494      break;
495495   case 0x03:
496      wd17xx_data_w(this,space,0,data);
496      m_fdc->data_w(space,0,data);
497497      break;
498498   case 0x08:
499499      // Interrupt disable / Drive select (TODO, not part of the FD1795)
r26889r26890
941941   MCFG_CPU_ADD("floppycpu",N8X300,XTAL_8MHz)
942942   MCFG_CPU_PROGRAM_MAP(wicat_wd1000_mem)
943943   MCFG_CPU_IO_MAP(wicat_wd1000_io)
944   MCFG_FD1795_ADD("fdc",default_wd17xx_interface_2_drives)
944   MCFG_FD1795x_ADD("fdc",XTAL_8MHz)
945945
946946
947947MACHINE_CONFIG_END

Previous 199869 Revisions Next


© 1997-2024 The MAME Team