The 6502-RAMROM as drive expanderPage jump links: Heading This page provides a short overview of the 6502 microprocessor based hardware extension, that was designed by Nicolas Welte [1]. It contains a dedicated test report with my personal experiences and some application examples.
Originally the 6502-RAMROM
6502-RAMROM prototype test report from Womo, 2003-02-07Hardware
Some weeks after Nicolas received his professionally manufactured
printed circuit boards (PCBs) of the 6502-RAMROM
[17], I ordered two of them
At this time, the Flash update software wasn't available for disk drive in-circuit updates, so I had to use my IBM-PC based c't-Flasher [5] for burning some contents into the ROMs. I tested several speeder ROMs, flashed different versions into the four ROM banks and switched them forth and back. Everything worked fine, cool. Dolphin-DOS 2.0
Before I could test the RAM options I needed to solve some
problems. I wanted to test out the Dolphin-DOS 2.0 floppy speeder
ROM [6,7], which makes use of additional RAM
[8]. But for this and other speeder systems I
needed to install a parallel cable from the floppy's 6522 VIA chip
to my C64's user port. And I needed a simple solution to quickly
test out different C64 Kernal replacements. This all done, I first tested my beloved SpeedDOS (35 and 40 tracks) and made sure, that it worked fine. I also tested some of the most important copy programs to make sure, that the parallel cable and the ROM replacements don't fail. Preparations for the test of Dolphin-DOS 2.0 [8] were done, flashing the 1541 drive ROM and C64 Kernal. I configured the RAM option switches to DD2 and made the first steps. Anything looked fine. And wow, DD2 isn't as slow as I thought all the time. Although beaten by Professional-DOS [10], working with it brings fun. I couldn't see any problems like load or CRC errors, all games loaded fine and were playable. So the RAM seemed to work fine also. In-circuit flashingThe next test phase came, when Nicolas was finished with the in-circuit drive flashing software [11]. This piece of software was designed a very, very special way. The ROM, that is going to burned is not loaded into the computer's memory and transferred back into the drive's Flash-ROM memory. That would be much too long winded. No, the ROM contents are transferred directly, block by block, from the disk's surface into the drive's buffer memory and further into the Flash-ROM. This is possible, because Flash-ROMs from Atmel [12] were used, that can be flashed page by page. Unfortunately the Flash software does only support chips from Atmel until now, but you can use differently sized ROMs, if you want (AT29C256, AT29C512, AT29C010) and if you don't need that much ROM banks. For the first times flashing new drive ROMs went flawlessly, but whenever a SpeedDOS-ROM was configured via the main ROM switches I ran into problems with flashing other ROM banks. Some tests revealed, that whenever a SpeedDOS-ROM was selected with the 6502-RAMROM and the Flash enable switch was set, the drive hung up, when a file was loaded or the error channel was retrieved with the '@' command. I discussed it with Nicolas and he told me, that he found similar problems with the original CBM VIC20-ROM. We found out that some misdesigned ROM code fragments were responsible for this (Note: the VICE emulator's built-in monitor [13,14] was exceedingly helpful with this: <ALT>-m, device 8:, watch store 8000 FFFF, exit). Whenever the Flash enable switch is set and parts of code executed by the desired 6502 processor store values to the ROM (to the Flash-ROM), the internal logic of the Flash blocks the whole chip so that even reading the ROM fails for some time. After discussing this point in the cbm-hackers mailing list [15], Nicolas managed to fix this ROM bug and so did I with the SpeedDOS-ROMs [16]. Now, with the patched ROMs, I was able to Flash other ROM banks without the need to switch back to the original CBM DOS 2.6 ROM (which worked flawlessly with all previous tests). Problems with the prototypeAnother problem manifested when analyzing the »store-to-ROM« problem with the drive expansion 6502-RAMROM prototype [17]. What happens, when someone wants to flash the whole ROM, but the DD2 RAM configuration is selected? Because the DD2 RAM overlays the drive's address space from 0x8000 to 0x9FFF [8], the Flash-ROM cannot be addressed there. Furthermore, DD2 went crazy, whenever the Flash enable switch was set. Nicolas detected the problem by carefully reviewing the 1541 GAL equations. The Flash option switch disables the overlaying RAM for write operations. Not a big task, because only the GAL needs to be replaced, I thought. First we decided to patch the floppy DOS ROM part of Dolphin-DOS 2.0. The ROM code should not access the 8kB RAM at the memory address location 0x8000...0x9FFF anymore, but at the addresses 0x6000...0x7FFF. That way no changes to the 6502-RAMROM would needed, because the RAMboard configuration could be used instead. And flashing the full 32kB ROM bank should become possible, too. But Nicolas reported, that the patched DD2-6 ROM [21] didn't work, although other tests with the VICE emulator showed no problems. He found out, that there was a real hardware problem, that depends on the special address decoding behaviour of the CBM drive series (RAM and especially VIA locations mirrored at different addresses; IRQ flag handling). Since the PET and VIC20 computers don't contain such mirrored device address spaces, this problem couldn't be detected with the PET/VIC20 6502-RAMROM prototypes. The SolutionNicolas worked out a solution, that needed the least possible changes to the PCB in combination with changed GAL equations. Without the GAL, this fix would have been a huge patch orgy. Unfortunately you have to redo the patch [3], if you want to use the 6502-RAMROM in a VIC20 or PET again. Although not needed I installed some jumpers to easily configure the PCB for both options.
In the meantime I tested flashing other Flash-ROMs with different
sizes. I had an AT29C020 as spare and tested the bigger flashing
page size. Reading out the ROM contents with the c't-Flasher
[5] at my PC again showed no differencies.
Note: you can't access/flash half of the banks of this ROM type
without further hardware modifications. 6502-RAMROM final release test report from Womo, 2003-02-16Retesting different flashing scenarios to check, that the problems with Dolphin-DOS were goneAfter I got the new changed GALs I repeated all the earlier tests:
After preparing some matching C64 Kernal ROMs
The patched Dolphin-DOS-2.0-6 (RAM at 0x6000) [21] is another task, with this ROM, the Dolphin-Copy program doesn't work, because the RAM location seems to be hardcoded into the copy tool. I also tested Dolphin-DOS 3.0, which worked fine with the exception that it was nearly as slow as the original CBM DOS. No wonder, because DD3 makes use of an extra parallel port chip (6821 PIA) within the drive. It cannot communicate over the standard parallel port cable connected to the VIA 6522, therefore it has to use the slow serial bus transfer routines. The future and some ideas
Until now, mainly the ROM part of the 6502-RAMROM was tested, in
the future I'll have to look at the RAM configurations, especially
in some applications for the maxRam-Mode. Perhaps Markus Brenner
wants to jump in here and extends his Burstnibbler based transfer
tool »mnib« [18], so that much more
sophisticated copy protections can be dumped to G64 disk images.
I should take my 1571 floppy drive sometime and test it with the
6502-RAMROM, too. There are other floppy speeders, especially
designed for this drive. Not only to mention Dolphin-DOS 3.0 for
the 1571, but especially Prospeed-1571. With this drive, the
maxRam mode of the 6502-RAMROM cannot be used, it would overlay
the 1571's CIA and the registers of the WD177x controller. It
may be interesting what could happen, if the maxRam mode
is used nevertheless. Conclusion and application scenariosSpeeder system »emulator«»Emulating« different DOS ROMs and simple speeder systems like Jiffy-DOS, SpeedDOS or Dolphin-DOS is the playfield of the 6502-RAMROM, when inserted into Commdore's disk drives. You only need to add a simple parallel cable for some of these systems. Atmel Flash device programmerIn combination with a patched Dolphin-DOS (DD2-6) [21], this hardware extends your floppy disk drive to a full blown high speed Atmel Flash device programmer. You will never need to handle with EPROMs and EPROM burners again. There is no need anymore for transfering the ROM files slowly to the computer memory before they can be written to the EPROM. The well designed flasher software makes your life even simpler. Maybe you want to replace your system ROMs with DD2-6, which requires some little hardware modification (using address line A14 for switching the upper and lower part of the DD2 ROM at 0xA000/0xE000); this way you can flash the whole chip. Nicolas is also working on more functions, like programmable bank switching about unused VIA/CIA port lines. Maybe not only Dolphin-DOS-2.0-6 can speed up the Flash process a little bit, but other drive speeders like Jiffy-DOS, too. Because of the special designed In-System-Flash software, the whole process is not really slow on a 1541 drive equipped with a standard CBM DOS (35 seconds for 32kB). So you don't need to install a speeder system or ROM in any case, instead it is an option. And Nicolas said, the Flash software contains some potential for speedups with the 1541 drive. Let's wait, test and see... RAM (only) expander (1541/1571 RAMBoard) and RAM diagnostic moduleMore applications of this board may rely on the RAM option only, you could save some money by not making use of the Flash-ROM chip. Copy software like the well known tool series Maverick already know how to use a RAMBoard equipped drive [20], which the 6502-RAMROM can easily be configured to »emulate«. Perhaps Michael Klein (cbm4linux [19]) or other people may want to develop special software, that makes use of a maxRAM equipped disk drive (nearly 32kB of RAM usable). Not to mention the RAM diagnostic functionality that replaces the drive's builtin RAM by the one from the 6502-RAMROM. Things, the 6502-RAMROM can't do easilyBecause the hardware was mainly designed for universality and simplicity, it is not a general speeder system hardware emulator. Systems like Dolphin-DOS 3.0, Professional-DOS or Prologic-DOS cannot be used without further extensions or ROM patches. This purpose may be the job of another hardware extension board, one of the projects I am currently working on. References
Downloads
Page jump links: Heading |