| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
#ifndef _VIDEO_H_ |
| 6 |
#define _VIDEO_H_ |
| 7 |
|
| 8 |
#include <stdbool.h> |
| 9 |
#include <stdint.h> |
| 10 |
#include <stdio.h> |
| 11 |
#include <SDL.h> |
| 12 |
#include "glue.h" |
| 13 |
|
| 14 |
#ifdef __cplusplus |
| 15 |
extern "C" { |
| 16 |
#endif |
| 17 |
|
| 18 |
bool video_init(int window_scale, float screen_x_scale, char *quality, bool fullscreen, float opacity); |
| 19 |
void video_reset(void); |
| 20 |
bool video_step(float mhz, float steps, bool midline); |
| 21 |
bool video_update(void); |
| 22 |
void video_present_no_input(void); |
| 23 |
void video_repaint_only(void); |
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
bool video_debug_ui_available(void); |
| 28 |
int video_debug_ui_pump_paused(void); |
| 29 |
bool video_is_debug_ui_window(Uint32 window_id); |
| 30 |
bool video_event_targets_debug_ui(const SDL_Event *ev); |
| 31 |
void video_debug_ui_shortcut_key(const SDL_Event *ev); |
| 32 |
void video_debug_ui_feed_event(const SDL_Event *ev); |
| 33 |
|
| 34 |
|
| 35 |
|
| 36 |
|
| 37 |
|
| 38 |
|
| 39 |
|
| 40 |
|
| 41 |
|
| 42 |
|
| 43 |
|
| 44 |
|
| 45 |
|
| 46 |
|
| 47 |
|
| 48 |
|
| 49 |
|
| 50 |
|
| 51 |
|
| 52 |
|
| 53 |
|
| 54 |
|
| 55 |
|
| 56 |
|
| 57 |
|
| 58 |
|
| 59 |
|
| 60 |
|
| 61 |
bool video_get_layer_line_state(uint8_t layer, uint16_t line, uint8_t out_regs[7], |
| 62 |
uint16_t *out_eff_y, bool *out_enabled, |
| 63 |
uint16_t *out_layer_row); |
| 64 |
uint16_t video_get_scanline_count(void); |
| 65 |
|
| 66 |
|
| 67 |
|
| 68 |
|
| 69 |
|
| 70 |
|
| 71 |
|
| 72 |
|
| 73 |
|
| 74 |
uint32_t video_frame_dot_clocks(void); |
| 75 |
uint16_t video_frame_scanlines(void); |
| 76 |
|
| 77 |
|
| 78 |
|
| 79 |
|
| 80 |
void video_get_active_layer_size(int *out_w, int *out_h); |
| 81 |
|
| 82 |
|
| 83 |
|
| 84 |
bool video_next_irq(float mhz, uint32_t *out_cycles, uint8_t *out_source); |
| 85 |
void video_get_irq_state(uint8_t *out_ien, uint8_t *out_isr, uint16_t *out_irq_line); |
| 86 |
void video_end(void); |
| 87 |
bool video_get_irq_out(void); |
| 88 |
|
| 89 |
|
| 90 |
const uint8_t *video_get_framebuffer(int *width, int *height); |
| 91 |
uint32_t video_get_frame_count(void); |
| 92 |
void video_save(SDL_RWops *f); |
| 93 |
uint8_t video_read(uint8_t reg, bool debugOn); |
| 94 |
void video_write(uint8_t reg, uint8_t value); |
| 95 |
|
| 96 |
|
| 97 |
|
| 98 |
|
| 99 |
void video_set_debug_write(bool on); |
| 100 |
void video_update_title(const char* window_title); |
| 101 |
|
| 102 |
uint8_t via1_read(uint8_t reg, bool debug); |
| 103 |
void via1_write(uint8_t reg, uint8_t value); |
| 104 |
|
| 105 |
|
| 106 |
uint8_t video_space_read(uint32_t address); |
| 107 |
void video_space_write(uint32_t address, uint8_t value); |
| 108 |
|
| 109 |
bool video_is_tilemap_address(int addr); |
| 110 |
bool video_is_tiledata_address(int addr); |
| 111 |
bool video_is_special_address(int addr); |
| 112 |
|
| 113 |
uint32_t video_get_address(uint8_t sel); |
| 114 |
uint32_t video_get_fx_accum(void); |
| 115 |
uint8_t video_get_dc_value(uint8_t reg); |
| 116 |
|
| 117 |
#ifdef __cplusplus |
| 118 |
} |
| 119 |
#endif |
| 120 |
|
| 121 |
#endif |