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

« back to all changes in this revision

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

  • Committer: Package Import Robot
  • Author(s): Jordi Mallach, Emmanuel Kasper, Jordi Mallach
  • Date: 2012-06-05 20:02:23 UTC
  • mfrom: (0.3.1) (0.1.4)
  • Revision ID: package-import@ubuntu.com-20120605200223-gnlpogjrg6oqe9md
Tags: 0.146-1
[ Emmanuel Kasper ]
* New upstream release
* Drop patch to fix man pages section and patches to link with flac 
  and jpeg system lib: all this has been pushed upstream by Cesare Falco
* Add DM-Upload-Allowed: yes field.

[ Jordi Mallach ]
* Create a "gnu" TARGETOS stanza that defines NO_AFFINITY_NP.
* Stop setting TARGETOS to "unix" in d/rules. It should be autodetected,
  and set to the appropriate value.
* mame_manpage_section.patch: Change mame's manpage section to 6 (games),
  in the TH declaration.

Show diffs side-by-side

added added

removed removed

Lines of Context:
120
120
 
121
121
        UINT8 *m_videoram;
122
122
        UINT8 m_blit_ram[8];
 
123
        DECLARE_READ8_MEMBER(blitter_r);
 
124
        DECLARE_WRITE8_MEMBER(blitter_w);
123
125
};
124
126
 
125
127
 
153
155
        return 0;
154
156
}
155
157
 
156
 
static READ8_HANDLER( blitter_r )
 
158
READ8_MEMBER(vpoker_state::blitter_r)
157
159
{
158
160
        if(offset == 6)
159
 
                return input_port_read(space->machine(), "IN0");
 
161
                return ioport("IN0")->read();
160
162
 
161
163
        return 0;
162
164
}
163
165
 
164
 
static WRITE8_HANDLER( blitter_w )
 
166
WRITE8_MEMBER(vpoker_state::blitter_w)
165
167
{
166
 
        vpoker_state *state = space->machine().driver_data<vpoker_state>();
167
 
        UINT8 *videoram = state->m_videoram;
 
168
        UINT8 *videoram = m_videoram;
168
169
 
169
 
        state->m_blit_ram[offset] = data;
 
170
        m_blit_ram[offset] = data;
170
171
 
171
172
        if(offset == 2)
172
173
        {
173
174
                int blit_offs;
174
175
 
175
 
                blit_offs = (state->m_blit_ram[1] & 0x01)<<8|(state->m_blit_ram[2] & 0xff);
 
176
                blit_offs = (m_blit_ram[1] & 0x01)<<8|(m_blit_ram[2] & 0xff);
176
177
 
177
 
                videoram[blit_offs] = state->m_blit_ram[0];
178
 
//      printf("%02x %02x %02x %02x %02x %02x %02x %02x\n",state->m_blit_ram[0],state->m_blit_ram[1],state->m_blit_ram[2],state->m_blit_ram[3],state->m_blit_ram[4],state->m_blit_ram[5],state->m_blit_ram[6],state->m_blit_ram[7]);
 
178
                videoram[blit_offs] = m_blit_ram[0];
 
179
//      printf("%02x %02x %02x %02x %02x %02x %02x %02x\n",m_blit_ram[0],m_blit_ram[1],m_blit_ram[2],m_blit_ram[3],m_blit_ram[4],m_blit_ram[5],m_blit_ram[6],m_blit_ram[7]);
179
180
        }
180
181
}
181
182
 
182
 
static ADDRESS_MAP_START( main_map, AS_PROGRAM, 8 )
 
183
static ADDRESS_MAP_START( main_map, AS_PROGRAM, 8, vpoker_state )
183
184
        ADDRESS_MAP_GLOBAL_MASK(0x3fff)
184
185
        AM_RANGE(0x0000, 0x01ff) AM_RAM         /* vpoker has 0x100, 5acespkr has 0x200 */
185
 
        AM_RANGE(0x0400, 0x0407) AM_DEVREADWRITE_MODERN("6840ptm", ptm6840_device, read, write)
 
186
        AM_RANGE(0x0400, 0x0407) AM_DEVREADWRITE("6840ptm", ptm6840_device, read, write)
186
187
        AM_RANGE(0x0800, 0x0807) AM_READ(blitter_r) AM_WRITE(blitter_w)
187
188
        AM_RANGE(0x2000, 0x3fff) AM_ROM
188
189
ADDRESS_MAP_END