summaryrefslogtreecommitdiff
path: root/emulators
diff options
context:
space:
mode:
authorobache <obache@pkgsrc.org>2010-01-07 08:38:43 +0000
committerobache <obache@pkgsrc.org>2010-01-07 08:38:43 +0000
commite311bda4e761695befa382224e185802abbd8720 (patch)
tree5a8f804fd72a07a3a2f86a45c1a6ef2a4a2e864b /emulators
parentf83bbe82b606e59ec3748873a0a3524554ffb05b (diff)
downloadpkgsrc-e311bda4e761695befa382224e185802abbd8720.tar.gz
Update fmsx to 3.5.1.
approved by agc@. New in This Version * After a long pause, finally updated fMSX-Unix port. fMSX-Unix source code is once again available as part of the core source code distribution. It has been debugged on the Ubuntu Linux. Let me know of any incompatibilities with other Unix flavors. * Extended fMSX-Symbian port to support UIQ3 phones from Sony Ericsson and Motorola. As I only have key-operated Motorola Z8, testers with pen-based SE phones are badly needed. * Added run-time compatibility with 8bpp, 16bpp, 24bpp (32bit pixels) and 32bpp screen depths to fMSX-Unix. IMPORTANT: At this moment, built-in config menu, debugger, and NetPlay dialog will only work at X11 screen depth that matches your compile-time setting (i.e. -DBPPxx) in Makefile. Make sure you always compile fMSX-Unix for your default screen depth. * Disabled secondary slots for primary slot #0 in MSX1 mode. DiskROM boots in MSX1 mode again. * Now syncing all sound channels after loading state, sound does not get "stuck" any more. * Renamed command line option -zoom/-nozoom into -soft/-nosoft. * Moved a few key definitions, so that "!@#$%^..." characters can now be used as indices into Keys[]. This is done for compatibility with GDK key events. * Renamed KeyMap[] to KeyState[] to avoid name clash with MacOSX system API. * ALT swaps joysticks 1/2 on all platforms where applicable. * CONTROL/SHIFT keys now act as FIRE-A/FIRE-B joystick buttons on all platforms. * Improved fMSX-Symbian sound code, although sound problems still persist on some UIQ3 phones. * Split fMSX-Symbian/S60 configuration menu into four tabs, making "Video" and "Audio" settings separate. * Added "Audio Latency", "Skip Frames", and "Sync Updates" settings to fMSX-Symbian. * Added to fMSX-Symbian ability to use Nokia E61/E62 [FUNC] key in the built-in menu. * Fixed an fMSX-Symbian bug where pieces of virtual keyboard remained on screen after closing it. * Pressing [8] key on fMSX-Symbian now invokes virtual keyboard, if enabled, for the phones which do not have the [EDIT] key. New in fMSX 3.4 * Added network play option to fMSX-Windows and fMSX-Symbian! * Now not opening printer file until the first character is printed. * Fixed OUTD/OUTDR opcodes to modify B register before the OUT operation. * No longer trying to load state files from LoadFile(). * Defined "INLINE" properly, depending on the C standard supported by the compiler. * Finally retired #ifdef SOUND as sound is always compiled in anyway. * Added new, much better, scanline simulation and video softening effects to fMSX-Windows. * fMSX-Windows full-screen mode now runs in 640x480 resolution. * Fixed problem with full-screen SCREEN 6/7 in fMSX-Windows. * fMSX-MSDOS has got complete (non-truncated) emulation for SCREEN 6/7 and TEXT80 screen modes. * fMSX-MSDOS now always runs in 640x480x15bpp VESA screen mode. * Added options to simulate TV scanlines (-tv/-notv) and zoom display (-zoom/ -nozoom) to fMSX-MSDOS. * Options -sync/-nosync/-vsync work properly again in fMSX-MSDOS. * Added new "Fill & Soften" zoom mode to fMSX-Symbian. It is rather slow though. * Added ability to use virtual keyboard in fMSX-Symbian to enter filename when saving files from the built-in menu. * Fixed problem with gameplay being too fast in fMSX-Symbian. * Fixed possible source of instabilities in the S60 open file dialog in fMSX-Symbian. * Fixed exit via Symbian-specific menu. * Fixed premature termination of the emulation thread when exiting fMSX-Symbian, soundtrack recording and config saving work again. * The [C] ("Clear") key is no longer used to toggle sound in fMSX-Symbian. It acts as [BACKSPACE] instead. New in fMSX 3.3 * Save state format has changed due to serious changes to the emulator architecture! * Added OpZ80() function and the FAST_RDOP macro to the Z80 emulation to optimize code access in architectures with memory-mapped I/O. * Added subslot support to all slots. * Moved PAINTER.ROM to slot 0:1, FMPAC to slot 0:2, MSXDOS2.ROM to slot 3:0. * Reduced the number of user cartridges back to two (A/B). All the other slots are taken by system cartridges (MSXDOS2, FMPAC, etc.). * Locked user cartridges in slots 1/2 to subslot 0, as external cartridges often do not use subslots. * If Konami's GMASTER2.ROM or GMASTER.ROM is present in the program directory, fMSX will now load it as a system cartridge. * Fixed state file name autogeneration. * Fixed -rom option behaviour. * Fixed hangup when switching from MSX1 to MSX2 mode. * Fixed MSXDOS2.ROM and FMPAC.ROM support. * Fixed StateID() function to take all cartridges and system ROMs into account. * Fixed non-working joystick autofire. * Now checking joysticks and mice once per frame. * Now accelerating horizontal mouse movement in 512-wide screen modes. * Mouse buttons are now merged with joystick buttons. * Fixed mouse-as-joystick option. * Improved file type detection, now automatically detecting saved states, disk images, cartridge ROMs, fixed font files. * Readded proper support for fixed text mode fonts with LoadFNT(). * Added proper emulation for the WD1793 FDC (WD1793.c). * Added unified .FDI disk image support (FDIDisk.c). * Added support for standard, SV738, Arabic, and Brazilian WD1793-based disk interfaces. * Added support for GZIPped disk images. * Made disk geometry discovery smarter (CP/M-80 v2.2 now boots). * Moved 720kB floppy utilities (Floppy.c) and SCC sound chip emulation (SCC.c) into EMULib. * Added command line option to patch DiskROM calls (-simbdos). With this option on, fMSX takes over DiskROM disk access routines. When -wd1793 is used, fMSX will simulate real WD1793 FDC instead. * Rehashed built-in menu to make screen space for more options. * Added menu options to select RAM and VRAM sizes, create new disk images, save disk images, patch DiskROM calls, load and use fixed text mode fonts. * Added virtual keyboard to fMSX-Symbian, invoked by pressing [EDIT] or left [SHIFT] key. The keyboard can work in three modes: "Off", "Single Key Entry", and "Multiple Keys Entry". * Added display orientation settings to fMSX-Symbian ("Landscape", "Portrait", and "Auto"). * Finally fixed opendir() problem in EMULib-Symbian. All built-in menu file dialogs work now! * Further extended and optimized Symbian screen rendering routines. * Fixed and optimized TV scanline simulation in fMSX-Symbian, made scanline effect stronger. * Now saving RAM and VRAM size settings in fMSX-Symbian. * fMSX-Symbian now uses true 512-wide display drivers for SCREEN6, SCREEN7, and TEXT80. * fMSX-Symbian will now save printer output to E:\Others\fMSX\PRINTER.OUT. * Fixed system warnings in when flipping Nokia E70 open/closed. * Fixed possible crash when selecting an initial file in fMSX-Symbian. * Improved "About" box in fMSX-Symbian. * Moved fMSX-Symbian file selection root to E:\. * When initial file selection cancelled, fMSX-Symbian will now boot into plain BASIC (i.e. no cartridges and no disks). * Renamed fMSX-Symbian binary and resource files to avoid name clash with fMSX/S60 port by Juha Riihimaki. * Fixed mouse support in fMSX-MSDOS. New in fMSX 3.2 * Added ChangePrinter() function to set printer redirection file. * Moved disk operations to a separate submenu of the built-in menu and added "Eject Disk" options. * Added an easy "Load File" option to the built-in menu and the fMSX-Windows. * Added options to redirect printer and sound logging output to the built-in menu and the fMSX-Windows. * Added error messages to fMSX-Windows and fMSX-Symbian. * Added frame rate display option to fMSX-Symbian. * Added "fill screen" zoom option to fMSX-Symbian. * Added MIDI soundtrack logging to fMSX-Symbian (saved into E:\Sounds and can be used as ringtones). * Added configurable button and key mappings to fMSX-Symbian. * fMSX-Symbian application menu is now split into three pages. New in fMSX 3.1 * fMSX-Windows and fMSX-DOS are now compiled with OpenWatcom C++ and use the new EMULib framework. Note that keyboard assignments have changed! * Added hardware reset key ([F11]) to reboot MSX. * Added universal screen buffer based Z80 debugger ([F10]) that works on all platforms. * Added universal configuration menu ([F8]) that works on all platforms. * Added ResetMSX() function to restart MSX, possibly in a new operating mode. * Extended LoadCart() function to load or eject cartridges at runtime. * Added Mode variable to store all configuration options. * Replaced -vperiod/-hperiod settings with easier to understand -pal/-ntsc settings. * Replaced -uperiod setting with a finer -skip setting that controls the percentage of skipped frames. * Fixed Z80 NMI handling to comply with the standard. * Fixed SRAM file saving. * Fixed state file name generation. * Added autofire options for joystick buttons. * fMSX-Windows has got a new menu-based GUI, improved sound, and faster graphics updates. * Fixed USB joypad support in fMSX-Windows. * fMSX-MSDOS now uses 16BPP screen mode. * Updated the documentation. New in fMSX 3.0 * Added transparent support for GZIPped disk images as disks. You can now pass .GZ file names in -diska/-diskb command line options. * Added transparent support for directories as disks (thanks to Miguel Colom). You can now pass directory names in -diska/-diskb command line options. Changes to such disks will not be saved for safety reasons. * Added DirectDraw-based full screen mode to fMSX-Windows. Press [ALT]+ [ENTER] to switch in and out of the full screen mode. Use it with caution, as DirectDraw is notoriously unstable. * Added a full-fledged debugger to fMSX-Windows. Press [F11] to invoke the debugger. * Fixed several bugs in MIDI implementations that made some games silent when logging soundtrack or using MIDI output in fMSX-Windows. * Better adapted fMSX-MSDOS to 320x200 VGA screen. * "Sync to VBlanks" option is now default in fMSX-MSDOS. New in fMSX 2.8 * Fixed initial envelope volume in AY8910.c, thanks to Koichi Nishida. * Fixed a problem with 8kB/16kB cartridges failing to execute in the MSX1 mode. * When guessing a MegaROM mapper type, fMSX now tries to look at a data file CARTS.CRC containing pairs of cartridge CRCs and mapper types. * Added support for the third cartridge slot. You can now give up to three cartridge names on the command line and three -rom options. * Cartridges are now inserted into slots 1:X (A), 2:X (B), and 3:0 (C). The RS232.ROM has been moved to slot 3:3. * Added support for the 64kB Panasonic FM-PAC cartridge with 8kB SRAM (-rom 7). * fMSX loads files FMPAC.ROM, MSXDOS2.ROM, and PAINTER.ROM automatically, as long as they are in the program directory and there is an empty cartridge slot available. * Added support for ASCII/8kB cartridges with 8kB SRAM (Xanadu, Royal Blood). Please, inform me if this has broken support for any "normal" ASCII/8kB cartridges. * Added support for ASCII/16kB cartridges with 2kB SRAM (Hydlide 2). Please, inform me if this has broken support for any "normal" ASCII/16kB cartridges. * All battery-backed SRAM save files have now got .SAV extension. For example, GameMaster2.rom will produce a SRAM file named GameMaster2.sav. * Added reporting of bad memory writes with -verbose 8. * The R-Type cartridge and its variants are supported by the ASCII/16kB MegaROM mapper (-rom 5). * HAL's Hole In One Special cartridge is supported by the GENERIC/16kB MegaROM mapper (-rom 1). * Konami's Majutsushi (aka Mah Jong 2 or RC765) cartridge is supported by the GENERIC/8kB MegaROM mapper (-rom 0), although the D/A audio circuit emulation is not implemented. * Added fast-forwarding option ([F9]) and moved fixed font switch to a different key ([CONTROL]-[F9]). * Changed [F6],[F9],[F10] assignments in fMSX-Windows to comply with other fMSX ports. * Added Options menu to fMSX-Windows. * fMSX-FreeBSD now compiles without changes on FreeBSD 5.x (FreeBSD 4.x users may have to change the location of the soundcart.h). * Fixed sound in fMSX-FreeBSD by increasing the number of sound fragments from 8 to 64. If any of FreeBSD developers are reading this, could you explain why this is needed? New in fMSX 2.7 * Switched to the latest version of the OpenWatcom C/C++ compiler. * The infamous Windows problem with spaces in directory names seems to be fixed by using a newer compiler. * Made some arrays "const" to facilitate porting to run-from-ROM platforms (cellphones, PDAs, etc.). * Joystick problems in fMSX-Windows are fixed. * Descreased the default sound volume in fMSX-Unix. * Increased the default wave synthesis frequency to 44.1kHz. * Minor fixes to the Unix sound drivers. * Removed MIDI volume control from Windows sound drivers. * Added TV raster effect to fMSX-Windows. New in fMSX 2.6 * Added separate (and correct) emulation for the i8255 PPI chip. * Added masking to lower bits of video table addresses. * Added timing and other fixes to the Z80 core (courtesy of Omar Cornut). * Fixed line coincidence and VBlank handling (thanks to Vincent van Dam). * Save state (.STA) file format has changed. * Fixed a bug that messed up screen table addresses when restoring state. * Fixed a bug that left dummy memory page dirty when loading GZIPped ROMs. * Fixed a -home option bug on Solaris (thanks to Eric Boon). * Fixed fMSX-Unix to allow it to have an application icon under WindowMaker. New in fMSX 2.5 * Added emulation state saving and loading. * Added support for GZIPped ROM files and state file. * Changed keyboard handler in fMSX-Unix. Hopefully, the key assignments should now be more natural. * Added sound on/off switch to fMSX-Unix and fMSX-MSDOS. * Keyboard assignments changed everywhere.
Diffstat (limited to 'emulators')
-rw-r--r--emulators/fmsx/Makefile65
-rw-r--r--emulators/fmsx/PLIST11
-rw-r--r--emulators/fmsx/distinfo18
-rw-r--r--emulators/fmsx/patches/patch-aa43
-rw-r--r--emulators/fmsx/patches/patch-ab48
-rw-r--r--emulators/fmsx/patches/patch-ac20
-rw-r--r--emulators/fmsx/patches/patch-ad180
-rw-r--r--emulators/fmsx/patches/patch-ae13
-rw-r--r--emulators/fmsx/patches/patch-af12
-rw-r--r--emulators/fmsx/patches/patch-ag17
-rw-r--r--emulators/fmsx/patches/patch-ah12
11 files changed, 142 insertions, 297 deletions
diff --git a/emulators/fmsx/Makefile b/emulators/fmsx/Makefile
index fd95689eb3c..9a62cbfed06 100644
--- a/emulators/fmsx/Makefile
+++ b/emulators/fmsx/Makefile
@@ -1,11 +1,10 @@
-# $NetBSD: Makefile,v 1.25 2008/03/03 19:21:38 jlam Exp $
+# $NetBSD: Makefile,v 1.26 2010/01/07 08:38:43 obache Exp $
-DISTNAME= fMSX24.tar
-PKGNAME= fmsx-2.4
-PKGREVISION= 1
+DISTNAME= fMSX351
+PKGNAME= fmsx-3.5.1
CATEGORIES= emulators x11
MASTER_SITES= http://fms.komkon.org/fMSX/
-EXTRACT_SUFX= .Z
+EXTRACT_SUFX= .zip
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://fms.komkon.org/fMSX/
@@ -13,55 +12,57 @@ COMMENT= MSX (Z80-based computer) emulator
RESTRICTED= ROM image copyright is questionable
NO_BIN_ON_CDROM= ${RESTRICTED}
-NO_SRC_ON_CDROM= ${RESTRICTED}
NO_BIN_ON_FTP= ${RESTRICTED}
+NO_SRC_ON_CDROM= ${RESTRICTED}
NO_SRC_ON_FTP= ${RESTRICTED}
PKG_DESTDIR_SUPPORT= user-destdir
-WRKSRC= ${WRKDIR}/MSX
+WRKSRC= ${WRKDIR}
+
+BUILD_DIRS= fMSX/Unix
.include "../../mk/bsd.prefs.mk"
+.include "../../mk/endian.mk"
+
.if ${OPSYS} == "NetBSD" || ${OPSYS} == "SunOS"
USE_SUN_AUDIO?= YES
.else
USE_SUN_AUDIO?= NO
.endif
-DEFS= -DFontDir=\"${PREFIX:Q}/share/fmsx/\"
-DEFS+= -DRomDir=\"${PREFIX:Q}/share/fmsx/\"
-DEFS+= -DMITSHM -D${CUR_DEPTH} -DSOUND
+DEFS+= -DRomDir=\"${PREFIX:Q}/share/fmsx\"
.if ${USE_SUN_AUDIO} == "YES"
DEFS+= -DSUN_AUDIO
-.endif
+.else
+. include "../../mk/oss.buildlink3.mk"
-MAKE_ENV+= DEFS=${DEFS:Q}
+SUBST_CLASSES+= devdsp
+SUBST_STAGE.devdsp= pre-build
+SUBST_FILES.devdsp= EMULib/SndUnix.c
+SUBST_SED.devdsp= -e 's|/dev/dsp|${DEVOSSSOUND}|g'
-INSTALLATION_DIRS= bin
+.endif
+.if ${MACHINE_ENDIAN} == "big"
+DEFS+= -DMSB_FIRST
+.elif ${MACHINE_ENDIAN} == "little"
+DEFS+= -DLSB_FIRST
+.else
+BROKEN+= "Unknown endian"
+.endif
-post-extract:
- @${RM} ${WRKSRC}/CMOS.ROM
- @${CHMOD} -R a+r ${WRKSRC}
+MAKE_ENV+= DEFS=${DEFS:Q}
-pre-install:
- @${INSTALL_DATA_DIR} ${PREFIX}/share/fmsx
- @${INSTALL_DATA_DIR} ${PREFIX}/share/doc/html
+INSTALLATION_DIRS= bin share/fmsx share/doc
# Makefile of fMSX doesn't have install target.
do-install:
- ${INSTALL_PROGRAM} ${WRKSRC}/fmsx ${DESTDIR}${PREFIX}/bin
- ${INSTALL_PROGRAM} ${WRKSRC}/rddsk ${DESTDIR}${PREFIX}/bin
- ${INSTALL_PROGRAM} ${WRKSRC}/wrdsk ${DESTDIR}${PREFIX}/bin
- ${INSTALL_DATA} ${WRKSRC}/*.ROM ${DESTDIR}${PREFIX}/share/fmsx
- ${INSTALL_DATA} ${WRKSRC}/fMSX.html ${DESTDIR}${PREFIX}/share/doc/html
+ ${INSTALL_PROGRAM} ${WRKSRC}/fMSX/Unix/fmsx ${DESTDIR}${PREFIX}/bin
+ ${INSTALL_DATA} ${WRKSRC}/fMSX/ROMs/*.ROM ${DESTDIR}${PREFIX}/share/fmsx
+ ${INSTALL_DATA} ${WRKSRC}/fMSX/ROMs/*.FNT ${DESTDIR}${PREFIX}/share/fmsx
+ ${INSTALL_DATA} ${WRKSRC}/fMSX/fMSX.html ${DESTDIR}${PREFIX}/share/doc
+.include "../../devel/zlib/buildlink3.mk"
.include "../../x11/libXext/buildlink3.mk"
.include "../../x11/xextproto/buildlink3.mk"
+.include "../../mk/pthread.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
-
-# XXX It would be nice to customize for each user's display, but this
-# way of doing it at build time depending on build environment is wrong.
-#.ifdef DISPLAY
-#CUR_DEPTH!= ( xwininfo -display ${DISPLAY} -root | fgrep Depth: | ${SED} 's-.*Depth: -BPP-' )
-#.else
-CUR_DEPTH= BPP8
-#.endif
diff --git a/emulators/fmsx/PLIST b/emulators/fmsx/PLIST
index 2a3913c4c7f..3c3ab36fc9c 100644
--- a/emulators/fmsx/PLIST
+++ b/emulators/fmsx/PLIST
@@ -1,14 +1,17 @@
-@comment $NetBSD: PLIST,v 1.2 2009/06/14 17:51:04 joerg Exp $
+@comment $NetBSD: PLIST,v 1.3 2010/01/07 08:38:43 obache Exp $
bin/fmsx
-bin/rddsk
-bin/wrdsk
+share/doc/fMSX.html
+share/fmsx/CYRILLIC.FNT
share/fmsx/DISK.ROM
share/fmsx/FMPAC.ROM
+share/fmsx/FMPAC16.ROM
+share/fmsx/ITALIC.FNT
share/fmsx/KANJI.ROM
share/fmsx/MSX.ROM
share/fmsx/MSX2.ROM
share/fmsx/MSX2EXT.ROM
share/fmsx/MSX2P.ROM
share/fmsx/MSX2PEXT.ROM
+share/fmsx/MSXDOS2.ROM
share/fmsx/PAINTER.ROM
-share/doc/html/fMSX.html
+share/fmsx/RS232.ROM
diff --git a/emulators/fmsx/distinfo b/emulators/fmsx/distinfo
index 713d2f58976..b49475130b7 100644
--- a/emulators/fmsx/distinfo
+++ b/emulators/fmsx/distinfo
@@ -1,9 +1,11 @@
-$NetBSD: distinfo,v 1.5 2006/01/15 19:32:44 joerg Exp $
+$NetBSD: distinfo,v 1.6 2010/01/07 08:38:43 obache Exp $
-SHA1 (fMSX24.tar.Z) = ea44eb273b9532ad0fb388e5ffbebdf348d00467
-RMD160 (fMSX24.tar.Z) = 1df5673271ed354ccc6ee720ad06ccbb07e60a91
-Size (fMSX24.tar.Z) = 506755 bytes
-SHA1 (patch-aa) = 07ee581d3dc3aab51a311c7504c2616f39e3409b
-SHA1 (patch-ab) = 58d44910dbae52ebecb42854f477f32b7a75e20b
-SHA1 (patch-ac) = 884f137a757be514a87005c82f2f3a0c4031190d
-SHA1 (patch-ad) = 8d0db8cc68283e1a98e355672db4cb7ca0de42e9
+SHA1 (fMSX351.zip) = d28d2bf3bc2a1ae273899c80bbbe9bdf4dd98767
+RMD160 (fMSX351.zip) = be16d466f5ff29265d0faebd186a701a96ba81f6
+Size (fMSX351.zip) = 515112 bytes
+SHA1 (patch-aa) = 80191e7d1ff6b36cc1cf97174162e179d743b149
+SHA1 (patch-ab) = 7bff0051685efd22e678c66ffa4075830143e6d6
+SHA1 (patch-ae) = 7168f963dac8686200119b297af3bcf8f8203c4c
+SHA1 (patch-af) = df2dd22ae51558497e1691a13cfaf4556562f483
+SHA1 (patch-ag) = 2a1f29485ffe0d51eeaf093de434e9a49a4b8f48
+SHA1 (patch-ah) = eb44189e26a485b9bc50462127b7b74b8d161734
diff --git a/emulators/fmsx/patches/patch-aa b/emulators/fmsx/patches/patch-aa
index 6592bf5789e..4afb17cee07 100644
--- a/emulators/fmsx/patches/patch-aa
+++ b/emulators/fmsx/patches/patch-aa
@@ -1,30 +1,21 @@
-$NetBSD: patch-aa,v 1.4 2006/01/15 19:32:44 joerg Exp $
+$NetBSD: patch-aa,v 1.5 2010/01/07 08:38:43 obache Exp $
---- Makefile.orig Mon May 14 07:38:23 2001
-+++ Makefile Sun Jun 3 04:48:12 2001
-@@ -42,10 +42,8 @@
- # If you are getting linker errors about not found X11 functions,
- # change the -L/usr/X11R6/lib to the directory where X11
- # libraries libX11.* and libXext.* are located on your system.
--CC = gcc
--DEFINES = -DFMSX -DUNIX -DLSB_FIRST -DDEBUG -DMITSHM \
-- -DDISK -DNARROW -DSOUND -DBPP16
--CFLAGS = -O3 -I/usr/X11R6/include -L/usr/X11R6/lib ${DEFINES}
-+DEFINES = -DFMSX -DUNIX -DDISK -DNARROW ${DEFS}
-+CFLAGS = -O3 -Wall -fomit-frame-pointer -I${X11BASE}/include ${DEFINES}
- OBJECTS = fMSX.o MSX.o Z80.o AY8910.o YM2413.o SCC.o I8251.o V9938.o \
- Patch.o Debug.o Disk.o Unix.o LibUnix.o SndUnix.o Sound.o
+--- fMSX/Unix/Makefile.orig 2008-01-28 19:29:59.000000000 +0000
++++ fMSX/Unix/Makefile
+@@ -1,6 +1,6 @@
+ include ../../EMULib/Rules.Unix
-@@ -61,7 +59,11 @@
- # fMSX Unix/X requires X11 libraries. See note above if you are
- # experiencing any problems.
- fmsx: ${OBJECTS}
-- ${CC} ${CFLAGS} -o fmsx ${OBJECTS} -lXext -lX11
-+.if defined(USE_SUN_AUDIO)
-+ ${CC} ${CFLAGS} -o fmsx ${OBJECTS} -Wl,-R${X11BASE}/lib -L${X11BASE}/lib -lXext -lX11
-+.else
-+ ${CC} ${CFLAGS} -o fmsx ${OBJECTS} -Wl,-R${X11BASE}/lib -L${X11BASE}/lib ${LIBOSSAUDIO} -lXext -lX11
-+.endif
+-DEFINES+= -DFMSX -DLSB_FIRST -DBPP16 -DCONDEBUG -DDEBUG
++DEFINES+= -DFMSX -DBPP16 -DCONDEBUG -DDEBUG $(DEFS)
+ CFLAGS += -I$(LIBZ80)
+ OBJECTS+= $(EMUUNIX) $(FLOPPY) $(FDIDISK) \
+ $(Z80) $(I8255) $(YM2413) $(AY8910) $(SCC) $(WD1793) \
+@@ -10,7 +10,7 @@ OBJECTS+= $(EMUUNIX) $(FLOPPY) $(FDIDISK
+ all: fmsx
+
+ fmsx: Makefile $(OBJECTS)
+- $(CC) -o $@ $(CFLAGS) $(OBJECTS) $(LIBS)
++ $(CC) -o $@ $(LDFLAGS) $(OBJECTS) $(LIBS)
- # Clean up.
clean:
+ rm -f $(OBJECTS)
diff --git a/emulators/fmsx/patches/patch-ab b/emulators/fmsx/patches/patch-ab
index 8914b46b7a6..0a3c5594b16 100644
--- a/emulators/fmsx/patches/patch-ab
+++ b/emulators/fmsx/patches/patch-ab
@@ -1,8 +1,8 @@
-$NetBSD: patch-ab,v 1.4 2006/01/15 19:32:44 joerg Exp $
+$NetBSD: patch-ab,v 1.5 2010/01/07 08:38:43 obache Exp $
---- SndUnix.c.orig 2001-03-07 19:15:16.000000000 +0000
-+++ SndUnix.c
-@@ -31,7 +31,9 @@
+--- EMULib/SndUnix.c.orig 2007-12-30 16:01:34.000000000 +0000
++++ EMULib/SndUnix.c
+@@ -30,7 +30,9 @@
#include <sys/audioio.h>
#include <sys/conf.h>
@@ -10,31 +10,25 @@ $NetBSD: patch-ab,v 1.4 2006/01/15 19:32:44 joerg Exp $
#include <stropts.h>
+#endif
- #define AUDIO_CONV(A) (ULAW[0xFF&(128+(A))])
+ #define AUDIO_CONV(A) (ULAW[0xFF&(128+(A))])
-@@ -73,15 +75,11 @@ static unsigned char ULAW[256] =
-
- #else /* SUN_AUDIO */
-
--#ifdef __FreeBSD__
--#include <machine/soundcard.h>
--#endif
--
- #ifdef __NetBSD__
- #include <soundcard.h>
- #endif
-
--#ifdef __linux__
-+#if defined(__FreeBSD__) || defined(__DragonFly__) || defined(__linux__)
+@@ -84,6 +86,10 @@ static const unsigned char ULAW[256] =
#include <sys/soundcard.h>
#endif
-
-@@ -236,7 +234,7 @@ static void SoundSignal(int SIG)
- case SIGUSR1:
- /* Suspend execution, until SIGUSR2 catched */
+
++#ifdef __DragonFly__
++#include <sys/soundcard.h>
++#endif
++
+ #define AUDIO_CONV(A) (128+(A))
+
+ #endif /* !SUN_AUDIO */
+@@ -224,7 +230,7 @@ void TrashAudio(void)
+ if(SoundFD>=0)
+ {
#ifndef SUN_AUDIO
-- ioctl(SoundFD,SNDCTL_DSP_RESET);
-+ ioctl(SoundFD,SNDCTL_DSP_RESET,1);
+- ioctl(SoundFD,SNDCTL_DSP_RESET);
++ ioctl(SoundFD,SNDCTL_DSP_RESET, 1);
#endif
- close(SoundFD);
- for(Suspended=1;Suspended;pause());
+ close(SoundFD);
+ }
diff --git a/emulators/fmsx/patches/patch-ac b/emulators/fmsx/patches/patch-ac
deleted file mode 100644
index 7fedf04c10b..00000000000
--- a/emulators/fmsx/patches/patch-ac
+++ /dev/null
@@ -1,20 +0,0 @@
-$NetBSD: patch-ac,v 1.2 2000/08/06 14:45:05 wiz Exp $
-
---- Z80.h.orig Thu Aug 3 18:56:00 2000
-+++ Z80.h Sun Aug 6 15:25:54 2000
-@@ -46,6 +46,15 @@
- #endif
- typedef signed char offset;
-
-+#include <sys/endian.h>
-+#if (_BYTE_ORDER == _LITTLE_ENDIAN)
-+#define LSB_FIRST
-+#elif (_BYTE_ORDER == _BIG_ENDIAN)
-+#define MSB_FIRST
-+#else
-+#warn Check if your machine is big endian or not and define as appropriate one.
-+#endif
-+
- /** Structured Datatypes *************************************/
- /** NOTICE: #define LSB_FIRST for machines where least **/
- /** signifcant byte goes first. **/
diff --git a/emulators/fmsx/patches/patch-ad b/emulators/fmsx/patches/patch-ad
deleted file mode 100644
index 5d79e2a000e..00000000000
--- a/emulators/fmsx/patches/patch-ad
+++ /dev/null
@@ -1,180 +0,0 @@
-$NetBSD: patch-ad,v 1.3 2001/06/03 17:34:58 kei Exp $
-
---- MSX.c.orig Mon May 14 07:35:08 2001
-+++ MSX.c Sun Jun 3 04:36:49 2001
-@@ -287,6 +287,7 @@
- byte *P;
- word A;
- FILE *F;
-+ char string[FILENAME_MAX];
-
- /*** STARTUP CODE starts here: ***/
-
-@@ -380,7 +381,7 @@
-
- /* Save current directory and cd to wherever system ROMs are */
- if(ProgDir)
-- if(WorkDir=getcwd(NULL,0))
-+ if((WorkDir=getcwd(NULL,0)))
- {
- Chunks[CCount++]=WorkDir;
- chdir(ProgDir);
-@@ -391,7 +392,10 @@
- {
- case 0:
- if(Verbose) printf(" Opening MSX.ROM...");
-- P=LoadROM("MSX.ROM",0x8000,0);
-+ bzero(string, sizeof(string));
-+ strcpy(string, RomDir);
-+ strcat(string, "MSX.ROM");
-+ P=LoadROM(string,0x8000,0);
- PRINTRESULT(P);
- if(!P) return(0);
- MemMap[0][0][0]=P;
-@@ -402,7 +406,10 @@
-
- case 1:
- if(Verbose) printf(" Opening MSX2.ROM...");
-- P=LoadROM("MSX2.ROM",0x8000,0);
-+ bzero(string, sizeof(string));
-+ strcpy(string, RomDir);
-+ strcat(string, "MSX2.ROM");
-+ P=LoadROM(string,0x8000,0);
- PRINTRESULT(P);
- if(!P) return(0);
- MemMap[0][0][0]=P;
-@@ -410,7 +417,10 @@
- MemMap[0][0][2]=P+0x4000;
- MemMap[0][0][3]=P+0x6000;
- if(Verbose) printf(" Opening MSX2EXT.ROM...");
-- P=LoadROM("MSX2EXT.ROM",0x4000,0);
-+ bzero(string, sizeof(string));
-+ strcpy(string, RomDir);
-+ strcat(string, "MSX2EXT.ROM");
-+ P=LoadROM(string,0x4000,0);
- PRINTRESULT(P);
- if(!P) return(0);
- MemMap[3][1][0]=P;
-@@ -419,7 +429,10 @@
-
- case 2:
- if(Verbose) printf(" Opening MSX2P.ROM...");
-- P=LoadROM("MSX2P.ROM",0x8000,0);
-+ bzero(string, sizeof(string));
-+ strcpy(string, RomDir);
-+ strcat(string, "MSX2P.ROM");
-+ P=LoadROM(string,0x8000,0);
- PRINTRESULT(P);
- if(!P) return(0);
- MemMap[0][0][0]=P;
-@@ -427,7 +440,10 @@
- MemMap[0][0][2]=P+0x4000;
- MemMap[0][0][3]=P+0x6000;
- if(Verbose) printf(" Opening MSX2PEXT.ROM...");
-- P=LoadROM("MSX2PEXT.ROM",0x4000,0);
-+ bzero(string, sizeof(string));
-+ strcpy(string, RomDir);
-+ strcat(string, "MSX2PEXT.ROM");
-+ P=LoadROM(string,0x4000,0);
- PRINTRESULT(P);
- if(!P) return(0);
- MemMap[3][1][0]=P;
-@@ -436,7 +452,10 @@
- }
-
- /* Try loading DiskROM */
-- if(P=LoadROM("DISK.ROM",0x4000,0))
-+ bzero(string, sizeof(string));
-+ strcpy(string, RomDir);
-+ strcat(string, "DISK.ROM");
-+ if((P=LoadROM(string,0x4000,0)))
- {
- if(Verbose) puts(" Opening DISK.ROM...OK");
- MemMap[3][1][2]=P;
-@@ -469,16 +488,25 @@
- if(Verbose) printf("Loading other ROMs: ");
-
- /* Try loading CMOS memory contents */
-- if(LoadROM("CMOS.ROM",sizeof(RTC),(byte *)RTC))
-+ bzero(string, sizeof(string));
-+ strcpy(string, RomDir);
-+ strcat(string, "CMOS.ROM");
-+ if(LoadROM(string,sizeof(RTC),(byte *)RTC))
- { if(Verbose) printf("CMOS.ROM.."); }
- else memcpy(RTC,RTCInit,sizeof(RTC));
-
- /* Try loading Kanji alphabet ROM */
-- if(Kanji=LoadROM("KANJI.ROM",0x20000,0))
-+ bzero(string, sizeof(string));
-+ strcpy(string, RomDir);
-+ strcat(string, "KANJI.ROM");
-+ if((Kanji=LoadROM(string,0x20000,0)))
- { if(Verbose) printf("KANJI.ROM.."); }
-
- /* Try loading RS232 support ROM */
-- if(P=LoadROM("RS232.ROM..",0x4000,0))
-+ bzero(string, sizeof(string));
-+ strcpy(string, RomDir);
-+ strcat(string, "RS232.ROM");
-+ if((P=LoadROM(string,0x4000,0)))
- {
- if(Verbose) printf("RS232.ROM..");
- MemMap[3][0][2]=P;
-@@ -486,7 +514,10 @@
- }
-
- /* Try loading FM-PAC support ROM */
-- if(P=LoadROM("FMPAC.ROM",0x4000,0))
-+ bzero(string, sizeof(string));
-+ strcpy(string, RomDir);
-+ strcat(string, "FMPAC.ROM");
-+ if((P=LoadROM(string,0x4000,0)))
- {
- if(Verbose) printf("FMPAC.ROM..");
- MemMap[3][3][2]=P;
-@@ -574,7 +605,10 @@
- if(J&&(MemMap[3][1][2]!=EmptyRAM))
- {
- if(J==2) ROMTypeB=1; else ROMTypeA=1;
-- if(LoadCart("MSXDOS2.ROM",J-1))
-+ bzero(string, sizeof(string));
-+ strcpy(string, RomDir);
-+ strcat(string, "MSXDOS2.ROM");
-+ if(LoadCart(string,J-1))
- SetMegaROM(J-1,0,1,ROMMask[J-1]-1,ROMMask[J-1]);
- }
-
-@@ -584,15 +618,21 @@
- else J=0;
-
- /* Try loading PAINTER ROM if slot found */
-- if(J) LoadCart("PAINTER.ROM",J-1);
-+ bzero(string, sizeof(string));
-+ strcpy(string, RomDir);
-+ strcat(string, "PAINTER.ROM");
-+ if(J) LoadCart(string,J-1);
- }
-
- /* We are now back to working directory */
- if(WorkDir) chdir(WorkDir);
-
- /* Try loading font */
-- if(Verbose) printf("Loading %s font...",FontName);
-- FontBuf=LoadROM(FontName,0x800,0);
-+ bzero(string, sizeof(string));
-+ strcpy(string, RomDir);
-+ strcat(string, FontName);
-+ if(Verbose) printf("Loading %s font...",string);
-+ FontBuf=LoadROM(string,0x800,0);
- PRINTRESULT(FontBuf);
-
- /* Open stream for a printer */
-@@ -624,7 +664,7 @@
-
- /* Open casette image */
- if(CasName)
-- if(CasStream=fopen(CasName,"r+b"))
-+ if((CasStream=fopen(CasName,"r+b")))
- if(Verbose) printf("Using %s as a tape\n",CasName);
-
- if(Verbose)
diff --git a/emulators/fmsx/patches/patch-ae b/emulators/fmsx/patches/patch-ae
new file mode 100644
index 00000000000..0ccd98bbc32
--- /dev/null
+++ b/emulators/fmsx/patches/patch-ae
@@ -0,0 +1,13 @@
+$NetBSD: patch-ae,v 1.1 2010/01/07 08:38:44 obache Exp $
+
+--- EMULib/NetUnix.c.orig 2007-12-30 16:01:15.000000000 +0000
++++ EMULib/NetUnix.c
+@@ -17,6 +17,8 @@
+ #include <stdio.h>
+ #include <netdb.h>
+ #include <errno.h>
++#include <netinet/in.h>
++#include <sys/types.h>
+ #include <sys/ioctl.h>
+ #include <sys/socket.h>
+
diff --git a/emulators/fmsx/patches/patch-af b/emulators/fmsx/patches/patch-af
new file mode 100644
index 00000000000..8238970becd
--- /dev/null
+++ b/emulators/fmsx/patches/patch-af
@@ -0,0 +1,12 @@
+$NetBSD: patch-af,v 1.1 2010/01/07 08:38:44 obache Exp $
+
+--- EMULib/Rules.Unix.orig 2008-01-28 19:48:23.000000000 +0000
++++ EMULib/Rules.Unix
+@@ -1,5 +1,5 @@
+ include ../../EMULib/Rules.gcc
+
+-CFLAGS += -I/usr/X11R6/include
++CFLAGS += -I${X11BASE}/include
+ DEFINES+= -DUNIX -DMITSHM
+-LIBS += -lX11 -lXext
++LIBS += ${COMPILER_RPATH_FLAG}${X11BASE}/lib -L${X11BASE}/lib -lX11 -lXext
diff --git a/emulators/fmsx/patches/patch-ag b/emulators/fmsx/patches/patch-ag
new file mode 100644
index 00000000000..e60a986888f
--- /dev/null
+++ b/emulators/fmsx/patches/patch-ag
@@ -0,0 +1,17 @@
+$NetBSD: patch-ag,v 1.1 2010/01/07 08:38:44 obache Exp $
+
+--- EMULib/Rules.gcc.orig 2008-01-28 19:17:27.000000000 +0000
++++ EMULib/Rules.gcc
+@@ -8,9 +8,10 @@ PRIVATE = $(BASEDIR)/Private
+
+ CC = gcc
+ CPP = cpp
+-CFLAGS = -O3 -pthread -I.. -I$(EMULIB)
++CFLAGS = -O3 $(PTHREAD_CFLAGS) -fomit-frame-pointer -I.. -I$(EMULIB)
+ DEFINES = -DZLIB
+-LIBS = -lz -lpthread
++LIBS = -lz $(PTHREAD_LIBS) $(LIBOSSAUDIO)
++LDFLAGS = $(PTHREAD_LDFLAGS)
+
+ # EMULib sound, console, and other utility functions
+ OBJECTS = $(EMULIB)/EMULib.o $(EMULIB)/Console.o $(EMULIB)/Sound.o \
diff --git a/emulators/fmsx/patches/patch-ah b/emulators/fmsx/patches/patch-ah
new file mode 100644
index 00000000000..9d0c5297198
--- /dev/null
+++ b/emulators/fmsx/patches/patch-ah
@@ -0,0 +1,12 @@
+$NetBSD: patch-ah,v 1.1 2010/01/07 08:38:44 obache Exp $
+
+--- fMSX/fMSX.c.orig 2007-12-30 16:03:22.000000000 +0000
++++ fMSX/fMSX.c
+@@ -72,6 +72,7 @@ int main(int argc,char *argv[])
+ ProgDir=GetFilePath(argv[0]);
+ #else
+ Verbose=1;
++ ProgDir=RomDir;
+ #endif
+
+ /* Clear everything */