[HN Gopher] Dolphin Emulator - Dolphin MEGA Progress Report: Apr...
       ___________________________________________________________________
        
       Dolphin Emulator - Dolphin MEGA Progress Report: April and May 2021
        
       Author : Parseus
       Score  : 219 points
       Date   : 2021-06-06 09:39 UTC (13 hours ago)
        
 (HTM) web link (dolphin-emu.org)
 (TXT) w3m dump (dolphin-emu.org)
        
       | scoopertrooper wrote:
       | Such passion and joy in these release notes!
        
       | ravenstine wrote:
       | Not only am I always impressed by Dolphin, but by how interesting
       | and detailed their blog posts are! If only other software
       | projects could do the same. I don't even really play games much
       | anymore, especially Nintendo games, but somehow I always come
       | away with delight when I read the Dolphin progress updates and so
       | on.
        
       | Wowfunhappy wrote:
       | > 5.0-14120 - Fix Out of Bounds Texture Coordinate Behavior
       | 
       | > More surprisingly, the originally intended effect is never
       | shown on console either! Players have instead been seeing a
       | different kind of blur effect created by this undefined behavior.
       | In all likelihood, this bug went unnoticed by developers because
       | the effect they achieved looked pretty good and they simply
       | didn't realize that anything was wrong. While implementing the
       | undefined behavior in Dolphin, pokechu22 also fixed Nintendo's
       | bug so that we could see what could have been.
       | 
       | Nah, it looks wrong with the original "bug" fixed--it's supposed
       | to look like a painting! The developers may or may not have known
       | what happened, but I bet if not for the quirk they would have
       | gone with something else entirely.
        
         | tinus_hn wrote:
         | I don't really understand how they consider an effect to be
         | 'undefined'; did Nintendo ever release documentation for this
         | hardware?
        
           | bombcar wrote:
           | There is (was) extensive developer documentation. I don't
           | know if it's ever been made openly public.
        
             | sli wrote:
             | And it's fraught with problems if the Dolphin team were to
             | use any of the information from those Nintendo links that
             | they can't prove they determined/discovered/developed
             | independently. Most emulator developers are avoiding those
             | even if there might be useful documentation in there. These
             | blogposts are informative as hell but they also do the job
             | of covering their asses by showing their original work.
        
       | ativzzz wrote:
       | How has Dolphin avoided getting sued by Nintendo? They seem very
       | uptight about controlling their IPs
        
         | CodeArtisan wrote:
         | IIRC, Nintendo hasn't sued anyone since their lost against
         | GameGenie.
         | 
         | edit:
         | 
         | https://enwp.org?curid=60789181
        
         | 0xcde4c3db wrote:
         | It might be instructive to flip the question around: what would
         | Nintendo sue for? For which works of authorship is Dolphin
         | infringing the copyrights? Which Nintendo patents or trademarks
         | does Dolphin infringe? If the angle is contributory
         | infringement based on users running illegally copied games, how
         | does Dolphin fail to pass the "substantial non-infringing uses"
         | test?
         | 
         | The only emulator project I know of that was apparently
         | successfully stopped by Nintendo wasn't an emulator of a
         | Nintendo system at all. It was actually a Neo Geo Pocket
         | emulator that had "Pokemon" in its name (for stupid reasons
         | that are not relevant to this discussion) and was threatened
         | for trademark infringement on that basis.
        
           | CobrastanJorji wrote:
           | And yet, so many amazing emulator projects have been sued out
           | of existence. Remember Bleem, the Windows program that played
           | contemporary Playstation games? Bleem actually won the court
           | case, but the legal costs forced them out of business.
           | 
           | And then there was the time Sony sued Connectix for their
           | emulator. Sony got an injuction, and while Connectix won in
           | appeal, they also ran out of money and closed.
           | 
           | Nintendo, on the other hand, focuses less on suing emualator
           | developers and more on suing distributors of ROMS for old,
           | unavailable titles, like LoveROM.
        
             | 0xcde4c3db wrote:
             | I'm not convinced that many emulators have been sued out of
             | existence; do you have more examples? Over the past
             | quarter-century, there have been countless emulators
             | released, at least a couple dozen of which achieved
             | considerable fame. Of the examples mentioned so far, only
             | one (Connectix) actually hinged on an issue that was
             | substantially related to emulation (copies of the PS1
             | firmware used for reverse engineering during development).
             | The bleem! case was primarily about commercial use of
             | screenshots, and the NGP emulator matter was about the
             | emulator's name containing an unrelated trademark (and, to
             | my knowledge, never actually went to court).
        
         | bombcar wrote:
         | They're careful to not make downloads of roms, isos, or boot
         | roms.
        
       | DonHopkins wrote:
       | >This was thankfully a lot less strict than on iOS devices, which
       | strictly forbid mapping memory as executable whatsoever and made
       | iOS untenable for us to officially support. Apple even provides
       | documentation for helping developers port JITs to macOS on ARM.
       | Skyler used a method described in the documentation that would
       | change the mapped memory between Writeable when emitting code to
       | Executable when executing code. Since Dolphin wasn't designed for
       | this, there were a few hiccups along the way, but eventually
       | everything was massaged into working with the new restrictions.
       | 
       | How expensive is changing memory mapping modes? Does it involve a
       | system call? Does it need to happen often?
        
         | olliej wrote:
         | Changing memory modes on osx/m1 is cheap, it doesn't involve a
         | syscall, and it has to happen any time you want to make a
         | change to generated code (unless you do code on a separate
         | thread from execution)
        
         | masklinn wrote:
         | No / yes / only once.
         | 
         | It's just an mprotect(2) call to change the page from R+W to
         | R+X. It needs to happen between the JIT being done creating a
         | hunk of code and the first execution. Basically: allocate a
         | page, write generated machine code to the page, change page to
         | executable, patch page in (so the code gets invoked instead of
         | either interpretation or a baseline compiler).
         | 
         | I'm sure you can be smarter about it and involve locks such
         | that you track how full "code pages" are and switch non-full
         | pages back to writeable in order to update their content.
        
           | olliej wrote:
           | On m1 switch RX to RW and back does not require a syscall
           | 
           | The mprotect call will fail as that isn't a valid mechanism
           | to toggle rw/rx
        
             | monocasa wrote:
             | Can you give a citation that mprotect will fail? Yes
             | there's the new, faster mechanism, but I'm surprised that
             | they broke mprotect.
        
         | swiley wrote:
         | Apple doesn't acknowledge emulators as valid software and would
         | prefer the world not have access to them.
        
         | staticassertion wrote:
         | Where is that quote from? I'm not seeing it on the linked page.
        
           | arm wrote:
           | It's from this page (which was linked in the opening sentence
           | of the April & May 2021 progress report):
           | 
           | https://dolphin-emu.org/blog/2021/05/24/temptation-of-the-
           | ap...
        
       | kzrdude wrote:
       | How well does dolphin run on Rpi 4 now?
        
         | my123 wrote:
         | Raspberry Pi hardware is way, way too weak.
        
           | Reason077 wrote:
           | The Raspberry Pi 4 is on the order of 10 - 20X more powerful
           | than the Gamecube's 20 year old, single core ~400 Mhz 32-bit
           | CPU. The GPU is a bit more difficult to compare, but I'd
           | guess a well optimised emulator with JIT/code translation
           | ought to run very well on Pi 4 hardware.
           | 
           | [1] https://en.wikipedia.org/wiki/Gekko_(microprocessor)
        
             | zamadatix wrote:
             | It actually struggles to hit 30 FPS in most GC titles
             | still. Accurate emulation between vastly different platform
             | stacks generally does not care about the raw performance
             | ratio rather how "lucky" some of the hardware functionality
             | can be efficiently mapped.
        
               | Reason077 wrote:
               | Yes, in terms of Dolphin's performance today, I don't
               | doubt it. There are probably many more optimisations that
               | can be made: Dolphin's AArch64 JIT is still pretty
               | incomplete and inefficient compared to the x86-64 JIT,
               | for example.
               | 
               | My point is in theory, given enough time and effort, the
               | Pi 4 should have more than enough power to emulate a
               | 20-year old device. I'd argue that it's certainly not
               | "way way too weak" as the reply above suggested.
        
               | my123 wrote:
               | The RPi4 GPU is very weak for the tricks that Dolphin
               | does. Good luck to get Ubershaders running on that for
               | example.
               | 
               | The CPU isn't much of an issue.
               | 
               | Emulating a platform at such a low level in real-time is
               | very heavy resource-wise, by design.
        
               | my123 wrote:
               | To elaborate a bit more on the GPU peak FP32 perf:
               | 
               | > VideoCore VI @ 500MHz: 500 [MHz] x 2 [slice] x 4
               | [qpu/slice] x 4 [processor] x 2 [op/clock] = 32 Gflop/s
               | 
               | which is the RPi4 config.
               | 
               | compared to a Snapdragon 800: 147.9Gflops FP32, and
               | that's still a very old part.
               | 
               | And about the Wii itself:
               | 
               | > With the Wii, Nintendo opted to go with an innovative
               | control scheme, rather than to focus on processing power.
               | It offered 12 gigaflops, which represents a 1.27x
               | improvement over its GameCube predecessor
               | 
               | The margins are way too slim when counting emulation
               | overhead.
        
               | Reason077 wrote:
               | Ok, sounds like the Pi's VideoCore VI is a lot less
               | performant than I thought. I'd imagined it'd be closer to
               | other mobile GPUs.
        
               | my123 wrote:
               | It was probably a sane technical choice for them. RPi4 is
               | made on the same node as the Snapdragon 800 (28nm), but
               | with a much more recent (and bigger) CPU complex, using
               | the Cortex-A72.
               | 
               | As a bunch of RPis are headless anyway...
        
               | 0xcde4c3db wrote:
               | My understanding is that the VideoCore architecture was
               | initially designed as more of a "media codec
               | coprocessor", and was incidentally able to grow enough
               | matrix math throughput to be pressed into service as a
               | GPU.
        
             | giantrobot wrote:
             | The differences aren't just raw CPU and GPU power though.
             | The GC, Wii, and Wii U had a couple different high
             | bandwidth and low latency RAM[0] types in the GPU. The low
             | latency and speed likely led to access patterns that are
             | harder to emulate with a Pi's unified and relatively slow
             | DRAM.
             | 
             | [0] https://en.m.wikipedia.org/wiki/1T-SRAM
        
         | flatiron wrote:
         | Look for a second hand Wii U. Plays GC wii and Wii U games with
         | hdmi!
        
           | bennysomething wrote:
           | Does it upscale GameCube games? If not do the still look ok?
           | Dreamcast VGA 480p still looks great.
        
             | NathanielK wrote:
             | Wii U keeps the original Wii/Gamecube GPU. It has another
             | chip behind it that scales it to HDMI. This is also why Wii
             | 240p doesn't work on the Wii U. Instead old VC games will
             | be a slightly blurry 480p at best.
             | 
             | If you want the clearest 480p, the original Wii will do.
             | With component cables and a compatible TV, it should be
             | just as clear as DreamCast VGA.
        
             | Reason077 wrote:
             | Yes, Gamecube (and Wii) games are upscaled right up to 4K
             | and they look great. Many games work in 16:9 widescreen
             | also (Gamecube was originally 4:3).
             | 
             | For many games there are even community high-def texture
             | packs that you can add to make them look even better.
             | 
             | [ _Edit:_ Sorry, was talking about Dolphin here, not Wii
             | U!]
        
               | chungy wrote:
               | > Many games work in 16:9 widescreen also (Gamecube was
               | originally 4:3).
               | 
               | There are a handful of GameCube titles that were 16:9
               | native widescreen on the original console. The one that
               | comes to mind for me is Serious Sam: The Next Encounter
        
               | sp332 wrote:
               | [Edit: seems like you're talking about Dolphin. flatiron
               | upthread mentioned a Wii U so that's what the question
               | you replied to is about.]
               | 
               | Wii U's max HDMI output is 1080p. Also I have not seen
               | any information that it does upscaling at all, so if you
               | have a source for that, I'd like to know it.
        
               | Wowfunhappy wrote:
               | Yes, the GP misspoke. However, I'd expect any half-decent
               | TV to have no trouble upscaling the Wii U's 1080p signal
               | - 4K.
        
         | Causality1 wrote:
         | Not well. If you don't have a PC you'd be better off running it
         | on your phone with HDMI out to a monitor.
        
           | rejectedandsad wrote:
           | Is there a listing of which hardware can run games at full
           | speed at native/upscaled resolution?
        
             | zamadatix wrote:
             | If you have specific games in mind you can often find
             | comparable test results for similar hardware on the game's
             | wiki page. https://wiki.dolphin-
             | emu.org/index.php?title=The_Legend_of_Z... (you can click
             | "expand" to get a ton more results but they may be on very
             | old versions and not representative of current
             | performance).
        
             | Causality1 wrote:
             | Not as such, but there are a lot of YouTube videos where
             | people test a series of games on a particular phone. There
             | are some general rules though. Snapdragon always
             | outperforms other platforms of a particular generation due
             | to driver issues. More popular games like Mario and Zelda
             | will run better because they get more developer attention.
             | There are multiple forks with different goals, eg, Dolphin
             | MMJR has much higher performance than official Dolphin at
             | the cost of stability and accuracy.
             | 
             | Snapdragon 845 is the entry level where you can play maybe
             | 50 percent of games at full speed, and a few at full speed
             | and higher than native resolution. If you want to run at
             | double or triple native gamecube resolution I'd recommend
             | at least an 865.
             | 
             | Also keep in mind some phones like Pixels disable video
             | out. Get an HDMI+PD adapter to keep your phone charged
             | while outputting to a TV. If your phone's USB port is
             | limited to USB 2.0 speeds you'll have to get a DisplayLink
             | adapter.
        
       | blamazon wrote:
       | Kudos to the team working on Dolphin. This stuff seems like
       | witchcraft to me and their dedication to hunt down tiny bugs is
       | amazing!
        
         | matheusmoreira wrote:
         | Yeah, they are wizards. I love reading emulator source code.
         | It's helped me have a better understanding of electronics. I
         | still don't know anywhere near enough though...
        
       | umvi wrote:
       | I recently wanted to play the original Paper Mario, but sadly
       | it's not available on Switch, only Wii U. So I decided to go the
       | emulator route. Dolphin is so good that Paper Mario runs better
       | as a Wii U Virtual Console ROM under Dolphin than it does as an
       | N64 ROM under Project 64.
        
         | TazeTSchnitzel wrote:
         | Dolphin isn't a Wii U emulator, are you confusing it with the
         | Wii?
        
           | umvi wrote:
           | Dolphin can't play Wii U games, but it can play games
           | released on Wii U's Virtual Console platform, which is the
           | case here
        
             | chungy wrote:
             | Are those games distributed as Wii titles rather than Wii
             | U?
             | 
             | I'd imagine that you can't actually play anything exclusive
             | to the Wii U virtual console.
        
               | umvi wrote:
               | I'm not sure how it works technically under the hood. I
               | got Paper Mario as a ".wad" file instead of the normal
               | .iso that you see for GC/Wii/WiiU games, and Dolphin was
               | able to load the .wad file.
        
               | chungy wrote:
               | Shall I assume you didn't copy it from your Wii U
               | console? if you downloaded it from somewhere, it probably
               | was the original Wii version.
        
               | umvi wrote:
               | Ah, you are probably right, my mistake. Unfortunately I
               | can't edit my original comment now. I was under the
               | impression it was a Wii U file since I downloaded it from
               | a reddit link I found that said it was a Wii U Virtual
               | Console title. But, doing some research it was also
               | released for the original Wii VC at some point, so it's
               | likely that's where the file came from.
        
               | DSMan195276 wrote:
               | My understanding is that `wad`s are specifically for the
               | Wii (and Google seems to back me up on that), so
               | regardless of where they got it from the fact that it was
               | a `wad` means they were playing the Wii version. If it
               | was an actual Wii U version it would be some other
               | format.
        
             | TazeTSchnitzel wrote:
             | The Wii U Virtual Console games only run on the Wii U.
        
             | nohr wrote:
             | I never knew that! This project is just so well done.
             | Always amazing to find out new features.
        
               | umvi wrote:
               | Actually I may have been mistaken. Paper Mario was also
               | released for Wii Virtual Console (not exclusively Wii U)
               | so I may have downloaded that one.
        
         | ravenstine wrote:
         | Project 64 is pretty dated, though. Surprisingly, it looks like
         | it's now open source, but I'm pretty sure that wasn't always
         | the case, and it sat unimproved for several years. Someone can
         | correct me on this, but that's my understanding. (that isn't to
         | say there wasn't a time where PJ64 was hands down the best N64
         | emulator)
         | 
         | Mupen64plus, in my experience, has been far superior to PJ64
         | for a long time. These days the emulators have come along
         | enough that the differences can be somewhat trivial, but a
         | decade ago Mupen64plus ran better for me on lower-end hardware
         | and had way fewer idiosyncrasies than PJ64.
         | 
         | Comparison:
         | 
         | https://youtu.be/W5alOzrL_Hw?t=556
         | 
         | Nevertheless, it wouldn't surprise me if Paper Mario ran better
         | through Wii U Virtual Console on Dolphin than through
         | Mupen64plus! ;)
        
       ___________________________________________________________________
       (page generated 2021-06-06 23:01 UTC)