Editor, Experienced Forum User, Published Author, Player
(158)
Joined: 1/10/2012
Posts: 673
Location: Brazil
TASeditor doesn't support lsnes movies. However, the rr2 version of lsnes (currently called beta) has a built-in movie editor that you can use to edit your movies. It works if you are in readonly mode.
You can also extract the lsmv files (that happen to be zip files) and there'll be a file (or many) called input. Open it with any text editor and each line is a subframe.
Editor, Experienced Forum User, Published Author, Player
(158)
Joined: 1/10/2012
Posts: 673
Location: Brazil
Thanks for the information, that's exactly what I was looking for. I was trying to write a script to convert Snes9x movies into lsnes or Bizhawk's format without desyncs, by extracting the effective input (ignoring the lag frames) and injecting it into the new emulator frame by frame if, and only if, the next frame is not laggy.
Due to the difference between emulator lag and TAS'er lag, it still desynced after some time. So, it might be impossible or I should try another method.
Editor, Experienced Forum User, Published Author, Player
(158)
Joined: 1/10/2012
Posts: 673
Location: Brazil
Emulators generally offer a function called emu.lagged(), memory.get_lag_flag(), etc that says whether the current or previous frame is a lag frame.
I'm wondering what this really means. If I am pressing some buttons just before a lag frame, can my input make some difference, or is it completely ignored? Reversely, can my input be ignored just before a non-lag frame?
Another thing: suppose that I'm playing and let X be the main character's position within the level. Is it possible for X to change during a lag frame, even so many other addresses remain constant? In this case, the lag frame wouldn't be negative during a TAS.
Editor, Experienced Forum User, Published Author, Player
(158)
Joined: 1/10/2012
Posts: 673
Location: Brazil
I don't think so. The previous problem is just a matter of simplification and doesn't depend on the primality of any of the numbers.
This works for all integers x and y, even if y is not prime.
2x*y - 1 ≡ (2y)x - 1 ≡ (2y - 1) * ( (2y)x-1 + (2y)x-2 + ... + (2y)2 + (2y)1 + 1 )
This last identity comes from the sum of the terms of a geometric progression.
Therefore, 2x*y - 1 is multiple of 2y - 1.
In this case, 2x*11 - 1 = (211)x - 1 = 2048x - 1 = (2048-1) * something = 2047 * something
As 2047 = 23*89, then 23 divides 2x*11 - 1 for all x.
Editor, Experienced Forum User, Published Author, Player
(158)
Joined: 1/10/2012
Posts: 673
Location: Brazil
More generally,
an - 1 = (a-1)*(an-1 + an-2 + an - 3 + ... + a2 + a + 1)
Proof: fix a and use mathematical induction over n.
So, make a = 2y and n = x, like Flip did.
Editor, Experienced Forum User, Published Author, Player
(158)
Joined: 1/10/2012
Posts: 673
Location: Brazil
You can always rename your movie:
movie.bk2 >>> movie.zip
or
movie.lsmv >>> movie.zip
Then, extract the contents, edit everything you want and, at the end, compact the files. Make sure to compact the files, not the external folder that contains them.
Editor, Experienced Forum User, Published Author, Player
(158)
Joined: 1/10/2012
Posts: 673
Location: Brazil
I think I didn't understand perfectly the definition of 'letterboxing'. :(
I've used the black space to display text and hitboxes in Lsnes. You can add the black area manually in the configurations (lateral padding) or via Lua script (lateral gap).
The drawing functions usually don't care if the text is outside or not. But in Snes9x, nothing is drawn outside the game's area.
Screenshot: https://pbs.twimg.com/media/BxYgf_uIMAAiOar.png:large
Editor, Experienced Forum User, Published Author, Player
(158)
Joined: 1/10/2012
Posts: 673
Location: Brazil
How can I read the size of the lateral gaps: the left, right, top and bottom dimensions of the black area around the game area? This, together with client.screenheight() and client.screenwidth(), would be awesome!
Editor, Experienced Forum User, Published Author, Player
(158)
Joined: 1/10/2012
Posts: 673
Location: Brazil
I had the same problem. The workaround is to use another function that looks ugly in the screen. I will try to see if this will look good in DK2. Another question, is there any subpixel adress?
Editor, Experienced Forum User, Published Author, Player
(158)
Joined: 1/10/2012
Posts: 673
Location: Brazil
I tried two movies and SyncSettings.json is only 2 bytes: 0d 0a
EDIT: if the movie was originally done on Bizhawk, this file will be something like {"o":{"$type":"BizHawk.Emulation.Cores.Nintendo.SNES.LibsnesCore+SnesSyncSettings, BizHawk.Emulation.Cores","Profile":"Compatibility"}}
Core is now compatibility, but it's still desyncing.
Editor, Experienced Forum User, Published Author, Player
(158)
Joined: 1/10/2012
Posts: 673
Location: Brazil
Bizhawk 1.8.2 (1.8.3)
When I import a lsmv file from lsnes and play the bk2 movie, bsnes core is set to Performance, even if it was Compatibility before. I can't change to Compatibility without stopping the movie. That is probably why the movie will always desync.
Editor, Experienced Forum User, Published Author, Player
(158)
Joined: 1/10/2012
Posts: 673
Location: Brazil
I was indeed using the compatibility core.
You are right, all those lag frames were false positives.
But, when I import a lsnes movie with Bizhawk, the new one usually desyncs. So, there must be something else happening, not just false positives.
EDIT: reported a bug.
Editor, Experienced Forum User, Published Author, Player
(158)
Joined: 1/10/2012
Posts: 673
Location: Brazil
I'm also waiting for the day Bizhawk adds mednafen core, because Crash Team Racing is quite broken in the current emulators. Is there any prediction of when it will happen?
Editor, Experienced Forum User, Published Author, Player
(158)
Joined: 1/10/2012
Posts: 673
Location: Brazil
I was playing The Lion King in both emulators and I noticed something strange. In the 1st level, the lag count increases "continually" on lsnes, but rarely on Bizhawk. After a few minutes, the difference is almost 1000.
I wonder if this is normal, because they use the same bsnes compatibility core.
In other games, this difference is very small, but lsnes seems to be laggier over time.
Bizhawk 1.8.2
Lsnes rr1 and rr2
Editor, Experienced Forum User, Published Author, Player
(158)
Joined: 1/10/2012
Posts: 673
Location: Brazil
EDIT: marzojr answered, but I'll keep my text here:
1) It provides a precise emulation, but not 100% precise, and is useful if you just wanna play around. I tested right now and got 100~120 fps without problems. It uses bsnes performance core.
2) The objective here is to emulate the console very accurately. A TAS must ideally be done like it was on the console. Even the lag count is very similar. The fps I got was 60~70. It uses bsnes compatibility core.
3) Here, the aim is not to crash the emulator in the middle of a long play. Crashing in the making of a TAS is generally not a big deal, because we are recording anyway. It uses bsnes compatibility core as well.
By the way, I'm curious on why there's no accuracy core for Bizhawk and lsnes...
And why both desync (lag) after some time.