Previous 199869 Revisions Next

r21733 Saturday 9th March, 2013 at 04:09:45 UTC by R. Belmont
Missed one, plus OS X (nw)
[src/mess/machine]3c505.c 3c505.h

trunk/src/mess/machine/3c505.c
r21732r21733
1616 */
1717
1818#include "machine/3c505.h"
19#include <endian.h>
2019
2120#define VERBOSE 0
2221
trunk/src/mess/machine/3c505.h
r21732r21733
6464
6565// ======================> PCB data structure
6666
67#pragma pack(1)
68
6769struct Memconf
6870{
6971   UINT16 cmd_q, rcv_q, mcast, frame, rcv_b, progs;
r21732r21733
138140      struct Xmit_pkt xmit_pkt;
139141      UINT8 multicast[10][6];
140142      UINT8 eth_addr[6];
141      UINT8 failed;
143      INT16 failed;
142144      struct Rcv_resp rcv_resp;
143145      struct Xmit_resp xmit_resp;
144146      struct Netstat netstat;
r21732r21733
149151   } data;
150152};
151153
154#pragma pack()
155
152156// ======================> threecom3c505_device
153157
154158class threecom3c505_device:  public device_t,
r21732r21733
213217      void reset();
214218      int put(const UINT8 data[], const int length);
215219      int get(data_buffer *db);
220      int is_empty () { return m_get_index == m_put_index; }
221      int is_full () { return ((m_put_index + 1) % m_size) == m_get_index; }
216222   private:
217223      threecom3c505_device *m_device; // pointer back to our device
218224      UINT16 m_size;
r21732r21733
224230
225231   void set_filter_list();
226232   void set_interrupt(enum line_state state);
227   static TIMER_CALLBACK( static_set_interrupt );
228233
234   static TIMER_CALLBACK( static_do_command );
235
229236   void log_command();
230237   void log_response();
231238   void log_tx_data();
r21732r21733
255262   UINT8 m_command_buffer[CMD_BUFFER_SIZE];
256263   int m_command_index;
257264   int m_command_pending;
258   int m_mc_f9_pending;
259265   int m_wait_for_ack;
266   int m_wait_for_nak;
260267
261268   data_buffer_fifo m_rx_fifo;
262269
r21732r21733
274281   int m_response_length;
275282   int m_response_index;
276283
284   pcb_struct m_rcv_response;
285
277286   UINT16 m_microcode_version;
278287   UINT16 m_microcode_running;
279288
r21732r21733
287296
288297   enum line_state irq_state;
289298
290   emu_timer * m_timer; // timer to delay interrupts
299   emu_timer * m_do_command_timer; // timer to delay command execution
291300};
292301
293302// device type definition

Previous 199869 Revisions Next


© 1997-2024 The MAME Team