Specifying disk image for drive B through the command line in Caprice32 v4.2.0

Started by michaelc, 13:19, 07 January 17

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

michaelc

Hi to All,


I need to pass a xxxxx.dsk file as a disk image to be used in caprice32 v4.2.0 (command line only) for drive B. I managed to send a snapshot (.SNA) file along with a disk file xxxx.dsk (different than the game / app stored in the .SNA) at the same time and it works (after a F5 reboot the disk is available in Drive A). Is there any way to specify another disk image and assign it to drive B (without modifying the .CFG file)?


Thanks.

KaosOverride

The code needs some reworking. The comand line with a dsk filename is directly loaded at A: always.


What you need is to define a new comand line pafameter label to tell Caprice that the dsk must be loaded at drive B:


For example : caprice32 discs/diskfora.dsk --driveb discs/diskforb.dsk


The easiest way to attach the code for loading B: is after the params of the INI are loaded, changing the value for the disk at B:,  and before the emulator is set up with the INI values, where the dsk at B:param from the ini is loaded into the emulator.


Also the functions for loading DSKs is not optimised for in-use swap (for example loading Art Studio or Tasword and then later swap the disk for a work data disk to load your files). There is just a "manger" (check zip file for dsk and load it, or load directly a dsk) for the command line for drive A: and some similar "managers" for loading the DSKs at the INI parameters for drive A and B.


I had to rework those "managers" for a more flexible use at the disk menu for CapriceRPI....


Sorry but appart from edit code and recompile there is no other way...



KaosOverride · GitHub
MEGA Amstrad Public Amstrad folder

KaosOverride

I have recently update CapriceRPI to support extra command line options (As it's oriented to be used with retropie, there is not .ini configuration file) and one of them is the --drvB filename.dsk.


But I use Caprice 4.1.0 as base instead of 4.2.0 (whose changes are mostly the migration to OpenGL renderer). If you wish to recycle my code for command line B: loading be advised that there are many changes to the file loading management.


The most easy change for 4.2.0 coulde be somethibg line this:
There is a loop for the command line arguments searching for DSK, Zip, CDT, SNA. There is also a flag variable have_DSK for drive A. Make another for drive B, and use the first as vondition to know that you have already setup the drive A filename. So next DSK will load at drive B. Be careful. It's a IF ELSE block hell. The code for loading at A must be replicated for B and routed with the conditions.


So you will get something like this: Caprice FileForA.dsk FileForB.dsk


If you see this a bit complicated, then I could try to replicate Caprice32 4.2.0 at my github space and do the changes, but give me some days, please.
KaosOverride · GitHub
MEGA Amstrad Public Amstrad folder

Powered by SMFPacks Menu Editor Mod