At long last, the AGA enhanced Minimig core finally comes to the Turbo Chameleon 64!
I teased the new core on YouTube a couple of days ago:
At the same time I announced that, in response to several people prompting me in the past, I now have a virtual tip jar – so anyone who wishes to contribute towards the development of this and other cores can now do so.
I’m not planning to paywall cores or releases – that’s not my style – but as an incentive for supporters, I’ve added a “Core Supporters” page to the On-screen Menu, which I’ll use to thank by name anyone who donates £20 or more via PayPal or supports me on Patreon at the second tier.
In other news – I’ve just released the first beta – see the Turbo Chameleon 64 section elsewhere on this site.
I found out recently that there is now a second version of the Turbo Chameleon 64 cartridge for the Commodore 64. The reason for this is, apparently, that the Cyclone III FPGA that was used in the original design has been superceded and is difficult to obtain at affordable prices. For this reason Individual Computers have redesigned the cartridge to use a Cyclone 10 FPGA instead. The model chosen is essentially the same thing in a different package, so porting cores would simply be a case of recompiling with the new device and pinout as the target – except they’ve also taken the opportunity to make small improvements to the design. For this reason it now takes a little bit of work to port existing cores to the V2 hardware.
I now have an initial build of the Minimig core for V2 hardware, which is available as before on the Minimig TC64 Snapshots page.
Edit: Since the V2 hardware is likely to attract newcomers to the Chameleon platform, I should explain what to do with the two files in the snapshop archive:
The fampiga_tc64v2.rbf file is the core itself, and needs to be flashed into the Chameleon cartridge using the Chaco utility.
The OSD_CA01.sys file is the firmware for the secondary CPU core that runs the menu system and disk emulation, and needs to be written to the root directory of an SD card. The card will also need to contain a Kickstart image, named kick.rom
Another point to bear in mind is that the core doesn’t yet attempt to translate the C64 keyboard to the Amiga – so far just the run/stop key is used to toggle the OSD – so you will need a PS/2 keyboard to use the core for anything that requires keyboard input.
A few weeks ago I pushed the PSoC Creator project for my Sega-6-button-to-CD32 converter project, but anyone wishing to build a converter would need to know the pin mapping. This is defined within the Creator project, but figuring out which pins on the DB9s need to be wired to which terminals on the board would be pretty tedious – so here’s a wiring diagram for the benefit of anyone who wants to have a go.
(Please note, the board shown here is the CY8CKIT-049-42XX – the identical-looking 41XX won’t work because the chip lacks the programmable logic the project uses to create the shift register.)
I’m pleased to report that the first prototype of the PSOC4-based Sega 6-button pad to Amiga CD32 adapter is now up and running. In the process I’ve learned a lot about the PSOC4 platform, and I have to say as a development platform I really like it – I have no doubt I shall be using these devices in future projects.
In my earlier post I mentioned that I was going to handle reading the Sega 6-button joypad in software, using an interrupt routine, and use programmable logic to handle masquerading as a CD32 pad.
The six inputs from the Sega pad (up, down, left, right, button1, button2) are mapped to PSOC pins P2.0 to P2.5. Since these are adjacent, we can read and write to them easily as a single entity. We create a “pins” component with six inputs, named Sega_Inputs, and PSOC creator automatically generate headers and stubs so that we can read their status in main.c simply by calling Sega_Inputs_Read(). Similarly, we create an output pin, Sega_Select on pin P2.6, which we can write in the code using Sega_Select_Write().
One of the projects I have in mind for the PSOC4 chip on the CY8CKIT-049-42xx boards I picked up recently is an adapter to allow 6-button Sega Megadrive controllers to be used on the Amiga. I already made such a device a couple of years ago using a PIC microcontroller but never finished the project (I discovered FPGAs round about then!) and the programmable digital blocks in the PSOC4 make it an ideal platform for resurrecting the project.
Initially I shall read the Sega pad in software, using an interrupt routine, then implement the CD32-pad shift register using the programmable hardware in the PSOC4.
The original Sega Megadrive gamepad had four buttons: A, B, C and Start. The pad used a standard Atari-style 9-pin DSUB connector, and while the four directions and button B were mapped using standard Atari wiring (pins 1,2,3,4,6), button C appeared on pin 9. Most Atari-like gameport connectors have +5v available on pin 7, but the Sega variant has +5v on pin 5. Instead, pin 7 is used as a select signal, which multiplexes the pins normally occupied by the B and C buttons. When the select signal is high, B & C are readable, and when the select signal is low, the status of buttons A and Start appear on those lines instead.
When it came to adding extra buttons to the six button pad, Sega needed to find a way of multiplexing extra buttons in such a way that they didn’t cause compatibility issues. The obvious solution of making extra buttons replace the direction lines when the select signal is low wasn’t possible because the existing 3-button protocol already held the left and right lines low when select was low, presumably so software could distinguish the 3-button pad from a standard Atari-style joystick or Master System controller. Instead they went with a “magic knock” approach, in which software toggles the select line four times in quick succession. The new buttons appear on the directions during the high pulse following the third low pulse, and to identify the pad as a six button button, the direction lines are low and high for the low pulses before and after this, respectively.