Posts for Alyosha
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3602)
Joined: 11/30/2014
Posts: 2752
Location: US
I am trying to use bizhawk 1.9.4 TASstudio and am noticing some significant slowdowns (to 4 fps) after getting a few minutes into the run. The game is Flashback for sega genesis. Is there a way to limit green frames? I can't seem to find the setting. Also what does clock throttle setting do? Any other tips to speed up TASstudio appreciated.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3602)
Joined: 11/30/2014
Posts: 2752
Location: US
Well after a while here finally is WIP 1. Even though the file is long, only the first minute or so is in there. http://tasvideos.org/userfiles/info/22316796280079805 I guess I needed a break, after umihara kawase I had run out of motivation. Plus the controls of this game took me a long time to actually figure out. But anyway the rest of the run I think will go pretty quick now. I am a couple of seconds ahead of the old run I believe, pretty much copying the movie I posted, but with slight improvements.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3602)
Joined: 11/30/2014
Posts: 2752
Location: US
ALAKTORN wrote:
Alyosha wrote:
One question I have wondered about is if there is another practical way to TAS besides emulation, like hardware direct TASing?
High quality Mario Kart Wii TASes have been made on the Wii itself. There are cheatcodes to copy ghost input and slowdown gameplay. TASing on emu is far better if possible, though.
Oh, that is a cool feature, too bad more games don't have that. Also for the Rockman ZX rng question, do you know the addresses for the IDs for the drops? I'm pretty sure only 3 bytes are involved in picking the drop, so maybe you can make a save state one frame before killing an enemy, and make a LUA script to simply enumerate through the ~16 million RNG possibilities to get a complete table? It won't help in manipulating those RNGs to come up, but maybe you can see a pattern.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3602)
Joined: 11/30/2014
Posts: 2752
Location: US
Scepheo wrote:
Masterjun wrote:
Ever since I wrote this script for predicting RNG in this run I wondered if the formula could be reduced. [...] So my question is: is it possible to reduce the formula or function to a simpler one?
Yes. Alyosha already noted how a single step in the inner loop behaved, which is basically a linear feedback shift register. For the code below, I used the standard bit library that comes with Lua 5.2, but any implementation or bit operators would do. I also, like creaothceann already mentioned, considered your RNG to be a single 16-bit value, rather than two bytes, which makes manipulation a lot simpler.
Language: Lua

require 'bit' local function myRNG(rng) local b for i = 0x01, 0x0B do b = 1 - bit.band(1, bit.bxor(rng, bit.rshift(rng, 1), bit.rshift(rng, 15))) rng = bit.bor(bit.lshift(rng, 1), b) % 0x10000 end return rng end
Nice, question answered! I guess this thread accomplished something! Proofs of complexity class are a bit beyond me, although I do wonder if there will ever be a game that is proved to be beaten as quickly as possible? One question I have wondered about is if there is another practical way to TAS besides emulation, like hardware direct TASing? As there is desire to TAS games on newer and newer consoles, it seems unlikely that emulation will be able to keep up at reasonable speeds on home computers, is there a workable alternative? Any more little game mysteries anyone can think of too?
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3602)
Joined: 11/30/2014
Posts: 2752
Location: US
That's a clever table representation, pretty cool. I don't really see where the property that the rng goes through every possibility (except the AA-55 cases) comes from, but I guess I'll leave that for people who are better at math.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3602)
Joined: 11/30/2014
Posts: 2752
Location: US
@Masterjun: That is a neat property. Well the function itself can certainly be simplified with more local variables. If you write RNG1=A7,...,A0 and RNG2=B7,...,B0 then after 1 of the 11 cycles you get RNG2=B6,...,B0,A7 RNG1=A6,...,A0,NOT(XOR(XOR(A0,B7),A1)) (if I did all my math right) But simplifying the loop, I think not, since after 11 cycles, RNG2 will look like: A3,A2,A1,A0,NOT(XOR(XOR(A0,B7),A1),.... and RNG1 will be a mess. @ALAKTORN: I just mean that if DeSuMe had a trace logger you could find out all of that stuff pretty easily (compred to trying to deduce what is happening.)
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3602)
Joined: 11/30/2014
Posts: 2752
Location: US
ALAKTORN wrote:
Alyosha wrote:
How about some more practical problems that people really want to seem solved?
Figure me out how Mega Man ZX’s RNG works.
What would you like to know about it? I found the work you've done so far and I did a little testing. As far as I can tell the fourth byte has no impact on what is dropped. It also seems that all enemies (at least in the intro level) have the same drop characteristics. I tested with RNG B4B3A413. Hard to tell exactly how it is being used though. I guess this would be kind of trivial with a trace logger type utility in the emulator, so I would say that is an open problem in R&D.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3602)
Joined: 11/30/2014
Posts: 2752
Location: US
How about some more practical problems that people really want to seem solved?
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3602)
Joined: 11/30/2014
Posts: 2752
Location: US
Those are some hard questions. I thought up some too, also some on the easier/ more tractable end of the spectrum. These are on the more practical end, can anyone think of others like these, that may or may not be possible in a given game?: Can you complete Bowser in the Fire sea in SM64 in 0 'A' presses? Can you get by the infinite wall in Windwaker early? Here are some R&D related ones: N64 emulation (although this seems to be in progress) What are the limits of console verification? Here is a less practical one I came up with: Is there a repeating input sequence that can be used to beat super mario bros that is substantially shorter than that for a full length run? What is the shortest such sequence?
Post subject: Open Problems in TASing
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3602)
Joined: 11/30/2014
Posts: 2752
Location: US
Of late I have become a bit more interested in some of the more technical aspects of TASing, as opposed to just TSAing games (which has begun to seem a bit repetitive to me.) I guess I was inspired my Lord Tom's River Raid run and the recent work I did with micro500 on Treasure Master, which seemed really fun to me even though it wasn't directly making a TAS. So I got the idea of trying to make a thread similar to wikipedia http://en.wikipedia.org/wiki/List_of_unsolved_problems_in_mathematics and see what some people think are significant open problems in TASing. These can be anything from emulation to game RNG to verification, big issues or small ones, but I want to avoid things like 'I want to see ___ run.' So does anyone have any thoughts on this? Is there a certain game which you think is poorly understood that needs a lot of research? What problem needs to be solved to move TASing forward a step beyond what is currently possible? Or if you are feeling particularly bold or prophetic, what are the 'Millennium Prize Problems' of TASing? I appreciate any input. : )
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3602)
Joined: 11/30/2014
Posts: 2752
Location: US
Oh the spiked ceiling, yeah you get killed by the spikes about half way through trying to use the boost right from the beginning. The lizards ability/glitch to simply jump straight through the spikes is much more advantageous.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3602)
Joined: 11/30/2014
Posts: 2752
Location: US
mklip2001 wrote:
Ok, I finally got to see this. I get a gut feeling like you should still be able to boost with the morning star a little more, especially in the third nightmare level (instead of riding the lizard the whole way). But it's quite a bit faster than the published run, and it's plenty entertaining. Good job!
Do you mean the first nightmare level? He is hardly used in the third. I tested all the possible options I believe. Trying to get the second available lizard is definitely not faster. It may look like it should be faster to dismount the lizard after climbing the tree, but what prevents this is the time it takes for the dismount to occur and the fact that Nemo stops for several frames after each jump (while the lizard maintains his speed.) The dismount at the end does not cost any time. The combination of these factors makes keeping the lizard I believe 20 frames faster if I remember right. Also regarding Mickey Mousecapades, I see the trick that needs to be done, but I can't get the same (and fastest) pattern of the snakes in the very first room, I wonder if it might be emulation differences.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3602)
Joined: 11/30/2014
Posts: 2752
Location: US
Randil wrote:
Nice improvement! Yes vote from me. :) If I am allowed to think out loud a little, I do however suspect that rest of the TAS could use some improvement as well. But it's very hard for me to tell how much time could potentially be saved, and admittedly I don't have many suggestions except the good old "optimize movements". My gut feeling tells me that maybe 1 to 10 seconds could be squeezed out, probably somewhere around 5 (but hopefully more!). Aglar managed to squeeze out 10 frames from level 1 some time ago: http://tasvideos.org/forum/viewtopic.php?p=213048#213048 But as I responded then, this game is not edit friendly, so any improvements found are hard to edit in, basically forcing you to redo the TAS from that point. This also means that small improvements might get lost in future RNG and lag. Anyway, that's just a suspicion from my part, and I truly don't blame you for not doing it from scratch I also read the SDA post about the wall zip with delight, and thought that it should have a huge impact on the TAS. But looking through the TAS now again, just like you concluded, it might not be so easy to implement since it only moves you to the left... But again, nice job indeed! You should totally do Mickey Mousecapade next: http://tasvideos.org/842M.html
I did try to improve the movement of the other parts of level 8, with no success (I ended up just patching back in your original inputs), so the odds that I could improve the previous levels seemed rather low. I did look briefly at mickey mousecapades, but I couldn't even get the first snakes in the first room into the starting position you got, despite many different combinations of resets and start presses. Maybe I will return to it after doing Flashback.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3602)
Joined: 11/30/2014
Posts: 2752
Location: US
Link to video This seems to be the best realtime run out there for this game. Should be a good guide for improving the TAS. I might pick up this run. Also can this page please be moved to the genesis section?
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3602)
Joined: 11/30/2014
Posts: 2752
Location: US
Spikestuff wrote:
CoolKirby wrote:
I think you should go for the fastest sightseeing path.
The fastest longest route?
Yes this is the most consistent definition we came up with for what 'sightseeing' is. The most levels you can visit in a single run is 26. Backtracking is not possible so in a single run this is it. There are 4 such paths , one of them has an extra boss. I'm not sure why Bob Whoops originally picked his path, maybe he just decided to do it, but the fastest path also shows off a neat glitch, so we are going with it. Also submission should be soon! (again)
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3602)
Joined: 11/30/2014
Posts: 2752
Location: US
http://tasvideos.org/userfiles/info/21757470084283918 V2. I managed a much better boss fight, and made some other over all improvements. It's still a little slower then the original, 936 frames vs 855, I'm not quite sure how to manipulate the blob attack, still working on that. I think this is close to a final version, only few more things I need to look into.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3602)
Joined: 11/30/2014
Posts: 2752
Location: US
Here is a rough draft of level 8 with the new wand strats patched in. http://tasvideos.org/userfiles/info/21584580026670725 It's about 10 seconds faster. I think it should be 13-15 seconds faster once it's well optimized. So far I'm not sure how to use the zips, it's tough since they only go to the left it seems.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3602)
Joined: 11/30/2014
Posts: 2752
Location: US
MESHUGGAH wrote:
Alyosha wrote:
So my question now is what should I do with this?
Improve it and submit it.
I have tried and failed (repeatedly.) Well if anyone out there is interested, feel free to take the .bk2 as a starting point. I will be very impressed if someone can improve even a single frame of game play. At least then it can be submitted and a more correct record can be official. Thanks for the replies all.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3602)
Joined: 11/30/2014
Posts: 2752
Location: US
Sorry I am still confused. Flagitous' inputs remain the same (on non-lag frames), but the time should be 1:47.97 (bsnes) instead of 1:46.42 (snes 9x). There is no official way to fix this? For the purposes of accurate record keeping?
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3602)
Joined: 11/30/2014
Posts: 2752
Location: US
I wasn't planning on submitting it, I was just wondering if the current publication file can be replaced with this one so it is more representative of reality. And if so what is the procedure for this? I see the 'resyncing movies officially' thread, should I post it there? That looked like a discussion thread to me. I'm not looking to get any credit or anything, I'm just wondering about the policy.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3602)
Joined: 11/30/2014
Posts: 2752
Location: US
http://tasvideos.org/userfiles/info/21288338289808557 Ok here is a faithful re-sync of flagitous' run. It plays each level exactly as he did. It is about 100 frames longer then his run. about 30 frames is lag, and about 70 is loading time. So my question now is what should I do with this? Is there a procedure to replace older runs with ones on more accurate emulators? 1.5 seconds seems like a lot over a 1:46 run, it would be nice to have a more accurate representation.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3602)
Joined: 11/30/2014
Posts: 2752
Location: US
http://tasvideos.org/userfiles/info/21270522489961043 final WIP before submission I think. Found some important route changes that saved a few more seconds as well as cleaned up the whole run a bit.
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3602)
Joined: 11/30/2014
Posts: 2752
Location: US
What is changing when those lag frames are being added in? In my above example, if the machine state is identical at the start of the 12 frame sequence up to the jump, what is changing in instruction execution when the lag frame is added in the newer emulator? Can it change the final outcome?
Post subject: Re-syncing Old Runs
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3602)
Joined: 11/30/2014
Posts: 2752
Location: US
Hi, I have a question about working with older runs made on older emulators. I am wondering if it is always possible to achieve the same state an older run achieves on a newer emulator if you can correctly account for added in (or I guess in rare cases subtracted) lag frames in the right locations in the movie. For example, if an old movie has the player running right for 12 frames before pressing A to jump, and the new movie on a new emulator adds a lag frame within those 12 frames, making the movie file 13 frames before the jump, will the resulting state at the jump always be identical? By state I mean RAM or even instruction level execution. I ask this as I am having trouble syncing some parts of flagitious' Umihara Kawase run made on snes 9x improvement 9 to bizhawk 1.9.1. I have tried repeatedly, so I am wondering if it should at least be possible in principle so I know how much effort to put into it. But I guess it's also a question I am interested in in general, since I have only limited technical knowledge about emulation. Thanks for any replies!
Alyosha
He/Him
Editor, Experienced Forum User, Published Author, Expert player (3602)
Joined: 11/30/2014
Posts: 2752
Location: US
http://tasvideos.org/userfiles/info/21207921798009862 closing in on a final version. right around 13 minutes now. A couple route changes led to significant savings. ars will be working on adding the entertainment value back into the boss fights.