Post subject: Converting Frames to Time
Player (105)
Joined: 1/30/2005
Posts: 564
Location: Québec, Canada
It has come to my attention that a few people on this forum asked for a tool that converted Frames to Time, for convenience sake. Since I had a little too much free time, I started working on one. For now, it only converts from frames to time, using a 60 frames per second basis. The next version will also allow to convert from time to frames, and support different FPS timings. Here's the link: http://halamantariel.homeip.net/FramesToTime.zip
Editor, Expert player (2479)
Joined: 4/8/2005
Posts: 1573
Location: Gone for a year, just for varietyyyyyyyyy!!
This is a nice little tool. Thanks.
Former player
Joined: 8/1/2004
Posts: 2687
Location: Seattle, WA
I thought there was a bit of a discrepancy with some of the emulators' frame to time conversion. Something like FCEU actually running at 30.08 fps, and snes9x running a very tiny bit over 60.
hi nitrodon streamline: cyn-chine
Editor, Active player (297)
Joined: 3/8/2004
Posts: 7469
Location: Arzareth
Zurreco wrote:
Something like FCEU actually running at 30.08 fps
60.09982293844223 FPS in NTSC mode, 50.00698089599609 FPS in PAL mode.
Emulator Coder, Site Developer, Former player
Joined: 11/6/2004
Posts: 833
SGB runs at ~60.262 (inconsistently), GBA runs at ~59.67, etc. But for calculation purposes, the site seems to use 60.000 for most systems. Snes9x uses exactly 60 or 50. Which isn't technically correct, but that's not the issue.
Post subject: Re: Converting Frames to Time
Banned User
Joined: 3/10/2004
Posts: 7698
Location: Finland
Halamantariel wrote:
For now, it only converts from frames to time, using a 60 frames per second basis. The next version will also allow to convert from time to frames, and support different FPS timings.
I haven't tried your program and that's probably why I just don't get it. Why would people want a 380k executable in order to divide one number by 60? You don't need a specialized program to divide a number by 60. Just use the calculator. And don't tell me it's because "it's too much trouble to write or click on '/60'." Even if this tool made sense (which I don't understand why it would), wouldn't it be much easier and much more portable to make eg. a page that uses javascript to do the operation? No need to download a 380k windows executable to run a simple divide-by-60 calculator.
Post subject: Re: Converting Frames to Time
Player (105)
Joined: 1/30/2005
Posts: 564
Location: Québec, Canada
Warp wrote:
Even if this tool made sense (which I don't understand why it would), wouldn't it be much easier and much more portable to make eg. a page that uses javascript to do the operation? No need to download a 380k windows executable to run a simple divide-by-60 calculator.
First of all, I think your reply is a little too harsh overall. As you can see in the first reply I got, at least 1 person thinks this is useful. That being a reality, it is not useless. I'm pretty sure more people are using it but don't bother posting on the forum about it. Flame me all you want, but I won't admit that this program is useless. About your suggestion of making this a javascript page, it's really a good idea. I will work on doing this also, and will provide the users with two choices. Either use the webpage or download the executable which will be linked on that same page. Again, think all you want of this program. If you don't like it, don't use it. No need to flame me about what you think of that program.
Post subject: Re: Converting Frames to Time
Player (52)
Joined: 10/6/2005
Posts: 138
Location: Oregon
Warp wrote:
I haven't tried your program and that's probably why I just don't get it. Why would people want a 380k executable in order to divide one number by 60? You don't need a specialized program to divide a number by 60. Just use the calculator. And don't tell me it's because "it's too much trouble to write or click on '/60'."
Determining time from frames is not as simple as "dividing by 60." That will give you a crazy decimal number in terms of fractions of seconds, which, at least in the US, is not how we keep time. We keep time in terms of hours, minutes, seconds, so a tool that easily and clearly informs us in those terms is useful. If you'd rather divide by 60 several times and convert from decimal to base-60, then I guess you like math more than me, and I'm a math major.
Post subject: Re: Converting Frames to Time
Banned User
Joined: 3/10/2004
Posts: 7698
Location: Finland
tmont wrote:
Determining time from frames is not as simple as "dividing by 60." That will give you a crazy decimal number in terms of fractions of seconds, which, at least in the US, is not how we keep time. We keep time in terms of hours, minutes, seconds, so a tool that easily and clearly informs us in those terms is useful. If you'd rather divide by 60 several times and convert from decimal to base-60, then I guess you like math more than me, and I'm a math major.
My point was that making a 300k+ windows binary in order to perform such a simple operation is total overkill. Here's a short perl skript which does the same thing:
perl -e '$frames=10000; $frames/=60; print int($frames/3600), "h ", int($frames%3600/60), "m ", int($frames%60), "s\n";'
Post subject: Re: Converting Frames to Time
creaothceann
He/Him
Editor
Joined: 4/7/2005
Posts: 1874
Location: Germany
Warp wrote:
My point was that making a 300k+ windows binary in order to perform such a simple operation is total overkill.
That's the VCL runtime library; the main code is much smaller. It's the price to pay for simple GUI development...
Joined: 4/11/2006
Posts: 487
Location: North of Russia :[
not everyone can use perl script... Like I mentiond on IRC, in Pascal console-type application source would look like this:
Var 
  n: integer; 
  fps : real; 
begin 
  write('enter number of frames and fps:');
  readln(n,fps); 
  writeln(trunc(n/fps) div 3600,':',trunc(n/fps) div 60 mod 60,':',trunc(n/fps) mod 60,'.',trunc(1000*n/fps)) 
end.
or even Var n: integer;fps : real;begin write('enter number of frames and fps:');readln(n,fps);writeln(trunc(n/fps) div 3600,':',trunc(n/fps) div 60 mod 60,':',trunc(n/fps) mod 60,'.',trunc(1000*n/fps)) end. :D
Player (206)
Joined: 5/29/2004
Posts: 5712
It should just be an option in all the emulators to let you see the time in either form.
put yourself in my rocketpack if that poochie is one outrageous dude
Post subject: Re: Converting Frames to Time
Banned User
Joined: 3/10/2004
Posts: 7698
Location: Finland
creaothceann wrote:
It's the price to pay for simple GUI development...
It is perfectly possible to make a windows binary which performs that operation, full GUI and all, in less than 10 kilobytes. However, using a separate binary for a division is still an overkill IMO.
Post subject: Re: Converting Frames to Time
Joined: 4/11/2006
Posts: 487
Location: North of Russia :[
Warp wrote:
creaothceann wrote:
It's the price to pay for simple GUI development...
It is perfectly possible to make a windows binary which performs that operation, full GUI and all, in less than 10 kilobytes.
key word is simple
Player (81)
Joined: 3/11/2005
Posts: 352
Location: Oregon
If you have the coding ability to write that tool, why not just change the emulator. I'm sure it would take no more than 10 minutes to find and change the code, apart from waiting for compilation.
ideamagnate| .seen aqfaq <nothing happens> DK64_MASTER| .seen nesvideoagent * DK64_MASTER slaps forehead
Post subject: Re: Converting Frames to Time
creaothceann
He/Him
Editor
Joined: 4/7/2005
Posts: 1874
Location: Germany
Warp wrote:
creaothceann wrote:
It's the price to pay for simple GUI development...
It is perfectly possible to make a windows binary which performs that operation, full GUI and all, in less than 10 kilobytes.
Yes, but then you'll have to deal with the raw WinAPI stuff. Which can be done in Delphi too (and you get an 16 KB EXE, which is the smallest the compiler bothers with). ASM programmers on the other hand will be horrified by the amounts of space you're wasting, and so on etc. ...
Warp wrote:
However, using a separate binary for a division is still an overkill IMO.
Yup. But there's an audience for everything. :) EDIT: I'm sure it's possible to implement such a display into SNES9x in ten minutes, if you know the source.
Player (68)
Joined: 3/11/2004
Posts: 1058
Location: Reykjaví­k, Ísland
Okay guys, you've shown your 1337 perl skills. Now if someone could show me how to make OpenOffice Calc (the spreadsheet thingy) do this, that would be awesome. I can make it divide by 60 to get the seconds, but once the seconds go over 60 ... I don't know any of that advanced stuff.
Banned User
Joined: 3/10/2004
Posts: 7698
Location: Finland
The formulae are in the perl code I wrote. Deduce from there.
Player (68)
Joined: 3/11/2004
Posts: 1058
Location: Reykjaví­k, Ísland
Warp wrote:
The formulae are in the perl code I wrote. Deduce from there.
Wow, thanks. That's very helpful.
creaothceann
He/Him
Editor
Joined: 4/7/2005
Posts: 1874
Location: Germany
Blublu wrote:
Warp wrote:
The formulae are in the perl code I wrote. Deduce from there.
Wow, thanks. That's very helpful.
That wasn't a joke? 0_o
Player (68)
Joined: 3/11/2004
Posts: 1058
Location: Reykjaví­k, Ísland
creaothceann wrote:
That wasn't a joke? 0_o
Do you mean sarcasm? Yes. Yes, it was.
Former player
Joined: 3/30/2004
Posts: 1354
Location: Heather's imagination
Blublu wrote:
I don't know any of that advanced stuff.
x = framecount, yes? x % 60 = frames x / 60 % 60 = seconds x / 60 / 60 % 60 = minutes x / 60 / 60 / 60 = hours Assuming integer division of course
someone is out there who will like you. take off your mask so they can find you faster. I support the new Nekketsu Kouha Kunio-kun.
Post subject: Re: Converting Frames to Time
Player (52)
Joined: 10/6/2005
Posts: 138
Location: Oregon
Warp wrote:
a page that uses javascript to do the operation
You mean like this? I don't really know javascript all that well, so I kind of just brute forced it. It took me five minutes to figure out how to code it, and then 55 minutes to look up the javascript commands to actually implement it. Luckily, I had a free hour between World Cup games. :)
Joined: 1/31/2005
Posts: 95
Hitting backspace in the frames per second box one too many times is fun. :P I like how that works though.
Player (81)
Joined: 3/11/2005
Posts: 352
Location: Oregon
Entering 99999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999 (copy/paste for full effect) causes a small bug with the days.
ideamagnate| .seen aqfaq <nothing happens> DK64_MASTER| .seen nesvideoagent * DK64_MASTER slaps forehead