Reduce wait from SD Card.
This commit is contained in:
parent
77242b0f1a
commit
7cc69c5e7c
@ -31,7 +31,7 @@ unsigned char BOOTROM[] = {
|
||||
1, 240, 137, 222, 131, 211, 0, 232, 179, 1, 91, 88, 115, 3, 233, 113,
|
||||
1, 83, 81, 82, 87, 80, 137, 193, 48, 237, 137, 223, 186, 130, 2, 176,
|
||||
0, 238, 81, 137, 232, 137, 243, 177, 81, 232, 115, 2, 114, 64, 186, 128,
|
||||
2, 185, 232, 3, 235, 3, 232, 137, 2, 236, 60, 254, 224, 248, 117, 46,
|
||||
2, 185, 80, 195, 235, 3, 232, 137, 2, 236, 60, 254, 224, 248, 117, 46,
|
||||
185, 0, 1, 82, 186, 131, 2, 236, 90, 132, 192, 252, 116, 4, 243, 109,
|
||||
235, 4, 237, 171, 226, 252, 237, 131, 197, 1, 131, 214, 0, 89, 226, 194,
|
||||
186, 130, 2, 176, 1, 238, 88, 95, 90, 89, 91, 233, 24, 1, 186, 130,
|
||||
@ -42,8 +42,8 @@ unsigned char BOOTROM[] = {
|
||||
142, 216, 186, 130, 2, 176, 0, 238, 81, 137, 232, 137, 243, 177, 88, 232,
|
||||
221, 1, 114, 89, 186, 128, 2, 176, 254, 238, 185, 0, 1, 135, 247, 82,
|
||||
186, 131, 2, 236, 90, 132, 192, 252, 116, 4, 243, 111, 235, 4, 173, 239,
|
||||
226, 252, 135, 254, 185, 196, 9, 235, 3, 232, 214, 1, 236, 60, 255, 225,
|
||||
248, 36, 31, 60, 5, 117, 38, 185, 196, 9, 235, 3, 232, 195, 1, 236,
|
||||
226, 252, 135, 254, 185, 80, 195, 235, 3, 232, 214, 1, 236, 60, 255, 225,
|
||||
248, 36, 31, 60, 5, 117, 38, 185, 80, 195, 235, 3, 232, 195, 1, 236,
|
||||
132, 192, 225, 248, 116, 23, 131, 197, 1, 131, 214, 0, 89, 226, 169, 186,
|
||||
130, 2, 176, 1, 238, 88, 95, 90, 89, 91, 31, 235, 105, 186, 130, 2,
|
||||
176, 1, 238, 89, 88, 40, 200, 95, 90, 89, 91, 31, 235, 76, 132, 192,
|
||||
@ -72,7 +72,7 @@ unsigned char BOOTROM[] = {
|
||||
1, 170, 135, 119, 0, 0, 0, 0, 1, 105, 64, 0, 0, 0, 1, 186,
|
||||
128, 2, 80, 176, 255, 238, 136, 200, 136, 252, 239, 88, 134, 216, 239, 134,
|
||||
216, 180, 1, 239, 185, 8, 0, 236, 60, 255, 225, 251, 132, 192, 116, 1,
|
||||
249, 195, 81, 82, 49, 201, 186, 100, 0, 180, 134, 205, 21, 90, 89, 195,
|
||||
249, 195, 81, 82, 49, 201, 186, 1, 0, 180, 134, 205, 21, 90, 89, 195,
|
||||
156, 30, 83, 86, 137, 198, 184, 0, 192, 142, 216, 180, 14, 49, 219, 252,
|
||||
172, 8, 192, 116, 4, 205, 16, 235, 247, 94, 91, 31, 157, 195, 156, 30,
|
||||
83, 81, 82, 86, 137, 194, 184, 0, 192, 142, 216, 49, 219, 252, 137, 214,
|
||||
@ -127,4 +127,4 @@ unsigned char BOOTROM[] = {
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 143};
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 62};
|
||||
@ -527,10 +527,10 @@ func_02_read_sector:
|
||||
call print_string
|
||||
%endif
|
||||
mov dx, 0x280 ; data port
|
||||
mov cx, 1000 ; timeout
|
||||
mov cx, 50000 ; timeout (50ms)
|
||||
jmp .receive_token_no_delay
|
||||
.receive_token:
|
||||
call delay_100us
|
||||
call delay_us
|
||||
.receive_token_no_delay:
|
||||
in al, dx
|
||||
cmp al, 0xfe
|
||||
@ -678,10 +678,10 @@ cpu 8086
|
||||
mov ax, wait_msg
|
||||
call print_string
|
||||
%endif
|
||||
mov cx, 2500 ; timeout
|
||||
mov cx, 50000 ; timeout (50ms)
|
||||
jmp .receive_status_no_delay
|
||||
.receive_status:
|
||||
call delay_100us
|
||||
call delay_us
|
||||
.receive_status_no_delay:
|
||||
in al, dx
|
||||
cmp al, 0xff
|
||||
@ -705,10 +705,10 @@ cpu 8086
|
||||
mov ax, wait_msg
|
||||
call print_string
|
||||
%endif
|
||||
mov cx, 2500 ; timeout
|
||||
mov cx, 50000 ; timeout (50ms)
|
||||
jmp .receive_finish_no_delay
|
||||
.receive_finish:
|
||||
call delay_100us
|
||||
call delay_us
|
||||
.receive_finish_no_delay:
|
||||
in al, dx
|
||||
test al, al
|
||||
@ -1225,14 +1225,14 @@ send_sd_read_write_cmd:
|
||||
;
|
||||
|
||||
;
|
||||
; Wait 100 microseconds.
|
||||
; Wait 1 microseconds.
|
||||
; out: AX = <TRASH>
|
||||
; FL = <TRASH>
|
||||
delay_100us:
|
||||
delay_us:
|
||||
push cx
|
||||
push dx
|
||||
xor cx, cx
|
||||
mov dx, 100 ; microseconds
|
||||
mov dx, 1 ; microseconds
|
||||
mov ah, 0x86 ; wait
|
||||
int 0x15
|
||||
pop dx
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user