{"action":"created","issue":{"url":"https://api.github.com/repos/dolphin-emu/dolphin/issues/1856","labels_url":"https://api.github.com/repos/dolphin-emu/dolphin/issues/1856/labels{/name}","comments_url":"https://api.github.com/repos/dolphin-emu/dolphin/issues/1856/comments","events_url":"https://api.github.com/repos/dolphin-emu/dolphin/issues/1856/events","html_url":"https://github.com/dolphin-emu/dolphin/pull/1856","id":53818676,"number":1856,"title":"[WIP] Make address translation respect the CPU translation mode","user":{"login":"magumagu","id":7026757,"avatar_url":"https://avatars.githubusercontent.com/u/7026757?v=3","gravatar_id":"","url":"https://api.github.com/users/magumagu","html_url":"https://github.com/magumagu","followers_url":"https://api.github.com/users/magumagu/followers","following_url":"https://api.github.com/users/magumagu/following{/other_user}","gists_url":"https://api.github.com/users/magumagu/gists{/gist_id}","starred_url":"https://api.github.com/users/magumagu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/magumagu/subscriptions","organizations_url":"https://api.github.com/users/magumagu/orgs","repos_url":"https://api.github.com/users/magumagu/repos","events_url":"https://api.github.com/users/magumagu/events{/privacy}","received_events_url":"https://api.github.com/users/magumagu/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-01-09T00:11:50Z","updated_at":"2015-01-11T22:30:43Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/dolphin-emu/dolphin/pulls/1856","html_url":"https://github.com/dolphin-emu/dolphin/pull/1856","diff_url":"https://github.com/dolphin-emu/dolphin/pull/1856.diff","patch_url":"https://github.com/dolphin-emu/dolphin/pull/1856.patch"},"body":"The PowerPC CPU has bits in MSR (DR and IR) which control whether addresses are translated.  We should respect these instead of mixing physical addresses and translated addresses into the same address space.\r\n\r\nThe bulk of this change is mass-renaming: making translation for CPU addresses work correctly means that memory accesses from the CPU have to use a CPU-specific API for memory access.\r\n\r\nOn its own, this isn't really that useful, because it doesn't change behavior unless a game crashes.  That said, it's the first step to further improvements to the memory subsystem (real BAT emulation, locking, etc.). \r\n\r\nMy current naming scheme is to turn Memory::Read/Write* into the hardware variants, and move the CPU versions to PowerPC::Read/Write*. That said, I'm open to suggestions.\r\n\r\nFixes issue 8064.\r\n\r\nTODO:\r\n- Finalize the names of the memory functions\r\n- Make sure the debugging UI works as expected\r\n- Make the JIT handling of turning translation on/off a bit less hacky\r\n- Implement IsOptimizableRAMAddress\r\n- Testing: make sure this doesn't break anything or cause performance regressions\r\n- Fix Android"},"comment":{"url":"https://api.github.com/repos/dolphin-emu/dolphin/issues/comments/69515120","html_url":"https://github.com/dolphin-emu/dolphin/pull/1856#issuecomment-69515120","issue_url":"https://api.github.com/repos/dolphin-emu/dolphin/issues/1856","id":69515120,"user":{"login":"skidau","id":8612259,"avatar_url":"https://avatars.githubusercontent.com/u/8612259?v=3","gravatar_id":"","url":"https://api.github.com/users/skidau","html_url":"https://github.com/skidau","followers_url":"https://api.github.com/users/skidau/followers","following_url":"https://api.github.com/users/skidau/following{/other_user}","gists_url":"https://api.github.com/users/skidau/gists{/gist_id}","starred_url":"https://api.github.com/users/skidau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skidau/subscriptions","organizations_url":"https://api.github.com/users/skidau/orgs","repos_url":"https://api.github.com/users/skidau/repos","events_url":"https://api.github.com/users/skidau/events{/privacy}","received_events_url":"https://api.github.com/users/skidau/received_events","type":"User","site_admin":false},"created_at":"2015-01-11T22:30:43Z","updated_at":"2015-01-11T22:30:43Z","body":"I'd prefer HostWrite_U* or Write_U*_From_Host over Debug_Write_U* as these functions can be used for things other than debug related.  Personally, I'd overload the functions with an optional parameter at the end and keep the function names uniform."}}