#ifndef _DEV_LCD_H_
#define _DEV_LCD_H_

/* 表示制御部レジスタ  */
#define SGMODE  ((volatile unsigned long int*)(0xFFFF3800))
#define SGINTCNT  ((volatile unsigned long int*)(0xFFFF3804))
#define SYNCNT  ((volatile unsigned long int*)(0xFFFF3808))
#define PANEL_CLKSEL  ((volatile unsigned long int*)(0xFFFF380C))
#define SYN_SIZE  ((volatile unsigned long int*)(0xFFFF3900))
#define PANEL_VSYNC_TIM  ((volatile unsigned long int*)(0xFFFF3904))
#define PANEL_HSYNC_TIM  ((volatile unsigned long int*)(0xFFFF3908))
#define VIDEO_VSYNC_TIM2  ((volatile unsigned long int*)(0xFFFF390C))
#define GRA_VSYNC_TIM  ((volatile unsigned long int*)(0xFFFF3910))
#define AC_LINE_NUM  ((volatile unsigned long int*)(0xFFFF3914))
#define DE_SIZE  ((volatile unsigned long int*)(0xFFFF3920))
#define DE_START  ((volatile unsigned long int*)(0xFFFF3924))

/* グラフィックス部1レジスタ */
#define GRCMEN1  ((volatile unsigned long int*)(0xFFFF2800))
#define GRCBUSCNT1  ((volatile unsigned long int*)(0xFFFF2804))
#define GRCINTCNT1  ((volatile unsigned long int*)(0xFFFF2808))
#define GROPSADR1  ((volatile unsigned long int*)(0xFFFF2B08))
#define GROPSWH1  ((volatile unsigned long int*)(0xFFFF2B0C))
#define GROPSOFST1  ((volatile unsigned long int*)(0xFFFF2B10))
#define GROPDPHV1  ((volatile unsigned long int*)(0xFFFF2B14))
#define GROPEWH1  ((volatile unsigned long int*)(0xFFFF2B18))
#define GROPEDPHV1  ((volatile unsigned long int*)(0xFFFF2B1C))
#define GROPEDPA1  ((volatile unsigned long int*)(0xFFFF2B20))
#define GROPCRKY0_1  ((volatile unsigned long int*)(0xFFFF2B24))
#define GROPCRKY1_1  ((volatile unsigned long int*)(0xFFFF2B28))
#define GROPBASERGB1  ((volatile unsigned long int*)(0xFFFF2B2C))

/* グラフィックス部2レジスタ */
#define GRCMEN2  ((volatile unsigned long int*)(0xFFFF3000))
#define GRCBUSCNT2  ((volatile unsigned long int*)(0xFFFF3004))
#define GRCINTCNT2  ((volatile unsigned long int*)(0xFFFF3008))
#define GROPSADR2  ((volatile unsigned long int*)(0xFFFF3308))
#define GROPSWH2  ((volatile unsigned long int*)(0xFFFF330C))
#define GROPSOFST2  ((volatile unsigned long int*)(0xFFFF3310))
#define GROPDPHV2  ((volatile unsigned long int*)(0xFFFF3314))
#define GROPEWH2  ((volatile unsigned long int*)(0xFFFF3318))
#define GROPEDPHV2  ((volatile unsigned long int*)(0xFFFF331C))
#define GROPEDPA2  ((volatile unsigned long int*)(0xFFFF3320))
#define GROPCRKY0_2  ((volatile unsigned long int*)(0xFFFF3324))
#define GROPCRKY1_2  ((volatile unsigned long int*)(0xFFFF3328))
#define GROPBASERGB2  ((volatile unsigned long int*)(0xFFFF332C))

/* VDC3 初期化 */
#define PGCR7  ((volatile unsigned short*)(0xFFFE38C0))
#define PGCR6  ((volatile unsigned short*)(0xFFFE38C2))
#define PGCR5  ((volatile unsigned short*)(0xFFFE38C4))
#define PGCR4  ((volatile unsigned short*)(0xFFFE38C6))
#define PGCR3  ((volatile unsigned short*)(0xFFFE38C8))
#define PGCR2  ((volatile unsigned short*)(0xFFFE38CA))
#define PGCR1  ((volatile unsigned short*)(0xFFFE38CC))
#define PGCR0  ((volatile unsigned short*)(0xFFFE38CE))

#define PJCR0  ((volatile unsigned short*)(0xFFFE390E))
#define PJIOR0  ((volatile unsigned short*)(0xFFFE3912))
#define PJDR0  ((volatile unsigned short*)(0xFFFE3916))

/* カラー */
#define BLACK 0x0000
#define BLUE 0x001F
#define GREEN 0x07E0
#define CYAN 0x07FF
#define RED 0xF800
#define MAGENTA 0xF81F
#define YELLOW 0xFFE0
#define WHITE 0xFFFF

void vd3_initialize(void);
void show_color_bar(void);
void show_color(unsigned short color,volatile unsigned char line_val);
#endif
