Skip to content

dmantione/final_cartridge

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Note: The master branch contains source code for the original Final Cartridge III. The Final Cartridge III 101% source code can be found in the development branch.

Final Cartridge

This project is the reverse-engineered and documented Commodore 64 cc65/ca65/cl65 assembly source code of the "Final Cartridge III". Currently source code of bank 0 and low part of bank 3 has been reconstructed.

When assembled, the resulting binary is identical with the 1988-12 version of the original cartridge ROM.

What is contained?

Bank 0 contains the BASIC and editor extensions, the floppy and tape speeder, fast format, the centronics printer driver, and the monitor.

Bank 3 contains the freezer.

Building

Create fc3.bin:

make

Regression test: create fc3.bin and make sure it's identical to the original ROM:

make test

Why?

Reusing Components

The FC3 contained some great components, like the editor and BASIC extensions, and the excellent machine code monitor.

The source was separated into files with minimal dependencies, so they can be included in other projects.

For example:

make clean PROJECT=monitor monitor.prg

builds a standalone version of the monitor that can be started with

sys 16384

The monitor has also been adapted to work with the TED series (C16, C116, Plus/4):

make clean MACHINE=ted PROJECT=monitor monitor.prg

In this version, the O command takes a single hex character argument for the 16 banks. Since OD clashes with switching to disk, bank D can be reached with O<SHIFT>D.

The standalone version can optionally be built with support for illegal opcodes by adding CPU=6502ill to the make command like, i.e.

make clean CPU=6502ill PROJECT=monitor monitor.prg # C64
make clean CPU=6502ill MACHINE=ted PROJECT=monitor monitor.prg # TED

Creating Derivatives

The existing code is a great starting point to create an improved Final Cartridge. Some ideas:

  • Replace the floppy speeder with a faster one.
  • Disable speeder when it detects non-1541 drives or a high-level emulated drive.
  • Add a fast directory function.
  • Replace PACK and UNPACK with a different engine.
  • Adding disk copy functionality.
  • Add "clear all memory" functionality (like "Zero Fill" in freezer)
  • Monitor: Support illegal opcodes.
  • Monitor: Support screen code.
  • Monitor: Optimize "OD" mode for speed.
  • Monitor: Allow transfering data between computer and drive.
  • Monitor: Allow loading and saving below I/O area.
  • Bundle a user-defined set of standard $0801-based programs in ROM.

This can be done without overflowing bank 0, since it contains plenty of code that can be removed, either because it is of little use these days (printer.s, tape code in speeder.s, format.s) or it is only there to support other banks (freezer.s, vectors.s, desktop_helper.s).

Please be aware of the The Final Replay project, which has similar goals, but is based on a clean reimplementation.

Copyright

The original code is (c) Uwe Stahl and Riska B.V. Home & Personal Computers. The assembly version, the comments, the partitioning into separate files and the linker configuration was done by Michael Steil mist64@mac.com; this work is in the public domain.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Assembly 99.3%
  • Other 0.7%