📄 framebuf.c
字号:
DMA_save(VADDR_MODE_GLOBAL, m + testy, testx, 0, 32);
ADDR_adv(testx, testy, 1024, 100, 32);
DMA_wait();
for(i = 0; i < 8; i++)
dma_buf.w[i] = l_color8;
DMA_save(VADDR_MODE_GLOBAL, m + testy, testx, 0, 32);
ADDR_adv(testx, testy, 1024, 100, 32);
DMA_wait();
}
m = MEM_BIDIR_CHROMA_DEF;
n = 512;
if(n <= m)
n = 512;
/*fillPattern(462, 512, 0xd472d472);*/
testx = 0;
testy = 0;
for(j = 0; j < 120; j++)
{
for(i = 0; i < 8; i++)
dma_buf.w[i] = c_color1;
DMA_save(VADDR_MODE_GLOBAL, m + testy, testx, 0, 32);
ADDR_adv(testx, testy, 1024, 100, 32);
DMA_wait();
for(i = 0; i < 8; i++)
dma_buf.w[i] = c_color2;
DMA_save(VADDR_MODE_GLOBAL, m + testy, testx, 0, 32);
ADDR_adv(testx, testy, 1024, 100, 32);
DMA_wait();
for(i = 0; i < 8; i++)
dma_buf.w[i] = c_color3;
DMA_save(VADDR_MODE_GLOBAL, m + testy, testx, 0, 32);
ADDR_adv(testx, testy, 1024, 100, 32);
DMA_wait();
for(i = 0; i < 8; i++)
dma_buf.w[i] = c_color4;
DMA_save(VADDR_MODE_GLOBAL, m + testy, testx, 0, 32);
ADDR_adv(testx, testy, 1024, 100, 32);
DMA_wait();
for(i = 0; i < 8; i++)
dma_buf.w[i] = c_color5;
DMA_save(VADDR_MODE_GLOBAL, m + testy, testx, 0, 32);
ADDR_adv(testx, testy, 1024, 100, 32);
DMA_wait();
for(i = 0; i < 8; i++)
dma_buf.w[i] = c_color6;
DMA_save(VADDR_MODE_GLOBAL, m + testy, testx, 0, 32);
ADDR_adv(testx, testy, 1024, 100, 32);
DMA_wait();
for(i = 0; i < 8; i++)
dma_buf.w[i] = c_color7;
DMA_save(VADDR_MODE_GLOBAL, m + testy, testx, 0, 32);
ADDR_adv(testx, testy, 1024, 100, 32);
DMA_wait();
for(i = 0; i < 8; i++)
dma_buf.w[i] = c_color8;
DMA_save(VADDR_MODE_GLOBAL, m + testy, testx, 0, 32);
ADDR_adv(testx, testy, 1024, 100, 32);
DMA_wait();
}
#endif
}
#endif
#if 0
void SetupColorBarBackground_EDO(void)
{
#if 0 //bondy reduce
int i;
for(i = 0; i < 32; i++)
dma_buf.b[i] = 0xff;
DMA_save(VADDR_MODE_GLOBAL, 101, 0, 0, 32);
DMA_wait();
for(i = 0; i < 32; i++)
dma_buf.b[i] = 0;
DMA_load(VADDR_MODE_GLOBAL, 101, 0, 0, 32);
DMA_wait();
for(i = 0; i < 32; i++)
{
//psprintf(LineBuffer,"i=%02x,",dma_buf.b[i]);
//epp_write_wait(LineBuffer);
}
#if 0
int m, n, i, j;
int testx, testy;
// int l_color1=0xEBEBEBEB;
int l_color2 = 0xA2A2A2A2;
// int l_color3=0x83838383;
/* int l_color4=0x70707070;
int l_color5=0x54545454;
int l_color6=0x41414141;
int l_color7=0x23232323;
int l_color8=0x10101010;*/
// int c_color1=0x80808080;
int c_color2 = 0x2C8E2C8E;
// int c_color3=0x9C2C9C2C;
/* int c_color4=0x483A483A;
int c_color5=0xB8C6B8C6;
int c_color6=0x64D464D4;
int c_color7=0xD490D490;
int c_color8=0x80808080;*/
m = 101;
testx = 0;
testy = 0;
for(j = 0; j < 128; j++)
{
for(i = 0; i < 8; i++)
dma_buf.w[i] = l_color2;
DMA_save(VADDR_MODE_GLOBAL, m + testy, testx, 0, 32);
ADDR_adv(testx, testy, 1024, 10, 32);
DMA_wait();
}
m = 200;
testx = 0;
testy = 0;
for(j = 0; j < 128; j++)
{
for(i = 0; i < 8; i++)
dma_buf.w[i] = c_color2;
DMA_save(VADDR_MODE_GLOBAL, m + testy, testx, 0, 32);
ADDR_adv(testx, testy, 1024, 10, 32);
DMA_wait();
}
#endif
#endif
}
#endif
#if 0
void SetupColorBarBackground_game(void)
{
#if 0 //bondy reduce
int m, n, i, j;
int testx, testy;
int l_color1 = 0x00000000;
int l_color2 = 0x01010101;
int l_color3 = 0x02020202;
int l_color4 = 0x03030303;
int l_color5 = 0x04040404;
int l_color6 = 0x05050505;
int l_color7 = 0x06060606;
int l_color8 = 0x07070707;
/*
int l_color1=0xEBEBEBEB;
int l_color2=0xA2A2A2A2;
int l_color3=0x83838383;
int l_color4=0x70707070;
int l_color5=0x54545454;
int l_color6=0x41414141;
int l_color7=0x23232323;
int l_color8=0x10101010;
*/
int c_color1 = 0x80808080;
int c_color2 = 0x2C8E2C8E;
int c_color3 = 0x9C2C9C2C;
int c_color4 = 0x483A483A;
int c_color5 = 0xB8C6B8C6;
int c_color6 = 0x64D464D4;
int c_color7 = 0xD490D490;
int c_color8 = 0x80808080;
m = MEM_REF0_LUMA_DEF;
n = MEM_REF0_CHROMA_DEF;
if(n <= m)
n = 512;
//fillPattern(363, 462,0x23232323);
testx = 0;
testy = 0;
for(j = 0; j < 240; j++)
{
for(i = 0; i < 8; i++)
dma_buf.w[i] = l_color1;
DMA_save(VADDR_MODE_GLOBAL, m + testy, testx, 0, 32);
ADDR_adv(testx, testy, 1024, 100, 32);
DMA_wait();
for(i = 0; i < 8; i++)
dma_buf.w[i] = l_color2;
DMA_save(VADDR_MODE_GLOBAL, m + testy, testx, 0, 32);
ADDR_adv(testx, testy, 1024, 100, 32);
DMA_wait();
for(i = 0; i < 8; i++)
dma_buf.w[i] = l_color3;
DMA_save(VADDR_MODE_GLOBAL, m + testy, testx, 0, 32);
ADDR_adv(testx, testy, 1024, 100, 32);
DMA_wait();
for(i = 0; i < 8; i++)
dma_buf.w[i] = l_color4;
DMA_save(VADDR_MODE_GLOBAL, m + testy, testx, 0, 32);
ADDR_adv(testx, testy, 1024, 100, 32);
DMA_wait();
for(i = 0; i < 8; i++)
dma_buf.w[i] = l_color5;
DMA_save(VADDR_MODE_GLOBAL, m + testy, testx, 0, 32);
ADDR_adv(testx, testy, 1024, 100, 32);
DMA_wait();
for(i = 0; i < 8; i++)
dma_buf.w[i] = l_color6;
DMA_save(VADDR_MODE_GLOBAL, m + testy, testx, 0, 32);
ADDR_adv(testx, testy, 1024, 100, 32);
DMA_wait();
for(i = 0; i < 8; i++)
dma_buf.w[i] = l_color7;
DMA_save(VADDR_MODE_GLOBAL, m + testy, testx, 0, 32);
ADDR_adv(testx, testy, 1024, 100, 32);
DMA_wait();
for(i = 0; i < 8; i++)
dma_buf.w[i] = l_color8;
DMA_save(VADDR_MODE_GLOBAL, m + testy, testx, 0, 32);
ADDR_adv(testx, testy, 1024, 100, 32);
DMA_wait();
}
#if 1
m = MEM_REF0_CHROMA_DEF;
n = 512;
if(n <= m)
n = 512;
/*fillPattern(462, 512, 0xd472d472);*/
testx = 0;
testy = 0;
for(j = 0; j < 120; j++)
{
for(i = 0; i < 8; i++)
dma_buf.w[i] = c_color1;
DMA_save(VADDR_MODE_GLOBAL, m + testy, testx, 0, 32);
ADDR_adv(testx, testy, 1024, 100, 32);
DMA_wait();
for(i = 0; i < 8; i++)
dma_buf.w[i] = c_color2;
DMA_save(VADDR_MODE_GLOBAL, m + testy, testx, 0, 32);
ADDR_adv(testx, testy, 1024, 100, 32);
DMA_wait();
for(i = 0; i < 8; i++)
dma_buf.w[i] = c_color3;
DMA_save(VADDR_MODE_GLOBAL, m + testy, testx, 0, 32);
ADDR_adv(testx, testy, 1024, 100, 32);
DMA_wait();
for(i = 0; i < 8; i++)
dma_buf.w[i] = c_color4;
DMA_save(VADDR_MODE_GLOBAL, m + testy, testx, 0, 32);
ADDR_adv(testx, testy, 1024, 100, 32);
DMA_wait();
for(i = 0; i < 8; i++)
dma_buf.w[i] = c_color5;
DMA_save(VADDR_MODE_GLOBAL, m + testy, testx, 0, 32);
ADDR_adv(testx, testy, 1024, 100, 32);
DMA_wait();
for(i = 0; i < 8; i++)
dma_buf.w[i] = c_color6;
DMA_save(VADDR_MODE_GLOBAL, m + testy, testx, 0, 32);
ADDR_adv(testx, testy, 1024, 100, 32);
DMA_wait();
for(i = 0; i < 8; i++)
dma_buf.w[i] = c_color7;
DMA_save(VADDR_MODE_GLOBAL, m + testy, testx, 0, 32);
ADDR_adv(testx, testy, 1024, 100, 32);
DMA_wait();
for(i = 0; i < 8; i++)
dma_buf.w[i] = c_color8;
DMA_save(VADDR_MODE_GLOBAL, m + testy, testx, 0, 32);
ADDR_adv(testx, testy, 1024, 100, 32);
DMA_wait();
}
#endif
#endif
}
#endif
#if 0
void SetupColorBarBackground_H(void)
{
#if 0 //bondy reduce
int m, n, i, j;
int testx, testy;
int l_color1 = 0xEBEBEBEB;
int l_color2 = 0xA2A2A2A2;
int l_color3 = 0x83838383;
int l_color4 = 0x70707070;
int l_color5 = 0x54545454;
int l_color6 = 0x41414141;
int l_color7 = 0x23232323;
int l_color8 = 0x10101010;
int c_color1 = 0x80808080;
int c_color2 = 0x2C8E2C8E;
int c_color3 = 0x9C2C9C2C;
int c_color4 = 0x483A483A;
int c_color5 = 0xB8C6B8C6;
int c_color6 = 0x64D464D4;
int c_color7 = 0xD490D490;
int c_color8 = 0x80808080;
m = MEM_BIDIR_LUMA_DEF;
n = MEM_BIDIR_CHROMA_DEF;
if(n <= m)
n = 512;
//fillPattern(363, 462,0x23232323);
testx = 0;
testy = 0;
for(j = 0; j < 3; j++)
{
for(i = 0; i < 8; i++)
dma_buf.w[i] = l_color1;
DMA_save(VADDR_MODE_GLOBAL, m + testy, testx, 0, 32);
ADDR_adv(testx, testy, 1024, 100, 32);
DMA_wait();
}
for(j = 0; j < 240; j++)
{
for(i = 0; i < 8; i++)
dma_buf.w[i] = l_color2;
DMA_save(VADDR_MODE_GLOBAL, m + testy, testx, 0, 32);
ADDR_adv(testx, testy, 1024, 100, 32);
DMA_wait();
}
for(j = 0; j < 240; j++)
{
for(i = 0; i < 8; i++)
dma_buf.w[i] = l_color3;
DMA_save(VADDR_MODE_GLOBAL, m + testy, testx, 0, 32);
ADDR_adv(testx, testy, 1024, 100, 32);
DMA_wait();
}
for(j = 0; j < 240; j++)
{
for(i = 0; i < 8; i++)
dma_buf.w[i] = l_color4;
DMA_save(VADDR_MODE_GLOBAL, m + testy, testx, 0, 32);
ADDR_adv(testx, testy, 1024, 100, 32);
DMA_wait();
}
for(j = 0; j < 240; j++)
{
for(i = 0; i < 8; i++)
dma_buf.w[i] = l_color5;
DMA_save(VADDR_MODE_GLOBAL, m + testy, testx, 0, 32);
ADDR_adv(testx, testy, 1024, 100, 32);
DMA_wait();
}
for(j = 0; j < 240; j++)
{
for(i = 0; i < 8; i++)
dma_buf.w[i] = l_color6;
DMA_save(VADDR_MODE_GLOBAL, m + testy, testx, 0, 32);
ADDR_adv(testx, testy, 1024, 100, 32);
DMA_wait();
}
for(j = 0; j < 240; j++)
{
for(i = 0; i < 8; i++)
dma_buf.w[i] = l_color7;
DMA_save(VADDR_MODE_GLOBAL, m + testy, testx, 0, 32);
ADDR_adv(testx, testy, 1024, 100, 32);
DMA_wait();
}
for(j = 0; j < 240; j++)
{
for(i = 0; i < 8; i++)
dma_buf.w[i] = l_color8;
DMA_save(VADDR_MODE_GLOBAL, m + testy, testx, 0, 32);
ADDR_adv(testx, testy, 1024, 100, 32);
DMA_wait();
}
m = MEM_BIDIR_CHROMA_DEF;
n = 512;
if(n <= m)
n = 512;
/*fillPattern(462, 512, 0xd472d472);*/
testx = 0;
testy = 0;
for(j = 0; j < 120; j++)
{
for(i = 0; i < 8; i++)
dma_buf.w[i] = c_color1;
DMA_save(VADDR_MODE_GLOBAL, m + testy, testx, 0, 32);
ADDR_adv(testx, testy, 1024, 100, 32);
DMA_wait();
}
for(j = 0; j < 120; j++)
{
for(i = 0; i < 8; i++)
dma_buf.w[i] = c_color2;
DMA_save(VADDR_MODE_GLOBAL, m + testy, testx, 0, 32);
ADDR_adv(testx, testy, 1024, 100, 32);
DMA_wait();
}
for(j = 0; j < 120; j++)
{
for(i = 0; i < 8; i++)
dma_buf.w[i] = c_color3;
DMA_save(VADDR_MODE_GLOBAL, m + testy, testx, 0, 32);
ADDR_adv(testx, testy, 1024, 100, 32);
DMA_wait();
}
for(j = 0; j < 120; j++)
{
for(i = 0; i < 8; i++)
dma_buf.w[i] = c_color4;
DMA_save(VADDR_MODE_GLOBAL, m + testy, testx, 0, 32);
ADDR_adv(testx, testy, 1024, 100, 32);
DMA_wait();
}
for(j = 0; j < 120; j++)
{
for(i = 0; i < 8; i++)
dma_buf.w[i] = c_color5;
DMA_save(VADDR_MODE_GLOBAL, m + testy, testx, 0, 32);
ADDR_adv(testx, testy, 1024, 100, 32);
DMA_wait();
}
for(j = 0; j < 120; j++)
{
for(i = 0; i < 8; i++)
dma_buf.w[i] = c_color6;
DMA_save(VADDR_MODE_GLOBAL, m + testy, testx, 0, 32);
ADDR_adv(testx, testy, 1024, 100, 32);
DMA_wait();
}
for(j = 0; j < 120; j++)
{
for(i = 0; i < 8; i++)
dma_buf.w[i] = c_color7;
DMA_save(VADDR_MODE_GLOBAL, m + testy, testx, 0, 32);
ADDR_adv(testx, testy, 1024, 100, 32);
DMA_wait();
}
for(j = 0; j < 120; j++)
{
for(i = 0; i < 8; i++)
dma_buf.w[i] = c_color8;
DMA_save(VADDR_MODE_GLOBAL, m + testy, testx, 0, 32);
ADDR_adv(testx, testy, 1024, 100, 32);
DMA_wait();
}
#endif
}
#endif
/*
**
*/
void disable_video(void)
{
// regs0->field_exchange = 0x10;
// field_exchange = 0x10;
//epp_write_wait("disable_video \n");
regs0->dis_y_start = 600;
regs0->dis_y_size = 0;
regs0->dis_x_size = 0;
vpp_disable_video = 1;
//#if CONFIG == CONFIG_COMBO_VCD
//WAIT_DISABLE_VSYNC; //rbhung 2002.10.16 mark for manu "瓜
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -