1 --- arnold/src/cpc/amsdos.c.orig 2004-01-04 08:22:58.000000000 +0100
2 +++ arnold/src/cpc/amsdos.c 2017-03-07 19:00:56.493965986 +0100
3 @@ -559,11 +559,11 @@ int AMSDOS_GetPrefixPriority(const char
5 /* default prefixes in order searched for by AMSDOS */
\r
6 /* assign higher priority to order prefixes are used */
\r
7 - if (stricmp(pExtension," ")==0)
\r
8 + if (strcasecmp(pExtension," ")==0)
\r
10 - if (stricmp(pExtension,"BAS")==0)
\r
11 + if (strcasecmp(pExtension,"BAS")==0)
\r
13 - if (stricmp(pExtension,"BIN")==0)
\r
14 + if (strcasecmp(pExtension,"BIN")==0)
\r
18 --- arnold/src/cpc/debugger/gdebug.c.orig 2004-01-03 10:02:20.000000000 +0100
19 +++ arnold/src/cpc/debugger/gdebug.c 2017-03-06 21:57:38.338164794 +0100
20 @@ -1656,7 +1656,7 @@ void Debug_DissassembleInstruction(int A
21 /* 11101001 - JP (HL) */
\r
22 /* 11111001 - LD SP,HL */
\r
24 - sprintf(OutputString,
\r
25 + sprintf(OutputString, "%s",
\r
26 MiscMneumonics3[((Opcode>>4) & 0x03)]);
\r
29 --- arnold/src/cpc/riff.c.orig 2004-01-02 14:58:26.000000000 +0100
30 +++ arnold/src/cpc/riff.c 2017-03-06 22:02:38.208161368 +0100
31 @@ -37,7 +37,7 @@ void Riff_SetChunkLength(RIFF_CHUNK *pCh
32 #ifdef CPC_LSB_FIRST
\r
33 pChunk->ChunkLength = Length;
\r
35 - pChunk->Chunklength = SwapEndianLong(Length);
\r
36 + pChunk->ChunkLength = SwapEndianLong(Length);
\r
40 --- arnold/src/Makefile.in.orig 2004-01-04 14:18:40.000000000 +0100
41 +++ arnold/src/Makefile.in 2017-03-06 22:03:42.444827342 +0100
43 #-Wall for max warnings!
44 CFLAGS = @CPPFLAGS@ @CFLAGS@ $(GTKINC) $(SDLINC) @DEFS@ $(X11INC) -I. -DUNIX -Wall -Wno-unused
46 -LFLAGS1 = @LDFLAGS@ @LIBS@ $(GTKLIB) $(SDLLIB) $(X11LIBS)
47 +LFLAGS1 = @LDFLAGS@ @LIBS@
50 +LFLAGS2 = $(GTKLIB) $(SDLLIB) $(X11LIBS)
51 #LFLAGS2= -g3 -pg -dm -dp -a
54 @@ -39,17 +39,17 @@ TARGET_CPU = @target_cpu@
55 CPC_O= cpc/arnold.o cpc/asic.o cpc/audioevent.o cpc/bmp.o cpc/cpc.o \
56 cpc/crtc.o cpc/dumpym.o cpc/fdc.o cpc/fdd.o cpc/fdi.o \
57 cpc/garray.o cpc/multface.o cpc/printer.o cpc/psgplay.o \
58 - cpc/psg.o cpc/render.o cpc/render5.o cpc/scrsnap.o \
59 + cpc/psg.o cpc/render.o cpc/render5.o \
60 cpc/snapshot.o cpc/sampload.o cpc/spo256.o cpc/pal.o \
61 cpc/voc.o cpc/tzxold.o cpc/wav.o cpc/westpha.o cpc/yiq.o \
62 cpc/z8536.o cpc/csw.o cpc/cassette.o cpc/amsdos.o \
63 cpc/debugger/gdebug.o cpc/debugger/breakpt.o \
64 cpc/diskimage/diskimg.o cpc/ramrom.o \
65 cpc/diskimage/dsk.o cpc/diskimage/extdsk.o \
66 - cpc/diskimage/iextdsk.o cpc/diskimage/maketrk.o \
67 + cpc/diskimage/iextdsk.o \
68 cpc/z80/z80.o cpc/debugger/memdump.o \
69 cpc/riff.o cpc/snapv3.o \
70 - cpc/cheatsys.o cpc/cpcdbg.o cpc/messages.o
73 UNIX_O= unix/main.o unix/host.o unix/global.o \
74 unix/display.o unix/display_sdl.o unix/gtkui.o unix/sdlsound.o \
75 --- arnold/src/unix/display_sdl.c.orig 2003-12-20 18:47:50.000000000 +0100
76 +++ arnold/src/unix/display_sdl.c 2017-03-06 22:07:44.534824536 +0100
77 @@ -34,7 +34,7 @@ static INLINE void debug(char *s) {
78 fprintf(stderr,"%s\n",s);
\r
81 -void sdl_InitialiseKeyboardMapping(void);
\r
82 +void sdl_InitialiseKeyboardMapping(int layout);
\r
83 void sdl_InitialiseJoysticks(void);
\r
85 void sdl_SetDisplay(int Width, int Height, int Depth, BOOL fullscreen) {
\r
86 --- arnold/src/unix/gtkui.c.orig 2004-01-04 14:09:30.000000000 +0100
87 +++ arnold/src/unix/gtkui.c 2017-03-07 18:57:19.557301789 +0100
88 @@ -97,7 +97,7 @@ void save_disk_and_insert( GtkWidget *w,
90 gtk_widget_destroy(GTK_WIDGET(dialog));
\r
92 - DiskImage_WriteImage(drive);
\r
93 + // DiskImage_WriteImage(drive); // TODO: saving in unix version
\r
94 DiskImage_RemoveDisk(drive);
\r
96 if (!GenericInterface_InsertDiskImage( drive, filename )) {
\r
97 @@ -135,7 +135,7 @@ void dont_save_diskB_and_insert( GtkWidg
98 void save_disk_and_quit( GtkWidget *w, GtkWindow *dialog, int drive) {
\r
99 gtk_widget_destroy(GTK_WIDGET(dialog));
\r
101 - DiskImage_WriteImage(drive);
\r
102 + // DiskImage_WriteImage(drive); // TODO: saving in unix version
\r
103 DiskImage_RemoveDisk(drive);
\r
105 if (!FDD_IsDiskPresent(0) && !FDD_IsDiskPresent(1)) {
\r
106 @@ -237,7 +237,7 @@ void choosen_tape( GtkWidget *w, GtkFile
107 char filename[ PATH_MAX ];
\r
108 get_filename_and_destroy( filename, fs );
\r
110 - if (!GenericInterface_InsertTapeImage( filename )) {
\r
111 + if (!GenericInterface_InsertTape( filename )) {
\r
112 printf(Messages[73], filename);
\r
115 @@ -259,14 +259,15 @@ void choosen_savesnap( GtkWidget *w, Gtk
116 char filename[ PATH_MAX ];
\r
118 get_filename_and_destroy( filename, fs );
\r
121 - cpcType = CPC_GetCPCType();
\r
122 + cpcType = CPC_TYPE_CPC6128; // CPC_GetCPCType();
\r
123 if (cpcType == CPC_TYPE_CPC6128 || cpcType == CPC_TYPE_6128PLUS) {
\r
124 - GenericInterface_SetSnapshotSize(128);
\r
127 - GenericInterface_SetSnapshotSize(64);
\r
130 - if (!GenericInterface_SnapshotSave( filename )) {
\r
131 + if (!GenericInterface_SnapshotSave( filename, 3, sSize )) {
\r
132 printf(Messages[90], filename);
\r
135 @@ -299,7 +300,7 @@ void choose_media( GtkWidget *widget, gp
136 title = Messages[94];
\r
137 function = (GtkSignalFunc) choosen_savesnap;
\r
139 - fprintf( stderr, Messages[95]);
\r
140 + fprintf( stderr, "%s", Messages[95]);
\r
144 @@ -318,7 +319,7 @@ void choose_media( GtkWidget *widget, gp
147 void reset( GtkWidget *widget, gpointer data ) {
\r
148 - GenericInterface_DoReset();
\r
149 + CPC_Reset(); // GenericInterface_DoReset(); TODO: ask
\r
152 static void quit( GtkWidget *widget, gpointer data ) {
\r
153 @@ -393,7 +394,7 @@ int indexInArray( char *s, char **p ) {
154 void choose_cpctype( GtkWidget *widget, gpointer data ) {
\r
155 fprintf(stderr, Messages[96], (char *) data,
\r
156 indexInArray((char *) data, CPCTYPESTRINGS));
\r
157 - CPC_SetCPCType( indexInArray((char *) data, CPCTYPESTRINGS ));
\r
158 + //CPC_SetCPCType( indexInArray((char *) data, CPCTYPESTRINGS ));
\r
161 void choose_crtctype( GtkWidget *widget, gpointer data ) {
\r
162 @@ -696,7 +697,7 @@ void gtkui_run( void ) {
163 gtk_idle_add( idlerun, NULL );
\r
164 //gtk_timeout_add( 100, idlerun, NULL );
\r
165 gtk_main(); /* GTK+ main loop */
\r
166 - printf(Messages[103]);
\r
167 + printf("%s", Messages[103]);
\r
170 #endif /* HAVE_GTK */
\r
171 --- arnold/src/unix/host.c.orig 2003-12-21 09:29:54.000000000 +0100
172 +++ arnold/src/unix/host.c 2017-03-06 22:06:18.541492187 +0100
173 @@ -212,7 +212,7 @@ void Host_InitDriveLEDIndicator()
174 if(fd_console < 0) {
\r
175 fprintf(stderr, Messages[84], fn_console);
\r
177 - fprintf(stderr, Messages[85]);
\r
178 + fprintf(stderr, "%s", Messages[85]);
\r
180 ioctl(fd_console,KDGETLED,&led_save);
\r
182 --- arnold/src/unix/main.c.orig 2004-01-04 14:10:54.000000000 +0100
183 +++ arnold/src/unix/main.c 2017-03-07 18:54:17.723970532 +0100
184 @@ -125,7 +125,7 @@ int main(int argc, char *argv[])
186 if (!CPCEmulation_CheckEndianness())
188 - printf(Messages[72]);
189 + printf("%s", Messages[72]);
193 @@ -145,7 +145,7 @@ int main(int argc, char *argv[])
195 init_main(argc, argv);
197 - GenericInterface_Finish();
198 + //GenericInterface_Finish(); // not for unix
200 // DirStuff_Finish();
202 @@ -281,7 +281,7 @@ void init_main(int argc, char *argv[]) {
203 /* fprintf(stderr,"%s\n",LocalDirectory); */
206 - GenericInterface_Initialise();
207 + //GenericInterface_Initialise(); // not for unix
209 /* initialise cpc hardware */
211 @@ -297,7 +297,7 @@ void init_main(int argc, char *argv[]) {
215 - if (!TapeImage_InsertFromFile(tape)) {
216 + if (!GenericInterface_InsertTape(tape)) {
217 printf(Messages[73], tape);
220 @@ -381,7 +381,7 @@ void init_main(int argc, char *argv[]) {
224 - if (!Snapshot_Load(snapshot)) {
225 + if (!GenericInterface_LoadSnapshot(snapshot)) {
229 @@ -416,11 +416,11 @@ void init_main(int argc, char *argv[]) {
231 if (kbd != -1) sdl_InitialiseKeyboardMapping(kbd);
233 - printf(Messages[76]);
234 + printf("%s", Messages[76]);
236 CPC_SetAudioActive(TRUE);
238 - printf(Messages[77]);
239 + printf("%s", Messages[77]);
241 /* Enter GTK+ event loop when GTK+ is compiled in. Use own main loop
243 --- arnold/src/cpc/render.h.orig 2004-01-03 09:59:50.000000000 +0100
244 +++ arnold/src/cpc/render.h 2017-03-07 19:36:11.790608492 +0100
247 void Render_DumpLine(int LineNum);
\r
249 -void Render_SetColour(const RGBCOLOUR *pColour,/*int,int,int,*/ int Index);
\r
250 +void Render_SetColour(RGBCOLOUR *pColour,/*int,int,int,*/ int Index);
\r
252 void Render_DumpDisplay(void);
\r