Spectaculator Script

Discuss the ZX Spectrum database that uses the GameBase Frontend.

Moderators: Jimbo, Paul Thompson, hillelr

millansoft
Keen Member
Keen Member
Posts: 60
Joined: Tue Jun 26, 2012 5:47 am

Spectaculator Script

Fri Sep 13, 2013 3:30 am

Hello,

I wanted to do a script for Spectaculator, so when it opens the emulator, it opens with the model (48k/128k/+3a) that support the game, to avoid crashes with some games, but I can't find any command line switch for Spectaculator, anyone knows if Spectaculator has command line switchs parameters?
User avatar
.mad.
Highly Commended Member
Highly Commended Member
Location: Lancashire
Posts: 1598
Joined: Sun Jun 19, 2005 3:30 pm

Fri Sep 13, 2013 6:40 pm

no it doesn't have a command-line.
it saves the last machine setting used to the registry.

Code: Select all

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\spectaculator.com\Spectaculator\Settings]
"Show Welcome Dlg"=dword:00000000
"Show Exit Dlg"=dword:00000000
"Show Reset Dlg"=dword:00000000
"Mimic TV Screen"=dword:00000000
"Border Type"=dword:00000000
"Mute Sound"=dword:00000000
"Full Screen"=dword:00000000
"Width"=dword:000001a2
"Height"=dword:0000013f
"Left"=dword:00000232
"Top"=dword:000000fd
"Model v6+"=dword:00000002
"CPU Model"=dword:00000001
"CPU Speed"=dword:00000001
"Break On Unhandled"=dword:00000000
"48k ROM"=""
"128k ROM"=""
"Plus 2 ROM"=""
"Plus 2A ROM"=""
"Pentagon ROM"=""
"Scorpion ROM"=""
"Quick Save Folder"=""
"Toolbar"=dword:00000001
"StatusBar"=dword:00000001
"Use Ctrl Key"=dword:00000001
Machine settings
---------------------------------------------
16k - "Model v6+"=dword:00000000
48k - "Model v6+"=dword:00000001
128k - "Model v6+"=dword:00000002
+2 - "Model v6+"=dword:00000003
+2A - "Model v6+"=dword:00000004
+3 - "Model v6+"=dword:00000005
Pentagon - "Model v6+"=dword:00000006
Scorpion - "Model v6+"=dword:00000007
-----------------------------------------------

you need to make batch files for all the machines, so the settings can be imported into the REG before running the emulator from the script.


48k.reg

Code: Select all

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\spectaculator.com\Spectaculator\Settings]
"Model v6+"=dword:00000001
48k.bat

Code: Select all

reg import 48k.reg

128k.reg

Code: Select all

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\spectaculator.com\Spectaculator\Settings]
"Model v6+"=dword:00000002
128k.bat

Code: Select all

reg import 128k.reg
script.txt

Code: Select all

If Key_machine contains(128k)
Run_Program(%emupath%\scripts\128k.bat||||WAIT)

Else
Run_Program(%emupath%\scripts\48k.bat||||WAIT)
End If

	Add_CLP(%gamepathfile%)
	Run_Emulator()
Last edited by .mad. on Fri Oct 04, 2013 5:39 pm, edited 1 time in total.
millansoft
Keen Member
Keen Member
Posts: 60
Joined: Tue Jun 26, 2012 5:47 am

Sun Sep 15, 2013 4:14 pm

Thank you .mad., awesome as always :)
dax
Ice Cool Member
Ice Cool Member
Location: Poland
Posts: 687
Joined: Tue Sep 04, 2007 1:45 pm

Fri Oct 04, 2013 7:48 am

I've tested it and I have a message "Too many IF statements". Do You know what can be wrong, mad ? :P
I love Gamebase's creators and compilations
User avatar
.mad.
Highly Commended Member
Highly Commended Member
Location: Lancashire
Posts: 1598
Joined: Sun Jun 19, 2005 3:30 pm

Fri Oct 04, 2013 5:44 pm

updated!

Every IF needs an END IF.

just add the "END IF" to the bottom of the script.

This might not work in Win7, but i does in XP.
dax
Ice Cool Member
Ice Cool Member
Location: Poland
Posts: 687
Joined: Tue Sep 04, 2007 1:45 pm

Sat Oct 05, 2013 11:47 am

No errors now, but machine model does not change to 128k. Where are "Key_machine" entries ? Asking because I want to change it manually to force running emulator in 128k mode for some games.
I love Gamebase's creators and compilations
User avatar
.mad.
Highly Commended Member
Highly Commended Member
Location: Lancashire
Posts: 1598
Joined: Sun Jun 19, 2005 3:30 pm

Sat Oct 05, 2013 1:35 pm

i only just made the script, so the settings won't be in YOUR gamebase.mdb file.

you will need to add them manually, for each 128k game.

1) open your gamebase and select a 128k game from the list.

2) press F2 to open GEMUS window.

in the left window type...

machine=128k

then click OK to save the setting.

3) run game.


this can be a simple copy and paste job in access. :wink:

to see if it works
run the 128k.bat, then run spectaculator.
see if machine is 128k
quit

run 48k.bat, then run spectaculator.
see if machine is 48k.

*the bat and reg files must be in the same directory.
dax
Ice Cool Member
Ice Cool Member
Location: Poland
Posts: 687
Joined: Tue Sep 04, 2007 1:45 pm

Sat Oct 05, 2013 5:39 pm

Used Quick Filter to find 455 games with "128" phrase (Speccymania v3.5). So I'm doing it.... :P
I love Gamebase's creators and compilations
User avatar
.mad.
Highly Commended Member
Highly Commended Member
Location: Lancashire
Posts: 1598
Joined: Sun Jun 19, 2005 3:30 pm

Sun Oct 06, 2013 7:01 am

i have also done that! :P

a lot of 128k games need a TRDOS machine others need a +3 disk drive.
so i have updated the reg and script settings for those as well.

it's a bit flakey. But that's probably down to the AV /firewall freaking out, while i poke around with the REG.
dax
Ice Cool Member
Ice Cool Member
Location: Poland
Posts: 687
Joined: Tue Sep 04, 2007 1:45 pm

Sat Nov 02, 2013 2:32 pm

Can You upload Your modified files, .mad. ?
I love Gamebase's creators and compilations

Return to “Sinclair ZX Spectrum - GameBaseZX”

Who is online

Users browsing this forum: No registered users and 0 guests