Jump to content

Tux

Ultra Members
  • Posts

    1,060
  • Joined

  • Last visited

  • Days Won

    219

Posts posted by Tux

  1. I just added support for bps files, not sure it will really be useful, but I found an example of a patch using a bps here : https://www.romhacking.net/hacks/6689/

    and I was curious to see it working, even if nes graphics are quite ugly... !

    In the end it works. You need to create a dat file manually for this example, extract the bps files to a dkong directory in the ips directory, then put this into the dat file :
     

    c-2j.bpr    c-2j    CRC(d6412358)
    c-2k.bpr    c-2k    CRC(e273ede5)
    l_4m_b.bin    l_4m_b    CRC(59f8054d)
    l_4n_b.bin    l_4n_b    CRC(672e4714)
    l_4r_b.bin    l_4r_b    CRC(feaa59ee)
    l_4s_b.bin    l_4s_b    CRC(20f2ef7e)
    v_3pt.bin    v_3pt    CRC(15e9c5e9)
    v_5h_b.bin    v_5h_b    CRC(12c8c95d)
    
    [en_US]
    Kana Kong Arcade v1.0

     

    The crc infos are totally optional, in fact these crcs are given in the bps files, but they are just used in the end to check everything went correctly for now.

    It was fun adding this anyway !

    this bps support doesn't check for conflicts, I wouldn't imagine applying more than 1 bps file to a rom even if in theory it's possible...

  2. 5 hours ago, Augusto said:

    Thanks for replying.

    Not problem for me if not updating the appimage now.

    Thanks Tux.

    Good news I had some fun with this crazy setup to build appimages again, a docker container having ubuntu bionic in it, customized with an up to date sdl2 (2.0.26.5 for both 32 and 64 bits now). I added some code to detect the lua-5.3 from bionic, I don't guarantee it will work for every distribution but at least it works for arch and ubuntu bionic !

    So it works, I have some appimage files, and I had even forgotten some file in it last time.

    But you'll have to wait a little more, the next version is not ready yet.

  3. The bug was fixed in 0.95.4, as stated in the release :

     - revert a neogeo optimization which made unibios crazy with its strange screensaver (a black screen when using their cheat menu)

    I won't update the appimage all the time, sorry, but the bug happens only when you try to display an unibios specific screen while ingame, so just don't do that. I'll try to update the appimage next time.

     

  4. On 4/29/2023 at 6:41 AM, mer-curious said:

    😊 Hello Tux! Thanks a lot for this new release and for the quick follow-up fix. I haven't tried the new cheats system yet, but I certainly will eventually, and then I'll come

    - Finally, I was thinking about a new way to remember the cursor position in the game selection menu. Currently if you select a game from the Recents or the Most played lists, run the game and then return to the game selection list, Raine will take you to the game name in the main list instead of the top of the list which is where you were (the Recents and Most played are placed there). My suggestion is to implement the following condition: if you load a game from the Recents or Most played lists, the cursor will be in the top of the list when you return to the game selection menu; likewise, if you load a game directly by its name in the main full game selection list, then Raine will remember the cursor position in that game and take you back there when returning to the game selection list.

    After thinking, we could add a shortcut for the joystick to switch to the top entries where the most recent commands are, with the keyboard it's the tab key. Any proposal for the default button to use on the joystick ? (probably select or start)

    edit : it's done, with the back button, which is select on a playstation controller.

    • Like 1
  5. 10 hours ago, mer-curious said:

    😊 Hello Tux! Thanks a lot for this new release and for the quick follow-up fix. I haven't tried the new cheats system yet, but I certainly will eventually, and then I'll come

    - The Guide button from the X360 controllers are automatically mapped to the "Stop emulation" function now, but you cannot leave the GUI with the button as you would with the ESC key. Isn't it possible to make it work as exactly as the ESC key does in this function? Otherwise it's just another "Return to the GUI" alternative as we discussed in the other thread. For reference, you can open and close the GUI in Retroarch with the Guide button.

    For now just use button 2 instead of guide, and it just closes the current dialog as does ESC key. If the guide key was handled here it would have to close all dialogs to return to the game, there is currently no function to do that. Just press button 2, it would be B, it's must easier !

    10 hours ago, mer-curious said:

    - By the way, the GUI glitch in the Inputs menu is still present in this version, as you see here. But now you need to connect a controller with the program already opened and displaying the "Raine controls" menu in order to trigger the glitch. A little uncommon to have this scenario, but it's still there if you would like to take a look.

    - Finally, I was thinking about a new way to remember the cursor position in the game selection menu. Currently if you select a game from the Recents or the Most played lists, run the game and then return to the game selection list, Raine will take you to the game name in the main list instead of the top of the list which is where you were (the Recents and Most played are placed there). My suggestion is to implement the following condition: if you load a game from the Recents or Most played lists, the cursor will be in the top of the list when you return to the game selection menu; likewise, if you load a game directly by its name in the main full game selection list, then Raine will remember the cursor position in that game and take you back there when returning to the game selection list.v

    I thought of this because playing using a controller from the couch becomes easier if you can quickly select a game using the Recents and Most played lists, but when you return to the game selection then the cursor is down there in the game name, so it takes a few moments longer to return to the top and enter the lists again.

    Very fast if you use the direction pad left, and keep it down, there is an auto repeat which brings you to the top in a super short time.

    But the fastest remains the alphabetical keys in the keyboard, you can't beat this to quickly find a game in the game list, it even makes most recent lists useless.

    10 hours ago, mer-curious said:

    Anyway, just some minor details which I come through when using your emulator in some different scenarios. If it's easily doable, OK, if not, let it for another time.

    I really appreciate your attention to read my posts.

    Thank you so much again for your work.

     

  6. Yeah, ffman1985 was making bigger and bigger scripts which were harder and harder for the old script system, so I tried an lua interface instead, and it made wonders, I can have 0% in Misc with a console script active in linux with the 32 bits version constantly !

    The console scripts are available for xmcotar1d, sfz2ald, sfad, af2, af2j, sf2hf, sf2hfj, sf2ce, sf2cejc. For now the old normal version is still available for comparison, but since we couldn't find any bug it will probably be removed next time. The lua version has [lua] at the end of its title. There is a perl converter to convert from the old scripts to the new lua syntax, but it's useful only for those writing scripts !

    You can read more details about the crazy work from ffman1985 with these scripts there, and post something for him too :

    This means you get a new dll, it's included in the raine32 and raine64 zip files for now.

    Except that :
     - some last fixes for the multiple files selector to preload ips dat files
     - a setting to disable ips files globally (at the top of the "preload ips dat files" file selector)
     - revert a neogeo optimization which made unibios crazy with its strange screensaver (a black screen when using their cheat menu)
     - a fix so that keys which open a gui dialog are not seen as always down when returning to the game

    Get it from there : http://raine.1emulation.com/download/latest.html

    linux binaries updated (except the appImage)

    edit : oh by the way, the how to compile guide was updated too for lua, and I added a part about the minimum things to know about mingw if you install it only to compile raine.

    • Like 2
  7. The glorious 1st luascript :

    luascript "test 2 alt [lua]"
    run:
       poke(0xFF4BE1,0xF3)
       poke(0xFF26AD,0x71)
       for i=0,0x2ac,4 do
          dpoke(0x90c090+i,0x6000)
        end

    it's still for mshud, so it's the same syntax as a usual script, except the contents of the sections is directly some lua code.

    peek, dpeek, lpeek, poke, dpoke, lpoke are supported, but these are the only functions supported for now in lua, but with this we should be able to convert most of your scripts already !

    (notice the ; is actually only useful if you have everything in 1 line, otherwise you can forget it)

    This is of course work in progress, if you try to pass a parameter to such a script it will be ignored.

    But it's progressing fast anyway ! ;-)

    edit : and fixed for windows... !

  8. 18 minutes ago, ffman1985 said:

    Happy to hear that you find the way to modify the for loop function which make is so fast now. But there is problem in compiling (check pm), I will test it afterward.

    For xmcotar1d, it was a script made in early Feb, there was many new skills not used in that time (like press start button to skip the opening). But the good news is, there will be a update very soon.

     

    P.S. The following script should not break anything, it just removes text.

    script "Remove 'Press Start' text"
    on:
        for counter=0 counter<=$C0 counter=counter+8 poke $924005+counter $00

    This one is exactly like the previous one, except poke instead of dpoke. I needed something where you see a heavy misc usage, but it's not an emergency, it can wait. For the pm you cut the message too much, the important part is gone there !

    and without looking at the message, if you install lua it should compile without any warning, for the 32 bits mingw32 shell it's pacman -S mingw-w64-i686-lua translate to the equivalent package name for mingw64.

  9. Returning to your original script, xmcotar1d, it was slow in its time so it's a good candidate to test with lua, I can't navigate the menu in the start screen... 1st it displays press start, you must still insert a coin, contrary to some more recent scripts, then you reach the start screen with your "ARCADE" text printed below, there direction keys should navigate the menu, right ? Because they don't for me... Did I miss something or did we break it at some moment ?

  10. Rename the function : sorry it's always been like this, it's documented in the very old 0.28 documentation, so maybe one day, but not for now.

    Guide as default : never done that, so I tried it to see how to map a button for a controller. It will work only if a controller is recognized, otherwise it will be button 6, and of course only for those like you... and probably you only + some eventual new users start without any config file. It's one anyway.

    for the swap : the gui doesn't even use x & y buttons for now, so really there is no point for the gui, and maybe some users like the default nintendo placement, it's their choice after all, so they change the mapping if they want.
    For some reason mine was overwritten and I had to recreate it. No idea why it was overwritten, I'll have to be more careful... !

  11. 16 hours ago, ffman1985 said:

    Hello, Tux. Sorry that I make a typing mistake in my previous post which cause a misunderstanding. I update my message as follows:

    When I change your script to the following, it DOES NOT work after reset. (if the script extecutes in the 1st run)

    script "test 2 alt"
    run:
       poke $FF4BE1 $F3
       poke $FF26AD $71
       for counter=0 counter<=$2ac counter=counter+4 dpoke $90c090+counter $6000

    Actually I have just experimented with some lua binding to do this kind of thing, I can get this run script to run at 0% misc on a debug build with a lua binding !

    The script becomes this :

    script "test 2 alt"
    run:
       poke $FF4BE1 $F3
       poke $FF26AD $71
    #for counter=0 counter<=$2ac counter=counter+4 dpoke $90c090+counter $6000
       lua for i=0,0x2ac,4 do dpoke(0x90c090+i,0x6000); end

     

    The lua for is like the C one in even shorter, you don't even write the test in full, nor the increment. The trick which makes it so much faster than our classic script functions is that here it's allowed to pass numbers directly to functions, so the dpoke here doesn't have to do any string conversion, it's a super short function which writes almost directly to ram !

    That's also why you are obliged to use the 0x notation for hex numbers, which I don't like personally, but it's the one officially used by C and lua for numbers and you don't want to convert strings to numbers here, so you have to use their notation.

    I tried first to interface lua to our usual do_poke function and I got something around 38% in misc with the debug build, so I tried this direct version with numbers instead -> down to 0% !

    Now it's something ultra experimental, on arch I was obliged to use some tricks for the 32 bits package because these morons (I like them usually but here they are morons !) don't provide a 32 bits package for lua53, so you need to build it yourself, which won't be easy for the official package for sure. Plus it uses liblua.so for the 32 bits package, and liblua5.3.so for the 64 bits package, not sure how it will work in mingw... !

    But it's interesting nonetheless... It's not pushed to git yet, I'll have to test this in windows first... !

    Ah and also : lua knows only about dpoke, this is the only function I added for it !

    edit : I had a quick look at mingw32 and actually they don't have any lua-5.3 package, then I found out that finally the same interface can be used with lua-5.4, so I pushed everything to git, just install the latest lua package from mingw32, it should work.

    Notice that you can experiment with lua code in the console, you get some nicely displayed error messages from the lua interpreter in the console. I didn't test the compilation in mingw32 yet... !

    edit 2 : windows build fixed, mainly memwatch stupid types in windows, and put lua lib in all the builds except dos (no idea if there is a lua for dos, but there is no console in dos !).

    Oh yeah by the way lua uses ; sometimes to finish an instruction like here for dpoke, if you remove the ; you get an error, so ; are not recognized as comments anymore !

  12. 1 hour ago, ffman1985 said:

    Hello, Tux. Sorry that I make a typing mistake in my previous post which cause a misunderstanding. I update my message as follows:

    When I change your script to the following, it DOES NOT work after reset. (if the script extecutes in the 1st run)

    script "test 2 alt"
    run:
       poke $FF4BE1 $F3
       poke $FF26AD $71
       for counter=0 counter<=$2ac counter=counter+4 dpoke $90c090+counter $6000

    Ah yes good lesson... !

    Well I have a good news and a bad news !

    The good news is that it's fixed...

    The bad news is that it was very fast because it executed only the 1st time, it was not exactly a bug in the for code, it was because of the recent optimization of the script, now lines are parsed the 1st time they are executed, and then it's some semi compiled code which is executed, and with the inserted instruction starting at argument 4, the instruction itself, it was really not supported ! So after fixing this, it becomes slow as it should have been, I was surprised it was so fast, but didn't care enough to investigate, it was because it was executed only once !

    It means that for this loop with quite a fast cpu I get about 55% cpu time in the misc for you run: script
    and it's up to 95% if using a debug build (which means 0% in free, and 60 fps can't be maintained anymore).
    As I said originally : avoid to have this kind of beast in a run: script, if you do that, either put it inside a if so that it's not executed all the time, or make sure it's short !

  13. 3 hours ago, mer-curious said:

    Hello Tux! I was wondering if it would be possible to have the "Return to the GUI" function work similarly as the ESC key? That is, not only to show the GUI but also to hide it too? This would come in handy when we are using a controller away from the keyboard and then map the "Return to GUI" function to a controller button.

    Maybe you could mimic the behavior of the ESC key in this function then, no? Or you could make it work in such a way that using this function in a sub-menu (by hitting Tab or the associated button) would instantly return to the game, instead of going back all the sub-menus until the main menu, and then finally to the game, which is what the ESC key does.

    Anyway, if you could implement this feature you could rename it to something like "Show/Hide the GUI" or "Leave or return to the GUI" to better reflect its new behavior.

    Ah mer-curious is tired... ! All the raine functions which can be controlled by the keyboard can also be mapped to any joystick input, here you are talking about "stop emulation" in "inputs / raine controls". It's not a problem when mapping a joystick input to this one, but careful if you map another key here !

    The difference with "return to the gui" : return to the gui is for the case when you run the emulator with the -nogui command line option and with a game name in the command line (which probably never happens in windows these days, except for those who still use a frontend to launch raine). Then if you press ESC it will simply quit, so if you change your mind and only want to return to the gui that's what this function is done for.

    3 hours ago, mer-curious said:

    Also, is it possible to have the GUIDE button in the X360 controllers mapped to this function as default? This would give this button the same function it has in Retroarch, which is to toggle the user interface.

    If it's mapped as a normal button then no problem !

    3 hours ago, mer-curious said:

    As a final comment, I've found a minor GUI glitch while trying to associate the Guide button to this "Return to the GUI" function. It seems the menu width does not instantly adapt to the the new bindings and then the joystick control is mostly hidden, as you see here:

    https://drive.google.com/file/d/1t103CAOzUV7RPGjkTz7-aU4__udjauc-/

    As you see in the video, it also happens in resolutions higher than the default 640x480, and when the window is restored down to the default size the width is fixed. It's really a minor glitch, but I decided to report it to see if it could be easily fixed.

    Thank you so much in advance for your time. 😊

    Yeah noticed it a while back already, it's super minor, and didn't take the time to look into it yet.

    3 hours ago, mer-curious said:

     

    PS:

    Did you happen to think about this feature?

    Sorry I thought it was clear, in linux I use a custom mapping as explained, it swaps the 2 buttons for the gui and for the games, and it's perfect for me.

    I don't think I'll add some way to remap the joystick buttons in the gui alone, I find it overkill.

    • Like 1
  14. Well I didn't understand everything here, with this script you start it on the title screen, it works like the on script, normal, then f1 to reset, which stops all the scripts including this one, when you return to the title script it's normal which confirms this script is indeed stopped.

    But apparently it's not a problem for you anyway so everything is good.
    And that's right, this loop is quite fast, it's probably because the 3 1st instructions of the for are specially evaluated, no function parsing for these 3, the function parsing is used only from the 4th argument. Anyway it works well, so it's good.

  15. Just to be perfectly sure I did that in windows, in msys 32 bits

    git pull

    then make on a makefile for the debug version

    then copied the mshud.txt file from the attachment above.

    Then ran the game inserted a coin, ran the script took this picture.

    If you get something else then we really don't live in the same world !

    mshud.png

  16. Well it works here so you probably made a mistake somewhere.

    Of course not you can do whatever you want with it, but be careful if the loop never ends then raine will freeze and the only way to stop it will be to kill it (from the task manager).

    You can open the console and do a help for to check if for is really inside.

    And of course if you run a loop such as the one in your example in every frame in a run: script, it will probably be very very slow !

×
×
  • Create New...