joevt
e872f08273
scsicdrom: Include invalid field info.
...
For CHECK_CONDITION status from READ_CAPACITY_10 and READ_TOC.
2024-03-30 11:00:01 -07:00
joevt
a6fda3b787
scsicdrom: Handle MODE_SENSE_6 unsupported page.
...
Return CHECK_CONDITION status instead of abort. To Do: apply change to scshhd.
2024-03-30 10:59:43 -07:00
joevt
a48851888f
scsihd: Setup data_ptr for STATUS and MESSAGE_IN.
...
bytes_out is used instead of the removed cur_buf_cnt.
data_ptr is setup by prepare_data instead of process_command.
Not sure why scsicdrom doesn't set bytes_out in prepare_data.
2024-03-30 08:37:10 -07:00
joevt
c999c51d77
scsicdrom, scsihd: Check lun.
...
READ_CAPACITY_10, READ_6, and READ_10 now checks LUN that is included in CDB and returns a CHECK_CONDITION if it doesn't match.
2024-03-29 19:12:06 -07:00
joevt
6bb5227ee1
scsihd: Abort if RelAdr bit of READ_10.
...
Like scsicdrom does.
2024-03-29 19:01:42 -07:00
joevt
cefe8698da
scsihd: Add PREVENT_ALLOW_MEDIUM_REMOVAL.
...
Like scsicdrom has.
2024-03-29 19:01:32 -07:00
joevt
4be6bad526
scsicdrom: Fix compiler warning.
2024-03-29 19:00:38 -07:00
joevt
d3c913e384
scsicdrom: Cleanup.
...
- Use macros for reading 2 byte or 4 byte big endian data. block_size is assumed to be < 64K so WRITE_DWORD_BE_A will write two leading zeros.
- Scalar pass by value parameters don't need to be const.
- Remove some unnecessary locals.
2024-03-29 18:53:13 -07:00
joevt
a868f4eee4
scsihd: Cleanup.
...
Use this qualifier.
Use macros for reading 2 byte or 4 byte big endian data.
2024-03-29 18:53:04 -07:00
joevt
44da89979f
scsihd: Use device name in abort message.
2024-03-29 18:52:52 -07:00
joevt
a79f07e4dc
scsicdrom: Move mode_select_6.
...
Make it a separate method like scsihd. It also checks the incoming param size. If it's zero then the phase is not switched. Is that wrong? Still probably unfinished.
2024-03-29 18:52:30 -07:00
joevt
5062508940
scsicdrom: Rename mode_sense_6.
...
To match scsihd.
2024-03-29 07:56:48 -07:00
joevt
9cf91328c1
scsicdrom: Move inquiry info to class fields.
...
Like scsihd.
2024-03-29 07:56:44 -07:00
joevt
6a30ef7017
scsicdrom: Fields inited by parent class.
...
They don't need to be reinitialized.
2024-03-29 07:56:31 -07:00
joevt
fd961f9ff9
Fix Analyzer warnings.
...
In Xcode, type Command-Shift-B to analyze every source file or Command-Shift-Control-B to analyze the current source file.
For pseudo_dma_read report FIFO underrun and init data_word in that case.
2024-03-24 12:56:11 -07:00
joevt
e51bc0cea5
scsihd: Reorder switch statement.
...
Order by case value to match scsicdrom.
2024-03-16 17:44:09 -07:00
joevt
45a9d45e3f
Add SCSI devices.
...
scsibus has a new method attach_scsi_devices which is used by all machines to populate a SCSI bus with one or more hard drives or CD-ROM drives.
HDDs are specified by the hdd_img property.
CDs are specified by the cdr_img property.
Multiple images are delimited by a colon :
attach_scsi_devices is called by the scsi controller after the scsi controller has attached itself to the scsi bus.
The bus suffix is applied to the property name.
Curio has no suffix so it will use hdd_img and cdr_img properties.
Mesh is expected to have a suffix of 2 so it will use hdd_img2 and cdr_img2 properties.
HDDs will skip SCSI ID 3 unless 7 HDDs are added, in which case, the seventh HDD will use ID 3.
CDs will start at SCSI ID 3, go to 7, then down to 0.
SCSI IDs are skipped if a device is already using that SCSI ID.
ScsiCdrom and ScsiHD no longer use REGISTER_DEVICE or DeviceDescription or PropMap which is normal for devices that can have multiple instances.
2024-03-14 19:12:11 -07:00
joevt
e1e00c951b
sc53c94: Split real_dma_xfer.
...
Create real_dma_xfer_out and real_dma_xfer_in methods.
2024-03-14 08:01:07 -07:00
joevt
c14974d167
sc53c94: Init class fields.
2024-03-13 21:37:08 -07:00
joevt
f07de5401d
sc53c94: Add registers and comments.
2024-03-13 21:25:28 -07:00
dingusdev
faf066f2b9
Fixed building
2024-03-13 21:17:04 -07:00
joevt
06640844e9
scsihd: Allow read and write > 4 GB.
2024-03-13 21:09:55 -07:00
joevt
bfc703a556
scsihd: Add sector_size.
...
Replace HDD_SECTOR_SIZE with class field sector_size.
2024-03-13 21:06:18 -07:00
joevt
ec01993d84
scsihd: Make seek and rewind illegal.
2024-03-13 18:42:25 -07:00
joevt
5a54b6a761
scsicdrom: Rename read_capacity_10.
...
Like scsihd.
2024-03-13 07:50:32 -07:00
joevt
a605c435b6
scsicdrom: Move test_unit_ready.
...
Make it a separate method like scsihd.
2024-03-13 07:50:20 -07:00
joevt
05da1708eb
scsihd: Remove unused cur_buf_cnt.
2024-03-13 07:46:12 -07:00
joevt
3f826b8971
scsi: Add illegal_command method.
...
- scsicdrom now logs unsupported commands instead of abort.
2024-03-13 07:45:50 -07:00
joevt
de8388f9a7
scsihd: Rename img_buffer to data_buf.
...
To match scsicdrom.
2024-03-13 07:44:52 -07:00
joevt
569f782a60
scsihd: Rename hdd_img to disk_img.
2024-03-13 07:44:43 -07:00
dingusdev
96b9b6a375
Fixed building
2024-03-12 21:30:38 -07:00
joevt
091cf4337c
scsidevice: Remember SELECT_WITH_ATN message.
...
It might be an IDENTIFY message which contains a LUN number.
2024-03-12 08:01:52 -07:00
joevt
ff9b8a59e2
scsibus: Change control lines for MESSAGE_IN.
2024-03-12 07:49:43 -07:00
joevt
1fb9e37ec5
scsidevice: Add check_lun.
...
This will create a CHECK_CONDITON if the LUN doesn't match.
2024-03-11 20:24:24 -07:00
joevt
1e78512c95
Rename Curio and Mesh.
2024-03-02 11:12:45 -07:00
joevt
ad8a26616f
scsidevice: Add LUN field.
...
This may make it possible for multiple LUNs to be added to the same target ID.
For now just use LUN #0 .
2024-03-02 08:52:09 -07:00
joevt
8f28823217
scsi: Initialize cur_phase.
2024-03-02 08:51:45 -07:00
joevt
fe05b1de12
Fix compiler warnings.
...
Xcode build has compiler warnings involving loss of precision. Remove them by adding type casts. Check results in some cases for overflow.
2024-02-29 18:49:14 -07:00
Maxim Poliakovski
f5bb484226
sc53c94: fix interrupt reporting.
2024-02-19 15:30:20 +01:00
Maxim Poliakovski
28e7a806b4
grandcentral: use MeshStub on machines without MESH.
2024-02-12 02:38:38 +01:00
Maxim Poliakovski
046452fc56
mesh: various improvements.
2024-02-12 02:17:09 +01:00
Maxim Poliakovski
8ddbc9c427
Wire SCSI_MESH interrupt.
2024-02-12 01:46:21 +01:00
Maxim Poliakovski
5902cd5c28
Wire SCSI_CURIO interrupt.
2024-02-12 01:46:21 +01:00
Maxim Poliakovski
fd92d86954
mesh: add MESH TNT variant.
2023-12-11 08:05:39 +01:00
Mihai Parparita
ea9de4feaf
Fix uninitialized value read in the ScsiHardDisk constructor
...
The call to the ScsiDevice superclass was using the name field (which
was not initialized yet) instead of the name constructor argument
2023-12-10 08:58:12 -08:00
Maxim Poliakovski
114737db41
scsicdrom: use CdromDrive as base class.
2023-12-10 00:19:44 +01:00
Maxim Poliakovski
bf278af950
scsidevice: add get_more_data() method.
...
It is required for supporting large data transfers split
into multiple chunks.
2023-12-10 00:19:44 +01:00
Maxim Poliakovski
65a343ce5c
Clean up names for SCSI devices.
2023-12-04 22:41:01 +01:00
Maxim Poliakovski
8841c3e7f9
scsihd: more commands.
2023-12-04 21:41:55 +01:00
Maxim Poliakovski
1e4579a076
Improve SCSI state machine.
2023-12-04 21:41:55 +01:00