The Dan ][ SD card disk controller

470 posts / 0 new
Last post
Offline
Last seen: 2 days 9 hours ago
Joined: Jun 12 2022 - 23:35
Posts: 108
CVT wrote:Btw, here is an
CVT wrote:

Btw, here is an interesting adapter/extender I just ordered from AliExpress that might be very useful for this card: 

 

https://www.aliexpress.com/item/1005004149375152.html

 

I've actually made a board for this that I haven't had a chance to try yet.  It is another one of my projects, where I am going to make a similar card for the 8-bit ISA (PC) architecture:

 

https://github.com/profdc9/ISACard/tree/main/ExtCard

 

There is a 10 pin adapter where the W5500 ethernet attaches to, but I also broke out two more chip select lines that can be used by soldering in R27 & R28.

The board then provides the two SD card slots externally.  Also, the ethernet can also be attached externally as well.

 

If someone wants to get the board made and try it, be my guest.  I think it should work ok, but I haven't had time to try it myself yet.  If you use it, don't place cards in both the internal and external slots, as that will cause both the internal and external cards to be selected at the same time.

 

Dan

 

 

 

 

 

magnusfalkirk's picture
Offline
Last seen: 12 hours 17 min ago
Joined: Feb 18 2007 - 11:46
Posts: 325
CVT wrote:Btw, here is an
CVT wrote:

Btw, here is an interesting adapter/extender I just ordered from AliExpress that might be very useful for this card: 

 

https://www.aliexpress.com/item/1005004149375152.html

 

I have two of those that I'm using with the Dan II card. I actually got the first one, from Amazon, to use with the Floppy EMU as it made it easier to swap out the microSD card. Another benefit is the ability to use full size SD cards instead of micro. I was able to take the extension from the Floppy EMU and use it with the Dan II when I sent my Floppy EMU to the gentleman from 8BitHeaven to be put it into an old Disk II drive case.

 

I ordered the second extension about three weeks ago, so now I have both microSD card slots available outside my Apple IIe that the Dan II card is plugged into.

 

magnus

CVT
CVT's picture
Offline
Last seen: 1 hour 51 min ago
Joined: Aug 9 2022 - 00:48
Posts: 981
... aaand we have the first

... aaand we have the first eBay auction: https://www.ebay.com/itm/125633814189

Offline
Last seen: 2 days 9 hours ago
Joined: Jun 12 2022 - 23:35
Posts: 108
CVT wrote:... aaand we have
CVT wrote:

... aaand we have the first eBay auction: https://www.ebay.com/itm/125633814189

If I don't get those apples with the card, I'm leaving a bad review.

Offline
Last seen: 6 hours 25 min ago
Joined: Jul 5 2018 - 09:44
Posts: 2536
profdc9 wrote:CVT wrote:...
profdc9 wrote:
CVT wrote:

... aaand we have the first eBay auction: https://www.ebay.com/itm/125633814189

If I don't get those apples with the card, I'm leaving a bad review.

 

Might not be real fresh after being shipped...

 

MacFly's picture
Offline
Last seen: 1 week 6 days ago
Joined: Nov 7 2019 - 13:49
Posts: 442
profdc9 wrote:CVT wrote:https
profdc9 wrote:
CVT wrote:

https://www.ebay.com/itm/125633814189

If I don't get those apples with the card, I'm leaving a bad review.

If you insist on it, the seller will probably send them like this:

That would be a perfect match. You couldn't complain... And apparently the ebay seller is named "Dan". Another good match... ;-)

CVT
CVT's picture
Offline
Last seen: 1 hour 51 min ago
Joined: Aug 9 2022 - 00:48
Posts: 981
MacFly wrote:profdc9 wrote
MacFly wrote:
profdc9 wrote:
CVT wrote:

https://www.ebay.com/itm/125633814189

If I don't get those apples with the card, I'm leaving a bad review.

If you insist on it, the seller will probably send them like this:

...

I would be fine with that, as long as he takes the sticker off the apple and puts it on the EPROM. :)

Offline
Last seen: 6 hours 25 min ago
Joined: Jul 5 2018 - 09:44
Posts: 2536
MacFly wrote:profdc9 wrote
MacFly wrote:
profdc9 wrote:
CVT wrote:

https://www.ebay.com/itm/125633814189

If I don't get those apples with the card, I'm leaving a bad review.

If you insist on it, the seller will probably send them like this:

[[{"fid":"35588","view_mode":"default","field

 

If I ever put a prop like those Apples in the pics on eBay I will definitely make a note in the text that they are NOT included in the auction!  :-P

CVT
CVT's picture
Offline
Last seen: 1 hour 51 min ago
Joined: Aug 9 2022 - 00:48
Posts: 981
CT100 wrote:... Btw why is it
CT100 wrote:

...

 

Btw why is it that the edge connector of the cards is not white as well?

 

 

My understanding is that if there are no filled polygons on the F.Mask and B.Mask layers, the edge connector should be the same color as the rest of the card's solder mask. I was looking at A2Heaven's cards and I think it looks much better when the edge connector matches the card.

Offline
Last seen: 1 day 9 hours ago
Joined: Mar 7 2019 - 08:20
Posts: 64
Apple Dan ][

 Hello everyone from Ireland, I have made good few of this card and all working flawlessly if anyone is interested please let me know, price €60 + €15 postage cost. I can post worldwide for same price, tracking number will be provided. Thanks 

If you prefer eBay auction then you are welcome to bid on 

https://www.ebay.com/itm/125647471673 

 

P.S. The two Apples on the pictures are not included, it's a part of my other auction please check all my auctions. 

Offline
Last seen: 1 year 3 months ago
Joined: Dec 7 2022 - 17:29
Posts: 4
Trouble with disk images

Hi AllI recently got hold of an Apple IIe and it has one of Dan's card in it, but it's not quite - someone has taken Dans design and sold it as their own. It took me a while to track down the original here, but the design I have is identical with a tiny attribution to Dan on the bottom.

Anyway...I haven't touched an Apple II since '85..'86 - ish. At the moment all I want to do is be able to boot Total Replay, but I'm not even managing to do that.

What I have is a SD card in SD slot 1 that has had some utilites pre-loaded (in the raw block format), and in SD slot 2 I put a 4GB FAT formatted SD card. I downloaded the latest Total Replay from archive.org which is a .hdv file, so I used CiderPress to convert it to a .po, renamed it to BLKDEV01.po and put it on the SD card, put the SD card in slot 2, then when I go to boot I hit Enter, then 1 and 1 - however it always just drops to the monitor. If I hit 0 and 1, it does boot the utilities from the first SD. I have tried formatting the card as FAT32 as well, and various different combinations of numbers at the start, but the same thing happens. If anyone could help me out it would be greatly appreciated.

I also know that the firmware on the card is an older version, I am going to update that when I get a break (and time!) over Christmas. I also suspect that the firmware isn't exactly what's on Github, it might be slightly modified by the reseller - but I can't tell that for certain.

Thanks!

 

 

CVT
CVT's picture
Offline
Last seen: 1 hour 51 min ago
Joined: Aug 9 2022 - 00:48
Posts: 981
From what Dan has put in

From what Dan has put in GitHub it is not clear whether or not his hardware design is open source, so I will leave it to him to state if this is OK or not. The Arduino sketch is the only one stating that it's free to use, modify and distribute for any free or commercial application.

 

What is definitely not OK is the Apple Computer Inc. logo. This is not a dead company and it certainly has the resources to ruin you day, week, year, decade or century if someone decides that this is messing with their great legacy.

 

It doesn’t look like the hardware have been changed, so just remove the stupid stickers and upgrade with the latest EPROM firmware and Arduino sketch.

Offline
Last seen: 7 months 4 weeks ago
Joined: May 15 2020 - 17:21
Posts: 27
CVT wrote:CT100 wrote:... Btw
CVT wrote:
CT100 wrote:

...

 

Btw why is it that the edge connector of the cards is not white as well?

So, PCBWay specifically messaged me during the production that they would be unable to do this - and didn't explain why.  Not sure if it's just a shortcut or something with the files. I would have preferred it to be white on the edge connector as well, but PCBWay said it was not something they could do... Sounded odd to me, but I didn't fight it.   

I just made some of Terrence Boldt's cards as well, and got the same effect. My guess is maybe this is something specific to that vendor (PCBWay) specifically? If there's something I possibly could have done wrong I'm all ears.  I just made some boards with JLPCB for another project, so maybe I'll try a run with them. 

 

BTW, with the latest firmware and Arduino sketch the card is working with the Ramworks IIII. I also think I had a flaky 8255 in one. Wish I knew a solid way to test the 8255 but so far have just had to try swapping in and out.  

Offline
Last seen: 7 months 4 weeks ago
Joined: May 15 2020 - 17:21
Posts: 27
billlagr wrote:Hi AllI
billlagr wrote:

Hi AllI recently got hold of an Apple IIe and it has one of Dan's card in it, but it's not quite - someone has taken Dans design and sold it as their own. It took me a while to track down the original here, but the design I have is identical with a tiny attribution to Dan on the bottom.

Anyway...I haven't touched an Apple II since '85..'86 - ish. At the moment all I want to do is

Wow. Interesting specimen. Also two MicroSD logos I'm sure they're not licensed to use.. wondering what they mean by "LIRON profile".. this isn't a 3.5 controller, unless that's some really fancy new firmware. Also curious to ask the guy what the 8255 has to do with booting A2Desktop?

Yet he also omits the headers and the Arduino reset...

Weird, but interesting - especially since there's a good chance tbd creator of this is lurking in this forum. 

CVT
CVT's picture
Offline
Last seen: 1 hour 51 min ago
Joined: Aug 9 2022 - 00:48
Posts: 981
CT100 wrote:I just made some
CT100 wrote:
I just made some of Terrence Boldt's cards as well, and got the same effect.
...

 

With Terence Boldt's ProDOS card it's a different story. He intentionally made it this way by flooding the F.Mask and B.Mask layers:

 

 

If you want the edge connector to be the same color as the card, those two layers should be empty like on Dan's card:

 

 

The ummasked edge connector is more retro, but I think it only looks good on a green card. For any other color it looks odd IMHO:

 

Offline
Last seen: 1 year 3 months ago
Joined: Dec 7 2022 - 17:29
Posts: 4
CVT wrote:From what Dan has
CVT wrote:

From what Dan has put in GitHub it is not clear whether or not his hardware design is open source, so I will leave it to him to state if this is OK or not. The Arduino sketch is the only one stating that it's free to use, modify and distribute for any free or commercial application.

It took me a bit of detective work to track down this forum and the Github repo - I have no idea who or where these were produced, and I only found it because I saw the tiny attribution to Dan and googled Dan][ - which brought me here. It just happened to be in the IIe I bought, the seller said it was a BOOTI (which obviously, it isn't) but I'm not really fussed about that. It's been a looooong time since I touched one of these and have exactly 0 experience with ProDos - last time I used one it was strictly floppy based DOS3.3 (showing my age here) so I'm having a little trouble wrapping my head around that at the moment. I have some more EEPROMS and ATMega328P's around somewhere, so I'll flash those and put them in, just in case there's something different and it won't work with the official firmware - at least then I can put the older ones back in if it all goes badly

 

 

 

MacFly's picture
Offline
Last seen: 1 week 6 days ago
Joined: Nov 7 2019 - 13:49
Posts: 442
billlagr wrote:I recently got
billlagr wrote:

I recently got hold of an Apple IIe and it has one of Dan's card in it, but it's not quite - someone has taken Dans design and sold it as their own. It took me a while to track down the original here, but the design I have is identical with a tiny attribution to Dan on the bottom.

 

Concerning your boot issue: the machine is booting from slot 1. I doubt the seller of the card has modified the firmware. Put the FAT-formatted SD card with the TotalReplay image as "BLKDEV01.PO" in slot 1 (not 2). Then select "1" when configuring slot 1 of the DAN II card in its boot menu (it doesn't matter what you select for slot 2, if it has no card. Or you can move the other SD card with the block mode to slot 2 and then configure slot 2 to "0" for block mode.)

If you update the Arduino to the latest firmware, you can use FAT-formatted cards in both slots. You will probably find that much more convenient to work with.

 

Dan's design specifically mentions "CC-BY-SA 4.0". So it's clearly released under the creative commons license. Allows everyone to use and modify the design. However, it must keep the attribution - and needs to mention the license (CC-BY-SA). I can neither see the attribution, nor the license on the PCB. Indeed this whole thing looks like someone intentionally tried to be deceptive and cover what it really is. That is a really sad...

And the Apple logos... Yes, that's fine if someone did that for his own amusement. But making such a card and immediately selling it like this on ebay... Geez!

Offline
Last seen: 7 months 4 weeks ago
Joined: May 15 2020 - 17:21
Posts: 27
It amazes me (well, it really

It amazes me (well, it really doesn't) that someone would take this and try and profit off it.. Apple II enthusiasts seem like such a niche group to me, and one that you run into the same folks with. Then again, I remember the time when CFFA3000's were going for $600 on eBay.  ($225 is still a lot for that card, although it is a great card. I appreciate what Rich did as a pioneer, but when he got to autographing cards we entered crazy town. Thank goodness for projects like this!)

 

In other words - Thanks, Dan. 

CVT
CVT's picture
Offline
Last seen: 1 hour 51 min ago
Joined: Aug 9 2022 - 00:48
Posts: 981
MacFly wrote:Dan's design
MacFly wrote:
Dan's design specifically mentions "CC-BY-SA 4.0"

 

Wow, I didn't realize what that was.

 

Btw, what about the "Apple II Forever"? I really like the idea that it conveys and I want to put it on a card for the Apple II that I am working on. I know that there was a conference event by the same name in 1984.

MacFly's picture
Offline
Last seen: 1 week 6 days ago
Joined: Nov 7 2019 - 13:49
Posts: 442
Apple IIc launch conference
CVT wrote:

Btw, what about the "Apple II Forever"? ... I know that there was a conference event

 

Sure. Apple IIc launch conference. Sing along everyone! :)

https://www.youtube.com/watch?v=YcjlhFVTY50

Offline
Last seen: 5 hours 22 min ago
Joined: Jun 29 2018 - 16:55
Posts: 572
The fact it was listed as a

The fact it was listed as a BOOTi makes me even more disappointed, since those are out of production / unavailable AFAIK. Re the Apple Logo I have seen people do it before. I am -not- saying I think this guy made this card, just an example 

 

https://retrotechlyfe.com/home/ols/products/apple-iie-iigs-mockingboard-sound-card-fully-assembled-tested-working

 

Not saying it's a good idea; just that I have seen it.

 

While forum community is pretty small, lots of these machines are out there with people who don't use forums. They google or YouTube to figure out what to buy. I see this even with MIDI gear; the SC-88 is a beautiful GM synth but because everyone's cousin's youtube channel says to get a SC-55, those can sell for more than better models. I saw BOOTi devices selling for inexcusable prices too IMHO. 

 

I haven't cared too much about whether edge connectors got solder masked or not but it's neat to see them [with the mask color]. 

Offline
Last seen: 4 hours 57 min ago
Joined: Feb 27 2021 - 18:59
Posts: 471
bevel
CVT wrote:
Btw why is it that the edge connector of the cards is not white as well?

Card edge connectors are not supposed to have soldermask, and its presence could damage the socket.  PCB design software provides tools to manage the soldermask expansion window for this reason (to keep it away from features such as edge connectors).

Additionally, the lip of the edge connector is supposed to be bevelled. The cards you linked to look very poorly done.

CVT
CVT's picture
Offline
Last seen: 1 hour 51 min ago
Joined: Aug 9 2022 - 00:48
Posts: 981
robespierre wrote:Card edge
robespierre wrote:
Card edge connectors are not supposed to have soldermask, and its presence could damage the socket.  PCB design software provides tools to manage the soldermask expansion window for this reason (to keep it away from features such as edge connectors).

Additionally, the lip of the edge connector is supposed to be bevelled. The cards you linked to look very poorly done.

 

This is certainly how they made them back in the day. All my retro cards are without solder mask on the edge connector and are beveled.

 

However I also own a total of 9 modern cards for the Apple II and only 2 of them are without solder mask on the edge connector: TJ Boldt’s ProDOS card and the CFFA3000. And out of those the only one with a beveled edge connector is the CFFA3000. I have never experienced a damaged slot or a damaged card, considering that some of them I have plugged in and out more than 100 times, the Dan ][ Controller being one of them. I also don't see how an edge connector with solder mask can possibly damage a socket.

Offline
Last seen: 6 hours 25 min ago
Joined: Jul 5 2018 - 09:44
Posts: 2536
skate323k137 wrote:The fact
skate323k137 wrote:

The fact it was listed as a BOOTi makes me even more disappointed, since those are out of production / unavailable AFAIK. Re the Apple Logo I have seen people do it before. I am -not- saying I think this guy made this card, just an example 

 

https://retrotechlyfe.com/home/ols/products/apple-iie-iigs-mockingboard-sound-card-fully-assembled-tested-working

 <

 

Booti are out of production.  I have several that I'm going to be listing on eBay that I imported before David quit making them.  I sold one on there a while back but I've been too busy lately to deal with selling.

 

 

 

macnoyd's picture
Offline
Last seen: 2 days 5 hours ago
Joined: Oct 15 2012 - 08:59
Posts: 836
Do you have the last version of GAL code

Do you have the last release of GAL code for the booti that you can share?  I have an older card that needs to be updated.

Thanks in advance.

Offline
Last seen: 1 year 3 months ago
Joined: Dec 7 2022 - 17:29
Posts: 4
MacFly wrote:billlagr wrote:I
MacFly wrote:
billlagr wrote:

I recently got hold of an Apple IIe and it has one of Dan's card in it, but it's not quite - someone has taken Dans design and sold it as their own. It took me a while to track down the original here, but the design I have is identical with a tiny attribution to Dan on the bottom.

 

Concerning your boot issue: the machine

So I had a little spare time, dug out my spare ATMegas, my EPROM programmer and all I had were some 27C64 EPROMS spare, so I flashed the ATMega, the EPROM, put them in and they worked fine. One thing though I didn't notice, was that in the earlier (modified? Non-official?) firmware that instead of the Dan][ Press RTN message, it said something like "Press Enter for Config" with ENTER flashing/inverse - so unless that was the older boot message (which I don't think it was), someone has also gone to the effort of removing the reference to Dan][ in the firmware.

CVT
CVT's picture
Offline
Last seen: 1 hour 51 min ago
Joined: Aug 9 2022 - 00:48
Posts: 981
billlagr wrote:So I had a
billlagr wrote:
So I had a little spare time, dug out my spare ATMegas, my EPROM programmer and all I had were some 27C64 EPROMS spare, so I flashed the ATMega, the EPROM, put them in and they worked fine. One thing though I didn't notice, was that in the earlier (modified? Non-official?) firmware that instead of the Dan][ Press RTN message, it said something like "Press Enter for Config" with ENTER flashing/inverse - so unless that was the older boot message (which I don't think it was), someone has also gone to the effort of removing the reference to Dan][ in the firmware.

 

I would also replace the SN74HC00 chip with either 74LS00 or 74HCT00. The 74HC series are not TTL compatible.

 

If you still have the modified firmware, could you please post it?

MacFly's picture
Offline
Last seen: 1 week 6 days ago
Joined: Nov 7 2019 - 13:49
Posts: 442
Changing the boot message in

Changing the boot message in the firmware is trivial. I'm still accepting any bets that the guy didn't change anything else though. All he was interested in was removing all traces showing what the card really was.

Where did you get that card - or the machine which had this? If this was on ebay, can you post a link to the offer - or at least to the seller?

I guess whoever invested the effort to cover all traces, didn't do it for just one card - but is selling several of these. I'm sure we're going to hear about more of these...

Offline
Last seen: 5 hours 22 min ago
Joined: Jun 29 2018 - 16:55
Posts: 572
MacFly wrote:Changing the
MacFly wrote:

Changing the boot message in the firmware is trivial. I'm still accepting any bets that the guy didn't change anything else though. All he was interested in was removing all traces showing what the card really was.

Where did you get that card - or the machine which had this? If this was on ebay, can you post a link to the offer - or at least to the seller?

I guess whoever invested t

 

I second all of this.

 

Unrelated, if anyone stateside has an extra card or kits worth of parts, let me know. I have tons of stuff/kits to trade or just good old US$. I have too many other completed or in progress projects with extra parts to want to start this project from scratch with gerbers and the BOM at the moment. 

Offline
Last seen: 6 hours 25 min ago
Joined: Jul 5 2018 - 09:44
Posts: 2536
macnoyd wrote:Do you have the
macnoyd wrote:

Do you have the last release of GAL code for the booti that you can share?  I have an older card that needs to be updated.

Thanks in advance.

 

No, as far as I know David never released any version of the GAL code for the Booti due to unauthorized cloning of his earlier boards.  The only place to get a GAL with the upgraded code would be directly from him.  I am pretty sure he would never release the code.

 

Offline
Last seen: 6 hours 25 min ago
Joined: Jul 5 2018 - 09:44
Posts: 2536
cryu wrote: I somehow managed
cryu wrote: I somehow managed to break my AVR ISP, and thus had to get creative in order to flash the new AVR microcode via my TL-866 under Linux. If anyone else runs into the same issue, here's how it's done: [list] [*] Compile and export the microcode in the Arduino IDE via "Sketch / export compiled binary" [*] Execute "minipro -p 'ATMEGA328P@DIP28' -c code -w Apple2Arduino.ino.standard.hex -f ihex

 

A note for anyone who is using the Open Source minipro utility to program ATMEGA 328p...  If you get a fail to verify, try erasing the chip first with this:

 

"minipro -p ATMEGA328P@DIP28 -E"

 

Also, the fuses.cfg given earlier in this thread didn't work for me...  but this should...

 

lfuse = 0xffhfuse = 0xdeefuse = 0xfdlock = 0xfffuses_lo = 0xfffuses_hi = 0xdefuses_ext = 0xfdlock_byte = 0xff

 

One thing that was really useful about cryu's post I quoted above is the "-f ihex" flag for minipro...  That makes it take an Intel Hex file...  Wish I had known about that before!  I went to a lot of trouble to find a utility to convert .hex to .bin (hex2bin) when I was working on programming EPROMs for the Apple-1 EPROM card.  I probably didn't need to do that conversion, I could have just used the flag and the .hex file.  Ah well...

 

Offline
Last seen: 4 months 3 weeks ago
Joined: Feb 6 2021 - 03:34
Posts: 55
Also, the fuses.cfg given

Also, the fuses.cfg given earlier in this thread didn't work for me...

Ah, right. Different versions of the minipro utility use different syntax for various bits, including the Atmel fuse configuration.

Having both the old and the new syntax in the file should cover all bases (the values themselves are the same, only the keywords differ):

lfuse = 0xff
hfuse = 0xde
efuse = 0xfd
lock = 0xff

fuses_lo = 0xff
fuses_hi = 0xde
fuses_ext = 0xfd
lock_byte = 0xff

I'll gin up a pull request to get this fixed. Thanks for pointing that out Smile

(also, thanks for pointing out a typo in the actual burn command -- that -e means "do not erase device". Remove that, and you don't need to run it with a separate -E. I'll add that to the pull request as well)

Offline
Last seen: 2 days 9 hours ago
Joined: Jun 12 2022 - 23:35
Posts: 108
I just got a merge request

I just got a merge request for the fuse changes, I'll approve it shortly.

Of course I would like my work to be acknowledged.  But other hardware can not be reproduced because parts were kept secret, and I didn't want that to be the fate of this design.  So I have to accept the inevitable pirating of the design despite the violation of the license terms.  One of the main reason I use Creative Commons and the zlib software license on my projects is because they allow commercial sales (but require attribution), but open source licenses also generally disclaim liability (no warranty).  One doesn't want to try to release something as a benefit to the public and then be served by a lawsuit from someone who wants a payday.  The Creative Commons nonprofit should have an interest in making sure that the terms of their license are respected, including the disclaimer of warranty. 

Anyways I'm glad it's being enjoyed.  That's the best satisfaction one could want.

 

CVT
CVT's picture
Offline
Last seen: 1 hour 51 min ago
Joined: Aug 9 2022 - 00:48
Posts: 981
Btw, is there an advantage of

Btw, is there an advantage of having the microSD slots stick out of the card by 2 mm? I am designing an Apple II card that has one microSD slot in the same location as the upper slot on your card. Initially I placed it to stick out exactly the same way, but now I am thinking that it might be better to align it with the edge of the card.

MacFly's picture
Offline
Last seen: 1 week 6 days ago
Joined: Nov 7 2019 - 13:49
Posts: 442
Clearing PCB edges
CVT wrote:

Btw, is there an advantage of having the microSD slots stick out of the card by 2 mm?

The datasheet of connectors/slots (and the KiCad designs) often show a line to indicate, how it should be placed in relation to the PCB edge. They are, however, designed to provide enough clearance, so the SDs can still be depressed when the PCB is installed in some kind of enclosure/behind some front-panel.

This is not needed for this card - so you could place it slightly further from the edge, then normally recommended. Just make sure the MicroSD still clears the PCB edge in its depressed state. Otherwise swapping cards becomes rather akward. :-)

Offline
Last seen: 5 hours 22 min ago
Joined: Jun 29 2018 - 16:55
Posts: 572
A big thanks to @dabone for

A big thanks to @dabone for helping me add this card to my collection. He sent me a very nice assembled card for a fair price, saving me yet abother box of 7-9 unused PCB's in my house lol.

Also, it booted right up in the Laser 128, if anyone was wondering. 

Offline
Last seen: 6 hours 25 min ago
Joined: Jul 5 2018 - 09:44
Posts: 2536
Sweet! 

Sweet!

 

Offline
Last seen: 3 days 19 hours ago
Joined: Feb 11 2020 - 12:33
Posts: 27
Investing in a large

Investing in a large ultrasonic cleaner was the best present I ever bought myself for building pcbs. Hope you enjoy it, profdc9 keeps making it better and better.

Offline
Last seen: 5 hours 22 min ago
Joined: Jun 29 2018 - 16:55
Posts: 572
dabone wrote:Investing in a
dabone wrote:

Investing in a large ultrasonic cleaner was the best present I ever bought myself for building pcbs. Hope you enjoy it, profdc9 keeps making it better and better.

I'll definitely enjoy it, thank you. Always nice to see good solder work. No ultrasonic cleaner here, but I finally got a good logic analyzer and oscilloscope this year. 

 

Unrelated,  but I noticed you worked on a former project when I was reading the source code for / working with the P-Lab Appledore keyboard adapter. Today I finished adapting that to use a C64 keyboard on my z80 rc2014. Small world!

Offline
Last seen: 1 year 3 months ago
Joined: Dec 7 2022 - 17:29
Posts: 4
CVT wrote:billlagr wrote:So I
CVT wrote:
billlagr wrote:
So I had a little spare time, dug out my spare ATMegas, my EPROM programmer and all I had were some 27C64 EPROMS spare, so I flashed the ATMega, the EPROM, put them in and they worked fine. One thing though I didn't notice, was that in the earlier (modified? Non-official?) firmware that instead of the Dan][ Press RTN message, it said som

I do have the EEPROM- I didn't overwrite it just in case it all went badly and needed to put it back, so as soon as I get some time I'll put it in my EPROM programmer and grab a dump of the contents. 

magnusfalkirk's picture
Offline
Last seen: 12 hours 17 min ago
Joined: Feb 18 2007 - 11:46
Posts: 325
Finally installed the Dan ][

Finally installed the Dan ][ in my Apple IIe that I picked up for free in Dayton, Oh the beginning of Sep. Tried using the extensions that I mentioned in post 153 but no dice. Anyway when I have a Micro-SD installed the Dan ][ will boot which ever of the 9 disk images I have on the card. A weird thing I noticed is if I don't press return, just let the computer boot normally, it still boots the last image I told the Dan ][ card to boot, instead of moving on and booting from slot 6.

 

If I remove the Micro-SD from the Dan ][ and turn the computer on I get this:

 

0803-       A=28  X=F8  Y=06  P=35  S=F8

 

I'm guessing that it has drooped me into the monitor but I don't understand why. I thought that if there was no Micro-SD card in the Dan ][, or if you didn't press return with the Micro-SD cards in it, It was supposed to continue to slot 6 looking for something to boot. Any help will be appreciated.

 

 

CVT
CVT's picture
Offline
Last seen: 1 hour 51 min ago
Joined: Aug 9 2022 - 00:48
Posts: 981
The Dan ][ Controller saves

The Dan ][ Controller saves your last boot selection in the internal EEPROM of the ATmega328P, which I think is a very desirable feature.

 

Right now there is no code in the Arduino firmware to gracefully handle no microSD card in slot 1, so it just causes jump into Monitor. I think if there are no cards in any of the two slots, it will be awesome if it simply skipped booting the card as if you pressed ESC. However I am not sure this feature can be easily implemented without a change in the PCB. Right now pin 9 (card detect) of the microSD slots is not connected to anything, so there is no way for the firmware stored in the 27C128/28C256 chip to tell if the slots are empty. Only the ATmega328P can determine that indirectly (by failing to mount a filesystem), but I am not sure if boot skipping is possible that late in the game.

magnusfalkirk's picture
Offline
Last seen: 12 hours 17 min ago
Joined: Feb 18 2007 - 11:46
Posts: 325
Found a way around the Dan ][ problem

I found a way around the problem I was having with the Dan ][. I was looking at the Apple II software I have on my Mac and wondering if something there might help. I went into the folder that I have for Applications and saw the Desktop software folder. Decided to look in there and saw Apple II Desktop.PO.

 

So I took that image, renamed it to BLKDEV01.PO and replaced the other BLKDEV01 on the Micro-SD card. Put it onto the Dan ][ and booted the computer. It brought up the Apple II Desktop and then I heard both disk 1 and ddisk 2 briefly start up.  I tried using the Flight Stick I had plugged in to move the mouse, no joy so I turned the computer off. There is an Apple Mouse card in the computer and seversl years ago I bought a mouse for the Apple //c+. So I found the mouse I bought for the //c+, plugged it into the Apple Mouse card and  booted the computer again. Back to the Desktop, Disks in slot 6 briefly started. Moved the mouse and the mouse pointer responded. Scrolled over to Startup and down to Slot 6. The computer responded by booting the copy of PrintMaster that I had in drive 1.

 

So now I have a way to run any of the 32mb images on the Micro-SD in the Dan ][ or be able to boot something from the drives attached to slot 6.

CVT
CVT's picture
Offline
Last seen: 1 hour 51 min ago
Joined: Aug 9 2022 - 00:48
Posts: 981
Or you can simply hit the ESP

Or you can simply hit the ESC key while the "DAN ][ PRESS RTN" message is shown and you'll achieve the same result.

MacFly's picture
Offline
Last seen: 1 week 6 days ago
Joined: Nov 7 2019 - 13:49
Posts: 442
CVT wrote:Right now there is
CVT wrote:

Right now there is no code in the Arduino firmware to gracefully handle no microSD card in slot 1, so it just causes jump into Monitor.

 

The Arduino side of the firmware is actually already handling it. A "read" returns an error code when the selected image (or the entire SD card) is not present. The reason why a missing image/SD-card crashes to monitor is in the tiny ROM firmware for the 6502 side.

The ROM simply sets $0800 as the target buffer address, then pushes the same address to the stack - and jumps (continues) into the block loading routine. The routine then loads a 512 byte block to the target buffer ($800) and "returns" with "carry clear" on success, and "carry set" on error. However, since address $800 was pushed to the stack as the "return" address, the routine always jumps to the location of the just loaded boot block. So, when the load routine returns with an error (no SD card, missing image file...), then it just jumps to an invalid memory area and crashes.

 

 

You could simply replace the "pha / tya / pha" with a

    JSR start       ; call routine to load a 512 byte block

    BCS BOOT_ERROR  ; on error: branch...

    JMP $800        ; on success: jump to the boot block

BOOT_ERROR:

  ... some error handling...

 

It's easy - well, in theory... The tricky part is to squeeze it into the tiny 256byte ROM page. The "pha / tya / pha" only required 3 bytes. That's as much as a "JSR start" alone already consumes. The current firmware has only 3 bytes left in the 256byte page. You could probably squeeze another two bytes, so free up just enough to also fit the "BCS ... / JMP $800". But then you still needed space to handle the actual error (display something etc). Probably could be done. But not quite so simple. A nice task for someone interested in optimizing 6502 assembler down to the very last byte (starting with code, which is already well optimized... :) ).

CVT
CVT's picture
Offline
Last seen: 1 hour 51 min ago
Joined: Aug 9 2022 - 00:48
Posts: 981
An error would be nice, but

An error would be nice, but not really that useful. Is it possible to instead skip booting the card and go on to the next card, like when the ESC key is hit during the initial boot message?

MacFly's picture
Offline
Last seen: 1 week 6 days ago
Joined: Nov 7 2019 - 13:49
Posts: 442
Sure, the firmware could

Sure, the firmware could simply do a "BCS bootslot" to branch to the existing label where it proceeds with scanning for other boot ROMs - just as it does when pressing ESC.

However, my apologies, of course a "JSR start" is not allowed in the ROM firmware. The card can be plugged into different slots, so the ROM address varies. No absolute jumps within the ROM allowed... With the 65C02 of the enhanced machines that'd be simple (using a relative branch to call the subroutine: "BSR start"). That would even save one byte and just fit into the ROM. But the DAN2 card should also work with plain 6502s (Apple IIs)... That's a further complication, requiring even more bytes. Even more tricky to squeeze this into the ROM...

Another idea/kludge is to indeed "fix" the issue on the Arduino side: if the Arduino sees that the very first block read request after startup is for block 0 (the boot block) and the target address is $0800 (which it also sees), it could indeed not return an error - even if the disk/image did not exist. Instead of the error it could then return a fixed 512 byte block with an error handling routine: e.g. briefly show "MISSING SDCARD / SD IMAGE" and then jump back to the Apple II ROM's slot scanner ("JMP SLOOP"). That could be done fairly easily. The ATMEGA328 still has enough flash space. But it's a hack. Not sure if Dan would like this...

S.Elliott's picture
Offline
Last seen: 7 hours 10 min ago
Joined: Jun 23 2022 - 16:26
Posts: 205
Booting originates from the PWRUP routine
CVT wrote:

An error would be nice, but not really that useful. Is it possible to instead skip booting the card and go on to the next card, like when the ESC key is hit during the initial boot message?

No doubt it would be possible for a card to return control to the PWRUP routine to search for the next boot device via a JMP to SLOOP.  But I don't know if there's any existing card that does that...yet.  Critically, it would only work at boot -- if a card was started via PR# or IN# then it would not be safe to JMP to SLOOP.

 

Here is the routine that searches for a boot device in the Autostart ROM:

PWRUP ruotine in Autostart ROM

faa6: 20 60 fb     PWRUP       jsr     APPLEII

faa9: a2 05        SETPG3      ldx     #$05            ;set page 3 vectors

faab: bd fc fa     LFAAB       lda     PWRCON-1,x      ;with cntrl B adrs

faae: 9d ef 03                 sta     BRKV-1,x        ;of current BASIC

fab1: ca                       dex

fab2: d0 f7                    bne     LFAAB

fab4: a9 c8                    lda     #$c8            ;load hi slot +1

fab6: 86 00                    stx     LOC0            ;SETPG3 must return X=0

fab8: 85 01                    sta     LOC1            ;set ptr H

faba: a0 07        SLOOP       ldy     #$07            ;Y is byte ptr

fabc: c6 01                    dec     LOC1

fabe: a5 01                    lda     LOC1

fac0: c9 c0                    cmp     #$c0            ;at last slot yet?

fac2: f0 d7                    beq     FIXSEV          ;yes and it cant be a disk

fac4: 8d f8 07                 sta     MSLOT

fac7: b1 00        NXTBYT      lda     (LOC0),y        ;fetch a slot byte

fac9: d9 01 fb                 cmp     DISKID-1,y      ;is it a disk ??

facc: d0 ec                    bne     SLOOP           ;no so next slot down

face: 88                       dey

facf: 88                       dey                     ;yes so check next byte

fad0: 10 f5                    bpl     NXTBYT          ;until 4 checked

fad2: 6c 00 00                 jmp     (LOC0)

 

To safely JMP to SLOOP, a card would need to verify that it was called from the PWRUP routine:

  • Verify that location $00 contains #$00
  • Verify that location $01 contains the card's IOSELECT address (eg: #$C7 if the card is in slot 7)
  • Verify that the MSLOT location at $07F8 contains the same value as memory location $01

 

Candidly, I already planned to attempt this in custom firmware to allow my AP-64 card to run a custom routine at power-up, then to pass control to the next boot device.  But if anyone has already created a good method, then I would rather adapt their method.

CVT
CVT's picture
Offline
Last seen: 1 hour 51 min ago
Joined: Aug 9 2022 - 00:48
Posts: 981
S.Elliott wrote:No doubt it
S.Elliott wrote:
No doubt it would be possible for a card to return control to the PWRUP routine to search for the next boot device via a JMP to SLOOP.  But I don't know if there's any existing card that does that...yet.

 

The CFFA3000 card does that if the USB and the CF slots are both empty.

MacFly's picture
Offline
Last seen: 1 week 6 days ago
Joined: Nov 7 2019 - 13:49
Posts: 442
S.Elliott wrote:No doubt it
S.Elliott wrote:

No doubt it would be possible for a card to return control to the PWRUP routine to search for the next boot device via a JMP to SLOOP.  But I don't know if there's any existing card that does that...yet.

The DAN2 card does that - already. We discussed it here in October, when we introduced this. The tjboldt Prodos ROM card then also adopted this feature.

It is safe, since

a) the DAN2 boot routine only gets executed by the PWRUP routine, when it detects the DAN2's valid ROM signature.

b) the DAN2 ROM does not mess with any of the zero-page registers used by PWRUP. So jumping to SLOOP behaves just as if PWRUP had not detected a valid ROM signature in the DAN2's slot in the first place. So, it simply contiunes with searching the next slot.

 

Pages

Log in or register to post comments