• Please review our updated Terms and Rules here

1541 Drive & AIM-65 help.

Hugo Holden

Veteran Member
Joined
Dec 23, 2015
Messages
4,747
Location
Australia
Recently I acquired a Commodore 1541 drive, the AH5050 pcb and the AH5050 ROM (which goes in the AIM65's assembler socket)

The drive itself looked almost NOS, has had little use, but it could still be defective.

When I attempt the use it, by typing N which sends the processor to D000h (where the ROM is), the error DRIVE NOT READY 00 00 is reported on the display.

But prior to this the drive starts up, makes a number of noises and when it stops, the red LED on the drive body blinks rapidly. I have a new un-formatted disk in the drive. But because I cannot get past the initial error I cannot format it.

So it appears the drive is responding initially, but in some way not working. (I have the disk inserted correctly and the drive handle closed)

I don't have any other computer that I could test this drive with, though I have a Zoomfloppy in the slow post and the 1541 test/demo disk in the post too.

Is there anything else I could try/test in the meantime to help get to the bottom of it ?

(I noticed reading in the drive manual it says that the disk is ejected by a small spring, but on this unit that is not happening, it just sits there when the handle is opened, so I'm am inspecting that now..I cannot see any mechanism in the drive that would cause the disk to spring out as suggested in the manual, the drive is a D500 made by Mitsumi Electric. The disk rotates and the head moves, but it tries to move to the disk perimeter where the motor appears to fight its end stop, then it returns to a position about 1/3 from the disk edge and stops, it never traverses the full width of the disk, but it will if I rotate it manually)
 
Last edited:
I have got a little further ahead. I had a defective diskette. I have been able to format a disk now. Some of the NOS 3M disks I bought are defective. That is a good start.

It may well partly be a PBKC problem (problem between keyboard and chair). I haven't as yet found any hardware issues.

The AH5050 manual has a lot of detail, except, say a practical example (telling you exactly what to do) of how to:

Send a BASIC program you have written (which is somewhere in memory) to disk as a file you have named.
Look at the disk and see the named file in the disk directory, there is the D command, probably might work if I could create a disk file first.
Retrieve that named file from the disk and run it.

If anyone with the AH5050 system can help with some initial instructions on how to do these simple things, it would help me a lot.
 
Hi Hugo,

As I mentioned previously there's a memory conflict between BASIC and the AH5050 firmware that requires a pre-loader to adjust some pointers; unless that file has been recovered you'll have to adjust the pointers manually. Even so, when I was trying things out I found that saving a BASIC program left the file on disk open and I never did take the time to investigate.

However, I think you can save a BASIC program as a binary file. I'll have to set up a system and refresh my memory about how to do that; I'll get back to you once I have some specific info.

Just curious: have you got RS-232 working yet? It's a lot easier to play around when you have a full 80x24 screen instead of just the 20 character display and it also simplifies getting your BASIC program into the AIM in the first place.
 
Last edited:
Hi Hugo,

As I mentioned previously there's a memory conflict between BASIC and the AH5050 firmware that requires a pre-loader to adjust some pointers; unless that file has been recovered you'll have to adjust the pointers manually. Even so, when I was trying things out I found that saving a BASIC program left the file on disk open and I never did take the time to investigate.

However, I think you can save a BASIC program as a binary file. I'll have to set up a system and refresh my memory about how to do that; I'll get back to you once I have some specific info.

Just curious: have you got RS-232 working yet? It's a lot easier to play around when you have a full 80x24 screen instead of just the 20 character display.

Mike, Thanks.

I haven't connected up the RS232 link yet. Also I'm still in the process of trying to replicate the RM65 CRTC card, so I can use a small VDU, the pcb maker is still working on it.

Is the preloader file you refer to, the "Start UP" file they refer to in the manual ? They seemed to suggest it was easy to create it, but I would have to learn how staring with the blank disk.
 
Is the code you have on the AIM-65, Forth or BASIC? For me, getting enough running in Forth to initialize disk and transfer file would be easier then dealing with peaks and pokes in BASIC.
As Mike says, get the RS232 connection working first. It will be easier with either Forth or BASIC.
Dwight
 
Is the code you have on the AIM-65, Forth or BASIC? For me, getting enough running in Forth to initialize disk and transfer file would be easier then dealing with peaks and pokes in BASIC.
As Mike says, get the RS232 connection working first. It will be easier with either Forth or BASIC.
Dwight

Hi Dwight, currently I only have BASIC on the machine. I'll work on the rs232 link. When the zoomfloppy arrives I may be able to create some initial files to play with that way.
 
It's not so much a matter of peeking & poking, but memory conflicts.

The issue is that the AH5050 and BASIC (and Forth as well, so you'd have the same problem) all use the same area at the bottom of user memory for their working variables & pointers.

The AH5050 uses memory from $0200 to $0260 while BASIC's Program Start address is normally at $0212 and the start of variables is at $0214. The pointers to these locations are at $0073 and $0075 respectively, so IIRC:

Start BASIC with '5' and enter memory size and width.
ESC, and using the monitor change 0073 from 12 02 14 02 to 61 02 63 02.
Reset the new program start location: change 0260-0262 to 00 00 00.

That should remove the conflict; from now on do not use '5' to enter BASIC, which would reset the pointers; use '6' instead.

My memory's not what it once was so no guarantees, but your BASIC program should run and you should be able to save/load it; if you have the aforementioned EOF issue try bsave/bload instead, although that would fix its location at $0260.

Good luck!
 
Thanks Mike, I will give it a try , I have printed out your response.

One thing that baffled me about the AH5050 pcb was the straight connector they used to plug it onto the AIM 65-5's application connector. I guess it means that you cannot plug it the wrong way around or maybe they had some extension adapter for it. When it was plugged onto the AIM-65, I could not use the printer because the DIN cable and plug which goes off to the 1541 drive, conflicted with the position of the paper roll.

So I replaced their original connector on the pcb with a right angle connector. These connectors in right angle form appear nearly unobtainium, so I simply used one with long pins, intended for wire wrapping applications (which are easy to get) and made a tool to bend them correctly, now as the photo shows, the pcb can lie flat plugged onto the rear of the AIM-65.

PS: What are the correct size & width values to enter ? previously I had skipped over that when testing BASIC.
 

Attachments

  • AH50501.jpg
    AH50501.jpg
    198.8 KB · Views: 5
  • AH50502.jpg
    AH50502.jpg
    213.8 KB · Views: 5
  • AH50503.jpg
    AH50503.jpg
    200.5 KB · Views: 5
Last edited:
I have had some success. I have been able using the AIM-65 monitor load and dump commands to send a named file to the disk and retrieve it to memory and that works, most likely confirming the hardware is all good, but I haven't figured out yet how to view a directory of files on the disk.

But inside BASIC and operating from there, even after changing the memory address bytes as suggested, fails in two ways. When I use SAVE, it goes to save the file (probably does, not sure) but the disk drive does not stop and runs continuously after that.. Using the SAVEB option, it crashes the computer requiring a hard reset, so somehow it sends the CPU to the wrong address.

The software in the manual they mention to correct the pointers was called INIBASIC, is that the very rare one that only one copy of it remains that might be defective ?

I just heard that the fellow who sold me the AH5050, does have the INIBAS file on a disk, but the problem is we don't know exactly how to copy it. He has a Zoomfloppy and that does not appear to work to get it to a modern computer, and he has an SD card drive emulator as Disk 2.

Is there a set of instructions where it could be attempted to be copied, say from the disk drive to the emulator drive, can it be done using the AIM-65 monitor commands ?

Or some specific instructions about how to attempt the Zoomfloppy copy again ?

Or if that doesn't work, is anybody able to offer a service to attempt to retrieve it from the disk ? I can fund that, it might well be the only copy left.
 
Last edited:
Hi Hugo,

Yes, that's the story. David has the disk and for some reason he hasn't been able to copy it, but I'm not sure whether there is an actual problem with the disk or if he's doing something wrong. I've tried to help him and another user who's very familiar with Commodore drives also offered to help, but I don't really know what's been happening or what the problem really is.

I just hope that the disk is still readable... I believe there's also a driver for a Centronics printer on there.

That looks like the original board; did Dave sell you that? I thought he was selling his 'shim' board that goes between the VIA and its socket:

https://www.ebay.com/itm/Rockwell-A...053576?hash=item4204b8ae08:g:X2EAAOSwZDpdKXqZ

So you actually already have the RS-232 interface?

No idea why you can't read the directory; are you sure there really are files on the disk? And I'm surprised you're having trouble saving a file; you're not using '5' to enter BASIC after changing the pointers by any chance, are you?

I'll try to find time to set mine up and refresh my memory.
 
Last edited:
Hi Hugo,

Yes, that's the story. David has the disk and for some reason he hasn't been able to copy it, but I'm not sure whether there is an actual problem with the disk or if he's doing something wrong. I've tried to help him and another user who's very familiar with Commodore drives also offered to help, but I don't really know what's been happening or what the problem really is.

I just hope that the disk is still readable... I believe there's also a driver for a Centronics printer on there.

That looks like the original board; did Dave sell you that? I thought he was selling his 'shim' board that goes between the VIA and its socket:

https://www.ebay.com/itm/Rockwell-A...053576?hash=item4204b8ae08:g:X2EAAOSwZDpdKXqZ

So you actually already have the RS-232 interface?

No idea why you can't read the directory; are you sure there really are files on the disk? And I'm surprised you're having trouble saving a file; you're not using '5' to enter BASIC after changing the pointers by any chance, are you?

I'll try to find time to set mine up and refresh my memory.

Hi Mike,

I double checked the bytes change in memory you suggested and only re-enter with 6. I have tried it a number of times, with a short simple BASIC program. The most consistent result is that the computer locks up, and is unresponsive and the display goes blank, only recoverable with a hard reset. The same thing happens when I leave those bytes unaltered too, but they are definitely correctly changed before I try it. I don't think I have successfully created a saved file in BASIC, except for the one using Load and Dump from the AIM monitor, but I have not seen that in a directory ..yet.

Yes David sold me the AH5050 pcb & ROM. I wanted this one because of the RS232 (but I have not connected that up yet) and printer connector and it has a manual. I think David is still working on how to recover the files from the vintage disk.

Thanks for setting up your units and testing it, may help get to the bottom of it.
 
Mike,

While we are waiting to sort out the BASIC issue, just using the drive with the AH5050 ROM and the monitor, I can format a disk and I think create a named file, using the P (PUT) command and making the file from the data in a specified address range, at least the disk drive head movements suggest that is working normally in both cases.

But, hitting key F1 and typing D (for the directory), it immediately asks for the device, so I type D1, the display then says OUT = , then the manual says press carriage return (CR), it appears, but when I do the display flashes some data and goes blank, except for the cursor on the left and doesn't show any disk directory. Can you let me know what I am likely doing wrong there ? maybe the directory info was there with the data that flashed to the display, but it went to a following line which was blank and therefore cannot see it, I'll try it again with the printer running to capture it.

...that was it, the printer has to be on to see it. Of course if I had the RS232 link running (or the CRTC card I'm building) I would have seen the disk directory that way.

...now just to figure how to fix the issue with BASIC.
 
Last edited:
Using the RS-232 connection is definitely helpful with things like this, not to mention that it saves a lot of paper and especially with a disk drive.

I don't quite understand why you aren't using it; surely you have a computer of some sort with a serial port and some terminal software?

Your video display bard is definitely a worthy project but it still doesn't give you the ability to capture text for troubleshooting or sharing, nor does it give you the ability to load & save over the RS-232 port.

BTW, do you use Skype, Zoom or something equivalent? Might be nice to have a chat one day.

Found the AIM but looking for the language ROM; Soon... ;-)

m
 
Using the RS-232 connection is definitely helpful with things like this, not to mention that it saves a lot of paper and especially with a disk drive.

I don't quite understand why you aren't using it; surely you have a computer of some sort with a serial port and some terminal software?

Your video display bard is definitely a worthy project but it still doesn't give you the ability to capture text for troubleshooting or sharing, nor does it give you the ability to load & save over the RS-232 port.

BTW, do you use Skype, Zoom or something equivalent? Might be nice to have a chat one day.

Found the AIM but looking for the language ROM; Soon... ;-)

m

My plan was to get the video up and running as first task , but the pcb maker is taking a much longer amount of time than anticipated. Then I wanted to get the disk drive running and the RS232 link last, so the order of that plan has been thrown into disarray. But I will connect up the RS232 soon, it will help better than the single line display. It is also very easy to photograph the VDU face as a way of sharing/troubleshooting. In the meantime I have plenty of paper !

I'm not on skype or zoom yet.
 
Well, it's been a long time since I played with this and it looks like my memory has become corrupted in the meanwhile ;-)

I could have sworn that SAVE and SAVEB worked (except for the EOF issue), but when I tried it now SAVE saves an empty file and SAVEB saves a file only containing "SN ERROR". And of course the diskette I used is lost and I don't seem to have kept any notes.

But DUMP/LOAD seems to save OK as HEX, PUT/GET as binary and (presumably) 'E' as ASCII text (with the EOF issue); you just need to provide the start and end addresses.

Maybe it would be better to continue off-list; I'll email the details.

m
 
Well, it's been a long time since I played with this and it looks like my memory has become corrupted in the meanwhile ;-)

I could have sworn that SAVE and SAVEB worked (except for the EOF issue), but when I tried it now SAVE saves an empty file and SAVEB saves a file only containing "SN ERROR". And of course the diskette I used is lost and I don't seem to have kept any notes.

But DUMP/LOAD seems to save OK as HEX, PUT/GET as binary and (presumably) 'E' as ASCII text (with the EOF issue); you just need to provide the start and end addresses.

Maybe it would be better to continue off-list; I'll email the details.

m

I have had no difficulty now with dump/load, put/get etc. It is just not being able to save and load anything running inside the BASIC environment, because of those dreaded pointers.

I think it must be more complicated than changing a few bytes in memory to get it to work, it would likely require the details of the ABM ROM program, I guess that would have to be disassembled, as well as the BASIC in the AIM-65 to figure it out. I would guess that if it was a simple thing, then the makers of the AH5050 would have been able to fix it easily with some compact code in the ROM they provided, but they required the BASIC program INIBAS on disk to fix all of the pointer issues before BASIC files could be saved.

I hope Dave is able to retrieve INIBAS from his disk.

Hugo.
 
Hello Hugo,

The way I see it is as two separate issues or perhaps one as a subset of the other. There does indeed seem to be a problem using BASIC SAVE to disk as it saves a blank file (SN ERROR if SAVEB); whether there are also issues with LOAD and file commands like OPEN and CLOSE remains to be investigated. Hopefully the INIBAS file can be retrieved and it solves this issue, but in the meantime there are several alternate methods to load & save BASIC programs.

The other issue, the conflict between BASIC and the AH5050 can be resolved by adjusting the pointers at $0073; that means that all the AH5050 commands are available without corrupting the BASIC program, including saving and loading the BASIC program as a binary PRG file using PUT and GET.

Of course you can also save and load BASIC programs in OBJ (MOS HEX) format using the monitor DUMP and LOAD commands.

So saving and loading BASIC programs without a SAVE command is not a problem, although the files will have to be loaded into the same locations where they were saved.

Unfotunately both of these formats can not easily be moved from their saved location the way the plain text files created by the BASIC SAVE command can be. You could LIST the file to the RS232 port; it might then be possible to load it into the editor and, if that works, save it to disk that way.

Something to try while we're waiting to see if that disk can be copied/dumped.

To save a BASIC program using PUT or DUMP, use the two (adjusted) addresses at $0073 and $0075 as the FROM and TO addresses and don't forget to set the location pointed to by $0073 minus 1 to 00 00 00.

Once set, you can dump $0073-$007A and the three 00's to a disk file for future use, like a sort of INIBAS file ;-)

Good luck!
 
Hi Mike,

I'm not sure how it is possible to save files, while working in BASIC, outside the BASIC environment. SAVE, LOAD etc are BASIC commands that only work inside BASIC.

So lets say I have created a Program in BASIC, then exit BASIC to to AIM-65 monitor, and used dump & load commands in that environment for some address range:

How would I know for sure;

1) where the BASIC program I had created started in memory, so as to specify the start of the saved file, but more to the point, 2) where, or what address it had ended at, in memory, as I'm not sure how to determine that ?
 
If you have a look at the BASIC Reference card at http://retro.hansotten.nl/wp-content/uploads/2019/11/AIM-65-8k-BASIC-Reference-Card.pdf.01.jpg you will observe the "ZERO PAGE PARAMETERS".

From my reading of these, locations 73/74 hold a pointer to the start address of the BASIC program and 79/7A hold a pointer to the end of the BASIC program.

Locations 73/74 are the ones that need to be 'tweaked' immediately following a BASIC COLD start to reserve page 0 space for the disk firmware.

I am guessing that 79/7A point to the end of the BASIC program - but you can test this out with your AIM-65.

Dave
 
If you have a look at the BASIC Reference card at http://retro.hansotten.nl/wp-content/uploads/2019/11/AIM-65-8k-BASIC-Reference-Card.pdf.01.jpg you will observe the "ZERO PAGE PARAMETERS".

From my reading of these, locations 73/74 hold a pointer to the start address of the BASIC program and 79/7A hold a pointer to the end of the BASIC program.

Locations 73/74 are the ones that need to be 'tweaked' immediately following a BASIC COLD start to reserve page 0 space for the disk firmware.

I am guessing that 79/7A point to the end of the BASIC program - but you can test this out with your AIM-65.

Dave

Thanks Dave, I had not seen those zero page parameters before.
 
Back
Top