OXYGENHUB
# 0adc2e74f5cf x16-emulator / src / video.h
1.2 KiB · Objective-C · last changed chore(): initial commit 15 days ago source blame history raw
1
// Commander X16 Emulator
2
// Copyright (c) 2019 Michael Steil
3
// All rights reserved. License: 2-clause BSD
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
bool video_init(int window_scale, float screen_x_scale, char *quality, bool fullscreen, float opacity);
15
void video_reset(void);
16
bool video_step(float mhz, float steps, bool midline);
17
bool video_update(void);
18
void video_end(void);
19
bool video_get_irq_out(void);
20
void video_save(SDL_RWops *f);
21
uint8_t video_read(uint8_t reg, bool debugOn);
22
void video_write(uint8_t reg, uint8_t value);
23
void video_update_title(const char* window_title);
24
25
uint8_t via1_read(uint8_t reg, bool debug);
26
void via1_write(uint8_t reg, uint8_t value);
27
28
// For debugging purposes only:
29
uint8_t video_space_read(uint32_t address);
30
void video_space_write(uint32_t address, uint8_t value);
31
32
bool video_is_tilemap_address(int addr);
33
bool video_is_tiledata_address(int addr);
34
bool video_is_special_address(int addr);
35
36
uint32_t video_get_address(uint8_t sel);
37
uint32_t video_get_fx_accum(void);
38
uint8_t video_get_dc_value(uint8_t reg);
39
const uint8_t *video_get_framebuffer(int *width, int *height);
40
uint32_t video_get_frame_count(void);
41
42
#endif