Mac <-> DC Programmer Thread

If you have any questions on programming, this is the place to ask them, whether you're a newbie or an experienced programmer. Discussion on programming in general is also welcome. We will help you with programming homework, but we will not do your work for you! Any porting requests must be made in Developmental Ideas.
User avatar
nobody in particular
DCEmu Freak
DCEmu Freak
Posts: 64
https://www.artistsworkshop.eu/meble-kuchenne-na-wymiar-warszawa-gdzie-zamowic/
Joined: Tue Jul 01, 2003 3:48 pm
Location: Clemson, SC
Has thanked: 0
Been thanked: 0

Re: Mac <-> DC Programmer Thread

Post by nobody in particular »

Damn it's been a while.

So I'm back and trying to get a new toolchain set up again, this time in Leopard. I haven't done this in years and I haven't kept up with the DC scene at all since then.

I got a few questions. Is GCC 3.x still common? Has anyone tried any newer (really new) versions, or do they still not work with SH processors correctly? Dan was having problems compiling 3.x with GCC 4 and I'm waiting on a response from the KOS mailing list for more information.

All that aside, the plan is to get a working toolchain and then release it with a nice easy installer that does all the hard work for you. Wish me luck.
User avatar
toastman
Iron Fist of Justice
Iron Fist of Justice
Posts: 4933
Joined: Sat Nov 10, 2001 3:08 am
Location: New Orleans
Has thanked: 0
Been thanked: 0
Contact:

Re: Mac <-> DC Programmer Thread

Post by toastman »

So. What you're saying is that this is possible.
No signature.
|darc|
DCEmu Webmaster
DCEmu Webmaster
Posts: 16374
Joined: Wed Mar 14, 2001 6:00 pm
Location: New Orleans, LA
Has thanked: 104 times
Been thanked: 91 times
Contact:

Re: Mac <-> DC Programmer Thread

Post by |darc| »

toastman wrote:So. What you're saying is that this is possible.
It's very very easy to program DC from a Mac. ;)
It's thinking...
User avatar
BlueCrab
The Crabby Overlord
The Crabby Overlord
Posts: 5658
Joined: Mon May 27, 2002 11:31 am
Location: Sailing the Skies of Arcadia
Has thanked: 9 times
Been thanked: 69 times
Contact:

Re: Mac <-> DC Programmer Thread

Post by BlueCrab »

|darc| wrote:
toastman wrote:So. What you're saying is that this is possible.
It's very very easy to program DC from a Mac. ;)
Well, I wouldn't ever consider programming "very very easy", but the sentiment is still correct. :wink:
User avatar
toastman
Iron Fist of Justice
Iron Fist of Justice
Posts: 4933
Joined: Sat Nov 10, 2001 3:08 am
Location: New Orleans
Has thanked: 0
Been thanked: 0
Contact:

Re: Mac <-> DC Programmer Thread

Post by toastman »

Ok. This is weird. For some reason, sh-elf-gcc won't build. I get some of the other tools, but not the compiler itself. I am using the command line tools installed by XCode if that makes a difference.
No signature.
|darc|
DCEmu Webmaster
DCEmu Webmaster
Posts: 16374
Joined: Wed Mar 14, 2001 6:00 pm
Location: New Orleans, LA
Has thanked: 104 times
Been thanked: 91 times
Contact:

Re: Mac <-> DC Programmer Thread

Post by |darc| »

toastman wrote:Ok. This is weird. For some reason, sh-elf-gcc won't build. I get some of the other tools, but not the compiler itself. I am using the command line tools installed by XCode if that makes a difference.
That should work just fine, I compiled it with Xcode 5.0 beta and I know BlueCrab is on an older Xcode (3.x series?).

Are you getting an error message? Are you sure you have all the needed dependencies?

Here is a pretty quick and easy list of what you need to do to get the dependencies and everything up and running on OS X. See this page if you need any specific elaboration...
  • install xcode
  • launch xcode for the first time, accept eula and install any requested components
  • xcode -> preferences, downloads > components > command line tools > install
  • run command to install homebrew (package manager):

    Code: Select all

    ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
  • follow the prompts/enter password/etc. to install homebrew
  • Code: Select all

    brew doctor
  • Code: Select all

    brew update
  • Code: Select all

    brew install cdrtools doxygen gettext gmp libelf libmpc mpfr texinfo wget
    (not all of these are needed but not a bad idea to install while we're here)
  • git clone kallistios and kos-ports
  • cd into utils/dc-chain and ./download.sh and ./unpack.sh
  • Code: Select all

    sudo make
  • cd back to root of kallistios dir
  • Code: Select all

    cp doc/environ.sh.sample ./environ.sh
  • Code: Select all

    ./environ.sh
  • add environ.sh to profile so it runs at login
  • Code: Select all

    make
  • cd into kos-ports dir, and run make there as well
It's thinking...
User avatar
toastman
Iron Fist of Justice
Iron Fist of Justice
Posts: 4933
Joined: Sat Nov 10, 2001 3:08 am
Location: New Orleans
Has thanked: 0
Been thanked: 0
Contact:

Re: Mac <-> DC Programmer Thread

Post by toastman »

Ok, that seems to have worked. Oddly enough cloning kos-ports didn't actually get the individual libraries, I had to clone each separately.
No signature.
User avatar
BlueCrab
The Crabby Overlord
The Crabby Overlord
Posts: 5658
Joined: Mon May 27, 2002 11:31 am
Location: Sailing the Skies of Arcadia
Has thanked: 9 times
Been thanked: 69 times
Contact:

Re: Mac <-> DC Programmer Thread

Post by BlueCrab »

toastman wrote:Ok, that seems to have worked. Oddly enough cloning kos-ports didn't actually get the individual libraries, I had to clone each separately.
Yes, that is by design. Each "port" is in its own Git repository for ease of maintenance. Cloning kos-ports then doing a "git submodule update --init" should automatically have pulled all of them though, as is documented here.
User avatar
toastman
Iron Fist of Justice
Iron Fist of Justice
Posts: 4933
Joined: Sat Nov 10, 2001 3:08 am
Location: New Orleans
Has thanked: 0
Been thanked: 0
Contact:

Re: Mac <-> DC Programmer Thread

Post by toastman »

Now, if I could find the include and library directories, I may be able to build dcload-ip.

I checked into /opt/toolchains/dc, but it doesn't seem to be anywhere in there.
No signature.
User avatar
BlueCrab
The Crabby Overlord
The Crabby Overlord
Posts: 5658
Joined: Mon May 27, 2002 11:31 am
Location: Sailing the Skies of Arcadia
Has thanked: 9 times
Been thanked: 69 times
Contact:

Re: Mac <-> DC Programmer Thread

Post by BlueCrab »

toastman wrote:Now, if I could find the include and library directories, I may be able to build dcload-ip.

I checked into /opt/toolchains/dc, but it doesn't seem to be anywhere in there.
If you have libelf installed, you don't have to worry about that at all.
Post Reply