Building the Original Commodore 1541 DOS Source

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 Dennis Jarvis collection contains source that can build the 2031/1540 ROM. Using the 1571 source from the same collection and the ROM images, I reconstructed the source trees for all versions of the 1540/1541/1541C/1541-II ROMs:

Directory Part Numbers Description
DOS_1540 325302-01, 325303-01 1540
DOS_1541_01 325302-01, 901229-01 1541 (original)
DOS_1541_02 325302-01, 901229-02 1541 (update)
DOS_1541_03 325302-01, 901229-03 1541 (update)
DOS_1541_05 325302-01, 901229-05 1541 (short board)
DOS_1541_06 325302-01, 901229-06 1541 (short board, update)
DOS_1541C_01 251968-01 1541C (original)
DOS_1541C_02 251968-02 1541C (updated)
DOS_1541C_03 251968-03 1541-II

All these directories can be found in the Commodore Source Code repository:

https://github.com/mist64/cbmsrc

Here is the output of “diff DOS_1540 DOS_1541”, for example:

The Buildable Source

This repository contains all versions of the 1540/1541/1541C/1541-II source, buildable with cc65:

https://github.com/mist64/dos1541

If you want to base your own development on this code:

  • The head of the repository points to the 1541-II version, which contains all of Commodore’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.
  • 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: ptch15 is supposed to jump to rnget2, not rnget.

References

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.