2016-10-02 14:14:58 +00:00
|
|
|
#ifndef camera_h
|
|
|
|
#define camera_h
|
2017-04-17 17:16:17 +00:00
|
|
|
#include <stdint.h>
|
2021-11-07 11:39:18 +00:00
|
|
|
#include "defs.h"
|
2017-04-17 17:16:17 +00:00
|
|
|
|
|
|
|
typedef uint8_t (*GB_camera_get_pixel_callback_t)(GB_gameboy_t *gb, uint8_t x, uint8_t y);
|
|
|
|
typedef void (*GB_camera_update_request_callback_t)(GB_gameboy_t *gb);
|
2016-10-02 14:14:58 +00:00
|
|
|
|
2016-10-03 11:22:54 +00:00
|
|
|
enum {
|
2016-10-03 15:24:15 +00:00
|
|
|
GB_CAMERA_SHOOT_AND_1D_FLAGS = 0,
|
2016-10-03 16:39:20 +00:00
|
|
|
GB_CAMERA_GAIN_AND_EDGE_ENHACEMENT_FLAGS = 1,
|
2016-10-03 15:24:15 +00:00
|
|
|
GB_CAMERA_EXPOSURE_HIGH = 2,
|
|
|
|
GB_CAMERA_EXPOSURE_LOW = 3,
|
2016-10-03 16:39:20 +00:00
|
|
|
GB_CAMERA_EDGE_ENHANCEMENT_INVERT_AND_VOLTAGE = 4,
|
2016-10-03 11:22:54 +00:00
|
|
|
GB_CAMERA_DITHERING_PATTERN_START = 6,
|
|
|
|
GB_CAMERA_DITHERING_PATTERN_END = 0x35,
|
|
|
|
};
|
|
|
|
|
2016-10-02 14:14:58 +00:00
|
|
|
uint8_t GB_camera_read_image(GB_gameboy_t *gb, uint16_t addr);
|
|
|
|
|
|
|
|
void GB_set_camera_get_pixel_callback(GB_gameboy_t *gb, GB_camera_get_pixel_callback_t callback);
|
|
|
|
void GB_set_camera_update_request_callback(GB_gameboy_t *gb, GB_camera_update_request_callback_t callback);
|
|
|
|
|
|
|
|
void GB_camera_updated(GB_gameboy_t *gb);
|
|
|
|
|
|
|
|
void GB_camera_write_register(GB_gameboy_t *gb, uint16_t addr, uint8_t value);
|
|
|
|
uint8_t GB_camera_read_register(GB_gameboy_t *gb, uint16_t addr);
|
|
|
|
|
|
|
|
#endif
|