38 Commits

Author SHA1 Message Date
6696cadfd2 Remove unused/unneeded parts of IDEUnit struct 2025-07-05 04:23:44 +00:00
4185bc5b8e ata: optimize read/write functions
Pass the src/dest pointers via registers rather than the stack
2025-01-07 00:44:41 +00:00
58b8953a62 Support SimpleIDE 2025-01-05 12:34:39 +13:00
f434a797df Whitespace fixes 2024-11-13 22:36:30 +00:00
MHeinrichs
8e253bcc42 buffer alignment rework 2024-11-14 11:28:24 +13:00
fd4045635b ATA: remove "actual" from ata read/write as it's not needed there 2024-08-30 03:58:01 +00:00
6fc2e7d8d4 ATA: Add support for SCSI ATA_PASSTHOUGH command and make use of it in lidetool to get ident data 2024-08-07 09:28:13 +00:00
366dacd353 Add command to set PIO mode 2024-08-04 23:21:53 +00:00
d2e7843bc0 Add LBA48 support 2023-12-19 16:26:15 -08:00
4565798ef2 Add command CMD_XFER to set transfer method for a unit 2023-11-30 13:59:15 +01:00
1126d9ed4b Implement code for pluggable transfer routines
This will allow for additiomal transfer routines to be added and conditionally used i.e if some other board has a different need
2023-11-30 13:59:15 +01:00
291ea94623 Support CHS 2023-10-03 09:39:51 +00:00
5db68783fe Tweak timeouts
* Increase loop wait from 100us to 1ms - this makes the timers more accurate on slow 68000 systems
* Increase ATA BSY wait to 10s - Spinning rust can take a while to spool up and become ready
* Skip ata_identify drq wait if error/fault is indicated - this will usually be an ATAPI drive and there's no point waiting
2023-09-06 19:06:20 +00:00
f23a5fc4d3 Fixup channel detection some more... 2023-08-14 10:27:11 +00:00
89ed514c6f Tweak timeout loops
20uS Time requests were not completing - this causes drive detection to hang on boot if no drives connected
2023-07-11 14:44:00 +00:00
3184aab5be ATA: Implement ata_write/read_unaligned
If the data buffer is not word-aligned we need to do transfer byte by byte on 68000/68010
2023-05-08 14:59:21 +00:00
c48d86ff89 rename to lide.device 2023-04-30 08:53:29 +00:00
7153210c61 Better ATAPI detection 2023-04-15 19:46:10 +00:00
1353cea8b8 Split ata_transfer into separate read/write funcs - speeds up a little 2023-04-15 14:52:08 +00:00
15e0d30e0e Wait for drive to be not busy before changing drive select 2023-04-14 12:32:59 +00:00
efb27bc95f Silly fixups 2023-04-13 19:42:04 +00:00
5bc9ef378c Implement ATA READ/WRITE MULTIPLE 2023-04-13 11:10:17 +00:00
4098500445 Document new wait functions & move constants to their relevant header files 2023-04-13 11:09:37 +00:00
6e001df5e2 Replace ATA wait routines with better routines that time out 2023-04-12 19:33:20 +00:00
3d974f2161 move static declarations out of header file 2023-04-10 14:35:02 +00:00
477dba98e8 Make ata_read_fast and ata_write_fast static 2023-04-10 14:32:29 +00:00
b9ce452afd Add License and copyright notices 2023-04-09 20:47:49 +00:00
72ad87f6b8 Tidy up, split atapi to it's own file 2023-04-09 20:37:55 +00:00
2b693d48fc Fix ATAPI media presence detection 2023-04-09 08:49:36 +00:00
7cb1705526 ATAPI: Now working on real HW
* Implement Test Unit Ready for init/td style commands
* Add request mode sense which currently doesn't return any sense data, just clears the unit attention.

Todo: Fixup timeouts.
* wait_bsy should be several seconds (for atapi at least) to allow the motor to spin up etc
* wait_drq should be shorter, and atapi_packet should properly check interrupt reason rather than timing out on DRQ
2023-04-08 22:49:31 +00:00
39358717c8 ATAPI seems to work now... need to stress test 2023-04-04 19:58:22 +00:00
601c5d2c39 initial atapi 2023-04-03 07:53:45 +00:00
Matt Harlum
96689d744e Test for drive fault as well as error 2023-03-31 10:05:38 +00:00
45db8c4b21 Fixups
* Optimizations for size etc
* Make endskip actually skip to the end
* Save last ATA Error
* Remove need for divide by using right shifts
2023-03-28 19:20:40 +00:00
e1e1736011 movem read 2023-03-26 00:18:48 +00:00
d89d8d3857 foo 2023-03-24 18:04:26 +00:00
cdcb9b04d9 pokey poke 2023-03-21 21:22:50 +00:00
356e15900c Initial commit. 2023-03-16 15:05:00 +00:00