Modernization of drivers part 5 (no whatsnew)

This commit is contained in:
Miodrag Milanovic 2013-02-08 08:01:38 +00:00
parent e5011691fd
commit a3c51a2018
36 changed files with 442 additions and 407 deletions

View File

@ -22,7 +22,7 @@ Differences between these sets include
#include "includes/fgoal.h"
static int intensity(int bits)
int fgoal_state::intensity(int bits)
{
int v = 0;
@ -90,10 +90,10 @@ TIMER_CALLBACK_MEMBER(fgoal_state::interrupt_callback)
}
static unsigned video_ram_address( running_machine &machine )
unsigned fgoal_state::video_ram_address( )
{
fgoal_state *state = machine.driver_data<fgoal_state>();
return 0x4000 | (state->m_row << 5) | (state->m_col >> 3);
//OBRISI.ME
return 0x4000 | (m_row << 5) | (m_col >> 3);
}
@ -146,12 +146,12 @@ WRITE8_MEMBER(fgoal_state::fgoal_col_w)
READ8_MEMBER(fgoal_state::fgoal_address_hi_r)
{
return video_ram_address(machine()) >> 8;
return video_ram_address() >> 8;
}
READ8_MEMBER(fgoal_state::fgoal_address_lo_r)
{
return video_ram_address(machine()) & 0xff;
return video_ram_address() & 0xff;
}
READ8_MEMBER(fgoal_state::fgoal_shifter_r)

View File

@ -16,22 +16,22 @@ Atari Fire Truck + Super Bug + Monte Carlo driver
static void set_service_mode(running_machine &machine, int enable)
void firetrk_state::set_service_mode(int enable)
{
firetrk_state *state = machine.driver_data<firetrk_state>();
state->m_in_service_mode = enable;
//OBRISI.ME
m_in_service_mode = enable;
/* watchdog is disabled during service mode */
machine.watchdog_enable(!enable);
machine().watchdog_enable(!enable);
/* change CPU clock speed according to service switch change */
machine.device("maincpu")->set_unscaled_clock(enable ? (MASTER_CLOCK/12) : (MASTER_CLOCK/16));
machine().device("maincpu")->set_unscaled_clock(enable ? (MASTER_CLOCK/12) : (MASTER_CLOCK/16));
}
INPUT_CHANGED_MEMBER(firetrk_state::service_mode_switch_changed)
{
set_service_mode(machine(), newval);
set_service_mode(newval);
}
@ -164,7 +164,7 @@ WRITE8_MEMBER(firetrk_state::montecar_output_2_w)
void firetrk_state::machine_reset()
{
set_service_mode(machine(), 0);
set_service_mode(0);
machine().scheduler().synchronize(timer_expired_delegate(FUNC(firetrk_state::periodic_callback),this));
}

View File

@ -94,7 +94,7 @@ WRITE16_MEMBER(fromanc2_state::fromancr_eeprom_w)
{
if (ACCESSING_BITS_0_7)
{
fromancr_gfxbank_w(machine(), data & 0xfff8);
fromancr_gfxbank_w(data & 0xfff8);
ioport("EEPROMOUT")->write(data, 0xff);
}
}

View File

@ -92,4 +92,5 @@ public:
UINT32 screen_update_f1gp(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
UINT32 screen_update_f1gpb(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
UINT32 screen_update_f1gp2(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
void f1gpb_draw_sprites( bitmap_ind16 &bitmap,const rectangle &cliprect );
};

View File

@ -51,4 +51,5 @@ public:
UINT32 screen_update_fantland(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
INTERRUPT_GEN_MEMBER(fantland_irq);
INTERRUPT_GEN_MEMBER(fantland_sound_irq);
void draw_sprites(bitmap_ind16 &bitmap,const rectangle &cliprect);
};

View File

@ -65,6 +65,7 @@ public:
UINT32 screen_update_imago(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
INTERRUPT_GEN_MEMBER(vblank_irq);
INTERRUPT_GEN_MEMBER(sound_timer_irq);
void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect);
};
/*----------- defined in video/fastfred.c -----------*/

View File

@ -50,4 +50,5 @@ public:
virtual void palette_init();
UINT32 screen_update_fastlane(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
TIMER_DEVICE_CALLBACK_MEMBER(fastlane_scanline);
void set_pens( );
};

View File

@ -48,4 +48,6 @@ public:
virtual void palette_init();
UINT32 screen_update_fgoal(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
TIMER_CALLBACK_MEMBER(interrupt_callback);
int intensity(int bits);
unsigned video_ram_address( );
};

View File

@ -72,4 +72,6 @@ public:
virtual void palette_init();
UINT32 screen_update_firetrap(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
INTERRUPT_GEN_MEMBER(firetrap_irq);
inline void get_bg_tile_info(tile_data &tileinfo, int tile_index, UINT8 *bgvideoram, int gfx_region);
void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect );
};

View File

@ -115,6 +115,12 @@ public:
DECLARE_WRITE8_MEMBER(firetrk_motor_snd_w);
DECLARE_WRITE8_MEMBER(superbug_motor_snd_w);
DECLARE_WRITE8_MEMBER(firetrk_xtndply_w);
void prom_to_palette(int number, UINT8 val);
void firetrk_draw_car(bitmap_ind16 &bitmap, const rectangle &cliprect, gfx_element **gfx, int which, int flash);
void superbug_draw_car(bitmap_ind16 &bitmap, const rectangle &cliprect, gfx_element **gfx, int flash);
void montecar_draw_car(bitmap_ind16 &bitmap, const rectangle &cliprect, gfx_element **gfx, int which, int is_collision_detection);
void check_collision(firetrk_state *state, int which);
void set_service_mode(int enable);
};

View File

@ -63,4 +63,5 @@ public:
virtual void video_start();
UINT32 screen_update_fitfight(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
INTERRUPT_GEN_MEMBER(snd_irq);
void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect, int layer );
};

View File

@ -41,6 +41,7 @@ public:
virtual void video_start();
virtual void palette_init();
UINT32 screen_update_flower(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect );
};

View File

@ -118,4 +118,6 @@ public:
UINT32 screen_update_victnine(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
UINT32 screen_update_rumba(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
TIMER_CALLBACK_MEMBER(nmi_callback);
void flstory_draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect, int pri );
void victnine_draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect );
};

View File

@ -52,4 +52,7 @@ public:
UINT32 screen_update_freekick(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
UINT32 screen_update_gigas(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
INTERRUPT_GEN_MEMBER(freekick_irqgen);
void gigas_draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect );
void pbillrd_draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect );
void freekick_draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect );
};

View File

@ -107,7 +107,10 @@ public:
UINT32 screen_update_fromanc2_left(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
UINT32 screen_update_fromanc2_right(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
INTERRUPT_GEN_MEMBER(fromanc2_interrupt);
inline void fromanc2_get_tile_info( tile_data &tileinfo, int tile_index, int vram, int layer );
inline void fromancr_get_tile_info( tile_data &tileinfo, int tile_index, int vram, int layer );
inline void fromanc2_dispvram_w( offs_t offset, UINT16 data, UINT16 mem_mask, int vram, int layer );
inline void fromancr_vram_w(offs_t offset, UINT16 data, UINT16 mem_mask, int layer );
void fromancr_gfxbank_w( int data );
inline void fromanc4_vram_w( offs_t offset, UINT16 data, UINT16 mem_mask, int layer );
};
/*----------- defined in video/fromanc2.c -----------*/
void fromancr_gfxbank_w(running_machine &machine, int data);

View File

@ -94,4 +94,7 @@ public:
UINT32 screen_update_pipedrm(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
TIMER_CALLBACK_MEMBER(deferred_commanddata_w);
TIMER_CALLBACK_MEMBER(crtc_interrupt_gen);
inline void get_fromance_tile_info( tile_data &tileinfo, int tile_index, int layer );
inline void get_nekkyoku_tile_info( tile_data &tileinfo, int tile_index, int layer );
void init_common( );
};

View File

@ -29,4 +29,6 @@ public:
virtual void video_start();
virtual void palette_init();
UINT32 screen_update_funkybee(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect );
void draw_columns( bitmap_ind16 &bitmap, const rectangle &cliprect );
};

View File

@ -23,4 +23,5 @@ public:
virtual void machine_start();
virtual void video_start();
UINT32 screen_update_funybubl(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect );
};

View File

@ -47,4 +47,8 @@ public:
TIMER_CALLBACK_MEMBER(level_1_interrupt_callback);
TIMER_CALLBACK_MEMBER(vblank_interrupt_callback);
TIMER_CALLBACK_MEMBER(raster_interrupt_callback);
inline void get_tile_info(tile_data &tileinfo, tilemap_memory_index tile_index, int _N_);
inline void fuuki16_vram_w(offs_t offset, UINT16 data, UINT16 mem_mask, int _N_);
void draw_sprites( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect );
void fuuki16_draw_layer( bitmap_ind16 &bitmap, const rectangle &cliprect, int i, int flag, int pri );
};

View File

@ -66,4 +66,9 @@ public:
TIMER_CALLBACK_MEMBER(level_1_interrupt_callback);
TIMER_CALLBACK_MEMBER(vblank_interrupt_callback);
TIMER_CALLBACK_MEMBER(raster_interrupt_callback);
inline void get_tile_info8bpp(tile_data &tileinfo, tilemap_memory_index tile_index, int _N_);
inline void get_tile_info4bpp(tile_data &tileinfo, tilemap_memory_index tile_index, int _N_);
inline void fuuki32_vram_w(offs_t offset, UINT32 data, UINT32 mem_mask, int _N_);
void draw_sprites( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect );
void fuuki32_draw_layer( bitmap_ind16 &bitmap, const rectangle &cliprect, int i, int flag, int pri );
};

View File

@ -246,14 +246,14 @@ UINT32 f1gp_state::screen_update_f1gp2(screen_device &screen, bitmap_ind16 &bitm
***************************************************************************/
// BOOTLEG
static void f1gpb_draw_sprites( running_machine &machine, bitmap_ind16 &bitmap,const rectangle &cliprect )
void f1gp_state::f1gpb_draw_sprites( bitmap_ind16 &bitmap,const rectangle &cliprect )
{
f1gp_state *state = machine.driver_data<f1gp_state>();
UINT16 *spriteram = state->m_spriteram;
int attr_start, start_offset = state->m_spriteram.bytes() / 2 - 4;
//OBRISI.ME
UINT16 *spriteram = m_spriteram;
int attr_start, start_offset = m_spriteram.bytes() / 2 - 4;
// find the "end of list" to draw the sprites in reverse order
for (attr_start = 4; attr_start < state->m_spriteram.bytes() / 2; attr_start += 4)
for (attr_start = 4; attr_start < m_spriteram.bytes() / 2; attr_start += 4)
{
if (spriteram[attr_start + 3 - 4] == 0xffff) /* end of list marker */
{
@ -278,7 +278,7 @@ static void f1gpb_draw_sprites( running_machine &machine, bitmap_ind16 &bitmap,c
if((spriteram[attr_start + 1] & 0x00f0) && (spriteram[attr_start + 1] & 0x00f0) != 0xc0)
{
printf("attr %X\n",spriteram[attr_start + 1] & 0x00f0);
code = machine.rand();
code = machine().rand();
}
/*
@ -295,21 +295,21 @@ static void f1gpb_draw_sprites( running_machine &machine, bitmap_ind16 &bitmap,c
gfx = 0;
}
pdrawgfx_transpen(bitmap,cliprect,machine.gfx[1 + gfx],
pdrawgfx_transpen(bitmap,cliprect,machine().gfx[1 + gfx],
code,
color,
flipx,flipy,
x,y,
machine.priority_bitmap,
machine().priority_bitmap,
pri ? 0 : 0x2,15);
// wrap around x
pdrawgfx_transpen(bitmap,cliprect,machine.gfx[1 + gfx],
pdrawgfx_transpen(bitmap,cliprect,machine().gfx[1 + gfx],
code,
color,
flipx,flipy,
x - 512,y,
machine.priority_bitmap,
machine().priority_bitmap,
pri ? 0 : 0x2,15);
}
}
@ -337,7 +337,7 @@ UINT32 f1gp_state::screen_update_f1gpb(screen_device &screen, bitmap_ind16 &bitm
m_fg_tilemap->draw(bitmap, cliprect, 0, 1);
f1gpb_draw_sprites(machine(), bitmap, cliprect);
f1gpb_draw_sprites(bitmap, cliprect);
return 0;
}

View File

@ -61,17 +61,17 @@
#include "emu.h"
#include "includes/fantland.h"
static void draw_sprites(running_machine &machine, bitmap_ind16 &bitmap,const rectangle &cliprect)
void fantland_state::draw_sprites(bitmap_ind16 &bitmap,const rectangle &cliprect)
{
fantland_state *state = machine.driver_data<fantland_state>();
UINT8 *spriteram_2 = state->m_spriteram2;
UINT8 *indx_ram = state->m_spriteram + 0x2000, // this ram contains indexes into offs_ram
*offs_ram = state->m_spriteram + 0x2400, // this ram contains x,y offsets or indexes into spriteram_2
*ram = state->m_spriteram, // current sprite pointer in spriteram
//OBRISI.ME
UINT8 *spriteram_2 = m_spriteram2;
UINT8 *indx_ram = m_spriteram + 0x2000, // this ram contains indexes into offs_ram
*offs_ram = m_spriteram + 0x2400, // this ram contains x,y offsets or indexes into spriteram_2
*ram = m_spriteram, // current sprite pointer in spriteram
*ram2 = indx_ram; // current sprite pointer in indx_ram
// wheelrun is the only game with a smaller visible area
const rectangle &visarea = machine.primary_screen->visible_area();
const rectangle &visarea = machine().primary_screen->visible_area();
int special = (visarea.max_y - visarea.min_y + 1) < 0x100;
for ( ; ram < indx_ram; ram += 8,ram2++)
@ -135,14 +135,14 @@ static void draw_sprites(running_machine &machine, bitmap_ind16 &bitmap,const re
if (x >= 0x180) x -= 0x200;
drawgfx_transpen(bitmap,cliprect,machine.gfx[0], code,color, flipx,flipy, x,y,0);
drawgfx_transpen(bitmap,cliprect,machine().gfx[0], code,color, flipx,flipy, x,y,0);
}
}
UINT32 fantland_state::screen_update_fantland(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
bitmap.fill(0, cliprect);
draw_sprites(machine(),bitmap,cliprect);
draw_sprites(bitmap,cliprect);
return 0;
}

View File

@ -230,65 +230,65 @@ WRITE8_HANDLER( fastfred_flip_screen_y_w )
*
*************************************/
static void draw_sprites(running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect)
void fastfred_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect)
{
const rectangle spritevisiblearea(2*8, 32*8-1, 2*8, 30*8-1);
const rectangle spritevisibleareaflipx(0*8, 30*8-1, 2*8, 30*8-1);
fastfred_state *state = machine.driver_data<fastfred_state>();
//OBRISI.ME
int offs;
for (offs = state->m_spriteram.bytes() - 4; offs >= 0; offs -= 4)
for (offs = m_spriteram.bytes() - 4; offs >= 0; offs -= 4)
{
UINT8 code,sx,sy;
int flipx,flipy;
sx = state->m_spriteram[offs + 3];
sy = 240 - state->m_spriteram[offs];
sx = m_spriteram[offs + 3];
sy = 240 - m_spriteram[offs];
if (state->m_hardware_type == 3)
if (m_hardware_type == 3)
{
// Imago
code = (state->m_spriteram[offs + 1]) & 0x3f;
code = (m_spriteram[offs + 1]) & 0x3f;
flipx = 0;
flipy = 0;
}
else if (state->m_hardware_type == 2)
else if (m_hardware_type == 2)
{
// Boggy 84
code = state->m_spriteram[offs + 1] & 0x7f;
code = m_spriteram[offs + 1] & 0x7f;
flipx = 0;
flipy = state->m_spriteram[offs + 1] & 0x80;
flipy = m_spriteram[offs + 1] & 0x80;
}
else if (state->m_hardware_type == 1)
else if (m_hardware_type == 1)
{
// Fly-Boy/Fast Freddie/Red Robin
code = state->m_spriteram[offs + 1] & 0x7f;
code = m_spriteram[offs + 1] & 0x7f;
flipx = 0;
flipy = ~state->m_spriteram[offs + 1] & 0x80;
flipy = ~m_spriteram[offs + 1] & 0x80;
}
else
{
// Jump Coaster
code = (state->m_spriteram[offs + 1] & 0x3f) | 0x40;
flipx = ~state->m_spriteram[offs + 1] & 0x40;
flipy = state->m_spriteram[offs + 1] & 0x80;
code = (m_spriteram[offs + 1] & 0x3f) | 0x40;
flipx = ~m_spriteram[offs + 1] & 0x40;
flipy = m_spriteram[offs + 1] & 0x80;
}
if (state->flip_screen_x())
if (flip_screen_x())
{
sx = 240 - sx;
flipx = !flipx;
}
if (state->flip_screen_y())
if (flip_screen_y())
{
sy = 240 - sy;
flipy = !flipy;
}
drawgfx_transpen(bitmap,state->flip_screen_x() ? spritevisibleareaflipx : spritevisiblearea,machine.gfx[1],
drawgfx_transpen(bitmap,flip_screen_x() ? spritevisibleareaflipx : spritevisiblearea,machine().gfx[1],
code,
state->m_colorbank | (state->m_spriteram[offs + 2] & 0x07),
m_colorbank | (m_spriteram[offs + 2] & 0x07),
flipx,flipy,
sx,sy,0);
}
@ -299,7 +299,7 @@ UINT32 fastfred_state::screen_update_fastfred(screen_device &screen, bitmap_ind1
{
bitmap.fill(*m_background_color, cliprect);
m_bg_tilemap->draw(bitmap, cliprect, 0,0);
draw_sprites(machine(), bitmap, cliprect);
draw_sprites(bitmap, cliprect);
return 0;
}
@ -366,7 +366,7 @@ UINT32 fastfred_state::screen_update_imago(screen_device &screen, bitmap_ind16 &
m_web_tilemap->draw(bitmap, cliprect, 0,0);
galaxold_draw_stars(machine(), bitmap, cliprect);
m_bg_tilemap->draw(bitmap, cliprect, 0,0);
draw_sprites(machine(), bitmap, cliprect);
draw_sprites(bitmap, cliprect);
m_fg_tilemap->draw(bitmap, cliprect, 0,0);
return 0;

View File

@ -24,18 +24,18 @@ void fastlane_state::palette_init()
}
static void set_pens( running_machine &machine )
void fastlane_state::set_pens( )
{
fastlane_state *state = machine.driver_data<fastlane_state>();
//OBRISI.ME
int i;
for (i = 0x00; i < 0x800; i += 2)
{
UINT16 data = state->m_paletteram[i | 1] | (state->m_paletteram[i] << 8);
UINT16 data = m_paletteram[i | 1] | (m_paletteram[i] << 8);
rgb_t color = MAKE_RGB(pal5bit(data >> 0), pal5bit(data >> 5), pal5bit(data >> 10));
colortable_palette_set_color(machine.colortable, i >> 1, color);
colortable_palette_set_color(machine().colortable, i >> 1, color);
}
}
@ -158,7 +158,7 @@ UINT32 fastlane_state::screen_update_fastlane(screen_device &screen, bitmap_ind1
finalclip0 &= cliprect;
finalclip1 &= cliprect;
set_pens(machine());
set_pens();
/* set scroll registers */
address_space &space = machine().driver_data()->generic_space();

View File

@ -95,11 +95,11 @@ TILE_GET_INFO_MEMBER(firetrap_state::get_fg_tile_info)
0);
}
INLINE void get_bg_tile_info(running_machine &machine, tile_data &tileinfo, int tile_index, UINT8 *bgvideoram, int gfx_region)
inline void firetrap_state::get_bg_tile_info(tile_data &tileinfo, int tile_index, UINT8 *bgvideoram, int gfx_region)
{
int code = bgvideoram[tile_index];
int color = bgvideoram[tile_index + 0x100];
SET_TILE_INFO(
SET_TILE_INFO_MEMBER(
gfx_region,
code + ((color & 0x03) << 8),
(color & 0x30) >> 4,
@ -108,12 +108,12 @@ INLINE void get_bg_tile_info(running_machine &machine, tile_data &tileinfo, int
TILE_GET_INFO_MEMBER(firetrap_state::get_bg1_tile_info)
{
get_bg_tile_info(machine(), tileinfo, tile_index, m_bg1videoram, 1);
get_bg_tile_info(tileinfo, tile_index, m_bg1videoram, 1);
}
TILE_GET_INFO_MEMBER(firetrap_state::get_bg2_tile_info)
{
get_bg_tile_info(machine(), tileinfo, tile_index, m_bg2videoram, 2);
get_bg_tile_info(tileinfo, tile_index, m_bg2videoram, 2);
}
@ -190,25 +190,25 @@ WRITE8_MEMBER(firetrap_state::firetrap_bg2_scrolly_w)
***************************************************************************/
static void draw_sprites( running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect )
void firetrap_state::draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect )
{
firetrap_state *state = machine.driver_data<firetrap_state>();
//OBRISI.ME
int offs;
for (offs = 0; offs < state->m_spriteram.bytes(); offs += 4)
for (offs = 0; offs < m_spriteram.bytes(); offs += 4)
{
int sx, sy, flipx, flipy, code, color;
/* the meaning of bit 3 of [offs] is unknown */
sy = state->m_spriteram[offs];
sx = state->m_spriteram[offs + 2];
code = state->m_spriteram[offs + 3] + 4 * (state->m_spriteram[offs + 1] & 0xc0);
color = ((state->m_spriteram[offs + 1] & 0x08) >> 2) | (state->m_spriteram[offs + 1] & 0x01);
flipx = state->m_spriteram[offs + 1] & 0x04;
flipy = state->m_spriteram[offs + 1] & 0x02;
if (state->flip_screen())
sy = m_spriteram[offs];
sx = m_spriteram[offs + 2];
code = m_spriteram[offs + 3] + 4 * (m_spriteram[offs + 1] & 0xc0);
color = ((m_spriteram[offs + 1] & 0x08) >> 2) | (m_spriteram[offs + 1] & 0x01);
flipx = m_spriteram[offs + 1] & 0x04;
flipy = m_spriteram[offs + 1] & 0x02;
if (flip_screen())
{
sx = 240 - sx;
sy = 240 - sy;
@ -216,28 +216,28 @@ static void draw_sprites( running_machine &machine, bitmap_ind16 &bitmap, const
flipy = !flipy;
}
if (state->m_spriteram[offs + 1] & 0x10) /* double width */
if (m_spriteram[offs + 1] & 0x10) /* double width */
{
if (state->flip_screen()) sy -= 16;
if (flip_screen()) sy -= 16;
drawgfx_transpen(bitmap,cliprect,machine.gfx[3],
drawgfx_transpen(bitmap,cliprect,machine().gfx[3],
code & ~1,
color,
flipx,flipy,
sx,flipy ? sy : sy + 16,0);
drawgfx_transpen(bitmap,cliprect,machine.gfx[3],
drawgfx_transpen(bitmap,cliprect,machine().gfx[3],
code | 1,
color,
flipx,flipy,
sx,flipy ? sy + 16 : sy,0);
/* redraw with wraparound */
drawgfx_transpen(bitmap,cliprect,machine.gfx[3],
drawgfx_transpen(bitmap,cliprect,machine().gfx[3],
code & ~1,
color,
flipx,flipy,
sx - 256,flipy ? sy : sy + 16,0);
drawgfx_transpen(bitmap,cliprect,machine.gfx[3],
drawgfx_transpen(bitmap,cliprect,machine().gfx[3],
code | 1,
color,
flipx,flipy,
@ -245,14 +245,14 @@ static void draw_sprites( running_machine &machine, bitmap_ind16 &bitmap, const
}
else
{
drawgfx_transpen(bitmap,cliprect,machine.gfx[3],
drawgfx_transpen(bitmap,cliprect,machine().gfx[3],
code,
color,
flipx,flipy,
sx,sy,0);
/* redraw with wraparound */
drawgfx_transpen(bitmap,cliprect,machine.gfx[3],
drawgfx_transpen(bitmap,cliprect,machine().gfx[3],
code,
color,
flipx,flipy,
@ -265,7 +265,7 @@ UINT32 firetrap_state::screen_update_firetrap(screen_device &screen, bitmap_ind1
{
m_bg2_tilemap->draw(bitmap, cliprect, 0, 0);
m_bg1_tilemap->draw(bitmap, cliprect, 0, 0);
draw_sprites(machine(), bitmap, cliprect);
draw_sprites(bitmap, cliprect);
m_fg_tilemap->draw(bitmap, cliprect, 0, 0);
return 0;
}

View File

@ -56,9 +56,9 @@ void firetrk_state::palette_init()
}
static void prom_to_palette(running_machine &machine, int number, UINT8 val)
void firetrk_state::prom_to_palette(int number, UINT8 val)
{
palette_set_color(machine, number, MAKE_RGB(pal1bit(val >> 2), pal1bit(val >> 1), pal1bit(val >> 0)));
palette_set_color(machine(), number, MAKE_RGB(pal1bit(val >> 2), pal1bit(val >> 1), pal1bit(val >> 0)));
}
@ -111,7 +111,7 @@ PALETTE_INIT_MEMBER(firetrk_state,montecar)
else if (color == 2)
m_color2_mask |= 1 << i;
prom_to_palette(machine(), i, color_prom[0x100 + colortable_source[i]]);
prom_to_palette(i, color_prom[0x100 + colortable_source[i]]);
}
palette_set_color(machine(), ARRAY_LENGTH(colortable_source) + 0, RGB_BLACK);
@ -245,28 +245,28 @@ VIDEO_START_MEMBER(firetrk_state,montecar)
}
static void firetrk_draw_car(running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect, gfx_element **gfx, int which, int flash)
void firetrk_state::firetrk_draw_car(bitmap_ind16 &bitmap, const rectangle &cliprect, gfx_element **gfx, int which, int flash)
{
firetrk_state *state = machine.driver_data<firetrk_state>();
//OBRISI.ME
int gfx_bank, code, color, flip_x, flip_y, x, y;
if (which)
{
gfx_bank = 5;
code = *state->m_drone_rot & 0x07;
code = *m_drone_rot & 0x07;
color = flash ? 1 : 0;
flip_x = *state->m_drone_rot & 0x08;
flip_y = *state->m_drone_rot & 0x10;
x = (flip_x ? *state->m_drone_x - 63 : 192 - *state->m_drone_x) + 36;
y = flip_y ? *state->m_drone_y - 63 : 192 - *state->m_drone_y;
flip_x = *m_drone_rot & 0x08;
flip_y = *m_drone_rot & 0x10;
x = (flip_x ? *m_drone_x - 63 : 192 - *m_drone_x) + 36;
y = flip_y ? *m_drone_y - 63 : 192 - *m_drone_y;
}
else
{
gfx_bank = (*state->m_car_rot & 0x10) ? 4 : 3;
code = *state->m_car_rot & 0x03;
gfx_bank = (*m_car_rot & 0x10) ? 4 : 3;
code = *m_car_rot & 0x03;
color = flash ? 1 : 0;
flip_x = *state->m_car_rot & 0x04;
flip_y = *state->m_car_rot & 0x08;
flip_x = *m_car_rot & 0x04;
flip_y = *m_car_rot & 0x08;
x = 144;
y = 104;
}
@ -275,41 +275,41 @@ static void firetrk_draw_car(running_machine &machine, bitmap_ind16 &bitmap, con
}
static void superbug_draw_car(running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect, gfx_element **gfx, int flash)
void firetrk_state::superbug_draw_car(bitmap_ind16 &bitmap, const rectangle &cliprect, gfx_element **gfx, int flash)
{
firetrk_state *state = machine.driver_data<firetrk_state>();
int gfx_bank = (*state->m_car_rot & 0x10) ? 4 : 3;
int code = ~*state->m_car_rot & 0x03;
//OBRISI.ME
int gfx_bank = (*m_car_rot & 0x10) ? 4 : 3;
int code = ~*m_car_rot & 0x03;
int color = flash ? 1 : 0;
int flip_x = *state->m_car_rot & 0x04;
int flip_y = *state->m_car_rot & 0x08;
int flip_x = *m_car_rot & 0x04;
int flip_y = *m_car_rot & 0x08;
drawgfx_transpen(bitmap, cliprect, gfx[gfx_bank], code, color, flip_x, flip_y, 144, 104, 0);
}
static void montecar_draw_car(running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect, gfx_element **gfx, int which, int is_collision_detection)
void firetrk_state::montecar_draw_car(bitmap_ind16 &bitmap, const rectangle &cliprect, gfx_element **gfx, int which, int is_collision_detection)
{
firetrk_state *state = machine.driver_data<firetrk_state>();
//OBRISI.ME
int gfx_bank, code, color, flip_x, flip_y, x, y;
if (which)
{
gfx_bank = 4;
code = *state->m_drone_rot & 0x07;
color = is_collision_detection ? 0 : (((*state->m_car_rot & 0x80) >> 6) | ((*state->m_drone_rot & 0x80) >> 7));
flip_x = *state->m_drone_rot & 0x10;
flip_y = *state->m_drone_rot & 0x08;
x = (flip_x ? *state->m_drone_x - 31 : 224 - *state->m_drone_x) + 34;
y = flip_y ? *state->m_drone_y - 31 : 224 - *state->m_drone_y;
code = *m_drone_rot & 0x07;
color = is_collision_detection ? 0 : (((*m_car_rot & 0x80) >> 6) | ((*m_drone_rot & 0x80) >> 7));
flip_x = *m_drone_rot & 0x10;
flip_y = *m_drone_rot & 0x08;
x = (flip_x ? *m_drone_x - 31 : 224 - *m_drone_x) + 34;
y = flip_y ? *m_drone_y - 31 : 224 - *m_drone_y;
}
else
{
gfx_bank = 3;
code = *state->m_car_rot & 0x07;
code = *m_car_rot & 0x07;
color = 0;
flip_x = *state->m_car_rot & 0x10;
flip_y = *state->m_car_rot & 0x08;
flip_x = *m_car_rot & 0x10;
flip_y = *m_car_rot & 0x08;
x = 144;
y = 104;
}
@ -328,21 +328,21 @@ static void draw_text(bitmap_ind16 &bitmap, const rectangle &cliprect, gfx_eleme
}
static void check_collision(firetrk_state *state, int which)
void firetrk_state::check_collision(firetrk_state *state, int which)
{
int y, x;
for (y = playfield_window.min_y; y <= playfield_window.max_y; y++)
for (x = playfield_window.min_x; x <= playfield_window.max_x; x++)
{
pen_t a = state->m_helper1.pix16(y, x);
pen_t b = state->m_helper2.pix16(y, x);
pen_t a = m_helper1.pix16(y, x);
pen_t b = m_helper2.pix16(y, x);
if (b != 0xff && (state->m_color1_mask >> a) & 1)
state->m_crash[which] = 1;
if (b != 0xff && (m_color1_mask >> a) & 1)
m_crash[which] = 1;
if (b != 0xff && (state->m_color2_mask >> a) & 1)
state->m_skid[which] = 1;
if (b != 0xff && (m_color2_mask >> a) & 1)
m_skid[which] = 1;
}
}
@ -357,8 +357,8 @@ UINT32 firetrk_state::screen_update_firetrk(screen_device &screen, bitmap_ind16
bitmap.fill(0, cliprect);
m_tilemap1->draw(bitmap, playfield_window, 0, 0);
firetrk_draw_car(machine(), bitmap, playfield_window, machine().gfx, 0, m_flash);
firetrk_draw_car(machine(), bitmap, playfield_window, machine().gfx, 1, m_flash);
firetrk_draw_car(bitmap, playfield_window, machine().gfx, 0, m_flash);
firetrk_draw_car(bitmap, playfield_window, machine().gfx, 1, m_flash);
draw_text(bitmap, cliprect, machine().gfx, m_alpha_num_ram + 0x00, 296, 0x10, 0x10);
draw_text(bitmap, cliprect, machine().gfx, m_alpha_num_ram + 0x10, 8, 0x10, 0x10);
@ -367,11 +367,11 @@ UINT32 firetrk_state::screen_update_firetrk(screen_device &screen, bitmap_ind16
m_tilemap2->draw(m_helper1, playfield_window, 0, 0);
m_helper2.fill(0xff, playfield_window);
firetrk_draw_car(machine(), m_helper2, playfield_window, machine().gfx, 0, FALSE);
firetrk_draw_car(m_helper2, playfield_window, machine().gfx, 0, FALSE);
check_collision(this, 0);
m_helper2.fill(0xff, playfield_window);
firetrk_draw_car(machine(), m_helper2, playfield_window, machine().gfx, 1, FALSE);
firetrk_draw_car(m_helper2, playfield_window, machine().gfx, 1, FALSE);
check_collision(this, 1);
*m_blink = FALSE;
@ -391,7 +391,7 @@ UINT32 firetrk_state::screen_update_superbug(screen_device &screen, bitmap_ind16
bitmap.fill(0, cliprect);
m_tilemap1->draw(bitmap, playfield_window, 0, 0);
superbug_draw_car(machine(), bitmap, playfield_window, machine().gfx, m_flash);
superbug_draw_car(bitmap, playfield_window, machine().gfx, m_flash);
draw_text(bitmap, cliprect, machine().gfx, m_alpha_num_ram + 0x00, 296, 0x10, 0x10);
draw_text(bitmap, cliprect, machine().gfx, m_alpha_num_ram + 0x10, 8, 0x10, 0x10);
@ -400,7 +400,7 @@ UINT32 firetrk_state::screen_update_superbug(screen_device &screen, bitmap_ind16
m_tilemap2->draw(m_helper1, playfield_window, 0, 0);
m_helper2.fill(0xff, playfield_window);
superbug_draw_car(machine(), m_helper2, playfield_window, machine().gfx, FALSE);
superbug_draw_car(m_helper2, playfield_window, machine().gfx, FALSE);
check_collision(this, 0);
*m_blink = FALSE;
@ -420,8 +420,8 @@ UINT32 firetrk_state::screen_update_montecar(screen_device &screen, bitmap_ind16
bitmap.fill(0x2c, cliprect);
m_tilemap1->draw(bitmap, playfield_window, 0, 0);
montecar_draw_car(machine(), bitmap, playfield_window, machine().gfx, 0, FALSE);
montecar_draw_car(machine(), bitmap, playfield_window, machine().gfx, 1, FALSE);
montecar_draw_car(bitmap, playfield_window, machine().gfx, 0, FALSE);
montecar_draw_car(bitmap, playfield_window, machine().gfx, 1, FALSE);
draw_text(bitmap, cliprect, machine().gfx, m_alpha_num_ram + 0x00, 24, 0x20, 0x08);
draw_text(bitmap, cliprect, machine().gfx, m_alpha_num_ram + 0x20, 16, 0x20, 0x08);
@ -430,11 +430,11 @@ UINT32 firetrk_state::screen_update_montecar(screen_device &screen, bitmap_ind16
m_tilemap2->draw(m_helper1, playfield_window, 0, 0);
m_helper2.fill(0xff, playfield_window);
montecar_draw_car(machine(), m_helper2, playfield_window, machine().gfx, 0, TRUE);
montecar_draw_car(m_helper2, playfield_window, machine().gfx, 0, TRUE);
check_collision(this, 0);
m_helper2.fill(0xff, playfield_window);
montecar_draw_car(machine(), m_helper2, playfield_window, machine().gfx, 1, TRUE);
montecar_draw_car(m_helper2, playfield_window, machine().gfx, 1, TRUE);
check_collision(this, 1);
}

View File

@ -4,11 +4,11 @@
#include "includes/fitfight.h"
static void draw_sprites( running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect, int layer )
void fitfight_state::draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect, int layer )
{
fitfight_state *state = machine.driver_data<fitfight_state>();
gfx_element *gfx = machine.gfx[3];
UINT16 *source = state->m_spriteram;
//OBRISI.ME
gfx_element *gfx = machine().gfx[3];
UINT16 *source = m_spriteram;
UINT16 *finish = source + 0x800 / 2;
while (source < finish)
@ -23,7 +23,7 @@ static void draw_sprites( running_machine &machine, bitmap_ind16 &bitmap, const
prio = (source[1] & 0x0400) >> 10;
colr = (source[1] & 0x00fc) >> 2;
if (state->m_bbprot_kludge == 1)
if (m_bbprot_kludge == 1)
colr = (source[1] & 0x00f8) >> 3;
end = source[0] & 0x8000;
@ -130,7 +130,7 @@ UINT32 fitfight_state::screen_update_fitfight(screen_device &screen, bitmap_ind1
m_fof_bak_tilemap->set_scrolly(0, m_fof_a00000[0] & 0xff);
m_fof_bak_tilemap->draw(bitmap, cliprect, 0, 0);
draw_sprites(machine(), bitmap, cliprect, 0);
draw_sprites(bitmap, cliprect, 0);
// if (machine().input().code_pressed(KEYCODE_A))
// scrollmid = ((m_fof_900000[0] & 0xff00) >> 5) - ((m_fof_700000[0] & 0x01c0) >> 6);
@ -147,7 +147,7 @@ UINT32 fitfight_state::screen_update_fitfight(screen_device &screen, bitmap_ind1
// if (!machine().input().code_pressed(KEYCODE_F))
m_fof_mid_tilemap->draw(bitmap, cliprect, 0, 0);
draw_sprites(machine(), bitmap, cliprect, 1);
draw_sprites(bitmap, cliprect, 1);
m_fof_txt_tilemap->draw(bitmap, cliprect, 0, 0);
}

View File

@ -26,11 +26,11 @@ void flower_state::palette_init()
colortable_entry_set_value(machine().colortable, i, i);
}
static void draw_sprites(running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect )
void flower_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect )
{
flower_state *state = machine.driver_data<flower_state>();
gfx_element *gfx = machine.gfx[1];
UINT8 *source = state->m_spriteram + 0x200;
//OBRISI.ME
gfx_element *gfx = machine().gfx[1];
UINT8 *source = m_spriteram + 0x200;
UINT8 *finish = source - 0x200;
source -= 8;
@ -79,7 +79,7 @@ static void draw_sprites(running_machine &machine, bitmap_ind16 &bitmap, const r
code |= ((source[2] & 0x01) << 6);
code |= ((source[2] & 0x08) << 4);
if(state->flip_screen())
if(flip_screen())
{
flipx = !flipx;
flipy = !flipy;
@ -170,7 +170,7 @@ UINT32 flower_state::screen_update_flower(screen_device &screen, bitmap_ind16 &b
m_bg0_tilemap->draw(bitmap, cliprect, 0,0);
m_bg1_tilemap->draw(bitmap, cliprect, 0,0);
draw_sprites(machine(),bitmap,cliprect);
draw_sprites(bitmap,cliprect);
if(flip_screen())
{

View File

@ -159,25 +159,25 @@ WRITE8_MEMBER(flstory_state::flstory_scrlram_w)
}
static void flstory_draw_sprites( running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect, int pri )
void flstory_state::flstory_draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect, int pri )
{
flstory_state *state = machine.driver_data<flstory_state>();
//OBRISI.ME
int i;
for (i = 0; i < 0x20; i++)
{
int pr = state->m_spriteram[state->m_spriteram.bytes() - 1 - i];
int pr = m_spriteram[m_spriteram.bytes() - 1 - i];
int offs = (pr & 0x1f) * 4;
if ((pr & 0x80) == pri)
{
int code, sx, sy, flipx, flipy;
code = state->m_spriteram[offs + 2] + ((state->m_spriteram[offs + 1] & 0x30) << 4);
sx = state->m_spriteram[offs + 3];
sy = state->m_spriteram[offs + 0];
code = m_spriteram[offs + 2] + ((m_spriteram[offs + 1] & 0x30) << 4);
sx = m_spriteram[offs + 3];
sy = m_spriteram[offs + 0];
if (state->m_flipscreen)
if (m_flipscreen)
{
sx = (240 - sx) & 0xff ;
sy = sy - 1 ;
@ -185,19 +185,19 @@ static void flstory_draw_sprites( running_machine &machine, bitmap_ind16 &bitmap
else
sy = 240 - sy - 1 ;
flipx = ((state->m_spriteram[offs + 1] & 0x40) >> 6) ^ state->m_flipscreen;
flipy = ((state->m_spriteram[offs + 1] & 0x80) >> 7) ^ state->m_flipscreen;
flipx = ((m_spriteram[offs + 1] & 0x40) >> 6) ^ m_flipscreen;
flipy = ((m_spriteram[offs + 1] & 0x80) >> 7) ^ m_flipscreen;
drawgfx_transpen(bitmap,cliprect,machine.gfx[1],
drawgfx_transpen(bitmap,cliprect,machine().gfx[1],
code,
state->m_spriteram[offs + 1] & 0x0f,
m_spriteram[offs + 1] & 0x0f,
flipx,flipy,
sx,sy,15);
/* wrap around */
if (sx > 240)
drawgfx_transpen(bitmap,cliprect,machine.gfx[1],
drawgfx_transpen(bitmap,cliprect,machine().gfx[1],
code,
state->m_spriteram[offs + 1] & 0x0f,
m_spriteram[offs + 1] & 0x0f,
flipx,flipy,
sx-256,sy,15);
}
@ -208,32 +208,32 @@ UINT32 flstory_state::screen_update_flstory(screen_device &screen, bitmap_ind16
{
m_bg_tilemap->draw(bitmap, cliprect, 0 | TILEMAP_DRAW_LAYER1, 0);
m_bg_tilemap->draw(bitmap, cliprect, 1 | TILEMAP_DRAW_LAYER1, 0);
flstory_draw_sprites(machine(), bitmap, cliprect, 0x00);
flstory_draw_sprites(bitmap, cliprect, 0x00);
m_bg_tilemap->draw(bitmap, cliprect, 0 | TILEMAP_DRAW_LAYER0, 0);
flstory_draw_sprites(machine(), bitmap, cliprect, 0x80);
flstory_draw_sprites(bitmap, cliprect, 0x80);
m_bg_tilemap->draw(bitmap, cliprect, 1 | TILEMAP_DRAW_LAYER0, 0);
return 0;
}
static void victnine_draw_sprites( running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect )
void flstory_state::victnine_draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect )
{
flstory_state *state = machine.driver_data<flstory_state>();
//OBRISI.ME
int i;
for (i = 0; i < 0x20; i++)
{
int pr = state->m_spriteram[state->m_spriteram.bytes() - 1 - i];
int pr = m_spriteram[m_spriteram.bytes() - 1 - i];
int offs = (pr & 0x1f) * 4;
//if ((pr & 0x80) == pri)
{
int code, sx, sy, flipx, flipy;
code = state->m_spriteram[offs + 2] + ((state->m_spriteram[offs + 1] & 0x20) << 3);
sx = state->m_spriteram[offs + 3];
sy = state->m_spriteram[offs + 0];
code = m_spriteram[offs + 2] + ((m_spriteram[offs + 1] & 0x20) << 3);
sx = m_spriteram[offs + 3];
sy = m_spriteram[offs + 0];
if (state->m_flipscreen)
if (m_flipscreen)
{
sx = (240 - sx + 1) & 0xff ;
sy = sy + 1 ;
@ -241,19 +241,19 @@ static void victnine_draw_sprites( running_machine &machine, bitmap_ind16 &bitma
else
sy = 240 - sy + 1 ;
flipx = ((state->m_spriteram[offs + 1] & 0x40) >> 6) ^ state->m_flipscreen;
flipy = ((state->m_spriteram[offs + 1] & 0x80) >> 7) ^ state->m_flipscreen;
flipx = ((m_spriteram[offs + 1] & 0x40) >> 6) ^ m_flipscreen;
flipy = ((m_spriteram[offs + 1] & 0x80) >> 7) ^ m_flipscreen;
drawgfx_transpen(bitmap,cliprect,machine.gfx[1],
drawgfx_transpen(bitmap,cliprect,machine().gfx[1],
code,
state->m_spriteram[offs + 1] & 0x0f,
m_spriteram[offs + 1] & 0x0f,
flipx,flipy,
sx,sy,15);
/* wrap around */
if (sx > 240)
drawgfx_transpen(bitmap,cliprect,machine.gfx[1],
drawgfx_transpen(bitmap,cliprect,machine().gfx[1],
code,
state->m_spriteram[offs + 1] & 0x0f,
m_spriteram[offs + 1] & 0x0f,
flipx,flipy,
sx-256,sy,15);
}
@ -263,7 +263,7 @@ static void victnine_draw_sprites( running_machine &machine, bitmap_ind16 &bitma
UINT32 flstory_state::screen_update_victnine(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
m_bg_tilemap->draw(bitmap, cliprect, 0, 0);
victnine_draw_sprites(machine(), bitmap, cliprect);
victnine_draw_sprites(bitmap, cliprect);
return 0;
}
@ -271,9 +271,9 @@ UINT32 flstory_state::screen_update_rumba(screen_device &screen, bitmap_ind16 &b
{
m_bg_tilemap->draw(bitmap, cliprect, 0 | TILEMAP_DRAW_LAYER1, 0);
m_bg_tilemap->draw(bitmap, cliprect, 1 | TILEMAP_DRAW_LAYER1, 0);
victnine_draw_sprites(machine(), bitmap, cliprect);
victnine_draw_sprites(bitmap, cliprect);
m_bg_tilemap->draw(bitmap, cliprect, 0 | TILEMAP_DRAW_LAYER0, 0);
victnine_draw_sprites(machine(), bitmap, cliprect);
victnine_draw_sprites(bitmap, cliprect);
m_bg_tilemap->draw(bitmap, cliprect, 1 | TILEMAP_DRAW_LAYER0, 0);
return 0;
}

View File

@ -26,33 +26,33 @@ WRITE8_MEMBER(freekick_state::freek_videoram_w)
m_freek_tilemap->mark_tile_dirty(offset & 0x3ff);
}
static void gigas_draw_sprites( running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect )
void freekick_state::gigas_draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect )
{
freekick_state *state = machine.driver_data<freekick_state>();
//OBRISI.ME
int offs;
for (offs = 0; offs < state->m_spriteram.bytes(); offs += 4)
for (offs = 0; offs < m_spriteram.bytes(); offs += 4)
{
int xpos = state->m_spriteram[offs + 3];
int ypos = state->m_spriteram[offs + 2];
int code = state->m_spriteram[offs + 0] | ((state->m_spriteram[offs + 1] & 0x20) << 3);
int xpos = m_spriteram[offs + 3];
int ypos = m_spriteram[offs + 2];
int code = m_spriteram[offs + 0] | ((m_spriteram[offs + 1] & 0x20) << 3);
int flipx = 0;
int flipy = 0;
int color = state->m_spriteram[offs + 1] & 0x1f;
int color = m_spriteram[offs + 1] & 0x1f;
if (state->flip_screen_x())
if (flip_screen_x())
{
xpos = 240 - xpos;
flipx = !flipx;
}
if (state->flip_screen_y())
if (flip_screen_y())
{
ypos = 256 - ypos;
flipy = !flipy;
}
drawgfx_transpen(bitmap,cliprect,machine.gfx[1],
drawgfx_transpen(bitmap,cliprect,machine().gfx[1],
code,
color,
flipx,flipy,
@ -61,33 +61,33 @@ static void gigas_draw_sprites( running_machine &machine, bitmap_ind16 &bitmap,
}
static void pbillrd_draw_sprites( running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect )
void freekick_state::pbillrd_draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect )
{
freekick_state *state = machine.driver_data<freekick_state>();
//OBRISI.ME
int offs;
for (offs = 0; offs < state->m_spriteram.bytes(); offs += 4)
for (offs = 0; offs < m_spriteram.bytes(); offs += 4)
{
int xpos = state->m_spriteram[offs + 3];
int ypos = state->m_spriteram[offs + 2];
int code = state->m_spriteram[offs + 0];
int xpos = m_spriteram[offs + 3];
int ypos = m_spriteram[offs + 2];
int code = m_spriteram[offs + 0];
int flipx = 0;//state->m_spriteram[offs + 0] & 0x80; //?? unused ?
int flipy = 0;//state->m_spriteram[offs + 0] & 0x40;
int color = state->m_spriteram[offs + 1] & 0x0f;
int flipx = 0;//m_spriteram[offs + 0] & 0x80; //?? unused ?
int flipy = 0;//m_spriteram[offs + 0] & 0x40;
int color = m_spriteram[offs + 1] & 0x0f;
if (state->flip_screen_x())
if (flip_screen_x())
{
xpos = 240 - xpos;
flipx = !flipx;
}
if (state->flip_screen_y())
if (flip_screen_y())
{
ypos = 256 - ypos;
flipy = !flipy;
}
drawgfx_transpen(bitmap,cliprect,machine.gfx[1],
drawgfx_transpen(bitmap,cliprect,machine().gfx[1],
code,
color,
flipx,flipy,
@ -97,33 +97,33 @@ static void pbillrd_draw_sprites( running_machine &machine, bitmap_ind16 &bitmap
static void freekick_draw_sprites( running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect )
void freekick_state::freekick_draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect )
{
freekick_state *state = machine.driver_data<freekick_state>();
//OBRISI.ME
int offs;
for (offs = 0; offs < state->m_spriteram.bytes(); offs += 4)
for (offs = 0; offs < m_spriteram.bytes(); offs += 4)
{
int xpos = state->m_spriteram[offs + 3];
int ypos = state->m_spriteram[offs + 0];
int code = state->m_spriteram[offs + 1] + ((state->m_spriteram[offs + 2] & 0x20) << 3);
int xpos = m_spriteram[offs + 3];
int ypos = m_spriteram[offs + 0];
int code = m_spriteram[offs + 1] + ((m_spriteram[offs + 2] & 0x20) << 3);
int flipx = state->m_spriteram[offs + 2] & 0x80; //?? unused ?
int flipy = state->m_spriteram[offs + 2] & 0x40;
int color = state->m_spriteram[offs + 2] & 0x1f;
int flipx = m_spriteram[offs + 2] & 0x80; //?? unused ?
int flipy = m_spriteram[offs + 2] & 0x40;
int color = m_spriteram[offs + 2] & 0x1f;
if (state->flip_screen_x())
if (flip_screen_x())
{
xpos = 240 - xpos;
flipx = !flipx;
}
if (state->flip_screen_y())
if (flip_screen_y())
{
ypos = 256 - ypos;
flipy = !flipy;
}
drawgfx_transpen(bitmap,cliprect,machine.gfx[1],
drawgfx_transpen(bitmap,cliprect,machine().gfx[1],
code,
color,
flipx,flipy,
@ -134,20 +134,20 @@ static void freekick_draw_sprites( running_machine &machine, bitmap_ind16 &bitma
UINT32 freekick_state::screen_update_gigas(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
m_freek_tilemap->draw(bitmap, cliprect, 0, 0);
gigas_draw_sprites(machine(), bitmap, cliprect);
gigas_draw_sprites(bitmap, cliprect);
return 0;
}
UINT32 freekick_state::screen_update_pbillrd(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
m_freek_tilemap->draw(bitmap, cliprect, 0, 0);
pbillrd_draw_sprites(machine(), bitmap, cliprect);
pbillrd_draw_sprites(bitmap, cliprect);
return 0;
}
UINT32 freekick_state::screen_update_freekick(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
m_freek_tilemap->draw(bitmap, cliprect, 0, 0);
freekick_draw_sprites(machine(), bitmap, cliprect);
freekick_draw_sprites(bitmap, cliprect);
return 0;
}

View File

@ -15,44 +15,44 @@
******************************************************************************/
INLINE void fromanc2_get_tile_info( running_machine &machine, tile_data &tileinfo, int tile_index, int vram, int layer )
inline void fromanc2_state::fromanc2_get_tile_info( tile_data &tileinfo, int tile_index, int vram, int layer )
{
fromanc2_state *state = machine.driver_data<fromanc2_state>();
//OBRISI.ME
int tile, color;
tile = (state->m_videoram[vram][layer][tile_index] & 0x3fff) | (state->m_gfxbank[vram][layer] << 14);
color = ((state->m_videoram[vram][layer][tile_index] & 0xc000) >> 14) | (0x10 * vram);
tile = (m_videoram[vram][layer][tile_index] & 0x3fff) | (m_gfxbank[vram][layer] << 14);
color = ((m_videoram[vram][layer][tile_index] & 0xc000) >> 14) | (0x10 * vram);
SET_TILE_INFO(layer, tile, color, 0);
SET_TILE_INFO_MEMBER(layer, tile, color, 0);
}
TILE_GET_INFO_MEMBER(fromanc2_state::fromanc2_get_v0_l0_tile_info){ fromanc2_get_tile_info(machine(), tileinfo, tile_index, 0, 0); }
TILE_GET_INFO_MEMBER(fromanc2_state::fromanc2_get_v0_l1_tile_info){ fromanc2_get_tile_info(machine(), tileinfo, tile_index, 0, 1); }
TILE_GET_INFO_MEMBER(fromanc2_state::fromanc2_get_v0_l2_tile_info){ fromanc2_get_tile_info(machine(), tileinfo, tile_index, 0, 2); }
TILE_GET_INFO_MEMBER(fromanc2_state::fromanc2_get_v0_l3_tile_info){ fromanc2_get_tile_info(machine(), tileinfo, tile_index, 0, 3); }
TILE_GET_INFO_MEMBER(fromanc2_state::fromanc2_get_v1_l0_tile_info){ fromanc2_get_tile_info(machine(), tileinfo, tile_index, 1, 0); }
TILE_GET_INFO_MEMBER(fromanc2_state::fromanc2_get_v1_l1_tile_info){ fromanc2_get_tile_info(machine(), tileinfo, tile_index, 1, 1); }
TILE_GET_INFO_MEMBER(fromanc2_state::fromanc2_get_v1_l2_tile_info){ fromanc2_get_tile_info(machine(), tileinfo, tile_index, 1, 2); }
TILE_GET_INFO_MEMBER(fromanc2_state::fromanc2_get_v1_l3_tile_info){ fromanc2_get_tile_info(machine(), tileinfo, tile_index, 1, 3); }
TILE_GET_INFO_MEMBER(fromanc2_state::fromanc2_get_v0_l0_tile_info){ fromanc2_get_tile_info(tileinfo, tile_index, 0, 0); }
TILE_GET_INFO_MEMBER(fromanc2_state::fromanc2_get_v0_l1_tile_info){ fromanc2_get_tile_info(tileinfo, tile_index, 0, 1); }
TILE_GET_INFO_MEMBER(fromanc2_state::fromanc2_get_v0_l2_tile_info){ fromanc2_get_tile_info(tileinfo, tile_index, 0, 2); }
TILE_GET_INFO_MEMBER(fromanc2_state::fromanc2_get_v0_l3_tile_info){ fromanc2_get_tile_info(tileinfo, tile_index, 0, 3); }
TILE_GET_INFO_MEMBER(fromanc2_state::fromanc2_get_v1_l0_tile_info){ fromanc2_get_tile_info(tileinfo, tile_index, 1, 0); }
TILE_GET_INFO_MEMBER(fromanc2_state::fromanc2_get_v1_l1_tile_info){ fromanc2_get_tile_info(tileinfo, tile_index, 1, 1); }
TILE_GET_INFO_MEMBER(fromanc2_state::fromanc2_get_v1_l2_tile_info){ fromanc2_get_tile_info(tileinfo, tile_index, 1, 2); }
TILE_GET_INFO_MEMBER(fromanc2_state::fromanc2_get_v1_l3_tile_info){ fromanc2_get_tile_info(tileinfo, tile_index, 1, 3); }
INLINE void fromancr_get_tile_info( running_machine &machine, tile_data &tileinfo, int tile_index, int vram, int layer )
inline void fromanc2_state::fromancr_get_tile_info( tile_data &tileinfo, int tile_index, int vram, int layer )
{
fromanc2_state *state = machine.driver_data<fromanc2_state>();
//OBRISI.ME
int tile, color;
tile = state->m_videoram[vram][layer][tile_index] | (state->m_gfxbank[vram][layer] << 16);
tile = m_videoram[vram][layer][tile_index] | (m_gfxbank[vram][layer] << 16);
color = vram;
SET_TILE_INFO(layer, tile, color, 0);
SET_TILE_INFO_MEMBER(layer, tile, color, 0);
}
TILE_GET_INFO_MEMBER(fromanc2_state::fromancr_get_v0_l0_tile_info){ fromancr_get_tile_info(machine(), tileinfo, tile_index, 0, 0); }
TILE_GET_INFO_MEMBER(fromanc2_state::fromancr_get_v0_l1_tile_info){ fromancr_get_tile_info(machine(), tileinfo, tile_index, 0, 1); }
TILE_GET_INFO_MEMBER(fromanc2_state::fromancr_get_v0_l2_tile_info){ fromancr_get_tile_info(machine(), tileinfo, tile_index, 0, 2); }
TILE_GET_INFO_MEMBER(fromanc2_state::fromancr_get_v1_l0_tile_info){ fromancr_get_tile_info(machine(), tileinfo, tile_index, 1, 0); }
TILE_GET_INFO_MEMBER(fromanc2_state::fromancr_get_v1_l1_tile_info){ fromancr_get_tile_info(machine(), tileinfo, tile_index, 1, 1); }
TILE_GET_INFO_MEMBER(fromanc2_state::fromancr_get_v1_l2_tile_info){ fromancr_get_tile_info(machine(), tileinfo, tile_index, 1, 2); }
TILE_GET_INFO_MEMBER(fromanc2_state::fromancr_get_v0_l0_tile_info){ fromancr_get_tile_info(tileinfo, tile_index, 0, 0); }
TILE_GET_INFO_MEMBER(fromanc2_state::fromancr_get_v0_l1_tile_info){ fromancr_get_tile_info(tileinfo, tile_index, 0, 1); }
TILE_GET_INFO_MEMBER(fromanc2_state::fromancr_get_v0_l2_tile_info){ fromancr_get_tile_info(tileinfo, tile_index, 0, 2); }
TILE_GET_INFO_MEMBER(fromanc2_state::fromancr_get_v1_l0_tile_info){ fromancr_get_tile_info(tileinfo, tile_index, 1, 0); }
TILE_GET_INFO_MEMBER(fromanc2_state::fromancr_get_v1_l1_tile_info){ fromancr_get_tile_info(tileinfo, tile_index, 1, 1); }
TILE_GET_INFO_MEMBER(fromanc2_state::fromancr_get_v1_l2_tile_info){ fromancr_get_tile_info(tileinfo, tile_index, 1, 2); }
/******************************************************************************
@ -160,19 +160,19 @@ WRITE16_MEMBER(fromanc2_state::fromanc4_paletteram_1_w)
}
INLINE void fromanc2_dispvram_w( running_machine &machine, offs_t offset, UINT16 data, UINT16 mem_mask, int vram, int layer )
inline void fromanc2_state::fromanc2_dispvram_w( offs_t offset, UINT16 data, UINT16 mem_mask, int vram, int layer )
{
fromanc2_state *state = machine.driver_data<fromanc2_state>();
//OBRISI.ME
layer += (offset < 0x1000) ? 0 : 1;
COMBINE_DATA(&state->m_videoram[vram][layer][offset & 0x0fff]);
state->m_tilemap[vram][layer]->mark_tile_dirty(offset & 0x0fff);
COMBINE_DATA(&m_videoram[vram][layer][offset & 0x0fff]);
m_tilemap[vram][layer]->mark_tile_dirty(offset & 0x0fff);
}
WRITE16_MEMBER(fromanc2_state::fromanc2_videoram_0_w){ fromanc2_dispvram_w(machine(), offset, data, mem_mask, 0, 0); }
WRITE16_MEMBER(fromanc2_state::fromanc2_videoram_1_w){ fromanc2_dispvram_w(machine(), offset, data, mem_mask, 0, 2); }
WRITE16_MEMBER(fromanc2_state::fromanc2_videoram_2_w){ fromanc2_dispvram_w(machine(), offset, data, mem_mask, 1, 0); }
WRITE16_MEMBER(fromanc2_state::fromanc2_videoram_3_w){ fromanc2_dispvram_w(machine(), offset, data, mem_mask, 1, 2); }
WRITE16_MEMBER(fromanc2_state::fromanc2_videoram_0_w){ fromanc2_dispvram_w(offset, data, mem_mask, 0, 0); }
WRITE16_MEMBER(fromanc2_state::fromanc2_videoram_1_w){ fromanc2_dispvram_w(offset, data, mem_mask, 0, 2); }
WRITE16_MEMBER(fromanc2_state::fromanc2_videoram_2_w){ fromanc2_dispvram_w(offset, data, mem_mask, 1, 0); }
WRITE16_MEMBER(fromanc2_state::fromanc2_videoram_3_w){ fromanc2_dispvram_w(offset, data, mem_mask, 1, 2); }
WRITE16_MEMBER(fromanc2_state::fromanc2_gfxreg_0_w)
{
@ -251,18 +251,18 @@ WRITE16_MEMBER(fromanc2_state::fromanc2_gfxbank_1_w)
}
INLINE void fromancr_vram_w(running_machine &machine, offs_t offset, UINT16 data, UINT16 mem_mask, int layer )
inline void fromanc2_state::fromancr_vram_w(offs_t offset, UINT16 data, UINT16 mem_mask, int layer )
{
fromanc2_state *state = machine.driver_data<fromanc2_state>();
//OBRISI.ME
int vram = (offset < 0x1000) ? 0 : 1;
COMBINE_DATA(&state->m_videoram[vram][layer][offset & 0x0fff]);
state->m_tilemap[vram][layer]->mark_tile_dirty(offset & 0x0fff);
COMBINE_DATA(&m_videoram[vram][layer][offset & 0x0fff]);
m_tilemap[vram][layer]->mark_tile_dirty(offset & 0x0fff);
}
WRITE16_MEMBER(fromanc2_state::fromancr_videoram_0_w){ fromancr_vram_w(machine(), offset, data, mem_mask, 1); }
WRITE16_MEMBER(fromanc2_state::fromancr_videoram_1_w){ fromancr_vram_w(machine(), offset, data, mem_mask, 0); }
WRITE16_MEMBER(fromanc2_state::fromancr_videoram_2_w){ fromancr_vram_w(machine(), offset, data, mem_mask, 2); }
WRITE16_MEMBER(fromanc2_state::fromancr_videoram_0_w){ fromancr_vram_w(offset, data, mem_mask, 1); }
WRITE16_MEMBER(fromanc2_state::fromancr_videoram_1_w){ fromancr_vram_w(offset, data, mem_mask, 0); }
WRITE16_MEMBER(fromanc2_state::fromancr_videoram_2_w){ fromancr_vram_w(offset, data, mem_mask, 2); }
WRITE16_MEMBER(fromanc2_state::fromancr_gfxreg_0_w)
{
@ -290,33 +290,33 @@ WRITE16_MEMBER(fromanc2_state::fromancr_gfxreg_1_w)
}
}
void fromancr_gfxbank_w( running_machine &machine, int data )
void fromanc2_state::fromancr_gfxbank_w( int data )
{
fromanc2_state *state = machine.driver_data<fromanc2_state>();
//OBRISI.ME
state->m_gfxbank[0][0] = (data & 0x0010) >> 4; // BG (1P)
state->m_gfxbank[0][1] = (data & 0xf000) >> 12; // FG (1P)
state->m_gfxbank[1][0] = (data & 0x0008) >> 3; // BG (2P)
state->m_gfxbank[1][1] = (data & 0x0f00) >> 8; // FG (2P)
state->m_tilemap[0][0]->mark_all_dirty();
state->m_tilemap[0][1]->mark_all_dirty();
state->m_tilemap[1][0]->mark_all_dirty();
state->m_tilemap[1][1]->mark_all_dirty();
m_gfxbank[0][0] = (data & 0x0010) >> 4; // BG (1P)
m_gfxbank[0][1] = (data & 0xf000) >> 12; // FG (1P)
m_gfxbank[1][0] = (data & 0x0008) >> 3; // BG (2P)
m_gfxbank[1][1] = (data & 0x0f00) >> 8; // FG (2P)
m_tilemap[0][0]->mark_all_dirty();
m_tilemap[0][1]->mark_all_dirty();
m_tilemap[1][0]->mark_all_dirty();
m_tilemap[1][1]->mark_all_dirty();
}
INLINE void fromanc4_vram_w( running_machine &machine, offs_t offset, UINT16 data, UINT16 mem_mask, int layer )
inline void fromanc2_state::fromanc4_vram_w( offs_t offset, UINT16 data, UINT16 mem_mask, int layer )
{
fromanc2_state *state = machine.driver_data<fromanc2_state>();
//OBRISI.ME
int vram = (offset < 0x4000) ? 0 : 1;
COMBINE_DATA(&state->m_videoram[vram][layer][offset & 0x3fff]);
state->m_tilemap[vram][layer]->mark_tile_dirty(offset & 0x3fff);
COMBINE_DATA(&m_videoram[vram][layer][offset & 0x3fff]);
m_tilemap[vram][layer]->mark_tile_dirty(offset & 0x3fff);
}
WRITE16_MEMBER(fromanc2_state::fromanc4_videoram_0_w){ fromanc4_vram_w(machine(), offset, data, mem_mask, 2); }
WRITE16_MEMBER(fromanc2_state::fromanc4_videoram_1_w){ fromanc4_vram_w(machine(), offset, data, mem_mask, 1); }
WRITE16_MEMBER(fromanc2_state::fromanc4_videoram_2_w){ fromanc4_vram_w(machine(), offset, data, mem_mask, 0); }
WRITE16_MEMBER(fromanc2_state::fromanc4_videoram_0_w){ fromanc4_vram_w(offset, data, mem_mask, 2); }
WRITE16_MEMBER(fromanc2_state::fromanc4_videoram_1_w){ fromanc4_vram_w(offset, data, mem_mask, 1); }
WRITE16_MEMBER(fromanc2_state::fromanc4_videoram_2_w){ fromanc4_vram_w(offset, data, mem_mask, 0); }
WRITE16_MEMBER(fromanc2_state::fromanc4_gfxreg_0_w)
{

View File

@ -19,33 +19,33 @@
*
*************************************/
INLINE void get_fromance_tile_info( running_machine &machine, tile_data &tileinfo, int tile_index, int layer )
inline void fromance_state::get_fromance_tile_info( tile_data &tileinfo, int tile_index, int layer )
{
fromance_state *state = machine.driver_data<fromance_state>();
int tile = ((state->m_local_videoram[layer][0x0000 + tile_index] & 0x80) << 9) |
(state->m_local_videoram[layer][0x1000 + tile_index] << 8) |
state->m_local_videoram[layer][0x2000 + tile_index];
int color = state->m_local_videoram[layer][tile_index] & 0x7f;
//OBRISI.ME
int tile = ((m_local_videoram[layer][0x0000 + tile_index] & 0x80) << 9) |
(m_local_videoram[layer][0x1000 + tile_index] << 8) |
m_local_videoram[layer][0x2000 + tile_index];
int color = m_local_videoram[layer][tile_index] & 0x7f;
SET_TILE_INFO(layer, tile, color, 0);
SET_TILE_INFO_MEMBER(layer, tile, color, 0);
}
TILE_GET_INFO_MEMBER(fromance_state::get_fromance_bg_tile_info){ get_fromance_tile_info(machine(), tileinfo, tile_index, 0); }
TILE_GET_INFO_MEMBER(fromance_state::get_fromance_fg_tile_info){ get_fromance_tile_info(machine(), tileinfo, tile_index, 1); }
TILE_GET_INFO_MEMBER(fromance_state::get_fromance_bg_tile_info){ get_fromance_tile_info(tileinfo, tile_index, 0); }
TILE_GET_INFO_MEMBER(fromance_state::get_fromance_fg_tile_info){ get_fromance_tile_info(tileinfo, tile_index, 1); }
INLINE void get_nekkyoku_tile_info( running_machine &machine, tile_data &tileinfo, int tile_index, int layer )
inline void fromance_state::get_nekkyoku_tile_info( tile_data &tileinfo, int tile_index, int layer )
{
fromance_state *state = machine.driver_data<fromance_state>();
int tile = (state->m_local_videoram[layer][0x0000 + tile_index] << 8) |
state->m_local_videoram[layer][0x1000 + tile_index];
int color = state->m_local_videoram[layer][tile_index + 0x2000] & 0x3f;
//OBRISI.ME
int tile = (m_local_videoram[layer][0x0000 + tile_index] << 8) |
m_local_videoram[layer][0x1000 + tile_index];
int color = m_local_videoram[layer][tile_index + 0x2000] & 0x3f;
SET_TILE_INFO(layer, tile, color, 0);
SET_TILE_INFO_MEMBER(layer, tile, color, 0);
}
TILE_GET_INFO_MEMBER(fromance_state::get_nekkyoku_bg_tile_info){ get_nekkyoku_tile_info(machine(), tileinfo, tile_index, 0); }
TILE_GET_INFO_MEMBER(fromance_state::get_nekkyoku_fg_tile_info){ get_nekkyoku_tile_info(machine(), tileinfo, tile_index, 1); }
TILE_GET_INFO_MEMBER(fromance_state::get_nekkyoku_bg_tile_info){ get_nekkyoku_tile_info(tileinfo, tile_index, 0); }
TILE_GET_INFO_MEMBER(fromance_state::get_nekkyoku_fg_tile_info){ get_nekkyoku_tile_info(tileinfo, tile_index, 1); }
@ -55,38 +55,38 @@ TILE_GET_INFO_MEMBER(fromance_state::get_nekkyoku_fg_tile_info){ get_nekkyoku_ti
*
*************************************/
static void init_common( running_machine &machine )
void fromance_state::init_common( )
{
fromance_state *state = machine.driver_data<fromance_state>();
//OBRISI.ME
/* allocate local videoram */
state->m_local_videoram[0] = auto_alloc_array(machine, UINT8, 0x1000 * 3);
state->m_local_videoram[1] = auto_alloc_array(machine, UINT8, 0x1000 * 3);
m_local_videoram[0] = auto_alloc_array(machine(), UINT8, 0x1000 * 3);
m_local_videoram[1] = auto_alloc_array(machine(), UINT8, 0x1000 * 3);
/* allocate local palette RAM */
state->m_local_paletteram = auto_alloc_array(machine, UINT8, 0x800 * 2);
m_local_paletteram = auto_alloc_array(machine(), UINT8, 0x800 * 2);
/* configure tilemaps */
state->m_fg_tilemap->set_transparent_pen(15);
m_fg_tilemap->set_transparent_pen(15);
/* reset the timer */
state->m_crtc_timer = machine.scheduler().timer_alloc(timer_expired_delegate(FUNC(fromance_state::crtc_interrupt_gen),state));
m_crtc_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(fromance_state::crtc_interrupt_gen),this));
/* state save */
state->save_item(NAME(state->m_selected_videoram));
state->save_pointer(NAME(state->m_local_videoram[0]), 0x1000 * 3);
state->save_pointer(NAME(state->m_local_videoram[1]), 0x1000 * 3);
state->save_item(NAME(state->m_selected_paletteram));
state->save_item(NAME(state->m_scrollx));
state->save_item(NAME(state->m_scrolly));
state->save_item(NAME(state->m_gfxreg));
state->save_item(NAME(state->m_flipscreen));
state->save_item(NAME(state->m_flipscreen_old));
state->save_item(NAME(state->m_scrollx_ofs));
state->save_item(NAME(state->m_scrolly_ofs));
state->save_item(NAME(state->m_crtc_register));
state->save_item(NAME(state->m_crtc_data));
state->save_pointer(NAME(state->m_local_paletteram), 0x800 * 2);
save_item(NAME(m_selected_videoram));
save_pointer(NAME(m_local_videoram[0]), 0x1000 * 3);
save_pointer(NAME(m_local_videoram[1]), 0x1000 * 3);
save_item(NAME(m_selected_paletteram));
save_item(NAME(m_scrollx));
save_item(NAME(m_scrolly));
save_item(NAME(m_gfxreg));
save_item(NAME(m_flipscreen));
save_item(NAME(m_flipscreen_old));
save_item(NAME(m_scrollx_ofs));
save_item(NAME(m_scrolly_ofs));
save_item(NAME(m_crtc_register));
save_item(NAME(m_crtc_data));
save_pointer(NAME(m_local_paletteram), 0x800 * 2);
}
VIDEO_START_MEMBER(fromance_state,fromance)
@ -95,7 +95,7 @@ VIDEO_START_MEMBER(fromance_state,fromance)
m_bg_tilemap = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(fromance_state::get_fromance_bg_tile_info),this), TILEMAP_SCAN_ROWS, 8, 4, 64, 64);
m_fg_tilemap = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(fromance_state::get_fromance_fg_tile_info),this), TILEMAP_SCAN_ROWS, 8, 4, 64, 64);
init_common(machine());
init_common();
}
VIDEO_START_MEMBER(fromance_state,nekkyoku)
@ -104,7 +104,7 @@ VIDEO_START_MEMBER(fromance_state,nekkyoku)
m_bg_tilemap = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(fromance_state::get_nekkyoku_bg_tile_info),this), TILEMAP_SCAN_ROWS, 8, 4, 64, 64);
m_fg_tilemap = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(fromance_state::get_nekkyoku_fg_tile_info),this), TILEMAP_SCAN_ROWS, 8, 4, 64, 64);
init_common(machine());
init_common();
}
VIDEO_START_MEMBER(fromance_state,pipedrm)

View File

@ -90,65 +90,65 @@ void funkybee_state::video_start()
m_bg_tilemap = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(funkybee_state::get_bg_tile_info),this), tilemap_mapper_delegate(FUNC(funkybee_state::funkybee_tilemap_scan),this), 8, 8, 32, 32);
}
static void draw_sprites( running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect )
void funkybee_state::draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect )
{
funkybee_state *state = machine.driver_data<funkybee_state>();
//OBRISI.ME
int offs;
for (offs = 0x0f; offs >= 0; offs--)
{
int offs2 = offs + 0x1e00;
int attr = state->m_videoram[offs2];
int attr = m_videoram[offs2];
int code = (attr >> 2) | ((attr & 2) << 5);
int color = state->m_colorram[offs2 + 0x10];
int color = m_colorram[offs2 + 0x10];
int flipx = 0;
int flipy = attr & 0x01;
int sx = state->m_videoram[offs2 + 0x10];
int sy = 224 - state->m_colorram[offs2];
int sx = m_videoram[offs2 + 0x10];
int sy = 224 - m_colorram[offs2];
if (state->flip_screen())
if (flip_screen())
{
sy += 32;
flipx = !flipx;
}
drawgfx_transpen(bitmap,cliprect, machine.gfx[2 + state->m_gfx_bank],
drawgfx_transpen(bitmap,cliprect, machine().gfx[2 + m_gfx_bank],
code, color,
flipx, flipy,
sx, sy, 0);
}
}
static void draw_columns( running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect )
void funkybee_state::draw_columns( bitmap_ind16 &bitmap, const rectangle &cliprect )
{
funkybee_state *state = machine.driver_data<funkybee_state>();
//OBRISI.ME
int offs;
for (offs = 0x1f; offs >= 0; offs--)
{
int const flip = state->flip_screen();
int code = state->m_videoram[0x1c00 + offs];
int color = state->m_colorram[0x1f10] & 0x03;
int sx = flip ? state->m_videoram[0x1f1f] : state->m_videoram[0x1f10];
int const flip = flip_screen();
int code = m_videoram[0x1c00 + offs];
int color = m_colorram[0x1f10] & 0x03;
int sx = flip ? m_videoram[0x1f1f] : m_videoram[0x1f10];
int sy = offs * 8;
if (flip)
sy = 248 - sy;
drawgfx_transpen(bitmap,cliprect,machine.gfx[state->m_gfx_bank],
drawgfx_transpen(bitmap,cliprect,machine().gfx[m_gfx_bank],
code, color,
flip, flip,
sx, sy,0);
code = state->m_videoram[0x1d00 + offs];
color = state->m_colorram[0x1f11] & 0x03;
sx = flip ? state->m_videoram[0x1f1e] : state->m_videoram[0x1f11];
code = m_videoram[0x1d00 + offs];
color = m_colorram[0x1f11] & 0x03;
sx = flip ? m_videoram[0x1f1e] : m_videoram[0x1f11];
sy = offs * 8;
if (flip)
sy = 248 - sy;
drawgfx_transpen(bitmap,cliprect,machine.gfx[state->m_gfx_bank],
drawgfx_transpen(bitmap,cliprect,machine().gfx[m_gfx_bank],
code, color,
flip, flip,
sx, sy,0);
@ -158,7 +158,7 @@ static void draw_columns( running_machine &machine, bitmap_ind16 &bitmap, const
UINT32 funkybee_state::screen_update_funkybee(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
m_bg_tilemap->draw(bitmap, cliprect, 0, 0);
draw_sprites(machine(), bitmap, cliprect);
draw_columns(machine(), bitmap, cliprect);
draw_sprites(bitmap, cliprect);
draw_columns(bitmap, cliprect);
return 0;
}

View File

@ -27,10 +27,10 @@ void funybubl_state::video_start()
{
}
static void draw_sprites( running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect )
void funybubl_state::draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect )
{
funybubl_state *state = machine.driver_data<funybubl_state>();
UINT8 *source = &state->m_banked_vram[0x2000 - 0x20];
//OBRISI.ME
UINT8 *source = &m_banked_vram[0x2000 - 0x20];
UINT8 *finish = source - 0x1000;
while (source > finish)
@ -66,7 +66,7 @@ static void draw_sprites( running_machine &machine, bitmap_ind16 &bitmap, const
// bits 0x40 and 0x10 not used?...
drawgfx_transpen(bitmap, cliprect, machine.gfx[1], tile, 0, 0, 0, xpos, ypos, 255);
drawgfx_transpen(bitmap, cliprect, machine().gfx[1], tile, 0, 0, 0, xpos, ypos, 255);
source -= 0x20;
}
}
@ -92,7 +92,7 @@ UINT32 funybubl_state::screen_update_funybubl(screen_device &screen, bitmap_ind1
}
}
draw_sprites(machine(), bitmap, cliprect);
draw_sprites(bitmap, cliprect);
#if 0
if ( machine().input().code_pressed_once(KEYCODE_W) )

View File

@ -44,30 +44,29 @@
***************************************************************************/
INLINE void get_tile_info(running_machine &machine, tile_data &tileinfo, tilemap_memory_index tile_index, int _N_)
inline void fuuki16_state::get_tile_info(tile_data &tileinfo, tilemap_memory_index tile_index, int _N_)
{
fuuki16_state *state = machine.driver_data<fuuki16_state>();
UINT16 code = state->m_vram[_N_][2 * tile_index + 0];
UINT16 attr = state->m_vram[_N_][2 * tile_index + 1];
SET_TILE_INFO(1 + _N_, code, attr & 0x3f, TILE_FLIPYX((attr >> 6) & 3));
//OBRISI.ME
UINT16 code = m_vram[_N_][2 * tile_index + 0];
UINT16 attr = m_vram[_N_][2 * tile_index + 1];
SET_TILE_INFO_MEMBER(1 + _N_, code, attr & 0x3f, TILE_FLIPYX((attr >> 6) & 3));
}
TILE_GET_INFO_MEMBER(fuuki16_state::get_tile_info_0){ get_tile_info(machine(), tileinfo, tile_index, 0); }
TILE_GET_INFO_MEMBER(fuuki16_state::get_tile_info_1){ get_tile_info(machine(), tileinfo, tile_index, 1); }
TILE_GET_INFO_MEMBER(fuuki16_state::get_tile_info_2){ get_tile_info(machine(), tileinfo, tile_index, 2); }
TILE_GET_INFO_MEMBER(fuuki16_state::get_tile_info_3){ get_tile_info(machine(), tileinfo, tile_index, 3); }
TILE_GET_INFO_MEMBER(fuuki16_state::get_tile_info_0){ get_tile_info(tileinfo, tile_index, 0); }
TILE_GET_INFO_MEMBER(fuuki16_state::get_tile_info_1){ get_tile_info(tileinfo, tile_index, 1); }
TILE_GET_INFO_MEMBER(fuuki16_state::get_tile_info_2){ get_tile_info(tileinfo, tile_index, 2); }
TILE_GET_INFO_MEMBER(fuuki16_state::get_tile_info_3){ get_tile_info(tileinfo, tile_index, 3); }
INLINE void fuuki16_vram_w(address_space &space, offs_t offset, UINT16 data, UINT16 mem_mask, int _N_)
inline void fuuki16_state::fuuki16_vram_w(offs_t offset, UINT16 data, UINT16 mem_mask, int _N_)
{
fuuki16_state *state = space.machine().driver_data<fuuki16_state>();
COMBINE_DATA(&state->m_vram[_N_][offset]);
state->m_tilemap[_N_]->mark_tile_dirty(offset / 2);
COMBINE_DATA(&m_vram[_N_][offset]);
m_tilemap[_N_]->mark_tile_dirty(offset / 2);
}
WRITE16_MEMBER(fuuki16_state::fuuki16_vram_0_w){ fuuki16_vram_w(space, offset, data, mem_mask, 0); }
WRITE16_MEMBER(fuuki16_state::fuuki16_vram_1_w){ fuuki16_vram_w(space, offset, data, mem_mask, 1); }
WRITE16_MEMBER(fuuki16_state::fuuki16_vram_2_w){ fuuki16_vram_w(space, offset, data, mem_mask, 2); }
WRITE16_MEMBER(fuuki16_state::fuuki16_vram_3_w){ fuuki16_vram_w(space, offset, data, mem_mask, 3); }
WRITE16_MEMBER(fuuki16_state::fuuki16_vram_0_w){ fuuki16_vram_w(offset, data, mem_mask, 0); }
WRITE16_MEMBER(fuuki16_state::fuuki16_vram_1_w){ fuuki16_vram_w(offset, data, mem_mask, 1); }
WRITE16_MEMBER(fuuki16_state::fuuki16_vram_2_w){ fuuki16_vram_w(offset, data, mem_mask, 2); }
WRITE16_MEMBER(fuuki16_state::fuuki16_vram_3_w){ fuuki16_vram_w(offset, data, mem_mask, 3); }
/***************************************************************************
@ -135,19 +134,18 @@ void fuuki16_state::video_start()
***************************************************************************/
static void draw_sprites( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect )
void fuuki16_state::draw_sprites( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect )
{
fuuki16_state *state = screen.machine().driver_data<fuuki16_state>();
int offs;
gfx_element *gfx = screen.machine().gfx[0];
bitmap_ind8 &priority_bitmap = screen.machine().priority_bitmap;
const rectangle &visarea = screen.visible_area();
UINT16 *spriteram16 = state->m_spriteram;
UINT16 *spriteram16 = m_spriteram;
int max_x = visarea.max_x + 1;
int max_y = visarea.max_y + 1;
/* Draw them backwards, for pdrawgfx */
for ( offs = (state->m_spriteram.bytes() - 8) / 2; offs >=0; offs -= 8 / 2 )
for ( offs = (m_spriteram.bytes() - 8) / 2; offs >=0; offs -= 8 / 2 )
{
int x, y, xstart, ystart, xend, yend, xinc, yinc;
int xnum, ynum, xzoom, yzoom, flipx, flipy;
@ -182,7 +180,7 @@ static void draw_sprites( screen_device &screen, bitmap_ind16 &bitmap, const rec
sx = (sx & 0x1ff) - (sx & 0x200);
sy = (sy & 0x1ff) - (sy & 0x200);
if (state->flip_screen())
if (flip_screen())
{
flipx = !flipx; sx = max_x - sx - xnum * 16;
flipy = !flipy; sy = max_y - sy - ynum * 16;
@ -265,19 +263,19 @@ if (screen.machine().input().code_pressed(KEYCODE_X))
***************************************************************************/
/* Wrapper to handle bg and bg2 ttogether */
static void fuuki16_draw_layer( running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect, int i, int flag, int pri )
void fuuki16_state::fuuki16_draw_layer( bitmap_ind16 &bitmap, const rectangle &cliprect, int i, int flag, int pri )
{
fuuki16_state *state = machine.driver_data<fuuki16_state>();
int buffer = (state->m_vregs[0x1e / 2] & 0x40);
//OBRISI.ME
int buffer = (m_vregs[0x1e / 2] & 0x40);
switch( i )
{
case 2: if (buffer) state->m_tilemap[3]->draw(bitmap, cliprect, flag, pri);
else state->m_tilemap[2]->draw(bitmap, cliprect, flag, pri);
case 2: if (buffer) m_tilemap[3]->draw(bitmap, cliprect, flag, pri);
else m_tilemap[2]->draw(bitmap, cliprect, flag, pri);
return;
case 1: state->m_tilemap[1]->draw(bitmap, cliprect, flag, pri);
case 1: m_tilemap[1]->draw(bitmap, cliprect, flag, pri);
return;
case 0: state->m_tilemap[0]->draw(bitmap, cliprect, flag, pri);
case 0: m_tilemap[0]->draw(bitmap, cliprect, flag, pri);
return;
}
}
@ -339,9 +337,9 @@ UINT32 fuuki16_state::screen_update_fuuki16(screen_device &screen, bitmap_ind16
bitmap.fill((0x800 * 4) - 1, cliprect);
machine().priority_bitmap.fill(0, cliprect);
fuuki16_draw_layer(machine(), bitmap, cliprect, tm_back, 0, 1);
fuuki16_draw_layer(machine(), bitmap, cliprect, tm_middle, 0, 2);
fuuki16_draw_layer(machine(), bitmap, cliprect, tm_front, 0, 4);
fuuki16_draw_layer(bitmap, cliprect, tm_back, 0, 1);
fuuki16_draw_layer(bitmap, cliprect, tm_middle, 0, 2);
fuuki16_draw_layer(bitmap, cliprect, tm_front, 0, 4);
draw_sprites(screen, bitmap, cliprect);

View File

@ -48,39 +48,38 @@
***************************************************************************/
INLINE void get_tile_info8bpp(running_machine &machine, tile_data &tileinfo, tilemap_memory_index tile_index, int _N_)
inline void fuuki32_state::get_tile_info8bpp(tile_data &tileinfo, tilemap_memory_index tile_index, int _N_)
{
fuuki32_state *state = machine.driver_data<fuuki32_state>();
UINT16 code = (state->m_vram[_N_][tile_index] & 0xffff0000) >> 16;
UINT16 attr = (state->m_vram[_N_][tile_index] & 0x0000ffff);
SET_TILE_INFO(1 + _N_, code, (attr & 0x3f) >> 4, TILE_FLIPYX((attr >> 6) & 3));
//OBRISI.ME
UINT16 code = (m_vram[_N_][tile_index] & 0xffff0000) >> 16;
UINT16 attr = (m_vram[_N_][tile_index] & 0x0000ffff);
SET_TILE_INFO_MEMBER(1 + _N_, code, (attr & 0x3f) >> 4, TILE_FLIPYX((attr >> 6) & 3));
}
TILE_GET_INFO_MEMBER(fuuki32_state::get_tile_info_0){ get_tile_info8bpp(machine(), tileinfo, tile_index, 0); }
TILE_GET_INFO_MEMBER(fuuki32_state::get_tile_info_1){ get_tile_info8bpp(machine(), tileinfo, tile_index, 1); }
TILE_GET_INFO_MEMBER(fuuki32_state::get_tile_info_0){ get_tile_info8bpp(tileinfo, tile_index, 0); }
TILE_GET_INFO_MEMBER(fuuki32_state::get_tile_info_1){ get_tile_info8bpp(tileinfo, tile_index, 1); }
INLINE void get_tile_info4bpp(running_machine &machine, tile_data &tileinfo, tilemap_memory_index tile_index, int _N_)
inline void fuuki32_state::get_tile_info4bpp(tile_data &tileinfo, tilemap_memory_index tile_index, int _N_)
{
fuuki32_state *state = machine.driver_data<fuuki32_state>();
UINT16 code = (state->m_vram[_N_][tile_index] & 0xffff0000) >> 16;
UINT16 attr = (state->m_vram[_N_][tile_index] & 0x0000ffff);
SET_TILE_INFO(1 + _N_, code, attr & 0x3f, TILE_FLIPYX((attr >> 6) & 3));
//OBRISI.ME
UINT16 code = (m_vram[_N_][tile_index] & 0xffff0000) >> 16;
UINT16 attr = (m_vram[_N_][tile_index] & 0x0000ffff);
SET_TILE_INFO_MEMBER(1 + _N_, code, attr & 0x3f, TILE_FLIPYX((attr >> 6) & 3));
}
TILE_GET_INFO_MEMBER(fuuki32_state::get_tile_info_2){ get_tile_info4bpp(machine(), tileinfo, tile_index, 2); }
TILE_GET_INFO_MEMBER(fuuki32_state::get_tile_info_3){ get_tile_info4bpp(machine(), tileinfo, tile_index, 3); }
TILE_GET_INFO_MEMBER(fuuki32_state::get_tile_info_2){ get_tile_info4bpp(tileinfo, tile_index, 2); }
TILE_GET_INFO_MEMBER(fuuki32_state::get_tile_info_3){ get_tile_info4bpp(tileinfo, tile_index, 3); }
INLINE void fuuki32_vram_w(address_space &space, offs_t offset, UINT32 data, UINT32 mem_mask, int _N_)
inline void fuuki32_state::fuuki32_vram_w(offs_t offset, UINT32 data, UINT32 mem_mask, int _N_)
{
fuuki32_state *state = space.machine().driver_data<fuuki32_state>();
COMBINE_DATA(&state->m_vram[_N_][offset]);
state->m_tilemap[_N_]->mark_tile_dirty(offset);
COMBINE_DATA(&m_vram[_N_][offset]);
m_tilemap[_N_]->mark_tile_dirty(offset);
}
WRITE32_MEMBER(fuuki32_state::fuuki32_vram_0_w){ fuuki32_vram_w(space, offset, data, mem_mask, 0); }
WRITE32_MEMBER(fuuki32_state::fuuki32_vram_1_w){ fuuki32_vram_w(space, offset, data, mem_mask, 1); }
WRITE32_MEMBER(fuuki32_state::fuuki32_vram_2_w){ fuuki32_vram_w(space, offset, data, mem_mask, 2); }
WRITE32_MEMBER(fuuki32_state::fuuki32_vram_3_w){ fuuki32_vram_w(space, offset, data, mem_mask, 3); }
WRITE32_MEMBER(fuuki32_state::fuuki32_vram_0_w){ fuuki32_vram_w(offset, data, mem_mask, 0); }
WRITE32_MEMBER(fuuki32_state::fuuki32_vram_1_w){ fuuki32_vram_w(offset, data, mem_mask, 1); }
WRITE32_MEMBER(fuuki32_state::fuuki32_vram_2_w){ fuuki32_vram_w(offset, data, mem_mask, 2); }
WRITE32_MEMBER(fuuki32_state::fuuki32_vram_3_w){ fuuki32_vram_w(offset, data, mem_mask, 3); }
/***************************************************************************
@ -142,9 +141,8 @@ void fuuki32_state::video_start()
***************************************************************************/
static void draw_sprites( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect )
void fuuki32_state::draw_sprites( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect )
{
fuuki32_state *state = screen.machine().driver_data<fuuki32_state>();
int offs;
gfx_element *gfx = screen.machine().gfx[0];
bitmap_ind8 &priority_bitmap = screen.machine().priority_bitmap;
@ -152,10 +150,10 @@ static void draw_sprites( screen_device &screen, bitmap_ind16 &bitmap, const rec
int max_x = visarea.max_x + 1;
int max_y = visarea.max_y + 1;
UINT32 *src = state->m_buf_spriteram2; /* Use spriteram buffered by 2 frames, need palette buffered by one frame? */
UINT32 *src = m_buf_spriteram2; /* Use spriteram buffered by 2 frames, need palette buffered by one frame? */
/* Draw them backwards, for pdrawgfx */
for (offs = (state->m_spriteram.bytes() - 8) / 4; offs >= 0; offs -= 8/4)
for (offs = (m_spriteram.bytes() - 8) / 4; offs >= 0; offs -= 8/4)
{
int x, y, xstart, ystart, xend, yend, xinc, yinc;
int xnum, ynum, xzoom, yzoom, flipx, flipy;
@ -169,7 +167,7 @@ static void draw_sprites( screen_device &screen, bitmap_ind16 &bitmap, const rec
int bank = (code & 0xc000) >> 14;
int bank_lookedup;
bank_lookedup = ((state->m_spr_buffered_tilebank[1] & 0xffff0000) >> (16 + bank * 4)) & 0xf;
bank_lookedup = ((m_spr_buffered_tilebank[1] & 0xffff0000) >> (16 + bank * 4)) & 0xf;
code &= 0x3fff;
code += bank_lookedup * 0x4000;
@ -197,7 +195,7 @@ static void draw_sprites( screen_device &screen, bitmap_ind16 &bitmap, const rec
sx = (sx & 0x1ff) - (sx & 0x200);
sy = (sy & 0x1ff) - (sy & 0x200);
if (state->flip_screen())
if (flip_screen())
{
flipx = !flipx; sx = max_x - sx - xnum * 16;
flipy = !flipy; sy = max_y - sy - ynum * 16;
@ -288,19 +286,19 @@ if (screen.machine().input().code_pressed(KEYCODE_X))
***************************************************************************/
/* Wrapper to handle bg and bg2 ttogether */
static void fuuki32_draw_layer( running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect, int i, int flag, int pri )
void fuuki32_state::fuuki32_draw_layer( bitmap_ind16 &bitmap, const rectangle &cliprect, int i, int flag, int pri )
{
fuuki32_state *state = machine.driver_data<fuuki32_state>();
int buffer = ((state->m_vregs[0x1e / 4] & 0x0000ffff) & 0x40);
//OBRISI.ME
int buffer = ((m_vregs[0x1e / 4] & 0x0000ffff) & 0x40);
switch( i )
{
case 2: if (buffer) state->m_tilemap[3]->draw(bitmap, cliprect, flag, pri);
else state->m_tilemap[2]->draw(bitmap, cliprect, flag, pri);
case 2: if (buffer) m_tilemap[3]->draw(bitmap, cliprect, flag, pri);
else m_tilemap[2]->draw(bitmap, cliprect, flag, pri);
return;
case 1: state->m_tilemap[1]->draw(bitmap, cliprect, flag, pri);
case 1: m_tilemap[1]->draw(bitmap, cliprect, flag, pri);
return;
case 0: state->m_tilemap[0]->draw(bitmap, cliprect, flag, pri);
case 0: m_tilemap[0]->draw(bitmap, cliprect, flag, pri);
return;
}
}
@ -357,9 +355,9 @@ UINT32 fuuki32_state::screen_update_fuuki32(screen_device &screen, bitmap_ind16
bitmap.fill((0x800 * 4) - 1, cliprect);
machine().priority_bitmap.fill(0, cliprect);
fuuki32_draw_layer(machine(), bitmap, cliprect, tm_back, 0, 1);
fuuki32_draw_layer(machine(), bitmap, cliprect, tm_middle, 0, 2);
fuuki32_draw_layer(machine(), bitmap, cliprect, tm_front, 0, 4);
fuuki32_draw_layer(bitmap, cliprect, tm_back, 0, 1);
fuuki32_draw_layer(bitmap, cliprect, tm_middle, 0, 2);
fuuki32_draw_layer(bitmap, cliprect, tm_front, 0, 4);
draw_sprites(screen, bitmap, cliprect);
return 0;