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
Maxim Poliakovski
be2721cd67
scsihd: cleanup, fixes and more commands.
2023-12-04 21:41:55 +01:00
Maxim Poliakovski
58281520d3
Implement writes to SCSI Pseudo-DMA register.
2023-12-04 21:41:55 +01:00
Maxim Poliakovski
ae903082d8
amic: implement SCSI DRQ callback.
2023-12-04 21:41:55 +01:00
Maxim Poliakovski
94872b3ebb
Store SCSI bus object pointer during registration.
2023-11-24 19:48:07 +01:00
Maxim Poliakovski
9ae863d7c4
sc53c94: add is_dma_cmd member variable.
2023-11-24 19:48:07 +01:00
Maxim Poliakovski
457accf329
scsi: define READ_BUFFER and WRITE_BUFFER commands.
2023-11-24 19:48:07 +01:00
Mihai Parparita
d4c9db7fcf
Move disk image reading to be behind an ImgFile class
...
Allows different implementations for different platforms (the JS
build relies on browser APIs to stream disk images over the network).
Setting aside the JS build, this also reduces some code duplication.
2023-11-09 21:49:28 -08:00
Mihai Parparita
35c86ad6bf
Clean up #includes
...
Result of running IWYU (https://include-what-you-use.org/ ) and
applying most of the suggestions about unncessary includes and
forward declarations.
Was motivated by observing that <thread> was being included in
ppcopcodes.cpp even though it was unused (found while researching
the use of threads), but seems generally good to help with build
times and correctness.
2023-11-03 00:33:47 -07:00
Mihai Parparita
ea0eae467d
Add assertion for valid SCSI IDs when updating control lines
...
Would have flagged the out-of-bounds write fixed by
dingusdev/dingusppc@36cb84eaaa sooner.
2023-10-19 07:49:23 -07:00
Maxim Poliakovski
36cb84eaaa
mesh: fix write-out-of-bounds to BusStatus1.
2023-10-18 11:21:38 +02:00
Maxim Poliakovski
63b10175bf
mesh: stubs for BusFree and EnaReselect commands.
2023-10-02 15:01:27 +02:00
Maxim Poliakovski
4cdb81e822
mesh: fix Arbitrate command for OS X.
2023-09-24 22:36:44 +02:00
Maxim Poliakovski
ee9c692115
mesh: implement more register reads.
2023-08-09 01:40:09 +02:00
dingusdev
b23bb04dac
Start fix for SCSI Hard Drive
2023-08-02 07:53:19 -07:00
Maxim Poliakovski
7a8b534c07
More SCSI commands and error codes.
2023-06-18 23:04:02 +02:00
Maxim Poliakovski
ee7b2838bc
One more attempt to fix GCC build.
2023-05-30 19:55:46 +02:00
Maxim Poliakovski
6f247f64cd
ScsiBus: add missing include.
2023-05-30 19:51:07 +02:00
Maxim Poliakovski
f809124a2e
Improve SCSI bus registration.
2023-05-30 19:46:27 +02:00
Maxim Poliakovski
e36150a5ca
Add ATAPI commands, clean up formatting.
2023-05-15 17:57:20 +02:00
Maxim Poliakovski
cf0d361918
Merge 'hard-disks' branch.
2023-04-17 01:20:38 +02:00
Maxim Poliakovski
2b6716be5c
mesh: arbitration and selection commands.
2023-01-26 00:34:17 +01:00
Maxim Poliakovski
449cc96612
Basic MESH emulation.
2023-01-25 20:58:30 +01:00
Maxim Poliakovski
6b6e92d3d9
scsi: change positions of SEL, BSY and RST bits.
...
New positions match better MESH internal bits.
2023-01-25 20:53:34 +01:00
joevt
0bd9d0e973
Fix HWComponent name initialization.
...
First, remove name override for subclasses of HWComponent (Chaos and ScsiBus) because HWComponent has its own name field.
HWComponent name should be set as early as possible in the constructor so it can be used in log messages.
PCIDevice should set name of HWComponent (through MMIODevice) in its constructor, using the name that is given to its constructor.
For Bandit and Grackle, they don't need to set the HWComponent name since its PCIDevice constructor will now do it.
Chaos is not a PCIDevice so it should set the MMIODevice name itself.
Why does PCIDevice have a name that is separate from the HWComponent name?
2023-01-11 00:05:23 -08:00
Maxim Poliakovski
a189c94980
scsihd: fix READ_CAPACITY_10 command.
...
Also bump internal buffer size to 2 MB
to temporarily fix buffer overflows.
2022-12-14 16:14:53 +01:00
Maxim Poliakovski
13684f7c0b
scsicdrom: implement READ_CAPACITY_10 command.
2022-11-14 02:08:05 +01:00
Maxim Poliakovski
5f0358a347
Implement basic SCSI CD-ROM emulation.
2022-11-14 00:55:05 +01:00
Maxim Poliakovski
db17e19699
scsi_hd: cosmetic improvements.
2022-11-10 18:22:44 +01:00
Maxim Poliakovski
3de89eaaf7
Silence SCSI logging messages.
2022-11-08 00:33:38 +01:00
Maxim Poliakovski
d50152dd1a
scsi_hd: clean up TEST UNIT READY command.
2022-11-08 00:32:45 +01:00
Maxim Poliakovski
2f02ea4276
sc53c94: release ATN line after MESSAGE_OUT.
2022-11-08 00:30:19 +01:00
Maxim Poliakovski
b2ef809de1
scsi_hd: fix write command.
2022-11-07 22:04:02 +01:00
Maxim Poliakovski
a00b87790b
sc3c94: implement real DMA.
2022-11-07 12:34:55 +01:00
Maxim Poliakovski
ca5f81417f
sc53c94: refactor state machine.
2022-11-07 12:34:42 +01:00
Maxim Poliakovski
40a02cc0f7
scsidevice: refactor states.
2022-11-07 12:24:02 +01:00
Maxim Poliakovski
49331635b2
scsi_hd: determine image file size with stat().
2022-11-07 12:15:08 +01:00
Maxim Poliakovski
0c4da80c93
sc53c94: small cosmetic fixes.
2022-11-02 23:23:37 +01:00
Maxim Poliakovski
7bc4b8840a
scsi_bus: fix device selection bug.
2022-11-02 23:21:46 +01:00
Maxim Poliakovski
5a59b97257
Sc53C94: implement cycle completion commands.
2022-11-02 22:28:43 +01:00
Maxim Poliakovski
5a33fba75e
ScsiDevice: command completion states.
2022-11-02 21:28:30 +01:00
Maxim Poliakovski
0c74ebbc45
scsi_bus: support status and message in.
2022-11-02 21:27:18 +01:00
Maxim Poliakovski
2865a611e7
Sc53C94: implement reading the FIFO register.
2022-11-02 21:19:31 +01:00
Maxim Poliakovski
f2be286515
scsi_bus: fix asserting control lines.
2022-11-01 02:52:30 +01:00
Maxim Poliakovski
2c3a5c3b8f
Sc53C94: reading current transfer count.
2022-11-01 02:12:09 +01:00
Maxim Poliakovski
c54c1cdb65
Sc53C94: improve status register.
2022-11-01 02:11:06 +01:00
Maxim Poliakovski
8abefb8f8d
machinepdm: properly insert SCSI hard disk image.
...
Skip SCSI hard disk registration if no disk image was given.
2022-11-01 01:17:50 +01:00
Maxim Poliakovski
6ffe28a8a4
Implement SCSI Pseudo-DMA register on PDM.
2022-11-01 01:17:50 +01:00
Maxim Poliakovski
7ab44886c4
Sc53C94: implement information transfer command.
2022-11-01 01:17:50 +01:00
Maxim Poliakovski
fbfae98d6d
scsi_bus: packet data transfers.
2022-10-31 23:21:35 +01:00
Maxim Poliakovski
c7ceb9d6b9
sc53c94: fix setting internal transfer counter.
2022-10-31 23:21:35 +01:00
dingusdev
b480903c7a
Slight code clean-up
...
Prevents crashing
2022-10-30 15:38:09 -07:00
Maxim Poliakovski
46a0e82258
scsi_hd: some fixes and improvements.
2022-10-27 14:19:58 +02:00
Maxim Poliakovski
a58c9b1a62
ScsiDevice: fix process_command() signature.
2022-10-27 14:07:20 +02:00
Maxim Poliakovski
f3cd5b8b36
sc53c94: fix sending commands to SCSI devices.
2022-10-27 13:49:41 +02:00
dingusdev
2065f3588b
Inquiry cmd fixed
2022-10-26 09:30:05 -07:00
dingusdev
f792b38ea3
Started SCSI command reading
2022-10-26 09:18:32 -07:00
Maxim Poliakovski
4f6bd16f3a
sc53c94: support selection and command transfer.
2022-10-25 03:03:15 +02:00
Maxim Poliakovski
c51ea575ca
scsi_bus: various fixes and improvements.
2022-10-25 03:03:15 +02:00
Maxim Poliakovski
9efac80271
scsi_hd: fix notify() method.
2022-10-25 03:03:15 +02:00
Maxim Poliakovski
eeb576a927
Improve ScsiDevice class.
2022-10-25 02:53:21 +02:00
dingusdev
3af9729e5b
Modest refactoring for SCSI HDs
2022-10-23 16:45:58 -07:00
Maxim Poliakovski
c2abc89a3b
Fix SCSI HD interface so it can be added to a bus.
2022-10-22 23:41:19 +02:00
dingusdev
aa1d23e08b
Fixed hard disk support
...
Compiles, still unfinished
2022-10-22 11:41:52 -07:00
dingusdev
ee9573327c
Reorganized hard disk code
...
Not compiling yet.
2022-10-08 16:51:54 -07:00
dingusdev
a61dd5701a
Initial prototyping for hard disks
2022-09-01 22:10:52 -07:00
joevt
3b4f40635a
Register offsets should be logged as hex
...
- decimal values are confusing (can't tell if 12 means 12 or 18)
- most specs show hex values for register offsets.
2022-08-22 17:16:22 -07:00
Maxim Poliakovski
9971052a78
mesh: self-registration with the device registry.
2022-07-18 20:27:34 +02:00
Maxim Poliakovski
2dfc160e30
sc53c94: self-registration with the device registry.
2022-07-18 20:27:34 +02:00
Maxim Poliakovski
8d9691cc6f
MESH: add MeshScsi namespace.
2022-05-21 14:51:26 +02:00
dingusdev
36fa53e8c1
MSVC compilation fixes
2022-03-12 15:43:45 -07:00
Maxim Poliakovski
00093bdc95
sc53c94: support interrupts.
2022-02-06 01:50:54 +01:00
Maxim Poliakovski
7c53620a40
sc53c94: implement sequencer and some commands.
2022-02-06 01:50:54 +01:00
Maxim Poliakovski
b5f70feb28
Initial SCSI bus emulation.
2022-02-06 01:50:54 +01:00
Maxim Poliakovski
dc34f282b7
53C94: support more registers and commands.
2022-01-24 22:55:49 +01:00
Maxim Poliakovski
5883524fb8
53C94: chip initialization and identification.
2022-01-22 04:37:52 +01:00
Maxim Poliakovski
392fa87ba4
Add NCR 53C90 stub.
2021-10-26 19:00:04 +02:00
Maxim Poliakovski
9329d56d83
Move devices into dedicated subdirectories.
2021-10-23 20:17:47 +02:00