llvm-mos-sdk
vce.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2023 Adrian "asie" Siekierka
3  *
4  * Licensed under the Apache License, Version 2.0 with LLVM Exceptions,
5  * See https://github.com/llvm-mos/llvm-mos-sdk/blob/main/LICENSE for license
6  * information.
7  */
8 
9 #ifndef _PCE_VCE_H_
10 #define _PCE_VCE_H_
11 
12 #include <stdbool.h>
13 #include <stdint.h>
14 
15 #ifdef __cplusplus
16 extern "C" {
17 #endif
18 
23 #define VCE_COLOR_INDEX(index, color) (((uint16_t)(index) << 4) + color)
24 
32 
40 
48 void pce_vce_copy_palette(uint8_t index, const void *source, uint8_t count);
49 
58 
59 #ifdef __cplusplus
60 }
61 #endif
62 
63 #endif /* _PCE_VCE_H_ */
std::uint16_t
::uint16_t uint16_t
Definition: cstdint:22
std::uint8_t
::uint8_t uint8_t
Definition: cstdint:21
index
char index
Definition: nesdoug.h:113
count
const void uint16_t count
Definition: memory.h:58
pce_vce_copy_palette_to_ram
void pce_vce_copy_palette_to_ram(void *dest, uint8_t index, uint8_t count)
Copy palettes (N x 16 colors) from the VCE to RAM.
pce_vce_get_color
uint16_t pce_vce_get_color(uint16_t index)
Get a color from the VCE.
pce_vce_set_color
void pce_vce_set_color(uint16_t index, uint16_t value)
Set a color to the VCE.
pce_vce_copy_palette
void pce_vce_copy_palette(uint8_t index, const void *source, uint8_t count)
Copy palettes (N x 16 colors) from RAM to the VCE.