014
19.07.2009, 18:34 Uhr
winielektronik
|
Hallo Wolfram ich habe mir den Z80 Sockel mit den benötigten Signalen 1:1 an den ECB-Bus angeschlossen. Da meine CPU frei Programierbar ist und ich die möglichkeit habe EPROMs, PAL, GALs zu brennen, konnte ich alles zu einer Einheit bringen. Nimm eine leere Euro-Karte mit VG-Leiste befestige das IDE-Board darauf. Verbinde dann die Signeld zum Z80-Sockel die benötigt werden. Uhr geht an ECB-Bus nicht. Schreibe dir dann erst zum Test eine ID-Lese routine damit du sicher sein kannst ob alles geht. Und das ist die Routinen aus idgen die du für den Zugriff brauche Wenn ich Sicher bin das alles geht mache ich mir ein Schaltplan mit "Eagle" Gruß Hansjörg
;***********************************************************
CmdID EQU 0ECH ; Identify Drive
;*************************************************************** ;Function: ReadHst ;Purpose: Do physical read of IDE drive ;Entry: hstdsk, hsttrk, hstdsk set up ;Exit: sector read into hstbuf ;Used: all
Readhst: call tfsetup ;set up Task File ld a,CmdID ;get a read command out (IdeCmd),a ;send to task file call WaitDrq ;wait for data inir inir ;read 512 bytes chkerr: in a,(IdeStat) ;get status and 1 ;check error bit ret ;return error/no error
;*************************************************************** ;Function: TFsetup ;Purpose: send host parms to IDE Task File registers ;Entry: hstdsk, hsttrk, hstsec set up ;Exit: Task file registers set up. HL points to hstbuf, ; BC has count, data port address
tfsetup: in a,(IdeStat) ;get status rla ;BSY bit to Carry jr c,tfsetup ;loop until not BUSY ; ld a,1 ;1-sector transfer out (IdeSCnt),a ;tell IDE drive ld a,(hstsec) ;get host sector number inc a ;bump up to 1 out (IdeSNum),a ;send to Task File ld hl,(hsttrk) ;get host track ld a,l ;get low order byte out (IdeCLo),a ;send to Task File ld a,h ;get high-order byte out (IdeCHi),a ;send to task file ld a,(hstdsk) ;get host disk number or 0a0h ;make into SDH byte out (IdeSDH),a ;send to drive! ; ld hl,(ADRHST) ;HL points to host buffer ld bc,IdeDat ;BC has count, port ret ;and go back
;*************************************************************** ;Function: WaitDrq ;Purpose: Wait until data available or ready for data ;Entry: None ;Exit: None ;Uses: AF
WaitDrq: in a,(IdeCmd) bit 3,a jr z,WaitDrq ret |