From 6d8a3c67fca797b77daa1a17410c08bdfc52e856 Mon Sep 17 00:00:00 2001 From: Angelo Salese Date: Mon, 9 Nov 2009 22:55:37 +0000 Subject: [PATCH] Improved Soccer Superstars rendering [David Haywood] --- src/mame/machine/konamigx.c | 40 ++++++++++++++++++++++++++++++++----- src/mame/machine/konamigx.h | 2 +- src/mame/video/konamigx.c | 34 ++++++------------------------- 3 files changed, 42 insertions(+), 34 deletions(-) diff --git a/src/mame/machine/konamigx.c b/src/mame/machine/konamigx.c index e1dcad32f0c..75416fba636 100644 --- a/src/mame/machine/konamigx.c +++ b/src/mame/machine/konamigx.c @@ -22,10 +22,10 @@ #define GX_ZPAGESIZE 0x300000 #define GX_ZBUFSIZE 0x600000 #else - #define GX_ZBUFW 384 + #define GX_ZBUFW 576 #define GX_ZBUFH 224 - #define GX_ZPAGESIZE 0x150000 - #define GX_ZBUFSIZE 0x2a0000 + #define GX_ZPAGESIZE (GX_ZBUFW*GX_ZBUFH) + #define GX_ZBUFSIZE ((GX_ZBUFW*GX_ZBUFH)*2) #endif static UINT8 *gx_objzbuf, *gx_shdzbuf; @@ -1078,7 +1078,7 @@ void konamigx_objdma(void) void konamigx_mixer(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect, tilemap *sub1, int sub1flags, tilemap *sub2, int sub2flags, - int mixerflags) + int mixerflags, bitmap_t *extra_bitmap) { static const int xoffset[8] = { 0, 1, 4, 5, 16, 17, 20, 21 }; static const int yoffset[8] = { 0, 2, 8, 10, 32, 34, 40, 42 }; @@ -1237,6 +1237,7 @@ void konamigx_mixer(running_machine *machine, bitmap_t *bitmap, const rectangle case 5 : offs = -128; if (sub2flags & 0xf) { if (sub2flags & GXSUB_K053250) offs = -5; else if (sub2) offs = -3; } + if (extra_bitmap) offs = -3; break; default: offs = -1; } @@ -1481,7 +1482,9 @@ void konamigx_mixer(running_machine *machine, bitmap_t *bitmap, const rectangle l = sub1flags & 0xf; if (offs == -2) + { K053936GP_0_zoom_draw(machine, bitmap, cliprect, sub1, l, k, alpha); + } else K053250_draw(machine, bitmap, cliprect, 0, vcblk[4]<primary_screen); + int height = video_screen_get_height(machine->primary_screen); + const pen_t *paldata = machine->pens; + + // the output size of the roz layer has to be doubled horizontally + // so that it aligns with the sprites and normal tilemaps. This appears + // to be done as a post-processing / mixing step effect + for (yy=0;yymachine, bitmap, cliprect, 0, 0, gx_psac_tilemap, GXSUB_8BPP, 0); // else - konamigx_mixer(screen->machine, bitmap, cliprect, 0, 0, 0, 0, 0); // hack, draw the roz tilemap if W is held // todo: fix so that it works with the mixer without crashing(!) if (gx_specialrozenable == 2) { - int xx,yy; - int width = video_screen_get_width(screen); - int height = video_screen_get_height(screen); - const pen_t *paldata = screen->machine->pens; - - //if ( input_code_pressed(screen->machine, KEYCODE_W) ) - // flicker between game and roz tilemap - warning, may hurt eyes - if(video_screen_get_frame_number(screen->machine->primary_screen) & 1) - { - K053936_0_zoom_draw(type3_roz_temp_bitmap, cliprect,gx_psac_tilemap, 0,0,0); // soccerss playfield - - // the output size of the roz layer has to be doubled horizontally - // so that it aligns with the sprites and normal tilemaps. This appears - // to be done as a post-processing / mixing step effect - for (yy=0;yymachine, bitmap, cliprect, 0, 0, 0, 0, 0, type3_roz_temp_bitmap); + } + else + { + konamigx_mixer(screen->machine, bitmap, cliprect, 0, 0, 0, 0, 0, 0); }