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

MESS Script

Discuss GameBase, the Universal Emulator Frontend!

Moderator: Jimbo

sut
Cool Member
Cool Member
Location: Mansfield
Posts: 200
Joined: Thu Jul 20, 2006 5:15 pm

MESS Script

Thu Jul 20, 2006 5:36 pm

Hello this is my 1st time on the forum and would like some advice.

Has anyone got a working MESS script ? I am only using it for older console systems e.g. Channel F, Adventurevision etc.

I can get MESS to launch from Gamebase but not actually launch the game, I can get MAME to run no problem so although the projects are similar there are obviously differences.

If anybody has a working MESS script would appreciate the details.

Thanks
User avatar
K.C.
Cool Member
Cool Member
Location: The Netherlands
Posts: 416
Joined: Mon Sep 29, 2003 9:57 am

Thu Jul 20, 2006 6:08 pm

This is the MESS Win32 script that is included in GBC V03.
It displays a message that you have to type LOAD "*",8,1 and RUN before it starts a game, so it seems that it is not possible to autostart a game from Gamebase.
Here's the script:

Code: Select all

;*********************************************************
;* MESS (Multi Emulator Super System) Win32 GEMUS Script *
;*                  (c) The GB64 Team                    *
;*                     3 May 2005                        *
;*********************************************************
;
; PLEASE SET YOUR EMULATOR PROPERTIES AS FOLLOWS:
;
; Emulator File: mess.exe
; Associated Script File (1): SC.EXE or SCMAIN.EXE (optional)
; Use Short Filenames: YES
; File Types: T64;P00;PRG;D64;CRT;80;90;A0;B0;C0;D0;E0;F0
;
; This script was written for MESS Win32 v0.96 beta,
; but may work with other Windows versions too.
;
; For all image types but ROM cartridge files,
; you must type RUN 1 or 2 times to boot the game (at a minimum).
;
; Emulator Website: http://www.mess.org
;
; The Star Commander (sc.exe or scmain.exe) is required as a script file
; to convert T64 files into PRG files.  T64s will not work without it.
;
; Games that should be rotated can set the rotate=x GEMUS key=value pair
; rotate=270 rotates right 90 degrees, rotate=90 rotates left
; rotate=180 turns the screen upsidedown (invert the x&y axes)
; rotate=flipx or fliph mirrors the screen left-to-right (invert x axis)
; rotate=flipy or flipv filps the screen top-to-bottob (invert y axis)
; Joysticks will probably need to be rotated or reconfigured for the rotation.
;
; If you have a disk game that comes on 2 or more disks
; and works with multiple drives, you can set a GEMUS
; key=value pair to auto insert the 2nd disk into
; MESS's drive 9.  Simply press F2 (in the main GB window)
; and enter: maxdrives=x (where x is the total disks >1)

If GameType CONTAINS(crt||80||90||a0||b0||c0||d0||e0||f0||p00||prg||t64||d64)

	;These are some extra options that can be used with MESS
	;-[no]dd : use Direct Draw (DirectX) rendering
	;Add_CLP( -dd)
	;-[no]nat : natural (PC) keyboard layout
	;Add_CLP( -nat)
	;-[no]max : set window to max height in windowed mode (overrides -r)
	;Add_CLP( -nomax)
	;do not write the config (ini) file on exit (will cause serious problems with -wc)
	;Add_CLP( -nowc)
	;-[no]d3d : use Direct3D hardware acceleration
	;Add_CLP( -d3d)
	;Snapshot save directory (screenshots save to \MESS\snap\*.png by default)
	;Add_CLP( -snapshot_directory C:\MESS\snap\)

	;-[no]w : use windowed mode (-now is fullscreen)
	Add_CLP( -w)

	;screen rotation for rotate=x GEMUS key=value pair
	If Key_rotate CONTAINS(*)
		Show_Message(The screen will be rotated [%rotate_value%].%crlfx2%Controls may need to be adjusted accordingly.)
	End If
	If Key_rotate CONTAINS(-270||90)
		Add_CLP( -ror)
	ElseIf Key_rotate CONTAINS(-90||270)
		Add_CLP( -rol)
	ElseIf Key_rotate CONTAINS(180||-180)
		Add_CLP( -flipx -flipy)
	ElseIf Key_rotate CONTAINS(flipx||fliph*||horiz*)
		Add_CLP( -flipx)
	ElseIf Key_rotate CONTAINS(flipy||flipv*||vert*)
		Add_CLP( -flipy)
	End If

	;-r wxh : set resolution to initial width w by height h in windowed mode
	Add_CLP( -r 640x480)

	;set the game controls (PC joystick in addition to JoyKey emulation)
	;These settings are designed to automatically set the controls for player 1
	;to the same controller (PC Joystick and Keyboard),
	;regardless of which PORT the game uses for player 1.
	;
	;Replace * with <DISABLED> to disable the automatic settings for the JoyPorts
	If %gamefile% CONTAINS(333)
		If Control = JoyPort1
			;enable PC joystick input
			Add_CLP( -joy)
		ElseIf Control = JoyPort2
			;enable PC joystick support
			Add_CLP( -joy)
		ElseIf Control = LightGun
			;no LightGun support for C64 yet
			Add_CLP( -gun)
		ElseIf %Control% CONTAINS(Mouse)
			;no auto Mouse support yet
			;setting options need to be figured out and set in the c64.cfg &c64pal.cfg files
			Add_CLP( -mouse)
		ElseIf %Control% CONTAINS(PaddlePort*)
			;no auto Paddle support yet
			;setting options need to be figured out and set in the c64.cfg &c64pal.cfg files
			Add_CLP( -mouse)
		Else
			;disable PC joystick input
			Add_CLP( -nojoy)
		End If
	End If

	;unsupported game controls
	If Control = Mouse
		Show_Message(This emulator does have some Mouse emulation,%crlf%but it is not automated yet in GameBase.%crlf%Set Port1 to Mouse in the Dip Switches menu.%crlfx2%This game may still be uncontrollable/unplayable.)
	ElseIf 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.)
	ElseIf Control = PaddlePort1
		Show_Message(This emulator does have some PaddlePort1 emulation,%crlf%but it is not automated yet in GameBase.%crlf%Set Paddle options in the Dip Switches & Analog Controls menus.%crlfx2%This game may still be uncontrollable/unplayable.)
	ElseIf Control = PaddlePort2
		Show_Message(This emulator does have some PaddlePort2 emulation,%crlf%but it is not automated yet in GameBase.%crlf%Set Paddle options in the Dip Switches & Analog Controls menus.%crlfx2%This game may still be uncontrollable/unplayable.)
	End If

	;do we want a PAL or NTSC setup?
	If PalNTSC = NTSC
		Add_CLP( c64)
		Set_CFG_Item(%emupath%\ini\c64.ini||quickload_dir||%tab%%tab%||%gamepath%\)
		Set_CFG_Item(%emupath%\ini\c64.ini||floppydisk_dir||%tab%%tab%||%gamepath%\|%gamepath%\)
		Set_CFG_Item(%emupath%\ini\c64.ini||cartridge_dir||%tab%%tab%||%gamepath%\|%gamepath%\)
		Set_CFG_Item(%emupath%\ini\c64.ini||keyboard_leds||%tab%%tab%||1)
	Else
		Add_CLP( c64pal)
		Set_CFG_Item(%emupath%\ini\c64pal.ini||quickload_dir||%tab%%tab%||%gamepath%\)
		Set_CFG_Item(%emupath%\ini\c64pal.ini||floppydisk_dir||%tab%%tab%||%gamepath%\|%gamepath%\)
		Set_CFG_Item(%emupath%\ini\c64pal.ini||cartridge_dir||%tab%%tab%||%gamepath%\|%gamepath%\)
		Set_CFG_Item(%emupath%\ini\c64pal.ini||keyboard_leds||%tab%%tab%||1)
	End If

	If GameType CONTAINS(t64)
		;use Star Commander to extract the main PRG file from the T64
		Run_Program(1||/cmd copy tape:%gamepathfile%\"%c64imagename%" %gamepath%\gbgame.prg||WAIT)
		Add_CLP( -quik "%gamepath%\gbgame.prg")
	End If

	If GameType CONTAINS(prg||p00)
		Add_CLP( -quik %gamepathfile%)
	End If

	If GameType CONTAINS(d64)
		Add_CLP( -flop %gamepathfile%)
		If %imageindex% CONTAINS(0)
			Show_Message(You must manually type:%crlfx2%LOAD"*",8,1%crlf%RUN)
		Else
			Show_Message(You must manually type:%crlfx2%LOAD"%c64imagename%",8,1%crlf%RUN)
		End If

		;for multiple disk images, assign disk 2 to drive 9
		If Key_maxdrives CONTAINS(*)
			If NumGameFiles > 1
				Add_CLP(|%gamepathfile(1)%)
			End If
		End If
	End If

	If GameType CONTAINS(crt||80|90|a0||b0||c0|d0||e0||f0)
		Add_CLP( -cart %gamepathfile%)
	End If


	;give the user a warning message?
	If VersionComment CONTAINS(*use C64S*||*use CCS*||*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 inforamtion/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

	;run the emulator
	Run_Emulator()

Else

	;invalid game file type
	Show_Message(GAME_NOT_SUPPORTED%crlfx2%Supported types: D64, PRG, P00, CRT, 80, 90, x0, (T64))

End If

sut
Cool Member
Cool Member
Location: Mansfield
Posts: 200
Joined: Thu Jul 20, 2006 5:15 pm

Fri Jul 21, 2006 9:47 pm

:shock:
Jees this is gonna be a tough one to work out!
sut
Cool Member
Cool Member
Location: Mansfield
Posts: 200
Joined: Thu Jul 20, 2006 5:15 pm

Sat Jul 22, 2006 5:41 pm

Yup looks like cannot run games directly from Gamebase, best I can achieve is to load the MESS gui and set that to display only the required system (in this case the Channel F)
Thanks for your help & any further tips will be welcome.
sut
Cool Member
Cool Member
Location: Mansfield
Posts: 200
Joined: Thu Jul 20, 2006 5:15 pm

Sun Jul 23, 2006 3:07 pm

Looked at Luspace frontend which gets MESS to go straight to the game and miss the gui. BUT it always loads the same rom image no matter which one you choose.
J2003C
GB64 Team
Location: Just South of Hell
Posts: 910
Joined: Fri Feb 14, 2003 7:57 pm

Wed Jul 26, 2006 7:30 pm

I wrote the MESS script. The script is designed to autoload the T64 images in GameBase if you configure the script to use Starcommander (sc.exe) as an associated script file. SC is needed to extract the PRG file from the T64 so MESS can autorun it. Disk image games (D64s) will not autoload in MESS.
-J2010C-
sut
Cool Member
Cool Member
Location: Mansfield
Posts: 200
Joined: Thu Jul 20, 2006 5:15 pm

Wed Aug 02, 2006 5:38 pm

Thanks for your reply, to be honest it's a bit over my head.

Have you wrote any other Mess Scripts for other systems ?
sut
Cool Member
Cool Member
Location: Mansfield
Posts: 200
Joined: Thu Jul 20, 2006 5:15 pm

Sun Nov 25, 2007 8:56 pm

OK we can now run MESS from command line (also try the LusSpace frontend - this now loads Mess straight to the game as of v1.17b).

"Heres an example of running MESS at the command line...

mess a2600 -cart c:\games\defender.a26 -now

This will run defender on an Atari 2600 using the full screen. As you can see it's not too hard once you've got over the amount of options available to you. If your brain is frazzled and you want an easier MESS use the GUI version as it's much easier to configure."

So my question is how do I convert this to a GEMUS script ?

Heres a Breakdown of what I think would work thusfar (please fill in the gaps).

mess = Run Emulator
a2600 -cart = *THIS IS WERE I NEED HELP*
c:\games\defender.a26 -now = Add_CLP(%gamepathfile%)

Look forward to your replies as this will now open the gate for older system Gamebases.
User avatar
Pugsy
GB64 Team
Contact:
Location: North Wales, UK
Posts: 594
Joined: Thu Feb 13, 2003 7:58 pm

Mon Nov 26, 2007 1:19 am

I do quite like MESS (even if it's c64 emulation is very ropey)... Try this (i've not tested it though - you should be able to see how it works and modify it if it doesn't)

Code: Select all

;***********************************
;*  MESS 0.121 A2600 GEMUS Script  *
;*        (c) The GB64 Team        *
;*        26 November 2006         *
;***********************************
;
; PLEASE SET YOUR EMULATOR PROPERTIES AS FOLLOWS:
;
; Emulator File:  MESS.EXE
; Associated File (1): MESS.INI
; Use Short Filenames: YES
; File Types:  BIN;A26;WAV
;
;
; The MESS.INI file if not present can be created by typing
; MESS -cc from the commandline. However, at the current time
; this script runs purely with commandline options so it's not
; needed.
;
; This MESS script is for A2600 only, it can be easily duplicated
; and modified for other platforms which is handy where MESS is
; currently the only emulator for some. Note for the purposes of
; this script all a26 files are taken as cartridge images, it is
; possible (though highly unlikely) that they maybe tape image 
; files in which case an extra check may have to be added


If GameType CONTAINS(bin||a26||wav)

	If PalNTSC != NTSC
		Add_CLP( a2600p )
	Else
		Add_CLP( a2600 )
	End If

	;Use the old UI as cheats will not work otherwise, the new UI also causes other problems
	Add_CLP( -nonewui )
	Add_CLP( -cheat )

	If GameType CONTAINS(bin||a26)
		Add_CLP( -cart )
	Else
		Add_CLP( -cass )
	End If

	;give the user a warning message?
	If VersionComment CONTAINS(*not 100%*||*not working*)
		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

	;run the emulator
	Add_CLP("%gamepathfile%")
	;delete the following line - left in for debug purposes
	Edit_CLP(message)
	Run_Emulator()

Else

	;invalid game file type
	Show_Message(GAME_NOT_SUPPORTED%crlfx2%Supported types: BIN, A26, WAV)

End If
Gamebase64 Team Member http://www.gamebase64.com
Ex-freelance cheat listing/pokes contributer to Zzap, CF, CU & ACE
MAME Cheat File Maintainer http://www.mamecheat.co.uk
User avatar
Pugsy
GB64 Team
Contact:
Location: North Wales, UK
Posts: 594
Joined: Thu Feb 13, 2003 7:58 pm

Mon Nov 26, 2007 1:29 am

BTW, the bit about T64s not working in MESS mentioned in the script posted last year is no longer strictly true I added preliminary T64 support to MESS a few months back which means that a large percentage of gb64 t64s should work hopefully - it's not ideal though as T64 is an abortion of a format.

http://mess.dorando.at/svn/?rev=910
Gamebase64 Team Member http://www.gamebase64.com
Ex-freelance cheat listing/pokes contributer to Zzap, CF, CU & ACE
MAME Cheat File Maintainer http://www.mamecheat.co.uk
sut
Cool Member
Cool Member
Location: Mansfield
Posts: 200
Joined: Thu Jul 20, 2006 5:15 pm

Mon Nov 26, 2007 10:14 pm

Many many thanks.

I really appreciate your work.

I can now complete my Channel F Gamebase I've been working on for almost a year :D

Your name will be in the credits!

Again thanks.
sut
Cool Member
Cool Member
Location: Mansfield
Posts: 200
Joined: Thu Jul 20, 2006 5:15 pm

Mon Nov 26, 2007 10:57 pm

OK thanks to Pugsy for the GEMUS Script I have now completed my Channel F Gamebase.

You can download it from here:


http://rapidshare.com/files/72508954/Ga ... _.rar.html

Return to “The GameBase Frontend”

Who is online

Users browsing this forum: No registered users and 6 guests