{"action":"created","issue":{"url":"https://api.github.com/repos/citra-emu/citra/issues/1212","labels_url":"https://api.github.com/repos/citra-emu/citra/issues/1212/labels{/name}","comments_url":"https://api.github.com/repos/citra-emu/citra/issues/1212/comments","events_url":"https://api.github.com/repos/citra-emu/citra/issues/1212/events","html_url":"https://github.com/citra-emu/citra/issues/1212","id":112671792,"number":1212,"title":"ncch.c guesses segment offsets instead of taking the given values","user":{"login":"neobrain","id":4840017,"avatar_url":"https://avatars.githubusercontent.com/u/4840017?v=3","gravatar_id":"","url":"https://api.github.com/users/neobrain","html_url":"https://github.com/neobrain","followers_url":"https://api.github.com/users/neobrain/followers","following_url":"https://api.github.com/users/neobrain/following{/other_user}","gists_url":"https://api.github.com/users/neobrain/gists{/gist_id}","starred_url":"https://api.github.com/users/neobrain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neobrain/subscriptions","organizations_url":"https://api.github.com/users/neobrain/orgs","repos_url":"https://api.github.com/users/neobrain/repos","events_url":"https://api.github.com/users/neobrain/events{/privacy}","received_events_url":"https://api.github.com/users/neobrain/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-10-21T20:24:30Z","updated_at":"2015-10-23T21:51:09Z","closed_at":null,"body":"NCCH headers already explicitly give the RAM offset to the code/ro/data sections. Citra for some reason calculates them manually, e.g. via\r\n```\r\ncodeset->rodata.offset = codeset->code.offset + codeset->code.size;\r\n```\r\nOther than being redundant code, this is not even guaranteed to match the offsets specified in the NCCH."},"comment":{"url":"https://api.github.com/repos/citra-emu/citra/issues/comments/150701633","html_url":"https://github.com/citra-emu/citra/issues/1212#issuecomment-150701633","issue_url":"https://api.github.com/repos/citra-emu/citra/issues/1212","id":150701633,"user":{"login":"yuriks","id":341401,"avatar_url":"https://avatars.githubusercontent.com/u/341401?v=3","gravatar_id":"","url":"https://api.github.com/users/yuriks","html_url":"https://github.com/yuriks","followers_url":"https://api.github.com/users/yuriks/followers","following_url":"https://api.github.com/users/yuriks/following{/other_user}","gists_url":"https://api.github.com/users/yuriks/gists{/gist_id}","starred_url":"https://api.github.com/users/yuriks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yuriks/subscriptions","organizations_url":"https://api.github.com/users/yuriks/orgs","repos_url":"https://api.github.com/users/yuriks/repos","events_url":"https://api.github.com/users/yuriks/events{/privacy}","received_events_url":"https://api.github.com/users/yuriks/received_events","type":"User","site_admin":false},"created_at":"2015-10-23T21:51:09Z","updated_at":"2015-10-23T21:51:09Z","body":"I think I had written this code (though I'm not gonna check since I'm at\nwork), and it was quite ambiguous. Iirc there are indeed redundant ways\nto compute the values in question.\n\n--yuriks\n\n\nOn Fri, Oct 23, 2015, at 05:55 PM, Tony Wasserka wrote:\n> @archshift[1] This doesn't really have anything to do with tests. It's\n> a question of what the author intended when writing the code, and how\n> it relates to the factually known layout of NCCH files.\n\n\n> — Reply to this email directly or view it on GitHub[2].\n\n\n>\n\n\n\nLinks:\n\n  1. https://github.com/archshift\n  2. https://github.com/citra-emu/citra/issues/1212#issuecomment-150674780\n"}}