open mini netbook
Would you like to react to this message? Create an account in a few clicks or log in to continue.
open mini netbook

open project of mini netbook, 7'' ARM netbook


You are not connected. Please login or register

DOSbox on Anyka?

Go down  Message [Page 1 of 1]

1DOSbox on Anyka? Empty DOSbox on Anyka? Sat 23 Oct 2010 - 22:12

ppeterka


Youngling
Youngling

Hi All!

I've been trying in the last couple of days to get some kind of DOSbox running on my Allfine 703, but no success so far...

I tried pckdos and n0p's PocketPC port of DOSbox 0.73. Pckdos in short terms: no success...

n0p's PPC DOSbox (available: n0p's homepage ) did start after installing GAPI for HPCs (available: WinCESoft homepage, could only work in emulation mode, but even that would be a great step...), but I could only get a scrambled screen. The command prompt however is working, if I blind type 'exit', it exits, and 'dir' does make something (scrambledness changes on the screen).

I'd like to do it, because this little machine would be perfect to play some oldie DOS games Smile

I'm desperate enough that I started to look around to get a compiler to be able to compile for WinCE, but even that does not seem to be too easy, and since I don't have any experience in porting software to ARM/WinCE, this is the easiest of the steps...

Ideas, anyone?

Edit:
I'm trying to set up a cross-compiling setup to be able to tinker with this one... Any Cygwin+CeGCC experts here? Would be sooooo cool to play all the classics...

Edit2:
I managed to set up a CeGCC compiler under Cygwin, and now I'm trying to get n0p's DOSBox compiled... Don't hold your breath until I get it to compile OK, but I think it's worth the pain. Smile Hold on!

http://ppeterka.net16.net

2DOSbox on Anyka? Empty Re: DOSbox on Anyka? Sat 30 Oct 2010 - 9:40

ppeterka


Youngling
Youngling

This post will be about how to set up CeGCC and SDL which I try to use to compile DOSBox. Sort of a guide, even for myself not to forget what I!ve been through... I!m used to very comfortable development environments, and this is a little bit rougher experience.

Cygwin page
Just install it, but be careful to add GCC, MAKE, and the needed libraries... (I added all, just to be sure...)

CeGCC project page
I'm trying to use 0.59.1, it is the newest (2010-10-30).
It comes in a tar.bz2 format, and though it is tempting to unpack it using windows and put it into /opt of the cygwin install dir, but don't do that... It will corrupt the symlinks, and arm-mingw32ce-gcc won't work...

Rather than that, copy the .tar.bz2 to the /opt of Cygwin install dir, and unpack it using tar -jxvf <filename>

Don't forget to add cegcc dirs to the path: (TODO: add example)

SDL instructions:
CeGCC and SDL
This installs SDL 1.2.6, which is not the newest, but CeGCC only works with 1.2.X versions, and currently I seem to be able to use it. Download the script and run it in an empty directory.

To make everything appear in one place, I copy the script here, but it is from the page mentioned above!

Code:

wget http://www.libsdl.org/release/SDL-1.2.6.tar.gz
tar -zxf SDL-1.2.6.tar.gz
cd SDL-1.2.6
wget http://users.uoa.gr/~knakos/scummvm/libraries/libsdl_20070610_diff
patch -p0 < libsdl_20070610_diff
cat Makefile | sed -e 's/arm-wince-pe/arm-mingw32ce/' > Makefile2
mv Makefile2 Makefile
make
sudo cp libSDL.lib /opt/mingw32ce/arm-mingw32ce/lib/
cd ..
rm SDL-1.2.6.tar.gz
rm -r SDL-1.2.6
wget http://users.uoa.gr/~knakos/scummvm/libraries/release-0-10-0/wince-gcc-libs.tar.bz2
tar -jxf wince-gcc-libs.tar.bz2
cd libs/include
sudo cp -r sdl /opt/mingw32ce/arm-mingw32ce/include/
cd ../..
rm -r libs
rm wince-gcc-libs.tar.bz2


Some things to change after that:
- sdl-config: the script on the quoted page doesn't make any. Put this into /opt/mingw32ce/arm-mingw32ce/bin/sdl-config (don't forget to make it executable, eg. chmod 777 sdl-config after saving):
Code:

#!/bin/sh

prefix=/opt/mingw32ce/arm-mingw32ce
exec_prefix=${prefix}
exec_prefix_set=no

usage="\
Usage: sdl-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--cflags] [--libs] [--static-libs]"

if test $# -eq 0; then
      echo "${usage}" 1>&2
      exit 1
fi

while test $# -gt 0; do
  case "$1" in
  -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  *) optarg= ;;
  esac

  case $1 in
    --prefix=*)
      prefix=$optarg
      if test $exec_prefix_set = no ; then
        exec_prefix=$optarg
      fi
      ;;
    --prefix)
      echo $prefix
      ;;
    --exec-prefix=*)
      exec_prefix=$optarg
      exec_prefix_set=yes
      ;;
    --exec-prefix)
      echo $exec_prefix
      ;;
    --version)
      echo 1.2.6
      ;;
    --cflags)
      echo -I${prefix}/include/SDL  -Dmain=SDL_main

      # The portable way of including SDL is #include "SDL.h"
      #if test ${prefix}/include != /usr/include ; then
      #    # Handle oddities in Win32 path handling (assumes prefix)
      #    prefix=`echo ${prefix} | sed 's,^//\([A-Z]\),\1:,'`
      #
      #    includes=-I${prefix}/include
      #fi
      #echo $includes -I${prefix}/include/SDL  -Dmain=SDL_main
      ;;
    --libs)
      libdirs="-L${exec_prefix}/lib "
      echo $libdirs -lSDL
      ;;
    --static-libs)
#    --libs|--static-libs)
      libdirs="-L${exec_prefix}/lib "
      echo $libdirs -lSDL  -luser32 -lgdi32 -lwinmm
      ;;
    *)
      echo "${usage}" 1>&2
      exit 1
      ;;
  esac
  shift
done

- copy header files to the correct path: /opt/mingw32ce/arm-mingw32ce/include

DOSBox
Download the sources from n0p's page. I downloaded both, the clean and the CVS version too. The CVS version has a lot of useful things: autogen script, configure scripts, etc...

Compiling
Run autogen.sh, then edit config.h, and comment the line #define DB_HAVE_NO_POWF 1 (It seems that we do have a powf call).
Now run ./configure --host=arm-mingw32ce --with-sdl-prefix=/opt/mingw32ce/arm-mingw32ce

This generates the makefiles.

Running make now results in an error regarding the fileno() function, because in the stdio.h in directory /opt/mingw32ce/arm-mingw32ce/include has a definition with void* return type, which does give an error. This might give problems later, but I changed all of them (even _fileno() definitions!) to int, and now it goes beyond that...

So bad, I'm a Java developer, I'm sure otherwise my very own brew DOSbox would be up and running by now...

Now run make.

<Progress is here - I'm stuck for now, the steps after this are theoretical...>

Run make install



Last edited by ppeterka on Mon 1 Nov 2010 - 10:42; edited 1 time in total

http://ppeterka.net16.net

3DOSbox on Anyka? Empty Re: DOSbox on Anyka? Sat 30 Oct 2010 - 9:41

ppeterka


Youngling
Youngling

ppeterka wrote:Now run make.

One error down - more to come Smile don't worry, I'll learn how to use a source-code sword to fight them all (and who learns how to use a sword properly, I assume will become a Knight Smile )

Update (2010-11-01 14:00): it seems that I missed the fact that n0p also tinkered with the SDL sources, and added some wrapper functions like _GetGAPIBuffer... It is documented here: http://n0p.tonych.info/?Sources

I'll try to synchronize the scummvm-cegcc patched SDL with this one. Probably I should set up a CVS for this thing, it is starting to get out of my hands...



Last edited by ppeterka on Mon 1 Nov 2010 - 13:00; edited 2 times in total (Reason for editing : Updated progress)

http://ppeterka.net16.net

Sponsored content



Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum