CPCWiki forum

General Category => Emulators => Topic started by: The Electric Monk on 17:25, 19 February 15

Title: Starting up with a snapshot via command line?
Post by: The Electric Monk on 17:25, 19 February 15
Hey everyone, I'm new to these forums, but I've been fiddling around with my CPC since 1990 or so. I used to go by the name of "The Electric Monk", wrote a few text adventures back in the day, composed music for a few games by other people and wrote some crappy juvenile BASIC demos. Great to be here!  ;D

Anyway... I'm building a Windows based MAME arcade cab at the moment, which will also run a host of other emulators. Out of nostalgia, I would like a few CPC games on there as well.

Since the whole cab is controlled by a handful of buttons, and since I want to have it as user friendly as possible, the ideal scenario would be: press the start button, the game runs. No typing "run xyz.bas", no redefining of keys. It seems to me the only way this can be accomplished is by loading a snapshot.

My primary problem is this: Is there an emulator that can be told via command line to load a snapshot file right at the beginning and start with that one, not with plain Basic? WinApe doesn't seem to be able to do it, sadly.

If I got this to work by any chance, my secondary problem: Is there a way to save snapshots (wouldn't want to lose those high scores!) with a single button without going through naming a file name. Basically, is there an emulator with quicksave and quickoad?
As I said, this is a secondary problem, as I can build a workaround macro via AutoHotKey: At the press of [whatever key], type (for example) "l&ldie.sna", then Enter, then type "y" (to overwrite). Or something similar, depending on the emulator's menu.

Anyway, I'm mainly interested in snapshot loading via command line. Thanks for your help!
Title: Re: Starting up with a snapshot via command line?
Post by: demoniak on 17:38, 19 February 15
PC-CPC can start with a snapshot in the command line :

PC-CPC -snapshot file.sna


Title: Re: Starting up with a snapshot via command line?
Post by: The Electric Monk on 17:52, 19 February 15
Thanks for the info. A DOS program, huh?  :o Whew.
That would mean futzing around with DOSBox on my arcade machine. Lots of trial and error and typing. I'm not used to that anymore in my old age...

Don't get me wrong, I'm grateful, and I'll put up with a lot of typing and trying in order to finally be able to play Barbarian on a two-player arcade machine, but if there is a simpler alternative out there, guys, PLEASE let me know.
Title: Re: Starting up with a snapshot via command line?
Post by: Morri on 18:22, 19 February 15
Hi @TheElectricMonk (http://www.cpcwiki.eu/forum/index.php?action=profile;u=1287) and welcome to the wiki! I remember your games, sandman, blowaway bob and I was actually playing hagar the horrible just the other day.  ;D Please, please feel free to hang around with us and reignite your passion for all things CPC.  :P

Anyway, have a look at this wiki page CPCGamesCD-CPCLoader - CPCWiki (http://cpcwiki.eu/index.php/CPCGamesCD-CPCLoader) which is a frontend for thousands of CPC games like MAME. Click on the game, it will load an emulator and auto run.
Title: Re: Starting up with a snapshot via command line?
Post by: Aeliss on 20:10, 19 February 15
QuoteSince the whole cab is controlled by a handful of buttons, and since I want to have it as user friendly as possible, the ideal scenario would be: press the start button, the game runs. No typing "run xyz.bas", no redefining of keys. It seems to me the only way this can be accomplished is by loading a snapshot.

Not necessarily, lot of emulator have an "autorun" feature, I m using it, you just need to use the command line with the dsk file and the good options, and the emul type itself the command line to run the game.
Title: Re: Starting up with a snapshot via command line?
Post by: The Electric Monk on 20:35, 19 February 15
Thanks for the welcome and the tips. (@Morri: Oh god, someone remembers! I'm amazed. Some of those things I really need to track down, I don't even have the original disks anymore...)

I found out that Sugarbox suits both my needs in terms of running a snapshot from the command line and having a quicksave/load feature. Now if only someone could tell me how to enable fullscreen in the damn thing...
Title: Re: Starting up with a snapshot via command line?
Post by: TFM on 20:46, 19 February 15
Hi ElectricMonk!


Long time no see. Glad you found your way here!  :) :) :)
Title: Re: Starting up with a snapshot via command line?
Post by: Executioner on 23:26, 19 February 15
WinAPE will also run a snapshot on startup using:

WinAPE /SN:filename
Title: Re: Starting up with a snapshot via command line?
Post by: The Electric Monk on 06:23, 20 February 15
Quote from: Executioner on 23:26, 19 February 15
WinAPE will also run a snapshot on startup using:

WinAPE /SN:filename

Hm, doesn't seem to work for me, sorry.
I saved a snapshot of Live & Let Die (in mid-game, so there is no disk loading) as live.sna in the same directory as winape.exe. When I load the snapshot from the menu, it works, but creating a batch file that just says winape.exe /SN:live.sna  and running that just opens WinAPE normally. What am I doing wrong?

Also, is there a list of command line options for WinAPE? I haven't been able to find one.
Title: Re: Starting up with a snapshot via command line?
Post by: Lone on 15:31, 20 February 15
Hello,


Full screen in Sugarbox is planned, expect it in (one of ) the next release.
Title: Re: Starting up with a snapshot via command line?
Post by: Aeliss on 19:16, 20 February 15
CPCE too allow sna file but using snapshot isn't a good idea, why ? Because it's just a memory copy, when your application/game will need to acess disk > crash.

You need an emul that use DSK+SNA in same time, good luck without special script like autoit/AutoHotkey.

But I repeat, you can use the autorun feature to don't have to type run "game", and having the game run directly.
Title: Re: Starting up with a snapshot via command line?
Post by: Targhan on 19:53, 20 February 15
You can do all you want indeed with AutoHotKey, which you named. I automatized Winape with it (loading a SNA, inserting a DSK, etc.), so pressing the "fullscreen" key should be very easy to add. My scripts are in this (http://pushnpop.net/articles-76.html) article.
Title: Re: Starting up with a snapshot via command line?
Post by: Gryzor on 17:41, 22 February 15
As Morri said, the simplest way to do it is with CPCGamesCD and CPCLoader. That's the way I've set my MAME PC up, too. You need to launch a secondary UI, of course, but it's a small price to pay and works beautifully...
Title: Re: Starting up with a snapshot via command line?
Post by: The Electric Monk on 00:27, 24 February 15
Quote from: Aeliss on 19:16, 20 February 15
CPCE too allow sna file but using snapshot isn't a good idea, why ? Because it's just a memory copy, when your application/game will need to acess disk > crash.

I'm only putting a handful of CPC games on the emulator.
So far, the list includes Live and Let Die, Split Personalities, Barbarian, Skweek, Beyond the Ice Palace and Mission Elevator. (All the other games I wanted are arcade conversions, and since I have MAME on the machine, that would be a bit pointless.)
Anyway, none of these games access a disk once they're loaded into memory, so using a snapshot is exactly what I want. The autorun function is a great thing, but depending on the disk image, you might then get a bunch of trainer questions: "Infinite lives y/n?" and so on. Sometimes after the game starts, you have to redefine keys, or to set the options a certain way. If I included Monty on the Run (which I'm not doing, for other reasons), I would have to select the right Freedom Kit items each time I started a game. I don't want all that. I want my game in a playable state and ready to go as soon as I push the start button on my arcade machine's front end. Yes, I'm losing the joy of seeing the pretty title screens of Skweek and Live & Let Die and the scroll intro of Beyond the Ice Palace, but to me it's worth it.

But thanks very much for turning me onto CPCE: I'm able to run my snapshots by creating a little batch file ("cpce95.exe /a+ filename.sna"). Since my arcade frontend (MaLa) can remap the keys I send, I can even use the save and restore buttons on my cab to read as CTRL+F2 and CTRL+F3.

I think my problem is pretty much solved!  ;D Big thanks to everyone who took the time to answer.
Title: Re: Starting up with a snapshot via command line?
Post by: Devilmarkus on 23:34, 25 February 15
Latest (internal) JavaCPC Update can also load SNA by command line....
Please check the update information here:
JavaCPC Desktop 1.0 official release (http://www.cpcwiki.eu/forum/emulators/javacpc-desktop-1-0-official-release/msg94375/#msg94375)
Title: Re: Starting up with a snapshot via command line?
Post by: Executioner on 02:07, 03 March 15
Quote from: TheElectricMonk on 06:23, 20 February 15
Hm, doesn't seem to work for me, sorry.

Sorry, I didn't realise that's only in the latest code. I have a bit more work to go before I can officially release it (help files, display options and ParaDOS 1.2/+ to finish), so hopefully won't be too long now.
Title: Re: Starting up with a snapshot via command line?
Post by: TFM on 20:19, 03 March 15
Take the time you need. At the end it will be great!  :)
Title: Re: Starting up with a snapshot via command line?
Post by: krusty_benediction on 16:28, 27 July 23
Quote from: Targhan on 19:53, 20 February 15You can do all you want indeed with AutoHotKey, which you named. I automatized Winape with it (loading a SNA, inserting a DSK, etc.), so pressing the "fullscreen" key should be very easy to add. My scripts are in this (http://pushnpop.net/articles-76.html) article.
Hello @Targhan
pushnpop is dead since a long time. Could you share your script here or elsewhere ?
Thanks !
Title: Re: Starting up with a snapshot via command line?
Post by: Targhan on 16:39, 29 July 23
@krusty_benediction
Wow, this is really old stuff. However, here is the whole article (http://www.julien-nevo.com/IDE_PSPad.zip).

The scripts are in the IDEArchive/MyProject/Scripts. Please don't ask for maintenance :).
Title: Re: Starting up with a snapshot via command line?
Post by: Targhan on 17:58, 29 July 23
Note that you can do the same on linux using xdotool.
Powered by SMFPacks Menu Editor Mod