Najpierw jest numer indeksu (bajt, pod jeden adres) potem wartość (bajt, pod inny adres).
Pytanie techniczne, jak to zapisać aby było zjadliwe dla AHCC/PureC (w tej chwili jest błąd przy kompilacji w zaznaczonym miejscu):
struct tPictureInfo{
unsigned long infoType;
unsigned long vMemSize;
unsigned long infoWidth;
unsigned long infoHeight;
unsigned long infoRefresh;
}; typedef struct tPictureInfo PICTUREINFO; typedef struct tPictureInfo* PPICTUREINFO;
struct tvmode{
PICTUREINFO info;
unsigned char extReg[EXTCOUNT];
unsigned char crtReg[CRTCOUNT];
unsigned char seqReg[SEQCOUNT];
unsigned char atrReg[ATRCOUNT];
unsigned char gfxReg[GFXCOUNT];
} video_vmode[] = {
{ <-- w tym miejscu jest błąd (nie oczekiwano klamry)
.info = {
.infoType = PICTURE_GFX4BPP6BPC,
.vMemSize = (640*480/2),
.infoWidth = 640,
.infoHeight = 480,
.infoRefresh = 0
},
.extReg = {0x01|0xC0|CLK_25},
.crtReg = {0x5f,0x4f,0x50,0x82,0x55,0x81,0xbf,0x1f,0x0,0x80,0xe,0xf,0x0,0x0,0x0,0x20,0x9c,0x8e,0x8f,0x28,0x7f,0x96,0xb9,0xff,0xff},
.seqReg = {0xff, 0x0, 0xff, 0x0, 0x4},
.atrReg = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,0x1,0x0,0xff,0x00},
.gfxReg = {0xff,0,0,0,0,0,0x01,0x00,0xff}
},
{
.info = {
.infoType = PICTURE_TEXT1C1A,
.vMemSize = (80*20*2),
.infoWidth = 80,
.infoHeight = 20,
.infoRefresh = 0
},
.extReg = {0x03|0xC0|CLK_25},
.crtReg = {0x5f,0x4f,0x50,0x82,0x55,0x81,0xbf,0x1f,0x00,0x4f,0x0e,0x0f,0x00,0x00,0x02,0x30,0x9c,0x8e,0x8f,0x28,0x1f,0x96,0xb9,0xa3,0xff},
.seqReg = {0x03,0x00,0x03,0x00,0x02},
.gfxReg = {0x00,0x00,0x00,0x00,0x00,0x10,0x0e,0x0f,0x0ff},
.atrReg = {0,1,2,3,4,5,0x14,7,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,0x0C,0x00,0x0F,0x08}
}
};