2007-03-26 14:18:08 +02:00
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
|
;; ;;
|
|
|
|
|
;; Copyright (C) KolibriOS team 2004-2007. All rights reserved. ;;
|
|
|
|
|
;; Distributed under terms of the GNU General Public License ;;
|
|
|
|
|
;; ;;
|
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
|
|
2007-07-27 15:52:03 +02:00
|
|
|
|
$Revision$
|
|
|
|
|
|
|
|
|
|
|
2006-06-18 18:42:03 +02:00
|
|
|
|
;**********************************************************
|
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>D (ATAPI)
|
|
|
|
|
;**********************************************************
|
2007-09-02 22:44:43 +02:00
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Mario79
|
2006-06-18 18:42:03 +02:00
|
|
|
|
|
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2007-06-14 20:21:03 +02:00
|
|
|
|
MaxRetr equ 10
|
2006-06-18 18:42:03 +02:00
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
; (<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)
|
|
|
|
|
BSYWaitTime equ 1000 ;2
|
2007-06-08 16:17:17 +02:00
|
|
|
|
NoTickWaitTime equ 0xfffff
|
2008-02-26 00:34:27 +01:00
|
|
|
|
|
2006-06-18 18:42:03 +02:00
|
|
|
|
;*************************************************
|
|
|
|
|
;* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> *
|
|
|
|
|
;* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> *
|
|
|
|
|
;* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> *
|
|
|
|
|
;* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> *
|
|
|
|
|
;* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: *
|
|
|
|
|
;* ChannelNumber - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>; *
|
|
|
|
|
;* DiskNumber - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>; *
|
|
|
|
|
;* CDSectorAddress - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. *
|
|
|
|
|
;* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> CDDataBuf. *
|
|
|
|
|
;*************************************************
|
|
|
|
|
ReadCD:
|
2009-09-18 20:30:04 +02:00
|
|
|
|
pusha
|
2006-06-18 18:42:03 +02:00
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2009-09-18 20:30:04 +02:00
|
|
|
|
mov [CDBlockSize],2048 ;2352
|
2006-06-18 18:42:03 +02:00
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2009-09-18 20:30:04 +02:00
|
|
|
|
call clear_packet_buffer
|
2006-06-18 18:42:03 +02:00
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2009-09-18 20:30:04 +02:00
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Read CD
|
|
|
|
|
mov [PacketCommand],byte 0x28 ;0xBE
|
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
mov AX,word [CDSectorAddress+2]
|
|
|
|
|
xchg AL,AH
|
|
|
|
|
mov word [PacketCommand+2],AX
|
|
|
|
|
mov AX,word [CDSectorAddress]
|
|
|
|
|
xchg AL,AH
|
|
|
|
|
mov word [PacketCommand+4],AX
|
2006-06-18 18:42:03 +02:00
|
|
|
|
; mov eax,[CDSectorAddress]
|
|
|
|
|
; mov [PacketCommand+2],eax
|
2009-09-18 20:30:04 +02:00
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
mov [PacketCommand+8],byte 1
|
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2006-06-18 18:42:03 +02:00
|
|
|
|
; mov [PacketCommand+9],byte 0xF8
|
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2009-09-18 20:30:04 +02:00
|
|
|
|
call SendPacketDatCommand
|
|
|
|
|
popa
|
|
|
|
|
ret
|
2006-06-18 18:42:03 +02:00
|
|
|
|
|
|
|
|
|
;********************************************
|
|
|
|
|
;* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> *
|
|
|
|
|
;* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> *
|
|
|
|
|
;********************************************
|
|
|
|
|
ReadCDWRetr:
|
2007-07-22 22:52:21 +02:00
|
|
|
|
;-----------------------------------------------------------
|
|
|
|
|
; input : eax = block to read
|
|
|
|
|
; ebx = destination
|
|
|
|
|
;-----------------------------------------------------------
|
|
|
|
|
pushad
|
|
|
|
|
mov eax,[CDSectorAddress]
|
|
|
|
|
mov ebx,[CDDataBuf_pointer]
|
|
|
|
|
call cd_calculate_cache
|
|
|
|
|
add esi,8
|
|
|
|
|
mov edi,1
|
|
|
|
|
.hdreadcache:
|
|
|
|
|
; cmp dword [esi+4],0 ; empty
|
|
|
|
|
; je .nohdcache
|
2009-09-18 20:30:04 +02:00
|
|
|
|
cmp [esi],eax ; correct sector
|
|
|
|
|
je .yeshdcache
|
2007-07-22 22:52:21 +02:00
|
|
|
|
.nohdcache:
|
|
|
|
|
add esi,8
|
|
|
|
|
inc edi
|
|
|
|
|
dec ecx
|
|
|
|
|
jnz .hdreadcache
|
2009-09-18 20:30:04 +02:00
|
|
|
|
call find_empty_slot_CD_cache ; ret in edi
|
2007-07-22 22:52:21 +02:00
|
|
|
|
|
|
|
|
|
push edi
|
|
|
|
|
push eax
|
|
|
|
|
call cd_calculate_cache_2
|
|
|
|
|
shl edi,11
|
|
|
|
|
add edi,eax
|
|
|
|
|
mov [CDDataBuf_pointer],edi
|
|
|
|
|
pop eax
|
|
|
|
|
pop edi
|
|
|
|
|
|
|
|
|
|
call ReadCDWRetr_1
|
2007-09-16 22:06:19 +02:00
|
|
|
|
cmp [DevErrorCode],0
|
|
|
|
|
jne .exit
|
|
|
|
|
|
2007-07-22 22:52:21 +02:00
|
|
|
|
mov [CDDataBuf_pointer],ebx
|
|
|
|
|
call cd_calculate_cache_1
|
|
|
|
|
lea esi,[edi*8+esi]
|
2009-09-18 20:30:04 +02:00
|
|
|
|
mov [esi],eax ; sector number
|
2007-07-22 22:52:21 +02:00
|
|
|
|
; mov dword [esi+4],1 ; hd read - mark as same as in hd
|
|
|
|
|
.yeshdcache:
|
|
|
|
|
mov esi,edi
|
|
|
|
|
shl esi,11 ;9
|
|
|
|
|
push eax
|
|
|
|
|
call cd_calculate_cache_2
|
|
|
|
|
add esi,eax
|
|
|
|
|
pop eax
|
|
|
|
|
mov edi,ebx ;[CDDataBuf_pointer]
|
|
|
|
|
mov ecx,512 ;/4
|
|
|
|
|
cld
|
2009-09-18 20:30:04 +02:00
|
|
|
|
rep movsd ; move data
|
2007-09-16 22:06:19 +02:00
|
|
|
|
.exit:
|
2007-07-22 22:52:21 +02:00
|
|
|
|
popad
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
ReadCDWRetr_1:
|
2009-09-18 20:30:04 +02:00
|
|
|
|
pushad
|
2007-07-22 22:52:21 +02:00
|
|
|
|
|
2006-06-18 18:42:03 +02:00
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>
|
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2009-09-18 20:30:04 +02:00
|
|
|
|
mov ECX,MaxRetr
|
2006-06-18 18:42:03 +02:00
|
|
|
|
@@NextRetr:
|
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2009-09-18 20:30:04 +02:00
|
|
|
|
call ReadCD
|
|
|
|
|
cmp [DevErrorCode],0
|
|
|
|
|
je @@End_4
|
2007-07-22 22:52:21 +02:00
|
|
|
|
|
2009-09-18 20:30:04 +02:00
|
|
|
|
or ecx,ecx ;{SPraid.simba} (for cd load)
|
|
|
|
|
jz @@End_4
|
|
|
|
|
dec ecx
|
2007-07-22 22:52:21 +02:00
|
|
|
|
|
2009-09-18 20:30:04 +02:00
|
|
|
|
cmp [timer_ticks_enable],0
|
|
|
|
|
jne @f
|
|
|
|
|
mov eax,NoTickWaitTime
|
2007-06-08 16:17:17 +02:00
|
|
|
|
.wait:
|
2009-09-18 20:30:04 +02:00
|
|
|
|
dec eax
|
|
|
|
|
cmp eax,0
|
|
|
|
|
je @@NextRetr
|
|
|
|
|
jmp .wait
|
2007-06-08 16:17:17 +02:00
|
|
|
|
@@:
|
2006-06-18 18:42:03 +02:00
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> 2,5 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2008-02-26 00:34:27 +01:00
|
|
|
|
; mov EAX,[timer_ticks]
|
|
|
|
|
; add EAX,50 ;250
|
2007-09-16 22:06:19 +02:00
|
|
|
|
;@@Wait:
|
2008-02-26 00:34:27 +01:00
|
|
|
|
; call change_task
|
|
|
|
|
; cmp EAX,[timer_ticks]
|
|
|
|
|
; ja @@Wait
|
2009-09-18 20:30:04 +02:00
|
|
|
|
loop @@NextRetr
|
2006-06-18 18:42:03 +02:00
|
|
|
|
@@End_4:
|
2009-09-18 20:30:04 +02:00
|
|
|
|
popad
|
|
|
|
|
ret
|
2006-06-18 18:42:03 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> PIO
|
|
|
|
|
|
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)
|
|
|
|
|
MaxCDWaitTime equ 1000 ;200 ;10 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2009-09-18 20:30:04 +02:00
|
|
|
|
PacketCommand: rb 12 ;DB 12 DUP (?)
|
2006-06-18 18:42:03 +02:00
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
;CDDataBuf DB 4096 DUP (0)
|
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2009-09-18 20:30:04 +02:00
|
|
|
|
CDBlockSize DW ?
|
2006-06-18 18:42:03 +02:00
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
CDSectorAddress: DD ?
|
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
TickCounter_1 DD 0
|
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
WURStartTime DD 0
|
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
CDDataBuf_pointer dd 0
|
|
|
|
|
|
|
|
|
|
;****************************************************
|
|
|
|
|
;* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ATAPI <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, *
|
|
|
|
|
;* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> *
|
|
|
|
|
;* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 2048 <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> *
|
|
|
|
|
;* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> *
|
|
|
|
|
;* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: *
|
|
|
|
|
;* ChannelNumber - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>; *
|
|
|
|
|
;* DiskNumber - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>; *
|
|
|
|
|
;* PacketCommand - 12-<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>; *
|
|
|
|
|
;* CDBlockSize - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. *
|
|
|
|
|
;****************************************************
|
|
|
|
|
SendPacketDatCommand:
|
2009-09-18 20:30:04 +02:00
|
|
|
|
pushad
|
|
|
|
|
mov [DevErrorCode],0
|
2006-06-18 18:42:03 +02:00
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> CHS
|
2009-09-18 20:30:04 +02:00
|
|
|
|
mov [ATAAddressMode],0
|
2006-06-18 18:42:03 +02:00
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ATA-<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2009-09-18 20:30:04 +02:00
|
|
|
|
mov [ATAFeatures],0
|
|
|
|
|
mov [ATASectorCount],0
|
|
|
|
|
mov [ATASectorNumber],0
|
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
mov AX,[CDBlockSize]
|
|
|
|
|
mov [ATACylinder],AX
|
|
|
|
|
mov [ATAHead],0
|
|
|
|
|
mov [ATACommand],0A0h
|
|
|
|
|
call SendCommandToHDD_1
|
|
|
|
|
cmp [DevErrorCode],0 ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
jne @@End_8 ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2006-06-18 18:42:03 +02:00
|
|
|
|
|
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2009-09-18 20:30:04 +02:00
|
|
|
|
mov DX,[ATABasePortAddr]
|
|
|
|
|
add DX,7 ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD> 1<EFBFBD>7h
|
|
|
|
|
mov ecx,NoTickWaitTime
|
2006-06-18 18:42:03 +02:00
|
|
|
|
@@WaitDevice0:
|
2009-09-18 20:30:04 +02:00
|
|
|
|
cmp [timer_ticks_enable],0
|
|
|
|
|
jne @f
|
|
|
|
|
dec ecx
|
|
|
|
|
cmp ecx,0
|
|
|
|
|
je @@Err1_1
|
|
|
|
|
jmp .test
|
2007-06-08 16:17:17 +02:00
|
|
|
|
@@:
|
2009-09-18 20:30:04 +02:00
|
|
|
|
call change_task
|
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
mov EAX,[timer_ticks]
|
|
|
|
|
sub EAX,[TickCounter_1]
|
|
|
|
|
cmp EAX,BSYWaitTime
|
|
|
|
|
ja @@Err1_1 ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>-<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2007-06-08 16:17:17 +02:00
|
|
|
|
.test:
|
2009-09-18 20:30:04 +02:00
|
|
|
|
in AL,DX
|
|
|
|
|
test AL,80h ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> BSY
|
|
|
|
|
jnz @@WaitDevice0
|
|
|
|
|
test AL,08h ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> DRQ
|
|
|
|
|
jz @@WaitDevice0
|
|
|
|
|
test AL,1 ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ERR
|
|
|
|
|
jnz @@Err6
|
2006-06-18 18:42:03 +02:00
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2009-09-18 20:30:04 +02:00
|
|
|
|
cli
|
|
|
|
|
mov DX,[ATABasePortAddr]
|
|
|
|
|
mov AX,[PacketCommand]
|
|
|
|
|
out DX,AX
|
|
|
|
|
mov AX,[PacketCommand+2]
|
|
|
|
|
out DX,AX
|
|
|
|
|
mov AX,[PacketCommand+4]
|
|
|
|
|
out DX,AX
|
|
|
|
|
mov AX,[PacketCommand+6]
|
|
|
|
|
out DX,AX
|
|
|
|
|
mov AX,[PacketCommand+8]
|
|
|
|
|
out DX,AX
|
|
|
|
|
mov AX,[PacketCommand+10]
|
|
|
|
|
out DX,AX
|
|
|
|
|
sti
|
2006-06-18 18:42:03 +02:00
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2009-09-18 20:30:04 +02:00
|
|
|
|
mov DX,[ATABasePortAddr]
|
|
|
|
|
add DX,7 ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD> 1<EFBFBD>7h
|
|
|
|
|
mov ecx,NoTickWaitTime
|
2006-06-18 18:42:03 +02:00
|
|
|
|
@@WaitDevice1:
|
2009-09-18 20:30:04 +02:00
|
|
|
|
cmp [timer_ticks_enable],0
|
|
|
|
|
jne @f
|
|
|
|
|
dec ecx
|
|
|
|
|
cmp ecx,0
|
|
|
|
|
je @@Err1_1
|
|
|
|
|
jmp .test_1
|
2007-06-08 16:17:17 +02:00
|
|
|
|
@@:
|
2009-09-18 20:30:04 +02:00
|
|
|
|
call change_task
|
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
mov EAX,[timer_ticks]
|
|
|
|
|
sub EAX,[TickCounter_1]
|
|
|
|
|
cmp EAX,MaxCDWaitTime
|
|
|
|
|
ja @@Err1_1 ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>-<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2007-06-08 16:17:17 +02:00
|
|
|
|
.test_1:
|
2009-09-18 20:30:04 +02:00
|
|
|
|
in AL,DX
|
|
|
|
|
test AL,80h ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> BSY
|
|
|
|
|
jnz @@WaitDevice1
|
|
|
|
|
test AL,08h ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> DRQ
|
|
|
|
|
jz @@WaitDevice1
|
|
|
|
|
test AL,1 ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ERR
|
|
|
|
|
jnz @@Err6_temp
|
2006-06-18 18:42:03 +02:00
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2009-09-18 20:30:04 +02:00
|
|
|
|
mov EDI,[CDDataBuf_pointer] ;0x7000 ;CDDataBuf
|
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
mov DX,[ATABasePortAddr] ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD> 1x0h
|
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
xor ecx,ecx
|
|
|
|
|
mov CX,[CDBlockSize]
|
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> 16-<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
shr CX,1 ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> 2
|
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
cli
|
|
|
|
|
cld
|
|
|
|
|
rep insw
|
|
|
|
|
sti
|
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
jmp @@End_8
|
2006-06-18 18:42:03 +02:00
|
|
|
|
|
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
@@Err1_1:
|
2009-09-18 20:30:04 +02:00
|
|
|
|
mov [DevErrorCode],1
|
|
|
|
|
jmp @@End_8
|
2006-06-18 18:42:03 +02:00
|
|
|
|
@@Err6_temp:
|
2009-09-18 20:30:04 +02:00
|
|
|
|
mov [DevErrorCode],7
|
|
|
|
|
jmp @@End_8
|
2006-06-18 18:42:03 +02:00
|
|
|
|
@@Err6:
|
2009-09-18 20:30:04 +02:00
|
|
|
|
mov [DevErrorCode],6
|
2006-06-18 18:42:03 +02:00
|
|
|
|
@@End_8:
|
2009-09-18 20:30:04 +02:00
|
|
|
|
popad
|
|
|
|
|
ret
|
2006-06-18 18:42:03 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;***********************************************
|
|
|
|
|
;* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ATAPI <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, *
|
|
|
|
|
;* <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> *
|
|
|
|
|
;* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> *
|
|
|
|
|
;* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: *
|
|
|
|
|
;* ChannelNumber - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>; *
|
|
|
|
|
;* DiskNumber - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>; *
|
|
|
|
|
;* PacketCommand - 12-<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. *
|
|
|
|
|
;***********************************************
|
|
|
|
|
SendPacketNoDatCommand:
|
2009-09-18 20:30:04 +02:00
|
|
|
|
pushad
|
2007-09-16 22:06:19 +02:00
|
|
|
|
mov [DevErrorCode],0
|
2006-06-18 18:42:03 +02:00
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> CHS
|
2009-09-18 20:30:04 +02:00
|
|
|
|
mov [ATAAddressMode],0
|
2006-06-18 18:42:03 +02:00
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ATA-<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2009-09-18 20:30:04 +02:00
|
|
|
|
mov [ATAFeatures],0
|
|
|
|
|
mov [ATASectorCount],0
|
|
|
|
|
mov [ATASectorNumber],0
|
|
|
|
|
mov [ATACylinder],0
|
|
|
|
|
mov [ATAHead],0
|
|
|
|
|
mov [ATACommand],0A0h
|
|
|
|
|
call SendCommandToHDD_1
|
|
|
|
|
cmp [DevErrorCode],0 ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
jne @@End_9 ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2006-06-18 18:42:03 +02:00
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2009-09-18 20:30:04 +02:00
|
|
|
|
mov DX,[ATABasePortAddr]
|
|
|
|
|
add DX,7 ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD> 1<EFBFBD>7h
|
2006-06-18 18:42:03 +02:00
|
|
|
|
@@WaitDevice0_1:
|
2009-09-18 20:30:04 +02:00
|
|
|
|
call change_task
|
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
mov EAX,[timer_ticks]
|
|
|
|
|
sub EAX,[TickCounter_1]
|
|
|
|
|
cmp EAX,BSYWaitTime
|
|
|
|
|
ja @@Err1_3 ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>-<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
in AL,DX
|
|
|
|
|
test AL,80h ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> BSY
|
|
|
|
|
jnz @@WaitDevice0_1
|
|
|
|
|
test AL,1 ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ERR
|
|
|
|
|
jnz @@Err6_1
|
|
|
|
|
test AL,08h ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> DRQ
|
|
|
|
|
jz @@WaitDevice0_1
|
2006-06-18 18:42:03 +02:00
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
; cli
|
2009-09-18 20:30:04 +02:00
|
|
|
|
mov DX,[ATABasePortAddr]
|
|
|
|
|
mov AX,word [PacketCommand]
|
|
|
|
|
out DX,AX
|
|
|
|
|
mov AX,word [PacketCommand+2]
|
|
|
|
|
out DX,AX
|
|
|
|
|
mov AX,word [PacketCommand+4]
|
|
|
|
|
out DX,AX
|
|
|
|
|
mov AX,word [PacketCommand+6]
|
|
|
|
|
out DX,AX
|
|
|
|
|
mov AX,word [PacketCommand+8]
|
|
|
|
|
out DX,AX
|
|
|
|
|
mov AX,word [PacketCommand+10]
|
|
|
|
|
out DX,AX
|
2006-06-18 18:42:03 +02:00
|
|
|
|
; sti
|
2007-09-02 22:44:43 +02:00
|
|
|
|
cmp [ignore_CD_eject_wait],1
|
2009-09-18 20:30:04 +02:00
|
|
|
|
je @@End_9
|
2006-06-18 18:42:03 +02:00
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2009-09-18 20:30:04 +02:00
|
|
|
|
mov DX,[ATABasePortAddr]
|
|
|
|
|
add DX,7 ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD> 1<EFBFBD>7h
|
2006-06-18 18:42:03 +02:00
|
|
|
|
@@WaitDevice1_1:
|
2009-09-18 20:30:04 +02:00
|
|
|
|
call change_task
|
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
mov EAX,[timer_ticks]
|
|
|
|
|
sub EAX,[TickCounter_1]
|
|
|
|
|
cmp EAX,MaxCDWaitTime
|
|
|
|
|
ja @@Err1_3 ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>-<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
in AL,DX
|
|
|
|
|
test AL,80h ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> BSY
|
|
|
|
|
jnz @@WaitDevice1_1
|
|
|
|
|
test AL,1 ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ERR
|
|
|
|
|
jnz @@Err6_1
|
|
|
|
|
test AL,40h ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> DRDY
|
|
|
|
|
jz @@WaitDevice1_1
|
|
|
|
|
jmp @@End_9
|
2006-06-18 18:42:03 +02:00
|
|
|
|
|
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
@@Err1_3:
|
2009-09-18 20:30:04 +02:00
|
|
|
|
mov [DevErrorCode],1
|
|
|
|
|
jmp @@End_9
|
2006-06-18 18:42:03 +02:00
|
|
|
|
@@Err6_1:
|
2009-09-18 20:30:04 +02:00
|
|
|
|
mov [DevErrorCode],6
|
2006-06-18 18:42:03 +02:00
|
|
|
|
@@End_9:
|
2009-09-18 20:30:04 +02:00
|
|
|
|
popad
|
|
|
|
|
ret
|
2006-06-18 18:42:03 +02:00
|
|
|
|
|
|
|
|
|
;****************************************************
|
|
|
|
|
;* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> *
|
|
|
|
|
;* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> *
|
|
|
|
|
;* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: *
|
|
|
|
|
;* ChannelNumber - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (1 <EFBFBD><EFBFBD><EFBFBD> 2); *
|
|
|
|
|
;* DiskNumber - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (0 <EFBFBD><EFBFBD><EFBFBD> 1); *
|
|
|
|
|
;* ATAFeatures - "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"; *
|
|
|
|
|
;* ATASectorCount - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>; *
|
|
|
|
|
;* ATASectorNumber - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>; *
|
|
|
|
|
;* ATACylinder - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>; *
|
|
|
|
|
;* ATAHead - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>; *
|
|
|
|
|
;* ATAAddressMode - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (0-CHS, 1-LBA); *
|
|
|
|
|
;* ATACommand - <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. *
|
|
|
|
|
;* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: *
|
|
|
|
|
;* <EFBFBD> ATABasePortAddr - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> HDD; *
|
|
|
|
|
;* <EFBFBD> DevErrorCode - <EFBFBD><EFBFBD><EFBFBD><EFBFBD>. *
|
|
|
|
|
;* <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> DevErrorCode <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> *
|
|
|
|
|
;* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. *
|
|
|
|
|
;****************************************************
|
|
|
|
|
SendCommandToHDD_1:
|
2009-09-18 20:30:04 +02:00
|
|
|
|
pushad
|
2007-09-16 22:06:19 +02:00
|
|
|
|
mov [DevErrorCode],0
|
2006-06-18 18:42:03 +02:00
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2009-09-18 20:30:04 +02:00
|
|
|
|
cmp [ATAAddressMode],1
|
|
|
|
|
ja @@Err2_4
|
2006-06-18 18:42:03 +02:00
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2009-09-18 20:30:04 +02:00
|
|
|
|
mov BX,[ChannelNumber]
|
|
|
|
|
cmp BX,1
|
|
|
|
|
jb @@Err3_4
|
|
|
|
|
cmp BX,2
|
|
|
|
|
ja @@Err3_4
|
2006-06-18 18:42:03 +02:00
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2009-09-18 20:30:04 +02:00
|
|
|
|
dec BX
|
|
|
|
|
shl BX,1
|
|
|
|
|
movzx ebx,bx
|
|
|
|
|
mov AX,[ebx+StandardATABases]
|
|
|
|
|
mov [ATABasePortAddr],AX
|
2006-06-18 18:42:03 +02:00
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> HDD <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2009-09-18 20:30:04 +02:00
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
mov DX,[ATABasePortAddr]
|
|
|
|
|
add DX,6 ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
mov AL,[DiskNumber]
|
|
|
|
|
cmp AL,1 ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
ja @@Err4_4
|
|
|
|
|
shl AL,4
|
|
|
|
|
or AL,10100000b
|
|
|
|
|
out DX,AL
|
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
inc DX
|
|
|
|
|
mov eax,[timer_ticks]
|
|
|
|
|
mov [TickCounter_1],eax
|
|
|
|
|
mov ecx,NoTickWaitTime
|
2006-06-18 18:42:03 +02:00
|
|
|
|
@@WaitHDReady_2:
|
2009-09-18 20:30:04 +02:00
|
|
|
|
cmp [timer_ticks_enable],0
|
|
|
|
|
jne @f
|
|
|
|
|
dec ecx
|
|
|
|
|
cmp ecx,0
|
|
|
|
|
je @@Err1_4
|
|
|
|
|
jmp .test
|
2007-06-08 16:17:17 +02:00
|
|
|
|
@@:
|
2009-09-18 20:30:04 +02:00
|
|
|
|
call change_task
|
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
mov eax,[timer_ticks]
|
|
|
|
|
sub eax,[TickCounter_1]
|
|
|
|
|
cmp eax,BSYWaitTime ;300 ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 3 <EFBFBD><EFBFBD><EFBFBD>.
|
|
|
|
|
ja @@Err1_4 ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>-<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2007-06-08 16:17:17 +02:00
|
|
|
|
.test:
|
2009-09-18 20:30:04 +02:00
|
|
|
|
in AL,DX
|
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> BSY
|
|
|
|
|
test AL,80h
|
|
|
|
|
jnz @@WaitHDReady_2
|
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> DRQ
|
|
|
|
|
test AL,08h
|
|
|
|
|
jnz @@WaitHDReady_2
|
2007-06-08 16:17:17 +02:00
|
|
|
|
|
2006-06-18 18:42:03 +02:00
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2009-09-18 20:30:04 +02:00
|
|
|
|
cli
|
|
|
|
|
mov DX,[ATABasePortAddr]
|
|
|
|
|
inc DX ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
|
|
|
|
mov AL,[ATAFeatures]
|
|
|
|
|
out DX,AL
|
|
|
|
|
inc DX ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
mov AL,[ATASectorCount]
|
|
|
|
|
out DX,AL
|
|
|
|
|
inc DX ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
mov AL,[ATASectorNumber]
|
|
|
|
|
out DX,AL
|
|
|
|
|
inc DX ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>)
|
|
|
|
|
mov AX,[ATACylinder]
|
|
|
|
|
out DX,AL
|
|
|
|
|
inc DX ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>)
|
|
|
|
|
mov AL,AH
|
|
|
|
|
out DX,AL
|
|
|
|
|
inc DX ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>/<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
mov AL,[DiskNumber]
|
|
|
|
|
shl AL,4
|
|
|
|
|
cmp [ATAHead],0Fh ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
ja @@Err5_4
|
|
|
|
|
or AL,[ATAHead]
|
|
|
|
|
or AL,10100000b
|
|
|
|
|
mov AH,[ATAAddressMode]
|
|
|
|
|
shl AH,6
|
|
|
|
|
or AL,AH
|
|
|
|
|
out DX,AL
|
2006-06-18 18:42:03 +02:00
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2009-09-18 20:30:04 +02:00
|
|
|
|
mov AL,[ATACommand]
|
|
|
|
|
inc DX ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
out DX,AL
|
|
|
|
|
sti
|
2006-06-18 18:42:03 +02:00
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2009-09-18 20:30:04 +02:00
|
|
|
|
mov [DevErrorCode],0
|
|
|
|
|
jmp @@End_10
|
2006-06-18 18:42:03 +02:00
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
@@Err1_4:
|
2009-09-18 20:30:04 +02:00
|
|
|
|
mov [DevErrorCode],1
|
|
|
|
|
jmp @@End_10
|
2006-06-18 18:42:03 +02:00
|
|
|
|
@@Err2_4:
|
2009-09-18 20:30:04 +02:00
|
|
|
|
mov [DevErrorCode],2
|
|
|
|
|
jmp @@End_10
|
2006-06-18 18:42:03 +02:00
|
|
|
|
@@Err3_4:
|
2009-09-18 20:30:04 +02:00
|
|
|
|
mov [DevErrorCode],3
|
|
|
|
|
jmp @@End_10
|
2006-06-18 18:42:03 +02:00
|
|
|
|
@@Err4_4:
|
2009-09-18 20:30:04 +02:00
|
|
|
|
mov [DevErrorCode],4
|
|
|
|
|
jmp @@End_10
|
2006-06-18 18:42:03 +02:00
|
|
|
|
@@Err5_4:
|
2009-09-18 20:30:04 +02:00
|
|
|
|
mov [DevErrorCode],5
|
2006-06-18 18:42:03 +02:00
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
@@End_10:
|
2007-06-08 16:17:17 +02:00
|
|
|
|
; sti
|
2009-09-18 20:30:04 +02:00
|
|
|
|
popad
|
|
|
|
|
ret
|
2007-07-22 22:52:21 +02:00
|
|
|
|
|
2006-06-18 18:42:03 +02:00
|
|
|
|
;*************************************************
|
|
|
|
|
;* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> *
|
|
|
|
|
;* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> *
|
|
|
|
|
;* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: *
|
|
|
|
|
;* ChannelNumber - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>; *
|
|
|
|
|
;* DiskNumber - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. *
|
|
|
|
|
;*************************************************
|
|
|
|
|
WaitUnitReady:
|
2009-09-18 20:30:04 +02:00
|
|
|
|
pusha
|
2006-06-18 18:42:03 +02:00
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2009-09-18 20:30:04 +02:00
|
|
|
|
mov EAX,[timer_ticks]
|
|
|
|
|
mov [WURStartTime],EAX
|
2006-06-18 18:42:03 +02:00
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2009-09-18 20:30:04 +02:00
|
|
|
|
call clear_packet_buffer
|
2006-06-18 18:42:03 +02:00
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> TEST UNIT READY
|
2009-09-18 20:30:04 +02:00
|
|
|
|
mov [PacketCommand],word 00h
|
2006-06-18 18:42:03 +02:00
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2009-09-18 20:30:04 +02:00
|
|
|
|
mov ecx,NoTickWaitTime
|
2006-06-18 18:42:03 +02:00
|
|
|
|
@@SendCommand:
|
2009-09-18 20:30:04 +02:00
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
call SendPacketNoDatCommand
|
|
|
|
|
cmp [timer_ticks_enable],0
|
|
|
|
|
jne @f
|
|
|
|
|
cmp [DevErrorCode],0
|
|
|
|
|
je @@End_11
|
|
|
|
|
dec ecx
|
|
|
|
|
cmp ecx,0
|
|
|
|
|
je .Error
|
|
|
|
|
jmp @@SendCommand
|
2007-09-21 00:34:13 +02:00
|
|
|
|
@@:
|
2009-09-18 20:30:04 +02:00
|
|
|
|
call change_task
|
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
cmp [DevErrorCode],0
|
|
|
|
|
je @@End_11
|
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
mov EAX,[timer_ticks]
|
|
|
|
|
sub EAX,[WURStartTime]
|
|
|
|
|
cmp EAX,MaxCDWaitTime
|
|
|
|
|
jb @@SendCommand
|
2007-09-21 00:34:13 +02:00
|
|
|
|
.Error:
|
2009-09-18 20:30:04 +02:00
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>-<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
mov [DevErrorCode],1
|
2006-06-18 18:42:03 +02:00
|
|
|
|
@@End_11:
|
2009-09-18 20:30:04 +02:00
|
|
|
|
popa
|
|
|
|
|
ret
|
2007-07-22 22:52:21 +02:00
|
|
|
|
|
|
|
|
|
;*************************************************
|
|
|
|
|
;* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> *
|
|
|
|
|
;* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> *
|
|
|
|
|
;* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: *
|
|
|
|
|
;* ChannelNumber - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>; *
|
|
|
|
|
;* DiskNumber - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. *
|
|
|
|
|
;*************************************************
|
|
|
|
|
prevent_medium_removal:
|
2009-09-18 20:30:04 +02:00
|
|
|
|
pusha
|
2007-07-22 22:52:21 +02:00
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2009-09-18 20:30:04 +02:00
|
|
|
|
call clear_packet_buffer
|
2007-07-22 22:52:21 +02:00
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2009-09-18 20:30:04 +02:00
|
|
|
|
mov [PacketCommand],byte 0x1E
|
2007-07-22 22:52:21 +02:00
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
mov [PacketCommand+4],byte 11b
|
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2009-09-18 20:30:04 +02:00
|
|
|
|
call SendPacketNoDatCommand
|
|
|
|
|
mov eax,ATAPI_IDE0_lock
|
|
|
|
|
add eax,[cdpos]
|
|
|
|
|
dec eax
|
|
|
|
|
mov [eax],byte 1
|
|
|
|
|
popa
|
|
|
|
|
ret
|
2007-07-22 22:52:21 +02:00
|
|
|
|
|
|
|
|
|
;*************************************************
|
|
|
|
|
;* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> *
|
|
|
|
|
;* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> *
|
|
|
|
|
;* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: *
|
|
|
|
|
;* ChannelNumber - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>; *
|
|
|
|
|
;* DiskNumber - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. *
|
2007-09-02 22:44:43 +02:00
|
|
|
|
;*************************************************
|
2007-07-22 22:52:21 +02:00
|
|
|
|
allow_medium_removal:
|
2009-09-18 20:30:04 +02:00
|
|
|
|
pusha
|
2007-07-22 22:52:21 +02:00
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2009-09-18 20:30:04 +02:00
|
|
|
|
call clear_packet_buffer
|
2007-07-22 22:52:21 +02:00
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2009-09-18 20:30:04 +02:00
|
|
|
|
mov [PacketCommand],byte 0x1E
|
2007-07-22 22:52:21 +02:00
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
mov [PacketCommand+4],byte 00b
|
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2009-09-18 20:30:04 +02:00
|
|
|
|
call SendPacketNoDatCommand
|
|
|
|
|
mov eax,ATAPI_IDE0_lock
|
|
|
|
|
add eax,[cdpos]
|
|
|
|
|
dec eax
|
|
|
|
|
mov [eax],byte 0
|
|
|
|
|
popa
|
|
|
|
|
ret
|
2006-06-18 18:42:03 +02:00
|
|
|
|
|
|
|
|
|
;*************************************************
|
|
|
|
|
;* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> *
|
|
|
|
|
;* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> *
|
|
|
|
|
;* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: *
|
|
|
|
|
;* ChannelNumber - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>; *
|
|
|
|
|
;* DiskNumber - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. *
|
|
|
|
|
;*************************************************
|
|
|
|
|
LoadMedium:
|
2009-09-18 20:30:04 +02:00
|
|
|
|
pusha
|
2006-06-18 18:42:03 +02:00
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2009-09-18 20:30:04 +02:00
|
|
|
|
call clear_packet_buffer
|
2006-06-18 18:42:03 +02:00
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> START/STOP UNIT
|
2009-09-18 20:30:04 +02:00
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
mov [PacketCommand],word 1Bh
|
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
mov [PacketCommand+4],word 00000011b
|
2006-06-18 18:42:03 +02:00
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2009-09-18 20:30:04 +02:00
|
|
|
|
call SendPacketNoDatCommand
|
|
|
|
|
popa
|
|
|
|
|
ret
|
2006-06-18 18:42:03 +02:00
|
|
|
|
|
|
|
|
|
;*************************************************
|
|
|
|
|
;* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> *
|
|
|
|
|
;* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> *
|
|
|
|
|
;* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: *
|
|
|
|
|
;* ChannelNumber - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>; *
|
|
|
|
|
;* DiskNumber - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. *
|
|
|
|
|
;*************************************************
|
2007-07-22 22:52:21 +02:00
|
|
|
|
EjectMedium:
|
2009-09-18 20:30:04 +02:00
|
|
|
|
pusha
|
2006-06-18 18:42:03 +02:00
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2009-09-18 20:30:04 +02:00
|
|
|
|
call clear_packet_buffer
|
2006-06-18 18:42:03 +02:00
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> START/STOP UNIT
|
2009-09-18 20:30:04 +02:00
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
mov [PacketCommand],word 1Bh
|
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
mov [PacketCommand+4],word 00000010b
|
2006-06-18 18:42:03 +02:00
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2009-09-18 20:30:04 +02:00
|
|
|
|
call SendPacketNoDatCommand
|
|
|
|
|
popa
|
|
|
|
|
ret
|
2006-06-18 18:42:03 +02:00
|
|
|
|
|
|
|
|
|
;*************************************************
|
2007-09-02 22:44:43 +02:00
|
|
|
|
;* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> *
|
|
|
|
|
;* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> *
|
|
|
|
|
;* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> *
|
|
|
|
|
;* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: *
|
|
|
|
|
;* ChannelNumber - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>; *
|
|
|
|
|
;* DiskNumber - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. *
|
|
|
|
|
;*************************************************
|
2009-09-18 20:30:04 +02:00
|
|
|
|
align 4
|
2007-09-02 22:44:43 +02:00
|
|
|
|
check_ATAPI_device_event:
|
2009-09-18 20:30:04 +02:00
|
|
|
|
pusha
|
2007-09-02 22:44:43 +02:00
|
|
|
|
mov eax,[timer_ticks]
|
|
|
|
|
sub eax,[timer_ATAPI_check]
|
|
|
|
|
cmp eax,100
|
2009-09-18 20:30:04 +02:00
|
|
|
|
jb .end_1
|
2007-09-02 22:44:43 +02:00
|
|
|
|
mov al,[DRIVE_DATA+1]
|
|
|
|
|
and al,11b
|
|
|
|
|
cmp al,10b
|
2009-09-18 20:30:04 +02:00
|
|
|
|
jz .ide3
|
2007-09-02 22:44:43 +02:00
|
|
|
|
.ide2_1:
|
|
|
|
|
mov al,[DRIVE_DATA+1]
|
|
|
|
|
and al,1100b
|
|
|
|
|
cmp al,1000b
|
2009-09-18 20:30:04 +02:00
|
|
|
|
jz .ide2
|
2007-09-02 22:44:43 +02:00
|
|
|
|
.ide1_1:
|
|
|
|
|
mov al,[DRIVE_DATA+1]
|
|
|
|
|
and al,110000b
|
|
|
|
|
cmp al,100000b
|
2009-09-18 20:30:04 +02:00
|
|
|
|
jz .ide1
|
2007-09-02 22:44:43 +02:00
|
|
|
|
.ide0_1:
|
|
|
|
|
mov al,[DRIVE_DATA+1]
|
|
|
|
|
and al,11000000b
|
|
|
|
|
cmp al,10000000b
|
2009-09-18 20:30:04 +02:00
|
|
|
|
jz .ide0
|
2007-09-02 22:44:43 +02:00
|
|
|
|
.end:
|
|
|
|
|
|
|
|
|
|
sti
|
|
|
|
|
mov eax,[timer_ticks]
|
|
|
|
|
mov [timer_ATAPI_check],eax
|
|
|
|
|
.end_1:
|
2009-09-18 20:30:04 +02:00
|
|
|
|
popa
|
|
|
|
|
ret
|
2007-09-02 22:44:43 +02:00
|
|
|
|
|
|
|
|
|
.ide3:
|
|
|
|
|
cli
|
|
|
|
|
cmp [ATAPI_IDE3_lock],1
|
|
|
|
|
jne .ide2_1
|
|
|
|
|
cmp [IDE_Channel_2],0
|
|
|
|
|
jne .ide1_1
|
|
|
|
|
cmp [cd_status],0
|
|
|
|
|
jne .end
|
2009-09-18 20:30:04 +02:00
|
|
|
|
mov [IDE_Channel_2],1
|
2007-09-02 22:44:43 +02:00
|
|
|
|
call reserve_ok2
|
2009-09-18 20:30:04 +02:00
|
|
|
|
mov [ChannelNumber],2
|
|
|
|
|
mov [DiskNumber],1
|
|
|
|
|
mov [cdpos],4
|
|
|
|
|
call GetEvent_StatusNotification
|
|
|
|
|
cmp [CDDataBuf+4],byte 1
|
|
|
|
|
je .eject_ide3
|
|
|
|
|
call syscall_cdaudio.free
|
2007-09-02 22:44:43 +02:00
|
|
|
|
jmp .ide2_1
|
|
|
|
|
.eject_ide3:
|
|
|
|
|
call .eject
|
2009-09-18 20:30:04 +02:00
|
|
|
|
call syscall_cdaudio.free
|
2007-09-02 22:44:43 +02:00
|
|
|
|
jmp .ide2_1
|
|
|
|
|
|
|
|
|
|
.ide2:
|
|
|
|
|
cli
|
|
|
|
|
cmp [ATAPI_IDE2_lock],1
|
|
|
|
|
jne .ide1_1
|
|
|
|
|
cmp [IDE_Channel_2],0
|
|
|
|
|
jne .ide1_1
|
|
|
|
|
cmp [cd_status],0
|
|
|
|
|
jne .end
|
2009-09-18 20:30:04 +02:00
|
|
|
|
mov [IDE_Channel_2],1
|
2007-09-02 22:44:43 +02:00
|
|
|
|
call reserve_ok2
|
2009-09-18 20:30:04 +02:00
|
|
|
|
mov [ChannelNumber],2
|
|
|
|
|
mov [DiskNumber],0
|
|
|
|
|
mov [cdpos],3
|
|
|
|
|
call GetEvent_StatusNotification
|
|
|
|
|
cmp [CDDataBuf+4],byte 1
|
|
|
|
|
je .eject_ide2
|
|
|
|
|
call syscall_cdaudio.free
|
2007-09-02 22:44:43 +02:00
|
|
|
|
jmp .ide1_1
|
|
|
|
|
.eject_ide2:
|
|
|
|
|
call .eject
|
2009-09-18 20:30:04 +02:00
|
|
|
|
call syscall_cdaudio.free
|
2007-09-02 22:44:43 +02:00
|
|
|
|
jmp .ide1_1
|
|
|
|
|
|
|
|
|
|
.ide1:
|
|
|
|
|
cli
|
|
|
|
|
cmp [ATAPI_IDE1_lock],1
|
|
|
|
|
jne .ide0_1
|
|
|
|
|
cmp [IDE_Channel_1],0
|
|
|
|
|
jne .end
|
|
|
|
|
cmp [cd_status],0
|
|
|
|
|
jne .end
|
2009-09-18 20:30:04 +02:00
|
|
|
|
mov [IDE_Channel_1],1
|
2007-09-02 22:44:43 +02:00
|
|
|
|
call reserve_ok2
|
2009-09-18 20:30:04 +02:00
|
|
|
|
mov [ChannelNumber],1
|
|
|
|
|
mov [DiskNumber],1
|
|
|
|
|
mov [cdpos],2
|
|
|
|
|
call GetEvent_StatusNotification
|
|
|
|
|
cmp [CDDataBuf+4],byte 1
|
|
|
|
|
je .eject_ide1
|
|
|
|
|
call syscall_cdaudio.free
|
2007-09-02 22:44:43 +02:00
|
|
|
|
jmp .ide0_1
|
|
|
|
|
.eject_ide1:
|
|
|
|
|
call .eject
|
2009-09-18 20:30:04 +02:00
|
|
|
|
call syscall_cdaudio.free
|
2007-09-02 22:44:43 +02:00
|
|
|
|
jmp .ide0_1
|
|
|
|
|
|
|
|
|
|
.ide0:
|
|
|
|
|
cli
|
|
|
|
|
cmp [ATAPI_IDE0_lock],1
|
|
|
|
|
jne .end
|
|
|
|
|
cmp [IDE_Channel_1],0
|
|
|
|
|
jne .end
|
|
|
|
|
cmp [cd_status],0
|
|
|
|
|
jne .end
|
2009-09-18 20:30:04 +02:00
|
|
|
|
mov [IDE_Channel_1],1
|
2007-09-02 22:44:43 +02:00
|
|
|
|
call reserve_ok2
|
2009-09-18 20:30:04 +02:00
|
|
|
|
mov [ChannelNumber],1
|
|
|
|
|
mov [DiskNumber],0
|
|
|
|
|
mov [cdpos],1
|
|
|
|
|
call GetEvent_StatusNotification
|
|
|
|
|
cmp [CDDataBuf+4],byte 1
|
|
|
|
|
je .eject_ide0
|
|
|
|
|
call syscall_cdaudio.free
|
2007-09-02 22:44:43 +02:00
|
|
|
|
jmp .end
|
|
|
|
|
.eject_ide0:
|
|
|
|
|
call .eject
|
2009-09-18 20:30:04 +02:00
|
|
|
|
call syscall_cdaudio.free
|
2007-09-02 22:44:43 +02:00
|
|
|
|
jmp .end
|
|
|
|
|
|
|
|
|
|
.eject:
|
2009-09-18 20:30:04 +02:00
|
|
|
|
call clear_CD_cache
|
|
|
|
|
call allow_medium_removal
|
|
|
|
|
mov [ignore_CD_eject_wait],1
|
|
|
|
|
call EjectMedium
|
|
|
|
|
mov [ignore_CD_eject_wait],0
|
|
|
|
|
ret
|
2007-09-02 22:44:43 +02:00
|
|
|
|
|
|
|
|
|
timer_ATAPI_check dd 0
|
|
|
|
|
ATAPI_IDE0_lock db 0
|
|
|
|
|
ATAPI_IDE1_lock db 0
|
|
|
|
|
ATAPI_IDE2_lock db 0
|
|
|
|
|
ATAPI_IDE3_lock db 0
|
|
|
|
|
ignore_CD_eject_wait db 0
|
|
|
|
|
|
|
|
|
|
;*************************************************
|
|
|
|
|
;* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> *
|
|
|
|
|
;* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> *
|
2006-06-18 18:42:03 +02:00
|
|
|
|
;* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> *
|
|
|
|
|
;* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: *
|
|
|
|
|
;* ChannelNumber - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>; *
|
|
|
|
|
;* DiskNumber - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. *
|
|
|
|
|
;*************************************************
|
2007-09-02 22:44:43 +02:00
|
|
|
|
GetEvent_StatusNotification:
|
2009-09-18 20:30:04 +02:00
|
|
|
|
pusha
|
|
|
|
|
mov [CDDataBuf_pointer],CDDataBuf
|
2006-06-18 18:42:03 +02:00
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2009-09-18 20:30:04 +02:00
|
|
|
|
call clear_packet_buffer
|
2007-09-02 22:44:43 +02:00
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2009-09-18 20:30:04 +02:00
|
|
|
|
mov [PacketCommand],byte 4Ah
|
|
|
|
|
mov [PacketCommand+1],byte 00000001b
|
2007-09-02 22:44:43 +02:00
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2009-09-18 20:30:04 +02:00
|
|
|
|
mov [PacketCommand+4],byte 00010000b
|
2007-09-16 22:06:19 +02:00
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2009-09-18 20:30:04 +02:00
|
|
|
|
mov [PacketCommand+7],byte 8h
|
|
|
|
|
mov [PacketCommand+8],byte 0h
|
2006-06-18 18:42:03 +02:00
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2009-09-18 20:30:04 +02:00
|
|
|
|
call SendPacketDatCommand
|
|
|
|
|
popa
|
|
|
|
|
ret
|
2006-06-18 18:42:03 +02:00
|
|
|
|
|
2008-02-26 00:34:27 +01:00
|
|
|
|
;*************************************************
|
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> TOC
|
|
|
|
|
;* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> *
|
|
|
|
|
;* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: *
|
|
|
|
|
;* ChannelNumber - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>; *
|
|
|
|
|
;* DiskNumber - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. *
|
|
|
|
|
;*************************************************
|
|
|
|
|
Read_TOC:
|
2009-09-18 20:30:04 +02:00
|
|
|
|
pusha
|
|
|
|
|
mov [CDDataBuf_pointer],CDDataBuf
|
2008-02-26 00:34:27 +01:00
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2009-09-18 20:30:04 +02:00
|
|
|
|
call clear_packet_buffer
|
2008-02-26 00:34:27 +01:00
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2009-09-18 20:30:04 +02:00
|
|
|
|
mov [PacketCommand],byte 0x43
|
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
mov [PacketCommand+2],byte 1
|
2008-02-26 00:34:27 +01:00
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2009-09-18 20:30:04 +02:00
|
|
|
|
mov [PacketCommand+7],byte 0xFF
|
|
|
|
|
mov [PacketCommand+8],byte 0h
|
2008-02-26 00:34:27 +01:00
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2009-09-18 20:30:04 +02:00
|
|
|
|
call SendPacketDatCommand
|
|
|
|
|
popa
|
|
|
|
|
ret
|
2008-02-26 00:34:27 +01:00
|
|
|
|
|
2007-09-02 22:44:43 +02:00
|
|
|
|
;*************************************************
|
|
|
|
|
;* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> *
|
|
|
|
|
;* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> *
|
|
|
|
|
;* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: *
|
|
|
|
|
;* ChannelNumber - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>; *
|
|
|
|
|
;* DiskNumber - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. *
|
|
|
|
|
;*************************************************
|
|
|
|
|
;ReadCapacity:
|
2007-09-16 22:06:19 +02:00
|
|
|
|
; pusha
|
2007-09-02 22:44:43 +02:00
|
|
|
|
;; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2007-09-16 22:06:19 +02:00
|
|
|
|
; call clear_packet_buffer
|
2007-09-02 22:44:43 +02:00
|
|
|
|
;; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2007-09-16 22:06:19 +02:00
|
|
|
|
; mov [CDBlockSize],8
|
2007-09-02 22:44:43 +02:00
|
|
|
|
;; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> READ CAPACITY
|
2007-09-16 22:06:19 +02:00
|
|
|
|
; mov [PacketCommand],word 25h
|
2007-09-02 22:44:43 +02:00
|
|
|
|
;; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2007-09-16 22:06:19 +02:00
|
|
|
|
; call SendPacketDatCommand
|
|
|
|
|
; popa
|
|
|
|
|
; ret
|
2007-09-02 22:44:43 +02:00
|
|
|
|
|
2007-07-22 22:52:21 +02:00
|
|
|
|
clear_packet_buffer:
|
2006-06-18 18:42:03 +02:00
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2009-09-18 20:30:04 +02:00
|
|
|
|
mov [PacketCommand],dword 0
|
|
|
|
|
mov [PacketCommand+4],dword 0
|
|
|
|
|
mov [PacketCommand+8],dword 0
|
|
|
|
|
ret
|