~ubuntu-branches/debian/sid/mame/sid

« back to all changes in this revision

Viewing changes to src/emu/machine/e0516.h

  • Committer: Bazaar Package Importer
  • Author(s): Jordi Mallach, Emmanuel Kasper, Félix Arreola Rodríguez, Jordi Mallach
  • Date: 2011-05-11 21:06:50 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20110511210650-jizvh8a6x117y9hr
Tags: 0.142-1
[ Emmanuel Kasper ]
* New upstream release
* Set NOWERROR=1 to allow compiling with gcc-4.6
* Remove fix_powerpc_build.patch, as upstream has taken it in this release
* Add gnome-video-arcade front end as a suggested package

[ Félix Arreola Rodríguez ]
* Add kfreebsd-build.patch to quilt series, to fix build on kfreebsd

[ Jordi Mallach ]
* Remove unneeded and bogus addition of --with-quilt to the dh invocation.
* Add Cesare Falco (long time Ubuntu maintainer) to Uploaders, and wrap
  them into multiple lines.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/**********************************************************************
 
2
 
 
3
    E05-16 Real Time Clock emulation
 
4
 
 
5
    Copyright MESS Team.
 
6
    Visit http://mamedev.org for licensing and usage restrictions.
 
7
 
 
8
**********************************************************************
 
9
                            _____   _____
 
10
                  Vdd1   1 |*    \_/     | 16  Vdd2
 
11
                OSC IN   2 |             | 15  Clk
 
12
               OSC OUT   3 |             | 14  XOUT
 
13
                 _STOP   4 |   E05-16    | 13  DI/O
 
14
                _RESET   5 |   E050-16   | 12  _SEC
 
15
               _OUTSEL   6 |             | 11  _MIN
 
16
                  _DAY   7 |             | 10  _HRS
 
17
                   Vss   8 |_____________| 9   _CS
 
18
 
 
19
**********************************************************************/
 
20
 
 
21
#pragma once
 
22
 
 
23
#ifndef __E0516__
 
24
#define __E0516__
 
25
 
 
26
#include "emu.h"
 
27
 
 
28
 
 
29
 
 
30
//**************************************************************************
 
31
//  MACROS / CONSTANTS
 
32
//**************************************************************************
 
33
 
 
34
 
 
35
 
 
36
 
 
37
//**************************************************************************
 
38
//  INTERFACE CONFIGURATION MACROS
 
39
//**************************************************************************
 
40
 
 
41
#define MCFG_E0516_ADD(_tag, _clock) \
 
42
        MCFG_DEVICE_ADD(_tag, E0516, _clock)
 
43
 
 
44
 
 
45
 
 
46
//**************************************************************************
 
47
//  TYPE DEFINITIONS
 
48
//**************************************************************************
 
49
 
 
50
 
 
51
// ======================> e0516_device_config
 
52
 
 
53
class e0516_device_config :   public device_config
 
54
{
 
55
    friend class e0516_device;
 
56
 
 
57
    // construction/destruction
 
58
    e0516_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock);
 
59
 
 
60
public:
 
61
    // allocators
 
62
    static device_config *static_alloc_device_config(const machine_config &mconfig, const char *tag, const device_config *owner, UINT32 clock);
 
63
    virtual device_t *alloc_device(running_machine &machine) const;
 
64
 
 
65
protected:
 
66
};
 
67
 
 
68
 
 
69
// ======================> e0516_device
 
70
 
 
71
class e0516_device :  public device_t
 
72
{
 
73
    friend class e0516_device_config;
 
74
 
 
75
    // construction/destruction
 
76
    e0516_device(running_machine &_machine, const e0516_device_config &_config);
 
77
 
 
78
public:
 
79
        DECLARE_WRITE_LINE_MEMBER( cs_w );
 
80
        DECLARE_WRITE_LINE_MEMBER( clk_w );
 
81
        DECLARE_WRITE_LINE_MEMBER( dio_w );
 
82
        DECLARE_READ_LINE_MEMBER( dio_r );
 
83
 
 
84
protected:
 
85
    // device-level overrides
 
86
    virtual void device_start();
 
87
    virtual void device_reset();
 
88
        virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
 
89
 
 
90
private:
 
91
        int m_cs;                                               // chip select
 
92
        int m_clk;                                              // clock
 
93
        int m_data_latch;                               // data latch
 
94
        int m_reg_latch;                                // register latch
 
95
        int m_read_write;                               // read/write data
 
96
        int m_state;                                    // state
 
97
        int m_bits;                                             // number of bits transferred
 
98
        int m_dio;                                              // data pin
 
99
 
 
100
        UINT8 m_register[8];                    // registers
 
101
 
 
102
        // timers
 
103
        emu_timer *m_timer;
 
104
 
 
105
        const e0516_device_config &m_config;
 
106
};
 
107
 
 
108
 
 
109
// device type definition
 
110
extern const device_type E0516;
 
111
 
 
112
 
 
113
 
 
114
#endif