VOGONS


Porting Dosbox in Solaris (Sparc/x86)

Topic actions

  • This topic is locked. You cannot reply or edit posts.

First post, by abhijit

User metadata
Rank Newbie
Rank
Newbie

Hi ,
I'm porting dosbox 0.72 in Solaris. I have made some minor changes in dosbox source file. So is it looks fine with you guys?
Pls. let me know your feedback.

The changes are :

--- dosbox-0.72/configure.in.orig Thu Aug 23 06:24:49 2007
+++ dosbox-0.72/configure.in Mon Feb 25 01:19:36 2008
@@ -371,6 +371,11 @@
AC_MSG_WARN([Can't find libSDL_sound, libSDL_sound support disabled])
fi

+dnl Check for -lsocket -lnsl
+
+AC_CHECK_FUNC(gethostent, , AC_CHECK_LIB(nsl, gethostent))
+AC_CHECK_FUNC(setsockopt, , AC_CHECK_LIB(socket, setsockopt))
+
dnl Check for mprotect. Needed for 64 bits linux
AH_TEMPLATE(C_HAVE_MPROTECT,[Define to 1 if you have the mprotect function])
AC_CHECK_HEADER([sys/mman.h], [
@@ -407,6 +412,9 @@
LIBS="$LIBS -framework AudioUnit"
AC_DEFINE(C_DIRECTSERIAL, 1, [ Define to 1 if you want serial passthrough support (Win32, Posix and OS/2).])
;;
+ *-*-solaris*)
+ AC_DEFINE(C_DIRECTSERIAL, 1, [ Define to 1 if you want serial passthrough support (Win32, Posix and OS/2).])
+ ;;
*-*-linux*)
AC_DEFINE(LINUX, 1, [Compiling on GNU/Linux])
AC_DEFINE(C_DIRECTSERIAL, 1, [ Define to 1 if you want serial passthrough support (Win32, Posix and OS/2).])
--- dosbox-0.72/src/hardware/serialport/directserial_posix.cpp.orig Sun Aug 26 13:19:46 2007
+++ dosbox-0.72/src/hardware/serialport/directserial_posix.cpp Mon Feb 25 01:16:56 2008
@@ -23,7 +23,7 @@
#if C_DIRECTSERIAL

// Posix version
-#if defined (LINUX) || defined (MACOSX)
+#if defined (LINUX) || defined (MACOSX) || defined (_sun)

#include "serialport.h"
#include "directserial_posix.h"

Reply 1 of 6, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Maybe use the 0.73 sources though 😀

For me the compilation process was as straightforward as for linux when
i tried it a good while ago, some keyboard issue (scancodes wrong) but
otherwise sort of working.

Feel free to keep us informed in this thread.

Reply 2 of 6, by abhijit

User metadata
Rank Newbie
Rank
Newbie

Thanks a lot for your reply.
I have already ported dosbox-0.73 in solaris both in sparc and x86. There is one issue of porting dosbox 0.73 in sparc. keyboard scancodes do not work well in default config in sparc. So i need to set 'usescancodes' to false in source code in case of sparc. Is it fine?

Reply 3 of 6, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

It's fine if you can assure that on a non-us keyboard everything works as
expected (sdl reports language-translated keycodes on some systems like
linux and always-us keycodes on others like windows).
The best-thing-to-do would of course be adding to the scancode mapping
in sdl_mapper.cpp (tables like sdlkey_map at the top of the file, and some
processing at the bottom).

Reply 4 of 6, by abhijit

User metadata
Rank Newbie
Rank
Newbie

Presently i'm doing it in a simple way. I'm checking system architecture in my Makefile and if i get 'sparc' then i'm applying a patch in dosbox source code. The patch is :

--- dosbox-0.73/src/gui/sdlmain.cpp.orig Mon Jun 8 14:26:37 2009
+++ dosbox-0.73/src/gui/sdlmain.cpp Mon Jun 8 14:27:13 2009
@@ -1515,7 +1515,7 @@
Pstring = sdl_sec->Add_path("mapperfile",Property::Changeable::Always,"mapper.txt");
Pstring->Set_help("File used to load/save the key/event mappings from.");

- Pbool = sdl_sec->Add_bool("usescancodes",Property::Changeable::Always,true);
+ Pbool = sdl_sec->Add_bool("usescancodes",Property::Changeable::Always,false);
Pbool->Set_help("Avoid usage of symkeys, might not work on all operating systems.");
}