6 ms·
Why Dolphin Isn't Coming to the App Store
- mort96 2y agoSo I'm not overly familiar with either JITs, Apple's policies or emulators, so this may be a stupid idea, but I was thinking: Apple does allow exactly one JIT on iOS, in its JavaScript engine. What, technically, is preventing anyone from writing a recompiler from PowerPC machine code for the Wii to ASM.js (or even WebAssembly) and then throwing JavaScriptCore at it? It's not gonna be as fast as a recompiler straight to native code I guess, but could it be significantly faster than interpreting? From some quick Googling, it seems like JavaScriptCore is running with the JIT disabled in most apps, but surely e.g Chrome is running with JIT enabled. Convincing Apple to let you use JavaScriptCore with JIT enabled might be easier than convincing them to let one run one's own JIT.
- deleted 2y ago[deleted]
- robertjpayne 2y agoJavaScriptCore doesn't use a JIT when used in your own apps. When you embed a WKWebView it runs out-of-process and has JIT enabled. Without the entitlement you cannot execute any written memory by your own process. All 3rd party browsers today use WKWebView and add their own "chrome" over the rendered page. In essence Chrome/Firefox for iOS are really just Safari with custom chrome for bookmarks etc…
- mort96 2y agoWhat exactly is preventing you from making an off-screen WKWebView and pointing it at some bundled HTML/JS which allows the app to run arbitrary JS through some IPC? I guess App Store guidelines would come in the way, but I bet it it would be technically possible
- kevincox 2y agoIt is technically possible but the IPC will destroy you. You would need to transfer inputs and outputs as well as have JS shims to call it. Most of the code will be doing tons of memory accesses which will need to be transferred back and forth across the process boundary and orders of magnitude more cost. If you did want to try the best approach is probably to compile Dolphin to WASM and render via WebGPU. Then you can JIT WASM. But I suspect that the overall performance will still be lower. (Although a web version of Dolphin would still be super cool.)
- deleted 2y ago[deleted]
- voxic11 2y agoI don't think it would be as simple as compiling Dolphin to WASM. Since Dolphin itself implements a JIT compiler that emits native code you would need to also teach Dolphin to emit WASM code.
- SSLy 2y agoOther concerns raised by sibling comments aside, that'd amount to a new port effort, virtually equivalent to a web app.
- mort96 2y agoOh yeah it's a huge amount of work, I don't want to make it sound like I think people should "just" take Dolphin and port its JIT to JavaScript.
- londons_explore 2y agoBet there'd be interest in a web version of Dolphin. Dosbox-on-the-web has proved pretty popular, and a lot of old games are available on the web that way.
- deleted 2y ago[deleted]
- amelius 2y agoHonestly it would be more cool if developers for once started to boycott Apple here, instead of jumping through their hoops.
- mort96 2y agoMeh that won't happen until there are decent alternatives out there. Google's Android isn't such an alternative, and other options aren't supported by all the services people need to use.
- beeboobaa3 2y ago> Google's Android isn't such an alternative It absolutely is. Don't be delusional lol. Here's a video of dolphin running on android: https://www.youtube.com/watch?v=Tp-D4GvUxY4 https://www.youtube.com/watch?v=Tp-D4GvUxY4
- BiteCode_dev 2y agoYes, but you get more money out a single Apple customer than from 5 android users, and that's the problem of this alternative. It's about money, not technical capabilities.
- beeboobaa3 2y agoDolphin is free. 5x0=0. Then you have to consider the platform fees. So for android: One time fee of $20, yearly $0 profit For apple: Yearly fee of $100, yearly $-100 profit
- mort96 2y agoIt's an alternative if all you want is emulators on your phone of course. For me, Google Android isn't a meaningful alternative to iOS, simply because I trust Google even less than I trust Apple.
- SSLy 2y ago
- beeboobaa3 2y ago> What, technically, is preventing anyone from writing a recompiler from PowerPC machine code for the Wii to ASM.js (or even WebAssembly) and then throwing JavaScriptCore at it Self respect. At some point you have to recognize that the platform is hostile and abusive towards you, and it's not healthy to continue to engage.
- lioeters 2y ago> recognize that the platform is hostile and abusive That's how Apple lost me as a customer, who had been a life-long user since early Macintosh days. It's an example of enshittification, death by a thousand cuts. Shame what they've done to the legacy, but the magic has been waning for a while. The elves left a long time ago, replaced by greedy sneaky humans.
- madeofpalk 2y ago> e.g Chrome is running with JIT enabled. Convincing Apple to let you use Current Chrome iOS app uses Webkit and JavascriptCore. I believe Chrome uses WKWebViews and so can take advantage of JIT-enbaled JSC. As pointed out in the article, in the EU Apple has APIs and entitlements for other browser engines, including allowances for JIT. But as it's an entitlement you apply for, you'll only get it for web browsers https://developer.apple.com/documentation/browserenginekit https://developer.apple.com/documentation/browserenginekit https://developer.apple.com/support/alternative-browser-engines/ https://developer.apple.com/support/alternative-browser-engi...
- ginko 2y ago>The only exceptions are Safari and alternative web browsers in Europe. So ship Dolphin with Opera for Wii and call it a web browser. :)
- advael 2y agoIt's amazing how many nice things we could have if we stopped using criminal law to reinforce the power of OEMs to exert control over what software can be run on the devices they sell
- ginko 2y agoThe problem Apple's walled garden is that they don't mainly use criminal law but technology to protect it. Nothing really keeps you from legally jail breaking your iphone, but it's a painful process and staying up-to-date is a constant cat and mouse game with iOS devs. Only competition law can force them to open up properly.
- resource_waste 2y ago> Apple's walled garden Lol repeating Apple marketing in plain sight. There is no garden, its a prison. "Garden" is marketing jargon to beautify the reality of things. Think of the word Garden, fruits, vegetables, flowers. That word was specifically chosen by their marketing team for a reason. The reality is that Apple has dictator-style control and the ability to ban/punish people with no oversight. "Garden"...yeah words paint prettier pictures than reality if you let them.
- anfilt 2y agoApple is not using any laws here at the moment at least in the US. Jail-breaking got granted an exception from the DMCA by the library of congress. What apple is using cryptography. Basically, the cryptography gives Apple an extralegal means to enforce whatever it wants. Also side note: I suggest you read this post/response I posted a while a ago: https://news.ycombinator.com/item?id=39349288 https://news.ycombinator.com/item?id=39349288
- advael 2y agoI understand your point and agree that the immediate-term solutions apple is employing are technological However, the environment in which Apple operates is defined by anti-circumvention. Yes you can legally jailbreak your phone. You can't legally run an R&D program to circumvent part-pairing, or develop a business around aftermarket modification of phones to modify or replace the boot ROM or other components. There's a reason third-party aftermarket modification of vehicles used to be a much bigger market and it's not the technological feasibility of developing modifications. The same is true of consumer electronics
- eptcyka 2y ago> Swift Playgrounds is an exception too. Apple trusts itself to use JIT compilation safely, but not third-party developers. That’s not unreasonable — but I’m not sure it’s compliant with the DMA. > That’s not unreasonable Is Gruber paid by Apple?
- nikanj 2y agoAre you implying Apple should limit Apple-made apps on the iPhone?
- ginko 2y agoThey should or allow other developers to use the same features.
- kevingadd 2y agoIn the past that was basically the rule OS vendors were expected to abide by
- akmarinov 2y agoThis has never been the case. Apple has always had non-core apps that use private APIs.
- flohofwoe 2y ago...which doesn't make it right. Even the existence of "private APIs" is a massive red flag. If an operating system feature is accessible from user space, then it should also be documented, supported and legal to use.
- Zambyte 2y ago"Legal" is such a mind blowing term to use here. How can it be illegal for you to use the features that are designed into the device you bought? Limiting it arbitrarily for an artificial advantage should be illegal.
- devinprater 2y agoHow about we think of emulation as making games accessible? I know, it wouldn't work for like 99% of use cases, but it sure makes my life easier, as a blind person. Since Retroarch now has accessibility support on iOS, and loads its screen reader when it detects that VoiceOver is on, I can open the game I want to play. And then, using VoiceOver's Screen Recognition, which basically works as OCR and basic image recognition, I can read game menus. For now, this just allows me to play games on my phone who's gameplay is already pretty playable, like fighting games and visual novels. Except, now I can read menus, character selection screens, character dialog, stuff like that, all on my phone. Too bad Android doesn't have a screen recognition feature for TalkBack; they barely just got image descriptions that VoiceOver had for years. So, even though emulation is far better on Android, I still choose iOS. Apple could, I don't know, sure capitalize on that. I mean, even at the end of this article[1], it shows someone using what I suspect is emulation to play Metroid Prime on a Vision Pro, probably through Dolphin on a Mac. So they surely know about the need for JIT in emulation. [1] https://nymag.com/intelligencer/article/apple-vision-pro-disabled-users.html https://nymag.com/intelligencer/article/apple-vision-pro-dis...
- mmaniac 2y agoThis sort of thing won't change unless customers stop buying user-hostile computers. This won't happen, so it'll continue.