Jump to content

Tux

Ultra Members
  • Posts

    1,059
  • Joined

  • Last visited

  • Days Won

    219

Everything posted by Tux

  1. 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.
  2. 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.
  3. 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.
  4. And it has lua as new dependency, but I tested it here too, works perfectly yes !
  5. 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 ! 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.
  6. And you got a 0.95.4b, a bug specific to windows and which doesn't happen all the time displayed very weird script error messages. And the lua label was missing for the lua console script for sf2, that's all so it's sill 0.95.4, just an update.
  7. 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.
  8. 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... !
  9. 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.
  10. 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 ?
  11. 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... !
  12. 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 !
  13. 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 !
  14. 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. If it's mapped as a normal button then no problem ! Yeah noticed it a while back already, it's super minor, and didn't take the time to look into it yet. 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.
  15. Ok pushed to git after a quick test, you forgot to mention there is no for in them so it's compatible with current raine version.
  16. Why ? I love the precision of your messages by the way, I had to fetch the short name of the game in the game list... xmcotar1d, copy your script, and test it : everything is fine, so why bother ?
  17. 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.
  18. When you reset all the scripts are stopped, if you start it again then it should work. Once again : the initialization part of the loop is always executed, so whatever value there is in the loop variable when the loop starts is not relevant.
  19. Nope at the exit of the loop the variable has the last value which made it to exit and keeps it even if there is a reset, but if you execute a loop again, the 1st instruction of the loop is always executed so the old value doesn't matter.
  20. Ok, finally understood so there is indeed a bug, actually 2 bugs in the for loop, here is what happens when you do many things at the same time... ! Anyway it's fixed, your test2 now clears the whole screen keeping only the stars.
  21. Tsss, your original script did that exact same thing with the gauntlet alone in the middle of the screen ! Ok then I leave you to that then !
  22. 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 !
  23. It's probably something stupid but since I can't guess what it is, here is my mshud.txt file. To be started on the title screen of course. mshud.txt
  24. 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 !
  25. Just pushed this simple for loop to git, your script becomes : script "test 2" on: poke $FF4BE1 $F3 poke $FF26AD $71 for counter=0 counter<=$2ac counter=counter+4 dpoke $90c090+counter $6000 it's now a on: script, not a run: because everything executes in just 1 frame.
×
×
  • Create New...