]> git.wh0rd.org - ICEs.git/blob - bfin-asm-math/memory.i.1
initial import
[ICEs.git] / bfin-asm-math / memory.i.1
1 # 1 "src/memory.c"
2 # 1 "<built-in>"
3 # 1 "<command line>"
4 # 1 "src/memory.c"
5 # 94 "src/memory.c"
6 # 1 "src/driver.h" 1
7 # 12 "src/driver.h"
8
9 # 62 "src/driver.h"
10 # 1 "src/mamecore.h" 1
11 # 12 "src/mamecore.h"
12
13
14
15
16
17 # 1 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/stdio.h" 1 3 4
18 # 28 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/stdio.h" 3 4
19 # 1 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/features.h" 1 3 4
20 # 267 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/features.h" 3 4
21 # 1 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/bits/uClibc_config.h" 1 3 4
22 # 268 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/features.h" 2 3 4
23 # 303 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/features.h" 3 4
24 # 1 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/sys/cdefs.h" 1 3 4
25 # 304 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/features.h" 2 3 4
26 # 29 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/stdio.h" 2 3 4
27
28
29
30
31
32 # 1 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/lib/gcc/bfin-uclinux/3.4.6/include/stddef.h" 1 3 4
33 # 213 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/lib/gcc/bfin-uclinux/3.4.6/include/stddef.h" 3 4
34 typedef long unsigned int size_t;
35 # 35 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/stdio.h" 2 3 4
36
37 # 1 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/bits/types.h" 1 3 4
38 # 29 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/bits/types.h" 3 4
39 # 1 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/lib/gcc/bfin-uclinux/3.4.6/include/stddef.h" 1 3 4
40 # 30 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/bits/types.h" 2 3 4
41 # 1 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/bits/kernel_types.h" 1 3 4
42 # 10 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/bits/kernel_types.h" 3 4
43 typedef unsigned short __kernel_dev_t;
44 typedef unsigned long __kernel_ino_t;
45 typedef unsigned short __kernel_mode_t;
46 typedef unsigned short __kernel_nlink_t;
47 typedef long __kernel_off_t;
48 typedef int __kernel_pid_t;
49 typedef unsigned short __kernel_ipc_pid_t;
50 typedef unsigned short __kernel_uid_t;
51 typedef unsigned short __kernel_gid_t;
52 typedef unsigned int __kernel_size_t;
53 typedef int __kernel_ssize_t;
54 typedef int __kernel_ptrdiff_t;
55 typedef long __kernel_time_t;
56 typedef long __kernel_suseconds_t;
57 typedef long __kernel_clock_t;
58 typedef int __kernel_daddr_t;
59 typedef char * __kernel_caddr_t;
60 typedef unsigned short __kernel_uid16_t;
61 typedef unsigned short __kernel_gid16_t;
62 typedef unsigned int __kernel_uid32_t;
63 typedef unsigned int __kernel_gid32_t;
64 typedef unsigned short __kernel_old_uid_t;
65 typedef unsigned short __kernel_old_gid_t;
66 typedef long long __kernel_loff_t;
67 typedef __kernel_dev_t __kernel_old_dev_t;
68
69 typedef struct {
70
71
72
73 int __val[2];
74
75 } __kernel_fsid_t;
76 # 31 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/bits/types.h" 2 3 4
77
78
79 typedef unsigned char __u_char;
80 typedef unsigned short __u_short;
81 typedef unsigned int __u_int;
82 typedef unsigned long __u_long;
83
84 __extension__ typedef unsigned long long int __u_quad_t;
85 __extension__ typedef long long int __quad_t;
86 # 50 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/bits/types.h" 3 4
87 typedef signed char __int8_t;
88 typedef unsigned char __uint8_t;
89 typedef signed short int __int16_t;
90 typedef unsigned short int __uint16_t;
91 typedef signed int __int32_t;
92 typedef unsigned int __uint32_t;
93
94 __extension__ typedef signed long long int __int64_t;
95 __extension__ typedef unsigned long long int __uint64_t;
96
97 typedef __quad_t *__qaddr_t;
98
99 typedef __u_quad_t __dev_t;
100 typedef __u_int __uid_t;
101 typedef __u_int __gid_t;
102 typedef __u_long __ino_t;
103 typedef __u_int __mode_t;
104 typedef __u_int __nlink_t;
105 typedef long int __off_t;
106 typedef __quad_t __loff_t;
107 typedef int __pid_t;
108 typedef long int __ssize_t;
109 typedef __u_long __rlim_t;
110 typedef __u_quad_t __rlim64_t;
111 typedef __u_int __id_t;
112
113 typedef struct
114 {
115 int __val[2];
116 } __fsid_t;
117
118
119 typedef int __daddr_t;
120 typedef char *__caddr_t;
121 typedef long int __time_t;
122 typedef unsigned int __useconds_t;
123 typedef long int __suseconds_t;
124 typedef long int __swblk_t;
125
126 typedef long int __clock_t;
127
128
129 typedef int __clockid_t;
130
131
132 typedef int __timer_t;
133
134
135
136
137
138
139 typedef int __key_t;
140
141
142 typedef __kernel_ipc_pid_t __ipc_pid_t;
143
144
145
146 typedef long int __blksize_t;
147
148
149
150
151 typedef long int __blkcnt_t;
152 typedef __quad_t __blkcnt64_t;
153
154
155 typedef __u_long __fsblkcnt_t;
156 typedef __u_quad_t __fsblkcnt64_t;
157
158
159 typedef __u_long __fsfilcnt_t;
160 typedef __u_quad_t __fsfilcnt64_t;
161
162
163 typedef __u_quad_t __ino64_t;
164
165
166 typedef __loff_t __off64_t;
167
168
169 typedef long int __t_scalar_t;
170 typedef unsigned long int __t_uscalar_t;
171
172
173 typedef int __intptr_t;
174
175
176 typedef unsigned int __socklen_t;
177
178
179
180
181 # 1 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/bits/pthreadtypes.h" 1 3 4
182 # 23 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/bits/pthreadtypes.h" 3 4
183 # 1 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/bits/sched.h" 1 3 4
184 # 68 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/bits/sched.h" 3 4
185 struct __sched_param
186 {
187 int __sched_priority;
188 };
189 # 24 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/bits/pthreadtypes.h" 2 3 4
190
191
192 struct _pthread_fastlock
193 {
194 long int __status;
195 int __spinlock;
196
197 };
198
199
200
201 typedef struct _pthread_descr_struct *_pthread_descr;
202
203
204
205
206
207 typedef struct __pthread_attr_s
208 {
209 int __detachstate;
210 int __schedpolicy;
211 struct __sched_param __schedparam;
212 int __inheritsched;
213 int __scope;
214 size_t __guardsize;
215 int __stackaddr_set;
216 void *__stackaddr;
217 size_t __stacksize;
218 } pthread_attr_t;
219
220
221
222 typedef struct
223 {
224 struct _pthread_fastlock __c_lock;
225 _pthread_descr __c_waiting;
226 } pthread_cond_t;
227
228
229
230 typedef struct
231 {
232 int __dummy;
233 } pthread_condattr_t;
234
235
236 typedef unsigned int pthread_key_t;
237
238
239
240
241
242 typedef struct
243 {
244 int __m_reserved;
245 int __m_count;
246 _pthread_descr __m_owner;
247 int __m_kind;
248 struct _pthread_fastlock __m_lock;
249 } pthread_mutex_t;
250
251
252
253 typedef struct
254 {
255 int __mutexkind;
256 } pthread_mutexattr_t;
257
258
259
260 typedef int pthread_once_t;
261 # 140 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/bits/pthreadtypes.h" 3 4
262 typedef unsigned long int pthread_t;
263 # 145 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/bits/types.h" 2 3 4
264 # 37 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/stdio.h" 2 3 4
265
266
267
268
269
270
271
272
273
274 typedef struct __STDIO_FILE_STRUCT FILE;
275
276
277
278
279
280 # 62 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/stdio.h" 3 4
281 typedef struct __STDIO_FILE_STRUCT __FILE;
282 # 72 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/stdio.h" 3 4
283 # 1 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/bits/uClibc_stdio.h" 1 3 4
284 # 121 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/bits/uClibc_stdio.h" 3 4
285 # 1 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/bits/pthreadtypes.h" 1 3 4
286 # 122 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/bits/uClibc_stdio.h" 2 3 4
287 # 178 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/bits/uClibc_stdio.h" 3 4
288 typedef struct {
289 __off_t __pos;
290
291
292
293
294
295
296 } __STDIO_fpos_t;
297
298
299 typedef struct {
300 __off64_t __pos;
301
302
303
304
305
306
307 } __STDIO_fpos64_t;
308
309
310
311
312 typedef __off64_t __offmax_t;
313 # 241 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/bits/uClibc_stdio.h" 3 4
314 struct __STDIO_FILE_STRUCT {
315 unsigned short __modeflags;
316
317
318
319
320
321
322
323 unsigned char __ungot[2];
324
325 int __filedes;
326
327 unsigned char *__bufstart;
328 unsigned char *__bufend;
329 unsigned char *__bufpos;
330 unsigned char *__bufread;
331
332
333 unsigned char *__bufgetc_u;
334
335
336 unsigned char *__bufputc_u;
337
338
339
340
341
342 struct __STDIO_FILE_STRUCT *__nextopen;
343 # 285 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/bits/uClibc_stdio.h" 3 4
344 int __user_locking;
345 pthread_mutex_t __lock;
346
347
348
349
350
351 };
352 # 387 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/bits/uClibc_stdio.h" 3 4
353 extern int __fgetc_unlocked(FILE *__stream);
354 extern int __fputc_unlocked(int __c, FILE *__stream);
355 # 406 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/bits/uClibc_stdio.h" 3 4
356 extern FILE *__stdin;
357 # 465 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/bits/uClibc_stdio.h" 3 4
358 extern FILE *__stdout;
359 # 73 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/stdio.h" 2 3 4
360
361
362
363 # 1 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/lib/gcc/bfin-uclinux/3.4.6/include/stdarg.h" 1 3 4
364 # 43 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/lib/gcc/bfin-uclinux/3.4.6/include/stdarg.h" 3 4
365 typedef __builtin_va_list __gnuc_va_list;
366 # 77 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/stdio.h" 2 3 4
367
368
369
370
371
372
373 typedef __STDIO_fpos64_t fpos_t;
374
375
376 # 131 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/stdio.h" 3 4
377 # 1 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/bits/stdio_lim.h" 1 3 4
378 # 132 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/stdio.h" 2 3 4
379
380
381
382 extern FILE *stdin;
383 extern FILE *stdout;
384 extern FILE *stderr;
385
386
387
388
389
390
391
392 extern int remove (__const char *__filename) ;
393
394 extern int rename (__const char *__old, __const char *__new) ;
395
396
397
398
399 # 160 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/stdio.h" 3 4
400 extern FILE *tmpfile (void) __asm__ ("_" "tmpfile64");
401 # 171 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/stdio.h" 3 4
402 extern char *tmpnam (char *__s) ;
403
404
405
406
407
408 extern char *tmpnam_r (char *__s) ;
409 # 189 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/stdio.h" 3 4
410 extern char *tempnam (__const char *__dir, __const char *__pfx)
411 __attribute__ ((__malloc__));
412
413
414
415
416
417
418
419
420 extern int fclose (FILE *__stream);
421
422
423
424
425 extern int fflush (FILE *__stream);
426
427 # 214 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/stdio.h" 3 4
428 extern int fflush_unlocked (FILE *__stream);
429 # 228 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/stdio.h" 3 4
430
431 # 245 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/stdio.h" 3 4
432 extern FILE *fopen (__const char *__restrict __filename, __const char *__restrict __modes) __asm__ ("_" "fopen64");
433
434 extern FILE *freopen (__const char *__restrict __filename, __const char *__restrict __modes, FILE *__restrict __stream) __asm__ ("_" "freopen64");
435
436
437
438
439
440
441
442
443 # 266 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/stdio.h" 3 4
444 extern FILE *fdopen (int __fd, __const char *__modes) ;
445 # 289 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/stdio.h" 3 4
446
447
448
449 extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) ;
450
451
452
453 extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf,
454 int __modes, size_t __n) ;
455
456
457
458
459
460 extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf,
461 size_t __size) ;
462
463
464 extern void setlinebuf (FILE *__stream) ;
465
466
467
468
469
470
471
472
473 extern int fprintf (FILE *__restrict __stream,
474 __const char *__restrict __format, ...);
475
476
477
478
479 extern int printf (__const char *__restrict __format, ...);
480
481 extern int sprintf (char *__restrict __s,
482 __const char *__restrict __format, ...) ;
483
484
485
486
487
488 extern int vfprintf (FILE *__restrict __s, __const char *__restrict __format,
489 __gnuc_va_list __arg);
490
491
492
493
494 extern int vprintf (__const char *__restrict __format, __gnuc_va_list __arg);
495
496 extern int vsprintf (char *__restrict __s, __const char *__restrict __format,
497 __gnuc_va_list __arg) ;
498
499
500
501
502
503 extern int snprintf (char *__restrict __s, size_t __maxlen,
504 __const char *__restrict __format, ...)
505 __attribute__ ((__format__ (__printf__, 3, 4)));
506
507 extern int vsnprintf (char *__restrict __s, size_t __maxlen,
508 __const char *__restrict __format, __gnuc_va_list __arg)
509 __attribute__ ((__format__ (__printf__, 3, 0)));
510
511 # 383 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/stdio.h" 3 4
512
513
514
515
516
517 extern int fscanf (FILE *__restrict __stream,
518 __const char *__restrict __format, ...);
519
520
521
522
523 extern int scanf (__const char *__restrict __format, ...);
524
525 extern int sscanf (__const char *__restrict __s,
526 __const char *__restrict __format, ...) ;
527
528 # 425 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/stdio.h" 3 4
529
530
531
532
533
534 extern int fgetc (FILE *__stream);
535 extern int getc (FILE *__stream);
536
537
538
539
540
541 extern int getchar (void);
542
543 # 449 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/stdio.h" 3 4
544 extern int getc_unlocked (FILE *__stream);
545 extern int getchar_unlocked (void);
546 # 463 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/stdio.h" 3 4
547 extern int fgetc_unlocked (FILE *__stream);
548
549
550
551
552
553
554
555
556
557
558
559 extern int fputc (int __c, FILE *__stream);
560 extern int putc (int __c, FILE *__stream);
561
562
563
564
565
566 extern int putchar (int __c);
567
568 # 496 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/stdio.h" 3 4
569 extern int fputc_unlocked (int __c, FILE *__stream);
570
571
572
573
574
575
576
577 extern int putc_unlocked (int __c, FILE *__stream);
578 extern int putchar_unlocked (int __c);
579 # 515 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/stdio.h" 3 4
580 extern int getw (FILE *__stream);
581
582
583 extern int putw (int __w, FILE *__stream);
584
585
586
587
588
589
590
591
592 extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream);
593
594
595
596
597
598
599 extern char *gets (char *__s);
600
601 # 579 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/stdio.h" 3 4
602
603
604
605
606
607 extern int fputs (__const char *__restrict __s, FILE *__restrict __stream);
608
609
610
611
612
613 extern int puts (__const char *__s);
614
615
616
617
618
619
620 extern int ungetc (int __c, FILE *__stream);
621
622
623
624
625
626
627 extern size_t fread (void *__restrict __ptr, size_t __size,
628 size_t __n, FILE *__restrict __stream);
629
630
631
632
633 extern size_t fwrite (__const void *__restrict __ptr, size_t __size,
634 size_t __n, FILE *__restrict __s);
635
636 # 632 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/stdio.h" 3 4
637 extern size_t fread_unlocked (void *__restrict __ptr, size_t __size,
638 size_t __n, FILE *__restrict __stream);
639 extern size_t fwrite_unlocked (__const void *__restrict __ptr, size_t __size,
640 size_t __n, FILE *__restrict __stream);
641
642
643
644
645
646
647
648
649 extern int fseek (FILE *__stream, long int __off, int __whence);
650
651
652
653
654 extern long int ftell (FILE *__stream);
655
656
657
658
659 extern void rewind (FILE *__stream);
660
661 # 676 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/stdio.h" 3 4
662 extern int fseeko (FILE *__stream, __off64_t __off, int __whence) __asm__ ("_" "fseeko64");
663
664
665 extern __off64_t ftello (FILE *__stream) __asm__ ("_" "ftello64");
666
667
668
669
670
671
672
673
674 # 701 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/stdio.h" 3 4
675 extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos) __asm__ ("_" "fgetpos64");
676
677 extern int fsetpos (FILE *__stream, __const fpos_t *__pos) __asm__ ("_" "fsetpos64");
678
679
680
681
682
683
684
685 # 719 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/stdio.h" 3 4
686
687
688 extern void clearerr (FILE *__stream) ;
689
690 extern int feof (FILE *__stream) ;
691
692 extern int ferror (FILE *__stream) ;
693
694
695
696
697 extern void clearerr_unlocked (FILE *__stream) ;
698 extern int feof_unlocked (FILE *__stream) ;
699 extern int ferror_unlocked (FILE *__stream) ;
700
701
702
703
704
705
706
707
708 extern void perror (__const char *__s);
709
710 # 756 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/stdio.h" 3 4
711 extern int fileno (FILE *__stream) ;
712
713
714
715
716 extern int fileno_unlocked (FILE *__stream) ;
717 # 771 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/stdio.h" 3 4
718 extern FILE *popen (__const char *__command, __const char *__modes);
719
720
721
722
723
724 extern int pclose (FILE *__stream);
725
726
727
728
729
730 extern char *ctermid (char *__s) ;
731 # 811 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/stdio.h" 3 4
732 extern void flockfile (FILE *__stream) ;
733
734
735
736 extern int ftrylockfile (FILE *__stream) ;
737
738
739 extern void funlockfile (FILE *__stream) ;
740 # 858 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/stdio.h" 3 4
741
742
743
744 extern int __snprintf (char *__restrict __s, size_t __maxlen,
745 const char *__restrict __format, ...)
746 __attribute__ ((__format__ (__printf__, 3, 4)));
747 extern int __vsnprintf (char *__restrict __s, size_t __maxlen,
748 const char *__restrict __format, __gnuc_va_list __arg)
749 __attribute__ ((__format__ (__printf__, 3, 0)));
750 # 18 "src/mamecore.h" 2
751 # 1 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/string.h" 1 3 4
752 # 28 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/string.h" 3 4
753
754
755
756
757
758 # 1 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/lib/gcc/bfin-uclinux/3.4.6/include/stddef.h" 1 3 4
759 # 34 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/string.h" 2 3 4
760
761
762
763
764 extern void *memcpy (void *__restrict __dest,
765 __const void *__restrict __src, size_t __n) ;
766
767
768
769
770
771
772
773 extern void *memmove (void *__dest, __const void *__src, size_t __n)
774 ;
775
776
777
778
779
780
781 extern void *memccpy (void *__restrict __dest, __const void *__restrict __src,
782 int __c, size_t __n)
783 ;
784
785
786
787
788
789 extern void *memset (void *__s, int __c, size_t __n) ;
790
791
792
793
794
795
796 extern int memcmp (__const void *__s1, __const void *__s2, size_t __n)
797 __attribute__ ((__pure__));
798
799
800 extern void *memchr (__const void *__s, int __c, size_t __n)
801 __attribute__ ((__pure__));
802
803 # 89 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/string.h" 3 4
804
805
806 extern char *strcpy (char *__restrict __dest, __const char *__restrict __src)
807 ;
808
809 extern char *strncpy (char *__restrict __dest,
810 __const char *__restrict __src, size_t __n) ;
811
812
813 extern char *strcat (char *__restrict __dest, __const char *__restrict __src)
814 ;
815
816 extern char *strncat (char *__restrict __dest, __const char *__restrict __src,
817 size_t __n) ;
818
819
820 extern int strcmp (__const char *__s1, __const char *__s2)
821 __attribute__ ((__pure__));
822
823 extern int strncmp (__const char *__s1, __const char *__s2, size_t __n)
824 __attribute__ ((__pure__));
825
826
827 extern int strcoll (__const char *__s1, __const char *__s2)
828 __attribute__ ((__pure__));
829
830 extern size_t strxfrm (char *__restrict __dest,
831 __const char *__restrict __src, size_t __n) ;
832
833 # 143 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/string.h" 3 4
834 extern char *strdup (__const char *__s) __attribute__ ((__malloc__));
835 # 177 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/string.h" 3 4
836
837
838 extern char *strchr (__const char *__s, int __c) __attribute__ ((__pure__));
839
840 extern char *strrchr (__const char *__s, int __c) __attribute__ ((__pure__));
841
842
843
844
845
846
847
848
849
850
851
852 extern size_t strcspn (__const char *__s, __const char *__reject)
853 __attribute__ ((__pure__));
854
855
856 extern size_t strspn (__const char *__s, __const char *__accept)
857 __attribute__ ((__pure__));
858
859 extern char *strpbrk (__const char *__s, __const char *__accept)
860 __attribute__ ((__pure__));
861
862 extern char *strstr (__const char *__haystack, __const char *__needle)
863 __attribute__ ((__pure__));
864
865
866
867 extern char *strtok (char *__restrict __s, __const char *__restrict __delim)
868 ;
869
870
871
872
873 extern char *__strtok_r (char *__restrict __s,
874 __const char *__restrict __delim,
875 char **__restrict __save_ptr) ;
876
877 extern char *strtok_r (char *__restrict __s, __const char *__restrict __delim,
878 char **__restrict __save_ptr) ;
879 # 245 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/string.h" 3 4
880
881
882 extern size_t strlen (__const char *__s) __attribute__ ((__pure__));
883
884 # 258 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/string.h" 3 4
885
886
887 extern char *strerror (int __errnum) ;
888
889
890
891
892
893
894
895
896 extern char *_glibc_strerror_r (int __errnum, char *__buf, size_t __buflen) ;
897 extern int _susv3_strerror_r (int __errnum, char *__buf, size_t buflen) ;
898 # 282 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/string.h" 3 4
899 extern char *strerror_r (int __errnum, char *__buf, size_t buflen) __asm__ ("_" "_glibc_strerror_r");
900 # 293 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/string.h" 3 4
901 extern void __bzero (void *__s, size_t __n) ;
902
903
904
905 extern void bcopy (__const void *__src, void *__dest, size_t __n) ;
906
907
908 extern void bzero (void *__s, size_t __n) ;
909
910
911 extern int bcmp (__const void *__s1, __const void *__s2, size_t __n)
912 __attribute__ ((__pure__));
913
914
915 extern char *index (__const char *__s, int __c) __attribute__ ((__pure__));
916
917
918 extern char *rindex (__const char *__s, int __c) __attribute__ ((__pure__));
919
920
921
922 extern int ffs (int __i) __attribute__ ((__const__));
923 # 327 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/string.h" 3 4
924 extern int strcasecmp (__const char *__s1, __const char *__s2)
925 __attribute__ ((__pure__));
926
927
928 extern int strncasecmp (__const char *__s1, __const char *__s2, size_t __n)
929 __attribute__ ((__pure__));
930 # 356 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/string.h" 3 4
931 extern char *strsep (char **__restrict __stringp,
932 __const char *__restrict __delim) ;
933 # 390 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/string.h" 3 4
934 extern size_t strlcat(char *__restrict dst, const char *__restrict src,
935 size_t n) ;
936 extern size_t strlcpy(char *__restrict dst, const char *__restrict src,
937 size_t n) ;
938
939
940
941 # 19 "src/mamecore.h" 2
942 # 1 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/stdlib.h" 1 3 4
943 # 35 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/stdlib.h" 3 4
944 # 1 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/lib/gcc/bfin-uclinux/3.4.6/include/stddef.h" 1 3 4
945 # 36 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/stdlib.h" 2 3 4
946
947
948 # 95 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/stdlib.h" 3 4
949
950
951 typedef struct
952 {
953 int quot;
954 int rem;
955 } div_t;
956
957
958
959 typedef struct
960 {
961 long int quot;
962 long int rem;
963 } ldiv_t;
964
965
966
967 # 147 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/stdlib.h" 3 4
968
969
970
971 extern double atof (__const char *__nptr) __attribute__ ((__pure__));
972
973
974 extern int atoi (__const char *__nptr) __attribute__ ((__pure__));
975
976 extern long int atol (__const char *__nptr) __attribute__ ((__pure__));
977
978
979
980
981
982 __extension__ extern long long int atoll (__const char *__nptr)
983 __attribute__ ((__pure__));
984
985
986
987
988
989
990 extern double strtod (__const char *__restrict __nptr,
991 char **__restrict __endptr) ;
992
993 # 185 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/stdlib.h" 3 4
994
995
996 extern long int strtol (__const char *__restrict __nptr,
997 char **__restrict __endptr, int __base) ;
998
999 extern unsigned long int strtoul (__const char *__restrict __nptr,
1000 char **__restrict __endptr, int __base)
1001 ;
1002
1003
1004
1005
1006 __extension__
1007 extern long long int strtoq (__const char *__restrict __nptr,
1008 char **__restrict __endptr, int __base) ;
1009
1010 __extension__
1011 extern unsigned long long int strtouq (__const char *__restrict __nptr,
1012 char **__restrict __endptr, int __base)
1013 ;
1014
1015
1016
1017
1018
1019 __extension__
1020 extern long long int strtoll (__const char *__restrict __nptr,
1021 char **__restrict __endptr, int __base) ;
1022
1023 __extension__
1024 extern unsigned long long int strtoull (__const char *__restrict __nptr,
1025 char **__restrict __endptr, int __base)
1026 ;
1027
1028 # 309 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/stdlib.h" 3 4
1029 extern char *l64a (long int __n) ;
1030
1031
1032 extern long int a64l (__const char *__s) __attribute__ ((__pure__));
1033
1034
1035
1036
1037 # 1 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/sys/types.h" 1 3 4
1038 # 28 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/sys/types.h" 3 4
1039
1040
1041
1042
1043
1044
1045 typedef __u_char u_char;
1046 typedef __u_short u_short;
1047 typedef __u_int u_int;
1048 typedef __u_long u_long;
1049 typedef __quad_t quad_t;
1050 typedef __u_quad_t u_quad_t;
1051 typedef __fsid_t fsid_t;
1052
1053
1054
1055
1056 typedef __loff_t loff_t;
1057
1058
1059
1060
1061
1062 typedef __ino64_t ino_t;
1063 # 61 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/sys/types.h" 3 4
1064 typedef __dev_t dev_t;
1065
1066
1067
1068
1069 typedef __gid_t gid_t;
1070
1071
1072
1073
1074 typedef __mode_t mode_t;
1075
1076
1077
1078
1079 typedef __nlink_t nlink_t;
1080
1081
1082
1083
1084 typedef __uid_t uid_t;
1085
1086
1087
1088
1089
1090
1091
1092 typedef __off64_t off_t;
1093 # 99 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/sys/types.h" 3 4
1094 typedef __pid_t pid_t;
1095
1096
1097
1098
1099 typedef __id_t id_t;
1100
1101
1102
1103
1104 typedef __ssize_t ssize_t;
1105
1106
1107
1108
1109
1110 typedef __daddr_t daddr_t;
1111 typedef __caddr_t caddr_t;
1112
1113
1114
1115
1116
1117 typedef __key_t key_t;
1118 # 132 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/sys/types.h" 3 4
1119 # 1 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/time.h" 1 3 4
1120 # 74 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/time.h" 3 4
1121
1122
1123 typedef __time_t time_t;
1124
1125
1126
1127 # 92 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/time.h" 3 4
1128 typedef __clockid_t clockid_t;
1129 # 104 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/time.h" 3 4
1130 typedef __timer_t timer_t;
1131 # 133 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/sys/types.h" 2 3 4
1132 # 146 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/sys/types.h" 3 4
1133 # 1 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/lib/gcc/bfin-uclinux/3.4.6/include/stddef.h" 1 3 4
1134 # 147 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/sys/types.h" 2 3 4
1135
1136
1137
1138 typedef unsigned long int ulong;
1139 typedef unsigned short int ushort;
1140 typedef unsigned int uint;
1141 # 190 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/sys/types.h" 3 4
1142 typedef int int8_t __attribute__ ((__mode__ (__QI__)));
1143 typedef int int16_t __attribute__ ((__mode__ (__HI__)));
1144 typedef int int32_t __attribute__ ((__mode__ (__SI__)));
1145 typedef int int64_t __attribute__ ((__mode__ (__DI__)));
1146
1147
1148 typedef unsigned int u_int8_t __attribute__ ((__mode__ (__QI__)));
1149 typedef unsigned int u_int16_t __attribute__ ((__mode__ (__HI__)));
1150 typedef unsigned int u_int32_t __attribute__ ((__mode__ (__SI__)));
1151 typedef unsigned int u_int64_t __attribute__ ((__mode__ (__DI__)));
1152
1153 typedef int register_t __attribute__ ((__mode__ (__word__)));
1154 # 212 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/sys/types.h" 3 4
1155 # 1 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/endian.h" 1 3 4
1156 # 37 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/endian.h" 3 4
1157 # 1 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/bits/endian.h" 1 3 4
1158 # 38 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/endian.h" 2 3 4
1159 # 213 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/sys/types.h" 2 3 4
1160
1161
1162 # 1 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/sys/select.h" 1 3 4
1163 # 31 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/sys/select.h" 3 4
1164 # 1 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/bits/select.h" 1 3 4
1165 # 32 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/sys/select.h" 2 3 4
1166
1167
1168 # 1 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/bits/sigset.h" 1 3 4
1169 # 23 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/bits/sigset.h" 3 4
1170 typedef int __sig_atomic_t;
1171
1172
1173
1174
1175 typedef struct
1176 {
1177 unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))];
1178 } __sigset_t;
1179 # 35 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/sys/select.h" 2 3 4
1180
1181
1182
1183 typedef __sigset_t sigset_t;
1184
1185
1186
1187
1188 # 1 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/time.h" 1 3 4
1189 # 118 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/time.h" 3 4
1190 struct timespec
1191 {
1192 __time_t tv_sec;
1193 long int tv_nsec;
1194 };
1195 # 44 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/sys/select.h" 2 3 4
1196
1197 # 1 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/bits/time.h" 1 3 4
1198 # 71 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/bits/time.h" 3 4
1199 struct timeval
1200 {
1201 __time_t tv_sec;
1202 __suseconds_t tv_usec;
1203 };
1204 # 46 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/sys/select.h" 2 3 4
1205
1206
1207
1208 typedef long int __fd_mask;
1209
1210
1211
1212
1213
1214
1215
1216 typedef struct
1217 {
1218
1219
1220
1221
1222
1223
1224 __fd_mask __fds_bits[1024 / (8 * sizeof (__fd_mask))];
1225
1226
1227 } fd_set;
1228
1229
1230
1231
1232
1233
1234 typedef __fd_mask fd_mask;
1235 # 89 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/sys/select.h" 3 4
1236
1237
1238
1239
1240
1241
1242
1243 extern int select (int __nfds, fd_set *__restrict __readfds,
1244 fd_set *__restrict __writefds,
1245 fd_set *__restrict __exceptfds,
1246 struct timeval *__restrict __timeout) ;
1247 # 112 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/sys/select.h" 3 4
1248
1249 # 216 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/sys/types.h" 2 3 4
1250
1251
1252 # 1 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/sys/sysmacros.h" 1 3 4
1253 # 28 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/sys/sysmacros.h" 3 4
1254 __extension__
1255 static __inline unsigned int gnu_dev_major (unsigned long long int __dev)
1256 ;
1257 __extension__
1258 static __inline unsigned int gnu_dev_minor (unsigned long long int __dev)
1259 ;
1260 __extension__
1261 static __inline unsigned long long int gnu_dev_makedev (unsigned int __major,
1262 unsigned int __minor)
1263 ;
1264
1265
1266 __extension__ static __inline unsigned int
1267 gnu_dev_major (unsigned long long int __dev)
1268 {
1269 return ((__dev >> 8) & 0xfff) | ((unsigned int) (__dev >> 32) & ~0xfff);
1270 }
1271
1272 __extension__ static __inline unsigned int
1273 gnu_dev_minor (unsigned long long int __dev)
1274 {
1275 return (__dev & 0xff) | ((unsigned int) (__dev >> 12) & ~0xff);
1276 }
1277
1278 __extension__ static __inline unsigned long long int
1279 gnu_dev_makedev (unsigned int __major, unsigned int __minor)
1280 {
1281 return ((__minor & 0xff) | ((__major & 0xfff) << 8)
1282 | (((unsigned long long int) (__minor & ~0xff)) << 12)
1283 | (((unsigned long long int) (__major & ~0xfff)) << 32));
1284 }
1285 # 219 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/sys/types.h" 2 3 4
1286 # 243 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/sys/types.h" 3 4
1287 typedef __blkcnt64_t blkcnt_t;
1288
1289
1290
1291 typedef __fsblkcnt64_t fsblkcnt_t;
1292
1293
1294
1295 typedef __fsfilcnt64_t fsfilcnt_t;
1296 # 262 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/sys/types.h" 3 4
1297
1298 # 318 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/stdlib.h" 2 3 4
1299
1300
1301
1302
1303
1304
1305 extern long int random (void) ;
1306
1307
1308 extern void srandom (unsigned int __seed) ;
1309
1310
1311
1312
1313
1314 extern char *initstate (unsigned int __seed, char *__statebuf,
1315 size_t __statelen) ;
1316
1317
1318
1319 extern char *setstate (char *__statebuf) ;
1320
1321
1322
1323
1324
1325
1326
1327 struct random_data
1328 {
1329 int32_t *fptr;
1330 int32_t *rptr;
1331 int32_t *state;
1332 int rand_type;
1333 int rand_deg;
1334 int rand_sep;
1335 int32_t *end_ptr;
1336 };
1337
1338 extern int random_r (struct random_data *__restrict __buf,
1339 int32_t *__restrict __result) ;
1340
1341 extern int srandom_r (unsigned int __seed, struct random_data *__buf) ;
1342
1343 extern int initstate_r (unsigned int __seed, char *__restrict __statebuf,
1344 size_t __statelen,
1345 struct random_data *__restrict __buf) ;
1346
1347 extern int setstate_r (char *__restrict __statebuf,
1348 struct random_data *__restrict __buf) ;
1349
1350
1351
1352
1353
1354
1355 extern int rand (void) ;
1356
1357 extern void srand (unsigned int __seed) ;
1358
1359
1360
1361
1362 extern int rand_r (unsigned int *__seed) ;
1363 # 390 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/stdlib.h" 3 4
1364 extern double drand48 (void) ;
1365 extern double erand48 (unsigned short int __xsubi[3]) ;
1366
1367
1368
1369 extern long int lrand48 (void) ;
1370 extern long int nrand48 (unsigned short int __xsubi[3]) ;
1371
1372
1373 extern long int mrand48 (void) ;
1374 extern long int jrand48 (unsigned short int __xsubi[3]) ;
1375
1376
1377 extern void srand48 (long int __seedval) ;
1378 extern unsigned short int *seed48 (unsigned short int __seed16v[3]) ;
1379 extern void lcong48 (unsigned short int __param[7]) ;
1380
1381
1382
1383
1384
1385 struct drand48_data
1386 {
1387 unsigned short int __x[3];
1388 unsigned short int __old_x[3];
1389 unsigned short int __c;
1390 unsigned short int __init;
1391 unsigned long long int __a;
1392 };
1393
1394
1395
1396 extern int drand48_r (struct drand48_data *__restrict __buffer,
1397 double *__restrict __result) ;
1398 extern int erand48_r (unsigned short int __xsubi[3],
1399 struct drand48_data *__restrict __buffer,
1400 double *__restrict __result) ;
1401
1402
1403
1404 extern int lrand48_r (struct drand48_data *__restrict __buffer,
1405 long int *__restrict __result) ;
1406 extern int nrand48_r (unsigned short int __xsubi[3],
1407 struct drand48_data *__restrict __buffer,
1408 long int *__restrict __result) ;
1409
1410
1411 extern int mrand48_r (struct drand48_data *__restrict __buffer,
1412 long int *__restrict __result) ;
1413 extern int jrand48_r (unsigned short int __xsubi[3],
1414 struct drand48_data *__restrict __buffer,
1415 long int *__restrict __result) ;
1416
1417
1418 extern int srand48_r (long int __seedval, struct drand48_data *__buffer)
1419 ;
1420
1421 extern int seed48_r (unsigned short int __seed16v[3],
1422 struct drand48_data *__buffer) ;
1423
1424 extern int lcong48_r (unsigned short int __param[7],
1425 struct drand48_data *__buffer) ;
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435 extern void *malloc (size_t __size) __attribute__ ((__malloc__));
1436
1437 extern void *calloc (size_t __nmemb, size_t __size)
1438 __attribute__ ((__malloc__));
1439
1440
1441
1442
1443
1444
1445
1446 extern void *realloc (void *__ptr, size_t __size) __attribute__ ((__malloc__));
1447
1448 extern void free (void *__ptr) ;
1449
1450
1451
1452
1453 extern void cfree (void *__ptr) ;
1454
1455
1456
1457 # 1 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/alloca.h" 1 3 4
1458 # 25 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/alloca.h" 3 4
1459 # 1 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/lib/gcc/bfin-uclinux/3.4.6/include/stddef.h" 1 3 4
1460 # 26 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/alloca.h" 2 3 4
1461
1462
1463
1464
1465
1466
1467
1468 extern void *alloca (size_t __size) ;
1469
1470
1471
1472
1473
1474
1475 # 484 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/stdlib.h" 2 3 4
1476
1477
1478
1479
1480 extern void *valloc (size_t __size) __attribute__ ((__malloc__));
1481 # 497 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/stdlib.h" 3 4
1482
1483
1484 extern void abort (void) __attribute__ ((__noreturn__));
1485
1486
1487
1488 extern int atexit (void (*__func) (void)) ;
1489
1490
1491
1492
1493
1494 extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg)
1495 ;
1496
1497
1498
1499
1500
1501
1502 extern void exit (int __status) __attribute__ ((__noreturn__));
1503
1504 # 529 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/stdlib.h" 3 4
1505
1506
1507 extern char *getenv (__const char *__name) ;
1508
1509
1510
1511
1512 extern char *__secure_getenv (__const char *__name) ;
1513
1514
1515
1516
1517
1518 extern int putenv (char *__string) ;
1519
1520
1521
1522
1523
1524 extern int setenv (__const char *__name, __const char *__value, int __replace)
1525 ;
1526
1527
1528 extern int unsetenv (__const char *__name) ;
1529 # 568 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/stdlib.h" 3 4
1530 extern int clearenv (void) ;
1531 # 577 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/stdlib.h" 3 4
1532 extern char *mktemp (char *__template) ;
1533 # 591 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/stdlib.h" 3 4
1534 extern int mkstemp (char *__template) __asm__ ("_" "mkstemp64");
1535 # 607 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/stdlib.h" 3 4
1536 extern char *mkdtemp (char *__template) ;
1537
1538
1539
1540
1541
1542
1543
1544
1545 extern int system (__const char *__command);
1546
1547 # 627 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/stdlib.h" 3 4
1548 extern char *realpath (__const char *__restrict __name,
1549 char *__restrict __resolved) ;
1550
1551
1552
1553
1554
1555
1556 typedef int (*__compar_fn_t) (__const void *, __const void *);
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566 extern void *bsearch (__const void *__key, __const void *__base,
1567 size_t __nmemb, size_t __size, __compar_fn_t __compar);
1568
1569
1570
1571 extern void qsort (void *__base, size_t __nmemb, size_t __size,
1572 __compar_fn_t __compar);
1573
1574
1575
1576 extern int abs (int __x) __attribute__ ((__const__));
1577 extern long int labs (long int __x) __attribute__ ((__const__));
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590 extern div_t div (int __numer, int __denom)
1591 __attribute__ ((__const__));
1592 extern ldiv_t ldiv (long int __numer, long int __denom)
1593 __attribute__ ((__const__));
1594
1595 # 714 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/stdlib.h" 3 4
1596 extern int rpmatch (__const char *__response) ;
1597 # 775 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/stdlib.h" 3 4
1598 extern int getloadavg (double __loadavg[], int __nelem) ;
1599
1600
1601
1602
1603
1604
1605 # 20 "src/mamecore.h" 2
1606 # 1 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/ctype.h" 1 3 4
1607 # 32 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/ctype.h" 3 4
1608
1609 # 41 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/ctype.h" 3 4
1610 enum
1611 {
1612 _ISupper = (1 << (0)),
1613 _ISlower = (1 << (1)),
1614 _ISalpha = (1 << (2)),
1615 _ISdigit = (1 << (3)),
1616 _ISxdigit = (1 << (4)),
1617 _ISspace = (1 << (5)),
1618 _ISprint = (1 << (6)),
1619 _ISgraph = (1 << (7)),
1620 _ISblank = (1 << (8)),
1621 _IScntrl = (1 << (9)),
1622 _ISpunct = (1 << (10)),
1623 _ISalnum = (1 << (11))
1624 };
1625
1626
1627
1628
1629 # 1 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/bits/uClibc_touplow.h" 1 3 4
1630 # 37 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/bits/uClibc_touplow.h" 3 4
1631 typedef __uint16_t __ctype_mask_t;
1632
1633
1634
1635 typedef __int16_t __ctype_touplow_t;
1636 # 61 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/ctype.h" 2 3 4
1637 # 103 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/ctype.h" 3 4
1638 extern const __ctype_mask_t *__C_ctype_b;
1639 extern const __ctype_touplow_t *__C_ctype_toupper;
1640 extern const __ctype_touplow_t *__C_ctype_tolower;
1641 # 123 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/ctype.h" 3 4
1642 extern const __ctype_mask_t *__ctype_b;
1643 extern const __ctype_touplow_t *__ctype_toupper;
1644 extern const __ctype_touplow_t *__ctype_tolower;
1645 # 143 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/ctype.h" 3 4
1646 extern int isxlower(int c) ;
1647 extern int isxupper(int c) ;
1648 # 155 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/ctype.h" 3 4
1649
1650
1651
1652
1653
1654
1655 extern int isalnum (int) ;
1656 extern int isalpha (int) ;
1657 extern int iscntrl (int) ;
1658 extern int isdigit (int) ;
1659 extern int islower (int) ;
1660 extern int isgraph (int) ;
1661 extern int isprint (int) ;
1662 extern int ispunct (int) ;
1663 extern int isspace (int) ;
1664 extern int isupper (int) ;
1665 extern int isxdigit (int) ;
1666
1667
1668
1669 extern int tolower (int __c) ;
1670
1671
1672 extern int toupper (int __c) ;
1673
1674
1675 # 201 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/ctype.h" 3 4
1676 extern int isascii (int __c) ;
1677
1678
1679
1680 extern int toascii (int __c) ;
1681
1682
1683
1684 extern int _toupper (int) ;
1685 extern int _tolower (int) ;
1686 # 382 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/ctype.h" 3 4
1687
1688 # 21 "src/mamecore.h" 2
1689 # 1 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/assert.h" 1 3 4
1690 # 36 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/assert.h" 3 4
1691
1692 extern void __assert (const char *, const char *, int, const char *) ;
1693
1694 # 22 "src/mamecore.h" 2
1695 # 1 "src/unix/osd_cpu.h" 1
1696 # 27 "src/unix/osd_cpu.h"
1697 # 1 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/time.h" 1 3 4
1698 # 30 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/time.h" 3 4
1699
1700
1701
1702
1703
1704
1705
1706
1707 # 1 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/lib/gcc/bfin-uclinux/3.4.6/include/stddef.h" 1 3 4
1708 # 39 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/time.h" 2 3 4
1709
1710
1711
1712 # 1 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/bits/time.h" 1 3 4
1713 # 38 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/bits/time.h" 3 4
1714 # 1 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/bits/uClibc_clk_tck.h" 1 3 4
1715 # 39 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/bits/time.h" 2 3 4
1716 # 43 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/time.h" 2 3 4
1717 # 58 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/time.h" 3 4
1718
1719
1720 typedef __clock_t clock_t;
1721
1722
1723
1724 # 129 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/time.h" 3 4
1725
1726
1727 struct tm
1728 {
1729 int tm_sec;
1730 int tm_min;
1731 int tm_hour;
1732 int tm_mday;
1733 int tm_mon;
1734 int tm_year;
1735 int tm_wday;
1736 int tm_yday;
1737 int tm_isdst;
1738
1739
1740
1741 long int tm_gmtoff;
1742 __const char *tm_zone;
1743
1744
1745
1746
1747
1748 };
1749
1750
1751
1752
1753
1754
1755
1756
1757 struct itimerspec
1758 {
1759 struct timespec it_interval;
1760 struct timespec it_value;
1761 };
1762
1763
1764 struct sigevent;
1765 # 180 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/time.h" 3 4
1766
1767
1768
1769 extern clock_t clock (void) ;
1770
1771
1772 extern time_t time (time_t *__timer) ;
1773
1774
1775
1776 extern double difftime (time_t __time1, time_t __time0)
1777 __attribute__ ((__const__));
1778
1779
1780
1781 extern time_t mktime (struct tm *__tp) ;
1782
1783
1784
1785
1786
1787 extern size_t strftime (char *__restrict __s, size_t __maxsize,
1788 __const char *__restrict __format,
1789 __const struct tm *__restrict __tp) ;
1790
1791 # 243 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/time.h" 3 4
1792
1793
1794
1795 extern struct tm *gmtime (__const time_t *__timer) ;
1796
1797
1798
1799 extern struct tm *localtime (__const time_t *__timer) ;
1800
1801
1802
1803
1804
1805 extern struct tm *gmtime_r (__const time_t *__restrict __timer,
1806 struct tm *__restrict __tp) ;
1807
1808
1809
1810 extern struct tm *localtime_r (__const time_t *__restrict __timer,
1811 struct tm *__restrict __tp) ;
1812
1813
1814
1815
1816
1817 extern char *asctime (__const struct tm *__tp) ;
1818
1819
1820 extern char *ctime (__const time_t *__timer) ;
1821
1822
1823
1824
1825
1826
1827
1828 extern char *asctime_r (__const struct tm *__restrict __tp,
1829 char *__restrict __buf) ;
1830
1831
1832 extern char *ctime_r (__const time_t *__restrict __timer,
1833 char *__restrict __buf) ;
1834 # 299 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/time.h" 3 4
1835 extern char *tzname[2];
1836
1837
1838
1839 extern void tzset (void) ;
1840
1841
1842
1843 extern int daylight;
1844 extern long int timezone;
1845
1846
1847
1848
1849
1850 extern int stime (__const time_t *__when) ;
1851 # 329 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/time.h" 3 4
1852 extern time_t timegm (struct tm *__tp) ;
1853
1854
1855 extern time_t timelocal (struct tm *__tp) ;
1856
1857
1858 extern int dysize (int __year) __attribute__ ((__const__));
1859 # 344 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/time.h" 3 4
1860 extern int nanosleep (__const struct timespec *__requested_time,
1861 struct timespec *__remaining);
1862
1863
1864
1865 extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) ;
1866 # 438 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/bfin-uclinux/runtime/usr/include/time.h" 3 4
1867
1868 # 28 "src/unix/osd_cpu.h" 2
1869 # 44 "src/unix/osd_cpu.h"
1870 typedef signed char INT8;
1871 typedef signed short INT16;
1872 typedef signed int INT32;
1873
1874
1875
1876
1877
1878
1879
1880 typedef signed long long INT64;
1881
1882
1883 typedef unsigned char UINT8;
1884 typedef unsigned short UINT16;
1885 typedef unsigned int UINT32;
1886 typedef unsigned long long UINT64;
1887 # 23 "src/mamecore.h" 2
1888 # 37 "src/mamecore.h"
1889 typedef UINT32 FPTR;
1890
1891
1892
1893
1894 typedef void genf(void);
1895
1896
1897
1898
1899
1900 typedef struct _mame_display mame_display;
1901 typedef struct _game_driver game_driver;
1902 typedef struct _machine_config machine_config;
1903 typedef struct _rom_load_data rom_load_data;
1904 typedef struct _xml_data_node xml_data_node;
1905 typedef struct _performance_info performance_info;
1906 typedef struct _osd_file osd_file;
1907
1908
1909
1910 typedef UINT32 pen_t;
1911
1912
1913
1914 struct _mame_bitmap
1915 {
1916 int width,height;
1917 int depth;
1918 void **line;
1919
1920
1921 void *base;
1922 int rowpixels;
1923 int rowbytes;
1924
1925
1926 void (*plot)(struct _mame_bitmap *bitmap,int x,int y,pen_t pen);
1927 pen_t (*read)(struct _mame_bitmap *bitmap,int x,int y);
1928 void (*plot_box)(struct _mame_bitmap *bitmap,int x,int y,int width,int height,pen_t pen);
1929 };
1930 typedef struct _mame_bitmap mame_bitmap;
1931
1932
1933
1934 struct _rectangle
1935 {
1936 int min_x,max_x;
1937 int min_y,max_y;
1938 };
1939 typedef struct _rectangle rectangle;
1940 # 98 "src/mamecore.h"
1941 typedef union
1942 {
1943
1944 struct { UINT8 l,h,h2,h3; } b;
1945 struct { UINT16 l,h; } w;
1946
1947
1948
1949
1950 UINT32 d;
1951 } PAIR;
1952 # 118 "src/mamecore.h"
1953 typedef union
1954 {
1955
1956 struct { UINT8 l,h,h2,h3,h4,h5,h6,h7; } b;
1957 struct { UINT16 l,h,h2,h3; } w;
1958 struct { UINT32 l,h; } d;
1959
1960
1961
1962
1963
1964 UINT64 lw;
1965 } PAIR64;
1966 # 334 "src/mamecore.h"
1967 static __inline__ int mame_stricmp(const char *s1, const char *s2)
1968 {
1969 for (;;)
1970 {
1971 int c1 = (__extension__ ({ int __res; if (sizeof (*s1++) > 1) { if (__builtin_constant_p (*s1++)) { int __c = (*s1++); __res = (((unsigned int)((__c) + 128)) < 384) ? ((__ctype_tolower))[__c] : __c; } else __res = tolower (*s1++); } else __res = ((__ctype_tolower))[(int) (*s1++)]; __res; }));
1972 int c2 = (__extension__ ({ int __res; if (sizeof (*s2++) > 1) { if (__builtin_constant_p (*s2++)) { int __c = (*s2++); __res = (((unsigned int)((__c) + 128)) < 384) ? ((__ctype_tolower))[__c] : __c; } else __res = tolower (*s2++); } else __res = ((__ctype_tolower))[(int) (*s2++)]; __res; }));
1973 if (c1 == 0 || c1 != c2)
1974 return c1 - c2;
1975 }
1976 }
1977 # 352 "src/mamecore.h"
1978 static __inline__ void sect_rect(rectangle *dst, const rectangle *src)
1979 {
1980 if (src->min_x > dst->min_x) dst->min_x = src->min_x;
1981 if (src->max_x < dst->max_x) dst->max_x = src->max_x;
1982 if (src->min_y > dst->min_y) dst->min_y = src->min_y;
1983 if (src->max_y < dst->max_y) dst->max_y = src->max_y;
1984 }
1985
1986
1987
1988 static __inline__ float u2f(UINT32 v)
1989 {
1990 union {
1991 float ff;
1992 UINT32 vv;
1993 } u;
1994 u.vv = v;
1995 return u.ff;
1996 }
1997
1998
1999
2000 static __inline__ UINT32 f2u(float f)
2001 {
2002 union {
2003 float ff;
2004 UINT32 vv;
2005 } u;
2006 u.ff = f;
2007 return u.vv;
2008 }
2009
2010
2011
2012 static __inline__ float u2d(UINT64 v)
2013 {
2014 union {
2015 double dd;
2016 UINT64 vv;
2017 } u;
2018 u.vv = v;
2019 return u.dd;
2020 }
2021
2022
2023
2024 static __inline__ UINT64 d2u(double d)
2025 {
2026 union {
2027 double dd;
2028 UINT64 vv;
2029 } u;
2030 u.dd = d;
2031 return u.vv;
2032 }
2033 # 422 "src/mamecore.h"
2034 static __inline__ UINT32 count_leading_zeros(UINT32 val)
2035 {
2036 UINT32 count;
2037 for (count = 0; (INT32)val >= 0; count++) val <<= 1;
2038 return count;
2039 }
2040
2041
2042
2043
2044
2045 static __inline__ UINT32 count_leading_ones(UINT32 val)
2046 {
2047 UINT32 count;
2048 for (count = 0; (INT32)val < 0; count++) val <<= 1;
2049 return count;
2050 }
2051
2052
2053
2054
2055
2056 static __inline__ INT32 fixed_mul_shift(INT32 val1, INT32 val2, UINT8 shift)
2057 {
2058 return (INT32)(((INT64)val1 * (INT64)val2) >> shift);
2059 }
2060 # 458 "src/mamecore.h"
2061 static __inline__ int bcd_adjust(int value)
2062 {
2063 if ((value & 0xf) >= 0xa)
2064 value = value + 0x10 - 0xa;
2065 if ((value & 0xf0) >= 0xa0)
2066 value = value - 0xa0 + 0x100;
2067 return value;
2068 }
2069
2070
2071 static __inline__ int dec_2_bcd(int a)
2072 {
2073 return (a % 10) | ((a / 10) << 4);
2074 }
2075
2076
2077 static __inline__ int bcd_2_dec(int a)
2078 {
2079 return (a & 0xf) + (a >> 4) * 10;
2080 }
2081 # 487 "src/mamecore.h"
2082 static __inline__ int gregorian_is_leap_year(int year)
2083 {
2084 return !(year % 100 ? year % 4 : year % 400);
2085 }
2086
2087
2088
2089 static __inline__ int gregorian_days_in_month(int month, int year)
2090 {
2091 if (month == 2)
2092 return gregorian_is_leap_year(year) ? 29 : 28;
2093 else if (month == 4 || month == 6 || month == 9 || month == 11)
2094 return 30;
2095 else
2096 return 31;
2097 }
2098 # 63 "src/driver.h" 2
2099 # 1 "src/osdepend.h" 1
2100 # 12 "src/osdepend.h"
2101
2102
2103
2104
2105
2106
2107 # 1 "src/inptport.h" 1
2108 # 12 "src/inptport.h"
2109
2110
2111
2112
2113
2114 # 1 "src/memory.h" 1
2115 # 12 "src/memory.h"
2116
2117
2118
2119
2120
2121
2122 # 1 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/lib/gcc/bfin-uclinux/3.4.6/include/stddef.h" 1 3 4
2123 # 151 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/lib/gcc/bfin-uclinux/3.4.6/include/stddef.h" 3 4
2124 typedef long int ptrdiff_t;
2125 # 325 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/lib/gcc/bfin-uclinux/3.4.6/include/stddef.h" 3 4
2126 typedef int wchar_t;
2127 # 19 "src/memory.h" 2
2128 # 54 "src/memory.h"
2129 typedef UINT32 offs_t;
2130
2131
2132 typedef UINT8 (*read8_handler) (__attribute__((__unused__)) offs_t offset);
2133 typedef void (*write8_handler) (__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT8 data);
2134 typedef UINT16 (*read16_handler) (__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT16 mem_mask);
2135 typedef void (*write16_handler)(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT16 data, __attribute__((__unused__)) UINT16 mem_mask);
2136 typedef UINT32 (*read32_handler) (__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT32 mem_mask);
2137 typedef void (*write32_handler)(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT32 data, __attribute__((__unused__)) UINT32 mem_mask);
2138 typedef UINT64 (*read64_handler) (__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT64 mem_mask);
2139 typedef void (*write64_handler)(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT64 data, __attribute__((__unused__)) UINT64 mem_mask);
2140 typedef offs_t (*opbase_handler) (__attribute__((__unused__)) offs_t address);
2141
2142
2143 struct _data_accessors
2144 {
2145 UINT8 (*read_byte)(offs_t offset);
2146 UINT16 (*read_word)(offs_t offset);
2147 UINT32 (*read_dword)(offs_t offset);
2148 UINT64 (*read_qword)(offs_t offset);
2149
2150 void (*write_byte)(offs_t offset, UINT8 data);
2151 void (*write_word)(offs_t offset, UINT16 data);
2152 void (*write_dword)(offs_t offset, UINT32 data);
2153 void (*write_qword)(offs_t offset, UINT64 data);
2154 };
2155 typedef struct _data_accessors data_accessors;
2156 # 554 "src/memory.h"
2157 typedef struct _handler_data handler_data;
2158
2159
2160 union _read_handlers
2161 {
2162 genf * handler;
2163 read8_handler handler8;
2164 read16_handler handler16;
2165 read32_handler handler32;
2166 read64_handler handler64;
2167 };
2168 typedef union _read_handlers read_handlers;
2169
2170
2171 union _write_handlers
2172 {
2173 genf * handler;
2174 write8_handler handler8;
2175 write16_handler handler16;
2176 write32_handler handler32;
2177 write64_handler handler64;
2178 };
2179 typedef union _write_handlers write_handlers;
2180
2181
2182 struct _address_map
2183 {
2184 UINT32 flags;
2185 offs_t start, end;
2186 offs_t mirror;
2187 offs_t mask;
2188 read_handlers read;
2189 const char * read_name;
2190 write_handlers write;
2191 const char * write_name;
2192 void * memory;
2193 UINT32 share;
2194 void ** base;
2195 size_t * size;
2196 UINT32 region;
2197 offs_t region_offs;
2198 };
2199 typedef struct _address_map address_map;
2200
2201
2202 struct _address_space
2203 {
2204 offs_t addrmask;
2205 UINT8 * readlookup;
2206 UINT8 * writelookup;
2207 handler_data * readhandlers;
2208 handler_data * writehandlers;
2209 data_accessors * accessors;
2210 };
2211 typedef struct _address_space address_space;
2212 # 619 "src/memory.h"
2213 typedef address_map *(*construct_map_t)(address_map *map);
2214 # 771 "src/memory.h"
2215 UINT8 program_read_byte_8(offs_t address);
2216 void program_write_byte_8(offs_t address, UINT8 data);
2217
2218 UINT8 program_read_byte_16be(offs_t address);
2219 UINT16 program_read_word_16be(offs_t address);
2220 void program_write_byte_16be(offs_t address, UINT8 data);
2221 void program_write_word_16be(offs_t address, UINT16 data);
2222
2223 UINT8 program_read_byte_16le(offs_t address);
2224 UINT16 program_read_word_16le(offs_t address);
2225 void program_write_byte_16le(offs_t address, UINT8 data);
2226 void program_write_word_16le(offs_t address, UINT16 data);
2227
2228 UINT8 program_read_byte_32be(offs_t address);
2229 UINT16 program_read_word_32be(offs_t address);
2230 UINT32 program_read_dword_32be(offs_t address);
2231 void program_write_byte_32be(offs_t address, UINT8 data);
2232 void program_write_word_32be(offs_t address, UINT16 data);
2233 void program_write_dword_32be(offs_t address, UINT32 data);
2234
2235 UINT8 program_read_byte_32le(offs_t address);
2236 UINT16 program_read_word_32le(offs_t address);
2237 UINT32 program_read_dword_32le(offs_t address);
2238 void program_write_byte_32le(offs_t address, UINT8 data);
2239 void program_write_word_32le(offs_t address, UINT16 data);
2240 void program_write_dword_32le(offs_t address, UINT32 data);
2241
2242 UINT8 program_read_byte_64be(offs_t address);
2243 UINT16 program_read_word_64be(offs_t address);
2244 UINT32 program_read_dword_64be(offs_t address);
2245 UINT64 program_read_qword_64be(offs_t address);
2246 void program_write_byte_64be(offs_t address, UINT8 data);
2247 void program_write_word_64be(offs_t address, UINT16 data);
2248 void program_write_dword_64be(offs_t address, UINT32 data);
2249 void program_write_qword_64be(offs_t address, UINT64 data);
2250
2251 UINT8 program_read_byte_64le(offs_t address);
2252 UINT16 program_read_word_64le(offs_t address);
2253 UINT32 program_read_dword_64le(offs_t address);
2254 UINT64 program_read_qword_64le(offs_t address);
2255 void program_write_byte_64le(offs_t address, UINT8 data);
2256 void program_write_word_64le(offs_t address, UINT16 data);
2257 void program_write_dword_64le(offs_t address, UINT32 data);
2258 void program_write_qword_64le(offs_t address, UINT64 data);
2259
2260
2261 UINT8 data_read_byte_8(offs_t address);
2262 void data_write_byte_8(offs_t address, UINT8 data);
2263
2264 UINT8 data_read_byte_16be(offs_t address);
2265 UINT16 data_read_word_16be(offs_t address);
2266 void data_write_byte_16be(offs_t address, UINT8 data);
2267 void data_write_word_16be(offs_t address, UINT16 data);
2268
2269 UINT8 data_read_byte_16le(offs_t address);
2270 UINT16 data_read_word_16le(offs_t address);
2271 void data_write_byte_16le(offs_t address, UINT8 data);
2272 void data_write_word_16le(offs_t address, UINT16 data);
2273
2274 UINT8 data_read_byte_32be(offs_t address);
2275 UINT16 data_read_word_32be(offs_t address);
2276 UINT32 data_read_dword_32be(offs_t address);
2277 void data_write_byte_32be(offs_t address, UINT8 data);
2278 void data_write_word_32be(offs_t address, UINT16 data);
2279 void data_write_dword_32be(offs_t address, UINT32 data);
2280
2281 UINT8 data_read_byte_32le(offs_t address);
2282 UINT16 data_read_word_32le(offs_t address);
2283 UINT32 data_read_dword_32le(offs_t address);
2284 void data_write_byte_32le(offs_t address, UINT8 data);
2285 void data_write_word_32le(offs_t address, UINT16 data);
2286 void data_write_dword_32le(offs_t address, UINT32 data);
2287
2288 UINT8 data_read_byte_64be(offs_t address);
2289 UINT16 data_read_word_64be(offs_t address);
2290 UINT32 data_read_dword_64be(offs_t address);
2291 UINT64 data_read_qword_64be(offs_t address);
2292 void data_write_byte_64be(offs_t address, UINT8 data);
2293 void data_write_word_64be(offs_t address, UINT16 data);
2294 void data_write_dword_64be(offs_t address, UINT32 data);
2295 void data_write_qword_64be(offs_t address, UINT64 data);
2296
2297 UINT8 data_read_byte_64le(offs_t address);
2298 UINT16 data_read_word_64le(offs_t address);
2299 UINT32 data_read_dword_64le(offs_t address);
2300 UINT64 data_read_qword_64le(offs_t address);
2301 void data_write_byte_64le(offs_t address, UINT8 data);
2302 void data_write_word_64le(offs_t address, UINT16 data);
2303 void data_write_dword_64le(offs_t address, UINT32 data);
2304 void data_write_qword_64le(offs_t address, UINT64 data);
2305
2306
2307 UINT8 io_read_byte_8(offs_t address);
2308 void io_write_byte_8(offs_t address, UINT8 data);
2309
2310 UINT8 io_read_byte_16be(offs_t address);
2311 UINT16 io_read_word_16be(offs_t address);
2312 void io_write_byte_16be(offs_t address, UINT8 data);
2313 void io_write_word_16be(offs_t address, UINT16 data);
2314
2315 UINT8 io_read_byte_16le(offs_t address);
2316 UINT16 io_read_word_16le(offs_t address);
2317 void io_write_byte_16le(offs_t address, UINT8 data);
2318 void io_write_word_16le(offs_t address, UINT16 data);
2319
2320 UINT8 io_read_byte_32be(offs_t address);
2321 UINT16 io_read_word_32be(offs_t address);
2322 UINT32 io_read_dword_32be(offs_t address);
2323 void io_write_byte_32be(offs_t address, UINT8 data);
2324 void io_write_word_32be(offs_t address, UINT16 data);
2325 void io_write_dword_32be(offs_t address, UINT32 data);
2326
2327 UINT8 io_read_byte_32le(offs_t address);
2328 UINT16 io_read_word_32le(offs_t address);
2329 UINT32 io_read_dword_32le(offs_t address);
2330 void io_write_byte_32le(offs_t address, UINT8 data);
2331 void io_write_word_32le(offs_t address, UINT16 data);
2332 void io_write_dword_32le(offs_t address, UINT32 data);
2333
2334 UINT8 io_read_byte_64be(offs_t address);
2335 UINT16 io_read_word_64be(offs_t address);
2336 UINT32 io_read_dword_64be(offs_t address);
2337 UINT64 io_read_qword_64be(offs_t address);
2338 void io_write_byte_64be(offs_t address, UINT8 data);
2339 void io_write_word_64be(offs_t address, UINT16 data);
2340 void io_write_dword_64be(offs_t address, UINT32 data);
2341 void io_write_qword_64be(offs_t address, UINT64 data);
2342
2343 UINT8 io_read_byte_64le(offs_t address);
2344 UINT16 io_read_word_64le(offs_t address);
2345 UINT32 io_read_dword_64le(offs_t address);
2346 UINT64 io_read_qword_64le(offs_t address);
2347 void io_write_byte_64le(offs_t address, UINT8 data);
2348 void io_write_word_64le(offs_t address, UINT16 data);
2349 void io_write_dword_64le(offs_t address, UINT32 data);
2350 void io_write_qword_64le(offs_t address, UINT64 data);
2351 # 917 "src/memory.h"
2352 int memory_init(void);
2353 void memory_exit(void);
2354 void memory_set_context(int activecpu);
2355
2356
2357 const address_map *memory_get_map(int cpunum, int spacenum);
2358
2359
2360 opbase_handler memory_set_opbase_handler(int cpunum, opbase_handler function);
2361 void memory_set_opbase(offs_t offset);
2362
2363
2364 void memory_set_decrypted_region(int cpunum, offs_t start, offs_t end, void *base);
2365
2366
2367 void * memory_get_read_ptr(int cpunum, int spacenum, offs_t offset);
2368 void * memory_get_write_ptr(int cpunum, int spacenum, offs_t offset);
2369 void * memory_get_op_ptr(int cpunum, offs_t offset, int arg);
2370
2371
2372 void memory_configure_bank(int banknum, int startentry, int numentries, void *base, offs_t stride);
2373 void memory_configure_bank_decrypted(int banknum, int startentry, int numentries, void *base, offs_t stride);
2374 void memory_set_bank(int banknum, int entrynum);
2375 void memory_set_bankptr(int banknum, void *base);
2376
2377
2378 void memory_set_debugger_access(int debugger);
2379
2380
2381 void * _memory_install_read_handler (int cpunum, int spacenum, offs_t start, offs_t end, offs_t mask, offs_t mirror, int handler, const char *handler_name);
2382 UINT8 * _memory_install_read8_handler (int cpunum, int spacenum, offs_t start, offs_t end, offs_t mask, offs_t mirror, read8_handler handler, const char *handler_name);
2383 UINT16 * _memory_install_read16_handler (int cpunum, int spacenum, offs_t start, offs_t end, offs_t mask, offs_t mirror, read16_handler handler, const char *handler_name);
2384 UINT32 * _memory_install_read32_handler (int cpunum, int spacenum, offs_t start, offs_t end, offs_t mask, offs_t mirror, read32_handler handler, const char *handler_name);
2385 UINT64 * _memory_install_read64_handler (int cpunum, int spacenum, offs_t start, offs_t end, offs_t mask, offs_t mirror, read64_handler handler, const char *handler_name);
2386 void * _memory_install_write_handler (int cpunum, int spacenum, offs_t start, offs_t end, offs_t mask, offs_t mirror, int handler, const char *handler_name);
2387 UINT8 * _memory_install_write8_handler (int cpunum, int spacenum, offs_t start, offs_t end, offs_t mask, offs_t mirror, write8_handler handler, const char *handler_name);
2388 UINT16 * _memory_install_write16_handler(int cpunum, int spacenum, offs_t start, offs_t end, offs_t mask, offs_t mirror, write16_handler handler, const char *handler_name);
2389 UINT32 * _memory_install_write32_handler(int cpunum, int spacenum, offs_t start, offs_t end, offs_t mask, offs_t mirror, write32_handler handler, const char *handler_name);
2390 UINT64 * _memory_install_write64_handler(int cpunum, int spacenum, offs_t start, offs_t end, offs_t mask, offs_t mirror, write64_handler handler, const char *handler_name);
2391
2392 void * _memory_install_read_matchmask_handler (int cpunum, int spacenum, offs_t matchval, offs_t maskval, offs_t mask, offs_t mirror, int handler, const char *handler_name);
2393 UINT8 * _memory_install_read8_matchmask_handler (int cpunum, int spacenum, offs_t matchval, offs_t maskval, offs_t mask, offs_t mirror, read8_handler handler, const char *handler_name);
2394 UINT16 * _memory_install_read16_matchmask_handler (int cpunum, int spacenum, offs_t matchval, offs_t maskval, offs_t mask, offs_t mirror, read16_handler handler, const char *handler_name);
2395 UINT32 * _memory_install_read32_matchmask_handler (int cpunum, int spacenum, offs_t matchval, offs_t maskval, offs_t mask, offs_t mirror, read32_handler handler, const char *handler_name);
2396 UINT64 * _memory_install_read64_matchmask_handler (int cpunum, int spacenum, offs_t matchval, offs_t maskval, offs_t mask, offs_t mirror, read64_handler handler, const char *handler_name);
2397 void * _memory_install_write_matchmask_handler (int cpunum, int spacenum, offs_t matchval, offs_t maskval, offs_t mask, offs_t mirror, int handler, const char *handler_name);
2398 UINT8 * _memory_install_write8_matchmask_handler (int cpunum, int spacenum, offs_t matchval, offs_t maskval, offs_t mask, offs_t mirror, write8_handler handler, const char *handler_name);
2399 UINT16 * _memory_install_write16_matchmask_handler(int cpunum, int spacenum, offs_t matchval, offs_t maskval, offs_t mask, offs_t mirror, write16_handler handler, const char *handler_name);
2400 UINT32 * _memory_install_write32_matchmask_handler(int cpunum, int spacenum, offs_t matchval, offs_t maskval, offs_t mask, offs_t mirror, write32_handler handler, const char *handler_name);
2401 UINT64 * _memory_install_write64_matchmask_handler(int cpunum, int spacenum, offs_t matchval, offs_t maskval, offs_t mask, offs_t mirror, write64_handler handler, const char *handler_name);
2402
2403
2404 void memory_dump(FILE *file);
2405 const char *memory_get_handler_string(int read0_or_write1, int cpunum, int spacenum, offs_t offset);
2406 # 980 "src/memory.h"
2407 extern UINT8 opcode_entry;
2408 extern UINT8 * opcode_base;
2409 extern UINT8 * opcode_arg_base;
2410 extern offs_t opcode_mask;
2411 extern offs_t opcode_memory_min;
2412 extern offs_t opcode_memory_max;
2413 extern address_space active_address_space[];
2414 extern address_map * construct_map_0(address_map *map);
2415 # 1069 "src/memory.h"
2416 static __inline__ UINT8 program_read_byte (offs_t offset) { return (*active_address_space[0].accessors->read_byte)(offset); }
2417 static __inline__ UINT16 program_read_word (offs_t offset) { return (*active_address_space[0].accessors->read_word)(offset); }
2418 static __inline__ UINT32 program_read_dword(offs_t offset) { return (*active_address_space[0].accessors->read_dword)(offset); }
2419 static __inline__ UINT64 program_read_qword(offs_t offset) { return (*active_address_space[0].accessors->read_qword)(offset); }
2420
2421 static __inline__ void program_write_byte (offs_t offset, UINT8 data) { (*active_address_space[0].accessors->write_byte)(offset, data); }
2422 static __inline__ void program_write_word (offs_t offset, UINT16 data) { (*active_address_space[0].accessors->write_word)(offset, data); }
2423 static __inline__ void program_write_dword(offs_t offset, UINT32 data) { (*active_address_space[0].accessors->write_dword)(offset, data); }
2424 static __inline__ void program_write_qword(offs_t offset, UINT64 data) { (*active_address_space[0].accessors->write_qword)(offset, data); }
2425
2426 static __inline__ UINT8 data_read_byte (offs_t offset) { return (*active_address_space[1].accessors->read_byte)(offset); }
2427 static __inline__ UINT16 data_read_word (offs_t offset) { return (*active_address_space[1].accessors->read_word)(offset); }
2428 static __inline__ UINT32 data_read_dword(offs_t offset) { return (*active_address_space[1].accessors->read_dword)(offset); }
2429 static __inline__ UINT64 data_read_qword(offs_t offset) { return (*active_address_space[1].accessors->read_qword)(offset); }
2430
2431 static __inline__ void data_write_byte (offs_t offset, UINT8 data) { (*active_address_space[1].accessors->write_byte)(offset, data); }
2432 static __inline__ void data_write_word (offs_t offset, UINT16 data) { (*active_address_space[1].accessors->write_word)(offset, data); }
2433 static __inline__ void data_write_dword(offs_t offset, UINT32 data) { (*active_address_space[1].accessors->write_dword)(offset, data); }
2434 static __inline__ void data_write_qword(offs_t offset, UINT64 data) { (*active_address_space[1].accessors->write_qword)(offset, data); }
2435
2436 static __inline__ UINT8 io_read_byte (offs_t offset) { return (*active_address_space[2].accessors->read_byte)(offset); }
2437 static __inline__ UINT16 io_read_word (offs_t offset) { return (*active_address_space[2].accessors->read_word)(offset); }
2438 static __inline__ UINT32 io_read_dword(offs_t offset) { return (*active_address_space[2].accessors->read_dword)(offset); }
2439 static __inline__ UINT64 io_read_qword(offs_t offset) { return (*active_address_space[2].accessors->read_qword)(offset); }
2440
2441 static __inline__ void io_write_byte (offs_t offset, UINT8 data) { (*active_address_space[2].accessors->write_byte)(offset, data); }
2442 static __inline__ void io_write_word (offs_t offset, UINT16 data) { (*active_address_space[2].accessors->write_word)(offset, data); }
2443 static __inline__ void io_write_dword(offs_t offset, UINT32 data) { (*active_address_space[2].accessors->write_dword)(offset, data); }
2444 static __inline__ void io_write_qword(offs_t offset, UINT64 data) { (*active_address_space[2].accessors->write_qword)(offset, data); }
2445
2446
2447 UINT8 cpu_readop_safe(offs_t offset);
2448 UINT16 cpu_readop16_safe(offs_t offset);
2449 UINT32 cpu_readop32_safe(offs_t offset);
2450 UINT64 cpu_readop64_safe(offs_t offset);
2451 UINT8 cpu_readop_arg_safe(offs_t offset);
2452 UINT16 cpu_readop_arg16_safe(offs_t offset);
2453 UINT32 cpu_readop_arg32_safe(offs_t offset);
2454 UINT64 cpu_readop_arg64_safe(offs_t offset);
2455 # 1121 "src/memory.h"
2456 static __inline__ void * cpu_opptr(offs_t A) { if ((0)) { memory_set_opbase(A); } return ((void *)&opcode_base[(A) & opcode_mask]); }
2457 static __inline__ UINT8 cpu_readop(offs_t A) { if ((0)) { memory_set_opbase(A); } return (opcode_base[(A) & opcode_mask]); }
2458 static __inline__ UINT16 cpu_readop16(offs_t A) { if ((0)) { memory_set_opbase(A); } return (*(UINT16 *)&opcode_base[(A) & opcode_mask]); }
2459 static __inline__ UINT32 cpu_readop32(offs_t A) { if ((0)) { memory_set_opbase(A); } return (*(UINT32 *)&opcode_base[(A) & opcode_mask]); }
2460 static __inline__ UINT64 cpu_readop64(offs_t A) { if ((0)) { memory_set_opbase(A); } return (*(UINT64 *)&opcode_base[(A) & opcode_mask]); }
2461 static __inline__ UINT8 cpu_readop_arg(offs_t A) { if ((0)) { memory_set_opbase(A); } return (opcode_arg_base[(A) & opcode_mask]); }
2462 static __inline__ UINT16 cpu_readop_arg16(offs_t A) { if ((0)) { memory_set_opbase(A); } return (*(UINT16 *)&opcode_arg_base[(A) & opcode_mask]); }
2463 static __inline__ UINT32 cpu_readop_arg32(offs_t A) { if ((0)) { memory_set_opbase(A); } return (*(UINT32 *)&opcode_arg_base[(A) & opcode_mask]); }
2464 static __inline__ UINT64 cpu_readop_arg64(offs_t A) { if ((0)) { memory_set_opbase(A); } return (*(UINT64 *)&opcode_arg_base[(A) & opcode_mask]); }
2465 # 18 "src/inptport.h" 2
2466 # 1 "src/input.h" 1
2467 # 12 "src/input.h"
2468
2469 # 35 "src/input.h"
2470 enum
2471 {
2472 ANALOG_TYPE_NONE = 0,
2473 ANALOG_TYPE_ABSOLUTE = 1,
2474 ANALOG_TYPE_RELATIVE = 2
2475 };
2476
2477 enum
2478 {
2479
2480 KEYCODE_A,
2481 KEYCODE_B,
2482 KEYCODE_C,
2483 KEYCODE_D,
2484 KEYCODE_E,
2485 KEYCODE_F,
2486 KEYCODE_G,
2487 KEYCODE_H,
2488 KEYCODE_I,
2489 KEYCODE_J,
2490 KEYCODE_K,
2491 KEYCODE_L,
2492 KEYCODE_M,
2493 KEYCODE_N,
2494 KEYCODE_O,
2495 KEYCODE_P,
2496 KEYCODE_Q,
2497 KEYCODE_R,
2498 KEYCODE_S,
2499 KEYCODE_T,
2500 KEYCODE_U,
2501 KEYCODE_V,
2502 KEYCODE_W,
2503 KEYCODE_X,
2504 KEYCODE_Y,
2505 KEYCODE_Z,
2506 KEYCODE_0,
2507 KEYCODE_1,
2508 KEYCODE_2,
2509 KEYCODE_3,
2510 KEYCODE_4,
2511 KEYCODE_5,
2512 KEYCODE_6,
2513 KEYCODE_7,
2514 KEYCODE_8,
2515 KEYCODE_9,
2516 KEYCODE_F1,
2517 KEYCODE_F2,
2518 KEYCODE_F3,
2519 KEYCODE_F4,
2520 KEYCODE_F5,
2521 KEYCODE_F6,
2522 KEYCODE_F7,
2523 KEYCODE_F8,
2524 KEYCODE_F9,
2525 KEYCODE_F10,
2526 KEYCODE_F11,
2527 KEYCODE_F12,
2528 KEYCODE_F13,
2529 KEYCODE_F14,
2530 KEYCODE_F15,
2531 KEYCODE_ESC,
2532 KEYCODE_TILDE,
2533 KEYCODE_MINUS,
2534 KEYCODE_EQUALS,
2535 KEYCODE_BACKSPACE,
2536 KEYCODE_TAB,
2537 KEYCODE_OPENBRACE,
2538 KEYCODE_CLOSEBRACE,
2539 KEYCODE_ENTER,
2540 KEYCODE_COLON,
2541 KEYCODE_QUOTE,
2542 KEYCODE_BACKSLASH,
2543 KEYCODE_BACKSLASH2,
2544 KEYCODE_COMMA,
2545 KEYCODE_STOP,
2546 KEYCODE_SLASH,
2547 KEYCODE_SPACE,
2548 KEYCODE_INSERT,
2549 KEYCODE_DEL,
2550 KEYCODE_HOME,
2551 KEYCODE_END,
2552 KEYCODE_PGUP,
2553 KEYCODE_PGDN,
2554 KEYCODE_LEFT,
2555 KEYCODE_RIGHT,
2556 KEYCODE_UP,
2557 KEYCODE_DOWN,
2558 KEYCODE_0_PAD,
2559 KEYCODE_1_PAD,
2560 KEYCODE_2_PAD,
2561 KEYCODE_3_PAD,
2562 KEYCODE_4_PAD,
2563 KEYCODE_5_PAD,
2564 KEYCODE_6_PAD,
2565 KEYCODE_7_PAD,
2566 KEYCODE_8_PAD,
2567 KEYCODE_9_PAD,
2568 KEYCODE_SLASH_PAD,
2569 KEYCODE_ASTERISK,
2570 KEYCODE_MINUS_PAD,
2571 KEYCODE_PLUS_PAD,
2572 KEYCODE_DEL_PAD,
2573 KEYCODE_ENTER_PAD,
2574 KEYCODE_PRTSCR,
2575 KEYCODE_PAUSE,
2576 KEYCODE_LSHIFT,
2577 KEYCODE_RSHIFT,
2578 KEYCODE_LCONTROL,
2579 KEYCODE_RCONTROL,
2580 KEYCODE_LALT,
2581 KEYCODE_RALT,
2582 KEYCODE_SCRLOCK,
2583 KEYCODE_NUMLOCK,
2584 KEYCODE_CAPSLOCK,
2585 KEYCODE_LWIN,
2586 KEYCODE_RWIN,
2587 KEYCODE_MENU,
2588
2589
2590 JOYCODE_1_LEFT,
2591 JOYCODE_1_RIGHT,
2592 JOYCODE_1_UP,
2593 JOYCODE_1_DOWN,
2594 JOYCODE_1_BUTTON1,
2595 JOYCODE_1_BUTTON2,
2596 JOYCODE_1_BUTTON3,
2597 JOYCODE_1_BUTTON4,
2598 JOYCODE_1_BUTTON5,
2599 JOYCODE_1_BUTTON6,
2600 JOYCODE_1_BUTTON7,
2601 JOYCODE_1_BUTTON8,
2602 JOYCODE_1_BUTTON9,
2603 JOYCODE_1_BUTTON10,
2604 JOYCODE_1_BUTTON11,
2605 JOYCODE_1_BUTTON12,
2606 JOYCODE_1_BUTTON13,
2607 JOYCODE_1_BUTTON14,
2608 JOYCODE_1_BUTTON15,
2609 JOYCODE_1_BUTTON16,
2610 JOYCODE_1_START,
2611 JOYCODE_1_SELECT,
2612 JOYCODE_2_LEFT,
2613 JOYCODE_2_RIGHT,
2614 JOYCODE_2_UP,
2615 JOYCODE_2_DOWN,
2616 JOYCODE_2_BUTTON1,
2617 JOYCODE_2_BUTTON2,
2618 JOYCODE_2_BUTTON3,
2619 JOYCODE_2_BUTTON4,
2620 JOYCODE_2_BUTTON5,
2621 JOYCODE_2_BUTTON6,
2622 JOYCODE_2_BUTTON7,
2623 JOYCODE_2_BUTTON8,
2624 JOYCODE_2_BUTTON9,
2625 JOYCODE_2_BUTTON10,
2626 JOYCODE_2_BUTTON11,
2627 JOYCODE_2_BUTTON12,
2628 JOYCODE_2_BUTTON13,
2629 JOYCODE_2_BUTTON14,
2630 JOYCODE_2_BUTTON15,
2631 JOYCODE_2_BUTTON16,
2632 JOYCODE_2_START,
2633 JOYCODE_2_SELECT,
2634 JOYCODE_3_LEFT,
2635 JOYCODE_3_RIGHT,
2636 JOYCODE_3_UP,
2637 JOYCODE_3_DOWN,
2638 JOYCODE_3_BUTTON1,
2639 JOYCODE_3_BUTTON2,
2640 JOYCODE_3_BUTTON3,
2641 JOYCODE_3_BUTTON4,
2642 JOYCODE_3_BUTTON5,
2643 JOYCODE_3_BUTTON6,
2644 JOYCODE_3_BUTTON7,
2645 JOYCODE_3_BUTTON8,
2646 JOYCODE_3_BUTTON9,
2647 JOYCODE_3_BUTTON10,
2648 JOYCODE_3_BUTTON11,
2649 JOYCODE_3_BUTTON12,
2650 JOYCODE_3_BUTTON13,
2651 JOYCODE_3_BUTTON14,
2652 JOYCODE_3_BUTTON15,
2653 JOYCODE_3_BUTTON16,
2654 JOYCODE_3_START,
2655 JOYCODE_3_SELECT,
2656 JOYCODE_4_LEFT,
2657 JOYCODE_4_RIGHT,
2658 JOYCODE_4_UP,
2659 JOYCODE_4_DOWN,
2660 JOYCODE_4_BUTTON1,
2661 JOYCODE_4_BUTTON2,
2662 JOYCODE_4_BUTTON3,
2663 JOYCODE_4_BUTTON4,
2664 JOYCODE_4_BUTTON5,
2665 JOYCODE_4_BUTTON6,
2666 JOYCODE_4_BUTTON7,
2667 JOYCODE_4_BUTTON8,
2668 JOYCODE_4_BUTTON9,
2669 JOYCODE_4_BUTTON10,
2670 JOYCODE_4_BUTTON11,
2671 JOYCODE_4_BUTTON12,
2672 JOYCODE_4_BUTTON13,
2673 JOYCODE_4_BUTTON14,
2674 JOYCODE_4_BUTTON15,
2675 JOYCODE_4_BUTTON16,
2676 JOYCODE_4_START,
2677 JOYCODE_4_SELECT,
2678 JOYCODE_5_LEFT,
2679 JOYCODE_5_RIGHT,
2680 JOYCODE_5_UP,
2681 JOYCODE_5_DOWN,
2682 JOYCODE_5_BUTTON1,
2683 JOYCODE_5_BUTTON2,
2684 JOYCODE_5_BUTTON3,
2685 JOYCODE_5_BUTTON4,
2686 JOYCODE_5_BUTTON5,
2687 JOYCODE_5_BUTTON6,
2688 JOYCODE_5_BUTTON7,
2689 JOYCODE_5_BUTTON8,
2690 JOYCODE_5_BUTTON9,
2691 JOYCODE_5_BUTTON10,
2692 JOYCODE_5_BUTTON11,
2693 JOYCODE_5_BUTTON12,
2694 JOYCODE_5_BUTTON13,
2695 JOYCODE_5_BUTTON14,
2696 JOYCODE_5_BUTTON15,
2697 JOYCODE_5_BUTTON16,
2698 JOYCODE_5_START,
2699 JOYCODE_5_SELECT,
2700 JOYCODE_6_LEFT,
2701 JOYCODE_6_RIGHT,
2702 JOYCODE_6_UP,
2703 JOYCODE_6_DOWN,
2704 JOYCODE_6_BUTTON1,
2705 JOYCODE_6_BUTTON2,
2706 JOYCODE_6_BUTTON3,
2707 JOYCODE_6_BUTTON4,
2708 JOYCODE_6_BUTTON5,
2709 JOYCODE_6_BUTTON6,
2710 JOYCODE_6_BUTTON7,
2711 JOYCODE_6_BUTTON8,
2712 JOYCODE_6_BUTTON9,
2713 JOYCODE_6_BUTTON10,
2714 JOYCODE_6_BUTTON11,
2715 JOYCODE_6_BUTTON12,
2716 JOYCODE_6_BUTTON13,
2717 JOYCODE_6_BUTTON14,
2718 JOYCODE_6_BUTTON15,
2719 JOYCODE_6_BUTTON16,
2720 JOYCODE_6_START,
2721 JOYCODE_6_SELECT,
2722 JOYCODE_7_LEFT,
2723 JOYCODE_7_RIGHT,
2724 JOYCODE_7_UP,
2725 JOYCODE_7_DOWN,
2726 JOYCODE_7_BUTTON1,
2727 JOYCODE_7_BUTTON2,
2728 JOYCODE_7_BUTTON3,
2729 JOYCODE_7_BUTTON4,
2730 JOYCODE_7_BUTTON5,
2731 JOYCODE_7_BUTTON6,
2732 JOYCODE_7_BUTTON7,
2733 JOYCODE_7_BUTTON8,
2734 JOYCODE_7_BUTTON9,
2735 JOYCODE_7_BUTTON10,
2736 JOYCODE_7_BUTTON11,
2737 JOYCODE_7_BUTTON12,
2738 JOYCODE_7_BUTTON13,
2739 JOYCODE_7_BUTTON14,
2740 JOYCODE_7_BUTTON15,
2741 JOYCODE_7_BUTTON16,
2742 JOYCODE_7_START,
2743 JOYCODE_7_SELECT,
2744 JOYCODE_8_LEFT,
2745 JOYCODE_8_RIGHT,
2746 JOYCODE_8_UP,
2747 JOYCODE_8_DOWN,
2748 JOYCODE_8_BUTTON1,
2749 JOYCODE_8_BUTTON2,
2750 JOYCODE_8_BUTTON3,
2751 JOYCODE_8_BUTTON4,
2752 JOYCODE_8_BUTTON5,
2753 JOYCODE_8_BUTTON6,
2754 JOYCODE_8_BUTTON7,
2755 JOYCODE_8_BUTTON8,
2756 JOYCODE_8_BUTTON9,
2757 JOYCODE_8_BUTTON10,
2758 JOYCODE_8_BUTTON11,
2759 JOYCODE_8_BUTTON12,
2760 JOYCODE_8_BUTTON13,
2761 JOYCODE_8_BUTTON14,
2762 JOYCODE_8_BUTTON15,
2763 JOYCODE_8_BUTTON16,
2764 JOYCODE_8_START,
2765 JOYCODE_8_SELECT,
2766
2767
2768 MOUSECODE_1_BUTTON1,
2769 MOUSECODE_1_BUTTON2,
2770 MOUSECODE_1_BUTTON3,
2771 MOUSECODE_1_BUTTON4,
2772 MOUSECODE_1_BUTTON5,
2773 MOUSECODE_1_BUTTON6,
2774 MOUSECODE_2_BUTTON1,
2775 MOUSECODE_2_BUTTON2,
2776 MOUSECODE_2_BUTTON3,
2777 MOUSECODE_2_BUTTON4,
2778 MOUSECODE_2_BUTTON5,
2779 MOUSECODE_2_BUTTON6,
2780 MOUSECODE_3_BUTTON1,
2781 MOUSECODE_3_BUTTON2,
2782 MOUSECODE_3_BUTTON3,
2783 MOUSECODE_3_BUTTON4,
2784 MOUSECODE_3_BUTTON5,
2785 MOUSECODE_3_BUTTON6,
2786 MOUSECODE_4_BUTTON1,
2787 MOUSECODE_4_BUTTON2,
2788 MOUSECODE_4_BUTTON3,
2789 MOUSECODE_4_BUTTON4,
2790 MOUSECODE_4_BUTTON5,
2791 MOUSECODE_4_BUTTON6,
2792 MOUSECODE_5_BUTTON1,
2793 MOUSECODE_5_BUTTON2,
2794 MOUSECODE_5_BUTTON3,
2795 MOUSECODE_5_BUTTON4,
2796 MOUSECODE_5_BUTTON5,
2797 MOUSECODE_5_BUTTON6,
2798 MOUSECODE_6_BUTTON1,
2799 MOUSECODE_6_BUTTON2,
2800 MOUSECODE_6_BUTTON3,
2801 MOUSECODE_6_BUTTON4,
2802 MOUSECODE_6_BUTTON5,
2803 MOUSECODE_6_BUTTON6,
2804 MOUSECODE_7_BUTTON1,
2805 MOUSECODE_7_BUTTON2,
2806 MOUSECODE_7_BUTTON3,
2807 MOUSECODE_7_BUTTON4,
2808 MOUSECODE_7_BUTTON5,
2809 MOUSECODE_7_BUTTON6,
2810 MOUSECODE_8_BUTTON1,
2811 MOUSECODE_8_BUTTON2,
2812 MOUSECODE_8_BUTTON3,
2813 MOUSECODE_8_BUTTON4,
2814 MOUSECODE_8_BUTTON5,
2815 MOUSECODE_8_BUTTON6,
2816
2817
2818
2819 JOYCODE_1_ANALOG_X,
2820 JOYCODE_1_ANALOG_Y,
2821 JOYCODE_1_ANALOG_Z,
2822 JOYCODE_1_ANALOG_PEDAL1,
2823 JOYCODE_1_ANALOG_PEDAL2,
2824 JOYCODE_1_ANALOG_PEDAL3,
2825 JOYCODE_2_ANALOG_X,
2826 JOYCODE_2_ANALOG_Y,
2827 JOYCODE_2_ANALOG_Z,
2828 JOYCODE_2_ANALOG_PEDAL1,
2829 JOYCODE_2_ANALOG_PEDAL2,
2830 JOYCODE_2_ANALOG_PEDAL3,
2831 JOYCODE_3_ANALOG_X,
2832 JOYCODE_3_ANALOG_Y,
2833 JOYCODE_3_ANALOG_Z,
2834 JOYCODE_3_ANALOG_PEDAL1,
2835 JOYCODE_3_ANALOG_PEDAL2,
2836 JOYCODE_3_ANALOG_PEDAL3,
2837 JOYCODE_4_ANALOG_X,
2838 JOYCODE_4_ANALOG_Y,
2839 JOYCODE_4_ANALOG_Z,
2840 JOYCODE_4_ANALOG_PEDAL1,
2841 JOYCODE_4_ANALOG_PEDAL2,
2842 JOYCODE_4_ANALOG_PEDAL3,
2843 JOYCODE_5_ANALOG_X,
2844 JOYCODE_5_ANALOG_Y,
2845 JOYCODE_5_ANALOG_Z,
2846 JOYCODE_5_ANALOG_PEDAL1,
2847 JOYCODE_5_ANALOG_PEDAL2,
2848 JOYCODE_5_ANALOG_PEDAL3,
2849 JOYCODE_6_ANALOG_X,
2850 JOYCODE_6_ANALOG_Y,
2851 JOYCODE_6_ANALOG_Z,
2852 JOYCODE_6_ANALOG_PEDAL1,
2853 JOYCODE_6_ANALOG_PEDAL2,
2854 JOYCODE_6_ANALOG_PEDAL3,
2855 JOYCODE_7_ANALOG_X,
2856 JOYCODE_7_ANALOG_Y,
2857 JOYCODE_7_ANALOG_Z,
2858 JOYCODE_7_ANALOG_PEDAL1,
2859 JOYCODE_7_ANALOG_PEDAL2,
2860 JOYCODE_7_ANALOG_PEDAL3,
2861 JOYCODE_8_ANALOG_X,
2862 JOYCODE_8_ANALOG_Y,
2863 JOYCODE_8_ANALOG_Z,
2864 JOYCODE_8_ANALOG_PEDAL1,
2865 JOYCODE_8_ANALOG_PEDAL2,
2866 JOYCODE_8_ANALOG_PEDAL3,
2867 GUNCODE_1_ANALOG_X,
2868 GUNCODE_1_ANALOG_Y,
2869 GUNCODE_2_ANALOG_X,
2870 GUNCODE_2_ANALOG_Y,
2871 GUNCODE_3_ANALOG_X,
2872 GUNCODE_3_ANALOG_Y,
2873 GUNCODE_4_ANALOG_X,
2874 GUNCODE_4_ANALOG_Y,
2875 GUNCODE_5_ANALOG_X,
2876 GUNCODE_5_ANALOG_Y,
2877 GUNCODE_6_ANALOG_X,
2878 GUNCODE_6_ANALOG_Y,
2879 GUNCODE_7_ANALOG_X,
2880 GUNCODE_7_ANALOG_Y,
2881 GUNCODE_8_ANALOG_X,
2882 GUNCODE_8_ANALOG_Y,
2883
2884
2885 MOUSECODE_1_ANALOG_X,
2886 MOUSECODE_1_ANALOG_Y,
2887 MOUSECODE_1_ANALOG_Z,
2888 MOUSECODE_2_ANALOG_X,
2889 MOUSECODE_2_ANALOG_Y,
2890 MOUSECODE_2_ANALOG_Z,
2891 MOUSECODE_3_ANALOG_X,
2892 MOUSECODE_3_ANALOG_Y,
2893 MOUSECODE_3_ANALOG_Z,
2894 MOUSECODE_4_ANALOG_X,
2895 MOUSECODE_4_ANALOG_Y,
2896 MOUSECODE_4_ANALOG_Z,
2897 MOUSECODE_5_ANALOG_X,
2898 MOUSECODE_5_ANALOG_Y,
2899 MOUSECODE_5_ANALOG_Z,
2900 MOUSECODE_6_ANALOG_X,
2901 MOUSECODE_6_ANALOG_Y,
2902 MOUSECODE_6_ANALOG_Z,
2903 MOUSECODE_7_ANALOG_X,
2904 MOUSECODE_7_ANALOG_Y,
2905 MOUSECODE_7_ANALOG_Z,
2906 MOUSECODE_8_ANALOG_X,
2907 MOUSECODE_8_ANALOG_Y,
2908 MOUSECODE_8_ANALOG_Z,
2909
2910
2911 __code_max,
2912
2913
2914 CODE_NONE = 0x8000,
2915 CODE_OTHER_DIGITAL,
2916 CODE_OTHER_ANALOG_ABSOLUTE,
2917 CODE_OTHER_ANALOG_RELATIVE,
2918 CODE_DEFAULT,
2919 CODE_NOT,
2920 CODE_OR
2921 };
2922 # 496 "src/input.h"
2923 typedef UINT32 input_code;
2924 typedef UINT32 os_code;
2925
2926
2927 struct _input_seq
2928 {
2929 input_code code[16];
2930 };
2931 typedef struct _input_seq input_seq;
2932
2933
2934 struct _os_code_info
2935 {
2936 char * name;
2937 os_code oscode;
2938 input_code inputcode;
2939 };
2940 typedef struct _os_code_info os_code_info;
2941 # 541 "src/input.h"
2942 int code_init(void);
2943 void code_exit(void);
2944
2945 INT32 code_analog_value(input_code code);
2946 int code_pressed(input_code code);
2947 int code_pressed_memory(input_code code);
2948 int code_pressed_memory_repeat(input_code code, int speed);
2949 input_code code_read_async(void);
2950
2951 int code_analog_type(input_code code);
2952 const char *code_name(input_code code);
2953 input_code token_to_code(const char *token);
2954 void code_to_token(input_code code, char *token);
2955
2956
2957 void seq_set_0(input_seq *seq);
2958 void seq_set_1(input_seq *seq, input_code code);
2959 void seq_set_2(input_seq *seq, input_code code1, input_code code2);
2960 void seq_set_3(input_seq *seq, input_code code1, input_code code2, input_code code3);
2961 void seq_set_4(input_seq *seq, input_code code1, input_code code2, input_code code3, input_code code4);
2962 void seq_set_5(input_seq *seq, input_code code1, input_code code2, input_code code3, input_code code4, input_code code5);
2963 void seq_copy(input_seq *seqdst, const input_seq *seqsrc);
2964 int seq_cmp(const input_seq *seqa, const input_seq *seqb);
2965 void seq_name(const input_seq *seq, char *buffer, unsigned max);
2966 int seq_pressed(const input_seq *seq);
2967 INT32 seq_analog_value(const input_seq *seq, int *analogtype);
2968 void seq_read_async_start(int analog);
2969 int seq_read_async(input_seq *seq, int first);
2970 int string_to_seq(const char *string, input_seq *seq);
2971 void seq_to_string(const input_seq *seq, char *string, int maxlen);
2972
2973 static __inline__ input_code seq_get_1(const input_seq *seq) { return seq->code[0]; }
2974 # 19 "src/inptport.h" 2
2975 # 41 "src/inptport.h"
2976 enum
2977 {
2978 SEQ_TYPE_STANDARD = 0,
2979 SEQ_TYPE_INCREMENT = 1,
2980 SEQ_TYPE_DECREMENT = 2
2981 };
2982
2983
2984
2985 enum
2986 {
2987 PORTCOND_ALWAYS = 0,
2988 PORTCOND_EQUALS,
2989 PORTCOND_NOTEQUALS
2990 };
2991
2992
2993
2994 enum
2995 {
2996 IPG_UI = 0,
2997 IPG_PLAYER1,
2998 IPG_PLAYER2,
2999 IPG_PLAYER3,
3000 IPG_PLAYER4,
3001 IPG_PLAYER5,
3002 IPG_PLAYER6,
3003 IPG_PLAYER7,
3004 IPG_PLAYER8,
3005 IPG_OTHER,
3006 IPG_TOTAL_GROUPS,
3007 IPG_INVALID
3008 };
3009
3010
3011
3012 enum
3013 {
3014
3015 IPT_INVALID = 0,
3016 IPT_UNUSED,
3017 IPT_END,
3018 IPT_UNKNOWN,
3019 IPT_PORT,
3020 IPT_DIPSWITCH_NAME,
3021 IPT_DIPSWITCH_SETTING,
3022 IPT_VBLANK,
3023 IPT_KEYBOARD,
3024 IPT_CONFIG_NAME,
3025 IPT_CONFIG_SETTING,
3026 IPT_START,
3027 IPT_SELECT,
3028 IPT_CATEGORY_NAME,
3029 IPT_CATEGORY_SETTING,
3030
3031
3032
3033 IPT_JOYSTICK_UP,
3034 IPT_JOYSTICK_DOWN,
3035 IPT_JOYSTICK_LEFT,
3036 IPT_JOYSTICK_RIGHT,
3037
3038
3039 IPT_JOYSTICKRIGHT_UP,
3040 IPT_JOYSTICKRIGHT_DOWN,
3041 IPT_JOYSTICKRIGHT_LEFT,
3042 IPT_JOYSTICKRIGHT_RIGHT,
3043 IPT_JOYSTICKLEFT_UP,
3044 IPT_JOYSTICKLEFT_DOWN,
3045 IPT_JOYSTICKLEFT_LEFT,
3046 IPT_JOYSTICKLEFT_RIGHT,
3047
3048
3049
3050 IPT_BUTTON1,
3051 IPT_BUTTON2,
3052 IPT_BUTTON3,
3053 IPT_BUTTON4,
3054 IPT_BUTTON5,
3055 IPT_BUTTON6,
3056 IPT_BUTTON7,
3057 IPT_BUTTON8,
3058 IPT_BUTTON9,
3059 IPT_BUTTON10,
3060
3061
3062 IPT_START1,
3063 IPT_START2,
3064 IPT_START3,
3065 IPT_START4,
3066 IPT_START5,
3067 IPT_START6,
3068 IPT_START7,
3069 IPT_START8,
3070
3071
3072 IPT_COIN1,
3073 IPT_COIN2,
3074 IPT_COIN3,
3075 IPT_COIN4,
3076 IPT_COIN5,
3077 IPT_COIN6,
3078 IPT_COIN7,
3079 IPT_COIN8,
3080 IPT_BILL1,
3081
3082
3083 IPT_SERVICE1,
3084 IPT_SERVICE2,
3085 IPT_SERVICE3,
3086 IPT_SERVICE4,
3087
3088
3089 IPT_SERVICE,
3090 IPT_TILT,
3091 IPT_INTERLOCK,
3092 IPT_VOLUME_UP,
3093 IPT_VOLUME_DOWN,
3094
3095
3096 IPT_MAHJONG_A,
3097 IPT_MAHJONG_B,
3098 IPT_MAHJONG_C,
3099 IPT_MAHJONG_D,
3100 IPT_MAHJONG_E,
3101 IPT_MAHJONG_F,
3102 IPT_MAHJONG_G,
3103 IPT_MAHJONG_H,
3104 IPT_MAHJONG_I,
3105 IPT_MAHJONG_J,
3106 IPT_MAHJONG_K,
3107 IPT_MAHJONG_L,
3108 IPT_MAHJONG_M,
3109 IPT_MAHJONG_N,
3110 IPT_MAHJONG_O,
3111 IPT_MAHJONG_P,
3112 IPT_MAHJONG_Q,
3113 IPT_MAHJONG_KAN,
3114 IPT_MAHJONG_PON,
3115 IPT_MAHJONG_CHI,
3116 IPT_MAHJONG_REACH,
3117 IPT_MAHJONG_RON,
3118 IPT_MAHJONG_BET,
3119 IPT_MAHJONG_LAST_CHANCE,
3120 IPT_MAHJONG_SCORE,
3121 IPT_MAHJONG_DOUBLE_UP,
3122 IPT_MAHJONG_FLIP_FLOP,
3123 IPT_MAHJONG_BIG,
3124 IPT_MAHJONG_SMALL,
3125
3126
3127
3128 IPT_PADDLE,
3129 IPT_PADDLE_V,
3130 IPT_AD_STICK_X,
3131 IPT_AD_STICK_Y,
3132 IPT_AD_STICK_Z,
3133 IPT_LIGHTGUN_X,
3134 IPT_LIGHTGUN_Y,
3135 IPT_PEDAL,
3136 IPT_PEDAL2,
3137 IPT_PEDAL3,
3138 IPT_DIAL,
3139 IPT_DIAL_V,
3140 IPT_TRACKBALL_X,
3141 IPT_TRACKBALL_Y,
3142 IPT_MOUSE_X,
3143 IPT_MOUSE_Y,
3144
3145
3146
3147 IPT_ADJUSTER,
3148
3149
3150 IPT_UI_CONFIGURE,
3151 IPT_UI_ON_SCREEN_DISPLAY,
3152 IPT_UI_DEBUG_BREAK,
3153 IPT_UI_PAUSE,
3154 IPT_UI_RESET_MACHINE,
3155 IPT_UI_SHOW_GFX,
3156 IPT_UI_FRAMESKIP_DEC,
3157 IPT_UI_FRAMESKIP_INC,
3158 IPT_UI_THROTTLE,
3159 IPT_UI_SHOW_FPS,
3160 IPT_UI_SNAPSHOT,
3161 IPT_UI_RECORD_MOVIE,
3162 IPT_UI_TOGGLE_CHEAT,
3163 IPT_UI_UP,
3164 IPT_UI_DOWN,
3165 IPT_UI_LEFT,
3166 IPT_UI_RIGHT,
3167 IPT_UI_HOME,
3168 IPT_UI_END,
3169 IPT_UI_SELECT,
3170 IPT_UI_CANCEL,
3171 IPT_UI_CLEAR,
3172 IPT_UI_PAN_UP,
3173 IPT_UI_PAN_DOWN,
3174 IPT_UI_PAN_LEFT,
3175 IPT_UI_PAN_RIGHT,
3176 IPT_UI_SHOW_PROFILER,
3177 IPT_UI_TOGGLE_UI,
3178 IPT_UI_TOGGLE_DEBUG,
3179 IPT_UI_SAVE_STATE,
3180 IPT_UI_LOAD_STATE,
3181 IPT_UI_ADD_CHEAT,
3182 IPT_UI_DELETE_CHEAT,
3183 IPT_UI_SAVE_CHEAT,
3184 IPT_UI_WATCH_VALUE,
3185 IPT_UI_EDIT_CHEAT,
3186 IPT_UI_TOGGLE_CROSSHAIR,
3187
3188
3189 IPT_OSD_1,
3190 IPT_OSD_2,
3191 IPT_OSD_3,
3192 IPT_OSD_4,
3193 IPT_OSD_5,
3194 IPT_OSD_6,
3195 IPT_OSD_7,
3196 IPT_OSD_8,
3197 IPT_OSD_9,
3198 IPT_OSD_10,
3199 IPT_OSD_11,
3200 IPT_OSD_12,
3201 IPT_OSD_13,
3202 IPT_OSD_14,
3203 IPT_OSD_15,
3204 IPT_OSD_16,
3205
3206
3207 IPT_OTHER,
3208
3209
3210 IPT_SPECIAL,
3211
3212 __ipt_max
3213 };
3214
3215
3216
3217 enum
3218 {
3219 STR_Off = 0,
3220 STR_On,
3221 STR_No,
3222 STR_Yes,
3223 STR_Lives,
3224 STR_Bonus_Life,
3225 STR_Difficulty,
3226 STR_Demo_Sounds,
3227 STR_Coinage,
3228 STR_Coin_A,
3229 STR_Coin_B,
3230 STR_9C_1C,
3231 STR_8C_1C,
3232 STR_7C_1C,
3233 STR_6C_1C,
3234 STR_5C_1C,
3235 STR_4C_1C,
3236 STR_3C_1C,
3237 STR_8C_3C,
3238 STR_4C_2C,
3239 STR_2C_1C,
3240 STR_5C_3C,
3241 STR_3C_2C,
3242 STR_4C_3C,
3243 STR_4C_4C,
3244 STR_3C_3C,
3245 STR_2C_2C,
3246 STR_1C_1C,
3247 STR_4C_5C,
3248 STR_3C_4C,
3249 STR_2C_3C,
3250 STR_4C_7C,
3251 STR_2C_4C,
3252 STR_1C_2C,
3253 STR_2C_5C,
3254 STR_2C_6C,
3255 STR_1C_3C,
3256 STR_2C_7C,
3257 STR_2C_8C,
3258 STR_1C_4C,
3259 STR_1C_5C,
3260 STR_1C_6C,
3261 STR_1C_7C,
3262 STR_1C_8C,
3263 STR_1C_9C,
3264 STR_Free_Play,
3265 STR_Cabinet,
3266 STR_Upright,
3267 STR_Cocktail,
3268 STR_Flip_Screen,
3269 STR_Service_Mode,
3270 STR_Pause,
3271 STR_Test,
3272 STR_Tilt,
3273 STR_Version,
3274 STR_Region,
3275 STR_International,
3276 STR_Japan,
3277 STR_USA,
3278 STR_Europe,
3279 STR_Asia,
3280 STR_World,
3281 STR_Hispanic,
3282 STR_Language,
3283 STR_English,
3284 STR_Japanese,
3285 STR_German,
3286 STR_French,
3287 STR_Italian,
3288 STR_Spanish,
3289 STR_Very_Easy,
3290 STR_Easiest,
3291 STR_Easier,
3292 STR_Easy,
3293 STR_Normal,
3294 STR_Medium,
3295 STR_Hard,
3296 STR_Harder,
3297 STR_Hardest,
3298 STR_Very_Hard,
3299 STR_Very_Low,
3300 STR_Low,
3301 STR_High,
3302 STR_Higher,
3303 STR_Highest,
3304 STR_Very_High,
3305 STR_Players,
3306 STR_Controls,
3307 STR_Dual,
3308 STR_Single,
3309 STR_Game_Time,
3310 STR_Continue_Price,
3311 STR_Controller,
3312 STR_Light_Gun,
3313 STR_Joystick,
3314 STR_Trackball,
3315 STR_Continues,
3316 STR_Allow_Continue,
3317 STR_Level_Select,
3318 STR_Infinite,
3319 STR_Stereo,
3320 STR_Mono,
3321 STR_Unused,
3322 STR_Unknown,
3323 STR_Standard,
3324 STR_Reverse,
3325 STR_Alternate,
3326 STR_None,
3327 STR_TOTAL
3328 };
3329 # 404 "src/inptport.h"
3330 typedef struct _input_port_init_params input_port_init_params;
3331
3332
3333 struct _input_port_default_entry
3334 {
3335 UINT32 type;
3336 UINT8 group;
3337 UINT8 player;
3338 const char *token;
3339 const char *name;
3340 input_seq defaultseq;
3341 input_seq defaultincseq;
3342 input_seq defaultdecseq;
3343 };
3344 typedef struct _input_port_default_entry input_port_default_entry;
3345
3346
3347 struct _input_port_entry
3348 {
3349 UINT32 mask;
3350 UINT32 default_value;
3351
3352 UINT32 type;
3353 UINT8 unused;
3354
3355
3356
3357 UINT8 cocktail;
3358 UINT8 player;
3359
3360 UINT8 toggle;
3361
3362
3363 UINT8 impulse;
3364
3365
3366
3367
3368
3369
3370 UINT8 four_way;
3371
3372
3373
3374
3375 const char *name;
3376 input_seq seq;
3377 UINT16 category;
3378
3379
3380 struct
3381 {
3382 INT32 min;
3383 INT32 max;
3384 INT32 sensitivity;
3385 INT32 delta;
3386 INT32 centerdelta;
3387 UINT8 reverse;
3388 UINT8 reset;
3389 input_seq incseq;
3390 input_seq decseq;
3391 } analog;
3392
3393
3394 struct
3395 {
3396 const char *tag;
3397 } start;
3398
3399
3400 struct
3401 {
3402 const char *tag;
3403 UINT8 portnum;
3404 UINT8 condition;
3405 UINT32 mask;
3406 UINT32 value;
3407 } condition;
3408 # 490 "src/inptport.h"
3409 };
3410 typedef struct _input_port_entry input_port_entry;
3411 # 656 "src/inptport.h"
3412 extern const char *input_port_default_strings[];
3413 # 668 "src/inptport.h"
3414 int input_port_init(void (*construct_ipt)(input_port_init_params *));
3415
3416 void input_port_load(int config_type, xml_data_node *parentnode);
3417 void input_port_save(int config_type, xml_data_node *parentnode);
3418
3419 input_port_entry *input_port_initialize(input_port_init_params *params, UINT32 type, const char *tag, UINT32 mask);
3420 input_port_entry *input_port_allocate(void (*construct_ipt)(input_port_init_params *), input_port_entry *memory);
3421
3422 input_port_default_entry *get_input_port_list(void);
3423 const input_port_default_entry *get_input_port_list_defaults(void);
3424
3425 int input_port_active(const input_port_entry *in);
3426 int port_type_is_analog(int type);
3427 int port_type_in_use(int type);
3428 int port_type_to_group(int type, int player);
3429 int port_tag_to_index(const char *tag);
3430 read8_handler port_tag_to_handler8(const char *tag);
3431 read16_handler port_tag_to_handler16(const char *tag);
3432 read32_handler port_tag_to_handler32(const char *tag);
3433 const char *input_port_name(const input_port_entry *in);
3434 input_seq *input_port_seq(input_port_entry *in, int seqtype);
3435 input_seq *input_port_default_seq(int type, int player, int seqtype);
3436 int input_port_condition(const input_port_entry *in);
3437
3438 const char *port_type_to_token(int type, int player);
3439 int token_to_port_type(const char *string, int *player);
3440
3441 int input_port_type_pressed(int type, int player);
3442 int input_ui_pressed(int code);
3443 int input_ui_pressed_repeat(int code, int speed);
3444
3445 void input_port_update_defaults(void);
3446 void input_port_vblank_start(void);
3447 void input_port_vblank_end(void);
3448
3449 void input_port_set_digital_value(int port, UINT32 value, UINT32 mask);
3450
3451 UINT32 readinputport(int port);
3452 UINT32 readinputportbytag(const char *tag);
3453 UINT32 readinputportbytag_safe(const char *tag, UINT32 defvalue);
3454
3455 UINT8 input_port_0_r(__attribute__((__unused__)) offs_t offset);
3456 UINT8 input_port_1_r(__attribute__((__unused__)) offs_t offset);
3457 UINT8 input_port_2_r(__attribute__((__unused__)) offs_t offset);
3458 UINT8 input_port_3_r(__attribute__((__unused__)) offs_t offset);
3459 UINT8 input_port_4_r(__attribute__((__unused__)) offs_t offset);
3460 UINT8 input_port_5_r(__attribute__((__unused__)) offs_t offset);
3461 UINT8 input_port_6_r(__attribute__((__unused__)) offs_t offset);
3462 UINT8 input_port_7_r(__attribute__((__unused__)) offs_t offset);
3463 UINT8 input_port_8_r(__attribute__((__unused__)) offs_t offset);
3464 UINT8 input_port_9_r(__attribute__((__unused__)) offs_t offset);
3465 UINT8 input_port_10_r(__attribute__((__unused__)) offs_t offset);
3466 UINT8 input_port_11_r(__attribute__((__unused__)) offs_t offset);
3467 UINT8 input_port_12_r(__attribute__((__unused__)) offs_t offset);
3468 UINT8 input_port_13_r(__attribute__((__unused__)) offs_t offset);
3469 UINT8 input_port_14_r(__attribute__((__unused__)) offs_t offset);
3470 UINT8 input_port_15_r(__attribute__((__unused__)) offs_t offset);
3471 UINT8 input_port_16_r(__attribute__((__unused__)) offs_t offset);
3472 UINT8 input_port_17_r(__attribute__((__unused__)) offs_t offset);
3473 UINT8 input_port_18_r(__attribute__((__unused__)) offs_t offset);
3474 UINT8 input_port_19_r(__attribute__((__unused__)) offs_t offset);
3475 UINT8 input_port_20_r(__attribute__((__unused__)) offs_t offset);
3476 UINT8 input_port_21_r(__attribute__((__unused__)) offs_t offset);
3477 UINT8 input_port_22_r(__attribute__((__unused__)) offs_t offset);
3478 UINT8 input_port_23_r(__attribute__((__unused__)) offs_t offset);
3479 UINT8 input_port_24_r(__attribute__((__unused__)) offs_t offset);
3480 UINT8 input_port_25_r(__attribute__((__unused__)) offs_t offset);
3481 UINT8 input_port_26_r(__attribute__((__unused__)) offs_t offset);
3482 UINT8 input_port_27_r(__attribute__((__unused__)) offs_t offset);
3483 UINT8 input_port_28_r(__attribute__((__unused__)) offs_t offset);
3484 UINT8 input_port_29_r(__attribute__((__unused__)) offs_t offset);
3485
3486 UINT16 input_port_0_word_r(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT16 mem_mask);
3487 UINT16 input_port_1_word_r(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT16 mem_mask);
3488 UINT16 input_port_2_word_r(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT16 mem_mask);
3489 UINT16 input_port_3_word_r(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT16 mem_mask);
3490 UINT16 input_port_4_word_r(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT16 mem_mask);
3491 UINT16 input_port_5_word_r(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT16 mem_mask);
3492 UINT16 input_port_6_word_r(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT16 mem_mask);
3493 UINT16 input_port_7_word_r(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT16 mem_mask);
3494 UINT16 input_port_8_word_r(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT16 mem_mask);
3495 UINT16 input_port_9_word_r(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT16 mem_mask);
3496 UINT16 input_port_10_word_r(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT16 mem_mask);
3497 UINT16 input_port_11_word_r(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT16 mem_mask);
3498 UINT16 input_port_12_word_r(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT16 mem_mask);
3499 UINT16 input_port_13_word_r(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT16 mem_mask);
3500 UINT16 input_port_14_word_r(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT16 mem_mask);
3501 UINT16 input_port_15_word_r(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT16 mem_mask);
3502 UINT16 input_port_16_word_r(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT16 mem_mask);
3503 UINT16 input_port_17_word_r(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT16 mem_mask);
3504 UINT16 input_port_18_word_r(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT16 mem_mask);
3505 UINT16 input_port_19_word_r(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT16 mem_mask);
3506 UINT16 input_port_20_word_r(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT16 mem_mask);
3507 UINT16 input_port_21_word_r(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT16 mem_mask);
3508 UINT16 input_port_22_word_r(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT16 mem_mask);
3509 UINT16 input_port_23_word_r(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT16 mem_mask);
3510 UINT16 input_port_24_word_r(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT16 mem_mask);
3511 UINT16 input_port_25_word_r(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT16 mem_mask);
3512 UINT16 input_port_26_word_r(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT16 mem_mask);
3513 UINT16 input_port_27_word_r(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT16 mem_mask);
3514 UINT16 input_port_28_word_r(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT16 mem_mask);
3515 UINT16 input_port_29_word_r(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT16 mem_mask);
3516
3517 UINT32 input_port_0_dword_r(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT32 mem_mask);
3518 UINT32 input_port_1_dword_r(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT32 mem_mask);
3519 UINT32 input_port_2_dword_r(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT32 mem_mask);
3520 UINT32 input_port_3_dword_r(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT32 mem_mask);
3521 UINT32 input_port_4_dword_r(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT32 mem_mask);
3522 UINT32 input_port_5_dword_r(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT32 mem_mask);
3523 UINT32 input_port_6_dword_r(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT32 mem_mask);
3524 UINT32 input_port_7_dword_r(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT32 mem_mask);
3525 UINT32 input_port_8_dword_r(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT32 mem_mask);
3526 UINT32 input_port_9_dword_r(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT32 mem_mask);
3527 UINT32 input_port_10_dword_r(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT32 mem_mask);
3528 UINT32 input_port_11_dword_r(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT32 mem_mask);
3529 UINT32 input_port_12_dword_r(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT32 mem_mask);
3530 UINT32 input_port_13_dword_r(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT32 mem_mask);
3531 UINT32 input_port_14_dword_r(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT32 mem_mask);
3532 UINT32 input_port_15_dword_r(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT32 mem_mask);
3533 UINT32 input_port_16_dword_r(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT32 mem_mask);
3534 UINT32 input_port_17_dword_r(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT32 mem_mask);
3535 UINT32 input_port_18_dword_r(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT32 mem_mask);
3536 UINT32 input_port_19_dword_r(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT32 mem_mask);
3537 UINT32 input_port_20_dword_r(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT32 mem_mask);
3538 UINT32 input_port_21_dword_r(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT32 mem_mask);
3539 UINT32 input_port_22_dword_r(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT32 mem_mask);
3540 UINT32 input_port_23_dword_r(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT32 mem_mask);
3541 UINT32 input_port_24_dword_r(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT32 mem_mask);
3542 UINT32 input_port_25_dword_r(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT32 mem_mask);
3543 UINT32 input_port_26_dword_r(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT32 mem_mask);
3544 UINT32 input_port_27_dword_r(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT32 mem_mask);
3545 UINT32 input_port_28_dword_r(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT32 mem_mask);
3546 UINT32 input_port_29_dword_r(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT32 mem_mask);
3547 # 19 "src/osdepend.h" 2
3548
3549 int osd_init(void);
3550 void osd_exit(void);
3551 # 35 "src/osdepend.h"
3552 struct _osd_create_params
3553 {
3554 int width, height;
3555 int aspect_x, aspect_y;
3556 int depth;
3557 int colors;
3558 float fps;
3559 int video_attributes;
3560 };
3561 typedef struct _osd_create_params osd_create_params;
3562 # 72 "src/osdepend.h"
3563 int osd_create_display(const osd_create_params *params, UINT32 *rgb_components);
3564 void osd_close_display(void);
3565 # 86 "src/osdepend.h"
3566 int osd_skip_this_frame(void);
3567 # 102 "src/osdepend.h"
3568 void osd_update_video_and_audio(struct _mame_display *display);
3569
3570
3571
3572
3573
3574
3575
3576 mame_bitmap *osd_override_snapshot(mame_bitmap *bitmap, rectangle *bounds);
3577
3578
3579
3580
3581
3582
3583 const char *osd_get_fps_text(const performance_info *performance);
3584 # 147 "src/osdepend.h"
3585 int osd_start_audio_stream(int stereo);
3586 int osd_update_audio_stream(INT16 *buffer);
3587 void osd_stop_audio_stream(void);
3588 # 158 "src/osdepend.h"
3589 void osd_set_mastervolume(int attenuation);
3590 int osd_get_mastervolume(void);
3591
3592 void osd_sound_enable(int enable);
3593 # 174 "src/osdepend.h"
3594 const os_code_info *osd_get_code_list(void);
3595
3596
3597
3598
3599
3600
3601 INT32 osd_get_code_value(os_code oscode);
3602 # 192 "src/osdepend.h"
3603 int osd_readkey_unicode(int flush);
3604 # 203 "src/osdepend.h"
3605 void osd_customize_inputport_list(input_port_default_entry *defaults);
3606
3607
3608
3609
3610 int osd_joystick_needs_calibration(void);
3611
3612 void osd_joystick_start_calibration(void);
3613
3614
3615 const char *osd_joystick_calibrate_next(void);
3616
3617 void osd_joystick_calibrate(void);
3618
3619 void osd_joystick_end_calibration(void);
3620 # 228 "src/osdepend.h"
3621 struct _inp_header
3622 {
3623 char name[9];
3624 char version[3];
3625 char reserved[20];
3626 };
3627 typedef struct _inp_header inp_header;
3628
3629
3630
3631 enum
3632 {
3633 PATH_NOT_FOUND,
3634 PATH_IS_FILE,
3635 PATH_IS_DIRECTORY
3636 };
3637
3638
3639 typedef enum
3640 {
3641 FILEERR_SUCCESS,
3642 FILEERR_FAILURE,
3643 FILEERR_OUT_OF_MEMORY,
3644 FILEERR_NOT_FOUND,
3645 FILEERR_ACCESS_DENIED,
3646 FILEERR_ALREADY_OPEN,
3647 FILEERR_TOO_MANY_FILES
3648 } osd_file_error;
3649
3650
3651
3652 int osd_get_path_count(int pathtype);
3653
3654
3655 int osd_get_path_info(int pathtype, int pathindex, const char *filename);
3656
3657
3658 osd_file *osd_fopen(int pathtype, int pathindex, const char *filename, const char *mode, osd_file_error *error);
3659
3660
3661 int osd_fseek(osd_file *file, INT64 offset, int whence);
3662
3663
3664 UINT64 osd_ftell(osd_file *file);
3665
3666
3667 int osd_feof(osd_file *file);
3668
3669
3670 UINT32 osd_fread(osd_file *file, void *buffer, UINT32 length);
3671
3672
3673 UINT32 osd_fwrite(osd_file *file, const void *buffer, UINT32 length);
3674
3675
3676 void osd_fclose(osd_file *file);
3677 # 293 "src/osdepend.h"
3678 typedef INT64 cycles_t;
3679
3680
3681 cycles_t osd_cycles(void);
3682
3683
3684 cycles_t osd_cycles_per_second(void);
3685
3686
3687
3688
3689 cycles_t osd_profiling_ticks(void);
3690 # 315 "src/osdepend.h"
3691 void *osd_alloc_executable(size_t size);
3692 void osd_free_executable(void *ptr);
3693
3694
3695
3696
3697 int osd_display_loading_rom_message(const char *name,rom_load_data *romdata);
3698
3699
3700
3701
3702
3703 void osd_pause(int paused);
3704
3705
3706 int osd_is_bad_read_ptr(const void *ptr, size_t size);
3707
3708
3709 void osd_die(const char *text,...) __attribute__((format(printf, 1, 2))) __attribute__((noreturn));
3710 # 342 "src/osdepend.h"
3711 void logerror(const char *text,...) __attribute__((format(printf, 1, 2)));
3712 # 64 "src/driver.h" 2
3713
3714 # 1 "src/debug/mamedbg.h" 1
3715 # 16 "src/debug/mamedbg.h"
3716 # 1 "src/mame.h" 1
3717 # 12 "src/mame.h"
3718
3719 # 22 "src/mame.h"
3720 # 1 "src/fileio.h" 1
3721 # 12 "src/fileio.h"
3722
3723
3724
3725
3726
3727 # 1 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/lib/gcc/bfin-uclinux/3.4.6/include/stdarg.h" 1 3 4
3728 # 105 "/usr/local/src/blackfin/toolchains/20060914/out-uclinux/lib/gcc/bfin-uclinux/3.4.6/include/stdarg.h" 3 4
3729 typedef __gnuc_va_list va_list;
3730 # 18 "src/fileio.h" 2
3731
3732
3733 # 1 "src/chd.h" 1
3734 # 10 "src/chd.h"
3735
3736 # 113 "src/chd.h"
3737 enum
3738 {
3739 CHDERR_NONE,
3740 CHDERR_NO_INTERFACE,
3741 CHDERR_OUT_OF_MEMORY,
3742 CHDERR_INVALID_FILE,
3743 CHDERR_INVALID_PARAMETER,
3744 CHDERR_INVALID_DATA,
3745 CHDERR_FILE_NOT_FOUND,
3746 CHDERR_REQUIRES_PARENT,
3747 CHDERR_FILE_NOT_WRITEABLE,
3748 CHDERR_READ_ERROR,
3749 CHDERR_WRITE_ERROR,
3750 CHDERR_CODEC_ERROR,
3751 CHDERR_INVALID_PARENT,
3752 CHDERR_HUNK_OUT_OF_RANGE,
3753 CHDERR_DECOMPRESSION_ERROR,
3754 CHDERR_COMPRESSION_ERROR,
3755 CHDERR_CANT_CREATE_FILE,
3756 CHDERR_CANT_VERIFY,
3757 CHDERR_NOT_SUPPORTED,
3758 CHDERR_METADATA_NOT_FOUND,
3759 CHDERR_INVALID_METADATA_SIZE,
3760 CHDERR_UNSUPPORTED_VERSION
3761 };
3762 # 147 "src/chd.h"
3763 struct _chd_header
3764 {
3765 UINT32 length;
3766 UINT32 version;
3767 UINT32 flags;
3768 UINT32 compression;
3769 UINT32 hunkbytes;
3770 UINT32 totalhunks;
3771 UINT64 logicalbytes;
3772 UINT64 metaoffset;
3773 UINT8 md5[16];
3774 UINT8 parentmd5[16];
3775 UINT8 sha1[20];
3776 UINT8 parentsha1[20];
3777
3778 UINT32 obsolete_cylinders;
3779 UINT32 obsolete_sectors;
3780 UINT32 obsolete_heads;
3781 UINT32 obsolete_hunksize;
3782 };
3783 typedef struct _chd_header chd_header;
3784
3785
3786 typedef struct _chd_file chd_file;
3787 typedef struct _chd_exfile chd_exfile;
3788 typedef struct _chd_interface_file chd_interface_file;
3789
3790
3791 struct _chd_interface
3792 {
3793 chd_interface_file *(*open)(const char *filename, const char *mode);
3794 void (*close)(chd_interface_file *file);
3795 UINT32 (*read)(chd_interface_file *file, UINT64 offset, UINT32 count, void *buffer);
3796 UINT32 (*write)(chd_interface_file *file, UINT64 offset, UINT32 count, const void *buffer);
3797 UINT64 (*length)(chd_interface_file *file);
3798 };
3799 typedef struct _chd_interface chd_interface;
3800 # 193 "src/chd.h"
3801 void chd_set_interface(chd_interface *new_interface);
3802 void chd_save_interface(chd_interface *interface_save);
3803
3804 int chd_create(const char *filename, UINT64 logicalbytes, UINT32 hunkbytes, UINT32 compression, chd_file *parent);
3805 chd_file *chd_open(const char *filename, int writeable, chd_file *parent);
3806 void chd_close(chd_file *chd);
3807 void chd_close_all(void);
3808
3809 UINT32 chd_get_metadata(chd_file *chd, UINT32 *metatag, UINT32 metaindex, void *outputbuf, UINT32 outputlen);
3810 int chd_set_metadata(chd_file *chd, UINT32 metatag, UINT32 metaindex, const void *inputbuf, UINT32 inputlen);
3811
3812 UINT32 chd_read(chd_file *chd, UINT32 hunknum, UINT32 hunkcount, void *buffer);
3813 UINT32 chd_write(chd_file *chd, UINT32 hunknum, UINT32 hunkcount, const void *buffer);
3814
3815 int chd_get_last_error(void);
3816 const chd_header *chd_get_header(chd_file *chd);
3817 int chd_set_header(const char *filename, const chd_header *header);
3818
3819 int chd_compress(chd_file *chd, const char *rawfile, UINT32 offset, void (*progress)(const char *, ...));
3820 int chd_verify(chd_file *chd, void (*progress)(const char *, ...), UINT8 actualmd5[16], UINT8 actualsha1[20]);
3821
3822 chd_exfile *chd_start_compress_ex(chd_file *chd);
3823 int chd_compress_ex(chd_exfile *chdex, const char *rawfile, UINT64 offset, UINT32 inpsecsize, UINT32 srcperhunk, UINT32 hunks_to_read, UINT32 hunksecsize, void (*progress)(const char *, ...));
3824 int chd_end_compress_ex(chd_exfile *chdex, void (*progress)(const char *, ...));
3825 # 21 "src/fileio.h" 2
3826
3827
3828
3829 enum
3830 {
3831 FILETYPE_RAW = 0,
3832 FILETYPE_ROM,
3833 FILETYPE_IMAGE,
3834 FILETYPE_IMAGE_DIFF,
3835 FILETYPE_SAMPLE,
3836 FILETYPE_ARTWORK,
3837 FILETYPE_NVRAM,
3838 FILETYPE_HIGHSCORE,
3839 FILETYPE_HIGHSCORE_DB,
3840 FILETYPE_CONFIG,
3841 FILETYPE_INPUTLOG,
3842 FILETYPE_STATE,
3843 FILETYPE_MEMCARD,
3844 FILETYPE_SCREENSHOT,
3845 FILETYPE_MOVIE,
3846 FILETYPE_HISTORY,
3847 FILETYPE_CHEAT,
3848 FILETYPE_LANGUAGE,
3849 FILETYPE_CTRLR,
3850 FILETYPE_INI,
3851
3852
3853
3854 FILETYPE_end
3855 };
3856
3857
3858
3859
3860
3861
3862 typedef struct _mame_file mame_file;
3863
3864 extern chd_interface mame_chd_interface;
3865
3866 int mame_faccess(const char *filename, int filetype);
3867 mame_file *mame_fopen(const char *gamename, const char *filename, int filetype, int openforwrite);
3868 mame_file *mame_fopen_error(const char *gamename, const char *filename, int filetype, int openforwrite, osd_file_error *error);
3869 mame_file *mame_fopen_rom(const char *gamename, const char *filename, const char *exphash);
3870 UINT32 mame_fread(mame_file *file, void *buffer, UINT32 length);
3871 UINT32 mame_fwrite(mame_file *file, const void *buffer, UINT32 length);
3872 UINT32 mame_fread_swap(mame_file *file, void *buffer, UINT32 length);
3873 UINT32 mame_fwrite_swap(mame_file *file, const void *buffer, UINT32 length);
3874 # 80 "src/fileio.h"
3875 int mame_fseek(mame_file *file, INT64 offset, int whence);
3876 void mame_fclose(mame_file *file);
3877 int mame_fchecksum(const char *gamename, const char *filename, unsigned int *length, char *hash);
3878 UINT64 mame_fsize(mame_file *file);
3879 const char *mame_fhash(mame_file *file);
3880 int mame_fgetc(mame_file *file);
3881 int mame_ungetc(int c, mame_file *file);
3882 char *mame_fgets(char *s, int n, mame_file *file);
3883 int mame_feof(mame_file *file);
3884 UINT64 mame_ftell(mame_file *file);
3885
3886 int mame_fputs(mame_file *f, const char *s);
3887 int mame_vfprintf(mame_file *f, const char *fmt, va_list va);
3888 int mame_fprintf(mame_file *f, const char *fmt, ...) __attribute__((format(printf, 2, 3)));
3889 # 23 "src/mame.h" 2
3890 # 1 "src/drawgfx.h" 1
3891 # 12 "src/drawgfx.h"
3892
3893
3894
3895
3896
3897 # 1 "src/palette.h" 1
3898 # 73 "src/palette.h"
3899
3900 # 83 "src/palette.h"
3901 typedef UINT32 rgb_t;
3902 # 119 "src/palette.h"
3903 extern UINT32 direct_rgb_components[3];
3904 extern UINT16 *palette_shadow_table;
3905
3906 extern UINT8 *paletteram;
3907 extern UINT8 *paletteram_2;
3908 extern UINT16 *paletteram16;
3909 extern UINT16 *paletteram16_2;
3910 extern UINT32 *paletteram32;
3911
3912
3913
3914
3915
3916
3917
3918 int palette_start(void);
3919 int palette_init(void);
3920 int palette_get_total_colors_with_ui(void);
3921
3922 void palette_update_display(mame_display *display);
3923
3924 void palette_set_color(pen_t pen, UINT8 r, UINT8 g, UINT8 b);
3925 void palette_get_color(pen_t pen, UINT8 *r, UINT8 *g, UINT8 *b);
3926 void palette_set_colors(pen_t color_base, const UINT8 *colors, int color_count);
3927
3928 void palette_set_brightness(pen_t pen, double bright);
3929 void palette_set_shadow_factor(double factor);
3930 void palette_set_highlight_factor(double factor);
3931 # 167 "src/palette.h"
3932 void palette_set_shadow_mode(int mode);
3933 void palette_set_shadow_factor32(double factor);
3934 void palette_set_highlight_factor32(double factor);
3935 void palette_set_shadow_dRGB32(int mode, int dr, int dg, int db, int noclip);
3936 void palette_set_highlight_method(int method);
3937
3938 void palette_set_global_gamma(double _gamma);
3939 double palette_get_global_gamma(void);
3940
3941 void palette_set_global_brightness(double brightness);
3942 void palette_set_global_brightness_adjust(double adjustment);
3943 double palette_get_global_brightness(void);
3944
3945 pen_t get_black_pen(void);
3946 pen_t get_white_pen(void);
3947
3948
3949
3950
3951
3952 UINT8 paletteram_r(__attribute__((__unused__)) offs_t offset);
3953 UINT8 paletteram_2_r(__attribute__((__unused__)) offs_t offset);
3954 UINT16 paletteram16_word_r(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT16 mem_mask);
3955 UINT16 paletteram16_2_word_r(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT16 mem_mask);
3956 UINT32 paletteram32_r(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT32 mem_mask);
3957
3958 void paletteram_BBGGGRRR_w(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT8 data);
3959 void paletteram_RRRGGGBB_w(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT8 data);
3960 void paletteram_BBBGGGRR_w(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT8 data);
3961 void paletteram_IIBBGGRR_w(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT8 data);
3962 void paletteram_BBGGRRII_w(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT8 data);
3963
3964
3965
3966
3967
3968
3969
3970 void paletteram_xxxxBBBBGGGGRRRR_w(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT8 data);
3971 void paletteram_xxxxBBBBGGGGRRRR_swap_w(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT8 data);
3972 void paletteram_xxxxBBBBGGGGRRRR_split1_w(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT8 data);
3973 void paletteram_xxxxBBBBGGGGRRRR_split2_w(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT8 data);
3974 void paletteram16_xxxxBBBBGGGGRRRR_word_w(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT16 data, __attribute__((__unused__)) UINT16 mem_mask);
3975 void paletteram_xxxxBBBBRRRRGGGG_w(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT8 data);
3976 void paletteram_xxxxBBBBRRRRGGGG_swap_w(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT8 data);
3977 void paletteram_xxxxBBBBRRRRGGGG_split1_w(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT8 data);
3978 void paletteram_xxxxBBBBRRRRGGGG_split2_w(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT8 data);
3979 void paletteram16_xxxxBBBBRRRRGGGG_word_w(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT16 data, __attribute__((__unused__)) UINT16 mem_mask);
3980 void paletteram_xxxxRRRRBBBBGGGG_split1_w(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT8 data);
3981 void paletteram_xxxxRRRRBBBBGGGG_split2_w(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT8 data);
3982 void paletteram_xxxxRRRRGGGGBBBB_w(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT8 data);
3983 void paletteram_xxxxRRRRGGGGBBBB_swap_w(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT8 data);
3984 void paletteram16_xxxxRRRRGGGGBBBB_word_w(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT16 data, __attribute__((__unused__)) UINT16 mem_mask);
3985 void paletteram_RRRRGGGGBBBBxxxx_swap_w(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT8 data);
3986 void paletteram_RRRRGGGGBBBBxxxx_split1_w(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT8 data);
3987 void paletteram_RRRRGGGGBBBBxxxx_split2_w(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT8 data);
3988 void paletteram16_RRRRGGGGBBBBxxxx_word_w(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT16 data, __attribute__((__unused__)) UINT16 mem_mask);
3989 void paletteram_BBBBGGGGRRRRxxxx_swap_w(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT8 data);
3990 void paletteram_BBBBGGGGRRRRxxxx_split1_w(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT8 data);
3991 void paletteram_BBBBGGGGRRRRxxxx_split2_w(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT8 data);
3992 void paletteram16_BBBBGGGGRRRRxxxx_word_w(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT16 data, __attribute__((__unused__)) UINT16 mem_mask);
3993 void paletteram_xBBBBBGGGGGRRRRR_w(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT8 data);
3994 void paletteram_xBBBBBGGGGGRRRRR_swap_w(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT8 data);
3995 void paletteram_xBBBBBGGGGGRRRRR_split1_w(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT8 data);
3996 void paletteram_xBBBBBGGGGGRRRRR_split2_w(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT8 data);
3997 void paletteram16_xBBBBBGGGGGRRRRR_word_w(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT16 data, __attribute__((__unused__)) UINT16 mem_mask);
3998 void paletteram_xBBBBBRRRRRGGGGG_split1_w(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT8 data);
3999 void paletteram_xBBBBBRRRRRGGGGG_split2_w(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT8 data);
4000 void paletteram_xRRRRRGGGGGBBBBB_w(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT8 data);
4001 void paletteram16_xRRRRRGGGGGBBBBB_word_w(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT16 data, __attribute__((__unused__)) UINT16 mem_mask);
4002 void paletteram16_xGGGGGRRRRRBBBBB_word_w(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT16 data, __attribute__((__unused__)) UINT16 mem_mask);
4003 void paletteram16_xGGGGGBBBBBRRRRR_word_w(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT16 data, __attribute__((__unused__)) UINT16 mem_mask);
4004 void paletteram_RRRRRGGGGGBBBBBx_w(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT8 data);
4005 void paletteram16_RRRRRGGGGGBBBBBx_word_w(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT16 data, __attribute__((__unused__)) UINT16 mem_mask);
4006 void paletteram16_IIIIRRRRGGGGBBBB_word_w(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT16 data, __attribute__((__unused__)) UINT16 mem_mask);
4007 void paletteram16_RRRRGGGGBBBBIIII_word_w(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT16 data, __attribute__((__unused__)) UINT16 mem_mask);
4008 void paletteram16_xrgb_word_w(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT16 data, __attribute__((__unused__)) UINT16 mem_mask);
4009 void paletteram16_xbgr_word_w(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT16 data, __attribute__((__unused__)) UINT16 mem_mask);
4010 void paletteram16_RRRRGGGGBBBBRGBx_word_w(__attribute__((__unused__)) offs_t offset, __attribute__((__unused__)) UINT16 data, __attribute__((__unused__)) UINT16 mem_mask);
4011 # 254 "src/palette.h"
4012 void palette_init_black_and_white(UINT16 *colortable, const UINT8 *color_prom);
4013 void palette_init_RRRR_GGGG_BBBB(UINT16 *colortable, const UINT8 *color_prom);
4014 # 18 "src/drawgfx.h" 2
4015 # 33 "src/drawgfx.h"
4016 struct _gfx_layout
4017 {
4018 UINT16 width,height;
4019 UINT32 total;
4020 UINT16 planes;
4021 UINT32 planeoffset[8];
4022 UINT32 xoffset[256];
4023 UINT32 yoffset[256];
4024 UINT32 charincrement;
4025 };
4026 typedef struct _gfx_layout gfx_layout;
4027 # 61 "src/drawgfx.h"
4028 struct _gfx_element
4029 {
4030 UINT16 width,height;
4031
4032 UINT32 total_elements;
4033 UINT16 color_granularity;
4034
4035 UINT32 total_colors;
4036 pen_t *colortable;
4037 UINT32 *pen_usage;
4038
4039
4040
4041
4042 UINT8 *gfxdata;
4043 UINT32 line_modulo;
4044 UINT32 char_modulo;
4045 UINT32 flags;
4046 gfx_layout layout;
4047 };
4048 typedef struct _gfx_element gfx_element;
4049
4050
4051
4052
4053
4054
4055 struct _gfx_decode
4056 {
4057 int memory_region;
4058
4059 UINT32 start;
4060 const gfx_layout *gfxlayout;
4061 UINT16 color_codes_start;
4062 UINT16 total_color_codes;
4063 };
4064 typedef struct _gfx_decode gfx_decode;
4065
4066
4067 struct _alpha_cache
4068 {
4069 const UINT8 *alphas;
4070 const UINT8 *alphad;
4071 UINT8 alpha[0x101][0x100];
4072 };
4073 typedef struct _alpha_cache alpha_cache;
4074
4075 extern struct _alpha_cache drawgfx_alpha_cache;
4076
4077 enum
4078 {
4079 TRANSPARENCY_NONE,
4080 TRANSPARENCY_NONE_RAW,
4081 TRANSPARENCY_PEN,
4082 TRANSPARENCY_PEN_RAW,
4083 TRANSPARENCY_PENS,
4084 TRANSPARENCY_PENS_RAW,
4085 TRANSPARENCY_COLOR,
4086 TRANSPARENCY_PEN_TABLE,
4087 TRANSPARENCY_PEN_TABLE_RAW,
4088 TRANSPARENCY_BLEND,
4089 TRANSPARENCY_BLEND_RAW,
4090 TRANSPARENCY_ALPHAONE,
4091 TRANSPARENCY_ALPHA,
4092 TRANSPARENCY_ALPHARANGE,
4093
4094 TRANSPARENCY_MODES
4095 };
4096
4097
4098 extern UINT8 gfx_alpharange_table[256];
4099
4100
4101 extern UINT8 gfx_drawmode_table[256];
4102 enum
4103 {
4104 DRAWMODE_NONE,
4105 DRAWMODE_SOURCE,
4106 DRAWMODE_SHADOW
4107 };
4108
4109
4110
4111 extern int pdrawgfx_shadow_lowpri;
4112
4113
4114
4115
4116
4117
4118
4119 void decodechar(gfx_element *gfx,int num,const unsigned char *src,const gfx_layout *gl);
4120 gfx_element *allocgfx(const gfx_layout *gl);
4121 void decodegfx(gfx_element *gfx, const UINT8 *src, UINT32 first, UINT32 count);
4122 void set_pixel_functions(mame_bitmap *bitmap);
4123 void freegfx(gfx_element *gfx);
4124 void drawgfx(mame_bitmap *dest,const gfx_element *gfx,
4125 unsigned int code,unsigned int color,int flipx,int flipy,int sx,int sy,
4126 const rectangle *clip,int transparency,int transparent_color);
4127 void pdrawgfx(mame_bitmap *dest,const gfx_element *gfx,
4128 unsigned int code,unsigned int color,int flipx,int flipy,int sx,int sy,
4129 const rectangle *clip,int transparency,int transparent_color,
4130 UINT32 priority_mask);
4131 void mdrawgfx(mame_bitmap *dest,const gfx_element *gfx,
4132 unsigned int code,unsigned int color,int flipx,int flipy,int sx,int sy,
4133 const rectangle *clip,int transparency,int transparent_color,
4134 UINT32 priority_mask);
4135 void copybitmap(mame_bitmap *dest,mame_bitmap *src,int flipx,int flipy,int sx,int sy,
4136 const rectangle *clip,int transparency,int transparent_color);
4137 void copybitmap_remap(mame_bitmap *dest,mame_bitmap *src,int flipx,int flipy,int sx,int sy,
4138 const rectangle *clip,int transparency,int transparent_color);
4139 void copyscrollbitmap(mame_bitmap *dest,mame_bitmap *src,
4140 int rows,const int *rowscroll,int cols,const int *colscroll,
4141 const rectangle *clip,int transparency,int transparent_color);
4142 void copyscrollbitmap_remap(mame_bitmap *dest,mame_bitmap *src,
4143 int rows,const int *rowscroll,int cols,const int *colscroll,
4144 const rectangle *clip,int transparency,int transparent_color);
4145 void draw_scanline8(mame_bitmap *bitmap,int x,int y,int length,const UINT8 *src,pen_t *pens,int transparent_pen);
4146 void draw_scanline16(mame_bitmap *bitmap,int x,int y,int length,const UINT16 *src,pen_t *pens,int transparent_pen);
4147 void pdraw_scanline8(mame_bitmap *bitmap,int x,int y,int length,const UINT8 *src,pen_t *pens,int transparent_pen,int pri);
4148 void pdraw_scanline16(mame_bitmap *bitmap,int x,int y,int length,const UINT16 *src,pen_t *pens,int transparent_pen,int pri);
4149 void extract_scanline8(mame_bitmap *bitmap,int x,int y,int length,UINT8 *dst);
4150 void extract_scanline16(mame_bitmap *bitmap,int x,int y,int length,UINT16 *dst);
4151
4152
4153
4154 extern int alpha_active;
4155 void alpha_init(void);
4156 static __inline__ void alpha_set_level(int level) {
4157 if(level == 0)
4158 level = -1;
4159 drawgfx_alpha_cache.alphas = drawgfx_alpha_cache.alpha[level+1];
4160 drawgfx_alpha_cache.alphad = drawgfx_alpha_cache.alpha[255-level];
4161 }
4162
4163 static __inline__ UINT32 alpha_blend16( UINT32 d, UINT32 s )
4164 {
4165 const UINT8 *alphas = drawgfx_alpha_cache.alphas;
4166 const UINT8 *alphad = drawgfx_alpha_cache.alphad;
4167 return (alphas[s & 0x1f] | (alphas[(s>>5) & 0x1f] << 5) | (alphas[(s>>10) & 0x1f] << 10))
4168 + (alphad[d & 0x1f] | (alphad[(d>>5) & 0x1f] << 5) | (alphad[(d>>10) & 0x1f] << 10));
4169 }
4170
4171
4172 static __inline__ UINT32 alpha_blend32( UINT32 d, UINT32 s )
4173 {
4174 const UINT8 *alphas = drawgfx_alpha_cache.alphas;
4175 const UINT8 *alphad = drawgfx_alpha_cache.alphad;
4176 return (alphas[s & 0xff] | (alphas[(s>>8) & 0xff] << 8) | (alphas[(s>>16) & 0xff] << 16))
4177 + (alphad[d & 0xff] | (alphad[(d>>8) & 0xff] << 8) | (alphad[(d>>16) & 0xff] << 16));
4178 }
4179
4180 static __inline__ UINT32 alpha_blend_r16( UINT32 d, UINT32 s, UINT8 level )
4181 {
4182 const UINT8 *alphas = drawgfx_alpha_cache.alpha[level];
4183 const UINT8 *alphad = drawgfx_alpha_cache.alpha[255 - level];
4184 return (alphas[s & 0x1f] | (alphas[(s>>5) & 0x1f] << 5) | (alphas[(s>>10) & 0x1f] << 10))
4185 + (alphad[d & 0x1f] | (alphad[(d>>5) & 0x1f] << 5) | (alphad[(d>>10) & 0x1f] << 10));
4186 }
4187
4188
4189 static __inline__ UINT32 alpha_blend_r32( UINT32 d, UINT32 s, UINT8 level )
4190 {
4191 const UINT8 *alphas = drawgfx_alpha_cache.alpha[level];
4192 const UINT8 *alphad = drawgfx_alpha_cache.alpha[255 - level];
4193 return (alphas[s & 0xff] | (alphas[(s>>8) & 0xff] << 8) | (alphas[(s>>16) & 0xff] << 16))
4194 + (alphad[d & 0xff] | (alphad[(d>>8) & 0xff] << 8) | (alphad[(d>>16) & 0xff] << 16));
4195 }
4196 # 258 "src/drawgfx.h"
4197 void copyrozbitmap(mame_bitmap *dest,mame_bitmap *src,
4198 UINT32 startx,UINT32 starty,int incxx,int incxy,int incyx,int incyy,int wraparound,
4199 const rectangle *clip,int transparency,int transparent_color,UINT32 priority);
4200
4201 void fillbitmap(mame_bitmap *dest,pen_t pen,const rectangle *clip);
4202 void drawgfxzoom( mame_bitmap *dest_bmp,const gfx_element *gfx,
4203 unsigned int code,unsigned int color,int flipx,int flipy,int sx,int sy,
4204 const rectangle *clip,int transparency,int transparent_color,int scalex,int scaley);
4205 void pdrawgfxzoom( mame_bitmap *dest_bmp,const gfx_element *gfx,
4206 unsigned int code,unsigned int color,int flipx,int flipy,int sx,int sy,
4207 const rectangle *clip,int transparency,int transparent_color,int scalex,int scaley,
4208 UINT32 priority_mask);
4209 void mdrawgfxzoom( mame_bitmap *dest_bmp,const gfx_element *gfx,
4210 unsigned int code,unsigned int color,int flipx,int flipy,int sx,int sy,
4211 const rectangle *clip,int transparency,int transparent_color,int scalex,int scaley,
4212 UINT32 priority_mask);
4213
4214 void drawgfx_toggle_crosshair(void);
4215 void draw_crosshair(mame_bitmap *bitmap,int x,int y,const rectangle *clip,int player);
4216 # 24 "src/mame.h" 2
4217
4218
4219
4220
4221
4222
4223
4224 extern char build_version[];
4225 # 70 "src/mame.h"
4226 struct _region_info
4227 {
4228 UINT8 * base;
4229 size_t length;
4230 UINT32 type;
4231 UINT32 flags;
4232 };
4233 typedef struct _region_info region_info;
4234
4235
4236 struct _running_machine
4237 {
4238
4239
4240
4241 const game_driver * gamedrv;
4242
4243
4244 const machine_config * drv;
4245
4246
4247 region_info memory_region[32];
4248
4249
4250 int rom_load_warnings;
4251
4252
4253
4254
4255
4256 gfx_element * gfx[32];
4257
4258
4259 mame_bitmap * scrbitmap;
4260
4261
4262 rectangle visible_area;
4263 rectangle absolute_visible_area;
4264
4265
4266 float refresh_rate;
4267
4268
4269
4270
4271 pen_t * pens;
4272
4273
4274 UINT16 * game_colortable;
4275
4276
4277 pen_t * remapped_colortable;
4278
4279
4280 int color_depth;
4281
4282
4283
4284
4285
4286 int sample_rate;
4287
4288
4289
4290
4291
4292 input_port_entry * input_ports;
4293
4294
4295 input_port_entry * input_ports_default;
4296
4297
4298
4299
4300
4301 int ui_orientation;
4302
4303
4304
4305
4306
4307 mame_bitmap * debug_bitmap;
4308
4309
4310 pen_t * debug_pens;
4311
4312
4313 pen_t * debug_remapped_colortable;
4314
4315
4316 gfx_element * debugger_font;
4317
4318
4319
4320
4321 };
4322 typedef struct _running_machine running_machine;
4323 # 197 "src/mame.h"
4324 struct _global_options
4325 {
4326 mame_file * record;
4327 mame_file * playback;
4328 mame_file * language_file;
4329
4330 int mame_debug;
4331 int cheat;
4332 int gui_host;
4333 int skip_disclaimer;
4334 int skip_gameinfo;
4335 int skip_warnings;
4336
4337 int samplerate;
4338 int use_samples;
4339
4340 float brightness;
4341 float pause_bright;
4342 float gamma;
4343 int vector_width;
4344 int vector_height;
4345 int ui_orientation;
4346
4347 int beam;
4348 float vector_flicker;
4349 float vector_intensity;
4350 int translucency;
4351 int antialias;
4352
4353 int use_artwork;
4354 int artwork_res;
4355 int artwork_crop;
4356
4357 const char * savegame;
4358 int auto_save;
4359 char * bios;
4360
4361 int debug_width;
4362 int debug_height;
4363 int debug_depth;
4364
4365 const char *controller;
4366 # 249 "src/mame.h"
4367 };
4368 typedef struct _global_options global_options;
4369 # 279 "src/mame.h"
4370 struct _mame_display
4371 {
4372
4373 UINT32 changed_flags;
4374
4375
4376 mame_bitmap * game_bitmap;
4377 rectangle game_bitmap_update;
4378 const rgb_t * game_palette;
4379 UINT32 game_palette_entries;
4380 UINT32 * game_palette_dirty;
4381 rectangle game_visible_area;
4382 float game_refresh_rate;
4383 void * vector_dirty_pixels;
4384
4385
4386 mame_bitmap * debug_bitmap;
4387 const rgb_t * debug_palette;
4388 UINT32 debug_palette_entries;
4389 UINT8 debug_focus;
4390
4391
4392 UINT8 led_state;
4393 };
4394 # 313 "src/mame.h"
4395 struct _performance_info
4396 {
4397 double game_speed_percent;
4398 double frames_per_second;
4399 int vector_updates_last_second;
4400 int partial_updates_this_frame;
4401 };
4402 # 330 "src/mame.h"
4403 extern global_options options;
4404 extern running_machine *Machine;
4405 # 344 "src/mame.h"
4406 int run_game(int game);
4407
4408
4409 void expand_machine_driver(void (*constructor)(machine_config *), machine_config *output);
4410
4411
4412 void mame_pause(int pause);
4413
4414
4415 int mame_is_paused(void);
4416
4417
4418
4419
4420
4421
4422 void set_visible_area(int min_x, int max_x, int min_y, int max_y);
4423
4424
4425 void set_refresh_rate(float fps);
4426