Jump to content

Question about the cheat function in Raine


ffman1985

Recommended Posts

Hello, mer-curious, thank you for trying my new cheat. You see this error in the vs mode because this script use the new function rnd() which is not supported in the public version of Raine yet, you should first update Raine through git first. If you do not use git, you can also try my older version of the script (in a older post), but that always play the music of the 1p character. Sorry that I didn’t make a clear description of my work. There are other things should be bear in mind:

1. This vs mode script (and also my future vs mode script), will make savestate using the saveslot no.9 (as I expect no one use the savestate of big no.). The savestate creates after the “how to play” screen, in other word everytime you use this script will make a savestate once. (It is actually not needed to save everytime, as the save producted should alway the same, provided that you don’t go to the option to make change. I can modify the script to remove the autosave part, but I think it will be not user-friendly for other user as they may not know they should make a savestate in slot 9 in advance.)

2. All of my script (include my future work) are expected to enable early (on or before the how to play screen).

3. Sometime my work includes the change of the input. Eg. In practice mode, after 1p selected character, the 1p controller will control p2 side until p2 selected character. In this short period of time don’t restart Raine (by pressing f1), otherwise the control in p2 is not restored to normal. If this is the case, don’t worry, simply close Raine and load the game again.

4. I am using the neogeo unibios v.4 japanese console mode in creating my script. (But i guess  it is no problem even using other bios or mode)

5. The vs mode script and practice mode script should not enable together. So remember to close the unuse one and restart(f1) when switching other mode.

 

 

Edited by ffman1985
  • Like 1
Link to comment
Share on other sites

Thank you for the explanation on your cheats, ffman1985. Perhaps you could add some of these observations in the cheat as a comment as well as happens with other cheats and then reuse the comment in your other creations. We never know where these files might get in the inter webs and people might not know about the Raine forums if they break something eventually.

I haven't tested the VS Mode cheat yet, but it no longer produces those errors in the latest Raine release.

Thank you again for sharing your work.

Link to comment
Share on other sites

Yep I second the opinion of mer-curious : comments welcome ! Most of the scripts currently in raine are from a conversion from mame, and there are not lots of comments (sometimes there are texts introduced by comm which appear at the bottom of the screen when you select the cheat...).

Anyway I added the ability to add comments anywhere on a line starting by ; or #, and here you are even patching the rom from what I saw, and I have no idea what most of these poke do, that's where I see you are an expert at doing these patches, but comments are really most welcome here...

  • Like 1
Link to comment
Share on other sites

Hello, Tux, mer-curious. Following the advice of yours, I add some comment at the bottom of the cheat screen which normal player better to know about it.

For the rom part that i patch ($8d5d), is about changing the p2 input to controller 1, that why in practice mode, users can control p2 after choosing character.  As i mention  previously, if restarting the game or closing the cheat during that short period  of time that the control of p2 is changed, it is not restored to normal until closing Raine and reloading the rom.

But now this problem is solved in a new version below. The rom patched part always return to normal as starting (restart) the game or closing the cheat.

Any one interested in my cheat of rbffspec, please update here:

https://drive.google.com/file/d/1w4Uu8jKu7heY7hiW9HR5Y17lS8Rhz7y4/view?usp=share_link

Edited by ffman1985
  • Like 1
Link to comment
Share on other sites

3 minutes ago, ffman1985 said:

Note: 

when talking about patching the rom part in the cheat script, it just means to patch the rom data that loaded to the ram, but not the rom files. So, don’t worry.

Am I right, Tux? 

$8d5d is the real rom, not a copy, poke works because it's handy to be able to patch region bytes, but you can easily crash a game if you poke randomly to rom.

But clearly you know what you're doing !

Much better with some user comments.
If you want, you can take a look at scripts/neocd/ssrpg.txt for an example of a script which uses variables to make things clearer (which avoids to add comments).

Link to comment
Share on other sites

1 hour ago, ffman1985 said:

However, after I run the script (which patch $8d5d), my rom file’s modification date is not changed? I assume it does not write any thing to my actual rom?

(sorry, as i am new to computer programming)

Of course not, it just changes the loaded rom image, you would need to save explicitely the file for that... ! Also notice that if you do the same patch for neocd, then it's not rom anymore, the code is loaded from cd to ram, but since the ram has the same address as the neogeo rom some patches are compatible.

Link to comment
Share on other sites

Good, without changing the actual rom file, people will feel more comfortable to use the cheat.

Also, I just test my cheat in ngcd, it is not compatible (but many thing still work), as you said, the rom address $8d5d becomes some other thing in ngcd.

  • Like 1
Link to comment
Share on other sites

Hello, Tux. Recently, I try making some cheat script which involved changing the value of the rom part by the poke function. There is no problem when dealing with the neogeo or cps1 rom. However, for cps2 rom, it seems that the poke function cannot change the value of the rom part. I try to make the following script which suppose to break the operation of the game, but nothing happened. Please advise.

script "test"
run:
    lpoke $150 $00000000
    lpoke $523 $00000000
    lpoke $1150 $00000000
    lpoke $1250 $00000000
    lpoke $5150 $00000000
    lpoke $8234 $00000000
    lpoke $15123 $00000000
    lpoke $15234 $00000000

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...