mirror of
https://github.com/ISpillMyDrink/OpenSuperClone.git
synced 2026-09-28 21:15:36 +00:00
70 lines
1.1 KiB
Plaintext
70 lines
1.1 KiB
Plaintext
seti $help = $help
|
|
seti $printhelp = $printhelp
|
|
if $help = 1
|
|
echo 'rebuild assist read'
|
|
if $printhelp = 1
|
|
exit 0
|
|
endif
|
|
echo 'Hit ENTER to continue...'
|
|
userinput $choicestring
|
|
previousscript
|
|
endif
|
|
|
|
include good_subroutines.osc
|
|
|
|
# set a blank string variable to compare with user input
|
|
# make sure not to set this anyplace else
|
|
sets $null = ""
|
|
|
|
# set this to itself for use with the menu system
|
|
# make sure not to set this anyplace else
|
|
# if it was not previously set it will = 0
|
|
seti $using_menu = $using_menu
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# set the buffer size
|
|
buffersize 512
|
|
|
|
# set the LBAs to 0
|
|
seti $LBAlow = 0
|
|
seti $LBAmid = 0
|
|
seti $LBAhigh = 0
|
|
|
|
# set some things for the ata read command
|
|
setreadpio
|
|
# set features to 0
|
|
seti $features = 0
|
|
# set count to 1
|
|
seti $count = 1
|
|
# set device to 0
|
|
seti $device = 0
|
|
# set lba to log page 15
|
|
seti $LBAlow = 0x15
|
|
# set the command for read log extended
|
|
seti $command = 0x2f
|
|
|
|
# make sure buffer is clear
|
|
clearbuffer
|
|
|
|
# perform the command
|
|
ata48cmd $features $count $LBAhigh $LBAmid $LBAlow $device $command
|
|
|
|
# check if command failed
|
|
gosub status_check
|
|
|
|
printbuffer 0 32
|
|
|
|
|
|
|
|
|
|
previousscript
|
|
end
|
|
|
|
|
|
|
|
|