The Dan ][ SD card disk controller

488 posts / 0 new
Last post
magnusfalkirk's picture
Offline
Last seen: 4 hours 19 min ago
Joined: Feb 18 2007 - 11:46
Posts: 335
Your Dan ][ card may do that

Your Dan ][ card may do that but mine doesn't. I just tried my card again without a Micro-SD card in it. It didn't continue the boot routine it just dropped into the monitor with the exact same thing on the screen that I posted earlier. CVT said to press the ESC key when  booting the computer and it would ignore the Dan ][ card. That didn't work either. So, at least for me, the easiest thing to do is what I found and posted about after posting the comment about the problem. I have Apple II Desktop installed on the Micro-SD as BLKDEV01.PO. From there I just use the mouse I have hooked up to the IIe to scroll to Startup in the menu and select Slot 6. The computer then boots the 5.25 drive.

 

It may take a few seconds more on my part to get the program in the 5.25 to run but I'm perfectly happy with it. As I commented above at least this way I can run one of the 32mb images on the card or something in the 5.25 drives.

Offline
Last seen: 9 hours 58 min ago
Joined: Jun 29 2018 - 16:55
Posts: 590
magnusfalkirk wrote:Your Dan
magnusfalkirk wrote:

Your Dan ][ card may do that but mine doesn't. I just tried my card again without a Micro-SD card in it. It didn't continue the boot routine it just dropped into the monitor with the exact same thing on the screen that I posted earlier. CVT said to press the ESC key when  booting the computer and it would ignore the Dan ][ card. That didn't work either. So, at

I may perhaps be stating the obvious or irrlelevant, but have you updated the card itself since obtaining it? 

CVT
CVT's picture
Offline
Last seen: 42 min 43 sec ago
Joined: Aug 9 2022 - 00:48
Posts: 1168
Yes, hitting ESC to skip

Yes, hitting ESC to skip booting and hitting SPACE to list the images of the microSD cards are two new features that were added only recently. You need to update both the EPROM chip firmware and the ATmega328 chip with the latest Arduino sketch.

magnusfalkirk's picture
Offline
Last seen: 4 hours 19 min ago
Joined: Feb 18 2007 - 11:46
Posts: 335
CVT wrote:Yes, hitting ESC to
CVT wrote:

Yes, hitting ESC to skip booting and hitting SPACE to list the images of the microSD cards are two new features that were added only recently. You need to update both the EPROM chip firmware and the ATmega328 chip with the latest Arduino sketch.

 

So how do I do that? Hopefully it's something fairly simple.

 

CVT
CVT's picture
Offline
Last seen: 42 min 43 sec ago
Joined: Aug 9 2022 - 00:48
Posts: 1168
All the instructions are

All the instructions are posted within the first 3 pages of this topic.

CVT
CVT's picture
Offline
Last seen: 42 min 43 sec ago
Joined: Aug 9 2022 - 00:48
Posts: 1168
magnusfalkirk wrote:CVT wrote
magnusfalkirk wrote:
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.

...

 

Today I received mine and for some reason they don't work with the Dan ][ Controller. They are not defective, since both of them work on my laptop and on the ESP32 SoftCard that I am developing. However when I plug them in the Dan ][ Controller I cannot even see the files when I hit space.

 

It even doesn't work if I have the microSD card in slot 1 without an extender and just an empty extender in slot 2.

MacFly's picture
Offline
Last seen: 13 hours 4 min ago
Joined: Nov 7 2019 - 13:49
Posts: 484
CVT wrote:Today I received
CVT wrote:
Today I received mine and for some reason they don't work with the Dan ][ Controller. They are not defective, since both of them work on my laptop and on the ESP32 SoftCard that I am developing.

Sounds like it was picking up interference through the long leads when plugging the adapter. These adapter seem to be nothing else than SD slots with long extension leads. All signals, except the CS (chip select), are shared between the two slots - so, if there was an interference issue, it would easily affect both slots at the same time. The DAN II card uses simple resistor voltage dividers to convert the 5V TTL output of the ATMEGA to the 3.3V required for the SD cards (4k7 / 10k). So, these signals are not too strong and could be affected by interference. One could try to replace these resistors to make the signal a little stronger (like 470 Ohm / 1K).

Otherwise the adapter that Dan prepared would probably work better. It uses voltage dividers for the data signals on the adapter board, so the leads to the SD slot (after the divider) are still kept short. And, in fact, his external adapter already uses a 470 Ohm / 1KOhm voltage divider - so this design also uses stronger signals for the SD card. However, the CS and CS2 signals still uses 4K7 and 10K divider - and the 4k7 resistor is on the DAN 2 card (R27/R28). So this signal may still be affected by the same interference issue, like when using the AliExpress adapter.

ko9
Offline
Last seen: 1 year 10 months ago
Joined: Jan 9 2023 - 15:39
Posts: 1
runtime

dumb question from me: does the card work runtime as with my 6502 retro BBS system??

CVT
CVT's picture
Offline
Last seen: 42 min 43 sec ago
Joined: Aug 9 2022 - 00:48
Posts: 1168
MacFly wrote:Sounds like it
MacFly wrote:
Sounds like it was picking up interference through the long leads when plugging the adapter. 
...

 

I completely wrapped one of the extenders with aluminum tape and grounded it, but it did not help, so if it’s due to interference it must be from one of the other lines in the ribbon. I will try with harder driving voltage divider resistors later.

 

I should have ordered more, so I can start cutting them with scissors and see exactly when the problem disappears, but I only got two and I rather like them, so I can’t do any destructive testing.

 

P.S. It turns out that these extenders have a 330 ohm internal pull up resistor between CLK and VDD. I am thinking of changing R9 from 470 to 47 ohms and R15 from 1K to 100 ohms.

Offline
Last seen: 1 week 19 hours ago
Joined: Jun 12 2022 - 23:35
Posts: 111
Don't change to 47/100 ohms

Don't change to 47/100 ohms as that will probably draw too much current from the ATMEGA328P.  I think you will have to remove the pullup.

It's unlikely to be interference that is causing the problems.  The CS line uses 4k7/10k rather than 470R/1k dividers because the signal is relatively slow and doesn't require very fast transitions, unlike the CLK/MISO/MOSI lines.

I made an extender board that I haven't tried yet, but that would work as well.  R27 and R28 should be populated with 4k7 resistors on the main board if this is to be used.

 

 

CVT
CVT's picture
Offline
Last seen: 42 min 43 sec ago
Joined: Aug 9 2022 - 00:48
Posts: 1168
I didn't have 47/100 in my

I didn't have 47/100 in my spares, but I changed R9/R15 to 80/160 ohms and it now works perfectly with both extenders. This should not draw more than 25 mA according to my calculations, which is still below the maximum of 40 mA for the 328P chip.

 

Offline
Last seen: 1 year 2 months ago
Joined: Feb 7 2023 - 06:17
Posts: 2
 Hi Do you have a PDF of this

 

Hi 

Do you have a PDF of this board layout as I cannot find an updated BOM and placement file?

 

MacFly's picture
Offline
Last seen: 13 hours 4 min ago
Joined: Nov 7 2019 - 13:49
Posts: 484
What are you looking for - a

What are you looking for - a description showing the component placement? The photo of the PCB should help: https://raw.githubusercontent.com/profdc9/Apple2Card/main/pics/picver1.jpg

 

Otherwise, here's an image of the KiCad PCB showing the placement of components. If you're using KiCard directly, pay attention with the pullup resistors for the address lines (near the EPROM) though: the KiCad PCB design in GitHub still shows "4K7" pullups, while the schematic was updated to use "10K" pullups instead (10k is the better choice).

 

 

 

CVT
CVT's picture
Offline
Last seen: 42 min 43 sec ago
Joined: Aug 9 2022 - 00:48
Posts: 1168
MacFly wrote:What are you
MacFly wrote:

What are you looking for - a description showing the component placement? The photo of the PCB should help: https://raw.githubusercontent.com/profdc9/Apple2Card/main/pics/picver1.jpg

...

 

This is not the correct photo, because it is version 1.0. My suggetion to Dan is to remove it from README.md in GitHub and update it to verson 1.1 of the card, since it has confused many people causing them to solder incorrect resistors.

 

Also for anyone making the card at home: always use KiCad to generate the BOM and look at the layout, instead of relying on images and PDFs.

 
 
Offline
Last seen: 1 year 2 months ago
Joined: Feb 7 2023 - 06:17
Posts: 2
MacFly wrote:What are you
MacFly wrote:

What are you looking for - a description showing the component placement? The photo of the PCB should help: https://raw.githubusercontent.com/profdc9/Apple2Card/main/pics/picver1.jpg

 

Otherwise, here's an image of the KiCad PCB showing the placement of components. If you're using KiCard di

Thanks, sorry new to this Forum and should have done a quote reply.

 

Yes, I wanted a BOM and placement file for V1.1 as going through the GitHub was confusingand is still showing the V1.0 board in the readme file. 

Thanks again

 

 

 

 

MacFly's picture
Offline
Last seen: 13 hours 4 min ago
Joined: Nov 7 2019 - 13:49
Posts: 484
Volume Selector Menu

I made a few changes to the selector menu of my controller cards. Mainly smaller changes to make it a little more visually pleasing. Also a matter of taste/personal preferences, of course...

I also made a  few minor functional changes:

  • I swapped the SPACE and RETURN keys in the ROM. I really always use the new selector menu, so I made this the default (= when pressing RETURN), as this is advertised by the boot message.
  • When selecting a volume image in the new menu, you can now just press RETURN to keep the currently selected volume image. Mainly makes sense when using two SD cards - and you want to change the volume for one, but not for the other.
  • And since I use "euro"-machines with foreign character sets: I replaced the ][ characters. These aren't properly displayed with non-US character sets. Instead of ][ it would show "DAN èé", "ÜÄ", "ÅÄ", ... on French/German/Swedish/... machines. Not a big deal, but some people just like things neat and tidy. :) Of course, the original Apple II ROM had the same issue - which is probably why the boot prompt was changed with the "enhanced" ROMs...

In case anyone was interested in some of these changes:

https://github.com/ThorstenBr/Apple2Card/commit/6e69de110043725eb41af016cfad1af39d0e13e8

 

 

CVT
CVT's picture
Offline
Last seen: 42 min 43 sec ago
Joined: Aug 9 2022 - 00:48
Posts: 1168
Already using it...

Already using it and loving it!

 

Offline
Last seen: 9 hours 58 min ago
Joined: Jun 29 2018 - 16:55
Posts: 590
Is anyone else using the IP65

Is anyone else using the IP65 / Telent client on a II Plus with 80 column card? For reference, my 80 column card is a Micromax Viewmax 80. 

I have it painfully close to working; When I launch ip65, its own messages change into and display in 80 column mode. I am able to get an IP, and specify a hostname and port number. I see my own text displayed while as I type it in. But that's where I get stuck; After specifying the port, I can only press keys to interact with the login screen of BBSes blindly. No text sent back from the BBS is being displayed within the 80 column display. If I press CTRL-RESET, kicking the machine back to 40 column mode, I see the (somewhat scrambled) text of my BBS login screen on the display until I clear the screen completely. So I know the Dan II is connected to the BBS, there is just an issue getting that data back to the display. 

Offline
Last seen: 1 week 19 hours ago
Joined: Jun 12 2022 - 23:35
Posts: 111
The compiled Telnet client is

The compiled Telnet client is for a //e,//c,//gs 80 column card.  This puts every other character in the first 64k 0400-07FF text page, and on the second 64k 0400-07FF text page.  You are probably seeing every other character of the BBS login screen when you hit Ctrl-reset.  It is not using the ROM character display routine, it is directly writing the display, and so it isn't going to use the video output of your Apple ][+ 80 column card.  Chances are it would need to be modified, perhaps, extensively, for that to work.

 

You may be able to use something like the

 

https://github.com/profdc9/WifiModem

 

with Apple ][+ terminal software and a serial card that supports your 80 column card to access the BBS, rather than the Dan ][ ethernet  port.

 

 

Offline
Last seen: 9 hours 58 min ago
Joined: Jun 29 2018 - 16:55
Posts: 590
Sounds good, I appreciate the

Sounds good, I appreciate the reply. And I think you're spot on with the alternating characters. 

 

Not to go too off topic but I do have super serial cards, wimodems, etc. on hand. Perhaps I'll swap this Dan II card into a IIe or something if I want to try the ethernet again. 

 

Terminal software wise; Proterm needs an IIe IIRC. Last time I temporarily put in a 65C02 (ProTerm asked for one) I was then greeted with "Proterm requires a IIe or newer" (paraphrased). If someone knows an 80 column capable terminal program that works on II+ please let me know. 

Offline
Last seen: 1 month 3 weeks ago
Joined: Jul 5 2018 - 09:44
Posts: 2587
skate323k137 wrote:Sounds
skate323k137 wrote:

Sounds good, I appreciate the reply. And I think you're spot on with the alternating characters. 

 

Not to go too off topic but I do have super serial cards, wimodems, etc. on hand. Perhaps I'll swap this Dan II card into a IIe or something if I want to try the ethernet again. 

 

Terminal software wise; Proterm needs an IIe IIRC. Last time I temporari

Ascii Express Pro?

 

Offline
Last seen: 9 hours 58 min ago
Joined: Jun 29 2018 - 16:55
Posts: 590
softwarejanitor wrote:Ascii
softwarejanitor wrote:
Ascii Express Pro?

Looks promising, thank you. I'll give it a try. 

 

Out of left field, has anyone had the thought of trying to get a2stream working with this, or does that rely too much on the hardware of the uthernet II?  

Offline
Last seen: 1 month 3 weeks ago
Joined: Jul 5 2018 - 09:44
Posts: 2587
skate323k137 wrote
skate323k137 wrote:
softwarejanitor wrote:
Ascii Express Pro?

Looks promising, thank you. I'll give it a try. 

 

Out of left field, has anyone had the thought of trying to get a2stream working with this, or does that rely too much on the hardware of the uthernet II?  

 

I never had a Micromax Viewmax 80, but I have used AE Pro with both an ALS SmartTerm and Videx VideoTerm.  I would guess that it probably supports most of the ][+ 80 column cards.

 

Offline
Last seen: 1 month 3 weeks ago
Joined: Jul 5 2018 - 09:44
Posts: 2587
profdc9 wrote:The compiled
profdc9 wrote:

The compiled Telnet client is for a //e,//c,//gs 80 column card.  This puts every other character in the first 64k 0400-07FF text page, and on the second 64k 0400-07FF text page.  You are probably seeing every other character of the BBS login screen when you hit Ctrl-reset.  It is not using the ROM character display routine, it is directly writing the display, and so it isn't goi

It isn't uncommon for software where display performance is critical on a //e (or //c or IIgs) to use custom code that writes directly to the display memory in both standard and AUX memory.  The way that video works on a //e becomes a liability when running a terminal program above about 4800bps.  It is one area where a ][+ style video card can actually have an advantage, because not only do those cards have dedicated video RAM, it is sequentially mapped and most of the video controllers used (6845/6545 or the Hitachi clones) have hardware scrolling that doesn't require the 6502 to move memory or bank switch.

 

CVT
CVT's picture
Offline
Last seen: 42 min 43 sec ago
Joined: Aug 9 2022 - 00:48
Posts: 1168
softwarejanitor wrote:I never
softwarejanitor wrote:
I never had a Micromax Viewmax 80, but I have used AE Pro with both an ALS SmartTerm and Videx VideoTerm.  I would guess that it probably supports most of the ][+ 80 column cards.

 

I can confirm that Ascii Express v4.20 works with both of my 80-column cards on my Apple II+.

 

Package iconAscii Express v4.20.zip

 

Offline
Last seen: 1 month 3 weeks ago
Joined: Jul 5 2018 - 09:44
Posts: 2587
CVT wrote:softwarejanitor
CVT wrote:
softwarejanitor wrote:
I never had a Micromax Viewmax 80, but I have used AE Pro with both an ALS SmartTerm and Videx VideoTerm.  I would guess that it probably supports most of the ][+ 80 column cards.

 

I can confirm that Ascii Express v4.20 works with both of my 80-column cards on my Apple II+.

 

<

Which two cards are those?  The first one looks like a pretty normal Videx or clone the 2nd one looks a little like a Franklin 80 column card except the ones I ahve don't have the large trim pots.  Neither does the M&R Sup-R-Term that I have.

 

 

CVT
CVT's picture
Offline
Last seen: 42 min 43 sec ago
Joined: Aug 9 2022 - 00:48
Posts: 1168
softwarejanitor wrote:Which
softwarejanitor wrote:
Which two cards are those?

 

 

The first one is C80 CPL-3 - a Videx clone that seems to have been sold in Germany:

 

 

The second is SUP'R' Terminal. The red pot is video level and the blue is video balance:

 

 

Offline
Last seen: 1 month 3 weeks ago
Joined: Jul 5 2018 - 09:44
Posts: 2587
The Sup'R'Term I have looks a

The Sup'R'Term I have looks a little different.  The trim pots on mine are smaller and not colored like that.  Anyway, I'd strongly suspect that if AE Pro works with a Sup'R'Term it will probably work with a ViewMax.

 

Thanks for trying it out...  That should help.

 

MacFly's picture
Offline
Last seen: 13 hours 4 min ago
Joined: Nov 7 2019 - 13:49
Posts: 484
Improved SD-card compatibility (and performance)

I recently populated another 3 controller PCBs, the final from my PCB batch, but unfortunately none of them seemed to work. Turned out, nothing about the controller cards was different. It was just the MicroSD cards. Same brand and type as my previous, but obviously they were still different. They wouldn't work in the DAN ][ controller, but of course worked fine otherwise (PC / card reader).

Couldn't see anything abnormal with the hardware signal levels. So I eventually dived into the mmc driver, to see, what was actually failing with these cards. And how it differed from the others.

 

Eventually I found an issue with the low-level initialization of the mmc driver.

Normally, when the driver initializes an SD card, it first resets the card by briefly powering it down. It waits 100ms, so the power is really off, then re-enables the SD-slot's power supply, and begins with the setup sequence. It issues a command to enable SPI, determines the SD card type etc etc.

However, the DAN][ controller has no option to toggle the power-supply of the SD-slots - they are both hard-wired to Vcc. Hence, it's not possible to power-down/reset an SD-card. The related "power_down()" function was already commented out in the DAN][ Arduino sources. However, the driver would still attempt to power-down and re-initialize the cards, e.g. when switching access between SD slot 1 and 2. So, the driver was re-running the init sequence repeatedly - even if this was unnecessary, since no reset/power-down had occurred.

With my earlier SD cards, this was not an issue. However, with my newer cards, the very first command to "enable SPI" would fail, if this command had already been completed before. Hence, the mmc driver gave up - and the cards were unusable.

I made a few changes to fix this issue, so now my new cards all work fine (the old ones, too, of course). The driver now knows the SD cards are not actually powered down - and it prevents rerunnig the init sequence, when this had already been successful.

As a nice side effect, this also improves performance when alternating access between the slots (or SD volumes). This is most noticable when using the new boot menu, showing the volume names. This is much faster now, since the unnecessary power-down delays are gone (which meant a 100ms delay for each of the potentially displayed 32 volumes).

 

Did anyone else have SD cards which didn't work in the controller? If so, would be interesting to re-test these with this driver change. If anyone wanted to test this, you can find the relevant change in the commit below. But consider this "experimental". The commit contains another necessary fix (see git comment), which may need further investigation:

https://github.com/profdc9/Apple2Card/commit/7bf5d4568ab8fe73d7b6ddd5d8300b432b012443

CVT
CVT's picture
Offline
Last seen: 42 min 43 sec ago
Joined: Aug 9 2022 - 00:48
Posts: 1168
What was he brand of the SD

What was the brand of the SD cards that didn't work?

 

I have tried the Dan ][ Controller with only these 2 different types and they both worked:

 

 

Btw, now that the controller can mount two volumes from 2 FAT32 SD cards, would it be possible to modify the firmware to mount 2 volumes from a single FAT32 SD card?

MacFly's picture
Offline
Last seen: 13 hours 4 min ago
Joined: Nov 7 2019 - 13:49
Posts: 484
Intenso microSDHC, class 4

That's the one which didn't work, but is also working now. Also "SDHC, class 4" - just like your 8GB card. But I'm pretty sure it's not the class, neither the size. I also have a Kingston SDHC class 4 card which worked. It's probably just a matter of different cores/implementations/manufacturers.

 

Concerning mounting multiple volumes on one SD card: yes, theoretically that would be possible, using the same approach of dynamically switching volumes. In fact, the new boot menu is already doing this: it switches and reads from all possible files in order to obtain all volume names. Accessing multiple volume files is just not mapped to the ProDOS interface - so only one volume per card is visible to ProDOS at a time. Changing this would also complicate the configuration, of course.

MacFly's picture
Offline
Last seen: 13 hours 4 min ago
Joined: Nov 7 2019 - 13:49
Posts: 484
Better fix

For those interested: RTFM always helps. I had a look into the SD-card specification and made a much simpler and less intrusive fix. I also sent a merge request to profdc's repo. Fixes the compatibility issue with some SD cards, and also speeds-up switching volume access (= faster boot menu).

https://github.com/ThorstenBr/Apple2Card/commit/23306d94caca22ec30a1e94f19c17d401495a410

CVT
CVT's picture
Offline
Last seen: 42 min 43 sec ago
Joined: Aug 9 2022 - 00:48
Posts: 1168
I applied your latest changes

I applied your latest changes. Even though I could not reproduce the problem with 2 more 256 GB microSD cards from my car's dash cam and multimedia below, I can confirm that the Dan ][ Controller lists the FAT32 volumes at least 10 times faster now, which by itself is enough of a reason to update.

 

 

Once again thanks for the great work!

MacFly's picture
Offline
Last seen: 13 hours 4 min ago
Joined: Nov 7 2019 - 13:49
Posts: 484
No problem. We're all working

No problem. We're all working on our own nerdy Apple I/II/III stuff and helping each other... :)

The fix & performance improvement are also available in Dan's official repo now. So the change can also be grabbed from there. And it's just the "Arduino" chip which needs the update. So no need to burn a new EPROM.

The compatibility issue I was seeing is probably more likely to affect cheaper/slower cards, since it's related to the SD card being slow to complete a reset command. SDXC are already a bit better/faster cards. The 4GB/SDHC card I was using is about at the bottom end you can currently buy (still good enough though for our 8bit demands...).

 

Offline
Last seen: 5 hours 38 min ago
Joined: Dec 19 2008 - 21:01
Posts: 415
Where can I download the

Where can I download the latest firmware files? (Arduino and ROM)

CVT
CVT's picture
Offline
Last seen: 42 min 43 sec ago
Joined: Aug 9 2022 - 00:48
Posts: 1168
rittwage wrote:Where can I
rittwage wrote:

Where can I download the latest firmware files? (Arduino and ROM)

 

Ok, so MacFly made 2 improvements: the one in post #217 and the one in post #233. Only the second one was added to the original branch, so if you want both you have to use his branch: https://github.com/ThorstenBr/Apple2Card

Offline
Last seen: 10 months 3 weeks ago
Joined: Jun 11 2005 - 17:59
Posts: 30
Anyone have any PCBs?

Hi,

This looks like an interesting project. Does anyone in the USA have a blank controller PCB they would be willing to sell?

 

Thanks!

MacFly's picture
Offline
Last seen: 13 hours 4 min ago
Joined: Nov 7 2019 - 13:49
Posts: 484
Ok, just to avoid possible confusion:

All essential changes (performance & SD-card compatibility) are already in profdc's official repo.

I'm still working on the boot menu. Made a few more changes this weekend. Those changes are currently only in my repo - but in this specific branch, if someone wants to try these changes:

https://github.com/ThorstenBr/Apple2Card/tree/bootmenu

Once I'm done, I'll also make a merge request with Dan's official repo (and then it depends on whether Dan even likes the changes, of course...).

CVT
CVT's picture
Offline
Last seen: 42 min 43 sec ago
Joined: Aug 9 2022 - 00:48
Posts: 1168
Nice! I see where you're

Nice! I see where you're going with this. :)

 

Is there a limit on the size of the bootpg.bin? I am asking, because I already OCR'ed the Apple Mouse II assembly routines from Programming the AppleMouse II and I was thinking to try to add them once you're done. I have them in the ZIP file here if you want to take a look.

Offline
Last seen: 1 week 19 hours ago
Joined: Jun 12 2022 - 23:35
Posts: 111
So the bootpg.bin must fit

So the bootpg.bin must fit into the ATMEGA328P flash.  It doesn't use the SD card to store it.

Also, the boot code only loads the first page of the bootpg.bin to $800.  Your code there would have to load the rest of your program before using it.  There is a pseudo-Prodos call that accesses bootpg.bin rather than the typical Prodos read block function.  The 512 bytes that should be loaded from bootpg.bin is specified there.

 

MacFly's picture
Offline
Last seen: 13 hours 4 min ago
Joined: Nov 7 2019 - 13:49
Posts: 484
I was planning to also add

I was planning to also add support for arrow keys. The first 512byte block is almost maxed out with my version above. I already have a local version which also reads an additional block, so bootpg may be extended further (and you could read even more blocks). We're currently using a bit less than half the 32KB flash of the Arduino. So that's probably more than enough, if you wanted to play with the mouse driver.

Offline
Last seen: 5 hours 38 min ago
Joined: Dec 19 2008 - 21:01
Posts: 415
Excuse my ignorance, but I

Excuse my ignorance, but I updated to the latest firmware (rom and atmel) and I get the new selector menu when I press return.

I formatted my SD card and copied some PO images to it, but the selector doesn't show any of them... only 

 

0: ---

1: ---

 

How do I select files on the card?

 

EDIT: Nevermind, I figured out you still have to name the files BLKDEV0X.po. It would be nice to able to select any file.

 

 

CVT
CVT's picture
Offline
Last seen: 42 min 43 sec ago
Joined: Aug 9 2022 - 00:48
Posts: 1168
MacFly wrote:I was planning
MacFly wrote:

I was planning to also add support for arrow keys. The first 512byte block is almost maxed out with my version above. I already have a local version which also reads an additional block, so bootpg may be extended further (and you could read even more blocks). We're currently using a bit less than half the 32KB flash of the Arduino. So that's probably more than enough, if you wanted to play with the mouse driver.

 

My estimate is that I would need about 400 bytes for the mouse routines. I don't plan to do a cursor or anything like that, just a simple selection roll and click. It should be fairly easy for me to hook it up once you have the arrow keys working.

MacFly's picture
Offline
Last seen: 13 hours 4 min ago
Joined: Nov 7 2019 - 13:49
Posts: 484
More features...

The easter bunny brought a few updates for the DAN II controller. Yes, I was also a bit surprised he knows 6502 assembler, but as old German wisdom says: "old rabbits are experienced"...

The changes should work on all Apple II variants - but still "experimental". So maybe test using an EEPROM first, rather than burning an EPROM. Let me know if you noticed issues.

You can test these using this "bootmenu" branch of my git repo: https://github.com/ThorstenBr/Apple2Card/tree/bootmenu

Here's a list of changes:

  • Further improvements to the new boot program (stored in the Arduino flash). You can now browse through the volume list (using the arrow keys/spacebar/Cltr-H/J/K). Directly selecting volumes using 0-9/A-F/return/escape works just as before, of course. There's also a number of smaller improvements. Like feedback after the configuration, when you press escape to abort etc. Should all be pretty self-explanatory.
    • The boot program now needs 2 blocks (1K). Further extensions are no problem. It automatically loads additional blocks as required. Just need to take care that the first few bytes for the loading routine itself stay within the first block - very simple. The Arduino has 15K of flash remaining, so still space for more extras.
  • There's also an update for the card's ROM (EEPROM). The tight space constraints on the first page were slightly relaxed by moving some code (all keyboard controls) to the second page. This allowed to also squeeze in more features there:
    • Pressing 0-9 at boot time (during the "DANII PRESS RETURN" phase), now temporarily selects and immediately boots the respective volume from the first SD card. So these work as "quick access keys". When you power-cycle your machine, it reverts back to the default (whatever your recent persistent configuration was, configured through one of the menus).
    • Trying to boot a missing volume file no longer crashes to monitor (or just executes whatever random data is left in memory). It now safely launches the boot menu instead.
    • The ROM immediately responds to keypresses, skipping the fixed timeout. Pressing RETURN immediately launches the new boot menu. The old simple ROM menu is still there, but mapped to the "X" key. Spacebar skips the boot delay and immediately boots the selected default volume. So if you don't want to wait, just smash the spacebar...
    • However, depending on how you flash your Arduino (ATMEGA chip), you may still experience a brief delay. The boot ROM needs to synchronize and wait for the Arduino to be ready. The delay is caused by the Arduino's bootloader, which blocks to see if there is a flash request via its UART pins. If you are impatient like me and want your system to boot really fast (or maybe so you can brag in an ebay post about your setup being the "fastest on the planet due to an 'overclocked CPU' with a paper sticker"... ;-) ), then you can eliminate the last bit of boot delay by removing the bootloader from the Arduino.You don't need the bootloader anyway when you're using the "ICSP" connector to program/update the chip. Without the bootloader, the ATMEGA is instantly ready after power-up. There lots of guides on the net describing how to use the Arduino without the bootloader. I'm using the "minicore" addon for the Arduino environment. It also provides a more efficient compiler (smaller/faster code). There's a compiled binary/hex file without the bootloader in my github project (Apple2Arduino.ino_atmega328p_16000000L.hex), which you can directly flash to the ATMEGA328p (using "avrdude" etc). Otherwise, if you do use the UART connection for updating, then you need to keep the bootloader and live with the remaining delay, of course.
  • There's a few other changes to the project. Makefiles for Linux (should also work in a Windows WSL console). Building the boot menu now immediately updates the Arduino project (no need for manual copy&paste). The project now also supports multiple boot menu variants. So you can choose between any of these, including the original one by Dan. There is a configuration option in the Apple2Arduino.ino file:
  • The variant with the mouse driver doesn't exist yet. This is just a suggestion. I think CVT thought about having a go at this... :) The idea of this selection is that nothing is lost - and people may have different preferences. Or if there were compatibility issues. Easier to switch to another/earlier/simpler variant.

Anyway, here's a small video showing some of the new functions - and how quick it is now without the Arduino UART bootloader:

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

Happy Easter!

 

Offline
Last seen: 1 day 13 hours ago
Joined: Mar 12 2023 - 16:49
Posts: 23
1.1 card hangs with jumper 2 in place

Have had a great time building the card and it works after a fashion. 

I seem to have a problem in that when I close the link on Jmper 2 (bank) then the whole Apple 2e hangs on booting up. If I take the jumper off then computer will boot and load from drive 1.

 

I have removed all other cards except for the 80 column card.

Card hangs in the same way for MacFly's and Dans firmware versions. I have changed all the chips except for the HARRIS CP82C55A peripheral chip that has been in the parts box for some time.

Any suggestions would be appreciated.

MacFly's picture
Offline
Last seen: 13 hours 4 min ago
Joined: Nov 7 2019 - 13:49
Posts: 484
The bank jumper (JP2) is

The bank jumper (JP2) is required to allow the controller to switch between the first and second 256byte page of the ROM. With DAN's original firmware the second page is only ever needed when you press RETURN to activate the configuration. It's the only thing which is stored on the second page.

With my firmware (yesterday's post) the second page is required as soon as you press any key during the "DAN II PRESS RETURN" phase.

If you don't press any keys then both firmware versions will never use the second page, which requires the bank switch jumper.

According to your description the first ROM page works as long as you don't have the jumper set. But the machine hangs and doesn't boot as soon as you close the jumper. It should not make any if the jumper is even closed or not, as long as you don't press any keys.

You either have a defect 8255 PIO, so it's constantly driving PC0 (pin 14) high - or, maybe more likely, you didn't properly solder the pull-down resistor R2 - or the trace between JP2 and R2 is somehow broken, so the pin is floating.

Close JP2 and measure the resistance from JP2 to ground (should be 10 KOhm). If that's not the issue, then switch on the machine and measure the voltage at JP2 (needs to stay at 0V).

Offline
Last seen: 1 day 13 hours ago
Joined: Mar 12 2023 - 16:49
Posts: 23
1.1 card hangs with jumper 2 in place

Many thanks for the explanations.

I will be trying these in the next couple of days.

I am waiting a replacement 8255 to try should it appear the chip is faulty.

Offline
Last seen: 1 day 13 hours ago
Joined: Mar 12 2023 - 16:49
Posts: 23
card not booting with jumper 2 closed

 

You either have a defect 8255 PIO, so it's constantly driving PC0 (pin 14) high - or, maybe more likely, you didn't properly solder the pull-down resistor R2 - or the trace between JP2 and R2 is somehow broken, so the pin is floating.

Close JP2 and measure the resistance from JP2 to ground (should be 10 KOhm). If that's not the issue, then switch on the machine and measure the voltage at JP2 (needs to stay at 0V).

 

Thanks to your good advice I was able to track down the fault to the old Harris 8255 chip, after all the tests you suggested nothing had improved until I was measuring the volts on pin 14 of the 8255 , just touching the pin  with a multimeter test lead booted the computer with jumper 2 shorted. 

So I clipped a further 20 k resistor over the 10 k resistor of jumper 2 and now bank 1 and 2 work without fault. 

 

I think I will now have to just wait for my supplier to send some new 8255 chips, which will  save the need to put lower value resistors on the pull downs of the other  selector lines.

 

I do like the new menu interface and again thanks for the good advice

 

CVT
CVT's picture
Offline
Last seen: 42 min 43 sec ago
Joined: Aug 9 2022 - 00:48
Posts: 1168
Crusty wrote:...the old
Crusty wrote:

...

the old Harris 8255 chip

...

 

Is it 8255 or 82C55?

Offline
Last seen: 1 day 13 hours ago
Joined: Mar 12 2023 - 16:49
Posts: 23
CVT wrote:Crusty wrote:...the
CVT wrote:
Crusty wrote:

...

the old Harris 8255 chip

...

 

Is it 8255 or 82C55?

Both chips tried so far are HARRIS CP82C55A purchased from a UK e-bay supplier.

Pages

Log in or register to post comments