/[projet1]/public/pc/tools/osdk/main/Osdk/_final_/include2/old/oric.h
Defence Force logotype

Contents of /public/pc/tools/osdk/main/Osdk/_final_/include2/old/oric.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1159 - (show annotations)
Sun Aug 10 18:31:35 2014 UTC (5 years, 3 months ago) by dbug
File MIME type: text/plain
File size: 4423 byte(s)


1 /* Oric specific routines, added by Vaggelis Blathras */
2
3 extern void hires(void);
4 extern void text(void);
5 extern void ping(void);
6 extern void shoot(void);
7 extern void zap(void);
8 extern void explode(void);
9 extern void kbdclick1(void);
10 extern void kbdclick2(void);
11 extern int ink(int color);
12 extern int paper(int color);
13 extern int curset(int x,int y,int mode);
14 extern int curmov(int dx,int dy,int mode);
15 extern int draw(int dx,int dy,int mode);
16 extern int circle(int radius,int mode);
17 extern int hchar(char c,int charset,int mode);
18 extern int fill(int height,int width,char c);
19 extern int point(int x,int y);
20 extern int pattern(char style);
21 extern int play(int soundchanels,int noisechanels,int envelop,int volume);
22 extern int music(int chanel,int octave,int key,int volume);
23 extern int sound(int chanel,int period,int volume);
24 extern char key(void);
25
26 /* Stuff added by Alexios Chouchoulas */
27
28 extern void cls();
29 extern void lores0(void);
30 extern void lores1(void);
31 extern int peek(int address);
32 extern int deek(int address);
33 extern void poke(int address, int value); /* 8 bit values */
34 extern void doke(int address, int value); /* 16 bit values */
35 extern void gotoxy(int x, int y); /* move the cursor: broken for the moment */
36 extern int get(void); /* get character without echoing */
37 extern void cwrite(char c); /* write a byte to 'tape' */
38 extern int cread(); /* read a byte from 'tape' */
39 extern void cwritehdr(); /* write a file header to tape */
40 extern void creadsync(); /* read synchro bytes (0x16) from 'tape' */
41 extern void call(int addr); /* call a machine code routine */
42
43 /* sedoric(): Please use the exclamation mark as well, e.g. sedoric("!DIR") */
44 /* Bear in mind that this might well be broken. I don't know */
45 /* much about SEDORIC yet... No error handling! Anything wrong */
46 /* happens, and you get an error, and go back to the 'Ready' */
47 /* prompt. Can anyone fix things here? I declare my ignorance. */
48
49 extern void sedoric(char *command); /* invoke a sedoric command */
50
51
52 /* lprintf(): Like printf, but sends output to the printer. Maybe this and */
53 /* printf() should be merged, I don't know... */
54
55 extern int lprintf(const char *format,...);
56
57
58 #define TEXTVRAM 0xbb80
59 #define STDCHRTABLE 0xb400
60 #define ALTCHRTABLE 0xb800
61
62
63 #define GETPAPER (peek(0x26b)-16) /* return current paper colour */
64 #define GETINK peek(0x26c) /* return current ink colour */
65
66
67 /* This returns which dead key is currently pressed */
68 /* Use the #defines below to check for the keys */
69
70 #define getdeadkeys() peek(0x209)
71
72 #define NOKEY 0x38
73 #define ALTGR 0xa0 /* Euphoric only */
74 #define CTRL 0xa2
75 #define LSHIFT 0xa4
76 #define FUNC 0xa5 /* Atmos only (and Euphoric, of course) */
77 #define RSHIFT 0xa7
78
79
80 /* Serial Attributes, curses style :-| */
81
82 #define A_FWBLACK 0
83 #define A_FWRED 1
84 #define A_FWGREEN 2
85 #define A_FWYELLOW 3
86 #define A_FWBLUE 4
87 #define A_FWMAGENTA 5
88 #define A_FWCYAN 6
89 #define A_FWWHITE 7
90 #define A_BGBLACK 16
91 #define A_BGRED 17
92 #define A_BGGREEN 18
93 #define A_BGYELLOW 19
94 #define A_BGBLUE 20
95 #define A_BGMAGENTA 21
96 #define A_BGCYAN 22
97 #define A_BGWHITE 23
98 #define A_STD 8
99 #define A_ALT 9
100 #define A_STD2H 10
101 #define A_ALT2H 11
102 #define A_STDFL 12
103 #define A_ALTFL 13
104 #define A_STD2HFL 14
105 #define A_ALT2HFL 15
106 #define A_TEXT60 24
107 #define A_TEXT50 26
108 #define A_HIRES60 28
109 #define A_HIRES50 30
110
111
112 /* This gets and sets some system flags */
113 /* Use the #defines below to set the flags */
114
115 #define getflags() peek(0x26a)
116 #define setflags(x) poke(0x26a,x)
117
118 #define CURSOR 0x01 /* Cursor on (ctrl-q) */
119 #define SCREEN 0x02 /* Printout to screen on (ctrl-s) */
120 #define NOKEYCLICK 0x08 /* Turn keyclick off (ctrl-f) */
121 #define PROTECT 0x20 /* Protect columns 0-1 (ctrl-]) */
122
123
124 /* Get memory size */
125
126 #define getmemsize() peek(0x220)
127
128 #define ORIC16k 1
129 #define ORIC48k 0
130
131
132 /* This copies a 40x25 buffer onto the screen. Very fast. */
133
134 #define dumpscreen(scr) memcpy((char*)textvram,(char*)scr,1120)
135

  ViewVC Help
Powered by ViewVC 1.1.26