{"action":"created","comment":{"url":"https://api.github.com/repos/citra-emu/uncart/pulls/comments/68272298","id":68272298,"diff_hunk":"@@ -99,12 +100,34 @@ _setup_heap:\n     ldr r1, =__end__ @ grab the location of the end of the binary\n     add r0, r0, r1\n     ldr r1, =fake_heap_end @ heap goes from end of program to this variable\n-\tstr r0, [r1]\n-\tmov pc, lr\n+    str r0, [r1]\n+    mov pc, lr\n+\n+_flush_and_clean_caches:\n+    @ flush instruction cache, it's not flushed by Nintendo's function\n+    mov r0, #0\n+    mcr p15, 0, r0, c7, c5, 0\n+\n+    @ Nintendo's function uses r0-r2, r12, all registers that don't need\n+    @ to be saved, just be aware that they are changed\n+    @ use Nintendo's bx lr to return\n+    ldr r0, =0xFFFF0830 @ Nintendo's flush function in unprot. bootrom","path":"source/start.s","position":31,"original_position":31,"commit_id":"b34bde68c3cff22038d1616d2744bbb9fe8e1ca2","original_commit_id":"b34bde68c3cff22038d1616d2744bbb9fe8e1ca2","user":{"login":"gemarcano","id":4000062,"avatar_url":"https://avatars.githubusercontent.com/u/4000062?v=3","gravatar_id":"","url":"https://api.github.com/users/gemarcano","html_url":"https://github.com/gemarcano","followers_url":"https://api.github.com/users/gemarcano/followers","following_url":"https://api.github.com/users/gemarcano/following{/other_user}","gists_url":"https://api.github.com/users/gemarcano/gists{/gist_id}","starred_url":"https://api.github.com/users/gemarcano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gemarcano/subscriptions","organizations_url":"https://api.github.com/users/gemarcano/orgs","repos_url":"https://api.github.com/users/gemarcano/repos","events_url":"https://api.github.com/users/gemarcano/events{/privacy}","received_events_url":"https://api.github.com/users/gemarcano/received_events","type":"User","site_admin":false},"body":"It uses looping. Refer to the ARM clean cache examples for reference, Nintendo almost implemented it as presented in the example. Another example is my own implementation of it in https://github.com/gemarcano/libctr9_io/blob/master/src/ctr_system_ARM.c , although I don't remember if I've fixed my constants for the looping (tl;dr the ARM example contradicts the documentation with regards to the constant used for looping. Nintendo does it correctly).","created_at":"2016-06-23T16:57:54Z","updated_at":"2016-06-23T16:57:54Z","html_url":"https://github.com/citra-emu/uncart/pull/24#discussion_r68272298","pull_request_url":"https://api.github.com/repos/citra-emu/uncart/pulls/24","_links":{"self":{"href":"https://api.github.com/repos/citra-emu/uncart/pulls/comments/68272298"},"html":{"href":"https://github.com/citra-emu/uncart/pull/24#discussion_r68272298"},"pull_request":{"href":"https://api.github.com/repos/citra-emu/uncart/pulls/24"}}},"pull_request":{"url":"https://api.github.com/repos/citra-emu/uncart/pulls/24","id":74546653,"html_url":"https://github.com/citra-emu/uncart/pull/24","diff_url":"https://github.com/citra-emu/uncart/pull/24.diff","patch_url":"https://github.com/citra-emu/uncart/pull/24.patch","issue_url":"https://api.github.com/repos/citra-emu/uncart/issues/24","number":24,"state":"open","locked":false,"title":"Fixes issue with uncart freezing when starting up","user":{"login":"gemarcano","id":4000062,"avatar_url":"https://avatars.githubusercontent.com/u/4000062?v=3","gravatar_id":"","url":"https://api.github.com/users/gemarcano","html_url":"https://github.com/gemarcano","followers_url":"https://api.github.com/users/gemarcano/followers","following_url":"https://api.github.com/users/gemarcano/following{/other_user}","gists_url":"https://api.github.com/users/gemarcano/gists{/gist_id}","starred_url":"https://api.github.com/users/gemarcano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gemarcano/subscriptions","organizations_url":"https://api.github.com/users/gemarcano/orgs","repos_url":"https://api.github.com/users/gemarcano/repos","events_url":"https://api.github.com/users/gemarcano/events{/privacy}","received_events_url":"https://api.github.com/users/gemarcano/received_events","type":"User","site_admin":false},"body":"There seemed to have been a problem with caching and uncart, at least under a9lh and with one system. Explicitly disabling the mpu before setting it up and before calling subroutines related to setting it up appears to have fixed the problem.\r\n\r\nIt would be good to have people test this before merging, just to make sure the crashing is really gone.","created_at":"2016-06-21T03:30:47Z","updated_at":"2016-06-23T16:57:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c2cf90b355506ed7c97ca520848286c57ef87c43","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/citra-emu/uncart/pulls/24/commits","review_comments_url":"https://api.github.com/repos/citra-emu/uncart/pulls/24/comments","review_comment_url":"https://api.github.com/repos/citra-emu/uncart/pulls/comments{/number}","comments_url":"https://api.github.com/repos/citra-emu/uncart/issues/24/comments","statuses_url":"https://api.github.com/repos/citra-emu/uncart/statuses/b34bde68c3cff22038d1616d2744bbb9fe8e1ca2","head":{"label":"gemarcano:trim-cleanup","ref":"trim-cleanup","sha":"b34bde68c3cff22038d1616d2744bbb9fe8e1ca2","user":{"login":"gemarcano","id":4000062,"avatar_url":"https://avatars.githubusercontent.com/u/4000062?v=3","gravatar_id":"","url":"https://api.github.com/users/gemarcano","html_url":"https://github.com/gemarcano","followers_url":"https://api.github.com/users/gemarcano/followers","following_url":"https://api.github.com/users/gemarcano/following{/other_user}","gists_url":"https://api.github.com/users/gemarcano/gists{/gist_id}","starred_url":"https://api.github.com/users/gemarcano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gemarcano/subscriptions","organizations_url":"https://api.github.com/users/gemarcano/orgs","repos_url":"https://api.github.com/users/gemarcano/repos","events_url":"https://api.github.com/users/gemarcano/events{/privacy}","received_events_url":"https://api.github.com/users/gemarcano/received_events","type":"User","site_admin":false},"repo":{"id":59709476,"name":"uncart","full_name":"gemarcano/uncart","owner":{"login":"gemarcano","id":4000062,"avatar_url":"https://avatars.githubusercontent.com/u/4000062?v=3","gravatar_id":"","url":"https://api.github.com/users/gemarcano","html_url":"https://github.com/gemarcano","followers_url":"https://api.github.com/users/gemarcano/followers","following_url":"https://api.github.com/users/gemarcano/following{/other_user}","gists_url":"https://api.github.com/users/gemarcano/gists{/gist_id}","starred_url":"https://api.github.com/users/gemarcano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gemarcano/subscriptions","organizations_url":"https://api.github.com/users/gemarcano/orgs","repos_url":"https://api.github.com/users/gemarcano/repos","events_url":"https://api.github.com/users/gemarcano/events{/privacy}","received_events_url":"https://api.github.com/users/gemarcano/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gemarcano/uncart","description":" 3DS homebrew utility program to dump game cartridges to the SD card","fork":true,"url":"https://api.github.com/repos/gemarcano/uncart","forks_url":"https://api.github.com/repos/gemarcano/uncart/forks","keys_url":"https://api.github.com/repos/gemarcano/uncart/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gemarcano/uncart/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gemarcano/uncart/teams","hooks_url":"https://api.github.com/repos/gemarcano/uncart/hooks","issue_events_url":"https://api.github.com/repos/gemarcano/uncart/issues/events{/number}","events_url":"https://api.github.com/repos/gemarcano/uncart/events","assignees_url":"https://api.github.com/repos/gemarcano/uncart/assignees{/user}","branches_url":"https://api.github.com/repos/gemarcano/uncart/branches{/branch}","tags_url":"https://api.github.com/repos/gemarcano/uncart/tags","blobs_url":"https://api.github.com/repos/gemarcano/uncart/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gemarcano/uncart/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gemarcano/uncart/git/refs{/sha}","trees_url":"https://api.github.com/repos/gemarcano/uncart/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gemarcano/uncart/statuses/{sha}","languages_url":"https://api.github.com/repos/gemarcano/uncart/languages","stargazers_url":"https://api.github.com/repos/gemarcano/uncart/stargazers","contributors_url":"https://api.github.com/repos/gemarcano/uncart/contributors","subscribers_url":"https://api.github.com/repos/gemarcano/uncart/subscribers","subscription_url":"https://api.github.com/repos/gemarcano/uncart/subscription","commits_url":"https://api.github.com/repos/gemarcano/uncart/commits{/sha}","git_commits_url":"https://api.github.com/repos/gemarcano/uncart/git/commits{/sha}","comments_url":"https://api.github.com/repos/gemarcano/uncart/comments{/number}","issue_comment_url":"https://api.github.com/repos/gemarcano/uncart/issues/comments{/number}","contents_url":"https://api.github.com/repos/gemarcano/uncart/contents/{+path}","compare_url":"https://api.github.com/repos/gemarcano/uncart/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gemarcano/uncart/merges","archive_url":"https://api.github.com/repos/gemarcano/uncart/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gemarcano/uncart/downloads","issues_url":"https://api.github.com/repos/gemarcano/uncart/issues{/number}","pulls_url":"https://api.github.com/repos/gemarcano/uncart/pulls{/number}","milestones_url":"https://api.github.com/repos/gemarcano/uncart/milestones{/number}","notifications_url":"https://api.github.com/repos/gemarcano/uncart/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gemarcano/uncart/labels{/name}","releases_url":"https://api.github.com/repos/gemarcano/uncart/releases{/id}","deployments_url":"https://api.github.com/repos/gemarcano/uncart/deployments","created_at":"2016-05-26T01:22:12Z","updated_at":"2016-05-26T01:32:13Z","pushed_at":"2016-06-23T03:58:23Z","git_url":"git://github.com/gemarcano/uncart.git","ssh_url":"git@github.com:gemarcano/uncart.git","clone_url":"https://github.com/gemarcano/uncart.git","svn_url":"https://github.com/gemarcano/uncart","homepage":"","size":768,"stargazers_count":1,"watchers_count":1,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"citra-emu:master","ref":"master","sha":"1577f365f66ffe0f6835539839d1053655a2b6dd","user":{"login":"citra-emu","id":7605670,"avatar_url":"https://avatars.githubusercontent.com/u/7605670?v=3","gravatar_id":"","url":"https://api.github.com/users/citra-emu","html_url":"https://github.com/citra-emu","followers_url":"https://api.github.com/users/citra-emu/followers","following_url":"https://api.github.com/users/citra-emu/following{/other_user}","gists_url":"https://api.github.com/users/citra-emu/gists{/gist_id}","starred_url":"https://api.github.com/users/citra-emu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/citra-emu/subscriptions","organizations_url":"https://api.github.com/users/citra-emu/orgs","repos_url":"https://api.github.com/users/citra-emu/repos","events_url":"https://api.github.com/users/citra-emu/events{/privacy}","received_events_url":"https://api.github.com/users/citra-emu/received_events","type":"Organization","site_admin":false},"repo":{"id":36511442,"name":"uncart","full_name":"citra-emu/uncart","owner":{"login":"citra-emu","id":7605670,"avatar_url":"https://avatars.githubusercontent.com/u/7605670?v=3","gravatar_id":"","url":"https://api.github.com/users/citra-emu","html_url":"https://github.com/citra-emu","followers_url":"https://api.github.com/users/citra-emu/followers","following_url":"https://api.github.com/users/citra-emu/following{/other_user}","gists_url":"https://api.github.com/users/citra-emu/gists{/gist_id}","starred_url":"https://api.github.com/users/citra-emu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/citra-emu/subscriptions","organizations_url":"https://api.github.com/users/citra-emu/orgs","repos_url":"https://api.github.com/users/citra-emu/repos","events_url":"https://api.github.com/users/citra-emu/events{/privacy}","received_events_url":"https://api.github.com/users/citra-emu/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/citra-emu/uncart","description":" 3DS homebrew utility program to dump game cartridges to the SD card","fork":false,"url":"https://api.github.com/repos/citra-emu/uncart","forks_url":"https://api.github.com/repos/citra-emu/uncart/forks","keys_url":"https://api.github.com/repos/citra-emu/uncart/keys{/key_id}","collaborators_url":"https://api.github.com/repos/citra-emu/uncart/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/citra-emu/uncart/teams","hooks_url":"https://api.github.com/repos/citra-emu/uncart/hooks","issue_events_url":"https://api.github.com/repos/citra-emu/uncart/issues/events{/number}","events_url":"https://api.github.com/repos/citra-emu/uncart/events","assignees_url":"https://api.github.com/repos/citra-emu/uncart/assignees{/user}","branches_url":"https://api.github.com/repos/citra-emu/uncart/branches{/branch}","tags_url":"https://api.github.com/repos/citra-emu/uncart/tags","blobs_url":"https://api.github.com/repos/citra-emu/uncart/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/citra-emu/uncart/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/citra-emu/uncart/git/refs{/sha}","trees_url":"https://api.github.com/repos/citra-emu/uncart/git/trees{/sha}","statuses_url":"https://api.github.com/repos/citra-emu/uncart/statuses/{sha}","languages_url":"https://api.github.com/repos/citra-emu/uncart/languages","stargazers_url":"https://api.github.com/repos/citra-emu/uncart/stargazers","contributors_url":"https://api.github.com/repos/citra-emu/uncart/contributors","subscribers_url":"https://api.github.com/repos/citra-emu/uncart/subscribers","subscription_url":"https://api.github.com/repos/citra-emu/uncart/subscription","commits_url":"https://api.github.com/repos/citra-emu/uncart/commits{/sha}","git_commits_url":"https://api.github.com/repos/citra-emu/uncart/git/commits{/sha}","comments_url":"https://api.github.com/repos/citra-emu/uncart/comments{/number}","issue_comment_url":"https://api.github.com/repos/citra-emu/uncart/issues/comments{/number}","contents_url":"https://api.github.com/repos/citra-emu/uncart/contents/{+path}","compare_url":"https://api.github.com/repos/citra-emu/uncart/compare/{base}...{head}","merges_url":"https://api.github.com/repos/citra-emu/uncart/merges","archive_url":"https://api.github.com/repos/citra-emu/uncart/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/citra-emu/uncart/downloads","issues_url":"https://api.github.com/repos/citra-emu/uncart/issues{/number}","pulls_url":"https://api.github.com/repos/citra-emu/uncart/pulls{/number}","milestones_url":"https://api.github.com/repos/citra-emu/uncart/milestones{/number}","notifications_url":"https://api.github.com/repos/citra-emu/uncart/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/citra-emu/uncart/labels{/name}","releases_url":"https://api.github.com/repos/citra-emu/uncart/releases{/id}","deployments_url":"https://api.github.com/repos/citra-emu/uncart/deployments","created_at":"2015-05-29T15:07:09Z","updated_at":"2016-06-21T05:16:49Z","pushed_at":"2016-06-23T03:58:24Z","git_url":"git://github.com/citra-emu/uncart.git","ssh_url":"git@github.com:citra-emu/uncart.git","clone_url":"https://github.com/citra-emu/uncart.git","svn_url":"https://github.com/citra-emu/uncart","homepage":"","size":868,"stargazers_count":43,"watchers_count":43,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":24,"mirror_url":null,"open_issues_count":13,"forks":24,"open_issues":13,"watchers":43,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/citra-emu/uncart/pulls/24"},"html":{"href":"https://github.com/citra-emu/uncart/pull/24"},"issue":{"href":"https://api.github.com/repos/citra-emu/uncart/issues/24"},"comments":{"href":"https://api.github.com/repos/citra-emu/uncart/issues/24/comments"},"review_comments":{"href":"https://api.github.com/repos/citra-emu/uncart/pulls/24/comments"},"review_comment":{"href":"https://api.github.com/repos/citra-emu/uncart/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/citra-emu/uncart/pulls/24/commits"},"statuses":{"href":"https://api.github.com/repos/citra-emu/uncart/statuses/b34bde68c3cff22038d1616d2744bbb9fe8e1ca2"}}}}
{"actor":{"display_login":"gemarcano"}}