Ticket #8415: patch4.diff

File patch4.diff, 20.3 KB (added by SF/capehill, 19 years ago)

AmigaOS 4 changes

Line 
1diff -urwN -x .deps -x CVS scummvm_cvs_pure/scummvm/README scummvm_cvs/scummvm/README
2--- scummvm_cvs_pure/scummvm/README 2005-04-23 16:52:26.000000000 +0300
3+++ scummvm_cvs/scummvm/README 2005-05-09 17:36:08.140625000 +0300
4@@ -1247,7 +1247,15 @@
5 etc. via Fink and into /sw. If you have installed SDL
6 in another way, you'll have to edit the Makefile).
7
8-
9+ AmigaOS 4 (Cross-compiling with Cygwin):
10+ * Make sure that you have SDL installed, you may also need
11+ libogg, libvorbis, libvorbisfile, zlib, libmad.
12+ * Type ./configure --host=ppc-amigaos
13+ * If you got an error about sdl-config, use --with-sdl-prefix
14+ parameter to set the path.
15+ * Check 'config.mak' file and if everything seems to fine:
16+ * Run 'make'.
17+ * Cross-compiling with Linux may be as easy.
18
19 ------------------------------------------------------------------------
20 Good Luck and Happy Adventuring!
21diff -urwN -x .deps -x CVS scummvm_cvs_pure/scummvm/backends/fs/amigaos4/amigaos4-fs.cpp scummvm_cvs/scummvm/backends/fs/amigaos4/amigaos4-fs.cpp
22--- scummvm_cvs_pure/scummvm/backends/fs/amigaos4/amigaos4-fs.cpp 1970-01-01 02:00:00.000000000 +0200
23+++ scummvm_cvs/scummvm/backends/fs/amigaos4/amigaos4-fs.cpp 2005-05-09 16:24:50.281250000 +0300
24@@ -0,0 +1,377 @@
25+/* ScummVM - Scumm Interpreter
26+ * Copyright (C) 2005 The ScummVM project, contribution by Hans-Jörg Frieden and Juha Niemimäki
27+ *
28+ * This program is free software; you can redistribute it and/or
29+ * modify it under the terms of the GNU General Public License
30+ * as published by the Free Software Foundation; either version 2
31+ * of the License, or (at your option) any later version.
32+ *
33+ * This program is distributed in the hope that it will be useful,
34+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
35+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
36+ * GNU General Public License for more details.
37+ *
38+ * You should have received a copy of the GNU General Public License
39+ * along with this program; if not, write to the Free Software
40+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
41+ *
42+ * $Header$
43+ */
44+
45+#if defined(__amigaos4__)
46+#ifdef __USE_INLINE__
47+#undef __USE_INLINE__
48+#endif
49+
50+#include <proto/exec.h>
51+#include <proto/dos.h>
52+#include <stdio.h>
53+
54+#ifndef USE_NEWLIB
55+#include <strings.h>
56+#endif
57+
58+#include <stdafx.h>
59+
60+#include "util.h"
61+
62+#include "base/engine.h"
63+#include "../fs.h"
64+
65+#define ENTER() /* debug(6, "Enter\n") */
66+#define LEAVE() /* debug(6, "Leave\n") */
67+
68+
69+const uint32 ExAllBufferSize = 40960;
70+
71+class AmigaOSFilesystemNode : public AbstractFilesystemNode {
72+ protected:
73+ BPTR _pFileLock;
74+ String _sDisplayName;
75+ bool _bIsDirectory;
76+ bool _bIsValid;
77+ String _sPath;
78+
79+ public:
80+ AmigaOSFilesystemNode();
81+ AmigaOSFilesystemNode(const AmigaOSFilesystemNode *pNode);
82+ AmigaOSFilesystemNode(BPTR pLock, const char *pDisplayName = 0);
83+ AmigaOSFilesystemNode(const String &p);
84+
85+ ~AmigaOSFilesystemNode();
86+
87+ virtual String displayName() const { return _sDisplayName; };
88+ virtual bool isValid() const { return _bIsValid; };
89+ virtual bool isDirectory() const { return _bIsDirectory; };
90+ virtual String path() const { return _sPath; };
91+
92+ virtual FSList listDir(ListMode mode = kListDirectoriesOnly) const;
93+ virtual FSList listVolumes(void) const;
94+ virtual AbstractFilesystemNode *parent() const;
95+ virtual AbstractFilesystemNode *clone() const { return new AmigaOSFilesystemNode(this); };
96+};
97+
98+AbstractFilesystemNode *FilesystemNode::getRoot() {
99+ return new AmigaOSFilesystemNode();
100+}
101+
102+AbstractFilesystemNode *FilesystemNode::getNodeForPath(const String &path) {
103+ return new AmigaOSFilesystemNode(path);
104+}
105+
106+AmigaOSFilesystemNode::AmigaOSFilesystemNode() {
107+ ENTER();
108+ _sDisplayName = "Available Disks";
109+ _bIsValid = true;
110+ _bIsDirectory = true;
111+ _sPath = "";
112+ _pFileLock = 0;
113+ LEAVE();
114+}
115+
116+
117+AmigaOSFilesystemNode::AmigaOSFilesystemNode(const String &p) {
118+ ENTER();
119+
120+ int len = 0, offset = p.size();
121+
122+ assert(offset > 0);
123+
124+ _sPath = p;
125+
126+ // Extract last component from path
127+ const char *str = p.c_str();
128+
129+ while (offset > 0 && (str[offset-1] == '/' || str[offset-1] == ':'))
130+ offset--;
131+
132+ while (offset > 0 && (str[offset-1] != '/' && str[offset-1] != ':')) {
133+ len++;
134+ offset--;
135+ }
136+
137+ _sDisplayName = String(str + offset, len);
138+
139+ // Check whether it is a directory, and whether the file actually exists
140+
141+ struct FileInfoBlock *fib = (struct FileInfoBlock *)IDOS->AllocDosObject(DOS_FIB, NULL);
142+ if (!fib) {
143+ debug(6, "fib == 0\n");
144+ LEAVE();
145+ return;
146+ }
147+
148+ BPTR pLock = IDOS->Lock( (char *)_sPath.c_str(), SHARED_LOCK);
149+ if (pLock) {
150+ if (IDOS->Examine(pLock, fib) != DOSFALSE) {
151+ if (fib->fib_EntryType > 0)
152+ _bIsDirectory = true;
153+ else
154+ _bIsDirectory = false;
155+
156+ if (_bIsDirectory) {
157+ if (fib->fib_EntryType != ST_ROOT)
158+ _sPath += "/";
159+
160+ _pFileLock = IDOS->DupLock(pLock);
161+ _bIsValid = (_pFileLock != 0);
162+ }
163+ else _bIsValid = true;
164+ }
165+ }
166+
167+ IDOS->FreeDosObject(DOS_FIB, fib);
168+ LEAVE();
169+}
170+
171+AmigaOSFilesystemNode::AmigaOSFilesystemNode(BPTR pLock, const char *pDisplayName) {
172+ ENTER();
173+ int bufsize = 256;
174+ _pFileLock = 0;
175+
176+ while (1) {
177+ char *name = new char[bufsize];
178+ if (IDOS->NameFromLock(pLock, name, bufsize) != DOSFALSE) {
179+ _sPath = name;
180+ _sDisplayName = pDisplayName ? pDisplayName : IDOS->FilePart(name);
181+ delete name;
182+ break;
183+ }
184+
185+ if (IDOS->IoErr() != ERROR_LINE_TOO_LONG) {
186+ _bIsValid = false;
187+ debug(6, "Error\n");
188+ LEAVE();
189+ delete name;
190+ return;
191+ }
192+ bufsize *= 2;
193+ delete name;
194+ }
195+
196+ _bIsValid = false;
197+
198+ struct FileInfoBlock *fib = (struct FileInfoBlock *)IDOS->AllocDosObject(DOS_FIB, NULL);
199+ if (!fib) {
200+ debug(6, "fib == 0\n");
201+ LEAVE();
202+ return;
203+ }
204+
205+ if (IDOS->Examine(pLock, fib) != DOSFALSE) {
206+ if (fib->fib_EntryType > 0)
207+ _bIsDirectory = true;
208+ else
209+ _bIsDirectory = false;
210+
211+ if (_bIsDirectory) {
212+ if (fib->fib_EntryType != ST_ROOT)
213+ _sPath += "/";
214+
215+ _pFileLock = IDOS->DupLock(pLock);
216+ _bIsValid = (_pFileLock != 0);
217+ }
218+ else _bIsValid = true;
219+ }
220+
221+ IDOS->FreeDosObject(DOS_FIB, fib);
222+ LEAVE();
223+}
224+
225+AmigaOSFilesystemNode::AmigaOSFilesystemNode(const AmigaOSFilesystemNode *node) {
226+ ENTER();
227+ _sDisplayName = node->_sDisplayName;
228+ _bIsValid = node->_bIsValid;
229+ _bIsDirectory = node->_bIsDirectory;
230+ _sPath = node->_sPath;
231+ _pFileLock = IDOS->DupLock(node->_pFileLock);
232+ LEAVE();
233+}
234+
235+AmigaOSFilesystemNode::~AmigaOSFilesystemNode() {
236+ ENTER();
237+ if (_pFileLock)
238+ IDOS->UnLock(_pFileLock);
239+ LEAVE();
240+}
241+
242+FSList AmigaOSFilesystemNode::listDir(ListMode mode) const {
243+ ENTER();
244+
245+ if (!_bIsValid) {
246+ debug(6, "Invalid node\n");
247+ LEAVE();
248+ //return 0;
249+ }
250+
251+ if (!_bIsDirectory) {
252+ debug(6, "Not a directory\n");
253+ LEAVE();
254+ //return 0;
255+ }
256+
257+ if (_pFileLock == 0) {
258+ debug(6, "Root node\n");
259+ LEAVE();
260+ return listVolumes();
261+ }
262+
263+ //FSList *myList = new FSList();
264+ FSList myList;
265+
266+ struct ExAllControl *eac;
267+ struct ExAllData *data, *ead;
268+ BOOL bExMore;
269+
270+ eac = (struct ExAllControl *)IDOS->AllocDosObject(DOS_EXALLCONTROL, 0);
271+ if (eac) {
272+ data = (struct ExAllData *)IExec->AllocVec(ExAllBufferSize, MEMF_ANY);
273+ if (data) {
274+ eac->eac_LastKey = 0;
275+ do {
276+ bExMore = IDOS->ExAll(_pFileLock, data, ExAllBufferSize,
277+ ED_TYPE, eac);
278+
279+ LONG error = IDOS->IoErr();
280+ if (!bExMore && error != ERROR_NO_MORE_ENTRIES)
281+ break;
282+
283+ if (eac->eac_Entries == 0)
284+ continue;
285+
286+ ead = data;
287+ do {
288+ AmigaOSFilesystemNode *entry;
289+ String full_path;
290+ BPTR lock;
291+
292+ if ((ead->ed_Type > 0 && (mode & kListDirectoriesOnly)) ||
293+ (ead->ed_Type < 0 && (mode & kListFilesOnly))) {
294+ full_path = _sPath;
295+ full_path += (char*)ead->ed_Name;
296+ lock = IDOS->Lock((char *)full_path.c_str(), SHARED_LOCK);
297+ if (lock) {
298+ entry = new AmigaOSFilesystemNode(lock, (char *)ead->ed_Name);
299+ if (entry) {
300+ if (entry->isValid())
301+ myList.push_back(wrap(entry));
302+ else
303+ delete entry;
304+ }
305+ IDOS->UnLock(lock);
306+ }
307+ }
308+ ead = ead->ed_Next;
309+ } while (ead);
310+ } while (bExMore);
311+
312+ IExec->FreeVec(data);
313+ }
314+
315+ IDOS->FreeDosObject(DOS_EXALLCONTROL, eac);
316+ }
317+ LEAVE();
318+ return myList;
319+}
320+
321+AbstractFilesystemNode *AmigaOSFilesystemNode::parent() const {
322+ ENTER();
323+ AmigaOSFilesystemNode *node;
324+
325+ if (!_bIsDirectory) {
326+ debug(6, "No directory\n");
327+ LEAVE();
328+ return 0;
329+ }
330+
331+ if (_pFileLock == 0) {
332+ debug(6, "Root node\n");
333+ LEAVE();
334+ return clone();
335+ }
336+
337+ BPTR parent = IDOS->ParentDir(_pFileLock);
338+ if (parent) {
339+ node = new AmigaOSFilesystemNode(parent);
340+ IDOS->UnLock(parent);
341+ }
342+ else
343+ node = new AmigaOSFilesystemNode();
344+
345+ LEAVE();
346+ return node;
347+}
348+
349+FSList AmigaOSFilesystemNode::listVolumes(void) const {
350+ ENTER();
351+ //FSList *myList = new FSList();
352+ FSList myList;
353+
354+ struct DosList *dosList;
355+
356+ const uint32 lockFlags = LDF_READ | LDF_VOLUMES;
357+ char name[256];
358+
359+ dosList = IDOS->LockDosList(lockFlags);
360+ if (!dosList) {
361+ debug(6, "Cannot lock dos list\n");
362+ LEAVE();
363+ return myList;
364+ }
365+
366+
367+ dosList = IDOS->NextDosEntry(dosList, LDF_VOLUMES);
368+ while (dosList) {
369+ if (dosList->dol_Type == DLT_VOLUME &&
370+ dosList->dol_Name &&
371+ dosList->dol_Task) {
372+ AmigaOSFilesystemNode *entry;
373+ const char *volname = (const char *)BADDR(dosList->dol_Name)+1;
374+ const char *devname = (const char *)((struct Task *)dosList->dol_Task->mp_SigTask)->tc_Node.ln_Name;
375+
376+ strcpy(name, volname);
377+ strcat(name, ":");
378+
379+ BPTR volume_lock = IDOS->Lock(name, SHARED_LOCK);
380+ if (volume_lock) {
381+ sprintf(name, "%s (%s)", volname, devname);
382+ entry = new AmigaOSFilesystemNode(volume_lock, name);
383+ if (entry) {
384+ if (entry->isValid())
385+ myList.push_back(wrap(entry));
386+ else
387+ delete entry;
388+ }
389+ IDOS->UnLock(volume_lock);
390+ }
391+ }
392+ dosList = IDOS->NextDosEntry(dosList, LDF_VOLUMES);
393+ }
394+
395+ IDOS->UnLockDosList(lockFlags);
396+
397+ LEAVE();
398+ return myList;
399+}
400+
401+#endif
402diff -urwN -x .deps -x CVS scummvm_cvs_pure/scummvm/backends/module.mk scummvm_cvs/scummvm/backends/module.mk
403--- scummvm_cvs_pure/scummvm/backends/module.mk 2005-01-11 22:40:10.000000000 +0200
404+++ scummvm_cvs/scummvm/backends/module.mk 2005-05-09 15:57:36.578125000 +0300
405@@ -5,6 +5,7 @@
406 backends/fs/posix/posix-fs.o \
407 backends/fs/morphos/abox-fs.o \
408 backends/fs/windows/windows-fs.o \
409+ backends/fs/amigaos4/amigaos4-fs.o \
410 backends/midi/alsa.o \
411 backends/midi/coreaudio.o \
412 backends/midi/morphos.o \
413@@ -19,6 +20,7 @@
414 backends/fs/posix \
415 backends/fs/morphos \
416 backends/fs/windows \
417+ backends/fs/amigaos4 \
418 backends/midi
419
420 # Include common rules
421diff -urwN -x .deps -x CVS scummvm_cvs_pure/scummvm/base/gameDetector.cpp scummvm_cvs/scummvm/base/gameDetector.cpp
422--- scummvm_cvs_pure/scummvm/base/gameDetector.cpp 2005-04-24 15:21:52.000000000 +0300
423+++ scummvm_cvs/scummvm/base/gameDetector.cpp 2005-05-09 15:59:04.687500000 +0300
424@@ -617,7 +617,7 @@
425 warning("No path was provided. Assuming the data files are in the current directory");
426 gameDataPath = "./";
427 } else if (gameDataPath.lastChar() != '/'
428-#ifdef __MORPHOS__
429+#if defined(__MORPHOS__) || defined(__amigaos4__)
430 && gameDataPath.lastChar() != ':'
431 #endif
432 && gameDataPath.lastChar() != '\\') {
433diff -urwN -x .deps -x CVS scummvm_cvs_pure/scummvm/base/main.cpp scummvm_cvs/scummvm/base/main.cpp
434--- scummvm_cvs_pure/scummvm/base/main.cpp 2005-05-05 15:03:40.000000000 +0300
435+++ scummvm_cvs/scummvm/base/main.cpp 2005-05-09 16:08:42.687500000 +0300
436@@ -122,6 +122,11 @@
437 #endif
438 ;
439
440+#if defined(__amigaos4__)
441+// Set the stack cookie, 640 KB should be enough for everyone
442+const char* stackCookie = "$STACK: 655360\0";
443+#endif
444+
445 #if defined(WIN32) && defined(NO_CONSOLE)
446 #include <cstdio>
447 #define STDOUT_FILE TEXT("stdout.txt")
448diff -urwN -x .deps -x CVS scummvm_cvs_pure/scummvm/common/file.cpp scummvm_cvs/scummvm/common/file.cpp
449--- scummvm_cvs_pure/scummvm/common/file.cpp 2005-04-23 12:21:41.000000000 +0300
450+++ scummvm_cvs/scummvm/common/file.cpp 2005-05-09 16:03:12.437500000 +0300
451@@ -85,6 +85,17 @@
452 file = fopen(buf, mode);
453 }
454
455+#ifdef __amigaos4__
456+ //
457+ // Work around for possibility that someone uses AmigaOS "newlib" build with SmartFileSystem (blocksize 512 bytes), leading
458+ // to buffer size being only 512 bytes. "Clib2" sets the buffer size to 8KB, resulting smooth movie playback. This forces the buffer
459+ // to be enough also when using "newlib" compile on SFS.
460+ //
461+ if (file) {
462+ setvbuf(file, NULL, _IOFBF, 8192);
463+ }
464+#endif
465+
466 return file;
467 }
468
469diff -urwN -x .deps -x CVS scummvm_cvs_pure/scummvm/common/savefile.cpp scummvm_cvs/scummvm/common/savefile.cpp
470--- scummvm_cvs_pure/scummvm/common/savefile.cpp 2005-05-09 02:45:17.000000000 +0300
471+++ scummvm_cvs/scummvm/common/savefile.cpp 2005-05-09 16:03:45.156250000 +0300
472@@ -156,7 +156,7 @@
473 const int dirLen = strlen(buf);
474
475 if (dirLen > 0) {
476-#ifdef __MORPHOS__
477+#if defined(__MORPHOS__) || defined(__amigaos4__)
478 if (buf[dirLen-1] != ':' && buf[dirLen-1] != '/')
479 #endif
480
481diff -urwN -x .deps -x CVS scummvm_cvs_pure/scummvm/common/scaler/hq2x.cpp scummvm_cvs/scummvm/common/scaler/hq2x.cpp
482--- scummvm_cvs_pure/scummvm/common/scaler/hq2x.cpp 2005-05-09 00:49:32.000000000 +0300
483+++ scummvm_cvs/scummvm/common/scaler/hq2x.cpp 2005-05-09 16:07:49.562500000 +0300
484@@ -42,6 +42,20 @@
485 #else
486
487 #ifdef HAS_ALTIVEC
488+
489+#ifdef __amigaos4__
490+#include <proto/exec.h>
491+#include <altivec.h>
492+static bool isAltiVecAvailable() {
493+ uint32 vecUnit;
494+ IExec->GetCPUInfo(GCIT_VectorUnit, &vecUnit, TAG_DONE);
495+ if (vecUnit == VECTORTYPE_NONE)
496+ return false;
497+ else
498+ return true;
499+}
500+#else
501+
502 #include <sys/sysctl.h>
503
504 static bool isAltiVecAvailable() {
505@@ -54,6 +68,7 @@
506 return false;
507 }
508 #endif
509+#endif
510
511 #define PIXEL00_0 *(q) = w5;
512 #define PIXEL00_10 *(q) = interpolate16_2<bitFormat,3,1>(w5, w1);
513diff -urwN -x .deps -x CVS scummvm_cvs_pure/scummvm/common/scaler/hq3x.cpp scummvm_cvs/scummvm/common/scaler/hq3x.cpp
514--- scummvm_cvs_pure/scummvm/common/scaler/hq3x.cpp 2005-05-09 00:49:40.000000000 +0300
515+++ scummvm_cvs/scummvm/common/scaler/hq3x.cpp 2005-05-09 16:09:55.546875000 +0300
516@@ -42,6 +42,19 @@
517 #else
518
519 #ifdef HAS_ALTIVEC
520+
521+#ifdef __amigaos4__
522+#include <proto/exec.h>
523+static bool isAltiVecAvailable() {
524+ uint32 vecUnit;
525+ IExec->GetCPUInfo(GCIT_VectorUnit, &vecUnit, TAG_DONE);
526+ if (vecUnit == VECTORTYPE_NONE)
527+ return false;
528+ else
529+ return true;
530+}
531+#else
532+
533 #include <sys/sysctl.h>
534
535 static bool isAltiVecAvailable() {
536@@ -54,6 +67,7 @@
537 return false;
538 }
539 #endif
540+#endif
541
542 #define PIXEL00_1M *(q) = interpolate16_2<bitFormat,3,1>(w5, w1);
543 #define PIXEL00_1U *(q) = interpolate16_2<bitFormat,3,1>(w5, w2);
544diff -urwN -x .deps -x CVS scummvm_cvs_pure/scummvm/common/scummsys.h scummvm_cvs/scummvm/common/scummsys.h
545--- scummvm_cvs_pure/scummvm/common/scummsys.h 2005-03-31 08:35:03.000000000 +0300
546+++ scummvm_cvs/scummvm/common/scummsys.h 2005-05-09 16:12:44.937500000 +0300
547@@ -323,6 +323,32 @@
548 #define fsize(a) ps2_fsize(a)
549
550 extern void ps2_disableHandleCaching(void);
551+
552+#elif defined (__amigaos4__)
553+ #include <exec/types.h>
554+
555+ #define scumm_stricmp strcasecmp
556+ #define scumm_strnicmp strncasecmp
557+
558+ #define CHECK_HEAP
559+
560+ #define SCUMM_BIG_ENDIAN
561+
562+ // You need to set this manually if necessary
563+ #define SCUMM_NEED_ALIGNMENT
564+
565+ #define FORCEINLINE inline
566+ #define CDECL
567+
568+ #ifndef HAVE_CONFIG_H
569+ typedef unsigned char byte;
570+ typedef unsigned int uint;
571+ #endif
572+
573+ #define START_PACK_STRUCTS
574+ #define END_PACK_STRUCTS
575+ #define GCC_PACK __attribute__((packed))
576+ #define NORETURN __attribute__((__noreturn__))
577 #else
578 #error No system type defined
579 #endif
580diff -urwN -x .deps -x CVS scummvm_cvs_pure/scummvm/common/stdafx.h scummvm_cvs/scummvm/common/stdafx.h
581--- scummvm_cvs_pure/scummvm/common/stdafx.h 2005-03-31 08:35:03.000000000 +0300
582+++ scummvm_cvs/scummvm/common/stdafx.h 2005-05-09 16:14:42.250000000 +0300
583@@ -111,11 +111,13 @@
584 #endif
585 #if !defined(macintosh)
586 #include <sys/types.h>
587-#if !defined(__PLAYSTATION2__)
588+#if !defined(__PLAYSTATION2__) && !defined(__amigaos4__)
589 #include <sys/uio.h>
590 #endif
591+#if !defined(__amigaos4__)
592 #include <sys/param.h>
593 #endif
594+#endif
595 #if !defined (__BEOS__)
596 #include <unistd.h>
597 #endif
598diff -urwN -x .deps -x CVS scummvm_cvs_pure/scummvm/configure scummvm_cvs/scummvm/configure
599--- scummvm_cvs_pure/scummvm/configure 2005-05-07 19:29:11.000000000 +0300
600+++ scummvm_cvs/scummvm/configure 2005-05-09 16:36:39.687500000 +0300
601@@ -434,6 +434,10 @@
602 _host_os=riscos
603 _host_cpu=arm
604 ;;
605+ppc-amigaos)
606+ _host_os=amigaos
607+ _host_cpu=ppc
608+ ;;
609 *)
610 guessed_host=`$_srcdir/config.guess`
611 _host_cpu=`echo $guessed_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
612@@ -613,6 +617,16 @@
613 type_2_byte='short'
614 type_4_byte='int'
615 ;;
616+ ppc-amigaos)
617+ echo "Cross-compiling to $_host, forcing endianness, alignment and type sizes"
618+ _def_endianness='#define SCUMM_BIG_ENDIAN'
619+ _def_align='#define SCUMM_NEED_ALIGNMENT'
620+ type_1_byte='char'
621+ type_2_byte='short'
622+ type_4_byte='long'
623+ CXXFLAGS="$CFLAGS -newlib -mstrict-align -mcpu=750 -mtune=7400"
624+ LDFLAGS="$LDFLAGS -newlib"
625+ ;;
626 *)
627 echo "Cross-compiling to unknown target, please add your target to configure."
628 exit 1
629diff -urwN -x .deps -x CVS scummvm_cvs_pure/scummvm/gui/options.cpp scummvm_cvs/scummvm/gui/options.cpp
630--- scummvm_cvs_pure/scummvm/gui/options.cpp 2005-04-23 00:20:22.000000000 +0300
631+++ scummvm_cvs/scummvm/gui/options.cpp 2005-05-09 16:15:37.312500000 +0300
632@@ -33,7 +33,7 @@
633 #include "sound/mididrv.h"
634 #include "sound/mixer.h"
635
636-#if (!( defined(__PALM_OS__) || defined(__DC__) || defined(__GP32__)) && !defined(_MSC_VER))
637+#if (!( defined(__PALM_OS__) || defined(__DC__) || defined(__GP32__) || defined(__amigaos4__) ) && !defined(_MSC_VER))
638 #include <sys/param.h>
639 #include <unistd.h>
640 #endif
641diff -urwN -x .deps -x CVS scummvm_cvs_pure/scummvm/scumm/script_v90he.cpp scummvm_cvs/scummvm/scumm/script_v90he.cpp
642--- scummvm_cvs_pure/scummvm/scumm/script_v90he.cpp 2005-05-08 13:59:32.000000000 +0300
643+++ scummvm_cvs/scummvm/scumm/script_v90he.cpp 2005-05-09 17:11:52.437500000 +0300
644@@ -2547,7 +2547,7 @@
645 case 2001:
646 // Used in football
647 debug(0, "o90_kernelGetFunctions: U32 code %d (args %d) %d", args[1], num - 2, args[2]);
648- push(_logicHE->dispatch(args[1], num - 2, &args[2]));
649// capehill's note: casted to (int32*) because dispatch is declared so...
650+ push(_logicHE->dispatch( args[1], num - 2, (int32*)&args[2]));
651 break;
652 default:
653 error("o90_kernelGetFunctions: default case %d", args[0]);
654@@ -2613,7 +2613,7 @@
655 case 2001:
656 // Used in SoccerMLS/Soccer2004
657 debug(0, "o90_kernelSetFunctions: U32 code %d (args %d) %d", args[1], num - 2, args[2]);
658- _logicHE->dispatch(args[1], num - 2, &args[2]);
659+ _logicHE->dispatch(args[1], num - 2, (int32*)&args[2]);
660 break;
661 default:
662 error("o90_kernelSetFunctions: default case %d (param count %d)", args[0], num);
663Files scummvm_cvs_pure/scummvm/scummvm.bz2 and scummvm_cvs/scummvm/scummvm.bz2 differ
664diff -urwN -x .deps -x CVS scummvm_cvs_pure/scummvm/sound/softsynth/mt32/partialManager.cpp scummvm_cvs/scummvm/sound/softsynth/mt32/partialManager.cpp
665--- scummvm_cvs_pure/scummvm/sound/softsynth/mt32/partialManager.cpp 2005-03-20 18:24:55.000000000 +0200
666+++ scummvm_cvs/scummvm/sound/softsynth/mt32/partialManager.cpp 2005-05-09 17:20:43.843750000 +0300
667@@ -19,7 +19,11 @@
668 * IN THE SOFTWARE.
669 */
670
671+#ifdef __amigaos4__
672+#include <strings.h>
673+#else
674 #include <memory.h>
675+#endif
676
677 #include "mt32emu.h"
678
679diff -urwN -x .deps -x CVS scummvm_cvs_pure/scummvm/tools/credits.pl scummvm_cvs/scummvm/tools/credits.pl
680--- scummvm_cvs_pure/scummvm/tools/credits.pl 2005-04-16 04:39:51.000000000 +0300
681+++ scummvm_cvs/scummvm/tools/credits.pl 2005-05-09 16:35:10.359375000 +0300
682@@ -329,6 +329,7 @@
683 add_person("Jamieson Christian", "jamieson630", "iMUSE, MIDI, all things musical");
684 add_person("Jerome Fisher", "KingGuppy", "MT-32 emulator");
685 add_person("Jochen Hoenicke", "hoenicke", "Speaker &amp; PCjr sound support, Adlib work");
686+ add_person("Hans-J&ouml;rg Frieden", "", "Port: AmigaOS 4");
687 end_section();
688
689
690@@ -362,6 +363,7 @@
691 add_person("Daniel Schepler", "", "Final MI1 CD music support, initial Ogg Vorbis support");
692 add_person("Andr&eacute; Souza", "", "SDL-based OpenGL renderer");
693 add_person("Tim ???", "realmz", "Initial MI1 CD music support");
694+ add_person("Juha Niemim&auml;ki", "", "AmigaOS 4 port maintaining");
695 end_section();
696
697