Commodore 128D User Manual Page 31

  • Download
  • Add to my manuals
  • Print
  • Page
    / 31
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 30
HIRAM line low, so that the interrupt vectors will always be fetched from RAM. The idea of the expansion is that the
program runs in some other memory blocks, say 30, with the PIA totally disabled from the address space. The default
memory blocks ($F$C) will be initialized mostly with null bytes, which is the opcode of the BRK instruction. You also
need the freezer interrupt vectors ($FFFA$FFFF) and a small interrupt handler that stores the processor registers and
switches the main freezer program into the address space.
If you want to freeze hanged programs, too, you can do it without losing the state of the I/O chips. By using a
custom Kernal ROM, you could even store all 8502 registers except the Program Counter. You just have to be able
to reset the 8502 without resetting the rest of the chips. To do this, desolder the RESET signal, pin 40 on the 8502.
Connect a 1N4148 diode between the system RESET signal and the 8502, with the mark pointing away from the
processor. Add a pull-up resistor to the signal, and a switch between the logical ground and the signal.
Now, whenever you push the switch, only the 8502 will be reset. If the computer is in the C64 mode at this time,
it will remain in that mode, since the MMU does not get reset. You should then use the Autostart code ($C3 $C2 $CD
$38 $30 at $8004$8008), and the Kernal will jump to the vector ($8000). Unfortunately it will destroy all registers
except the Y register when searching for that code. More fortunately, if the computer is in the C128 mode, and if the
Kernal ROM is not selected in the memory configuration, the processor will fetch the RESET vector from the active
RAM bank. In that case you can store all processor registers except the program counter.
Alas, I just have invented a software hack that cannot be frozen with this circuit. If a program runs on the I/O area
($DE00$DFFF except the range where the PIA is mapped to while the I/O is switched on) and has disabled the NMI
interrupts, the program will continue running even if you have activated the freezer and hit the Restore key. Should
you ever encounter this type of a software hack, you can use a triple switch and add the LORAM signal (8502’s pin 30)
to one extra contact. Connect the remaining contact to the U29’s pin 4 through a diode with the mark pointing to the
U29. This will disable the I/O area for the time the Restore signal is active, so the processor can fetch a BRK from the
memory underneath, and will always freeze correctly.
I haven’t completed the freezer expansion yet, as the daughter-board in my faithful 2564 (C64 with the 256 kB
expansion) stopped working when I opened the cover to start the surgery operation. My first attempt of rebuilding it
did not succeed, and now I am in Germany, more than one megameter away from the computer. When returning to
Finland in August 1994, the freezer expansion will be one of my first projects I am going to finish.
23
Naturally you also need a program to utilize the freezer circuitry. You don’t need to code so much, only the routine
to jump back to the freezed program and the routine that saves all registers upon freezing need to be written from
scratch. You can patch existing machine language monitors, sprite editors and utilities like that, only the data fetch
and data store subroutines must be rewritten. Developing the freezer software is very simple, since you can access the
frozen program through a 16 kB window, and you can use the Kernal routines all the time.
6.2 New operating system
In my C64, I have replaced the 2364 Kernal ROM with a 32-kilobyte EPROM. The two extra address lines are
controlled by the PIAs pins CA2 and CB2. As the C128 uses a 23128 ROM for both C64 BASIC ROM and Kernal
ROM, this type of expansion cannot be used. Besides, you can access only 256 kilobytes of the memory in the C64
mode. Why would you want to improve the C64 mode if you can make the C128 mode far better?
The C128 has a socket for a Function ROM for your operating system extensions. It can hold a 27256 EPROM,
32 kilobytes. If that does not satisfy your needs, you could use a 27512 EPROM instead. In this case you have to bend
the A15 line up. This line could be controlled by the PIAs CB2 line. To ensure that the logic works also when the
CB2 line is input, add a 4.7 kpull-up resistor between CB2 and +5 V.
23
So I thought at that time—as of December 1999, I have neither fixed that particular C64 nor completed the freezer expansion. Besides, the
expansion would not have much advantage over freezer cartridges or the features present in some emulators.
31
Page view 30
1 2 ... 26 27 28 29 30 31

Comments to this Manuals

No comments