1
0
mirror of https://gitea.tendokyu.moe/Dniel97/segatools.git synced 2024-11-27 22:40:48 +01:00

amex/ds.c: Handle ABI version ioctl

This commit is contained in:
Felix 2021-09-01 22:52:07 +00:00
parent 6add974ed3
commit 636c85fa8f

View File

@ -22,8 +22,9 @@
#pragma pack(push, 1)
enum {
DS_IOCTL_SETUP = 0x80006004,
DS_IOCTL_READ_SECTOR = 0x80006010,
DS_IOCTL_GET_ABI_VERSION = 0x80006000,
DS_IOCTL_SETUP = 0x80006004,
DS_IOCTL_READ_SECTOR = 0x80006010,
};
struct ds_eeprom {
@ -44,6 +45,7 @@ static HRESULT ds_handle_close(struct irp *irp);
static HRESULT ds_handle_ioctl(struct irp *irp);
static HRESULT ds_ioctl_get_geometry(struct irp *irp);
static HRESULT ds_ioctl_get_abi_version(struct irp *irp);
static HRESULT ds_ioctl_setup(struct irp *irp);
static HRESULT ds_ioctl_read_sector(struct irp *irp);
@ -134,6 +136,9 @@ static HRESULT ds_handle_ioctl(struct irp *irp)
case IOCTL_DISK_GET_DRIVE_GEOMETRY:
return ds_ioctl_get_geometry(irp);
case DS_IOCTL_GET_ABI_VERSION:
return ds_ioctl_get_abi_version(irp);
case DS_IOCTL_SETUP:
return ds_ioctl_setup(irp);
@ -173,6 +178,11 @@ static HRESULT ds_ioctl_get_geometry(struct irp *irp)
return hr;
}
static HRESULT ds_ioctl_get_abi_version(struct irp *irp)
{
return iobuf_write_le16(&irp->read, 256);
}
static HRESULT ds_ioctl_setup(struct irp *irp)
{
dprintf("DS: Setup IOCTL\n");