-
Notifications
You must be signed in to change notification settings - Fork 0
/
font.c
62 lines (45 loc) · 1.05 KB
/
font.c
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
55
56
57
58
59
60
61
62
#include <string.h>
#include "vecops.h"
//#link "vecops.c"
#include "vecfont.h"
//#link "vecfont.c"
////
#define input0 (*(byte*)0x7800)
#define input1 (*(byte*)0x8000)
#define watchdog (*(byte*)0x8980)
#define vidframe (*(byte*)0x0)
#define LEFT1 !(input1 & 0x8)
#define RIGHT1 !(input1 & 0x4)
#define UP1 !(input1 & 0x10)
#define DOWN1 !(input1 & 0x20)
#define FIRE1 !(input1 & 0x2)
#define BOMB1 !(input1 & 0x1)
#define COIN1 (input0 & 0x2)
#define COIN2 (input0 & 0x1)
#define START1 (input2 & 0x20)
#define START2 (input2 & 0x40)
void draw_pad(const int p[]) {
CNTR();//center
SCAL(0x7f);//scale
STAT(GREEN, 0);//vector properties
VCTR(p[0], p[1], 0);//put vector
JSRL(0x400);//draw at addr
}
static int frame = 0;
void main(void) {
int r = 512;
byte pad0[] = {0, 0, 0};
dvgclear();
dvgwrofs = 0x200;
draw_string("W", 0);
RTSL();
while (1) {
dvgreset();
STAT(YELLOW, 0);//set color and stuff
VCTR(0, 0, 0);//set vector
JSRL(0x200);//draw
HALT();//stop
dvgstart();
frame++;
}
}