Emulator information

want to talk about MESS/model b/beebem/b-em/electrem/elkulator? do it here!
User avatar
guddler
Posts: 430
Joined: Sat Apr 04, 2009 9:43 am
Location: W.Somerset
Contact:

Re: Emulator information

Post by guddler » Sat Sep 01, 2018 11:43 pm

[EDIT] I probably could have said all of this in a much shorter post - SORRY!

Ahh, the info in that thread is useful thanks. But it highlights why I wanted to take a look at the source. When in the debugger, 'd' and 'm' disassemble and dump memory but bp for breakpoints doesn't work for me and even '?' for help doesn't work. So I just wanted to dig into the code and see if they had been changed to something else or not been implemented, or, if I could get it to actually build and debug, see if I could work out why they were not working. Unfortunately its been a LONG time since I've done anything much with Xcode as I've been developing JavaEE server applications for quite a few years now.

So, back to the install issues. To be honest, before updating anything on a Wiki I'd have to double check what I did by installing it on my old MacBook Air which is still running 10.13.6 but hasn't had BeebEm installed on it yet. Unfortunately it's a bit of a one-shot thing and once you've done it you're sorted!

Quick aside: from the command line (or a script that calls BeebAsm :wink:) you can simply do "open FILE.SSD" to start it with an SSD loaded since it associates itself with SSD files. And a bunch of other ones too.

Anyway, so - is a paid developer subscription the only thing that's needed? Hmm, I'm honestly not sure but I intend to look. I really thought that lack of one just meant you'd get the warning about an unknown source which is bypassed by clicking 'ALT Open'. I'm not sure why the files have been quarantined by Apple on download but it's not the first time I've seen it and looking at how the source is built I'm not overly surprised. It might be because the author is using the bundle ID 'com.apple.beebem' and that has to be a bit of a no-no :lol: But all of this has changed a lot since I wrote a few simple things for the Mac back in 2007 - 2009 maybe? Most of this stuff comes from security borne out of necessity because of the Mac App Store and that didn't even exist when I created the few things that I did (which were never released anyway).

As for other issues - hopefully as few as possible, just that someone earlier in the thread linked to some other threads that I haven't looked at.

There are a number of challenges in getting it to build again, not least that even if it builds, it's still going to complain that it's not going to be supported in the next version of MacOS which is hitting shortly (10.14 Mojave) because it's not 64bit.

I'm looking to see if I can at least get that far but after that it may be a challenge as my Apple development is way out of date and even then my emulator knowledge is non-existent. But I would like to get my Apple knowledge somewhat back up to date so you never know. Just don't anybody go holding their breath.

Apologies for derailing this great thread. If I make any progress I'll start a proper Beeb-Em on Mac thread.
Last edited by guddler on Sat Sep 01, 2018 11:45 pm, edited 1 time in total.

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

Re: Emulator information

Post by Elminster » Sun Sep 02, 2018 12:17 am

Lurkio wrote .... lots
Was it my workaround? or did Someone else suggest it, I forget. Although when you bypass all the security to run an app is it really fixed? I would say it is another (better) work around. The real fix is getting it properly signed, but that involve cash to Apple.

And while we are wishing, I am still waiting for the import/export feature on beebem Mac to get finished, so it works like windows ......
Last edited by Elminster on Sun Sep 02, 2018 12:21 am, edited 3 times in total.

User avatar
guddler
Posts: 430
Joined: Sat Apr 04, 2009 9:43 am
Location: W.Somerset
Contact:

Re: Emulator information

Post by guddler » Sun Sep 02, 2018 12:44 am

Sorry, I don't know who suggested what as I was bad and didn't look at any of it, I just dealt with the quarantine issues.

You're quite right, just having a way to bypass Apple's now current security isn't really fixing it or all that helpful.

I'll start a new thread when I next get time to spend some time with this which *SHOULD* be tomorrow. I just corrected the few trivial issues I needed to get it to build under Xcode 9.4.1 on MacOS 10.13.6. It's throwing up 27 warnings which in all honesty isn't a big surprise but it's not starting as first of all it's complaining about an unknown compression format and secondly that it can't open a plist file. The latter seems to be because it's looking in the original authors home folder for something.

Now THAT is something that I remember when I was trying to run it from the command line. And yet later I still got it to run just fine. I'll continue digging.

[EDIT] Update: Built and up and running in latest Xcode, but with caveats (like I think the UI needs an older version of XC to be editable). But it's a start. Will post more tomorrow.
Last edited by guddler on Sun Sep 02, 2018 1:24 am, edited 1 time in total.

User avatar
daveejhitchins
Posts: 4347
Joined: Wed Jun 13, 2012 5:23 pm
Location: Newton Aycliffe, County Durham
Contact:

Re: Emulator information

Post by daveejhitchins » Sun Sep 02, 2018 6:54 am

This is really 'exciting', for me . . . I'm still running BeebEm3 - which works fine but I'd like to have the new features. Maybe soneone at Cambridge can install it for me [-o<

Dave H :D
Parts: UM6502CE, GAL22V10D, GAL16V8D, AS6C62256A, TC514400AZ, WD1772, R6522, TMS27C512, AT28C256
Products: ARA II, ABR, ATI, AP6, MGC, AP5 . . .
For a price list, contact me at: Retro Hardware AT dave ej hitchins DOT plus DOT com

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

Re: Emulator information

Post by g7jjf » Sun Sep 02, 2018 8:38 am

The source for Mac BeebEm is based on the Carbon API's which were deprecitated yonks ago and are no longer shipped with the latest version of Mac OS. The get it to compile with a later version of Xcode would basically involve a re-write to use a more modern API which I don't have the time or inclination to do. I did think about re-writing it in Swift and went as far as to buy a new Mac Mini and a book to start looking at this but a recent house move has put everything on hold again.

At some point in the future, I will take this up again and try and bring the program up to date but for the moment, I think we have had stick with the excellent work around by Elminster/Lurkio (I wasn't aware of this so will add this information to my download page)

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

Re: Emulator information

Post by Elminster » Sun Sep 02, 2018 9:17 am

g7jjf wrote:
Sun Sep 02, 2018 8:38 am
but for the moment, I think we have had stick with the excellent work around by Elminster/Lurkio (I wasn't aware of this so will add this information to my download page)
And guddler. I think my excellent work is just poking Lurkio from time to time. :)

User avatar
lurkio
Posts: 1742
Joined: Tue Apr 09, 2013 11:30 pm
Location: Doomawangara
Contact:

Re: Emulator information

Post by lurkio » Sun Sep 02, 2018 10:08 am

guddler wrote:
Sat Sep 01, 2018 11:43 pm
When in the debugger, 'd' and 'm' disassemble and dump memory but bp for breakpoints doesn't work for me and even '?' for help doesn't work.
Yeah, the help command doesn't work for me either. But for breakpoints you have to use b (rather than bp). No idea why!

guddler wrote:
Sat Sep 01, 2018 11:43 pm
So, back to the install issues. To be honest, before updating anything on a Wiki I'd have to double check what I did by installing it on my old MacBook Air which is still running 10.13.6 but hasn't had BeebEm installed on it yet. Unfortunately it's a bit of a one-shot thing and once you've done it you're sorted!
Just to be clear: although I can't remember if I took any additional steps when I first installed BeebEm4 in High Sierra, what clinched it for me and made BeebEm4 work like any other Mac app was the following Terminal command, run from the /Applications folder:

Code: Select all

xattr -c -rv BeebEm4a/

guddler wrote:
Sat Sep 01, 2018 11:43 pm
There are a number of challenges in getting it to build again, not least that even if it builds, it's still going to complain that it's not going to be supported in the next version of MacOS which is hitting shortly (10.14 Mojave) because it's not 64bit.
I believe Mojave will support 32-bit apps. But I take your point: subsequent versions of macOS (after Mojave) might not.

guddler wrote:
Sat Sep 01, 2018 11:43 pm
I'm looking to see if I can at least get that far but after that it may be a challenge
Many thanks for trying!

guddler wrote:
Sun Sep 02, 2018 12:44 am
just having a way to bypass Apple's now current security isn't really fixing it or all that helpful.
True, but it's a vast improvement on the cludginess of having to put up with aliases and console popups, etc., which is all we had before! (No offence to Elminster -- even the cludginess was better than nothing! (Although, to be honest, I've just been sticking with macOS 10.10 Yosemite!))

guddler wrote:
Sun Sep 02, 2018 12:44 am
Update: Built and up and running in latest Xcode, but with caveats (like I think the UI needs an older version of XC to be editable). But it's a start. Will post more tomorrow.
This is extremely exciting! It's also puzzling, given what Jon Welch, the original developer, says below:

g7jjf wrote:
Sun Sep 02, 2018 8:38 am
The source for Mac BeebEm is based on the Carbon API's which were deprecitated yonks ago and are no longer shipped with the latest version of Mac OS. The get it to compile with a later version of Xcode would basically involve a re-write to use a more modern API
By what sorcery did you manage to get the source compiled and running in High Sierra, then, guddler?!

daveejhitchins wrote:
Sun Sep 02, 2018 6:54 am
This is really 'exciting', for me . . . I'm still running BeebEm3 - which works fine but I'd like to have the new features. Maybe soneone at Cambridge can install it for me
Yes, the 8271 emulation bugfix in BeebEm4a is particularly useful. Just download the zip, unzip it in /Applications, and then use the Terminal command above, Dave...?

:?:
Last edited by lurkio on Sun Sep 02, 2018 11:00 am, edited 1 time in total.

User avatar
guddler
Posts: 430
Joined: Sat Apr 04, 2009 9:43 am
Location: W.Somerset
Contact:

Re: Emulator information

Post by guddler » Sun Sep 02, 2018 10:25 am

lurkio wrote:
Sun Sep 02, 2018 10:08 am
This is extremely exciting! It's also puzzling, given what Jon Welch, the original developer, says below
I'll start a new thread (and refer back to this one) after I've had my morning tea and am properly functioning but I promise I have got it building with current tools as of last night (NOT current SDKs). Just remember Xcode is just an IDE around a compiler (with some other tools thrown in for good measure). It can be made to do things that Apple would prefer that you don't. Doesn't mean you should!

I also want to better investigate what options there are and not to mention PM Jon to ask if he is OK with this. I know only too well what it's like to want to do something yourself when you have more time.

User avatar
guddler
Posts: 430
Joined: Sat Apr 04, 2009 9:43 am
Location: W.Somerset
Contact:

Re: Emulator information

Post by guddler » Sun Sep 02, 2018 12:34 pm

@ lukio and g7jjf you have PMs

Just doing this because I have PMs to 4 different people sat in my outbox now and I'm not convinced they are receiving notifications of the fact. Of course everyone might have been bust since I sent the first one last Thursday ;)

User avatar
lurkio
Posts: 1742
Joined: Tue Apr 09, 2013 11:30 pm
Location: Doomawangara
Contact:

Re: Emulator information

Post by lurkio » Sun Sep 02, 2018 2:21 pm

guddler wrote:
Sun Sep 02, 2018 12:34 pm
@ lukio and g7jjf you have PMs
Thanks! Notification received as normal. Reply sent.

:idea:

User avatar
guddler
Posts: 430
Joined: Sat Apr 04, 2009 9:43 am
Location: W.Somerset
Contact:

Re: Emulator information

Post by guddler » Sun Sep 02, 2018 4:49 pm

OK, I've just been through to confirm the steps needed to 'unquarrantine' an unsigned application and get BeebEm4 to be just like any other MacOS app again.

1. Make sure that in 'System Preferences / Security & Privacy / General' you have have selected 'App Store and Identified developers' under 'Allow apps downloaded from:'
2. Download BeebEm4 to somewhere and unzip it to where you want it. As it contains more than just an app bundle I tend to put it in the Applications folder within my home directory. I only tend to put app bundle apps in the system wide Application folder. However, that's just me - put it where you like.
3. Try to open it. You will be prompted that it was downloaded from the internet and you have to click 'Open'
4. At this point you should see a brief flash where it opens and immediately closes again. This is because the app has been quarantined. Apple are therefore forcing it to run in it's own Sandbox and it therefore cannot find or create it's preferences file.
5. Open a command prompt and type the following one liner:

Code: Select all

xattr -d com.apple.quarantine ~/Downloads/BeebEm4a/BeebEm4.app
Obviously replace '~/Downloads' with wherever you put it. If you put it in a system folder and had to enter your password to do so then replace the above with:

Code: Select all

sudo xattr -d com.apple.quarantine ~/Downloads/BeebEm4a/BeebEm4.app
You'll again be prompted for your password so put it in once more. If you've never used 'sudo' you may also be told about the great responsibility you're about to take on. Yeah, yeah, thanks for that Apple (obviously they are correct, sudo can allow you to do system breaking stuff - EASILY!)
6. There is no 6. That should be it until the next time you download it.

[EDIT] Sorry, clicked send instead of preview.

I do believe that all that is required to resolve this is an active paid developer sub. But I would like to confirm that.

I've reached out to Jon about BeebEm more generally and whether I can help.
Last edited by guddler on Sun Sep 02, 2018 4:53 pm, edited 1 time in total.

User avatar
daveejhitchins
Posts: 4347
Joined: Wed Jun 13, 2012 5:23 pm
Location: Newton Aycliffe, County Durham
Contact:

Re: Emulator information

Post by daveejhitchins » Sun Sep 02, 2018 4:52 pm

lurkio wrote:
Sun Sep 02, 2018 10:08 am
Yes, the 8271 emulation bugfix in BeebEm4a is particularly useful. Just download the zip, unzip it in /Applications, and then use the Terminal command above, Dave...?
Yay \o/ =D> I have BeebEm4 :D Many thanks for that - brilliant

Dave H :D
Parts: UM6502CE, GAL22V10D, GAL16V8D, AS6C62256A, TC514400AZ, WD1772, R6522, TMS27C512, AT28C256
Products: ARA II, ABR, ATI, AP6, MGC, AP5 . . .
For a price list, contact me at: Retro Hardware AT dave ej hitchins DOT plus DOT com

User avatar
lurkio
Posts: 1742
Joined: Tue Apr 09, 2013 11:30 pm
Location: Doomawangara
Contact:

Re: Emulator information

Post by lurkio » Sun Sep 16, 2018 6:31 pm

sydney wrote:
Wed Aug 22, 2018 10:27 am
Website (macOS): http://www.g7jjf.com/download.htm
Github: https://github.com/stardot/beebem
Windows: Install and run. Linux: Compilation needed. macOS: In its current state, the source code for Mac BeebEm can't be compiled under recent versions of macOS.
Thanks to guddler and Jon, the note for macOS can now be changed to "Install and run"!

=D> =D>

ThomasHarte
Posts: 466
Joined: Sat Dec 23, 2000 5:56 pm
Contact:

Re: Emulator information

Post by ThomasHarte » Fri Sep 21, 2018 5:36 pm

Re: Clock Signal, for macOS it is install and run. There are also quite a few things for which I referred to ElectrEm (especially ADC/SBC decimal logic, and tape interrupt logic), so there's a continuity there. And, sure, it's multisystem but only the one Acorn machine so file it as you will.

Post Reply