4DO For Linux/Android

4DO & Freedo, we have tried playing some 200 games on them - if you have a question we might be able to help!

Moderators: Devin, Bas, 3DOKid

Post Reply
User avatar
3DOKid
3DO ZONE ADMIN
Posts: 4682
Joined: Sat Jan 13, 2007 4:21 pm
Location: Cambridgeshire, UK
Contact:

4DO For Linux/Android

Post by 3DOKid » Fri Jun 01, 2012 7:35 am

I, after Mr Gates and his evil clan, forced me to purchase Windows with their petty licensing enforcement, (And the fact I believe that MacOS makes your nob fall off) having been using uber-manly Linux for a few years. And windows mostly only for work.

Any chance of 4DO for Linux? Or even Android. Then I could sit on the train and play immercenary :)

User avatar
BryWI
3DO ZERO USER
Posts: 1329
Joined: Sat Feb 03, 2007 8:16 pm
Location: Kenosha, WI, USA
Contact:

Post by BryWI » Fri Jun 01, 2012 7:55 pm

Outside of the core, most of the emulator would need to be ported to use SDL or something for linux. Most of 4DO's functions are very windows specific. I don't know of anyone that has claimed to take on such a task as of yet. 4DO's source is completely open so all the fixes to the core and how to interface it is there. Just need someone with the knowledge to complete the task with all the linux side of things.


Ever try running it in wine?

User avatar
Dreygor
3DO ZERO USER
Posts: 110
Joined: Wed May 23, 2012 2:28 am
Location: Savannah, GA USA
Contact:

Post by Dreygor » Thu Jun 07, 2012 2:17 pm

I wish I knew more about programming. Unfortunately I am more of a hardware guy.

One of my projects in the planning stages is taking a non working FZ-1 gutting it and putting PC inside of it. This includes modding the case to have USB ports on the front for plugging in controllers.

The best option I see is taking a Raspberry Pi and mounting it inside the case. Using a USB hub to connect a dvd-rom (mounted where the old one is), a hard drive (I was thinking a fairly large SSD), a usb port in the back for wireless mouse and keyboard (but once everything is set up these won't be needed as the controllers will do all of this). The video/sound out will be HDMI out of the back of the unit.

The one chink is that 4DO doesn't have a LINUX port. This is an issue because the Raspberry Pi's CPU is an ARM11 which according to the RPI guys doesn't natively run Windows OS or Wine. The GPU is capable of running bluray quality video and it supports Opengl es2.0 and openvg. Basically Xbox 1 power with better graphics. So basically its a linux only cpu.

Http://www.raspberrypi.org

In the meantime I will be begging Johnny for a linux port. :)
Become part of The 3DO Initiative! <-- Click on link!

User avatar
Dreygor
3DO ZERO USER
Posts: 110
Joined: Wed May 23, 2012 2:28 am
Location: Savannah, GA USA
Contact:

Post by Dreygor » Thu Nov 01, 2012 3:21 am

Well, I finally got around to working on making 4DO run on linux and met with some success. I got it running great but I am having issues getting ANY kinda of controls to work in game. Even the keyboard isnt working.

Anyways here is a video of progress thus far.

http://www.youtube.com/embed/SCTjQZQXtk4
Become part of The 3DO Initiative! <-- Click on link!

User avatar
JohnnyDude
3DO ZERO USER
Posts: 261
Joined: Thu Nov 15, 2007 12:56 am

Post by JohnnyDude » Thu Nov 01, 2012 4:08 am

Wow I'm amazed! How did you get this to work? Is it using mono? I'm quite baffled at how you got this running so quickly, since I used quite a bit of windows-specific stuff in the 4DO code.

The controller input is definitely one of these cases. I used DirectInput, a DirectX derivative, which also made supporting the Xbox 360 controller simple. Luckily the code for this is within a "plugin", although there isn't really any 4DO plugin support (you can find that the use of the JohnnyInputPlugin is simply hard-coded). The worst you'd have to suffer is to write a linux-specific plugin. Within this plugin, I used a simple windows (non-DirectInput) API for the keyboard code, so getting this to work for the keyboard at least should be simple if you can figure out how to code the linux equivalent.

It's looking very good, I'll bet you can get this across the finish line without an absurd amount of work.

User avatar
Dreygor
3DO ZERO USER
Posts: 110
Joined: Wed May 23, 2012 2:28 am
Location: Savannah, GA USA
Contact:

Post by Dreygor » Thu Nov 01, 2012 4:12 am

It's not a true Linux port.

1)I started by using a Ubuntu distro of Linux.

2)Made sure all the drivers I needed were loaded.

3)Installed WINE and updated it, then installed Winetricks.

4)Used WINE and installed 4DO using the windows installed EXE (I would kill for your latest version - even beta version - as an installer.

5)Then using Winetricks I installed Microsoft .NET 4 Framework Client Profile and the full install of Microsoft DirectX. Use the full directX install not just the .dlls.

And that's where I am at. It seems that Linux is not forwarding the keystrokes to the program running in WINE. I Plugged in a XBOX 360 controller and got about the same thing. I tried a normal Linux game and the controller worked just fine. i just don't know how to get it forwarded to WINE.

I was also thinking that it would be possible to run this fairly well in a Linux virtual machine, but that takes up allot of extra resources.

My overall goal is to get this 100% working in Linux so when I get my modded Xbox (original) finished I will be able to load all my ISO/BINs onto my xbox and be able to play all my 3DO games on it. It will also have CoinOps5 and XBMC on it. Essentially making the very compact Xbox a Home Theater Entertainment PC.

Xbox mods - Hard drive swapped from 20gb to a 400gb, TSOP flash for booting speed, Softmodded with UnleashX [url]hhttp://www.xbox-hq.com/html/modules.php?name=X ... iew&gid=89[/url] as a dashboard and then install CoinOps5 http://coinopsproject.freeforums.org/co ... p-f57.html , XboX linux http://xboxlinuxproject.wikia.com/wiki/ ... oject_Wiki , and XBMC http://www.xbmc.org/as sub menus under it.
Become part of The 3DO Initiative! <-- Click on link!

User avatar
BryWI
3DO ZERO USER
Posts: 1329
Joined: Sat Feb 03, 2007 8:16 pm
Location: Kenosha, WI, USA
Contact:

Post by BryWI » Thu Nov 01, 2012 7:37 pm

The beta version doesn't have any different dependencies. You should be able to download it from the 4DO forum and replace the exe/dll files in the 4DO folder. If for some reason the link expired, I should still have the archive around on my laptop and I can post it on the 4DO forums.

EDIT: the link has expired, but I will post it on 4DO forums in a few minutes time.

User avatar
Dreygor
3DO ZERO USER
Posts: 110
Joined: Wed May 23, 2012 2:28 am
Location: Savannah, GA USA
Contact:

Post by Dreygor » Fri Nov 02, 2012 2:13 am

Keyboard doesnt work but my Xbox 360 controller works after I uninstalled all the drivers and installed an ap called jstest-gtk.

Enjoy the video with sound!

http://youtu.be/eLnSVjo8s94
Become part of The 3DO Initiative! <-- Click on link!

User avatar
3DO Experience
3DO ZONE ADMIN
Posts: 3686
Joined: Sun Jun 24, 2007 8:47 am
Location: U.S.A.

Post by 3DO Experience » Fri Nov 02, 2012 3:58 am

This is a little OT and will sound silly but do you think 4DO could ever be ported & run smoothly on a Dreamcast?
"Wait. You don't have a bag of charcoal in your gaming room???"

User avatar
Dreygor
3DO ZERO USER
Posts: 110
Joined: Wed May 23, 2012 2:28 am
Location: Savannah, GA USA
Contact:

Post by Dreygor » Fri Nov 02, 2012 4:39 am

Dunno .. anything is possible. I will do some research tommorrow as currently I don't know anything about the dreamcast mod scene.
Become part of The 3DO Initiative! <-- Click on link!

User avatar
JohnnyDude
3DO ZERO USER
Posts: 261
Joined: Thu Nov 15, 2007 12:56 am

Post by JohnnyDude » Fri Nov 02, 2012 5:22 am

3DO Experience wrote:This is a little OT and will sound silly but do you think 4DO could ever be ported & run smoothly on a Dreamcast?
Dreamcast would not have the horsepower to do it. There was a XBox port attempted, but the core graphical emulation is too slow. The CPU emulation was actually not the bottleneck like I was expecting; it was the GPU emulation...

And while this GPU emulation could certainly be optimized a bit, but it won't take advantage of hardware unless the emulation is using HLE (high-level emulation) like Altmer's secretive emulation project.

Ultimately, if the code is optimized there may be a chance. I would guesstimate that it could be as much as twice as fast. This would be great, because I noticed that current burden overtaxes even a 1.2Ghz dual core machine!

User avatar
JohnnyDude
3DO ZERO USER
Posts: 261
Joined: Thu Nov 15, 2007 12:56 am

Post by JohnnyDude » Fri Nov 02, 2012 5:28 am

Dreygor wrote:It's not a true Linux port.

1)I started by using a Ubuntu distro of Linux.

2)Made sure all the drivers I needed were loaded.

3)Installed WINE and updated it, then installed Winetricks.

4)Used WINE and installed 4DO using the windows installed EXE (I would kill for your latest version - even beta version - as an installer.

5)Then using Winetricks I installed Microsoft .NET 4 Framework Client Profile and the full install of Microsoft DirectX. Use the full directX install not just the .dlls.

And that's where I am at. It seems that Linux is not forwarding the keystrokes to the program running in WINE. I Plugged in a XBOX 360 controller and got about the same thing. I tried a normal Linux game and the controller worked just fine. i just don't know how to get it forwarded to WINE.

I was also thinking that it would be possible to run this fairly well in a Linux virtual machine, but that takes up allot of extra resources.

My overall goal is to get this 100% working in Linux so when I get my modded Xbox (original) finished I will be able to load all my ISO/BINs onto my xbox and be able to play all my 3DO games on it. It will also have CoinOps5 and XBMC on it. Essentially making the very compact Xbox a Home Theater Entertainment PC.

Xbox mods - Hard drive swapped from 20gb to a 400gb, TSOP flash for booting speed, Softmodded with UnleashX [url]hhttp://www.xbox-hq.com/html/modules.php?name=X ... iew&gid=89[/url] as a dashboard and then install CoinOps5 http://coinopsproject.freeforums.org/co ... p-f57.html , XboX linux http://xboxlinuxproject.wikia.com/wiki/ ... oject_Wiki , and XBMC http://www.xbmc.org/as sub menus under it.
Ah I see. Well, it may be a bit harder to finish it up then. I'm surprised it works as well as it does, since the core emulation calls some native windows DLLs (as in, not .NET). I didn't hear sound in the video, is sound working? I wouldn't expect so.

Playing from CD directly probably won't work. But, who cares.

You can maybe get keyboard to work with your current approach, the keyboard logic in the code is using pretty "standard" windows stuff which I'd expect a windows simulation to cater to. It is not .NET keyboard logic, which may explain why it doesn't work.

If you know any linux coding goons that owe you a favor I could probably help point them in the right direction for the sound and joystick support. I would suspect those portions will require all-new and linux-specific code.

Edit:I couldn't be more wrong! Keyboard doesn't work, but sound and joysticks do! :lol:
Last edited by JohnnyDude on Fri Nov 02, 2012 5:42 am, edited 1 time in total.

User avatar
JohnnyDude
3DO ZERO USER
Posts: 261
Joined: Thu Nov 15, 2007 12:56 am

Post by JohnnyDude » Fri Nov 02, 2012 5:31 am

Also, 4DO falls back to non-DirectX rendering (called GDI rendering) if DirectX is not available. You can see if this is happening in the log files created (you will see errors mentioning this). This will help you to see if it is actually using DirectX as expected.

If it doesn't use DirectX, the only things you'll end up losing are VSync and the ~25% CPU utilization that it could have saved.

User avatar
JohnnyDude
3DO ZERO USER
Posts: 261
Joined: Thu Nov 15, 2007 12:56 am

Post by JohnnyDude » Fri Nov 02, 2012 5:40 am

Dreygor is the man

I just saw your latest news about getting it to run, with sound included. Way to go!

Just don't load up Plumbers Don't Wear Ties like you did on the last video. 4DO might destroy itself.

User avatar
Dreygor
3DO ZERO USER
Posts: 110
Joined: Wed May 23, 2012 2:28 am
Location: Savannah, GA USA
Contact:

Post by Dreygor » Fri Nov 02, 2012 12:01 pm

I did a quick search and it looks like they got some form of Linux running on the Dreamcast. So that means that you could get 4DO running on it. I need to do some further research because you will need to be able to mod your hard drive. Most of the modding I found for the dreamcast was just running custom softmods on a disc. I am sure there is more out there.

I went with the original xbox because they coinops for it which supports so many emulated systems. Unofficially people have managed to get gamecube, playstation 2, and dreamcast games running to some degree on it.

FYI I played 4DO in full screen in linux probable about 2 hours and it ran like a champ. Next step is to get my xbox mod finished and get the linux and everything installed on it.

I wish you knew Linux, Johnny, because I actually don't know a single linux programmer. Being able to run 4DO without WINE on Linux would absolutely rock.
Become part of The 3DO Initiative! <-- Click on link!

User avatar
3DO Experience
3DO ZONE ADMIN
Posts: 3686
Joined: Sun Jun 24, 2007 8:47 am
Location: U.S.A.

Post by 3DO Experience » Sat Nov 03, 2012 2:52 am

Well I'm not dieing for a Dreamcast port, was just curious. As JohnnyDude said there was work on an XBox port of freeDO. I was told that it was running smooth (a lie) and I gave those guys money plus I bought a 3DO to XBox controller adapter which I never received.
"Wait. You don't have a bag of charcoal in your gaming room???"

User avatar
Dreygor
3DO ZERO USER
Posts: 110
Joined: Wed May 23, 2012 2:28 am
Location: Savannah, GA USA
Contact:

Post by Dreygor » Sat Nov 03, 2012 3:18 am

3DO Experience wrote:Well I'm not dieing for a Dreamcast port, was just curious. As JohnnyDude said there was work on an XBox port of freeDO. I was told that it was running smooth (a lie) and I gave those guys money plus I bought a 3DO to XBox controller adapter which I never received.
Oh wow that's crap :(

Yeah I found a little about a guy called Incrediclint on the EmuExtras forum but it looks like the last post was almost a year ago about it. http://www.emuxtras.net/forum/viewtopic ... 189&t=1468

So you already have a modded xbox? Do you have Linux running on it?

Interesting. Looks like someone in the Soviet block is working on an Xbox specific 3DO emulator called 3DOx. http://xbox.bbcity.ru/viewtopic.php?id=375#p452 I can not find much more on it.

Another youtube video of it. Fairly recent http://www.youtube.com/watch?v=tGJd5dry8RU .
Become part of The 3DO Initiative! <-- Click on link!

User avatar
3DO Experience
3DO ZONE ADMIN
Posts: 3686
Joined: Sun Jun 24, 2007 8:47 am
Location: U.S.A.

Post by 3DO Experience » Sat Nov 03, 2012 5:07 am

Never modded the XBox, was waiting for my adapter.
"Wait. You don't have a bag of charcoal in your gaming room???"

User avatar
JohnnyDude
3DO ZERO USER
Posts: 261
Joined: Thu Nov 15, 2007 12:56 am

Post by JohnnyDude » Sat Nov 03, 2012 7:15 pm

I'd assume a 3DO emulator on either of those system is feasible if someone works on it enough. The CPU emulation from FreeDO is top-notch as far as optimization, but the GPU emulation can probably be improved.

A lot of emulators for later-generation systems allow disabling of specific graphical emulation for speed at the cost of accuracy (like "frame buffer effects"). This is easier with high-level emulators, but there are still some options even with low-level. As one example, both FreeDO and 4DO ignore "interpolation" by default since it doubles resolution for very little benefit. Anyhow, right now the 3DO emulation is pretty much just aimed at complete accuracy.

Two games I've noticed slowdown because of graphics specifically are Slayer and Gex! If you wanted to stress test the Linux solution you have, you might try one of these.

Bladeforce
SPAMMER
Posts: 1
Joined: Fri Nov 23, 2012 2:31 am

Post by Bladeforce » Fri Nov 23, 2012 2:39 am

@Dreygor

I too have been wanting a linux port of 4do and was wondering what you meant by "made sure all the drivers i needed were installed" in your wine post above on ubuntu. I for the life of me cant get 4do to work. Or even which version of wine you used?

It's killing me that 4do isnt on Linux although i do have a linux port of freedo working fine on my linux box

http://www.arts-union.ru/node/75

Can you tell me exactly what you did to get wine running 4do as it craps out on me trying to install .net4 using winetricks :/


Edit.. I got 4do running in wine but when i select the bios it just crashes and wont run again until i delete the selected bios rom from the settings file

User avatar
Tatsumaru
3DO ZERO USER
Posts: 43
Joined: Tue Jan 18, 2011 2:53 pm
Location: Brazil

Re: 4DO For Linux/Android

Post by Tatsumaru » Thu Jul 10, 2014 5:02 pm

Is there any chance of a 3DO emulator for android? Or even just a core for retroarch?
I got a emulator tablet called Pg 9700 by iPega and the thing is great for emulation in general, it would be rad to play some 3DO games on the thing.

User avatar
3DO Experience
3DO ZONE ADMIN
Posts: 3686
Joined: Sun Jun 24, 2007 8:47 am
Location: U.S.A.

Re: 4DO For Linux/Android

Post by 3DO Experience » Sun Jul 13, 2014 2:12 am

Or the Raspberry Pi ?
"Wait. You don't have a bag of charcoal in your gaming room???"

Post Reply