mirror of
https://github.com/holub/mame
synced 2025-04-28 19:14:55 +03:00
eu3a14 - identify more bits
This commit is contained in:
parent
a9c01535bd
commit
42d57e58ea
@ -178,8 +178,8 @@ private:
|
|||||||
void handle_palette(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
void handle_palette(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||||
void draw_page(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int which, int xbase, int ybase, int size);
|
void draw_page(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int which, int xbase, int ybase, int size);
|
||||||
void draw_background(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
void draw_background(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||||
void draw_sprite_line(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int offset, int count, int pal, int flipx, int xpos, int ypos, int gfxno);
|
void draw_sprite_line(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int offset, int count, int pal, int flipx, int flipy, int xpos, int ypos, int gfxno);
|
||||||
void draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
void draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int drawpri);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -430,22 +430,22 @@ void radica_eu3a14_state::draw_background(screen_device &screen, bitmap_ind16 &b
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void radica_eu3a14_state::draw_sprite_line(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int offset, int count, int pal, int flipx, int xpos, int ypos, int gfxno)
|
void radica_eu3a14_state::draw_sprite_line(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int offset, int count, int pal, int flipx, int flipy, int xpos, int ypos, int gfxno)
|
||||||
{
|
{
|
||||||
int tileno = offset + count;
|
int tileno = offset + count;
|
||||||
gfx_element *gfx = m_gfxdecode->gfx(gfxno);
|
gfx_element *gfx = m_gfxdecode->gfx(gfxno);
|
||||||
gfx->transpen(bitmap, cliprect, tileno, pal, flipx, 0, xpos, ypos, 0);
|
gfx->transpen(bitmap, cliprect, tileno, pal, flipx, flipy, xpos, ypos, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void radica_eu3a14_state::draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
void radica_eu3a14_state::draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int drawpri)
|
||||||
{
|
{
|
||||||
// first 4 sprite entries seem to be garbage sprites, so we start at 0x20
|
// first 4 sprite entries seem to be garbage sprites, so we start at 0x20
|
||||||
// likely we're just interpreting them wrong and they're used for blanking things or clipping?
|
// likely we're just interpreting them wrong and they're used for blanking things or clipping?
|
||||||
for (int i = m_spriterambase; i < m_spriterambase + 0x7e0; i += 8)
|
for (int i = m_spriterambase; i < m_spriterambase + 0x7e0; i += 8)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
+0 e--f hhww flip, enable, height, width
|
+0 e-ff hhww flip yx, enable, height, width
|
||||||
+1 yyyy yyyy ypos
|
+1 yyyy yyyy ypos
|
||||||
+2 xxxx xxxx xpos
|
+2 xxxx xxxx xpos
|
||||||
+3 pppp ---- palette
|
+3 pppp ---- palette
|
||||||
@ -464,11 +464,17 @@ void radica_eu3a14_state::draw_sprites(screen_device &screen, bitmap_ind16 &bitm
|
|||||||
int h = attr & 0x0c;
|
int h = attr & 0x0c;
|
||||||
int w = attr & 0x03;
|
int w = attr & 0x03;
|
||||||
int flipx = (attr & 0x10) >> 4;
|
int flipx = (attr & 0x10) >> 4;
|
||||||
|
int flipy = (attr & 0x20) >> 5;
|
||||||
|
|
||||||
int height = 0;
|
int height = 0;
|
||||||
int width = 0;
|
int width = 0;
|
||||||
int pal = attr2 >> 4;
|
int pal = attr2 >> 4;
|
||||||
|
|
||||||
|
int pri = attr2 & 0x07;
|
||||||
|
|
||||||
|
if (pri != drawpri)
|
||||||
|
continue;
|
||||||
|
|
||||||
// no idea
|
// no idea
|
||||||
if (attr2 & 0x08)
|
if (attr2 & 0x08)
|
||||||
pal += 0x10;
|
pal += 0x10;
|
||||||
@ -541,9 +547,13 @@ void radica_eu3a14_state::draw_sprites(screen_device &screen, bitmap_ind16 &bitm
|
|||||||
int count = 0;
|
int count = 0;
|
||||||
for (int yy = 0; yy < height; yy++)
|
for (int yy = 0; yy < height; yy++)
|
||||||
{
|
{
|
||||||
|
int yoff = flipy ? height-1-yy : yy;
|
||||||
|
|
||||||
for (int xx = 0; xx < width; xx++)
|
for (int xx = 0; xx < width; xx++)
|
||||||
{
|
{
|
||||||
draw_sprite_line(screen, bitmap, cliprect, offset, count, pal, flipx, x + xx * 8, y + yy, gfxno);
|
int xoff = flipx ? (((width - 1) * 8) - (xx * 8)) : (xx * 8);
|
||||||
|
|
||||||
|
draw_sprite_line(screen, bitmap, cliprect, offset, count, pal, flipx, flipy, x + xoff, y + yoff, gfxno);
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -561,7 +571,11 @@ uint32_t radica_eu3a14_state::screen_update(screen_device &screen, bitmap_ind16
|
|||||||
|
|
||||||
handle_palette(screen, bitmap, cliprect);
|
handle_palette(screen, bitmap, cliprect);
|
||||||
draw_background(screen, bitmap, cliprect);
|
draw_background(screen, bitmap, cliprect);
|
||||||
draw_sprites(screen, bitmap, cliprect);
|
|
||||||
|
for (int i = 0; i < 8; i++)
|
||||||
|
{
|
||||||
|
draw_sprites(screen, bitmap, cliprect, i);
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user