Building B-em on Linux

want to talk about MESS/model b/beebem/b-em/electrem/elkulator? do it here!
User avatar
richmond62
Posts: 168
Joined: Sun Apr 16, 2017 3:15 pm

Building B-em on Linux

Postby richmond62 » Sat Jun 10, 2017 8:52 pm

Having successfully built B-em 2.2 on Xubuntu 64-bit 16.04
by installing automake1.11 via Synaptic

I wonder if anyone can tell me if that build will work if I just copy it
and the ancillary files onto a machine running Xubuntu 32-bit, or will I have to
do a new build?

I also wonder why the build will not Quit and has to be stopped with a 'Kill' signal.

There are also NO menus to change ROMS and so forth.
Screenshot_2017-06-10_23-54-02.png

User avatar
roland
Posts: 2777
Joined: Thu Aug 29, 2013 8:29 pm
Location: Born (NL)
Contact:

Re: Building B-em on Linux

Postby roland » Sat Jun 10, 2017 9:07 pm

AFAIK you can't run 64 bit binaries on 32 bit systems so you have to rebuild it.
256K + 6502 Inside
MAN WOMAN :shock:

User avatar
richmond62
Posts: 168
Joined: Sun Apr 16, 2017 3:15 pm

Re: Building B-em on Linux

Postby richmond62 » Sat Jun 10, 2017 9:22 pm

But I was not sure whether the thing had built a 64 bit binary or a 32 bit one.

User avatar
roland
Posts: 2777
Joined: Thu Aug 29, 2013 8:29 pm
Location: Born (NL)
Contact:

Re: Building B-em on Linux

Postby roland » Sat Jun 10, 2017 9:43 pm

If you don't know it, how should we know :wink:

You can use the file command, just like this example:

Code: Select all

roland@peppermint ~/Downloads/cc65-master/bin $ file cc65
cc65: ELF 64-bit LSB  executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.24, BuildID[sha1]=2179402f8616e2736e4ca2feeaef33c99866eec9, not stripped
256K + 6502 Inside
MAN WOMAN :shock:

Coeus
Posts: 407
Joined: Mon Jul 25, 2016 11:05 am

Re: Building B-em on Linux

Postby Coeus » Sat Jun 10, 2017 11:08 pm

roland wrote:If you don't know it, how should we know :wink:

You can use the file command, just like this example:

Code: Select all

roland@peppermint ~/Downloads/cc65-master/bin $ file cc65
cc65: ELF 64-bit LSB  executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.24, BuildID[sha1]=2179402f8616e2736e4ca2feeaef33c99866eec9, not stripped


And I would expect to find it is 64bit as Linux compilers (and GNU autotools) usually build for the system you are running the compiler on.

What are you doing to quit that doesn't work? The F11 menu or the close button?

There is also a newer version of B-Em in the stardot github at https://github.com/stardot/b-em

There was talk in another thread about packaging B-Em into a .deb package. I am not sure if this was desktop use, i.e. Debian/Ubuntu/Mint or Raspberry Pi (Raspian?) but making B-Em ipackage-friendly is on the TODO list.

User avatar
richmond62
Posts: 168
Joined: Sun Apr 16, 2017 3:15 pm

Re: Building B-em on Linux

Postby richmond62 » Sun Jun 11, 2017 1:49 pm

Attempting to Quit:

1. Clicking on the 'x' at the top of the B-em windows: no result.

2. Ctrl-Q: no result.

3. F11 yields the Menu which then allows me to Exit.

NOT intuitive at all.

Especially as the keyboards in my school are KeyNeeds ones

$_57.jpg

that do not feature F keys.
Last edited by richmond62 on Mon Jun 12, 2017 7:11 am, edited 1 time in total.

User avatar
richmond62
Posts: 168
Joined: Sun Apr 16, 2017 3:15 pm

Re: Building B-em on Linux

Postby richmond62 » Mon Jun 12, 2017 7:11 am

a newer version of B-Em in the stardot github


Indeed, but not set up to do a "simple" ./configure, make, make install like the 2.2 version.

Coeus
Posts: 407
Joined: Mon Jul 25, 2016 11:05 am

Re: Building B-em on Linux

Postby Coeus » Mon Jun 12, 2017 10:56 am

richmond62 wrote:Indeed, but not set up to do a "simple" ./configure, make, make install like the 2.2 version.


Code: Select all

$ git clone https://github.com/stardot/b-em.git
$ cd b-em
$ ./autogen.sh && ./configure  && make


Only one extra step. The "not quiting on the close box being clicked" bug seems to be fixed in the stardot git version I mentioned.

User avatar
richmond62
Posts: 168
Joined: Sun Apr 16, 2017 3:15 pm

Re: Building B-em on Linux

Postby richmond62 » Mon Jun 12, 2017 7:05 pm

That looks good, but not really very helpful for installation in 10 machines where the nearest internet connexion is 500 metres away
and the machines have no wifi.

User avatar
richmond62
Posts: 168
Joined: Sun Apr 16, 2017 3:15 pm

Re: Building B-em on Linux

Postby richmond62 » Mon Jun 12, 2017 7:08 pm

Today I successfully built a 32-bit version on Xubuntu 14.04 accessing the internet through
a mobile phone dongle.

This was one major fag.

With Windows and Macintosh there is a simple drag-and-drop install. For Linux there should be an equivalent.

User avatar
richmond62
Posts: 168
Joined: Sun Apr 16, 2017 3:15 pm

Re: Building B-em on Linux

Postby richmond62 » Thu Jun 15, 2017 6:40 pm

I had to build versions (64 or 32-bit, as required) on each flipping Linux
box I have (10) which was incredibly tedious.

When I tried to build DEB packages they seemed to succeed, but when installed on
other machines did not launch and threw up "bad package' notices.

User avatar
richmond62
Posts: 168
Joined: Sun Apr 16, 2017 3:15 pm

Re: Building B-em on Linux

Postby richmond62 » Sat Jun 17, 2017 2:54 pm

KB.png

I wonder if there is a way within B-em to remap keys so one of the keys on
the KeyNeeds keyboard can function as the F11 key and bring up the menus?

The ESCAPE key would be ideal!

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

Re: Building B-em on Linux

Postby SarahWalker » Sat Jun 17, 2017 3:05 pm

You'll have to do a quick bit of source code modification. In linux.c, change the line

Code: Select all

if (key[KEY_F11]) gui_enter();

to

Code: Select all

if (key[KEY_ESC]) gui_enter();

and rebuild.

User avatar
richmond62
Posts: 168
Joined: Sun Apr 16, 2017 3:15 pm

Re: Building B-em on Linux

Postby richmond62 » Sat Jun 17, 2017 3:37 pm

Thanks for the help Sarah.

Although, having tried it I realise what a "prune" I've been as the ESCAPE key is used for something else as well in B-em . . . . .

I have just run off a build on my Xubuntu 16.04 64-bit box at home using the END key for the menus: Rocks!

KB.png

User avatar
richmond62
Posts: 168
Joined: Sun Apr 16, 2017 3:15 pm

Re: Building B-em on Linux

Postby richmond62 » Sat Jun 17, 2017 7:59 pm

HOWEVER, one thing I don't understand is this:

In the standard version of B-EM the F11 key both shows and hides the menus.

in my hacked version the END key only shows the menus; to make the menus disappear again one has to have an F11 key.

So, obviously the code to hide the menus is not in Linux.c but somewhere else.

User avatar
richmond62
Posts: 168
Joined: Sun Apr 16, 2017 3:15 pm

Re: Building B-em on Linux

Postby richmond62 » Sat Jun 17, 2017 8:14 pm

To get the END key to hide the menus again I had to edit all
incidents of F11 in the linux-gui.c document (and I found that
out by mucking around all over the place and building lots of duff builds).

Code: Select all

while (key[KEY_F11]) rest(100);
while (key[KEY_END]) rest(100);

twice!

Code: Select all

while (x && !key[KEY_F11] && !key[KEY_ESC])
 while (x && !key[KEY_END] && !key[KEY_ESC])

I have no knowledge of whatever programming language that is,
so it really was a bad case of fumbling around in the dark.

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

Re: Building B-em on Linux

Postby fordp » Sun Jun 18, 2017 10:22 pm

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

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

Re: Building B-em on Linux

Postby Elminster » Sun Jun 18, 2017 11:48 pm

fordp wrote:https://en.m.wikipedia.org/wiki/The_C_Programming_Language


I have that book. Always wondered what is was for :twisted:


Return to “emulators”

Who is online

Users browsing this forum: lurkio and 1 guest