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

« back to all changes in this revision

Viewing changes to src/mame/video/gomoku.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:
20
20
 
21
21
PALETTE_INIT( gomoku )
22
22
{
 
23
        const UINT8 *color_prom = machine.root_device().memregion("proms")->base();
23
24
        int i;
24
25
        int bit0, bit1, bit2, r, g, b;
25
26
 
68
69
                        TILE_FLIPYX(flipyx));
69
70
}
70
71
 
71
 
WRITE8_HANDLER( gomoku_videoram_w )
72
 
{
73
 
        gomoku_state *state = space->machine().driver_data<gomoku_state>();
74
 
        state->m_videoram[offset] = data;
75
 
        state->m_fg_tilemap->mark_tile_dirty(offset);
76
 
}
77
 
 
78
 
WRITE8_HANDLER( gomoku_colorram_w )
79
 
{
80
 
        gomoku_state *state = space->machine().driver_data<gomoku_state>();
81
 
        state->m_colorram[offset] = data;
82
 
        state->m_fg_tilemap->mark_tile_dirty(offset);
83
 
}
84
 
 
85
 
WRITE8_HANDLER( gomoku_bgram_w )
86
 
{
87
 
        gomoku_state *state = space->machine().driver_data<gomoku_state>();
88
 
        state->m_bgram[offset] = data;
89
 
}
90
 
 
91
 
WRITE8_HANDLER( gomoku_flipscreen_w )
92
 
{
93
 
        gomoku_state *state = space->machine().driver_data<gomoku_state>();
94
 
        state->m_flipscreen = (data & 0x02) ? 0 : 1;
95
 
}
96
 
 
97
 
WRITE8_HANDLER( gomoku_bg_dispsw_w )
98
 
{
99
 
        gomoku_state *state = space->machine().driver_data<gomoku_state>();
100
 
        state->m_bg_dispsw = (data & 0x02) ? 0 : 1;
 
72
WRITE8_MEMBER(gomoku_state::gomoku_videoram_w)
 
73
{
 
74
        m_videoram[offset] = data;
 
75
        m_fg_tilemap->mark_tile_dirty(offset);
 
76
}
 
77
 
 
78
WRITE8_MEMBER(gomoku_state::gomoku_colorram_w)
 
79
{
 
80
        m_colorram[offset] = data;
 
81
        m_fg_tilemap->mark_tile_dirty(offset);
 
82
}
 
83
 
 
84
WRITE8_MEMBER(gomoku_state::gomoku_bgram_w)
 
85
{
 
86
        m_bgram[offset] = data;
 
87
}
 
88
 
 
89
WRITE8_MEMBER(gomoku_state::gomoku_flipscreen_w)
 
90
{
 
91
        m_flipscreen = (data & 0x02) ? 0 : 1;
 
92
}
 
93
 
 
94
WRITE8_MEMBER(gomoku_state::gomoku_bg_dispsw_w)
 
95
{
 
96
        m_bg_dispsw = (data & 0x02) ? 0 : 1;
101
97
}
102
98
 
103
99
 
110
106
VIDEO_START( gomoku )
111
107
{
112
108
        gomoku_state *state = machine.driver_data<gomoku_state>();
113
 
        UINT8 *GOMOKU_BG_X = machine.region( "user1" )->base();
114
 
        UINT8 *GOMOKU_BG_Y = machine.region( "user2" )->base();
115
 
        UINT8 *GOMOKU_BG_D = machine.region( "user3" )->base();
 
109
        UINT8 *GOMOKU_BG_X = state->memregion( "user1" )->base();
 
110
        UINT8 *GOMOKU_BG_Y = state->memregion( "user2" )->base();
 
111
        UINT8 *GOMOKU_BG_D = state->memregion( "user3" )->base();
116
112
        int x, y;
117
113
        int bgdata;
118
114
        int color;
153
149
SCREEN_UPDATE_IND16( gomoku )
154
150
{
155
151
        gomoku_state *state = screen.machine().driver_data<gomoku_state>();
156
 
        UINT8 *GOMOKU_BG_X = screen.machine().region( "user1" )->base();
157
 
        UINT8 *GOMOKU_BG_Y = screen.machine().region( "user2" )->base();
158
 
        UINT8 *GOMOKU_BG_D = screen.machine().region( "user3" )->base();
 
152
        UINT8 *GOMOKU_BG_X = screen.machine().root_device().memregion( "user1" )->base();
 
153
        UINT8 *GOMOKU_BG_Y = screen.machine().root_device().memregion( "user2" )->base();
 
154
        UINT8 *GOMOKU_BG_D = state->memregion( "user3" )->base();
159
155
        int x, y;
160
156
        int bgram;
161
157
        int bgoffs;