Beebem Bbc B Emulator


frutbunn

Member
Joined
Aug 30, 2006
Messages
215
Location
The East Wing
Website
Visit site
I had a bit of free-time today, so I've merged Critical's keyboard code into my BeebEm port.

There is still no sound, but at least now the speed is regulated and you can load different disc images.

You must have a keyboard map and a disc image with the same name, for example "game.ssd" and "game.kbd"

And load it as:

"/mnt/sd/beebem/beebem.gpe /mnt/sd/beebem/game.ssd" (and the mapping file will automatically be loaded).

As before everything must be in /mnt/sd/beebem, and although I've added a few keyboard mapping files, you will need to source the disc images yourself.

Even without sound, it may still be fun for a quick game of Bug Blaster on the bus to work! :)

http://beebem-unix.bbcmicro.com/download/beebem2.tar.gz


Edit: Any keyboard mapping files you may have created for CriticalBeeb should also work here too.
 
Gruntfuggly posted on Dec 10 2006 at 11:46 PM said:
Runs nicely - have to restart the GP2X before I can run another image though...

Keep up the good work!

I meant to respond to this days ago, but RL's been getting in the way...

Thanks to everyone who's given this port a go! I hope to have another version released over the weekend, this time with sound.

Gruntfuggly: Hopefully this new one will work correctly!

Merging my port with Critical's is really going well, and Critical's work (especially on the keyboard) is saving me tons of time! So hopefully (fingers crossed) I may have a fully working emulator (without save state / GUI) before Christmas!

Was someone working on a virtual keyboard for CriticalBeeb? Is the code available?
 
Last edited by a moderator:
Here is a new version of my BeebEm port, now featuring sound support.

http://beebem-unix.bbcmicro.com/download/beebem3.tar.gz

As before you need to extract the archive to the root of your SD card, and the directory must be called 'beebem'. The keyboard files *.kbd must be in the same directory as the disc image *.ssd.

Changes:

I've added additional mapping to Critical's keyboard code, so now you can type:

BBC_ and then any key/symbol on the bbc keyboard that is a valid ASCII character (so everything except the pound sign £ as that's not ASCII - to map the pound sign type: BBC__ or BBC_POUND or BBC_UNDERSCORE).

here is a picture of a BBC B keyboard: http://acorn.chriswhy.co.uk/Pics/BBCI4B.JPG that clearly shows the keys.

So to map for MrWiz.ssd, I'd create a file called MrWiz.kbd and add:

Code:
LEFT=BBC_Z
RIGHT=BBC_X
UP=BBC_:
DOWN=BBC_/
A=BBC_SPACE
B=BBC_SPACE
X=BBC_RETURN
Y=BBC_RETURN
SELECT=BBC_ESCAPE

Critical's keyboard mapping names still also work.

We want the volume buttons to work as normal so:

Code:
VOLUP=VOLUME
VOLDOWN=VOLUME

You can only map the volume buttons (VOLUP/VOLDOWN) to control volume, setting other buttons to VOLUME does nothing. (i.e.: L=VOLUME does nothing).

The volume buttons work, but there is no auto repeat so to increase volume by 30%, press the VOL+ button three times. BeebEm loads with the volume set to 0%. But you can set the volume in the kbd file (see below).

Unfortunately Mr Wiz is unplayable with the stick, so I've added a screen 'flip' option so you can play games holding the GP2x upside down and use Y, A, B & X as a D-Pad.

To Activate screen 'flipped' mode add this too MrWiz.kbd:

Code:
SET ORIENTATION=FLIPPED

Now all we need to do is add the reversed key mapping too:

Code:
R_LEFT=BBC_X
R_RIGHT=BBC_Z
R_UP=BBC_/
R_DOWN=BBC_:
R_A=BBC_X
R_B=BBC_Z
R_X=BBC_:
R_Y=BBC_/
R_SELECT=ESCAPE

We don't want the shoulder buttons to do anything in flipped mode, so we clear them:

Code:
R_L=NOTHING
R_R=NOTHING

And we want the volume buttons to work as normal buttons rather than change the volume:

Code:
R_VOLUP=BBC_SPACE
R_VOLDOWN=BBC_RETURN

But now when we start Mr Wiz, we get no sound because the volume is set to 0% at startup, so fix volume at 50% for now (until GUI is finished):

Code:
SET VOLUME=50


OK, so putting it all together, the MrWiz.kbd file will look like this:

Code:
# Initial state of emulator:
SET ORIENTATION=FLIPPED
SET VOLUME=50

# Normal screen orientation keys (we don't use these):
LEFT=BBC_Z
RIGHT=BBC_X
UP=BBC_:
DOWN=BBC_/
A=BBC_SPACE
B=BBC_SPACE
X=BBC_RETURN
Y=BBC_RETURN
SELECT=BBC_ESCAPE

VOLUP=VOLUME
VOLDOWN=VOLUME

L=NOTHING
R=NOTHING


# The 'flipped' screen orientation keys (we do use these):
R_LEFT=BBC_X
R_RIGHT=BBC_Z
R_UP=BBC_/
R_DOWN=BBC_:
R_A=BBC_X
R_B=BBC_Z
R_X=BBC_:
R_Y=BBC_/
R_SELECT=ESCAPE

R_L=NOTHING
R_R=NOTHING

R_VOLUP=BBC_SPACE
R_VOLDOWN=BBC_RETURN


To run a disc image you need to pass its name to the /mnt/sd/beebem/beebem command. So:

/mnt/sd/beebem/beebem /mnt/sd/beebem/MrWiz.ssd

will run Mr Wiz.

Putting this in a file called MrWiz.gpe works really well with gmenu.

So to run Mr Wiz, create a text file called MrWiz.gpe with the following contents:

Code:
/mnt/sd/beebem/beebem /mnt/sd/beebem/MrWiz.ssd

Sometimes (well for me anyway) the GP2x doesn't make the file executable when it's transfered to the GP2x, so you may need to reset your GP2x after transfering the .gpe file for it to work.

Sorry that there is only the MrWiz.kbd keyboard mapping in the archive, but I've got to go out now so can't create any more!

If you create new key mappings, please add them to this thread so others can enjoy them!

Thanks to everyone who takes the time out to try this! Hope it works on your GP2x too!

OK, must dash now, have fun!
 
Hmmmm - some odd results. I tried Zalaga, but I there wasn't any sound. So I tried MrWiz, but after the loading screen appeared, I pressed a few buttons and Zalaga started - flipped upside down - but with sound?

Also still have the problem that after running one game, it doesn't seem to boot the disk next time round...

Looking very good though!

Will play a bit more in a while - batteries just went flat...
 
Edit: Forgot to add the mapping files..

Gruntfuggly posted on Dec 16 2006 at 08:34 PM said:
Hmmmm - some odd results. I tried Zalaga, but I there wasn't any sound.

Sorry, I messed up with the sound, to fix it add the following to all your .kbd mapping files (just for now):
Code:
VOLUME=50
VOLUP=VOLUME
VOLDOWN=VOLUME

Gruntfuggly posted on Dec 16 2006 at 08:34 PM said:
So I tried MrWiz, but after the loading screen appeared, I pressed a few buttons and Zalaga started - flipped upside down - but with sound?

Not sure what's happening there, here are my .kbd mapping files for Zalaga and MrWiz, replace your ones with these and make sure the case is the same, i.e.: MrWiz.ssd and MrWiz.kbd, not MrWiz.ssd and mrwiz.kbd. (The case may not matter, but I have not tested that yet.)

Zalaga.kbd
Code:
SET SPEED=150

LEFT=BBC_CAPSLOCK
RIGHT=BBC_CONTROL
UP=NOTHING
DOWN=NOTHING

A=BBC_SPACE
B=BBC_SPACE
X=BBC_RETURN
Y=BBC_RETURN

SELECT=BBC_ESCAPE

VOLUP=VOLUME
VOLDOWN=VOLUME

Repton2.kbd
Code:
SET SPEED=170
SET VOLUME=50

LEFT=BBC_Z
RIGHT=BBC_x
UP=BBC_:
DOWN=BBC_/

A=BBC_SPACE
B=BBC_SPACE
X=BBC_RETURN
Y=BBC_RETURN

SELECT=BBC_ESCAPE

L=NOTHING
R=NOTHING

VOLUP=VOLUME
VOLDOWN=VOLUME

CLICK=NOTHIGN

R_LEFT=BBC_X
R_RIGHT=BBC_Z
R_UP=BBC_/
R_DOWN=BBC_:

R_A=BBC_X
R_B=BBC_Z
R_X=BBC_:
R_Y=BBC_/

R_SELECT=BBC_ESCAPE

R_L=NOTHING
R_R=NOTHING

R_VOLUP=SPACE
R_VOLDOWN=RETURN

R_CLICK=NOTHING

MrWiz.kbd
Code:
# Initial state of emulator:
SET ORIENTATION=FLIPPED
SET VOLUME=50

SET SPEED=180

# Normal screen orientation keys (we don't use these):
LEFT=BBC_Z
RIGHT=BBC_X
UP=BBC_:
DOWN=BBC_/
A=BBC_SPACE
B=BBC_SPACE
X=BBC_RETURN
Y=BBC_RETURN
SELECT=BBC_ESCAPE

VOLUP=VOLUME
VOLDOWN=VOLUME

L=NOTHING
R=NOTHING


# The 'flipped' screen orientation keys (we do use these):
R_LEFT=BBC_X
R_RIGHT=BBC_Z
R_UP=BBC_/
R_DOWN=BBC_:
R_A=BBC_X
R_B=BBC_Z
R_X=BBC_:
R_Y=BBC_/
R_SELECT=ESCAPE

R_L=NOTHING
R_R=NOTHING

R_VOLUP=BBC_SPACE
R_VOLDOWN=BBC_RETURN


Gruntfuggly posted on Dec 16 2006 at 08:34 PM said:
Also still have the problem that after running one game, it doesn't seem to boot the disk next time round...

Try changing your run scripts to this (may help):

Zalaga.gpe:
Code:
exec /mnt/sd/beebem/beebem /mnt/sd/beebem/Zalaga.ssd

MrWiz.gpe
Code:
exec /mnt/sd/beebem/beebem /mnt/sd/beebem/MrWiz.ssd

Hope this works!

I forgot to mention these options in my original post:

Code:
# For games that don't use the full screen height (Knightlore/Pipe Mania
# etc) will display BBC scanlines 0-239 and clip scanlines 240-255:
SET VSCALE=TOP

# You probably wont need this (at least yet), displays BBC scanlines 16-255:
SET VSCALE=BOTTOM

# Clips the first and last 8 scanlines displaying BBC scanlines 8-248:
SET VSCALE=CENTER

# Scales the 256 BBC scanlines to the 240 GP2x scanlines (defaults to this):
# (The above removes every 16th scanline, I'll eventually add additional
# scaling options that remove every 1st to 15th scanlines too so you can
# juggle them to see which prints the best text.)
SET VSCALE=SCALED

# The teletext code is not optimised and at 200MHZ BeebEm drops to 85%
# BBC B speed, s for teletext games that use sound you can now set the
# CPU speed, all graphics mode games should run fine with sound at 200MHZ:
SET SPEED=240

# For games where speed is not important, will run at about 65% the speed
# of a BBC B:
SET VOLUME=0
SET SPEED=100

# Disc is write enabled (this option has not been tested yet - will do later):
SET FD0_TAB=RW

# Disc is write protected (defaults to this):
SET FD0_TAB=RO

# Second disc drive (you cannot insert a disc in this yet):
SET FD1_TAB=RW
SET FD1_TAB=RO
 
Last edited by a moderator:
Whoa - I missed your reply to this! I've now got lots of games running at full speed with sound and fully playable! Once I've organized my files a bit better, I'll post a list in case anybody wants any of them...

Great work - I'm amazed nobody else has commented on this?
 
Gruntfuggly posted on Dec 26 2006 at 10:19 AM said:
Whoa - I missed your reply to this! I've now got lots of games running at full speed with sound and fully playable! Once I've organized my files a bit better, I'll post a list in case anybody wants any of them...

Great work - I'm amazed nobody else has commented on this?

You got it working! Cool! I thought for a minute that I'd done something weired that rendered it only runable on my unit!

Thanks for sticking with it! It's early days yet, but the more people play with this, the more I can get the bugs (and there will be many) early.

Still, would have been nice if a few other people had bothered with it... Suppose there arn't many Beeb fans here!

Hopefully in the next few days I'll have a new version available for download (if I don't get too drunk - 80 cans of good beer at ASDA for 22 pounds and all that).

Thanks for sticking with it Gruntfuggly! :) Look forward to your mapping files, do you know the pickup/use key for KnightLore on the Beeb? I can't seem to find it...
 
Last edited by a moderator:
There are definitely other people interested in this - I imagine it is just the time of year. When you release the next version, it ought to be put on the front page too...
 
Gruntfuggly posted on Dec 28 2006 at 11:29 AM said:
There are definitely other people interested in this - I imagine it is just the time of year. When you release the next version, it ought to be put on the front page too...
Must admit I'm not particularly a bbc fan myself but someone I know is a huge fan. I only found this by accident and must say it's already much better than the other BBC emu on the GP2X (my friend agrees). I think you should definately post In the news section when you release the next version to gain more exposure. The games I've tried so far all work great and the only thing that I think is really needed is a menu to select roms etc. but I'm sure you already have that planned.
 
Last edited by a moderator:
Gruntfuggly posted on Dec 26 2006 at 10:19 AM said:
Whoa - I missed your reply to this! I've now got lots of games running at full speed with sound and fully playable! Once I've organized my files a bit better, I'll post a list in case anybody wants any of them...

Great work - I'm amazed nobody else has commented on this?


It does look complicated to get going. After looking at pages of scripts etc it looks daunting.

Some sort of GUI or menu to do all of that would go a long way to make more user friendly. Hopefully that will be added someday.
 
Last edited by a moderator:
How's this project coming along? I've been using criticalbeeb, but this one sounds good too. I guess the first one to have configurable keys and a virtual keyboard will get pride of place on my SD card.

Glad BBC emulation is being worked on by you guys!

Good luck with it.

®
 
How's this project coming along? I've been using criticalbeeb, but this one sounds good too. I guess the first one to have configurable keys and a virtual keyboard will get pride of place on my SD card.

Glad BBC emulation is being worked on by you guys!

Good luck with it.

®

Things are progressing nicely, however nothing is complete enough yet to release a new version of the emulator.

A good bit of code from CriticalBeeb has been incorporated into my BeebEm port, so me and Critical are not really in competition over this!

I'm currently working with Rooster to add a virtual keyboard, and a GUI (of sorts) is in the works too. Completion may be awhile though.

OK - I've uploaded some - get them here:

http://www.zaonce.com/downloads/beebem/

I'll add more as I get them working...

Nice one Gruntfuggly, and KnightLore too! :)
 
Last edited by a moderator:
Added a couple more keyboard files - Starship Command (f0 and f1 mapped to L and R) and Labyrinth.

Just been playing both of them - fantastic games for their time. I remember it took me quite a while before I realized you needed to eject from the spaceship to get another go!
 
Thanks for all the hard work...

A BBC B emu is for me be the killer app. and most defo as prized as any Specy, VIC20 C64 or similar emu.

I think a post on the main page would do it the world of good in raising the profile though.

Good luck & here's to an all singing & dancing BBC B, button clicking future!
 
I think it will be better to wait until it is a little bit more friendly to use - it would be a shame to put people off before getting a chance to see how many original and decent games there were on the BBC...

Hopefully if won't be too long though! Considering it's only had 3 releases, it's fully playable with sound once you've configured the each game...
 
Back
Top