-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathvga.h
More file actions
38 lines (31 loc) · 732 Bytes
/
Copy pathvga.h
File metadata and controls
38 lines (31 loc) · 732 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/*
* vga.h
*
* Created on: 22 de jan. de 2026
* Author: milton
*/
#ifndef VGA_H_
#define VGA_H_
#include <stdint.h>
#include "sdlclient.h"
typedef struct {
SDL_Texture *fontTexture[256];
uint16_t dispBufSize;
uint8_t *displayBuffer;
SDL_Renderer* renderer;
uint8_t mode;
SDL_TimerID vgaTimer;
int vgaTick;
uint16_t rdaddr;
uint16_t wraddr;
int scrollreg;
uint8_t cursor;
int resetmode;
} vga_t;
vga_t *vga_init(SDL_Renderer* renderer);
void vga_refresh(vga_t *vga, int force);
void vga_out(vga_t *vga, uint8_t port, uint8_t value, int wminimized);
uint8_t vga_in(vga_t *vga, uint8_t port);
void vga_reset(vga_t *vga);
void vga_close(vga_t *vga);
#endif /* VGA_H_ */