Previous 15994 Revisions Next

r12106 Tuesday 28th June, 2011 at 22:17:51 UTC by Curt Coder
[COMX35] Slot WIP. (nw)
[src/mess/machine]comx_clm.c comx_clm.h comx_eb.c comx_fd.c comx_fd.h comxexp.c comxexp.h

src/mess/machine/comx_clm.c
r12105r12106
120120
121121WRITE_LINE_MEMBER( comx_clm_device::hsync_w )
122122{
123   m_slot->ef4_w(state);
123   if (m_ds)
124   {
125      m_slot->ef4_w(state);
126   }
124127}
125128
126129static const mc6845_interface crtc_intf =
r12105r12106
200203   device_t(mconfig, COMX_CLM, "COMX 80 Column Card", tag, owner, clock),
201204   device_comx_expansion_card_interface(mconfig, *this),
202205   device_slot_card_interface(mconfig, *this),
203   m_crtc(*this, MC6845_TAG)
206   m_crtc(*this, MC6845_TAG),
207   m_ds(0)
204208{
205209}
206210
r12105r12106
218222   m_video_ram = auto_alloc_array(machine(), UINT8, VIDEORAM_SIZE);
219223
220224   // state saving
225   save_item(NAME(m_ds));
221226   save_pointer(NAME(m_video_ram), VIDEORAM_SIZE);
222227}
223228
r12105r12106
232237
233238
234239//-------------------------------------------------
240//  comx_ds_w - device select write
241//-------------------------------------------------
242
243void comx_clm_device::comx_ds_w(int state)
244{
245   m_ds = state;
246}
247
248
249//-------------------------------------------------
235250//  comx_mrd_r - memory read
236251//-------------------------------------------------
237252
src/mess/machine/comx_clm.h
r12105r12106
4949    virtual void device_config_complete() { m_shortname = "comx_clm"; }
5050
5151   // device_comx_expansion_card_interface overrides
52   virtual void comx_ds_w(int state);
5253   virtual UINT8 comx_mrd_r(offs_t offset, int *extrom);
5354   virtual void comx_mwr_w(offs_t offset, UINT8 data);
5455   virtual bool comx_screen_update(screen_device &screen, bitmap_t &bitmap, const rectangle &cliprect);
r12105r12106
5960   
6061   required_device<mc6845_device> m_crtc;
6162
62   UINT8 *m_rom;            // program ROM
63   UINT8 *m_char_rom;         // character ROM
64   UINT8 *m_video_ram;         // video RAM
63   int m_ds;            // device select
64   UINT8 *m_rom;         // program ROM
65   UINT8 *m_char_rom;      // character ROM
66   UINT8 *m_video_ram;      // video RAM
6567};
6668
6769
src/mess/machine/comx_fd.c
r12105r12106
8484   DEVCB_NULL,
8585   DEVCB_NULL,
8686   DEVCB_NULL,
87   FLOPPY_STANDARD_5_25_DSDD,
87   FLOPPY_STANDARD_5_25_DSSD,
8888   FLOPPY_OPTIONS_NAME(comx35),
8989   "floppy_5_25",
9090   NULL
r12105r12106
9898WRITE_LINE_MEMBER( comx_fd_device::drq_w )
9999{
100100   m_drq = state;
101
101102   update_ef4();
102103}
103104
104105static const wd17xx_interface fdc_intf =
105106{
106   DEVCB_NULL,
107   DEVCB_LINE_VCC,
107108   DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, comx_fd_device, intrq_w),
108109   DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, comx_fd_device, drq_w),
109110   { FLOPPY_0, FLOPPY_1, NULL, NULL }
r12105r12106
137138//**************************************************************************
138139
139140//-------------------------------------------------
140//  comx_fd_device - constructor
141//  update_ef4 -
141142//-------------------------------------------------
142143
143144inline void comx_fd_device::update_ef4()
144145{
145   if (m_ef4_enable)
146   if (m_ds)
146147   {
147148      m_slot->ef4_w(m_drq);
148149   }
149   else
150   {
151      m_slot->ef4_w(CLEAR_LINE);
152   }
153150}
154151
155152
r12105r12106
169166   m_fdc(*this, WD1770_TAG),
170167   m_floppy0(*this, FLOPPY_0),
171168   m_floppy1(*this, FLOPPY_1),
169   m_ds(0),
172170   m_q(0),
171   m_addr(0),
173172   m_intrq(0),
174   m_drq(0),
175   m_ef4_enable(0)
173   m_drq(0)
176174{
177175}
178176
r12105r12106
188186   m_rom = subregion("c000")->base();
189187
190188   // state saving
189   save_item(NAME(m_ds));
191190   save_item(NAME(m_q));
192191   save_item(NAME(m_addr));
193192   save_item(NAME(m_intrq));
194193   save_item(NAME(m_drq));
195   save_item(NAME(m_ef4_enable));
196194}
197195
198196
r12105r12106
216214
217215
218216//-------------------------------------------------
217//  comx_ds_w - device select write
218//-------------------------------------------------
219
220void comx_fd_device::comx_ds_w(int state)
221{
222   m_ds = state;
223
224   update_ef4();
225}
226
227
228//-------------------------------------------------
219229//  comx_mrd_r - memory read
220230//-------------------------------------------------
221231
r12105r12106
296306            wd17xx_set_drive(m_fdc, 1);
297307         }
298308
299         m_ef4_enable = BIT(data, 4);
300         update_ef4();
301
302309         wd17xx_set_side(m_fdc, BIT(data, 5));
303310      }
304311      else
src/mess/machine/comx_fd.h
r12105r12106
5252    virtual void device_config_complete() { m_shortname = "comx_fd"; }
5353
5454   // device_comx_expansion_card_interface overrides
55   virtual void comx_ds_w(int state);
5556   virtual void comx_q_w(int state);
5657   virtual UINT8 comx_mrd_r(offs_t offset, int *extrom);
5758   virtual UINT8 comx_io_r(offs_t offset);
r12105r12106
6869   required_device<device_t> m_floppy1;
6970
7071   // floppy state
72   int m_ds;            // device select
7173   UINT8 *m_rom;
7274   int m_q;            // FDC register select
7375   int m_addr;            // FDC address
7476   int m_intrq;         // interrupt request
7577   int m_drq;            // data request
76   int m_ef4_enable;      // EF4 enable
7778};
7879
7980
src/mess/machine/comxexp.c
r12105r12106
179179
180180
181181//-------------------------------------------------
182//  ds_w - device select write
183//-------------------------------------------------
184
185WRITE_LINE_MEMBER( comx_expansion_slot_device::ds_w )
186{
187   if (m_card != NULL)
188   {
189      m_card->comx_ds_w(state);
190   }
191}
192
193
194//-------------------------------------------------
182195//  q_w - Q write
183196//-------------------------------------------------
184197
src/mess/machine/comxexp.h
r12105r12106
88**********************************************************************
99
1010               GND       1      A      GND
11               NC       2      B      NC (DS)
11               NC       2      B      DS
1212               +5V       3      C      V+
1313               D0       4      D      D1
1414               D2       5      E      D3
1515               D4       6      F      D5
1616               D6       7      H      D7
17               NC (DP)    8      J      Q
17               _DP       8      J      Q
1818               _CLEAR    9      K      _MRD
1919               TPA      10      L      N0
2020               N1      11      M      N2
r12105r12106
8989   device_comx_expansion_card_interface(const machine_config &mconfig, device_t &device);
9090   virtual ~device_comx_expansion_card_interface();
9191
92   // interrupts
92   // signals
93   virtual void comx_ds_w(int state) { };
9394   virtual void comx_q_w(int state) { };
9495
9596   // memory access
r12105r12106
122123   UINT8 io_r(offs_t offset);
123124   void io_w(offs_t offset, UINT8 data);
124125
126   DECLARE_WRITE_LINE_MEMBER( ds_w );
125127   DECLARE_WRITE_LINE_MEMBER( q_w );
126128
127129   DECLARE_WRITE_LINE_MEMBER( int_w );
src/mess/machine/comx_eb.c
r12105r12106
293293   if (offset == 1)
294294   {
295295      m_select = data >> 1;
296     
297      for (int slot = 0; slot < MAX_EB_SLOTS; slot++)
298      {
299         if (m_slot[slot] != NULL)
300         {
301            m_slot[slot]->ds_w(BIT(m_select, slot));
302         }
303      }
296304   }
297305   
298306   for (int slot = 0; slot < MAX_EB_SLOTS; slot++)

Previous 15994 Revisions Next


© 1998-2018 The MESS Team