{"id":1397,"date":"2020-05-15T21:26:41","date_gmt":"2020-05-15T19:26:41","guid":{"rendered":"https:\/\/www.pagetable.com\/?p=1397"},"modified":"2020-05-15T21:26:41","modified_gmt":"2020-05-15T19:26:41","slug":"ultimate-c64-memory-map","status":"publish","type":"post","link":"https:\/\/www.pagetable.com\/?p=1397","title":{"rendered":"Ultimate C64 Memory Map"},"content":{"rendered":"<p>The system software of the Commodore 64 has been extensively reverse-engineered. Next to <a href=\"https:\/\/www.pagetable.com\/c64ref\/c64disasm\/\">disassemblies<\/a> of the ROM, several &ldquo;memory maps&rdquo; have been published: tables that document system variables in the first kilobyte of RAM, and how to tweak the system software with <code>PEEK<\/code> and <code>POKE<\/code>. Now, I&rsquo;m presenting the <a href=\"https:\/\/www.pagetable.com\/c64ref\/c64mem\/\">Ultimate C64 Memory Map<\/a>: A C64 memory reference that shows eight sources side-by-side.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"docs\/c64mem\/c64mem-1.png\" height=\"385\" width=\"708\" alt=\"\" \/><\/p>\n<p>These are the references that have been adapted for this:<\/p>\n<ul>\n<li>Reference from <a href=\"http:\/\/unusedino.de\/ec64\/technical\/project64\/mapping_c64.html\">Mapping the Commodore 64<\/a> by Sheldon Leemon, ISBN 0-942386-23-X.<\/li>\n<li>German-language reference from <a href=\"https:\/\/archive.org\/details\/64er_sonderheft_1986_07\/page\/n6\/mode\/2up\">Memory Map mit Wandervorschl\u00e4gen<\/a> by Dr. H. Hauck, in 64&#8217;er Sonderheft 1986\/07.<\/li>\n<li>German-language reference from <a href=\"https:\/\/www.pagetable.com\/?p=1015\">Das neue Commodore-64-intern-Buch<\/a> by Data Becker, ISBN 3890113079.<\/li>\n<li>Reference by <a href=\"https:\/\/sta.c64.org\/cbm64mem.html\">Joe Forster\/STA<\/a>, with <a href=\"http:\/\/www.awsm.de\/mem64\/\">awsm&rsquo;s<\/a> changes applied.<\/li>\n<li>Comments from the <a href=\"https:\/\/github.com\/mist64\/cbmsrc\">original M6502 BASIC source by Microsoft and the original C64 KERNAL source by Commodore<\/a><\/li>\n<li>Reference from <a href=\"http:\/\/www.zimmers.net\/cbmpics\/cbm\/c64\/c64prg.txt\">Commodore 64 Programmer&rsquo;s Reference Guide<\/a>.<\/li>\n<li>Reference as found in <a href=\"http:\/\/unusedino.de\/ec64\/technical\/project64\/memory_maps.html\">Commodore 64 Memory Maps.txt<\/a> by anonymous.<\/li>\n<li>Reference by <a href=\"https:\/\/www.atarimagazines.com\/compute\/issue29\/394_1_COMMODORE_64_MEMORY_MAP.php\">Jim Butterfield<\/a> in COMPUTE! #29 (October 1982).<\/li>\n<\/ul>\n<p>You can enable and disable columns by clicking the checkboxes next to the sources, and you can expand\/collapse all details with the corresponding button above the table. Here are four different expanded explanations of the <code>STATUS<\/code> byte:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"docs\/c64mem\/c64mem-2.png\" height=\"213\" width=\"715\" alt=\"\" \/><\/p>\n<p>And here is the collapsed version of the range $2B-$48, comparing the comments in the original sources with the Programmer&rsquo;s Reference Manual:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"docs\/c64mem\/c64mem-3.png\" height=\"132\" width=\"595\" alt=\"\" \/><\/p>\n<p>The symbols (second column) are taken from the original sources. Sometimes, a single memory location has several meanings and thus several symbols. Some descriptions have been adapted to describe the different meanings independently:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"docs\/c64mem\/c64mem-4.png\" height=\"78\" width=\"500\" alt=\"\" \/><\/p>\n<p>KERNAL and BASIC ROM addresses link to the respective spots in the disassembly:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"docs\/c64mem\/c64mem-5.png\" height=\"123\" width=\"559\" alt=\"\" \/><\/p>\n<p>And in the disassembly, zero page addresses (like <code>$CC<\/code>) and symbols (like <code>BLNSW<\/code>) link back to the memory map:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"docs\/c64mem\/c64mem-6.png\" height=\"84\" width=\"483\" alt=\"\" \/><\/p>\n<p>The memory map table is generated from independent formatted ASCII files that look like this:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"docs\/c64mem\/c64mem-7.png\" height=\"286\" width=\"534\" alt=\"\" \/><\/p>\n<p>It consists of three columns: the address range in hex, the symbol name and the description in MarkDown format.<\/p>\n<p>The Ultimate C64 Reference is being developed as an open source project at <a href=\"https:\/\/github.com\/mist64\/c64ref\">github.com\/mist64\/c64ref<\/a> &#8211; contributions in the form of additions, corrections etc. are welcome!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The system software of the Commodore 64 has been extensively reverse-engineered. Next to disassemblies of the ROM, several &ldquo;memory maps&rdquo; have been published: tables that document system variables in the first kilobyte of RAM, and how to tweak the system software with PEEK and POKE. Now, I&rsquo;m presenting the Ultimate C64 Memory Map: A C64 &#8230; <a title=\"Ultimate C64 Memory Map\" class=\"read-more\" href=\"https:\/\/www.pagetable.com\/?p=1397\" aria-label=\"Read more about Ultimate C64 Memory Map\">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,6,41,8,16,19],"tags":[],"class_list":["post-1397","post","type-post","status-publish","format-standard","hentry","category-2","category-archeology","category-basic","category-c64","category-commodore","category-github","category-kernal"],"_links":{"self":[{"href":"https:\/\/www.pagetable.com\/index.php?rest_route=\/wp\/v2\/posts\/1397","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=1397"}],"version-history":[{"count":0,"href":"https:\/\/www.pagetable.com\/index.php?rest_route=\/wp\/v2\/posts\/1397\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.pagetable.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1397"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.pagetable.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1397"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.pagetable.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1397"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}