schematics and PIC firmware source code?

General discussion forum - for all that doesn't fit in any other category.
Post Reply
bigmessowires
Posts: 7
Joined: Tue Oct 18, 2011 9:16 pm

schematics and PIC firmware source code?

Post by bigmessowires »

Hi! I'm working on building a similar floppy emulator for classic Macintosh computers: http://www.bigmessowires.com/2011/09/02 ... pact-macs/ I would love to learn more about how the HxC SD emulator works, and see if the ideas can be reused. Are the schematics and PIC source code available, or is it a closed design? I found the schematics and VHDL for the USB version, but couldn't find anything for the SD version except the software for the PC and the host computer.

Thanks in advance,
Steve

Jeff
Site Admin
Posts: 8093
Joined: Fri Oct 20, 2006 12:12 am
Location: Paris
Contact:

Re: schematics and PIC firmware source code?

Post by Jeff »

bigmessowires wrote:Hi! I'm working on building a similar floppy emulator for classic Macintosh computers: http://www.bigmessowires.com/2011/09/02 ... pact-macs/ I would love to learn more about how the HxC SD emulator works, and see if the ideas can be reused. Are the schematics and PIC source code available, or is it a closed design? I found the schematics and VHDL for the USB version, but couldn't find anything for the SD version except the software for the PC and the host computer.

Thanks in advance,
Steve
Hi,

I don't think that the PIC source will help you a lot since the Shugart and the Mac floppy bus are very different : On Mac you have to get register's disk drive read/write done through the CA0/CA1/CA2/LSTRB "bus". I don't know how fast it can be, but you will probably need a fast mcu, or a well thinked interrupt scheme/routine ;)
For a PIC this is maybe a solution : the fast interrupt connected to the SEL lines, CA0/CA1/CA2/LSTRB on the same port to be able to "sample" them in the same time in the fast INT subroutines and process the operation (some operation are more "urgent" than others). Just an idea since i don't have studied yet the Mac floppy access carefully... (of course all must be coded in ASM ;) )

For sure a CPLD can do the job without problem.

In fact the Mac bus remember me the special part of the x68000 extra features bus :
viewtopic.php?f=19&t=465&start=30
I am actually working on a low cost board to emulate these extra features on a shugart floppy disk drive/floppy emulator.
I will probably modify it to adapt shugart floppy disk drive/floppy emulator on Mac latter.

If you want to have look to the SD HxC schematic, open the Kit documentation.

jf

bigmessowires
Posts: 7
Joined: Tue Oct 18, 2011 9:16 pm

Re: schematics and PIC firmware source code?

Post by bigmessowires »

Jeff wrote:On Mac you have to get register's disk drive read/write done through the CA0/CA1/CA2/LSTRB "bus". I don't know how fast it can be, but you will probably need a fast mcu, or a well thinked interrupt scheme/routine
Right, that is the challenge exactly. I already have a basic version of this working in an FPGA, as part of my Plus Too homebrew Mac Plus replica: http://www.bigmessowires.com/2011/10/10 ... -mac-plus/

Now I want to build a floppy emulator that would work in a real Mac. My hope was to do it using only a microcontroller, since that would be easier for other people to build. But exactly as you said, it would require a very fast mcu, or clever use of interrupts, to make it work.

I'm probably going to design something with a mcu and CPLD working together, but I was curious to learn how HxC worked internally, since it does a similar job with only an mcu. I assume the HxC emulator doesn't have this problem, because the Shugart disk control signals are all on separate wires, instead of an addressable bus?

Jeff
Site Admin
Posts: 8093
Joined: Fri Oct 20, 2006 12:12 am
Location: Paris
Contact:

Re: schematics and PIC firmware source code?

Post by Jeff »

bigmessowires wrote:I assume the HxC emulator doesn't have this problem, because the Shugart disk control signals are all on separate wires, instead of an addressable bus?
Yes and No in the same time. Since the HxC is able to emulate, two select line must be "check". Each time a select line is changed, output lines (ready,trk00, disk change...) must be updated with the right virtual floppy disk drive status. This must be done as fast as possible, and this is not to easy.

For the head step, you need to sample the dir line during the 4us pulse...

On a 10mips MCU you have 40 cycles to make all the work :wink:

Post Reply