OXYGENHUB
◆ main x16-emulator / src / video.h
1.3 KiB · Objective-C · last changed main: while the CPU waits in WAI, step the machine to its next event at once 14 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
uint32_t video_clocks_to_line_end(uint8_t mhz);
18
bool video_update(void);
19
void video_end(void);
20
bool video_get_irq_out(void);
21
void video_save(SDL_RWops *f);
22
uint8_t video_read(uint8_t reg, bool debugOn);
23
void video_write(uint8_t reg, uint8_t value);
24
void video_update_title(const char* window_title);
25
26
uint8_t via1_read(uint8_t reg, bool debug);
27
void via1_write(uint8_t reg, uint8_t value);
28
29
// For debugging purposes only:
30
uint8_t video_space_read(uint32_t address);
31
void video_space_write(uint32_t address, uint8_t value);
32
33
bool video_is_tilemap_address(int addr);
34
bool video_is_tiledata_address(int addr);
35
bool video_is_special_address(int addr);
36
37
uint32_t video_get_address(uint8_t sel);
38
uint32_t video_get_fx_accum(void);
39
uint8_t video_get_dc_value(uint8_t reg);
40
const uint8_t *video_get_framebuffer(int *width, int *height);
41
uint32_t video_get_frame_count(void);
42
43
#endif