ScummVM API documentation
atari-supervidel.h
1/* ScummVM - Graphic Adventure Engine
2 *
3 * ScummVM is the legal property of its developers, whose names
4 * are too numerous to list here. Please refer to the COPYRIGHT
5 * file distributed with this source distribution.
6 *
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 *
20 */
21
22#ifndef BACKENDS_GRAPHICS_ATARI_SUPERVIDEL_H
23#define BACKENDS_GRAPHICS_ATARI_SUPERVIDEL_H
24
25#include "common/scummsys.h"
26
27#ifdef USE_SUPERVIDEL
28
29// bits 26:0
30#define SV_BLITTER_SRC1 ((volatile long *)0x80010058)
31#define SV_BLITTER_SRC2 ((volatile long *)0x8001005C)
32#define SV_BLITTER_DST ((volatile long *)0x80010060)
33// The amount of bytes that are to be copied in a horizontal line, minus 1
34#define SV_BLITTER_COUNT ((volatile long *)0x80010064)
35// The amount of bytes that are to be added to the line start address after a line has been copied, in order to reach the next one
36#define SV_BLITTER_SRC1_OFFSET ((volatile long *)0x80010068)
37#define SV_BLITTER_SRC2_OFFSET ((volatile long *)0x8001006C)
38#define SV_BLITTER_DST_OFFSET ((volatile long *)0x80010070)
39// bits 11:0 - The amount of horizontal lines to do
40#define SV_BLITTER_MASK_AND_LINES ((volatile long *)0x80010074)
41// bit 0 - busy / start
42// bits 4:1 - blit mode
43#define SV_BLITTER_CONTROL ((volatile long *)0x80010078)
44// bits 9:0
45#define SV_VERSION ((volatile long *)0x8001007C)
46// bit 0 - empty (read only)
47// bit 1 - full (read only)
48// bits 31:0 - data (write only)
49#define SV_BLITTER_FIFO ((volatile long *)0x80010080)
50
51#ifdef USE_SV_BLITTER
52extern int g_superVidelFwVersion;
53extern const byte *g_blitMask;
54
55void SyncSuperBlitter();
56#endif // USE_SV_BLITTER
57
58void LockSuperBlitter();
59void UnlockSuperBlitter();
60
61#else
62
63static inline void LockSuperBlitter() {}
64static inline void UnlockSuperBlitter() {}
65
66#endif // USE_SUPERVIDEL
67
68extern bool g_hasSuperVidel;
69
70#endif // BACKENDS_GRAPHICS_ATARI_SUPERVIDEL_H