B-Em

discuss bbc micro and electron emulators (including mame) here!
User avatar
tricky
Posts: 7695
Joined: Tue Jun 21, 2011 9:25 am
Contact:

Re: B-Em

Post by tricky »

I did add keyboard mapping to joystick and vice versa as well as multiple joystick mapping, but as I don't do git,I only posted the source. I think someone else did do what is required to request a merge, but I don't know if anything happened.
Next time I'm on my pc, I'll post my latest windows exes, but don't do Linux (yes, sorry phone+bath+Linux = limit).
Stainy
Posts: 63
Joined: Sun Apr 15, 2012 10:07 pm
Contact:

Re: B-Em

Post by Stainy »

Excellent.. thank you.
User avatar
lovebug
Posts: 1740
Joined: Sun Jan 31, 2021 5:07 pm
Location: Magrathea
Contact:

Re: B-Em

Post by lovebug »

SOMETHING VERY ODD INDEED !

so I made a mistake of completely deleting my copy of b-em as what I though was a duplicate was in fact a symbolic link to the original :oops:

no issue (i thought) , i'll git clone it again and re-compile, so I did that

compiled no errors but something very odd is happening, the emulation is running fast and showing 120% and the sound timing is a bit unstable
the info at the top shows the emulation is running at 120% ~2.4MHz !!!

Thanks

Code: Select all

lovebug@LoveByte:~/github/b-em$ b-em --help
B-em v-a55f951 command line options:
I'll take a look at the latest source on github and see if I can spot any changes that may have caused this
Last edited by lovebug on Sat Dec 02, 2023 9:59 am, edited 1 time in total.
Image Image Image Image
User avatar
lovebug
Posts: 1740
Joined: Sun Jan 31, 2021 5:07 pm
Location: Magrathea
Contact:

Re: B-Em

Post by lovebug »

**original post edited and removed by me**

**new post**

I thought I had found a fix to the issue but I had accidentally ran an old version of b-em which was running at 100%

the 120% speed issue still exists for me and the glitchy mess this time in both windows and fullscreen mode
its strange that this 1 frame at 100% causes gllitching on my toshiba with intel gpu but on my imac with nvidia its fine

but the main problem now is that the emulation speed is 120% ????
 
Screenshot from 2023-12-02 10-17-30.png
Image Image Image Image
Stainy
Posts: 63
Joined: Sun Apr 15, 2012 10:07 pm
Contact:

Re: B-Em

Post by Stainy »

tricky wrote: Fri Dec 01, 2023 8:03 pm I did add keyboard mapping to joystick and vice versa as well as multiple joystick mapping, but as I don't do git,I only posted the source. I think someone else did do what is required to request a merge, but I don't know if anything happened.
Next time I'm on my pc, I'll post my latest windows exes, but don't do Linux (yes, sorry phone+bath+Linux = limit).
meant to ask.. does it do per game mapping?
User avatar
tricky
Posts: 7695
Joined: Tue Jun 21, 2011 9:25 am
Contact:

Re: B-Em

Post by tricky »

I did a launcher that passed which layout went with which game, but only filled in a few game's keys.
Looks like it was 6 years ago!


URL:https://youtu.be/cHkXg0ZueoY-g

The systems that got added to beebem and b-em were different to mine :(
Last edited by tricky on Sat Dec 02, 2023 10:18 pm, edited 2 times in total.
User avatar
lovebug
Posts: 1740
Joined: Sun Jan 31, 2021 5:07 pm
Location: Magrathea
Contact:

Re: B-Em

Post by lovebug »

I'm still having issues with the latest source code from github

as a test I downloaded it onto my iMac (linux) and compiled it, I also still have the previous compiled version for comparison

the previous version shows a solid unchanging 100% emulation speed
the current version gives a fluctuating 97-102% emulation speed

so something has changed, this version also gives a crazy 120% emulation speed on my toshiba laptop

any ideas guys ?

Thanks
Image Image Image Image
User avatar
lovebug
Posts: 1740
Joined: Sun Jan 31, 2021 5:07 pm
Location: Magrathea
Contact:

Re: B-Em

Post by lovebug »

ok I just discovered something else about this latest version
It doesn't make any difference which speed you choose from the speed menu as the emulation speed never changes

In the previous version the speed menu worked !

something is very broken with the emulation speed in the latest source
Last edited by lovebug on Sat Dec 02, 2023 9:54 pm, edited 1 time in total.
Image Image Image Image
User avatar
lovebug
Posts: 1740
Joined: Sun Jan 31, 2021 5:07 pm
Location: Magrathea
Contact:

Re: B-Em

Post by lovebug »

lovebug wrote: Fri Oct 06, 2023 8:54 pmafter a little searching I got things to work, thanks @Diminished for pointing me in the right direction
im not sure which version of source code it was but it was from around this date when I was first trying to compile and that version worked fine
Image Image Image Image
User avatar
lovebug
Posts: 1740
Joined: Sun Jan 31, 2021 5:07 pm
Location: Magrathea
Contact:

Re: B-Em

Post by lovebug »

tricky wrote: Sat Dec 02, 2023 6:27 pm I did a launcher that passed which layout went with which game, but only filled in a few game's keys.
Looks like it was 6 years ago!


URL:https://youtu.be/cHkXg0ZueoY-g

The systems that got added to beebem and b-em were different to mine :(
Nice Job Tricky :+1: :+1: :+1: :+1: :+1:
Image Image Image Image
Stainy
Posts: 63
Joined: Sun Apr 15, 2012 10:07 pm
Contact:

Re: B-Em

Post by Stainy »

tricky wrote: Sat Dec 02, 2023 6:27 pm I did a launcher that passed which layout went with which game, but only filled in a few game's keys.
Looks like it was 6 years ago!


URL:https://youtu.be/cHkXg0ZueoY-g

The systems that got added to beebem and b-em were different to mine :(
Any chance I could get your updated version of B-em and that launcher? would love that.. :
User avatar
tricky
Posts: 7695
Joined: Tue Jun 21, 2011 9:25 am
Contact:

Re: B-Em

Post by tricky »

I'll do some excavation and see what the current b-em making is like, otherwise I'll update it for my current b-em.
User avatar
lovebug
Posts: 1740
Joined: Sun Jan 31, 2021 5:07 pm
Location: Magrathea
Contact:

Re: B-Em

Post by lovebug »

Has anyone else had the same issues that i am experiencing with the latest source ?

I really need to find a solution to this as I'm no longer able to use b-em, I wish I hadn't updated it :(

Is there any way to download the older source code from October that worked ?

Thanks

*** edit *** I discovered that you can create a branch from commit so I'm going to test older versions :D
Image Image Image Image
User avatar
lovebug
Posts: 1740
Joined: Sun Jan 31, 2021 5:07 pm
Location: Magrathea
Contact:

Re: B-Em

Post by lovebug »

ok there was a commit back on the 22nd of October, I created a branch of that and compiled

it does work correctly, speed menu actually does what it should and the graphics are back to normal
but window mode seems to default to the full display resolution and everything is stretched

so im going to go back a little more and see if I can find the version that worked correctly
Image Image Image Image
User avatar
Diminished
Posts: 1235
Joined: Fri Dec 08, 2017 9:47 pm
Contact:

Re: B-Em

Post by Diminished »

lovebug wrote: Sun Dec 03, 2023 4:13 pm Has anyone else had the same issues that i am experiencing with the latest source ?
no

Screenshot_20231203_164444.png
User avatar
lovebug
Posts: 1740
Joined: Sun Jan 31, 2021 5:07 pm
Location: Magrathea
Contact:

Re: B-Em

Post by lovebug »

Diminished wrote: Sun Dec 03, 2023 4:48 pm
lovebug wrote: Sun Dec 03, 2023 4:13 pm Has anyone else had the same issues that i am experiencing with the latest source ?
no


Screenshot_20231203_164444.png
thanks for trying the latest source, I see the graphics look ok and the speed is 100% which is good
does the speed menu allow you to change emulation speed like 50% 25% etc ?
Image Image Image Image
Sazhen86
Posts: 92
Joined: Wed Dec 30, 2020 8:55 pm
Contact:

Re: B-Em

Post by Sazhen86 »

lovebug wrote: Sun Dec 03, 2023 4:13 pm Has anyone else had the same issues that i am experiencing with the latest source ?
I see the same problem on macOS, with the speed being especially excessive if I disable the Music 5000 emulation.

Going back to a version before the merge of sf/m5000-push2 restores the previous behaviour. Commit 5191233f does seem to make changes to the timing in various ways, so maybe it's related.

I also see this when compiling with clang on macOS:

Code: Select all

  CC       ARMulator/b_em-armsupp.o
ARMulator/armemu.c:820:21: error: expected expression
                    int do_int = 0;  
That looks to be related to commit c4ea698d.
User avatar
lovebug
Posts: 1740
Joined: Sun Jan 31, 2021 5:07 pm
Location: Magrathea
Contact:

Re: B-Em

Post by lovebug »

Sazhen86 wrote: Sun Dec 03, 2023 6:54 pm
lovebug wrote: Sun Dec 03, 2023 4:13 pm Has anyone else had the same issues that i am experiencing with the latest source ?
I see the same problem on macOS, with the speed being especially excessive if I disable the Music 5000 emulation.

Going back to a version before the merge of sf/m5000-push2 restores the previous behaviour. Commit 5191233f does seem to make changes to the timing in various ways, so maybe it's related.

I also see this when compiling with clang on macOS:

Code: Select all

  CC       ARMulator/b_em-armsupp.o
ARMulator/armemu.c:820:21: error: expected expression
                    int do_int = 0;  
That looks to be related to commit c4ea698d.
Thank you so much, my powers of deduction are not so great these days after my recent stroke. I did try to work out what was going on but my brain easily tires now and had I to stop :(

Well done for finding this :+1: :+1: :+1: :+1: :+1:
Image Image Image Image
Sazhen86
Posts: 92
Joined: Wed Dec 30, 2020 8:55 pm
Contact:

Re: B-Em

Post by Sazhen86 »

lovebug wrote: Sun Dec 03, 2023 7:01 pm
Thank you so much, my powers of deduction are not so great these days after my recent stroke. I did try to work out what was going on but my brain easily tires now and had I to stop :(
I'm really sorry to hear that, I wish you a full and speedy recovery.

Looking at the recent changes, it seems that the allegro timer may be getting set to an incorrect value. For a speed of 100% the timer should have a value of 1/50s or 0.02. The previous code had this value in the emu_speed table as "1.0 / 50.0" and set the timer from that.

The new code uses the following:

Code: Select all

static double calc_speed(double divider)
{
    double secs = ((double)slice / 2000000.0) / divider;
    time_limit = secs * 2.0;
    log_error("main: dvider=%g calc speed=%g",divider, secs);
    return secs;
}
Where divider is taken from the new table with a value of 50.0. Slice is set to 40,000 so slice / 2,000,000 is 0.02 but then that gets divided by 50.0 from the table giving a much smaller value for the timer.

It seems that maybe the 50.0 in the table:

Code: Select all

const emu_speed_t emu_speeds[NUM_EMU_SPEEDS] = {
    {  "10%", 50.0 * 0.10, 1 },
    {  "25%", 50.0 * 0.25, 1 },
    {  "50%", 50.0 * 0.50, 1 },
    {  "75%", 50.0 * 0.75, 1 },
    { "100%", 50.0,        1 },
    { "150%", 50.0 * 1.50, 2 },
    { "200%", 50.0 * 2.00, 2 },
    { "300%", 50.0 * 3.00, 3 },
    { "400%", 50.0 * 4.00, 4 },
    { "500%", 50.0 * 5.00, 5 }
};
is now superfluous? and 100% should be just 1.0? A test does seem to confirm that, although now I get the screen artifacts that someone mentioned above. So I need to look into why that might be.

An update: It seems that the video artifacts only appear at 100% speed and below. Setting it to 150% makes the video work correctly, but of course it's running the emulation too quickly.

Another update: Turning on PAL emulation prevents the video artifacts, albeit with the PAL emulation appearance, but at least it's smooth.

Of course, I could be wrong about all of this, so let's see if Steve can shed some light on it.
User avatar
Diminished
Posts: 1235
Joined: Fri Dec 08, 2017 9:47 pm
Contact:

Re: B-Em

Post by Diminished »

Working on tests leads you down strange roads sometimes.

Screenshot 2023-12-09 at 00.58.12.png
Screenshot 2023-12-09 at 00.58.12.png (42.31 KiB) Viewed 80806 times
Stainy
Posts: 63
Joined: Sun Apr 15, 2012 10:07 pm
Contact:

Re: B-Em

Post by Stainy »

tricky wrote: Sun Dec 03, 2023 3:09 pm I'll do some excavation and see what the current b-em making is like, otherwise I'll update it for my current b-em.
I`m going back to the UK for a visit on Friday.. I would love to take my Win2 with me and Beeb on the go if you find the time :)
User avatar
tricky
Posts: 7695
Joined: Tue Jun 21, 2011 9:25 am
Contact:

Re: B-Em

Post by tricky »

Sorry, as usual, my brain has let me down and forgotten about this.
Does a Win2 run windows, I guess so by the name, if so which version inc 32/64 bit?
User avatar
tricky
Posts: 7695
Joined: Tue Jun 21, 2011 9:25 am
Contact:

Re: B-Em

Post by tricky »

Sorry for the mostly off topic launcher stuff!
Launcher thread https://www.stardot.org.uk/forums/viewt ... 95#p410695 updated with downloads.
Please post anything related to my launcher over there.
User avatar
lovebug
Posts: 1740
Joined: Sun Jan 31, 2021 5:07 pm
Location: Magrathea
Contact:

Re: B-Em

Post by lovebug »

handy program there tricky, well done :+1: :+1: :+1: :+1: :+1:
Image Image Image Image
User avatar
Ukwebb
Posts: 775
Joined: Sat Apr 10, 2021 12:38 pm
Contact:

Re: B-Em

Post by Ukwebb »

run B-EM up today for the first time in a while and noticed a couple of things

1. what are the X.X3 releases of Master MOS's ie 3.23 and 3.53? - I thought it could have been the IDE/SCSI drivers, but they both seem to have 2.03 ADFS . Any details about these MOS's

2. how do you tell it which IDE/SCSI hard disk images to use ?
Attachments
image.png
image.png (11.01 KiB) Viewed 80136 times
image2.png
BBC Bs, Master 128s, Master Compact, and Electrons, and an A3000 with an ARM3 :)

Don’t Panic and Always Carry a Towel
Coeus
Posts: 3557
Joined: Mon Jul 25, 2016 12:05 pm
Contact:

Re: B-Em

Post by Coeus »

Ukwebb wrote: Thu Dec 14, 2023 9:38 pm 1. what are the X.X3 releases of Master MOS's ie 3.23 and 3.53? - I thought it could have been the IDE/SCSI drivers, but they both seem to have 2.03 ADFS . Any details about these MOS's
They're ones with fixes. See: https://github.com/stardot/b-em/issues/108
Ukwebb wrote: Thu Dec 14, 2023 9:38 pm 2. how do you tell it which IDE/SCSI hard disk images to use ?
For the Master, the bundled version of MOS are all SCSI as B-Em includes SCSI emulation and this was the original from back in the day. The SCSI discs are located in B-Em's config directory. For Linux this is ~/.config/b-em so they would be ~/.config/b-em/scsi/scsi0.dat, ~/.config/b-em/scsi/scsi1.dat, ~/.config/b-em/scsi/scsi2.dat and ~/.config/b-em/scsi/scsi3.dat with each .dat file having a corresponding .dsc file to give the size/geometry. For Windows the config directory is called b-em.exe and is somewhere in your WIndows roaming profile.

IDE emulation is supported and the discs are the files hd4.hdf and hd5.hdf, again in the b-em config directory. For IDE discs, the image files can have every byte used or have only even bytes used as would be the case when copying a disc used on a real IDE interface. You would have to load an IDE-patched version of ADFS to use those, though.
User avatar
Ukwebb
Posts: 775
Joined: Sat Apr 10, 2021 12:38 pm
Contact:

Re: B-Em

Post by Ukwebb »

brill thanks for that
I found it under windows - no wonder i couldn't find it!

%USERPROFILE%\AppData\Roaming\b-em.exe\
BBC Bs, Master 128s, Master Compact, and Electrons, and an A3000 with an ARM3 :)

Don’t Panic and Always Carry a Towel
User avatar
lovebug
Posts: 1740
Joined: Sun Jan 31, 2021 5:07 pm
Location: Magrathea
Contact:

Re: B-Em

Post by lovebug »

Merry Christmas

I've been trying to find a way to start b-em in full screen mode from linux terminal

--help doesn't show an option for this, does this option exist ?

If not I could write it I guess

Code: Select all

lovebug@LoveByte:~/github/bbc/LadyBug/source$ b-em --help
B-em v-2439bba command line options:

-mx             - start as model x (see readme.txt for models)
-tx             - start with tube x (see readme.txt for tubes)
-disc disc.ssd  - load disc.ssd into drives :0/:2
-disc1 disc.ssd - load disc.ssd into drives :1/:3
-autoboot       - boot disc in drive :0
-tape tape.uef  - load tape.uef
-fasttape       - set tape speed to fast
-Fx             - set maximum video frames skipped
-s              - scanlines display mode
-i              - interlace display mode
-spx            - Emulation speed x from 0 to 9 (default 4)
-debug          - start debugger
-debugtube      - start debugging tube processor
-exec file      - debugger to execute file
-paste string   - paste string in as if typed
-vroot host-dir - set the VDFS root
-vdir guest-dir - set the initial (boot) dir in VDFS
Image Image Image Image
User avatar
lovebug
Posts: 1740
Joined: Sun Jan 31, 2021 5:07 pm
Location: Magrathea
Contact:

Re: B-Em

Post by lovebug »

I inserted this code at line 199 to main.c but I failed, it still opens in windowed mode :P

Code: Select all

        else if (!strcasecmp(argv[c], "-fullscreen"))
            fullscreen = 1;
Image Image Image Image
User avatar
lovebug
Posts: 1740
Joined: Sun Jan 31, 2021 5:07 pm
Location: Magrathea
Contact:

Re: B-Em

Post by lovebug »

I had a little sleep and then decided to take another look at the code

I got the -fullscreen option to work, the only issue im facing is that if the settings -> video -> borders menu option is set to "none" then the display only renders about 30.9 of the 32 rows ? I'll look into this when i have the energy

anyways here is the main.c with the 3 small changes I've made (marked with // lovebug for easy location)
Attachments
main.c.zip
(4.62 KiB) Downloaded 4 times
Image Image Image Image
Post Reply

Return to “8-bit acorn emulators”