[Tutorial] Compile your first 3DO game

Tools and projects
Post Reply
User avatar
blabla
3DO ZERO USER
Posts: 142
Joined: Wed Feb 13, 2013 3:23 am
Location: France
Contact:

[Tutorial] Compile your first 3DO game

Post by blabla » Sat Sep 13, 2014 10:06 pm

Hello,
Seems like a lot of people are interested to make 3DO games and don't know how to do it.
Hopefully this will help them.

WARNING : This tutorial is not for complete beginners.

Before we start , download this : http://goo.gl/bTOZjm
What is it ? Well that's the Invades example by cdoty but modified to work with Topper's new graphics library.
Extract it and put it somewhere. (It doesn't matter where)

Then you need to have the ARM SDT 2.5 compiler.
Don't have it ? Google it.
Then install the ARM SDT here : C:/ARM250

Once it is done, download the 3DODev pack and put the folder 3DODev in C:/.
Now back to the example you extacted.

Run Make_and_pack.bat. (double click on it)
After compilation is done , press enter and OperaFS will open.
Press on the button "Compile Iso" and choose the CD folder.
Name your iso file invades.iso and put it where the "Make_and_pack.bat" file is.

After that , start Encrypt.bat.
This will encrypt the iso in order to get it to work on a real 3DO.
(except the Goldstar ones because they suck and they can only read some brands and only pressed CDs.)

Image
You can then run it with any 3DO emulator. (Like 4DO for example)

I have also provided some experimental functions to play music and sound effects.
They are not without issues however.
Playing Music will freeze one frame out of the 60 frames per second.
As for the sound effects , make sure they are small.
(or increase NUMBLOCKS_SND to 16 if you don't use music)

Happy coding !
Last edited by blabla on Wed Sep 17, 2014 3:09 am, edited 1 time in total.

User avatar
Aer Fixus
3DO ZERO USER
Posts: 40
Joined: Thu Aug 21, 2014 10:59 pm

Re: [Tutorial] Compile your first 3DO game

Post by Aer Fixus » Tue Sep 16, 2014 3:55 am

This is wonderful. Not only is there a better (and well noted, albeit in French (thank you, Google Translate!)) graphics library, the whole setup is there and ready to go.

What held me up for the longest time was mostly that I didn't have the right files in the first place, so there was no place I could start. I would use the wrong CD image every time, so no matter how I compiled it, packed it and tried to encrypt it, it wouldn't work. When I eventually got it, it was using the original cdoty example. This pack will be very helpful for anyone who is even mildly considering trying out 3DO homebrew. It gives them everything they need to start programming in one clean package*. If only this existed a year ago, I'd have a game done by now!

*except for the ARM SDT. Maybe we can rig it up using GNUARM, although I'm not sure if there are any issues by going that route.

Also, I've noticed you've mentioned Topper a couple times, but I'm not familiar with his/her work nor where to find it. Where does he/she reside?

And, in addition, I'll be very happy when Topper (or anyone else) comes up with some efficient 3D libraries so we can actually show off the 3DO's power (or lack of power if it turns out that way).

User avatar
blabla
3DO ZERO USER
Posts: 142
Joined: Wed Feb 13, 2013 3:23 am
Location: France
Contact:

Re: [Tutorial] Compile your first 3DO game

Post by blabla » Wed Sep 17, 2014 1:29 am

Hello , thanks for your reply !
Aer Fixus wrote:Also, I've noticed you've mentioned Topper a couple times, but I'm not familiar with his/her work nor where to find it. Where does he/she reside?
Yeah, Topper is mostly known on yaronet and he currently lives in France.
On the 3DO, he recently did a small quiz game that he showed at a convention but he never released it. (Except me, i have the source code of it)
It's all in french though and there's a nasty bug too that would crash the game if you play a second time.
He's currently very busy so he has no time with 3DO stuff.
I might fix his game and translate it in English if someone else is interested.

Oh,
Here's some picture of him and the game : (yeah i know , very out of topic)
Image

Image
Aer Fixus wrote:And, in addition, I'll be very happy when Topper (or anyone else) comes up with some efficient 3D libraries so we can actually show off the 3DO's power (or lack of power if it turns out that way).
I doubt Topper or anyone else will come up with that kind of 3D librarya any time soon.
The problem is not the fact the 3DO is weak but more like because the documentation they provide sucks !
I would like to see this happen too but i'm not very optimistic...
Maybe we can rig it up using GNUARM, although I'm not sure if there are any issues by going that route.
There are issues and nobody knows how to fix them.
I had the same issues as Mobius , it tells me that the functions were undefined.
I've attached the makefile for use with GNUARM and you can download the GNUARM toolchain here if you want to try.
Attachments
makefile_gnuarm.zip
(844 Bytes) Downloaded 91 times

User avatar
blabla
3DO ZERO USER
Posts: 142
Joined: Wed Feb 13, 2013 3:23 am
Location: France
Contact:

Re: [Tutorial] Compile your first 3DO game

Post by blabla » Fri May 22, 2015 8:33 pm

There are issues and nobody knows how to fix them.
I had the same issues as Mobius , it tells me that the functions were undefined.
I've attached the makefile for use with GNUARM and you can download the GNUARM toolchain here if you want to try.
I think i know why it complains that the functions are undefined.
It's because all the headers files are CR line-ending.
Before the release of Mac OSX which became Unix complaint, Mac OS files were not LF or LF+CR line ending but CR line-ending.
The GNUARM probably does not know this format and as a result, it complains.

The solution : Convert all the headers in LF.

Finally, we will have a decent compiler for the 3DO !
This also means that i will be able to make it more easier for beginners include the compiler inside.

User avatar
Aer Fixus
3DO ZERO USER
Posts: 40
Joined: Thu Aug 21, 2014 10:59 pm

Re: [Tutorial] Compile your first 3DO game

Post by Aer Fixus » Sat May 23, 2015 3:02 am

blabla wrote:
There are issues and nobody knows how to fix them.
I had the same issues as Mobius , it tells me that the functions were undefined.
I've attached the makefile for use with GNUARM and you can download the GNUARM toolchain here if you want to try.
I think i know why it complains that the functions are undefined.
It's because all the headers files are CR line-ending.
Before the release of Mac OSX which became Unix complaint, Mac OS files were not LF or LF+CR line ending but CR line-ending.
The GNUARM probably does not know this format and as a result, it complains.

The solution : Convert all the headers in LF.

Finally, we will have a decent compiler for the 3DO !
This also means that i will be able to make it more easier for beginners include the compiler inside.
Have you done this yet or is this just theory? If you've done this already, sweeeeeet! That's another step towards a better (and ross platform) programming environment for the 3DO.

User avatar
blabla
3DO ZERO USER
Posts: 142
Joined: Wed Feb 13, 2013 3:23 am
Location: France
Contact:

Re: [Tutorial] Compile your first 3DO game

Post by blabla » Sat May 23, 2015 5:38 am

Have you done this yet or is this just theory? If you've done this already, sweeeeeet! That's another step towards a better (and ross platform) programming environment for the 3DO.
Actually, i lied. The headers were in Windows format and GCC does not seem to have any issues with it.
I tried to build a simple program with GNUARM ( a main and printf hello world) and see why it does not build.
This is the real reason why it does not work :
GCCARM generates and only accepts files in ELF format.
3DO's official format were realised before ELF became the norm and are in a.out format. (if i'm correct)
When you try to link it with a non-ELF library, GCC will complain about the file format and it will not link it
against the generated executable.

I see two ways to solve this :
- Find a paramater for GCC to generate in a.out format instead or hack the libraries to have a ELF header.
- Build a replacement for the 3DO libraries. (kind of like Liberis for NEC PC-FX)

Post Reply