{"id":824,"date":"2015-03-03T08:23:03","date_gmt":"2015-03-03T16:23:03","guid":{"rendered":"http:\/\/www.pagetable.com\/?p=824"},"modified":"2015-03-03T08:23:03","modified_gmt":"2015-03-03T16:23:03","slug":"emulating-the-intel-8080-on-a-mos-6502","status":"publish","type":"post","link":"https:\/\/www.pagetable.com\/?p=824","title":{"rendered":"Emulating the Intel 8080 on a MOS 6502"},"content":{"rendered":"<p>Emulating older computers on modern, much faster systems, is <a href=\"http:\/\/vice-emu.sourceforge.net\">very<\/a> <a href=\"http:\/\/mamedev.org\">common<\/a> <a href=\"http:\/\/en.wikipedia.org\/wiki\/Rosetta_(software)\">nowadays<\/a> \u2013 but how about emulating the Intel 8080 (1974) on a MOS 6502 system like the KIM-1 (1975)? The &#8220;8080 Simulator for the 6502&#8221; by Dann McCreary from 1978 does exactly that.<\/p>\n<p><a href=\"docs\/8080sim\/8080sim.jpg\"><img decoding=\"async\" src=\"docs\/8080sim\/8080sim_t.jpg\" width=\"100%\"><\/a><\/p>\n<table border=\"1\">\n<tr>\n<td>\n<cite><\/p>\n<p>Why imitate one microprocessor with another? You probably purchased this 8080 simulator package to do one or more of the following:<\/p>\n<ul>\n<li>Run existing 8080 software on your 6502<\/li>\n<li>Write, test and debug your own 8080 software without having to purchase a complete 8080 based system<\/li>\n<li>Learn something about the architecture and instruction set of the 8080 via hands-on experience<\/li>\n<\/ul>\n<p><\/cite>\n<\/td>\n<\/tr>\n<\/table>\n<p>The emulator is extremely size-optimized and fits in less than 1 KB of RAM. This was done by compressing the 256-entry opcode space into 25 sections of similar instructions that could be handled by one generic function.<\/p>\n<p>The four-page article &#8220;8080 Simulation with a 6502&#8221; (MICRO \u2013 The 6502 Journal, issue 16, September 1979) explains the motivation and design of the software in detail:<\/p>\n<p align=\"center\"><a href=\"docs\/8080sim\/8080 Simulation with a 6502.pdf\"><img decoding=\"async\" src=\"docs\/8080sim\/8080 Simulation with a 6502.png\" width=\"220\" border=\"1\"><br \/>Dann McCreary: 8080 Simulation with a 6502 [1979]<\/a><\/p>\n<p>And here is the original commented source code with usage instructions:<\/p>\n<p align=\"center\"><a href=\"docs\/8080sim\/An 8080 Simulator for the 6502, KIM-1 Version.pdf\"><img decoding=\"async\" src=\"docs\/8080sim\/An 8080 Simulator for the 6502, KIM-1 Version.png\" width=\"220\" border=\"1\"><br \/>Dann McCreary: An 8080 Simulator for the 6502, KIM-1 Version [1978]<\/a><\/p>\n<p>Thanks a lot to Dann McCreary, who provided scans of his original work, as well as additional insights:<\/p>\n<p><cite>I wrote this by hand, pencil and paper assembly (BTW, did you ever read Carl Helmer&#8217;s article about pencil and paper in one of the very early issues of BYTE magazine? \ud83d\ude09 and much of the simulator was written as I rode the bus to and from work&#8230; \ud83d\ude09<\/cite><\/p>\n<p>About the tools used to create this program:<\/p>\n<p><cite>Honestly, I don&#8217;t remember for certain&#8230; BUT&#8230; MORE THAN LIKELY, it is<br \/>\na FAKE &#8211; i.e., I probably just text-edited a listing in &#8220;assembler<br \/>\nlisting&#8221; format for the purpose of publishing the code and &#8220;looking<br \/>\nprofessional&#8221;&#8230; \ud83d\ude09<\/cite><\/p>\n<p><cite>CONSEQUENTLY, be on the lookout for typographical (and thus operational)<br \/>\nerrors that could be &#8220;in there&#8221; &#8230;<\/cite><\/p>\n<p><cite>The all-upper-case makes me think I printed this stuff out on an old<br \/>\ndrum printer that I resurrected from the American Surplus Computer<br \/>\ncompany in Boston back in the &#8217;70s&#8230; And there&#8217;s yet another story! \ud83d\ude42<\/cite><\/p>\n<p><cite>The text editor may likely have been running on my Apple ][&#8230;. or maybe<br \/>\n&#8220;borrowed&#8221; from some company where I was working at the time?<\/cite><\/p>\n<h2>Apple-80<\/h2>\n<p>Dann later ported the simulator to the Apple-][. The tape dump of the resulting product &#8220;Apple-80&#8221; can be found at <a href=\"http:\/\/www.brutaldeluxe.fr\/projects\/cassettes\/sybex\/\">brutaldeluxe.fr<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Emulating older computers on modern, much faster systems, is very common nowadays \u2013 but how about emulating the Intel 8080 (1974) on a MOS 6502 system like the KIM-1 (1975)? The &#8220;8080 Simulator for the 6502&#8221; by Dann McCreary from 1978 does exactly that. Why imitate one microprocessor with another? You probably purchased this 8080 &#8230; <a title=\"Emulating the Intel 8080 on a MOS 6502\" class=\"read-more\" href=\"https:\/\/www.pagetable.com\/?p=824\" aria-label=\"Read more about Emulating the Intel 8080 on a MOS 6502\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,5,20],"tags":[],"class_list":["post-824","post","type-post","status-publish","format-standard","hentry","category-2","category-archeology","category-literature"],"_links":{"self":[{"href":"https:\/\/www.pagetable.com\/index.php?rest_route=\/wp\/v2\/posts\/824","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.pagetable.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.pagetable.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.pagetable.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.pagetable.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=824"}],"version-history":[{"count":0,"href":"https:\/\/www.pagetable.com\/index.php?rest_route=\/wp\/v2\/posts\/824\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.pagetable.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=824"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.pagetable.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=824"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.pagetable.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=824"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}