Download Chameleon PIC User Manual Ver 1 ().

Transcript
© 2009 NURVE NETWORKS LLC “Exploring the Chameleon PIC 16-Bit”
Bitmap pointer access functions
unsigned int GFX_Read_Bitmap_Ptr(void);
unsigned int GFX_Write_Bitmap_Ptr(unsigned int bitmap_ptr);
Reads the pointer to tile bitmaps.
Writes the pointer to the tile bitmaps.
Scrolling functions
int GFX_Get_HScroll(void);
int GFX_Get_VScroll(void);
int GFX_Set_HScroll(void);
int GFX_Set_VScroll(int vscroll);
Not implemented.
Retrieves the vertical smooth scroll value.
Not implemented yet.
Sets the vertical smooth scroll value.
Memory port functions
unsigned int GFX_Read_Mem_Port8(void);
int GFX_Write_Mem_Port8(unsigned int data);
Reads Propeller memory 8-bit port.
Writes to the Propeller memory 8-bit port.
unsigned int GFX_Read_Mem_Port16(void);
unsigned int GFX_Write_Mem_Port16(unsigned int data);
Reads the Propeller memory 16-bit port.
Writes the Propeller memory 16-bit port.
Source and destination pointer access
unsigned int GFX_Get_Src_Ptr(void);
unsigned int GFX_Get_Dest_Ptr(void);
Retrieves the “source” GPU operation pointer.
Retrieves the “destination” GPU operation pointer.
unsigned int GFX_Set_Src_Ptr(unsigned int src_ptr);
unsigned int GFX_Set_Dest_Ptr(unsigned int dest_ptr);
Sets the “source” GPU operation pointer.
Sets the “destination” GPU operation pointer.
Tilemap width functions
int GFX_Get_Tilemap_Width(void);
int GFX_Set_Tilemap_Width(int width);
Retrieves the width of the tilemap in encoded format.
Sets the width of the tilemap in encoded format.
Top and bottom overscan control functions
int GFX_Get_Bottom_Overscan_Color(void);
int GFX_Get_Top_Overscan_Color(void);
int GFX_Set_Bottom_Overscan_Color(int col);
int GFX_Set_Top_Overscan_Color(int col);
Retrieves the bottom overscan color.
Retrieves the top overscan color.
Sets the bottom overscan color.
Sets the top overscan color.
22.4 API Functional Declarations
The following lists each function, a description, comments, and example usage of the function.
_________________________________________________________________________________________________
Function Prototype:
int GFX_GPU_Fill_Mem16(unsigned int dest_ptr,unsigned int value, unsigned int num_bytes);
Description:
GFX_GPU_Fill_Mem16(…) fills a number of bytes using value to destination in the GPU memory
space in WORD side chunks, or in other words in the Prop's local memory of 32K, you can use this to
overwrite SPIN code, so watch out! The parameters are the destination address of the fill dest_ptr, the
16-bit data value, and finally, the number of bytes (always a multiple of 2) num_bytes. Typically, you will
use this function to clear tile map, bitmap memory, and other repetitive operations that require the same
value to be written. Returns 1.
186