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

« back to all changes in this revision

Viewing changes to src/mame/drivers/bingoc.c

  • 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:
33
33
#include "sound/2151intf.h"
34
34
#include "sound/upd7759.h"
35
35
 
 
36
 
 
37
class bingoc_state : public driver_device
 
38
{
 
39
public:
 
40
        bingoc_state(running_machine &machine, const driver_device_config_base &config)
 
41
                : driver_device(machine, config) { }
 
42
 
 
43
        UINT8 m_x;
 
44
};
 
45
 
 
46
 
36
47
#define SOUND_TEST 0
37
48
 
38
49
static VIDEO_START(bingoc)
40
51
 
41
52
}
42
53
 
43
 
static VIDEO_UPDATE(bingoc)
 
54
static SCREEN_UPDATE(bingoc)
44
55
{
45
56
        return 0;
46
57
}
59
70
*/
60
71
static READ8_HANDLER( sound_test_r )
61
72
{
62
 
        static UINT8 x;
63
 
 
64
 
        if(input_code_pressed_once(space->machine, KEYCODE_Z))
65
 
                x++;
66
 
 
67
 
        if(input_code_pressed_once(space->machine, KEYCODE_X))
68
 
                x--;
69
 
 
70
 
        if(input_code_pressed_once(space->machine, KEYCODE_A))
 
73
        bingoc_state *state = space->machine().driver_data<bingoc_state>();
 
74
 
 
75
        if(input_code_pressed_once(space->machine(), KEYCODE_Z))
 
76
                state->m_x++;
 
77
 
 
78
        if(input_code_pressed_once(space->machine(), KEYCODE_X))
 
79
                state->m_x--;
 
80
 
 
81
        if(input_code_pressed_once(space->machine(), KEYCODE_A))
71
82
                return 0xff;
72
83
 
73
 
        popmessage("%02x",x);
74
 
        return x;
 
84
        popmessage("%02x",state->m_x);
 
85
        return state->m_x;
75
86
}
76
87
#else
77
88
static WRITE16_HANDLER( main_sound_latch_w )
78
89
{
79
90
        soundlatch_w(space,0,data&0xff);
80
 
        cputag_set_input_line(space->machine, "soundcpu", INPUT_LINE_NMI, PULSE_LINE);
 
91
        cputag_set_input_line(space->machine(), "soundcpu", INPUT_LINE_NMI, PULSE_LINE);
81
92
}
82
93
#endif
83
94
 
87
98
    ---- --x- sound rom banking
88
99
    ---- ---x start-stop sample
89
100
    */
90
 
        UINT8 *upd = device->machine->region("upd")->base();
 
101
        UINT8 *upd = device->machine().region("upd")->base();
91
102
        memcpy(&upd[0x00000], &upd[0x20000 + (((data & 2)>>1) * 0x20000)], 0x20000);
92
103
        upd7759_start_w(device, data & 1);
93
104
//  printf("%02x\n",data);
94
105
}
95
106
 
96
 
static ADDRESS_MAP_START( main_map, ADDRESS_SPACE_PROGRAM, 16 )
 
107
static ADDRESS_MAP_START( main_map, AS_PROGRAM, 16 )
97
108
        AM_RANGE(0x000000, 0x03ffff) AM_ROM
98
109
        AM_RANGE(0x100000, 0x10007f) AM_READ(bingoc_rand_r) //comms? lamps?
99
110
        AM_RANGE(0x180000, 0x18007f) AM_READ(bingoc_rand_r) //comms? lamps?
103
114
        AM_RANGE(0xff8000, 0xffffff) AM_RAM
104
115
ADDRESS_MAP_END
105
116
 
106
 
static ADDRESS_MAP_START( sound_map, ADDRESS_SPACE_PROGRAM, 8 )
 
117
static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8 )
107
118
        AM_RANGE(0x0000, 0x4fff) AM_ROM
108
119
        AM_RANGE(0xf800, 0xffff) AM_RAM
109
120
ADDRESS_MAP_END
110
121
 
111
 
static ADDRESS_MAP_START( sound_io, ADDRESS_SPACE_IO, 8 )
 
122
static ADDRESS_MAP_START( sound_io, AS_IO, 8 )
112
123
        ADDRESS_MAP_GLOBAL_MASK(0xff)
113
124
        AM_RANGE(0x00, 0x01) AM_DEVREADWRITE("ymsnd", ym2151_r, ym2151_w)
114
125
        AM_RANGE(0x40, 0x40) AM_DEVWRITE("upd", bingoc_play_w)
125
136
INPUT_PORTS_END
126
137
 
127
138
 
128
 
static MACHINE_CONFIG_START( bingoc, driver_device )
 
139
static MACHINE_CONFIG_START( bingoc, bingoc_state )
129
140
 
130
141
        MCFG_CPU_ADD("maincpu", M68000,8000000)          /* ? MHz */
131
142
        MCFG_CPU_PROGRAM_MAP(main_map)
145
156
        MCFG_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
146
157
        MCFG_SCREEN_SIZE(512, 256)
147
158
        MCFG_SCREEN_VISIBLE_AREA(0, 512-1, 0, 256-1)
 
159
        MCFG_SCREEN_UPDATE(bingoc)
148
160
 
149
161
        MCFG_PALETTE_LENGTH(0x100)
150
162
 
151
163
        MCFG_VIDEO_START(bingoc)
152
 
        MCFG_VIDEO_UPDATE(bingoc)
153
164
 
154
165
        MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") //might just be mono...
155
166