Compiled Hatari?

A forum about the Hatari ST/STE/Falcon emulator - the current version is v2.1.0

Moderators: simonsunnyboy, thothy, Moderator Team

User avatar
Gryzor
Gryzorator
Gryzorator
Posts: 1560
Joined: Wed Jun 05, 2002 8:36 am
Location: Athens, Greece
Contact:

Compiled Hatari?

Postby Gryzor » Thu Oct 23, 2003 7:44 am

Does anyone have /can anyone compile a win version of Hatari for me? Where I am I have no devel tools to do it myself...

Cheers
Gryzor
Reality is that, which, when you stop believing in it, doesn't go away. --P.K.Dick

.:.
http://gryzor.info

Image

User avatar
simonsunnyboy
Moderator
Moderator
Posts: 5039
Joined: Wed Oct 23, 2002 4:36 pm
Location: Friedrichshafen, Germany
Contact:

Postby simonsunnyboy » Thu Oct 23, 2003 11:18 am

You could try to install MingW. At least SDL programs compile with that for Win but I don't know about zLib support.

Why not use a real OS anyway? ;)

Hatari still has not all the features of Winston v0.5 so I personally wouldn't see a need to build a Win port of it. There are better emulators for Win anyway.
Simon Sunnyboy/Paradize - http://paradize.atari.org/

Stay cool, stay Atari!

1x2600jr, 1x1040STFm, 1x1040STE 4MB+TOS2.06+SatanDisk, 1xF030 14MB+FPU+NetUS-Bee

User avatar
Gryzor
Gryzorator
Gryzorator
Posts: 1560
Joined: Wed Jun 05, 2002 8:36 am
Location: Athens, Greece
Contact:

Postby Gryzor » Thu Oct 23, 2003 11:32 am

Ah thanks for the heads-up, didn't think about going GNU for Win... I'll try that. Dunno about zlib support either, but maybe we can live without that?

As for why I wanna try Hatari out... just for the heck of it, you know, to be able to say "got that too" :D Can't hurt much!

Cheers
Gryzor

PS A real OS, yess... but I can only use bootable CDs to run any Linux distros where I am -even dual-boot is not an option due to security issues (working in an army HQ IT office right now...). Ah well...
Reality is that, which, when you stop believing in it, doesn't go away. --P.K.Dick

.:.
http://gryzor.info

Image

User avatar
manicx
Atari Super Hero
Atari Super Hero
Posts: 642
Joined: Thu Jan 30, 2003 12:58 pm
Location: Athens, Greece

Postby manicx » Thu Oct 23, 2003 12:00 pm

In the pentagon eh? Just a few meters away of where I live. You should visit someday for some ST fun. Irrelevant to the topic, but you got it...
Image

User avatar
simonsunnyboy
Moderator
Moderator
Posts: 5039
Joined: Wed Oct 23, 2002 4:36 pm
Location: Friedrichshafen, Germany
Contact:

Postby simonsunnyboy » Thu Oct 23, 2003 1:07 pm

zLib support is needed for using zipped diskimages, both pkzip and gzip.
And as far as I know the sourcecode of Hatari, zlib is not a configurable option at compile time. It is just needed.
I'd suggest mailing thothy and asking him about the subject. He managed to compile it for Mint, so why should a Win port be impossible?
If you make it work, could you please debug the "print to file" option? I implemented it for Unix systems and it seems to work under Linux. It is optimized for that but it shouldn't be too hard to make it work under Win too. All calls are pure ANSI C.
If there is anything you want to know about Hatari, just ask ;)
It currently is my favourite ST emulator.

Hey, 1 year membership ;) Let's celebrate 8)
Simon Sunnyboy/Paradize - http://paradize.atari.org/

Stay cool, stay Atari!

1x2600jr, 1x1040STFm, 1x1040STE 4MB+TOS2.06+SatanDisk, 1xF030 14MB+FPU+NetUS-Bee

User avatar
thothy
Hatari Developer
Hatari Developer
Posts: 426
Joined: Fri Jul 25, 2003 9:36 am
Location: Germany
Contact:

Postby thothy » Thu Oct 23, 2003 3:02 pm

simonsunnyboy wrote:zLib support is needed for using zipped diskimages, both pkzip and gzip.
And as far as I know the sourcecode of Hatari, zlib is not a configurable option at compile time. It is just needed.
I'd suggest mailing thothy and asking him about the subject. He managed to compile it for Mint, so why should a Win port be impossible?


The zLib has become a very common library, I am 100% sure that there are also versions available for MingW and Cygwin etc. Hatari has already been compiled without problems on so many system (Linux, FreeBSD, NetBSD, BeOS, Mac OS X, MiNT, ...), so it must be a bug in Windows and not in Hatari if you can't compile it there ;-)

gwEm
Captain Atari
Captain Atari
Posts: 193
Joined: Tue Jun 08, 2004 4:43 pm
Location: London, UK
Contact:

Postby gwEm » Tue Jul 27, 2004 1:19 pm

i'm using mingw/msys to compile hatari in win32

having problems due to the lack of glob functions in the libraries... however i will solve these little problems.

G

gwEm
Captain Atari
Captain Atari
Posts: 193
Joined: Tue Jun 08, 2004 4:43 pm
Location: London, UK
Contact:

Postby gwEm » Wed Sep 22, 2004 12:02 pm

some progress on this, but not much - i didn't look at it for some time.

now using cygwin to compile, we get further:

had to modify the makefile configuration file to remove the -mno-cygwin switch... need cygwin.dll then, but who cares? this means we have more C libraries, including glob.

problem now is that cygwin appears to use a reduced functionality version of glob.

i'll look in to it some more another time

gwEm
Captain Atari
Captain Atari
Posts: 193
Joined: Tue Jun 08, 2004 4:43 pm
Location: London, UK
Contact:

Postby gwEm » Wed Sep 22, 2004 12:19 pm

i looked into it some more anyway...

added extra #def to cygwin's glob.h

now compilation is throwing errors due to

mkfile, scandir and alphasort

in gemdos.c - looks like hatari intercepts the GEMDOS file handling calls and uses UNIX ones instead.

i assume these are in C libraries somewhere which are different or not present in cygwin... however this is where the limit of my knowledge on this one ends.

i think we can get this working pretty easily, but i can need some more input now.

G

User avatar
thothy
Hatari Developer
Hatari Developer
Posts: 426
Joined: Fri Jul 25, 2003 9:36 am
Location: Germany
Contact:

Postby thothy » Wed Sep 22, 2004 7:53 pm

Hi there!

I am curios, what extra #define did you have to add to cygwin's glob.h?

Concerning scandir and alphasort, there are already some replacement functions in file.c for BeOS and SunOS, simply add WIN32 or so there, too.

I don't know about "mkfile" - I can't find that function call in gemdos.c.

BTW: As long as only gemdos.c is making problems, you can safely comment out the problematic code lines there for a quick-n-dirty test build of Hatari. GEMDOS hard disc emulation won't work of course, but you don't need that for running the rest of the emulation.

gwEm
Captain Atari
Captain Atari
Posts: 193
Joined: Tue Jun 08, 2004 4:43 pm
Location: London, UK
Contact:

Postby gwEm » Thu Sep 23, 2004 10:40 am

i got significantly further trying to compile hatari with CYGWIN with morning.

now i have some problems with compiling the cpu core, specifically build68k.c, but thats a problem for another day. getting serveral undefined references in ccIkTMiy.o

anyway, although i'm pushing my UNIX and C knowledge to the limits, progress has been good - so i guess hatari has been very portably written. i'm confident of getting hatari working on win32.

changes so far:

    * glob.h - #define GLOB_ONLYDIR - not present in cygwin

    * gemdos.c - removed file permissions argument from mkdir - not possible in cygwin

    * file.h - enabled alphasort and scandir for WIN32 (thanks for the tip thothy!)

    * file.h - #include <sys/cdefs.h> - for the __P macro

    * file.c - enabled alphasort and scandir for WIN32

    * file.c - commented out two references to dirent struct which if different in cygwin - the only real hack so far, and I think this can be done nicely later

    * file.c - #defined a macro for bcopy - not present in cygwin, a usual change according to cygwin mailing lists


also, not a problem with the compile - but i accidently deleted zip.c ;) this caused me a puzzle for a few minutes until i worked it out...

User avatar
Shazz
Atari Super Hero
Atari Super Hero
Posts: 569
Joined: Wed Aug 27, 2003 9:27 am
Location: Crétin des Alpes dauphinoises

Postby Shazz » Sun Feb 06, 2005 9:54 am

Arf, a pity I did not read this thread before :D

So, in my little corner, I compiled Hatari with Mingw/WinXP, as Gwem saw, I had to get rid of some file I/O, RS232 and glob functions (so basically some features are disabled but who really cares of a RS232 emulation ?)

I did not replace the file I/O functions so the browser is not working but it is still possible to run disks from the command line.

I'll work on this with Thothy to have fully portable code (Hey Gwem, in which package can you find the glob thing ???)

So here is the archive containing the bin and required DLLs
F11 and F12 are the magic keys :D


Code: Select all

  printf("Usage:\n hatari [options] [disk image name]\n"
         "Where options are:\n"
         "  --help or -h          Print this help text and exit.\n"
         "  --version or -v       Print version number and exit.\n"
         "  --mono or -m          Start in monochrome mode instead of color.\n"
         "  --fullscreen or -f    Start emulator in fullscreen mode.\n"
         "  --window or -w        Start emulator in window mode.\n"
         "  --joystick or -j      Emulate a ST joystick with the cursor keys.\n"
         "  --nosound             Disable sound (faster!).\n"
         "  --printer             Enable printer support (experimental).\n"
         "  --midi <filename>     Enable midi support and write midi data to <filename>.\n"
         "  --frameskip           Skip every second frame (speeds up emulation!).\n"
         "  --debug or -D         Allow debug interface.\n"
         "  --harddrive <dir>     Emulate an ST harddrive\n"
         "     or -d <dir>         (<dir> = root directory).\n"
         "  --hdimage <imagename> Emulate an ST harddrive with an image.\n"
         "  --tos <file>          Use TOS image <file>.\n"
         "  --cartridge <file>    Use ROM cartridge image <file>.\n"
         "  --cpulevel <x>        Set the CPU type (x => 680x0) (TOS 2.06 only!).\n"
         "  --compatible          Use a more compatible (but slower) 68000 CPU mode.\n"
         "  --blitter             Enable blitter emulation (unstable!)\n"
         "  --vdi                 Use extended VDI resolution\n"
         "  --memsize <x>         Memory size in MB (x = 0, 1, 2 or 4; 0 for 512kB)\n"
         "  --configfile <file>   Use <file> instead of ~/.hatari.cfg as configuration\n"
         "     or -c <file>        file.\n"
         "  --slowfdc             Slow down FDC emulation (very experimental!).\n"
...8bits are enough...

User avatar
[ProToS]
Moderator
Moderator
Posts: 2242
Joined: Fri Sep 20, 2002 2:09 am
Location: Lourdes / France
Contact:

Postby [ProToS] » Sun Feb 06, 2005 5:18 pm

nice Shazz :) will try it when I got some time
SeeU
[ProToS]/Facebook

gwEm
Captain Atari
Captain Atari
Posts: 193
Joined: Tue Jun 08, 2004 4:43 pm
Location: London, UK
Contact:

Postby gwEm » Mon Feb 07, 2005 2:52 pm

cool shazz, as you might have guessed i lost time and interested in getting this working, as i just wanted to hack around with the ym2149 emulation.

i just added that one line to glob.h which i took from a i386 debian installation.

i know some c/unix stuff, but i am no expert so i was really at the end of my knowledge. i guess the real work starts now with merging the changes into the main hatari tree.

User avatar
Gryzor
Gryzorator
Gryzorator
Posts: 1560
Joined: Wed Jun 05, 2002 8:36 am
Location: Athens, Greece
Contact:

Postby Gryzor » Tue Feb 08, 2005 10:12 am

Ah, cool then! I'll try it tonight! Indeed a shame you hadn't read it before :)

Cheers
Gryzor
Reality is that, which, when you stop believing in it, doesn't go away. --P.K.Dick

.:.
http://gryzor.info

Image

User avatar
oesii
Captain Atari
Captain Atari
Posts: 163
Joined: Wed Mar 12, 2003 4:09 am
Location: Florida, USA
Contact:

Postby oesii » Tue Feb 08, 2005 11:34 am

Worked fine on my Windows2000 setup at work. Only tried it for a bit but it felt good since I use Hatari all the time on my Mac.

User avatar
Shazz
Atari Super Hero
Atari Super Hero
Posts: 569
Joined: Wed Aug 27, 2003 9:27 am
Location: Crétin des Alpes dauphinoises

Postby Shazz » Tue Feb 08, 2005 7:56 pm

Eh eh nice to see so much interest on the Win32 port !!!! Maybe I should work more on it to re-enable the features I simply get rid off in order to compile the stuff...

I'm sure it will motivate Thothy as it motivates me even if windows is not my targeted platform... ;-)

And good news, SDL will be available in a few days/weeks on the Sony PS2 so Hatari will be ported to Windows AND the PS2 !!!

Is there an other ST emulator so widely available ??? :D Nooooo !
...8bits are enough...

User avatar
thothy
Hatari Developer
Hatari Developer
Posts: 426
Joined: Fri Jul 25, 2003 9:36 am
Location: Germany
Contact:

Postby thothy » Mon Jan 30, 2006 6:13 pm

FYI: There is a new adaption of Hatari for Windows, this time done by Mark Keates. It is available at: http://www.mkeates.f9.co.uk/


Social Media

     

Return to “Hatari”

Who is online

Users browsing this forum: No registered users and 4 guests