/*
 * Sega Saturn cartridge flash tool
 * by Anders Montonen, 2012
 *
 * Original software by ExCyber
 * Graphics routines by Charles MacDonald
 */
#ifndef FLASH_H_
#define FLASH_H_

#include <stdint.h>

typedef struct FlashDev
{
    const char *pVendorString;
    const char *pDeviceString;
    uint32_t    RomSize;
    uint32_t    PageSize;
    void        (*EraseFlash)(const struct FlashDev*);
    void        (*EraseFlashPage)(const struct FlashDev*, const uint32_t);
    void        (*WriteFlashPage)(const struct FlashDev*, const uint32_t, const uint16_t*);
} FlashDevice_t;

void FillFlashDeviceInfo(const uint16_t VendorID, const uint16_t DeviceID,
                         FlashDevice_t *pFlashDevice);

uint16_t FlashGetVendorID(void);
uint16_t FlashGetDeviceID(void);

#endif /* FLASH_H_ */
