Merge branch 'master' into multimonitor-take2-ui
This commit is contained in:
@@ -49,7 +49,7 @@ typedef struct ide_s {
|
||||
blocksize, blockcount,
|
||||
hdd_num, channel,
|
||||
pos, sector_pos,
|
||||
lba, skip512,
|
||||
lba,
|
||||
reset, mdma_mode,
|
||||
do_initial_read;
|
||||
uint32_t secount, sector,
|
||||
@@ -67,6 +67,7 @@ typedef struct ide_s {
|
||||
/* Stuff mostly used by ATAPI */
|
||||
scsi_common_t *sc;
|
||||
int interrupt_drq;
|
||||
double pending_delay;
|
||||
|
||||
int (*get_max)(int ide_has_dma, int type);
|
||||
int (*get_timings)(int ide_has_dma, int type);
|
||||
|
||||
@@ -72,6 +72,62 @@ enum {
|
||||
};
|
||||
#endif
|
||||
|
||||
enum {
|
||||
HDD_OP_SEEK = 0,
|
||||
HDD_OP_READ,
|
||||
HDD_OP_WRITE
|
||||
};
|
||||
|
||||
#define HDD_MAX_ZONES 16
|
||||
#define HDD_MAX_CACHE_SEG 16
|
||||
|
||||
typedef struct {
|
||||
uint32_t match_max_mbyte;
|
||||
uint32_t zones;
|
||||
uint32_t avg_spt;
|
||||
uint32_t heads;
|
||||
uint32_t rpm;
|
||||
uint32_t target_year;
|
||||
uint32_t rcache_num_seg;
|
||||
uint32_t rcache_seg_size;
|
||||
uint32_t max_multiple;
|
||||
double full_stroke_ms;
|
||||
double track_seek_ms;
|
||||
} hdd_preset_t;
|
||||
|
||||
typedef struct {
|
||||
uint32_t id;
|
||||
uint32_t lba_addr;
|
||||
uint32_t ra_addr;
|
||||
uint32_t host_addr;
|
||||
uint8_t lru;
|
||||
uint8_t valid;
|
||||
} hdd_cache_seg_t;
|
||||
|
||||
typedef struct {
|
||||
// Read cache
|
||||
hdd_cache_seg_t segments[HDD_MAX_CACHE_SEG];
|
||||
uint32_t num_segments;
|
||||
uint32_t segment_size;
|
||||
uint32_t ra_segment;
|
||||
uint8_t ra_ongoing;
|
||||
uint64_t ra_start_time;
|
||||
|
||||
// Write cache
|
||||
uint32_t write_addr;
|
||||
uint32_t write_pending;
|
||||
uint32_t write_size;
|
||||
uint64_t write_start_time;
|
||||
} hdd_cache_t;
|
||||
|
||||
typedef struct {
|
||||
uint32_t cylinders;
|
||||
uint32_t sectors_per_track;
|
||||
double sector_time_usec;
|
||||
uint32_t start_sector;
|
||||
uint32_t end_sector;
|
||||
uint32_t start_track;
|
||||
} hdd_zone_t;
|
||||
|
||||
/* Define the virtual Hard Disk. */
|
||||
typedef struct {
|
||||
@@ -100,6 +156,23 @@ typedef struct {
|
||||
spt,
|
||||
hpc, /* Physical geometry parameters */
|
||||
tracks;
|
||||
|
||||
hdd_zone_t zones[HDD_MAX_ZONES];
|
||||
uint32_t num_zones;
|
||||
hdd_cache_t cache;
|
||||
uint32_t phy_cyl;
|
||||
uint32_t phy_heads;
|
||||
uint32_t rpm;
|
||||
uint8_t max_multiple_block;
|
||||
|
||||
uint32_t cur_cylinder;
|
||||
uint32_t cur_track;
|
||||
uint32_t cur_addr;
|
||||
|
||||
double avg_rotation_lat_usec;
|
||||
double full_stroke_usec;
|
||||
double head_switch_usec;
|
||||
double cyl_switch_usec;
|
||||
} hard_disk_t;
|
||||
|
||||
|
||||
@@ -131,5 +204,10 @@ extern int image_is_hdi(const char *s);
|
||||
extern int image_is_hdx(const char *s, int check_signature);
|
||||
extern int image_is_vhd(const char *s, int check_signature);
|
||||
|
||||
extern double hdd_timing_write(hard_disk_t *hdd, uint32_t addr, uint32_t len);
|
||||
extern double hdd_timing_read(hard_disk_t *hdd, uint32_t addr, uint32_t len);
|
||||
extern double hdd_seek_get_time(hard_disk_t *hdd, uint32_t dst_addr, uint8_t operation, uint8_t continuous, double max_seek_time);
|
||||
extern void hdd_preset_apply(hard_disk_t *hdd, hdd_preset_t *preset);
|
||||
extern void hdd_preset_auto(hard_disk_t *hdd);
|
||||
|
||||
#endif /*EMU_HDD_H*/
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
* Copyright 2008-2019 Sarah Walker.
|
||||
* Copyright 2016-2019 Miran Grca.
|
||||
* Copyright 2018,2019 David Hrdlička.
|
||||
* Copyright 2021-2022 Jasmine Iwanek.
|
||||
*/
|
||||
|
||||
#ifndef WIN_RESOURCE_H
|
||||
@@ -184,6 +185,8 @@
|
||||
#define IDC_CHECK_VOODOO 1022
|
||||
#define IDC_BUTTON_VOODOO 1023
|
||||
#define IDC_CHECK_IBM8514 1024
|
||||
#define IDC_CHECK_XGA 1025
|
||||
#define IDC_BUTTON_XGA 1026
|
||||
|
||||
#define IDC_INPUT 1030 /* input config */
|
||||
#define IDC_COMBO_MOUSE 1031
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
|
||||
extern const device_t scsi_lcs6821n_device;
|
||||
extern const device_t scsi_rt1000b_device;
|
||||
extern const device_t scsi_rt1000mc_device;
|
||||
extern const device_t scsi_t128_device;
|
||||
extern const device_t scsi_t130b_device;
|
||||
extern const device_t scsi_ls2000_device;
|
||||
|
||||
@@ -62,7 +62,7 @@ typedef struct ibm8514_t
|
||||
int x1, x2, y1, y2;
|
||||
int sys_cnt, sys_cnt2;
|
||||
int temp_cnt;
|
||||
int16_t cx, cy;
|
||||
int16_t cx, cy, oldcy;
|
||||
int16_t sx, sy;
|
||||
int16_t dx, dy;
|
||||
int16_t err;
|
||||
@@ -80,7 +80,7 @@ typedef struct ibm8514_t
|
||||
int odd_in, odd_out;
|
||||
|
||||
uint16_t scratch;
|
||||
int fill_state, fill_drop;
|
||||
int fill_state, xdir, ydir;
|
||||
} accel;
|
||||
|
||||
uint16_t test;
|
||||
|
||||
Reference in New Issue
Block a user