PVcollib  1.5.0
A devkit for ColecoVision
f18a.h
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------------
2 
3  Generic f18a video functions
4 
5  Copyright (C) 2018-2019
6  Alekmaul
7 
8  This software is provided 'as-is', without any express or implied
9  warranty. In no event will the authors be held liable for any
10  damages arising from the use of this software.
11 
12  Permission is granted to anyone to use this software for any
13  purpose, including commercial applications, and to alter it and
14  redistribute it freely, subject to the following restrictions:
15 
16  1. The origin of this software must not be misrepresented; you
17  must not claim that you wrote the original software. If you use
18  this software in a product, an acknowledgment in the product
19  documentation would be appreciated but is not required.
20  2. Altered source versions must be plainly marked as such, and
21  must not be misrepresented as being the original software.
22  3. This notice may not be removed or altered from any source
23  distribution.
24 
25 ---------------------------------------------------------------------------------*/
37 #ifndef COL_F18A_INCLUDE
38 #define COL_F18A_INCLUDE
39 
40 #include <coleco/coltypes.h>
41 
42 #define sprtab_f18a 0x2800 //f18a colour only requires 1/3 the colour data so til 0x2800
43 #define sprtab_f18a_2 0x3000
44 #define sprtab_f18a_3 0x3800
45 #define mapvram 0x1b00
46 
47 #define F18A_ECMS_0P (0<<0)
48 #define F18A_ECMS_1B (1<<0)
49 #define F18A_ECMS_2B (2<<0)
50 #define F18A_ECMS_3B (3<<0)
51 #define F18A_ECMT_0P (0<<4)
52 #define F18A_ECMT_1B (1<<4)
53 #define F18A_ECMT_2B (2<<4)
54 #define F18A_ECMT_3B (3<<4)
55 #define F18A_ECM_R30 (1<<6)
56 #define F18A_ECM_TM2 (1<<7)
57 #define F18A_ECM_YRE (1<<3)
58 
63 extern volatile u8 vdp_f18aok;
64 
70 void vdp_f18ainit(void);
71 
79 void vdp_f18asetpalette(void *data,unsigned char count);
80 
89 void vdp_f18asetpaletteentry(void *data,unsigned offset,unsigned char count);
90 
102 void vdp_f18asetmode1(u8 flags);
103 
112 void vdp_f18asetscrollx(u8 bgnum, u8 x);
113 
122 void vdp_f18asetscrolly(u8 bgnum, u8 y);
123 
124 #endif
void vdp_f18asetscrolly(u8 bgnum, u8 y)
Sets the vertical scroll offset to the specified location.
void vdp_f18asetscrollx(u8 bgnum, u8 x)
Sets the horizontal scroll offset to the specified location.
void vdp_f18asetmode1(u8 flags)
Activate mode 1 in bitmap mode for f18a ONLY
Custom types used by pvcollib.
void vdp_f18ainit(void)
Activate f18a device Activate f18a and init vdp_f18aok variable with 1 if it is ok ...
void vdp_f18asetpalette(void *data, unsigned char count)
Send a palette RGB 12bits color entries to f18a device
volatile u8 vdp_f18aok
vdp_f18aok is set if f18a module is present when calling vdp_f18ainit function