-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathHost.h
54 lines (41 loc) · 1.53 KB
/
Host.h
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
//
// Host.h
// The Omega Project
// https://github.com/h5n1xp/Omega
//
// Created by Matt Parsons on 02/02/2019.
// Copyright © 2019 Matt Parsons. All rights reserved.
// <[email protected]>
//
//
// This Source Code Form is subject to the terms of the
// Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed
// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
#ifndef Host_h
#define Host_h
#include <stdio.h>
#include "SDL2/SDL.h"
typedef struct{
int FBCounter; //must be reset every VBL
int vblCount;
//SDL specific
SDL_Window* window;
SDL_Renderer* renderer;
SDL_Texture* commodoreLogo;
SDL_Texture* playfield;
SDL_Texture* spinner;
SDL_Event event;
void* pixels; //pointer to physical display frame buffer
}Host_t;
extern Host_t host;
extern SDL_atomic_t cpuWait;
void hiresPlanar2Chunky(uint32_t* pixBuff,uint32_t* palette,uint16_t plane1, uint16_t plane2,uint16_t plane3,uint16_t plane4);
void loresPlanar2Chunky(uint32_t* pixBuff,uint32_t* palette,uint16_t plane1, uint16_t plane2,uint16_t plane3,uint16_t plane4,uint16_t plane5,uint16_t plane6);
void loresHAM2Chunky(uint32_t* pixBuff,uint32_t* palette,uint16_t plane1, uint16_t plane2,uint16_t plane3,uint16_t plane4,uint16_t plane5,uint16_t plane6);
void sprite2chunky(uint32_t* pixBuff,uint32_t* palette, int x,uint16_t plane1, uint16_t plane2,int delta);
void pressKey(uint16_t keyCode);
void releaseKey(uint16_t keyCode);
void hostInit();
void hostDisplay();
void toggleLEDs();
#endif /* Host_h */