Turbo Chameleon 64 Cartridge
VGA video and more for the Commodore 64
Hi All,
This is not the official support page for Chameleon.
I have created this page as main developer, so I can easily share some documentation and information about the cartridge.
I've also collected and answered some common questions people (might) have about the product.
For additional information or questions visit the Individual Computers website or join the chameleon_64 mailing list at http://tech.groups.yahoo.com/group/chameleon_64
Peter
This project started somewhere in the beginning of 2006 after talking with Jens of Individual Computers.
Initially it was called VGA-64, a simple cartrige with VGA connector for duplicating the VIC-II screen on a VGA monitor.
However when you have a FPGA on a cartridge, "feature creep" kicks in as these chips are quite flexible (too much sometimes :-).
So more possibilities and ideas for extensions came while the cartridge was in development.
Even if the goal is not making a new platform, it kinda silly not to take advantage of 25 years of chip innovation.
The list of ideas grew faster as I could connect FPGA building blocks together, so some ideas have been dropped, others delayed for future upgrades.
The current feature list is as follows:
- VIC-II screen duplication on VGA through intelligent bus snooping techniques
- Cycle accurate REU memory expansion emulation (upto 16 Mbyte)
- Cycle accurate geoRAM emulation (upto 4 Mbyte)
- MMU allowing access to all of 32 Mbyte from the 6510 (using 4 Kbyte blocks)
- Turbo function with full 6510 emulation (illegal opcodes)
- MMC/SD slot (software compatible with MMC64)
- Retro Replay compatible freezer logic (ROM sets can be loaded from MMC or onboard flash)
- diskdrive emulation (1541 compatible, so fastloaders/speeders will work)
- PS/2 keyboard and mouse connectors (for C64-tower projects)
- Infrared receiver
- Clockport connector (RR-net)
- A few MBytes of user writable flash rom for firmware updates and storage of custom roms
- 8 bit microcontroller for startup control with EEPROM for storing configuration settings
When in standalone mode:
- Catridge is powered through a USB cable (5 volt)
- Cycle accurate emulation of the two CIA chips
- Cycle accurate emulation of the VIC-II video chip
- Stereo SID chip emulation (at 1 Mhz sample rate, very clean sound with no aliasing!)

Files and Documentation
Chameleon programmers manual (draft version)
Screenshots taken during development
The pictures show some of the capabilities of the VGA controller of Chameleon.
The first picture shows 3 objects (think sprites but bigger) in 2 color mode (1 bit/pixel) with various levels of zoom/stretch on top of the basic screen.
The second picture shows the same objects, but now they are switched to 16 color mode (4 bits/pixel). The objects pointers are set to start of memory incrementing with 256 on each line. Not shown in the pictures is support for transparency.
Project Status
There is quite a bit of FPGA logic and software already written.
I'm using prototype version 2, which has all the connectors of the final product.
The REU emulation is working, the MMU is working (access >64Kbyte in 4Kbyte blocks), config registers are working.
VGA is mostly done, still some small bugs to fix.
MMC/SD logic is working and emulates a MMC/64 cartrigde correctly, diskdrive emulation works, clockport is working (tested with RR-NET).
And the cartridge communicates with the C64 machine in both directions.
Stuff todo:
Booting from flash, fixing VGA controller bugs, video sync settings and a couple of VIC-II and SID emulation bugs.
Chameleon FAQ
I still use a tv or svideo monitor, can the Chameleon be used without a VGA monitor?
Yes, although a few features of the cart will be unavailable. The 1541 drive emulation, freezer, clockport, MMU, REU and even the turbo are usable.
Even with turbo mode enabled the VIC-II screen will be active and usable.
How can the VGA display the C64 screen?
Inside the Chameleon is a replica of the VIC-II chip. All register updates and memory accesses are send to both the original VIC-II chip and the replica. This "digital-cloning" approach gives much better VGA display quality compared to sampling and upscaling the composite signal.
VIC-II on VGA is nice, but what about VDC emulation?
Not planned for the initial release. I doubt there are many C64 programs that use the VDC. Using it for the additional 16 or 64 Kbyte storage space is largly irrelevant with the REU emulation available.
How does the Chameleon deal with C128 machines?
Very poorly, it forces C64 mode and doesn't understand the VDC, MMU and extra registers in the VIC-II chip. Also many C128 have signal quality issues on the cartridge port, which can result in poor stability. In other words using the Chameleon with a C128 machine is not recommended!
How does the Chameleon deal with C-One machines?
There is a port of the Chameleon core for the C-One and can be downloaded for free.
This replaces the FPGA-64 core (the PAL and NTSC C64 emulation core).
The cartridge itself will NOT function correctly when placed in the C-One.
How does the Chameleon deal with SX-64 machines?
Chameleon will most likely be compatible. Tests for stability issues still have to be performed at this time.
Is there SCPU / Flash-8 compatibility planned for the turbo mode?
No, the 6510 code comes from my FPGA-64 project. We don't have a 65816 compatible emulator yet.
Also getting reliable 20Mhz cycle-exact operation with SDRAM is not easy.
Especially as the VGA frame buffers, diskdrive emulation and REU are also using the SDRAM at the same time.
The other issue is software support. The SCPU has additional ROMS that can't be copied without a license.
How fast is the 6510 based turbo?
Currently 1.8 times on average. This will be improved significantly in the near future.
We aim for 8 Mhz with all features enabled, faster if unused parts of Chameleon are switched off (like VIC-II fetches, if enhanced VGA resolutions are used).
The 6510 core itself can run VERY fast, so it all depends on memory bandwidth.
Less emulated devices that are active will result in faster speed.
Isn't the 6510 a bit limiting with its 64 Kbyte memory range, making the Chameleon a bankswitching nightmare?
Bankswitching is indeed supported (and sometimes necessary). You can for example map different kernals in the E000-FFFF area.
Also rom cartridges at 8000-9FFF can be emulated with the bankswitching logic.
A MMU block allows the 6510 to access all of the 32 Mbyte memory in 4 Kbyte blocks, but some areas are reserved for the freezer cartridge emulator and Chameleon configuration menu.
The emulated REU can access large amounts of memory very quickly and transfer it into the lowest 64 Kbytes where the 6510 can access it.
GeoRAM emulation can map 256 bytes out of a 4 Mbyte buffer into the C64 memory at DE00h-DEFFh.
Is there DTV compatibility planned for Chameleon?
No, unlikely to ever happen. The DTV started life as a C64 emulator.
So then we are emulating an emulator (not a real good one either).
Not all the quirks of the DTV are yet known and documented.
Also it neither has a true 6510 cpu emulation nor is it 65816 like.
So that would require designing a complete new processor based on reversed engineerd DTV specs.
If the 6510 CPU is emulated, can the tape still work? Can the original CPU work next to the emulated one?
No, the tape drive is inoperable when the Chameleon is used.
The 6510-chip in the C64 is completely switched off.
Although technically it is possible to run both CPUs at the same time, there is no software support yet that makes this possible.
Is the VGA reprogrammable for more colors or higher resolutions?
Yes, Chameleon supports upto 8 bit/pixel color-depth (256 different colors arranged as 1 byte/pixel) and screen resolutions upto 1024x768.
The VGA controller supports multiple layers of bitmaps of different resolution, sizes and color-depth.
Each object can be positioned freely on the screen and supports smooth-scroll in all 4 directions.
Each object can have a transparent color (index 0) so they can function as sprites (MOBs) too. There are a total of 256 slots to put objects in.
The size and total number of objects that can actually be displayed at the same time is limited by the memory bandwidth.
Is dual monitor supported (C64 video port and VGA showing a different picture)?
The hardware can do this and the required register settings will be documented, but there is at the moment no software that supports this mode.
|