Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: MAME ZX Spectrum load snapshot with natural keyboard  (Read 8229 times)

0 Members and 1 Guest are viewing this topic.

artyfarty

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 72
  • Last login:February 24, 2024, 03:35:15 am
  • I want to build my own arcade controls!
MAME ZX Spectrum load snapshot with natural keyboard
« on: February 08, 2016, 09:51:40 am »
Hi,

Now that I've upgraded my cabinet to a recent version of MAME post-MESS merger (0.169), I wanted to be able to play the ZX Spectrum game Manic Miner on my cabinet.

This meant I needed to find out how to autoload the software and autostart the game, which was harder than expected to find out how to do.

I had hoped to be able to find the "right" version of the ManicMiner software, put it in my MAME roms directory, and start it with "mame spectrum ManicMiner" (or something similar); but the Spectrum software list in MAME is surprisingly sparse - does anyone know why?

You can load a cassette file (.tzx) from the command line, but still have to type 'LOAD""<ENTER>' into the Spectrum emulator, and then manually start the tape playing and wait just as long as you used to back in the 80s for the game to load. I wanted a more seamless experience than that.

As well as a .tzx file, I also have a .sna file of the game, which I believe is a memory image, and that can be automatically loaded in other Spectrum emulators.

Googling around, I found mention of command line parameters for MAME/MESS "-quik" and "-snap" that could allegedly be used to load files. But -snap no longer seemed to be a valid parameter, and although -quik was accepted as a parameter, it didn't seem to do anything.

However, I did see that in the TAB menu->Image Information, the "quik" entry had been populated, and then noticed there was a "dump" entry that was listed "[empty]".

Starting MAME with the command line:
 mame  spectrum -dump roms\spectrum\ManicMiner.sna
automatically loaded and started the game.

Hope this helps someone, as I wasn't able to easily find info on this.

However, the spectrum emulator starts by default with the non-natural keyboard that faithfully emulates the old Spectrum keyboard; to such a level that the standard MAME keys for the UI (Esc, Tab, Pause) don't work. You have to press Scroll Lock to switch to the natural keyboard before you can use the standard exit button to quit the spectrum emulator - not useful on a cabinet.

I should be able to start MAME with the natural keyboard enabled by specifying "-natural" on the command line, so I expected this command to allow me to start & play the game, and then exit using my cabinet's exit button:

 mame  spectrum -natural -dump roms\spectrum\ManicMiner.sna

BUT it just doesn't seem to work. I've also tried -nat (and just in case I had completely misunderstood how the keyboard was set up, -nonatural and -nonat), but with all combinations I have to press Scroll Lock first, before the exit button works.

I understand I can remap the Scroll Lock function to a more cab friendly button, but I'd really like it to just work.

Any ideas gratefully received.

Thanks,

Martin



Sent from my iPad using Tapatalk

geecab

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 224
  • Last login:Yesterday at 01:15:34 pm
Re: MAME ZX Spectrum load snapshot with natural keyboard
« Reply #1 on: February 10, 2016, 03:13:32 am »
Hi, I think you need to specify the -ui_active command line option. That's how I got it working with mess (before the mame/mess merger), hopefully that option has been carried forward into the version of mame you are using.

FYI, here's a quick video of me playing some speccy games on my cab using MESS (Me playing Manic Miner at 1:40-ish):


Hope this helps  :)


artyfarty

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 72
  • Last login:February 24, 2024, 03:35:15 am
  • I want to build my own arcade controls!
Re: MAME ZX Spectrum load snapshot with natural keyboard
« Reply #2 on: February 10, 2016, 09:02:10 pm »
geecab,

That's great, thanks very much. Works perfectly:

mame spectrum -dump ROMs\spectrum\ManicMiner.sna -ui_active

Where would I have been able to find out about that!

Martin
« Last Edit: February 10, 2016, 09:35:15 pm by artyfarty »

geecab

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 224
  • Last login:Yesterday at 01:15:34 pm
Re: MAME ZX Spectrum load snapshot with natural keyboard
« Reply #3 on: February 11, 2016, 03:15:23 am »
I must admit I found that ui_active setting difficult to find. I might have even hacked the mess source code originally, forcing mess to always exit on the ESC key press when I stumbled across the ui_active thing :P

Stick with it though, the mame/mess speccy emulation once you get your head around it, is the way forward I think. Once your head is around it, you'll find it quite straight forward getting other computers emulated using it (I also use it for Speccy, Amstrad CPC, BBCB Micro and Atari 400/800 emulation).  I particularly like the way how easy it is to remap keys, and to adjust screen/zoom settings (For instance, most speccy games only use a small/middle part of the screen, mame/mess allows you to zoom into that part, making full use of your screen).

Some other things that might help you out:

From the command line, if you run:
 mame.exe -showusage > usage.txt
This will create a usage.txt file for you that describes (briefly) the various command line options supported by your version of mame. "ui_active" is described (briefly!) in there.

Another command line option which might help you out, if you are going to emulate more than one speccy game, is the "cfg_directory" option. I found I needed to have a different config directory per game. Say, if you run a game like this:
 mess spectrum -dump c:\mess\games\spec\atic_atac.z80 -cfg_directory c:\mess\cfg\atic_atac
or
 mess spectrum -dump c:\mess\games\spec\alien8.z80 -cfg_directory c:\mess\cfg\alien8

A default config file will be created in the cfg_directory specified. Whilst running the game, you can then go into the TAB menu,  remap the keys/control, change zoom/display settings, and once you press ESC these settings will be updated automatically in the cfg_directory specified.

I probably waffling on now and doing a very poor job explaining this, but I figured its worth mentioning  :)

Good luck and hope this helps!

artyfarty

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 72
  • Last login:February 24, 2024, 03:35:15 am
  • I want to build my own arcade controls!
Re: MAME ZX Spectrum load snapshot with natural keyboard
« Reply #4 on: February 11, 2016, 09:45:04 pm »
Thanks. Completely missed the -ui_active, even though it's only 5 lines above the -natural in the showusage text. Just too fixated on what I thought was going to work, instead of the real answer!

Edglaf

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 79
  • Last login:October 04, 2018, 05:25:59 am
  • I want to build my own arcade controls!
Re: MAME ZX Spectrum load snapshot with natural keyboard
« Reply #5 on: January 18, 2018, 01:27:39 pm »


Another command line option which might help you out, if you are going to emulate more than one speccy game, is the "cfg_directory" option. I found I needed to have a different config directory per game. Say, if you run a game like this:
 mess spectrum -dump c:\mess\games\spec\atic_atac.z80 -cfg_directory c:\mess\cfg\atic_atac
or
 mess spectrum -dump c:\mess\games\spec\alien8.z80 -cfg_directory c:\mess\cfg\alien8

A default config file will be created in the cfg_directory specified. Whilst running the game, you can then go into the TAB menu,  remap the keys/control, change zoom/display settings, and once you press ESC these settings will be updated automatically in the cfg_directory specified.


Hi geecab,

It is very interesting to play several games spectrum games in your cab, each one with controls redefined conviniently. Could you please laborate more on that? f.e., in may case:

mame spectrum -dump "H:\Emuladores\MAME\MAME\spectrum\Atic_atac.z80" -cfg_directory H:\Emuladores\MAME\MAME\spectrum_cfg\Atic_atac -ui_active

Atic_atac folder is not created by the command line execution. I eventually had to create it manually. Afterwards I ran the above mentioned command structure, remappaed some controls in game and changes are kept after exit. The folder shows two new files indeed "spectrum.cfg" and "default cfg".  But one has to create a folder manually for each game and attacha those same arguments averytime you load a game inside the machine (spectrum). That's the thing: you can only remap controls for the spectrum machine, not for the game being run at by the machine.

As no frontend allows you to attach arguments specifying the different cfg folder for each game... did anyone find a decent workaround to get rid of this annoyance?

I hope I made myself understood...

thanks!

EssexMame

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 471
  • Last login:September 21, 2023, 07:43:50 am
  • Mame Weekender
Re: MAME ZX Spectrum load snapshot with natural keyboard
« Reply #6 on: January 22, 2018, 11:25:05 am »
Great info here. Hope to use Speccy and Acorn Electron (or if not, BBC). Is the emulation (of speccy) good now, compared to other devoted emulators?

Edglaf

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 79
  • Last login:October 04, 2018, 05:25:59 am
  • I want to build my own arcade controls!
Re: MAME ZX Spectrum load snapshot with natural keyboard
« Reply #7 on: January 23, 2018, 04:23:40 am »
Great info here. Hope to use Speccy and Acorn Electron (or if not, BBC). Is the emulation (of speccy) good now, compared to other devoted emulators?

The emulation is perfect (from my gamer point of view). I understand that it is becoming a pain to use miriads of programs to emulate all those old systems. A sole emulator to play them all is better. MAME will probably evolve for better, anyway, and offer longer term support...

Going back to the aforementioned question, Would SoftwareLists solve the problmes I`m experiencing with individual spectrum game remaping?

geecab

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 224
  • Last login:Yesterday at 01:15:34 pm
Re: MAME ZX Spectrum load snapshot with natural keyboard
« Reply #8 on: January 23, 2018, 08:04:04 am »
Hi Edglaf!

Quote
Atic_atac folder is not created by the command line execution. I eventually had to create it manually.

That is strange, once you've manually created your "H:\Emuladores\MAME\MAME\spectrum_cfg" directory, mame should be able to create the individual game directories automatically. I'm running windows XP that creates the config directories automatically. What operating system are you running?

Quote
As no frontend allows you to attach arguments specifying the different cfg folder for each game... did anyone find a decent workaround to get rid of this annoyance?

I created a batch file and had my frontend (Mala) call that instead of mame directly. My batch file is called 'go_spectrum.bat'. When I select Atic Atic from Mala's list of spectrum games, Mala runs the command "go_spectrum Atic Atac". In my batch file I compare the text ("Atic Atac"), when I find a match I run mame with the appropriate command line arguments. Like this...

Code: [Select]
IF "%*"=="atic atac" GOTO atic_atac
IF "%*"=="glider rider" GOTO glider_rider
IF "%*"=="jet set willy" GOTO jet_set_willy

:atic_atac
mame spectrum -dump "H:\Emuladores\MAME\MAME\spectrum\atic_atac.z80" -cfg_directory H:\Emuladores\MAME\MAME\spectrum_cfg\atic_atac -ui_active
GOTO the_end

:glider_rider
mame spectrum -dump "H:\Emuladores\MAME\MAME\spectrum\glider_rider.z80" -cfg_directory H:\Emuladores\MAME\MAME\spectrum_cfg\glider_rider -ui_active
GOTO the_end

:jet_set_willy
mame spectrum -dump "H:\Emuladores\MAME\MAME\spectrum\jet_set_willy.z80" -cfg_directory H:\Emuladores\MAME\MAME\spectrum_cfg\jet_set_willy -ui_active
GOTO the_end

:the_end

Hope this helps!
 :)




Edglaf

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 79
  • Last login:October 04, 2018, 05:25:59 am
  • I want to build my own arcade controls!
Re: MAME ZX Spectrum load snapshot with natural keyboard
« Reply #9 on: January 27, 2018, 08:27:56 am »
Thanks, my fault. I'me using Windows 10 (for tests), and eventually windows 7. Actually folders were being created but I fortgot that I had create a new folder "SoftwareList". Thats why... This config works beautifully...