Welcome to the Gamebase 64 forums.                 An attempt to document ALL Commodore 64 gameware before it's too late!

configuration file loading

Discuss GameBase, the Universal Emulator Frontend!

Moderator: Jimbo

Gu
Guest

configuration file loading

Mon Sep 19, 2005 7:32 am

hello,

i have recently created a game. I have set some of my own parameters in CCS64's configuration file. (eg: c64.cfg)

Is it possible under GameBase to run *my* configuration file or some way make the changes when the emulator starts via the configuration file?

just interested?
J2003C
GB64 Team
Location: Just South of Hell
Posts: 910
Joined: Fri Feb 14, 2003 7:57 pm

Mon Sep 19, 2005 2:47 pm

Yes, that is what the GEMUS script in GameBase is for. It is heavily documented in the GB documentation. If you have specific questions as to what you want GB to do, please ask.
-J2010C-
Gu
Guest

CCS64

Mon Sep 19, 2005 5:20 pm

the main changes in the configuration file i have made are the type of control (correct joystick being used) and .... (please don't hurt me) the display colours of the emulator.....

the game i created needs these colours for its purpose, although the ordinary C64 colours are sufficent, the colours i chose enhance the experience....

can these two changes be made using GEMUS on a game-by-game level?
J2003C
GB64 Team
Location: Just South of Hell
Posts: 910
Joined: Fri Feb 14, 2003 7:57 pm

Tue Sep 20, 2005 6:51 am

Yes, they can be made on a game-by-game level. You need to hit F2 in GameBase to access the key=vale pair list. Just add the values you want to change. Do you need to change the values in a .vpl file? The color settings for VICE aren't in the vice.ini file (unless you changed contrast, PAL umulation, etc.). Give me an example of what you want to change in VICE (what color setting you want to set or change), and I'll see if I can code it up.
-J2010C-
Gu
Guest

colours

Tue Sep 20, 2005 12:07 pm

Hello again, I've tried putting these values into GEMUS key pairs, but it doesn't seem to work.... For CCS64, i tried putting the $ sign in front of the key put that doesn't seem to be working either.

Here is a list of the colour chart that I made for CCS64. I've only changed colours 2 (red) to 10 (grey). But here is for completion.


CCS64
====
RGBCOLOR0=191d19
RGBCOLOR1=fcf9fc
RGBCOLOR2=933a4c
RGBCOLOR3=b6fafa
RGBCOLOR4=d27ded
RGBCOLOR5=6acf6f
RGBCOLOR6=4f44d8
RGBCOLOR7=fbfb8b
RGBCOLOR8=d89c5b
RGBCOLOR9=7f5307
RGBCOLOR10=ef839f
RGBCOLOR11=575753
RGBCOLOR12=a3a7a7
RGBCOLOR13=b7fbbf
RGBCOLOR14=a397ff
RGBCOLOR15=d0d0d0

Maybe i'm missing something here... but do i need to change the GEMUS script itself for CCS64? or any other emulator.....
J2003C
GB64 Team
Location: Just South of Hell
Posts: 910
Joined: Fri Feb 14, 2003 7:57 pm

Tue Sep 20, 2005 2:05 pm

1st, it would be nice if you registered in the forum, so I'm not "talking" to "Guest."

From GameBase, press F2 and enter the color changes you want, like:
RGBCOLOR0=191d19
RGBCOLOR1=fcf9fc
...
(Repeat for the colors you want to change for this game)

in the CCS64 GEMUS script, add:

If Key_rgbcolor0 CONTAINS(*)
Set_CFG_Value(1||$RGBCOLOR0||%rgbcolor0_value%)
End If
If Key_rgbcolor1 CONTAINS(*)
Set_CFG_Value(1||$RGBCOLOR1||%rgbcolor1_value%)
End If
(Repeat for ALL colors)

Add only the colors you want to change for each game in the F2 key=value pair box.
-J2010C-
little_plugger
Keen Member
Keen Member
Posts: 141
Joined: Mon Sep 08, 2003 12:31 pm

modified ccs64 gemus code

Tue Sep 20, 2005 6:45 pm

hi again,

i altered the code for CCS64 v2.0b DirectX and it works perfectly. i am putting this code here for other people to try out and for gamebase's usage.

Usage for CCS64:
To change your colours on a game per game basis, use the GEMUS key value pairs by pressing F2 on the game you want to change.

Type in the following to change:

Code: Select all

rgbcolorX=rrggbb 
where X is a decimal number between (0 and 15)
and rr gg bb is a hexadecimal number (00 to ff) for the red, green and blue respectively.

I hope this coding can be implementing in Gamebase's next update.

Code: Select all

;************************************
;* CCS64 v2.0b DirectX GEMUS Script *
;*        (c) The GB64 Team         *
;*         14 February 2005         *
;************************************
;
; PLEASE SET YOUR EMULATOR PROPERTIES AS FOLLOWS:
;
; Emulator File: CCS.EXE
; Associated Sctipt File (1): C64.CFG
; Use Short Filenames: YES
; File Types: D64;T64;PRG;P00;P01;G64;G41;CRT;TAP
;
; This script was written for CCS64 DirectX v2.0 beta,
; but may work with other Windows versions too.
;
; Emulator Website: http://www.ccs64.com
;
; To enable the REU (RAM Expansion Unit),
; use the key=value pair: reu=x
; where x is 128,256,512,1024,2048,4086,8192 or 16384

If GameType CONTAINS(t64||prg||p00||p01||d64||g64||g41||crt||tap)

	;Option to start in windowed mode. Not all video modes are supported,
	;The window is not floating (it is fixed in the upper-left corner)
	;Add_CLP( -window)

	;option to disable/enable sound at startup
	;Set_CFG_Value(1||$SOUNDENABLE||NO)

	;Option to use max emulator speed during disk load (not always reliable)
	;Set_CFG_Value(1||$MAX1541SPEED||1)

	;set disk save mode (0=never, 1=ask, 2=continuously)
	Set_CFG_Value(1||$DISKSAVEMODE||2)

	;do we want a PAL or NTSC setup?
	If PalNTSC = NTSC
		;1=NTSC (65x263), 2=NTSC (65x262)
		Set_CFG_Value(1||$SYSTEMMODE||1)
	Else
		;0=PAL (63x312)
		Set_CFG_Value(1||$SYSTEMMODE||0)
	End If

	;load the selected game image
	Add_CLP( %gamepathfile%)
	If GameType CONTAINS(d64||t64)
		Add_CLP(,%imageindex%)

		;true drive emulation?
		If TrueDriveEmu = NO
			Add_CLP( -fastload)
		Else
			Add_CLP( -normalload)
		End If
	End If

	;set the game path for the emulator
	Set_CFG_Value(1||$LOADPATH||%gamepath%)

	;check for 'manual load' verison comments
	If VersionComment CONTAINS(*load manually*)
		Add_CLP( -manualrun)
	Else
		;autorun the loaded image
		Add_CLP( -autorun)
	End If

	;option to set screenshot size settings to 320x200 with no C64 border (GBC style)
	;Set_CFG_Value(1||$SCREENSHOTSTARTX||128)
	;Set_CFG_Value(1||$SCREENSHOTSTOPX||448)
	;Set_CFG_Value(1||$SCREENSHOTSTARTY||51)
	;Set_CFG_Value(1||$SCREENSHOTSTOPY||251)


	;set the game controls
	;These settings are designed to automatically set the controls for player 1
	;to the same controller, regardless of which PORT the game uses for player 1.
	;
	;PORTx: 0=None, 1=Joystick, 2=Mouse C1351, 3=Paddles
	;MODE for PORTx=1: 0=PC Gameport 1, 1=PC Gameport 2, 2=Key-Set 1,
	;     3=Key-Set 2, 4=Key-Set 3, 5=Adapter Port 1, 6=Adapter Port 2
	;
	;Replace * with <DISABLED> to disable the automatic settings for the JoyPorts
	If %gamefile% CONTAINS(*)
		If Control = JoyPort2
			;default for JoyPort2 is PORT1=Key-Set 2, PORT2=Key-Set 3
			Set_CFG_Value(1||$CONTROLPORT2||1)
			Set_CFG_Value(1||$CONTROLPORT2MODE||2)
			If NumPlayers > 1
				Set_CFG_Value(1||$CONTROLPORT1||1)
				Set_CFG_Value(1||$CONTROLPORT1MODE||3)
			End If
		ElseIf Control = JoyPort1
			;default for JoyPort1 is PORT1=Key-Set 3, PORT2=Key-Set 2
			Set_CFG_Value(1||$CONTROLPORT1||1)
			Set_CFG_Value(1||$CONTROLPORT1MODE||2)
			If NumPlayers > 1
				Set_CFG_Value(1||$CONTROLPORT2||1)
				Set_CFG_Value(1||$CONTROLPORT2MODE||3)
			End If
		ElseIf Control = Mouse
			;C1351 Mouse in PORT1
			;MODE for PORT1=2: 0=PC Mouse, 1=PC Gameport 1, 2=PC Gameport 2,
			;                  3=Key-Set 1, 4=Key-Set 2, 5=Key-Set 3
			Set_CFG_Value(1||$CONTROLPORT1||2)
			Set_CFG_Value(1||$CONTROLPORT1MODE||0)
		ElseIf Control = PaddlePort1
			;PaddelPort1 is for 1P or 2P (Simultaneous) games
			;default is player 1 uses PC Mouse, player 2 uses Key-Set 3
			;MODE for PORT=3: 80=PC Mouse+Key-Set 3, 64=PC Mouse+Key-Set 2
			;    48=PC Mouse+Key-Set 1
			Set_CFG_Value(1||$CONTROLPORT1||3)
			Set_CFG_Value(1||$CONTROLPORT1MODE||80)
			If NumPlayers > 1
				Set_CFG_Value(1||$CONTROLPORT2||3)
				Set_CFG_Value(1||$CONTROLPORT2MODE||80)
			End If
		ElseIf Control = PaddlePort2
			;PaddelPort2 is for 2P (Alternating) or 1P PORT2 games
			;default is both players 1 and 2 use the PC Mouse
			;MODE for PORT=3: 0=PC Mouse+PC Mouse, 80=PC Mouse+Key-Set 3
			Set_CFG_Value(1||$CONTROLPORT2||3)
			Set_CFG_Value(1||$CONTROLPORT2MODE||0)
			If NumPlayers > 1
				Set_CFG_Value(1||$CONTROLPORT1||3)
				Set_CFG_Value(1||$CONTROLPORT1MODE||0)
			End If
		Else
			;clear the ports if not one of the above controls
			Set_CFG_Value(1||$CONTROLPORT1||0)
			Set_CFG_Value(1||$CONTROLPORT1MODE||0)
			Set_CFG_Value(1||$CONTROLPORT2||0)
			Set_CFG_Value(1||$CONTROLPORT2MODE||0)
		End If
	End If

	;REU (Ram Expansion Unit) = 128,256,512,1024,2048,4086,8192 or 16384 kB
	If Key_reu CONTAINS(*)
		;enable REU and set to reu value
		Set_CFG_Value(1||$REUENABLE||YES)
		;set REU to reu value in number of 64kB units
		If Key_reu CONTAINS(128)
			Set_CFG_Value(1||$REUSIZE||2)
		ElseIf Key_reu CONTAINS(256)
			Set_CFG_Value(1||$REUSIZE||4)
		ElseIf Key_reu CONTAINS(512)
			Set_CFG_Value(1||$REUSIZE||8)
		ElseIf Key_reu CONTAINS(1024)
			Set_CFG_Value(1||$REUSIZE||16)
		ElseIf Key_reu CONTAINS(2048)
			Set_CFG_Value(1||$REUSIZE||32)
		ElseIf Key_reu CONTAINS(4096)
			Set_CFG_Value(1||$REUSIZE||64)
		ElseIf Key_reu CONTAINS(8192)
			Set_CFG_Value(1||$REUSIZE||128)
		ElseIf Key_reu CONTAINS(16384)
			Set_CFG_Value(1||$REUSIZE||256)
		ElseIf Key_reu CONTAINS(no||no*||off||false||0)
			;disable REU if set to off
			Set_CFG_Value(1||$REUENABLE||NO)
		Else
			;default to 512 kB for all other REU values (on, yes, 500, etc.)
			Set_CFG_Value(1||$REUSIZE||8)
		End If
	Else
		;disable REU
		Set_CFG_Value(1||$REUENABLE||NO)
	End If



	;unsupported game controls
	If Control = Lightpen
		Show_Message(This emulator does not have LightPen emulation.%crlfx2%This game may be uncontrollable/unplayable.)
	ElseIf Control = KoalaPad
		Show_Message(This emulator does not have KoalaPad emulation.%crlfx2%This game may be uncontrollable/unplayable.)
	ElseIf Control = LightGun
		Show_Message(This emulator does not have LightGun emulation.%crlfx2%This game may be uncontrollable/unplayable.)
	End If

	;give the user a warning message?
	If VersionComment CONTAINS(*use VICE*||*use C64S*||*use CCS v1*||*use real C64*)
		Show_Message(This game may not work properly with this emulator.%crlfx2%See Version Comment for more info.)
	End If
	If VersionComment CONTAINS(*not 100%*||*not working*||doesn't work*)
		Show_Message(This game may not work properly.)
	End If
	If VersionComment CONTAINS(*load manually*)
		Show_Message(You must load this game manually within the emulator.%crlfx2%Game file: %gamepathfile%)
	End If
	If VersionComment CONTAINS(*PET Emulator*)
		Show_Message(Use PET Emulator to run this game.)
	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 VersionComment CONTAINS(*VIC-20*||*VIC20*)
		If VersionComment CONTAINS(*emulator*)
			Show_Message(Use VIC-20 column Emulator to run this game properly.)
		End If
	End If

	;loads a set of colors for changing the default emulator colours
	If Key_rgbcolor0 CONTAINS(*)
		Set_CFG_Value(1||$RGBCOLOR0||%rgbcolor0_value%)
	End If
	If Key_rgbcolor1 CONTAINS(*)
		Set_CFG_Value(1||$RGBCOLOR1||%rgbcolor1_value%)
	End If
	If Key_rgbcolor2 CONTAINS(*)
		Set_CFG_Value(1||$RGBCOLOR2||%rgbcolor2_value%)
	End If
	If Key_rgbcolor3 CONTAINS(*)
		Set_CFG_Value(1||$RGBCOLOR3||%rgbcolor3_value%)
	End If
	If Key_rgbcolor4 CONTAINS(*)
		Set_CFG_Value(1||$RGBCOLOR4||%rgbcolor4_value%)
	End If
	If Key_rgbcolor5 CONTAINS(*)
		Set_CFG_Value(1||$RGBCOLOR5||%rgbcolor5_value%)
	End If
	If Key_rgbcolor6 CONTAINS(*)
		Set_CFG_Value(1||$RGBCOLOR6||%rgbcolor6_value%)
	End If
	If Key_rgbcolor7 CONTAINS(*)
		Set_CFG_Value(1||$RGBCOLOR7||%rgbcolor7_value%)
	End If
	If Key_rgbcolor8 CONTAINS(*)
		Set_CFG_Value(1||$RGBCOLOR8||%rgbcolor8_value%)
	End If
	If Key_rgbcolor9 CONTAINS(*)
		Set_CFG_Value(1||$RGBCOLOR9||%rgbcolor9_value%)
	End If
	If Key_rgbcolor10 CONTAINS(*)
		Set_CFG_Value(1||$RGBCOLOR10||%rgbcolor10_value%)
	End If
	If Key_rgbcolor11 CONTAINS(*)
		Set_CFG_Value(1||$RGBCOLOR11||%rgbcolor11_value%)
	End If
	If Key_rgbcolor12 CONTAINS(*)
		Set_CFG_Value(1||$RGBCOLOR12||%rgbcolor12_value%)
	End If
	If Key_rgbcolor13 CONTAINS(*)
		Set_CFG_Value(1||$RGBCOLOR13||%rgbcolor13_value%)
	End If
	If Key_rgbcolor14 CONTAINS(*)
		Set_CFG_Value(1||$RGBCOLOR14||%rgbcolor14_value%)
	End If
	If Key_rgbcolor15 CONTAINS(*)
		Set_CFG_Value(1||$RGBCOLOR15||%rgbcolor15_value%)
	End If

	;run the emulator
	Run_Emulator()

Else

	;invalid game file type
	Show_Message(GAME_NOT_SUPPORTED%crlfx2%Supported types: D64, T64, G64/G41, TAP, CRT, P00, P01, PRG)

End If
J2003C
GB64 Team
Location: Just South of Hell
Posts: 910
Joined: Fri Feb 14, 2003 7:57 pm

Wed Sep 21, 2005 11:33 pm

You may want to set the values to a default palette first, then change the values that have a rgbcolorX=rrggbb, that way, you only have to add the values for the specific colors you are going to change in each individual game. The way you have it now, you will need to put every color setting into every game entry in GB.
-J2010C-
little_plugger
Keen Member
Keen Member
Posts: 141
Joined: Mon Sep 08, 2003 12:31 pm

Thu Sep 22, 2005 2:34 pm

hi there,

the reason why i supplied the modified code was not to use it for *ALL* games, but for game where you want to change the colour palette. It wasn't intended to be used for every single game, just the games you want to change.

If GB64, or anyone else for that matter, wants to use the code so that a game can have different colours, the code is available for use.

What I am asking is, will GB64 consider using the code for the next GameBase update?...
J2003C
GB64 Team
Location: Just South of Hell
Posts: 910
Joined: Fri Feb 14, 2003 7:57 pm

Fri Sep 23, 2005 12:16 am

My last comment still stands. You need to set the color palette to the standard default first by adding:
Set_CFG_Value(1||$RGBCOLOR0||191d19)
...
Set_CFG_Value(1||$RGBCOLOR15||c0c0c0)
before you change any values. This applies to ALL games, otherwise, you are changing the color palette permanently any time you change it for one of your "special" games.

This code will not be used in the official GB GEMUS script, unless you can give some good examples of why this would be useful.
-J2010C-

Return to “The GameBase Frontend”

Who is online

Users browsing this forum: No registered users and 36 guests