{"id":1442,"date":"2015-03-29T19:35:16","date_gmt":"2015-03-29T19:35:16","guid":{"rendered":"http:\/\/blog.system11.org\/?p=1442"},"modified":"2022-06-02T03:08:45","modified_gmt":"2022-06-02T03:08:45","slug":"metal-slug-2-reducing-the-slowdown","status":"publish","type":"post","link":"https:\/\/blog.system11.org\/?p=1442","title":{"rendered":"Metal Slug 2 &#8211; reducing the slowdown"},"content":{"rendered":"<p><strong>UPDATE 15\/05<\/strong> &#8211; DO NOT BUY FROM PEOPLE PRODUCING MODIFIED CARTS, the readme file specifically bans making money from this patch.\u00a0 Since this work is given away entirely for free, a modified cart is worth the same as an unmodified one.\u00a0 If you buy from someone making carts to sell, then you&#8217;re supporting the idea that profiteers should be able to make money on other peoples work, that exploiting community goodwill is OK.<\/p>\n<p>Opinions have long been divided on this, but while Metal Slug X is a revised, recoloured, extended and rearranged version of Metal Slug 2, I&#8217;m one of those people who just felt that Metal Slug 2 held together better as a game.\u00a0 I prefer the times of day (changed in X) and I prefer the boss ordering and I prefer the level of detail.\u00a0 For example in the below picture, the sand in the background of stage 1 is actually animated in MS2 but static in MSX.\u00a0 Metal Slug 2 is on the left.<\/p>\n<p><a href=\"https:\/\/blog.system11.org\/wp-content\/uploads\/2015\/03\/slug2fix_1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1447\" src=\"https:\/\/blog.system11.org\/wp-content\/uploads\/2015\/03\/slug2fix_1.png\" alt=\"slug2fix_1\" width=\"640\" height=\"672\" srcset=\"https:\/\/blog.system11.org\/wp-content\/uploads\/2015\/03\/slug2fix_1.png 640w, https:\/\/blog.system11.org\/wp-content\/uploads\/2015\/03\/slug2fix_1-286x300.png 286w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/a><\/p>\n<p>However Metal Slug 2 has one big problem &#8211; slowdown, and lots of it.\u00a0 Half of the game has to be played at a crippling pace unless you overclock your MVS system, and even then it&#8217;s still not as quick as other games in the series.\u00a0 I don&#8217;t know why SNK never addressed this, but it was fixed in X, and it was also fixed in some of the newer port releases SNK have made over the years.<\/p>\n<p>That doesn&#8217;t help arcade collectors though who want to play the game on original hardware, and overclocking the MVS isn&#8217;t really my preferred solution to the problem.\u00a0 Over the years on and off I&#8217;ve looked into it and never really gone much further, but the most solid information I could find was that there was a problem in the code causing game logic to get updated twice for every graphical frame.<\/p>\n<p>I don&#8217;t know any 68k assembly language, but I know a man who does and I was finally able to get some of his time to look at the problem.\u00a0 Unfortunately, the logic happening twice &#8211; isn&#8217;t the case.\u00a0 However one thing he did spot was the 30 fps lock code was causing extra frames to be dropped.\u00a0 If the game was missing one frame it would miss two.\u00a0 If it would miss three it would instead miss four.\u00a0 So, code fix developed it&#8217;s time to try it out on a real Metal Slug 2 cartridge.<\/p>\n<p>This is my world weary Metal Slug 2 cart &#8211; like so many others a victim of operators removing serial numbers so the cart couldn&#8217;t be traced &#8211; selling them across borders was against the copyright\/usage terms.\u00a0 Still, it was very cheap.<\/p>\n<p><a href=\"https:\/\/blog.system11.org\/wp-content\/uploads\/2015\/03\/slug2fix_2.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1448\" src=\"https:\/\/blog.system11.org\/wp-content\/uploads\/2015\/03\/slug2fix_2.jpg\" alt=\"slug2fix_2\" width=\"800\" height=\"415\" srcset=\"https:\/\/blog.system11.org\/wp-content\/uploads\/2015\/03\/slug2fix_2.jpg 800w, https:\/\/blog.system11.org\/wp-content\/uploads\/2015\/03\/slug2fix_2-300x156.jpg 300w, https:\/\/blog.system11.org\/wp-content\/uploads\/2015\/03\/slug2fix_2-768x398.jpg 768w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/a><\/p>\n<p>I&#8217;ll have to admit I took that photo after I&#8217;d finished, you can tell &#8211; you&#8217;ll see why later.\u00a0 Remove the 4 screws and then take out the top layer board, which has the code ROM on and looks like this:<\/p>\n<p><a href=\"https:\/\/blog.system11.org\/wp-content\/uploads\/2015\/03\/slug2fix_3.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1449\" src=\"https:\/\/blog.system11.org\/wp-content\/uploads\/2015\/03\/slug2fix_3.jpg\" alt=\"slug2fix_3\" width=\"800\" height=\"585\" srcset=\"https:\/\/blog.system11.org\/wp-content\/uploads\/2015\/03\/slug2fix_3.jpg 800w, https:\/\/blog.system11.org\/wp-content\/uploads\/2015\/03\/slug2fix_3-300x219.jpg 300w, https:\/\/blog.system11.org\/wp-content\/uploads\/2015\/03\/slug2fix_3-768x562.jpg 768w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/a><\/p>\n<p>The code we need to fix is in the 241-P1 ROM.\u00a0 An equivalent EPROM part number would be M27C800, so you&#8217;ll need a blank 42 pin 8mbit EPROM of ideally 100ns &#8211; they&#8217;re not very expensive on ebay.\u00a0 When you program this with the updated code, it will also change the NGH (unique game ID every game has) to 941, and change the game name on the SOFT DIP settings page to &#8220;METALSLUG2 TURBO&#8221;.\u00a0 This was done so people can differentiate unmodified and original carts without having an obnoxious splash screen or similar.<\/p>\n<p>Desolder the original 241-p1 ROM and put it somewhere safe.\u00a0 The fixed code is distributed as a binary patch file with patch utilities for Windows and Linux, please download and follow the instructions in the README.txt file.<\/p>\n<p><a href=\"https:\/\/blog.system11.org\/wp-content\/uploads\/2015\/04\/metal_slug_2_turbo.zip\">Click here to download Metal Slug 2 Turbo patcher.<\/a><\/p>\n<p>When you&#8217;ve burned the 941-p1.p1 image to the 27C800 and verified it, you can solder it into the P1 position.\u00a0 Note that there is not enough space in the cart to fit this with a socket, so make sure you&#8217;ve verified the chip before soldering it in.\u00a0 If you really do want to use a socket as I needed to in case this didn&#8217;t work, you&#8217;ll have to dremel some of the inner cart vent plastic away which is hard to do cleanly.\u00a0 Your CPU board should look like this:<\/p>\n<p><a href=\"https:\/\/blog.system11.org\/wp-content\/uploads\/2015\/03\/slug2fix_4.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1450\" src=\"https:\/\/blog.system11.org\/wp-content\/uploads\/2015\/03\/slug2fix_4.jpg\" alt=\"slug2fix_4\" width=\"800\" height=\"608\" srcset=\"https:\/\/blog.system11.org\/wp-content\/uploads\/2015\/03\/slug2fix_4.jpg 800w, https:\/\/blog.system11.org\/wp-content\/uploads\/2015\/03\/slug2fix_4-300x228.jpg 300w, https:\/\/blog.system11.org\/wp-content\/uploads\/2015\/03\/slug2fix_4-768x584.jpg 768w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/a><\/p>\n<p>Then just bolt it back together &#8211; you can see in this photo that I&#8217;d dremelled the cart vents to make it fit with a socket.\u00a0 It&#8217;s nicer not to, I wouldn&#8217;t expect this ROM to be changed in future so you should be fine to just solder it in.<\/p>\n<p><a href=\"https:\/\/blog.system11.org\/wp-content\/uploads\/2015\/03\/slug2fix_5.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1451\" src=\"https:\/\/blog.system11.org\/wp-content\/uploads\/2015\/03\/slug2fix_5.jpg\" alt=\"slug2fix_5\" width=\"800\" height=\"609\" srcset=\"https:\/\/blog.system11.org\/wp-content\/uploads\/2015\/03\/slug2fix_5.jpg 800w, https:\/\/blog.system11.org\/wp-content\/uploads\/2015\/03\/slug2fix_5-300x228.jpg 300w, https:\/\/blog.system11.org\/wp-content\/uploads\/2015\/03\/slug2fix_5-768x585.jpg 768w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/a><\/p>\n<p>With this fixed the game still slows down as often as it used to and in the same places, but the actual delay between frames is reduced by 1 across all speeds.\u00a0 To improve things more would mean actually rewriting chunks of code as apparently there are many slow functions in there and the reason MSX is so much faster is because they&#8217;d actually re-written the engine rather than just fixing MS2, which was based on the original Metal Slug code.\u00a0 Here&#8217;s a video showing the difference, nearly 20 seconds just across the first level despite some mistakes on the &#8216;turbo&#8217; run.<\/p>\n<p><iframe loading=\"lazy\" src=\"https:\/\/www.youtube.com\/embed\/01mKdvROAKA\" width=\"552\" height=\"394\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/p>\n<p>If anyone from SNK wishes to contact me to request removal, please contact me on the shmups.system11.org or neo-geo.com forums, user &#8216;system11&#8217;.\u00a0 This has purely been provided to improve one of your classics for owners of classic arcade hardware, and no harm is intended.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>UPDATE 15\/05 &#8211; DO NOT BUY FROM PEOPLE PRODUCING MODIFIED CARTS, the readme file specifically bans making money from this patch.\u00a0 Since this work is given away entirely for free, a modified cart is worth the same as an unmodified one.\u00a0 If you buy from someone making carts to sell, then you&#8217;re supporting the idea [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":1465,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,7,13],"tags":[],"class_list":["post-1442","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-arcade","category-games","category-tech"],"_links":{"self":[{"href":"https:\/\/blog.system11.org\/index.php?rest_route=\/wp\/v2\/posts\/1442"}],"collection":[{"href":"https:\/\/blog.system11.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.system11.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.system11.org\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.system11.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1442"}],"version-history":[{"count":22,"href":"https:\/\/blog.system11.org\/index.php?rest_route=\/wp\/v2\/posts\/1442\/revisions"}],"predecessor-version":[{"id":3346,"href":"https:\/\/blog.system11.org\/index.php?rest_route=\/wp\/v2\/posts\/1442\/revisions\/3346"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.system11.org\/index.php?rest_route=\/wp\/v2\/media\/1465"}],"wp:attachment":[{"href":"https:\/\/blog.system11.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1442"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.system11.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1442"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.system11.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1442"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}