/[gxemul]/trunk/src/include/testmachine/dev_fb.h
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/src/include/testmachine/dev_fb.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 27 by dpavlin, Mon Oct 8 16:19:56 2007 UTC revision 28 by dpavlin, Mon Oct 8 16:20:26 2007 UTC
# Line 2  Line 2 
2  #define TESTMACHINE_FB_H  #define TESTMACHINE_FB_H
3    
4  /*  /*
  *  Copyright (C) 2004-2006  Anders Gavare.  All rights reserved.  
  *  
  *  Redistribution and use in source and binary forms, with or without  
  *  modification, are permitted provided that the following conditions are met:  
  *  
  *  1. Redistributions of source code must retain the above copyright  
  *     notice, this list of conditions and the following disclaimer.  
  *  2. Redistributions in binary form must reproduce the above copyright    
  *     notice, this list of conditions and the following disclaimer in the  
  *     documentation and/or other materials provided with the distribution.  
  *  3. The name of the author may not be used to endorse or promote products  
  *     derived from this software without specific prior written permission.  
  *  
  *  THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND  
  *  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE  
  *  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE  
  *  ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE    
  *  FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL  
  *  DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS  
  *  OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)  
  *  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT  
  *  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY  
  *  OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF  
  *  SUCH DAMAGE.  
  *  
  *  
  *  $Id: dev_fb.h,v 1.1 2006/05/04 17:14:52 debug Exp $  
  *  
5   *  Definitions used by the framebuffer device in GXemul.   *  Definitions used by the framebuffer device in GXemul.
6     *
7     *  $Id: dev_fb.h,v 1.6 2006/07/16 08:11:43 debug Exp $
8     *  This file is in the public domain.
9   */   */
10    
11    
12  /*  Physical base address:  */  /*  Physical base address for linear framebuffer memory:  */
13  #define DEV_FB_ADDRESS          0x12000000  #define DEV_FB_ADDRESS                  0x12000000
14    
15    /*  Physical base address for the framebuffer controller:  */
16    #define DEV_FBCTRL_ADDRESS              0x12f00000
17    #define DEV_FBCTRL_LENGTH                     0x20
18    
19    
20    /*
21     *  First choose the port by writing the port index to DEV_FBCTRL_PORT,
22     *  then read or write DEV_FBCTRL_DATA.
23     */
24    
25    #define DEV_FBCTRL_PORT                       0x00
26    #define DEV_FBCTRL_DATA                       0x10
27    
28    #define DEV_FBCTRL_PORT_COMMAND                 0
29    #define DEV_FBCTRL_PORT_X1                      1
30    #define DEV_FBCTRL_PORT_Y1                      2
31    #define DEV_FBCTRL_PORT_X2                      3
32    #define DEV_FBCTRL_PORT_Y2                      4
33    #define DEV_FBCTRL_PORT_COLOR_R                 5
34    #define DEV_FBCTRL_PORT_COLOR_G                 6
35    #define DEV_FBCTRL_PORT_COLOR_B                 7
36    #define DEV_FBCTRL_NPORTS               8
37    
38    
39    /*
40     *  Controller commands:
41     */
42    
43    /*  Do nothing.  */
44    #define DEV_FBCTRL_COMMAND_NOP                          0
45    
46    /*  Set resolution to X1 x Y1.  */
47    #define DEV_FBCTRL_COMMAND_SET_RESOLUTION               1
48    
49    /*  Get current resolution into X1, Y1.  */
50    #define DEV_FBCTRL_COMMAND_GET_RESOLUTION               2
51    
52    /*  TODO:  */
53    #define DEV_FBCTRL_COMMAND_FILL                         3
54    #define DEV_FBCTRL_COMMAND_COPY                         4
55    
56    
57    #define DEV_FBCTRL_MAXY(x)      (((DEV_FBCTRL_ADDRESS-DEV_FB_ADDRESS) / 3) / x)
58    
59  #endif  /*  TESTMACHINE_FB_H  */  #endif  /*  TESTMACHINE_FB_H  */

Legend:
Removed from v.27  
changed lines
  Added in v.28

  ViewVC Help
Powered by ViewVC 1.1.26