MAME: How to ... ?

discuss bbc micro and electron emulators (including mame) here!
User avatar
Pernod
Posts: 3439
Joined: Fri Jun 08, 2012 11:01 pm
Location: Croydon, UK
Contact:

MAME: How to ... ?

Post by Pernod »

I'm frequently asked how to do particular things in MAME, specifically how to setup a machine with various devices attached.

I'd appreciate it if questions about MAME usage could be kept to this thread, and avoid taking other threads off-topic with MAME questions.

At the time of writing the latest MAME release is 0.206 and I'll assume the latest is being used with all applicable ROMs for the machine being emulated.

General MAME documentation can be found at https://docs.mamedev.org/index.html.

I prefer to start MAME from commandline, as it enables me to select any expansion devices at startup. To list applicable devices for a machine you can do:

Code: Select all

mame64 electron -listslots

SYSTEM           SLOT NAME        SLOT OPTIONS     SLOT DEVICE NAME
---------------- ---------------- ---------------- ----------------------------
electron         exp              fbjoy            First Byte Joystick Interface
                                  m2105            Acorn M2105 Expansion
                                  plus1            Acorn Plus 1 Expansion
                                  plus2            Slogger Plus 2 Expansion
                                  plus3            Acorn Plus 3 Disc Expansion
                                  pwrjoy           Power Software Joystick Interface
                                  rombox           Slogger Rombox
                                  romboxp          Slogger Rombox+
                                  voxbox           Millsgrade Voxbox Speech Synthesiser
So the electron has an expansion slot (exp) which can be configured with any of the above devices. By default the electron has the plus3 attached, but this can be replaced with any device.
To start the Electron with Plus1 interface, AP5, and SEDFS you'd use:

Code: Select all

mame64 electron -exp plus1 -cart1 seds -cart2 ap5
Note: -cart options only available with plus1 and romboxp as you'd expect with real hardware.

In addition to using the commandline there is an internal MAMEUI, which is usually accessed by pressing ScrollLock (to enable UI mode) then Tab to enter the UI.
mameui.png
And selecting Slot Devices:
slots.png
Here we can see which devices are currently in each available slot, and see that the AP5 exposes more slots, including 1mhzbus where you can select beebsid (or any other available 1mhzbus device). After changing any devices you should always Reset the machine.
Note: beebsid has a passthrough port so exposes another 1mhzbus slot.

To mount a floppy image you use the File Manager:
fileman.png
This will allow you to navigate your file system and select a floppy image (ssd, dsd, adf, etc.).

Similarly for the BBC there are various slots:

Code: Select all

mame64 bbcb -listslots

SYSTEM           SLOT NAME        SLOT OPTIONS     SLOT DEVICE NAME
---------------- ---------------- ---------------- ----------------------------
bbcb             rs232            dec_loopback     RS232 Loopback (DEC 12-15336-00)
                                  ie15             IE15 Terminal
                                  keyboard         Serial Keyboard
                                  loopback         RS232 Loopback
                                  null_modem       RS232 Null Modem
                                  printer          Serial Printer
                                  pty              Pseudo terminal
                                  sunkbd           Sun Keyboard Adaptor
                                  terminal         Serial Terminal

                 centronics       ap2000           Epson ActionPrinter 2000
                                  covox            Covox Speech Thing
                                  covox_stereo     Covox (Stereo-in-1)
                                  ex800            Epson EX-800
                                  lx800            Epson LX-800
                                  lx810l           Espon LX-810L
                                  p72              NEC PinWriter P72
                                  pl80             COMX PL-80
                                  printer          Centronics Printer

                 fdc              acorn1770        Acorn 1770 FDC
                                  acorn8271        Acorn 8721 FDC
                                  ams3             AMS 3" Microdrive Disc System
                                  cumana1          Cumana QFS 8877A FDC
                                  cumana2          Cumana QFS Issue 2 8877A FDC
                                  cv1797           Computer Village 1797 FDC
                                  microware        Microware DDFS FDC
                                  opus1770         Opus D-DOS(B) 1770 FDC
                                  opus2791         Opus 2791 FDC
                                  opus2793         Opus 2793 FDC
                                  opus8272         Opus 8272 FDC
                                  stl1770_1        Solidisk 1770 DDFS Issue 1 FDC
                                  stl1770_2        Solidisk 1770 DDFS Issue 2 FDC
                                  stl8271          Solidisk Dual FDC (8271)
                                  weddb2           Watford Electronics DDB2 1772 FDC
                                  weddb3           Watford Electronics DDB3 1770 FDC

                 analogue         acornjoy         Acorn Analogue Joysticks
                                  bitstik1         Acorn Bitstik
                                  bitstik2         Robo Bitstik 2
                                  cfa3000a         Henson CFA 3000 Analogue
                                  voltmace3b       Voltmace Delta 3b Twin Joysticks

                 1mhzbus          b488             Aries-B488
                                  beebsid          BeebSID
                                  emrmidi          EMR BBC Midi Interface
                                  ieee488          Acorn IEEE-488 Interface
                                  opus3            Opus Challenger 3-in-1
                                  prisma3          Millipede PRISMA-3
                                  sprite           Logotron Sprite Board

                 tube             32016            Acorn 32016 2nd processor
                                  6502             Acorn 6502 2nd Processor
                                  65c102           Acorn 65C102 Co-Processor
                                  80186            Acorn 80186 Co-Processor
                                  80286            Acorn 80286 2nd Processor
                                  arm              ARM Evaluation System
                                  casper           Casper 68000 2nd Processor
                                  pmsb2p           PMS B2P-6502 Second Processor
                                  rc6502           ReCo6502 (65C02)
                                  rc65816          ReCo6502 (65C816)
                                  z80              Acorn Z80 2nd Processor
                                  zep100           Torch Z80 Communicator (Torch)

                 userport         amxmouse         AMX Mouse (BBC Micro)
                                  beebspch         Beeb Speech Synthesiser
                                  cfa3000kbd       Henson CFA 3000 Keyboard
                                  m512mouse        Acorn Master 512 Mouse
                                  tracker          Marconi RB2 Tracker Ball
So to start a BBC Model B with Acorn 1770 FDC, ADFS 1.30, AMX Mouse, 80186 2nd Processor, and the M512SystemDisc in the floppy drive you can:

Code: Select all

mame64 bbcb -fdc acorn1770 -rom2 adfs130 -tube 80186 -userport amxmouse -flop1 m512sys
Note: -rom2 adfs130 and -flop1 m512sys assume you have the software lists (ROMs, floppy images, cassette images, etc.) installed. Alternatively a filename to a local file can be used instead, ie. -rom2 adfs130.rom

All commandline options can also be selected individually from the internal MAMEUI.

Hope someone finds this useful, and feel free to post any other usage questions here :D
- Nigel

BBC Model B: ATPL Sidewise, Acorn Speech, 2xWatford Floppy Drives, AMX Mouse, Viglen case, BeebZIF, etc.
User avatar
tricky
Posts: 7698
Joined: Tue Jun 21, 2011 9:25 am
Contact:

Re: MAME: How to ... ?

Post by tricky »

Last time a tried it I got stuck in full screen mode and had to use the windows keys to get out. Is the idea that you should map an extra quit button?

I got excited when I saw beeb speech, what is the issue with adding the tms5220, is it just priorities and time?

Lastly, could you add a parallel d2a (resistor ladder) to 1mhz audio in as per b-em please? Default same volume as a sound channel maybe, but with its own volume level to represent different resistors.
User avatar
Pernod
Posts: 3439
Joined: Fri Jun 08, 2012 11:01 pm
Location: Croydon, UK
Contact:

Re: MAME: How to ... ?

Post by Pernod »

tricky wrote: Thu Feb 21, 2019 8:04 am Last time a tried it I got stuck in full screen mode and had to use the windows keys to get out. Is the idea that you should map an extra quit button?
I prefer to run in window mode. On commandline add -window, or edit your mame.ini and set window to 1:

Code: Select all

#
# OSD VIDEO OPTIONS
#
video                     bgfx
numscreens                1
window                    1
maximize                  1
waitvsync                 0
syncrefresh               0
monitorprovider           auto
To quit from full screen mode you would usually enter UI mode (ScrollLock) then press Escape to quit. This can be annoying if you forget you're in UI mode and Escape quits emulation instead of emulating the Escape key. So also set confirm_quit in mame.ini:

Code: Select all

#
# CORE MISC OPTIONS
#                 
confirm_quit              1
All commandline and ini options are documented at https://docs.mamedev.org/commandline/co ... index.html
tricky wrote: Thu Feb 21, 2019 8:04 am I got excited when I saw beeb speech, what is the issue with adding the tms5220, is it just priorities and time?
Last time I looked at it I suspected 6522 issues, though this may have changed recently so may be worth another visit.
tricky wrote: Thu Feb 21, 2019 8:04 am Lastly, could you add a parallel d2a (resistor ladder) to 1mhz audio in as per b-em please? Default same volume as a sound channel maybe, but with its own volume level to represent different resistors.
You can already adjust volumes of any sound device, enter UI mode (ScrollLock) then Tab to open UI and select Slider Controls.
- Nigel

BBC Model B: ATPL Sidewise, Acorn Speech, 2xWatford Floppy Drives, AMX Mouse, Viglen case, BeebZIF, etc.
User avatar
tricky
Posts: 7698
Joined: Tue Jun 21, 2011 9:25 am
Contact:

Re: MAME: How to ... ?

Post by tricky »

Thanks, scroll-lock is a good tip ;)
And adding a d2a on the parallel port connected to audio in on the 1MHz bus?
I think that my AstroBlaster (not all versions) will use it in attract mode before the main game has started.
User avatar
Pernod
Posts: 3439
Joined: Fri Jun 08, 2012 11:01 pm
Location: Croydon, UK
Contact:

Re: MAME: How to ... ?

Post by Pernod »

tricky wrote: Thu Feb 21, 2019 12:33 pm And adding a d2a on the parallel port connected to audio in on the 1MHz bus?
I think that my AstroBlaster (not all versions) will use it in attract mode before the main game has started.
You've lost me on this, why and what does it do, what would I expect to behave differently?
- Nigel

BBC Model B: ATPL Sidewise, Acorn Speech, 2xWatford Floppy Drives, AMX Mouse, Viglen case, BeebZIF, etc.
User avatar
tricky
Posts: 7698
Joined: Tue Jun 21, 2011 9:25 am
Contact:

Re: MAME: How to ... ?

Post by tricky »

It converts the 8 bit digital value on the printer port ignoring the other printer signals to an analogue voltage going into the internal amplifier.
You can then use it as a more efficient, more accurate way of playing samples or notes too low for the sound chip.
User avatar
davidb
Posts: 3395
Joined: Sun Nov 11, 2007 10:11 pm
Contact:

Re: MAME: How to ... ?

Post by davidb »

Is there a way to compile MAME for only one system, or do I have to do a full build first?
I tried this:

Code: Select all

make SOURCES=src/mame/drivers/electron.cpp TOOLS=1
It seems to want to process a lot of things that aren't at all related to the Electron.
User avatar
Pernod
Posts: 3439
Joined: Fri Jun 08, 2012 11:01 pm
Location: Croydon, UK
Contact:

Re: MAME: How to ... ?

Post by Pernod »

davidb wrote: Sat Feb 23, 2019 5:37 pm Is there a way to compile MAME for only one system, or do I have to do a full build first?
I tried this:

Code: Select all

make SOURCES=src/mame/drivers/electron.cpp TOOLS=1
It seems to want to process a lot of things that aren't at all related to the Electron.
That is correct, though I tend to add SUBTARGET=elk, and you don't need TOOLS.
- Nigel

BBC Model B: ATPL Sidewise, Acorn Speech, 2xWatford Floppy Drives, AMX Mouse, Viglen case, BeebZIF, etc.
User avatar
KenLowe
Posts: 4675
Joined: Mon Oct 18, 2004 5:35 pm
Location: UK
Contact:

Re: MAME: How to ... ?

Post by KenLowe »

Hi Nigel,

Would you consider adding the IntegraB ROM / RAM / shadow RAM / RTC expansion board to MAME? It's something I added to BeebEm many years ago, if you wanted to look at the code.

TIA for considering.
Ken.
User avatar
Pernod
Posts: 3439
Joined: Fri Jun 08, 2012 11:01 pm
Location: Croydon, UK
Contact:

Re: MAME: How to ... ?

Post by Pernod »

KenLowe wrote: Fri May 03, 2019 2:04 pm Would you consider adding the IntegraB ROM / RAM / shadow RAM / RTC expansion board to MAME? It's something I added to BeebEm many years ago, if you wanted to look at the code.
It's something that I want to add, along with various other ROM/RAM boards, especially those that include their own ROM manager like Aries, Integra, Raven, Solidisk, Watford. Ideally they should be defined as slot devices, but this requires them to have a common interface. Other add-ons have well defined interfaces like Tube, User Port, 1MHz Bus, but ROM/RAM boards are all different with flying leads into various points and some also clip directly to the 6502.

I could easily add them as derivative machines such as 'BBC Model B with IntegraB', 'BBC Model B with Aries B32' but that would make the code rather messy having conditions for each board type, and adding derivatives for this purpose is not the MAME way of doing things. I need to define a common slot interface that will cater for all boards so that they can be chosen and selected from the Slot Options menu. The Aries boards cause more problems as you can have both B12 and B20 fitted.

So yes I am considering it but don't yet have a workable plan for implementation. When I get one board in the rest will quickly follow.
- Nigel

BBC Model B: ATPL Sidewise, Acorn Speech, 2xWatford Floppy Drives, AMX Mouse, Viglen case, BeebZIF, etc.
User avatar
KenLowe
Posts: 4675
Joined: Mon Oct 18, 2004 5:35 pm
Location: UK
Contact:

Re: MAME: How to ... ?

Post by KenLowe »

Thanks for the reply. I did notice that your code is quite modular and wondered how these types of boards would fit that structure.

I can't talk for all the RAM / ROM boards, but most flying leads are probably just picking up R/W and ROM select signals.

However, as you've highlighed, the IntegraB is one of those boards that uses the 6502 socket to pick up various signals. It uses the 6502 primarily to pick up data and address lines for address decoding (&FE30 for ROM decoding, &FE34 for Shadow / private RAM selection & &FE38 / &FE3C for RTC address / data decoding), but also intercepts and manipulates the Clk & R/W signals before sending them back to the main board - these signals are disabled when Shadow RAM is being accessed.

Here's hoping you find a reasonable way to integrate these cards into your code!
bob147
Posts: 340
Joined: Thu May 02, 2019 10:02 pm
Contact:

Re: MAME: How to ... ?

Post by bob147 »

A subtlety of MAME that I don't think is particularly well advertised (and took me a while to get my head around) is that the command line is alot more forgiving than the internal UI when it comes to having exactly the right set of files to run a machine.

For example, if you have the bios files but don't have all of the extra alternative file system stuff, the UI will throw an error saying 'missing files', but running from command line will still work fine. Similarly, you can also load some software using a normal file path rather than via the software list this way if you want. Makes life slightly easier.

Figured this might be of help to people that are struggling with getting things going or just want to mess around with it a bit. For doing anything interesting though, it's worth the effort to get the software lists set up properly. As you can probably tell I'm a big fan of MAME and Pernod's work over the last few years to enhance the BBC Micro emulation in that program.
User avatar
Pernod
Posts: 3439
Joined: Fri Jun 08, 2012 11:01 pm
Location: Croydon, UK
Contact:

Re: MAME: How to ... ?

Post by Pernod »

bob147 wrote: Thu Jun 13, 2019 8:54 pm As you can probably tell I'm a big fan of MAME and Pernod's work over the last few years to enhance the BBC Micro emulation in that program.
Thanks :D
- Nigel

BBC Model B: ATPL Sidewise, Acorn Speech, 2xWatford Floppy Drives, AMX Mouse, Viglen case, BeebZIF, etc.
bob147
Posts: 340
Joined: Thu May 02, 2019 10:02 pm
Contact:

Re: MAME: How to ... ?

Post by bob147 »

MAME's a fun project to just keep an eye on in github. There's always someone working on something obscure and interesting. Didn't you add an opticians eye testing machine a while back? You never know what's gonna show up. If you ever need a tester for this stuff, I'd be happy to chip in when possible. Although with the rare expansions I'd have no idea what 'working' even looks like!
iwasjafa
Posts: 110
Joined: Fri Nov 01, 2019 6:50 pm
Contact:

Re: MAME: How to ... ?

Post by iwasjafa »

Please could you give me the idiots guide to locating and loading the required files!

It isn't even looking in my specified rompath for my Mode 7 rom so I am clearly doing something wrong there!

E:\mame>mame64 electron -exp mode7 -rompath E:\Electron\roms
os_basic.ic2 NOT FOUND (tried in electron)
mode7_1.91.rom NOT FOUND (tried in electron_mode7 electron)
saa5050 NOT FOUND (tried in saa5050 electron)
Fatal error: Required files are missing, the machine cannot be run.

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

Re: MAME: How to ... ?

Post by Pernod »

iwasjafa wrote: Thu Aug 27, 2020 4:00 pm Please could you give me the idiots guide to locating and loading the required files!

It isn't even looking in my specified rompath for my Mode 7 rom so I am clearly doing something wrong there!

E:\mame>mame64 electron -exp mode7 -rompath E:\Electron\roms
os_basic.ic2 NOT FOUND (tried in electron)
mode7_1.91.rom NOT FOUND (tried in electron_mode7 electron)
saa5050 NOT FOUND (tried in saa5050 electron)
Fatal error: Required files are missing, the machine cannot be run.
It looks like you installed MAME to a folder E:\mame, correct? You'll need the latest 0.224 release for the Mode 7 unit.

Your are trying to run MAME and telling it your roms folder is at E:\Electron\roms. What is in this folder?

Ideally you should download the latest rom package from viewtopic.php?f=4&t=20353 and simply unzip into your E:\mame\roms folder. Don't unzip the individually romsets, in roms you should have electron.zip, electron_mode7.zip, saa5050.zip, etc.

By default MAME will look for roms in the roms subfolder. If you want to use another folder then you can specify this in mame.ini rather than adding it to the command line.
- Nigel

BBC Model B: ATPL Sidewise, Acorn Speech, 2xWatford Floppy Drives, AMX Mouse, Viglen case, BeebZIF, etc.
iwasjafa
Posts: 110
Joined: Fri Nov 01, 2019 6:50 pm
Contact:

Re: MAME: How to ... ?

Post by iwasjafa »

Thanks for that. Just three more questions for now:

How do I reset the electron. I need to do it to activate Mode 7.

The keyboard is mapped like an electron keyboard which is confusing on a PC. How do I get PC keyboard mapping?

You make reference to a mame.ini file but it is not present. Presumably I need to create one. There is a mame\ini folder with various example ini files in it. Does mame.ini go in mame or mame\ini?

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

Re: MAME: How to ... ?

Post by Pernod »

iwasjafa wrote: Thu Aug 27, 2020 6:29 pm How do I reset the electron. I need to do it to activate Mode 7.

The keyboard is mapped like an electron keyboard which is confusing on a PC. How do I get PC keyboard mapping?
Break is mapped to F12 by default. (I know what you're comment will be when you get to Mode 7)

To get to the internal UI press Scroll Lock to enable UI mode, then Tab to enter the UI.

From the UI you can select Keyboard Mode, either Emulated (default) or Natural for PC mapping. I've not used Natural before but just tried it and seems there's a keyboard repeat issue with it.

You should also use the UI to mount ROM, floppy, cassette images with the File Manager, and in Slot Devices you can select other expansion devices to connect.
iwasjafa wrote: Thu Aug 27, 2020 6:29 pm You make reference to a mame.ini file but it is not present. Presumably I need to create one. There is a mame\ini folder with various example ini files in it. Does mame.ini go in mame or mame\ini?
From command line 'mame64 -cc', will create config ie. mame.ini

In mame.ini you can edit the 'rompath'. You may also prefer to edit 'window', change from 0 to 1 to start in windowed mode.
- Nigel

BBC Model B: ATPL Sidewise, Acorn Speech, 2xWatford Floppy Drives, AMX Mouse, Viglen case, BeebZIF, etc.
iwasjafa
Posts: 110
Joined: Fri Nov 01, 2019 6:50 pm
Contact:

Re: MAME: How to ... ?

Post by iwasjafa »

Thanks again, Nigel.
Break is mapped to F12 by default. (I know what you're comment will be when you get to Mode 7)
I am getting a letter box window with Mode 6 in the left half and Mode 7 in the right half. If I don't have the mode7 device I get a full size window. Is there any way the Mode 7 window can be full size too? I know you were concerned about the SAA5050 interlacing at one stage so if that is the reason for the offset it would look better with interlacing off.

Also, I think I have identified all the keys on the emulated keyboard, but where is the Copy key?

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

Re: MAME: How to ... ?

Post by Pernod »

iwasjafa wrote: Thu Aug 27, 2020 9:35 pm I am getting a letter box window with Mode 6 in the left half and Mode 7 in the right half. If I don't have the mode7 device I get a full size window. Is there any way the Mode 7 window can be full size too?
The Mode 7 unit is effectively outputting to a separate screen, that's why you see two screens side-by-side. It's a current limitation of the MAME framework whereby expansion devices don't have easy access to the screen generated by the machine they're connected to. Expansion devices generally have a well defined interface, in this case the Electron's expansion port. But in the case of the Mode 7 unit it also requires a connection to the RGB monitor output. The Mk2 should work better when I finish it as it's built into the Electron, and not considered an expansion device.
iwasjafa wrote: Thu Aug 27, 2020 9:35 pm Also, I think I have identified all the keys on the emulated keyboard, but where is the Copy key?
You can check (and change) key mapping from the internal UI, select Input (this machine). Copy is mapped to End.
- Nigel

BBC Model B: ATPL Sidewise, Acorn Speech, 2xWatford Floppy Drives, AMX Mouse, Viglen case, BeebZIF, etc.
iwasjafa
Posts: 110
Joined: Fri Nov 01, 2019 6:50 pm
Contact:

Re: MAME: How to ... ?

Post by iwasjafa »

Pernod wrote: Thu Aug 27, 2020 9:48 pm The Mode 7 unit is effectively outputting to a separate screen, that's why you see two screens side-by-side. It's a current limitation of the MAME framework whereby expansion devices don't have easy access to the screen generated by the machine they're connected to. Expansion devices generally have a well defined interface, in this case the Electron's expansion port. But in the case of the Mode 7 unit it also requires a connection to the RGB monitor output. The Mk2 should work better when I finish it as it's built into the Electron, and not considered an expansion device.
Interesting, because both units require connections to the Electron RGB output, the Mk1 via an external plug and the Mk2 via an internal connection. I suppose it is the presence of the 6845 crtc that makes the Mk 1 an expansion device? The BBC does not have the same problem, even though it also requires switching video from RAM output to SAA5050 output, presumably because the video switching is prograrmmed into the BBC emulation.
SteveF
Posts: 1663
Joined: Fri Aug 28, 2015 9:34 pm
Contact:

Re: MAME: How to ... ?

Post by SteveF »

Is there any kind of debugging support (for debugging programs running on the emulated machine, not for debugging MAME itself) available in MAME? I'm seeing lock ups with my prototype Acorn port of Ozmoo on the Electron and it would be really nice if I could get some kind on insight into what's happening. Something like b-em's debugger would be fantastic, but even just the ability to see the emulated 6502's PC or memory would probably be helpful.
User avatar
Pernod
Posts: 3439
Joined: Fri Jun 08, 2012 11:01 pm
Location: Croydon, UK
Contact:

Re: MAME: How to ... ?

Post by Pernod »

SteveF wrote: Fri Aug 28, 2020 2:57 am Is there any kind of debugging support (for debugging programs running on the emulated machine, not for debugging MAME itself) available in MAME?
Yep, just add the -debug option, ie. mame64 electron -debug

See documentation at https://docs.mamedev.org/debugger/index.html
- Nigel

BBC Model B: ATPL Sidewise, Acorn Speech, 2xWatford Floppy Drives, AMX Mouse, Viglen case, BeebZIF, etc.
SteveF
Posts: 1663
Joined: Fri Aug 28, 2015 9:34 pm
Contact:

Re: MAME: How to ... ?

Post by SteveF »

Pernod wrote: Fri Aug 28, 2020 3:00 am
SteveF wrote: Fri Aug 28, 2020 2:57 am Is there any kind of debugging support (for debugging programs running on the emulated machine, not for debugging MAME itself) available in MAME?
Yep, just add the -debug option, ie. mame64 electron -debug
Excellent, thanks! I must resist the temptation to start debugging this immediately instead of going to bed now...
SteveF
Posts: 1663
Joined: Fri Aug 28, 2015 9:34 pm
Contact:

Re: MAME: How to ... ?

Post by SteveF »

I understand the Electron can use second processors, is there any way to emulate this in MAME? I have some idea (talking of real hardware, not MAME specifically) there's the PMS E2P and also some sort of add-on which allows the use of any second processor the BBC series can use. Either, both or something different I'm completely unaware of would be useful!
User avatar
Pernod
Posts: 3439
Joined: Fri Jun 08, 2012 11:01 pm
Location: Croydon, UK
Contact:

Re: MAME: How to ... ?

Post by Pernod »

SteveF wrote: Tue Sep 01, 2020 11:58 pm I understand the Electron can use second processors, is there any way to emulate this in MAME?
Yes, but only if the BBC 2nd processor is known to work unmodified. The PMS E2P is not yet supported.

You need to use the AP5 cartridge to attach a Tube device.
mame64 electron -exp romboxp -cart1 peg400 -cart2 ap5
Then use the UI Slot Devices menu to select a tube device. I believe the 6502 based copros should work, including the ReCo6502. The Z80 requires a modified Z80 Tube Client ROM which is currently not supported.
- Nigel

BBC Model B: ATPL Sidewise, Acorn Speech, 2xWatford Floppy Drives, AMX Mouse, Viglen case, BeebZIF, etc.
SteveF
Posts: 1663
Joined: Fri Aug 28, 2015 9:34 pm
Contact:

Re: MAME: How to ... ?

Post by SteveF »

Pernod wrote: Wed Sep 02, 2020 2:32 am You need to use the AP5 cartridge to attach a Tube device.
mame64 electron -exp romboxp -cart1 peg400 -cart2 ap5
Then use the UI Slot Devices menu to select a tube device. I believe the 6502 based copros should work, including the ReCo6502.
Thanks Nigel! I'm having some trouble with this, using the 0.224 binaries I downloaded from the official site for Windows. The machine starts up OK but (edit: even after selecting the copro using the slot menu and pressing CTRL-BREAK) there's no tube. If I install the Plus 1 Support ROM 1.31a, I have a *TUBE command but if I do *TUBE ON then press CTRL-BREAK there's still no tube, and after a bit the machine seems to lock up and the display greys out. I'm using the Acorn 6502 second processor, though I did give the 65C102 a quick go as well.

Do you have any idea what I might be doing wrong?
User avatar
Pernod
Posts: 3439
Joined: Fri Jun 08, 2012 11:01 pm
Location: Croydon, UK
Contact:

Re: MAME: How to ... ?

Post by Pernod »

SteveF wrote: Wed Sep 02, 2020 3:51 pm The machine starts up OK but (edit: even after selecting the copro using the slot menu and pressing CTRL-BREAK) there's no tube.

Do you have any idea what I might be doing wrong?
When changing slot options you need to Reset the machine, bottom of the slot options menu.
- Nigel

BBC Model B: ATPL Sidewise, Acorn Speech, 2xWatford Floppy Drives, AMX Mouse, Viglen case, BeebZIF, etc.
SteveF
Posts: 1663
Joined: Fri Aug 28, 2015 9:34 pm
Contact:

Re: MAME: How to ... ?

Post by SteveF »

Pernod wrote: Wed Sep 02, 2020 4:16 pm When changing slot options you need to Reset the machine, bottom of the slot options menu.
Thanks, that's helped but I'm still not quite there. I now get a Tube banner and the DFS name and BASIC, but I never get a BASIC prompt. If I press F12 (BREAK) I sometimes get a * prompt, sometimes with "Bad" on the previous line. I've been able to type *HELP once or twice at that prompt and it's worked. If I type *BASIC at that prompt I get a BASIC banner but then it locks up. Do you have any idea what's going on?
User avatar
Pernod
Posts: 3439
Joined: Fri Jun 08, 2012 11:01 pm
Location: Croydon, UK
Contact:

Re: MAME: How to ... ?

Post by Pernod »

SteveF wrote: Wed Sep 02, 2020 4:37 pm Thanks, that's helped but I'm still not quite there. I now get a Tube banner and the DFS name and BASIC, but I never get a BASIC prompt. If I press F12 (BREAK) I sometimes get a * prompt, sometimes with "Bad" on the previous line.
I'm sure I tried the Acorn 6502 last night and it worked, but now seeing same as you. Only the ReCo6502 (65C02) seems to be working.

As the Acorn copros were never intended for use with an Electron I can't be sure of expected behaviour. It would be useful to know which are known to work unmodified with original hardware.
- Nigel

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

Return to “8-bit acorn emulators”