Ticket #8249: aspect-ratio.diff

File aspect-ratio.diff, 20.1 KB (added by eriktorbjorn, 21 years ago)

Patch against a June 20 CVS snapshot

  • scummvm/README

    diff -ur ScummVM+orig/scummvm/README ScummVM+hack/scummvm/README
    old new  
    339339
    340340        scummvm [OPTIONS] [GAME]
    341341
    342         [GAME]        - Short name of game to load. For example, 'monkey' for
    343                         Monkey Island.
     342        [GAME]         - Short name of game to load. For example, 'monkey' for
     343                         Monkey Island.
     344
     345        -p<path>       - Path to where the game is installed. Default is Cwd.
     346        -x[<num>]      - Save game slot to load (default: autosave)
     347        -f             - Full-screen mode.
     348        -g<mode>       - Select graphics scaler. See below.
     349        -e<mode>       - Select sound engine. See below.
     350        -a             - Enable amiga pal conversion, for playing Amiga
     351                         versions
     352        -q<lang>       - Select language. See below.
     353        -c<num>        - Drive to play cd audio from.  E.g., 0 is first drive.
     354        -m<num>        - Set the music volume, 0-255.  Default is '192'
     355        -o<num>        - Set the master volume, 0-255. Default is '192'
     356        -s<num>        - Set the sfx volume, 0-255.    Default is '192'
     357        -t<num>        - Set music tempo. 50-200. Default is '100' (percent)
     358        -n             - Disable subtitles. Use with games that have voice.
     359        -y             - Set talk speed ('yak option'). Default is '60'
     360        -l<file>       - Load alternate configuration file
     361        -w[<file>]     - Write configuration file
     362        -v             - Show version information and exit
     363        -z             - Display list of games
     364        -b<num>        - Start in room <num>.
     365        -d[<num>]      - Set debug verbosity to <num>
     366        -u             - Dump scripts if a directory called 'dumps' exists in
     367                         current directory
     368        --multi-midi   - enable combination Adlib and native MIDI
     369        --native-mt32  - true Roland MT-32 (disable GM emulation)
     370        --aspect-ratio - enable aspect ratio correction
    344371
    345         -p<path>      - Path to where the game is installed. Default is Cwd.
    346         -x[<num>]     - Save game slot to load (default: autosave)
    347         -f            - Full-screen mode.
    348         -g<mode>      - Select graphics scaler. See below.
    349         -e<mode>      - Select sound engine. See below.
    350         -a            - Enable amiga pal conversion, for playing Amiga versions
    351         -q<lang>      - Select language. See below.
    352         -c<num>       - Drive to play cd audio from.  E.g., 0 is first drive.
    353         -m<num>       - Set the music volume, 0-255.  Default is '192'
    354         -o<num>       - Set the master volume, 0-255. Default is '192'
    355         -s<num>       - Set the sfx volume, 0-255.    Default is '192'
    356         -t<num>       - Set music tempo. 50-200. Default is '100' (percent)
    357         -n            - Disable subtitles. Use with games that have voice.
    358         -y            - Set talk speed ('yak option'). Default is '60'
    359         -l<file>      - Load alternate configuration file
    360         -w[<file>]    - Write configuration file
    361         -v            - Show version information and exit
    362         -z            - Display list of games
    363         -b<num>       - Start in room <num>.
    364         -d[<num>]     - Set debug verbosity to <num>
    365         -u            - Dump scripts if a directory called 'dumps' exists in
    366                         current directory
    367         --multi-midi  - enable combination Adlib and native MIDI
    368         --native-mt32 - true Roland MT-32 (disable GM emulation)
    369372
    370373
    371374Hot Keys:
     
    380383        Ctrl-Alt 0-9           - Switch between graphics filters
    381384        Ctrl-Alt b             - Switch beetwen bilinear and non-linear
    382385                                 filtering [OpenGL backend]
    383         Ctrl-Alt a             - Switch between: [OpenGL backend]
    384                                  - Fit the game in the whole screen (No black borders)
    385                                  - Don't fit the game in the whole screen (Black borders)
     386        Ctrl-Alt a             - Toggle aspect-ratio correction on/off.
     387                                 Most of the games use a 320x200 pixel
     388                                 resolution, which may look squashed on
     389                                 modern monitors. Aspect-ratio correction
     390                                 stretches the image to use 320x240 pixels
     391                                 instead, or a multiple thereof.
     392
    386393    Scumm:
    387394        Ctrl 0-9 and Alt 0-9   - load and save game state
    388395        Ctrl-g                 - runs in really REALLY fast mode.
  • scummvm/backends/sdl/sdl-common.cpp

    diff -ur ScummVM+orig/scummvm/backends/sdl/sdl-common.cpp ScummVM+hack/scummvm/backends/sdl/sdl-common.cpp
    old new  
    4141#define JOY_BUT_SPACE 4
    4242#define JOY_BUT_F5 5
    4343
    44 OSystem *OSystem_SDL_create(int gfx_mode, bool full_screen) {
    45         return OSystem_SDL_Common::create(gfx_mode, full_screen);
     44OSystem *OSystem_SDL_create(int gfx_mode, bool full_screen, bool aspect_ratio) {
     45        return OSystem_SDL_Common::create(gfx_mode, full_screen, aspect_ratio);
    4646}
    4747
    48 OSystem *OSystem_SDL_Common::create(int gfx_mode, bool full_screen) {
     48OSystem *OSystem_SDL_Common::create(int gfx_mode, bool full_screen, bool aspect_ratio) {
    4949        OSystem_SDL_Common *syst = OSystem_SDL_Common::create_intern();
    5050
    51         syst->init_intern(gfx_mode, full_screen);
     51        syst->init_intern(gfx_mode, full_screen, aspect_ratio);
    5252
    5353        return syst;
    5454}
    5555
    56 void OSystem_SDL_Common::init_intern(int gfx_mode, bool full_screen) {
     56void OSystem_SDL_Common::init_intern(int gfx_mode, bool full_screen, bool aspect_ratio) {
    5757
    5858        _mode = gfx_mode;
    5959        _full_screen = full_screen;
     60        _aspect_ratio = aspect_ratio;
    6061
    6162        if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_TIMER | SDL_INIT_JOYSTICK) ==-1) {
    6263                error("Could not initialize SDL: %s.\n", SDL_GetError());
     
    129130
    130131        _screenWidth = w;
    131132        _screenHeight = h;
     133
     134        if (h != 200)
     135                _aspect_ratio = false;
     136
    132137        CKSUM_NUM = (_screenWidth * _screenHeight / (8 * 8));
    133138        if (_dirty_checksums)
    134139                free(_dirty_checksums);
     
    576581                                }
    577582                        }
    578583
    579                         // Ctr-Alt-a will change aspect ratio in OpenGL backend
     584                        // Ctr-Alt-a will change aspect ratio
    580585                        if (b == (KBD_CTRL|KBD_ALT) && ev.key.keysym.sym=='a') {
    581                                         Property prop;
    582                                         prop.gfx_mode = 11;
    583                                         property(PROP_SET_GFX_MODE, &prop);
    584                                         break;
     586                                property(PROP_TOGGLE_ASPECT_RATIO, NULL);
     587                                break;
    585588                        }
    586589
    587590                        // Ctr-Alt-b will change bilinear filtering in OpenGL backend
    588591                        if (b == (KBD_CTRL|KBD_ALT) && ev.key.keysym.sym=='b') {
    589                                         Property prop;
    590                                         prop.gfx_mode = 12;
    591                                         property(PROP_SET_GFX_MODE, &prop);
    592                                         break;
     592                                Property prop;
     593                                prop.gfx_mode = 12;
     594                                property(PROP_SET_GFX_MODE, &prop);
     595                                break;
    593596                        }
    594597
    595598#ifdef QTOPIA
     
    698701                        event->mouse.x /= _scaleFactor;
    699702                        event->mouse.y /= _scaleFactor;
    700703
     704                        if (_aspect_ratio)
     705                                event->mouse.y = UnAspect(event->mouse.y);
    701706                        return true;
    702707
    703708                case SDL_MOUSEBUTTONDOWN:
     
    718723                        event->mouse.x /= _scaleFactor;
    719724                        event->mouse.y /= _scaleFactor;
    720725
     726                        if (_aspect_ratio)
     727                                event->mouse.y = UnAspect(event->mouse.y);
     728
    721729                        return true;
    722730
    723731                case SDL_MOUSEBUTTONUP:
     
    731739                        event->mouse.y = ev.button.y;
    732740                        event->mouse.x /= _scaleFactor;
    733741                        event->mouse.y /= _scaleFactor;
     742
     743                        if (_aspect_ratio)
     744                                event->mouse.y = UnAspect(event->mouse.y);
     745
    734746                        return true;
    735747
    736748                case SDL_JOYBUTTONDOWN:
     
    835847                        event->mouse.y = km.y;
    836848                        event->mouse.x /= _scaleFactor;
    837849                        event->mouse.y /= _scaleFactor;
     850
     851                        if (_aspect_ratio)
     852                                event->mouse.y = UnAspect(event->mouse.y);
     853
    838854                        return true;
    839855
    840856                case SDL_VIDEOEXPOSE:
  • scummvm/backends/sdl/sdl-common.h

    diff -ur ScummVM+orig/scummvm/backends/sdl/sdl-common.h ScummVM+hack/scummvm/backends/sdl/sdl-common.h
    old new  
    123123        virtual int16 RGBToColor(uint8 r, uint8 g, uint8 b);
    124124        virtual void colorToRGB(int16 color, uint8 &r, uint8 &g, uint8 &b);
    125125
    126         static OSystem *create(int gfx_mode, bool full_screen);
     126        static OSystem *create(int gfx_mode, bool full_screenm, bool aspect_ratio);
    127127
    128128protected:
    129129        OSystem_SDL_Common();
     
    131131
    132132        static OSystem_SDL_Common *create_intern();
    133133
    134         void init_intern(int gfx_mode, bool full_screen);
     134        void init_intern(int gfx_mode, bool full_screen, bool aspect_ratio);
    135135
    136136        // unseen game screen
    137137        SDL_Surface *_screen;
     
    142142        int _tmpScreenWidth;
    143143        bool _overlayVisible;
    144144
     145        bool _aspect_ratio;
     146
    145147        // CD Audio
    146148        SDL_CD *_cdrom;
    147149        int cd_track, cd_num_loops, cd_start_frame, cd_end_frame;
  • scummvm/backends/sdl/sdl.cpp

    diff -ur ScummVM+orig/scummvm/backends/sdl/sdl.cpp ScummVM+hack/scummvm/backends/sdl/sdl.cpp
    old new  
    147147        //
    148148        // Create the surface that contains the scaled graphics in 16 bit mode
    149149        //
    150         _hwscreen = SDL_SetVideoMode(_screenWidth * _scaleFactor, _screenHeight * _scaleFactor, 16,
     150
     151        _hwscreen = SDL_SetVideoMode(_screenWidth * _scaleFactor, (_aspect_ratio ? 240 : _screenHeight) * _scaleFactor, 16,
    151152                _full_screen ? (SDL_FULLSCREEN|SDL_SWSURFACE) : SDL_SWSURFACE
    152153        );
    153154        if (_hwscreen == NULL)
    154155                error("_hwscreen failed");
    155        
     156
    156157        //
    157158        // Create the surface used for the graphics in 16 bit before scaling, and also the overlay
    158159        //
     
    192193                SDL_FreeSurface(_hwscreen);
    193194                _hwscreen = NULL;
    194195        }
    195        
     196
    196197        if (_tmpscreen) {
    197198                free(_tmpscreen->pixels);
    198199                SDL_FreeSurface(_tmpscreen);
     
    281282                uint32 srcPitch, dstPitch;
    282283                SDL_Rect *last_rect = _dirty_rect_list + _num_dirty_rects;
    283284
    284                 if (_scaler_proc == Normal1x) {
     285                if (_scaler_proc == Normal1x && !_aspect_ratio) {
    285286                        SDL_Surface *target = _overlayVisible ? _tmpscreen : _screen;
    286287                        for (r = _dirty_rect_list; r != last_rect; ++r) {
    287288                                dst = *r;
     
    314315                        for (r = _dirty_rect_list; r != last_rect; ++r) {
    315316                                register int dst_y = r->y + _currentShakePos;
    316317                                register int dst_h = 0;
     318                                register int orig_dst_y = 0;
     319
    317320                                if (dst_y < _screenHeight) {
    318321                                        dst_h = r->h;
    319322                                        if (dst_h > _screenHeight - dst_y)
    320323                                                dst_h = _screenHeight - dst_y;
    321324
    322                                                 dst_y *= _scaleFactor;
     325                                        dst_y *= _scaleFactor;
    323326
    324                                                 _scaler_proc((byte *)_tmpscreen->pixels + (r->x * 2 + 2) + (r->y + 1) * srcPitch, srcPitch,
     327                                        if (_aspect_ratio) {
     328                                                orig_dst_y = dst_y;
     329                                                dst_y = Aspect(dst_y);
     330                                        }
     331
     332                                        _scaler_proc((byte *)_tmpscreen->pixels + (r->x * 2 + 2) + (r->y + 1) * srcPitch, srcPitch,
    325333                                                (byte *)_hwscreen->pixels + r->x * 2 * _scaleFactor + dst_y * dstPitch, dstPitch, r->w, dst_h);
    326334                                }
    327                        
     335
    328336                                r->x *= _scaleFactor;
    329337                                r->y = dst_y;
    330338                                r->w *= _scaleFactor;
    331339                                r->h = dst_h * _scaleFactor;
    332                         }
    333340
     341                                if (_aspect_ratio && orig_dst_y / _scaleFactor < _screenHeight)
     342                                        r->h = Stretch240((uint8 *) _hwscreen->pixels, dstPitch, r->w, r->h, r->x, r->y, orig_dst_y);
     343                        }
    334344                        SDL_UnlockSurface(_tmpscreen);
    335345                        SDL_UnlockSurface(_hwscreen);
    336346                }
     
    339349                // This is necessary if shaking is active.
    340350                if (_forceFull) {
    341351                        _dirty_rect_list[0].y = 0;
    342                         _dirty_rect_list[0].h = _screenHeight * _scaleFactor;
     352                        _dirty_rect_list[0].h = (_aspect_ratio ? 240 : _screenHeight) * _scaleFactor;
    343353                }
    344354
    345355                // Finally, blit all our changes to the screen
     
    374384                hotswap_gfx_mode();
    375385
    376386                return 1;
     387        } else if (param == PROP_TOGGLE_ASPECT_RATIO) {
     388                if (_screenHeight == 200) {
     389                        assert(_hwscreen != 0);
     390                        _aspect_ratio ^= true;
     391                        hotswap_gfx_mode();
     392                }
    377393        }
    378394
    379395        return OSystem_SDL_Common::property(param, value);
  • scummvm/common/gameDetector.cpp

    diff -ur ScummVM+orig/scummvm/common/gameDetector.cpp ScummVM+hack/scummvm/common/gameDetector.cpp
    old new  
    5050        "Syntax:\n"
    5151        "\tscummvm [-v] [-d[<num>]] [-n] [-b<num>] [-t<num>] [-s<num>] [-p<path>] [-m<num>] [-f] game\n"
    5252        "Flags:\n"
    53         "\t-p<path>      - look for game in <path>\n"
    54         "\t-x[<num>]     - load this savegame (default: 0 - autosave)\n"
    55         "\t-f            - fullscreen mode\n"
    56         "\t-g<mode>      - graphics mode (normal,2x,3x,2xsai,super2xsai,supereagle,advmame2x,advmame3x,tv2x,dotmatrix)\n"
    57         "\t-e<mode>      - set music engine (see README for details)\n"
    58         "\t-a            - specify game is amiga version\n"
    59         "\t-q<lang>      - specify language (en,de,fr,it,pt,es,jp,zh,kr,hb)\n"
     53        "\t-p<path>       - look for game in <path>\n"
     54        "\t-x[<num>]      - load this savegame (default: 0 - autosave)\n"
     55        "\t-f             - fullscreen mode\n"
     56        "\t-g<mode>       - graphics mode (normal,2x,3x,2xsai,super2xsai,supereagle,advmame2x,advmame3x,tv2x,dotmatrix)\n"
     57        "\t-e<mode>       - set music engine (see README for details)\n"
     58        "\t-a             - specify game is amiga version\n"
     59        "\t-q<lang>       - specify language (en,de,fr,it,pt,es,jp,zh,kr,hb)\n"
    6060        "\n"
    61         "\t-c<num>       - use cdrom <num> for cd audio\n"
    62         "\t-m<num>       - set music volume to <num> (0-255)\n"
    63         "\t-o<num>       - set master volume to <num> (0-255)\n"
    64         "\t-s<num>       - set sfx volume to <num> (0-255)\n"
    65         "\t-t<num>       - set music tempo (50-200, default 100%%)\n"
     61        "\t-c<num>        - use cdrom <num> for cd audio\n"
     62        "\t-m<num>        - set music volume to <num> (0-255)\n"
     63        "\t-o<num>        - set master volume to <num> (0-255)\n"
     64        "\t-s<num>        - set sfx volume to <num> (0-255)\n"
     65        "\t-t<num>        - set music tempo (50-200, default 100%%)\n"
    6666        "\n"
    67         "\t-n            - no subtitles for speech\n"
    68         "\t-y            - set text speed (default: 60)\n"
     67        "\t-n             - no subtitles for speech\n"
     68        "\t-y             - set text speed (default: 60)\n"
    6969        "\n"
    70         "\t-l<file>      - load config file instead of default\n"
     70        "\t-l<file>       - load config file instead of default\n"
    7171#if defined(UNIX)
    72         "\t-w[<file>]    - write to config file [~/.scummvmrc]\n"
     72        "\t-w[<file>]     - write to config file [~/.scummvmrc]\n"
    7373#else
    74         "\t-w[<file>]    - write to config file [scummvm.ini]\n"
     74        "\t-w[<file>]     - write to config file [scummvm.ini]\n"
    7575#endif
    76         "\t-v            - show version info and exit\n"
    77         "\t-z            - display list of games\n"
     76        "\t-v             - show version info and exit\n"
     77        "\t-z             - display list of games\n"
    7878        "\n"
    79         "\t-b<num>       - start in room <num>\n"
    80         "\t-d[<num>]     - enable debug output (debug level [1])\n"
    81         "\t-u            - dump scripts\n"
     79        "\t-b<num>        - start in room <num>\n"
     80        "\t-d[<num>]      - enable debug output (debug level [1])\n"
     81        "\t-u             - dump scripts\n"
    8282        "\n"
    83         "\t--multi-midi  - enable combination Adlib and native MIDI\n"
    84         "\t--native-mt32 - true Roland MT-32 (disable GM emulation)\n"
     83        "\t--multi-midi   - enable combination Adlib and native MIDI\n"
     84        "\t--native-mt32  - true Roland MT-32 (disable GM emulation)\n"
     85        "\t--aspect-ratio - enable aspect ratio correction\n"
    8586;
    8687#endif
    8788// This contains a pointer to a list of all supported games.
     
    148149
    149150GameDetector::GameDetector() {
    150151        _fullScreen = false;
     152        _aspectRatio = false;
    151153
    152154        _use_adlib = false;
    153155
     
    245247                }
    246248
    247249        _fullScreen = g_config->getBool("fullscreen", _fullScreen);
     250        _aspectRatio = g_config->getBool("aspect_ratio", _aspectRatio);
    248251
    249252        if ((val = g_config->get("gfx_mode")))
    250253                if ((_gfx_mode = parseGraphicsMode(val)) == -1) {
     
    453456                                } else if (!strcmp (s, "native-mt32")) {
    454457                                        _native_mt32 = true;
    455458                                        g_config->setBool ("native_mt32", true);
     459                                } else if (!strcmp (s, "aspect-ratio")) {
     460                                        _aspectRatio = true;
     461                                        g_config->setBool ("aspect_ratio", true);
    456462                                } else {
    457463                                        goto ShowHelpAndExit;
    458464                                }
     
    673679        return OSystem_PALMOS_create(_gfx_mode);
    674680#else
    675681        /* SDL is the default driver for now */
    676         return OSystem_SDL_create(_gfx_mode, _fullScreen);
     682        return OSystem_SDL_create(_gfx_mode, _fullScreen, _aspectRatio);
    677683#endif
    678684}
    679685
  • scummvm/common/gameDetector.h

    diff -ur ScummVM+orig/scummvm/common/gameDetector.h ScummVM+hack/scummvm/common/gameDetector.h
    old new  
    110110        const String& getGameName(void);
    111111       
    112112        bool _fullScreen;
     113        bool _aspectRatio;
    113114
    114115        bool _use_adlib;
    115116
  • scummvm/common/scaler.cpp

    diff -ur ScummVM+orig/scummvm/common/scaler.cpp ScummVM+hack/scummvm/common/scaler.cpp
    old new  
    632632                q += nextlineDst << 1;
    633633        }
    634634}
     635
     636// Stretch an image to te correct aspect-ratio.
     637//
     638// The image would normally have occupied Y coordinates origSrcY through
     639// origSrcY + height - 1.
     640//
     641// However, we have already placed it at srcY - the aspect-corrected Y
     642// coordinate - to allow in-site stretching.
     643//
     644// Therefore, the source image now occupies Y coordinates srcY through
     645// srcY + height - 1, and it should be stretched to Y coordinates srcY
     646// through Aspect(srcY + height - 1).
     647
     648// FIXME: Implement bilinear filtering instead of stupid pixel doubling?
     649//
     650// The theory of bilinear filtering:
     651//
     652// For each destination pixel, calculate its exact scaled position in the
     653// source image. It is unlikely that it will correspond to any one picture
     654// so its colour is interpolated from the four surrounding pixels, like so:
     655//
     656//    c0| fx      |c1
     657//    --+-----+---+--
     658//      |     |   |
     659//    fy|     |   |
     660//      +-----X   |
     661//      |         |
     662//    --+---------+--
     663//    c2|         |c3
     664//
     665// The colour c at X is
     666//
     667//    c = c0 * (1-fx) * (1-fy)
     668//      + c1 * fx * (1-fy)
     669//      + c2 * (1-fx) * fy
     670//      + c3 * fx * fy
     671//
     672// We only stretch the height so fx is always 0, which leads to the following,
     673// simplified formula:
     674//
     675//    c = c0 * (1-fy)
     676//      + c2 * fy
     677//
     678// And it should be possible to pre-calculate fy as well, since the image is
     679// always stretched to the same proportions.
     680
     681int Stretch240(uint8 *buf, uint32 pitch, int width, int height, int srcX, int srcY, int origSrcY) {
     682        int maxDstY = Aspect(origSrcY + height - 1);
     683        int off = srcY - origSrcY;
     684        int y;
     685
     686        uint8 *dstPtr = buf + srcX * 2 + maxDstY * pitch;
     687
     688        for (y = maxDstY; y >= srcY; y--) {
     689                uint8 *srcPtr = buf + srcX * 2 + (UnAspect(y) + off) * pitch;
     690
     691                if (srcPtr == dstPtr)
     692                        break;
     693
     694                memcpy(dstPtr, srcPtr, width * 2);
     695                dstPtr -= pitch;
     696        }
     697
     698        return 1 + maxDstY - srcY;
     699}
  • scummvm/common/scaler.h

    diff -ur ScummVM+orig/scummvm/common/scaler.h ScummVM+hack/scummvm/common/scaler.h
    old new  
    4141DECLARE_SCALER(TV2x);
    4242DECLARE_SCALER(DotMatrix);
    4343
     44FORCEINLINE int Aspect(int y) {
     45        return y + (y + 1) / 5;
     46}
     47
     48FORCEINLINE int UnAspect(int y) {
     49        return (y * 5 + 3) / 6;
     50}
     51
     52extern int Stretch240(uint8 *buf, uint32 pitch, int width, int height, int srcX, int srcY, int origSrcY);
    4453
    4554enum {
    4655        GFX_NORMAL = 0,
  • scummvm/common/system.h

    diff -ur ScummVM+orig/scummvm/common/system.h ScummVM+hack/scummvm/common/system.h
    old new  
    9494                PROP_GET_SAMPLE_RATE = 6,
    9595                PROP_GET_FULLSCREEN = 7,
    9696                PROP_GET_FMOPL_ENV_BITS = 8,
    97                 PROP_GET_FMOPL_EG_ENT = 9
     97                PROP_GET_FMOPL_EG_ENT = 9,
     98                PROP_TOGGLE_ASPECT_RATIO = 10
    9899        };
    99100        union Property {
    100101                const char *caption;
     
    363364/* Factory functions. This means we don't have to include the headers for
    364365 * all backends.
    365366 */
    366 extern OSystem *OSystem_SDL_create(int gfx_driver, bool full_screen);
     367extern OSystem *OSystem_SDL_create(int gfx_driver, bool full_screen, bool aspect_ratio);
    367368extern OSystem *OSystem_NULL_create();
    368369extern OSystem *OSystem_MorphOS_create(int game_id, int gfx_driver, bool full_screen);
    369370extern OSystem *OSystem_Dreamcast_create();