dschmenk / PLASMA

Proto Language AsSeMbler for All (formerly Apple)
MIT License
189 stars 26 forks source link

Testing on platinum enhanced Apple //e #16

Closed erangell closed 6 years ago

erangell commented 7 years ago

Hello all, There are slight differences in the hardware of the platinum //e documented in Apple //e Tech Note 9: http://www.1000bit.it/support/manuali/apple/technotes/aiie/tn.aiie.09.html

See this blog post for the issue I believe I am having where I think the Arduino is not catching the C040 strobe fast enough:

http://erangellcomblog.azurewebsites.net/2017/07/03/staycation-hackfest/

I'll continue experimenting with the source code to see if I can track down what's happening. These are the only changes I made to my copy of AppleSlave.ino

// do not Include RTC library

define FAST_BUF_XFER // Buffer transfer with interrupts OFF in a polling loop

//do not define TRISTATE_OUTPUT // Tristate output when not asserted

include

const int sdSSpin = 4; // 4 for SD card on ethernet shield, 10 for SD card data logger shield

Thanks in advance for any help. Eric

erangell commented 7 years ago

The SPI interface between the Arduino and the SD shield may be using the following pins: 8, 10, 11, 12, 13 I tried moving the MOSI signal from the Apple //e from pin 8 to pin 9, and adding a line to set the pinmode of pin 10 to Output (in case the FAT library is using an internal SPI library), but it still did not change the behavior.

My version of the code is here: https://github.com/erangell/Arduino/tree/master/AppleSlave

dschmenk commented 7 years ago

Hi Eric-

I actually developed on a Platinum //e so I think it should work for you. Perhaps we an identify just what isn't making a connection by simplifying things. First, which SD shield are you using? I might be easier to remove it from the equation and get basic communication going before tackling the SD shield (in case it conflicts with pins we are using). Go back to the original pin mapping - I skip the Arduino API and read/write directly to the port registers, then add some debug code to print something out the serial port when a transaction occurs.

Now, are you using the code from the SDFAT.PO disk image or building it from the PLASMA source tree? The code in the disk image is a little older but pretty solid. The source tree is newer (supports the IIGS) but hasn't been tested as much.

In the AppleSlave Arduino project, add something like:

    if (cmd >= 0)
    {
        Serial.print("Cmd:");Serial.println(cmd);

in the loop function to see if/what the Arduino sees over the pins.

Try that and let's see where to go from there.

Dave...

erangell commented 7 years ago

Thank you very much for these suggestions Dave. I will work on it when I have the time. I am testing using an Ethernet shield, so I will next try building the disk image from the source. Thank you for your great contributions to the Apple ][ community. If you think about it, people who worked within the constraints of 8 bit programming have the knowledge and discipline needed today for building reliable embedded systems and iOT devices. Eric

dschmenk commented 6 years ago

Eric, I'm going to close this out. I've tested all the code on my platinum //e and seems to work very solidly. If you're still having trouble, perhaps we can track it down further.

Dave...

felge1966 commented 4 years ago

I am looking for that SDFAT.PO disk image for building the A2SdFat! http://schmenk.is-a-geek.com/wordpress/?cat=11 Unfortunately it cannot be found. Where can I still find it.

erangell commented 4 years ago

Hello. I think David merged in the code that was on the disk images in the latest version of Plasma. I have an old fork of this repo that has the disk images here: https://github.com/erangell/PLASMA I have it working with a Data Logger shield, shown in this photo:

20200414_080805

Good luck!

felge1966 commented 4 years ago

I found it and would like to thank you for your support.