rallepalaveev / Prodos-4MB-NVRAM-Drive

A card with 4MB NVRAM for Apple ][ compatible computers which is a ProDOS compliant R/W device
Other
10 stars 0 forks source link

IIGS: Compatibility Issues? #2

Closed buserror closed 1 year ago

buserror commented 1 year ago

Hi guys, So card has arrived, installed in the IIgs slot 7, and it boots! However there's some stability issues it seems. I wouldn't think that's unexpected as @rallepalaveev mentioned he doesn't own one, but perhaps with a bit of back/forth we can get them sorted!

My config is: ROM3, 8MB RAM (gglabs) -- One CFA3000 in slot 5, NV4 in slot 7. GS Config is 'standard' in control panel, apart from "Your card" for slot 5 (I also tried with 'Smartport'/built in, same results).

Card boots super quick to BITSY.BYE -- I can launch various program from there. a2desktop start fine, however there are some displays issues:

Imgur

As you can see, a line is garbled -- I wonder if some screen holes are being hammered?

More importantly, the NVRAM disk itself is not shown by a2 desktop -no icon- same problem if I launch copy2plus and try to 'catalog' S7D1, I get an IO error: Imgur

Also, system is generally unstable; probing disks in a2desktop crashes. Also, if I activate my CFA card, I see the disks in a2 desktop (2*32MB) but a2 desktop will crash if I try to double-click them...

It seems that perhaps there is a 'slot selection' issue with the card, perhaps due to the faster speed?

I can try anything you like, so feel free to ask me stuff to try!

rallepalaveev commented 1 year ago

Hi,

Let me start first by saying that I have developed the cards for Apple II +/e computers. Re Apple IIgs - I don't have claims that the cards work on them. As far as I know the IIgs emulated 8-bit slot support and this may be causing issues.

I propose you try it on an Apple IIe for instance and verify that it works correctly. After that you can try to isolate potential compatibility issues which might be addressed.

Kind regards,

Ralle

buserror commented 1 year ago

No worries Ralle, I understand -- I was the one to assume it would work really, as pretty much every other card seems to AFAIK; but I understand you have no way to test so I'm sure we can work on it and see whats going on!

I have IIe to try on, unfortunately I can't duplicate the test exactly as 1) I don't have a mouse etc for a2desktop and 2) the IIgs power supply is new (replacement), but the IIe is original and might be on the low side.

I will try anyway, also, I'll try the IIgs at 1mhz to see if it makes a difference, I only had one 'sneaky' session to play with it earlier and wanted to report -- I haven't done fully extensive tests yet :-)

rallepalaveev commented 1 year ago

OK. Two things - if the IIe works without any cards, adding the card would not make a lot of difference as it has low consumption; secondly, A2D can be tested without a mouse, when it loads, you can press ESC and then with the arrow keys move along the menus, most importantly - to Startup and then Slot7, so it is shutdown properly. :)

buserror commented 1 year ago

Just noticed something - you mention in the first comment that my card is in Slot5. I had a friend test my 512kB card on a GS and he said that it only worked in Slot7. This is due to 8-bit being emulated and only available in Slot7, he said.

NV4 is in slot 7: Imgur

Thanks interesting that your friend tried and it worked, I wonder what is the difference? Good to know about a2desktop, I'll try it! This is such a cool program really, it really feels out of it's time. Booting that quickly in a2desktop makes you wonder what apple could have done if they had stuck with it.

I'll also try it with the speed set to 1mhz to see if it makes any difference. Then I'll move it to the IIe to 'validate' it works as it should.

buserror commented 1 year ago

Some more quick tests last night.

I had to stop at that point, my next step is to boot from a floppy to prodos, and launch the a2desktop present on the card from that boot disk -- I have a small suspicion it COULD be the card boot 'driver' (the one that blinks W/R on screen when booting from slot 7) that could have an incompatibility with the IIgs? Just a hunch here.

More later.

rallepalaveev commented 1 year ago

Hi, thanks for the interesting observations.

The firmware driver of the card is located in block 0001 - it is 512 bytes, this is the code which manages the card and makes it a ProDOS block device. Usually this location is not used by ProDOS and in standard images in this block there are 256 pairs of the bytes 42 and 48 (hex). So 512 bytes like this: 42 48 42 48 42 48 .....

I wonder if this makes the difference somehow for the A2D background?

The firmware uses 9 zero page memory locations and $07F7 for the R/W blinker. However, the contents of these 10 bytes are pushed into the stack before use and afterwards - pulled and restored. So memory stays intact upon exit of the program, with the exception of the read buffer upon reads, which is of course what is desired.

Finally, what is the memory mapping of the IIgs? When used in 8-bit mode, is the RAM 64kB like in previous Apple II's? 0000-FFFF?

R.

buserror commented 1 year ago

Ok a bit more data: I tried booting prodos 8 from a floppy to try to see if it worked, and nope it doesn't I launch copy2plus or a2desktop (from floppy) and it fails to probe the NV4 in slot 7. a2desktop crashes on first try to access it.

Now, I replaced the NV4 in slot 7 by a 1MB ROM card that should behave about the same I assume, and it works perfectly well in the IIgs! Not sure of the 1MB card uses the 'block 1 trick'

And to answer your question, yes, the IIgs should look pretty much exactly like a normal 8 bits apple II -- with a bunch of cards of course (default to serial ports, mouse, smartport, disk port, and 80 cols).

Could there be some sort of interrupt problem? ie your handler being interrupted by something else during operations?

rallepalaveev commented 1 year ago

OK. If this is the 1MB ProDOS by Terrence Boldt, then yes - the firmware also resides in block 0001 - I helped write the relocatable code for that project - the credit is in the readme.

The main difference between the 2 cards is that mine uses C800-CFFF space for data transfers, and the 1MB card - C0N0-C0NF space. So we could look into this.

The card does not use interrupts. Also, I block mask-able interrupts while the firmware is working. So it shouldn't be the interrupts.

You can try doing CAT of the NVRAM drive, because A2D when started performs writes, my point is to isolate if it crashes upon writing or reading. This is also another major difference with 1MB card.

If I send an updated driver, would you be able to update your card and try it?

R.

buserror commented 1 year ago

Yes It's the T.B Card -- works great, and indeed, I installed it in slot 2 and it boots no problem from there either.

Sure I can; it is just a question of rewriting block 1? Do I use your 'tools' disk or do I need something else? Feel free to send me version to try, I don't mind; I have a floppyEmu so I can boot from the tool disk, reflash, try etc etc.

In terms of read/write, I booted a tool disk I have (no a2desktop) launched copy2plus, and did the 'catalog' S7D1; and that fails, so I suspect it's not trying to write anything at that point?

rallepalaveev commented 1 year ago

You can use the tools - use the Initialize option, this will only update the firmware. I already uploaded a patched FW, so download the ZIP first.

CPS displaying catalog should not write, correct.

buserror commented 1 year ago

Okay, report; Well, "Initialize" failed in the IIgs... And that nuked the board somehow, so it must have written something bad on it.

So, I installed the board in the IIe, booted off FloppyEmu, redid a "Format", re-installed in the IIgs, booted the card (no more a2desktop, just C2P) Launched C2P to do a "CATALOG" and failed as before...

As a test, I also rebooted in the tools, redid an "Initialize" and that again failed, and made the card unbootable. So there's definitely something wrong with even writing a single block!

rallepalaveev commented 1 year ago

OK. All tool operations are to be done in Apple IIe. I cannot guarantee for IIgs. I have also added the old tools (which I have tested) so at least this should be able to fully restore the card.

rallepalaveev commented 1 year ago

One comment on the Tools:

  1. Initialize only rewrites the firmware in Block 0001 and preserves all data on the card.
  2. Format erases the card and pits on it the firmware and a minimal bootable ProDOS with CopyPlus and Basic.
  3. Restore does a full restore of the card in its original state (or from a new image file in the mounted image in the FloppyEmu)
  4. Backup will make a full back-up of the card in an image on the mounted file in the FloppyEmu
buserror commented 1 year ago

(for anyone reading the ticket later, Ralle has been working a lot behind the scene and sending me quite a few version to test, we're definitely getting there! :-))

rallepalaveev commented 1 year ago

Currently v46 is stable on Apple IIe, but needs more testing on IIgs.

rallepalaveev commented 1 year ago

I just tested firmware v47 on a IIgs on the 512kb card and has no issues. Will post a video and will try it on the 4MB card too, but they work the same way so I don’t expect that it behaves differently.

https://github.com/rallepalaveev/Prodos-4MB-NVRAM-Drive/assets/90763847/f61eefef-d31a-405c-b5d1-392350eb81e0

buserror commented 1 year ago

Cool was wondering if you worked on that lately!

rallepalaveev commented 1 year ago

Hi,

I tested today the NVRAM Drive 4MB on an Apple GS and all worked fine - the card writes correctly and the firmware is not destroyed. So maybe there is something on your GS? Sometimes RAM chips can cause this, if they are of borderline performance.

https://github.com/rallepalaveev/Prodos-4MB-NVRAM-Drive/assets/90763847/f7449631-e4de-4ab3-b70f-47a732975e3f