diff options
-rw-r--r-- | emulators/fmsx/Makefile | 38 | ||||
-rw-r--r-- | emulators/fmsx/distinfo | 12 | ||||
-rw-r--r-- | emulators/fmsx/patches/patch-aa | 26 | ||||
-rw-r--r-- | emulators/fmsx/patches/patch-ab | 15 | ||||
-rw-r--r-- | emulators/fmsx/patches/patch-ad | 159 | ||||
-rw-r--r-- | emulators/fmsx/pkg/PLIST | 8 |
6 files changed, 170 insertions, 88 deletions
diff --git a/emulators/fmsx/Makefile b/emulators/fmsx/Makefile index 9a1c3580280..2fece6f5c46 100644 --- a/emulators/fmsx/Makefile +++ b/emulators/fmsx/Makefile @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.5 2001/02/25 04:17:45 hubertf Exp $ +# $NetBSD: Makefile,v 1.6 2001/06/03 17:34:57 kei Exp $ -DISTNAME= fMSX22.tar -PKGNAME= fmsx-2.2 +DISTNAME= fMSX24.tar +PKGNAME= fmsx-2.4 CATEGORIES= emulators x11 MASTER_SITES= http://www.komkon.org/fms/fMSX/ EXTRACT_SUFX= .Z @@ -20,36 +20,32 @@ USE_X11= yes WRKSRC= ${WRKDIR}/MSX +.include "../../mk/bsd.prefs.mk" +USE_SUN_AUDIO?= YES DEFS= -DFontDir=\"\\\"${PREFIX}/share/fmsx/\"\\\" DEFS+= -DRomDir=\"\\\"${PREFIX}/share/fmsx/\"\\\" -DEFS+= -DMITSHM -D${CUR_DEPTH} -DSOUND -DSUN_AUDIO +DEFS+= -DMITSHM -D${CUR_DEPTH} -DSOUND +.if ${USE_SUN_AUDIO} == "YES" +DEFS+= -DSUN_AUDIO +.endif MAKE_ENV= DEFS="${DEFS}" +post-extract: + @${RM} ${WRKSRC}/CMOS.ROM + @${CHMOD} -R a+r ${WRKSRC} + pre-install: - @${INSTALL_DATA_DIR} ${PREFIX}/share/fmsx \ - && ${CHMOD} a+rx ${PREFIX}/share/fmsx - @${INSTALL_DATA_DIR} ${PREFIX}/share/doc/html/fmsx \ - && ${CHMOD} a+rx ${PREFIX}/share/doc/html/fmsx + @${INSTALL_DATA_DIR} ${PREFIX}/share/fmsx + @${INSTALL_DATA_DIR} ${PREFIX}/share/doc/html # Makefile of fMSX doesn't have install target. do-install: ${INSTALL_PROGRAM} ${WRKSRC}/fmsx ${PREFIX}/bin ${INSTALL_PROGRAM} ${WRKSRC}/rddsk ${PREFIX}/bin ${INSTALL_PROGRAM} ${WRKSRC}/wrdsk ${PREFIX}/bin - ${INSTALL_DATA_DIR} ${PREFIX}/share/fmsx - ${INSTALL_DATA} ${WRKSRC}/CYRILLIC.FNT ${PREFIX}/share/fmsx - ${INSTALL_DATA} ${WRKSRC}/ITALIC.FNT ${PREFIX}/share/fmsx - ${INSTALL_DATA} ${WRKSRC}/DISK.ROM ${PREFIX}/share/fmsx - ${INSTALL_DATA} ${WRKSRC}/KANJI.ROM ${PREFIX}/share/fmsx - ${INSTALL_DATA} ${WRKSRC}/MSX.ROM ${PREFIX}/share/fmsx - ${INSTALL_DATA} ${WRKSRC}/MSX2.ROM ${PREFIX}/share/fmsx - ${INSTALL_DATA} ${WRKSRC}/MSX2EXT.ROM ${PREFIX}/share/fmsx - ${INSTALL_DATA} ${WRKSRC}/MSX2P.ROM ${PREFIX}/share/fmsx - ${INSTALL_DATA} ${WRKSRC}/MSX2PEXT.ROM ${PREFIX}/share/fmsx - ${INSTALL_DATA} ${WRKSRC}/PAINTER.ROM ${PREFIX}/share/fmsx - ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/fmsx - ${INSTALL_DATA} ${WRKSRC}/fMSX.html ${PREFIX}/share/doc/fmsx + ${INSTALL_DATA} ${WRKSRC}/*.ROM ${PREFIX}/share/fmsx + ${INSTALL_DATA} ${WRKSRC}/fMSX.html ${PREFIX}/share/doc/html .include "../../mk/bsd.pkg.mk" diff --git a/emulators/fmsx/distinfo b/emulators/fmsx/distinfo index 1b7514d8828..99cdc6028f3 100644 --- a/emulators/fmsx/distinfo +++ b/emulators/fmsx/distinfo @@ -1,8 +1,8 @@ -$NetBSD: distinfo,v 1.2 2001/04/20 10:49:54 agc Exp $ +$NetBSD: distinfo,v 1.3 2001/06/03 17:34:57 kei Exp $ -SHA1 (fMSX22.tar.Z) = 4233fe2736c2db3315699f7f0b5e5a41e976753c -Size (fMSX22.tar.Z) = 467161 bytes -SHA1 (patch-aa) = 4b029e0cdcdb9ea6ea9d2a57445fd7b65697d23a -SHA1 (patch-ab) = a4d074accf3718f50778bc086b175a86916e627f +SHA1 (fMSX24.tar.Z) = ea44eb273b9532ad0fb388e5ffbebdf348d00467 +Size (fMSX24.tar.Z) = 506755 bytes +SHA1 (patch-aa) = ef2c0ce0039633afa1df7b0118a5159f1bb547f4 +SHA1 (patch-ab) = d59c7bb5d709ae1d125c642990f8f7c7191f0fd5 SHA1 (patch-ac) = 884f137a757be514a87005c82f2f3a0c4031190d -SHA1 (patch-ad) = 2d5d3a1eaae53256210a88b3cabe12608c579e7d +SHA1 (patch-ad) = 8d0db8cc68283e1a98e355672db4cb7ca0de42e9 diff --git a/emulators/fmsx/patches/patch-aa b/emulators/fmsx/patches/patch-aa index 6bd78f7f266..7f4acf63670 100644 --- a/emulators/fmsx/patches/patch-aa +++ b/emulators/fmsx/patches/patch-aa @@ -1,26 +1,30 @@ -$NetBSD: patch-aa,v 1.2 2000/08/06 14:45:05 wiz Exp $ +$NetBSD: patch-aa,v 1.3 2001/06/03 17:34:57 kei Exp $ ---- Makefile.orig Thu Aug 3 19:23:33 2000 -+++ Makefile Sun Aug 6 15:27:17 2000 -@@ -44,10 +44,8 @@ +--- 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 +-CC = gcc -DEFINES = -DFMSX -DUNIX -DLSB_FIRST -DDEBUG -DMITSHM \ - -DDISK -DNARROW -DSOUND -DBPP16 --CFLAGS = -O3 -fomit-frame-pointer \ -- -I/usr/X11/include -L/usr/X11/lib ${DEFINES} +-CFLAGS = -O3 -I/usr/X11R6/include -L/usr/X11R6/lib ${DEFINES} +DEFINES = -DFMSX -DUNIX -DDISK -DNARROW ${DEFS} -+CFLAGS = -O3 -fomit-frame-pointer -I${X11BASE}/include ${DEFINES} - OBJECTS = fMSX.o MSX.o Z80.o AY8910.o SCC.o V9938.o Patch.o Debug.o \ - Disk.o Unix.o LibUnix.o SndUnix.o MIDI.o ++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 -@@ -63,7 +61,7 @@ +@@ -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 -lossaudio -lXext -lX11 ++.endif # Clean up. clean: diff --git a/emulators/fmsx/patches/patch-ab b/emulators/fmsx/patches/patch-ab index acb18eeaed2..c030c4e6c35 100644 --- a/emulators/fmsx/patches/patch-ab +++ b/emulators/fmsx/patches/patch-ab @@ -1,7 +1,7 @@ -$NetBSD: patch-ab,v 1.2 2000/08/06 14:45:05 wiz Exp $ +$NetBSD: patch-ab,v 1.3 2001/06/03 17:34:58 kei Exp $ ---- SndUnix.c.orig Thu Aug 3 19:17:23 2000 -+++ SndUnix.c Sun Aug 6 16:39:57 2000 +--- SndUnix.c.orig Thu Mar 8 04:15:16 2001 ++++ SndUnix.c Sun Jun 3 10:10:59 2001 @@ -31,7 +31,9 @@ #include <sys/audioio.h> @@ -12,3 +12,12 @@ $NetBSD: patch-ab,v 1.2 2000/08/06 14:45:05 wiz Exp $ #define AUDIO_CONV(A) (ULAW[0xFF&(128+(A))]) +@@ -236,7 +238,7 @@ + case SIGUSR1: + /* Suspend execution, until SIGUSR2 catched */ + #ifndef SUN_AUDIO +- ioctl(SoundFD,SNDCTL_DSP_RESET); ++ ioctl(SoundFD,SNDCTL_DSP_RESET,1); + #endif + close(SoundFD); + for(Suspended=1;Suspended;pause()); diff --git a/emulators/fmsx/patches/patch-ad b/emulators/fmsx/patches/patch-ad index 140d911fa1b..5d79e2a000e 100644 --- a/emulators/fmsx/patches/patch-ad +++ b/emulators/fmsx/patches/patch-ad @@ -1,105 +1,180 @@ -$NetBSD: patch-ad,v 1.2 2000/08/06 14:45:05 wiz Exp $ +$NetBSD: patch-ad,v 1.3 2001/06/03 17:34:58 kei Exp $ ---- MSX.c.orig Thu Aug 3 19:07:13 2000 -+++ MSX.c Sun Aug 6 15:25:56 2000 -@@ -106,7 +106,7 @@ - char *DiskB = "DRIVEB.DSK"; /* Drive B disk image */ - - /** Fixed font used by fMSX **********************************/ --char *FontName = "DEFAULT.FNT"; /* Font file for text */ -+char *FontName = FontDir "DEFAULT.FNT"; /* Font file for text */ - byte *FontBuf; /* Font for text modes */ - byte UseFont = 0; /* Use ext. font when 1 */ - -@@ -374,7 +374,7 @@ +--- 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); -+ P=LoadROM(RomDir "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; -@@ -385,7 +385,7 @@ +@@ -402,7 +406,10 @@ case 1: if(Verbose) printf(" Opening MSX2.ROM..."); - P=LoadROM("MSX2.ROM",0x8000,0); -+ P=LoadROM(RomDir "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; -@@ -393,7 +393,7 @@ +@@ -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); -+ P=LoadROM(RomDir "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; -@@ -402,7 +402,7 @@ +@@ -419,7 +429,10 @@ case 2: if(Verbose) printf(" Opening MSX2P.ROM..."); - P=LoadROM("MSX2P.ROM",0x8000,0); -+ P=LoadROM(RomDir "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; -@@ -410,7 +410,7 @@ +@@ -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); -+ P=LoadROM(RomDir "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; -@@ -419,7 +419,7 @@ +@@ -436,7 +452,10 @@ } /* Try loading DiskROM */ - if(P=LoadROM("DISK.ROM",0x4000,0)) -+ if(P=LoadROM(RomDir "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; -@@ -474,16 +474,16 @@ - if(Verbose) printf("Loading other ROMs:\n "); +@@ -469,16 +488,25 @@ + if(Verbose) printf("Loading other ROMs: "); /* Try loading CMOS memory contents */ - if(LoadROM("CMOS.ROM",sizeof(RTC),(byte *)RTC)) -+ if(LoadROM(RomDir "CMOS.ROM",sizeof(RTC),(byte *)RTC)) - { if(Verbose) printf(" CMOS.ROM"); } ++ 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)) -+ if(Kanji=LoadROM(RomDir "KANJI.ROM",0x20000,0)) - { if(Verbose) printf(" KANJI.ROM"); } ++ 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)) -+ if(P=LoadROM(RomDir "RS232.ROM",0x4000,0)) +- 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"); + if(Verbose) printf("RS232.ROM.."); MemMap[3][0][2]=P; -@@ -491,7 +491,7 @@ +@@ -486,7 +514,10 @@ } /* Try loading FM-PAC support ROM */ - if(P=LoadROM("FMPAC.ROM",0x4000,0)) -+ if(P=LoadROM(RomDir "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"); + if(Verbose) printf("FMPAC.ROM.."); MemMap[3][3][2]=P; -@@ -520,7 +520,7 @@ +@@ -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&&(P=LoadROM("PAINTER.ROM",0x10000,0))) -+ if(J&&(P=LoadROM(RomDir "PAINTER.ROM",0x10000,0))) - { - if(Verbose) printf(" PAINTER.ROM"); - for(I=0;I<8;I++) MemMap[J][0][I]=P+I*0x2000; +- 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/pkg/PLIST b/emulators/fmsx/pkg/PLIST index ee107826b70..936a4d0718f 100644 --- a/emulators/fmsx/pkg/PLIST +++ b/emulators/fmsx/pkg/PLIST @@ -1,10 +1,9 @@ -@comment $NetBSD: PLIST,v 1.1.1.1 2000/07/28 15:54:27 martin Exp $ +@comment $NetBSD: PLIST,v 1.2 2001/06/03 17:34:58 kei Exp $ bin/fmsx bin/rddsk bin/wrdsk -share/fmsx/CYRILLIC.FNT -share/fmsx/ITALIC.FNT share/fmsx/DISK.ROM +share/fmsx/FMPAC.ROM share/fmsx/KANJI.ROM share/fmsx/MSX.ROM share/fmsx/MSX2.ROM @@ -12,6 +11,5 @@ share/fmsx/MSX2EXT.ROM share/fmsx/MSX2P.ROM share/fmsx/MSX2PEXT.ROM share/fmsx/PAINTER.ROM -share/doc/fmsx/fMSX.html +share/doc/html/fMSX.html @dirrm share/fmsx -@dirrm share/doc/fmsx |