darkbelmonte Posted October 2, 2011 Posted October 2, 2011 here's an update I did the script for Sharp X68000, to fix some bugs and makes it more functional and able to play in decent games for this computer. I encouraged this mess that the script for this manson976 collecting the artwork of the system and is getting a very good job. His work is here! Changes / Features - Runs the floppy - Run the HD's (Hard Disk Image) - Exchange floppy disks - Expands memory of the machine to prevent further exchanges of floppy disks and be compatible with all games - Works with 2 emulators (note the efforts are concentrated in "WinX68kHighSpeed_eng"!) - Must save the GUI - Works in 1024x768 and 1280x1024 resolutions (better) For those who do not know very well this system follows some important information. - And a computer with two floppy drives (disk1 and disk2) at the bottom of the computer screen will be displayed which disks can be inserted and that the program requires you to insert a new disk. - Another method is we play games stored on the hard drive and just put them in this case and will never need to replace any floppies. Below is a sample video in which they are played Video - Upload is being done! Wait Floppy: Akumajō Dracula (1993) (Konami) (Disk 1 of 2). Dim How are two disks in the script puts them Disk1 and Disk2 and worked perfectly without the need for exchange (in the fianal cideo triggers the Bill just to make the save and load the advance in the game) Floppy: Street Fighter II Champion Edition (1993) (SPS) (Disk 1 of 4) (System). Dim The game is 4 disks, then the script does so he sets up your machine with 2 MB of RAM to prevent you from having to keep changing the floppy after the fights, so you Garreg all at the beginning of the game as the video and then mopstra can play without problems. (If you omit the script from the memory ally Sharp X68000 he will start the game and there depending on the character you're facing you'll be asking different disks and that's very alternate). Super Street Fighter II (1993) (Capcom) [hdf]. Hdf Sample game in HD and 1 to be displayed on the video and it's behavior and the same script when run only one game with two diaquetes. (In the video it takes to get a pouvo, but that's normal and Sharp PC X680000) With three games above you can have an overview of the features of the script, but the script runs with up to 9 games floppy if you need. NOTE:. On the video screen of the emulator is in a lower resolution, and because of this resolution settings that was recording and cantasia emulator was configured, when executives realized that there is no problem for video ;------------------------------------------------------------------------------------------------------- ; Sharp X68000 ; WinX68kHighSpeed ; by Darkbelmonte ; 4.7 ; This script was created from the discuções fosum arcadebr ; http://www.arcadebr.com/threads/2284-Hyperlaunch-scripting-duvidas-dicas/page3 ; Works with emulators "WinX68kHighSpeed??" and "XM6" ; If you use the HD using "XM6" if not please use the "WinX68kHighSpeed??" because it works best with Gui ; The merit of the process to use the emulator "XM6" and all of the MEMBERS airhead, just made a free adaptation ; Which is still far from having all the features that he developed in his (As the use of HD) ; - Runs the floppy ; - Run the HD's (Hard Disk Image) ; - Exchange floppy disks ; - Expands memory of the machine to prevent further exchanges of floppy disks and be compatible with all games ; - Works with 2 emulators (note the efforts are concentrated in "WinX68kHighSpeed_eng"!) ; ;======================================================================================================== ; INITIAL PART OF THE SCRIPT - DEFINING KEY EMULATOR AND OPERATIONS ; ;======================================================================================================== ; Gosub, NOMEROMPROCESSO ; Gosub, ATALHOS ; Gosub, ATALHOS2 ; if(executable = "WinX68kHighSpeed_eng.exe"){ ; Goto, PREWINX68HS ; }else if(executable = "XM6.exe"){ ; Goto, PREXM6 ; } ; ; ; ; ; ExitApp ; ; CloseProcess: ; Process, Close, %executable% ; WinClose, ahk_class WinX68kHighSpeed ; Process, Close, HyperLaunch.exe ; Process, Close, AutoHotkey.exe ; Gui, destroy ; ; return ; ; ;======================================================================================================== ;======================================================================================================== ; EXECUTION Emulators ;======================================================================================================== ; 1) PRIMARY PART OF THE IMPLEMENTATION OF EMULATOR ;======================================================================================================== ; Run emulators "WinX68kHighSpeed??" and "XM6" PREWINX68HS: { Gui +AlwaysOnTop -Caption +ToolWindow Gui, Color, Black Gui Show, x0 y0 h%A_ScreenHeight% w%A_ScreenWidth% Gui +AlwaysOnTop -Caption +ToolWindow ;------------------------------------------------- --------------------------- ; WinX68kHighSpeed ??*** Using the Emulator ;------------------------------------------------- --------------------------- ; Dedication of some facilitators SetWorkingDir, %emuPath% IniWrite, %romPath%, %emuPath%\winx68k.ini, WinX68k, StartDir IniWrite, true, %emuPath%\winx68k.ini, WinX68k, FDDStatWin IniWrite, true, %emuPath%\winx68k.ini, WinX68k, FDDStatFullScr IniWrite, 10, %emuPath%\winx68k.ini, WinX68k, MpuClock IniWrite, 1, %emuPath%\winx68k.ini, WinX68k, WinStretch IniWrite, false, %emuPath%\winx68k.ini, WinX68k, JoySwap ;---------------------------------------------------------------------------- ; Define what type of device emulator will work WinX68kHighSpeed if(romExtension = ".hdf"){ IniWrite, %romPath%%romName%%romExtension%, %A_WorkingDir%\winx68k.ini, WinX68k, HDD0 IniWrite, %A_Space%, %A_WorkingDir%\winx68k.ini, WinX68k, FDD0Image IniWrite, %A_Space%, %A_WorkingDir%\winx68k.ini, WinX68k, FDD1Image Goto, execusimples ;---------------------------------------------------------------------------- ; 2 floppy disks if he starts the game and ready (in a floppy drive in drive 0 and another one) } if(romExtension = ".xdf" || ".dim" || ".hdm"){ IniWrite, %romPath%%romName%%romExtension%, %A_WorkingDir%\winx68k.ini, WinX68k, FDD0Image Loop, %romPath%%nomeraiz%%formato%%A_Space%2*%romExtension%, , 1 ; Browse to C: \ ROM \ Alshark (1991) (Right Stuff) (Disk dim *. IniWrite, %A_LoopFileFullPath%, %A_WorkingDir%\winx68k.ini, WinX68k, FDD1Image } goto, execusimples } PREXM6: { Gui +AlwaysOnTop -Caption +ToolWindow Gui, Color, Black Gui Show, x0 y0 h%A_ScreenHeight% w%A_ScreenWidth% Gui +AlwaysOnTop -Caption +ToolWindow ;------------------------------------------------- --------------------------- ; XM6 *** Using the Emulator ;------------------------------------------------- --------------------------- ; Dedication of some facilitators SetWorkingDir, %emuPath% IniWrite, 5, %emuPath%\XM6.ini, Basic, Memory ; Trabalha com o maximo de RAM possivel 12 MB IniWrite, %romPath%, %emuPath%\XM6.ini, Resume, Path ; Insere o caminho default do diretório IniWrite, 1, %emuPath%\XM6.ini, Resume, FD ; Faz o emulador inicializar com o disquete nos Drives IniWrite, 1, %emuPath%\XM6.ini, Joystick, Button11 ; Congura o soco medio Street EX:. IniWrite, 2, %emuPath%\XM6.ini, Joystick, Button12 ; Congura o Chute medio Street EX:. ;---------------------------------------------------------------------------- ; Define what type of device emulator will work WinX68kHighSpeed if(romExtension = ".hdf"){ IniWrite, %romPath%%romName%%romExtension%, %A_WorkingDir%\XM6.ini, SASI, File0 IniWrite, %A_Space%, %A_WorkingDir%\XM6.ini, MRU0, File0 IniWrite, %A_Space%, %A_WorkingDir%\XM6.ini, MRU1, File0 IniWrite, %A_Space%, %A_WorkingDir%\XM6.ini, SASI, File1 IniWrite, %A_Space%, %A_WorkingDir%\XM6.ini, SASI, File2 IniWrite, %A_Space%, %A_WorkingDir%\XM6.ini, SASI, File3 IniWrite, %A_Space%, %A_WorkingDir%\XM6.ini, SASI, File4 IniWrite, %A_Space%, %A_WorkingDir%\XM6.ini, SASI, File5 IniWrite, %A_Space%, %A_WorkingDir%\XM6.ini, SASI, File6 IniWrite, %A_Space%, %A_WorkingDir%\XM6.ini, SASI, File7 IniWrite, %A_Space%, %A_WorkingDir%\XM6.ini, SASI, File8 IniWrite, %A_Space%, %A_WorkingDir%\XM6.ini, SASI, File9 IniWrite, %A_Space%, %A_WorkingDir%\XM6.ini, SASI, File10 IniWrite, %A_Space%, %A_WorkingDir%\XM6.ini, SASI, File11 IniWrite, %A_Space%, %A_WorkingDir%\XM6.ini, SASI, File12 IniWrite, %A_Space%, %A_WorkingDir%\XM6.ini, SASI, File13 IniWrite, %A_Space%, %A_WorkingDir%\XM6.ini, SASI, File14 IniWrite, %A_Space%, %A_WorkingDir%\XM6.ini, SASI, File15 Goto, execusimples ;---------------------------------------------------------------------------- ; 2 floppy disks if he starts the game and ready (in a floppy drive in drive 0 and another one) } if(romExtension = ".xdf" || ".dim" || ".hdm"){ IniWrite, %romPath%%romName%%romExtension%, %A_WorkingDir%\XM6.ini, MRU0, File0 Loop, %romPath%%nomeraiz%%formato%%A_Space%2*%romExtension%, , 1 ; Browse to C: \ ROM \ Alshark (1991) (Right Stuff) (Disk dim *. IniWrite, %A_LoopFileFullPath%, %A_WorkingDir%\XM6.ini, MRU1, File0 } goto, execusimples } ;RUN MODE SIMPLE EMULATOR - LAUNCHES EMULATOR execusimples: { if(executable = "WinX68kHighSpeed_eng.exe"){ Run, %EmuPath%%Executable%, , UseErrorLevel WinWait, ahk_class WinX68kHighSpeed, WinWaitActive, ahk_class WinX68kHighSpeed, Sleep, 50 yOffset = -20 winHeight := A_ScreenHeight - yOffset WinMove, ahk_class WinX68kHighSpeed,, 0, %yOffset%, %A_ScreenWidth%, %winHeight% Sleep, 200 DetectHiddenWindows, on WinWait, ahk_class WinX68kHighSpeed, IfWinNotActive, ahk_class WinX68kHighSpeed, , WinActivate, ahk_class WinX68kHighSpeed, Sleep, 100 Send, {F11} Sleep, 100 Send, o Sleep, 50 Send, {UP} Sleep, 50 Send, {UP} Sleep, 50 Send, {ENTER} WinWait, The amount of MainMemory, Cancel IfWinNotActive, The amount of MainMemory, Cancel, WinActivate, The amount of MainMemory, Cancel WinWaitActive, The amount of MainMemory, Cancel Send, {DEL}{DEL}{DEL}{DEL}10{ENTER} WinWait, ahk_class WinX68kHighSpeed, IfWinNotActive, ahk_class WinX68kHighSpeed, , WinActivate, ahk_class WinX68kHighSpeed, Sleep, 100 Send, {F11} Sleep, 100 Send, {DOWN} Sleep, 100 Send, {ENTER} WinWait, ahk_class WinX68kHighSpeed, IfWinNotActive, ahk_class WinX68kHighSpeed, , WinActivate, ahk_class WinX68kHighSpeed, WinWaitActive, ahk_class WinX68kHighSpeed, Send, {F11} WinWait, ahk_class WinX68kHighSpeed, IfWinNotActive, ahk_class WinX68kHighSpeed, , WinActivate, ahk_class WinX68kHighSpeed, WinWaitActive, ahk_class WinX68kHighSpeed, Send, d Send, {ENTER} Sleep, 200 ; avoid some errors Send, {SPACE} WinWait, ahk_class WinX68kHighSpeed, IfWinNotActive, ahk_class WinX68kHighSpeed, , WinActivate, ahk_class WinX68kHighSpeed, WinWaitActive, ahk_class WinX68kHighSpeed, Sleep, 150 WinShow, ahk_class WinX68kHighSpeed Process, WaitClose, %executable% Sleep, 500 WinSet, AlwaysOnTop, On, ahk_pid %Errorlevel% WinSet, Top,, ahk_pid %Errorlevel% WinActivate, ahk_pid %Errorlevel% WinWaitActive, ahk_pid %Errorlevel% return }else if(executable = "XM6.exe"){ Process, Exist, %executable% if !ErrorLevel = 0 Process, Close, %executable% Run, %EmuPath%%Executable%, , UseErrorLevel DetectHiddenWindows, on WinWait, ahk_class AfxFrameOrView70, IfWinNotActive, ahk_class AfxFrameOrView70, , WinActivate, ahk_class AfxFrameOrView70, Sleep, 100 Send, {ALTDOWN}{ENTER}{ALTUP} Sleep, 700 MouseClick, left, 0, 0 Sleep, 100 WinSet, AlwaysOnTop, On, ahk_pid %Errorlevel% WinSet, Top,, ahk_pid %Errorlevel% WinActivate, ahk_pid %Errorlevel% WinWaitActive, ahk_pid %Errorlevel% WinShow, ahk_class AfxFrameOrView70 Process, WaitClose, %executable% return } } ;---------------------------------------------------------------------------- ; 2) DEFINITION OF THE KEYBOARD SHORTCUTS ;---------------------------------------------------------------------------- ; I used the keys q and w ; Also in the SELECT and START Joystick ATALHOS: { JoystickNumber = 1 JoystickPrefix = %JoystickNumber%Joy ; Support Swap Joy by L1 and L2 (E and R on the keyboard) Hotkey, e, FDD0IMAGE Hotkey, r, FDD1IMAGE Joy5::Send, e Joy7::Send, r Joy10::Send, {ENTER} ; Joy3::Send, z ; to play Street Fighter with 6 buttons ; Joy6::Send, c ; Joy4::Send, a ; Joy8::Send, d return } ATALHOS2: { #Persistent ; Keep this script running until the user explicitly exits it. SetTimer, WatchPOV, 5 return WatchPOV: GetKeyState, POV, JoyPOV ; Get position of the POV control. KeyToHoldDownPrev = %KeyToHoldDown% ; Prev now holds the key that was down before (if any). ; Some joysticks might have a smooth/continous POV rather than one in fixed increments. ; To support them all, use a range: if POV < 0 ; No angle to report KeyToHoldDown = else if POV > 31500 ; 315 to 360 degrees: Forward KeyToHoldDown = Up else if POV between 0 and 4500 ; 0 to 45 degrees: Forward KeyToHoldDown = Up else if POV between 4501 and 13500 ; 45 to 135 degrees: Right KeyToHoldDown = Right else if POV between 13501 and 22500 ; 135 to 225 degrees: Down KeyToHoldDown = Down else ; 225 to 315 degrees: Left KeyToHoldDown = Left if KeyToHoldDown = %KeyToHoldDownPrev% ; The correct key is already down (or no key is needed). return ; Do nothing. ; Otherwise, release the previous key and press down the new key: SetKeyDelay -1 ; Avoid delays between keystrokes. if KeyToHoldDownPrev ; There is a previous key to release. Send, {%KeyToHoldDownPrev% up} ; Release it. if KeyToHoldDown ; There is a key to press down. Send, {%KeyToHoldDown% down} ; Press it down. return } ; 3 ) DEFINITION OF THE NAME GAME ;======================================================================================================== NOMEROMPROCESSO: { ;======================================================================================================== ; WORKING WITH THE NAME OF ROMS ; ; 1º stage ;------------------------------------------------------------------------------ ; Dedicate some facilitators eg. NAME = Alshark (1991) (Right Stuff) (Disk 1 of 5) (System). Dim nome = %romName%%romExtension% ;============================================================================== ; 2º stage ;------------------------------------------------------------------------------ ; A ) Setting the default naming standard ideal can be found in ; http://www.emuparadise.org/Sharp_X68000_ROMs/Games-Starting-With-C/23 IfInString, nome,(Disk%A_Space% { formato =(Disk%A_Space% } IfInString, nome,[Disk%A_Space% { formato =[Disk%A_Space% } ;------------------------------------------------------------------------------ ; B ) Calculation of the names for division StringGetPos, totaldeletrasnome, nome, %romExtension% StringGetPos, contar, nome, %formato% letras := totaldeletrasnome - contar contarfim := totaldeletrasnome - contar -3 ;---------------------------------------------------------------------------- ; StringMid This time I used to divide the name of Rom (Disk 1 of?) If [Disk 1] using only %count% and not count +1 ; C) Determines the Short Name EX:. (Disk 1 of 5) (System) *** This is the name that manipulate *** StringMid, nomecurto, nome, contar+1, %letras% ;---------------------------------------------------------------------------- ; StringLeft This time I used to divide the name of Rom and get the principal name ; D) Determining the Name of the Game EX:. of "Alshark (1991) (Right Stuff) (Disk 1 of 5) (System)" The nomeraiz = "Alshark (1991) (Right Stuff)" StringLeft, nomeraiz, nome, contar ;---------------------------------------------------------------------------- ; StringLeft This time I used to divide the name of Rom and get the principal name ; E) He had taken only after the name of our variable floppy EX:. of "Alshark (1991) (Right Stuff) (Disk 1 of 5) (System)" The nomefinal = "of 5) (System)" StringRight, nomefinal, nome, %contarfim% ;---------------------------------------------------------------------------- ; The StringGetPos nomeraiz divides the year to catch the Game ; F) will take the year continued in the name of the ROM output format will be 19?? StringGetPos, ano, nomeraiz, (19 StringMid, year, nomeraiz, ano+2, 4 ;---------------------------------------------------------------------------- ; G) found the producer of the game and the output format is (producer) EX:. (Right Stuff) StringMid, produtoraB, nomeraiz, ano+8, StringGetPos, produtoraC, produtoraB, ) StringLeft, produtoraD, produtoraB, %produtoraC% StringMid, produtora, nomeraiz, ano+7, ;---------------------------------------------------------------------------- ; The StringGetPos divides nomefinal to get the type of floppy disk that will use ; H) The output format is (name of disk) EX:. (System) StringGetPos, Tnomefinal , nomefinal, %romExtension% StringMid, TDISKETTE, nomefinal, 9, Tnomefinal-9 ;---------------------------------------------------------------------------- ; I ) Only the name of the game and nothing else EX:. "Alshark" *** is the name after the space StringLeft,sonomedojogo, nomeraiz, %ano% ;============================================================================== ; 3º stage ;------------------------------------------------------------------------------ ; determines how the game has floppy FileList = ; White boots in the FileList Loop, %romPath%%nomeraiz%%formato%%A_Space%*%romExtension% ; Browse to C: \ ROM \ Alshark (1991) (Right Stuff) (Disk dim *. FileList = %FileList%%A_LoopFileName%`n ; Loop, parse, FileList, `n { if A_LoopField = ; Ignore the blank item at the end of the list. continue quantidade = %A_Index% } ;---------------------------------------------------------------------------- ; END OF WORK WITH THE NAME OF ROMS ;---------------------------------------------------------------------------- return } ; 4 ) KEYBOARD SHORTCUTS FOR THE CHOICE OF DIQUETES ;======================================================================================================== ; Construct the GUI for FDD0 or FDD1 FDD0IMAGE: { FDD = 0 Gui, 2: destroy Gui, 3: destroy Gosub, TELADESWAP ; Trick that ensures that the screen is on 1 plan Sleep, 100 MouseClick, left, %A_ScreenWidth%, 0 return } FDD1IMAGE: { FDD = 1 Gui, 2: destroy Gui, 3: destroy Gosub, TELADESWAP ; Trick that ensures that the screen is on 1 plan Sleep, 100 MouseClick, left, %A_ScreenWidth%, 0 return } TELADESWAP: { ; 5 ) Part of the script that builds the GUI ;======================================================================================================== ; The GUI will be built with the corresponding number of disks ;TELADESWAP: ; ======================================== ; Prevents the GUI is made ??in the resolution of the emulator Gui, 1:Destroy Gui, 2:Destroy Gui, 2: color, %colorB% Gui, 2: Show, x0 y0 h%A_ScreenHeight% w%A_ScreenWidth% Sleep, 50 Gui, 2: destroy ; ======================================== ; Pause Game - Use the F11 key to stop playing the game ; WinWait, ahk_class WinX68kHighSpeed, ; WinWaitActive, ahk_class WinX68kHighSpeed, ; Send, {F11} ; ======================================== ; CODE - Determines the position of buttons in the GUI ; Settings Axis "X" ; Eixo "X" |buttons XPosD := A_ScreenWidth/2 - A_ScreenWidth/10 - 5 XPosM := A_ScreenWidth/2 XPosE := A_ScreenWidth/2 + A_ScreenWidth/10 + 5 ; Eixo "X" |Text XPosA := A_ScreenWidth/24 XPosB := A_ScreenWidth/18 XPosC := XPosE + XPosE/6 ; Settings Axis "Y" ; Eixo "Y" |buttons YPosm := A_ScreenHeight/2 - 80 YPos1 := A_ScreenHeight/2 + 65 - 80 YPos2 := A_ScreenHeight/2 + 130 - 80 YPosi1 := A_ScreenHeight/2 + 75 YPosi2 := A_ScreenHeight/2 + 119 YPosi3 := A_ScreenHeight/2 + 162 YPosi4 := A_ScreenHeight/24 *20 YPosi5 := A_ScreenHeight/24 *21 + 5 YPosi6 := A_ScreenHeight/24 *22 + 10 ; Eixo "Y" |Text YPosA := A_ScreenHeight/30 YPosB := A_ScreenHeight/12 YPosC := YPos2 + YPos2/6 + 20 YPosD := YPos2 + YPos2/6 + 46 YPosE := YPos2 + YPos2/6 + 65 YPosF := YPos2 + YPos2/6 + 105 YPosG := A_ScreenHeight/10 + 20 ; Eixo "Y" | position do checkbox 1check := YPosA*24 2check := YPosA*25 3check := YPosA*26 4check := YPosA*27 checkA := A_ScreenWidth/10,1 checkB := A_ScreenWidth/3,80 checkC := A_ScreenWidth/2 ; ======================================== altnome1 := 1check - 130 altnome2 := 1check - 90 altnome3 := 1check - 50 ; 1° GUI ; Colors if(FDD = 0){ colorB = 000000 colorF = Cfffffffff }else if(FDD = 1){ colorB = Cfffffffff colorF = 000000 } ; Launching the GUI - do not generate error images Gui, 1:color, %colorB% ; ======================================== ; Sets the font of the buttons Gui, Font, S13 CDefault, Verdana ; Only a Floppy if(quantidade =2){ Gui, Add, Button, x%XPosD% y%YPosm% w130 h75 , DISKETTE1_A Gui, Add, Button, x%XPosE% y%YPosm% w130 h75 , DISKETTE2_B } if(quantidade =3){ Gui, Add, Button, x%XPosD% y%YPosm% w130 h75 , DISKETTE1_A Gui, Add, Button, x%XPosM% y%YPosm% w130 h75 , DISKETTE2_B Gui, Add, Button, x%XPosE% y%YPosm% w130 h75 , DISKETTE3_C } if(quantidade =4){ Gui, Add, Button, x%XPosD% y%YPosm% w130 h64 , DISKETTE1_A Gui, Add, Button, x%XPosE% y%YPosm% w130 h64 , DISKETTE2_B Gui, Add, Button, x%XPosD% y%YPos1% w130 h64 , DISKETTE3_C Gui, Add, Button, x%XPosE% y%YPos1% w130 h64 , DISKETTE4_D } if(quantidade =5){ Gui, Add, Button, x%XPosD% y%YPosm% w130 h75 , DISKETTE1_A Gui, Add, Button, x%XPosE% y%YPosm% w130 h75 , DISKETTE2_B Gui, Add, Button, x%XPosM% y%YPos1% w130 h75 , DISKETTE3_C Gui, Add, Button, x%XPosD% y%YPos2% w130 h75 , DISKETTE4_D Gui, Add, Button, x%XPosE% y%YPos2% w130 h75 , DISKETTE5_E } if(quantidade =6){ Gui, Add, Button, x%XPosD% y%YPosm% w130 h75 , DISKETTE1_A Gui, Add, Button, x%XPosM% y%YPosm% w130 h75 , DISKETTE2_B Gui, Add, Button, x%XPosE% y%YPosm% w130 h75 , DISKETTE3_C Gui, Add, Button, x%XPosD% y%YPos1% w130 h75 , DISKETTE4_D Gui, Add, Button, x%XPosM% y%YPos1% w130 h75 , DISKETTE5_E Gui, Add, Button, x%XPosE% y%YPos1% w130 h75 , DISKETTE6_F } if(quantidade =7){ Gui, Add, Button, x%XPosD% y%YPosm% w130 h75 , DISKETTE1_A Gui, Add, Button, x%XPosM% y%YPosm% w130 h75 , DISKETTE2_B Gui, Add, Button, x%XPosE% y%YPosm% w130 h75 , DISKETTE3_C Gui, Add, Button, x%XPosD% y%YPos1% w130 h75 , DISKETTE4_D Gui, Add, Button, x%XPosM% y%YPos1% w130 h75 , DISKETTE5_E Gui, Add, Button, x%XPosE% y%YPos1% w130 h75 , DISKETTE6_F Gui, Add, Button, x%XPosM% y%YPos2% w130 h75 , DISKETTE7_G } if(quantidade =8){ Gui, Add, Button, x%XPosD% y%YPosm% w130 h75 , DISKETTE1_A Gui, Add, Button, x%XPosM% y%YPosm% w130 h75 , DISKETTE2_B Gui, Add, Button, x%XPosE% y%YPosm% w130 h75 , DISKETTE3_C Gui, Add, Button, x%XPosD% y%YPos1% w130 h75 , DISKETTE4_D Gui, Add, Button, x%XPosM% y%YPos1% w130 h75 , DISKETTE5_E Gui, Add, Button, x%XPosE% y%YPos1% w130 h75 , DISKETTE6_F Gui, Add, Button, x%XPosD% y%YPos2% w130 h75 , DISKETTE7_G Gui, Add, Button, x%XPosE% y%YPos2% w130 h75 , DISKETTE8_H } if(quantidade =9){ ; 1º row Gui, Add, Button, x%XPosD% y%YPosm% w100 h60 , DISKETTE1_A Gui, Add, Button, x%XPosM% y%YPosm% w100 h60 , DISKETTE2_B Gui, Add, Button, x%XPosE% y%YPosm% w100 h60 , DISKETTE3_C ; 2º row Gui, Add, Button, x%XPosD% y%YPos1% w100 h60 , DISKETTE4_D Gui, Add, Button, x%XPosM% y%YPos1% w100 h60 , DISKETTE5_E Gui, Add, Button, x%XPosE% y%YPos1% w100 h60 , DISKETTE6_F ; 3º row Gui, Add, Button, x%XPosD% y%YPos2% w100 h60 , DISKETTE7_G Gui, Add, Button, x%XPosM% y%YPos2% w100 h60 , DISKETTE8_H Gui, Add, Button, x%XPosE% y%YPos2% w100 h60 , DISKETTE9_I } ; ======================================== ; Launching the GUI Gui, -Caption Gui, Show, x0 y0 h%A_ScreenHeight% w%A_ScreenWidth% ; ======================================== ; adding Cover e Wheel Gui, 1: Show, x0 y0 h%A_ScreenHeight% w%A_ScreenWidth% Gui, 1:Add, Picture,x%XPosB% y%YPosG%, %A_ScriptDir%\Media\%systemName%\Images\Artwork3\%romName%.png Gui, 1:Add, Picture,x%XPosD% y%YPosB%, %A_ScriptDir%\Media\%systemName%\Images\Wheel\%romName%.png ; ======================================== Gui, 1: Show, x0 y0 h%A_ScreenHeight% w%A_ScreenWidth% ; ======================================== ; 2° GUI ; ======================================== ; adding buttons ; Gui Show, x0 y0 h%A_ScreenHeight% w%A_ScreenWidth% ; LAUNCHED PART BUTTONS AND WRITTEN ; ======================================== ; adding Text ; 1º Question Title Gui, 1: Font, S26 %colorF% Bold, Verdana Gui, 1: -Caption +ToolWindow %AlwaysOnTop% ;Gui +AlwaysOnTop -Caption +ToolWindow Gui, 1: Add, Text, x%XPosA% y%YPosA% w970 h50 BackgroundTrans, Choose a disk for te Device FDD %FDD% ; WinSet, TransColor, %Background_Color% 200 ; 3º ROM INFORMATION Gui, 1: Font, S12 %colorF% Bold, Verdana Gui, 1: Add, Text, x%XPosB% y%altnome1% w300 h40 , GAME : %sonomedojogo% `nDATE : %year% Gui, 1: Add, Text, x%XPosB% y%altnome2% w300 h40 , SOFT HOUSE : %produtoraD%`nNUMBER OF DISKS : %quantidade% Gui, 1: Add, Text, x%XPosB% y%altnome3% w300 h40 , Drive Disk %FDD%`ninitial %TDISKETTE% Gui, 1: Font, S7 %colorF% Bold, Verdana Gui, 1: Add, Button, x%XPosB% y%1check% w45 h20 , x68030 Gui, 1: Add, Button, x%XPosB% y%2check% w45 h20 , 10MB Gui, 1: Add, Button, x%XPosB% y%3check% w45 h20 , Reset Gui, 1: Font, S7 %colorF% Bold, Verdana Gui, 1: Add, Text, x%checkA% y%1check% w200 h25 , 43 Mhz mode (WinX68k) Gui, 1: Add, Text, x%checkA% y%2check% w200 h25 , Increase memory to 10 MB (WinX68k) Gui, 1: Add, Text, x%checkA% y%3check% w200 h25 , Reset Game Gui, 1: Font, S7 %colorF% Bold, Verdana ;Gui, 1: -Caption +ToolWindow %AlwaysOnTop% Gui, 1: Add, Button, x%checkB% y%1check% w45 h20 , Save Gui, 1: Add, Button, x%checkB% y%2check% w45 h20 , Load Gui, 1: Add, Button, x%checkB% y%3check% w45 h20 , Return Gui, 1: Font, S7 %colorF% Bold, Verdana Gui, 1: Add, Text, x%XPosD% y%1check% w200 h25 , Save : Save the Current Position of the game Gui, 1: Add, Text, x%XPosD% y%2check% w200 h25 , Load : Return to a position Saved Gui, 1: Add, Text, x%XPosD% y%3check% w200 h25 , Return : Return to Game return GuiClose: GuiEscape: 1GuiClose: 1GuiEscape: 2GuiClose: 2GuiEscape: ExitApp } ; ? ) DEFINE WHAT WILL MAKE EACH ;======================================================================================================== ; Each button corresponds to a specific number of disks ButtonDISKETTE1_A: { DISQUETE =1 Goto, TROCA } ButtonDISKETTE2_B: { DISQUETE =2 Goto, TROCA } ButtonDISKETTE3_C: { DISQUETE =3 Goto, TROCA } ButtonDISKETTE4_D: { DISQUETE =4 Goto, TROCA } ButtonDISKETTE5_E: { DISQUETE =5 Goto, TROCA } ButtonDISKETTE6_F: { DISQUETE =6 Goto, TROCA } ButtonDISKETTE7_G: { DISQUETE =7 Goto, TROCA } ButtonDISKETTE8_H: { DISQUETE =8 Goto, TROCA } ButtonDISKETTE9_I: { DISQUETE =9 Goto, TROCA } ; ? ) EXECUTE THE PROCESS OF CHANGE FLOPPY ;======================================================================================================== ; This configuirado to work in 2 emulators TROCA: { if(executable = "WinX68kHighSpeed_eng.exe"){ WinWait, ahk_class WinX68kHighSpeed, IfWinNotActive, ahk_class WinX68kHighSpeed, , WinActivate, ahk_class WinX68kHighSpeed, Sleep, 100 Send, {F11} Send, %FDD% WinWait, Select X68k disk image, Sleep, 100 clipboard= Sleep, 100 Loop, %romPath%%nomeraiz%%formato%%A_Space%%DISQUETE%*%romExtension%, , 1 clipboard= %A_LoopFileName% Sleep, 100 Send, {CTRL DOWN} Sleep, 50 Send, v Sleep, 100 Send, {CTRL UP} Sleep, 150 Send, {ENTER} Sleep, 150 WinWait, ahk_class WinX68kHighSpeed, IfWinNotActive, ahk_class WinX68kHighSpeed, , WinActivate, ahk_class WinX68kHighSpeed, WinWaitActive, ahk_class WinX68kHighSpeed, Sleep, 150 WinShow, ahk_class WinX68kHighSpeed Sleep, 200 Process, WaitClose, %executable% Gui, destroy return } else if (executable = "XM6.exe"){ WinWait, ahk_class AfxFrameOrView70, IfWinNotActive, ahk_class AfxFrameOrView70, , WinActivate, ahk_class AfxFrameOrView70, MouseClick, right, 0, 0 Send, %FDD% Send, {Enter} WinWait, ahk_class #32770, clipboard= Sleep, 100 Loop, %romPath%%nomeraiz%%formato%%A_Space%%DISQUETE%*%romExtension%, , 1 clipboard= %A_LoopFileName% Sleep, 100 Send, {CTRL DOWN} Sleep, 50 Send, v Sleep, 100 Send, {CTRL UP} Sleep, 150 Send, {ENTER} Sleep 1000 WinShow, ahk_class AfxFrameOrView70 Gui, destroy Process, WaitClose, %executable% return } } ; ? ) Button Return ;======================================================================================================== ; Simply close the GUI and back of the screen emulators ButtonReturn: { if(executable = "WinX68kHighSpeed_eng.exe"){ WinWait, ahk_class WinX68kHighSpeed, IfWinNotActive, ahk_class WinX68kHighSpeed, , WinActivate, ahk_class WinX68kHighSpeed, WinWaitActive, ahk_class WinX68kHighSpeed, Sleep, 100 WinShow, ahk_class WinX68kHighSpeed Sleep, 200 Gui, destroy return } else if (executable = "XM6.exe"){ WinWait, ahk_class AfxFrameOrView70, IfWinNotActive, ahk_class AfxFrameOrView70, , WinActivate, ahk_class AfxFrameOrView70, Sleep, 100 WinShow, ahk_class AfxFrameOrView70 Sleep, 200 Gui, destroy return } } ; ? ) SAVE - SAVE THE GAME IN THE CURRENT POCIÇÃO ;======================================================================================================== ; The script will save the game with your 1st name ButtonSave: { if(executable = "WinX68kHighSpeed_eng.exe"){ DetectHiddenWindows, on WinWait, ahk_class WinX68kHighSpeed, IfWinNotActive, ahk_class WinX68kHighSpeed, , WinActivate, ahk_class WinX68kHighSpeed, Sleep, 100 Send, {F11} Sleep, 100 Send, s Sleep, 100 Send, s WinWait, Save State, Sleep, 100 clipboard= Sleep, 100 clipboard=%sonomedojogo%.x68 Sleep, 100 Send, {CTRL DOWN} Sleep, 100 Send, v Sleep, 100 Send, {CTRL UP} Sleep, 100 Send, {ENTER} Sleep, 150 WinWait, ahk_class WinX68kHighSpeed, IfWinNotActive, ahk_class WinX68kHighSpeed, , WinActivate, ahk_class WinX68kHighSpeed, WinWaitActive, ahk_class WinX68kHighSpeed, Sleep, 150 WinShow, ahk_class WinX68kHighSpeed Process, WaitClose, %executable% Gui, destroy return } else if (executable = "XM6.exe"){ DetectHiddenWindows, on WinWait, ahk_class AfxFrameOrView70, IfWinNotActive, ahk_class AfxFrameOrView70, , WinActivate, ahk_class AfxFrameOrView70, Send, {F10} WinWait, XM6 [Running], IfWinNotActive, XM6 [Running], , WinActivate, XM6 [Running], WinWaitActive, XM6 [Running], Send, {DOWN} Sleep, 100 Send, {DOWN} Sleep, 100 Send, {DOWN} Sleep, 100 Send, {ENTER} Sleep, 100 WinWait, Save As, Sleep, 100 clipboard= Sleep, 100 clipboard=%sonomedojogo%.XM6 Sleep, 100 Send, {CTRL DOWN} Sleep, 100 Send, v Sleep, 100 Send, {CTRL UP} Sleep, 100 Send, {ENTER} Sleep, 150 WinWait, ahk_class AfxFrameOrView70, IfWinNotActive, ahk_class AfxFrameOrView70, , WinActivate, ahk_class AfxFrameOrView70, Sleep, 150 WinShow, ahk_class AfxFrameOrView70 Process, WaitClose, %executable% Gui, destroy return } } ; ? ) LOAD - SAVE BEARS TO PERSON 1 NAME OF THE GAME ;======================================================================================================== ; The script will look for the pattern of this script and save Carregal ButtonLoad: { if(executable = "WinX68kHighSpeed_eng.exe"){ DetectHiddenWindows, on WinWait, ahk_class WinX68kHighSpeed, IfWinNotActive, ahk_class WinX68kHighSpeed, , WinActivate, ahk_class WinX68kHighSpeed, Sleep, 100 Send, {F11} Sleep, 100 Send, s Sleep, 100 Send, l WinWait, Load State, Sleep, 100 clipboard= Sleep, 100 clipboard=%sonomedojogo%.x68 Sleep, 100 Send, {CTRL DOWN} Sleep, 100 Send, v Sleep, 100 Send, {CTRL UP} Sleep, 100 Send, {ENTER} Sleep, 150 WinWait, ahk_class WinX68kHighSpeed, IfWinNotActive, ahk_class WinX68kHighSpeed, , WinActivate, ahk_class WinX68kHighSpeed, WinWaitActive, ahk_class WinX68kHighSpeed, Sleep, 150 WinShow, ahk_class WinX68kHighSpeed Process, WaitClose, %executable% Gui, destroy return } else if (executable = "XM6.exe"){ DetectHiddenWindows, on WinWait, ahk_class AfxFrameOrView70, IfWinNotActive, ahk_class AfxFrameOrView70, , WinActivate, ahk_class AfxFrameOrView70, Send, {F10} WinWait, XM6 [Running], IfWinNotActive, XM6 [Running], , WinActivate, XM6 [Running], WinWaitActive, XM6 [Running], Send, {DOWN} Sleep, 100 Send, {ENTER} Sleep, 100 WinWait, Open, Sleep, 100 clipboard= Sleep, 100 clipboard=%sonomedojogo%.XM6 Sleep, 100 Send, {CTRL DOWN} Sleep, 100 Send, v Sleep, 100 Send, {CTRL UP} Sleep, 100 Send, {ENTER} Sleep, 150 WinWait, ahk_class AfxFrameOrView70, IfWinNotActive, ahk_class AfxFrameOrView70, , WinActivate, ahk_class AfxFrameOrView70, Sleep, 150 WinShow, ahk_class AfxFrameOrView70 Process, WaitClose, %executable% Gui, destroy return } } ; ? ) RESET - RESET Emulators ;======================================================================================================== ; Reset the emulator ButtonReset: { if(executable = "WinX68kHighSpeed_eng.exe"){ DetectHiddenWindows, on WinWait, ahk_class WinX68kHighSpeed, IfWinNotActive, ahk_class WinX68kHighSpeed, , WinActivate, ahk_class WinX68kHighSpeed, Sleep, 100 Send, {F11} Sleep, 100 Send, {DOWN} Sleep, 100 Send, {ENTER} WinWait, ahk_class WinX68kHighSpeed, IfWinNotActive, ahk_class WinX68kHighSpeed, , WinActivate, ahk_class WinX68kHighSpeed, WinWaitActive, ahk_class WinX68kHighSpeed, Sleep, 150 WinShow, ahk_class WinX68kHighSpeed Process, WaitClose, %executable% Gui, destroy return } else if (executable = "XM6.exe"){ DetectHiddenWindows, on WinWait, ahk_class AfxFrameOrView70, IfWinNotActive, ahk_class AfxFrameOrView70, , WinActivate, ahk_class AfxFrameOrView70, Send, {F10} WinWait, XM6 [Running], IfWinNotActive, XM6 [Running], , WinActivate, XM6 [Running], WinWaitActive, XM6 [Running], Send, {DOWN} Sleep, 100 Send, {DOWN} Sleep, 100 Send, {DOWN} Sleep, 100 Send, {DOWN} Sleep, 100 Send, {ENTER} Sleep, 100 WinWait, ahk_class AfxFrameOrView70, IfWinNotActive, ahk_class AfxFrameOrView70, , WinActivate, ahk_class AfxFrameOrView70, Sleep, 150 WinShow, ahk_class AfxFrameOrView70 Process, WaitClose, %executable% Gui, destroy return } } ;======================================================================================================== ; BUTTON 43 mhz - x68030 ;======================================================================================================== Buttonx68030: { if(executable = "WinX68kHighSpeed_eng.exe"){ DetectHiddenWindows, on WinWait, ahk_class WinX68kHighSpeed, IfWinNotActive, ahk_class WinX68kHighSpeed, , WinActivate, ahk_class WinX68kHighSpeed, Sleep, 100 Send, {F11} Sleep, 100 Send, o Sleep, 50 Send, {DOWN} Sleep, 50 Send, {DOWN} Sleep, 50 Send, {DOWN} Sleep, 50 Send, {DOWN} Sleep, 50 Send, {DOWN} Sleep, 50 Send, {DOWN} Sleep, 50 Send, {DOWN} Sleep, 50 Send, {ENTER} WinWait, ahk_class WinX68kHighSpeed, IfWinNotActive, ahk_class WinX68kHighSpeed, , WinActivate, ahk_class WinX68kHighSpeed, WinWaitActive, ahk_class WinX68kHighSpeed, Sleep, 150 WinShow, ahk_class WinX68kHighSpeed Process, WaitClose, %executable% Gui, destroy return } else if (executable = "XM6.exe") { MsgBox, only implemented for WinX68kHighSpeed`nsupport in the native script XM6. Sleep, 400 } } ;======================================================================================================== ; BUTTON UP MEMORY 10MB ;======================================================================================================== Button10MB: { if(executable = "WinX68kHighSpeed_eng.exe"){ DetectHiddenWindows, on WinWait, ahk_class WinX68kHighSpeed, IfWinNotActive, ahk_class WinX68kHighSpeed, , WinActivate, ahk_class WinX68kHighSpeed, Sleep, 100 Send, {F11} Sleep, 100 Send, o Sleep, 50 Send, {UP} Sleep, 50 Send, {UP} Sleep, 50 Send, {ENTER} WinWait, The amount of MainMemory, Cancel IfWinNotActive, The amount of MainMemory, Cancel, WinActivate, The amount of MainMemory, Cancel WinWaitActive, The amount of MainMemory, Cancel Send, {DEL}{DEL}{DEL}{DEL}10{ENTER} WinWait, ahk_class WinX68kHighSpeed, IfWinNotActive, ahk_class WinX68kHighSpeed, , WinActivate, ahk_class WinX68kHighSpeed, Sleep, 100 Send, {F11} Sleep, 100 Send, {DOWN} Sleep, 100 Send, {ENTER} WinWait, ahk_class WinX68kHighSpeed, IfWinNotActive, ahk_class WinX68kHighSpeed, , WinActivate, ahk_class WinX68kHighSpeed, WinWaitActive, ahk_class WinX68kHighSpeed, Sleep, 150 WinShow, ahk_class WinX68kHighSpeed Process, WaitClose, %executable% Gui, destroy return } else if (executable = "XM6.exe") { MsgBox, only implemented for WinX68kHighSpeed`nsupport in the native script XM6. Sleep, 400 } } The script may be more mature than it already, but for this you need the feerback if wants a voice will be welcomed.
djvj Posted October 2, 2011 Posted October 2, 2011 Please translate the notes into english in the module, this is an english speaking forum. There is sooooo much redundant code in that script btw. It does not need to be that big. "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music."RocketLauncher's Official Home If you appreciate my work:My Apps:Window LoggerIdle Volume AdjusterExplorerRestorerRom Folder CleanerModule UpdaterMy Guides:How To Mod Guncons with Aimtrak
darkbelmonte Posted October 3, 2011 Author Posted October 3, 2011 Please translate the notes into english in the module, this is an english speaking forum.There is sooooo much redundant code in that script btw. It does not need to be that big. djvj, Excuse my lack of attention, but it updated the information from the script into English. For the script I found the Sharp X68000 solutions present in this script and I know that in many cases can be simplified, but I appreciate the feedback and obsevações who wish to do.
djvj Posted October 3, 2011 Posted October 3, 2011 Thanks darkbelmonte, now if someone wants to help you, they can understand and read through the script better. "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music."RocketLauncher's Official Home If you appreciate my work:My Apps:Window LoggerIdle Volume AdjusterExplorerRestorerRom Folder CleanerModule UpdaterMy Guides:How To Mod Guncons with Aimtrak
BadBoyBill Posted October 3, 2011 Posted October 3, 2011 FYI, the official DB naming for multi disc games needs to be Game Name (Disc1), Game Name (Part2), Game Name (Tape3) etc... No spacing between number and type. Hope this doesnt affect any of your scripts.
spotUP Posted December 14, 2014 Posted December 14, 2014 Is this script for an old version of Hyperlaunch? I have added it but the emu doesn't appear as an option for my "Sharp X68000" system..?
Recommended Posts
Archived
This topic is now archived and is closed to further replies.