Jump to content

Tux

Ultra Members
  • Posts

    1,062
  • Joined

  • Last visited

  • Days Won

    220

Posts posted by Tux

  1. 50 minutes ago, ffman1985 said:

    I think I can guess the reason behind. The record demo function is just a function to record my input. However, the action (decision) of the Cpu alway change. So, every time I load the demo, the result alway different.

    Anyway, I will try to build the 32bit debug build afterward.

    It's called "random seed", the random numbers depend on an initial seed, if you restore this seed you have the same sequence of events, here it was missed.

    You can either try the debug build, or try a demo in 32 bits (I am not 100% sure the 32 bits version would work, but it's more likely than here).

    And it's hard to tell what was not saved here as the random seed... !!!

    I have no idea what this code uses as a random seed, but it's very strange that it's not saved... For now, absolutely no idea, it's probably safer to use the debug build in this case, it's likely the same behavior will also be in the 32 bits version, it looks like some external source of data which is not saved, although I have absolutely no idea what it is.

  2. 3 hours ago, ffman1985 said:

    As I don't know how to load the file, it is not tested. You may need to change the bios to AES Japan, if you can't load the file.

    Like a savegame, except you use shift + f4 instead of f4.

    Thanks, I'll take a look...

    edit : well sorry but same thing as mer-curious. I switched to the japan aes bios since it seems to be the only way not to get this corrupted graphics, then I associated a song with 2bh which seems to be the background song during what you recorded, and then everything plays normally until the demo ends in pause mode, the song was never interrupted or changed. ..

    It's with current git version 64 bits, since this demo is for 64 bits, but it probably works the same with latest 0.94.4. So I don't know what you did to have a problem here... !

    (and these demos are very convenient in this kind of case I should think about them more often !)

    The behavior seems to be strangely different with your custom rom, but it still doesn't change anything to the music. And if you want to reload the demo when it goes to pause, release the pause first, there is a nasty bug here if already playing a song.

    And I never see any 24h command on my side, so there is no switch to this song, something is wrong somewhere... ! I wonder if the 64 bits demos play correctly then, 1st time I see one actually, usually I use this in 32 bits (32 bits is way more convenient for debuging usually because you can compile without optimization but still have the speed of assembler).

    Assuming the demo has a problem since you can compile your own version we can try the other way around then : start by building a debug build (uncomment the line RAINE_DEBUG = 1 in the makefile), then uncomment the line 408 in source/sound/assoc.c which reads :

    printf("cmd %x mode %d\n",cmd,mode);

    to see the sound commands passing. Then run your debug build from a terminal (the mingw32 terminal in windows is ok) and do your testing. When the song changes call the gui to stop the game, you should see something about song in the output of the terminal, send the last screen of what was printed and it should be ok. Good luck, but I can't think of anything easier to reproduce this in these conditions. It might be a good idea to fix the demo anyway but we might loose too much time on it for now.

  3. 3 hours ago, ffman1985 said:

    I find a very very rare music change problem in kof94.
    This happens in the boss stage final round. Both side selected character is Rugal (you have to use action replay).
    It may happen when one side use Reppuu Ken(236+punch), while other side use the Dark Barrier(214+kick) to reflect.

    Here is the final stage save data (not a save state). 
    https://drive.google.com/file/d/1A5FB-UKgAGKy9ZpTEf1moAU-LdkN5Onq/view?usp=sharing

    Win against 1st state Rugal, then save at the final round. Set both side infinity energy, and using Reppuu Ken or Dark Barrier continuously. (You may need to load the save state many time)

    Update: Here is a hack rom which can use Rugal directly.

    https://drive.google.com/file/d/1mFm3VKUiquU4bQNxPdRsYX665zwPoRsl/view?usp=sharing

    On 2nd thought, since it's very rare why don't you try to resurrect the demos ?

    Load your savegame, get ready to reproduce your problem when you are ready to do it, press shift F2 to start to record a demo, it will ask for a name, and place it by default in subdirectory named from the current game name, here it will be savegame/kof94. Choose a name, type return, now it will record in real time all your inputs.

    When you want to finish, just press esc to call the gui and quit (I think it's enough to just call the gui, but I am not sure, if you quit you are sure the recording is really stopped for good).

    If everything goes well I'll be able to replay your demo to see your impressive moves and the association problem in the end ! ;-)

    I just tested on bublbobl, and except yet another bug linked to the intro behind the menu and the multi z80 configuration of this game, it worked well. I'll push a fix for this now, but it's specific to games with multiple z80 only, so it's not relevant for you here.

     

    • Like 1
  4. Yeah yeah yeah goes too fast for me. I found pulstar is a type 2 like no other, the only one where in its arrays type 2 are not songs, it's type 4 for this game, and it's the only 1 I have seen so far behaving like this. Except that it accepts all the usual commands like a normal type 2, the difference is just how it classifies its songs, and they start at 80h instead of 20h.

    It won't be committed for now because I'll test the whole list finally.

    Ok, committed, a new variant variable to identify these special "type 2", the list of neogeo games which are type2 as comments, a fix for pulstar and ssideki, and I think that's all. (plus of course now the games having 2 bytes for command 14h and those having only 1 byte are clearly identified and separated !).

    I'll try to see your kof94 thing tomorrow or maybe later, but it seems tricky !

    • Like 1
  5. 22 hours ago, ffman1985 said:

    Sorry, just find a new bug in kof95 in the latest version. The music in Terry stage change when get hit. Other stages seem don’t have this problem.

    (you may test it in vs mode, both side choose terry team)

    kof95 doesn't seem to have the same 14h command, the signature on which I identify the roms is not always respected, sometimes they made changes and didn't change this signature, it didn't happen a lot though, but this time here it does. AFAIK the other type 2 games take an argument on 2 bytes, kof95 takes only 1 byte here.

    It's fixed in git, I leave you testing that... Sadly I don't have a precise list of which neogeo games are type 2, to check if some other take this argument on only 1 byte... ! More than 100 games to test, some volunteers ? (plus it requires a debug build to find out which type of association it is...).

    edit : took the time to test quite a lot of them, in fact the vast majority of type 2 take this argument on 1 byte ! I stopped at pulstar for now because it's detected as a type 2 although its songs can't be tested in the gui for some reason ! I'll continue later. So far the roms which take this argument on 3 bytes are at least : aof3, magdrop3, neocup98, nitd, preisle2, wakuwaku7

    what a mess... !

    • Like 1
  6. 33 minutes ago, ffman1985 said:

    I also success in loading ngcd game (.cue). However, when I try to load the aes (arcade) rom (.zip), it shows the error “Could not open IPL.TXT”. It is not make sense as I am not loading the ngcd game.

    Already told you : if you pass a zip on the command line, it assumes it contains the files extracted from an iso for a neocd game (and so if it doesn't find an ipl.txt in the zip it will output an error).

    If you want to run an arcade game and not a neocd game, you must pass a name instead, not the zip file, but if you do that on the command line avoid -nogui for now (the fix is committed to git).

  7. 18 minutes ago, ffman1985 said:

    Even I use the version 0.94.4 (64bit), the -nogui command does not work.

    well it works for neocd games !

    It's not windows specific this time. And it works if you don't put the -nogui. For now, just don't put the -nogui thing, I'll fix it later... !

  8.  - An amazing bug was fixed which made it impossible to run a game from the command line in windows... and it's been here for very long. Does it mean that nobody use frontends with raine anymore in windows ?
     - Big acceleration in the console for mouse tracking (which displays some underlying text in reverse video), and scrolling speed once the window has reached its maximum size (actually you don't even see it scrolling anymore, but the result seems good). Also added some colors and sorted the commands for the help command.
     - Improvements for the sound associations for real bout fatal fury and samurai shodown, hoping it didn't break any other game... !!!

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

    edit : I forgot to commit the sound association fixes to git, so they were not included in the linux binaries. I just rebuilt them because of that, 0.94.4a, linux only, windows had them.

    • Like 2
  9. 1 hour ago, ffman1985 said:

    Hello Tux, just found some new problem in sound association:

    Real Bout Fatal Fury:
    The music change to another music during battle. In my test, it is Terry vs Terry in the 1st stage.
    The sound code for Terry music is 2fh
    (But I think all battle have this problem.)

    Samurai Shodown:
    The Character Select music is associated normally at first. However, when later the 2P press start, and after "Here come a new challenge", the music played is the original one.
    The sound code for Character Select is 2dh

    Thank you for your kind attention.

    Ok it becomes problematic, rbff1 seems to be a "type 2 extended", it recognizes more sounds and so they added a new prefix for it, 1d, which is not recognized by the others. Well lately I added 1c, which is not recognized by at least 3countb, so I hope it won't break anything, it shouldn't normally.

    For samsho, it's a weirdness on which values the sound prefix commands can take, there was a comment to say only commands >= 0x20 can be taken here, well clearly here its >= 0x11. So well I put >= 0x11 for all the type 2, and hope for the best... !!! Too bad the comment didn't say for which games I observed >= 0x20... !

    I'll make a new version for at least the bug of yesterday related to the command line in windows...

  10. Yeah I guessed it was older than that after posting, it would be here since opengl became the default display method then, which would make it a very, very old bug !

    Well since most people in windows probably don't even know there is a command line, the only ones who could use that would be the ones using frontends to run raine. It's quite surprising none tried and failed to use one then... !

     

  11. ... and fixed ! It's a bug which is here since the 1st sdl2 version, which means that nobody ever tried to run a game from the command line in windows with the sdl2 version, or didn't report the problem, it's because windows requires a special glsl initialization, which was skipped if using the command line this way.

    Sorry !

  12. The bbcode function doesn't seem to work, I wonder if bbcode hasn't been disabled here, but except that embedding pictures here works very well. This one above is done by dragging a local file from here to the attachment zone on the bottom left zone. Once it's inserted into the document, you can drag and drop it to the exact point you want it in the text. And for the 3 old pictures in the console search posts, these are external pictures, so it's the "other medias" in the bottom right corner, insert image from url, it requires the url to be https, but it's not too important since everything is https these days. Same thing for this one, the picture is inserted where the cursor is when using the function, and you can drag and drop it later to adjust placement if you want, all in all it works rather well !

    But yeah, this forum was nice, but on the other hand maintaining it took me quite some time, so it was nice to say bye bye to all the maintenance part here, even though we lost a few small things... ! (I have some bad memories with the spammers, and also our theme which had become incompatible after an update of the forum, forcing us to switch to an horrible white theme for a while, until I finally took the time to fix everything in the theme to make it compatible again. The irony here is that this good old theme worked out of the box, but the upgrade did not, it failed miserably while trying to update the database, so it would probably be a nightmare to maintain again... !).

    • Like 1
  13. After a long fight of a few hours, I was finally able to make my very old backup (from 2015 already !), to work, with php8 and mariadb.

    The least I can say is that it was not easy !

    And it was worth a picture.

    Don't look for it, it's a local webserver on my machine, no connection to the outside, I was just curious to check a few old posts... but it's right that it was a nice forum ! :)

     

    raine.png

    • Like 1
    • Haha 1
  14. I had the funny idea to try to restore an old backup from rainemu to look at old posts... It's now in a horrible state, mysql was bought by oracle which made most distribution move to mariadb instead, php is mostly incompatible with itself and it's impossible to load the old site unless you want to spend hours fixing all the bugs... !

    And the sql dump is probably unusable because the table names still use "yabbse" when it was changed to "smf" quite a long time ago already... !
    Finally I just took a text editor to search directly in the ascii dump of the database, and here it is :

    --- start ---

    How to find the location of the weapon for metal slug in ram ?
    Welcome to the relative searches we started to talk about in the other topic...

    So just start the game as usual, and open the console just before picking the machine gun, and close it immediately. In doing so it takes a snapshot of the ram, and you'll be able to look for differences later. Now take the machine gun and type:
    search !=
    which will search all the bytes which are different.
    Well there a few hundreds of differences, so it will take time.
    The idea is to wait a little in game, then return to the console and type
    search ==
    to look for the areas which didn't change. Half of the results are gone, but you still have a lot of them. Play a little until the flame thrower and just before picking it up, type :
    search ==
    and after picking it up :
    search !=
    normally when you pick the machine gun again and you type search !=, you'll get only 2 results which are both valid :

    console2.jpg

    After a few tests, the 2nd address is the one you want, putting 4 in it gives the machine gun and 2 is the flame thrower (I didn't test all the weapons !).

    This is a lot harder than the simple life counter... !!!
    But it works well. Todo : mouse support in the console (too tiresome to type all these addresses), history for the console to access the previous commands, and the scripts I talked about in the other topic to be able to save what we find.

    Now with the old cheat system, you would have to add 1 cheat/weapon, which is not very convinient. Here you can add a single cheat using the alert function. First here are the weapons you can get :
     - 00 : Normal Gun

     - 01 : Shotgun
     - 02 : Flamer
     - 03 : Rocket Launcher
     - 04 : Machine Gun
    the alert function works like this :
    alert("message|button1|button2...")
    and returns the number of the button you selected starting at 1, or 0 if you pressed ESC or used the 2nd button of your mouse.
    So you can type :

     

      poke $1004d1 alert("select weapon (ESC for normal gun)|Shotgun|Flamer|Rocket launcher|Machine gun")
      dpoke $1004e2 999


    The 2nd line gives 999 munitions at the same time, it's more convenient. Once you have tested, you can add it to your scripts using the script command, and it will appear in the cheats dialog (which you can now call directly using a key from the game).

    --- end ---

    Luckily it's probably the only post really worth retrieving, and I even found the image. Notice that now mouse support is ok in the console, and by default it's less transparent than that for readability reasons.

    And the topic which started this one, which was probably the 1st one on the console, posted in march 2008 apparently, "console basics" :

    --- start ---
    console.jpg

    I know a command line is quite intimidating, but it will be much more powerful for what I want, and also it will be much easier to add new features this way.

    So here in mslug, I wanted to look for the number of lifes, so I started by search 3 just at the beginning of the game and there were more than 39000 results.
    So I lost a life, typed 'search 2' and I was down to 4 results already !
    Lost another life, and this time 'search 1' sent back only 1 result : 100397.

    This is the very first beta for this, I want to add other functions like the ability to modify any address in ram (to test the result by putting any life number for example), to be able to explore the ram at any address to see if there are other interesting addresses nearby, and so on...

    As you see the syntax for the command line is extremely simple, and should remain as simple as possible...
    And this thing could probably be used as a debuger too (68000/z80 debuger).
    --- end ---

    This one was extracted using a script, way faster !
    Well all this has been done since then, you see a few commands in the 1st post like poke and alert.
    There are also debug functions like list to see the assembler code, break for breakpoints, and so on... + the integrated help for everything, mandatory here.
    It's been a long time, but it was fun !

    ... and I just found a 3rd pat, now that I have repaired my old backup after some heroic fight and some help from MikeDX who happened to have a backup (I destroyed a big part of mine while trying to upgrade, I would never have thought it would be so hard !!!).
    Anyway here is the 3rd part, this time on invulnerability :

    --- start ---
    This one is possible mainly because of the explanations from Stephh about how it works.

    You probably noticed by now that almost every arcade game makes your character to blink when it first appears, and while it blinks it is invulnerable... This is the secret of invulnerability : while it works, there is a counter in ram which goes down to 0, and once it reaches 0 you are vulnerable again, so the idea is to use a script which will be called for each frame to prevent the counter from reaching 0.

    It's a lilttle tricky in mslug because of the little animation when the player 1st appears in the level. For the 1st level, it starts to blink while it is still in the air, then stops blinking for a short time (it is vulnerable at this point), and then starts blinking again when reaching the floor. In fact the counter is set to a high value 3 times during this animation if I am not mistaken !
    It's easier to loose a life and then start the search for the 2nd life because the counter is initialised only once then...
    So : as soon as you see the player is starting to appear, go in pause mode (p key). Then call the console to take a first snapshot of the ram (using its key, default is tilde), and then exit immediately from the console. Press the space bar while still in pause mode, and the game will run exactly 1 frame. Do that until you see the player character has changed its color. It shows the invulnerability counter just changed. You can then type :
    search <
    It will give you a lot of results of course, there are a lot of things which change at every frame in mslug. So you can repeat the same process a few times, calling the console every time the character changes on screen and type "search <", until the results shrink.
    Then once it has stopped to blink, you can type :
    search 0
    because then the counter should be at 0.

    In the end, you should have only 2 or 3 results if you made enough searches.
    To test this, just poke a big value inside. Since the value goes down by 1 for every frame, if you put 180 inside you will be invincible for 3s (60 frames/s). You should find quite quickly that $1004a5 works great for that.
    Notice that you have a different invulnerability when you are in the tank. In this case, $1005e5 is the address you want.
    invuln.jpg
    --- end ---

    • Like 1
  15. This one is mainly for linux since these leds emulation can't be done in windows, description in the forum there :

    The other small improvements :
     - fixed a big bug where games with more than 1 cpu of the same type like darius would break during the intro behind the menu. This one has been there for a long time, so either nobody played with these old games, or they didn't bother to report it !
     - Improvement to sound associations for rbff2

     - command.dat included is shorter which makes a smaller archive (removed useless stuff).
     - Also for some unknown reason, command.dat was bundled with the windows version, but not the linux version ! It's now fixed, and it's in git too.

    I have hesitated quite a lot to add this leds emulation thinking it would not be very useful, but in the end it's fun to see working, and it was quite easy to do, so no regret, it's just too bad it's not used by more games !

    http://raine.1emulation.com/download/latest.html

    • Like 2
  16. Don't worry so much, anyway this code was some paranoid attempt to fix things, but finally it was useless and had absolutely no effect, I just reverted it for more clarity.

    • Like 1
  17. Create the sequence ? I guess you mean to ask if each game has a separate handling for sound associations ? Of course no there are similarities, but not always obvious, there is an ascii signature in the sound rom at offset 0x3e, but it gives only a hint, sometimes roms with this same signature have a slightly different behavior. And then there in a table at an offset to find based on the analysis of the rom which tells if a particular command is a song or not. Beside the songs there are basic commands, those which are < 0x21, this is what makes most differences for the neogeo games at least.

    To find this here, I add some debug message telling me which sound command is processed in real time, so I got the sequence 3 4 7 (which is usually a reset and followed by a new song number), except this time it was followed by a sound and not a music, the few short notes you hear when the menu appears.

    So I tested the 3 4 7 separately on the vanilla to know at which point the song is interrupted, 4 seems like a good choice, and I did the same here.

    Now it's not because some games look similar that their sound rom is similar, this one is a type 1, the most modern neogeo games like garou, kof98 and up are like this.

     

  18. Ok, here's your experimental build, it's not really experimental this time, it just adds the handling of the reset sequence used here by rbff2 to stop its intro music in console mode, and only in console mode, usually this sequence is followed by a music number so I never bothered to emulate it fully until now, this is the only place I know where it's not followed by anything and the music must really be stopped here.

    I attach the binary here because it's very possible you'll find other problems like this one later, so I won't make another version all the time. Thanks for your finding anyway ! (still the 64 bits version, if you prefer the 32 bits one, just tell it).

    (attachment removed, it's released in 0.94.3).

     

  19. 5 hours ago, ffman1985 said:

    Just try the 0.94.2 to creat the sound association for real bout fatal fury 2 which is newly supported. There is a problem in the opening music. When I press start button in the opening to end it, it goes to the title but the music wont stop.

    the sound code of the opening music is 21h

    Same problem appears in Samurai Shodown 2 character select music, it cannot stop when entering the battle. The sound code of it is 38h.

    Yeah I hoped we would be lucky, but it's rarely the case. It will probably take quite some time, I'll look into it a little later... well it went much faster than anticipated because for me in arcade mode when I insert a coin the music indeed stops ! I'll try to switch to console mode then... !

  20. Fixing : not interested, I guess some other emus used some generic code found elsewhere for that, I didn't have it, I don't really care, it's supposed to stay easy, I already spent way too much time on this.

    Reverting : no need, with controllers buttons 0 & 1 are mapped to buttons A & B or X & O on playstation which means the main button to validate and to cancel, and anyway I don't plan ever to add something to map controls in the gui.

    The light : it's actually more fun when you program it, you have access to its red, green and blue components from 0 to 255 and by combining these you can display whatever color you want. But it's still useless, I guess it's in the spirit of these pc cases with a glass panel to see neon lights inside... ! It's also much heavier than the DS3, making it more fragile if it falls (my nephew had to replace one because of a bad fall, my ds3 fell an incredible number of times without any problem ! And actually I had to reuse it lately on an old windoze game which doesn't allow to select the joystick to use and it insisted on using this one, and I had to press heavily on the square button which was almost dead... It actually made it return to life, now all buttons work correctly ! I don't remember the exact age of this ds3 controller but it must be more than 10 years old now !).

  21. This was supported in the old dos version, through the 3 keyboard leds, but of course accessing these leds with a multitasking os can be more problematic and the emulation was just dropped when switching to the sdl version, a very long time ago...

    Now there are ways to access the leds available on the system in linux through sysfs. It makes accessing any led and controlling it much easier. These leds are available in /sys/class/leds, see the description in any kernel documentation in /usr/src/linux/Documentation/leds, they had neat ideas on how to use all these leds...

    I finally made a good interface to choose which led on your system you want to assign to the emulated leds, you can choose any led displayed in /sys/class/leds as long as its brightness file is writable. I found a nice udev rules to assign group leds to all files in /sys/class/leds from there : https://unix.stackexchange.com/questions/20125/how-can-i-change-the-permissions-in-sys-to-alter-the-state-of-a-led-light-using

    After this, just add your user to group leds, and he has access to these leds...

    There are at most 4 emulated leds, so if you have only the keyboard leds you'll be able to assign only 3, but it's usually enough, these leds are not of an uttermost importance ! The status of the leds is restored when raine quits, and the thing is super fast, so even if it's not spectacular, it would have been a shame not to emulate it !
    If you have a dual shock 3 connected, it adds 4 new leds that you can assign here !
    The new "leds..." option is at the end of the "Options" dialog, it displays leds assignments so far, the names are taken directly from /sys/class/leds so it's not always super user friendly, but it's understandable, it looks like this for the keyboard : (see attachment).
    leds.png

    For windows users, sorry, there is no such interface for leds in windows. There is a way to assign keyboard leds though, but it's complicated, there is a demo source included in mame source for that, and even them chose not to merge it (unless it's been done since then but it's unlikely). Well microsoft usually loves to make things complex, here it's just too easy to use not to use them !

    The games supporting these leds : most taito games (taito f3, darius, exzisus, bonze adventure, rainbow island, the taito xsystem1 68000 games), the toaplan2 games.
    There are probably more which can be added, this feature has been completely forgotten for many years now !

    While doing this I found a bad bug when loading a game which uses more than 1 cpu of the same category, like darius, and a forgotten free in the game selection header if the number of games played is more than 5.

    Of course all this is totally optional, if you don't want to see your leds changed by raine, just don't assign any in the leds assignment dialog and it will fail silently.

×
×
  • Create New...