ffman1985 Posted April 18, 2023 Author Posted April 18, 2023 Sorry, still not work. May be I wait for the new public version of raine and try later.
Tux Posted April 18, 2023 Posted April 18, 2023 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 !
ffman1985 Posted April 18, 2023 Author Posted April 18, 2023 (edited) Sorry, it seems you have some misunderstanding here. My goal is to remove the gauntlet. If the gauntlet still here, it means the address $90C090, $90C094 are NOT equal to $6000. By the way, I found a simple way to remove the gauntlet by moving it out of the screen. You may test the for loop in other area, thank you very much for your help and the adding of the new function. Edited April 18, 2023 by ffman1985
Tux Posted April 18, 2023 Posted April 18, 2023 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 !
ffman1985 Posted April 18, 2023 Author Posted April 18, 2023 In my first post (with 3 test), the test2, and test3 fail. But the first test script success, you should see the gauntlet remove very slowly (and the script must be started at the tite screen, maybe you start the script eariler so you can't see the effect.)
Tux Posted April 18, 2023 Posted April 18, 2023 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.
ffman1985 Posted April 18, 2023 Author Posted April 18, 2023 (edited) Work as intended, thank you for fixing it. Edit: I change the test 2 script from on: to run:, it still run effectively and not affect misc % a lot. Edit2: The self-defined variable does not restore to zero when software reset. So, the script may not work after reset, provided that the script is executed before reset. Edited April 18, 2023 by ffman1985
Tux Posted April 18, 2023 Posted April 18, 2023 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.
ffman1985 Posted April 18, 2023 Author Posted April 18, 2023 Ok, tested again. The script (on: script) should keep working even reset. But since I change the script to run:, so I have the problem when reset.
Tux Posted April 18, 2023 Posted April 18, 2023 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.
ffman1985 Posted April 18, 2023 Author Posted April 18, 2023 When I change your script to the following, it would work after reset. script "test 2 alt" run: poke $FF4BE1 $F3 poke $FF26AD $71 for counter=0 counter<=$2ac counter=counter+4 dpoke $90c090+counter $6000
Tux Posted April 20, 2023 Posted April 20, 2023 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.
ffman1985 Posted April 21, 2023 Author Posted April 21, 2023 If you want to test the for loop function, you may try the following script on x-men. It should enable on the title screen to remove the Press Start text. script "Remove 'Press Start' text" on: for counter=0 counter<=$C0 counter=counter+8 poke $924005+counter $00
Tux Posted April 21, 2023 Posted April 21, 2023 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 ?
ffman1985 Posted April 22, 2023 Author Posted April 22, 2023 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now