Compare commits

...
Author SHA1 Message Date
mahoneyt944 dff0ba6365 segas32 use opaque blending by default - dbzvrvs backgrounds working. (#2211)
* Update segas32.c

* Update segas32.c

* Update .gitlab-ci.yml

* Update segas32.c

* Update segas32.h

* Update segas32.c

* Update segas32.c

* Update .gitlab-ci.yml
2026-11-07 07:35:08 -05:00
arcadez2003 1035485897 Merge pull request #2210 from libretro/arcadez2003-patch-11
3on3dunk
2026-11-06 21:07:03 +00:00
arcadez2003 a0e0e75905 Merge pull request #2209 from libretro/arcadez2003-patch-10
3on3 Dunk Madness video code
2026-11-06 21:06:47 +00:00
arcadez2003 a45b70e19e Merge pull request #2208 from libretro/arcadez2003-patch-9
Attempt to support 3on3 Dunk Madness
2026-11-06 21:06:32 +00:00
arcadez2003 ea291bf560 3on3dunk 2026-11-06 21:02:07 +00:00
arcadez2003 0dd483f4c0 3on3 Dunk Madness video code 2026-11-06 20:59:50 +00:00
5 changed files with 76 additions and 12 deletions

No files matched your search

+1
View File
@@ -5709,6 +5709,7 @@ BOMULEUL CHAJARA SEGA ST-V 1997/04/11
DRIVER( fromancr ) /* (c) 1995 Video System Co. (Japan) */
DRIVER( fromanc4 ) /* (c) 1998 Video System Co. (Japan) */
DRIVER( inufuku ) /* (c) 1998 Video System Co. (Japan) */
DRIVER( 3on3dunk ) /* (c) 1996 Video System Co. ( US ) */
/* Psikyo games */
DRIVER( samuraia ) /* (c) 1993 (World) */
+11 -7
View File
@@ -3602,12 +3602,21 @@ static DRIVER_INIT ( sonic )
install_mem_read16_handler (0, 0xc00040, 0xc00055, sonic_track_r);
install_mem_write16_handler(0, 0x20E5C4, 0x20E5C5, sonic_level_load_protection);
opaque_blend = false;
}
static DRIVER_INIT ( sonicp )
{
install_mem_write16_handler(0, 0xc00040, 0xc00055, sonic_track_reset_w);
install_mem_read16_handler (0, 0xc00040, 0xc00055, sonic_track_r);
opaque_blend = false;
}
static DRIVER_INIT ( harddunk )
{
opaque_blend = false;
}
static DRIVER_INIT ( radm )
@@ -3620,8 +3629,6 @@ static DRIVER_INIT ( radr )
{
system32_use_default_eeprom = EEPROM_RADR;
install_io_analog();
opaquey_hack = true;
}
static WRITE16_HANDLER( f1en_comms_echo_w )
@@ -3691,8 +3698,6 @@ static DRIVER_INIT( darkedge )
install_mem_read16_handler (0, 0xa00000, 0xa7ffff, darkedge_protection_r);
install_mem_write16_handler(0, 0xa00000, 0xa7ffff, darkedge_protection_w);
system32_prot_vblank = darkedge_fd1149_vblank;
opaquey_hack = true;
}
static DRIVER_INIT( jleague )
@@ -3710,7 +3715,6 @@ static DRIVER_INIT( titlef )
{
install_port_write_handler(1, 0xb0, 0xbf, scross_bank_w);
titlef_kludge = true;
opaquey_hack = true;
}
static DRIVER_INIT( scross )
@@ -3748,8 +3752,8 @@ GAMEX(1995, slipstrh, slipstrm, system32, slipstrm, slipstrm, ROT0, "Capcom"
/* Multi32 games */
GAMEX(1992, orunners, 0, multi32, orunners, 0, ROT0, "Sega", "Outrunners (US)", GAME_IMPERFECT_GRAPHICS )
GAMEX(1994, harddunk, 0, multi32, harddunk, 0, ROT0, "Sega", "Hard Dunk (World)", GAME_IMPERFECT_GRAPHICS )
GAMEX(1994, harddunj, harddunk, multi32, harddunk, 0, ROT0, "Sega", "Hard Dunk (Japan)", GAME_IMPERFECT_GRAPHICS )
GAMEX(1994, harddunk, 0, multi32, harddunk, harddunk, ROT0, "Sega", "Hard Dunk (World)", GAME_IMPERFECT_GRAPHICS )
GAMEX(1994, harddunj, harddunk, multi32, harddunk, harddunk, ROT0, "Sega", "Hard Dunk (Japan)", GAME_IMPERFECT_GRAPHICS )
GAMEX(1992, scross, 0, multi32, scross, scross, ROT0, "Sega", "Stadium Cross (World)", GAME_IMPERFECT_GRAPHICS )
GAMEX(1992, scrossa, scross, multi32, scross, scross, ROT0, "Sega", "Stadium Cross (World, linkable)", GAME_IMPERFECT_GRAPHICS )
GAMEX(1992, scrossu, scross, multi32, scross, scross, ROT0, "Sega", "Stadium Cross (US)", GAME_IMPERFECT_GRAPHICS )
+1 -1
View File
@@ -19,7 +19,7 @@ extern UINT16 *system32_paletteram[2];
extern UINT16 system32_displayenable[2];
extern UINT16 system32_tilebank_external;
extern bool opaquey_hack;
extern bool opaque_blend;
extern bool titlef_kludge;
extern void system32_set_vblank(int state);
+60 -1
View File
@@ -16,6 +16,8 @@
extern data16_t *inufuku_spriteram1;
extern int inufuku_is_dunk;
static UINT16 *dunk_sprite_buffer;
extern data16_t *inufuku_spriteram2;
extern size_t inufuku_spriteram1_size;
@@ -69,9 +71,64 @@ WRITE16_HANDLER( inufuku_scrollreg_w )
******************************************************************************/
static void dunk_draw_sprites(struct mame_bitmap *bitmap, const struct rectangle *cliprect)
{
int end, offs;
UINT16 *ram = dunk_sprite_buffer;
for (end = 0; end < 0x200; ++end)
if (ram[end] & 0x4000) break;
/* Priority drawing walks the sorting list backwards and stops at its terminator. */
for (offs = end - 1; offs >= 0; --offs)
{
UINT16 *attr;
int ox, oy, width, height, zx, zy, fx, fy, color, mask;
int x, y, map;
static const int masks[4] = { 0x00, 0xf0, 0xfc, 0xfe };
if (ram[offs] & 0x8000) continue;
attr = &ram[(ram[offs] & 0x3ff) * 4];
ox = attr[1] & 0x1ff;
oy = (attr[0] & 0x1ff) + 1;
width = (attr[1] >> 9) & 7;
height = (attr[0] >> 9) & 7;
zx = 32 - (attr[1] >> 12);
zy = 32 - (attr[0] >> 12);
fx = attr[2] & 0x4000;
fy = attr[2] & 0x8000;
color = (attr[2] >> 8) & 0x3f;
mask = masks[color >> 4];
map = attr[3] | ((attr[2] & 1) << 16);
for (y = 0; y <= height; ++y)
for (x = 0; x <= width; ++x)
{
int index = (map++ * 2) & 0xffff;
int code = ((inufuku_spriteram2[index] & 7) << 16) | inufuku_spriteram2[index + 1];
int sx = (ox + (fx ? width - x : x) * zx / 2) & 0x1ff;
int sy = (oy + (fy ? height - y : y) * zy / 2) & 0x1ff;
int wrapx, wrapy;
for (wrapy = 0; wrapy <= 1; ++wrapy)
for (wrapx = 0; wrapx <= 1; ++wrapx)
pdrawgfxzoom(bitmap, Machine->gfx[2], code, color, fx, fy,
sx - wrapx * 512, sy - wrapy * 512, cliprect,
TRANSPARENCY_PEN, 15, zx << 11, zy << 11, mask);
}
}
}
void dunk_buffer_sprites(void)
{
/* The display consumes the completed attribute list from the preceding frame. */
memcpy(dunk_sprite_buffer, inufuku_spriteram1, 0x2000);
}
static void inufuku_draw_sprites(struct mame_bitmap *bitmap, const struct rectangle *cliprect)
{
int offs;
if (inufuku_is_dunk)
{
dunk_draw_sprites(bitmap, cliprect);
return;
}
for (offs = (inufuku_spriteram1_size / 16) - 1; offs >= 0; offs--) {
@@ -227,6 +284,8 @@ WRITE16_HANDLER( inufuku_text_videoram_w )
VIDEO_START( inufuku )
{
dunk_sprite_buffer = auto_malloc(0x2000);
memset(dunk_sprite_buffer, 0, 0x2000);
inufuku_bg_tilemap = tilemap_create(get_inufuku_bg_tile_info, tilemap_scan_rows, TILEMAP_TRANSPARENT, 8, 8, 64, 64);
inufuku_text_tilemap = tilemap_create(get_inufuku_text_tile_info, tilemap_scan_rows, TILEMAP_TRANSPARENT, 8, 8, 64, 64);
@@ -254,7 +313,7 @@ VIDEO_UPDATE( inufuku )
if (inufuku_bg_raster) {
tilemap_set_scroll_rows(inufuku_bg_tilemap, 512);
for (i = 0; i < 256; i++) tilemap_set_scrollx(inufuku_bg_tilemap, (inufuku_bg_scrolly + i) & 0x1ff, inufuku_bg_rasterram[i]);
for (i = 0; i < 256; i++) tilemap_set_scrollx(inufuku_bg_tilemap, (inufuku_bg_scrolly + i) & 0x1ff, inufuku_bg_rasterram[i] + (inufuku_is_dunk ? inufuku_bg_scrollx : 0));
}
else {
tilemap_set_scroll_rows(inufuku_bg_tilemap, 1);
+3 -3
View File
@@ -258,7 +258,7 @@ UINT16 *system32_paletteram[2];
UINT16 system32_displayenable[2];
UINT16 system32_tilebank_external;
bool opaquey_hack = false; /* dink */
bool opaque_blend = true;
bool titlef_kludge = false;
@@ -1156,7 +1156,7 @@ static void update_tilemap_zoom(struct layer_info *layer, const struct rectangle
get_tilemaps(bgnum, tilemaps);
/* configure the layer */
opaque = (opaquey_hack) ? BIT(system32_videoram[0x1ff8e/2], (8 + bgnum)) : 0;
opaque = (opaque_blend) ? BIT(system32_videoram[0x1ff8e/2], (8 + bgnum)) : 0;
/* determine flipping */
compute_tilemap_flips(bgnum, &flipx, &flipy);
@@ -1320,7 +1320,7 @@ static void update_tilemap_rowscroll(struct layer_info *layer, const struct rect
get_tilemaps(bgnum, tilemaps);
/* configure the layer */
opaque = (opaquey_hack) ? BIT(system32_videoram[0x1ff8e/2], (8 + bgnum)) : 0;
opaque = (opaque_blend) ? BIT(system32_videoram[0x1ff8e/2], (8 + bgnum)) : 0;
/* determine flipping */
compute_tilemap_flips(bgnum, &flipx, &flipy);