{"action":"created","comment":{"url":"https://api.github.com/repos/unknownbrackets/ps2autotests/pulls/comments/48676173","id":48676173,"diff_hunk":"@@ -106,53 +105,63 @@ void testCycleTruncated(u32 cl, u32 wl) {\n \t\t\tvifcode.Data32(i);\n \t\t}\n \n-\t\tDMA::SendSimple(DMA::D0, vifcode.Raw(), 16 * vifPacketSize);\n+\t\tDMA::SendSimple(context->dmaChannel, vifcode.Raw(), 16 * vifPacketSize);\n \t}\n \t\n-\tSyncDCache(vu0_mem, vu0_mem + 16 * displaySize);\n+\tSyncDCache(vuMem, vuMem + 16 * displaySize);\n \t\n-\tu32 cycleReg = *R_EE_VIF0_CYCLE;\n+\tu32 cycleReg = context->vifRegs->cycle;\n \tprintf(\"CYCLE: %08x, \", cycleReg);\n \t\n \tfor (u32 i = 0; i < displaySize / 4; i++) {\n \t\tprintf(\"%x%x%x%x\",  \n-\t\t\tvu0_32[(i * 0x10) + 0x0], vu0_32[(i * 0x10) + 0x4], vu0_32[(i * 0x10) + 0x8], vu0_32[(i * 0x10) + 0xC]);\n+\t\t\tvuMem_32[(i * 0x10) + 0x0], vuMem_32[(i * 0x10) + 0x4], vuMem_32[(i * 0x10) + 0x8], vuMem_32[(i * 0x10) + 0xC]);\n \t}\n \t\n \tprintf(\"\\n\");\n }\n \n-int main(int argc, char *argv[]) {\n-\tprintf(\"-- TEST BEGIN\\n\");\n-\t\n+void doTest(TEST_CONTEXT* context) {\n \tfor(u32 cl = 0; cl <= 8; cl++) {\n \t\tfor(u32 wl = 0; wl <= 8; wl++) {\n \t\t\tprintf(\"normal (cl %d, wl %d): \", cl, wl);\n-\t\t\ttestCycleNormal(cl, wl);\n+\t\t\ttestCycleNormal(context, cl, wl);\n \t\t}\n \t}\n \t\n \tfor(u32 cl = 251; cl <= 255; cl++) {\n \t\tfor(u32 wl = 0; wl <= 8; wl++) {\n \t\t\tprintf(\"normal (cl %d, wl %d): \", cl, wl);\n-\t\t\ttestCycleNormal(cl, wl);\n+\t\t\ttestCycleNormal(context, cl, wl);\n \t\t}\n \t}\n \t\n \tfor(u32 cl = 0; cl <= 8; cl++) {\n \t\tfor(u32 wl = 251; wl <= 255; wl++) {\n \t\t\tprintf(\"normal (cl %d, wl %d): \", cl, wl);\n-\t\t\ttestCycleNormal(cl, wl);\n+\t\t\ttestCycleNormal(context, cl, wl);\n \t\t}\n \t}\n \t\n \tfor(u32 cl = 0; cl <= 8; cl++) {\n \t\tfor(u32 wl = 0; wl <= 8; wl++) {\n \t\t\tprintf(\"truncated (cl %d, wl %d): \", cl, wl);\n-\t\t\ttestCycleTruncated(cl, wl);\n+\t\t\ttestCycleTruncated(context, cl, wl);\n \t\t}\n \t}\n+}\n+\n+int main(int argc, char *argv[]) {\n+\tprintf(\"-- TEST BEGIN\\n\");\n+\t\n+\tprintf(\"VIF0 -------------------------------------------------------------\\n\");","path":"tests/dma/vif/stcycl.cpp","position":143,"original_position":143,"commit_id":"c07cb9074d6558a4f4ae5651897c7a5bb520adb9","original_commit_id":"c07cb9074d6558a4f4ae5651897c7a5bb520adb9","user":{"login":"jpd002","id":6760433,"avatar_url":"https://avatars.githubusercontent.com/u/6760433?v=3","gravatar_id":"","url":"https://api.github.com/users/jpd002","html_url":"https://github.com/jpd002","followers_url":"https://api.github.com/users/jpd002/followers","following_url":"https://api.github.com/users/jpd002/following{/other_user}","gists_url":"https://api.github.com/users/jpd002/gists{/gist_id}","starred_url":"https://api.github.com/users/jpd002/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpd002/subscriptions","organizations_url":"https://api.github.com/users/jpd002/orgs","repos_url":"https://api.github.com/users/jpd002/repos","events_url":"https://api.github.com/users/jpd002/events{/privacy}","received_events_url":"https://api.github.com/users/jpd002/received_events","type":"User","site_admin":false},"body":"Yeah, I just typed a random number of hyphens and copy pasted it all over the test files :stuck_out_tongue: I'll change it to what you've suggested, it'll look cleaner that way.","created_at":"2016-01-01T05:32:01Z","updated_at":"2016-01-01T05:32:01Z","html_url":"https://github.com/unknownbrackets/ps2autotests/pull/28#discussion_r48676173","pull_request_url":"https://api.github.com/repos/unknownbrackets/ps2autotests/pulls/28","_links":{"self":{"href":"https://api.github.com/repos/unknownbrackets/ps2autotests/pulls/comments/48676173"},"html":{"href":"https://github.com/unknownbrackets/ps2autotests/pull/28#discussion_r48676173"},"pull_request":{"href":"https://api.github.com/repos/unknownbrackets/ps2autotests/pulls/28"}}},"pull_request":{"url":"https://api.github.com/repos/unknownbrackets/ps2autotests/pulls/28","id":54331305,"html_url":"https://github.com/unknownbrackets/ps2autotests/pull/28","diff_url":"https://github.com/unknownbrackets/ps2autotests/pull/28.diff","patch_url":"https://github.com/unknownbrackets/ps2autotests/pull/28.patch","issue_url":"https://api.github.com/repos/unknownbrackets/ps2autotests/issues/28","number":28,"state":"open","locked":false,"title":"VIF tests running on both units","user":{"login":"jpd002","id":6760433,"avatar_url":"https://avatars.githubusercontent.com/u/6760433?v=3","gravatar_id":"","url":"https://api.github.com/users/jpd002","html_url":"https://github.com/jpd002","followers_url":"https://api.github.com/users/jpd002/followers","following_url":"https://api.github.com/users/jpd002/following{/other_user}","gists_url":"https://api.github.com/users/jpd002/gists{/gist_id}","starred_url":"https://api.github.com/users/jpd002/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpd002/subscriptions","organizations_url":"https://api.github.com/users/jpd002/orgs","repos_url":"https://api.github.com/users/jpd002/repos","events_url":"https://api.github.com/users/jpd002/events{/privacy}","received_events_url":"https://api.github.com/users/jpd002/received_events","type":"User","site_admin":false},"body":"As mentioned previously, I wanted to be able to execute VIF tests on both units to maximize coverage. To be able to do so, I've added a new `TEST_CONTEXT` structure containing pointers to each of the VIFs \"entry points\". The tests have been made \"generic\" by changing them to use the pointers contained in the `TEST_CONTEXT` structure.\r\n\r\nDon't hesitate to tell me if you think there would be a better way to do that.\r\n","created_at":"2015-12-22T04:14:00Z","updated_at":"2016-01-01T05:32:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5364130668f53ff518101a868a2b450fddc37f65","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/unknownbrackets/ps2autotests/pulls/28/commits","review_comments_url":"https://api.github.com/repos/unknownbrackets/ps2autotests/pulls/28/comments","review_comment_url":"https://api.github.com/repos/unknownbrackets/ps2autotests/pulls/comments{/number}","comments_url":"https://api.github.com/repos/unknownbrackets/ps2autotests/issues/28/comments","statuses_url":"https://api.github.com/repos/unknownbrackets/ps2autotests/statuses/c07cb9074d6558a4f4ae5651897c7a5bb520adb9","head":{"label":"jpd002:vif_twounits","ref":"vif_twounits","sha":"c07cb9074d6558a4f4ae5651897c7a5bb520adb9","user":{"login":"jpd002","id":6760433,"avatar_url":"https://avatars.githubusercontent.com/u/6760433?v=3","gravatar_id":"","url":"https://api.github.com/users/jpd002","html_url":"https://github.com/jpd002","followers_url":"https://api.github.com/users/jpd002/followers","following_url":"https://api.github.com/users/jpd002/following{/other_user}","gists_url":"https://api.github.com/users/jpd002/gists{/gist_id}","starred_url":"https://api.github.com/users/jpd002/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpd002/subscriptions","organizations_url":"https://api.github.com/users/jpd002/orgs","repos_url":"https://api.github.com/users/jpd002/repos","events_url":"https://api.github.com/users/jpd002/events{/privacy}","received_events_url":"https://api.github.com/users/jpd002/received_events","type":"User","site_admin":false},"repo":{"id":34600724,"name":"ps2autotests","full_name":"jpd002/ps2autotests","owner":{"login":"jpd002","id":6760433,"avatar_url":"https://avatars.githubusercontent.com/u/6760433?v=3","gravatar_id":"","url":"https://api.github.com/users/jpd002","html_url":"https://github.com/jpd002","followers_url":"https://api.github.com/users/jpd002/followers","following_url":"https://api.github.com/users/jpd002/following{/other_user}","gists_url":"https://api.github.com/users/jpd002/gists{/gist_id}","starred_url":"https://api.github.com/users/jpd002/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpd002/subscriptions","organizations_url":"https://api.github.com/users/jpd002/orgs","repos_url":"https://api.github.com/users/jpd002/repos","events_url":"https://api.github.com/users/jpd002/events{/privacy}","received_events_url":"https://api.github.com/users/jpd002/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jpd002/ps2autotests","description":"A set of test programs run on a PS2, with accompanying results.","fork":true,"url":"https://api.github.com/repos/jpd002/ps2autotests","forks_url":"https://api.github.com/repos/jpd002/ps2autotests/forks","keys_url":"https://api.github.com/repos/jpd002/ps2autotests/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jpd002/ps2autotests/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jpd002/ps2autotests/teams","hooks_url":"https://api.github.com/repos/jpd002/ps2autotests/hooks","issue_events_url":"https://api.github.com/repos/jpd002/ps2autotests/issues/events{/number}","events_url":"https://api.github.com/repos/jpd002/ps2autotests/events","assignees_url":"https://api.github.com/repos/jpd002/ps2autotests/assignees{/user}","branches_url":"https://api.github.com/repos/jpd002/ps2autotests/branches{/branch}","tags_url":"https://api.github.com/repos/jpd002/ps2autotests/tags","blobs_url":"https://api.github.com/repos/jpd002/ps2autotests/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jpd002/ps2autotests/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jpd002/ps2autotests/git/refs{/sha}","trees_url":"https://api.github.com/repos/jpd002/ps2autotests/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jpd002/ps2autotests/statuses/{sha}","languages_url":"https://api.github.com/repos/jpd002/ps2autotests/languages","stargazers_url":"https://api.github.com/repos/jpd002/ps2autotests/stargazers","contributors_url":"https://api.github.com/repos/jpd002/ps2autotests/contributors","subscribers_url":"https://api.github.com/repos/jpd002/ps2autotests/subscribers","subscription_url":"https://api.github.com/repos/jpd002/ps2autotests/subscription","commits_url":"https://api.github.com/repos/jpd002/ps2autotests/commits{/sha}","git_commits_url":"https://api.github.com/repos/jpd002/ps2autotests/git/commits{/sha}","comments_url":"https://api.github.com/repos/jpd002/ps2autotests/comments{/number}","issue_comment_url":"https://api.github.com/repos/jpd002/ps2autotests/issues/comments{/number}","contents_url":"https://api.github.com/repos/jpd002/ps2autotests/contents/{+path}","compare_url":"https://api.github.com/repos/jpd002/ps2autotests/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jpd002/ps2autotests/merges","archive_url":"https://api.github.com/repos/jpd002/ps2autotests/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jpd002/ps2autotests/downloads","issues_url":"https://api.github.com/repos/jpd002/ps2autotests/issues{/number}","pulls_url":"https://api.github.com/repos/jpd002/ps2autotests/pulls{/number}","milestones_url":"https://api.github.com/repos/jpd002/ps2autotests/milestones{/number}","notifications_url":"https://api.github.com/repos/jpd002/ps2autotests/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jpd002/ps2autotests/labels{/name}","releases_url":"https://api.github.com/repos/jpd002/ps2autotests/releases{/id}","created_at":"2015-04-26T06:29:01Z","updated_at":"2015-05-05T04:55:06Z","pushed_at":"2016-01-01T04:52:33Z","git_url":"git://github.com/jpd002/ps2autotests.git","ssh_url":"git@github.com:jpd002/ps2autotests.git","clone_url":"https://github.com/jpd002/ps2autotests.git","svn_url":"https://github.com/jpd002/ps2autotests","homepage":"","size":1429,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"unknownbrackets:master","ref":"master","sha":"29377ab867f546595b925f31711271c6b53011c4","user":{"login":"unknownbrackets","id":191233,"avatar_url":"https://avatars.githubusercontent.com/u/191233?v=3","gravatar_id":"","url":"https://api.github.com/users/unknownbrackets","html_url":"https://github.com/unknownbrackets","followers_url":"https://api.github.com/users/unknownbrackets/followers","following_url":"https://api.github.com/users/unknownbrackets/following{/other_user}","gists_url":"https://api.github.com/users/unknownbrackets/gists{/gist_id}","starred_url":"https://api.github.com/users/unknownbrackets/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/unknownbrackets/subscriptions","organizations_url":"https://api.github.com/users/unknownbrackets/orgs","repos_url":"https://api.github.com/users/unknownbrackets/repos","events_url":"https://api.github.com/users/unknownbrackets/events{/privacy}","received_events_url":"https://api.github.com/users/unknownbrackets/received_events","type":"User","site_admin":false},"repo":{"id":33571038,"name":"ps2autotests","full_name":"unknownbrackets/ps2autotests","owner":{"login":"unknownbrackets","id":191233,"avatar_url":"https://avatars.githubusercontent.com/u/191233?v=3","gravatar_id":"","url":"https://api.github.com/users/unknownbrackets","html_url":"https://github.com/unknownbrackets","followers_url":"https://api.github.com/users/unknownbrackets/followers","following_url":"https://api.github.com/users/unknownbrackets/following{/other_user}","gists_url":"https://api.github.com/users/unknownbrackets/gists{/gist_id}","starred_url":"https://api.github.com/users/unknownbrackets/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/unknownbrackets/subscriptions","organizations_url":"https://api.github.com/users/unknownbrackets/orgs","repos_url":"https://api.github.com/users/unknownbrackets/repos","events_url":"https://api.github.com/users/unknownbrackets/events{/privacy}","received_events_url":"https://api.github.com/users/unknownbrackets/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/unknownbrackets/ps2autotests","description":"A set of test programs run on a PS2, with accompanying results.","fork":false,"url":"https://api.github.com/repos/unknownbrackets/ps2autotests","forks_url":"https://api.github.com/repos/unknownbrackets/ps2autotests/forks","keys_url":"https://api.github.com/repos/unknownbrackets/ps2autotests/keys{/key_id}","collaborators_url":"https://api.github.com/repos/unknownbrackets/ps2autotests/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/unknownbrackets/ps2autotests/teams","hooks_url":"https://api.github.com/repos/unknownbrackets/ps2autotests/hooks","issue_events_url":"https://api.github.com/repos/unknownbrackets/ps2autotests/issues/events{/number}","events_url":"https://api.github.com/repos/unknownbrackets/ps2autotests/events","assignees_url":"https://api.github.com/repos/unknownbrackets/ps2autotests/assignees{/user}","branches_url":"https://api.github.com/repos/unknownbrackets/ps2autotests/branches{/branch}","tags_url":"https://api.github.com/repos/unknownbrackets/ps2autotests/tags","blobs_url":"https://api.github.com/repos/unknownbrackets/ps2autotests/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/unknownbrackets/ps2autotests/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/unknownbrackets/ps2autotests/git/refs{/sha}","trees_url":"https://api.github.com/repos/unknownbrackets/ps2autotests/git/trees{/sha}","statuses_url":"https://api.github.com/repos/unknownbrackets/ps2autotests/statuses/{sha}","languages_url":"https://api.github.com/repos/unknownbrackets/ps2autotests/languages","stargazers_url":"https://api.github.com/repos/unknownbrackets/ps2autotests/stargazers","contributors_url":"https://api.github.com/repos/unknownbrackets/ps2autotests/contributors","subscribers_url":"https://api.github.com/repos/unknownbrackets/ps2autotests/subscribers","subscription_url":"https://api.github.com/repos/unknownbrackets/ps2autotests/subscription","commits_url":"https://api.github.com/repos/unknownbrackets/ps2autotests/commits{/sha}","git_commits_url":"https://api.github.com/repos/unknownbrackets/ps2autotests/git/commits{/sha}","comments_url":"https://api.github.com/repos/unknownbrackets/ps2autotests/comments{/number}","issue_comment_url":"https://api.github.com/repos/unknownbrackets/ps2autotests/issues/comments{/number}","contents_url":"https://api.github.com/repos/unknownbrackets/ps2autotests/contents/{+path}","compare_url":"https://api.github.com/repos/unknownbrackets/ps2autotests/compare/{base}...{head}","merges_url":"https://api.github.com/repos/unknownbrackets/ps2autotests/merges","archive_url":"https://api.github.com/repos/unknownbrackets/ps2autotests/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/unknownbrackets/ps2autotests/downloads","issues_url":"https://api.github.com/repos/unknownbrackets/ps2autotests/issues{/number}","pulls_url":"https://api.github.com/repos/unknownbrackets/ps2autotests/pulls{/number}","milestones_url":"https://api.github.com/repos/unknownbrackets/ps2autotests/milestones{/number}","notifications_url":"https://api.github.com/repos/unknownbrackets/ps2autotests/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/unknownbrackets/ps2autotests/labels{/name}","releases_url":"https://api.github.com/repos/unknownbrackets/ps2autotests/releases{/id}","created_at":"2015-04-07T22:14:47Z","updated_at":"2015-12-22T12:51:22Z","pushed_at":"2016-01-01T00:35:46Z","git_url":"git://github.com/unknownbrackets/ps2autotests.git","ssh_url":"git@github.com:unknownbrackets/ps2autotests.git","clone_url":"https://github.com/unknownbrackets/ps2autotests.git","svn_url":"https://github.com/unknownbrackets/ps2autotests","homepage":"","size":1435,"stargazers_count":6,"watchers_count":6,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":6,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/unknownbrackets/ps2autotests/pulls/28"},"html":{"href":"https://github.com/unknownbrackets/ps2autotests/pull/28"},"issue":{"href":"https://api.github.com/repos/unknownbrackets/ps2autotests/issues/28"},"comments":{"href":"https://api.github.com/repos/unknownbrackets/ps2autotests/issues/28/comments"},"review_comments":{"href":"https://api.github.com/repos/unknownbrackets/ps2autotests/pulls/28/comments"},"review_comment":{"href":"https://api.github.com/repos/unknownbrackets/ps2autotests/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/unknownbrackets/ps2autotests/pulls/28/commits"},"statuses":{"href":"https://api.github.com/repos/unknownbrackets/ps2autotests/statuses/c07cb9074d6558a4f4ae5651897c7a5bb520adb9"}}}}