summaryrefslogtreecommitdiff
path: root/emulators
diff options
context:
space:
mode:
authorkristerw <kristerw>2002-12-08 13:09:44 +0000
committerkristerw <kristerw>2002-12-08 13:09:44 +0000
commitbde58ff3dfb3c3c98e4eaa259ffb4f01ba5c1923 (patch)
tree0355e290b2e64da80e82e312f37bda191a8ce19a /emulators
parent2e0be4cae97e11b8d1d97e10fb83a231850fdf9c (diff)
downloadpkgsrc-bde58ff3dfb3c3c98e4eaa259ffb4f01ba5c1923.tar.gz
Fix a bug that caused the display to be truncated for some games.
PKGREVISION++
Diffstat (limited to 'emulators')
-rw-r--r--emulators/xmame/Makefile4
-rw-r--r--emulators/xmame/distinfo4
-rw-r--r--emulators/xmame/patches/patch-ab158
-rw-r--r--emulators/xmame/patches/patch-ac22
4 files changed, 185 insertions, 3 deletions
diff --git a/emulators/xmame/Makefile b/emulators/xmame/Makefile
index 11b73011a76..b8f34fd54ab 100644
--- a/emulators/xmame/Makefile
+++ b/emulators/xmame/Makefile
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile,v 1.83 2002/12/07 20:59:52 kristerw Exp $
+# $NetBSD: Makefile,v 1.84 2002/12/08 13:09:44 kristerw Exp $
#
DISTNAME= xmame-0.62.1-rc1
PKGNAME= xmame-0.62.1
-PKGREVISION= 1
+PKGREVISION= 2
CATEGORIES= emulators games x11
MASTER_SITES= http://x.mame.net/download/ \
http://roms2.mame.dk/emu/
diff --git a/emulators/xmame/distinfo b/emulators/xmame/distinfo
index 04795ff3b41..1e8e861de02 100644
--- a/emulators/xmame/distinfo
+++ b/emulators/xmame/distinfo
@@ -1,7 +1,9 @@
-$NetBSD: distinfo,v 1.27 2002/12/07 20:59:52 kristerw Exp $
+$NetBSD: distinfo,v 1.28 2002/12/08 13:09:45 kristerw Exp $
SHA1 (xmame-0.62.1-rc1.tar.bz2) = 9f05a2a4112f0e7e4e64d374fba99079780df2d8
Size (xmame-0.62.1-rc1.tar.bz2) = 6115463 bytes
SHA1 (patch-aa) = be131167296c50e3aea55da46288dfc16bf3ad8e
+SHA1 (patch-ab) = 0d44d698a37fa1a1991fa71b1d9f4a8d0393c00a
+SHA1 (patch-ac) = f13c5f8aad547270df52206da8cc8728b5dc4ac0
SHA1 (patch-ad) = e389102fc29bd7c40711cfd493bad902ee102ae2
SHA1 (patch-ae) = cb851b96ff0911a872f7eb07abf24aec8ad9dae2
diff --git a/emulators/xmame/patches/patch-ab b/emulators/xmame/patches/patch-ab
new file mode 100644
index 00000000000..80d23bf7a7b
--- /dev/null
+++ b/emulators/xmame/patches/patch-ab
@@ -0,0 +1,158 @@
+$NetBSD: patch-ab,v 1.15 2002/12/08 13:09:46 kristerw Exp $
+--- src/unix/video.c.orig 2002-12-01 11:26:42.000000000 -0700
++++ src/unix/video.c 2002-12-07 15:08:00.000000000 -0700
+@@ -48,6 +48,10 @@
+ static int video_ror = 0;
+ static int video_rol = 0;
+
++static int video_width;
++static int video_height;
++static int video_depth;
++
+ static struct mame_bitmap *adjusted_bitmap = NULL;
+
+
+@@ -351,7 +355,7 @@
+ options.use_artwork = ARTWORK_USE_NONE;
+ }
+
+-void orient_rect(struct rectangle *rect, struct mame_bitmap *bitmap)
++void orient_rect(struct rectangle *rect)
+ {
+ int temp;
+
+@@ -370,16 +374,16 @@
+ /* apply X flip */
+ if (blit_flipx)
+ {
+- temp = bitmap->width - rect->min_x - 1;
+- rect->min_x = bitmap->width - rect->max_x - 1;
++ temp = video_width - rect->min_x - 1;
++ rect->min_x = video_width - rect->max_x - 1;
+ rect->max_x = temp;
+ }
+
+ /* apply Y flip */
+ if (blit_flipy)
+ {
+- temp = bitmap->height - rect->min_y - 1;
+- rect->min_y = bitmap->height - rect->max_y - 1;
++ temp = video_height - rect->min_y - 1;
++ rect->min_y = video_height - rect->max_y - 1;
+ rect->max_y = temp;
+ }
+ }
+@@ -417,17 +421,18 @@
+ normal_widthscale *= 2;
+ }
+ }
+-
++
+ if (blit_swapxy)
+ {
+- visual_width = params->height;
+- visual_height = params->width;
++ visual_width = video_width = params->height;
++ visual_height = video_height = params->width;
+ }
+ else
+ {
+- visual_width = params->width;
+- visual_height = params->height;
++ visual_width = video_width = params->width;
++ visual_height = video_height = params->height;
+ }
++ video_depth = params->depth;
+
+ if (!blit_swapxy)
+ aspect_ratio = (double)params->aspect_x
+@@ -524,9 +529,8 @@
+
+ if (blit_flipx || blit_flipy || blit_swapxy)
+ {
+- bitmap_free(adjusted_bitmap);
+- adjusted_bitmap = bitmap_alloc_depth(visual_width,
+- visual_height, params->depth);
++ adjusted_bitmap = bitmap_alloc_depth(video_width,
++ video_height, video_depth);
+ if (!adjusted_bitmap)
+ return -1;
+ }
+@@ -626,21 +630,21 @@
+
+ static void update_visible_area(struct mame_display *display)
+ {
++ normal_visual = display->game_visible_area;
++
+ if (blit_swapxy)
+ {
+- normal_visual.min_x = display->game_visible_area.min_y;
+- normal_visual.max_x = display->game_visible_area.max_y;
+- normal_visual.min_y = display->game_visible_area.min_x;
+- normal_visual.max_y = display->game_visible_area.max_x;
++ video_width = display->game_bitmap->height;
++ video_height = display->game_bitmap->width;
+ }
+ else
+ {
+- normal_visual.min_x = display->game_visible_area.min_x;
+- normal_visual.max_x = display->game_visible_area.max_x;
+- normal_visual.min_y = display->game_visible_area.min_y;
+- normal_visual.max_y = display->game_visible_area.max_y;
++ video_width = display->game_bitmap->width;
++ video_height = display->game_bitmap->height;
+ }
+
++ orient_rect(&normal_visual);
++
+ /*
+ * round to 8, since the new dirty code works with 8x8 blocks,
+ * and we need to round to sizeof(long) for the long copies anyway
+@@ -656,6 +660,17 @@
+ display->game_visible_area.min_y,
+ display->game_visible_area.max_x,
+ display->game_visible_area.max_y);
++
++ /*
++ * Allocate a new destination bitmap for the code that handles
++ * rotation/flipping.
++ */
++ if (blit_flipx || blit_flipy || blit_swapxy)
++ {
++ bitmap_free(adjusted_bitmap);
++ adjusted_bitmap = bitmap_alloc_depth(video_width,
++ video_height, video_depth);
++ }
+ }
+
+ static void update_palette(struct mame_display *display, int force_dirty)
+@@ -692,7 +707,6 @@
+ static void update_debug_display(struct mame_display *display)
+ {
+ struct sysdep_palette_struct *backup_palette = current_palette;
+- struct rectangle backup_updatebounds = updatebounds;
+
+ if (!debug_palette)
+ {
+@@ -714,10 +728,8 @@
+ }
+
+ current_palette = debug_palette;
+- updatebounds = debug_visual;
+ sysdep_update_display(display->debug_bitmap);
+ current_palette = backup_palette;
+- updatebounds = backup_updatebounds;
+ }
+
+ static void osd_free_colors(void)
+@@ -988,8 +1000,8 @@
+ {
+ int x, y;
+ int bx1, bx2, by1, by2;
+-
+- orient_rect(&bounds, destbitmap);
++
++ orient_rect(&bounds);
+
+ bx1 = bounds.min_x;
+ bx2 = bounds.max_x;
diff --git a/emulators/xmame/patches/patch-ac b/emulators/xmame/patches/patch-ac
new file mode 100644
index 00000000000..bada04ce8a1
--- /dev/null
+++ b/emulators/xmame/patches/patch-ac
@@ -0,0 +1,22 @@
+$NetBSD: patch-ac,v 1.8 2002/12/08 13:09:47 kristerw Exp $
+--- src/unix/video-drivers/x11.c.orig 2002-12-01 15:12:12.000000000 -0700
++++ src/unix/video-drivers/x11.c 2002-12-07 15:08:56.000000000 -0700
+@@ -16,9 +16,6 @@
+ #include "input.h"
+ #include "keyboard.h"
+
+-#ifdef USE_XV
+-int use_xv = 0; /* use xv extension if available */
+-#endif
+ #ifdef USE_HWSCALE
+ long hwscale_redmask;
+ long hwscale_greenmask;
+@@ -175,7 +172,7 @@
+ return OSD_NOT_OK;
+ }
+ #ifdef USE_HWSCALE
+- if(use_xv)
++ if(use_hwscale)
+ {
+ display_palette_info.red_mask = hwscale_redmask;
+ display_palette_info.green_mask = hwscale_greenmask;