Mac Arculator

ask about 32-bit emulators like ArcEm, Red Squirrel, Arculator or RPCEmu here
User avatar
geraldholdsworth
Posts: 356
Joined: Tue Nov 04, 2014 9:42 pm
Location: Inverness, Scotland
Contact:

Mac Arculator

Postby geraldholdsworth » Sat Jan 14, 2017 7:39 pm

Hi all,

A while ago Jon Welch sent me the source to the Mac version of Arculator in order for me to attempt to update it (you may have seen my posts in these forums). My idea was to make it look and feel like RPCEmu, but for Archimedes. However, this is going to take me forever to do, mainly because I need to learn X-Code, and how to write MacOS X applications.

Therefore, what I am proposing, is that I make the source available for others (who do know what they're doing) to contribute towards improving this version.

Anyone interested?

Cheers,

Gerald.
Gerald Holdsworth
Repton Resource Page
www.reptonresourcepage.co.uk

sfdNut
Posts: 61
Joined: Fri Jul 08, 2016 10:13 am
Contact:

Re: Mac Arculator

Postby sfdNut » Thu Oct 19, 2017 4:22 pm

I'm interested.
I have a Mac and X-Code and am currently learning Swift programming, although I suspect the current code will be in Objective-C?

I'd like to get involved at least :D

g7jjf
Posts: 357
Joined: Sun Aug 07, 2005 7:29 pm
Location: Notts, England
Contact:

Re: Mac Arculator

Postby g7jjf » Fri Oct 20, 2017 10:21 am

The code is in straight C using the Allegro libraries.

You can download the source and libraries by ftpping to g7jjf.synology.me

Log in as arculator, password riscos and the files are in the home directory.

Jon

User avatar
geraldholdsworth
Posts: 356
Joined: Tue Nov 04, 2014 9:42 pm
Location: Inverness, Scotland
Contact:

Re: Mac Arculator

Postby geraldholdsworth » Fri Oct 20, 2017 3:46 pm

I think I went in too deep, volunteering to update Arculator on the Mac. Baptism by fire, I think they call it, learning to program a new language on a different platform.
Gerald Holdsworth
Repton Resource Page
www.reptonresourcepage.co.uk

User avatar
myelin
Posts: 376
Joined: Tue Apr 26, 2016 9:17 pm
Location: San Francisco, CA, USA
Contact:

Re: Mac Arculator

Postby myelin » Thu May 17, 2018 8:35 pm

How did this go? I'm poking at porting it to Allegro 5 at the moment, working with Sarah's official sources (https://bitbucket.org/pcem_emulator/arculator), which I assume are the most up to date. I'm not touching any of the GUI side of things, just trying to get the basics working. Looks like quite a few convenience functions (al_findfirst, append_filename, etc) disappeared from Allegro between 4 and 5, and the graphics code changed rather a lot, so it looks like a big job...
SW/EE from New Zealand, now in San Francisco, making BBC/Electron hardware projects for fun.
Most popular: fast serial port, FX2+PiTubeDirect Tube/Cartridge adapter, USB cart interface.

User avatar
danielj
Posts: 5977
Joined: Thu Oct 02, 2008 4:51 pm
Location: Manchester
Contact:

Re: Mac Arculator

Postby danielj » Thu May 17, 2018 8:48 pm

Allegro 4 won't compile on the mac at all anymore. If someone's managed it I'd love to know?

d.

User avatar
geraldholdsworth
Posts: 356
Joined: Tue Nov 04, 2014 9:42 pm
Location: Inverness, Scotland
Contact:

Re: Mac Arculator

Postby geraldholdsworth » Fri May 18, 2018 8:08 am

myelin wrote:How did this go?

Haven't got far.
I was hoping to make Arculator like RPCemu, but it looks like the whole thing needs to be overhauled, as Allegro 4 won't compile. For me, this has ended up as a project (one of many) for a another day. Work and life are getting in the way! :lol:
That link is to the PC version. Attached is Jon's Mac version.
Attachments
Arculator SRC.zip
Mac Arculator 0.8 source
(4.49 MiB) Downloaded 5 times
Gerald Holdsworth
Repton Resource Page
www.reptonresourcepage.co.uk

User avatar
Elminster
Posts: 1776
Joined: Wed Jun 20, 2012 8:09 am
Location: Essex, UK
Contact:

Re: Mac Arculator

Postby Elminster » Fri May 18, 2018 4:34 pm

After reading this I thought I would have a play, As Mac version seemed busted I thought I would try compiling Linux Arculator to see how it works, but while it compiled (I after I fudged shift4 and shiftmem to static) that seems to stack dump, will have to go chase davidb why that is happening at some point.

Failed 2 out of 2.

User avatar
myelin
Posts: 376
Joined: Tue Apr 26, 2016 9:17 pm
Location: San Francisco, CA, USA
Contact:

Re: Mac Arculator

Postby myelin » Fri May 18, 2018 4:50 pm

I spent a while adding function definitions, moving things around, and disabling huge amount of code with #ifdef blocks, and I have it compiling under Allegro 5 on a Mac using clang in C++ mode (i.e. a lot stricter than the default). The shift4 problem just disappeared at some point, which is puzzling, but I assume it was connected to one of the many redefinition errors. It doesn't really run at all yet, because I had to completely disable video, but that shouldn't be too terrible to at least basically fix :) Need Sarah to put a LICENSE or COPYING file in the repo root before work will let me release my changes, but I'll start pushing them to bitbucket as soon as that happens.

I see RPCEmu ripped out Allegro entirely and replaced it with Qt5... that looks worth investigating too, because it would give us a cross-platform UI too.
SW/EE from New Zealand, now in San Francisco, making BBC/Electron hardware projects for fun.
Most popular: fast serial port, FX2+PiTubeDirect Tube/Cartridge adapter, USB cart interface.

User avatar
SarahWalker
Posts: 1071
Joined: Fri Jan 14, 2005 3:56 pm
Contact:

Re: Mac Arculator

Postby SarahWalker » Fri May 18, 2018 6:13 pm

My other (only?) active emulator, PCem, recently switched to wxWidgets + SDL2 for cross-platform UI goodness. I'd personally prefer that to Qt5, for the entirely selfish reason that I only have to learn one UI library :)

VincentVega
Posts: 239
Joined: Thu Sep 11, 2008 9:19 pm
Contact:

Re: Mac Arculator

Postby VincentVega » Fri May 18, 2018 9:08 pm

myelin wrote:I see RPCEmu ripped out Allegro entirely and replaced it with Qt5... that looks worth investigating too, because it would give us a cross-platform UI too.


The last time I tried compiling one of the beta versions of RPCEmu against QT5, the keyboard didn't work, as there's apparently no way to get native scan codes on OS X (though how does Allegro manage?). QT took an age to compile as well, even on a 2017-vintage iMac.

I ported RPCEmu to Allegro 5 a while ago (there's probably a thread around here somewhere with a download link). My strategy was to make an Xcode project, hit "Build" and start going through the list of errors one by one. Sound was a bit of a pain, as that's even more different than the rest of Allegro 5, and I seem to recall having lots of fun with the video side of things. It all worked once I'd finished, but I lost interest after that. I did also think about porting it to SDL2, but that's something else that got put on the "perhaps some other time" pile.

User avatar
myelin
Posts: 376
Joined: Tue Apr 26, 2016 9:17 pm
Location: San Francisco, CA, USA
Contact:

Re: Mac Arculator

Postby myelin » Fri May 18, 2018 9:37 pm

VincentVega wrote:My strategy was to make an Xcode project, hit "Build" and start going through the list of errors one by one.

That's what I've been doing for Allegro 5 + Arculator. Allegro 5 seems to have a less 'raw' bitmap/display interface, though, and my experience with Qt5 seems similar to yours, so I feel like neither of those is going to make for a convenient porting process. I'll go take a look at SDL2's 2D graphics code (and Sarah's PCem graphics code) and see if that would be an easier port!
SW/EE from New Zealand, now in San Francisco, making BBC/Electron hardware projects for fun.
Most popular: fast serial port, FX2+PiTubeDirect Tube/Cartridge adapter, USB cart interface.

User avatar
myelin
Posts: 376
Joined: Tue Apr 26, 2016 9:17 pm
Location: San Francisco, CA, USA
Contact:

Re: Mac Arculator

Postby myelin » Sat May 19, 2018 3:19 am

Looking at the PCem code, I'm thinking that the best thing to do might be to lift as much as possible from there, or merge Arculator into it... it looks like it has a nice degree of separation between the emulator code and the platform code, so it should be feasible to remove all the PC specific stuff (x86 processors, all the various graphics and sound interfaces) and wire in Arculator.
SW/EE from New Zealand, now in San Francisco, making BBC/Electron hardware projects for fun.
Most popular: fast serial port, FX2+PiTubeDirect Tube/Cartridge adapter, USB cart interface.

User avatar
myelin
Posts: 376
Joined: Tue Apr 26, 2016 9:17 pm
Location: San Francisco, CA, USA
Contact:

Re: Mac Arculator

Postby myelin » Mon May 21, 2018 5:23 pm

Sarah pinged me over the weekend to say she's starting work on porting Arculator over to SDL. I pushed my current work for reference... my code removes the Allegro dependency, but doesn't replace it with anything, so Arculator will run but have no I/O capability.

To avoid duplicating work, I'm going to pause this for now, and maybe spend some time documenting the PCem architecture (which has a Direct3D frontend for Windows, and SDL for Linux and macOS, plus a whole lot of pluggable things). Hopefully that'll come in handy for us down the line.
SW/EE from New Zealand, now in San Francisco, making BBC/Electron hardware projects for fun.
Most popular: fast serial port, FX2+PiTubeDirect Tube/Cartridge adapter, USB cart interface.

User avatar
SarahWalker
Posts: 1071
Joined: Fri Jan 14, 2005 3:56 pm
Contact:

Re: Mac Arculator

Postby SarahWalker » Mon May 21, 2018 6:00 pm

One thing to be aware of is that the guy who did the wxWidgets code for PCem implemented a sort of 'compatibility layer' in wx-utils.cc, to aid porting the GUI from Win32. I'd personally advice that Arculator _doesn't_ use this - I've found it to be quite confusing when trying to modify the GUI further. Since Arculator doesn't have that much GUI to port, it probably won't be that much work to just use the new toolkit directly.