cdrom: adjust timing
[pcsx_rearmed.git] / plugins / gpu_senquack / gpu.h
1 /***************************************************************************
2 *   Copyright (C) 2010 PCSX4ALL Team                                      *
3 *   Copyright (C) 2010 Unai                                               *
4 *   Copyright (C) 2016 Senquack (dansilsby <AT> gmail <DOT> com)          *
5 *                                                                         *
6 *   This program is free software; you can redistribute it and/or modify  *
7 *   it under the terms of the GNU General Public License as published by  *
8 *   the Free Software Foundation; either version 2 of the License, or     *
9 *   (at your option) any later version.                                   *
10 *                                                                         *
11 *   This program is distributed in the hope that it will be useful,       *
12 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
13 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
14 *   GNU General Public License for more details.                          *
15 *                                                                         *
16 *   You should have received a copy of the GNU General Public License     *
17 *   along with this program; if not, write to the                         *
18 *   Free Software Foundation, Inc.,                                       *
19 *   51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA.           *
20 ***************************************************************************/
21
22 #ifndef GPU_UNAI_GPU_H
23 #define GPU_UNAI_GPU_H
24
25 struct gpu_senquack_config_t {
26         uint8_t pixel_skip:1;     // If 1, allows skipping rendering pixels that
27                                   //  would not be visible when a high horizontal
28                                   //  resolution PS1 video mode is set.
29                                   //  Only applies to devices with low resolutions
30                                   //  like 320x240. Should not be used if a
31                                   //  down-scaling framebuffer blitter is in use.
32                                   //  Can cause gfx artifacts if game reads VRAM
33                                   //  to do framebuffer effects.
34
35         uint8_t ilace_force:3;    // Option to force skipping rendering of lines,
36                                   //  for very slow platforms. Value will be
37                                   //  assigned to 'ilace_mask' in gpu_senquack struct.
38                                   //  Normally 0. Value '1' will skip rendering
39                                   //  odd lines.
40
41         uint8_t scale_hires:1;    // If 1, will scale hi-res output to
42                                   //  320x240 when gpulib reads the frame.
43                                   //  Implies pixel_skip and ilace_force
44                                   //  (when height > 240).
45         uint8_t lighting:1;
46         uint8_t fast_lighting:1;
47         uint8_t blending:1;
48         uint8_t dithering:1;
49
50         //senquack Only PCSX Rearmed's version of gpu_senquack had this, and I
51         // don't think it's necessary. It would require adding 'AH' flag to
52         // gpuSpriteSpanFn() increasing size of sprite span function array.
53         //uint8_t enableAbbeyHack:1;  // Abe's Odyssey hack
54
55         ////////////////////////////////////////////////////////////////////////////
56         // Variables used only by older standalone version of gpu_senquack (gpu.cpp)
57 #ifndef USE_GPULIB
58         uint8_t prog_ilace:1;         // Progressive interlace option (old option)
59                                       //  This option was somewhat oddly named:
60                                       //  When in interlaced video mode, on a low-res
61                                       //  320x240 device, only the even lines are
62                                       //  rendered. This option will take that one
63                                       //  step further and only render half the even
64                                       //  even lines one frame, and then the other half.
65         uint8_t frameskip_count:3;    // Frame skip (0..7)
66 #endif
67 };
68
69 extern gpu_senquack_config_t gpu_senquack_config_ext;
70
71 // TODO: clean up show_fps frontend option
72 extern  bool show_fps;
73
74 #endif // GPU_UNAI_GPU_H