Ticket #8415: patch5.diff

File patch5.diff, 12.0 KB (added by SF/capehill, 19 years ago)

AmigaOS 4 changes (excluding 1 new file, the filesystem backend)

  • scummvm/README

    ? scummvm/scummvm.bz2
    ? scummvm/backends/fs/amigaos4
    RCS file: /cvsroot/scummvm/scummvm/README,v
    retrieving revision 1.323
    diff -u -r1.323 README
     
    12471247          etc. via Fink and into /sw. If you have installed SDL
    12481248          in another way, you'll have to edit the Makefile).
    12491249
    1250 
     1250    AmigaOS 4 (Cross-compiling with Cygwin):
     1251        * Make sure that you have SDL installed, you may also need
     1252          libogg, libvorbis, libvorbisfile, zlib, libmad.
     1253        * Type ./configure --host=ppc-amigaos
     1254        * If you got an error about sdl-config, use --with-sdl-prefix
     1255          parameter to set the path.
     1256        * Check 'config.mak' file and if everything seems to fine:
     1257        * Run 'make'.
     1258        * Cross-compiling with Linux may be as easy.
    12511259
    12521260------------------------------------------------------------------------
    12531261Good Luck and Happy Adventuring!
  • scummvm/configure

    RCS file: /cvsroot/scummvm/scummvm/configure,v
    retrieving revision 1.119
    diff -u -r1.119 configure
     
    434434        _host_os=riscos
    435435        _host_cpu=arm
    436436        ;;
     437ppc-amigaos)
     438        _host_os=amigaos
     439        _host_cpu=ppc
     440        ;;
    437441*)
    438442        guessed_host=`$_srcdir/config.guess`
    439443        _host_cpu=`echo $guessed_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
     
    613617                        type_2_byte='short'
    614618                        type_4_byte='int'
    615619                        ;;
     620                ppc-amigaos)
     621                        echo "Cross-compiling to $_host, forcing endianness, alignment and type sizes"
     622                        _def_endianness='#define SCUMM_BIG_ENDIAN'
     623                        _def_align='#define     SCUMM_NEED_ALIGNMENT'
     624                        type_1_byte='char'
     625                        type_2_byte='short'
     626                        type_4_byte='long'
     627                        CXXFLAGS="$CFLAGS -newlib -mstrict-align -mcpu=750 -mtune=7400"
     628                        LDFLAGS="$LDFLAGS -newlib"
     629                        ;;
    616630                *)
    617631                        echo "Cross-compiling to unknown target, please add your target to configure."
    618632                        exit 1
  • scummvm/backends/module.mk

    RCS file: /cvsroot/scummvm/scummvm/backends/module.mk,v
    retrieving revision 1.15
    diff -u -r1.15 module.mk
     
    55        backends/fs/posix/posix-fs.o \
    66        backends/fs/morphos/abox-fs.o \
    77        backends/fs/windows/windows-fs.o \
     8        backends/fs/amigaos4/amigaos4-fs.o \
    89        backends/midi/alsa.o \
    910        backends/midi/coreaudio.o \
    1011        backends/midi/morphos.o \
     
    1920        backends/fs/posix \
    2021        backends/fs/morphos \
    2122        backends/fs/windows \
     23        backends/fs/amigaos4 \
    2224        backends/midi
    2325
    2426# Include common rules
  • scummvm/base/gameDetector.cpp

    RCS file: /cvsroot/scummvm/scummvm/base/gameDetector.cpp,v
    retrieving revision 1.114
    diff -u -r1.114 gameDetector.cpp
     
    617617                warning("No path was provided. Assuming the data files are in the current directory");
    618618                gameDataPath = "./";
    619619        } else if (gameDataPath.lastChar() != '/'
    620 #ifdef __MORPHOS__
     620#if defined(__MORPHOS__) || defined(__amigaos4__)
    621621                                        && gameDataPath.lastChar() != ':'
    622622#endif
    623623                                        && gameDataPath.lastChar() != '\\') {
  • scummvm/base/main.cpp

    RCS file: /cvsroot/scummvm/scummvm/base/main.cpp,v
    retrieving revision 1.78
    diff -u -r1.78 main.cpp
     
    122122#endif
    123123        ;
    124124
     125#if defined(__amigaos4__)
     126// Set the stack cookie, 640 KB should be enough for everyone
     127const char* stackCookie = "$STACK: 655360\0";
     128#endif
     129
    125130#if defined(WIN32) && defined(NO_CONSOLE)
    126131#include <cstdio>
    127132#define STDOUT_FILE     TEXT("stdout.txt")
  • scummvm/common/file.cpp

    RCS file: /cvsroot/scummvm/scummvm/common/file.cpp,v
    retrieving revision 1.79
    diff -u -r1.79 file.cpp
     
    8585                file = fopen(buf, mode);
    8686        }
    8787
     88#ifdef __amigaos4__
     89        //
     90        // Work around for possibility that someone uses AmigaOS "newlib" build with SmartFileSystem (blocksize 512 bytes), leading
     91        // to buffer size being only 512 bytes. "Clib2" sets the buffer size to 8KB, resulting smooth movie playback. This forces the buffer
     92        // to be enough also when using "newlib" compile on SFS.
     93        //
     94        if (file) {
     95                setvbuf(file, NULL, _IOFBF, 8192);
     96        }
     97#endif
     98
    8899        return file;
    89100}
    90101
  • scummvm/common/savefile.cpp

    RCS file: /cvsroot/scummvm/scummvm/common/savefile.cpp,v
    retrieving revision 1.23
    diff -u -r1.23 savefile.cpp
     
    156156        const int dirLen = strlen(buf);
    157157
    158158        if (dirLen > 0) {
    159 #ifdef __MORPHOS__
     159#if defined(__MORPHOS__) || defined(__amigaos4__)
    160160                if (buf[dirLen-1] != ':' && buf[dirLen-1] != '/')
    161161#endif
    162162
  • scummvm/common/scummsys.h

    RCS file: /cvsroot/scummvm/scummvm/common/scummsys.h,v
    retrieving revision 1.57
    diff -u -r1.57 scummsys.h
     
    323323        #define fsize(a)                        ps2_fsize(a)
    324324
    325325        extern void ps2_disableHandleCaching(void);
     326
     327#elif defined (__amigaos4__)
     328        #include <exec/types.h>
     329
     330        #define scumm_stricmp strcasecmp
     331        #define scumm_strnicmp strncasecmp
     332
     333        #define CHECK_HEAP
     334
     335        #define SCUMM_BIG_ENDIAN
     336
     337        // You need to set this manually if necessary
     338        #define SCUMM_NEED_ALIGNMENT
     339
     340        #define FORCEINLINE     inline
     341        #define CDECL
     342
     343        #ifndef HAVE_CONFIG_H
     344        typedef unsigned char byte;
     345        typedef unsigned int uint;
     346        #endif
     347
     348        #define START_PACK_STRUCTS
     349        #define END_PACK_STRUCTS
     350        #define GCC_PACK __attribute__((packed))
     351        #define NORETURN __attribute__((__noreturn__))
    326352#else
    327353        #error No system type defined
    328354#endif
  • scummvm/common/stdafx.h

    RCS file: /cvsroot/scummvm/scummvm/common/stdafx.h,v
    retrieving revision 1.26
    diff -u -r1.26 stdafx.h
     
    111111#endif
    112112#if !defined(macintosh)
    113113#include <sys/types.h>
    114 #if !defined(__PLAYSTATION2__)
     114#if !defined(__PLAYSTATION2__) && !defined(__amigaos4__)
    115115#include <sys/uio.h>
    116116#endif
     117#if !defined(__amigaos4__)
    117118#include <sys/param.h>
    118119#endif
     120#endif
    119121#if !defined (__BEOS__)
    120122#include <unistd.h>
    121123#endif
  • scummvm/common/scaler/hq2x.cpp

    RCS file: /cvsroot/scummvm/scummvm/common/scaler/hq2x.cpp,v
    retrieving revision 1.14
    diff -u -r1.14 hq2x.cpp
     
    4242#else
    4343
    4444#ifdef HAS_ALTIVEC
     45
     46#ifdef __amigaos4__
     47#include <proto/exec.h>
     48#include <altivec.h>
     49static bool isAltiVecAvailable() {
     50        uint32 vecUnit;
     51        IExec->GetCPUInfo(GCIT_VectorUnit, &vecUnit, TAG_DONE);
     52        if (vecUnit == VECTORTYPE_NONE)
     53                return false;
     54        else
     55                return true;
     56}
     57#else
     58
    4559#include <sys/sysctl.h>
    4660
    4761static bool isAltiVecAvailable()  {
     
    5468        return false;
    5569}
    5670#endif
     71#endif
    5772
    5873#define PIXEL00_0       *(q) = w5;
    5974#define PIXEL00_10      *(q) = interpolate16_2<bitFormat,3,1>(w5, w1);
  • scummvm/common/scaler/hq3x.cpp

    RCS file: /cvsroot/scummvm/scummvm/common/scaler/hq3x.cpp,v
    retrieving revision 1.12
    diff -u -r1.12 hq3x.cpp
     
    4242#else
    4343
    4444#ifdef HAS_ALTIVEC
     45
     46#ifdef __amigaos4__
     47#include <proto/exec.h>
     48static bool isAltiVecAvailable() {
     49        uint32 vecUnit;
     50        IExec->GetCPUInfo(GCIT_VectorUnit, &vecUnit, TAG_DONE);
     51        if (vecUnit == VECTORTYPE_NONE)
     52                return false;
     53        else
     54                return true;
     55}
     56#else
     57
    4558#include <sys/sysctl.h>
    4659
    4760static bool isAltiVecAvailable()  {
     
    5467        return false;
    5568}
    5669#endif
     70#endif
    5771
    5872#define PIXEL00_1M  *(q) = interpolate16_2<bitFormat,3,1>(w5, w1);
    5973#define PIXEL00_1U  *(q) = interpolate16_2<bitFormat,3,1>(w5, w2);
  • scummvm/gui/options.cpp

    RCS file: /cvsroot/scummvm/scummvm/gui/options.cpp,v
    retrieving revision 1.76
    diff -u -r1.76 options.cpp
     
    3333#include "sound/mididrv.h"
    3434#include "sound/mixer.h"
    3535
    36 #if (!( defined(__PALM_OS__) || defined(__DC__) || defined(__GP32__)) && !defined(_MSC_VER))
     36#if (!( defined(__PALM_OS__) || defined(__DC__) || defined(__GP32__) || defined(__amigaos4__) ) && !defined(_MSC_VER))
    3737#include <sys/param.h>
    3838#include <unistd.h>
    3939#endif
  • scummvm/scumm/script_v90he.cpp

    RCS file: /cvsroot/scummvm/scummvm/scumm/script_v90he.cpp,v
    retrieving revision 2.249
    diff -u -r2.249 script_v90he.cpp
     
    25472547        case 2001:
    25482548                // Used in football
    25492549                debug(0, "o90_kernelGetFunctions: U32 code %d (args %d) %d", args[1], num - 2, args[2]);
    2550                 push(_logicHE->dispatch(args[1], num - 2, &args[2]));
     2550                push(_logicHE->dispatch( args[1], num - 2, (int32*)&args[2]));
    25512551                break;
    25522552        default:
    25532553                error("o90_kernelGetFunctions: default case %d", args[0]);
     
    26132613        case 2001:
    26142614                // Used in SoccerMLS/Soccer2004
    26152615                debug(0, "o90_kernelSetFunctions: U32 code %d (args %d) %d", args[1], num - 2, args[2]);
    2616                 _logicHE->dispatch(args[1], num - 2, &args[2]);
     2616                _logicHE->dispatch(args[1], num - 2, (int32*)&args[2]);
    26172617                break;
    26182618        default:
    26192619                error("o90_kernelSetFunctions: default case %d (param count %d)", args[0], num);
  • scummvm/sound/softsynth/mt32/partialManager.cpp

    RCS file: /cvsroot/scummvm/scummvm/sound/softsynth/mt32/partialManager.cpp,v
    retrieving revision 1.2
    diff -u -r1.2 partialManager.cpp
     
    1919 * IN THE SOFTWARE.
    2020 */
    2121
     22#ifdef __amigaos4__
     23#include <strings.h>
     24#else
    2225#include <memory.h>
     26#endif
    2327
    2428#include "mt32emu.h"
    2529
  • scummvm/tools/credits.pl

    RCS file: /cvsroot/scummvm/scummvm/tools/credits.pl,v
    retrieving revision 1.14
    diff -u -r1.14 credits.pl
     
    329329        add_person("Jamieson Christian", "jamieson630", "iMUSE, MIDI, all things musical");
    330330        add_person("Jerome Fisher", "KingGuppy", "MT-32 emulator");
    331331        add_person("Jochen Hoenicke", "hoenicke", "Speaker &amp; PCjr sound support, Adlib work");
     332        add_person("Hans-J&ouml;rg Frieden", "", "Port: AmigaOS 4");
    332333  end_section();
    333334
    334335
     
    362363        add_person("Daniel Schepler", "", "Final MI1 CD music support, initial Ogg Vorbis support");
    363364        add_person("Andr&eacute; Souza", "", "SDL-based OpenGL renderer");
    364365        add_person("Tim ???", "realmz", "Initial MI1 CD music support");
     366        add_person("Juha Niemim&auml;ki", "", "AmigaOS 4 port maintaining");
    365367  end_section();
    366368
    367369