- changes due to libsys changes
Committed on the Free edition of March Hare Software CVSNT Server. Upgrade to CVS Suite for more features and support: http://march-hare.com/cvsnt/ git-svn-id: http://moon:8086/svn/vhdl/trunk@625 cc03376c-175c-47c8-b038-4cd826a8556b
This commit is contained in:
@@ -188,7 +188,7 @@ void nextGeneration( int* matrix, int* future ) {
|
|||||||
|
|
||||||
void gx_init(void)
|
void gx_init(void)
|
||||||
{
|
{
|
||||||
volatile UINT32 *pVGA_mctrl = (UINT32*)sys_vga_mctrl;
|
volatile UINT32 *pVGA_ctrl = (UINT32*)sys_vga_ctrl;
|
||||||
volatile UINT32 *pVGA_moffs = (UINT32*)sys_vga_moffs;
|
volatile UINT32 *pVGA_moffs = (UINT32*)sys_vga_moffs;
|
||||||
|
|
||||||
sleep(500);
|
sleep(500);
|
||||||
@@ -197,7 +197,7 @@ void gx_init(void)
|
|||||||
memset(g_gx_buff, 0, SCREEN_X*SCREEN_Y*sizeof(UINT32));
|
memset(g_gx_buff, 0, SCREEN_X*SCREEN_Y*sizeof(UINT32));
|
||||||
printf("g_gx_buff : %8.8X\n", (UINT32)g_gx_buff);
|
printf("g_gx_buff : %8.8X\n", (UINT32)g_gx_buff);
|
||||||
|
|
||||||
*pVGA_mctrl = 1;
|
*pVGA_ctrl |= sys_vga_bit_msten;
|
||||||
*pVGA_moffs = (UINT32)g_gx_buff;
|
*pVGA_moffs = (UINT32)g_gx_buff;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ struct adjektive
|
|||||||
|
|
||||||
char getch(void)
|
char getch(void)
|
||||||
{
|
{
|
||||||
return readchar();
|
return _getchar();
|
||||||
}
|
}
|
||||||
|
|
||||||
void randomize(void)
|
void randomize(void)
|
||||||
|
|||||||
@@ -419,7 +419,7 @@ do_pixels_in_line(x, y)
|
|||||||
#ifndef JMIPS_VGA
|
#ifndef JMIPS_VGA
|
||||||
printf("%c%c%c", R/An/An, G/An/An, B/An/An),
|
printf("%c%c%c", R/An/An, G/An/An, B/An/An),
|
||||||
#else
|
#else
|
||||||
pP[x+800*y] = (R/An/An & 0xFF) | ((G/An/An & 0xFF) << 8) | ((B/An/An & 0xFF) << 16),
|
pP[x+xsize*y] = (R/An/An & 0xFF) | ((G/An/An & 0xFF) << 8) | ((B/An/An & 0xFF) << 16),
|
||||||
#endif
|
#endif
|
||||||
/* and then do the next pixel in this line: */
|
/* and then do the next pixel in this line: */
|
||||||
do_pixels_in_line(x+1, y)
|
do_pixels_in_line(x+1, y)
|
||||||
@@ -441,18 +441,23 @@ do_line(y)
|
|||||||
main()
|
main()
|
||||||
{
|
{
|
||||||
#ifdef JMIPS_VGA
|
#ifdef JMIPS_VGA
|
||||||
volatile UINT32 *pVGA_mctrl = (UINT32*)sys_vga_mctrl;
|
volatile UINT32 *pVGA_ctrl = (UINT32*)sys_vga_ctrl;
|
||||||
volatile UINT32 *pVGA_moffs = (UINT32*)sys_vga_moffs;
|
volatile UINT32 *pVGA_moffs = (UINT32*)sys_vga_moffs;
|
||||||
|
volatile UINT32 *pVGA_resx = (UINT32*)sys_vga_resx;
|
||||||
|
volatile UINT32 *pVGA_resy = (UINT32*)sys_vga_resy;
|
||||||
UINT64 *pPixelBuf;
|
UINT64 *pPixelBuf;
|
||||||
|
|
||||||
pPixelBuf = (UINT64*)malloc(800*600*sizeof(UINT32));
|
xsize = *pVGA_resx;
|
||||||
|
ysize = *pVGA_resy;
|
||||||
|
|
||||||
|
pPixelBuf = (UINT64*)malloc(xsize*ysize*sizeof(UINT32));
|
||||||
pP = (UINT32*)pPixelBuf;
|
pP = (UINT32*)pPixelBuf;
|
||||||
printf("pPixelBuf : %8.8X\n", (UINT32)pPixelBuf);
|
printf("pPixelBuf : %8.8X\n", (UINT32)pPixelBuf);
|
||||||
|
|
||||||
*pVGA_moffs = (UINT32)pPixelBuf;
|
*pVGA_moffs = (UINT32)pPixelBuf;
|
||||||
*pVGA_mctrl = 1;
|
*pVGA_ctrl |= sys_vga_bit_msten;
|
||||||
|
|
||||||
memset(pPixelBuf, 0, 800*600*sizeof(UINT32));
|
memset(pPixelBuf, 0, xsize*ysize*sizeof(UINT32));
|
||||||
#else
|
#else
|
||||||
|
|
||||||
/* Output PPM file header ... */
|
/* Output PPM file header ... */
|
||||||
|
|||||||
Reference in New Issue
Block a user