Files
86Box/src/include/86box/scsi_disk.h

71 lines
1.7 KiB
C
Raw Normal View History

/*
2023-01-06 15:36:05 -05:00
* 86Box A hypervisor and IBM PC system emulator that specializes in
* running old operating systems and software designed for IBM
* PC systems and compatibles from 1981 through fairly recent
* system designs based on the PCI bus.
*
2023-01-06 15:36:05 -05:00
* Emulation of SCSI fixed and removable disks.
*
2020-03-25 00:46:02 +02:00
*
*
2023-01-06 15:36:05 -05:00
* Authors: Miran Grca, <mgrca8@gmail.com>
*
2023-01-06 15:36:29 -05:00
* Copyright 2017-2018 Miran Grca.
*/
2022-02-18 19:42:21 -05:00
#ifndef SCSI_DISK_H
2022-09-18 17:15:38 -04:00
#define SCSI_DISK_H
2023-06-28 13:46:28 -04:00
typedef struct scsi_disk_t {
mode_sense_pages_t ms_pages_saved;
hard_disk_t * drv;
#ifdef EMU_IDE_H
ide_tf_t * tf;
#else
void * tf;
#endif
void * log;
2023-06-26 12:47:04 -04:00
uint8_t * temp_buffer;
uint8_t atapi_cdb[16];
uint8_t current_cdb[16];
uint8_t sense[256];
2023-06-26 12:47:04 -04:00
uint8_t id;
uint8_t cur_lun;
uint8_t pad0;
uint8_t pad1;
2023-06-26 12:47:04 -04:00
uint16_t max_transfer_len;
uint16_t pad2;
2023-06-26 12:47:04 -04:00
int requested_blocks;
int packet_status;
int total_length;
int do_page_save;
int unit_attention;
int request_pos;
int pad6;
int pad7;
uint32_t sector_pos;
uint32_t sector_len;
uint32_t packet_len;
2025-02-09 20:06:15 +01:00
uint32_t block_len;
double callback;
uint8_t (*ven_cmd)(void *sc, uint8_t *cdb, int32_t *BufLen);
} scsi_disk_t;
extern scsi_disk_t *scsi_disk[HDD_NUM];
extern void scsi_disk_reset(scsi_common_t *sc);
2022-09-18 17:15:38 -04:00
extern void scsi_disk_hard_reset(void);
extern void scsi_disk_close(void);
2022-02-18 19:42:21 -05:00
#endif /*SCSI_DISK_H*/