Jump to content

bezel setup with american laser games


craiganderson

Recommended Posts

hello

i have successfully added bezel support to a few modules that previously did not have it

acorn bbc micro

alice

acorn electron

now im trying to add it to american laser games

any different setup for this system?

not your typical system

anybody have it set up?

thanks

craig

Link to comment
Share on other sites

hello

i have successfully added bezel support to a few modules that previously did not have it

acorn bbc micro

alice

acorn electron

now im trying to add it to american laser games

any different setup for this system?

not your typical system

anybody have it set up?

thanks

craig

Craig,

After reading your post. Got me thinking. So, I changed the module and created a bezel for Daphne (since they are basically the same emu). It works. So I made the same changes to the Daphne-Singe module and copied the bezel and ini over there. Tested and it works as well. Here are the screens of the emu launching:

Daphne:

post-48498-142870633515_thumb.jpg

Daphne-Singe:

post-48498-142870633531_thumb.jpg

So, this is how I did it.

I took the default Daphne fade background. Re-sized it to my actual monitor resolution (1680x1050). Figured the size of the emu window and set it to 1280x1024 in the Module Settings. Disabled Full Screen there also. Cropped out a transparent block out of the center of the graphic that measures exactly the size of the emu window. Created the bezel ini to match.

Last step, modified the Daphne and Daphne-Singe module to have bezel functionality. Fired up the emu and it works sweet!!! If anyone would like to duplicate this on their setup, I'd be glad to create a thread.

Thanks,

Ron

Link to comment
Share on other sites

Nice Ron.

Just a few tips so you know a little bit more about the bezel things.

You didn't need to disable fullscreen. If bezel is enabled, and the module supports it, the bezel code will always force the windowed mode. This will always work as long as the module has the option to switch between fullscreen and windowed mode. Making this the first requirement to an offical module that should support bezels.

One question, did you tested if launching a game on daphne or singe, if you can resize the game window dragging its border and the game resizes its resolution to fit the window? If the answer is yes, you already have a perfectly compatible bezel implementation on your modified module and adding the changes to the official module will not be difficult.

If the answer is no, them some additional work must be done to assure that the module will work on any user computer and under any resolution.

Unfortunetly I cannot take a look at the modules right now, but as soon as I can I will add the bezel support for the official modules.

Nicely done you two.

Just remenber that if you want the changes to be applied to the official modules, you need to have the fullscreen option on the module, and to test if the screen resizes (that confirms that the bezel normal mode will work nicely).

Link to comment
Share on other sites

Nice Ron.

Just a few tips so you know a little bit more about the bezel things.

You didn't need to disable fullscreen. If bezel is enabled, and the module supports it, the bezel code will always force the windowed mode. This will always work as long as the module has the option to switch between fullscreen and windowed mode. Making this the first requirement to an offical module that should support bezels.

One question, did you tested if launching a game on daphne or singe, if you can resize the game window dragging its border and the game resizes its resolution to fit the window? If the answer is yes, you already have a perfectly compatible bezel implementation on your modified module and adding the changes to the official module will not be difficult.

If the answer is no, them some additional work must be done to assure that the module will work on any user computer and under any resolution.

Unfortunetly I cannot take a look at the modules right now, but as soon as I can I will add the bezel support for the official modules.

Nicely done you two.

Just remenber that if you want the changes to be applied to the official modules, you need to have the fullscreen option on the module, and to test if the screen resizes (that confirms that the bezel normal mode will work nicely).

Bleasby,

Thank you. I messed with this before I had a better understanding of bezels and how they worked. I could not get it to display the bezel at all unless I disabled full screen. Even if the system had Bezels - Enabled.

I tested both Daphne and Daphne-Singe. They both work with the same bezel and the same settings. Neither will allow a resize of the window.

In fact, if you specify anything other than a 4x3 aspect, it will fill the screen with black bars. If you add -ignore_aspect_ratio it will stretch to the specified screen size, but it's still not resizable. But, if you create the bezel with a specified opening and set the emu resolution to that size. It seems to work just fine. I'm sure with someone that knows how these modules interact with everything else, they could be setup to scale the emu window inside any opening. Just like the official modules do. ;) (hint, hint)

So, that all said. Maybe someone can modify the module to add official bezel support. I would be grateful to see that happen and to test/use it myself. In the mean time, I'll use the crappy bezel I hacked together. ;)

Thanks,

Ron

Link to comment
Share on other sites

Bleasby,

Thank you. I messed with this before I had a better understanding of bezels and how they worked. I could not get it to display the bezel at all unless I disabled full screen. Even if the system had Bezels - Enabled.

Ok, this means that the module does set fullscreen mode, but does not set the emulator to run in windowed mode. This must be changed for a official bezel support.

I tested both Daphne and Daphne-Singe. They both work with the same bezel and the same settings. Neither will allow a resize of the window.

This means that the fixResMode should be used, except if there is some emulator config file were we could set the reolution prior to the emu launch. Do you know if there is such config option on some file on the daphne emulator folder? And if it exists, it works with any 4:3 resolution that you place over there?

In fact, if you specify anything other than a 4x3 aspect, it will fill the screen with black bars. If you add -ignore_aspect_ratio it will stretch to the specified screen size, but it's still not resizable. But, if you create the bezel with a specified opening and set the emu resolution to that size. It seems to work just fine. I'm sure with someone that knows how these modules interact with everything else, they could be setup to scale the emu window inside any opening. Just like the official modules do. ;) (hint, hint)

That is the point. Things will work for others as long as they have the same resolution and files that you have by the way things are right now. If things change, the bezel will not work. I will need to take a more careful look in order to add the official support for that.

So, that all said. Maybe someone can modify the module to add official bezel support. I would be grateful to see that happen and to test/use it myself. In the mean time, I'll use the crappy bezel I hacked together. ;)

It is not crappy at all. If it works for you it is perfect. :) Just need to be carefull to not release this as it will not work to everybody and people will satrt complaining. By the way, could you share your bezel creatios with me? I would be very glad to test things using your bezels.

Link to comment
Share on other sites

Ok, this means that the module does set fullscreen mode, but does not set the emulator to run in windowed mode. This must be changed for a official bezel support.

In the module, if you set it to fullscreen - false, it runs in windowed mode.

This means that the fixResMode should be used, except if there is some emulator config file were we could set the reolution prior to the emu launch. Do you know if there is such config option on some file on the daphne emulator folder? And if it exists, it works with any 4:3 resolution that you place over there?

Ok, but you can pass the variable -ignore_aspect_ratio and set the resolution in the current module and it will launch windowed, stretched to fit the resolution you set. That tells me that someone can read the bezel ini and make the windowed emulator screen fit inside any bezel. Right?

That is the point. Things will work for others as long as they have the same resolution and files that you have by the way things are right now. If things change, the bezel will not work. I will need to take a more careful look in order to add the official support for that.

Ok, so a little tinkering I did to the official module. I just don't know how to set the screen size based on the current resolution and bezel opening. The ahk below I added the Bezel() entries to make the bezel show and close. I added the IniReadCheck for BezelEnable. Then set, if the fullscreen is flase, set the fullscreen variable to "-ignore_aspect_ratio".

In the isd, I just added BezelEnable true or false.

AHK:

MEmu = Daphne
MEmuV =  v1.0.12
MURL = http://www.daphne-emu.com/
MAuthor = djvj
MVersion = 2.0.4
MCRC = F62539E6
iCRC = C777A9D
MID = 635038268879753802
MSystem = "Daphne","LaserDisc"
;----------------------------------------------------------------------------
; Notes:
; Executable should be Daphne.exe NOT Daphneloader.exe
; You need the module's ini from GIT, remove the (Example) from the filename. It has settings for each game so they work properly.
; If you want to define custom controls for each game, follow this process:
; 1) Manually run DaphneLoader.exe
; 2) Select each game you want to configure and click the Configure button. Select the Input tab and define your controls and hit OK and repeat for each game.
; 3) Create a folder in your emu directory called "controls" and copy your current dapinput.ini into it. This will be your default controls used for all games that a custom one was not created.
; 4) Launch each game you defined controls for through DaphneLoader. DaphneLoader will set your custom controls in the dapinput.ini. Now exit the game.
; 5) After each game you launch, copy the dapinput.ini into the controls folder and name it after the rom name you use in your xml: Example: lair.ini
;
; First time users, please follow the guide found @ http://www.hyperspin-fe.com/forum/showthread.php?29410-Complete-Guide-for-Daphne-in-HyperSpin-and-RL
;----------------------------------------------------------------------------
StartModule()
BezelGUI()
FadeInStart()
BezelStart()

settingsFile := modulePath . "\" . moduleName . ".ini"
globalParams := IniReadCheck(settingsFile,"settings","globalParams","vldp -blank_searches -prefer_samples -noissues -opengl -fastboot",,1)
fullscreen := IniReadCheck(settingsFile, "Settings", "Fullscreen","true",,1)
screenWidth := IniReadCheck(settingsFile, "Settings", "ScreenWidth",A_ScreenWidth,,1)
screenHeight := IniReadCheck(settingsFile, "Settings", "ScreenHeight",A_ScreenHeight,,1)
pauseOnExit := IniReadCheck(settingsFile,"settings","pauseOnExit","false",,1)
bezelEnable := IniReadCheck(settingsFile,"settings","BezelEnable","false",,1)
min_seek_delay := IniReadCheck(settingsFile,romName,"min_seek_delay",A_Space,,1)
seek_frames_per_ms := IniReadCheck(settingsFile,romName,"seek_frames_per_ms",A_Space,,1)
homedir := IniReadCheck(settingsFile,romName,"homedir",".",,1)
bank0 := IniReadCheck(settingsFile,romName,"bank0",A_Space,,1)
bank1 := IniReadCheck(settingsFile,romName,"bank1",A_Space,,1)
bank2 := IniReadCheck(settingsFile,romName,"bank2",A_Space,,1)
bank3 := IniReadCheck(settingsFile,romName,"bank3",A_Space,,1)
sound_buffer := IniReadCheck(settingsFile,romName,"sound_buffer",A_Space,,1)
params := IniReadCheck(settingsFile,romName,"params",A_Space,,1)
version := IniReadCheck(settingsFile,romName,"version",romName,,1)

frameFile = %romName% ; storing parent romName to send as the framefile name so we don't send wrong name when using an alternate version of a game

fullscreen := If fullscreen = "true" ? "-fullscreen" : "-ignore_aspect_ratio"

; In here needs to be the section where it changes the below screenWidth & screenHeight based on the bezel ini and screen size?

screenWidth := "-x " . screenWidth
screenHeight := "-y " . screenHeight

; The above section.

min_seek_delay := If min_seek_delay ? "-min_seek_delay " . min_seek_delay : ""
seek_frames_per_ms := If seek_frames_per_ms ? "-seek_frames_per_ms " . seek_frames_per_ms : ""
homedir := If homedir ? "-homedir " . homedir : ""
bank0 := If bank0 ? "-bank 0 " . bank0 : ""
bank1 := If bank1 ? "-bank 1 " . bank1 : ""
bank2 := If bank2 ? "-bank 2 " . bank2 : ""
bank3 := If bank3 ? "-bank 3 " . bank3 : ""
sound_buffer := If sound_buffer ? "-sound_buffer " . sound_buffer : ""
params := globalParams . " " . params

7z(romPath, romName, romExtension, 7zExtractPath)

; If you have alternate controls for a specific game, this will overwrite the current dapinput.ini with your custom one
romControlIni := emuPath . "\controls\" . romName . ".ini"
defaultControlIni := emuPath . "\controls\dapinput.ini"
daphneControlIni := emuPath . "\dapinput.ini"
If FileExist(romControlIni) {	; if a romName control ini exists
Log("Module - Found a romName input ini and will overwrite the existing dapinput.ini: " . romControlIni)
FileCopy, %romControlIni%, %daphneControlIni%, 1	; copy rom dapinput, overwriting working one
} Else If FileExist(defaultControlIni) {	; if a default control ini exists
Log("Module - No romName input ini found, overwriting the current dapinput.ini with a default one: " . defaultControlIni)
FileCopy, %defaultControlIni%, %daphneControlIni%, 1	; copy default dapinput, overwriting working one in case a rom one was set from previous launch
} Else
Log("Module - No romName or default inis found, leaving the current dapinput.ini alone")

; If launched game is an alternate version of a parent, this will send the alternate's name to daphne.
romName = %version%

; This allows us to send variables, that when empty, are not sent to the Run command
; msgbox % executable . A_Space . romName . A_Space . params . A_Space . fullscreen . A_Space . screenWidth . A_Space . screenHeight . A_Space . min_seek_delay . A_Space . seek_frames_per_ms . A_Space . homedir . A_Space . bank0 . A_Space . bank1 . A_Space . bank2 . A_Space . bank3 . A_Space . sound_buffer . A_Space . "-framefile """ . romPath . "\" . frameFile . romExtension . """"
Run(executable . A_Space . romName . A_Space . params . A_Space . fullscreen . A_Space . screenWidth . A_Space . screenHeight . A_Space . min_seek_delay . A_Space . seek_frames_per_ms . A_Space . homedir . A_Space . bank0 . A_Space . bank1 . A_Space . bank2 . A_Space . bank3 . A_Space . sound_buffer . A_Space . "-framefile """ . romPath . "\" . frameFile . romExtension . """", emuPath)

WinWait("ahk_class SDL_app")
BezelDraw()
WinWaitActive("ahk_class SDL_app")

FadeInExit()
Process("WaitClose", executable)
7zCleanUp()
FadeOutExit()
ExitModule()


HaltEmu:
Send, {P}
Return
RestoreEmu:
Winrestore, AHK_class %EmulatorClass%
Send, {P}
Return

CloseProcess:
FadeOutStart()
BezelExit()
If pauseOnExit = true
{	Send, {P}
	Sleep, 100
}
WinClose("ahk_class SDL_app")
Return

ISD:

<?xml version="1.0" encoding="UTF-8"?>
<INISCHEMA>
<INIFILES>
	<INIFILE name="%ModuleName%" required="true">
		<INITYPE>Module</INITYPE>
		<SECTIONS>
			<SECTION name="settings" required="true">
				<SECTIONTYPE>Global</SECTIONTYPE>
				<KEYS>
					<KEY name="globalParams" required="true" nullable="false">
						<KEYTYPE>String</KEYTYPE>
						<DESCRIPTION># -noissues is for Esh's Aurunmilla. It stops daphne's warning about issues at launch.
# -fastboot is for Dragon's Lair and Space Ace, It skips the self test in the beginning.</DESCRIPTION>
					</KEY>
					<KEY name="Fullscreen" required="false" nullable="false">
						<KEYTYPE>Boolean</KEYTYPE>
						<DESCRIPTION>Enables/Disables Fullscreen</DESCRIPTION>
					</KEY>
					<KEY name="BezelEnable" required="false" nullable="false">
						<KEYTYPE>Boolean</KEYTYPE>
						<DESCRIPTION>Enables/Disables bezle support</DESCRIPTION>
					</KEY>
					<KEY name="ScreenWidth" required="false" nullable="true">
						<KEYTYPE>Integer</KEYTYPE>
						<DESCRIPTION>Set the width of the emu. Default is your desktop width.</DESCRIPTION>
					</KEY>
					<KEY name="ScreenHeight" required="false" nullable="true">
						<KEYTYPE>Integer</KEYTYPE>
						<DESCRIPTION>Set the height of the emu. Default is your desktop height.</DESCRIPTION>
					</KEY>
					<KEY name="pauseOnExit" required="true" nullable="false">
						<KEYTYPE>Boolean</KEYTYPE>
						<DESCRIPTION>If true, will pause Daphne before exiting by sending "P". If your monitor is not the same resolution as daphne, Fade_Out will not display correctly. Pausing Daphne tries to prevent this.</DESCRIPTION>
					</KEY>
				</KEYS>
			</SECTION>
			<SECTION name="%RomName%" required="false">
				<SECTIONTYPE>Rom</SECTIONTYPE>
				<KEYS>
					<KEY name="min_seek_delay" required="false" nullable="true">
						<KEYTYPE>Integer</KEYTYPE>
					</KEY>
					<KEY name="seek_frames_per_ms" required="false" nullable="true">
						<KEYTYPE>Integer</KEYTYPE>
					</KEY>
					<KEY name="homedir" required="false" nullable="true">
						<KEYTYPE>String</KEYTYPE>
					</KEY>
					<KEY name="bank0" required="false" minLength="8" maxLength="8">
						<KEYTYPE>Binary</KEYTYPE>
					</KEY>
					<KEY name="bank1" required="false" minLength="8" maxLength="8">
						<KEYTYPE>Binary</KEYTYPE>
					</KEY>
					<KEY name="bank2" required="false" minLength="8" maxLength="8">
						<KEYTYPE>Binary</KEYTYPE>
					</KEY>
					<KEY name="bank3" required="false" minLength="8" maxLength="8">
						<KEYTYPE>Binary</KEYTYPE>
					</KEY>
					<KEY name="sound_buffer" required="false" nullable="true">
						<KEYTYPE>Integer</KEYTYPE>
					</KEY>
					<KEY name="params" required="false" nullable="true">
						<KEYTYPE>String</KEYTYPE>
					</KEY>
					<KEY name="version" required="false">
						<KEYTYPE>String</KEYTYPE>
						<DESCRIPTION>Use this if you want to use a different rom for this version of the game. Useful if you want to have several entries for the same game with different settings in your database.</DESCRIPTION>
						<VALUES>
							<VALUE>ace</VALUE>
							<VALUE>ace_a</VALUE>
							<VALUE>ace_a2</VALUE>
							<VALUE>ace91</VALUE>
							<VALUE>aceeuro</VALUE>
							<VALUE>astron</VALUE>
							<VALUE>astronp</VALUE>
							<VALUE>badlandp</VALUE>
							<VALUE>badlands</VALUE>
							<VALUE>bega</VALUE>
							<VALUE>begar1</VALUE>
							<VALUE>blazer</VALUE>
							<VALUE>cliff</VALUE>
							<VALUE>cliffalt</VALUE>
							<VALUE>cobra</VALUE>
							<VALUE>cobraab</VALUE>
							<VALUE>cobraconv</VALUE>
							<VALUE>cobram3</VALUE>
							<VALUE>dle11</VALUE>
							<VALUE>dle21</VALUE>
							<VALUE>dle21</VALUE>
							<VALUE>esh</VALUE>
							<VALUE>eshalt</VALUE>
							<VALUE>eshalt2</VALUE>
							<VALUE>galaxy</VALUE>
							<VALUE>galaxyp</VALUE>
							<VALUE>gpworld</VALUE>
							<VALUE>interstellar</VALUE>
							<VALUE>lair</VALUE>
							<VALUE>lair_a</VALUE>
							<VALUE>lair_b</VALUE>
							<VALUE>lair_c</VALUE>
							<VALUE>lair_d</VALUE>
							<VALUE>lair_e</VALUE>
							<VALUE>lair_f</VALUE>
							<VALUE>lair_ita</VALUE>
							<VALUE>lair_n1</VALUE>
							<VALUE>lair_x</VALUE>
							<VALUE>lair2</VALUE>
							<VALUE>lair2_211</VALUE>
							<VALUE>lair2_300</VALUE>
							<VALUE>lair2_314</VALUE>
							<VALUE>lair2_315</VALUE>
							<VALUE>lair2_316_euro</VALUE>
							<VALUE>lair2_318</VALUE>
							<VALUE>lair2_318</VALUE>
							<VALUE>lair2_319_euro</VALUE>
							<VALUE>lair2_319_span</VALUE>
							<VALUE>laireuro</VALUE>
							<VALUE>mach3</VALUE>
							<VALUE>roadblaster</VALUE>
							<VALUE>sae</VALUE>
							<VALUE>sdq</VALUE>
							<VALUE>sdqshort</VALUE>
							<VALUE>sdqshortalt</VALUE>
							<VALUE>tq</VALUE>
							<VALUE>tq_alt</VALUE>
							<VALUE>tq_swear</VALUE>
							<VALUE>uvt</VALUE>
						</VALUES>
					</KEY>
				</KEYS>
			</SECTION>
		</SECTIONS>
	</INIFILE>
</INIFILES>
</INISCHEMA>

The above code does not work yet. Please don't use it!

It is not crappy at all. If it works for you it is perfect. :) Just need to be carefull to not release this as it will not work to everybody and people will satrt complaining. By the way, could you share your bezel creatios with me? I would be very glad to test things using your bezels.

Understood. Is why I said, I'll show them how I did it for my screen size and my setup. ;)

Thanks,

Ron

Link to comment
Share on other sites

In the module, if you set it to fullscreen - false, it runs in windowed mode.

Ok, Seing your module the problem is more clear now. The Bezel Start line must be always after the fullscreen ini read, and always before the fullscreen code, so you should place it before the bellow line for example:

BezelStart()
fullscreen := If fullscreen = "true" ? "-fullscreen" : ""

That way, the bezel start function will force the windowed mode if bezel is enabled.

Ok, but you can pass the variable -ignore_aspect_ratio and set the resolution in the current module and it will launch windowed, stretched to fit the resolution you set. That tells me that someone can read the bezel ini and make the windowed emulator screen fit inside any bezel. Right?

Right, you are going to need some code for that. What do you want to do is to define the screenWidth and screenHeight variables for fitting the bezel screen area, if bezel is enabled. You want also to force the ignore aspect ratio on that case, and the best way to do it is to add it to the parameters if there is a bezel. So you are going to need to change these lines:

screenWidth := "-x " . screenWidth
screenHeight := "-y " . screenHeight

to something like that:

if bezelPath   ; this variable is only filled if bezel is enabled and a valid bezel image is found
{
       params:= params . " -ignore_aspect_ratio"
screenWidth := "-x " . Round(bezelScreenWidth)  ;bezelScreenWidth variable is defined on the BezelStart function and it gives the desired width that your game screen should have while using this bezel 
screenHeight := "-y " . Round(bezelScreenHeight) ;idem above
} else {
screenWidth := "-x " . screenWidth
screenHeight := "-y " . screenHeight  
} 

I added the IniReadCheck for BezelEnable.

Don't add the bezelEnable variable on the module. Just remove that line. This option is handled by hyperlaunch directly.

Try to see if you get somewhere with my suggestions. If you have any doubts, just write it here, and we will walkthrough them untill we have a perfectly good bezel support implemented.

As I said before, unfortunetly I cannot test anything right now, but it seams that you are taking the correct path on most of the things, and also this could serve to others that wants to add bezel support on the correct way to any other module.

Link to comment
Share on other sites

Ok, Seing your module the problem is more clear now. The Bezel Start line must be always after the fullscreen ini read, and always before the fullscreen code, so you should place it before the bellow line for example:

BezelStart()
fullscreen := If fullscreen = "true" ? "-fullscreen" : ""

That way, the bezel start function will force the windowed mode if bezel is enabled.

Right, you are going to need some code for that. What do you want to do is to define the screenWidth and screenHeight variables for fitting the bezel screen area, if bezel is enabled. You want also to force the ignore aspect ratio on that case, and the best way to do it is to add it to the parameters if there is a bezel. So you are going to need to change these lines:

screenWidth := "-x " . screenWidth
screenHeight := "-y " . screenHeight

to something like that:

if bezelPath   ; this variable is only filled if bezel is enabled and a valid bezel image is found
   {
       params:= params . " -ignore_aspect_ratio"
   screenWidth := "-x " . Round(bezelScreenWidth)  ;bezelScreenWidth variable is defined on the BezelStart function and it gives the desired width that your game screen should have while using this bezel 
   screenHeight := "-y " . Round(bezelScreenHeight) ;idem above
} else {
   screenWidth := "-x " . screenWidth
   screenHeight := "-y " . screenHeight  
} 

Don't add the bezelEnable variable on the module. Just remove that line. This option is handled by hyperlaunch directly.

Try to see if you get somewhere with my suggestions. If you have any doubts, just write it here, and we will walkthrough them untill we have a perfectly good bezel support implemented.

As I said before, unfortunetly I cannot test anything right now, but it seams that you are taking the correct path on most of the things, and also this could serve to others that wants to add bezel support on the correct way to any other module.

Hells yea!!! Works like a dream.

I restored the isd back to the way it was (the official isd). Here is the working ahk:

MEmu = Daphne
MEmuV =  v1.0.12
MURL = http://www.daphne-emu.com/
MAuthor = djvj
MVersion = 2.0.4
MCRC = F62539E6
iCRC = C777A9D
MID = 635038268879753802
MSystem = "Daphne","LaserDisc"
;----------------------------------------------------------------------------
; Notes:
; Executable should be Daphne.exe NOT Daphneloader.exe
; You need the module's ini from GIT, remove the (Example) from the filename. It has settings for each game so they work properly.
; If you want to define custom controls for each game, follow this process:
; 1) Manually run DaphneLoader.exe
; 2) Select each game you want to configure and click the Configure button. Select the Input tab and define your controls and hit OK and repeat for each game.
; 3) Create a folder in your emu directory called "controls" and copy your current dapinput.ini into it. This will be your default controls used for all games that a custom one was not created.
; 4) Launch each game you defined controls for through DaphneLoader. DaphneLoader will set your custom controls in the dapinput.ini. Now exit the game.
; 5) After each game you launch, copy the dapinput.ini into the controls folder and name it after the rom name you use in your xml: Example: lair.ini
;
; First time users, please follow the guide found @ http://www.hyperspin-fe.com/forum/showthread.php?29410-Complete-Guide-for-Daphne-in-HyperSpin-and-RL
;----------------------------------------------------------------------------
StartModule()
BezelGUI()
FadeInStart()

settingsFile := modulePath . "\" . moduleName . ".ini"
globalParams := IniReadCheck(settingsFile,"settings","globalParams","vldp -blank_searches -prefer_samples -noissues -opengl -fastboot",,1)
fullscreen := IniReadCheck(settingsFile, "Settings", "Fullscreen","true",,1)
screenWidth := IniReadCheck(settingsFile, "Settings", "ScreenWidth",A_ScreenWidth,,1)
screenHeight := IniReadCheck(settingsFile, "Settings", "ScreenHeight",A_ScreenHeight,,1)
pauseOnExit := IniReadCheck(settingsFile,"settings","pauseOnExit","false",,1)
min_seek_delay := IniReadCheck(settingsFile,romName,"min_seek_delay",A_Space,,1)
seek_frames_per_ms := IniReadCheck(settingsFile,romName,"seek_frames_per_ms",A_Space,,1)
homedir := IniReadCheck(settingsFile,romName,"homedir",".",,1)
bank0 := IniReadCheck(settingsFile,romName,"bank0",A_Space,,1)
bank1 := IniReadCheck(settingsFile,romName,"bank1",A_Space,,1)
bank2 := IniReadCheck(settingsFile,romName,"bank2",A_Space,,1)
bank3 := IniReadCheck(settingsFile,romName,"bank3",A_Space,,1)
sound_buffer := IniReadCheck(settingsFile,romName,"sound_buffer",A_Space,,1)
params := IniReadCheck(settingsFile,romName,"params",A_Space,,1)
version := IniReadCheck(settingsFile,romName,"version",romName,,1)

frameFile = %romName% ; storing parent romName to send as the framefile name so we don't send wrong name when using an alternate version of a game

BezelStart()
fullscreen := If fullscreen = "true" ? "-fullscreen" : ""

if bezelPath   ; this variable is only filled if bezel is enabled and a valid bezel image is found
   {
       params:= params . " -ignore_aspect_ratio"
   screenWidth := "-x " . Round(bezelScreenWidth)  ;bezelScreenWidth variable is defined on the BezelStart function and it gives the desired width that your game screen should have while using this bezel 
   screenHeight := "-y " . Round(bezelScreenHeight) ;idem above
   } else {
   screenWidth := "-x " . screenWidth
   screenHeight := "-y " . screenHeight  
   }

min_seek_delay := If min_seek_delay ? "-min_seek_delay " . min_seek_delay : ""
seek_frames_per_ms := If seek_frames_per_ms ? "-seek_frames_per_ms " . seek_frames_per_ms : ""
homedir := If homedir ? "-homedir " . homedir : ""
bank0 := If bank0 ? "-bank 0 " . bank0 : ""
bank1 := If bank1 ? "-bank 1 " . bank1 : ""
bank2 := If bank2 ? "-bank 2 " . bank2 : ""
bank3 := If bank3 ? "-bank 3 " . bank3 : ""
sound_buffer := If sound_buffer ? "-sound_buffer " . sound_buffer : ""
params := globalParams . " " . params

7z(romPath, romName, romExtension, 7zExtractPath)

; If you have alternate controls for a specific game, this will overwrite the current dapinput.ini with your custom one
romControlIni := emuPath . "\controls\" . romName . ".ini"
defaultControlIni := emuPath . "\controls\dapinput.ini"
daphneControlIni := emuPath . "\dapinput.ini"
If FileExist(romControlIni) {    ; if a romName control ini exists
   Log("Module - Found a romName input ini and will overwrite the existing dapinput.ini: " . romControlIni)
   FileCopy, %romControlIni%, %daphneControlIni%, 1    ; copy rom dapinput, overwriting working one
} Else If FileExist(defaultControlIni) {    ; if a default control ini exists
   Log("Module - No romName input ini found, overwriting the current dapinput.ini with a default one: " . defaultControlIni)
   FileCopy, %defaultControlIni%, %daphneControlIni%, 1    ; copy default dapinput, overwriting working one in case a rom one was set from previous launch
} Else
   Log("Module - No romName or default inis found, leaving the current dapinput.ini alone")

; If launched game is an alternate version of a parent, this will send the alternate's name to daphne.
romName = %version%

; This allows us to send variables, that when empty, are not sent to the Run command
; msgbox % executable . A_Space . romName . A_Space . params . A_Space . fullscreen . A_Space . screenWidth . A_Space . screenHeight . A_Space . min_seek_delay . A_Space . seek_frames_per_ms . A_Space . homedir . A_Space . bank0 . A_Space . bank1 . A_Space . bank2 . A_Space . bank3 . A_Space . sound_buffer . A_Space . "-framefile """ . romPath . "\" . frameFile . romExtension . """"
Run(executable . A_Space . romName . A_Space . params . A_Space . fullscreen . A_Space . screenWidth . A_Space . screenHeight . A_Space . min_seek_delay . A_Space . seek_frames_per_ms . A_Space . homedir . A_Space . bank0 . A_Space . bank1 . A_Space . bank2 . A_Space . bank3 . A_Space . sound_buffer . A_Space . "-framefile """ . romPath . "\" . frameFile . romExtension . """", emuPath)

WinWait("ahk_class SDL_app")
BezelDraw()
WinWaitActive("ahk_class SDL_app")

FadeInExit()
Process("WaitClose", executable)
7zCleanUp()
FadeOutExit()
ExitModule()


HaltEmu:
   Send, {P}
Return
RestoreEmu:
   Winrestore, AHK_class %EmulatorClass%
   Send, {P}
Return

CloseProcess:
   FadeOutStart()
   BezelExit()
   If pauseOnExit = true
   {    Send, {P}
       Sleep, 100
   }
   WinClose("ahk_class SDL_app")
Return

I checked with other bezels that are not my aspect. It fits the bezel opening perfectly!!! I will apply the same to the Daphne-Singe module and get it working. I will post it here when done.

You tha' man!!!

Thanks,

Ron

Link to comment
Share on other sites

Bleasby,

I see. Because it cannot be resized after launch, you cannot change the emulator size once it is launched. That is a fail. ;)

So, I put three bezels in the _Default folder. When I change bezels, the emulator screen size will not change, so there can only be one bezel in there, or they have to present the same size opening. Doesn't have to be in the same place, just the same size.

Thanks,

Ron

Link to comment
Share on other sites

Ok, here is the modified ahk for ALG. The changes are the same only this module uses a different variable name for width and height.

AHK:

MEmu = Daphne Singe
MEmuV =  v1.14
MURL = http://www.singeengine.com/cms/
MAuthor = djvj
MVersion = 2.0.1
MCRC = 4FF69607
iCRC = 3F762B18
MID = 635038268880264228
MSystem = "American Laser Games","WoW Action Max"
;----------------------------------------------------------------------------
; Notes:
; Rom_Extension should be singe
; Your framefiles need to exist in the same dir as your Rom_Path, in each game's subfolder, and have a txt extension. The filename should match the name in your xml.

; American Laser Games
; For example,  If you rompath is C:Hyperspin\Games\American Laser Games\, the drugwars game would be found in C:Hyperspin\Games\American Laser Games\maddog\
; and the framefile would be in C:Hyperspin\Games\American Laser Games\maddog\maddog.txt
; To change the dir you want to run your games from:
; 1. Backup all your /daphne/singe/ROMNAME/ROMNAME.singe, cdrom-globals.singe, and service.singe files, most games all three in each romdir
; 2. Move all the folders in your /daphne/singe/ folder to the new location you want. You should have one folder for each game.
; 3. Open each ROMNAME.singe, cdrom-globals.singe, and service.singe in notepad and do a find/replace of all instances shown below. For example using an SMB share:
; Old
; ("singe/
; New:
; ("//BLACKPC/Hyperspin/Games/American Laser Games/
;
; If using a local drive, it would look something like this C:/Hyperspin/Games/American Laser Games/

; WoW Action Max
; Emu_Path should be something like this C:\HyperSpin\Emulators\WoW Action Max\daphne-singe\
; Rom_Path has to point to where all the m2v video files are kept
; Rom_Extension should be singe
; Your framefiles need to exist in the same dir as your rompath and all have txt extensions. The filename should match the name in your xml.
; To change the dir you want to run your games from:
; 1. Backup your /daphne/singe/Action Max/Emulator.singe file
; 2. Move all the files (except Emulator.singe) in your /daphne/singe/Action Max/ folder to the new location you want.
; 3. Open Emulator.singe in notepad and do a find/replace of all instances shown below. For example using an SMB share:
; Old
; "singe/Action Max/
; New:
; "//BLACKPC/Hyperspin/Games/WoW Action Max/
;
; If using a local drive, it would look something like this C:/Hyperspin/Games/WoW Action Max/
;
; There should be 18 instances that need replacing.
; 4. The only file that should be in your /daphne/singe/Action Max/ dir should be the edited Emulator.singe file (and your backup).
;
; If you are upgrading from the old daphne-singe-v1.0 to 1.14, don't forget to copy the old singe dir to the new emu folder, it doesn't come with the contents of that folder that you need.
;----------------------------------------------------------------------------
StartModule()
BezelGUI()
FadeInStart()

settingsFile := modulePath . "\" . moduleName . ".ini"
Fullscreen := IniReadCheck(settingsFile, "settings", "Fullscreen","true",,1)
daphneWidth := IniReadCheck(settingsFile, "settings", "daphneWidth","1024",,1)
daphneHeight := IniReadCheck(settingsFile, "settings", "daphneHeight","768",,1)

BezelStart()
; Emptying variables if they are not set
fullscreen := (If Fullscreen = "true" ? ("-fullscreen_window") : ("")) ; fullscreen_window mode allows guncon and aimtraks to work

if bezelPath   ; this variable is only filled if bezel is enabled and a valid bezel image is found
   {
       params:= params . " -ignore_aspect_ratio"
   daphneWidth := "-x " . Round(bezelScreenWidth)  ;bezelScreenWidth variable is defined on the BezelStart function and it gives the desired width that your game screen should have while using this bezel 
   daphneHeight := "-y " . Round(bezelScreenHeight) ;idem above
   } else {
   daphneWidth := "-x " . daphneWidth
   daphneHeight := "-y " . daphneHeight  
   }

;daphneWidth := (daphneWidth ? ("-x " . daphneWidth) : (""))
;daphneHeight := (daphneHeight ? ("-y " . daphneHeight) : (""))

7z(romPath, romName, romExtension, 7zExtractPath)

; This allows us to send variables, that when empty, are not sent to the Run command
Run(executable . " singe vldp " . daphneWidth . A_Space . daphneHeight . A_Space . fullscreen . A_Space . "-framefile """ . romPath . "\" . romName . ".txt""" . A_Space . "-script """ . romPath . "\" . romName . ".singe""", emuPath)

WinWait("DAPHNE ahk_class SDL_app")
BezelDraw()
WinWaitActive("DAPHNE ahk_class SDL_app")

FadeInExit()
Process("WaitClose", executable)
7zCleanUp()
FadeOutExit()
ExitModule()

HaltEmu:
   Send, {P}
Return
RestoreEmu:
   Winrestore, AHK_class %EmulatorClass%
   Send, {P}
Return

CloseProcess:
   FadeOutStart()
   BezelExit()
   WinClose("DAPHNE ahk_class SDL_app")
   ;Process, Close, %executable% ; WoW Action Max module used this
Return

Is there a way to disable changing the bezel? Maybe to have it only changed if the bezel will fit??

Thanks,

Ron

Link to comment
Share on other sites

First of all, nicely done. :congrats:

You did a nice job, with some extra guidance for sure.

That is one more example of a good team work. :beer:

It is always more fun to not do such things alone...

Now, you should create a post on the daphne and daphne singe threads of the modules forum to suggest these changes to the official module. That way we will have things more organized, and one of we guys involved on the official modules could add the changes to everybody distribution. It is preferable also to suggest these changes on the new hyperlaunch forum because we will start to move any development discussion over there to get things more organized and less tied to a Hyperspin only setup.

If you want to tackle adding bezel support to other systems, just create a new thread like this one and we could keep doing these walkthoughts until we have the bezel support defined for new modules. Hopefully, in no time you and any other user will not need any help on adding that stuff, which will be for sure welcome to free some of the burden that me, djvj and brolly carries.

Bleasby,

I see. Because it cannot be resized after launch, you cannot change the emulator size once it is launched. That is a fail. ;)

So, I put three bezels in the _Default folder. When I change bezels, the emulator screen size will not change, so there can only be one bezel in there, or they have to present the same size opening. Doesn't have to be in the same place, just the same size.

That is a limitation of the way the emulator works. Nothing we can do about it. As we can only set the resolution when the emulator launches, we cannot change its screen aspect while changing between different bezels on the same game session.

The bezel change keys were created system based because of this, among other reasons. So you just need to set to not use your global_value on the system that you cannot change between bezels while in a game session. Maybe add a note to the proposed module changes stating that is recomended to not use a bezel change key while using this module is a good idea to any new user that does not know about it.

To change the bezel key just open HLHQ, select the daphne system, go to the bezel tab, and change the bezel change keys over there to nothing or to use some other key that you don't use anywhere else.

Link to comment
Share on other sites

First of all, nicely done. :congrats:

You did a nice job, with some extra guidance for sure.

That is one more example of a good team work. :beer:

It is always more fun to not do such things alone...

Now, you should create a post on the daphne and daphne singe threads of the modules forum to suggest these changes to the official module. That way we will have things more organized, and one of we guys involved on the official modules could add the changes to everybody distribution. It is preferable also to suggest these changes on the new hyperlaunch forum because we will start to move any development discussion over there to get things more organized and less tied to a Hyperspin only setup.

If you want to tackle adding bezel support to other systems, just create a new thread like this one and we could keep doing these walkthoughts until we have the bezel support defined for new modules. Hopefully, in no time you and any other user will not need any help on adding that stuff, which will be for sure welcome to free some of the burden that me, djvj and brolly carries.

That is a limitation of the way the emulator works. Nothing we can do about it. As we can only set the resolution when the emulator launches, we cannot change its screen aspect while changing between different bezels on the same game session.

The bezel change keys were created system based because of this, among other reasons. So you just need to set to not use your global_value on the system that you cannot change between bezels while in a game session. Maybe add a note to the proposed module changes stating that is recomended to not use a bezel change key while using this module is a good idea to any new user that does not know about it.

To change the bezel key just open HLHQ, select the daphne system, go to the bezel tab, and change the bezel change keys over there to nothing or to use some other key that you don't use anywhere else.

Bleasby,

Thank you. Should have said:

You did a nice job, with some extra expert guidance for sure.

And you opened a can of trouble here. I'm already working on trying to get bezel to work in WinUAE. ;)

I'll make a post for the Daphne and Singe module.

Thank you again, for all you do!!

Thanks,

Ron

Link to comment
Share on other sites

And you opened a can of trouble here. I'm already working on trying to get bezel to work in WinUAE. ;)

I'll make a post for the Daphne and Singe module.

Thank you again, for all you do!!

heheh, no problem man. It is nice to receive a thks word sometimes. It is the only payment that I receive from doing that, but it is always good to hear.

About your bezel adventures, just try to follow these steps always:

1) Check if the module is able to change between fullscreen and windowed mode. If not, it is necessary to add support for that as the first step.

2) Test if the emulator re-sizes its resolution on screen drag.

2.1) If yes, everything is absurdly simple. You probably only need to add the normal bezel calls and voilà. Maybe some extras commands for hiding window components are required, they are explained here:

2.2) If not, you need to find out if you are able to set the resolution of the emulator before running the game in any config file.

2.2.1) If you can, create a module setting for doing it, and them use a similar code to the one that we used on the daphne module.

2.2.2) If you can't or if the emulator has no visible config file or windows register place to set a resolution, check if the emulator supports at least some restrict set of different resolutions. On this case, most probably you are going to need to use the bezel fixResMode which requires some more notes and emulator knowledge to be added to the module.

By the way, if you want, maybe it is better to post any attempts to add bezel support on this thread, as it is the subject of it anyway: http://www.hyperspin-fe.com/forum/showthread.php?31302-Adding-bezel-support-A-step-by-step-Walkthrough

Link to comment
Share on other sites

heheh, no problem man. It is nice to receive a thks word sometimes. It is the only payment that I receive from doing that, but it is always good to hear.

About your bezel adventures, just try to follow these steps always:

1) Check if the module is able to change between fullscreen and windowed mode. If not, it is necessary to add support for that as the first step.

2) Test if the emulator re-sizes its resolution on screen drag.

2.1) If yes, everything is absurdly simple. You are porbably only needing to add the normal bezel calls and voilà. Maybe some extras for hiding window components that are explained here:
http://www.hyperspin-fe.com/forum/showthread.php?31302-Adding-bezel-support-A-step-by-step-Walkthrough

2.2) If not, you need to find out if you are able to set the resolution of the emulator before running the game in any config file.
2.2.1) If you can, create a module setting for doing it, and them use a similar code to the one that we used on the daphne module.

2.2.2) If you can't or if the emulator has no visible config file or windows register place to set a resolution, check if the emulator supports at least some restrict set of different resolutions. On this case, most probably you are going to need to use the bezel fixResMode which requires some more notes and emulator knowledge to be added to the module.

By the way, if you want, maybe it is better to post any attempts to add bezel support on this thread, as it is the subject of it anyway: http://www.hyperspin-fe.com/forum/showthread.php?31302-Adding-bezel-support-A-step-by-step-Walkthrough

Very cool!

So, start in the Adding bezel support thread. Once it's working well, then post in the module thread?

I tried to add fixResMode with a huge fail. Crashed the emu every time. ;)

Thanks,

Ron

Link to comment
Share on other sites

Very cool!

So, start in the Adding bezel support thread. Once it's working well, then post in the module thread?

Yes, perfect!

I tried to add fixResMode with a huge fail. Crashed the emu every time. ;)

Yeah, emulators that require fixedResMode need additional care.

Try to get start by answering the questions that I made above, and posting the answers so I could have some info to try to help you out.

The beginning work must be faced as a research project. You need to have clearly set if the emu resize its resolution, if there are human readable configuration files, if the module already have the needed options on it,...

Just after knowing all about that, you could decide which method to apply and could starting messing with the module code.

Link to comment
Share on other sites

Yes, perfect!

Yeah, emulators that require fixedResMode need additional care.

Try to get start by answering the questions that I made above, and posting the answers so I could have some info to try to help you out.

The beginning work must be faced as a research project. You need to have clearly set if the emu resize its resolution, if there are human readable configuration files, if the module already have the needed options on it,...

Just after knowing all about that, you could decide which method to apply and could starting messing with the module code.

Perfect!! Thank you again Sir Bleasby!!!

Thanks,

Ron

Link to comment
Share on other sites

  • 2 weeks later...
thank you

your module is working great for me

worked perfectly on the very first run!

Nice!! And looks good. Just remember, if you use more than one bezel, the emulator window inside the bezel has to be the same size because Daphne will not allow you to change the size of the emulator window once launched.

Thanks,

Ron

Link to comment
Share on other sites

Do you happen to have a module to support bezels for atari 2600 (STELLA)?

i followed the guide and tried to get it to work but did not have any success

thanks

craiganderson

A new module with bezel support for Stella is due out with the next HL update. I don't have a copy of that ahk.

Thanks,

Ron

Link to comment
Share on other sites

  • 1 year later...
  • 7 months later...
  • 1 year later...

I'm also having trouble finding any Bezels (preferably 16:9) for Daphne, does anyone have a good source please? I've trawled around the site but no joy :-(

 

 

Regards,

 

Ross.

 

Link to comment
Share on other sites

  • 2 years later...
On 6/2/2014 at 2:21 PM, rfancella said:

Craig,

After reading your post. Got me thinking. So, I changed the module and created a bezel for Daphne (since they are basically the same emu). It works. So I made the same changes to the Daphne-Singe module and copied the bezel and ini over there. Tested and it works as well. Here are the screens of the emu launching:

Daphne:

post-48498-142870633515_thumb.jpg

Daphne-Singe:

post-48498-142870633531_thumb.jpg

So, this is how I did it.

I took the default Daphne fade background. Re-sized it to my actual monitor resolution (1680x1050). Figured the size of the emu window and set it to 1280x1024 in the Module Settings. Disabled Full Screen there also. Cropped out a transparent block out of the center of the graphic that measures exactly the size of the emu window. Created the bezel ini to match.

Last step, modified the Daphne and Daphne-Singe module to have bezel functionality. Fired up the emu and it works sweet!!! If anyone would like to duplicate this on their setup, I'd be glad to create a thread.

Thanks,

Ron

Hi I know this is an waaaay old thread, I just started updating my setup with all bezel support.... Daphne and Daphne singe look great. However with bezels on in daphne singe and playing any light gun games... 'right click' reloading off screen is not working (bezels disabled works fine). Tested with aimtraks and regular mouse. Is there a setting or something that can fix this? maybe a cli parameter or singe module edit?

 

 

Link to comment
Share on other sites

6 hours ago, drewjbx1 said:

Hi I know this is an waaaay old thread, I just started updating my setup with all bezel support.... Daphne and Daphne singe look great. However with bezels on in daphne singe and playing any light gun games... 'right click' reloading off screen is not working (bezels disabled works fine). Tested with aimtraks and regular mouse. Is there a setting or something that can fix this? maybe a cli parameter or singe module edit?

 

 

Assuming RocketLauncher bezels (more than safe, I'd think), try changing the bezels to backgrounds. Not with my setup right now, but a quick search on RL's site should give you some options/guidance. I'm wondering if the bezel overlaying the sides of the screen is interfering.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...