Raspberry on Commodore?

Grunchy

New Member
Nov 21, 2019
7
0
1
Calgary, Alberta, Canada
This is just a hypothetical idea, based on a bunch of other ideas I'd seen (Commander 16 computer, Apple IIe on a board, Vampire daughterboard on Amiga, SuperCPU on C64 from the 1990s; and so on).
I admit I was becoming a nuisance on the Commander 16 forum insisting that the Commander would make more sense as a cartridge, for the reason that as a cartridge it could upgrade any old 8-bit Commodore you had lying around, and wouldn't take up any space anywhere.

But my new idea is to run Vice like the Playstation 2. As you may know, the PS2 is actually based on a PS1 serving all the controller info into the PS2 revised game console. The reason Sony did that is because if you ever felt like playing an original PS1 game, you could, since the PS2 is actually a PS1 at it's heart. The PS2 would merely shut down and the PS1 could take over.

I was thinking, gee I don't really want a Commander 16 cartridge at all, what I *really* would want is a Vice cartridge! And of course what already runs Vice, well that's a Raspberry Pi.

My current idea is to make a cartridge that runs like a PS1 serving resources to a PS2. The cartridge could work on anything from a Vic20 to a C128, and in Vice mode all it would do is serve all of its ports and resources (keyboard, SID voices, whatever) to the Raspberry Pi running Vice. As a cartridge it wouldn't need a "native" mode, because to do that you'd merely pull the cartridge.

Ultimately - could you imagine - you have a Vic20, but plug in a simple cartridge and now you could run as a Commander 16? Or a C128? Or a PET?
Or even better - run as an Amiga? Or all the other things, DosBox, whatever.

I guess it's a conceptually simple idea, create a cartridge that behaves like a USB hub and which serves all of the host computer's resources into one of the USB ports of the Raspberry Pi.
 

Attachments

cml37

Moderator
Staff member
May 19, 2019
161
39
28
Washington, D.C. Area
The Engineer in me says: YES! Great idea, get started!

The MBA in me says: Hold on a minute.

The project pretty much has three phases, at least as I see it:
  1. Emulator Stage
  2. Full Discrete Component Stage
  3. "Cost effective" FPGA stage

When I saw David last, I grilled him on the approach and strategy, and I believe this is his current strategy. He's concerned about "feature creep" and pointed out other projects that never get done due to it.

Could you get started on a cartridge-based project? My opinion: absolutely! Might it be best to wait until the X16 gets developed and gets mass market cache? My advice: Yes.

Like I mentioned in another thread, I think it will translate. To support development, I saw a Vera chip plugged into and demoed on a C64 first hand... and yes... it was via the cartridge port.
 

Grunchy

New Member
Nov 21, 2019
7
0
1
Calgary, Alberta, Canada
That chameleon looks pretty cool, for (what is likely to be) a closed-source solution!

I checked today and the Raspberry Pi zero W + Arduino nano could practically fit inside a c64 cartridge shell. I’m thinking Arduino so that the host keyboard becomes a USB keyboard, and the host joysticks become USB hid devices. That could be a combination of a very small machine language routine on the host feeding data to an Arduino, which in turn is communicating via USB to the Pi. The point of this is nobody has to program anything special on the Pi. Being wireless it should also work with a Bluetooth mouse.

To get hobbyist access to the serial port, user port, cassette port, and Sid chip, that would require some custom programming (that’s for Vice on the Pi, and the Arduino, and the 8-bit host).

What intrigues me most is how cheap a Pi zero + Arduino nano are, plus a simple 3D printed cartridge housing, the wiring aspect (hopefully nothing too complex), and some custom programming. Ideally a very cheap, straightforward hobbyist-level project out of simple commodity stuff & freeware programming.

To be really slick that 8-bit host program would be on an integrated rom, but really, you could load it easily off a disk and just run it, it would be a very small little program.

Boom, once it’s controlling a Pi, now you have retroarch, vice, maybe one day Commander 16.

I read online a couple specific projects: converting a c64 keyboard into a USB board, and converting an Atari-style 9-pin joystick into a USB hid device. So to me there we go, almost a very straightforward beginning. Obviously old joysticks aren’t that great for retroarch, but it’s a wireless Pi, so PS4 controllers ought to be easily possible.

Anyway thanks kindly for the words of encouragement! I might get a couple things on order and begin dabbling :)
 
May 22, 2019
504
266
63
It's certainly possible with the right hardware, but Arduino isn't really fast enough for this - you need something like a PIC32 to be able to communicate with the Commodore' 1MHz bus.

There are some PIC32 processors that are fast enough. Jim Drew is emulating a 6502 CPU in a PIC32, so it should be possible to use a PIC as a bus master to chain I/O from a Pi running VICE.
 

Grunchy

New Member
Nov 21, 2019
7
0
1
Calgary, Alberta, Canada
I think there might be a way to use the Arduino... I read an article by Frank Buss on how he used a latch chip to put some characters on a LCD screen using the expansion port as a data bus, as opposed to Dave Murray's method with the user port. In fact Frank seems to suggest that the C64 could send this information using Basic.
(I don't really know, I haven't looked into it completely yet. But it seems straightforward enough).

Frank Buss - communicate over expansion port

Mike Szczys - C64 keyboard as USB device

Maciej Witkowiak - DB9 joystick as USB device