Post subject: How TASVideos calculate a time from the number of frames?
Experienced player (942)
Joined: 9/18/2008
Posts: 154
Location: Japan
I'm sorry if I missed something, but is there any resources that describe how TASVideos calculate a time from the number of frames? In other words, is there any resources that describe the FPSes of each emulator? For example: klmz's SMB1 run in 04:57.33 (fm2) - 17869 frames klmz's SMB1 run in 04:58.18 (fcm) - 17891 frames The former is recorded on FCEUX and it seems to be timed as 60.099 FPS. On the other hand, the latter is recorded on FCEU and it seems to be timed as just 60 FPS. This confused me a little at first. So, I want to know the FPSes of each emulator, if possible.
Former player
Joined: 8/1/2004
Posts: 2687
Location: Seattle, WA
I think you are looking for this set of pages: http://tasvideos.org/EmulatorResources/Homepages.html
hi nitrodon streamline: cyn-chine
Dwedit
He/Him
Joined: 3/24/2006
Posts: 692
Location: Chicago
On a real NES, the framerate is 60.099 FPS, assuming the screen is turned on during the pre-render scanline. Otherwise, it's 0.00112% faster if the screen is off. What really matters is the frame count. It's just that FCEUX calls a frame 1/60.099th of a second, and FCEU calls a frame 1/60th of a second. FCEU just uses bad numbers for establishing length of a movie.
adelikat
He/Him
Emulator Coder, Site Developer, Site Owner, Expert player (3575)
Joined: 11/3/2004
Posts: 4754
Location: Tennessee
The site reports .fm2 as ~60.1 but not FCEU. Why is it this way? Because bisqwit decided it so. I think I would happier with it being calculated based on 60fps and not worring about the .1 BS. Otherwise we have to deal with other issues, like SNES should be ~60.1 too. But snes9x runs at 60fps. FBA is ~59.9 but reported 60, etc. 60 fps is a good solid time keeper and allows it to be consistent among all emulators. I think frames is the more important goal anyways. Also the replay dialog of win32 FCEUX shows it based on 60fps (as does FCEU). It is arbituary though, meaning it isn't based on how the emulator runs. It is just a formula put in, much the same way the site does it.
It's hard to look this good. My TAS projects
Player (206)
Joined: 5/29/2004
Posts: 5712
Dwedit wrote:
On a real NES, the framerate is 60.099 FPS, assuming the screen is turned on during the pre-render scanline. Otherwise, it's 0.00112% faster if the screen is off.
Whoa, so speedruns could be ever-so-slightly faster if you played them blind?
put yourself in my rocketpack if that poochie is one outrageous dude
adelikat
He/Him
Emulator Coder, Site Developer, Site Owner, Expert player (3575)
Joined: 11/3/2004
Posts: 4754
Location: Tennessee
Bag of Magic Food wrote:
Whoa, so speedruns could be ever-so-slightly faster if you played them blind?
I guess andrewg was on the right track all along.
It's hard to look this good. My TAS projects
Player (206)
Joined: 5/29/2004
Posts: 5712
He left the screen on, though. Hmm, what would the speed be like if you connected the audio output but not the video? My other thought about timing is that the hours:minutes:seconds format is easier for most people to remember than an enormous six-digit number, so it would be nice to have a consistent frames-per-second conversion everywhere. "I think this one's faster--oops, I forgot to check the thousands digits!"
put yourself in my rocketpack if that poochie is one outrageous dude
Post subject: Admin, will you fix the DS framerate?
gocha
Any
Emulator Coder, Former player
Joined: 6/21/2006
Posts: 401
Location: Japan, Nagoya
gocha wrote:
A real DS and DeSmuME runs in 59.82fps (more precisely, 33513982/6/355/263) but ... I noticed that TASvideos also calculates a movie length in 60fps. This wrongly shortens a movie length a few seconds X(
0.290% speedup of DS is wrong. It's obviously inconsistent with encoded video and real handheld.
I am usually available on Discord server or Twitter.
adelikat
He/Him
Emulator Coder, Site Developer, Site Owner, Expert player (3575)
Joined: 11/3/2004
Posts: 4754
Location: Tennessee
Again, I'd rather see just it rounded to 60fps for all movies. These partial framerates seem too pedantic to me.
It's hard to look this good. My TAS projects
Experienced player (942)
Joined: 9/18/2008
Posts: 154
Location: Japan
Zurreco wrote:
I think you are looking for this set of pages: http://tasvideos.org/EmulatorResources/Homepages.html
Well, emulator homepages and movie format docs do provide useful information, but some of them don't mention to the framerate (for example, FCM format). Indeed, the frame count is the only matter for us. And, if we consider that the time is just for the comparison, it maybe acceptable to time all movies as 60FPS, as adelikat said. But, using the FPS different from the real console may cause some misunderstanding between people, for example, when they compare a TAS and a run on the real console. For FCM and FM2, I agree to unify their FPSes, but I prefer 60.099 FPS. Anyway, for now we are using various FPSes for each emulator, so I think it will be helpful if we could have the list of FPS of each emulator. It is a little bothersome to examine the FPS of the emulator whenever I have to write a time with my testrun. (I will make such a list by myself as possible, but I don't know about every emulator.)
P.JBoy
Any
Editor
Joined: 3/25/2006
Posts: 850
Location: stuck in Pandora's box HELLPP!!!
GBA has a framerate of 16777216/280896 (~59.73), DSi has the same framerate as the DS
Senior Moderator
Joined: 8/4/2005
Posts: 5777
Location: Away
Well, to be fair, letting each emulator run at the same speed as the actual console is not only a step towards better emulation, but also towards more authentic watching experience. We shouldn't be worried about minute difference in framerates between emulators of different systems, anyway. The only disadvantage I see with true framerates is that it makes it harder for the SDA to spot emulator movies in case they get submitted.
Warp wrote:
Edit: I think I understand now: It's my avatar, isn't it? It makes me look angry.
Experienced player (942)
Joined: 9/18/2008
Posts: 154
Location: Japan
I examined how TASVideos times the movies of each emulator by checking the frame counts of several movies. The result is here:
console         emulator        fps (on TASVideos)

NES (~60.10)    fceu            60
                fceux           60.099
SNES (~60.10)   snes9x-rr       60
GBx             vba-rr          60 (for GB/GBC/SGB/GBA)
  (GBA: ~59.73)
PCE (?)         mednafen-rr     59.826
Genesis (?)     gens-rr         60
N64 (?)         mupen64-rr      60
PSX (?)         pcsx-rr         60
DS (~59.82)     desmume         60

# note: I didn't examined about PAL.
For PCE, I remember a wiki page of mednafen-rr said that mednafen-rr runs at (7159090.90909090/455/263*65536*256/2^24) ~ 59.826 FPS. But now the information seems to be deleted from the page for some reason. The FPSes of the real consoles are thanks to Dwedit, adelikat, gocha, and P.JBoy.
Editor, Active player (297)
Joined: 3/8/2004
Posts: 7469
Location: Arzareth
TaoTao wrote:
For PCE, I remember a wiki page of mednafen-rr said that mednafen-rr runs at (7159090.90909090/455/263*65536*256/2^24) ~ 59.826 FPS. But now the information seems to be deleted from the page for some reason.
PCE on Mednafen is indeed configured as 7159090.90909090 / 455 / 263 FPS, that is about 59.826 FPS.
bisqwit@chii:~/src/nesvideos_site/formats$ grep fps *.php|grep '[0-9]' | frobnicate
dsm.php:  $fps = 60.0;
fbm.php:  $fps = 60.0;  // FR specs say this is always true
fcm.php:  $fps = ($flags & 4) ? 50.0 : 60.0;
fm2.php:
  $fps = $pal ? 50.006977968268290849
              : 60.098813897440515532;
m64.php:  $fps = ord(fread($fp, 1));
mcm.php:      $fps = 59.8; // lynx
mcm.php:      $fps = 7159090.90909090 / 455 / 263; // pce
mcm.php:      $fps = 6144000.0 / (515*198); // ngp
mcm.php:      $fps = 7159090.90909090 / 455 / 263; // pcfx
mcm.php:      $fps = 3072000.0 / (159*256); // wswan
mcm.php:      $fps = ($ntsc ? 1008307711 : 838977920) / 16777216.0; // nes
mcm.php:      $fps = 60; //gb
mcm.php:
      $fps = ($ntsc ? (3579545 / 262.0 / 228.0)   // sms
                    : (3546893 / 313.0 / 228.0));
mmv.php:  $fps = ($flags & 2) ? 50.0 : 60.0;
pxm.php:  $fps = ($flags & 4) ? 50.0 : 60.0;
smv.php:  $fps = ($flags & 2)
vbm.php:  $fps = 60.0;
ymv.php:
  $fps = $pal ? 50.0
              : 60.0;
zmv.php:
  $fps = ($flags & 32)
           ? 50.0 /* pal */
           : 60.0 /* ntsc */;
Player (206)
Joined: 5/29/2004
Posts: 5712
adelikat wrote:
Again, I'd rather see just it rounded to 60fps for all movies. These partial framerates seem too pedantic to me.
Should WonderSwan be rounded to 75 fps?
put yourself in my rocketpack if that poochie is one outrageous dude
Post subject: i love pork
Joined: 5/17/2007
Posts: 393
Location: Sweden
As long as the emulator isn't running faster than the actual hardware it's fine with me.
"No love for the game gear"
Experienced player (942)
Joined: 9/18/2008
Posts: 154
Location: Japan
>bisqwit Oh, thank you for the good information! :) I think it is not a bad thing we know about the FPSes which we are using.
adelikat
He/Him
Emulator Coder, Site Developer, Site Owner, Expert player (3575)
Joined: 11/3/2004
Posts: 4754
Location: Tennessee
I changed desmume to 59.82 (specifically to the formula gocha provided). I'll change others too, but I need a list of what they should be, preferrably with precise formulas on how to derive them. Also, should the time reflect the fps of the emulator? Or the fps of the real console?
It's hard to look this good. My TAS projects
Senior Moderator
Joined: 8/4/2005
Posts: 5777
Location: Away
Probably not, but it would be helpful to have a FAQ page covering that kind of information. [EDIT] I misunderstood the question. The time should represent the framerate of the emulator (since it tells how long the movie is), which in its turn should represent the actual framerate of the console.
Warp wrote:
Edit: I think I understand now: It's my avatar, isn't it? It makes me look angry.
P.JBoy
Any
Editor
Joined: 3/25/2006
Posts: 850
Location: stuck in Pandora's box HELLPP!!!
NES:   NTSC 21477272/357368	PAL 26846590/498576
SNES:  NTSC 21477272/357368	PAL 21281370/425568
GB(C): 4194304/70224
SGB:   4295454/70224
GBA:   16777216/280896
NDS:   33513982/560190
Senior Moderator
Joined: 8/4/2005
Posts: 5777
Location: Away
I took the liberty to convert that to decimal fractions for readability.
NES:   NTSC 60.098	PAL 53.8465 <- huh?
SNES:  NTSC 60.098	PAL 50.007
GB(C): 59.7275
SGB:   61.1679
GBA:   59.7275
NDS:   59.826
PAL NES sure has an odd framerate. o_0
Warp wrote:
Edit: I think I understand now: It's my avatar, isn't it? It makes me look angry.
Player (206)
Joined: 5/29/2004
Posts: 5712
And GBA is exactly the same as GB. The numerator and denominator were both multiplied by 4.
put yourself in my rocketpack if that poochie is one outrageous dude
adelikat
He/Him
Emulator Coder, Site Developer, Site Owner, Expert player (3575)
Joined: 11/3/2004
Posts: 4754
Location: Tennessee
P.JBoy wrote:
Numbers
I'm assuming these represent the actual console. Do we know if out emulators run at this fps?
It's hard to look this good. My TAS projects
Experienced player (591)
Joined: 1/11/2007
Posts: 103
adelikat wrote:
Also, should the time reflect the fps of the emulator? Or the fps of the real console?
The listed time should be derived from the emu framerate, because that's how long the movie actually takes to play. If the emu framerate is inaccurate, it's up to the emu developers to fix that. Shortcuts like 50 fps and 60 fps are fine for casual conversions, but tasvideoagent does not mind the extra computation. Also, would it be too much trouble to make TVA report the number of frames, in addition to the seconds conversion?
Experienced player (642)
Joined: 11/30/2008
Posts: 650
Location: a little city in the middle of nowhere
personally, I say use the console framerate, for two reasons: firstly, there may be an unfair advantage for using certain emulators over other emulators. for example FCEU calculates frames at 60 FPS and FCEUX calculates frames at approximately 60.099 fps. If we were to use console timing, there would be common ground, and no time difference. Secondly, the rate at which the emulator runs at is actually irrelevant, for example: we use slowdown ad fastforwards anyway. If we were actually supposed to consider the speed that the emulator runs at, then you could fast forward and say it was completed faster. In other words, the timing of an emulator is arbitrary, and does not truly mean anything.
Measure once. Cut twice.