{"id":1063,"date":"2019-04-17T02:56:04","date_gmt":"2019-04-17T09:56:04","guid":{"rendered":"https:\/\/www.pagetable.com\/?p=1063"},"modified":"2019-04-17T02:56:04","modified_gmt":"2019-04-17T09:56:04","slug":"building-the-original-commodore-1541-dos-source","status":"publish","type":"post","link":"https:\/\/www.pagetable.com\/?p=1063","title":{"rendered":"Building the Original Commodore 1541 DOS Source"},"content":{"rendered":"<p>You might think the DOS ROM of the Commodore 1541 disk drive has been analyzed to death. But here are two new resources:<\/p>\n<ul>\n<li>The original source of all versions of the 1540\/1541\/1541C\/1541-II ROMs.<\/li>\n<li>A git repository with all versions in its history, each of them adapted to build with modern tools.<\/li>\n<\/ul>\n<h2 id=\"The-Original-Source\">The Original Source<\/h2>\n<p>The <a href=\"http:\/\/6502.org\/users\/sjgray\/dj\/\">Dennis Jarvis collection<\/a> contains source that can build the 2031\/1540 ROM. Using the 1571 source from the same collection and the <a href=\"http:\/\/www.zimmers.net\/anonftp\/pub\/cbm\/firmware\/drives\/new\/1541\/index.html\">ROM images<\/a>, I reconstructed the source trees for all versions of the 1540\/1541\/1541C\/1541-II ROMs:<\/p>\n<table>\n<thead>\n<tr>\n<th> Directory                                                                 <\/th>\n<th> Part Numbers         <\/th>\n<th> Description                <\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td> <a href=\"https:\/\/github.com\/mist64\/cbmsrc\/tree\/master\/DOS_1540\">DOS_1540<\/a>         <\/td>\n<td> 325302-01, 325303-01 <\/td>\n<td> 1540                       <\/td>\n<\/tr>\n<tr>\n<td> <a href=\"https:\/\/github.com\/mist64\/cbmsrc\/tree\/master\/DOS_1541_01\">DOS_1541_01<\/a>   <\/td>\n<td> 325302-01, 901229-01 <\/td>\n<td> 1541 (original)            <\/td>\n<\/tr>\n<tr>\n<td> <a href=\"https:\/\/github.com\/mist64\/cbmsrc\/tree\/master\/DOS_1541_02\">DOS_1541_02<\/a>   <\/td>\n<td> 325302-01, 901229-02 <\/td>\n<td> 1541 (update)              <\/td>\n<\/tr>\n<tr>\n<td> <a href=\"https:\/\/github.com\/mist64\/cbmsrc\/tree\/master\/DOS_1541_03\">DOS_1541_03<\/a>   <\/td>\n<td> 325302-01, 901229-03 <\/td>\n<td> 1541 (update)              <\/td>\n<\/tr>\n<tr>\n<td> <a href=\"https:\/\/github.com\/mist64\/cbmsrc\/tree\/master\/DOS_1541_05\">DOS_1541_05<\/a>   <\/td>\n<td> 325302-01, 901229-05 <\/td>\n<td> 1541 (short board)         <\/td>\n<\/tr>\n<tr>\n<td> <a href=\"https:\/\/github.com\/mist64\/cbmsrc\/tree\/master\/DOS_1541_06\">DOS_1541_06<\/a>   <\/td>\n<td> 325302-01, 901229-06 <\/td>\n<td> 1541 (short board, update) <\/td>\n<\/tr>\n<tr>\n<td> <a href=\"https:\/\/github.com\/mist64\/cbmsrc\/tree\/master\/DOS_1541C_01\">DOS_1541C_01<\/a> <\/td>\n<td> 251968-01            <\/td>\n<td> 1541C (original)           <\/td>\n<\/tr>\n<tr>\n<td> <a href=\"https:\/\/github.com\/mist64\/cbmsrc\/tree\/master\/DOS_1541C_02\">DOS_1541C_02<\/a> <\/td>\n<td> 251968-02            <\/td>\n<td> 1541C (updated)            <\/td>\n<\/tr>\n<tr>\n<td> <a href=\"https:\/\/github.com\/mist64\/cbmsrc\/tree\/master\/DOS_1541C_03\">DOS_1541C_03<\/a> <\/td>\n<td> 251968-03            <\/td>\n<td> 1541-II                    <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>All these directories can be found in the Commodore Source Code repository:<\/p>\n<p><a href=\"https:\/\/github.com\/mist64\/cbmsrc\">https:\/\/github.com\/mist64\/cbmsrc<\/a><\/p>\n<p>Here is the output of &ldquo;<code>diff DOS_1540 DOS_1541<\/code>&rdquo;, for example:<\/p>\n<p><iframe loading=\"lazy\" src=\"docs\/diff_1540_1541.html\" width=\"100%\" height=\"200\"><\/iframe><\/p>\n<h2 id=\"The-Buildable-Source\">The Buildable Source<\/h2>\n<p>This repository contains all versions of the 1540\/1541\/1541C\/1541-II source, buildable with <a href=\"https:\/\/github.com\/cc65\/cc65\">cc65<\/a>:<\/p>\n<p><a href=\"https:\/\/github.com\/mist64\/dos1541\">https:\/\/github.com\/mist64\/dos1541<\/a><\/p>\n<p>If you want to base your own development on this code:<\/p>\n<ul>\n<li>The head of the repository points to the 1541-II version, which contains all of Commodore&rsquo;s bug fixes. It works on all hardware versions (1540\/1541, 1541C\/1541-II), but does not contain support for the 1541C track 0 sensor.<\/li>\n<li>251968-02 is the last 1541C version and has track 0 sensor support, but one bug fix found in the 1541-II ROM is missing: <code>ptch15<\/code> is supposed to jump to <code>rnget2<\/code>, not <code>rnget<\/code>.<\/li>\n<\/ul>\n<h2 id=\"References\">References<\/h2>\n<ul>\n<li><a href=\"https:\/\/spiro.trikaliotis.net\/cbmrom\">https:\/\/spiro.trikaliotis.net\/cbmrom<\/a><\/li>\n<li><a href=\"http:\/\/www.zimmers.net\/anonftp\/pub\/cbm\/firmware\/drives\/new\/1541\/index.html\">http:\/\/www.zimmers.net\/anonftp\/pub\/cbm\/firmware\/drives\/new\/1541\/index.html<\/a><\/li>\n<li><a href=\"http:\/\/www.zimmers.net\/anonftp\/pub\/cbm\/firmware\/drives\/new\/1541\/1541C-to-1541-II.txt\">http:\/\/www.zimmers.net\/anonftp\/pub\/cbm\/firmware\/drives\/new\/1541\/1541C-to-1541-II.txt<\/a><\/li>\n<li><a href=\"http:\/\/cbm-hackers.2304266.n4.nabble.com\/1541-ROMs-td4659511.html\">http:\/\/cbm-hackers.2304266.n4.nabble.com\/1541-ROMs-td4659511.html<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>You might think the DOS ROM of the Commodore 1541 disk drive has been analyzed to death. But here are two new resources: The original source of all versions of the 1540\/1541\/1541C\/1541-II ROMs. A git repository with all versions in its history, each of them adapted to build with modern tools. The Original Source The &#8230; <a title=\"Building the Original Commodore 1541 DOS Source\" class=\"read-more\" href=\"https:\/\/www.pagetable.com\/?p=1063\" aria-label=\"Read more about Building the Original Commodore 1541 DOS Source\">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,8,13,16],"tags":[],"class_list":["post-1063","post","type-post","status-publish","format-standard","hentry","category-2","category-archeology","category-commodore","category-floppy-disks","category-github"],"_links":{"self":[{"href":"https:\/\/www.pagetable.com\/index.php?rest_route=\/wp\/v2\/posts\/1063","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=1063"}],"version-history":[{"count":0,"href":"https:\/\/www.pagetable.com\/index.php?rest_route=\/wp\/v2\/posts\/1063\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.pagetable.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1063"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.pagetable.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1063"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.pagetable.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1063"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}