Re: [cc65] Banking out ROM (was: TGI preview)

From: Ullrich von Bassewitz <uz1musoftware.de>
Date: 2009-11-15 17:59:40
On Sat, Nov 14, 2009 at 03:19:34AM -0800, Fatih Aygün wrote:
> > The Plus/4 runs with all ROMs banked out. [...] I hoped to get a similar
> > setup for the C128 before the 2.13 release, but dropped it because of lack of
> > time.
>
> How do those platforms handle disk i/o?

There's an "official" list of kernal entry points. They are used by the
platform dependent, and also by the common Commodore code. For most platforms,
these entries point to the ROM itself. Banked systems have a small function in
low memory that has the label of the kernal entry point, banks in the ROM,
calls it and switches back to RAM on return. See the kxxx.s function in the
plus4 directory for examples.

For kernal functions just using register values this is straight forward. For
functions that get passed a buffer, the wrapper hast to check if the buffer is
in low memory and create a copy if not. Fortunately, the only case this is
used is for filenames, which are of limited size. See ksetnam.s function for
an example.

Regards


        Uz


-- 
Ullrich von Bassewitz                                  uz@musoftware.de
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Sun Nov 15 17:59:46 2009

This archive was generated by hypermail 2.1.8 : 2009-11-15 17:59:49 CET