5 posts • Page 1 of 1
Well, as I understand, libnds on ARM7 calls resyncClock() at startup to get RTC time. Then, it uses syncRTC() attached to IRQ_NETWORK to update it periodically. However, some emulators (like Desmume) apparently don't emulate that IRQ, so the time is not updated. Is it currently possible to force the ARM7 to call syncRTC() from ARM9 code? If it isn't, how could I modify libnds to do this? I'm thinking of something like making __libnds_gtod() set *punixTime to 0 and polling it for a new value, while on the ARM7 side attaching to some supported interrupt a function that tests __transferRegion()->unixTime and calls resyncClock() if it's 0.
Yeah, I know. You don't like Desmume not implementing the necessary IRQ like other emulators, and Desmume don't like your approach that is efficient on hardware but doesn't work in some emulator-specific situations. That's cool, and I respect your decisions. Your nds toolchain is absolutely wonderful. I just want to modify and recompile libnds for myself, because, you know, Desmume is available as a nice and portable Libretro core, and runs on mobile devices as well. I specifically need to run an utility DS program that uses RTC on a mobile device; I can test it on whatever platform, but due to the use cases for it (possibly outdoors), other people may only use it if they have a working Nintendo DS, which is common but not always true (and then there's the battery...), or the particular situation permits the use of a laptop or even desktop computer. So I will just change some lines of code, compile the thing, and get it running on the buggy platform. Any advice on how I should do it? Would be really helpful for me
No. We don't like implementing workarounds for emulators that don't behave the same way hardware does. End of story.
Why does it have to be a DS program? Ultimately it's going to be much easier & much more flexible to build a web app that'll run anywhere instead of relying on emulation. What is the app? What does it do?I specifically need to run an utility DS program that uses RTC on a mobile device
Obviously the best approach is to implement the RTC IRQ in DeSmuMe rather than adding inappropriate code to libnds.Any advice on how I should do it? Would be really helpful for me
Well, you're probably right... Libnds is a library for the Nintendo DS, not for stuff that behaves similarly to the DS, which is also not a general-purpose computing platform. If I'm honest, I made this "app" for myself and targeted the nds just because I hate using higher level languages and markup (and love low-level coding), but it has grown into a pretty large project... I should have foreseen it. Well I shouldn't rely on other people to fix my mistakes (or Desmume's btw). I'm sorry and thanks for your explanations.
Who is online
Users browsing this forum: No registered users and 2 guests