Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
alexbevi
GitHub Repository: alexbevi/BizHawk
Path: blob/master/waterbox/gpgx/core/vdp_render.h
2 views
1
/***************************************************************************************
2
* Genesis Plus
3
* Video Display Processor (Modes 0, 1, 2, 3, 4 & 5 rendering)
4
*
5
* Support for SG-1000, Master System (315-5124 & 315-5246), Game Gear & Mega Drive VDP
6
*
7
* Copyright (C) 1998-2007 Charles Mac Donald (original code)
8
* Copyright (C) 2007-2013 Eke-Eke (Genesis Plus GX)
9
*
10
* Redistribution and use of this code or any derivative works are permitted
11
* provided that the following conditions are met:
12
*
13
* - Redistributions may not be sold, nor may they be used in a commercial
14
* product or activity.
15
*
16
* - Redistributions that are modified from the original source must include the
17
* complete source code, including the source code for all components used by a
18
* binary built from the modified sources. However, as a special exception, the
19
* source code distributed need not include anything that is normally distributed
20
* (in either source or binary form) with the major components (compiler, kernel,
21
* and so on) of the operating system on which the executable runs, unless that
22
* component itself accompanies the executable.
23
*
24
* - Redistributions must reproduce the above copyright notice, this list of
25
* conditions and the following disclaimer in the documentation and/or other
26
* materials provided with the distribution.
27
*
28
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
29
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
30
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
31
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
32
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
33
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
34
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
35
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
36
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
37
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
38
* POSSIBILITY OF SUCH DAMAGE.
39
*
40
****************************************************************************************/
41
42
#ifndef _RENDER_H_
43
#define _RENDER_H_
44
45
/* Global variables */
46
extern uint16 spr_col;
47
48
/* Function prototypes */
49
extern void render_init(void);
50
extern void render_reset(void);
51
extern void render_line(int line);
52
extern void blank_line(int line, int offset, int width);
53
extern void remap_line(int line);
54
extern void window_clip(unsigned int data, unsigned int sw);
55
extern void render_bg_m0(int line);
56
extern void render_bg_m1(int line);
57
extern void render_bg_m1x(int line);
58
extern void render_bg_m2(int line);
59
extern void render_bg_m3(int line);
60
extern void render_bg_m3x(int line);
61
extern void render_bg_inv(int line);
62
extern void render_bg_m4(int line);
63
extern void render_bg_m5(int line);
64
extern void render_bg_m5_vs(int line);
65
extern void render_bg_m5_im2(int line);
66
extern void render_bg_m5_im2_vs(int line);
67
extern void render_obj_tms(int line);
68
extern void render_obj_m4(int line);
69
extern void render_obj_m5(int line);
70
extern void render_obj_m5_ste(int line);
71
extern void render_obj_m5_im2(int line);
72
extern void render_obj_m5_im2_ste(int line);
73
extern void parse_satb_tms(int line);
74
extern void parse_satb_m4(int line);
75
extern void parse_satb_m5(int line);
76
extern void update_bg_pattern_cache_m4(int index);
77
extern void update_bg_pattern_cache_m5(int index);
78
extern void color_update_m4(int index, unsigned int data);
79
extern void color_update_m5(int index, unsigned int data);
80
81
/* Function pointers */
82
extern void (*render_bg)(int line);
83
extern void (*render_obj)(int line);
84
extern void (*parse_satb)(int line);
85
extern void (*update_bg_pattern_cache)(int index);
86
87
extern uint32 *vdp_bp_lut;
88
extern uint8 **vdp_lut;
89
90
#endif /* _RENDER_H_ */
91
92
93