Thread: bsnes module update

Results 1 to 4 of 4
  1. Collapse Details
    bsnes module update 
    #1
    Junior Member
    MainSecondary
    Join Date
    May 2018
    Posts
    5
    Contribute If you enjoy reading the
    content here, click the below
    image to support our site.
    Click Here To Contribute To Our Site
    Hi,
    I'm trying to use the last bsnes with rocketlauncher but the module actually it's old and useless.
    1)I've tried to edit the module myself but i can't get the ahk_class, windows spy show me ahk_class hiroWindows (same of higan emulator) but this is not the right name and i always got an error;
    2)Fullscreen seeme to not work;
    3)the module it's reading settings from an %appdata% folder, but the last release of bsnes seem to not save the option there;

    Anybody can help me update the module?

    PS Little question: it's just a mine impression or it's been a long time since the last Rocketlauncher update?
    PPS: same question of this topic
    http://www.rlauncher.com/forum/showt...4084#post44084
     

  2. Collapse Details
    Re: bsnes module update 
    #2
    Super Moderator
    agent47's Avatar
    MainSecondary
    Join Date
    Jan 2016
    Posts
    1,177
    I've written a module for the new bsnes that I'll probably post in the next few weeks along with all my others.

    In the meantime you could probably just use the higan module with the new bsnes. To answer your questions:

    1. hiroWindow is the correct window class
    2. If you're using an old bsnes module fullscreen will not work because higan/new bsnes use a command line param instead of a settings file value
    3. new bsnes uses a different settings file type compared to old versions but it's the same as higan although the location may be different

    Yes, official updates have been suspended for quite a while and there's no ETA of when they will resume. I usually post module updates on the forum when they're requested and I have been updating all the modules and creating new ones that I plan to upload and sticky to make them easier to find. Unfortunately, I'm pretty much the only one updating modules atm so you have to wait until I have time to work on them or edit them yourself for the time being.
     

  3. Collapse Details
    Re: bsnes module update 
    #3
    Junior Member
    MainSecondary
    Join Date
    May 2018
    Posts
    5
    Thanks for the reply agent47!
    Thanks to the answer you give me, i am a newbie in ahk programming and i was doing some experiment since i am making a site to help italian poeple using Hyperspin and Rocketlauncher.
    Actually i am using Higan but the best way to use bsnes it's through his retroarch core.
    Don't worry, take your time to update. create add post module, working alone require so much time
     

  4. Collapse Details
    Re: bsnes module update 
    #4
    Junior Member
    MainSecondary
    Join Date
    May 2018
    Posts
    5
    Quote Originally Posted by agent47 View Post
    I've written a module for the new bsnes that I'll probably post in the next few weeks along with all my others.

    In the meantime you could probably just use the higan module with the new bsnes. To answer your questions:

    1. hiroWindow is the correct window class
    2. If you're using an old bsnes module fullscreen will not work because higan/new bsnes use a command line param instead of a settings file value
    3. new bsnes uses a different settings file type compared to old versions but it's the same as higan although the location may be different

    Yes, official updates have been suspended for quite a while and there's no ETA of when they will resume. I usually post module updates on the forum when they're requested and I have been updating all the modules and creating new ones that I plan to upload and sticky to make them easier to find. Unfortunately, I'm pretty much the only one updating modules atm so you have to wait until I have time to work on them or edit them yourself for the time being.
    UPDATE, base on your tips i decided to edit the higan module to be used with the last bsnes (because the two emulator are from the same author) and it seems to work well, fullscreen ok and no ahk_class error.
    I post the code here just for information if someone need it.

    Spoiler: 
    MEmu := "Bsnes & Bsnes HD"
    MEmuV := "v109"
    MURL := ["http://byuu.org/higan/"]
    MAuthor := ["djvj (edited)"]
    MVersion := "2.0.7"
    MCRC := "B6639EFE"
    iCRC := "4D06E1E6"
    MID := "635038268899159961"
    MSystem := ["Nintendo Entertainment System","Nintendo Famicom","Nintendo Game Boy","Nintendo Game Boy Color","Nintendo Satellaview","Nintendo Super Famicom","Super Nintendo Entertainment System"]
    ;----------------------------------------------------------------------------
    ; Notes:
    ; You can set your Exit key in the emu by going to Settings->Configuration Settings->Input->Hotkeys->Exit Emulator (not needed for this script)
    ; If you want to use xpadder, or joy2key, goto Settings->Advanced Settings and change Input to DirectInput
    ; Fullscreen is controlled via GUi when running the module directly
    ; Sram Support is controlled via GUi when running the module directly - If true, the module will backup srm files into a backup folder and copy them back to the 7z_Extract_Path so higan can load them upon launch. You really only need this if you use 7z support (and 7z_Delete_Temp is true) or your romPath is read-only.
    ; If you use 7z support, the games that require special roms (dsp/cx4), the roms needs to be inside the 7z with the game. Otherwise you will get an error about the missing rom.
    ; You can find the dsp roms needed for some games here: http://www.caitsith2.com/snes/dsp/ and a list of what games use what chip here: http://wiki.pocketheaven.com/index.p..._special_chips
    ; On v0.97, ; higan stores its config in the emuPath and Bezels require fixedresmode, so set the scale you want in the emu which will control the size of the bezels.
    ; On older versions, higan stores its config @ C:\Users\%USER%\AppData\Roaming\higan
    ;----------------------------------------------------------------------------
    StartModule()
    BezelGUI()
    FadeInStart()

    primaryExe := new Emulator(emuPath . "\" . executable) ; instantiate emulator executable object
    emuPrimaryWindow := new Window(new WindowTitle("hiroWindow")) ; instantiate primary emulator window object

    fullscreen := moduleIni.Read("Settings", "Fullscreen","true",,1)
    sramSupport := moduleIni.Read("Settings", "SRAM_Support","true",,1)
    bezelTopOffset := moduleIni.Read("Settings", "bezelTopOffset","51",,1)
    bezelBottomOffset := moduleIni.Read("Settings", "bezelBottomOffset","31",,1)
    bezelLeftOffset := moduleIni.Read("Settings", "bezelLeftOffset","7",,1)
    bezelRightOffset := moduleIni.Read("Settings", "bezelRightOffset","7",,1)
    legacyMode := moduleIni.Read("Settings", "Legacy_Mode","false",,1)

    If (legacyMode = "true") {
    emuPrimaryWindow := new Window(new WindowTitle("hiroWindow")) ; instantiate primary emulator window object
    BezelStart()
    hideEmuObj := Object(emuPrimaryWindow,1)

    ; Set desired fullscreen mode
    HiganSettingsFile := new File(A_AppData . "\higan\settings.bml")
    HiganSettingsFile.CheckFile()
    HiganSettingsFile.Read()
    currentFullScreen := (InStr(higanCfg, "StartFullScreen: true") ? ("true") : ("false"))
    If (Fullscreen != "true" And currentFullScreen = "true") {
    StringUtils.Replace(HiganSettingsFile.Text, HiganSettingsFile.Text, "ShowStatusBar:true", "ShowStatusBar:false")
    SaveFile(HiganSettingsFile.Text)
    } Else If ( Fullscreen = "true" And currentFullScreen = "false" ) {
    StringUtils.Replace(HiganSettingsFile.Text, HiganSettingsFile.Text, "ShowStatusBar:false", "ShowStatusBar:true")
    SaveFile(HiganSettingsFile.Text)
    }
    } Else {
    emuPrimaryWindow := new Window(new WindowTitle(,"hiroWindow")) ; instantiate primary emulator window object
    BezelStart("FixResMode")
    hideEmuObj := Object(emuPrimaryWindow,1)

    If (bezelEnabled = "true") {
    HiganSettingsFile := new File(emuPath . "\settings.bml")
    HiganSettingsFile.CheckFile()
    HiganSettingsFile.Read()
    currentStatusBar := InStr(HiganSettingsFile.Text, "ShowStatusBar:true") ? "true" : "false"
    If (currentStatusBar = "true") {
    StringUtils.Replace(HiganSettingsFile.Text, HiganSettingsFile.Text, "ShowStatusBar:true", "ShowStatusBar:false")
    SaveFile(HiganSettingsFile.Text)
    } Else If (currentStatusBar = "false") {
    StringUtils.Replace(HiganSettingsFile.Text, HiganSettingsFile.Text, "ShowStatusBar:false", "ShowStatusBar:true")
    SaveFile(HiganSettingsFile.Text)
    }
    }

    If (Fullscreen = "true")
    params := " --fullscreen"
    }

    7z(romPath, romName, romExtension, sevenZExtractPath)

    ; copy backed-up srm files to folder where rom is located
    If (sramSupport = "true") {
    RAMFile := new File(romPath . "\" romName . romExtension . "\save.ram")
    RAMBackupFile := new File(emuPath . "\srm\MSU1\" . romName . "\save.ram")
    If RAMBackupFile.Exist()
    RAMBackupFile.Copy(romPath . "\" . romName . romExtension,1) ;overwriting existing ram with backup if it exists in destination folder
    SRMFile := new File(romPath . "\" . romName . ".srm")
    SRMBackupFile := new File(emuPath . "\srm\" . romName . ".srm")
    If SRMBackupFile.Exist()
    SRMBackupFile.Copy(romPath,1) ; overwriting existing srm with backup if it exists in destination folder
    }

    HideAppStart(hideEmuObj,hideEmu)
    primaryExe.Run((If params ? params : "") . " """ . romPath . "\" . romName . romExtension . """")

    emuPrimaryWindow.Wait()
    emuPrimaryWindow.WaitActive()

    BezelDraw()
    HideAppEnd(hideEmuObj,hideEmu)
    FadeInExit()

    ; emuPrimaryWindow.Move(0, 0) ; when going from fullscreen to window, higan still has its menubar hidden, uncomment this to access it
    ; emuPrimaryWindow.MenuSelectItem("Super Famicom", "Port 2", "Justifier")
    primaryExe.Process("WaitClose")

    ; Back up srm file so it is available for next launch
    If (sramSupport = "true") {
    If !RAMBackupFile.Exist("folder")
    RAMBackupFile.CreateDir() ; create ram folder if it doesn't exist
    RAMFile.Copy(RAMBackupFile.FilePath,1)
    If !SRMBackupFile.Exist("folder")
    SRMBackupFile.CreateDir() ; create srm folder if it doesn't exist
    SRMFile.Copy(SRMBackupFile.FilePath,1)
    }

    7zCleanUp()
    BezelExit()
    FadeOutExit()
    ExitModule()


    SaveFile(text) {
    HiganSettingsFile.Delete()
    HiganSettingsFile.Append(text)
    }

    BezelLabel:
    disableHideTitleBar := "true"
    disableHideToggleMenu := "true"
    disableHideBorder := "true"
    Return

    CloseProcess:
    FadeOutStart()
    emuPrimaryWindow.Close()
    Return
     

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •