Commit Graph

93 Commits

Author SHA1 Message Date
Cédric Alexander Tremblay
e1f2c600d1
Fixed type error when compiling for arm (#1122)
* Fixed type error when compiling

* Replaced 'atoi(fb) == -1' to 'fb == (char*)-1'
2023-03-08 21:35:08 -06:00
Tony Kuker
5fb1dbcdb6 Fill the entire framebuffer with color instead of a random corner 2022-01-23 03:56:39 +00:00
Tony Kuker
4332c6db6a Add trace statements to help with debugging 2022-01-22 20:58:02 +00:00
Tony Kuker
8bae98de20 Added logic to derive the color palette if the framebuffer update is too big 2022-01-21 03:10:25 +00:00
Tony Kuker
9bcc3d09a7 Fixed compiler errors 2022-01-21 03:03:07 +00:00
Tony Kuker
0fcded84d0 Cleanup and add meaningful error reporting 2022-01-21 02:37:48 +00:00
Tony Kuker
9186ef063e Color is working with hard-coded color palette 2022-01-20 03:37:01 +00:00
Tony Kuker
b8ffde49ca fix b&w inverted 2022-01-19 23:25:29 +00:00
Tony Kuker
2a04c8f031 Color palette handling enhancements 2022-01-19 22:56:37 +00:00
Tony Kuker
a0d4b3d670 Optional code to save the framebuffers and color palettes. Fix B&W color palette 2022-01-19 21:03:26 +00:00
Tony Kuker
eff5bc14a6 Fixed 256 color positioning 2022-01-19 19:59:04 +00:00
Tony Kuker
0fefe5ed69 Updated to properly receive color palette 2022-01-19 19:31:09 +00:00
Tony Kuker
ea920205a8 Fix crashing 2022-01-18 23:30:05 +00:00
Tony Kuker
16daf64a3c intermediate checkin 2022-01-18 22:20:14 +00:00
akuker
c5fdee898a
Fix compilation error 2022-01-17 10:15:44 -06:00
Tony Kuker
cc23549776 1 and 8 bit grays working 2022-01-16 22:35:11 +00:00
Tony Kuker
9cc40d3da3 Updated to work with multiple screen resolutions (only black & white) 2022-01-16 21:45:29 +00:00
Tony Kuker
a05c7d795d Blank flashing cursor when powerview is enabled 2022-01-16 20:13:01 +00:00
Tony Kuker
ffa565a8b4 Initialize the framebuffer to blue and implement a couple more commands 2022-01-15 05:13:06 +00:00
Tony Kuker
685da31c70 Now it really friggin worksgit diff 2022-01-10 03:19:21 +00:00
Tony Kuker
02a4dc39db it freakin works 2022-01-10 02:47:54 +00:00
Tony Kuker
d2123b2f86 Updated to calculate the length of CA command 2022-01-09 04:41:08 +00:00
Tony Kuker
f09fb6dd2f Additional powerview processing implemented 2022-01-08 22:04:34 +00:00
Tony Kuker
9f8fc1fb8a Added hooks for C8-CCh 2022-01-08 04:51:51 +00:00
akuker
983b0257c9 Added Cmd C8-CC 2022-01-07 20:53:42 -06:00
Tony Kuker
2bc809b0a5 Added inquiry response 2022-01-04 21:25:36 +00:00
RaSCSI User
610238659d enable powerview in rasctl 2021-12-27 23:41:32 +00:00
RaSCSI User
d8aa839118 Initial framework for PowerView emulation 2021-12-27 23:32:41 +00:00
Uwe Seimet
1ad1242fad
Feature READ/WRITE LONG(10/16) (#481)
* Partial implementation of READ/WRITE LONG(10)

* Comment update

* Comment update

* Fixed typo

* Updated dispatcher table

* Added READ/LONG(16)

* Added 16 byte opcode

* Updated flushing

* Logging update

* Fixed typo

* Check start sector

* Renaming
2021-11-26 22:29:21 -06:00
Uwe Seimet
f46453bbd2
Various DaynaPort related logging updates (#477)
* Removed duplicate CDB logging

* Updated logging

* Logging update

* Log level update

* Removed more duplicate logging

* Logging update

* Logging update

* Comment update

* Logging update

* Removed assertion

* Removed dummy method (doing nothing)

* Logging update
2021-11-18 19:24:36 -06:00
Pacjunk
a3645dfecc
Update disk.cpp - modesense10 command length (#464)
Modesense(10) has 2 length bytes, therefore the size adjustment must be 2, not 1!
2021-11-14 10:41:34 +01:00
Pacjunk
641e7df64c
Update scsihd.cpp Inquiry data length (#463)
The inquiry command only returns up to the revision information, so don't return more data than this. This gives a total of 36 bytes returned, which is the required minimum in the spec.
2021-11-14 10:41:10 +01:00
Uwe Seimet
41c3405b99
Code cleanup (#442)
* Fixed clang warnings

* Removed obsolete logging

* Collection usage cleanup

* Use sorted collections

* Updated sorting, added comments

* Improved locality of code

* Simplified vector initialization

* Fixed typo

* Collection usage cleanup

* Removed useless comments and assertions

* Removed useless comments, removed code inconsistencies

* Removed useless comments, renaming

* Replaced cast by a more explicit logical operation

* Removed target with hard-coded paths

* Include file cleanup

* Use more standard includes

* Fixed log level name

* Updated switch

* Fixed typo

* Improvoded locality of code, removed useless comments
2021-11-13 19:36:35 -06:00
joshua stein
b54977daa6
DaynaPort: Remove scsi_cmd_read_6_t struct, it was not correct (#435)
The DWORDs in `cdb *` are not raw packed data from the wire, they
are manually copied in a previous function.  Trying to cast that
unpacked, aligned-on-byte-boundary data into the packed
scsi_cmd_read_6_t structure is not correct and does not put the
correct DWORDs into the proper fields.

Just do away with this struct and refer to the 2 cdb DWORDs (opcode
and length) manually.
2021-11-08 22:56:18 +01:00
joshua stein
f2b5d86fa0
DaynaPort: Ignore commands with a bogus control value (#433)
All traffic from the DaynaPort will have a control value of 0xc0 or
0x80, so any commands that don't should be ignored.

This helps the Mac Plus which will try to READ(6) from the DaynaPort
device if it's attached at boot and then try to interpret the
ethernet packet as hard drive data and crash.

See issue akuker#419
2021-11-08 22:42:54 +01:00
Uwe Seimet
f7ec0de834
Fix clang warnings (#423)
* Fixed clang compiler warnings

* Removed unused code

* Reset compiler
2021-11-07 21:30:21 +01:00
Uwe Seimet
817c1cde31
Fix issue 422 (#425)
* Use the effective filename when checking for duplicates

* Fixed check for asynchronous notifications

* Added additional filename check

* Applied fix also for attach
2021-11-07 21:18:58 +01:00
Uwe Seimet
00e8855e41
Fixed capacity calculation for small drives (#346) 2021-10-19 08:45:41 -07:00
Uwe Seimet
62a104f75d
Added SHUT_DOWN command, split rascsi.cpp (#334)
* Added TERMINATE command

* Help text update

* Created ras_util namespace

* Created protobuf_util namespace

* Extracted RascsiImage from rascsi for better modularity

* Fixed wrong filenames (class name differed)

* No need for response handler to be a singleton

* Class renaming

* Renaming

* Moved code

* Moved code

* Image folder handling optimizations

* Updated device factory handling

* DeviceFactory constructor should be private (singleton)

* Renamed TERMINATE to SHUT_DOWN

* Fixed capacity calculation for INQUIRY data

* ATTACH and DETACH return the resulting device list for convenience

* Interface comment update

* Moved code, check fd

* Use new command when returning result for ATTACH/DETACH

* Updated interface comments
2021-10-17 08:51:14 +02:00
Uwe Seimet
84f40c7fe9
Issue 319, detach all devices on SIGKILL/SIGTERM (#328)
* Removed size validation for MOs

* rasctl -D detaches all devices

* Detach all devices on Ctrl-C (KILL signal)

* Added comment

* Also detach all devices on SIGTERM
2021-10-14 13:25:10 -07:00
Uwe Seimet
c68c17e366
File size filtering update (#320)
* Updated logging

* Updated logging

* Updated logging

* Updated ID/LUN parsing

* Updated handling of max_id

* The -HD option sets type to SAHD

* Replaced is_sasi by device type

* Updated logging

* Logging update

* Improved LUN evaluation

* Check LUN against UnitMax

* Comment update

* LUN parsing update

* Logging update

* Logging update

* Updated ReportLuns

* Updated REPORT LUNS

* Cleanup

* Updated REPORT LUNS

* Updated Execute()

* Updated LUN handling

* Check for consecutive LUNs

* Added LUN check for remotely attached devices

* Remember LUN selected by IDENTIFY

* Evaluate LUN from IDENTIFY message

* Added comment

* Updated REPORT LUNS

* Initlize LUN

* Logging update

* Support 32 LUNs

* rasctl display update

* Updated LUN check for LUNSs > 7

* Simplified LUN validation

* Fixed wrong ID/LUN handling with values > 9

* Log level update

* Manpage update

* rascsi parser update

* Updated error handling

* Updated error handling

* Updated LUN setup validation

* Updated logging

* Improved validation of consecutive LUNs

* Renaming

* Detach all LUNs equal to or higher than the one specified

* File size is not required anymore to be a multiple of the block size

* Renaming
2021-10-13 09:41:21 -07:00
Uwe Seimet
89d66ef02b
Support for multiple SCSI LUNs (#318)
* Updated logging

* Updated logging

* Updated logging

* Updated ID/LUN parsing

* Updated handling of max_id

* The -HD option sets type to SAHD

* Replaced is_sasi by device type

* Updated logging

* Logging update

* Improved LUN evaluation

* Check LUN against UnitMax

* Comment update

* LUN parsing update

* Logging update

* Logging update

* Updated ReportLuns

* Updated REPORT LUNS

* Cleanup

* Updated REPORT LUNS

* Updated Execute()

* Updated LUN handling

* Check for consecutive LUNs

* Added LUN check for remotely attached devices

* Remember LUN selected by IDENTIFY

* Evaluate LUN from IDENTIFY message

* Added comment

* Updated REPORT LUNS

* Initlize LUN

* Logging update

* Support 32 LUNs

* rasctl display update

* Updated LUN check for LUNSs > 7

* Simplified LUN validation

* Fixed wrong ID/LUN handling with values > 9

* Log level update

* Manpage update

* rascsi parser update

* Updated error handling

* Updated error handling

* Updated LUN setup validation

* Updated logging

* Improved validation of consecutive LUNs

* Renaming

* Detach all LUNs equal to or higher than the one specified

* Add support for LUN in the device list

* Add ability to show device info for LUNs

* Make it possible to detach and eject LUNs

* Show full path to prop file

* Show only LUN columns when non-0 LUNs present

* Support for attaching LUNs

* Add helptext

* Fix handling of removable media

* Retain the previous behavior of recommending the next unoccupied id

* SCSI ID validation no longer needed due to changed logic

* Make use of recommended id everywhere

* Docstring

Co-authored-by: Daniel Markstedt <markstedt@gmail.com>
2021-10-13 11:03:31 +02:00
Uwe Seimet
be090de0cc
Fix block size handling (512 bytes) for CDs (#316)
* Replaced code that assumes CDs having 2048 bytes per sector

* Comment update

* Logging update

* Logging update

* Set sector size before calling Open()
2021-10-10 00:03:51 -07:00
Uwe Seimet
dd5cad616f
Updated/Removed CD-ROM size checks (#315) 2021-10-08 14:59:23 -07:00
Uwe Seimet
f5a6f5dce2
Removed ISO CD block size check, optionally set r/o status when copying a file (#311)
* Removed ISO CD-ROM block size check

* Removed CD size checks

* Replicate read-only status when copying an image file

* Cleanup

* Copied images can optionally be created read-only

* Check path of default image folder

* Comment update

* Updated error message
2021-10-08 04:05:57 -07:00
Uwe Seimet
c581c12d33
Set SADI product name to SASI HD (#291) 2021-09-30 10:37:12 -07:00
Uwe Seimet
682d35f1e6
Improve MO support by removing capacity restrictions (#284)
* Improve MO support by removing capacity restrictions, resolves #283

* Updated geometry handling
2021-09-29 09:05:30 -07:00
nsafran1217
b3b740e3cc
Issue 278: fix ModeSense(6) and ModeSense(10) (#280)
* Change ModeSense(6) and ModeSense(10) to return proper length of data

* Fix size of block descripter returned from ModeSense(10)
2021-09-29 09:02:45 +02:00
Uwe Seimet
97c2a11329
MAPPING_INFO command, returning the mapping of extensions to types (#275)
* Added MAPPING_INFO command, returning the mapping of extensions to types

* Updated help message

* Set explicit vendor/product/revision for .hda extension

* Added leading blanks to vendor and product for .hda

* Product string update

* Fixed typo in help string

* Manpage update

* Spoof hda as a Quantum Fireball

Co-authored-by: Daniel Markstedt <markstedt@gmail.com>
2021-09-27 16:39:50 -07:00
Uwe Seimet
829356a32c
protobuf interface returns assumed device type (#259)
* Added device type to PbImageFile

* Comment update

* Code cleanup

* More code cleanup

* Extraced methods

* Extracted methods

* Renaming

* Moved code

* Visility update

* Updated error handling

* Removed duplicate error handling

* Removed duplicate code

* Code cleanup

* Moved code

* Moved code
2021-09-24 08:48:48 +02:00