SameBoy | Accurate GB/GBC emulator |
| download: https://git.y1.nz/archives/sameboy.tar.gz | |
| README | Files | Log | Refs | LICENSE |
Core/camera.h
1 #pragma once
2 #include <stdint.h>
3 #include "defs.h"
4
5 typedef uint8_t (*GB_camera_get_pixel_callback_t)(GB_gameboy_t *gb, uint8_t x, uint8_t y);
6 typedef void (*GB_camera_update_request_callback_t)(GB_gameboy_t *gb);
7
8 void GB_set_camera_get_pixel_callback(GB_gameboy_t *gb, GB_camera_get_pixel_callback_t callback);
9 void GB_set_camera_update_request_callback(GB_gameboy_t *gb, GB_camera_update_request_callback_t callback);
10 void GB_camera_updated(GB_gameboy_t *gb);
11
12 #ifdef GB_INTERNAL
13 internal uint8_t GB_camera_read_image(GB_gameboy_t *gb, uint16_t addr);
14 internal void GB_camera_write_register(GB_gameboy_t *gb, uint16_t addr, uint8_t value);
15 internal uint8_t GB_camera_read_register(GB_gameboy_t *gb, uint16_t addr);
16
17 enum {
18 GB_CAMERA_SHOOT_AND_1D_FLAGS = 0,
19 GB_CAMERA_GAIN_AND_EDGE_ENHACEMENT_FLAGS = 1,
20 GB_CAMERA_EXPOSURE_HIGH = 2,
21 GB_CAMERA_EXPOSURE_LOW = 3,
22 GB_CAMERA_EDGE_ENHANCEMENT_INVERT_AND_VOLTAGE = 4,
23 GB_CAMERA_DITHERING_PATTERN_START = 6,
24 GB_CAMERA_DITHERING_PATTERN_END = 0x35,
25 };
26 #endif
This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.