[packages/arnold/DEVEL] - up to 20040104 - updated build patch - removed obsolete romsdir patch (ROMs are linked into binary

qboosh qboosh at pld-linux.org
Tue Mar 7 21:14:01 CET 2017


commit c6ebd90bd240199ada3594f49aeaa9522b733beb
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Tue Mar 7 21:15:59 2017 +0100

    - up to 20040104
    - updated build patch
    - removed obsolete romsdir patch (ROMs are linked into binary in this version)
    - release 0.1 (unix port is heavily broken in this version)

 arnold-build.patch   | 276 ++++++++++++++++++++++++++++++++++++++++++++-------
 arnold-romsdir.patch |  30 ------
 arnold.spec          |  24 ++---
 3 files changed, 253 insertions(+), 77 deletions(-)
---
diff --git a/arnold.spec b/arnold.spec
index a800030..fb1c6e2 100644
--- a/arnold.spec
+++ b/arnold.spec
@@ -1,15 +1,14 @@
-# note: 20040104 release is on DEVEL branch, but its unix port is heavily broken; stick to 20020127
+# note: 20040104 release has heavily broken unix port
 Summary:	Amstrad CPC Emulator
 Summary(pl.UTF-8):	Emulator Amstrada CPC
 Name:		arnold
-Version:	0.20020127
-Release:	2
+Version:	0.20040104
+Release:	0.1
 License:	GPL v2+ (except ROMs)
 Group:		Applications/Emulators
-Source0:	http://arnold.emuunlim.com/download/arnsrc27012002.zip
-# Source0-md5:	a8ae9ce1aeeae6ba9a19083731811150
-Patch0:		%{name}-romsdir.patch
-Patch1:		%{name}-build.patch
+Source0:	http://arnold.emuunlim.com/download/arnsrc04012004.zip
+# Source0-md5:	bf612e1bd535930f1c32c00811bc24dd
+Patch0:		%{name}-build.patch
 URL:		http://arnold.emuunlim.com/
 BuildRequires:	SDL-devel >= 1.2.0
 BuildRequires:	autoconf
@@ -36,12 +35,14 @@ Amstrad plc.
 %prep
 %setup -q -n %{name}
 %patch0 -p1
-%patch1 -p1
 
 %{__rm} src/configure
 
 %build
 cd src
+%ifarch %{ix86} %{x8664} x32 alpha mipsel
+CPPFLAGS="%{rpmcppflags} -DCPC_LSB_FIRST"
+%endif
 %{__aclocal}
 %{__autoconf}
 %configure
@@ -50,9 +51,8 @@ cd src
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_datadir}/arnold,%{_bindir}}
+install -d $RPM_BUILD_ROOT%{_bindir}
 
-cp -Rf roms $RPM_BUILD_ROOT%{_datadir}/arnold
 install arnold $RPM_BUILD_ROOT%{_bindir}
 
 %clean
@@ -60,6 +60,6 @@ rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-%doc bugsetc.txt file_id.diz readme.* whatsnew.*
+%doc arnold_readme.txt file_id.diz readme.* whatsnew.*
+%lang(es) %doc leeme.* novedades.linux
 %attr(755,root,root) %{_bindir}/arnold
-%{_datadir}/arnold
diff --git a/arnold-build.patch b/arnold-build.patch
index f65a25c..1f4288c 100644
--- a/arnold-build.patch
+++ b/arnold-build.patch
@@ -1,39 +1,45 @@
---- arnold/src/cpc/debugger/debug.c.orig	2001-10-14 10:50:08.000000000 +0200
-+++ arnold/src/cpc/debugger/debug.c	2017-03-07 19:46:32.700601403 +0100
-@@ -80,7 +80,7 @@ void	Debug_WriteString(DEBUG_HANDLE Debu
- 		return;
- 
- 	if (pDebugStruct->fh!=NULL)
--		fprintf(pDebugStruct->fh,Message);
-+		fprintf(pDebugStruct->fh, "%s", Message);
- }
- 
- void	Debug_End(DEBUG_HANDLE	DebugHandle)
---- arnold/src/cpc/debugger/gdebug.c.orig	2001-10-14 10:50:10.000000000 +0200
-+++ arnold/src/cpc/debugger/gdebug.c	2017-03-07 19:46:58.717267772 +0100
+--- arnold/src/cpc/amsdos.c.orig	2004-01-04 08:22:58.000000000 +0100
++++ arnold/src/cpc/amsdos.c	2017-03-07 19:00:56.493965986 +0100
+@@ -559,11 +559,11 @@ int AMSDOS_GetPrefixPriority(const char
+ 
+ 		/* default prefixes in order searched for by AMSDOS */
+ 		/* assign higher priority to order prefixes are used */
+-		if (stricmp(pExtension,"   ")==0)
++		if (strcasecmp(pExtension,"   ")==0)
+ 			return 3;
+-		if (stricmp(pExtension,"BAS")==0)
++		if (strcasecmp(pExtension,"BAS")==0)
+ 			return 2;
+-		if (stricmp(pExtension,"BIN")==0)
++		if (strcasecmp(pExtension,"BIN")==0)
+ 			return 1;
+ 	}
+ 
+--- arnold/src/cpc/debugger/gdebug.c.orig	2004-01-03 10:02:20.000000000 +0100
++++ arnold/src/cpc/debugger/gdebug.c	2017-03-06 21:57:38.338164794 +0100
 @@ -1656,7 +1656,7 @@ void	Debug_DissassembleInstruction(int A
- 								/* 11101001 - JP (HL) */
- 								/* 11111001 - LD SP,HL */
- 
--								sprintf(OutputString,
-+								sprintf(OutputString, "%s",
- 									MiscMneumonics3[((Opcode>>4) & 0x03)]);
- 							}
- 						}
---- arnold/src/cpc/tzx.c.orig	2001-10-21 09:43:06.000000000 +0200
-+++ arnold/src/cpc/tzx.c	2017-03-07 19:45:56.430601816 +0100
-@@ -57,7 +57,7 @@ static unsigned long TapeImage_Flags;
- static unsigned char *pTapeBlockPtr = NULL;
- 
- static void	TapeImage_GetNextDataBlock(void);
--int		TapeImage_GetBlockLength(unsigned char *pBlock);
-+static int	TapeImage_GetBlockLength(unsigned char *pBlock);
- static void	TapeImage_HandleBlock(unsigned char *);
- 
- 
---- arnold/src/Makefile.in.orig	2002-01-19 15:49:14.000000000 +0100
-+++ arnold/src/Makefile.in	2017-03-07 19:47:31.387267400 +0100
-@@ -27,9 +27,9 @@ SDLLIB = @SDL_LIBS@
+ 								/* 11101001 - JP (HL) */
+ 								/* 11111001 - LD SP,HL */
+ 
+-								sprintf(OutputString,
++								sprintf(OutputString, "%s",
+ 									MiscMneumonics3[((Opcode>>4) & 0x03)]);
+ 							}
+ 						}
+--- arnold/src/cpc/riff.c.orig	2004-01-02 14:58:26.000000000 +0100
++++ arnold/src/cpc/riff.c	2017-03-06 22:02:38.208161368 +0100
+@@ -37,7 +37,7 @@ void	Riff_SetChunkLength(RIFF_CHUNK *pCh
+ #ifdef CPC_LSB_FIRST
+ 	pChunk->ChunkLength = Length;
+ #else
+-	pChunk->Chunklength = SwapEndianLong(Length);
++	pChunk->ChunkLength = SwapEndianLong(Length);
+ #endif
+ }
+ 
+--- arnold/src/Makefile.in.orig	2004-01-04 14:18:40.000000000 +0100
++++ arnold/src/Makefile.in	2017-03-06 22:03:42.444827342 +0100
+@@ -27,9 +27,9 @@
  #-Wall for max warnings!
  CFLAGS = @CPPFLAGS@ @CFLAGS@ $(GTKINC) $(SDLINC) @DEFS@ $(X11INC) -I. -DUNIX -Wall -Wno-unused
  #-g3 -pg -dm -dp -a
@@ -45,3 +51,203 @@
  #LFLAGS2= -g3 -pg -dm -dp -a
  #normal
  #LFLAGS2 = -s
+@@ -39,17 +39,17 @@ TARGET_CPU = @target_cpu@
+ CPC_O=	cpc/arnold.o cpc/asic.o cpc/audioevent.o cpc/bmp.o cpc/cpc.o \
+ 	cpc/crtc.o cpc/dumpym.o cpc/fdc.o cpc/fdd.o cpc/fdi.o \
+ 	cpc/garray.o cpc/multface.o cpc/printer.o cpc/psgplay.o \
+-	cpc/psg.o cpc/render.o cpc/render5.o cpc/scrsnap.o \
++	cpc/psg.o cpc/render.o cpc/render5.o \
+ 	cpc/snapshot.o cpc/sampload.o cpc/spo256.o cpc/pal.o \
+ 	cpc/voc.o cpc/tzxold.o cpc/wav.o cpc/westpha.o cpc/yiq.o \
+ 	cpc/z8536.o cpc/csw.o cpc/cassette.o cpc/amsdos.o \
+ 	cpc/debugger/gdebug.o cpc/debugger/breakpt.o \
+ 	cpc/diskimage/diskimg.o cpc/ramrom.o \
+ 	cpc/diskimage/dsk.o cpc/diskimage/extdsk.o \
+-	cpc/diskimage/iextdsk.o cpc/diskimage/maketrk.o \
++	cpc/diskimage/iextdsk.o \
+ 	cpc/z80/z80.o cpc/debugger/memdump.o \
+ 	cpc/riff.o cpc/snapv3.o \
+-	cpc/cheatsys.o cpc/cpcdbg.o cpc/messages.o
++	cpc/messages.o
+ 
+ UNIX_O= unix/main.o unix/host.o unix/global.o \
+ 	unix/display.o unix/display_sdl.o unix/gtkui.o unix/sdlsound.o \
+--- arnold/src/unix/display_sdl.c.orig	2003-12-20 18:47:50.000000000 +0100
++++ arnold/src/unix/display_sdl.c	2017-03-06 22:07:44.534824536 +0100
+@@ -34,7 +34,7 @@ static INLINE void debug(char *s) {
+ 	fprintf(stderr,"%s\n",s);
+ }
+ 
+-void sdl_InitialiseKeyboardMapping(void);
++void sdl_InitialiseKeyboardMapping(int layout);
+ void sdl_InitialiseJoysticks(void);
+ 
+ void sdl_SetDisplay(int Width, int Height, int Depth, BOOL fullscreen) {
+--- arnold/src/unix/gtkui.c.orig	2004-01-04 14:09:30.000000000 +0100
++++ arnold/src/unix/gtkui.c	2017-03-07 18:57:19.557301789 +0100
+@@ -97,7 +97,7 @@ void save_disk_and_insert( GtkWidget *w,
+ 	char *filename){
+ 	gtk_widget_destroy(GTK_WIDGET(dialog));
+ 
+-	DiskImage_WriteImage(drive);
++	// DiskImage_WriteImage(drive); // TODO: saving in unix version
+ 	DiskImage_RemoveDisk(drive);
+ 	
+ 	if (!GenericInterface_InsertDiskImage( drive, filename )) {
+@@ -135,7 +135,7 @@ void dont_save_diskB_and_insert( GtkWidg
+ void save_disk_and_quit( GtkWidget *w, GtkWindow *dialog, int drive) {
+ 	gtk_widget_destroy(GTK_WIDGET(dialog));
+ 
+-	DiskImage_WriteImage(drive);
++	// DiskImage_WriteImage(drive); // TODO: saving in unix version
+ 	DiskImage_RemoveDisk(drive);
+ 
+ 	if (!FDD_IsDiskPresent(0) && !FDD_IsDiskPresent(1)) {
+@@ -237,7 +237,7 @@ void choosen_tape( GtkWidget *w, GtkFile
+ 	char filename[ PATH_MAX ];
+ 	get_filename_and_destroy( filename, fs );
+ 
+-	if (!GenericInterface_InsertTapeImage( filename )) {
++	if (!GenericInterface_InsertTape( filename )) {
+ 		printf(Messages[73], filename);
+ 	} 
+ 
+@@ -259,14 +259,15 @@ void choosen_savesnap( GtkWidget *w, Gtk
+ 	char filename[ PATH_MAX ];
+ 	int cpcType;
+ 	get_filename_and_destroy( filename, fs );
++	int sSize;
+ 
+-	cpcType = CPC_GetCPCType();
++	cpcType = CPC_TYPE_CPC6128; // CPC_GetCPCType();
+ 	if (cpcType == CPC_TYPE_CPC6128 || cpcType == CPC_TYPE_6128PLUS) {
+-		GenericInterface_SetSnapshotSize(128);
++		sSize = 128;
+ 	} else {
+-		GenericInterface_SetSnapshotSize(64);
++		sSize = 64;
+ 	}
+-	if (!GenericInterface_SnapshotSave( filename )) {
++	if (!GenericInterface_SnapshotSave( filename, 3, sSize )) {
+ 		printf(Messages[90], filename);
+ 	} 
+ 	cpcPaused = FALSE;
+@@ -299,7 +300,7 @@ void choose_media( GtkWidget *widget, gp
+ 			title = Messages[94];
+ 			function = (GtkSignalFunc) choosen_savesnap;
+ 	} else {
+-		fprintf( stderr, Messages[95]);
++		fprintf( stderr, "%s", Messages[95]);
+ 		exit( -1 );
+ 	}
+ 
+@@ -318,7 +319,7 @@ void choose_media( GtkWidget *widget, gp
+ }
+ 
+ void reset( GtkWidget *widget, gpointer data ) {
+-	GenericInterface_DoReset();
++	CPC_Reset(); // GenericInterface_DoReset(); TODO: ask
+ }
+ 
+ static void quit( GtkWidget *widget, gpointer data ) {
+@@ -393,7 +394,7 @@ int indexInArray( char *s, char **p ) {
+ void choose_cpctype( GtkWidget *widget, gpointer data ) {
+ 	fprintf(stderr, Messages[96], (char *) data,
+ 		indexInArray((char *) data, CPCTYPESTRINGS));
+-	CPC_SetCPCType( indexInArray((char *) data, CPCTYPESTRINGS ));
++	//CPC_SetCPCType( indexInArray((char *) data, CPCTYPESTRINGS ));
+ }
+ 
+ void choose_crtctype( GtkWidget *widget, gpointer data ) {
+@@ -696,7 +697,7 @@ void gtkui_run( void ) {
+ 		gtk_idle_add( idlerun, NULL );
+ 		//gtk_timeout_add( 100, idlerun, NULL );
+ 		gtk_main();			/* GTK+ main loop */
+-		printf(Messages[103]);
++		printf("%s", Messages[103]);
+ }
+ 
+ #endif	/* HAVE_GTK */
+--- arnold/src/unix/host.c.orig	2003-12-21 09:29:54.000000000 +0100
++++ arnold/src/unix/host.c	2017-03-06 22:06:18.541492187 +0100
+@@ -212,7 +212,7 @@ void	Host_InitDriveLEDIndicator()
+ 		if(fd_console < 0) {
+ 			fprintf(stderr, Messages[84], fn_console);
+ 			perror(NULL);
+-			fprintf(stderr, Messages[85]);
++			fprintf(stderr, "%s", Messages[85]);
+ 		}
+ 		ioctl(fd_console,KDGETLED,&led_save);
+ }
+--- arnold/src/unix/main.c.orig	2004-01-04 14:10:54.000000000 +0100
++++ arnold/src/unix/main.c	2017-03-07 18:54:17.723970532 +0100
+@@ -125,7 +125,7 @@ int main(int argc, char *argv[])
+ 
+ 	if (!CPCEmulation_CheckEndianness())
+ 	{
+-		printf(Messages[72]);
++		printf("%s", Messages[72]);
+ 		exit(1);
+ 	}
+ 	
+@@ -145,7 +145,7 @@ int main(int argc, char *argv[])
+ 
+ 	init_main(argc, argv);
+ 	
+-	GenericInterface_Finish();
++	//GenericInterface_Finish(); // not for unix
+ 
+ //	DirStuff_Finish();
+ 
+@@ -281,7 +281,7 @@ void init_main(int argc, char *argv[]) {
+ 	/* fprintf(stderr,"%s\n",LocalDirectory); */
+ 
+ 
+-	GenericInterface_Initialise();
++	//GenericInterface_Initialise(); // not for unix
+ 
+   /* initialise cpc hardware */
+ 	CPC_Initialise();
+@@ -297,7 +297,7 @@ void init_main(int argc, char *argv[]) {
+ 		ConfigCPC6128();
+ 
+ 		if (tape) {
+-			if (!TapeImage_InsertFromFile(tape)) {
++			if (!GenericInterface_InsertTape(tape)) {
+ 				printf(Messages[73], tape);
+ 			}
+ 		}
+@@ -381,7 +381,7 @@ void init_main(int argc, char *argv[]) {
+ 		}
+ 
+ 		if (snapshot) {
+-			if (!Snapshot_Load(snapshot)) {
++			if (!GenericInterface_LoadSnapshot(snapshot)) {
+ 				printf(Messages[78],
+ 					snapshot);
+ 			}
+@@ -416,11 +416,11 @@ void init_main(int argc, char *argv[]) {
+ #ifdef HAVE_SDL
+ 		if (kbd != -1) sdl_InitialiseKeyboardMapping(kbd);
+ #endif
+-		printf(Messages[76]);
++		printf("%s", Messages[76]);
+ 
+ 		CPC_SetAudioActive(TRUE);
+ 
+-		printf(Messages[77]);
++		printf("%s", Messages[77]);
+ 
+ 		/* Enter GTK+ event loop when GTK+ is compiled in. Use own main loop
+ 		 * otherwise. */
+--- arnold/src/cpc/render.h.orig	2004-01-03 09:59:50.000000000 +0100
++++ arnold/src/cpc/render.h	2017-03-07 19:36:11.790608492 +0100
+@@ -133,7 +133,7 @@
+ 
+ void	Render_DumpLine(int LineNum);
+ 
+-void	Render_SetColour(const RGBCOLOUR *pColour,/*int,int,int,*/ int Index);
++void	Render_SetColour(RGBCOLOUR *pColour,/*int,int,int,*/ int Index);
+ 
+ void	Render_DumpDisplay(void);
+ 
diff --git a/arnold-romsdir.patch b/arnold-romsdir.patch
deleted file mode 100644
index 0b9a818..0000000
--- a/arnold-romsdir.patch
+++ /dev/null
@@ -1,30 +0,0 @@
---- arnold/src/unix/main.c.orig	Sun Jun 15 20:11:53 2003
-+++ arnold/src/unix/main.c	Sun Jun 15 20:12:24 2003
-@@ -27,7 +27,7 @@
- #ifdef HAVE_SDL
- #include <SDL.h>
- #endif
--
-+#define DATADIR "/usr/share/arnold"
- #include "display.h"
- #include <string.h>
- #include <unistd.h>
-@@ -61,9 +61,8 @@
- 
- 	{
- 		char LocalDirectory[1024];
--		char ProgramDirectory[1024]="";
-+		char ProgramDirectory[1024]=DATADIR;
- 		
--		getcwd(ProgramDirectory, 1024);
- 
- sprintf(LocalDirectory,"%s/roms/amsdose/",ProgramDirectory);
- 	
-@@ -89,6 +88,7 @@
- 	SetDirectoryForLocation(EMULATOR_ROM_KCCOMPACT_DIR,
- LocalDirectory);	
- 
-+	getcwd(ProgramDirectory,1024);
- 
- 	GenericInterface_Initialise();
- 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/arnold.git/commitdiff/c6ebd90bd240199ada3594f49aeaa9522b733beb



More information about the pld-cvs-commit mailing list