Jump to content

Tux

Ultra Members
  • Posts

    1,056
  • Joined

  • Last visited

  • Days Won

    219

Everything posted by Tux

  1. It's actually rather long... ! I don't have the crash here, maybe some craziness from windows which escaped me ? I'll test this again to be sure. edit : don't have the crash at all, even in wine : empty ips directory -> messagebox to tell the dir is empty, empty dir inside ips directory -> just displays the .. dir to return 1 level higher, tested in wine, same thing. Very good diagnosis indeed, it's related to the recent optimization of the scanline counter for aodk and some other games, apparently there can't be any optimization here because this unibios just uses it to count the frames !!! (it's a very unefficient way to count frames, the best way is just to add a counter in the vbl irq, if they had done that there would be no bug). Anyway, I'll revert to some more classical code here then, there was a game which produced a black screen because of this recently, do you remember which one it was, I didn't write which one it was and since I change this again, it would be better to double check. (aodk already checked and ok) Yeah you can't use game options here since it's not available until a game is loaded, but I don't like the idea to add lines in the header of the game selection dialog, there are already quite a few and I don't want a crowd here. Maybe simply as a line on top of the "preload ips dat file", a kind of "ips patches enabled globally" with a checkbox. I'll think about it. edit : done, not with a checkbox finally because they are not really convenient in the gui right now, so a classical menu with enabled/disabled displayed in text, it's easier. Setting saved in config file so it stays if you quit the emu, and is taken into account if you load a game from the command line. You're in luck because I have a similar problem here, I have a pad which tries to be clever and to autodetect what it's plugged to and then change its layout based on what it detects. It worked well until recently and was detected as an xbox pad on pc, but with linux kernel 6 it started to detect it as a nintendo console ! There are ways around that : stick to a 5.x kernel, that's what I did 1st for about 1 year, but now the old kernel is not available anymore in arch and so I can't do that anymore. So I can experiment this button swap 1st hand ! I'd suggest using the controller mapping function instead, there is only a catch there : it doesn't change anything for the gui, you still have A & B inverted there, I'll change the gui to use the normal mapping then... ! edit : actually I had a weird problem here, normally raine creates a userdb2.txt file in the config directory and then renames it in the end to userdb.txt but mine was not renamed for some reason, so actually the new mapping didn't work at all. I added an error message in case the renaming fails, but when I redid the mapping, it worked flawlessly, no error message, and the new mapping works everywhere, gui and games, so the buttons are once again in the "right" order. Oh well... at least it works, once the right userdb.txt file is created you don't need to touch this ever again anyway.
  2. Test 1st, maybe the improvement will be almost nothing, in this case don't bother.
  3. Ok, some little optimizations again, get them from git this time, I didn't review the whole script, stopped at the beginning of the menu (Menu Screen), but there is a big one here ! You might eventually want to try : ff0=peek($FF0000) if ff0==0 ... elsif ff0==1 ... instead of having the if peek($FF0000)==0 elsif peek($FF0000)==?? etc, the reason is that the variable version gets the peek result only once, the peek version might get it a lot of times, and functions are a lot slower to evaluate than simple variables. But you need to check if it really makes a difference by checking the misc counter when changing this, and I was too lazy to do it tonight, so it's just an idea !
  4. The reason why your values are changed is because it's a shared ram which is mapped directly to the z80, it serves as a way of communication between the 68k & the z80. They were pretty in advance for multi cpus architecture considering it was in the 90s, but this way to communicate was probably already used in the 80s in the arcades too. For the z80 it's some normal ram. You can access it by using the z80 instead, but it obliges to do cpu z80a (to switch to the z80) poke $c000-$cfff for this shared ram, this time it's some normal ram for the z80, which means the sound command is in the word $c000-$c001. But I advise to keep the way it works now since almost all your work is for the 68k, it's just an explanation of why this ram is so weird ! So as soon as the z80 executes during a frame it reads what is there, and eventually changes the values. For the other games, well maybe, you'll see, maybe I was to careful with the whole area, but it's not a big problem anyway, if something fails you'll know where it comes from !
  5. Pushed to git, since you didn't explain in detail the changes I have put "mainly sound effects, fixes & improvements". Tested quickly, works perfectly, the shortcut to the service mode without reseting the game when you leave is quite impressive too ! Congratulations !
  6. Yeah I know accessing this area is counterintuitive, you can keep $618001 it would be correct for normal ram, here it's the same as a poke to $618000, and poke to $618003 is the same as $618002. To remind you these are high byte of the word code for the music or sound effect to be played ($618000) and low byte in $618002 (or $618003 as you prefer). For $61801f if it's enough for you with sfad that's good, the song associations clears the whole area, but it works anywhere with any game. Good I'll test it a little later and update it to git...
  7. writes to $618003 are strictly equivalent to writes to $618002, there is a handler at this address, it takes the offset and divides it by 2, the use it as an index in the qsound shared ram. Anyway glad it worked for you, I'll take a look later.
  8. Actually it's rather very tricky for cps2 because it's qsound, this chip doesn't take a single sound command, it has some shared ram which can be accessed directly by the 68k. I tracked how songs are played for the sound associations function, so I can explain this, but I didn't try to find how sound effects are played, but apparently it's something different, probably another offset... Anyway for a song, 1st init the game until you reach at least the copyright screen then go to sound commands / Associations and test one of the proposed sound commands until you find something you like. Here we'll take song number 1, the 1st one. So you need to 1st zero out the 16 1st addresses of the qsound ram ! And to make things worse this ram is not contiguous so you must access it this way poke $618000 0 for offset 0 poke $618002 0 for offset 1 ... poke $61801e 0 for offset $f If you want to experiment with that try that in the console, for a script you would need something like a memset command to clear the whole area in 1 line. Anyway once the whole 16 1st offsets have been cleared : poke $618000 commnad here the command would be 1 then poke $61800e 0 (from the console I am not sure this last poke is necessary since you just cleared it, the game always finish any qsound command by writing something to this offset). If you did things right you can close the console with the ESC key and you should hear something ! Rather complicated, I'd advise to start with neogeo which is much easier than that because there are true sound commands in neogeo ! edit : after testing quickly for the sound effects : they are simply after the musics, but it's on a word, high byte goes to offset 0, low byte goes to offset 1, so I guess in my example you should rather put 1 in $618002 even if putting it in $618000 seems to work. To experiment with this go to the service mode, sound test and browse the sounds... If you go backwards it goes to sound $2ff (which is nothing), but there are soon real sound effects to be heard close to this value. When you find 1 you like you can check the values in the qsound shared ram using peek($618000) for example. If you really want to try that, I'll add a memset function to clear the area in 1 line.
  9. ... and pushed this script to git too... I didn't test everything, but it can always be updated later, and it's already quite impressive !
  10. I accept patches... ! on my side I just pushed the fix for alt-c
  11. I don't think so, because A is used for normal input, so if you start pressing it then the corresponding control is enabled... ! There was also the grouping under if ((peek($FF8051)==$04)or(peek($FF8055)==$04)) instead of all these if which had this very same test in a and Well you can't win all the time with this kind of optimization, it came obvious to me when reading the script so I did it while looking for the cause of my problem...
  12. Much better with some documentation ! So that's because I use alt-c as a keyboard shortcut to call the cheats dialog, I think that's the default shortcut, and since C is also the key for heavy kick, it's seen as always down when you return from the cheats dialog ! At least we found a rare bug here. I'll fix it in git... !
  13. Ok, so here is a slightly improved version of the script, basically less tests in each frame by grouping the tests and the result of all that is that for me I have peek($ff8050) == $40 as soon as I start the 1st script, well almost, on the phoenix screen it's still ff8050 == 0 but after that something puts $40 in it during all the frames. Since your test to exit your menu is #Start game# if (peek($FF8050)>$00) #P1 start game# poke $FF8058 $01 poke $FF817B $01 endif it exits as soon as it reaches this point (I don't know what this ff8050 address is supposed to contain, I just know it's in ram). Actually it occurs all the time now with all the versions, 32 or 64 bits, I even wonder how I could have this menu to stay on screen before, now I can't, it's gone as soon as it appears. edit : and I finally understood how to get your menu to stay : you must start your script before starting the game ! That is, load the game with the option not to auto start it in the background, then enable the 1st script, then start the game. Then the peek stays at 0 all the time. If you start the script even during the phoenix screen, it's too late, the memory address will get $40 all the time. sfad.txt
  14. Well since internet archive is the only source when raine downloads its roms, it might be a problem... If it really disappears you'll probably have to turn curl option off in the cfg file, but the appeal is still months in the future anyway. More info: https://tech.slashdot.org/story/23/04/10/1726259/if-we-lose-the-internet-archive-were-screwed
  15. Well testing : I could get to the options menu only on my 1st try (with the 64 bits version). With the 32 bits version when I press 1p it displays press 1p or 2p, then I press 1p again, I see the option menu for a fraction of second and it goes directly to the character selection... ! I didn't know there could be a difference between the 32 bits and 64 bits version, if it's something else then I don't know what it is... And what a long script for sure ! But congratulations for the way it's written, it's still quite clear even if you don't know the internals of the game because of all the comments. (I made a few attempts trying to press as quickly as possible on the 1p key, it doesn't change anything).
  16. Fixes only this time, there were quite a few annoying ones, plus a surprise from long past, a fix for 64street & chimerab attract mode! For these 2 to say the truth the fix itself was found by Haze for mame around version 0.170 so quite a long time ago already, and then found in the github web interface by Antiriad, and finally adapted by me to raine ! This bug made me crazy, such a simple memory map for such a crazy effect, no move during attact mode... It turns out it's something very similar to the nmk driver, they push what they can do with the 68000 to the limit, write bytes are mirrored to words in their main ram ! Actually this bug had been here since 0.28 and before, but I saw it only when testing the turbo key behavior, so it's a very special bug !!! Anyway except that the more classical bug fixes are : - better message for broken ips .dat files - Ignore repeated keys ! I had some trouble with the turbo key DEL, which must be held down as long as you want the acceleration to occur, but after a while it created havoc. It's because sdl2 handles key repetition and I missed it completely ! It's fixed now. - console : fix breakpoints for 68k cpus which I had stupidly broken when adding the z80 breakpoints ! - The multiple files selector used for ips dat files doesn't loose its selection anymore when resizing the windows - Still for ips dat files : when no dat files are selected delete the corresponding ini file when leaving the directory or closing the dialog - some more fixes to this multiple files selector... ! - a fix for a crash I got in the console while copying and pasting info from the console Get it from there : http://raine.1emulation.com/download/latest.html ... and updated the 2 appimages to 0.95.3, I won't do that for all releases but since the build system was updated very recently it was very easy to do just now.
  17. Ok finally fixed the last bugs of the multi file selection for the ips dat file (resizing, + deletion of the ini file when there is no selection anymore, and counting the selections was wrong when changing an already existing ini file). I might release a binary later, it's just small bug fixes, but annoying ones.
  18. For the conflict I had already spotted this one and told you about it in the original thread when I created the feature, quite a long time ago already. It's right, the 1st report of length 2 is harmless, but not the 2nd, so expect the last applied to take priority here. For the rest yeah the crash is fixable, but it's not a a generic file browser, the files here are supposed to be in a precise format, if not then it's not a surprise to get a crash. And for the glitch you are probably the only one thinking about maximizing the window in the middle of this and then complain that it looses its selection after doing this. I'll probably take a look at both... but it's really not a high priority ! By the way : surprising bug found while testing the appimage and the turbo key : sdl2 actually handles key repetition despite the fact that they removed the function to control the key repeat speed ! There is a field to indicate is an event is from a key repeat and I completely missed it ! And nobody noticed until we tried the turbo key and so it's held down for long enough to trigger a key repeat, which triggers havoc ! It's fixed, it's very easy to fix, but it was really surprising !
  19. And I finally managed to update the i386 appimage too, you'll need an os which can run i386 binaries obviously though, on debian it requires what they call multiarch, look for that on the internet if you want details, you'll need at least dpkg --add-architecture i386 followed by the installation of a few basic libs. Tested on a mint 21.2 virtual machine, built on a bionic ubuntu docker container (and it obliged me to switch to a 5.x kernel to avoid to get an incompatible shared lib, but on arch 5.x is almost not supported anymore, I could get it using downgrader, but it was in a text console only ! Luckily it was enough to build SDL2, and I had the problem only with SDL2). Anyway that's not the kind of thing I'd like to update often. Both versions have shrunk this time though, it's down to a little less than 14 Mb which is still huge for a raine release, but it was 16 Mb before ! Also the command line is supported of course, from a terminal you can launch : ./Raine-x86_64.AppImage -gl to get the list of supported games for example. Anyʍay I learnt a few tricks while doing this, even if it was very long to do !
  20. I was contacted by someone who couldn't make the appimage from about 1 year go to work, it was 0.93.x version, with very old dependencies... So this time I took the time to create a virtual machine to test this in mint 21.2 (which I don't like a lot !), and the appimage got a few updates (only the 64 bits version is updated, I have currently no setup to build the 32 bits version so I must restart it from scratch and it would take too much time). The audio seems slightly delayed in the VM, but except that everything seems ok now, couldn't contact internet archive but it was a VM problem, I should add a cancel button to the curl dialog but it will be for another time ! By the way this fat archive weights 16 Mb which is about 8 times the size of a normal release !!! At least you get all the optional data files + the dependencies inside, and it should work on any linux distrib having at least glibc-2.29 (which is very old, it's bionic ubuntu). It's a last resort if you can't install any normal version... And there were a few bugs in accessing some files in the appimage which pushed me to fix quite a few paths which were wrong also for windows, it's a miracle that some functions worked in windows, maybe I didn't test them enough, and it explains mer-curious problems with the ips files ! (and it's a crazy bug, sometimes a path with / is accepted, but sometimes not). Anyway except the big heap of paths fixed, there is the 2nd fix for the default value of speed hacks in neogeo... ! Hoping it's the last time I cope with these silly bugs ! But the experience in the virtual machine was interesting anyway... ! You can get this here : http://raine.1emulation.com/download/latest.html
  21. Even though it's annoying me to a critical level, thanks for this one, the config was read from 2 places, a leftover from a cleanup long ago when I moved all this to neocd.c, and of course the last one was the one with the default value at 1 ! It's fixed for good this time in the source. Too bad for your ds4, it's just means it asks for 11 KHz by default, on my sound card here it's 44.1 Khz in linux, 22 KHz from wine, and 48 Khz from windows ! Its clearly highly dependent on the driver installed. Well sorry I can't do anything more, just don't use it, that's the best I can think of ! And it's right to crash, it's something specific and this case is not supposed to happen. Nope the directory is created upon program launch, but there is no reason to include it in the zip since no ips file is distributed with raine. For normal people who unpack a new release over the folder of an older one, it works perfectly. Ah yes this one of course, couldn't insert my answer here. Ok we have a good news then, you'll stop using this then ! In all seriousness I have absolutely no idea how you do your bugs and I don't want to spend any more time on this, maybe in a few months, maybe not.
  22. Mainly : - a lot related to the new file selector for the ips dat files - supports some very basic editing of the .ini files in the ips directory, don't abuse it, these files are not supposed to be edited, but it should tolerate // at the beginning of a line and empty lines - Sample rate was wrongly initialized to 11 KHz if you launched raine without any config file (brand new install) and called the sound options dialog before loading any game. Most users would change manually this frequency rate in this case, but anyway... ! Now the sample rate take is the one returned by SDL_GetAudioDeviceSpec in all cases. - speed hacks are disabled by default in neogeo options, too tiresome to track the list of games which don't support them. - the music which was gone during the neogeo logo for aodk is back ! It was related to some very technical neogeo hardware initialization, see the source if you want details. And sorry ffman1985, not enough motivation yet for what we discussed, but I didn't forget. Get it from there, as usual : http://raine.1emulation.com/download/latest.html
  23. Ok, I surrender, you get your update, 0.95.1 released !
  24. I was about to reply that too much time passed and I lost all motivation for that, but I got curious how you could mess up your things so much... ! so all interest is not gone yet it would seem... ! Anyway, the 1st point is that I told already twice that the .ini file SHOULD NOT BE EDITED BY HAND, it's in bold and in uppercase, if you still don't understand, I don't know what I'll be able to do after that ! You are sure to make it fail if you edit it by hand, said twice, ignored twice. Here it's probably because of an empty line you added at the end of the file! Yeah I will eventually add some at least basic parsing so that you are able to copy directly your precious files... ! But for now, just avoid that. After that the double kof97 is because there were a few bugs in this new file selector in case there is only 1 directory in the ips directory. And why didn't I see it while I tested ? Because I unpacked the whole archive I got from the internet, and didn't try to do any subtle stuff here, I guess you didn't do the same because it was already unpacked somewhere on your disk... we have symlinks in linux for that to avoid to have to copy things over and over, microsoft says it's too risky for security reasons... !!! Anyway... The bugs are fixed, and that's where you see that I added that in a hurry, there were quite a few for sure, all small, but if you were in this specific case, it exploded. You are really a bug magnet to get all the worst stuff all the time, there was even a linux specific bug when doing things like that ! Anyway so it's fixed here, but for you for now : just put more than 1 directory in your ips directory, avoid to edit this damned ini file by hand, and it should finally work!
  25. Ok you found a bug in the very 1st run when there is no config to read and the user call the sound options dialog before loading any game. In this case the sample rate is initialized to 11 Khz and it's a bug. There will be a workaround for this in next version, just force an early soundcard init when there is no sample rate to be sure to be able to ask the preferred sample rate to the device. Meanwhile next time you are doing a test without any config file, just avoid to call the sound options dialog before loading any game. By the way this bug is here since Dec 27th 2021, so it's not new, but you had to call this specific dialog before loading any game and at the same time not having any config file to see it.
×
×
  • Create New...