{"action":"created","issue":{"url":"https://api.github.com/repos/openMSX/openMSX/issues/197","labels_url":"https://api.github.com/repos/openMSX/openMSX/issues/197/labels{/name}","comments_url":"https://api.github.com/repos/openMSX/openMSX/issues/197/comments","events_url":"https://api.github.com/repos/openMSX/openMSX/issues/197/events","html_url":"https://github.com/openMSX/openMSX/issues/197","id":85902871,"number":197,"title":"[Feature] XPC - execrom patchfile support [sf#163]","user":{"login":"andete","id":689017,"avatar_url":"https://avatars.githubusercontent.com/u/689017?v=3","gravatar_id":"","url":"https://api.github.com/users/andete","html_url":"https://github.com/andete","followers_url":"https://api.github.com/users/andete/followers","following_url":"https://api.github.com/users/andete/following{/other_user}","gists_url":"https://api.github.com/users/andete/gists{/gist_id}","starred_url":"https://api.github.com/users/andete/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andete/subscriptions","organizations_url":"https://api.github.com/users/andete/orgs","repos_url":"https://api.github.com/users/andete/repos","events_url":"https://api.github.com/users/andete/events{/privacy}","received_events_url":"https://api.github.com/users/andete/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-06-07T13:25:23Z","updated_at":"2015-06-07T13:32:07Z","closed_at":null,"body":"**Reported by sd-snatcher on 2009-02-06 21:47 UTC**\nHi\\!\r\n\r\nExecrom has its own patchfile format, and it would be nice to have it supported on openMSX. I know openMSX has support for ips patches, but xpc has many advantages over it:\r\n\r\n1\\) One patchfile can contain many different patches. Each one has it own text for identification\r\n2\\) For each patch inside a patchfile there's a flag to specify it as \"optional\" or \"mandatory\". \"Mandatory\" is used by bugfixes or patches to allow warmboot on cartridges that allow disk-access, like KV2 or MG2. \"Optional\" is used for features like infinite lives, enhancements etc.\r\n\r\nMore info is available at ExecROM homepage, where there's also many patches readily available:\r\nhttp://www.alsoftware.com.br/adrianpage/index.php?page=msxexec\r\n\r\nIf you are interested, I can also provide Adriano's xpctools, which is written in C, licensed as GPL and provides many tools for xpc handling, like xpccat, xpcdel, xpcdump, xpcgen, xpcmake, xpcview, etc\r\n"},"comment":{"url":"https://api.github.com/repos/openMSX/openMSX/issues/comments/109756947","html_url":"https://github.com/openMSX/openMSX/issues/197#issuecomment-109756947","issue_url":"https://api.github.com/repos/openMSX/openMSX/issues/197","id":109756947,"user":{"login":"andete","id":689017,"avatar_url":"https://avatars.githubusercontent.com/u/689017?v=3","gravatar_id":"","url":"https://api.github.com/users/andete","html_url":"https://github.com/andete","followers_url":"https://api.github.com/users/andete/followers","following_url":"https://api.github.com/users/andete/following{/other_user}","gists_url":"https://api.github.com/users/andete/gists{/gist_id}","starred_url":"https://api.github.com/users/andete/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andete/subscriptions","organizations_url":"https://api.github.com/users/andete/orgs","repos_url":"https://api.github.com/users/andete/repos","events_url":"https://api.github.com/users/andete/events{/privacy}","received_events_url":"https://api.github.com/users/andete/received_events","type":"User","site_admin":false},"created_at":"2015-06-07T13:32:07Z","updated_at":"2015-06-07T13:32:07Z","body":"**Commented by m9710797 on 2009-03-09 11:10 UTC**\n\\(Some weeks ago already\\) I looked into this and I decided to not implement support for it \\(at least not at this moment in time\\), for the following reasons:\r\n\r\n1\\) From an openMSX point of view, having multiple patches inside one patchfile is actually a disadvantage, because in openMSX we currently don't have a way to let the user choose among the patches.\r\n\r\n2\\) I also couldn't find much tools that already support xpc. Is this a patch format specially developed for execrom? Obviously Adriano's xpctools also must support this format, but I couldn't find it anywhere.\r\n\r\n3\\) And finally, from a technical point of view, xpc files are not the easiest to work with. For example, one of the examples in the 'spec' talks about \"address 5023h in page 10h\". I \\*assume\\* this rom works with 8kb pages and pages can start at address 0x4000, so 5023h in page 10h translates to \\(10h \\* 2000h\\) + \\(5023h - 4000h\\) = 21023h from the start of the ROM file. Is my interpretation of the spec correct?\r\n\r\nIn the current openMSX implementation, at the time we apply patches to rom images, we don't know the rom mapper type yet \\(and in fact there are IPS patches that change a rom from one mapper type to another\\). So we also don't know the block size and start address of the mapper yet. So it's not easy to patch a rom image.\r\n\r\nFor direct use in an MSX, this format may be ok, because there you have to work with pages and address in the Z80 address space. But in an emulator you need offsets from the start of the rom image, and that's not trivial to extract from this patchfile format. \\(Please correct me if i'm wrong\\)."}}