{"action":"created","issue":{"url":"https://api.github.com/repos/PCSX2/pcsx2/issues/2558","repository_url":"https://api.github.com/repos/PCSX2/pcsx2","labels_url":"https://api.github.com/repos/PCSX2/pcsx2/issues/2558/labels{/name}","comments_url":"https://api.github.com/repos/PCSX2/pcsx2/issues/2558/comments","events_url":"https://api.github.com/repos/PCSX2/pcsx2/issues/2558/events","html_url":"https://github.com/PCSX2/pcsx2/issues/2558","id":351818758,"node_id":"MDU6SXNzdWUzNTE4MTg3NTg=","number":2558,"title":"[Idea] Add option to print SYSCALL_print (117) strings to console.","user":{"login":"Souzooka","id":9130211,"node_id":"MDQ6VXNlcjkxMzAyMTE=","avatar_url":"https://avatars1.githubusercontent.com/u/9130211?v=4","gravatar_id":"","url":"https://api.github.com/users/Souzooka","html_url":"https://github.com/Souzooka","followers_url":"https://api.github.com/users/Souzooka/followers","following_url":"https://api.github.com/users/Souzooka/following{/other_user}","gists_url":"https://api.github.com/users/Souzooka/gists{/gist_id}","starred_url":"https://api.github.com/users/Souzooka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Souzooka/subscriptions","organizations_url":"https://api.github.com/users/Souzooka/orgs","repos_url":"https://api.github.com/users/Souzooka/repos","events_url":"https://api.github.com/users/Souzooka/events{/privacy}","received_events_url":"https://api.github.com/users/Souzooka/received_events","type":"User","site_admin":false},"labels":[{"id":364562610,"node_id":"MDU6TGFiZWwzNjQ1NjI2MTA=","url":"https://api.github.com/repos/PCSX2/pcsx2/labels/Debugger","name":"Debugger","color":"fbca04","default":false},{"id":71791771,"node_id":"MDU6TGFiZWw3MTc5MTc3MQ==","url":"https://api.github.com/repos/PCSX2/pcsx2/labels/Enhancement%20/%20Feature%20Request","name":"Enhancement / Feature Request","color":"84b6eb","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-08-18T13:02:30Z","updated_at":"2018-08-20T06:57:11Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"This is something I did myself, though nothing along the lines of it being fully integrated into the UI. The concept is simple, just catch SYSCALL 117 and, if sysout messages are enabled for the console, print them to the console. This gives a helpful option for those who want to capture any sort of stubbed logging in games, for game exploration/hacking and the like. It's something that I could likely myself, I just wanted to gauge an opinion on if something like this would be wanted.\r\n\r\nAs an example:\r\nUsing eeConLog and a bit of rewriting of game code, I can print the debug stream for this game:\r\n![img](https://i.imgur.com/p7XKxdf.png)"},"comment":{"url":"https://api.github.com/repos/PCSX2/pcsx2/issues/comments/414215821","html_url":"https://github.com/PCSX2/pcsx2/issues/2558#issuecomment-414215821","issue_url":"https://api.github.com/repos/PCSX2/pcsx2/issues/2558","id":414215821,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNDIxNTgyMQ==","user":{"login":"Souzooka","id":9130211,"node_id":"MDQ6VXNlcjkxMzAyMTE=","avatar_url":"https://avatars1.githubusercontent.com/u/9130211?v=4","gravatar_id":"","url":"https://api.github.com/users/Souzooka","html_url":"https://github.com/Souzooka","followers_url":"https://api.github.com/users/Souzooka/followers","following_url":"https://api.github.com/users/Souzooka/following{/other_user}","gists_url":"https://api.github.com/users/Souzooka/gists{/gist_id}","starred_url":"https://api.github.com/users/Souzooka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Souzooka/subscriptions","organizations_url":"https://api.github.com/users/Souzooka/orgs","repos_url":"https://api.github.com/users/Souzooka/repos","events_url":"https://api.github.com/users/Souzooka/events{/privacy}","received_events_url":"https://api.github.com/users/Souzooka/received_events","type":"User","site_admin":false},"created_at":"2018-08-20T06:57:11Z","updated_at":"2018-08-20T06:57:11Z","author_association":"CONTRIBUTOR","body":"Alright, to elaborate, basically what I was going to touch on before is that this is probably a feature best used for homebrew development, as this feature should hypothetically capture the resulting strings from `(v)printf` calls and print them to the console, making it a great feature for debugging homebrew on PCSX2 (though I haven't explicitly tested that, but I don't see why it wouldn't work).\r\n\r\nThat being said though, I did want to add it as a UI element for two reasons:\r\n* I did want to be able to use this feature in future release builds,\r\n* it would be useful to shut up printf calls even on debug if it's not stubbed in a retail game, as it can potentially be very verbose and spammy.\r\n\r\nAnd to touch on the string formatting thing, to recover printf calls fully in a retail game would require the user to rewrite printf to jump to another function, have that function set up all potential arguments correctly, then call sprintf with an allocated buffer and then print the result (and is actually what is being done in the example picture). It would be nice if PCSX2 could format the string with the provided arguments itself, but I don't believe there is a very clean way to do this and even if such a feature was implemented, it would assume that all print syscalls went through a formatting function like printf and thus might generate inaccurate results otherwise. Ultimately, I don't think something like that is in the scope of this feature itself though I might open up an issue about that later on down the line.\r\n\r\nWith all that being said for consideration, the logic for actually interpreting that SYSCALL and printing a string on PCSX2's side exists, leaving only UI/logging changes. I'll take a look at making a unique logging fn for sysout and just adding that option on the UI, probably grouped with PxThread/SysVM Control Events. Unless those prove to be super-confusing a pull-request should be coming soonish."}}
{"actor":{"display_login":"Souzooka"}}