; support for 13210A/7900 drive ; 1/10/04 5/4/04 5/11/04 9/1/04 ; 9/4/06 mod to fix patching ; 10/5/07 simplified ?DRV, requires $DSTR from double.ipl ; ; contains 7900-specific versions of what's in the IDE word. ; "Setting slots to 16/17" $PRINT CRLF OCTAL 273 16 PUT ;extras... ;note! this driver IPL must be loaded AFTER disk.ipl ;easier to swap drivers this way anyway "Loading ?DRV and CHPL" $PRINT CRLF DEFINE ?DRV ;drive info "7900/13210 drive " $PRINT DRV GET DUP 3 AND #0 SWAP $DSTR $PRINT CASE > 3 " fixed " DEFAULT " removeable " ENDCASE $PRINT END ; DEFINE CHPL ;change platter ;0 CHPL for removeable, 1 CHPL for fixed 1 AND 4 MUL DRV GET 3 AND OR DRV SWAP PUT ?DRV ;display current drive and platter END ;--------- "Loading !7900" $PRINT CRLF CREATE !7900 * slot assignment... (for code generation) DC EQU 16 configured for 13210A in slots 16/17 CC EQU 17 note.. change CW1 too * zero page vectors.... CMDVE EQU 240 command, >IDE code STAVE EQU 241 status, = 24 Then * HeadSector = HeadSector - 24 * Set bit 8 to indicate head 1 * Drive number OR'd with each command, * set bit 9 of HDSEC to indicate fixed platter LDA BLADR CLB DIV DEF C6 STA CYLNO cyl=block / 6 LDA 1 get remainder MPY DEF C8 STA HDSEC hdsec = block mod 6 * 8 ADA CM24 A = hdsec - 24 SSA skip if sign clear (hdsec>=24) JMP FIXHS ready to seek IOR CB8 set bit 8 STA HDSEC hdsec = hdsec - 24 with bit 8 set FIXHS JSB SETDP set drive and platt, fix hdsec DCP11 CLC DC CCP14 CLC CC LDA CYLNO get cylinder DCP12 OTA DC DCP13 STC DC,C output to data channel LDA SKCMD get seek command IOR DRIVE CCP15 OTA CC output to command channel CCP16 STC CC,C initiate seek DCP14 SFS DC first address word accepted? JMP *-1 no, wait LDA HDSEC get head/sector DCP15 OTA DC DCP16 STC DC,C output to data channel CCP17 SFS CC seek complete? JMP *-1 no, wait * JSB STA call status sub * SLA skip if any-error clear * JMP SERR hard error if seek error * check for errors manually if needed.. the sim wants to * return status 13 (or 40001) sometimes when nothing seems to be wrong JMP LSEEK,I exit subroutine * *SERR HLT 55 halt on seek error ERR HLT 33 halt on other error C6 OCT 6 C8 DEC 8 CM24 DEC -24 C377 OCT 377 C1774 OCT 177400 CB15 OCT 100000 CB8 OCT 000400 SB1 OCT 101000 sets low 8 bits of block address SB2 OCT 102000 sets next 8 bits of block address RSD OCT 100000 reset drive, zeros block address * SB3 and SB4 not needed.. only 1218 1KW block sectors available.. PARM OCT 0 command parm here BLADR OCT 0 block address (logical 1K sector) HDSEC OCT 0 formatted head/sector CYLNO OCT 0 cylinder number STCMD OCT 000000 status command WRCMD OCT 010000 write command RDCMD OCT 020000 read command SKCMD OCT 030000 seek command CW1 OCT 120016 dma cw1 for read, note slot 16 CW1W OCT 100016 dma cw1 for write, note slot 16 CW2 OCT 0 set to dma adr CW3 OCT -2000 dma -len for 1KW * seek, sets BLADR to BLKAL (loc 250), equivalent to 101xxx >IDE etc ASEEK DEF *+1 SEEKC NOP LDA BLKAL STA BLADR JMP SEEKC,I * boot, seek first ABOOT DEF *+1 BOOT NOP LDA BLADR STA BLKAL tell the boot code where to boot from LDA BOOTC STA FROM LDA DEST STA TO BOOTL LDA FROM,I STA TO,I ISZ TO LDA FROM CPA BOOTE JMP DEST,I INA STA FROM JMP BOOTL BOOTC DEF *+1 * from 077500 to 077641 (last 5 loc's omitted) OCT 060246 OCT 073637 OCT 060250 OCT 013621 OCT 073640 OCT 060250 OCT 013622 OCT 006400 OCT 002002 OCT 067623 OCT 077641 OCT 017553 DCP19 OCT 106716 CCP18 OCT 106717 OCT 063615 OCT 102606 OCT 106702 OCT 063634 OCT 102602 OCT 102702 OCT 063616 OCT 102602 OCT 063617 OCT 033640 CCP19 OCT 102617 DCP20 OCT 103716 OCT 103706 CCP20 OCT 103717 CCP21 OCT 102317 OCT 027534 OCT 037633 OCT 027543 OCT 103106 OCT 127542 OCT 000002 OCT 017545 OCT 027513 OCT 000000 OCT 063634 OCT 043632 OCT 073634 OCT 037637 OCT 127545 OCT 000000 OCT 063637 OCT 006400 OCT 100400 OCT 077625 OCT 073635 OCT 060001 OCT 100200 OCT 077626 OCT 073636 OCT 043627 OCT 002020 OCT 027572 OCT 033630 OCT 073636 DCP21 OCT 106716 CCP22 OCT 106717 OCT 063635 DCP22 OCT 102616 DCP23 OCT 103716 OCT 063620 OCT 033640 DCP24 OCT 103716 CCP23 OCT 102617 CCP24 OCT 103717 DCP25 OCT 102316 OCT 027604 OCT 063636 OCT 033641 DCP26 OCT 102616 DCP27 OCT 103716 CCP25 OCT 102317 OCT 027612 OCT 127553 DCP28 OCT 120016 OCT 176000 OCT 020000 OCT 030000 OCT 000003 OCT 000004 OCT 001000 OCT 000003 OCT 000006 OCT 000010 OCT 177750 OCT 000400 OCT 001000 OCT 002000 OCT 177741 OCT 100002 BOOTE DEF *-1 DEST OCT 77500 FROM OCT 0 TO OCT 0 END ;--- end of 13210A/7900 driver code "Done" $PRINT CONSOLE