News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_The Electric Monk

Starting up with a snapshot via command line?

Started by The Electric Monk, 17:25, 19 February 15

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

The Electric Monk

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!

demoniak

PC-CPC can start with a snapshot in the command line :

PC-CPC -snapshot file.sna



The Electric Monk

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.

Morri

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

Aeliss

#4
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.

The Electric Monk

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...

TFM

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

Executioner

WinAPE will also run a snapshot on startup using:

WinAPE /SN:filename

The Electric Monk

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.

Lone

Hello,


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

Aeliss

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.

Targhan

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.0.1 now released! - Follow the news on Twitter!
Disark - A cross-platform Z80 disassembler/source converter
FDC Tool 1.1 - Read Amsdos files without the system

Imperial Mahjong
Orion Prime

Gryzor

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...

The Electric Monk

#13
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.

Devilmarkus

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

Executioner

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.

TFM

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

krusty_benediction

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 article.
Hello @Targhan
pushnpop is dead since a long time. Could you share your script here or elsewhere ?
Thanks !

Targhan

@krusty_benediction
Wow, this is really old stuff. However, here is the whole article.

The scripts are in the IDEArchive/MyProject/Scripts. Please don't ask for maintenance :).
Targhan/Arkos

Arkos Tracker 2.0.1 now released! - Follow the news on Twitter!
Disark - A cross-platform Z80 disassembler/source converter
FDC Tool 1.1 - Read Amsdos files without the system

Imperial Mahjong
Orion Prime

Targhan

Note that you can do the same on linux using xdotool.
Targhan/Arkos

Arkos Tracker 2.0.1 now released! - Follow the news on Twitter!
Disark - A cross-platform Z80 disassembler/source converter
FDC Tool 1.1 - Read Amsdos files without the system

Imperial Mahjong
Orion Prime

Powered by SMFPacks Menu Editor Mod