diff --git a/emulators/xsystem35/Makefile b/emulators/xsystem35/Makefile index dadab1664fb5..8b4985ea13fb 100644 --- a/emulators/xsystem35/Makefile +++ b/emulators/xsystem35/Makefile @@ -53,24 +53,18 @@ CONFIGURE_ARGS+= --enable-audio=oss --with-default-output=oss #.else CONFIGURE_ARGS+= --disable-sdl #.endif -.if ${ARCH} == "i386" -.if defined(WITHOUT_MMX) -CONFIGURE_ARGS+= --disable-mmx -.else + +.if ${MACHINE_CPU:Mmmx} CONFIGURE_ARGS+= --enable-mmx BUILD_DEPENDS+= nasm:${PORTSDIR}/devel/nasm -.endif +.else +CONFIGURE_ARGS+= --disable-mmx .endif pre-everything:: #.if !defined(WITH_SDL) # @${ECHO_MSG} '===> Define WITH_SDL to enable SDL support' #.endif -.if ${ARCH} == "i386" -.if !defined(WITHOUT_MMX) - @${ECHO_MSG} '===> Define WITHOUT_MMX to disable MMX routines' -.endif -.endif post-extract: @${CP} ${WRKSRC}/INSTALL ${WRKSRC}/doc/INSTALL diff --git a/emulators/xsystem35/files/patch-src_cmd2F.c b/emulators/xsystem35/files/patch-src_cmd2F.c new file mode 100644 index 000000000000..13bbf1481182 --- /dev/null +++ b/emulators/xsystem35/files/patch-src_cmd2F.c @@ -0,0 +1,37 @@ +--- src/cmd2F.c.orig Mon Jul 21 02:30:16 2003 ++++ src/cmd2F.c Thu Jun 14 13:05:15 2007 +@@ -1381,7 +1381,7 @@ + + for (i = 0; i < eNumof; i++) { + *vData = LittleEndian_getW(nact->datatbl_addr, 0); +- ((WORD *)nact->datatbl_addr)++; ++ nact->datatbl_addr += sizeof(WORD); + vData++; + } + +@@ -1397,14 +1397,14 @@ + + for (i = 0; i < eNumof; i++) { + v_strcpy(eStrNum + i -1, (const char *)(nact->datatbl_addr)); +- (char *)(nact->datatbl_addr) += (strlen((const char *)nact->datatbl_addr) + 1); ++ nact->datatbl_addr += (strlen((const char *)nact->datatbl_addr) + 1); + } + } + + void commands2F83() { + int eNumof = sys_getCaliValue(); + +- ((WORD *)nact->datatbl_addr) += eNumof; ++ nact->datatbl_addr += eNumof * sizeof(WORD); + + DEBUG_COMMAND("dataSkipWORD %d:\n", eNumof); + } +@@ -1414,7 +1414,7 @@ + int i; + + for (i = 0; i < eNumof; i++) { +- (char *)(nact->datatbl_addr) += (strlen((const char *)nact->datatbl_addr) + 1); ++ nact->datatbl_addr += (strlen((const char *)nact->datatbl_addr) + 1); + } + + DEBUG_COMMAND("dataSkipString %d:\n", eNumof); diff --git a/emulators/xsystem35/files/patch-src_cmdf.c b/emulators/xsystem35/files/patch-src_cmdf.c new file mode 100644 index 000000000000..88cc4a2e0088 --- /dev/null +++ b/emulators/xsystem35/files/patch-src_cmdf.c @@ -0,0 +1,47 @@ +--- src/cmdf.c.orig Sat Dec 21 18:28:35 2002 ++++ src/cmdf.c Thu Jun 14 13:03:47 2007 +@@ -82,22 +82,22 @@ + DEBUG_COMMAND("F1 %d,%d:\n", str_number, skip); + + for (i = 0; i < skip; i++) { +- (char *)(nact->datatbl_addr) += (strlen((const char *)nact->datatbl_addr) + 1); ++ nact->datatbl_addr += (strlen((const char *)nact->datatbl_addr) + 1); + } + + v_strcpy(str_number - 1 , (const char *)(nact->datatbl_addr)); +- (char *)(nact->datatbl_addr) += (strlen((const char *)nact->datatbl_addr) + 1); ++ nact->datatbl_addr += (strlen((const char *)nact->datatbl_addr) + 1); + } + + static void commandF2() { + int *read_var = sys_getCaliVariable(); + int skip = sys_getCaliValue(); + +- ((WORD *)nact->datatbl_addr) += skip; ++ nact->datatbl_addr += skip * sizeof(WORD); + + *read_var = LittleEndian_getW(nact->datatbl_addr, 0); + +- ((WORD *)nact->datatbl_addr)++; ++ nact->datatbl_addr += sizeof(WORD); + + DEBUG_COMMAND("F2 %d,%d:\n", *read_var, skip); + } +@@ -118,7 +118,7 @@ + + for (i = 0; i < count; i++) { + *read_var = LittleEndian_getW(nact->datatbl_addr, 0); +- ((WORD *)nact->datatbl_addr)++; ++ nact->datatbl_addr += sizeof(WORD); + read_var++; + } + +@@ -155,7 +155,7 @@ + for (i = 0; i < count; i++) { + for (j = 0; j < data_width; j++) { + *(F6Index[j] + i) = LittleEndian_getW(nact->datatbl_addr, 0); +- ((WORD *)nact->datatbl_addr)++; ++ nact->datatbl_addr += sizeof(WORD); + } + } + diff --git a/emulators/xsystem35/pkg-message b/emulators/xsystem35/pkg-message index 7388205965d2..cf81c549f86a 100644 --- a/emulators/xsystem35/pkg-message +++ b/emulators/xsystem35/pkg-message @@ -1,15 +1,15 @@ -o make sure your kernel has been configured with options SHMMAXPGS=4096 +o Make sure your kernel has been configured with options SHMMAXPGS=4096 when you run on display 16bpp or deeper color. -o copy PREFIX/share/example/xsystem35/xsys35rc.sample +o Copy PREFIX/share/example/xsystem35/xsys35rc.sample to ~/.xsys35rc and fit it to your environment. -o install game data from AliceSoft's cdrom with +o Install game data from AliceSoft's cdrom with PREFIX/bin/instgame. o pcm0 sound device doesn't work well with this program for now. Try snd0 instead, OSS commercial product or - -devdsp none commandline option as the last resort. + `-devdsp none' command line option as the last resort. -enjoy! +Enjoy!