Page 1 of 2

Homebrew without a Mac/Mac emulator. Yes we can.

Posted: Sat Jul 03, 2010 4:39 am
by cdoty
I finally figured out how to compile a 3DO program using 'Arm Software Developer Toolkit v2.50'. It will complain about the header files. The problem is they are in Mac format; which confuses the hell out of the compiler. Once they are converted to windows format, everything works fine. I created a signed disk with a new LaunchMe, and it worked fine.

The ARM ADT 1.2 will not work, as the linker can't output AIF, and the fromElf utility doesn't export the relocation info.

I also wrote a windows version of the modbin program. It doesn't support the -debug option, but there's no way to debug with FreeDo anyway. The only other two areas that are changed are DWORDs at 0x2C and 0xA8. 0x2C is some sort of 3DO flag (I'm guessing), since it's an obsolete location in the AIF; but it always contains 0xA0000000. And the stack size is at 0xA8. This is set to the passed in value.

I will put together a working set of headers, and an example shortly.

You will need to find your own copy of the 'Arm Software Developer Toolkit v2.50'.

Posted: Sat Jul 03, 2010 5:25 am
by cdoty
Ok, here's the updated 3DO devkit header, libraries, and support programs (modbin, rm, make):

http://www.rastersoft.net/3DO/3DODev.rar

and the example:

http://www.rastersoft.net/3DO/3DOBounceExample.rar

To compile the example you need:

1) The contents of 3DODev on the c: drive (or modify the makefile to point to the new location). (modbin will be in c:\3DODev\Bin).

2) The Arm compiler installed to c:\Arm250 (which is the default). (armcc.exe will be in c:\Arm250\bin).

3) c:\3DODev\bin in your path. The easiest way to do this is to create ArmDev.bat (name it whatever you want) file containing:

PATH=C:\3DODev\bin;%PATH%

Once this is done, extract 3DOBounceExample somewhere (doesn't matter). If you created the ArmDev.bat file, put the file in the 3DOBounce folder.

Open up a command window and change to the 3DOBounce folder, and type ArmDev.

...then type make.

It should build LaunchMe. (There's quite a few warnings, but no errors).

Copy LaunchMe to the PARCE_cdrom directory
(You have to decompile cdrom.iso through the OperaFS[DE]Compiler. Links to cdrom.iso and OperaFS[DE]Compiler can be found on this forum).

Compile the iso, and run it through 3DOEncrypt (also on this forum). Launch the iso in FreeDO.

You've just compiled a 3DO program, and didn't have to touch a Mac or a Mac emulator.

You still have to use a Mac to compile 3DO compatible resources and stuff. Or, write your own image/sound loading routines. The image data is in 16 bit (1 bit alpha 5 bits red 5 bits green 5 bits blue) big endian format. And, I'm sure sound can also be loaded from a standard binary sound format.

Posted: Sat Jul 03, 2010 6:36 am
by cdoty
The ARM SDT 2.11a produces no warnings, and compiles to a file that is pretty much the same as the the one produced by the 3do devkit. I included an ARM SDT 2.11a makefile (makefile.211a).

The only differences in the image is that my Lib3DO and exampleslib were built without debugging info.

Posted: Sat Jul 03, 2010 4:32 pm
by 3DO Experience
God you are awesome!

Posted: Sat Jul 03, 2010 11:37 pm
by Scarlettkitten
Wow that's fantastic 8)

Posted: Sun Jul 04, 2010 11:19 pm
by Scarlettkitten
Tried it out tonight, So far I've managed to compile the bounce example and swap out a couple of the pictures using the mac toolkit to convert TIFF to 3DO imag file.

http://www.youtube.com/watch?v=0vbZ7usNTMU




.

Posted: Mon Jul 05, 2010 12:08 am
by cdoty
Quagmire wrote:Tried it out tonight, So far I've managed to compile the bounce example and swap out a couple of the pictures using the mac toolkit to convert TIFF to 3DO imag file.

http://www.youtube.com/watch?v=0vbZ7usNTMU
Nice work.

Funny thing is that I didn't know the letters moved. All I've done is ran to make sure it booted.

Posted: Mon Jul 05, 2010 12:18 am
by Scarlettkitten
I wish I had the mac 3do dev kit hardware so I could use the debugger :(

Posted: Mon Jul 05, 2010 2:27 am
by cdoty
Quagmire wrote:I wish I had the mac 3do dev kit hardware so I could use the debugger :(
Not quite a debugger, but you can use printf debugging with FreeDO (version 1.9 supports it).

Look for a debug.fz10.mes file on your C drive.

Posted: Tue Jul 06, 2010 7:16 pm
by Scarlettkitten
cdoty wrote:
Quagmire wrote:I wish I had the mac 3do dev kit hardware so I could use the debugger :(
Not quite a debugger, but you can use printf debugging with FreeDO (version 1.9 supports it).

Look for a debug.fz10.mes file on your C drive.
I didn't realise it freeDO could do that, thanks :)

Posted: Tue Jul 06, 2010 11:39 pm
by cdoty
Quagmire wrote:I didn't realise it freeDO could do that, thanks :)
I stumbled on it a few years back when looking into the signing and stuff. it's very helpful, I used it over the weekend working on a new demo.

Posted: Wed Jul 07, 2010 3:13 am
by BryWI
Do you sleep? :)

Posted: Wed Jul 07, 2010 4:40 am
by desiv
Q: on the development kit(s).
(Your website name isn't resolving for me for some reason, so I can't download the demo to check)

Is all the development in ASM?

I wouldn't mind poking around. Haven't written anything semi-complete since my Amiga days, but I've ported a few things tween different Linux GUIs, etc...

But everything I've done has been in C, so I was kind of hoping that some 3DO dev might be in C?

Just wondering..

Thanx and great work!!!

desiv

Posted: Wed Jul 07, 2010 7:02 am
by cdoty
BryWI wrote:Do you sleep? :)
Yep, mostly on weekends. :)

The 3DO stuff is pretty exciting; so I don't mind sacrificing some sleep to play around with it.
desiv wrote:Q: on the development kit(s).
(Your website name isn't resolving for me for some reason, so I can't download the demo to check)

Is all the development in ASM?
I'm having name server issues with my website host. I updated it tonight, so hopefully tomorrow it will be working.

Development is in either C or ASM. The demo I'm working on is all in C.

I now have PC tools to create 3DO image, cel, and anim resources.

I should be able to finish the demo tomorrow, and post the sources and tools.

Posted: Wed Jul 07, 2010 11:19 am
by Scarlettkitten
Wow you do work fast, I'm still reading c for dummies :wink:

Posted: Wed Jul 07, 2010 3:55 pm
by desiv
cdoty wrote: Development is in either C or ASM. The demo I'm working on is all in C.
Sweet... Now I need to decide if I should start a new project or try to port the old code from my last Amiga program over to the 3DO. (I found a printout (yes, printout) of it a few months back.. )

Hmm.. Does the 3DO need a (not so great) solitaire game? :-)
(Considering there is a lot of Amiga intuition interface code, it might be better to try to pick something cleaner to port over..)

I'll grab the dev stuff when available and have a look.

Looks like this is mostly Windows stuff you're doing?
(I can do Windows stuff.. It runs in my Linux box.. :-) )

desiv

Posted: Wed Jul 07, 2010 5:20 pm
by cdoty
desiv wrote: Looks like this is mostly Windows stuff you're doing?
(I can do Windows stuff.. It runs in my Linux box.. :-) )
It's a windows console app.

The only modifications you should need to make is to remove the windows.h includes, and add typedefs for DWORD, WORD, and BYTE. Other than that, I use the standard C library for everything else. The easiest way would probably to create windows.h that includes the typedefs.

Posted: Thu Jul 08, 2010 2:32 am
by Trev
Sweet... Now I need to decide if I should start a new project or try to port the old code from my last Amiga program over to the 3DO. (I found a printout (yes, printout) of it a few months back.. )

Hmm.. Does the 3DO need a (not so great) solitaire game? :-)
(Considering there is a lot of Amiga intuition interface code, it might be better to try to pick something cleaner to port over..)

desiv[/quote]

3DO solitaire sounds like a killer app! :wink:

Seriously though, I'd play it ... and probably love it too.

Posted: Thu Jul 08, 2010 2:45 am
by cdoty
I finished the demo, and it runs fine on a real 3DO. It should work correctly in either NTSC or PAL modes. I couldn't test the PAL version though.

Image

The start button will restart the demo, and the directional pad will move the alien (sorry no fire button, this is a non-violent demo :P ).
The demo, sources, and tools are available from http://www.rastersoft.net/3DO/3DOInvades.rar

To recompile the CD, you need to use the 'CD' folder inside the archive. The code, graphics, and banner are all set up to build into this folder.

Hopefully, the sources are easy enough to follow. I've tried to organize stuff a little bit; although it could use some additional work.

The three tools are:

BMP to 3DO Image
BMP to 3DO Cel
BMP to 3DO Anim

BmpTo3DOImage converts 24 bit BMPs to a background image. The image must be a multiple of 4 pixels wide. I'm not sure how the 3DO will handle an image that is smaller than the display.

BmpTo3DOCel converts a 24 bit BMP to a static sprite. The color magenta (Red:255 Green:0 Blue:255) is treated as transparent. The image must be a multiple of 4 pixels wide and 2 pixels tall. BmpTo3DOCel will convert the image to the format needed by the frame buffer. The 3do tool did not do this.

BmpTo3DOAnim converts a 24 bit BMP to an animated sprite. The color magenta (Red:255 Green:0 Blue:255) is treated as transparent. The image must be a multiple of 4 pixels wide and 2 pixels tall. The BMP is a sprite sheet that is converted into frames, and the width and height must be a multiple of the frame width and frame height. Look at Graphics\Alien.bmp to see how this is set up. The image can also contain a single row or column of sprites, or can contain an array of sprites. Each frame must be the same size. I will release a tool later that can handle different sized frames.

Posted: Thu Jul 08, 2010 3:09 am
by cdoty
desiv wrote: Hmm.. Does the 3DO need a (not so great) solitaire game? :-)
(Considering there is a lot of Amiga intuition interface code, it might be better to try to pick something cleaner to port over..)
Intuition... wow, that was windows programming before windows programming was cool. :shock:

Posted: Thu Jul 08, 2010 1:28 pm
by Scarlettkitten
Great demo, Hmmm thinking metal slug but with aliens 8)

Posted: Fri Jul 09, 2010 12:56 am
by 3DO Experience
This is just getting too cool.

Posted: Fri Jul 09, 2010 12:58 am
by Mobius
Quagmire wrote:Great demo, Hmmm thinking metal slug but with aliens 8)
You clearly didn't play enough Metal Slug!

Posted: Fri Jul 09, 2010 11:01 am
by Scarlettkitten
Oh I did :D I was just thinking that would make a good game for the 3DO.

I should have said alien main character :P

Posted: Sat Jul 10, 2010 10:34 pm
by Auto-Fox
This is awesome in toast.
With jelly.

Hmmm... y'know what the 3DO needs, I think? A really good top-down scrolling shoot em' up. Y'know, like Raiden or the 19XX series.
Something dieselpunk...
...I'd make it myself, but I'm useless at programming, let alone programming for "dead" consoles.

Posted: Sun Jul 11, 2010 5:02 am
by 3DO Experience
GALAGA 2010!!!! Oh wait... no scrolling. :(

Posted: Sun Jul 11, 2010 5:39 am
by MadMan
Metal Slug would be fun!!

Posted: Sun Jul 11, 2010 6:03 am
by cdoty
3DO Experience wrote:GALAGA 2010!!!! Oh wait... no scrolling. :(
No scrolling? The 3DO can handle scrolling, Gex had scrolling.

Posted: Sun Jul 11, 2010 7:33 am
by 3DO Experience
No, I mean Galaga didn't have scrolling. But we could change that. Mega ULTRA GALAGA 3DO!!!!!!

Posted: Sun Jul 11, 2010 9:48 am
by BryWI
I always wanted to make a shoot em up. I just dont have the resources to do so. A really good idea would be to make a shoot em up engine where you can drop in your own art and make a game. open source of course. that would be cool in my opinion. I guess I'd have to start small and make a small demo by looking at the source of the other demos. I have too much going on music wise though to learn that stuff right now. And its nearly 4am and im rambling. I'll stop now :)