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

« back to all changes in this revision

Viewing changes to src/mame/video/bankp.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:
35
35
 
36
36
PALETTE_INIT( bankp )
37
37
{
 
38
        const UINT8 *color_prom = machine.root_device().memregion("proms")->base();
38
39
        int i;
39
40
 
40
41
        /* allocate the colortable */
80
81
        /* the bottom half of the PROM seems to be not used */
81
82
}
82
83
 
83
 
WRITE8_HANDLER( bankp_scroll_w )
84
 
{
85
 
        bankp_state *state = space->machine().driver_data<bankp_state>();
86
 
 
87
 
        state->m_scroll_x = data;
88
 
}
89
 
 
90
 
WRITE8_HANDLER( bankp_videoram_w )
91
 
{
92
 
        bankp_state *state = space->machine().driver_data<bankp_state>();
93
 
 
94
 
        state->m_videoram[offset] = data;
95
 
        state->m_fg_tilemap->mark_tile_dirty(offset);
96
 
}
97
 
 
98
 
WRITE8_HANDLER( bankp_colorram_w )
99
 
{
100
 
        bankp_state *state = space->machine().driver_data<bankp_state>();
101
 
 
102
 
        state->m_colorram[offset] = data;
103
 
        state->m_fg_tilemap->mark_tile_dirty(offset);
104
 
}
105
 
 
106
 
WRITE8_HANDLER( bankp_videoram2_w )
107
 
{
108
 
        bankp_state *state = space->machine().driver_data<bankp_state>();
109
 
 
110
 
        state->m_videoram2[offset] = data;
111
 
        state->m_bg_tilemap->mark_tile_dirty(offset);
112
 
}
113
 
 
114
 
WRITE8_HANDLER( bankp_colorram2_w )
115
 
{
116
 
        bankp_state *state = space->machine().driver_data<bankp_state>();
117
 
 
118
 
        state->m_colorram2[offset] = data;
119
 
        state->m_bg_tilemap->mark_tile_dirty(offset);
120
 
}
121
 
 
122
 
WRITE8_HANDLER( bankp_out_w )
123
 
{
124
 
        bankp_state *state = space->machine().driver_data<bankp_state>();
 
84
WRITE8_MEMBER(bankp_state::bankp_scroll_w)
 
85
{
 
86
 
 
87
        m_scroll_x = data;
 
88
}
 
89
 
 
90
WRITE8_MEMBER(bankp_state::bankp_videoram_w)
 
91
{
 
92
 
 
93
        m_videoram[offset] = data;
 
94
        m_fg_tilemap->mark_tile_dirty(offset);
 
95
}
 
96
 
 
97
WRITE8_MEMBER(bankp_state::bankp_colorram_w)
 
98
{
 
99
 
 
100
        m_colorram[offset] = data;
 
101
        m_fg_tilemap->mark_tile_dirty(offset);
 
102
}
 
103
 
 
104
WRITE8_MEMBER(bankp_state::bankp_videoram2_w)
 
105
{
 
106
 
 
107
        m_videoram2[offset] = data;
 
108
        m_bg_tilemap->mark_tile_dirty(offset);
 
109
}
 
110
 
 
111
WRITE8_MEMBER(bankp_state::bankp_colorram2_w)
 
112
{
 
113
 
 
114
        m_colorram2[offset] = data;
 
115
        m_bg_tilemap->mark_tile_dirty(offset);
 
116
}
 
117
 
 
118
WRITE8_MEMBER(bankp_state::bankp_out_w)
 
119
{
125
120
        /* bits 0-1 are playfield priority */
126
121
        /* TODO: understand how this works */
127
 
        state->m_priority = data & 0x03;
 
122
        m_priority = data & 0x03;
128
123
 
129
124
        /* bits 2-3 unknown (2 is used) */
130
125
 
131
126
        /* bit 4 controls NMI */
132
 
        state->m_nmi_mask = (data & 0x10) >> 4;
 
127
        m_nmi_mask = (data & 0x10) >> 4;
133
128
 
134
129
        /* bit 5 controls screen flip */
135
 
        flip_screen_set(space->machine(), data & 0x20);
 
130
        flip_screen_set(data & 0x20);
136
131
 
137
132
        /* bits 6-7 unknown */
138
133
}
177
172
{
178
173
        bankp_state *state = screen.machine().driver_data<bankp_state>();
179
174
 
180
 
        if (flip_screen_get(screen.machine()))
 
175
        if (state->flip_screen())
181
176
        {
182
177
                state->m_fg_tilemap->set_scrollx(0, -state->m_scroll_x);
183
178
                state->m_bg_tilemap->set_scrollx(0, 0);