Compiling Hatari 1.6.2 on Mac OS X

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

Moderators: Moderator Team, Hatari Development Team

darwinmac
Captain Atari
Captain Atari
Posts: 450
Joined: Sat Aug 06, 2011 2:49 pm
Location: San Jose, USA

Re: Compiling Hatari 1.6.2 on Mac OS X

Post by darwinmac »

Nativ,

It may be useful, but I do not know if anyone is willing to go to the extra effort to make a UB work on 10.4 (Tiger). I cannot speak for anyone else though. I still think getting a UB that works on 10.5 PPC through 10.8 Intel would be a great thing and it would allow us to finally have a downloadable binary on tuxfamily which would help out the many Mac users who come here looking for the latest Hatari binary.


Bob C
User avatar
frank.lukas
Hardware Guru
Hardware Guru
Posts: 2682
Joined: Tue Jan 29, 2008 5:33 pm
Location: Germany

Re: Compiling Hatari 1.6.2 on Mac OS X

Post by frank.lukas »

It must be two versions, one for the PPC user and one for the Intel user from 10.6 to 10.8 or 9 ...
fancy Atari Musik anDA Dance "Agare Hinu Harukana" 1998 ATARI http://www.youtube.com/watch?v=JX10fxb5eYE
darwinmac
Captain Atari
Captain Atari
Posts: 450
Joined: Sat Aug 06, 2011 2:49 pm
Location: San Jose, USA

Re: Compiling Hatari 1.6.2 on Mac OS X

Post by darwinmac »

frank.lukas wrote:It must be two versions, one for the PPC user and one for the Intel user from 10.6 to 10.8 or 9 ...
Actually, as long as 10.5 is the earliest supported version, jvernet has already created a Universal Binary that supports 10.5 PPC and 10.8 Intel. I am assuming the other Intel versions would be supported, but I do not have access to anything but 10.8.4. While there could be separate PPC and Intel versions, I do not see a problem with offering the one Universal Binary. Anyone who wants an Intel-only binary would be free to compile the source code himself or herself.


Bob C
sidechip
Atarian
Atarian
Posts: 5
Joined: Sat Jun 01, 2013 8:32 pm

Re: Compiling Hatari 1.6.2 on Mac OS X

Post by sidechip »

sidechip wrote:
darwinmac wrote: Eero is correct that the hatari-devel mailing list includes more of us that compile Hatari on OS X. However, I did try compiling using the ./configure, make method and my Hatari.app did work. I just ran it from the /src directory. I have Cmake 2.8.8 on my system. I am also running OS X 10.8.3.
Well, I'm hoping to compile Hatari because I want to use it as a simulator for doing data/address bus monitors to test prototype hardware that can be attached to the bus on real systems which would be memory mapped - i.e. memory-mapped custom hardware. I'd have to code this in the emulator first though. I'd like to use it as a base for teaching digital electronics and computer architecture.
Eero Tamminen wrote:It may be better if you subscribe to hatari-devel and ask this there. Hatari developers don't have Macs, but some other people on the hatari-devel mailing list do have.
Thanks. I'll check it out. I'd really like just a list of dependent packages to install and a set of instructions to follow to get it to compile.
...It looks like there's a problem with the "subscribe" to e-mail to <hatari-devel-request@lists.tuxfamily.org>...
Sorry, we were unable to deliver your message to the following address.

<hatari-devel-request@lists.tuxfamily.org>:
No MX or A records for lists.tuxfamily.org
...I'll have to try at a later date.


Is it possible for someone who compiles for OS X to do a set of instructions for compilation, including dependencies? I'd be really grateful for this.


The back-up plan is I run Linux on the Apples, possibly in virtual machines, ...I'll have to give it a go to check the performance. Though this is a bit of a barrier for useability.

For the real Ataris, I'd like to have an attached physical device that listens to the address and data busses (and any control lines necessary) at some specific address, which is a stack-based buffer... say, up to a 1KiB buffer, where data and/or commands can be loaded a word at a time '-(sp)'-style, then a final call (move.w instruction) to one specific address which triggers the hardware to act on the overheard data within the buffer. - Likewise, it could be a single word command with little or no data, depending on the command.

I've yet to investigate where to place it in the address-space, depending on the limitations of the MMU. If there's no address space which is MMU-friendly, it could very well be placed overlapping with RAM (it could effectively overhear any address), and if so, for added effect, we can read out also what we wrote in to the buffer, as it is also stored in RAM.

The simulator is all part of the plan for the software side of this.
darwinmac
Captain Atari
Captain Atari
Posts: 450
Joined: Sat Aug 06, 2011 2:49 pm
Location: San Jose, USA

Re: Compiling Hatari 1.6.2 on Mac OS X

Post by darwinmac »

sidechip wrote: ...It looks like there's a problem with the "subscribe" to e-mail to <hatari-devel-request@lists.tuxfamily.org>...
Sorry, we were unable to deliver your message to the following address.

<hatari-devel-request@lists.tuxfamily.org>:
No MX or A records for lists.tuxfamily.org
...I'll have to try at a later date.
I just used another one of my Gmail accounts to successfully subscribe and unsubscribe from the hatari-devel list. I assume you put "subscribe" (no quotation marks) in the subject line. You also have to reply to the first email. I am guessing you received the error before you ever received the first email though.
sidechip wrote: Is it possible for someone who compiles for OS X to do a set of instructions for compilation, including dependencies? I'd be really grateful for this.
Unfortunately, I gave you my dependencies and it did not help you. I do not remember if you tried compiling just by using the Unix approach of:
- make clean
- ./configure
- make

I was able to create a working Hatari binary this way. However, I did not see the OS X specific alerts (everything was in the default SDL look), the SDL framework was not embedded into the application package, and EmuTOS was not included in the package. It did work though.

I know that jvernet does have an account here. However, I think you will get more help on the hatari-devel list though. You can certainly try compiling from Linux. That is what the developers do.


Bob C
darwinmac
Captain Atari
Captain Atari
Posts: 450
Joined: Sat Aug 06, 2011 2:49 pm
Location: San Jose, USA

Re: Compiling Hatari 1.6.2 on Mac OS X

Post by darwinmac »

Sidechip,

I had to recently recreate my Xcode project in order to compile Hatari 1.7. These are the instructions that I created:

1. Run cmake -G Xcode from Terminal to generate the default Xcode project.
2. Drag tos.img (EmuTOS) into root level of Hatari Xcode project so it is included in the Hatari application bundle. Leave the Xcode defaults alone. Also, create a Copy Files build phase in the Hatari target. This is what actually copies the tos.img file to the Resources directory of the bundle. When you create the Copy Files build phase, you will need to select the Resources directory and drag the tos.img file from the file list to the Copy Files build phase.
3. Drag SDL.Framework from /Library/Frameworks to root level of Hatari Xcode project. Leave the Xcode defaults alone. To include the framework in the bundle, add "@loader_path/../Frameworks' to the Debug and Release options in the Runpath Search Paths. You find this section under Build Settings in the Linking section. Make sure the Hatari project is selected rather than any of the targets. Also, create a Copy Files build phase in the Hatari target. This is what actually copies the SDL.Framework to the Frameworks directory of the bundle. Note: Make sure you use SDL 1.2 and NOT SDL 2.0. To my knowledge, Hatari is not compatible with SDL 2.0.
4. To get the OS X alerts, add ALERT_HOOKS=1 in the Apple LLVM compiler 4.2 - Preprocessing section under Preprocessor Macros not used in Precompiled Headers sections.
5. To get Hatari to remove any debug information, go into each scheme and change the build configuration to 'Release' and debugger to 'None'. It probably is not necessary to do this for every single scheme. However, I do not know which schemes actually create debug information.


Bob C

Return to “Hatari”