chipKIT® Development Platform

Inspired by Arduino™

max32 emulate vintage computer peripherals?

Created Tue, 24 May 2011 19:31:43 +0000 by scottinnh


scottinnh

Tue, 24 May 2011 19:31:43 +0000

I almost posted this under "What are you doing?", but this is more about what I want to do (and want to know if the MAX32 is capable of).

I've seen Arduino (and other platforms) emulate hardware... mice, keyboards, etc. This I understand and have done.

Do you see the MAX32 as capable (in theory) of emulating more complex hardware? For example, retro floppy drives, centronics ports, [slow] hard drives as would be used on "retro" hardware?

By "In theory" I acknowledge no one truly knows until they accomplish it. I'm trying to ask more generically, can this bridge a SD card and still have CPU leftover to bit bang the data stream into whatever format is used by some physical link?

(Specifically I am thinking about the hard drive and floppy emulation boards created by the retro computer community, for Atari and Commodore computers for example. Those projects use their own ARM or DSP solution custom soldered and programmed to the task.. no commodity boards or standard platform exists. If the MAX32 could emulate old floppy drives the way the Arduino can emulate/translate joysticks and mice, that would interest a whole new group of users!)


nkcelectronics

Tue, 24 May 2011 23:43:01 +0000

Sure it can. The SD2IEC project implements a commodore drive emulator using an ATmega644 microcontroller. The Max32 hosts a much more powerful MCU, so a lot of vintage computer peripherals emulation is possible.


scottinnh

Wed, 25 May 2011 18:17:36 +0000

Good to know that even the basic Arduino Mega can do at least floppy emulation. Surprising.

I had worried my question was too outlandish, and noobish (as it could easily be retorted, 'if you need to ask you are not ready for this')... so THANK YOU NKC :-)

I did do a bit of searching before I asked, and the projects I found used very powerful chips. Jookie's UltraSatan SD-->hard drive emulator (for the Atari ST) uses a seriously fast Blackfin 531 DSP (interesting chip... a pity the boards are so expensive).

cheers!


vintageguy

Mon, 05 Mar 2012 13:08:17 +0000

May I ask, if you went on and built this? And if you did, where are you on your project?

The reason I ask, is I got my Max32 with the same thing in mind, but am running into some unforeseen problems.


vintageguy

Fri, 13 Apr 2012 18:07:38 +0000

I have the following setup:

ChipKit Max32 + Network Shield.

The network shield provides me with the ability to use the USB has a host device, and access to network ability.

The board has some simple hardware logic, but is connected to the DMA bus of an Atari STE. I use the Parallel Master Port, to take care of the transfer. The USB is polled (at the moment).

After about a month of hard work, and lot of banging on the wall in frustration, I finally have gotten it to work properly. Weeded out the details of poor logic in my program, as well as lack of understanding of the hardware that was being used.

I can now use it, with any SCSI driver on the atari, and a thumb USB drive. I do simple translation of the READ(6) and WRITE(6) commands to their (10). Otherwise it's pretty straight forward, and test programs running on it seem to be doing fine.

The most astonishing fact, I came across is that the supposed "bad DMA chip", appears to be a myth. Although I can't claim to have broken the myth, entirely. I have been working with a "bad DMA chip" example, and bought myself another one with a good DMA chip, for reference.

What I did discover, is that the DMA channel on the atari side is "extremely" sensitive to timing. And the timing "claimed", appears to be a bit off in reality. The Max32 has some peculiarities in it's programming, and as I did the handshake in software instead of hardware, I had to tune it and spent a lot of time looking at this aspect. It is not possible to use a WHILE loop on the PIC32MX chip, as this one will quickly go beyond the timing sequence, in 1 loop.

Another bit of a problem with the Atari, is the SCSI drivers available. Most of these seem to use a hybrid DOS/TOS partitioning, that appears to have at least as much to do with the problem as a bad DMA chip does.

However, there is a SCSI network possibility, and I intend to extend the module by using the network part of it (and possibly the WiFi module), to extend a network capability to the Atari. Such a driver is already existant in the MiNT distribution.

I'd welcome some "co-op" in my ventures, if you are interrested.