A new version of GBXfer is available. It has been updated to V3.1, mainly because the previous version did not work with the new GameBase V1.3 frontend.
What is GBXfer?
GBXfer is a script that makes it possible to transfer games to real diskettes straight from
the GameBase frontend.
All you have to do is select the game of your choice and click Transfer to real disk.
That's all! The game will be converted to a format supported by OpenCBM and transferred to
a 5.25" disk without any user intervention.
Who should use GBXfer?
If you use the GameBase frontend with a collection of Commodore 64 software (for example
GameBase64 or IntroBase64), you have to play all games in an emulator.
For anyone who wants to keep a huge collection of Commodore 64 software well organized,
but likes to run that software on original hardware, GBXfer can automate a lot of work.
How can GBXfer help making things easier?
Transferring a game from a GameBase collection is quite complicated. Suppose you want to play
the game Pitstop on your Commodore 64. It's easy to find in the GameBase frontend, but you
don't have it on a 5.25" floppy. Then this is what you normally need to do:
GBXfer automates all tasks above. It finds the file you have selected, extract it from
the .zip file, converts it to the format you want and transfers it to a floppy at the way
you want it (transfer individual .prg files or a complete d64 image).
Everything - finding, extracting, converting, transferring with/without using the CBMXfer
GUI - is done without any user intervantion. So all you have to do is click and wait for
the transfer to complete!
I use a previous version of GBXfer. What's changed?
Step-by-Step installation guide
Requirements
STEP 1:
Collect the files you need
First you have to find the Emulators folder that GameBase uses. This folder contains subfolders
for CCS64 and WinVICE, maybe more.
Download the package with the files you need from here and extract it to this Emulators folder.
FYI: the package contains the following files:
After extracting the package, you should have a folder named GBXfer in your Emulators folder, containing the following files:
STEP 2:
Integrate GBXfer with GameBase
After copying the required files to the correct location in step 1, we can configure GameBase
to use the GBXfer script.
To do this, start GameBase. Click on GEMUS in the Menu bar and click Manage Emulators...
Click the left button to create a new 'emulator'. The 'Emulator Properties' window is
displayed. Fill in the following things:
This completes the setup of GBXfer.
How to use GBXfer
You can transfer almost all games from GameBase the following way:
Tweaking GBXfer
You can change the behaviour of GBXfer a little bit.
Every time you start a transfer, you are asked if you want to use the GUI. If you always use
the same method (in other words always use the GUI or never use the GUI), you can skip this question. There is a difference in how to do this between GameBase V1.2 and GameBase V1.3.
Follow the instructions for the GameBase version you use.
GBXFer_Script.txt
Code:
;*******************************************************
;* GEMUS Script for transferring games to real disks
;* (c) K.C.
;* November 2010
;*******************************************************
;==============================================================================
; PLEASE SET YOUR EMULATOR PROPERTIES AS FOLLOWS:
;
; Emulator File : GBXfer.cmd
; Associated Script File (1) :
; Use Short Filenames : YES
; File Types : D64;PRG;T64;G64
;
;==============================================================================
;
; This script needs the following files:
; From the OpenCBM Package:
; CBMCOPY.EXE, CBMCTRL.EXE, D64COPY.EXE, CBMFORMAT.EXE, CBMFORNG.EXE
; From the CBMXfer Package:
; CBMXFER.EXE, TOKENS.DAT, 6502OPCODES.TXT
; From the WinVICE Package:
; C1541.EXE
; From the mnib package:
; G2D.EXE
; Copy these files to the same folder as GBXfer.cmd
;
;==============================================================================
;
; TO SET THE BEHAVIOUR OF THE CBMXFER GUI
;
; Using GameBase 1.2: Read the instructions in the last part of this script
;
; Using GameBase 1.3: Set a Global K=V pair USECBMXFER to Yes, No or Ask
;
;==============================================================================
If GameType CONTAINS(d64||prg||t64||g64)
;--------------------------------
;give the user a warning message?
;--------------------------------
If VersionComment CONTAINS(*not 100%*||*not working*||doesn't work*)
Show_Message(This game may not work properly.)
End If
If VersionComment CONTAINS(*ATTN:*||*NOTE:*||*ATTN!:*||*NOTE!:*)
;point out that critical info is in the version comment
Show_Message(Read this game's Version Comments for very important information/instructions.)
End If
If GameType CONTAINS(g64)
Show_Message(This is a G64 disk image.%crlfx2%Transfer will only be successful if the disk image contains software without copy protection.)
End If
;-------------------------
;show message for the user
;-------------------------
If Key_msg CONTAINS(*)
Show_Message(%msg_value%)
End If
;---------------------------------
;pass Game path to transfer script
;---------------------------------
Add_CLP( %gamepath%)
;---------------------------------------------------------
;Set default path of CBMXfer to path containing disk image
;---------------------------------------------------------
Set_CFG_Value(%emupath%\CBMXfer.ini||SourcePath||%gamepath%\Xfer\)
Set_CFG_Value(%emupath%\CBMXfer.ini||DestPath||c:\)
Set_CFG_Value(%emupath%\CBMXfer.ini||DriveNum||8)
Set_CFG_Value(%emupath%\CBMXfer.ini||NoWarpString|| )
Set_CFG_Value(%emupath%\CBMXfer.ini||TransferString||auto)
Set_CFG_Value(%emupath%\CBMXfer.ini||AutoRefreshDir||1)
Set_CFG_Value(%emupath%\CBMXfer.ini||PreviewCheck||0)
Set_CFG_Value(%emupath%\CBMXfer.ini||ShowCMD||0)
Set_CFG_Value(%emupath%\CBMXfer.ini||ConfirmD64||1)
Set_CFG_Value(%emupath%\CBMXfer.ini||DestMode||0)
Set_CFG_Value(%emupath%\CBMXfer.ini||LinkCStr||serial 19200,com1)
Set_CFG_Value(%emupath%\CBMXfer.ini||ConfirmD64||1)
Set_CFG_Value(%emupath%\CBMXfer.ini||EnableX||1)
Set_CFG_Value(%emupath%\CBMXfer.ini||EnableLink||0)
Set_CFG_Value(%emupath%\CBMXfer.ini||UseVice||False)
Set_CFG_Value(%emupath%\CBMXfer.ini||VicePath|| )
;-----------------------------------------------------------
;Determine the version of the GameBase frontend (1.2 or 1.3)
;-----------------------------------------------------------
If %dbdriveletter% CONTAINS(a||b||c||d||e||f||g||h||i||j||k||l||m||n||o||p||q||r||s||t||u||v||w||x||y||z)
;------------------------------------------
;Check if user wants to use the CBMXFer GUI
;------------------------------------------
If Key_UseCBMXfer CONTAINS(n||*no*||false||off||0)
Add_CLP( 0)
;--------------------------------------------------
;choose between single prg or complete d64 transfer
;--------------------------------------------------
If NumGameFiles > 1
Add_CLP( 1)
Else
If GameType CONTAINS(d64)
If QUESTION(Do you want to transfer the COMPLETE D64 image?%crlfx2%ATTENTION: Contents of disk will be destroyed when choosing YES! ) = YES
Add_CLP( 1)
Else
Add_CLP( 0)
End If
Else
If GameType CONTAINS(g64)
Add_CLP( 1)
Else
Add_CLP( 0)
End If
End If
End If
Else
If Key_UseCBMXfer CONTAINS(y||*yes*||true||on||1)
Add_CLP( 1 0)
Else
;------------------------------
;ask for using GUI for transfer
;------------------------------
If QUESTION(Do you want to use the GUI for file transfer?) = YES
Add_CLP( 1 0)
Else
Add_CLP( 0)
;--------------------------------------------------
;choose between single prg or complete d64 transfer
;--------------------------------------------------
If NumGameFiles > 1
Add_CLP( 1)
Else
If GameType CONTAINS(d64)
If QUESTION(Do you want to transfer the COMPLETE D64 image?%crlfx2%ATTENTION: Contents of disk will be destroyed when choosing YES! ) = YES
Add_CLP( 1)
Else
Add_CLP( 0)
End If
Else
If GameType CONTAINS(g64)
Add_CLP( 1)
Else
Add_CLP( 0)
End If
End If
End If
End If
End If
End If
Else
;------------------------------
;ask for using GUI for transfer
;------------------------------
;**************************************************************************
;* PLEASE READ THIS INFORMATION *
;* ============================ *
;*
;* Right under this comment are 3 lines, beginning with the If statement.
;* Only ONE of these lines must NOT start with a semicolon (;).
;*
;* When the line "If NumGameFiles = 0" does NOT start with a semicolon,
;* GEMUS will NEVER use the GUI and start immediately with the transfer.
;*
;* When the line "If NumGameFiles != 0" does NOT start with a semicolon,
;* GEMUS will ALWAYS use the GUI for file and disk transfers.
;*
;* When the line starting with "If QUESTION" does NOT start with a
;* semicolon, GEMUS will ask you if you want to use the GUI everytime you
;* start a game.
;**************************************************************************
;If NumGameFiles = 0
;If NumGameFiles != 0
If QUESTION(Do you want to use the GUI for file transfer?) = YES
Add_CLP( 1 0)
Else
Add_CLP( 0)
;--------------------------------------------------
;choose between single prg or complete d64 transfer
;--------------------------------------------------
If NumGameFiles > 1
Add_CLP( 1)
Else
If GameType CONTAINS(d64)
If QUESTION(Do you want to transfer the COMPLETE D64 image?%crlfx2%ATTENTION: Contents of disk will be destroyed when choosing YES! ) = YES
Add_CLP( 1)
Else
Add_CLP( 0)
End If
Else
Add_CLP( 0)
End If
End If
End If
End If
;------------
;run emulator
;------------
Run_Emulator()
Else
;invalid game file type
Show_Message(GAME_NOT_SUPPORTED%crlfx2%Supported types: D64, PRG, T64)
End If
GBXfer.cmd
Code:
@Echo off
Rem ----------------------------------------------
Rem Script for transferring program files from the
Rem GameBase frontend to a real Commodore disk
Rem
Rem Version 3.1, Created November 2010 by K.C.
Rem ----------------------------------------------
Rem -----------------------------------------------------------------------
Rem Command Line Parameters:
Rem %1 = Location of GBGame folder (Default C:\GBGame)
Rem %2 = Flag for starting GUI
Rem %3 = Flag for using File copy (CBMCOPY) or D64 transfer (D64COPY)
Rem -----------------------------------------------------------------------
Rem --------------------------------------------------------------------
Rem Do several checks to see if script is started from GameBase frontend
Rem --------------------------------------------------------------------
If %1X==X Goto NoParam
If %2X==X Goto NoParam
If %3X==X Goto NoParam
Goto Check1
:NoParam
Echo.
Echo WARNING!
Echo ========
Echo This script is intended to be used from the GameBase frontend.
Echo 3 paramters are required, one or more are missing.
Echo Further execution is terminated.
Pause
Goto End
:Check1
If Exist %1\. Goto Check2
Echo.
Echo WARNING!
Echo ========
Echo This script is intended to be used from the GameBase frontend.
Echo %1 is an incorrect path for the GameBase image.
Echo The first parameter should point to the folder where Gamebase
Echo extracts the image to, default path is C:\GBGame
Pause
Goto End
:Check2
If %2X==0X Goto Check3
If %2X==1X Goto Check3
Echo.
Echo WARNING!
Echo ========
Echo This script is intended to be used from the GameBase frontend.
Echo Incorrect second parameter (%2): can only be 0 or 1.
Echo This parameter determines if the transfer script will launch
Echo the GUI for transfers (1) or not (0).
Pause
Goto End
:Check3
If %3X==0X Goto StartGBXfer
If %3X==1X Goto StartGBXfer
Echo.
Echo WARNING!
Echo ========
Echo This script is intended to be used from the GameBase frontend.
Echo Incorrect third parameter (%3): can only be 0 or 1.
Echo When transferring a single D64 image, this parameter
Echo determines if the transfer script will perform
Echo a file copy to the disk with the OpenCBM CBMCOPY command (0)
Echo or transfers the complete D64 image to the disk with
Echo the OpenCBM D64COPY command (1)
Pause
Goto End
:StartGBXfer
Rem ---------------------------------------------
Rem If not exist, create temporary working folder
Rem and eventually delete files from it
Rem ---------------------------------------------
If Not Exist "%1\SrcImg\." MD "%1\SrcImg"
For %%A in (%1\SrcImg\*.*) Do Del "%%A" > NUL
Rem --------------------------------------------------
Rem If not exist, create temporary folder for transfer
Rem and eventually delete files from it
Rem --------------------------------------------------
If Not Exist %1\XFER\. MD %1\XFER
If Exist %1\XFER\*.PRG DEL %1\XFER\*.PRG
If Exist %1\XFER\*.T64 DEL %1\XFER\*.T64
If Exist %1\XFER\*.D64 DEL %1\XFER\*.D64
If Exist %1\XFER\*.G64 DEL %1\XFER\*.G64
Rem -----------------------------------
Rem Find images in the Game folder
Rem and copy them to the working folder
Rem -----------------------------------
For %%A in (%1\*.*) Do Copy "%%A" "%1\SrcImg" > NUL
Rem ---------------------------------------
Rem If G64 files exist, convert them to D64
Rem ---------------------------------------
for %%A in (%1\SrcImg\*.G64) do copy "%%A" "%%A.G64"^
&& del "%%A"^
&& g2d "%%A.G64" > NUL
Rem ------------------------------------------
Rem Launch GUI if this was the choice in GEMUS
Rem ------------------------------------------
If %2==1 Goto UseGUI
Rem ------------------------------------------------------------
Rem Check to see if there are any D64 files in the GBGame folder
Rem If not, skip to the section for transferring T64 images
Rem ------------------------------------------------------------
If Not Exist %1\SrcImg\*.D64 Goto CheckT64
Rem -----------------------------------------------------------
Rem Set environment variable to wait for keystroke in next step
Rem -----------------------------------------------------------
Set AskKey=Y
Rem ------------------------------------------------
Rem Copy all D64 images to the temporary XFER folder
Rem ------------------------------------------------
For %%A In (%1\SrcImg\*.D64) Do Copy "%%A" "%1\XFER" > NUL
Rem ----------------------------------
Rem Reset bus before starting transfer
Rem ----------------------------------
Echo Resetting IEC Bus...
CBMCTRL.EXE reset
Echo.
Echo C1541 status:
CBMCTRL.EXE status 8
Rem -----------------------------------------------
Rem If this was the choice in GEMUS, start transfer
Rem of complete D64 images with D64COPY command
Rem -----------------------------------------------
If %3==1 For %%A In (%1\XFER\*.D64) Do Echo Insert a new disk in drive 8^
&& Echo WARNING!!! Contents of this disk will be destroyed!^
&& Pause && Echo Formatting disk...^
&& CBMFORNG.EXE 8 gbxfer,64 && Echo.^
&& Echo Transferring disk image %%A && D64COPY.EXE "%%A" 8 && Echo.
Rem -----------------------------------------------------------------
Rem If D64COPY was the choice in GEMUS, Skip file copy from D64 image
Rem and jump to the section for transferring T64 images
Rem -----------------------------------------------------------------
If %3==1 Goto CheckT64
Rem ----------------------------------------------------------
Rem Create temporary folder to extract PRG's from D64 image to
Rem ----------------------------------------------------------
If Not Exist XFERTEMP\. MD XFERTEMP
CD XFERTEMP
Rem --------------------------------------------------
Rem Extract PRG's from D64 image to temporary folder
Rem --------------------------------------------------
Echo Extracting PRG's from D64 Image...
FOR %%A IN (%1\XFER\*.D64) DO ..\C1541.EXE -attach "%%A" -extract > NUL
Rem ---------------------------------------------------------
Rem Copy all PRG's from temporary folder to real disk in 1541
Rem ---------------------------------------------------------
For %%A IN (*.*) Do ..\CBMCOPY.EXE -w 8 "%%A"
Rem --------------------------------------------------
Rem Delete extracted PRG's and delete temporary folder
Rem --------------------------------------------------
CD ..
For %%A In (XFERTEMP\*.*) Do Del "%%A"
RD XFERTEMP
:CheckT64
Rem ------------------------------------------------------------
Rem Check to see if there are any T64 files in the GBGame folder
Rem If not, skip to the section for transferring PRG images
Rem ------------------------------------------------------------
If Not Exist %1\SrcImg\*.T64 Goto CheckPRG
Rem ------------------------------------------------
Rem Copy all T64 images to the temporary XFER folder
Rem ------------------------------------------------
For %%A In (%1\SrcImg\*.T64) Do Copy "%%A" "%1\XFER" > NUL
Rem ----------------------------------------------------------------------
Rem Wait for keystroke if images of another format are already transferred
Rem ----------------------------------------------------------------------
If %AskKey%es==Yes Echo Press any key for transferring T64 image && Pause
Rem ----------------------------------
Rem Reset bus before starting transfer
Rem ----------------------------------
Echo Resetting IEC Bus...
CBMCTRL.EXE reset
Echo.
Echo C1541 status:
CBMCTRL.EXE status 8
Rem ------------------------------------------
Rem Start file transfer from T64 image to disk
Rem ------------------------------------------
For %%A IN (%1\XFER\*.T64) Do CBMCOPY.EXE -w 8 "%%A"
Rem -----------------------------------------------------------
Rem Set environment variable to wait for keystroke in next step
Rem -----------------------------------------------------------
Set AskKey=Y
:CheckPRG
Rem ------------------------------------------------------------
Rem Check to see if there are any PRG files in the GBGame folder
Rem If not, skip to the end of this script
Rem ------------------------------------------------------------
If Not Exist %1\SrcImg\*.PRG Goto End
Rem ----------------------------------------------------------------------
Rem Wait for keystroke if images of another format are already transferred
Rem ----------------------------------------------------------------------
If %AskKey%es==Yes Echo Press any key for transferring PRG image && Pause
Rem ------------------------------------------------
Rem Copy all PRG images to the temporary XFER folder
Rem ------------------------------------------------
For %%A In (%1\SrcImg\*.PRG) Do Copy "%%A" "%1\XFER" > NUL
Rem ----------------------------------
Rem Reset bus before starting transfer
Rem ----------------------------------
Echo Resetting IEC Bus...
CBMCTRL.EXE reset
Echo.
Echo C1541 status:
CBMCTRL.EXE status 8
Rem ------------------------------------------
Rem Start file transfer from PRG image to disk
Rem ------------------------------------------
For %%A IN (%1\XFER\*.PRG) Do CBMCOPY.EXE -w 8 "%%A"
Goto End
:UseGUI
Rem ------------------------------------------
Rem Convert T64 images to D64 and copy PRG and
Rem D64 images to temporary folder
Rem ------------------------------------------
For %%A In (%1\SrcImg\*.PRG) Do Copy "%%A" "%1\XFER" > NUL
For %%A In (%1\SrcImg\*.D64) Do Copy "%%A" "%1\XFER" > NUL
If Not Exist %1\SrcImg\*.T64 Goto StartGUI
Rem ----------------------------------------------------------
Rem Create temporary folder to extract PRG's from T64 image to
Rem ----------------------------------------------------------
If Not Exist XFERTEMP\. MD XFERTEMP
CD XFERTEMP
Rem -----------------------------------
Rem Copy T64 images to temporary folder
Rem -----------------------------------
Copy %1\SrcImg\*.T64 . > NUL
Rem ---------------------------------------------
Rem For each T64 image, create a blank D64 image,
Rem copy the files inside the T64 image to it and
Rem copy the D64 image to the XFER folder
Rem ---------------------------------------------
For %%A in (*.T64) Do ..\C1541.EXE -format gbxfer,64 d64 "%%A.D64" > NUL^
&& ..\C1541 "%%A.D64" -tape "%%A" > NUL^
&& Copy "%%A.D64" %1\XFER > NUL && DEL "%%A.D64" > NUL
Rem ---------------------------------------------------
Rem Delete copied T64 images and remove XFERTEMP folder
Rem ---------------------------------------------------
CD ..
Del XFERTEMP\*.T64
RD XFERTEMP
:StartGUI
Rem ---------------------------------
Rem Cleanup and delete working folder
Rem ---------------------------------
If Exist %1\SrcImg\. for %%A in (%1\SrcImg\*.*) Do Del "%%A"
If Exist %1\SrcImg\. RD "%1\SrcImg"
Rem --------------
Rem Launch the GUI
Rem --------------
CBMXFER
Goto End
:End
Rem ----------------------------------------
Rem Cleanup and delete temporary XFER folder
Rem ----------------------------------------
If Exist %1\XFER\. for %%A in (%1\XFER\*.*) Do Del "%%A"
If Exist %1\XFER\. RD "%1\XFER"
Rem ---------------------------------
Rem Cleanup and delete working folder
Rem ---------------------------------
If Exist %1\SrcImg\. for %%A in (%1\SrcImg\*.*) Do Del "%%A"
If Exist %1\SrcImg\. RD "%1\SrcImg"
Rem ------------------------------------
Rem Clear temporary environment variable
Rem ------------------------------------
Set AskKey=