trunk/src/mess/machine/3c505.h
| r21732 | r21733 | |
| 64 | 64 | |
| 65 | 65 | // ======================> PCB data structure |
| 66 | 66 | |
| 67 | #pragma pack(1) |
| 68 | |
| 67 | 69 | struct Memconf |
| 68 | 70 | { |
| 69 | 71 | UINT16 cmd_q, rcv_q, mcast, frame, rcv_b, progs; |
| r21732 | r21733 | |
| 138 | 140 | struct Xmit_pkt xmit_pkt; |
| 139 | 141 | UINT8 multicast[10][6]; |
| 140 | 142 | UINT8 eth_addr[6]; |
| 141 | | UINT8 failed; |
| 143 | INT16 failed; |
| 142 | 144 | struct Rcv_resp rcv_resp; |
| 143 | 145 | struct Xmit_resp xmit_resp; |
| 144 | 146 | struct Netstat netstat; |
| r21732 | r21733 | |
| 149 | 151 | } data; |
| 150 | 152 | }; |
| 151 | 153 | |
| 154 | #pragma pack() |
| 155 | |
| 152 | 156 | // ======================> threecom3c505_device |
| 153 | 157 | |
| 154 | 158 | class threecom3c505_device: public device_t, |
| r21732 | r21733 | |
| 213 | 217 | void reset(); |
| 214 | 218 | int put(const UINT8 data[], const int length); |
| 215 | 219 | 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; } |
| 216 | 222 | private: |
| 217 | 223 | threecom3c505_device *m_device; // pointer back to our device |
| 218 | 224 | UINT16 m_size; |
| r21732 | r21733 | |
| 224 | 230 | |
| 225 | 231 | void set_filter_list(); |
| 226 | 232 | void set_interrupt(enum line_state state); |
| 227 | | static TIMER_CALLBACK( static_set_interrupt ); |
| 228 | 233 | |
| 234 | static TIMER_CALLBACK( static_do_command ); |
| 235 | |
| 229 | 236 | void log_command(); |
| 230 | 237 | void log_response(); |
| 231 | 238 | void log_tx_data(); |
| r21732 | r21733 | |
| 255 | 262 | UINT8 m_command_buffer[CMD_BUFFER_SIZE]; |
| 256 | 263 | int m_command_index; |
| 257 | 264 | int m_command_pending; |
| 258 | | int m_mc_f9_pending; |
| 259 | 265 | int m_wait_for_ack; |
| 266 | int m_wait_for_nak; |
| 260 | 267 | |
| 261 | 268 | data_buffer_fifo m_rx_fifo; |
| 262 | 269 | |
| r21732 | r21733 | |
| 274 | 281 | int m_response_length; |
| 275 | 282 | int m_response_index; |
| 276 | 283 | |
| 284 | pcb_struct m_rcv_response; |
| 285 | |
| 277 | 286 | UINT16 m_microcode_version; |
| 278 | 287 | UINT16 m_microcode_running; |
| 279 | 288 | |
| r21732 | r21733 | |
| 287 | 296 | |
| 288 | 297 | enum line_state irq_state; |
| 289 | 298 | |
| 290 | | emu_timer * m_timer; // timer to delay interrupts |
| 299 | emu_timer * m_do_command_timer; // timer to delay command execution |
| 291 | 300 | }; |
| 292 | 301 | |
| 293 | 302 | // device type definition |