~ubuntu-branches/ubuntu/precise/mame/precise-proposed

« back to all changes in this revision

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

  • Committer: Package Import Robot
  • Author(s): Cesare Falco
  • Date: 2011-11-30 18:50:10 UTC
  • mfrom: (1.1.4)
  • Revision ID: package-import@ubuntu.com-20111130185010-02hcxybht1mn082w
Tags: 0.144-0ubuntu1
* New upstream release (LP: #913550)
* mame.install:
  - Added artwork/ images to be used with -effect switch
  - Be more selective with hash/ contents
* contrib/mame.ini: added /usr/share/games/mame/artwork/ to artpath

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
#define __Z8536__
37
37
 
38
38
#include "emu.h"
 
39
#include "cpu/z80/z80daisy.h"
39
40
 
40
41
 
41
42
 
83
84
// ======================> z8536_device
84
85
 
85
86
class z8536_device :  public device_t,
 
87
                                          public device_z80daisy_interface,
86
88
                      public z8536_interface
87
89
{
88
90
public:
92
94
    DECLARE_READ8_MEMBER( read );
93
95
    DECLARE_WRITE8_MEMBER( write );
94
96
 
95
 
        DECLARE_WRITE_LINE_MEMBER( intack_w );
 
97
        int intack_r();
 
98
 
 
99
        DECLARE_WRITE_LINE_MEMBER( pa0_w );
 
100
        DECLARE_WRITE_LINE_MEMBER( pa1_w );
 
101
        DECLARE_WRITE_LINE_MEMBER( pa2_w );
 
102
        DECLARE_WRITE_LINE_MEMBER( pa3_w );
 
103
        DECLARE_WRITE_LINE_MEMBER( pa4_w );
 
104
        DECLARE_WRITE_LINE_MEMBER( pa5_w );
 
105
        DECLARE_WRITE_LINE_MEMBER( pa6_w );
 
106
        DECLARE_WRITE_LINE_MEMBER( pa7_w );
96
107
 
97
108
        DECLARE_WRITE_LINE_MEMBER( pb0_w );
98
109
        DECLARE_WRITE_LINE_MEMBER( pb1_w );
102
113
        DECLARE_WRITE_LINE_MEMBER( pb5_w );
103
114
        DECLARE_WRITE_LINE_MEMBER( pb6_w );
104
115
        DECLARE_WRITE_LINE_MEMBER( pb7_w );
 
116
 
105
117
        DECLARE_WRITE_LINE_MEMBER( pc0_w );
106
118
        DECLARE_WRITE_LINE_MEMBER( pc1_w );
107
119
        DECLARE_WRITE_LINE_MEMBER( pc2_w );
114
126
    virtual void device_reset();
115
127
        virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
116
128
 
 
129
        // device_z80daisy_interface overrides
 
130
        virtual int z80daisy_irq_state();
 
131
        virtual int z80daisy_irq_ack();
 
132
        virtual void z80daisy_irq_reti();
 
133
 
117
134
private:
118
135
        static const device_timer_id TIMER_1 = 0;
119
136
        static const device_timer_id TIMER_2 = 1;
120
137
        static const device_timer_id TIMER_3 = 2;
121
138
 
 
139
        static const int PORT_A = 0;
 
140
        static const int PORT_B = 1;
 
141
        static const int PORT_C = 2;
 
142
 
 
143
        inline void get_interrupt_vector();
 
144
        inline void check_interrupt();
 
145
 
122
146
        inline UINT8 read_register(offs_t offset);
123
147
        inline UINT8 read_register(offs_t offset, UINT8 mask);
124
148
        inline void write_register(offs_t offset, UINT8 data);
125
149
        inline void write_register(offs_t offset, UINT8 data, UINT8 mask);
126
150
 
 
151
        inline bool counter_enabled(device_timer_id id);
 
152
        inline bool counter_external_output(device_timer_id id);
 
153
        inline bool counter_external_count(device_timer_id id);
 
154
        inline bool counter_external_trigger(device_timer_id id);
 
155
        inline bool counter_external_gate(device_timer_id id);
 
156
        inline bool counter_gated(device_timer_id id);
127
157
        inline void count(device_timer_id id);
128
158
        inline void trigger(device_timer_id id);
129
 
        inline void gate(device_timer_id id);
 
159
        inline void gate(device_timer_id id, int state);
 
160
        inline void match_pattern(int port);
 
161
        inline void external_port_w(int port, int bit, int state);
130
162
 
131
163
        devcb_resolved_write_line               m_out_int_func;
132
164
 
139
171
        devcb_resolved_read8                    m_in_pc_func;
140
172
        devcb_resolved_write8                   m_out_pc_func;
141
173
 
 
174
        // interrupt state
 
175
        int m_int;
 
176
 
 
177
        // register state
142
178
        int m_state;
143
179
        UINT8 m_register[48];
144
180
        UINT8 m_pointer;
 
181
 
 
182
        // input/output port state
145
183
        UINT8 m_input[3];
146
184
        UINT8 m_output[3];
147
185
        UINT8 m_buffer[3];
 
186
        UINT8 m_match[3];
148
187
 
149
188
        // timers
150
 
        emu_timer *m_timer[3];
 
189
        emu_timer *m_timer;
 
190
        UINT16 m_counter[3];
151
191
};
152
192
 
153
193