Mercurial > hg > Members > kono > nitros9-code
comparison level1/modules/rb1773.asm @ 1746:5469aad825d7
*** empty log message ***
author | robert |
---|---|
date | Fri, 28 Jan 2005 00:22:49 +0000 |
parents | fdb0dde809d2 |
children | 9d95e3246a61 |
comparison
equal
deleted
inserted
replaced
1745:3beb3d140cb5 | 1746:5469aad825d7 |
---|---|
71 * | 71 * |
72 * 2004/07/11 Robert Gault | 72 * 2004/07/11 Robert Gault |
73 * Corrected the error handling code for read & write to separate SCII errors | 73 * Corrected the error handling code for read & write to separate SCII errors |
74 * from OS-9 errors. Changed drive test from compare #4 to compare #N.Drives to | 74 * from OS-9 errors. Changed drive test from compare #4 to compare #N.Drives to |
75 * permit up to 6 drives using alternate table. | 75 * permit up to 6 drives using alternate table. |
76 * | |
77 * 2005/01/27 Robert Gault | |
78 * Separated the sector write and format write loops so that the CPU clock | |
79 * can be slowed down during formats. This "corrects" problems some hardware | |
80 * have with the current NitrOS-9 during formats. | |
76 | 81 |
77 nam rb1773 | 82 nam rb1773 |
78 ttl Western Digital 1773 Disk Controller Driver | 83 ttl Western Digital 1773 Disk Controller Driver |
79 | 84 |
80 * These lines needed if assembling with on a Color computer. | 85 * These lines needed if assembling with on a Color computer. |
740 *** added blobstop | 745 *** added blobstop |
741 IFGT Level-1 | 746 IFGT Level-1 |
742 lda FBlock+1,u get the block number for format | 747 lda FBlock+1,u get the block number for format |
743 beq L0230 if not format, don't do anything | 748 beq L0230 if not format, don't do anything |
744 sta >$FFA1 otherwise map the block in | 749 sta >$FFA1 otherwise map the block in |
745 ENDC | 750 * added delay for for MMU line settling. RG 2005/1/23 |
746 L0230 stb >DPort+CtrlReg send data to control register | |
747 * These lines added to match read routine. Should be better timing. RG | |
748 nop | 751 nop |
749 nop | 752 nop |
753 ENDC | |
754 L0230 stb >DPort+CtrlReg send data to control register | |
755 * These lines converted to separate sector writes from format. RG | |
756 * nop | |
757 * nop | |
758 cmpb #$F0 if format, then | |
759 beq L0240b go to special loop | |
750 bra L0240 wait a bit for HALT to enable | 760 bra L0240 wait a bit for HALT to enable |
751 | 761 |
752 * Write sector routine (Entry: B= drive/side select) (NMI will break out) | 762 * Write sector routine (Entry: B= drive/side select) (NMI will break out) |
753 * Part of timing change mentioned above. RG | 763 * Part of timing change mentioned above. RG |
754 *L0240 nop --- wait a bit more | 764 *L0240 nop --- wait a bit more |
762 * See above. RG | 772 * See above. RG |
763 nop | 773 nop |
764 ENDC | 774 ENDC |
765 * stb >DPort+CtrlReg Set up to read next byte | 775 * stb >DPort+CtrlReg Set up to read next byte |
766 bra L0240 Go read it | 776 bra L0240 Go read it |
767 | 777 * Special loop for format slows CPU clock. RG |
778 L0240b sta >$FFD8 | |
779 L0240c lda ,x+ | |
780 sta >DPort+WD_Data | |
781 bra L0240b | |
768 * NMI routine | 782 * NMI routine |
769 NMISvc leas R$Size,s Eat register stack | 783 NMISvc leas R$Size,s Eat register stack |
784 * Added to compensate above change in format loop. RG | |
785 sta >$FFD9 | |
770 IFGT Level-1 | 786 IFGT Level-1 |
771 ldx <D.SysDAT get pointer to system DAT image | 787 ldx <D.SysDAT get pointer to system DAT image |
772 lda 3,x get block number 1 | 788 lda 3,x get block number 1 |
773 sta >$FFA1 map it back into memory | 789 sta >$FFA1 map it back into memory |
774 ENDC | 790 ENDC |