1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-19 19:59:43 +00:00

Initial import.

SEGA Megadrive/Genesis emulator.
This commit is contained in:
Yukihiro Nakai 2001-04-22 00:32:32 +00:00
parent 6d6a18ddea
commit e17d1ce305
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=41781
10 changed files with 319 additions and 0 deletions

View File

@ -16,6 +16,7 @@
SUBDIR += freesci
SUBDIR += frodo
SUBDIR += gbe
SUBDIR += generator
SUBDIR += gnuboy
SUBDIR += gsnes9x
SUBDIR += hfs

View File

@ -0,0 +1,42 @@
# New ports collection makefile for: generator
# Date created: 16 April 2001
# Whom: Yukihiro Nakai <nakai@FreeBSD.org>
#
# $FreeBSD$
#
PORTNAME= generator
PORTVERSION= 0.15
CATEGORIES= emulators
MASTER_SITES= http://www.squish.net/generator/files/
MAINTAINER= nakai@FreeBSD.org
LIB_DEPENDS= tcl82.1:${PORTSDIR}/lang/tcl82 \
tk82.1:${PORTSDIR}/x11-toolkits/tk82
CONFIGURE_ENV= CFLAGS="-I${LOCALBASE}/include \
-I${LOCALBASE}/include/tk8.2 -I${LOCALBASE}/include/tcl8.2"
CONFIGURE_ARGS= --enable-tcltk
USE_GMAKE= yes
USE_X_PREFIX= yes
GNU_CONFIGURE= yes
nakai:
echo ${CONFIGURE_ARGS}
do-configure:
( cd ${WRKSRC}/src; ${CONFIGURE_ENV} ../compile/${CONFIGURE_SCRIPT} \
${CONFIGURE_ARGS} )
do-build:
( cd ${WRKSRC}/src; ${GMAKE} )
do-install:
${MKDIR} ${PREFIX}/bin
${MKDIR} ${PREFIX}/share/generator/
${INSTALL_PROGRAM} ${WRKSRC}/src/generator-tcltk ${PREFIX}/bin
${INSTALL_DATA} ${WRKSRC}/share/* ${PREFIX}/share/generator
.include <bsd.port.mk>

View File

@ -0,0 +1 @@
MD5 (generator-0.15.tar.gz) = a557031c3ebcacfa20419454eeccedf1

View File

@ -0,0 +1,140 @@
--- compile/configure.orig Wed Apr 18 19:33:42 2001
+++ compile/configure Wed Apr 18 21:09:12 2001
@@ -2009,7 +2009,7 @@
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_save_LIBS="$LIBS"
-LIBS="-ltcl8.0 $LIBS"
+LIBS="-ltcl82 $LIBS"
cat > conftest.$ac_ext <<EOF
#line 2015 "configure"
#include "confdefs.h"
@@ -2037,7 +2037,7 @@
fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
- LIBS="$LIBS -ltcl8.0"; lib=yes
+ LIBS="$LIBS -ltcl82"; lib=yes
else
echo "$ac_t""no" 1>&6
lib=no
@@ -2051,7 +2051,7 @@
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_save_LIBS="$LIBS"
-LIBS="-ltcl $LIBS"
+LIBS="-ltcl82 $LIBS"
cat > conftest.$ac_ext <<EOF
#line 2057 "configure"
#include "confdefs.h"
@@ -2079,7 +2079,7 @@
fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
- LIBS="$LIBS -ltcl"; lib=yes
+ LIBS="$LIBS -ltcl82"; lib=yes
else
echo "$ac_t""no" 1>&6
lib=no
@@ -2096,7 +2096,7 @@
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_save_LIBS="$LIBS"
-LIBS="-ltk8.0 $LIBS"
+LIBS="-ltk82 $LIBS"
cat > conftest.$ac_ext <<EOF
#line 2102 "configure"
#include "confdefs.h"
@@ -2124,7 +2124,7 @@
fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
- LIBS="$LIBS -ltk8.0"; lib=yes
+ LIBS="$LIBS -ltk82"; lib=yes
else
echo "$ac_t""no" 1>&6
lib=no
@@ -2138,7 +2138,7 @@
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_save_LIBS="$LIBS"
-LIBS="-ltk $LIBS"
+LIBS="-ltk82 $LIBS"
cat > conftest.$ac_ext <<EOF
#line 2144 "configure"
#include "confdefs.h"
@@ -2166,7 +2166,7 @@
fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
- LIBS="$LIBS -ltk"; lib=yes
+ LIBS="$LIBS -ltk82"; lib=yes
else
echo "$ac_t""no" 1>&6
lib=no
@@ -2322,18 +2322,20 @@
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_save_LIBS="$LIBS"
-LIBS="-lalleg $LIBS"
+LIBS="-L/usr/local/lib -lalleg-3.9.34 -lalleg_unsharable $LIBS"
cat > conftest.$ac_ext <<EOF
#line 2328 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
-char allegro_exit();
+#include <allegro.h>
int main() {
allegro_exit()
; return 0; }
+
+END_OF_MAIN();
EOF
if { (eval echo configure:2339: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
@@ -2350,7 +2352,7 @@
fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
- LIBS="$LIBS -lalleg";lib=yes
+ LIBS="$LIBS -L/usr/local/lib -lalleg-3.9.34 -lalleg_unsharable";lib=yes
else
echo "$ac_t""no" 1>&6
lib=no
@@ -2599,7 +2601,7 @@
#include "confdefs.h"
#include <$ac_hdr>
EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+ac_try="$ac_cpp -I/usr/local/include/tk8.2/ -I/usr/local/include/tcl8.2/ conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2604: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
@@ -2686,7 +2688,7 @@
#include "confdefs.h"
#include <$ac_hdr>
EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+ac_try="$ac_cpp -I/usr/local/include/tcl8.2 conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2691: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
@@ -2950,6 +2952,7 @@
fprintf(f, "%d\n", sizeof(unsigned char));
exit(0);
}
+
EOF
if { (eval echo configure:2955: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
@@ -2982,6 +2985,7 @@
#line 2983 "configure"
#include "confdefs.h"
#include <stdio.h>
+
main()
{
FILE *f=fopen("conftestval", "w");

View File

@ -0,0 +1,13 @@
--- src/generator.c.orig Mon May 1 02:01:59 2000
+++ src/generator.c Wed Apr 18 22:32:44 2001
@@ -109,8 +109,10 @@
ui_err("Failed to initialise cpuz80 module (%d)", retval);
/* initialise sound system */
+/*
if ((retval = sound_init()))
ui_err("Failed to initialise sound module (%d)", retval);
+*/
signal(SIGINT, gen_sighandler);

View File

@ -0,0 +1,75 @@
--- src/gensound.c.orig Mon May 1 02:04:06 2000
+++ src/gensound.c Wed Apr 18 22:32:49 2001
@@ -50,7 +50,7 @@
static unsigned int sound_sampsperfield = 0;
static int sound_dev = 0;
-/* static int sound_dump = 0; */
+static int sound_dump = 0;
static uint16 soundbuf[2][SOUND_MAXRATE/50]; /* pal is lowest framerate */
static int sound_format;
static int sound_stereo;
@@ -69,15 +69,19 @@
{
audio_buf_info sound_info;
+ return 0;
+
LOG_NORMAL(("Initialising sound..."));
sound_sampsperfield = SOUND_SAMPLERATE / vdp_framerate;
- /* sound_dump = open("/tmp/sound_dump", O_CREAT|O_WRONLY|O_TRUNC); */
+ sound_dump = open("/tmp/sound_dump", O_CREAT|O_WRONLY|O_TRUNC);
- if ((sound_dev = open(SOUND_DEVICE, O_WRONLY, 0)) == -1) {
+/*
+ if ((sound_dev = open("/dev/null", O_WRONLY, 0)) == -1) {
LOG_CRITICAL(("open " SOUND_DEVICE " failed: %s", strerror(errno)));
return 1;
}
+ sound_dev = sound_dump;
sound_frag = (SOUND_FRAGMENTS<<16 |
(int)(ceil(log10(sound_sampsperfield*4)/log10(2))));
if (ioctl(sound_dev, SNDCTL_DSP_SETFRAGMENT, &sound_frag) == -1) {
@@ -142,6 +146,7 @@
return 1;
LOG_NORMAL(("YM2612 Initialised @ sample rate %d", sound_speed));
return 0;
+*/
}
/*** sound_final - finalise this sub-unit ***/
@@ -169,6 +174,7 @@
void sound_genreset(void)
{
+ return 0;
#ifdef JFM
jfm_reset(sound_ctx);
#else
@@ -211,6 +217,8 @@
audio_buf_info sound_info;
unsigned int pending;
+ return 0;
+
if (ioctl(sound_dev, SNDCTL_DSP_GETOSPACE, &sound_info) == -1)
ui_err("Error getting output space info", strerror(errno));
pending = (sound_info.fragstotal*sound_info.fragsize)-sound_info.bytes;
@@ -232,14 +240,14 @@
buffer[i*2+1] = (soundbuf[1][i] >> 8) | ((soundbuf[1][i] << 8) & 0xff00);
}
}
+/*
if (write(sound_dev, buffer, sound_sampsperfield*4) == -1) {
if (errno != EINTR)
ui_err("Error writing to sound device: %s", strerror(errno));
}
- /*
+*/
if (write(sound_dump, buffer, sound_sampsperfield*4) == -1)
ui_err("Error writing to dump file: %s", strerror(errno));
- */
}
#ifdef JFM

View File

@ -0,0 +1,34 @@
--- src/snd/fm.c.orig Wed Apr 18 22:37:06 2001
+++ src/snd/fm.c Wed Apr 18 22:37:27 2001
@@ -1231,6 +1231,8 @@
{
int fn;
+return 0;
+
/* frequency base */
OPN->ST.freqbase = (OPN->ST.rate) ? ((double)OPN->ST.clock * 4096.0 / OPN->ST.rate) / pris : 0;
/* Timer base time */
@@ -3183,6 +3185,8 @@
YM2612 *F2612 = &(FM2612[n]);
int addr;
+ return 0;
+
switch( a&3){
case 0: /* address port 0 */
F2612->OPN.ST.address = v & 0xff;
@@ -3227,8 +3231,13 @@
}
unsigned char YM2612Read(int n,int a)
{
+/*
YM2612 *F2612 = &(FM2612[n]);
int addr = F2612->OPN.ST.address;
+*/
+ YM2612 *F2612; int addr;
+
+ return 0;
switch( a&3){
case 0: /* status 0 */

View File

@ -0,0 +1 @@
SEGA Genesis emulator

View File

@ -0,0 +1,6 @@
SEGA Genesis emulator
I ported to FreeBSD with all sound support off.
If you want the sound support, you hack.
WWW: http://www.squish.net/generator/

View File

@ -0,0 +1,6 @@
bin/generator-tcltk
share/generator/copyright.hlp
share/generator/gen.tcl
share/generator/generator.hlp
share/generator/genesis.hlp
@dirrm share/generator