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

« back to all changes in this revision

Viewing changes to src/mame/video/othldrby.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:
79
79
 
80
80
***************************************************************************/
81
81
 
82
 
WRITE16_HANDLER( othldrby_videoram_addr_w )
 
82
WRITE16_MEMBER(othldrby_state::othldrby_videoram_addr_w)
83
83
{
84
 
        othldrby_state *state = space->machine().driver_data<othldrby_state>();
85
 
        state->m_vram_addr = data;
 
84
        m_vram_addr = data;
86
85
}
87
86
 
88
 
READ16_HANDLER( othldrby_videoram_r )
 
87
READ16_MEMBER(othldrby_state::othldrby_videoram_r)
89
88
{
90
 
        othldrby_state *state = space->machine().driver_data<othldrby_state>();
91
89
 
92
 
        if (state->m_vram_addr < VIDEORAM_SIZE)
93
 
                return state->m_vram[state->m_vram_addr++];
 
90
        if (m_vram_addr < VIDEORAM_SIZE)
 
91
                return m_vram[m_vram_addr++];
94
92
        else
95
93
        {
96
 
                popmessage("GFXRAM OUT OF BOUNDS %04x", state->m_vram_addr);
 
94
                popmessage("GFXRAM OUT OF BOUNDS %04x", m_vram_addr);
97
95
                return 0;
98
96
        }
99
97
}
100
98
 
101
 
WRITE16_HANDLER( othldrby_videoram_w )
 
99
WRITE16_MEMBER(othldrby_state::othldrby_videoram_w)
102
100
{
103
 
        othldrby_state *state = space->machine().driver_data<othldrby_state>();
104
101
 
105
 
        if (state->m_vram_addr < VIDEORAM_SIZE)
 
102
        if (m_vram_addr < VIDEORAM_SIZE)
106
103
        {
107
 
                if (state->m_vram_addr < SPRITERAM_START)
108
 
                        state->m_bg_tilemap[state->m_vram_addr / 0x800]->mark_tile_dirty((state->m_vram_addr & 0x7ff) / 2);
109
 
                state->m_vram[state->m_vram_addr++] = data;
 
104
                if (m_vram_addr < SPRITERAM_START)
 
105
                        m_bg_tilemap[m_vram_addr / 0x800]->mark_tile_dirty((m_vram_addr & 0x7ff) / 2);
 
106
                m_vram[m_vram_addr++] = data;
110
107
        }
111
108
        else
112
 
                popmessage("GFXRAM OUT OF BOUNDS %04x", state->m_vram_addr);
113
 
}
114
 
 
115
 
WRITE16_HANDLER( othldrby_vreg_addr_w )
116
 
{
117
 
        othldrby_state *state = space->machine().driver_data<othldrby_state>();
118
 
        state->m_vreg_addr = data & 0x7f;       /* bit 7 is set when screen is flipped */
119
 
}
120
 
 
121
 
WRITE16_HANDLER( othldrby_vreg_w )
122
 
{
123
 
        othldrby_state *state = space->machine().driver_data<othldrby_state>();
124
 
 
125
 
        if (state->m_vreg_addr < OTHLDRBY_VREG_SIZE)
126
 
                state->m_vreg[state->m_vreg_addr++] = data;
 
109
                popmessage("GFXRAM OUT OF BOUNDS %04x", m_vram_addr);
 
110
}
 
111
 
 
112
WRITE16_MEMBER(othldrby_state::othldrby_vreg_addr_w)
 
113
{
 
114
        m_vreg_addr = data & 0x7f;      /* bit 7 is set when screen is flipped */
 
115
}
 
116
 
 
117
WRITE16_MEMBER(othldrby_state::othldrby_vreg_w)
 
118
{
 
119
 
 
120
        if (m_vreg_addr < OTHLDRBY_VREG_SIZE)
 
121
                m_vreg[m_vreg_addr++] = data;
127
122
        else
128
 
                popmessage("%06x: VREG OUT OF BOUNDS %04x", cpu_get_pc(&space->device()), state->m_vreg_addr);
 
123
                popmessage("%06x: VREG OUT OF BOUNDS %04x", cpu_get_pc(&space.device()), m_vreg_addr);
129
124
}
130
125
 
131
126
 
158
153
                sizex = (state->m_buf_spriteram[offs + 2] & 0x000f) + 1;
159
154
                sizey = (state->m_buf_spriteram[offs + 3] & 0x000f) + 1;
160
155
 
161
 
                if (flip_screen_get(machine))
 
156
                if (state->flip_screen())
162
157
                {
163
158
                        flipx = !flipx;
164
159
                        flipy = !flipy;
185
180
        othldrby_state *state = screen.machine().driver_data<othldrby_state>();
186
181
        int layer;
187
182
 
188
 
        flip_screen_set(screen.machine(), state->m_vreg[0x0f] & 0x80);
 
183
        state->flip_screen_set(state->m_vreg[0x0f] & 0x80);
189
184
 
190
185
        for (layer = 0; layer < 3; layer++)
191
186
        {
192
 
                if (flip_screen_get(screen.machine()))
 
187
                if (state->flip_screen())
193
188
                {
194
189
                        state->m_bg_tilemap[layer]->set_scrollx(0, state->m_vreg[2 * layer] + 59);
195
190
                        state->m_bg_tilemap[layer]->set_scrolly(0, state->m_vreg[2 * layer + 1] + 248);