{"action":"opened","issue":{"url":"https://api.github.com/repos/unknownbrackets/ps2autotests/issues/30","labels_url":"https://api.github.com/repos/unknownbrackets/ps2autotests/issues/30/labels{/name}","comments_url":"https://api.github.com/repos/unknownbrackets/ps2autotests/issues/30/comments","events_url":"https://api.github.com/repos/unknownbrackets/ps2autotests/issues/30/events","html_url":"https://github.com/unknownbrackets/ps2autotests/issues/30","id":127116922,"number":30,"title":"Testing for existence of the GTE ","user":{"login":"Kingcom","id":4809758,"avatar_url":"https://avatars.githubusercontent.com/u/4809758?v=3","gravatar_id":"","url":"https://api.github.com/users/Kingcom","html_url":"https://github.com/Kingcom","followers_url":"https://api.github.com/users/Kingcom/followers","following_url":"https://api.github.com/users/Kingcom/following{/other_user}","gists_url":"https://api.github.com/users/Kingcom/gists{/gist_id}","starred_url":"https://api.github.com/users/Kingcom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kingcom/subscriptions","organizations_url":"https://api.github.com/users/Kingcom/orgs","repos_url":"https://api.github.com/users/Kingcom/repos","events_url":"https://api.github.com/users/Kingcom/events{/privacy}","received_events_url":"https://api.github.com/users/Kingcom/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-01-17T19:13:05Z","updated_at":"2016-01-17T19:13:05Z","closed_at":null,"body":"The PSX had a Geometry Transformation Engine as COP2 for basic linear algebra calculations. It would be interesting to know if it still exists on the PS2's IOP, or is potentually emulated in software.\r\n\r\nTo enable the GTE, you first need to set bit 30 of COP0.r12.\r\n\r\nHere is some sample code for using it, which calculates the weighted average of two color vectors: http://pastebin.com/0S3wGed9\r\nThe signature for the function there is ```void LoadAverageCol(unsigned char in1[3], unsigned char in2[3], long weight1, long weight2, unsigned char out[3]);```\r\nNote that the last parameter is passed on the stack.\r\n"}}