2023-10-10 21:12:53 +02:00
|
|
|
/**
|
|
|
|
* @file disk_info.h
|
|
|
|
* @brief 64DD disk information
|
|
|
|
* @ingroup menu
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef DISK_INFO_H__
|
|
|
|
#define DISK_INFO_H__
|
|
|
|
|
|
|
|
|
|
|
|
#include <stdbool.h>
|
|
|
|
#include <stdint.h>
|
|
|
|
|
2024-04-24 02:45:09 +02:00
|
|
|
#include "path.h"
|
|
|
|
|
|
|
|
|
2023-11-10 17:39:09 +01:00
|
|
|
/** @brief Disk state enumeration. */
|
2023-10-10 21:12:53 +02:00
|
|
|
typedef enum {
|
|
|
|
DISK_OK,
|
|
|
|
DISK_ERR_IO,
|
|
|
|
DISK_ERR_NO_FILE,
|
|
|
|
DISK_ERR_INVALID,
|
|
|
|
} disk_err_t;
|
|
|
|
|
2023-11-10 17:39:09 +01:00
|
|
|
/** @brief Disk region enumeration. */
|
2023-10-10 21:12:53 +02:00
|
|
|
typedef enum {
|
|
|
|
DISK_REGION_DEVELOPMENT,
|
|
|
|
DISK_REGION_JAPANESE,
|
|
|
|
DISK_REGION_USA,
|
|
|
|
} disk_region_t;
|
|
|
|
|
2023-11-10 17:39:09 +01:00
|
|
|
/** @brief Disk type enumeration. */
|
2023-10-10 21:12:53 +02:00
|
|
|
typedef enum {
|
|
|
|
DISK_TYPE_0,
|
|
|
|
DISK_TYPE_1,
|
|
|
|
DISK_TYPE_2,
|
|
|
|
DISK_TYPE_3,
|
|
|
|
DISK_TYPE_4,
|
|
|
|
DISK_TYPE_5,
|
|
|
|
DISK_TYPE_6,
|
|
|
|
} disk_type_t;
|
|
|
|
|
2023-11-10 17:39:09 +01:00
|
|
|
/** @brief Disk Information Structure. */
|
2023-10-10 21:12:53 +02:00
|
|
|
typedef struct {
|
|
|
|
disk_region_t region;
|
|
|
|
disk_type_t disk_type;
|
|
|
|
char id[4];
|
|
|
|
uint8_t version;
|
|
|
|
|
|
|
|
bool bad_system_area_lbas[24];
|
|
|
|
uint8_t defect_tracks[16][12];
|
|
|
|
} disk_info_t;
|
|
|
|
|
|
|
|
|
2024-04-24 02:45:09 +02:00
|
|
|
disk_err_t disk_info_load (path_t *path, disk_info_t *disk_info);
|
2023-10-10 21:12:53 +02:00
|
|
|
|
|
|
|
|
|
|
|
#endif
|