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

« back to all changes in this revision

Viewing changes to src/mame/video/jack.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:
10
10
#include "includes/jack.h"
11
11
 
12
12
 
13
 
WRITE8_HANDLER( jack_videoram_w )
14
 
{
15
 
        jack_state *state = space->machine().driver_data<jack_state>();
16
 
        state->m_videoram[offset] = data;
17
 
        state->m_bg_tilemap->mark_tile_dirty(offset);
18
 
}
19
 
 
20
 
WRITE8_HANDLER( jack_colorram_w )
21
 
{
22
 
        jack_state *state = space->machine().driver_data<jack_state>();
23
 
        state->m_colorram[offset] = data;
24
 
        state->m_bg_tilemap->mark_tile_dirty(offset);
25
 
}
26
 
 
27
 
WRITE8_HANDLER( jack_paletteram_w )
 
13
WRITE8_MEMBER(jack_state::jack_videoram_w)
 
14
{
 
15
        m_videoram[offset] = data;
 
16
        m_bg_tilemap->mark_tile_dirty(offset);
 
17
}
 
18
 
 
19
WRITE8_MEMBER(jack_state::jack_colorram_w)
 
20
{
 
21
        m_colorram[offset] = data;
 
22
        m_bg_tilemap->mark_tile_dirty(offset);
 
23
}
 
24
 
 
25
WRITE8_MEMBER(jack_state::jack_paletteram_w)
28
26
{
29
27
        /* RGB output is inverted */
30
 
        paletteram_BBGGGRRR_w(space, offset, ~data);
 
28
        paletteram_BBGGGRRR_byte_w(space, offset, ~data);
31
29
}
32
30
 
33
 
READ8_HANDLER( jack_flipscreen_r )
 
31
READ8_MEMBER(jack_state::jack_flipscreen_r)
34
32
{
35
 
        flip_screen_set(space->machine(), offset);
 
33
        flip_screen_set(offset);
36
34
        return 0;
37
35
}
38
36
 
39
 
WRITE8_HANDLER( jack_flipscreen_w )
 
37
WRITE8_MEMBER(jack_state::jack_flipscreen_w)
40
38
{
41
 
        flip_screen_set(space->machine(), offset);
 
39
        flip_screen_set(offset);
42
40
}
43
41
 
44
42
static TILE_GET_INFO( get_bg_tile_info )
70
68
        UINT8 *spriteram = state->m_spriteram;
71
69
        int offs;
72
70
 
73
 
        for (offs = state->m_spriteram_size - 4; offs >= 0; offs -= 4)
 
71
        for (offs = state->m_spriteram.bytes() - 4; offs >= 0; offs -= 4)
74
72
        {
75
73
                int sx, sy, num, color, flipx, flipy;
76
74
 
81
79
                flipx = (spriteram[offs + 3] & 0x80);
82
80
                flipy = (spriteram[offs + 3] & 0x40);
83
81
 
84
 
                if (flip_screen_get(machine))
 
82
                if (state->flip_screen())
85
83
                {
86
84
                        sx = 248 - sx;
87
85
                        sy = 248 - sy;
112
110
 
113
111
PALETTE_INIT( joinem )
114
112
{
 
113
        const UINT8 *color_prom = machine.root_device().memregion("proms")->base();
115
114
        int i;
116
115
 
117
116
        for (i = 0; i < machine.total_colors(); i++)
155
154
        UINT8 *spriteram = state->m_spriteram;
156
155
        int offs;
157
156
 
158
 
        for (offs = state->m_spriteram_size - 4; offs >= 0; offs -= 4)
 
157
        for (offs = state->m_spriteram.bytes() - 4; offs >= 0; offs -= 4)
159
158
        {
160
159
                int sx, sy, num, color, flipx, flipy;
161
160
 
166
165
                flipx = (spriteram[offs + 3] & 0x80);
167
166
                flipy = (spriteram[offs + 3] & 0x40);
168
167
 
169
 
                if (flip_screen_get(machine))
 
168
                if (state->flip_screen())
170
169
                {
171
170
                        sx = 248 - sx;
172
171
                        sy = 248 - sy;