aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2005-05-09 21:21:21 +0000
committerMax Horn2005-05-09 21:21:21 +0000
commit52bbc867979b1453f98191718c3eca726cc9ff8e (patch)
tree4bf1084cc670b2fff715916420c604684fa81135
parent1c6788797ee3a5f4790ae1e42fa9321478f62c60 (diff)
downloadscummvm-rg350-52bbc867979b1453f98191718c3eca726cc9ff8e.tar.gz
scummvm-rg350-52bbc867979b1453f98191718c3eca726cc9ff8e.tar.bz2
scummvm-rg350-52bbc867979b1453f98191718c3eca726cc9ff8e.zip
Patch #1181544 (AmigaOS 4 changes)
svn-id: r18011
-rw-r--r--AUTHORS2
-rw-r--r--Makefile4
-rw-r--r--NEWS4
-rw-r--r--README10
-rw-r--r--backends/module.mk2
-rw-r--r--base/gameDetector.cpp2
-rw-r--r--base/main.cpp5
-rw-r--r--common/file.cpp11
-rw-r--r--common/savefile.cpp2
-rw-r--r--common/scaler/hq2x.cpp15
-rw-r--r--common/scaler/hq3x.cpp14
-rw-r--r--common/scummsys.h26
-rw-r--r--common/stdafx.h4
-rwxr-xr-xconfigure14
-rw-r--r--doc/10.tex4
-rw-r--r--gui/credits.h4
-rw-r--r--gui/options.cpp2
-rw-r--r--sound/softsynth/mt32/partialManager.cpp4
-rwxr-xr-xtools/credits.pl13
19 files changed, 133 insertions, 9 deletions
diff --git a/AUTHORS b/AUTHORS
index b631becb28..60db99ace9 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -20,6 +20,7 @@ The ScummVM team:
Jamieson Christian - iMUSE, MIDI, all things musical
Jerome Fisher - MT-32 emulator
Jochen Hoenicke - Speaker & PCjr sound support, Adlib work
+ Hans-Jorg Frieden - Port: AmigaOS 4
Retired Team Members:
Ralph Brorsen - Help with GUI implementation
@@ -53,6 +54,7 @@ Contributors:
Johannes Schickel - Thumbnails for ScummEngine
Andre Souza - SDL-based OpenGL renderer
Tim ??? - Initial MI1 CD music support
+ Juha Niemimaki - AmigaOS 4 port maintaining
And to all the contributors, users, and beta testers we've missed.
Thanks!
diff --git a/Makefile b/Makefile
index b0ce3c417c..88104f6e0b 100644
--- a/Makefile
+++ b/Makefile
@@ -19,10 +19,10 @@ MODULE_DIRS :=
include config.mak
# Uncomment this for stricter compile time code verification
-# CXXFLAGS+= -Werror
+CXXFLAGS+= -Werror
CXXFLAGS:= -Wall $(CXXFLAGS)
-CXXFLAGS+= -O -Wuninitialized
+# CXXFLAGS+= -O -Wuninitialized
CXXFLAGS+= -Wno-long-long -Wno-multichar -Wno-unknown-pragmas
# Even more warnings...
CXXFLAGS+= -pedantic -Wpointer-arith -Wcast-qual -Wconversion
diff --git a/NEWS b/NEWS
index 1ad43d2958..0af8919a60 100644
--- a/NEWS
+++ b/NEWS
@@ -7,6 +7,10 @@ For a more comprehensive changelog for the latest experimental CVS code, see:
and "Inherit the Earth").
- Added Gob engine (for Goblins series)
+ New Ports:
+ - Added PlayStation 2 port
+ - Added AmigaOS 4 port
+
General:
- Reworked cursor handling in SDL backend. Now cursors can have their own
palette and scaling. This is used by Humongous Entertainment games now.
diff --git a/README b/README
index d13ba99db6..299f34f2bb 100644
--- a/README
+++ b/README
@@ -1247,7 +1247,15 @@ messages (see http://www.sysinternals.com/ntw2k/freeware/debugview.shtml).
etc. via Fink and into /sw. If you have installed SDL
in another way, you'll have to edit the Makefile).
-
+ AmigaOS 4 (Cross-compiling with Cygwin):
+ * Make sure that you have SDL installed, you may also need
+ libogg, libvorbis, libvorbisfile, zlib, libmad.
+ * Type ./configure --host=ppc-amigaos
+ * If you got an error about sdl-config, use --with-sdl-prefix
+ parameter to set the path.
+ * Check 'config.mak' file and if everything seems to fine:
+ * Run 'make'.
+ * Cross-compiling with Linux may be as easy.
------------------------------------------------------------------------
Good Luck and Happy Adventuring!
diff --git a/backends/module.mk b/backends/module.mk
index 0a2a8d0cf8..737f126c6a 100644
--- a/backends/module.mk
+++ b/backends/module.mk
@@ -5,6 +5,7 @@ MODULE_OBJS := \
backends/fs/posix/posix-fs.o \
backends/fs/morphos/abox-fs.o \
backends/fs/windows/windows-fs.o \
+ backends/fs/amigaos4/amigaos4-fs.o \
backends/midi/alsa.o \
backends/midi/coreaudio.o \
backends/midi/morphos.o \
@@ -19,6 +20,7 @@ MODULE_DIRS += \
backends/fs/posix \
backends/fs/morphos \
backends/fs/windows \
+ backends/fs/amigaos4 \
backends/midi
# Include common rules
diff --git a/base/gameDetector.cpp b/base/gameDetector.cpp
index a3b1fcdc32..aa08306e75 100644
--- a/base/gameDetector.cpp
+++ b/base/gameDetector.cpp
@@ -617,7 +617,7 @@ bool GameDetector::detectMain() {
warning("No path was provided. Assuming the data files are in the current directory");
gameDataPath = "./";
} else if (gameDataPath.lastChar() != '/'
-#ifdef __MORPHOS__
+#if defined(__MORPHOS__) || defined(__amigaos4__)
&& gameDataPath.lastChar() != ':'
#endif
&& gameDataPath.lastChar() != '\\') {
diff --git a/base/main.cpp b/base/main.cpp
index bddbbed2c2..287b0a891a 100644
--- a/base/main.cpp
+++ b/base/main.cpp
@@ -122,6 +122,11 @@ const char *gScummVMFeatures = ""
#endif
;
+#if defined(__amigaos4__)
+// Set the stack cookie, 640 KB should be enough for everyone
+const char* stackCookie = "$STACK: 655360\0";
+#endif
+
#if defined(WIN32) && defined(NO_CONSOLE)
#include <cstdio>
#define STDOUT_FILE TEXT("stdout.txt")
diff --git a/common/file.cpp b/common/file.cpp
index 1be6f6a7a5..7f948f7bc7 100644
--- a/common/file.cpp
+++ b/common/file.cpp
@@ -85,6 +85,17 @@ static FILE *fopenNoCase(const char *filename, const char *directory, const char
file = fopen(buf, mode);
}
+#ifdef __amigaos4__
+ //
+ // Work around for possibility that someone uses AmigaOS "newlib" build with SmartFileSystem (blocksize 512 bytes), leading
+ // to buffer size being only 512 bytes. "Clib2" sets the buffer size to 8KB, resulting smooth movie playback. This forces the buffer
+ // to be enough also when using "newlib" compile on SFS.
+ //
+ if (file) {
+ setvbuf(file, NULL, _IOFBF, 8192);
+ }
+#endif
+
return file;
}
diff --git a/common/savefile.cpp b/common/savefile.cpp
index 993dd104db..e5b7a3501c 100644
--- a/common/savefile.cpp
+++ b/common/savefile.cpp
@@ -156,7 +156,7 @@ static void join_paths(const char *filename, const char *directory,
const int dirLen = strlen(buf);
if (dirLen > 0) {
-#ifdef __MORPHOS__
+#if defined(__MORPHOS__) || defined(__amigaos4__)
if (buf[dirLen-1] != ':' && buf[dirLen-1] != '/')
#endif
diff --git a/common/scaler/hq2x.cpp b/common/scaler/hq2x.cpp
index 3599c01b9b..fd6d2eb094 100644
--- a/common/scaler/hq2x.cpp
+++ b/common/scaler/hq2x.cpp
@@ -42,6 +42,20 @@ void HQ2x(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPitch,
#else
#ifdef HAS_ALTIVEC
+
+#ifdef __amigaos4__
+#include <proto/exec.h>
+#include <altivec.h>
+static bool isAltiVecAvailable() {
+ uint32 vecUnit;
+ IExec->GetCPUInfo(GCIT_VectorUnit, &vecUnit, TAG_DONE);
+ if (vecUnit == VECTORTYPE_NONE)
+ return false;
+ else
+ return true;
+}
+#else
+
#include <sys/sysctl.h>
static bool isAltiVecAvailable() {
@@ -54,6 +68,7 @@ static bool isAltiVecAvailable() {
return false;
}
#endif
+#endif
#define PIXEL00_0 *(q) = w5;
#define PIXEL00_10 *(q) = interpolate16_2<bitFormat,3,1>(w5, w1);
diff --git a/common/scaler/hq3x.cpp b/common/scaler/hq3x.cpp
index f0a92c533c..43bc0dd432 100644
--- a/common/scaler/hq3x.cpp
+++ b/common/scaler/hq3x.cpp
@@ -42,6 +42,19 @@ void HQ3x(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPitch,
#else
#ifdef HAS_ALTIVEC
+
+#ifdef __amigaos4__
+#include <proto/exec.h>
+static bool isAltiVecAvailable() {
+ uint32 vecUnit;
+ IExec->GetCPUInfo(GCIT_VectorUnit, &vecUnit, TAG_DONE);
+ if (vecUnit == VECTORTYPE_NONE)
+ return false;
+ else
+ return true;
+}
+#else
+
#include <sys/sysctl.h>
static bool isAltiVecAvailable() {
@@ -54,6 +67,7 @@ static bool isAltiVecAvailable() {
return false;
}
#endif
+#endif
#define PIXEL00_1M *(q) = interpolate16_2<bitFormat,3,1>(w5, w1);
#define PIXEL00_1U *(q) = interpolate16_2<bitFormat,3,1>(w5, w2);
diff --git a/common/scummsys.h b/common/scummsys.h
index 3eee1976c2..58b01b3902 100644
--- a/common/scummsys.h
+++ b/common/scummsys.h
@@ -323,6 +323,32 @@
#define fsize(a) ps2_fsize(a)
extern void ps2_disableHandleCaching(void);
+
+#elif defined (__amigaos4__)
+ #include <exec/types.h>
+
+ #define scumm_stricmp strcasecmp
+ #define scumm_strnicmp strncasecmp
+
+ #define CHECK_HEAP
+
+ #define SCUMM_BIG_ENDIAN
+
+ // You need to set this manually if necessary
+ #define SCUMM_NEED_ALIGNMENT
+
+ #define FORCEINLINE inline
+ #define CDECL
+
+ #ifndef HAVE_CONFIG_H
+ typedef unsigned char byte;
+ typedef unsigned int uint;
+ #endif
+
+ #define START_PACK_STRUCTS
+ #define END_PACK_STRUCTS
+ #define GCC_PACK __attribute__((packed))
+ #define NORETURN __attribute__((__noreturn__))
#else
#error No system type defined
#endif
diff --git a/common/stdafx.h b/common/stdafx.h
index e3d96f2741..c40cac985e 100644
--- a/common/stdafx.h
+++ b/common/stdafx.h
@@ -111,11 +111,13 @@
#endif
#if !defined(macintosh)
#include <sys/types.h>
-#if !defined(__PLAYSTATION2__)
+#if !defined(__PLAYSTATION2__) && !defined(__amigaos4__)
#include <sys/uio.h>
#endif
+#if !defined(__amigaos4__)
#include <sys/param.h>
#endif
+#endif
#if !defined (__BEOS__)
#include <unistd.h>
#endif
diff --git a/configure b/configure
index 0635e127c2..debfb93e18 100755
--- a/configure
+++ b/configure
@@ -434,6 +434,10 @@ arm-riscos-aof)
_host_os=riscos
_host_cpu=arm
;;
+ppc-amigaos)
+ _host_os=amigaos
+ _host_cpu=ppc
+ ;;
*)
guessed_host=`$_srcdir/config.guess`
_host_cpu=`echo $guessed_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
@@ -613,6 +617,16 @@ if test -n "$_host"; then
type_2_byte='short'
type_4_byte='int'
;;
+ ppc-amigaos)
+ echo "Cross-compiling to $_host, forcing endianness, alignment and type sizes"
+ _def_endianness='#define SCUMM_BIG_ENDIAN'
+ _def_align='#define SCUMM_NEED_ALIGNMENT'
+ type_1_byte='char'
+ type_2_byte='short'
+ type_4_byte='long'
+ CXXFLAGS="$CFLAGS -newlib -mstrict-align -mcpu=750 -mtune=7400"
+ LDFLAGS="$LDFLAGS -newlib"
+ ;;
*)
echo "Cross-compiling to unknown target, please add your target to configure."
exit 1
diff --git a/doc/10.tex b/doc/10.tex
index 8bcd112c04..0a2f3106dc 100644
--- a/doc/10.tex
+++ b/doc/10.tex
@@ -11,7 +11,7 @@
Jonathan Gray & Engine: SCUMM, HE, Broken Sword II\\
Travis Howell & Engine: SCUMM, HE, Simon the Sorcerer\\
Oliver Kiehl & Engine: Beneath a Steel Sky, Simon\\
- Pawel Kolodziejski & Engine: SCUMM (Codecs, iMUSE, Smush, etc.)\\
+ Pawe{\l} Ko{\l}odziejski & Engine: SCUMM (Codecs, iMUSE, Smush, etc.)\\
Andrew Kurushin & Engine: SAGA\\
Gregory Montoir & Engine: Flight of the Amazon Queen, HE\\
Joost Peters & Engine: Beneath a Steel Sky, Flight of the Amazon Queen\\
@@ -23,6 +23,7 @@
Jamieson Christian & iMUSE, MIDI, all things musical\\
Jerome Fisher & MT-32 emulator\\
Jochen Hoenicke & Speaker \& PCjr sound support, Adlib work\\
+ Hans-J\"org Frieden & Port: AmigaOS 4\\
\end{tabular}
\item \textbf{Retired Team Members}\\
\begin{tabular}[h]{p{4cm}l}
@@ -55,6 +56,7 @@
Johannes Schickel & Thumbnails for ScummEngine\\
Andr\'e Souza & SDL-based OpenGL renderer\\
Tim ??? & Initial MI1 CD music support\\
+ Juha Niemim\"aki & AmigaOS 4 port maintaining\\
\end{tabular}
And to all the contributors, users, and beta testers we've missed. Thanks!
diff --git a/gui/credits.h b/gui/credits.h
index 2b17d4c68a..465c10ca5b 100644
--- a/gui/credits.h
+++ b/gui/credits.h
@@ -42,6 +42,8 @@ static const char *credits[] = {
"\\L\\c2"" MT-32 emulator",
"\\L\\c0"" Jochen Hoenicke",
"\\L\\c2"" Speaker & PCjr sound support, Adlib work",
+"\\L\\c0"" Hans-Jorg Frieden",
+"\\L\\c2"" Port: AmigaOS 4",
"\\L\\c0""",
"\\C\\c1""Retired Team Members:",
"\\L\\c0"" Ralph Brorsen",
@@ -101,6 +103,8 @@ static const char *credits[] = {
"\\L\\c2"" SDL-based OpenGL renderer",
"\\L\\c0"" Tim ???",
"\\L\\c2"" Initial MI1 CD music support",
+"\\L\\c0"" Juha Niemimaki",
+"\\L\\c2"" AmigaOS 4 port maintaining",
"\\L\\c0""",
"\\L\\c0""And to all the contributors, users, and beta",
"\\L\\c0""testers we've missed. Thanks!",
diff --git a/gui/options.cpp b/gui/options.cpp
index e35c11fd09..9384c97b50 100644
--- a/gui/options.cpp
+++ b/gui/options.cpp
@@ -33,7 +33,7 @@
#include "sound/mididrv.h"
#include "sound/mixer.h"
-#if (!( defined(__PALM_OS__) || defined(__DC__) || defined(__GP32__)) && !defined(_MSC_VER))
+#if (!( defined(__PALM_OS__) || defined(__DC__) || defined(__GP32__) || defined(__amigaos4__) ) && !defined(_MSC_VER))
#include <sys/param.h>
#include <unistd.h>
#endif
diff --git a/sound/softsynth/mt32/partialManager.cpp b/sound/softsynth/mt32/partialManager.cpp
index 51e55a7d69..fb6973a0b2 100644
--- a/sound/softsynth/mt32/partialManager.cpp
+++ b/sound/softsynth/mt32/partialManager.cpp
@@ -19,7 +19,11 @@
* IN THE SOFTWARE.
*/
+#ifdef __amigaos4__
+#include <strings.h>
+#else
#include <memory.h>
+#endif
#include "mt32emu.h"
diff --git a/tools/credits.pl b/tools/credits.pl
index ab6e24ca49..6aa8bb99f1 100755
--- a/tools/credits.pl
+++ b/tools/credits.pl
@@ -61,6 +61,7 @@ sub html_entities_to_ascii {
# &eacute; -> e
# &oslash; -> o
# &ouml; -> o / oe
+ # &auml; -> a
# &amp; -> &
# &#322; -> l
$text =~ s/&aacute;/a/g;
@@ -68,6 +69,8 @@ sub html_entities_to_ascii {
$text =~ s/&oslash;/o/g;
$text =~ s/&#322;/l/g;
+ $text =~ s/&auml;/a/g;
+ $text =~ s/&uuml;/u/g;
# HACK: Torbj*o*rn but G*oe*ffringmann and R*oe*ver
$text =~ s/&ouml;r/or/g;
$text =~ s/&ouml;/oe/g;
@@ -85,7 +88,10 @@ sub html_entities_to_rtf {
$text =~ s/&eacute;/\\'8e/g;
$text =~ s/&oslash;/\\'bf/g;
$text =~ s/&#322;/\\uc0\\u322 /g;
+
+ $text =~ s/&auml;/\\'8a/g;
$text =~ s/&ouml;/\\'9a/g;
+ $text =~ s/&uuml;/\\'9f/g;
$text =~ s/&amp;/&/g;
@@ -99,8 +105,11 @@ sub html_entities_to_tex {
$text =~ s/&aacute;/\\'a/g;
$text =~ s/&eacute;/\\'e/g;
$text =~ s/&oslash;/{\\o}/g;
- $text =~ s/&#322;/l/g; # TODO
+ $text =~ s/&#322;/{\\l}/g;
+
+ $text =~ s/&auml;/\\"a/g;
$text =~ s/&ouml;/\\"o/g;
+ $text =~ s/&uuml;/\\"u/g;
$text =~ s/&amp;/\\&/g;
@@ -329,6 +338,7 @@ begin_credits("Credits");
add_person("Jamieson Christian", "jamieson630", "iMUSE, MIDI, all things musical");
add_person("Jerome Fisher", "KingGuppy", "MT-32 emulator");
add_person("Jochen Hoenicke", "hoenicke", "Speaker &amp; PCjr sound support, Adlib work");
+ add_person("Hans-J&ouml;rg Frieden", "", "Port: AmigaOS 4");
end_section();
@@ -363,6 +373,7 @@ begin_credits("Credits");
add_person("Johannes Schickel", "LordHoto", "Thumbnails for ScummEngine");
add_person("Andr&eacute; Souza", "", "SDL-based OpenGL renderer");
add_person("Tim ???", "realmz", "Initial MI1 CD music support");
+ add_person("Juha Niemim&auml;ki", "", "AmigaOS 4 port maintaining");
end_section();