Author Topic: Starting up with a snapshot via command line?  (Read 3374 times)

0 Members and 1 Guest are viewing this topic.

Offline TheElectricMonk

  • CPC464
  • **
  • Posts: 6
  • Country: de
  • Liked: 1
  • Likes Given: 0
Starting up with a snapshot via command line?
« on: 18: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!

Offline demoniak

  • CPC664
  • ***
  • Posts: 81
  • Country: fr
  • Liked: 65
  • Likes Given: 42
Re: Starting up with a snapshot via command line?
« Reply #1 on: 18:38, 19 February 15 »
PC-CPC can start with a snapshot in the command line :

PC-CPC -snapshot file.sna



Offline TheElectricMonk

  • CPC464
  • **
  • Posts: 6
  • Country: de
  • Liked: 1
  • Likes Given: 0
Re: Starting up with a snapshot via command line?
« Reply #2 on: 18: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.

Offline Morri

  • CPC6128
  • ****
  • Posts: 284
  • Country: nz
  • Liked: 237
  • Likes Given: 215
Re: Starting up with a snapshot via command line?
« Reply #3 on: 19:22, 19 February 15 »
Hi @TheElectricMonk 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 which is a frontend for thousands of CPC games like MAME. Click on the game, it will load an emulator and auto run.
Keeping it Kiwi since 1977

Offline Aeliss

  • CPC464
  • **
  • Posts: 26
  • Country: fr
  • Liked: 9
  • Likes Given: 8
Re: Starting up with a snapshot via command line?
« Reply #4 on: 21:10, 19 February 15 »
Quote
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.

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.
« Last Edit: 21:12, 19 February 15 by Aeliss »

Offline TheElectricMonk

  • CPC464
  • **
  • Posts: 6
  • Country: de
  • Liked: 1
  • Likes Given: 0
Re: Starting up with a snapshot via command line?
« Reply #5 on: 21: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...

Offline TFM

  • Visit the mysteries of the CPC at www.futureos.de
  • Supporter
  • 6128 Plus
  • *
  • Posts: 9.899
  • Country: aq
  • Space Chicken for FutureOS is free!
    • index.php?action=treasury
    • FutureOS - The revolution on CPC!
  • Liked: 1976
  • Likes Given: 4650
Re: Starting up with a snapshot via command line?
« Reply #6 on: 21:46, 19 February 15 »
Hi ElectricMonk!


Long time no see. Glad you found your way here!  :) :) :)
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

Offline Executioner

  • Supporter
  • 6128 Plus
  • *
  • Posts: 783
  • Country: au
  • WinAPE Developer
    • WinAPE
  • Liked: 391
  • Likes Given: 60
Re: Starting up with a snapshot via command line?
« Reply #7 on: 00:26, 20 February 15 »
WinAPE will also run a snapshot on startup using:

WinAPE /SN:filename

Offline TheElectricMonk

  • CPC464
  • **
  • Posts: 6
  • Country: de
  • Liked: 1
  • Likes Given: 0
Re: Starting up with a snapshot via command line?
« Reply #8 on: 07:23, 20 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.

Offline Lone

  • Supporter
  • CPC664
  • *
  • Posts: 98
  • Country: fr
  • Liked: 181
  • Likes Given: 74
Re: Starting up with a snapshot via command line?
« Reply #9 on: 16:31, 20 February 15 »
Hello,


Full screen in Sugarbox is planned, expect it in (one of ) the next release.

Offline Aeliss

  • CPC464
  • **
  • Posts: 26
  • Country: fr
  • Liked: 9
  • Likes Given: 8
Re: Starting up with a snapshot via command line?
« Reply #10 on: 20: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.

Offline Targhan

  • Supporter
  • 6128 Plus
  • *
  • Posts: 993
  • Country: fr
  • Liked: 961
  • Likes Given: 141
Re: Starting up with a snapshot via command line?
« Reply #11 on: 20: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 article.
Targhan/Arkos

Arkos Tracker 2 - alpha 8 now released! - Follow the news on Twitter!
Disark A cross-platform Z80 disassembler/source converter

Imperial Mahjong
Orion Prime

Offline Gryzor

  • Administrator
  • 6128 Plus
  • *****
  • Posts: 15.368
  • Country: gr
  • CPC-Wiki maintainer
    • CPCWiki
  • Liked: 3061
  • Likes Given: 5578
Re: Starting up with a snapshot via command line?
« Reply #12 on: 18: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...

Offline TheElectricMonk

  • CPC464
  • **
  • Posts: 6
  • Country: de
  • Liked: 1
  • Likes Given: 0
Re: Starting up with a snapshot via command line?
« Reply #13 on: 01:27, 24 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.
« Last Edit: 01:33, 24 February 15 by TheElectricMonk »

Offline Devilmarkus

  • Vivid source of indefiniteness
  • 6128 Plus
  • ******
  • Posts: 4.035
  • Country: de
  • WebCPC / JavaCPC developer
    • index.php?action=treasury
    • CPC-Live website
  • Liked: 1014
  • Likes Given: 926
Re: Starting up with a snapshot via command line?
« Reply #14 on: 00:34, 26 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
When you put your ear on a hot stove, you can smell how stupid you are ...

Amstrad CPC games in your webbrowser

JavaCPC Desktop Full Release

Offline Executioner

  • Supporter
  • 6128 Plus
  • *
  • Posts: 783
  • Country: au
  • WinAPE Developer
    • WinAPE
  • Liked: 391
  • Likes Given: 60
Re: Starting up with a snapshot via command line?
« Reply #15 on: 03:07, 03 March 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.

Offline TFM

  • Visit the mysteries of the CPC at www.futureos.de
  • Supporter
  • 6128 Plus
  • *
  • Posts: 9.899
  • Country: aq
  • Space Chicken for FutureOS is free!
    • index.php?action=treasury
    • FutureOS - The revolution on CPC!
  • Liked: 1976
  • Likes Given: 4650
Re: Starting up with a snapshot via command line?
« Reply #16 on: 21:19, 03 March 15 »
Take the time you need. At the end it will be great!  :)
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus