Arculator on Linux?

ask about 32-bit emulators like ArcEm, Red Squirrel, Arculator or RPCEmu here
User avatar
dgrubb
Posts: 133
Joined: Thu Jun 02, 2016 8:36 pm

Arculator on Linux?

Postby dgrubb » Thu Jun 02, 2016 9:02 pm

I'm interested in playing around with Arculator and RPCEmu but I'm getting confused by the state of the former. RPCEmu has a slick website providing source code, instructions and so on, so that was pretty straight-forward to get compiled and running.

Arculator is a bit more of a challenge. Is there an up-to-date repository of the source somewhere? Further, is it even possible to compile for Linux? Is it being maintained etc etc ...

Thanks in advance!

User avatar
davidb
Posts: 1824
Joined: Sun Nov 11, 2007 10:11 pm
Contact:

Re: Arculator on Linux?

Postby davidb » Thu Jun 02, 2016 9:12 pm

The source code repository for Arculator was being hosted at Retro Software but this was taken offline after the forums there were compromised. I have an outdated clone of the repository with a few of my own changes at Bitbucket. Others may also have clones or backups.

SarahWalker
Posts: 1036
Joined: Fri Jan 14, 2005 3:56 pm
Contact:

Re: Arculator on Linux?

Postby SarahWalker » Thu Jun 02, 2016 9:17 pm

The current official repo is at https://bitbucket.org/pcem_emulator/arculator, however I suspect it probably doesn't build for Linux at present.

The main reason for the lack of 'slickness' is that there's never been a release of Arculator that supports Linux. v1.0 will do, but I've been working on it on and off for the last seven years without getting near release state.

User avatar
davidb
Posts: 1824
Joined: Sun Nov 11, 2007 10:11 pm
Contact:

Re: Arculator on Linux?

Postby davidb » Thu Jun 02, 2016 10:42 pm

Excellent! I'll update to the latest revision and try to rebuild on Linux.

User avatar
dgrubb
Posts: 133
Joined: Thu Jun 02, 2016 8:36 pm

Re: Arculator on Linux?

Postby dgrubb » Fri Jun 03, 2016 1:37 am

Thanks for the replies, both!

I took a quick crack at it this afternoon by writing a new Makefile. All the source compiled and linked just fine, I think I had to throw in an "#include <stdint.h>" somewhere but that and a few other small things were the only code change I needed to make.

davidb, what do you do about compiling resources? I don't spend a lot of time in Win32-world so wasn't sure how to handle them.

User avatar
davidb
Posts: 1824
Joined: Sun Nov 11, 2007 10:11 pm
Contact:

Re: Arculator on Linux?

Postby davidb » Fri Jun 03, 2016 9:18 am

dgrubb wrote:davidb, what do you do about compiling resources? I don't spend a lot of time in Win32-world so wasn't sure how to handle them.

I don't think I do anything with them. Here's the Makefile I use:

Code: Select all

VPATH = . resid-fp
CPP  = g++
CC   = gcc
WINDRES = windres.exe
CFLAGS = -O3 -ffast-math -fomit-frame-pointer -falign-loops -falign-jumps -falign-functions -DLINUX -ggdb
OBJ = 82c711.o 82c711_fdc.o arcrom.o arm.o cmos.o config.o cp15.o ddnoise.o disc.o disc_adf.o disc_apd.o disc_fdi.o disc_jfd.o disc_ssd.o eterna.o fdi2raw.o fpa.o hostfs.o ics.o ide.o ioc.o keyboard.o main.o mem.o memc.o podules.o podules-linux.o romload.o soundopenal.o st506.o vidc.o wd1770.o win.o

LIBS = -lalleg -lz -lalut -lopenal -lstdc++ -lm -ldl

Arculator.exe: $(OBJ) $(SIDOBJ)
   $(CC) $(OBJ) -o Arculator $(LIBS)

all : Arculator.exe

clean :
   rm *.o

%.o : %.c
   $(CC) $(CFLAGS) -c $<

%.o : %.cc
   $(CPP) $(CFLAGS) -c $<

User avatar
dgrubb
Posts: 133
Joined: Thu Jun 02, 2016 8:36 pm

Re: Arculator on Linux?

Postby dgrubb » Fri Jun 03, 2016 9:07 pm

Thanks, that compiled without any problems. Actually executing the thing has been a bit more problematic for me though.

For some reason the call to create_video_bitmap(2048, 2048) (vid.c:360) was failing and a seg fault would occur when clear() is attempted on vbuf, currently NULL. I changed the arguments to the default window size, 800x600, which got me a valid BITMAP*. Allegro version is 4.4.2, for what it's worth.

Next, it would crash during a free() inside resizemem() (mem.c:108) complaining about an invalid pointer. To get past that immediate problem I simply commented out the operation and swallowed the potential memory leak, assuming that this only gets called when the emulator is restarted.

That got me as far as a program which doesn’t outright crash (hurray!) but (boo!) leaves me with a corrupted looking window (possibly because I was messing with the video bitmap, din't know if all that extra space is being used for blitting, or something?). Hopefully I can get a bit more time to start stepping through and figure out what’s actually going on there.

P.S. I ran the old version available from b-em.bbcmicro.com using wine and, amusingly, it worked fine. #-o

User avatar
dgrubb
Posts: 133
Joined: Thu Jun 02, 2016 8:36 pm

Re: Arculator on Linux?

Postby dgrubb » Mon Jun 06, 2016 6:01 pm

Hrmm, bit of progress by changing create_video_bitmap() to create_system_bitmap() which doesn't use video memory. Not sure why that allocation would be a problem with my 256mb video card, mind. Now I have a cursor!

EDIT: Even better. I have something that's recognisable as a RISC OS pinboard which I can mouse around and open windows in. The resolution is extremely limited and in monochrome though.

User avatar
bakoulis
Posts: 229
Joined: Wed Feb 08, 2012 9:45 pm
Location: Athens, Greece

Re: Arculator on Linux?

Postby bakoulis » Tue Jun 07, 2016 2:06 pm

I hope you will make it to run on Linux properly.
:)
2xElectron, 3xBBC B, BBC Master.
2xAcorn A310, A420/1, 2xA3000, 2xA3010, A3020, A4000, A5000.
2xRISC PC, Acorn Pocket Book, Acorn Pocket Book II.

User avatar
davidb
Posts: 1824
Joined: Sun Nov 11, 2007 10:11 pm
Contact:

Re: Arculator on Linux?

Postby davidb » Tue Jun 07, 2016 2:15 pm

dgrubb wrote:Hrmm, bit of progress by changing create_video_bitmap() to create_system_bitmap() which doesn't use video memory. Not sure why that allocation would be a problem with my 256mb video card, mind. Now I have a cursor!

EDIT: Even better. I have something that's recognisable as a RISC OS pinboard which I can mouse around and open windows in. The resolution is extremely limited and in monochrome though.

I've tried building and running Arculator on a x86_64 system with Debian 7 without problems. Which architecture and distribution are you using?

User avatar
bakoulis
Posts: 229
Joined: Wed Feb 08, 2012 9:45 pm
Location: Athens, Greece

Re: Arculator on Linux?

Postby bakoulis » Tue Jun 07, 2016 2:55 pm

davidb wrote:
dgrubb wrote:Hrmm, bit of progress by changing create_video_bitmap() to create_system_bitmap() which doesn't use video memory. Not sure why that allocation would be a problem with my 256mb video card, mind. Now I have a cursor!

EDIT: Even better. I have something that's recognisable as a RISC OS pinboard which I can mouse around and open windows in. The resolution is extremely limited and in monochrome though.

I've tried building and running Arculator on a x86_64 system with Debian 7 without problems. Which architecture and distribution are you using?

What Makefile you are using. I have copy/paste your code to an empty Makefile, but the command make return "Makefile:11: *** missing separator. Stop.".
Can you upload your Makefile as zip for testing? My distro is Linux Mint 17.3 32-bit.
2xElectron, 3xBBC B, BBC Master.
2xAcorn A310, A420/1, 2xA3000, 2xA3010, A3020, A4000, A5000.
2xRISC PC, Acorn Pocket Book, Acorn Pocket Book II.

User avatar
davidb
Posts: 1824
Joined: Sun Nov 11, 2007 10:11 pm
Contact:

Re: Arculator on Linux?

Postby davidb » Tue Jun 07, 2016 3:15 pm

bakoulis wrote:What Makefile you are using. I have copy/paste your code to an empty Makefile, but the command make return "Makefile:11: *** missing separator. Stop.".
Can you upload your Makefile as zip for testing? My distro is Linux Mint 17.3 32-bit.

Sorry about that. I forgot that Makefiles use tab characters. I've attached the one I use. Put it in the src directory and run make from there.
Attachments
Makefile.zip
Makefile for Arculator on Linux platforms.
(580 Bytes) Downloaded 38 times

User avatar
dgrubb
Posts: 133
Joined: Thu Jun 02, 2016 8:36 pm

Re: Arculator on Linux?

Postby dgrubb » Tue Jun 07, 2016 3:18 pm

davidb wrote:I've tried building and running Arculator on a x86_64 system with Debian 7 without problems. Which architecture and distribution are you using?


Glad to hear that. I'm almost certain my issues are due to platform differences, either in Allegro or some of its interaction with my video hardware. I'm using Debian 8 on an x86_64 system too (an Acer C720 Chromebook, minus the Google goggles):

Code: Select all

dave@Skylark:~$ uname -a
Linux Skylark 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt25-2 (2016-04-08) x86_64 GNU/Linux


Not sure if there's any difference here too:

Code: Select all

dave@Skylark:~: allegro-config --version
4.4.2


I also had to poke in the CPU and MEMC type manually at the beginning of main(), setting both to 2 (ARM3@20MHz and MEMC1A@12MHZ, not sure if this a valid combination).

bakoulis wrote:What Makefile you are using. I have copy/paste your code to an empty Makefile, but the command make return "Makefile:11: *** missing separator. Stop.".


The browser is stripping out tabs for spaces. Where you see indentation just replace the spaces with a true tab (lines: 11, 16, 19, 22).

Edit: ... or just use davidb's upload. :D

User avatar
dgrubb
Posts: 133
Joined: Thu Jun 02, 2016 8:36 pm

Re: Arculator on Linux?

Postby dgrubb » Tue Jun 07, 2016 4:03 pm

davidb, if you get a free moment would you mind doing me a huge favour and substituting the calls to create_video_bitmap() with create_system_bitmap() in initvid() and reinitvideo()?

It should be benign, bar some performance decrease which should be unnoticeable in this use-case, but I want to verify that doesn't have unforeseen side effects. If that works for you perhaps there's a case to be made for changing:

Code: Select all

vbuf = create_video_bitmap(2048, 2048);


to something a little more robust:

Code: Select all

vbuf = create_video_bitmap(2048, 2048);
if (!vbuf) {
   vbuf = create_system_bitmap(2048, 2048);
}
if (!vbuf) {
   /* Fail loudly and exit gracefully. We're dead without a video buffer in any case. */
}

User avatar
bakoulis
Posts: 229
Joined: Wed Feb 08, 2012 9:45 pm
Location: Athens, Greece

Re: Arculator on Linux?

Postby bakoulis » Tue Jun 07, 2016 5:29 pm

I just successfully compiled!
But don't run!
$ ./Arculator

Code: Select all

Shutting down Allegro due to signal #11
[1]    29279 segmentation fault  ./Arculator

$ strace -e open ./Arculator

Code: Select all

open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/i386-linux-gnu/liballeg.so.4.4", O_RDONLY|O_CLOEXEC) = 3
open("/lib/i386-linux-gnu/libz.so.1", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/libalut.so.0", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/i386-linux-gnu/libopenal.so.1", O_RDONLY|O_CLOEXEC) = 3
open("/lib/i386-linux-gnu/libdl.so.2", O_RDONLY|O_CLOEXEC) = 3
open("/lib/i386-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
open("/lib/i386-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
open("/lib/i386-linux-gnu/libpthread.so.0", O_RDONLY|O_CLOEXEC) = 3
open("/lib/i386-linux-gnu/librt.so.1", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/i386-linux-gnu/libX11.so.6", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/i386-linux-gnu/libXext.so.6", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/i386-linux-gnu/libXcursor.so.1", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/i386-linux-gnu/libXpm.so.4", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/i386-linux-gnu/libXxf86vm.so.1", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/i386-linux-gnu/libxcb.so.1", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/i386-linux-gnu/libXrender.so.1", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/i386-linux-gnu/libXfixes.so.3", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/i386-linux-gnu/libXau.so.6", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/i386-linux-gnu/libXdmcp.so.6", O_RDONLY|O_CLOEXEC) = 3
open("/etc/openal/alsoft.conf", O_RDONLY) = 3
open("/home/takis/.alsoftrc", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/i386-linux-gnu/libpulse.so.0", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/i386-linux-gnu/pulseaudio/tls/i686/sse2/cmov/libjson-c.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/i386-linux-gnu/pulseaudio/tls/i686/sse2/libjson-c.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/i386-linux-gnu/pulseaudio/tls/i686/cmov/libjson-c.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/i386-linux-gnu/pulseaudio/tls/i686/libjson-c.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/i386-linux-gnu/pulseaudio/tls/sse2/cmov/libjson-c.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/i386-linux-gnu/pulseaudio/tls/sse2/libjson-c.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/i386-linux-gnu/pulseaudio/tls/cmov/libjson-c.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/i386-linux-gnu/pulseaudio/tls/libjson-c.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/i386-linux-gnu/pulseaudio/i686/sse2/cmov/libjson-c.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/i386-linux-gnu/pulseaudio/i686/sse2/libjson-c.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/i386-linux-gnu/pulseaudio/i686/cmov/libjson-c.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/i386-linux-gnu/pulseaudio/i686/libjson-c.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/i386-linux-gnu/pulseaudio/sse2/cmov/libjson-c.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/i386-linux-gnu/pulseaudio/sse2/libjson-c.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/i386-linux-gnu/pulseaudio/cmov/libjson-c.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/i386-linux-gnu/pulseaudio/libjson-c.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib/i386-linux-gnu/libjson-c.so.2", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/i386-linux-gnu/pulseaudio/libpulsecommon-4.0.so", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/i386-linux-gnu/pulseaudio/libdbus-1.so.3", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib/i386-linux-gnu/libdbus-1.so.3", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/i386-linux-gnu/pulseaudio/libwrap.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib/i386-linux-gnu/libwrap.so.0", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/i386-linux-gnu/pulseaudio/libsndfile.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/i386-linux-gnu/libsndfile.so.1", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/i386-linux-gnu/pulseaudio/libasyncns.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/i386-linux-gnu/libasyncns.so.0", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/i386-linux-gnu/pulseaudio/libnsl.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib/i386-linux-gnu/libnsl.so.1", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/i386-linux-gnu/pulseaudio/libFLAC.so.8", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/i386-linux-gnu/libFLAC.so.8", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/i386-linux-gnu/pulseaudio/libvorbisenc.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/i386-linux-gnu/libvorbisenc.so.2", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/i386-linux-gnu/pulseaudio/libvorbis.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/i386-linux-gnu/libvorbis.so.0", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/i386-linux-gnu/pulseaudio/libogg.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/i386-linux-gnu/libogg.so.0", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/i386-linux-gnu/pulseaudio/libresolv.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib/i386-linux-gnu/libresolv.so.2", O_RDONLY|O_CLOEXEC) = 3
open("/home/takis/.pulse/client.conf", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/home/takis/.config/pulse/client.conf", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/etc/pulse/client.conf", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 5
open("/home/takis/.config/pulse/cookie", O_RDONLY|O_NOCTTY|O_LARGEFILE|O_CLOEXEC) = 6
open("/home/takis/.Xauthority", O_RDONLY) = 6
open("/dev/shm/pulse-shm-1301684604", O_RDONLY|O_NOFOLLOW|O_CLOEXEC) = 6
open("/dev/shm/pulse-shm-4086099388", O_RDONLY|O_NOFOLLOW|O_CLOEXEC) = 6
open("/dev/shm/pulse-shm-4294093500", O_RDONLY|O_NOFOLLOW|O_CLOEXEC) = 6
open("/dev/shm/pulse-shm-3213268156", O_RDONLY|O_NOFOLLOW|O_CLOEXEC) = 6
open("/dev/shm/pulse-shm-3303433640", O_RDONLY|O_NOFOLLOW|O_CLOEXEC) = 6
open("/dev/urandom", O_RDONLY|O_NOCTTY|O_LARGEFILE|O_CLOEXEC) = 5
open("/dev/shm/pulse-shm-2597788676", O_RDWR|O_CREAT|O_EXCL|O_NOFOLLOW|O_CLOEXEC, 0700) = 5
open("/usr/lib/i386-linux-gnu/gconv/gconv-modules.cache", O_RDONLY) = 5
open("/etc/machine-id", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/var/lib/dbus/machine-id", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 5
open("/home/takis/.pulse/client.conf", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/home/takis/.config/pulse/client.conf", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/etc/pulse/client.conf", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 5
open("/home/takis/.config/pulse/cookie", O_RDONLY|O_NOCTTY|O_LARGEFILE|O_CLOEXEC) = 6
open("/home/takis/.Xauthority", O_RDONLY) = 6
open("/dev/shm/pulse-shm-4086099388", O_RDONLY|O_NOFOLLOW|O_CLOEXEC) = 6
open("/dev/shm/pulse-shm-4294093500", O_RDONLY|O_NOFOLLOW|O_CLOEXEC) = 6
open("/dev/shm/pulse-shm-3213268156", O_RDONLY|O_NOFOLLOW|O_CLOEXEC) = 6
open("/dev/shm/pulse-shm-3303433640", O_RDONLY|O_NOFOLLOW|O_CLOEXEC) = 6
open("/dev/urandom", O_RDONLY|O_NOCTTY|O_LARGEFILE|O_CLOEXEC) = 5
open("/dev/shm/pulse-shm-3029849121", O_RDWR|O_CREAT|O_EXCL|O_NOFOLLOW|O_CLOEXEC, 0700) = 5
open("/etc/machine-id", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/var/lib/dbus/machine-id", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 5
open("/usr/lib/i386-linux-gnu/allegro/4.4.2/modules.lst", O_RDONLY) = 6
open("/usr/lib/i386-linux-gnu/allegro/4.4.2/alleg-dga2.so", O_RDONLY|O_CLOEXEC) = 7
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 7
open("/usr/lib/i386-linux-gnu/libXxf86dga.so.1", O_RDONLY|O_CLOEXEC) = 7
open("/usr/lib/i386-linux-gnu/allegro/4.4.2/alleg-alsadigi.so", O_RDONLY|O_CLOEXEC) = 7
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 7
open("/usr/lib/i386-linux-gnu/libasound.so.2", O_RDONLY|O_CLOEXEC) = 7
open("/usr/lib/i386-linux-gnu/allegro/4.4.2/alleg-alsamidi.so", O_RDONLY|O_CLOEXEC) = 7
open("/home/takis/.Xauthority", O_RDONLY) = 7
open("/usr/share/X11/locale/locale.alias", O_RDONLY) = 7
open("/usr/share/X11/locale/locale.dir", O_RDONLY) = 7
open("/usr/share/X11/locale/C/XLC_LOCALE", O_RDONLY) = 7
open("/usr/share/X11/locale/locale.alias", O_RDONLY) = 7
open("/usr/share/X11/locale/locale.dir", O_RDONLY) = 7
open("/usr/share/X11/locale/C/XLC_LOCALE", O_RDONLY) = 7
open("/home/takis/.Xdefaults-takis-desktop", O_RDONLY) = -1 ENOENT (No such file or directory)
--- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0x1c} ---
Shutting down Allegro due to signal #11
--- SIGSEGV {si_signo=SIGSEGV, si_code=SI_TKILL, si_pid=29612, si_uid=1000} ---
+++ killed by SIGSEGV +++
[1]    29609 segmentation fault  strace -e open ./Arculator

$ gdb ./Arculator

Code: Select all

GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.2) 7.7.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./Arculator...done.
(gdb) r
Starting program: /home/takis/Emuls/Arculator/Arculator
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1".
[New Thread 0xb76c4b40 (LWP 31136)]
[Thread 0xb76c4b40 (LWP 31136) exited]
[New Thread 0xb76c4b40 (LWP 31137)]
[New Thread 0xb2cfeb40 (LWP 31138)]
[New Thread 0xb22ffb40 (LWP 31139)]

Program received signal SIGSEGV, Segmentation fault.
0xb7ef3b77 in clear_bitmap () from /usr/lib/i386-linux-gnu/liballeg.so.4.4
(gdb) bt
#0  0xb7ef3b77 in clear_bitmap () from /usr/lib/i386-linux-gnu/liballeg.so.4.4
#1  0x0808000c in clear (bmp=<optimized out>)
    at /usr/include/allegro/alcompat.h:33
#2  initvid () at vidc.c:366
#3  0x0807a021 in arc_init () at main.c:151
#4  0x08049ede in main (argc=1, argv=0xbffff764) at main.c:359
2xElectron, 3xBBC B, BBC Master.
2xAcorn A310, A420/1, 2xA3000, 2xA3010, A3020, A4000, A5000.
2xRISC PC, Acorn Pocket Book, Acorn Pocket Book II.

User avatar
dgrubb
Posts: 133
Joined: Thu Jun 02, 2016 8:36 pm

Re: Arculator on Linux?

Postby dgrubb » Tue Jun 07, 2016 5:39 pm

bakoulis wrote:I just successfully compiled!


Hurray!

bakoulis wrote:But don't run!


Boo!

bakoulis wrote:

Code: Select all

#2  initvid () at vidc.c:366


This is the same problem I had. Allegro isn't allocating video memory for the video buffer so crashes when it attempts to clear the buffer. You can try replacing:

Code: Select all

vbuf = create_video_bitmap(2048, 2048);


with:

Code: Select all

vbuf = create_system_bitmap(2048, 2048);


on lines 360 and 416 of vidc.c and recompile. I don't know if that's valid usage for the rest of the application though and may cause other problems so no warranty is attached with this suggestion. ;)

User avatar
bakoulis
Posts: 229
Joined: Wed Feb 08, 2012 9:45 pm
Location: Athens, Greece

Re: Arculator on Linux?

Postby bakoulis » Tue Jun 07, 2016 6:27 pm

$ ./Arculator

Code: Select all

Shutting down Allegro due to signal #11
[1]    27375 segmentation fault  ./Arculator

$ gdb ./Arculator

Code: Select all

GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.2) 7.7.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./Arculator...done.
(gdb) r
Starting program: /home/takis/Emuls/Arculator/src/Arculator
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1".
[New Thread 0xb76c4b40 (LWP 1850)]
[Thread 0xb76c4b40 (LWP 1850) exited]
[New Thread 0xb76c4b40 (LWP 1851)]
[New Thread 0xb2cffb40 (LWP 1852)]
[New Thread 0xb22ffb40 (LWP 1853)]
[New Thread 0xaeffbb40 (LWP 1854)]

Program received signal SIGSEGV, Segmentation fault.
0xb7ef3b77 in clear_bitmap () from /usr/lib/i386-linux-gnu/liballeg.so.4.4
(gdb) bt
#0  0xb7ef3b77 in clear_bitmap () from /usr/lib/i386-linux-gnu/liballeg.so.4.4
#1  0x0808028d in clear (bmp=<optimized out>)
    at /usr/include/allegro/alcompat.h:33
#2  setredrawall () at vidc.c:385
#3  reinitvideo () at vidc.c:420
#4  0x0807a24b in arc_init () at main.c:208
#5  0x08049f1e in main (argc=1, argv=0xbffff754) at main.c:359
(gdb) quit
A debugging session is active.

   Inferior 1 [process 1846] will be killed.

Quit anyway? (y or n) y

$ strace -e open ./Arculator

Code: Select all

open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/i386-linux-gnu/liballeg.so.4.4", O_RDONLY|O_CLOEXEC) = 3
open("/lib/i386-linux-gnu/libz.so.1", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/libalut.so.0", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/i386-linux-gnu/libopenal.so.1", O_RDONLY|O_CLOEXEC) = 3
open("/lib/i386-linux-gnu/libdl.so.2", O_RDONLY|O_CLOEXEC) = 3
open("/lib/i386-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
open("/lib/i386-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
open("/lib/i386-linux-gnu/libpthread.so.0", O_RDONLY|O_CLOEXEC) = 3
open("/lib/i386-linux-gnu/librt.so.1", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/i386-linux-gnu/libX11.so.6", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/i386-linux-gnu/libXext.so.6", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/i386-linux-gnu/libXcursor.so.1", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/i386-linux-gnu/libXpm.so.4", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/i386-linux-gnu/libXxf86vm.so.1", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/i386-linux-gnu/libxcb.so.1", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/i386-linux-gnu/libXrender.so.1", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/i386-linux-gnu/libXfixes.so.3", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/i386-linux-gnu/libXau.so.6", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/i386-linux-gnu/libXdmcp.so.6", O_RDONLY|O_CLOEXEC) = 3
open("/etc/openal/alsoft.conf", O_RDONLY) = 3
open("/home/takis/.alsoftrc", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/i386-linux-gnu/libpulse.so.0", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/i386-linux-gnu/pulseaudio/tls/i686/sse2/cmov/libjson-c.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/i386-linux-gnu/pulseaudio/tls/i686/sse2/libjson-c.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/i386-linux-gnu/pulseaudio/tls/i686/cmov/libjson-c.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/i386-linux-gnu/pulseaudio/tls/i686/libjson-c.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/i386-linux-gnu/pulseaudio/tls/sse2/cmov/libjson-c.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/i386-linux-gnu/pulseaudio/tls/sse2/libjson-c.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/i386-linux-gnu/pulseaudio/tls/cmov/libjson-c.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/i386-linux-gnu/pulseaudio/tls/libjson-c.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/i386-linux-gnu/pulseaudio/i686/sse2/cmov/libjson-c.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/i386-linux-gnu/pulseaudio/i686/sse2/libjson-c.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/i386-linux-gnu/pulseaudio/i686/cmov/libjson-c.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/i386-linux-gnu/pulseaudio/i686/libjson-c.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/i386-linux-gnu/pulseaudio/sse2/cmov/libjson-c.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/i386-linux-gnu/pulseaudio/sse2/libjson-c.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/i386-linux-gnu/pulseaudio/cmov/libjson-c.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/i386-linux-gnu/pulseaudio/libjson-c.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib/i386-linux-gnu/libjson-c.so.2", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/i386-linux-gnu/pulseaudio/libpulsecommon-4.0.so", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/i386-linux-gnu/pulseaudio/libdbus-1.so.3", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib/i386-linux-gnu/libdbus-1.so.3", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/i386-linux-gnu/pulseaudio/libwrap.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib/i386-linux-gnu/libwrap.so.0", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/i386-linux-gnu/pulseaudio/libsndfile.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/i386-linux-gnu/libsndfile.so.1", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/i386-linux-gnu/pulseaudio/libasyncns.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/i386-linux-gnu/libasyncns.so.0", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/i386-linux-gnu/pulseaudio/libnsl.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib/i386-linux-gnu/libnsl.so.1", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/i386-linux-gnu/pulseaudio/libFLAC.so.8", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/i386-linux-gnu/libFLAC.so.8", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/i386-linux-gnu/pulseaudio/libvorbisenc.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/i386-linux-gnu/libvorbisenc.so.2", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/i386-linux-gnu/pulseaudio/libvorbis.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/i386-linux-gnu/libvorbis.so.0", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/i386-linux-gnu/pulseaudio/libogg.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/i386-linux-gnu/libogg.so.0", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/i386-linux-gnu/pulseaudio/libresolv.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib/i386-linux-gnu/libresolv.so.2", O_RDONLY|O_CLOEXEC) = 3
open("/home/takis/.pulse/client.conf", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/home/takis/.config/pulse/client.conf", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/etc/pulse/client.conf", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 5
open("/home/takis/.config/pulse/cookie", O_RDONLY|O_NOCTTY|O_LARGEFILE|O_CLOEXEC) = 6
open("/home/takis/.Xauthority", O_RDONLY) = 6
open("/dev/shm/pulse-shm-2406773284", O_RDONLY|O_NOFOLLOW|O_CLOEXEC) = 6
open("/dev/shm/pulse-shm-2033809337", O_RDONLY|O_NOFOLLOW|O_CLOEXEC) = 6
open("/dev/shm/pulse-shm-4294093500", O_RDONLY|O_NOFOLLOW|O_CLOEXEC) = 6
open("/dev/shm/pulse-shm-3213268156", O_RDONLY|O_NOFOLLOW|O_CLOEXEC) = 6
open("/dev/shm/pulse-shm-3303433640", O_RDONLY|O_NOFOLLOW|O_CLOEXEC) = 6
open("/dev/urandom", O_RDONLY|O_NOCTTY|O_LARGEFILE|O_CLOEXEC) = 5
open("/dev/shm/pulse-shm-2182015562", O_RDWR|O_CREAT|O_EXCL|O_NOFOLLOW|O_CLOEXEC, 0700) = 5
open("/usr/lib/i386-linux-gnu/gconv/gconv-modules.cache", O_RDONLY) = 5
open("/etc/machine-id", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/var/lib/dbus/machine-id", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 5
open("/home/takis/.pulse/client.conf", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/home/takis/.config/pulse/client.conf", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/etc/pulse/client.conf", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 5
open("/home/takis/.config/pulse/cookie", O_RDONLY|O_NOCTTY|O_LARGEFILE|O_CLOEXEC) = 6
open("/home/takis/.Xauthority", O_RDONLY) = 6
open("/dev/shm/pulse-shm-2033809337", O_RDONLY|O_NOFOLLOW|O_CLOEXEC) = 6
open("/dev/shm/pulse-shm-4294093500", O_RDONLY|O_NOFOLLOW|O_CLOEXEC) = 6
open("/dev/shm/pulse-shm-3213268156", O_RDONLY|O_NOFOLLOW|O_CLOEXEC) = 6
open("/dev/shm/pulse-shm-3303433640", O_RDONLY|O_NOFOLLOW|O_CLOEXEC) = 6
open("/dev/urandom", O_RDONLY|O_NOCTTY|O_LARGEFILE|O_CLOEXEC) = 5
open("/dev/shm/pulse-shm-1073140428", O_RDWR|O_CREAT|O_EXCL|O_NOFOLLOW|O_CLOEXEC, 0700) = 5
open("/etc/machine-id", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/var/lib/dbus/machine-id", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 5
open("/usr/lib/i386-linux-gnu/allegro/4.4.2/modules.lst", O_RDONLY) = 6
open("/usr/lib/i386-linux-gnu/allegro/4.4.2/alleg-dga2.so", O_RDONLY|O_CLOEXEC) = 7
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 7
open("/usr/lib/i386-linux-gnu/libXxf86dga.so.1", O_RDONLY|O_CLOEXEC) = 7
open("/usr/lib/i386-linux-gnu/allegro/4.4.2/alleg-alsadigi.so", O_RDONLY|O_CLOEXEC) = 7
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 7
open("/usr/lib/i386-linux-gnu/libasound.so.2", O_RDONLY|O_CLOEXEC) = 7
open("/usr/lib/i386-linux-gnu/allegro/4.4.2/alleg-alsamidi.so", O_RDONLY|O_CLOEXEC) = 7
open("/home/takis/.Xauthority", O_RDONLY) = 7
open("/usr/share/X11/locale/locale.alias", O_RDONLY) = 7
open("/usr/share/X11/locale/locale.dir", O_RDONLY) = 7
open("/usr/share/X11/locale/C/XLC_LOCALE", O_RDONLY) = 7
open("/usr/share/X11/locale/locale.alias", O_RDONLY) = 7
open("/usr/share/X11/locale/locale.dir", O_RDONLY) = 7
open("/usr/share/X11/locale/C/XLC_LOCALE", O_RDONLY) = 7
open("/home/takis/.Xdefaults-takis-desktop", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/home/takis/Emuls/Arculator/src/hd4.hdf", O_RDWR) = 7
open("/home/takis/Emuls/Arculator/src/hd5.hdf", O_RDWR) = 8
open("arm.c", O_RDONLY)                 = 9
open("config.o", O_RDONLY)              = 9
open("disc_adf.o", O_RDONLY)            = 9
open("disc_apd.c", O_RDONLY)            = 9
open("disc_apd.o", O_RDONLY)            = 9
open("disc_ssd.o", O_RDONLY)            = 9
open("eterna.o", O_RDONLY)              = 9
open("fdi2raw.o", O_RDONLY)             = 9
open("hd4.hdf", O_RDONLY)               = 9
open("keytable.h", O_RDONLY)            = 9
open("mem.o", O_RDONLY)                 = 9
open("podules.o", O_RDONLY)             = 9
open("resources.h", O_RDONLY)           = 9
open("sound.h", O_RDONLY)               = 9
open("soundopenal.c", O_RDONLY)         = 9
open("vidc.h", O_RDONLY)                = 9
open("arm.c", O_RDONLY)                 = 9
open("config.o", O_RDONLY)              = 9
open("disc_adf.o", O_RDONLY)            = 9
open("disc_apd.c", O_RDONLY)            = 9
open("disc_apd.o", O_RDONLY)            = 9
open("disc_ssd.o", O_RDONLY)            = 9
open("eterna.o", O_RDONLY)              = 9
open("fdi2raw.o", O_RDONLY)             = 9
open("hd4.hdf", O_RDONLY)               = 9
open("keytable.h", O_RDONLY)            = 9
open("mem.o", O_RDONLY)                 = 9
open("podules.o", O_RDONLY)             = 9
open("resources.h", O_RDONLY)           = 9
open("sound.h", O_RDONLY)               = 9
open("soundopenal.c", O_RDONLY)         = 9
open("vidc.h", O_RDONLY)                = 9
open("arm.c", O_RDONLY)                 = 9
open("config.o", O_RDONLY)              = 9
open("disc_adf.o", O_RDONLY)            = 9
open("disc_apd.c", O_RDONLY)            = 9
open("disc_apd.o", O_RDONLY)            = 9
open("disc_ssd.o", O_RDONLY)            = 9
open("eterna.o", O_RDONLY)              = 9
open("fdi2raw.o", O_RDONLY)             = 9
open("hd4.hdf", O_RDONLY)               = 9
open("keytable.h", O_RDONLY)            = 9
open("mem.o", O_RDONLY)                 = 9
open("podules.o", O_RDONLY)             = 9
open("resources.h", O_RDONLY)           = 9
open("sound.h", O_RDONLY)               = 9
open("soundopenal.c", O_RDONLY)         = 9
open("vidc.h", O_RDONLY)                = 9
open("arm.c", O_RDONLY)                 = 9
open("config.o", O_RDONLY)              = 9
open("disc_adf.o", O_RDONLY)            = 9
open("disc_apd.c", O_RDONLY)            = 9
open("disc_apd.o", O_RDONLY)            = 9
open("disc_ssd.o", O_RDONLY)            = 9
open("eterna.o", O_RDONLY)              = 9
open("fdi2raw.o", O_RDONLY)             = 9
open("hd4.hdf", O_RDONLY)               = 9
open("keytable.h", O_RDONLY)            = 9
open("mem.o", O_RDONLY)                 = 9
open("podules.o", O_RDONLY)             = 9
open("resources.h", O_RDONLY)           = 9
open("sound.h", O_RDONLY)               = 9
open("soundopenal.c", O_RDONLY)         = 9
open("vidc.h", O_RDONLY)                = 9
open("01", O_RDONLY)                    = -1 ENOENT (No such file or directory)
open("arm.c", O_RDONLY)                 = 9
open("config.o", O_RDONLY)              = 9
open("disc_adf.o", O_RDONLY)            = 9
open("disc_apd.c", O_RDONLY)            = 9
open("disc_apd.o", O_RDONLY)            = 9
open("disc_ssd.o", O_RDONLY)            = 9
open("eterna.o", O_RDONLY)              = 9
open("fdi2raw.o", O_RDONLY)             = 9
open("hd4.hdf", O_RDONLY)               = 9
open("keytable.h", O_RDONLY)            = 9
open("mem.o", O_RDONLY)                 = 9
open("podules.o", O_RDONLY)             = 9
open("resources.h", O_RDONLY)           = 9
open("sound.h", O_RDONLY)               = 9
open("soundopenal.c", O_RDONLY)         = 9
open("vidc.h", O_RDONLY)                = 9
open("arm.c", O_RDONLY)                 = 9
open("config.o", O_RDONLY)              = 9
open("disc_adf.o", O_RDONLY)            = 9
open("disc_apd.c", O_RDONLY)            = 9
open("disc_apd.o", O_RDONLY)            = 9
open("disc_ssd.o", O_RDONLY)            = 9
open("eterna.o", O_RDONLY)              = 9
open("fdi2raw.o", O_RDONLY)             = 9
open("hd4.hdf", O_RDONLY)               = 9
open("keytable.h", O_RDONLY)            = 9
open("mem.o", O_RDONLY)                 = 9
open("podules.o", O_RDONLY)             = 9
open("resources.h", O_RDONLY)           = 9
open("sound.h", O_RDONLY)               = 9
open("soundopenal.c", O_RDONLY)         = 9
open("vidc.h", O_RDONLY)                = 9
open("idefs", O_RDONLY)                 = -1 ENOENT (No such file or directory)
open("arcrom", O_RDONLY)                = -1 ENOENT (No such file or directory)
open("/home/takis/Emuls/Arculator/src/cmos/riscos3_new/cmos.bin", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/locale/locale-archive", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 9
open("/usr/share/X11/locale/locale.alias", O_RDONLY) = 9
open("/usr/share/X11/locale/locale.alias", O_RDONLY) = 9
open("/usr/share/X11/locale/locale.dir", O_RDONLY) = 9
open("/usr/share/X11/locale/en_US.UTF-8/XLC_LOCALE", O_RDONLY) = 9
open("/usr/share/X11/locale/compose.dir", O_RDONLY) = 9
open("/usr/share/X11/locale/el_GR.UTF-8/Compose", O_RDONLY) = 9
open("/home/takis/.XCompose", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/X11/locale/compose.dir", O_RDONLY) = 9
open("/usr/share/X11/locale/el_GR.UTF-8/Compose", O_RDONLY) = 9
open("/usr/share/X11/XKeysymDB", O_RDONLY) = -1 ENOENT (No such file or directory)
--- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0x1c} ---
Shutting down Allegro due to signal #11
--- SIGSEGV {si_signo=SIGSEGV, si_code=SI_TKILL, si_pid=1056, si_uid=1000} ---
+++ killed by SIGSEGV +++
[1]    1053 segmentation fault  strace -e open ./Arculator


Not big success!
2xElectron, 3xBBC B, BBC Master.
2xAcorn A310, A420/1, 2xA3000, 2xA3010, A3020, A4000, A5000.
2xRISC PC, Acorn Pocket Book, Acorn Pocket Book II.

User avatar
dgrubb
Posts: 133
Joined: Thu Jun 02, 2016 8:36 pm

Re: Arculator on Linux?

Postby dgrubb » Tue Jun 07, 2016 6:36 pm

It's tripping over an invalid value for vbuf, but at a different place this time, after reinitvideo(). Did you catch the call to create_video_bitmap() at 417?

User avatar
davidb
Posts: 1824
Joined: Sun Nov 11, 2007 10:11 pm
Contact:

Re: Arculator on Linux?

Postby davidb » Tue Jun 07, 2016 7:11 pm

dgrubb, I'll try your changes. I've just tried building on Debian 8 and also hit a segfault thanks to Allegro.

User avatar
dgrubb
Posts: 133
Joined: Thu Jun 02, 2016 8:36 pm

Re: Arculator on Linux?

Postby dgrubb » Tue Jun 07, 2016 7:14 pm

Cool, thanks! I'm flipping it around and am about to install Debian 7 on a VM. It'll take a little while for the .iso to download and install though.

Edit: Attached a screenshot of what I'm currently seeing.

arculator.png
Arculator screenshot

User avatar
dgrubb
Posts: 133
Joined: Thu Jun 02, 2016 8:36 pm

Re: Arculator on Linux?

Postby dgrubb » Wed Jun 08, 2016 4:11 pm

The problems are still occurring for me under Debian 7 too. Although, I notice that it has the same version of Allegro that 8 provides. Had you not done an apt-get update in a while, or is it related to something else?

I'm very tempted to build Allegro from source so I can link against the debug libs.

User avatar
dgrubb
Posts: 133
Joined: Thu Jun 02, 2016 8:36 pm

Re: Arculator on Linux?

Postby dgrubb » Fri Jun 10, 2016 9:52 pm

Ah! Figured out why the free() was crashing out. The variables "ram" and "rom" are explicitly cast as uint32_t for holding 32-bit pointers but gcc is defaulting to 64-bit so it's an invalid pointer. I added the -m32 flag to the Makefile to force 32-bit compatibility but then it's choking under standard includes which Allegro is referencing (cdefs.h, for instance). I wonder if that was the difference between your Debian 7 and 8 installs, multiarch?

I also wonder how much of this may also explain my distorted video, if certain parameters are being misrepresented and screen location calculations are going askew? EDIT: after resolving all the 32bit dependencies and recompiling, no. No it did not.

User avatar
bakoulis
Posts: 229
Joined: Wed Feb 08, 2012 9:45 pm
Location: Athens, Greece

Re: Arculator on Linux?

Postby bakoulis » Sat Jun 11, 2016 10:46 am

It's something strange that nobody expert don't spend few hours to make a working version of Arculator for the latest Debian 8 Linux.
:o
2xElectron, 3xBBC B, BBC Master.
2xAcorn A310, A420/1, 2xA3000, 2xA3010, A3020, A4000, A5000.
2xRISC PC, Acorn Pocket Book, Acorn Pocket Book II.

User avatar
dgrubb
Posts: 133
Joined: Thu Jun 02, 2016 8:36 pm

Re: Arculator on Linux?

Postby dgrubb » Mon Jun 13, 2016 9:49 pm

I have a very long roadtrip ahead this week, so maybe I'll get time to work on it some more while the wife is doing her share of the driving. Unfortunately, the VIDC code is, necessarily, a little complicated and so a bit hard to break into but that's where I really need to dive into to make any further progress. The other fixes are low hanging fruit by comparison.

If it's just a functioning emulator on Linux you're after the Windows version runs happily enough under wine, and ArcEm compiled and ran just fine.

User avatar
davidb
Posts: 1824
Joined: Sun Nov 11, 2007 10:11 pm
Contact:

Re: Arculator on Linux?

Postby davidb » Mon Jun 13, 2016 11:21 pm

I'll try to look at it again in the near future but I've got a lot of other things on at the moment. I wanted to add video recording support to it, so it will definitely be worthwhile to have more than one person look at the graphics system. :)

Good luck and safe driving! :D

User avatar
dgrubb
Posts: 133
Joined: Thu Jun 02, 2016 8:36 pm

Re: Arculator on Linux?

Postby dgrubb » Tue Jun 14, 2016 3:39 pm

davidb wrote:I wanted to add video recording support to it


Nice!

davidb wrote:it will definitely be worthwhile to have more than one person look at the graphics system.


I've been meaning to ask whether there was a possibility that upstream contributions would be accepted. I've been feeling a little presumptuous inviting myself to the party. ;)

With that implicit acknowledgement I went ahead and cloned Sarah's repo:

https://bitbucket.org/dgrubb/arculator/ ... patibility

There are a few other nice-to-haves I want to add: verbose flag to echo rpclog() output to stdout, checking return values in a bunch of places, document the config file flags, that sort of thing.

davidb wrote:Good luck and safe driving! :D


Cheers! Four days of driving with three kids in the back, one of whom is a nursing infant. It's going to be a loooooong drive. [-o<

SarahWalker
Posts: 1036
Joined: Fri Jan 14, 2005 3:56 pm
Contact:

Re: Arculator on Linux?

Postby SarahWalker » Tue Jun 14, 2016 5:14 pm

Feel free to contribute! As you might be able to tell, I'm not exactly spending much time on Arculator so any assistance is welcome :)

sirbod
Posts: 606
Joined: Mon Apr 09, 2012 8:44 am
Location: Essex
Contact:

Re: Arculator on Linux?

Postby sirbod » Tue Jun 14, 2016 7:46 pm

SarahWalker wrote:Feel free to contribute! As you might be able to tell, I'm not exactly spending much time on Arculator so any assistance is welcome :)

Speaking of which, I need to look at the JFD code as it's failing to read floppies when emulating RO3 (old FDC) :(

User avatar
dgrubb
Posts: 133
Joined: Thu Jun 02, 2016 8:36 pm

Re: Arculator on Linux?

Postby dgrubb » Tue Jun 14, 2016 8:13 pm

SarahWalker wrote:Feel free to contribute! As you might be able to tell, I'm not exactly spending much time on Arculator so any assistance is welcome :)


Lovely, thanks. :)

User avatar
bakoulis
Posts: 229
Joined: Wed Feb 08, 2012 9:45 pm
Location: Athens, Greece

Re: Arculator on Linux?

Postby bakoulis » Sun Jun 19, 2016 5:44 pm

Have you any progress with Arculator on Linux?
Allegro don't let me run Arculator on my Linux Mint 17.3 box. I use the RPCemu, but isn't an Archie RO2/Arthur emulator. Is a RiscPC emulator.
To the past with the help of community, I compiled and run successful Beebem, B-em, Elkulator and Atomulator.
Ofcourse Allegro fault at first for B-em and Elkulator, but finally worked with some tweaks.
I believe Arculator can work too with some tweaks, but someone expert must do the hard job for us.
[-o<
2xElectron, 3xBBC B, BBC Master.
2xAcorn A310, A420/1, 2xA3000, 2xA3010, A3020, A4000, A5000.
2xRISC PC, Acorn Pocket Book, Acorn Pocket Book II.


Return to “emulators”

Who is online

Users browsing this forum: No registered users and 1 guest