OpenCores
URL https://opencores.org/ocsvn/sqmusic/sqmusic/trunk

Subversion Repositories sqmusic

[/] [sqmusic/] [trunk/] [mame/] [2203intf.h] - Blame information for rev 10

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 8 gryzor
#pragma once
2
 
3
#ifndef __2203INTF_H__
4
#define __2203INTF_H__
5
 
6
#include "devlegcy.h"
7
 
8
#include "ay8910.h"
9
 
10
void ym2203_update_request(void *param);
11
 
12
struct ym2203_interface
13
{
14
        const ay8910_interface ay8910_intf;
15
        devcb_write_line irqhandler;
16
};
17
 
18
DECLARE_READ8_DEVICE_HANDLER( ym2203_r );
19
DECLARE_WRITE8_DEVICE_HANDLER( ym2203_w );
20
 
21
DECLARE_READ8_DEVICE_HANDLER( ym2203_status_port_r );
22
DECLARE_READ8_DEVICE_HANDLER( ym2203_read_port_r );
23
DECLARE_WRITE8_DEVICE_HANDLER( ym2203_control_port_w );
24
DECLARE_WRITE8_DEVICE_HANDLER( ym2203_write_port_w );
25
 
26
class ym2203_device : public device_t,
27
                                                                        public device_sound_interface
28
{
29
public:
30
        ym2203_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
31
        ~ym2203_device() { global_free(m_token); }
32
 
33
        // access to legacy token
34
        void *token() const { assert(m_token != NULL); return m_token; }
35
protected:
36
        // device-level overrides
37
        virtual void device_config_complete();
38
        virtual void device_start();
39
        virtual void device_stop();
40
        virtual void device_reset();
41
 
42
        // sound stream update overrides
43
        virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples);
44
private:
45
        // internal state
46
        void *m_token;
47
};
48
 
49
extern const device_type YM2203;
50
 
51
 
52
#endif /* __2203INTF_H__ */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.