/*
 * Sega Saturn USB flash cart ROM
 * by Anders Montonen, 2012
 *
 * Creative Commons Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)
 *
 */
#ifndef SCU_H_
#define SCU_H_

#include <stdint.h>

#define SCU_BASE 0x25FE0000

#define D0R     (*(volatile uint32_t*)(SCU_BASE+0x00))
#define D0W     (*(volatile uint32_t*)(SCU_BASE+0x04))
#define D0C     (*(volatile uint32_t*)(SCU_BASE+0x08))
#define D0AD    (*(volatile uint32_t*)(SCU_BASE+0x0c))
#define D0EN    (*(volatile uint32_t*)(SCU_BASE+0x10))
#define D0MD    (*(volatile uint32_t*)(SCU_BASE+0x14))

#define D1R     (*(volatile uint32_t*)(SCU_BASE+0x20))
#define D1W     (*(volatile uint32_t*)(SCU_BASE+0x24))
#define D1C     (*(volatile uint32_t*)(SCU_BASE+0x28))
#define D1AD    (*(volatile uint32_t*)(SCU_BASE+0x2c))
#define D1EN    (*(volatile uint32_t*)(SCU_BASE+0x30))
#define D1MD    (*(volatile uint32_t*)(SCU_BASE+0x34))

#define D2R     (*(volatile uint32_t*)(SCU_BASE+0x40))
#define D2W     (*(volatile uint32_t*)(SCU_BASE+0x44))
#define D2C     (*(volatile uint32_t*)(SCU_BASE+0x48))
#define D2AD    (*(volatile uint32_t*)(SCU_BASE+0x4c))
#define D2EN    (*(volatile uint32_t*)(SCU_BASE+0x50))
#define D2MD    (*(volatile uint32_t*)(SCU_BASE+0x54))

#define DSTP    (*(volatile uint32_t*)(SCU_BASE+0x60))
#define DSTA    (*(volatile uint32_t*)(SCU_BASE+0x7c))

#define PPAF    (*(volatile uint32_t*)(SCU_BASE+0x80))
#define PPD     (*(volatile uint32_t*)(SCU_BASE+0x84))
#define PDA     (*(volatile uint32_t*)(SCU_BASE+0x88))
#define PDD     (*(volatile uint32_t*)(SCU_BASE+0x8c))

#define T0C     (*(volatile uint32_t*)(SCU_BASE+0x90))
#define T1S     (*(volatile uint32_t*)(SCU_BASE+0x94))
#define T1MD    (*(volatile uint32_t*)(SCU_BASE+0x98))

#define IMS     (*(volatile uint32_t*)(SCU_BASE+0xa0))
#define IST     (*(volatile uint32_t*)(SCU_BASE+0xa4))

#define AIACK   (*(volatile uint32_t*)(SCU_BASE+0xa8))
#define ASR0    (*(volatile uint32_t*)(SCU_BASE+0xb0))
#define ASR1    (*(volatile uint32_t*)(SCU_BASE+0xb4))
#define AREF    (*(volatile uint32_t*)(SCU_BASE+0xb8))

#define RSEL    (*(volatile uint32_t*)(SCU_BASE+0xc4))

#define VER     (*(volatile uint32_t*)(SCU_BASE+0xc8))

#endif /* SCU_H_ */
