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

56 lines
1.1 KiB
C
Raw Normal View History

2022-02-18 19:42:21 -05:00
#ifndef VIDEO_ATI_EEPROM_H
#define VIDEO_ATI_EEPROM_H
2022-02-18 19:42:21 -05:00
/* Copyright holders: Sarah Walker
see COPYING for more details
*/
enum {
EEPROM_IDLE,
EEPROM_WAIT,
EEPROM_OPCODE,
EEPROM_INPUT,
EEPROM_OUTPUT
};
enum {
EEPROM_OP_EW = 4,
EEPROM_OP_WRITE = 5,
EEPROM_OP_READ = 6,
EEPROM_OP_ERASE = 7,
2022-02-20 02:26:27 -05:00
EEPROM_OP_WRALMAIN = -1
};
enum {
EEPROM_OP_EWDS = 0,
EEPROM_OP_WRAL = 1,
EEPROM_OP_ERAL = 2,
EEPROM_OP_EWEN = 3
};
typedef struct ati_eeprom_t {
uint16_t data[256];
2023-06-09 23:46:54 -04:00
int oldclk;
int oldena;
int opcode;
int state;
int count;
int out;
int wp;
uint32_t dat;
int type;
int address;
char fn[256];
} ati_eeprom_t;
void ati_eeprom_load(ati_eeprom_t *eeprom, char *fn, int type);
void ati_eeprom_load_mach8(ati_eeprom_t *eeprom, char *fn, int mca);
void ati_eeprom_load_mach8_vga(ati_eeprom_t *eeprom, char *fn);
void ati_eeprom_write(ati_eeprom_t *eeprom, int ena, int clk, int dat);
int ati_eeprom_read(ati_eeprom_t *eeprom);
2022-02-18 19:42:21 -05:00
#endif /*VIDEO_ATI_EEPROM_H*/