b2 - new emulator

discuss bbc micro and electron emulators (including mame) here!
User avatar
Yrrah2
Posts: 560
Joined: Tue Feb 06, 2007 6:06 pm
Location: Netherlands
Contact:

Re: b2 - new emulator

Post by Yrrah2 »

tom_seddon wrote: Sat Mar 04, 2023 11:53 pm I believe in principle you can use any joystick - I don't have any to test it with though. But the gamepad mapper tool I mentioned will hopefully let you specify which joystick controls map to the game controller controls. Please let me know if you try this, as I'd be interested to know whether it works, so I can update the docs (if it works) or try to fix it (if it doesn't).
I saw that you mentioned it, but it is not yet working, right?
So in your update I can test this, right? Because I can not see anything yet in the Joysticks menu.
tom_seddon wrote: Sat Mar 04, 2023 11:53 pm This would be a longer-term thing. It would be nice to have all the input unified, so you can map any PC input to any BBC input (or emulator command), but for now PC game controllers map to BBC joysticks and PC keys map to BBC keys. This is just me not planning ahead enough when writing the code, sorry about that.
No problem 8)
tom_seddon wrote: Sat Mar 04, 2023 11:53 pm Ahh, good idea... I hadn't thought of that! I've added it to the list of things that aren't emulated yet (but should be): https://github.com/tom-seddon/b2/issues/14
I'm not very good in how those systems with 32k (or more k) ROMs work. But there is a slight difference between (for instance) Watford Electronics and Computer Concept how they handle this. Had a very short chat in a forum with KenLowe finding real boards for those ROMs.
(viewtopic.php?f=3&t=19392&p=301163&hili ... st#p301163)
If I understand it correctly, he managed to do something like this on the 'IntegraBV2'?
But maybe I'm totally off the subject here. I'm not a bright star in this kind of programming.

Koen
Happy with my BBC Master
www.mybbcmaster.nl
User avatar
KenLowe
Posts: 4675
Joined: Mon Oct 18, 2004 5:35 pm
Location: UK
Contact:

Re: b2 - new emulator

Post by KenLowe »

Yrrah2 wrote: Sun Mar 05, 2023 9:02 pm
tom_seddon wrote: Sat Mar 04, 2023 11:53 pm Ahh, good idea... I hadn't thought of that! I've added it to the list of things that aren't emulated yet (but should be): https://github.com/tom-seddon/b2/issues/14
I'm not very good in how those systems with 32k (or more k) ROMs work. But there is a slight difference between (for instance) Watford Electronics and Computer Concept how they handle this. Had a very short chat in a forum with KenLowe finding real boards for those ROMs.
(viewtopic.php?f=3&t=19392&p=301163&hili ... st#p301163)
If I understand it correctly, he managed to do something like this on the 'IntegraBV2'?
But maybe I'm totally off the subject here. I'm not a bright star in this kind of programming.
Yes, I've been able to add the PALPROM switching logic into the CPLD on my IntegraBV2 board, so can run PALPROMs on my IntegraBV2. However, in it's current form it's not very 'end user' friendly. These PALPROMs tend to be grouped into a handful of different types. The different types may use different size EPROMs (typically 32K, 64K & 128K), and different switching addresses to access the 'hidden' banks, beyond the standard 16K. On my current IntegraBV2 board I have to reprogram the CPLD if I want to use a different type of PALPROM, which is not very convenient.

If using the same PALPROM type, it's quite easy to reprogram the IntegraB RAM to accept a different PALPROM. So, for example, if the IntegraB CPLD has been programmed with the switching addresses for the 128K Computer Concept PALPROMs (which uses 8 x 16K banks), I can switch between SpellMaster and MegaROM by putting the IntegraB into a special Recovery mode (long press of the BREAK key), and then use a special program to load all 8 x 16k banks into the IntegraB RAM.

If looking to implement PALPROMs in B2, then it would be worth having a look at the work @Pernod has done in MAME:

viewtopic.php?p=223831#p223831
https://github.com/mamedev/mame/blob/ma ... om/pal.cpp
tom_seddon
Posts: 889
Joined: Tue Aug 30, 2005 12:42 am
Contact:

Re: b2 - new emulator

Post by tom_seddon »

I've made a pre-release version that (amongst a couple of other things) loads the SDL gamepad database and hopefully has square window borders on Windows 11: https://github.com/tom-seddon/b2/releas ... prerelease

This should support a wider range of gamepads out of the box.

Now I've got the pre-release mechanism set up, I'll probably be doing more regular pre-release versions, as the quality/testing bar is a bit lower. Then if nobody reports any issues for a while, and I don't find anything myself, I'll make a corresponding proper release.

(I won't publicise every pre-release version here (though I'll post if there's one with something major in it), but I do plan to try to be a bit more organised about publicising releases. But if you're signed up to GitHub, I think you can watch the b2 repo for new releases and get notified that way.)

--Tom
garfield
Posts: 547
Joined: Mon Jan 03, 2005 1:38 am
Contact:

Re: b2 - new emulator

Post by garfield »

tom_seddon wrote: Tue Jun 27, 2023 11:56 pm I've made a pre-release version ...

Now I've got the pre-release mechanism set up, I'll probably be doing more regular pre-release versions, as the quality/testing bar is a bit lower.
--Tom
Nice. Good to see more B2 enhancements and fixes.

Some feedback on b2-20230626-081036-1baad75-prerelease :


CONFIRMED FIXED: rounded window surround is gone. Hurrah!

"Filter display" is unchecked... but the resultant PNG screenshot is always edge filtered. It would be nice if the screenshot would output hard-edged pictures with strictly 8 colours maximum when the "Filter display" is off.

When "Speed scale" is 0... screenshot does not work. It seems like the file output is "held" until the emulator speed is increased to a non-zero value.

Add (non-conflicting) key-sequence for taking screenshot?
tom_seddon
Posts: 889
Joined: Tue Aug 30, 2005 12:42 am
Contact:

Re: b2 - new emulator

Post by tom_seddon »

garfield wrote: Wed Jun 28, 2023 10:18 am CONFIRMED FIXED: rounded window surround is gone. Hurrah!
\:D/
garfield wrote: Wed Jun 28, 2023 10:18 am "Filter display" is unchecked... but the resultant PNG screenshot is always edge filtered. It would be nice if the screenshot would output hard-edged pictures with strictly 8 colours maximum when the "Filter display" is off.
Yes, very true. The screenshot respects the aspect ratio checkbox, but I forgot about this option, which it should respect as well. Perhaps there should be a separate set of options for the screenshot, as you might reasonably want one thing for the emulator output and another for the screen grabs.

(Next on my list is copy screenshot to clipboard! I wonder if that would benefit from separate options too.)

Note that the "strictly 8 colours maximum" may not apply even if you switch all filtering off, due to the NuLA emulation.
garfield wrote: Wed Jun 28, 2023 10:18 am When "Speed scale" is 0... screenshot does not work. It seems like the file output is "held" until the emulator speed is increased to a non-zero value.
Ahhh yes, quite obvious now you mention it :lol: - the UI and the emulation run independently, so the screenshot waits until the current frame has been fully completed before doing the save in order to avoid any tearing. But if the BBC is halted, that's just never going to happen. I bet the same applies when it's stopped in the debugger!

I'll get this fixed somehow.
garfield wrote: Wed Jun 28, 2023 10:18 am Add (non-conflicting) key-sequence for taking screenshot?
You should be able to assign a keyboard shortcut using Keyboard > Command Keys - the command is Save Screenshot. I've deliberately shied away from assigning any default non-debugger shortcut keys, as by default all keypresses go to the Beeb itself. But I'm open to suggestions!

--Tom
garfield
Posts: 547
Joined: Mon Jan 03, 2005 1:38 am
Contact:

Re: b2 - new emulator

Post by garfield »

tom_seddon wrote: Thu Jun 29, 2023 11:43 pm I'll get this fixed somehow.
Cool !
tom_seddon
Posts: 889
Joined: Tue Aug 30, 2005 12:42 am
Contact:

Re: b2 - new emulator

Post by tom_seddon »

https://github.com/tom-seddon/b2/releas ... prerelease should fix the screenshot-when-paused issue, and I added separate options for screenshot filtering/aspect ratio.

I also put in copy screenshot to clipboard, which I've wanted for a while.

This will become the next release, I think, if I don't find anything and nobody reports any issues.

--Tom
garfield
Posts: 547
Joined: Mon Jan 03, 2005 1:38 am
Contact:

Re: b2 - new emulator

Post by garfield »

tom_seddon wrote: Sun Jul 09, 2023 9:58 pm https://github.com/tom-seddon/b2/releas ... prerelease should fix the screenshot-when-paused issue, and I added separate options for screenshot filtering/aspect ratio.

I also put in copy screenshot to clipboard, which I've wanted for a while.

This will become the next release, I think, if I don't find anything and nobody reports any issues.

--Tom
The screenshot (while paused) works now Tom. Thanks. The "separate-from-displaying" options are a nice addition.


On the 'copy-to-clipboard' screenshot... I think this might be bugged. The colours (especially on games that do mid-frame palette changes) seem all wrong when I paste into a program like Paint / Paint.net et cetera...
tom_seddon
Posts: 889
Joined: Tue Aug 30, 2005 12:42 am
Contact:

Re: b2 - new emulator

Post by tom_seddon »

garfield wrote: Mon Jul 10, 2023 4:17 pm On the 'copy-to-clipboard' screenshot... I think this might be bugged. The colours (especially on games that do mid-frame palette changes) seem all wrong when I paste into a program like Paint / Paint.net et cetera...
Are the red and blue channels swapped, or does it look weirder than that?

--Tom
garfield
Posts: 547
Joined: Mon Jan 03, 2005 1:38 am
Contact:

Re: b2 - new emulator

Post by garfield »

tom_seddon wrote: Mon Jul 10, 2023 5:37 pm Are the red and blue channels swapped, or does it look weirder than that?

--Tom
whoops.png
Pasted image (on the left) from B2 clipboard buffer copy (on the right).

Yeah it seems that the blue is now red... and looks like other mappings (yellow/cyan) might be off too...
tom_seddon
Posts: 889
Joined: Tue Aug 30, 2005 12:42 am
Contact:

Re: b2 - new emulator

Post by tom_seddon »

garfield wrote: Mon Jul 10, 2023 5:46 pm Yeah it seems that the blue is now red... and looks like other mappings (yellow/cyan) might be off too...
Thanks. I thought I'd fixed this, but... apparently not? I'll have another go later.

--Tom
tom_seddon
Posts: 889
Joined: Tue Aug 30, 2005 12:42 am
Contact:

Re: b2 - new emulator

Post by tom_seddon »

There's another pre-release available, that fixes the wonky colours when copying to clipboard on Windows: https://github.com/tom-seddon/b2/releas ... prerelease

--Tom
garfield
Posts: 547
Joined: Mon Jan 03, 2005 1:38 am
Contact:

Re: b2 - new emulator

Post by garfield »

tom_seddon wrote: Tue Jul 11, 2023 1:51 pm There's another pre-release available, that fixes the wonky colours when copying to clipboard on Windows: https://github.com/tom-seddon/b2/releas ... prerelease

--Tom
Copy-to-clipboard fixed !
kevinlingley
Posts: 13
Joined: Tue Jun 28, 2022 12:01 pm
Contact:

Re: b2 - new emulator

Post by kevinlingley »

Hello! Is there a way to launch the emulator fullscreen from the command line or by setting a config? I have scanned the thread and saw someone asked something similar in 2021 but couldnt see an answer. I think the emulator is fantastic and am enjoying using it a lot.
tom_seddon
Posts: 889
Joined: Tue Aug 30, 2005 12:42 am
Contact:

Re: b2 - new emulator

Post by tom_seddon »

kevinlingley wrote: Mon Aug 14, 2023 1:23 pm Hello! Is there a way to launch the emulator fullscreen from the command line or by setting a config? I have scanned the thread and saw someone asked something similar in 2021 but couldnt see an answer. I think the emulator is fantastic and am enjoying using it a lot.
Thanks for the feedback, and I'm glad to hear you're enjoying using b2!

Regarding full screen, there's no real support for it at the moment, aside from using the full screen button on macOS. (On Windows, best you get is a maximized window - not really the same. I never use full screen mode myself, which is why the support isn't very good!)

My first inclination is to make the setting persistent, so it'll start up full screen if you exit that way - but I'm open to suggestions?

I've added a GitHub issue for this: https://github.com/tom-seddon/b2/issues/277

--Tom
User avatar
MillieTD83
Posts: 179
Joined: Mon Aug 24, 2009 6:53 pm
Location: Thetford, UK
Contact:

Re: b2 - new emulator

Post by MillieTD83 »

Apologies if this has already been addressed - I did do a skim of the thread to make sure I hadn't missed it.

Early on someone mentioned the floppy drive sound. I quite like the sound itself, but my issue is with the seeking part of it. Like it just crunches and isn't all that pleasant, as opposed to the smoother seeking in B-Em and BeebEm. Is this on the to-do list?
REPEAT PRINT'"FOZZY!!!!! ";:UNTIL FALSE

BBC Master 128 w/MultiOS, PiTubeDirect, Econet, Datacentre+CF-IDE interface, Gotek
tom_seddon
Posts: 889
Joined: Tue Aug 30, 2005 12:42 am
Contact:

Re: b2 - new emulator

Post by tom_seddon »

MillieTD83 wrote: Mon Aug 14, 2023 5:45 pm Apologies if this has already been addressed - I did do a skim of the thread to make sure I hadn't missed it.

Early on someone mentioned the floppy drive sound. I quite like the sound itself, but my issue is with the seeking part of it. Like it just crunches and isn't all that pleasant, as opposed to the smoother seeking in B-Em and BeebEm. Is this on the to-do list?
It is, though it's been languishing on there for quite a while at this point! - https://github.com/tom-seddon/b2/issues/2

(At the moment, it has separate seek and step sounds, but this is probably wrong, as a seek is just a sequence of steps. The steps should also change tone slightly, depending on the track. Not sure if changing the pitch would be good enough, or if more needs doing. I'd need to fiddle around with it a bit.)

--Tom
User avatar
frankc
Posts: 26
Joined: Sat Mar 28, 2020 9:52 am
Location: R35 HE00
Contact:

Re: b2 - new emulator

Post by frankc »

Just a drive-by comment-
Great to find an emulator that I can install on MacOS without the need for a degree in computer science!
(Just to forestall - that is meant to be humorous rather than snarky. I'm lazy rather than inept.)
Been struggling for some time to get some - any - emulator up and running on a Mac. It's a minority sport so when I got to b2 this am I was surprised to find a native installer. It did exactly what it says on the tin - I was delighted.

Will work with it for a while and hopefully generate some helpful feedback.

I'm not really interested in gaming, rather I'm trying to retrieve some old software from a time in my life when the beeb made a big difference.

Left a few upvotes for tape (UEF format) support on your GitHub site.

Regards and respect.
Frank C.
User avatar
MillieTD83
Posts: 179
Joined: Mon Aug 24, 2009 6:53 pm
Location: Thetford, UK
Contact:

Re: b2 - new emulator

Post by MillieTD83 »

tom_seddon wrote: Tue Jun 27, 2023 11:56 pm I've made a pre-release version that (amongst a couple of other things) loads the SDL gamepad database and hopefully has square window borders on Windows 11: https://github.com/tom-seddon/b2/releas ... prerelease

This should support a wider range of gamepads out of the box.

Now I've got the pre-release mechanism set up, I'll probably be doing more regular pre-release versions, as the quality/testing bar is a bit lower. Then if nobody reports any issues for a while, and I don't find anything myself, I'll make a corresponding proper release.

(I won't publicise every pre-release version here (though I'll post if there's one with something major in it), but I do plan to try to be a bit more organised about publicising releases. But if you're signed up to GitHub, I think you can watch the b2 repo for new releases and get notified that way.)

--Tom
Xbox One controller works quite happily with no messing. Tested with Bandits at 3 o'clock (MicroPower Magic II version as that's joystick only), Galaforce, and Repton Thru-Time: game no problems at all - shuffle is fine with a thumb. Editor is interesting. If you set it to analogue in the options menu (in the editor), the d-pad jumps around, while the analogue stick give smooth movement. Setting it to switch gives smooth movement on both.
REPEAT PRINT'"FOZZY!!!!! ";:UNTIL FALSE

BBC Master 128 w/MultiOS, PiTubeDirect, Econet, Datacentre+CF-IDE interface, Gotek
Stainy
Posts: 61
Joined: Sun Apr 15, 2012 10:07 pm
Contact:

Re: b2 - new emulator

Post by Stainy »

Hi Tom..

I grabbed a pre-compiled binary and it complains about a VCruntime missing

any ideas? I'm on Win 11
User avatar
sbadger
Posts: 499
Joined: Mon Mar 25, 2013 1:12 pm
Location: Farnham, Surrey
Contact:

Re: b2 - new emulator

Post by sbadger »

Stainy wrote: Wed Sep 13, 2023 3:41 am Hi Tom..

I grabbed a pre-compiled binary and it complains about a VCruntime missing

any ideas? I'm on Win 11
Sounds like you don't have the Microsoft Visual C++ Runtimes installed.
You can find a version for your OS here (32bit or 64 bit etc)

https://learn.microsoft.com/en-us/cpp/w ... 9-and-2022
So many projects, so little time...
tom_seddon
Posts: 889
Joined: Tue Aug 30, 2005 12:42 am
Contact:

Re: b2 - new emulator

Post by tom_seddon »

sbadger wrote: Wed Sep 13, 2023 9:49 am
Stainy wrote: Wed Sep 13, 2023 3:41 am Hi Tom..

I grabbed a pre-compiled binary and it complains about a VCruntime missing

any ideas? I'm on Win 11
Sounds like you don't have the Microsoft Visual C++ Runtimes installed.
You can find a version for your OS here (32bit or 64 bit etc)

https://learn.microsoft.com/en-us/cpp/w ... 9-and-2022
Thanks - this will be the fix, I expect. I thought I'd set b2 up to be entirely statically linked on Windows, ideally reducing the need for this sort of thing, but it looks like I didn't. I've added a new issue on GitHub to track this: https://github.com/tom-seddon/b2/issues/285

--Tom
Stainy
Posts: 61
Joined: Sun Apr 15, 2012 10:07 pm
Contact:

Re: b2 - new emulator

Post by Stainy »

Thanks for the link.. I got it running..
I don`t see any keys to joystick option...

So maybe I misread the detail ..
tom_seddon
Posts: 889
Joined: Tue Aug 30, 2005 12:42 am
Contact:

Re: b2 - new emulator

Post by tom_seddon »

Stainy wrote: Thu Sep 14, 2023 5:57 pm Thanks for the link.. I got it running..
I don`t see any keys to joystick option...

So maybe I misread the detail ..
Unfortunately you can currently only map PC keys to BBC keys, and PC joystick/gamepad to BBC joystick - there's no option to treat PC joystick/gamepad as BBC keys, or use keys to control joystick games. I do intend to fix this at some point!

--Tom
garfield
Posts: 547
Joined: Mon Jan 03, 2005 1:38 am
Contact:

Re: b2 - new emulator

Post by garfield »

tom_seddon wrote: Thu Sep 14, 2023 6:14 pm I do intend to fix this at some point!

--Tom
That will be great if/when it gets implemented!
Stainy
Posts: 61
Joined: Sun Apr 15, 2012 10:07 pm
Contact:

Re: b2 - new emulator

Post by Stainy »

tom_seddon wrote: Thu Sep 14, 2023 6:14 pm
Stainy wrote: Thu Sep 14, 2023 5:57 pm Thanks for the link.. I got it running..
I don`t see any keys to joystick option...

So maybe I misread the detail ..
Unfortunately you can currently only map PC keys to BBC keys, and PC joystick/gamepad to BBC joystick - there's no option to treat PC joystick/gamepad as BBC keys, or use keys to control joystick games. I do intend to fix this at some point!

--Tom

That would be excellent!! I`m surprised that none of the main emulators have this .. I remember the Open Pandora version had it.. and it was per game as well.. I loved that idea.
User avatar
egrath
Posts: 76
Joined: Thu Feb 03, 2022 7:49 pm
Location: Steyr, Austria
Contact:

Re: b2 - new emulator

Post by egrath »

Hi,

before opening a bug report, can anyone confirm the following (imho odd) behavior when dealing with disc images in b2:

1. Create a new disc (e.g. 80 track single sided) and save the image with the save option in the menu (known bug that it does not save automatically when creating the image, see https://github.com/tom-seddon/b2/issues/266)
2. Save something to the disc
3. Remove disc from emulated drive, then reinsert
4. The file created at (2) is not there

You actively need to save the disc image before removing it from the emulated drive with the corresponding menu entry. Don't know if this behavior is a bug or a feature.

With kind regards,
Egon
>>>>>>>>>>>Lets go
User avatar
tricky
Posts: 7692
Joined: Tue Jun 21, 2011 9:25 am
Contact:

Re: b2 - new emulator

Post by tricky »

Stainy wrote: Sat Sep 16, 2023 2:49 pm
tom_seddon wrote: Thu Sep 14, 2023 6:14 pm
Stainy wrote: Thu Sep 14, 2023 5:57 pm Thanks for the link.. I got it running..
I don`t see any keys to joystick option...

So maybe I misread the detail ..
Unfortunately you can currently only map PC keys to BBC keys, and PC joystick/gamepad to BBC joystick - there's no option to treat PC joystick/gamepad as BBC keys, or use keys to control joystick games. I do intend to fix this at some point!

--Tom

That would be excellent!! I`m surprised that none of the main emulators have this .. I remember the Open Pandora version had it.. and it was per game as well.. I loved that idea.
I thought that I posted a version of Beebem with this, but don't know if the code was ever included in the GitHub version.
User avatar
scruss
Posts: 653
Joined: Sun Jul 01, 2018 4:12 pm
Location: Toronto
Contact:

Re: b2 - new emulator

Post by scruss »

egrath wrote: Sun Mar 24, 2024 11:43 am You actively need to save the disc image before removing it from the emulated drive with the corresponding menu entry. Don't know if this behavior is a bug or a feature.
Yes, I lost my first save disk in b2 that way, too. But now I know how it works, I can live with it
EdwardianDuck
Posts: 326
Joined: Thu Aug 10, 2017 9:07 pm
Contact:

Re: b2 - new emulator

Post by EdwardianDuck »

scruss wrote: Mon Mar 25, 2024 1:30 am
egrath wrote: Sun Mar 24, 2024 11:43 am You actively need to save the disc image before removing it from the emulated drive with the corresponding menu entry. Don't know if this behavior is a bug or a feature.
Yes, I lost my first save disk in b2 that way, too. But now I know how it works, I can live with it
I think you need to use the "direct" variations so that writes are persisted.

Jeremy
Attachments
Screenshot 2024-03-25 at 09.11.58.png
Post Reply

Return to “8-bit acorn emulators”