C 64-Emulator V2
© by Thomas Klein
 

Engl. What is the sense of a C64-emulation for the C128, when there is a built-in C64-mode? It gives you the possibility to port your C64-programs to the C128-mode with just a few changes, and use for example the second ram-bank or the second color ram, or you can write routines which use the burst mode of the serial bus. In contrast to the C64-mode all these things are still available when "C64-EMULATOR V2" is running.

When you start the program(just "RUN" it), the charset is copied to $1000 and $9000, where in C64-mode the VIC always sees an image of the charset-ROM(in C128-mode there are images at $1000, $5000, $9000 and $D000, but only if bit 2 in $01 is low), and to $D000. After that a slightly changed version of the C64-operating system is installed and started via the reset-routine. The changes to the normal C64 are:

1.)In the memory-initialization-routine at $FD50 the RAM-test is skipped and the start of ROM is immediately set to $A000.
2.)The standard value for adress $01 at $FDD6 is changed from $E7 to $E3, which makes the ROM-Images of the charset available.
3.)Because $FF00-$FF04 are occupied by the MMU-configuration-register and the load-configuration-registers, the code normally found at this place is moved to $FD71(formerly used by the RAM-test-routine) and a jump to it is installed at $FEFC.
4.)Finally the startup-text at $E473 is changed.

Remember that you cannot use the "RAM below ROM"($A000-$BFFF and $E000-$FFFF) or change the memory setup via $01. Instead of that you have access to the MMU-registers at $D500 and $FF00.

"VIDEO-$CC00" moves the video-RAM to $CC00 and allows you to change the beginning of basic-programs to $0801(C64-standard) or $0401(which gives you 1 KByte of extra-memory). It uses the charset at $D000.

Thomas Klein, 15.04.98


deutsch Wozu braucht man einen C64-Emulator für den C128, wo doch bereits ein C64-Modus im Computer eingebaut ist? Er gibt einem die Möglichkeit, C64-Programme mit einigen wenigen Änderungen für den C128-Modus umzusetzen und dabei trotzdem z. B. die zweite RAM-Bank oder das zusätzliche Farb-RAM zu benutzen oder Routinen zu schreiben, die den Burst-Modus des seriellen Bus verwenden. Im Gegensatz zum "echten" C64-Modus stehen diese Dinge auch dann zur Verfügung, wenn der "C64-Emulator V2" aktiv ist.

Nach dem Start des Programms mit "RUN" wird der Zeichensatz nach $1000 und $9000 kopiert, wo der VIC im C64-Modus immer Bilder des Zeichensatz-ROMs sieht (im 128er-Modus wird das ROM an den Adressen $1000, $5000, $9000 und $D000 eingespiegelt, aber nur, wenn Bit 2 in $01 gleich null ist), sowie nach $D000. Danach wird eine leicht veränderte Version des C64-Betriebssystems installiert und über die Reset-Routine gestartet. Die Änderungen zum normalen C64 sind:

1.)In der Speicher-Initialisierungsroutine ab $FD50 wird der RAM-Test übersprungen und die Startadresse des ROMs direkt auf $A000 gesetzt.
2.)Der Standardwert für die Adresse $01 in $FDD6 ist jetzt $E3 statt $E7, wodurch die ROM-Bilder des Zeichensatzes zur Verfügung stehen.
3.)Da $FF00-FF04 vom MMU-Konfigurations-Register und den Lade-Konfigurations-Registern belegt ist, wurde der dort befindliche Assembler-Code nach $FD71 (vorher von der RAM-Test-Routine benutzt) verschoben und an $FEFC ein Sprungbefehl dorthin installiert.
4.)Schließlich ist die Einschaltmeldung ($E473) geändert worden.

Zu beachten ist, daß das "RAM unter dem ROM" ($A000-$BFFF und $E000-$FFFF) nicht zur Verfügung steht und daß man die Speicherkonfiguration nicht über die Adresse $01 ändern kann. Statt dessen hat man Zugriff auf die MMU-Register ab $D500 und $FF00.

"VIDEO-$CC00" verschiebt den Text-Bildschirm nach $CC00 und ermöglicht einem, den Basic-Start auf $0801 (C64-Standard) oder $0401 (wodurch man 1 KByte an zusätzlichem Speicher erhält) zu setzen. Das Programm verwendet den nach $D000 kopierten Zeichensatz.

Thomas Klein, 15.04.98


"C64EMULATOR2.SFX" is a self-extracting archive (execute it in C64-mode), which contains these files:
C64-EMULATOR V2:  C64-"emulation" for the Commodore 128
VIDEO-$CC00:      Basic-program to change the locations of the
                  video-ram, the charset and the basic-start
C64-EMULATOR.TXT: English text(in PET-ASCII)
TYPE TEXT:        Program to view and print text-files

  Back to / Zurück zum Index  
Home | Cat's Eye | Kimagure | Fotos | Computer | NiNuM | TSP | Kontakt