URL
https://opencores.org/ocsvn/wf3d/wf3d/trunk
[/] [wf3d/] [trunk/] [clib/] [mp_lib.c] - Diff between revs 2 and 4
Go to most recent revision |
Show entire file |
Details |
Blame |
View Log
Rev 2 |
Rev 4 |
Line 7... |
Line 7... |
//
|
//
|
// Abstract:
|
// Abstract:
|
// C library implementation
|
// C library implementation
|
//
|
//
|
// Author:
|
// Author:
|
// Kenji Ishimaru (kenji.ishimaru@prtissimo.com)
|
// Kenji Ishimaru (info.wf3d@gmail.com)
|
//
|
//
|
//======================================================================
|
//======================================================================
|
//
|
//
|
// Copyright (c) 2015, Kenji Ishimaru
|
// Copyright (c) 2015, Kenji Ishimaru
|
// All rights reserved.
|
// All rights reserved.
|
Line 82... |
Line 82... |
}
|
}
|
}
|
}
|
|
|
|
|
void mpInit() {
|
void mpInit() {
|
|
hw_init();
|
video_init();
|
video_init();
|
mp_matrix4_identity(&cur_pm);
|
mp_matrix4_identity(&cur_pm);
|
mp_matrix4_identity(&cur_mm);
|
mp_matrix4_identity(&cur_mm);
|
mp_matrix4_identity(&cur_vm);
|
mp_matrix4_identity(&cur_vm);
|
matrix_stack_ptr = 0;
|
matrix_stack_ptr = 0;
|
Line 271... |
Line 272... |
|
|
if (count*3 > 0xffff) {
|
if (count*3 > 0xffff) {
|
printf("draw array size over!!\n");
|
printf("draw array size over!!\n");
|
while(1);
|
while(1);
|
}
|
}
|
|
#ifdef __DE0_NANO_SOC__
|
|
D3D_DMA_ADRS = ((unsigned int)p_vertex_array | 0x80000000); //ACP offset
|
|
// D3D_DMA_ADRS = p_vertex_array;
|
|
#else
|
D3D_DMA_ADRS = p_vertex_array;
|
D3D_DMA_ADRS = p_vertex_array;
|
|
#endif
|
D3D_DMA_STATUS = 0; // int mask clear
|
D3D_DMA_STATUS = 0; // int mask clear
|
D3D_DMA_START = 0x00010101; // default CCW
|
D3D_DMA_START = 0x00010101; // default CCW
|
while(1) {
|
while(1) {
|
if (D3D_DMA_STATUS & 1) {
|
if (D3D_DMA_STATUS & 1) {
|
D3D_DMA_STATUS = 0;
|
D3D_DMA_STATUS = 0;
|
© copyright 1999-2025
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.