1 /////////////////////////////////////////////////////////////////////////
2 // $Id: voodoo_main.h 13418 2017-12-29 11:18:45Z vruppert $
3 /////////////////////////////////////////////////////////////////////////
4 /*
5  *  Portion of this software comes with the following license
6  */
7 
8 /***************************************************************************
9 
10     Copyright Aaron Giles
11     All rights reserved.
12 
13     Redistribution and use in source and binary forms, with or without
14     modification, are permitted provided that the following conditions are
15     met:
16 
17         * Redistributions of source code must retain the above copyright
18           notice, this list of conditions and the following disclaimer.
19         * Redistributions in binary form must reproduce the above copyright
20           notice, this list of conditions and the following disclaimer in
21           the documentation and/or other materials provided with the
22           distribution.
23         * Neither the name 'MAME' nor the names of its contributors may be
24           used to endorse or promote products derived from this software
25           without specific prior written permission.
26 
27     THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND ANY EXPRESS OR
28     IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
29     WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
30     DISCLAIMED. IN NO EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT,
31     INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
32     (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
33     SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
34     HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
35     STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
36     IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
37     POSSIBILITY OF SUCH DAMAGE.
38 
39 ***************************************************************************/
40 
41 #ifndef VOODOO_MAIN_H
42 #define VOODOO_MAIN_H
43 
44 /* enumeration specifying which model of Voodoo we are emulating */
45 enum
46 {
47   VOODOO_1,
48   VOODOO_2,
49   VOODOO_BANSHEE,
50   VOODOO_3,
51   MAX_VOODOO_TYPES
52 };
53 
54 
55 #define STD_VOODOO_1_CLOCK       50000000.0
56 #define STD_VOODOO_2_CLOCK       90000000.0
57 #define STD_VOODOO_BANSHEE_CLOCK 90000000.0
58 #define STD_VOODOO_3_CLOCK      132000000.0
59 
60 
61 /***************************************************************************
62     TYPE DEFINITIONS
63 ***************************************************************************/
64 
65 #define VOODOO_MEM 0x60000000
66 #define VOODOO_REG_PAGES 1024
67 #define VOODOO_LFB_PAGES 1024
68 #define VOODOO_TEX_PAGES 2048
69 #define VOODOO_PAGES (VOODOO_REG_PAGES+VOODOO_LFB_PAGES+VOODOO_TEX_PAGES)
70 
71 #define Voodoo_UpdateScreenStart() theVoodooDevice->update_screen_start()
72 #define Voodoo_Output_Enable(x)    theVoodooDevice->output_enable(x)
73 #define Voodoo_get_retrace(a)      theVoodooDevice->get_retrace(a)
74 #define Voodoo_update_timing()     theVoodooDevice->update_timing()
75 #define Voodoo_reg_write(a,b)      theVoodooDevice->reg_write(a,b)
76 #define Banshee_2D_write(a,b)      theVoodooDevice->blt_reg_write(a,b)
77 #define Banshee_LFB_write(a,b,c)   theVoodooDevice->mem_write_linear(a,b,c)
78 
79 #endif
80