Jump to content
IGNORED

Porting Altirra to Linux/*BSD


JokkeH

Recommended Posts

Hello!

 

I use Fedora Linux. I always thought that atari++ and atari800 emulators were good enough until I tried running Conan. Using atari800, all I get is screen corruption everytime I start the game, and have switched from floppy A side to B side.

 

Using atari++ 1.81, Conan works perhaps 1 time out of 10 and I have no clue why this is so. I am suspecting it could be some kind of a weird, timing-related issue, but have no expertise to analyse this any further. And even when Conan happens to work with atari++, I suppose the game will require further floppy operations. The erratic and seemingly non-deterministic behaviour of atari++ is not really convincing: What if you advance in the Conan game, and atari++ causes screen corruption again later? It would be very annoying.

 

Frustrated, I started searching for alternative emulators. I came across Altirra, but it is for Windows. No problem, I tried running it under WINE and using the authentic emulation mode, Altirra ran Conan flawlessly, time after time. This emulator feels great.

 

I also ran Avery Lee's Acid800 tests. Both atari++ and atari800 on Fedora Linux failed many, many tests while Altirra failed only one. It seems to me that Altirra is clearly the best Atari 800/800XL emulator out there. I am happy that it works under WINE, so I can use it on Fedora Linux. However, it would be super fantastic if there were a native Linux/*BSD port of Altirra.

 

Luckily Altirra is GNU GPL licensed, so the source code is available for modification and those with enough skill could possibly port it, perhaps using SDL for graphics and sound.

 

My question is: How huge would that porting effort be? I suppose Altirra uses Windows native GUI libraries, but the core functionality is OS independent.

 

For one simple thing, on Linux, I am used to having traditional Makefiles. Altirra is compiled using Microsoft Visual C++ compiler and all those project and resources files seem pretty mysterious to me.

 

 

 

 

 

 

 

 

 

 

  • Like 2
Link to comment
Share on other sites

Altirra author here.

 

From what you're reporting it sounds like you have an uncracked image of the game in .atx format with copy protection intact. The symptoms you're describing with corruption on the main screen are consistent with a failed copy protection check. This involves duplicate sectors on track 39, so it is timing sensitive and depends on accurately emulating the delays from the disk spinning in the drive.

 

Regarding the Acid800 test suite, an emulator that scores higher will generally be more accurate, but the test suite is somewhat skewed toward edge cases and things that can be checked by the test program. It doesn't check disk timing, so even if every single failure was fixed it still wouldn't have fixed the issue you're running into here.

 

You're correct about the core being reasonably portable, but underestimating the amount of UI code involved. About half of Altirra is UI code, including windowing, input, audio, and video. Additionally, porting this is complicated by the way that I write code, which is eschewing external dependencies and taking full advantage of the platform in platform dependent code. Which isn't to say that I have anything against porting to Linux or another platform, but just that I don't have the expertise or time to do so and I'm not willing to compromise the experience on Windows to do it. At the time that I started Altirra, there were already more than enough emulators with portable minimal UIs, while I rather wanted something that used the native file dialogs and a better debugger interface, doesn't permanently hide the mouse pointer when the window is active, etc.

 

The VC++ project and resource files aren't really a big deal. The source files are split up into projects, but that's mostly for organization and build optimization rather than because they have to be built that way. Thus, you could probably get pretty far setup-wise just throwing everything in one big build. As for the resource files, all of the non-UI resources are read-only binary blobs that just need to be read or mapped into memory. Setting up the build is easy compared to adapting the interface code to a different platform.

  • Like 3
Link to comment
Share on other sites

Hi phaeron!

 

I see you have built a fantastic emulator, and I am glad it can be run using WINE on Linux. I did not realize that the UI code is such a big part of the your project although I did read some of your sources. It took me a while to figure out what the "vd" directories were for - so it is for "VirtualDub". You have reused your video program code there.

 

Anyway, many thanks for the Altirra emulator and info.

 

 

The atari++ author Thomas Richter helped me with his emulator. He says:

 

with copy protected games like this it is important to use a very
conservative setup. With the default setup, it will indeed not play
correctly.

Hence, to ensure that the game works, please:

- select the "Os B Rom", and provide atari++ with the original ROM image
- select "Atari 800" as machine type
- disable all Os patches, i.e. no "H: device", no "SIO patch",

Then boot from the first disk. This should keep the game happy. It is in
particular important to disable the SIO patch.

 

Based on that piece of advice, I got Conan working with:

atari++ -machine 800 -osbpath /usr/local/atari800/sysroms/ATARIOSB.ROM -siopatch false -InstallHDevice false -FrontEnd SDL -ANTICVideoMode NTSC -GTIAVideoMode NTSC -VideoMode NTSC -acceptlicence true -joystick.0.port AnalogJoystick.0 -image.1
icon_profile.gif
Link to comment
Share on other sites

  • 5 months later...
On 3/7/2019 at 5:16 PM, JokkeH said:

Hello!

 

I use Fedora Linux. I always thought that atari++ and atari800 emulators were good enough until I tried running Conan. Using atari800, all I get is screen corruption everytime I start the game, and have switched from floppy A side to B side.

 

 

I

 

 

 

 

 

 

 

 

It runs on Wine?  Nice, I am looking forward to trying that in about five minutes.  It would be nice to have native binaries though.  I'm running Kubunto 19.10...  I run windows 7 or 10 in a virtual machine on occasion for tech support, but not willingly.

Link to comment
Share on other sites

After posting the above I went ahead and ran the thing.  It runs like a peach under Wine.  Completely transparent and wonderful.  No installation required either.  Its just an executable.  I like this a lot.  My machine is perhaps not the fastest thing going, so I could wish for more speed.  The emulated io is only ok.  Ultraspeed isn't all that ultra or speedy.  More like SIO + than ultra.  What a neat program!

 

Best,

 

Jeff

Link to comment
Share on other sites

  • 1 year later...

@phaeron  This is an old thread, but I was led to it today searching to see if there was a Linux port of Altirra.  First, thank you for what you have done for Atari Enthusiasts (like me) who use your emulator in Windows.

 

Would you ever consider making a libretro core from Altirra?  https://docs.libretro.com/development/cores/developing-cores/

 

If you are not familiar, this approach is what the Retroarch (and a few others like atGames products) emulation systems use to allow many emulators to share a common user and hardware interface.  The core does the actual heavy lifting of emulation in an underlying layer.  Usually the emulation is not quite as good - I suppose because of the passing of video and audio buffers - but the user experience for non-geeks is improved with the uniform interface.  Many thousands of emulation devices are using this thanks to Retropi(Emulation Station), Emuelec and Batocera systems running on emulation handhelds and other devices which use Retroarch as the back-end for emulation of many systems.

 

Currently the only libretro core available for 8-bit emulation is the Atari800 emulator.  I really appreciate having it,  but it has some issues, and was not really implemented with Retroarch in mind.  For example, it's difficult to set up because of the "Atari800" configuration file containing many options which overlaps the "core options" which should generally be used by a libretro core.  Because of the difficulties configuring this, I think 8-bit games are often left alone as "not worth it".

 

IMO, if a better Atari 8-bit emulation libretro core were made available, the number of people playing and appreciating Atari 8-bit games would be multiplied many-fold.  My own agenda is also having the best available 8-bit emulation available on these devices, which I work on, own, and use.

 

I would love to try to do this, but this type of conversion is probably beyond my limited capabilities?  Anyway, just throwing this out there as a possible way to reach many more people with your emulator, and thanks for your consideration of the topic.

 

 

Edited by rocketfan
  • Like 1
Link to comment
Share on other sites

  • 2 years later...

I just recently discovered Batocera 3.7 and it is running some weird Atari emulator where to do a quote marks you have to press Shift-2 (the @ symbol) to get a quotes and the Shift-8 is not an asterisk etc. Truly an awful emulation but they use it because it runs most of the games. But I like to code and want to get to a READY prompt and do some coding and that is almost impossible with a poorly translated keyboard with some oddball Linux emulator like this. Any help updating Batocera Linux to use Altirra?

 

Crosslinking the Bato reddit post to this thread in case we can reach more folks and find an answer. 

 

Edited by Ray Gillman
Link to comment
Share on other sites

22 minutes ago, Ray Gillman said:

I just recently discovered Batocera 3.7 and it is running some weird Atari emulator where to do a quote marks you have to press Shift-2 (the @ symbol) to get a quotes and the Shift-8 is not an asterisk etc. Truly an awful emulation but they use it because it runs most of the games. But I like to code and want to get to a READY prompt and do some coding and that is almost impossible with a poorly translated keyboard with some oddball Linux emulator like this. Any help updating Batocera Linux to use Altirra?

It might be the Atari8 emulator from MAME/MESS

 

Altirra can run pretty well on Linux under Wine,  Not sure what needs to be done to integrate that into Batocera though

Link to comment
Share on other sites

21 hours ago, zzip said:

It might be the Atari8 emulator from MAME/MESS

 

Altirra can run pretty well on Linux under Wine,  Not sure what needs to be done to integrate that into Batocera though

I think the whole point of using Linux was to get the emulators to run better. Retrobat is another example where N64 emulation runs great in Retrobat (in windows64) but XBOX emulation as one example is more demanding and is unsatisfactory.  Wine would likely be the layer that makes this again unsat. So, until we get a Linux version of Altirra we may have to suffer through klunky MAME

Link to comment
Share on other sites

On 1/27/2024 at 12:27 PM, Ray Gillman said:

Wine would likely be the layer that makes this again unsat. So, until we get a Linux version of Altirra we may have to suffer through klunky MAME

Wine doesn't work well with all Windows emulators, but it does work well for Altirra and the Jaguar Emulator BigPemu.

 

But the best native Linux emulator is Atari800, which works extremely well.   There's no real reason to use the MAME one, it's incomplete last I tried it.

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...