all repos — mgba @ cf5d6709fed95b84a52cf172367df7b7dd84ed9f

mGBA Game Boy Advance Emulator

include/mgba/internal/ds/renderers/software.h (view raw)

 1/* Copyright (c) 2013-2017 Jeffrey Pfau
 2 *
 3 * This Source Code Form is subject to the terms of the Mozilla Public
 4 * License, v. 2.0. If a copy of the MPL was not distributed with this
 5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 6#ifndef DS_VIDEO_SOFTWARE_H
 7#define DS_VIDEO_SOFTWARE_H
 8
 9#include <mgba-util/common.h>
10
11CXX_GUARD_START
12
13#include <mgba/internal/ds/video.h>
14#include <mgba/internal/gba/renderers/video-software.h>
15
16struct DSVideoSoftwareRenderer {
17	struct DSVideoRenderer d;
18
19	struct GBAVideoSoftwareRenderer engA;
20	struct GBAVideoSoftwareRenderer engB;
21
22	DSRegisterDISPCNT dispcntA;
23	DSRegisterDISPCNT dispcntB;
24	DSRegisterPOWCNT1 powcnt;
25
26	color_t* outputBuffer;
27	int outputBufferStride;
28
29	uint32_t row[DS_VIDEO_HORIZONTAL_PIXELS];
30
31	color_t extPaletteA[16384];
32	color_t extPaletteB[16384];
33	color_t variantPaletteA[16384];
34	color_t variantPaletteB[16384];
35};
36
37void DSVideoSoftwareRendererCreate(struct DSVideoSoftwareRenderer* renderer);
38
39CXX_GUARD_END
40
41#endif