Beeb emulator for raspberry pi?

want to talk about MESS/model b/beebem/b-em/electrem/elkulator? do it here!
User avatar
Arkas
Posts: 27
Joined: Sat Feb 04, 2017 12:05 am

Beeb emulator for raspberry pi?

Postby Arkas » Thu May 25, 2017 9:40 am

I've been messing around with my raspberry pi 3 and to my surprise I found that there isn't a Beeb emulator that works on it (unless you install RISCOS).
Has anyone had any luck with any Beeb emulator on raspbian?

User avatar
pau1ie
Posts: 315
Joined: Thu May 10, 2012 9:48 pm
Location: Bedford

Re: Beeb emulator for raspberry pi?

Postby pau1ie » Thu May 25, 2017 10:01 am

b-em works. I haven't tried it on the pi 3. On the pi 1 it was too slow, but it might be fast enough on the pi 3. I did upload a version with ARM assembler for the CPU emulation taken from beebdroid, but that didn't give enough of a performance boost because it was updating the display which was the slowest part. I would download it and try to compile it if you know how. If not, let me know and I will give you commands to paste in.
I'm working on http://bbcmicro.co.uk

User avatar
BigEd
Posts: 1482
Joined: Sun Jan 24, 2010 10:24 am
Location: West
Contact:

Re: Beeb emulator for raspberry pi?

Postby BigEd » Thu May 25, 2017 10:07 am

It would be great to crack this problem - just a tad too much CPU needed by the emulators. Booting into a full-screen emulation would be just what the Pi needs. Meantime, there's RISC OS Pico, which pretty much does that, if you're happy to use Basic. (Machine code also fine, if you're happy to write in ARMish!)

User avatar
Arkas
Posts: 27
Joined: Sat Feb 04, 2017 12:05 am

Re: Beeb emulator for raspberry pi?

Postby Arkas » Thu May 25, 2017 11:59 am

pau1ie wrote:b-em works. I haven't tried it on the pi 3. On the pi 1 it was too slow, but it might be fast enough on the pi 3. I did upload a version with ARM assembler for the CPU emulation taken from beebdroid, but that didn't give enough of a performance boost because it was updating the display which was the slowest part. I would download it and try to compile it if you know how. If not, let me know and I will give you commands to paste in.


Thanks! Yes please give me the commands to paste.

User avatar
pau1ie
Posts: 315
Joined: Thu May 10, 2012 9:48 pm
Location: Bedford

Re: Beeb emulator for raspberry pi?

Postby pau1ie » Thu May 25, 2017 1:22 pm

Create a directory to work in

Code: Select all

mkdir b-em
cd b-em
wget http://b-em.bbcmicro.com/B-emv2.2Linux.tar.gz
tar xvf B-emv2.2Linux.tar.gz
./configure


Here it might complain that you are missing things like compilers or libraries. You have to find them in the package manager and install them. You need the -devel version. Once it configures, you type make, and then you will have b-em. I can't remember if it is in the same directory or the src directory, or both.

Or you could try the one I hacked together which is at: http://stardot.org.uk/forums/viewtopic.php?f=4&t=5326#p52268 and is already compiled. It will still error if you don't have the correct libraries installed though, and there may be problems if they aren't the correct versions.

If you get stuck I will compile it on my PI tomorrow evening and let you know all the steps that are required. Let us know how you get on!
I'm working on http://bbcmicro.co.uk

User avatar
pau1ie
Posts: 315
Joined: Thu May 10, 2012 9:48 pm
Location: Bedford

Re: Beeb emulator for raspberry pi?

Postby pau1ie » Thu May 25, 2017 6:54 pm

First set up the network, either plug in a network cable or configure the wifi.

In a terminal window:
Become root and install required libraries and header files. Say Y when it asks you if you really want to, and if you want to install dependencies. You have to do an update to make sure your pi knows what packages are available, otherwise it might try to download files that no longer exist. The upgrade is good practice to do occasionally.

Code: Select all

sudo bash
apt-get update
apt-get upgrade
apt-get install liballegro4-dev libopenal-dev libalut-dev automake1.11
exit


The exit at the end puts you back as a normal user. Now we can get b-em. There is some work going on to improve this version, but this is probably still the best till anything else is released:

Code: Select all

mkdir b-em
cd b-em
wget http://b-em.bbcmicro.com/B-emv2.2Linux.tar.gz
tar xvf B-emv2.2Linux.tar.gz
./configure
make


After you do the configure, check it doesn't error and say you have missing libraries before running make.

Go and get a cup of tea. It takes a while. Don't worry about the warnings which are typically caused by the compiler getting more picky since the code was written, it still works OK. When the prompt comes back, try it out

Code: Select all

./b-em


It actually seems fast enough to me.

EDIT: Correct the name of liballegro4-dev
Last edited by pau1ie on Sat May 27, 2017 10:04 am, edited 1 time in total.
I'm working on http://bbcmicro.co.uk

User avatar
Arkas
Posts: 27
Joined: Sat Feb 04, 2017 12:05 am

Re: Beeb emulator for raspberry pi?

Postby Arkas » Fri May 26, 2017 9:12 am

Thank you!!
I'll be trying it shortly.

User avatar
pau1ie
Posts: 315
Joined: Thu May 10, 2012 9:48 pm
Location: Bedford

Re: Beeb emulator for raspberry pi?

Postby pau1ie » Fri May 26, 2017 6:47 pm

I just thought id try the version of b-em with the assembler 6502 emulator. on my pi 3 b-em 2.2 Linux uses roughly 1 core (say 99%) and X uses another 36%. the pi 3 has 4 cores. while it feels fast enough I wonder if it is being throttled a little. b-em with the assembler 6502 emulator uses about 85% of a core and X uses another 35%, so there is a small performance gain. The assembler 6502 is just a proof of concept and wont emulate the 65C092 for the Master (for example).
I'm working on http://bbcmicro.co.uk

User avatar
fordp
Posts: 919
Joined: Sun Feb 12, 2012 9:08 pm
Location: Kent, England

Re: Beeb emulator for raspberry pi?

Postby fordp » Fri May 26, 2017 10:14 pm

The 6502 emulator from Pi Direct is crazy fast and would speed up b-em to be very fast on the Pi.
FordP (Simon Ellwood)
Time is an illusion. Lunchtime, doubly so!

User avatar
sweh
Posts: 1847
Joined: Sat Mar 10, 2012 12:05 pm
Location: New York, New York
Contact:

Re: Beeb emulator for raspberry pi?

Postby sweh » Sat May 27, 2017 3:55 am

pau1ie wrote:

Code: Select all

apt-get install allegro4-dev libopenal-dev libalut-dev automake1.11

Do you mean liballegro4-dev, here?
Rgds
Stephen

User avatar
pau1ie
Posts: 315
Joined: Thu May 10, 2012 9:48 pm
Location: Bedford

Re: Beeb emulator for raspberry pi?

Postby pau1ie » Sat May 27, 2017 10:03 am

sweh wrote:Do you mean liballegro4-dev, here?


I believe I did. I'll edit the original post.
I'm working on http://bbcmicro.co.uk

User avatar
fordp
Posts: 919
Joined: Sun Feb 12, 2012 9:08 pm
Location: Kent, England

Re: Beeb emulator for raspberry pi?

Postby fordp » Sun May 28, 2017 9:30 am

Please consider adding the information to the b-em wiki on github too. Thanks.
FordP (Simon Ellwood)
Time is an illusion. Lunchtime, doubly so!

User avatar
pau1ie
Posts: 315
Joined: Thu May 10, 2012 9:48 pm
Location: Bedford

Re: Beeb emulator for raspberry pi?

Postby pau1ie » Sun May 28, 2017 10:26 pm

fordp wrote:Please consider adding the information to the b-em wiki on github too. Thanks.


Done - https://github.com/stardot/b-em/wiki/Building-on-Linux
I'm working on http://bbcmicro.co.uk

User avatar
fordp
Posts: 919
Joined: Sun Feb 12, 2012 9:08 pm
Location: Kent, England

Re: Beeb emulator for raspberry pi?

Postby fordp » Mon May 29, 2017 7:42 am

pau1ie wrote:
fordp wrote:Please consider adding the information to the b-em wiki on github too. Thanks.


Done - https://github.com/stardot/b-em/wiki/Building-on-Linux

Great, thanks.
FordP (Simon Ellwood)
Time is an illusion. Lunchtime, doubly so!

User avatar
Arkas
Posts: 27
Joined: Sat Feb 04, 2017 12:05 am

Re: Beeb emulator for raspberry pi?

Postby Arkas » Tue May 30, 2017 8:12 pm

I did everything (by copying and pasting into the terminal).
In the end, I type ./b-em and nothing happens. #-o
I understand linux as much as I understand an elderly Chinese woman with a stroke speaking Mandarin, so I've probably done something wrong.
Just to double check, I select each line, paste it in the terminal, right? :oops:

User avatar
pau1ie
Posts: 315
Joined: Thu May 10, 2012 9:48 pm
Location: Bedford

Re: Beeb emulator for raspberry pi?

Postby pau1ie » Tue May 30, 2017 9:13 pm

Arkas wrote:Just to double check, I select each line, paste it in the terminal, right?

Yes, unless I made a mistake, which is pretty likely.

Clearly something is wrong, but I need more information to know what.

Can you try the following in a terminal window again:

Code: Select all

cd b-em
./configure

and paste the result here? Hopefully it will give an error message that will help.

Here is what mine does

Code: Select all

$ ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... none
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... none
checking whether gcc and cc understand -c and -o together... yes
checking whether to enable debugging... no
checking for allegro-config... /usr/bin/allegro-config
checking for Allegro - version >= 4.0.0... yes (version 4.4.2)
checking for gzopen in -lz... yes
checking for alGetError in -lopenal... yes
checking for alutInit in -lalut... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: executing depfiles commands
I'm working on http://bbcmicro.co.uk

User avatar
Arkas
Posts: 27
Joined: Sat Feb 04, 2017 12:05 am

Re: Beeb emulator for raspberry pi?

Postby Arkas » Wed May 31, 2017 9:54 pm

It works!
I just did it again step by step and b-em is now working!
Thank you very much, I appreciate it!

User avatar
pau1ie
Posts: 315
Joined: Thu May 10, 2012 9:48 pm
Location: Bedford

Re: Beeb emulator for raspberry pi?

Postby pau1ie » Thu Jun 01, 2017 6:46 pm

Hooray! Glad you got it working!
I'm working on http://bbcmicro.co.uk


Return to “emulators”

Who is online

Users browsing this forum: Bing [Bot] and 1 guest