This is in support of the RTC/CF-Card adapter I posted earlier:
viewtopic.php?f=4&t=6223
Some of it's been a bit tricky to get working, with a lot of reading through the SanDisk documentation and also Seagate's documentation for IDE. I've not yet done exhaustive testing, nor have the BIOS additions been optimized for speed or size yet. Fortunately, everything is working and the following routines are available against the CF-Card IDE Controller and DS1511 RTC chip:
Code: Select all
B_IDE_RESET JMP IDE_RES_DIAG ;Call 00 $FF00
B_IDE_GET_STAT JMP IDE_GET_STATUS ;Call 01 $FF03
B_IDE_IDENTIFY JMP IDE_IDENTIFY ;Call 02 $FF06
B_IDE_READ_LBA JMP IDE_READ_LBA ;Call 03 $FF09
B_IDE_WRITE_LBA JMP IDE_WRITE_LBA ;Call 04 $FF0C
B_IDE_VERFY_LBA JMP IDE_VERIFY_LBA ;Call 05 $FF0F
B_IDE_LBA_NUM JMP IDE_LBA_NUM ;Call 06 $FF12
B_IDE_SET_ADDR JMP IDE_SET_ADDRESS ;Call 07 $FF15
;
B_RTC_NVRAM_RD JMP RTC_NVRD ;Call 08 $FF18
B_RTC_NVRAM_WR JMP RTC_NVWR ;Call 09 $FF1B
B_RTC_INIT JMP INIT_RTC ;Call 10 $FF1E
After more testing is done, I'll likely do some updates and eventually add this to my Github page, albeit I'll be working on an updated adapter schematic and PCB layout. I also need to look more closely at the IOCS16 line and using it for 16-bit data transfers using the SO input on the CPU. So far, there's some conflicting information between what Seagate state in their IDE documentation and what SanDisk state in theirs.... so time to get out the scope and data analyzer for more testing. Data transfers are using the DRQ line in the Status register and the ISR is added via an insert vector. In the mean time, this BIOS should be suitable for testing against an OS/Filesystem.