This repository has been archived by the owner on Apr 18, 2024. It is now read-only.
forked from libretro/dosbox-svn
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- restore files from upstream - enable dynarecs - new makefiles - bake-in SDL - refine core options - add SVN_VERSION - add more granularity to core options - proper config file saving - add SDL_net for Android - fix disney sound system - allow baking in SDL in more platforms - use dynrec instead of dynamic_x86 on linux
- Loading branch information
1 parent
238b428
commit 4774c16
Showing
862 changed files
with
273,830 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,114 @@ | ||
## DOSBox-SVN libretro | ||
|
||
Upstream port of DOSBox to libretro. | ||
|
||
### Keeping up-to-date | ||
Clone the repo from the svn upstream: | ||
|
||
```bash | ||
git svn clone svn://svn.code.sf.net/p/dosbox/code-0/dosbox/ dosbox-svn | ||
``` | ||
|
||
This takes a few hours. Then add a remote for the git repo: | ||
|
||
```bash | ||
cd dosbox-svn | ||
git remote add origin https://github.com/fr500/dosbox-svn.git --> replace this with your repo URL if you're working in a fork | ||
git fetch | ||
git checkout master | ||
git svn rebase | ||
``` | ||
Switch to libretro branch and work there instead, don't make any changes to master: | ||
|
||
``` | ||
git checkout libretro | ||
git rebase master | ||
``` | ||
|
||
Do your work, resolve conflicts if any, and then: | ||
```bash | ||
git push --force | ||
``` | ||
|
||
### Compilation | ||
So far it's compiling on Windows, Linux, Android and OSX. | ||
####Requirements | ||
- SDL1.2 | ||
- SDL_net | ||
To build on Windows we recommend MSYS2 (https://www.msys2.org/). | ||
Install MSYS2, and follow these instructions: | ||
#### Update Environment | ||
Start the MSYS2 shell and run: | ||
```bash | ||
pacman --noconfirm -Sy | ||
pacman --needed --noconfirm -S bash pacman pacman-mirrors msys2-runtime | ||
``` | ||
Restart MSYS2 and run: | ||
```bash | ||
pacman --noconfirm -Su | ||
``` | ||
#### Install the Toolchain | ||
For 32-bit builds run: | ||
```bash | ||
pacman -S --noconfirm --needed wget git make mingw-w64-i686-toolchain mingw-w64-i686-ntldd mingw-w64-i686-zlib mingw-w64-i686-pkg-config mingw-w64-i686-SDL2 mingw-w64-i686-SDL mingw-w64-i686-SDL_net | ||
``` | ||
For 64-bit builds run: | ||
```bash | ||
pacman -S --noconfirm --needed wget git make mingw-w64-x86_64-toolchain mingw-w64-x86_64-ntldd mingw-w64-x86_64-zlib mingw-w64-x86_64-pkg-config mingw-w64-x86_64-SDL2 mingw-w64-x86_64-SDL mingw-w64-x86_64-SDL_net | ||
``` | ||
#### Building | ||
```bash | ||
cd libretro | ||
make -j4 | ||
``` | ||
If you want to enable the dynarec: | ||
```bash | ||
make -j8 WITH_DYNAREC=$ABI | ||
``` | ||
The valid ABI choices are `arm, oldarm, x86_64, x86, ppc, mips` | ||
The `x86_64` dynarec doesn't work on windows so far. For better performance x86 is recommended | ||
|
||
### Usage | ||
|
||
Use like normal DOSbox, you can load exe files or conf files directly. | ||
|
||
Cycle increase hot-keys **do-not-work**. Instead you should leverage *Core Options*. Refer to your libretro frontend documentation for reference on how to access these options. | ||
|
||
For GLIDE support (non-hw accelerated) use the glide branch. | ||
|
||
### Screenshots | ||
|
||
 | ||
 | ||
 | ||
 | ||
|
||
As with official DOSBox, Windows is not officially supported (but it works) | ||
|
||
 | ||
|
||
|
||
|
||
|
||
|
||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,154 @@ | ||
/* config.h. Generated from config.h.in by configure. */ | ||
/* config.h.in. Generated from configure.in by autoheader. */ | ||
|
||
|
||
/* | ||
* Copyright (C) 2002-2013 The DOSBox Team | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation; either version 2 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Library General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program; if not, write to the Free Software | ||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
*/ | ||
|
||
|
||
// ----- OS ! YOU MUST CHANGE THIS FOR THE BUILD PLATFORM | ||
/* #undef AC_APPLE_UNIVERSAL_BUILD */ | ||
/* #undef BSD */ | ||
/* #undef LINUX */ | ||
/* #undef MACOSX */ | ||
/* #undef OS2 */ | ||
|
||
#ifdef __WIN32__ | ||
# define WIN32 1 | ||
#else | ||
//# define MACOSX 1 | ||
#endif | ||
|
||
// ----- RECOMPILER ! YOU MUST CHANGE THIS FOR THE BUILD PLATFORM | ||
#ifndef __POWERPC__ | ||
/* #undef C_DYNAMIC_X86 */ /* Define to 1 to use x86 dynamic cpu core */ | ||
/* #undef C_DYNREC */ /* Define to 1 to use recompiling cpu core. Can not be used together with the dynamic-x86 core */ | ||
/* #undef C_FPU_X86 */ /* Define to 1 to use a x86 assembly fpu core */ | ||
/* #undef C_TARGETCPU */ /* The type of cpu this target has */ | ||
#endif | ||
|
||
#define C_UNALIGNED_MEMORY 1 /* Define to 1 to use a unaligned memory access */ | ||
|
||
// ----- DOSBOX CORE FEATURES: Many of these probably won't work even if you enable them | ||
#define C_FPU 1 /* Define to 1 to enable floating point emulation */ | ||
/* #undef C_CORE_INLINE */ /* Define to 1 to use inlined memory functions in cpu core */ | ||
/* #undef C_DIRECTSERIAL */ /* Define to 1 if you want serial passthrough support (Win32, Posix and OS/2). */ | ||
/* #undef C_IPX */ /* Define to 1 to enable IPX over Internet networking, requires SDL_net */ | ||
/* #undef C_MODEM */ /* Define to 1 to enable internal modem support, requires SDL_net */ | ||
/* #undef C_SDL_SOUND */ /* Define to 1 to enable SDL_sound support */ | ||
|
||
// ----- HEADERS: Define if headers exist in build environment | ||
#define HAVE_INTTYPES_H 1 | ||
#define HAVE_MEMORY_H 1 | ||
#define HAVE_NETINET_IN_H 1 | ||
#define HAVE_STDINT_H 1 | ||
#define HAVE_STDLIB_H 1 | ||
#define HAVE_STRINGS_H 1 | ||
#define HAVE_STRING_H 1 | ||
#define HAVE_SYS_SOCKET_H 1 | ||
#define HAVE_SYS_STAT_H 1 | ||
#define HAVE_SYS_TYPES_H 1 | ||
#define HAVE_UNISTD_H 1 | ||
|
||
#if !defined(__WIN32__) && !defined(__POWERPC__) && !defined(VITA) && !defined(_3DS) | ||
# define HAVE_PWD_H 1 | ||
#endif | ||
|
||
// ----- STANDARD LIBRARY FEATURES | ||
#ifndef __QNX__ | ||
#define DIRENT_HAS_D_TYPE 1 /* struct dirent has d_type */ | ||
#endif | ||
/* #undef DB_HAVE_NO_POWF */ /* libm doesn't include powf */ | ||
/* #undef TM_IN_SYS_TIME */ /* Define to 1 if your <sys/time.h> declares `struct tm'. */ | ||
/* #undef size_t */ /* Define to `unsigned int' if <sys/types.h> does not define. */ | ||
/* #undef socklen_t */ /* Define to `int` if you don't have socklen_t */ | ||
|
||
// ----- COMPILER FEATURES | ||
#define C_ATTRIBUTE_ALWAYS_INLINE 1 | ||
#define C_HAS_ATTRIBUTE 1 | ||
#define C_HAS_BUILTIN_EXPECT 1 | ||
/* #undef C_ATTRIBUTE_FASTCALL */ | ||
|
||
|
||
|
||
/////////////////// | ||
|
||
/* Version number of package */ | ||
#define VERSION "SVN-libretro" | ||
|
||
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most | ||
significant byte first (like Motorola and SPARC, unlike Intel). */ | ||
#if defined AC_APPLE_UNIVERSAL_BUILD | ||
# if defined __BIG_ENDIAN__ | ||
# define WORDS_BIGENDIAN 1 | ||
# endif | ||
#else | ||
# ifndef WORDS_BIGENDIAN | ||
/* # undef WORDS_BIGENDIAN */ | ||
# endif | ||
#endif | ||
|
||
/* Define to empty if `const' does not conform to ANSI C. */ | ||
/* #undef const */ | ||
|
||
/* Define to `__inline__' or `__inline' if that's what the C compiler | ||
calls it, or to nothing if 'inline' is not supported under any name. */ | ||
#ifndef __cplusplus | ||
/* #undef inline */ | ||
#endif | ||
|
||
#ifndef INLINE | ||
#if C_ATTRIBUTE_ALWAYS_INLINE | ||
#define INLINE inline __attribute__((always_inline)) | ||
#else | ||
#define INLINE inline | ||
#endif | ||
#endif | ||
|
||
#if C_ATTRIBUTE_FASTCALL | ||
#define DB_FASTCALL __attribute__((fastcall)) | ||
#else | ||
#define DB_FASTCALL | ||
#endif | ||
|
||
#if C_HAS_ATTRIBUTE | ||
#define GCC_ATTRIBUTE(x) __attribute__ ((x)) | ||
#else | ||
#define GCC_ATTRIBUTE(x) /* attribute not supported */ | ||
#endif | ||
|
||
#if C_HAS_BUILTIN_EXPECT | ||
#define GCC_UNLIKELY(x) __builtin_expect((x),0) | ||
#define GCC_LIKELY(x) __builtin_expect((x),1) | ||
#else | ||
#define GCC_UNLIKELY(x) (x) | ||
#define GCC_LIKELY(x) (x) | ||
#endif | ||
|
||
#include <stdint.h> | ||
typedef double Real64; | ||
typedef uint8_t Bit8u; | ||
typedef int8_t Bit8s; | ||
typedef uint16_t Bit16u; | ||
typedef int16_t Bit16s; | ||
typedef uint32_t Bit32u; | ||
typedef int32_t Bit32s; | ||
typedef uint64_t Bit64u; | ||
typedef int64_t Bit64s; | ||
typedef uintptr_t Bitu; | ||
typedef intptr_t Bits; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,7 +21,7 @@ | |
|
||
#if C_IPX | ||
|
||
#include "SDL_net.h" | ||
#include <SDL/SDL_net.h> | ||
|
||
struct packetBuffer { | ||
Bit8u buffer[1024]; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
include Makefile.libretro |
Oops, something went wrong.