b2 - new emulator

discuss bbc micro and electron emulators (including mame) here!
VectorEyes
Posts: 381
Joined: Fri Apr 13, 2018 2:48 pm
Contact:

Re: b2 - new emulator

Post by VectorEyes » Fri May 29, 2020 10:50 am

Hi @LordVaderUK ... quick question: Where are you running B2 from? Do you run it from the Downloads folder or do you copy it to Applications?

If you're downloading it straight to the Downloads folder and running it directly from there, it might be worthwhile copying it to the Applications folder and running from there instead. It *may* fix some of the problems you're encountering.

User avatar
LordVaderUK
Posts: 208
Joined: Thu Jan 31, 2019 12:26 am
Location: Hampshire
Contact:

Re: b2 - new emulator

Post by LordVaderUK » Fri May 29, 2020 10:52 am

VectorEyes wrote:
Fri May 29, 2020 10:50 am
Hi @LordVaderUK ... quick question: Where are you running B2 from? Do you run it from the Downloads folder or do you copy it to Applications?

If you're downloading it straight to the Downloads folder and running it directly from there, it might be worthwhile copying it to the Applications folder and running from there instead. It *may* fix some of the problems you're encountering.
Running from the Applications folder.
Loving my BBC Master 128

User avatar
Pernod
Posts: 2267
Joined: Fri Jun 08, 2012 11:01 pm
Location: Croydon, UK
Contact:

Re: b2 - new emulator

Post by Pernod » Fri May 29, 2020 1:32 pm

I'm also having installation issues using the latest Windows package on Windows 10, also tried a few previous packages. The b2 window briefly opens then closes, no indication of why. Also tried from cmd with various render-driver options but no change.

The only option that works is b2 --help.

Any suggestions?
- Nigel

BBC Model B: ATPL Sidewise, Acorn Speech, 2xWatford Floppy Drives, AMX Mouse, Viglen case, BeebZIF, etc.

VectorEyes
Posts: 381
Joined: Fri Apr 13, 2018 2:48 pm
Contact:

Re: b2 - new emulator

Post by VectorEyes » Fri May 29, 2020 3:12 pm

Not sure. I can compile the latest master branch from source and run both Release and Debug versions locally, which would suggest it's some problem with packaging / code-signing / notarisation of some kind, or perhaps libraries that are available on my machine that aren't on yours. Will try to see if I can take the build and put it on a different machine and see whether it runs or not. If it doesn't will try to diagnose why. Tom is also going to be looking at this and he'll probably work it out before I do!

tom_seddon
Posts: 427
Joined: Tue Aug 30, 2005 12:42 am
Contact:

Re: b2 - new emulator

Post by tom_seddon » Sat May 30, 2020 3:18 pm

LordVaderUK wrote:
Thu May 28, 2020 7:32 pm
I kept encountering an error whereby I'd create a copy config of a BBC Master, and add a couple of ROMs. This config would work fine for a while but then when selected would come up with errors saying it couldn't find the BASIC or OS ROM images, looking in a location like this:

/private/var/folders/8p/927_zh7533x_zvmskf4vwp1w0000gn/T/AppTranslocation/E30F782C-322E-4B63-B849-5B1C74B53FCA/d/b2.app/Contents/MacOS/../Resources/assets/roms/m128/3.20/mos.rom

To try to fix this, I downloaded the latest b2 version, which I have done today and installed. Unfortunately this version doesn't run at all on my Mac. Initially it crashed and the error report said there was a missing library (sorry couldn't tell which one from the error message). Now however the icon just bounces briefly before quitting with no error message.
Both fixed, I hope.

The latest version was missing some libraries it now needs - this step is now automated, so it shouldn't happen again.

The ROM path issues should hopefully be fixed by the makeover I've given the configs/ROMs system. The dialog has changed a bit (feedback sought...), and there's specific dropdowns for selecting the stock ROMs supplied with the emulator. Hopefully it'll now be able to find the correct path for the standard ROMs every time...

Thanks,

--Tom

User avatar
Pernod
Posts: 2267
Joined: Fri Jun 08, 2012 11:01 pm
Location: Croydon, UK
Contact:

Re: b2 - new emulator

Post by Pernod » Sat May 30, 2020 3:23 pm

tom_seddon wrote:
Sat May 30, 2020 3:18 pm
Both fixed, I hope.
Thanks, looks good so far =D>
- Nigel

BBC Model B: ATPL Sidewise, Acorn Speech, 2xWatford Floppy Drives, AMX Mouse, Viglen case, BeebZIF, etc.

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

Re: b2 - new emulator

Post by bakoulis » Sat May 30, 2020 7:47 pm

I have many troubles to compile b2 on my Ubuntu/Linux Mint 19.3 64bit.
Anybody have tried successful?
:oops:
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
LordVaderUK
Posts: 208
Joined: Thu Jan 31, 2019 12:26 am
Location: Hampshire
Contact:

Re: b2 - new emulator

Post by LordVaderUK » Sat May 30, 2020 10:32 pm

tom_seddon wrote:
Sat May 30, 2020 3:18 pm
Both fixed, I hope.

The latest version was missing some libraries it now needs - this step is now automated, so it shouldn't happen again.

The ROM path issues should hopefully be fixed by the makeover I've given the configs/ROMs system. The dialog has changed a bit (feedback sought...), and there's specific dropdowns for selecting the stock ROMs supplied with the emulator. Hopefully it'll now be able to find the correct path for the standard ROMs every time...

Thanks,

--Tom
Tom, thanks for the super quick update. I've downloaded it and I'm testing it now, all signs are good so far. I prefer the new config/ROMs system - for me, the dialog is much clearer.

Thanks again.
Loving my BBC Master 128

tom_seddon
Posts: 427
Joined: Tue Aug 30, 2005 12:42 am
Contact:

Re: b2 - new emulator

Post by tom_seddon » Sat May 30, 2020 11:17 pm

bakoulis wrote:
Sat May 30, 2020 7:47 pm
I have many troubles to compile b2 on my Ubuntu/Linux Mint 19.3 64bit.
Anybody have tried successful?
:oops:
I've never tried it on Linux Mint, but I've built it on Ubuntu 18.04 LTS. What problems are you having?

Please ensure you follow the Unix build instructions: https://github.com/tom-seddon/b2/blob/m ... uilding.md - this is the supported way of building b2.

Note that there's also now a b2 snap, which I think is some kind of binary package with a simplified installation process: https://snapcraft.io/b2 - I can't provide any support for this, just my approval, but it looks like if you install the edge release you'll get something that should be pretty up to date.

--Tom

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

Re: b2 - new emulator

Post by bakoulis » Sun May 31, 2020 12:29 pm

I already used the snap build, but I thought was pretty old.
Ubuntu 18,04 and Linux Mint 19.3 are almost identical.
I find that the git --recursive option was the key for the missing dependencies.
:D
2xElectron, 3xBBC B, BBC Master.
2xAcorn A310, A420/1, 2xA3000, 2xA3010, A3020, A4000, A5000.
2xRISC PC, Acorn Pocket Book, Acorn Pocket Book II.

Naomasa298
Posts: 392
Joined: Sat Feb 16, 2013 12:49 pm
Contact:

Re: b2 - new emulator

Post by Naomasa298 » Sun Jun 21, 2020 10:12 pm

I've just tried b2, and I must say, I like the video output a lot more than BeebEm's - it looks much sharper and better defined.

Though no co-pro support?

User avatar
Yrrah2
Posts: 487
Joined: Tue Feb 06, 2007 6:06 pm
Location: Netherlands
Contact:

Re: b2 - new emulator

Post by Yrrah2 » Fri Jun 26, 2020 1:37 pm

Hi,

Have been playing with b2. Works nice on my Mac!
Is it possible to let b2 work with my Hard Drive images I have from BeebEm?

Cheers
Happy with my BBC Master
www.mybbcmaster.nl

tom_seddon
Posts: 427
Joined: Tue Aug 30, 2005 12:42 am
Contact:

Re: b2 - new emulator

Post by tom_seddon » Sat Jun 27, 2020 1:32 am

Naomasa298 wrote:
Sun Jun 21, 2020 10:12 pm
I've just tried b2, and I must say, I like the video output a lot more than BeebEm's - it looks much sharper and better defined.

Though no co-pro support?
Thanks for the kind words, and I hope you continue to enjoy using it. It doesn't support as wide a range of stuff as BeebEm, but what it does support, it tries to emulate at least accurately and in many cases perfectly. Please post here (or in the GitHub issues list) if you have any suggestions or requests.

Coprocessor support is in the works - it has been on my to do list for a while (note date on the relevant GitHub issue :lol:), but I'll get to it eventually! Current plants are to support the 6502 cheese wedge and the Master Turbo. (And maybe also both at once?)

--Tom
Last edited by tom_seddon on Sat Jun 27, 2020 2:49 pm, edited 1 time in total.

tom_seddon
Posts: 427
Joined: Tue Aug 30, 2005 12:42 am
Contact:

Re: b2 - new emulator

Post by tom_seddon » Sat Jun 27, 2020 1:38 am

Yrrah2 wrote:
Fri Jun 26, 2020 1:37 pm
Have been playing with b2. Works nice on my Mac!
Is it possible to let b2 work with my Hard Drive images I have from BeebEm?
Good question! I'm afraid the current answer is no - but I do intend to support it in future!

My current list of future things I plan to emulate can be found here: https://github.com/tom-seddon/b2/issues/14

--Tom

User avatar
Pernod
Posts: 2267
Joined: Fri Jun 08, 2012 11:01 pm
Location: Croydon, UK
Contact:

Re: b2 - new emulator

Post by Pernod » Sat Jun 27, 2020 1:58 am

Is it a known issue that the cursor is incorrect in modes 3 and 6? Cursor end is 9 in those modes so seems to be missing a line.
- Nigel

BBC Model B: ATPL Sidewise, Acorn Speech, 2xWatford Floppy Drives, AMX Mouse, Viglen case, BeebZIF, etc.

tom_seddon
Posts: 427
Joined: Tue Aug 30, 2005 12:42 am
Contact:

Re: b2 - new emulator

Post by tom_seddon » Sat Jun 27, 2020 2:31 am

Pernod wrote:
Sat Jun 27, 2020 1:58 am
Is it a known issue that the cursor is incorrect in modes 3 and 6? Cursor end is 9 in those modes so seems to be missing a line.
Arrgh! Yes, it was... but no, it is not :lol: - I thought I'd fixed this!

Thanks for the report. I'll have a look at this this weekend.

--Tom

User avatar
Yrrah2
Posts: 487
Joined: Tue Feb 06, 2007 6:06 pm
Location: Netherlands
Contact:

Re: b2 - new emulator

Post by Yrrah2 » Sat Jun 27, 2020 6:43 am

Pernod wrote:
Sat Jun 27, 2020 1:58 am
Is it a known issue that the cursor is incorrect in modes 3 and 6? Cursor end is 9 in those modes so seems to be missing a line.
I had something of the same using InterWord. The cursor was at the top of the characters.
tom_seddon wrote:
Sat Jun 27, 2020 1:38 am
Good question! I'm afraid the current answer is no - but I do intend to support it in future!

My current list of future things I plan to emulate can be found here: https://github.com/tom-seddon/b2/issues/14

--Tom
great and thanks.

cheers
Happy with my BBC Master
www.mybbcmaster.nl

User avatar
JasonStonier
Posts: 351
Joined: Mon Dec 10, 2018 8:10 pm
Location: Dorset
Contact:

Re: b2 - new emulator

Post by JasonStonier » Mon Aug 17, 2020 5:23 pm

Has anyone managed to compile b2 on a Raspberry Pi (4, running Raspbian Buster)

I've got a little way down the path: compiled and installed CMake and Ninja.

Trying to Ninja-build the code, initially I was getting an undefined reference to atomic fetch, so added this to the CMakelists.txt (result of a google search for that error message):

Code: Select all

set(CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} -latomic")
That got me past that particular error, but now I'm error-ing on the following:

Code: Select all

pi@raspberrypi:~/b2/build/r.linux $ sudo ninja 
[2/171] Building CXX object src/shared/t/CMakeFiles/test_basic.dir/test_basic.cpp.o
FAILED: src/shared/t/CMakeFiles/test_basic.dir/test_basic.cpp.o 
/usr/bin/c++ -D_GNU_SOURCE -I../../src/shared/h -save-temps=obj -O2 -g -DNDEBUG   -Wall -Wuninitialized -Winit-self -pedantic -Wsign-conversion -Wunused-result -Wno-overlength-strings -Wunused-parameter -std=gnu++14 -MD -MT src/shared/t/CMakeFiles/test_basic.dir/test_basic.cpp.o -MF src/shared/t/CMakeFiles/test_basic.dir/test_basic.cpp.o.d -o src/shared/t/CMakeFiles/test_basic.dir/test_basic.cpp.o -c ../../src/shared/t/test_basic.cpp
../../src/shared/t/test_basic.cpp:16:2: error: #error not always lock free (ATOMIC_BOOL_LOCK_FREE)
 #error not always lock free (ATOMIC_BOOL_LOCK_FREE)
  ^~~~~
../../src/shared/t/test_basic.cpp:19:2: error: #error not always lock free (ATOMIC_CHAR_LOCK_FREE)
 #error not always lock free (ATOMIC_CHAR_LOCK_FREE)
  ^~~~~
../../src/shared/t/test_basic.cpp:22:2: error: #error not always lock free (ATOMIC_CHAR16_T_LOCK_FREE)
 #error not always lock free (ATOMIC_CHAR16_T_LOCK_FREE)
  ^~~~~
../../src/shared/t/test_basic.cpp:31:2: error: #error not always lock free (ATOMIC_SHORT_LOCK_FREE)
 #error not always lock free (ATOMIC_SHORT_LOCK_FREE)
  ^~~~~
../../src/shared/t/test_basic.cpp:40:2: error: #error not always lock free (ATOMIC_LLONG_LOCK_FREE)
 #error not always lock free (ATOMIC_LLONG_LOCK_FREE)
  ^~~~~
[7/171] Building C object src/6502/CMakeFiles/6502_lib.dir/c/6502.c.o
ninja: build stopped: subcommand failed.
Any one able to help with this one? Thanks!

User avatar
melchett
Posts: 316
Joined: Tue Jan 28, 2003 9:52 am
Contact:

Re: b2 - new emulator

Post by melchett » Thu Aug 20, 2020 9:49 pm

Hi Jason,

It took a bit of wrestling just now but I managed to get b2 compiling on RPi 3 with Raspian 10 (Buster). Should work the same on an Rpi 4 but you'd need the 32-bit version of Raspbian. As always start with a clean Raspbian image if you can. It might work 64-bit I just haven't tried it.

I haven't used cmake so much and I need to understand how to fix this upstream before it builds the build.ninja file but it should get you going for now. It's a little hacky but it works... I did not bother with the video writing components yet, just wanted to see the core working first. Great to see it running on an RPi - the performance is slow though which is a shame as it looks a great emulator. Definitely going to get this working on Windows and my Mac.
  1. sudo apt update
  2. sudo apt full-upgrade
  3. sudo reboot
  4. sudo apt install libcurl4-openssl-dev
  5. sudo apt install cmake
  6. sudo apt install ninja
  7. sudo apt install ninja-build
  8. git clone --recursive https://github.com/tom-seddon/b2.git
  9. cd b2
  10. git submodule init
  11. git submodule update
  12. sudo make init
  13. For release -> cd build/r.linux
  14. For debug -> cd build/d.linux
  15. vi ../../src/shared/t/test_basic.cpp
  16. (Comment out the code as below in Comment Out Code)
  17. (Save and exit the editor)
  18. sudo mv build.ninja build.ninja.original
  19. cat build.ninja.original | sed "s/luuid/luuid \-latomic/" | sudo tee build.ninja.tmp > /dev/null
  20. For release -> cat build.ninja.tmp | sed "s/S = submodules\/SDL\/libSDL2.a/S = submodules\/SDL\/libSDL2.a -L\/opt\/vc\/lib /" | sudo tee build.ninja.tmp2 > /dev/null
  21. For debug -> cat build.ninja.tmp | sed "s/S = submodules\/SDL\/libSDL2d.a/S = submodules\/SDL\/libSDL2d.a -L\/opt\/vc\/lib /" | sudo tee build.ninja.tmp2 > /dev/null
  22. cat build.ninja.tmp2 | sed "s/S = -lm/S = -L \/opt\/vc\/lib\/ -lcurl -lm/" | sudo tee build.ninja > /dev/null
  23. sudo rm build.ninja.tmp
  24. sudo rm build.ninja.tmp2
  25. sudo ninja
  26. (There will be many warnings - ignore)
  27. cd src/b2
  28. ./b2
When I have a bit more time I'll try and figure out how to change the CMakelists to include this - I'm sure Tom would just know though. Basically on Raspbian:
  • I added a static link for most things to atomic (-latomic)
  • bcm_host isn't found unless you add /opt/vc/lib to the link path (-L/opt/vc/lib)
  • Added a static link to libcurl for b2 (-lcurl)
  • There is some error checking in test_basic.cpp in compiler pre-processor directives that seem redundant for the runtime of the emulator (Tom's comments sort of acknowledge that, sort of)
Comment Out Code
Comment out the tests for ATOMIC** as below using /* */ - unimportant as doubt you'll run the tests on the emulator and they are not stopping anything working.

Code: Select all

...
/*
#if ATOMIC_BOOL_LOCK_FREE!=2
#error not always lock free (ATOMIC_BOOL_LOCK_FREE)
#endif
...
#if ATOMIC_POINTER_LOCK_FREE!=2
#error not always lock free (ATOMIC_POINTER_LOCK_FREE)
#endif
*/
...

tom_seddon
Posts: 427
Joined: Tue Aug 30, 2005 12:42 am
Contact:

Re: b2 - new emulator

Post by tom_seddon » Fri Aug 21, 2020 12:54 am

Sorry this doesn't work as-is! - b2 doesn't really support the Raspberry Pi, partly because I don't have a modern one, and partly because I'd assumed (correctly, it sounds like...) that performance would be terrible anyway.

But since it looks like it probably won't actually be all that much work, I'll try to figure out some way of getting Raspbian emulated on my PC, and then sort this out so it at least builds. Thanks very much for the notes.

(I must admit I don't know what the ramifications might be, if ATOMIC_xxx_LOCK_FREE isn't 2. The fact a support library is required suggests that maybe some stuff is emulated? - b2 is written assuming that atomic operations are cheap when uncontended, so perhaps this could be contributing to poor performance. But I'm just guessing a bit here.)

--Tom

User avatar
melchett
Posts: 316
Joined: Tue Jan 28, 2003 9:52 am
Contact:

Re: b2 - new emulator

Post by melchett » Fri Aug 21, 2020 9:04 am

I think it's testament to the code's portability Tom that I managed to get this working with so few changes. Atomic could be blocking threads and affecting performance - I haven't checked the code to see if you're using more than one thread, but I don't know without looking deeper.

I would stress however that I'm running it on a RPi 3 B+ which is running underpower (lightning logo top right, I wanted it near my main PC so it's running from one of the PC's USB ports). I'll dig out an RPi4 and make sure I give it all the current it needs to see what it can do on that. At some point RPis will catch up so it's worth making the changes for that moment :D

If you make any changes, I'm happy to test them on a real RPi.

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

Re: b2 - new emulator

Post by Elminster » Fri Aug 21, 2020 10:10 am

Semi on topic. A raspberry Pi4 should be plenty powerful enough, if the code works as expected. The pi 4 will run as a desktop replacement, and I use one to do on the fly video transcoding as it is my Plex media server. Both tasks are more demanding than a Beeb emulator.

Perhaps someone can buy Tom a pi for Xmas, a Christmas pie :D

Jeff Greeling did a good video where he replaced his Mac book pro with a pi 4 for a week. https://youtu.be/OU6jHvVqJxY

User avatar
melchett
Posts: 316
Joined: Tue Jan 28, 2003 9:52 am
Contact:

Re: b2 - new emulator

Post by melchett » Fri Aug 21, 2020 4:06 pm

That's true Elminster - if it can comfortably run e.g. Amiberry then it should cope with a BBC emulator, the RPi 4 CPU is clocked 750 times faster than a Beeb's 6502...

User avatar
JasonStonier
Posts: 351
Joined: Mon Dec 10, 2018 8:10 pm
Location: Dorset
Contact:

Re: b2 - new emulator

Post by JasonStonier » Mon Aug 24, 2020 12:50 pm

I'm almost at the point of (re)learning C++ as I realise I'm just a consumer and not a contributor here. <THAT'S> how much I want a decent beeb emulator on an R-Pi :)

User avatar
JasonStonier
Posts: 351
Joined: Mon Dec 10, 2018 8:10 pm
Location: Dorset
Contact:

Re: b2 - new emulator

Post by JasonStonier » Mon Aug 24, 2020 12:53 pm

melchett wrote:
Fri Aug 21, 2020 4:06 pm
That's true Elminster - if it can comfortably run e.g. Amiberry then it should cope with a BBC emulator, the RPi 4 CPU is clocked 750 times faster than a Beeb's 6502...
I might try and compile Beebem for Amiga and run it inside Amiberry on an R-Pi 4...it would be hilariously solipsistic if it worked.

User avatar
melchett
Posts: 316
Joined: Tue Jan 28, 2003 9:52 am
Contact:

Re: b2 - new emulator

Post by melchett » Mon Aug 24, 2020 5:10 pm

I tried your technique of running B-Em at 400% on an RPi 4 and it works acceptably well even on the standard window manager and desktop - I cannot notice a difference in e.g. Elite. It maxes out one of the CPU cores but that's the OS is still most responsive because of the other cores.

I'd like to understand more about b2 - I ran some profiling against it and nothing is obviously taking that long to execute however a few key methods seem to be called say 50 million times in 6 seconds if I'm reading gproc correctly. Guess it's updating the display often and simulating a 2Mhz CPU so... I would like to get this working acceptably, will see if I get some spare time this week - giving the imminent weather changes that could be tomorrow.

User avatar
JasonStonier
Posts: 351
Joined: Mon Dec 10, 2018 8:10 pm
Location: Dorset
Contact:

Re: b2 - new emulator

Post by JasonStonier » Mon Aug 24, 2020 7:27 pm

I'd like to understand why it needs to be run at 400% to run at 100% (if that makes sense). Seems vaguely suspect that it's almost an exact multiple of 4.

I wonder if it's expecting to multithread/multiprocess on 4 cores but something in the Arm compilation is only allowing access to one core.

User avatar
JasonStonier
Posts: 351
Joined: Mon Dec 10, 2018 8:10 pm
Location: Dorset
Contact:

Re: b2 - new emulator

Post by JasonStonier » Mon Aug 24, 2020 7:30 pm

melchett wrote:
Mon Aug 24, 2020 5:10 pm
it works acceptably well even on the standard window manager and desktop
Running slowly on my desktop/WM was a red herring. I was installing it on a retrogame image I got from someone else and the desktop was loading a bunch of crap at startup which was hogging the memory and CPU time.

On a fresh install for me it also works fine in the desktop, at 400% of course.

User avatar
melchett
Posts: 316
Joined: Tue Jan 28, 2003 9:52 am
Contact:

Re: b2 - new emulator

Post by melchett » Mon Aug 24, 2020 9:08 pm

JasonStonier wrote:
Mon Aug 24, 2020 7:27 pm
I'd like to understand why it needs to be run at 400% to run at 100% (if that makes sense). Seems vaguely suspect that it's almost an exact multiple of 4.

I wonder if it's expecting to multithread/multiprocess on 4 cores but something in the Arm compilation is only allowing access to one core.
I was thinking the same - it's similar for both B-em and b2 in that regard, although I can't ramp up to 400% on b2 that I can notice at least. What I don't know and maybe the emulator authors can answer is how is 100% calibrated on different machines by the emulator to keep it a "2 Mhz". What is it querying or polling?

User avatar
JasonStonier
Posts: 351
Joined: Mon Dec 10, 2018 8:10 pm
Location: Dorset
Contact:

Re: b2 - new emulator

Post by JasonStonier » Mon Aug 24, 2020 10:55 pm

melchett wrote:
Mon Aug 24, 2020 9:08 pm
What I don't know and maybe the emulator authors can answer is how is 100% calibrated on different machines by the emulator to keep it at "2 Mhz". What is it querying or polling?
It's got to be independent of the host processor speed as it runs exactly the same (wrong) speed on the Pi 3B+ and the Pi 4, so I wonder if it's calculating it on the fly from cycles over time ticks. You're about a million times better than me at coding, I'd suggest, but I just had a trawl through main.c of the b-em source and I found what I thought would be the speed multipliers, but changing and recompiling makes no difference to the actual reported MHz.

Post Reply

Return to “8-bit acorn emulators”