Hello, I am currently working on a way to identify the floppy drives that are connected to an IEC or IEEE bus. For this, I am currently doing the following 1. Upload a test program into the floppy drive. That test program creates CRC16 of the ROM aready ($8000-$FFFF) in 8 KB chunks 2. I read out the CRC16 from the PC side as a fingerprint (64 bit) 3. Now, I compare with known ROMs. In order to ignore memory areas which are not available on some machines (for example, 1541 does not have $8000-$BFFF normally, but might with some speeders), I also have a "magic mask" that tells me what I have to compare. In the example for the 1541, this means: The mask is "lower 32 bit only" for original 1541 ROMs, but would be "all 64 bit" for a speeder ROM that uses the whole area $8000-$FFFF. I do not want to rely on the memory mirroring of the ROM here, because some modifications of the drive might behave differently, although they use the original ROM. So far, so good. However, I have some questions: As I do not know which drive I have, I have some problems: a. Which ZP locations can I use safely? Currently, I am doing the following: 1. disable interrupts 2. save some ZP locations (starting at $30) to in-program-memory 3. do my CRC16 calculations 4. restore the ZP locations to what they had before 5. enable interrupts again It seems to work fine this way. I stay away from the JOB area at the beginning of the ZP, as some IEEE drives might execute it even with interrupts disabled because of their second CPU. Any objections or better ideas? b. I am using address $0500 for my program, and $0300-$04FF for lookup tables. (I am using the code for the CCITT CRC16 from http://6502.org/source/integers/crc.htm) Are these areas available on all drives? I tested 1541, 1570, 1571 and 1581 myself. How about the IEEE drives? 2031 is clear, but what about 4040, 8050, 8250, SFD1001 drives, especially in the DOS1 versions? c. Are the U3, M-W and M-R commands available on all drives? Especially with DOS1, I do not have any experience. d. As I wrote, I am using chunks of 8 KB. This is a problem for the 4040, which uses $D000-$DFFF as ROM area, but not $C000-$CFFF. According to http://www.zimmers.net/anonftp/pub/cbm/schematics/drives/old/4040/memorymap.txt, $C000-$CFFF is a shadow of RAM area 4, and thus, is not stable. Currently, I solve this by ignoring the area $D000-$DFFF in my calculations. Any better ideas? What do you think about this approach? Would it work will all drives? Currently, I have the following in mind: IEC (these are drives I am familiar with): - 1540, 1541, 1570, 1571, 1581 IEEE: - 2040, 3040, 4040 (as far as I understand, these differ in the ROM only?) - 2031, 4031 (again, these differ in the ROM only?) - 8050, 8250, SFD1001 (the ROMs are identical, only the FDC code is different, am I right? Can I make a distinctin between them with some other means? TBUS: - 1551 (well, I added the footprint "just in case", although I do not know how I should access it via IEC, as it does not have an IEC bus, does it?) There are some additional questions, for which I will write another mail. Regards, Spiro -- Spiro R. Trikaliotis https://spiro.trikaliotis.net/Received on 2021-11-05 18:04:52
Archive generated by hypermail 2.3.0.