~ubuntu-branches/ubuntu/raring/mame/raring-proposed

« back to all changes in this revision

Viewing changes to mess/src/emu/machine/i8212.h

  • Committer: Package Import Robot
  • Author(s): Jordi Mallach, Jordi Mallach, Emmanuel Kasper
  • Date: 2011-12-19 22:56:27 UTC
  • mfrom: (0.1.2)
  • Revision ID: package-import@ubuntu.com-20111219225627-ub5oga1oys4ogqzm
Tags: 0.144-1
[ Jordi Mallach ]
* Fix syntax errors in DEP5 copyright file (lintian).
* Use a versioned copyright Format specification field.
* Update Vcs-* URLs.
* Move transitional packages to the new metapackages section, and make
  them priority extra.
* Remove references to GNU/Linux and MESS sources from copyright.
* Add build variables for s390x.
* Use .xz tarballs as it cuts 4MB for the upstream sources.
* Add nplayers.ini as a patch. Update copyright file to add CC-BY-SA-3.0.

[ Emmanuel Kasper ]
* New upstream release. Closes: #651538.
* Add Free Desktop compliant png icons of various sizes taken from
  the hydroxygen iconset
* Mess is now built from a new source package, to avoid possible source
  incompatibilities between mame and the mess overlay.
* Mame-tools are not built from the mame source package anymore, but
  from the mess source package

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/**********************************************************************
2
 
 
3
 
    Intel 8212 8-Bit Input/Output Port emulation
4
 
 
5
 
    Copyright MESS Team.
6
 
    Visit http://mamedev.org for licensing and usage restrictions.
7
 
 
8
 
**********************************************************************
9
 
                            _____   _____
10
 
                  _DS1   1 |*    \_/     | 24  Vcc
11
 
                    MD   2 |             | 23  _INT
12
 
                   DI1   3 |             | 22  DI8
13
 
                   DO1   4 |             | 21  DO8
14
 
                   DI2   5 |             | 20  DI7
15
 
                   DO2   6 |    8212     | 19  DO7
16
 
                   DI3   7 |             | 18  DI6
17
 
                   DO3   8 |             | 17  DO6
18
 
                   DI4   9 |             | 16  DI5
19
 
                   DO4  10 |             | 15  DO5
20
 
                   STB  11 |             | 14  _CLR
21
 
                   GND  12 |_____________| 13  DS2
22
 
 
23
 
**********************************************************************/
24
 
 
25
 
#pragma once
26
 
 
27
 
#ifndef __I8212__
28
 
#define __I8212__
29
 
 
30
 
#include "emu.h"
31
 
 
32
 
 
33
 
 
34
 
///*************************************************************************
35
 
//  MACROS / CONSTANTS
36
 
///*************************************************************************
37
 
 
38
 
enum
39
 
{
40
 
        I8212_MODE_INPUT = 0,
41
 
        I8212_MODE_OUTPUT
42
 
};
43
 
 
44
 
 
45
 
 
46
 
///*************************************************************************
47
 
//  INTERFACE CONFIGURATION MACROS
48
 
///*************************************************************************
49
 
 
50
 
#define MCFG_I8212_ADD(_tag, _config) \
51
 
        MCFG_DEVICE_ADD((_tag), I8212, 0)       \
52
 
        MCFG_DEVICE_CONFIG(_config)
53
 
 
54
 
#define I8212_INTERFACE(name) \
55
 
        const i8212_interface (name) =
56
 
 
57
 
 
58
 
 
59
 
///*************************************************************************
60
 
//  TYPE DEFINITIONS
61
 
///*************************************************************************
62
 
 
63
 
// ======================> i8212_interface
64
 
 
65
 
struct i8212_interface
66
 
{
67
 
        devcb_write_line        m_out_int_cb;
68
 
 
69
 
        devcb_read8                     m_in_di_cb;
70
 
        devcb_write8            m_out_do_cb;
71
 
};
72
 
 
73
 
 
74
 
 
75
 
// ======================> i8212_device
76
 
 
77
 
class i8212_device :    public device_t, public i8212_interface
78
 
{
79
 
public:
80
 
    // construction/destruction
81
 
    i8212_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
82
 
 
83
 
    DECLARE_READ8_MEMBER( data_r );
84
 
    DECLARE_WRITE8_MEMBER( data_w );
85
 
 
86
 
        DECLARE_WRITE_LINE_MEMBER( md_w );
87
 
        DECLARE_WRITE_LINE_MEMBER( stb_w );
88
 
 
89
 
protected:
90
 
    // device-level overrides
91
 
        virtual void device_config_complete();
92
 
    virtual void device_start();
93
 
    virtual void device_reset();
94
 
 
95
 
private:
96
 
        devcb_resolved_write_line       m_out_int_func;
97
 
        devcb_resolved_read8            m_in_di_func;
98
 
        devcb_resolved_write8           m_out_do_func;
99
 
 
100
 
        int m_md;                                       // mode
101
 
        int m_stb;                                      // strobe
102
 
        UINT8 m_data;                           // data latch
103
 
};
104
 
 
105
 
 
106
 
// device type definition
107
 
extern const device_type I8212;
108
 
 
109
 
 
110
 
 
111
 
#endif