Views: 6,701,521 Homepage | Main | Rules/FAQ | Memberlist | Active users | Last posts | Calendar | Stats | Online users | Search 03-29-24 12:47 AM
Guest:

0 users reading How to calculate delay which lasts for 1 or 2 frames? | 1 bot

Main - Development - How to calculate delay which lasts for 1 or 2 frames? Hide post layouts | New reply


temp12312
Posted on 12-04-21 04:30 PM Link | #4796
Hello, I am calling nds schedule event and I can not figure out how to calculate delay which lasts for 1 or 2 frames. So how to calculate it reliably? To do so for 2 frames is it reliable or calculate it for 1 frame and then do one skip in function event callback, so in total 2 frames?...

Generic aka RSDuck
Posted on 12-04-21 04:54 PM Link | #4797
one frame should normally be 6*355*263 cycles, though in theory it can vary.

What exactly are you trying to archieve?

____________________
Take me to your heart / never let me go!

"clearly you need to mow more lawns and buy a better pc" - Hydr8gon

temp12312
Posted on 12-04-21 06:55 PM Link | #4798
Thanks. It is about emulating touches. If you call functions without delay game sees only the last call I think, because it does not register other function calls.

Generic aka RSDuck
Posted on 12-04-21 07:12 PM Link | #4802
the emulator scheduler isn't the best place to implement something like this, you're probably better off just hooking that in somewhere here: https://github.com/Arisotura/melonDS/blob/master/src/frontend/qt_sdl/main.cpp#L542 so that it will go before or after every call to RunFrame.

If you want to discuss this further I'll recommend hopping onto our IRC channel/Discord server: https://melonds.kuribo64.net/board/thread.php?id=3

____________________
Take me to your heart / never let me go!

"clearly you need to mow more lawns and buy a better pc" - Hydr8gon


Main - Development - How to calculate delay which lasts for 1 or 2 frames? Hide post layouts | New reply

Page rendered in 0.019 seconds. (2048KB of memory used)
MySQL - queries: 27, rows: 82/82, time: 0.014 seconds.
[powered by Acmlm] Acmlmboard 2.064 (2018-07-20)
© 2005-2008 Acmlm, Xkeeper, blackhole89 et al.