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

« back to all changes in this revision

Viewing changes to src/mame/video/aeroboto.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
 
READ8_HANDLER( aeroboto_in0_r )
 
82
READ8_MEMBER(aeroboto_state::aeroboto_in0_r)
83
83
{
84
 
        return input_port_read(space->machine(), flip_screen_get(space->machine()) ? "P2" : "P1");
 
84
        return ioport(flip_screen() ? "P2" : "P1")->read();
85
85
}
86
86
 
87
 
WRITE8_HANDLER( aeroboto_3000_w )
 
87
WRITE8_MEMBER(aeroboto_state::aeroboto_3000_w)
88
88
{
89
 
        aeroboto_state *state = space->machine().driver_data<aeroboto_state>();
90
89
 
91
90
        /* bit 0 selects both flip screen and player1/player2 controls */
92
 
        flip_screen_set(space->machine(), data & 0x01);
 
91
        flip_screen_set(data & 0x01);
93
92
 
94
93
        /* bit 1 = char bank select */
95
 
        if (state->m_charbank != ((data & 0x02) >> 1))
 
94
        if (m_charbank != ((data & 0x02) >> 1))
96
95
        {
97
 
                state->m_bg_tilemap->mark_all_dirty();
98
 
                state->m_charbank = (data & 0x02) >> 1;
 
96
                m_bg_tilemap->mark_all_dirty();
 
97
                m_charbank = (data & 0x02) >> 1;
99
98
        }
100
99
 
101
100
        /* bit 2 = disable star field? */
102
 
        state->m_starsoff = data & 0x4;
103
 
}
104
 
 
105
 
WRITE8_HANDLER( aeroboto_videoram_w )
106
 
{
107
 
        aeroboto_state *state = space->machine().driver_data<aeroboto_state>();
108
 
 
109
 
        state->m_videoram[offset] = data;
110
 
        state->m_bg_tilemap->mark_tile_dirty(offset);
111
 
}
112
 
 
113
 
WRITE8_HANDLER( aeroboto_tilecolor_w )
114
 
{
115
 
        aeroboto_state *state = space->machine().driver_data<aeroboto_state>();
116
 
 
117
 
        if (state->m_tilecolor[offset] != data)
 
101
        m_starsoff = data & 0x4;
 
102
}
 
103
 
 
104
WRITE8_MEMBER(aeroboto_state::aeroboto_videoram_w)
 
105
{
 
106
 
 
107
        m_videoram[offset] = data;
 
108
        m_bg_tilemap->mark_tile_dirty(offset);
 
109
}
 
110
 
 
111
WRITE8_MEMBER(aeroboto_state::aeroboto_tilecolor_w)
 
112
{
 
113
 
 
114
        if (m_tilecolor[offset] != data)
118
115
        {
119
 
                state->m_tilecolor[offset] = data;
120
 
                state->m_bg_tilemap->mark_all_dirty();
 
116
                m_tilecolor[offset] = data;
 
117
                m_bg_tilemap->mark_all_dirty();
121
118
        }
122
119
}
123
120
 
134
131
        aeroboto_state *state = machine.driver_data<aeroboto_state>();
135
132
        int offs;
136
133
 
137
 
        for (offs = 0; offs < state->m_spriteram_size; offs += 4)
 
134
        for (offs = 0; offs < state->m_spriteram.bytes(); offs += 4)
138
135
        {
139
136
                int x = state->m_spriteram[offs + 3];
140
137
                int y = 240 - state->m_spriteram[offs];
141
138
 
142
 
                if (flip_screen_get(machine))
 
139
                if (state->flip_screen())
143
140
                {
144
141
                        x = 248 - x;
145
142
                        y = 240 - y;
148
145
                drawgfx_transpen(bitmap, cliprect, machine.gfx[1],
149
146
                                state->m_spriteram[offs + 1],
150
147
                                state->m_spriteram[offs + 2] & 0x07,
151
 
                                flip_screen_get(machine), flip_screen_get(machine),
 
148
                                state->flip_screen(), state->flip_screen(),
152
149
                                ((x + 8) & 0xff) - 8, y, 0);
153
150
        }
154
151
}