The Dan ][ SD card disk controller

73 posts / 0 new
Last post
macnoyd's picture
Offline
Last seen: 1 day 13 min ago
Joined: Oct 15 2012 - 08:59
Posts: 764
Confused....

@profdc9,

Regarding:  " If you're going to add the Ethernet board like I show in the picture, do not populate R27/R28.  This is because I have a special "outboard" I have been working on which places the SD card slots on the outside of the computer "

OK, I get that, or at least part of it.  Your photo in this thread above shows your board with these 2 resistors missing with the Ethernet board attached.

But you go on to say: " ... because I have a special "outboard" I have been working on which places the SD card slots on the outside of the computer "

The SD Card slots are  already mounted on the  inside edge of the Version 1.1 board. What happens to those?  I don't see any correlation with those 2 resistors (R27, R28) to the SD Card slots at all, but to J6 where the Ethernet board attaches. (photo below)

Am I missing something? 

I also see you are working on a different version of the board with the SD Slots on top of the board, rather on the forward edge.

Are we talking a different board from Version 1.1?

Online
Last seen: 11 min 37 sec ago
Joined: Feb 11 2020 - 12:33
Posts: 10
ffconf.h question.

Looking at the source code for the arduino side, you have the FF_FS_TINY set to one, so shared buffers, with this already being there how much extra ram would be needed to just have 2 files on the slot 1 mounted as the 2 drives, instead of relying on 2 sd cards?

 

 

Online
Last seen: 11 min 37 sec ago
Joined: Feb 11 2020 - 12:33
Posts: 10
Ethernet... Wow that was easy.

I got my ethernet module in this week, updated the hex in my atmega, and was on the net in no time.

Anyone have a stl to mount these modules somewhere?

Thanks!

 

Offline
Last seen: 8 hours 47 sec ago
Joined: Jun 12 2022 - 23:35
Posts: 57
Ok, more news... I just added

Ok, more news...

 

I just added a program to the github called "allvols.bin" which is a ProDOS System program.  What it does is use the unused slots and drives to populate extra 32 MB volumes that are on block devices (0 or ! type devices).    There's a selection for slot 1 as the block device, slot 2 as the block device, or both (option 3) when you choose ! for slot 1.  This will point all of the extra slots and drives to more extra volumes on the SD card.

If you unzip BlankVols.zip you get a 512 MB volume that you can use a program like Win32DiskWriter to write to a SD card.  This writes 16 volumes which are named SxDx.  When you boot, only the slot in which the Dan ][ controller is will have volumes associated with it, but after you execute allvols.bin, you will get access to other 32 MB volumes on the SD card.   You can have up to 14 32 MB volumes if all of the slots and drivers are dedicate the a single SD card.

Dan

 

Offline
Last seen: 8 hours 47 sec ago
Joined: Jun 12 2022 - 23:35
Posts: 57
R27/R28 are only used by the

R27/R28 are only used by the external outboard to provide the chip select lines if the SD cards are mounted externally.  If the SD cards are mounted internally, R27/R28 should be omitted, because otherwise the CS/CS2 signals may interfere with the operation of the W5500 if the signals from CS/CS2 remain connected.

If you use the outboard to make the slots external, CS/CS2 don't reach the W5500 and don't interfere with it.

I haven't really worked on the outboard a lot yet but it would allow the sd card slots to be mounted externally, but I have already have some of the PCBs built.

 

 

Offline
Last seen: 8 hours 47 sec ago
Joined: Jun 12 2022 - 23:35
Posts: 57
dabone wrote:I got my
dabone wrote:

I got my ethernet module in this week, updated the hex in my atmega, and was on the net in no time.

Anyone have a stl to mount these modules somewhere?

Thanks!

 

I think I would like to write a ftp server for ip65, because it would be very handy to transfer data to/from the Apple.  I already wrote one for a microcontroller years ago, so I think it shouldn't be that hard.

Dan

Online
Last seen: 1 hour 9 min ago
Joined: Nov 29 2020 - 19:48
Posts: 74
Nice Work

When I first started following this thread, I thought YASDDE (Yet Another SD Disk Emulator) - Yawn.  But, now I see this is shaping up nicely with lots of interesting features.  Good Work! Keep it up.

Online
Last seen: 1 hour 40 min ago
Joined: Jul 5 2018 - 09:44
Posts: 1066
What do you think about this:

What do you think about this:

 

https://www.mouser.com/ProductDetail/WIZnet/W5500-Ethernet-Shield

 

Would that work with the A2Shield card similarly to the Dan ][ SD card with the W5500 ?

 

 

Offline
Last seen: 8 hours 47 sec ago
Joined: Jun 12 2022 - 23:35
Posts: 57
softwarejanitor wrote:What do
softwarejanitor wrote:

What do you think about this:

 

https://www.mouser.com/ProductDetail/WIZnet/W5500-Ethernet-Shield

 

Would that work with the A2Shield card similarly to the Dan ][ SD card with the W5500 ?

 

 

I get a "can not find web page you are looking for" when accessing the link. But its likely it would not work, at least without modification, because the chip select line used for the W5500 is not the default chip select line for the ATMEGA328P.

 

Online
Last seen: 1 hour 52 min ago
Joined: Dec 19 2008 - 21:01
Posts: 356
profdc9 wrote:Ok, more news..
profdc9 wrote:

Ok, more news...

 

I just added a program to the github called "allvols.bin" which is a ProDOS System program.  What it does is use the unused slots and drives to populate extra 32 MB volumes that are on block devices (0 or ! type devices).    There's a selection for slot 1 as the block device, slot 2 as the block device, or both (option 3) when you choose !

 

There is something I am missing to make raw block mode work. I can copy the files to a FAT-formatted SD card and they boot fine.

If I write Blankvols.po (512m) to the same card with Win32DiskImager, then open the volume with CiderPress and write the same files to the partitions, it won't boot. I just get "Unable to load ProDOS". What step am I missing?

 

Online
Last seen: 1 hour 52 min ago
Joined: Dec 19 2008 - 21:01
Posts: 356
rittwage wrote:profdc9 wrote
rittwage wrote:
profdc9 wrote:

Ok, more news...

 

I just added a program to the github called "allvols.bin" which is a ProDOS System program.  What it does is use the unused slots and drives to populate extra 32 MB volumes that are on block devices (0 or ! type devices).    There's a selection for slot 1 as the block device, slot 2 as the block d

 

Nevermind... I see where I have made my mistake. CiderPress does not show the volumes in order starting from S7D1.... Whoops.

 

I do still have a problem where I can't make any other partitions show up in GSOS. I can run allvols.bin, it says it added them, then it appears to reset GSOS, but no new drives appear?  Is there some way to run allvols.bin before GSOS starts up, or force a rescan?

 

Also, could you explain the "!" wide block mode a little better? How do we access those partitions from a PC?

 

 

Offline
Last seen: 8 hours 47 sec ago
Joined: Jun 12 2022 - 23:35
Posts: 57
Ethernet Jack Holder

Hello,

 

I designed a 3D printable holder for the PCB for the Ethernet Jack that allows it to be mounted on the back of an Apple ][+ or //e.  It mounts with the hole spacing the same size as a DB-25 connector.

The board slips into the holder and it held in place by a screw and nut.  Then screws are inserted through the holes from inside the Apple ][.  Washers may need to be used to provide a large enough surface to hold the screw captive on the inside.

You can find the holder STL file here:

https://github.com/profdc9/Apple2Card/tree/main/CAD

Here is a picture of the holder with the board in it:

 

Offline
Last seen: 8 hours 47 sec ago
Joined: Jun 12 2022 - 23:35
Posts: 57
rittwage wrote:rittwage wrote
rittwage wrote:
rittwage wrote:
profdc9 wrote:

Ok, more news...

 

I just added a program to the github called "allvols.bin" which is a ProDOS System program.  What it does is use the unused slots and drives to populate extra 32 MB volumes that are on block devices (0 or ! type devices).    There's a selection for slot

 

The method I use to add the slots and drives may work for ProDOS 8 only, as it directly writes to the table of devices in the ProDOS page at $BF10 to $BF3F.  This probably doesn't work for GSOS, and I don't have an Apple ][gs to figure out how to do the same trick for GSOS.

The "!" directs both Prodos Drive 1 and Drive 2 to the SD Card Slot 1, so that you can host up to fourteen 32 MB volumes from a single SD card.  I intended it so that if one wanted to host a large amount of storage (like say for a BBS) from ProDOS, 14 X 32 MB of space could be made available.  Unfortunately CiderPress doesn't support more than addressing 8 volumes on a SD card (as I don't think CFFA3000 does) so it would have to be modified to work with this mode.

 

 

Online
Last seen: 1 hour 52 min ago
Joined: Dec 19 2008 - 21:01
Posts: 356
profdc9 wrote:rittwage wrote
profdc9 wrote:
rittwage wrote:
rittwage wrote:
profdc9 wrote:

Ok, more news...

 

I just added a program to the github called "allvols.bin" which is a ProDOS System program.  What it does is use the unused slots and drives to populate extra 32 MB volumes that are on block devices (0 or ! type devices).&nbs

 

I was able to modify/customize makevols.bat to copy some existing 32M images as the D2 drives for the wide mode. I assume the default boot mode is "!" since S7D2 does show up in GSOS by default. No other partitions do, though. It would be nice to figure out how to make them appear in GSOS.

 

Offline
Last seen: 8 hours 47 sec ago
Joined: Jun 12 2022 - 23:35
Posts: 57
rittwage wrote:profdc9 wrote
rittwage wrote:
profdc9 wrote:
rittwage wrote:
rittwage wrote:
profdc9 wrote:

Ok, more news...

 

I just added a program to the github called "allvols.bin" which is a ProDOS System program.  What it does is use the unused slots and drives to populate extra 32 MB volumes that are

 

It should be possible, if the card is in slot 7, to have both slot 7 drive 1 and slot 7 drive 2 function in GSOS the same as it would in ProDOS 8.  What is not supported is overriding any of the other slots with additional volumes.  It may be also possible to add SmartPort support in the future, however, I need to read up on how to do this.  The "allvols.bin" is a hack that works for ProDOS 8.

 

Offline
Last seen: 8 hours 47 sec ago
Joined: Jun 12 2022 - 23:35
Posts: 57
Question about the performance in GSOS

I don't have an Apple ][gs, but I was curious as to how the performance is of the Dan ][ controller with the Apple ][gs.   There are seven 6502 instructions in the main loop that reads bytes from the 82c55A, and I was wondering how fast that executes at 2.8 MHz.  It might be possible to reduce that to four (getting rid of the byte read check) but it's a bit risky I think.

 

Online
Last seen: 11 min 37 sec ago
Joined: Feb 11 2020 - 12:33
Posts: 10
profdc9 wrote:I don't have an
profdc9 wrote:

I don't have an Apple ][gs, but I was curious as to how the performance is of the Dan ][ controller with the Apple ][gs.   There are seven 6502 instructions in the main loop that reads bytes from the 82c55A, and I was wondering how fast that executes at 2.8 MHz.  It might be possible to reduce that to four (getting rid of the byte read check) but it's a bit risky I think.

&

Do you have a benchmark you would like to have me run on  a ][gs?

 

 

 

Offline
Last seen: 8 hours 47 sec ago
Joined: Jun 12 2022 - 23:35
Posts: 57
Not really, I just wanted to

Not really, I just wanted to know if it was fast enough to be practically usable on the ][gs without being too slow.  Competitive with, for example, using a SCSI hard disk like those that might have been used at the time the ][gs was produced.  But if there's any benchmarks if you think would be useful that might be helpful.

Online
Last seen: 11 min 37 sec ago
Joined: Feb 11 2020 - 12:33
Posts: 10
I found one called

I found one called StressProDOSFileSystem_003.zip on Asimov.

 

I ran it on my ][gs only, (It won't run on my ][e, it says clock not found, I have no clock card for it.)

 

 

 

 

Offline
Last seen: 2 hours 12 min ago
Joined: Jun 29 2018 - 16:55
Posts: 124
profdc9 wrote:Not really, I
profdc9 wrote:

Not really, I just wanted to know if it was fast enough to be practically usable on the ][gs without being too slow.  Competitive with, for example, using a SCSI hard disk like those that might have been used at the time the ][gs was produced.  But if there's any benchmarks if you think would be useful that might be helpful.

I would be happy to benchmark one of these in a IIgs when I get around to building one. It's on my list of projects most likely for when I do a PCB fabrication order next. I have a SCSI card and MicroDrive Turbo, and floppyEMU as well all of which I could compare to this card. 

Online
Last seen: 11 min 37 sec ago
Joined: Feb 11 2020 - 12:33
Posts: 10
Here are the results using a

Here are the results using a .po mounted on my CFFA3000.

 

Offline
Last seen: 8 hours 47 sec ago
Joined: Jun 12 2022 - 23:35
Posts: 57
I'm guessing that based on

I'm guessing that based on your benchmark results that the Dan ][ is pretty slow in GS/OS.  I am surprised that fast/slow didn't make that much of a difference.  Perhaps the execution of code from the ROM slows it down too much.  It might be possible to improve the speed 50% or so, but since the 6502 handles transfering the data a byte at a time, at least three or four instructions are needed to transfer each byte, so we're probably talking 80-100 kb/sec maximum.  I'm just afraid to take out readiness checks in the code that could result in corrupted data.

 

These are the loops that could benefit the most from optimization:

 

readbytes:

    lda  $BFFA,x     ; wait until there's a byte available

    and  #$20

    beq  readbytes

    lda  $BFF8,x     ; get the byte

    sta  (buflo),y   ; store in the buffer

    iny            

    bne  readbytes   ; get next byte to 256 bytes

 

writebytes:

    lda  (buflo),y    ; write a byte to the Arduino

    sta  $BFF8,x      

waitwrite:

    lda  $BFFA,x      ; wait until its received

    bpl  waitwrite    

    iny

    bne  writebytes

 

It might be possible to not worry about the "double read" problem on the 6502, but I would be worried that it would falsely trigger the 82C55A flag so that the AVR would send another byte before the Apple ][ read it, so I have avoided this.  The price of avoiding a double read is an extra cycle.  The double read issue is why I base the reads from page $BFFx, so that the extra read happens in page $BFxx rather than $C0xx.   I could also get rid of the checks completely:

 

readbytes:

    lda  $BFF8,x     ; get the byte

    sta  (buflo),y   ; store in the buffer

    iny            

    bne  readbytes   ; get next byte to 256 bytes

 

writebytes:

    lda  (buflo),y    ; write a byte to the Arduino

    sta  $BFF8,x      

waitwrite:

    iny

    bne  writebytes

 

which would save almost thalf the cycles in the loop, but would then require the AVR to never miss a byte.  It would be painful if there were intermittent failures and data losses, so I've just avoided this and lived with the check for each byte.

I'll probably leave it as it is, but it would be possible to disable interrupts on the AVR and remove the checks in the Apple ][ and see what happens...

 

 

Pages

Log in or register to post comments