diff options
| author | 2008-05-04 13:20:57 +0000 | |
|---|---|---|
| committer | 2008-05-04 13:20:57 +0000 | |
| commit | 26f0669745f6e51855f69a69560bbaa890bdae8a (patch) | |
| tree | 32dc0eec1bd2ce4dd759775be98b043e25f04ab6 /src | |
| parent | d2414bddfe4ab895e9cea9844400be5d1f84f141 (diff) | |
fix troangel bug (01775: newtangl, troangel: Crash with Access Violation)
Diffstat (limited to 'src')
| -rw-r--r-- | src/mame/drivers/m57.c | 7 | ||||
| -rw-r--r-- | src/mame/video/m57.c | 8 |
2 files changed, 11 insertions, 4 deletions
diff --git a/src/mame/drivers/m57.c b/src/mame/drivers/m57.c index 1f3f4a3582d..682bad65096 100644 --- a/src/mame/drivers/m57.c +++ b/src/mame/drivers/m57.c @@ -198,7 +198,7 @@ INPUT_PORTS_END static const gfx_layout spritelayout = { 16,32, - RGN_FRAC(1,3), + 64, 3, { RGN_FRAC(0,3), RGN_FRAC(1,3), RGN_FRAC(2,3) }, { STEP8(0,1), STEP8(16*8,1) }, @@ -208,7 +208,10 @@ static const gfx_layout spritelayout = static GFXDECODE_START( m57 ) GFXDECODE_ENTRY( REGION_GFX1, 0x0000, gfx_8x8x3_planar, 0, 32 ) - GFXDECODE_ENTRY( REGION_GFX2, 0x0000, spritelayout, 32*8, 32 ) + GFXDECODE_ENTRY( REGION_GFX2, 0x0000, spritelayout, 32*8, 32 ) + GFXDECODE_ENTRY( REGION_GFX2, 0x1000, spritelayout, 32*8, 32 ) + GFXDECODE_ENTRY( REGION_GFX2, 0x2000, spritelayout, 32*8, 32 ) + GFXDECODE_ENTRY( REGION_GFX2, 0x3000, spritelayout, 32*8, 32 ) GFXDECODE_END diff --git a/src/mame/video/m57.c b/src/mame/video/m57.c index 634b3155155..5d234107146 100644 --- a/src/mame/video/m57.c +++ b/src/mame/video/m57.c @@ -202,7 +202,11 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta int flipy = attributes&0x80; int flipx = attributes&0x40; - int tile_number = code + ((attributes & 0x20) << 3); + int tile_number = code & 0x3f; + + int bank = 0; + if( code&0x80 ) bank += 1; + if( attributes&0x20 ) bank += 2; if (flipscreen) { @@ -212,7 +216,7 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta flipy = !flipy; } - drawgfx(bitmap,machine->gfx[1], + drawgfx(bitmap,machine->gfx[1+bank], tile_number, color, flipx,flipy, |
