diff options
Diffstat (limited to 'plugins/uade2/uade-2.13/src/include')
27 files changed, 0 insertions, 2114 deletions
diff --git a/plugins/uade2/uade-2.13/src/include/.gitignore b/plugins/uade2/uade-2.13/src/include/.gitignore deleted file mode 100644 index c74efa80..00000000 --- a/plugins/uade2/uade-2.13/src/include/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -compilersupport.h -ossupport.h -sysincludes.h -uadeconfig.h diff --git a/plugins/uade2/uade-2.13/src/include/amigafilter.h b/plugins/uade2/uade-2.13/src/include/amigafilter.h deleted file mode 100644 index 761fd33f..00000000 --- a/plugins/uade2/uade-2.13/src/include/amigafilter.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef _UADE_AMIGA_FILTER_H_ -#define _UADE_AMIGA_FILTER_H_ - -enum { - FILTER_MODEL_A500 = 1, - FILTER_MODEL_A1200, - FILTER_MODEL_UPPER_BOUND -}; - -#endif diff --git a/plugins/uade2/uade-2.13/src/include/amigamsg.h b/plugins/uade2/uade-2.13/src/include/amigamsg.h deleted file mode 100644 index 457529c3..00000000 --- a/plugins/uade2/uade-2.13/src/include/amigamsg.h +++ /dev/null @@ -1,24 +0,0 @@ -#ifndef _AMIGAMSG_H_ -#define _AMIGAMSG_H_ - -enum amigamsg { - AMIGAMSG_SETSUBSONG = 1, - AMIGAMSG_SONG_END, - AMIGAMSG_PLAYERNAME, - AMIGAMSG_MODULENAME, - AMIGAMSG_SUBSINFO, - AMIGAMSG_CHECKERROR, - AMIGAMSG_SCORECRASH, - AMIGAMSG_SCOREDEAD, - AMIGAMSG_GENERALMSG, - AMIGAMSG_NTSC, - AMIGAMSG_FORMATNAME, - AMIGAMSG_LOADFILE, - AMIGAMSG_READ, - AMIGAMSG_FILESIZE, - AMIGAMSG_TIME_CRITICAL, - AMIGAMSG_GET_INFO, - AMIGAMSG_START_OUTPUT -}; - -#endif diff --git a/plugins/uade2/uade-2.13/src/include/audio.h b/plugins/uade2/uade-2.13/src/include/audio.h deleted file mode 100644 index 5716f5f9..00000000 --- a/plugins/uade2/uade-2.13/src/include/audio.h +++ /dev/null @@ -1,57 +0,0 @@ - /* - * UAE - The Un*x Amiga Emulator - * - * Sound emulation stuff - * - * Copyright 1995, 1996, 1997 Bernd Schmidt - */ - -#ifndef _UADE_AUDIO_H_ -#define _UADE_AUDIO_H_ - -#include "sinctable.h" - -#define AUDIO_DEBUG 0 -/* Queue length 256 implies minimum emulated period of 8. This should be - * sufficient for all imaginable purposes. This must be power of two. */ -#define SINC_QUEUE_LENGTH 256 - -typedef struct { - int time, output; -} sinc_queue_t; - -extern struct audio_channel_data { - unsigned long adk_mask; - unsigned long evtime; - unsigned char dmaen, intreq2, data_written; - uaecptr lc, pt; - - int state, wper, wlen; - int current_sample; - int sample_accum, sample_accum_time; - int output_state; - sinc_queue_t sinc_queue[SINC_QUEUE_LENGTH]; - int sinc_queue_time; - int sinc_queue_head; - int vol; - uae_u16 dat, nextdat, per, len; - - /* Debug variables */ - uaecptr ptend, nextdatpt, nextdatptend, datpt, datptend; -} audio_channel[4]; - -extern void AUDxDAT (int nr, uae_u16 value); -extern void AUDxVOL (int nr, uae_u16 value); -extern void AUDxPER (int nr, uae_u16 value); -extern void AUDxLCH (int nr, uae_u16 value); -extern void AUDxLCL (int nr, uae_u16 value); -extern void AUDxLEN (int nr, uae_u16 value); - -void audio_reset (void); -void audio_set_filter(int filter_type, int filter_force); -void audio_set_rate (int rate); -void audio_set_resampler(char *name); -void audio_use_text_scope(void); -void update_audio (void); - -#endif diff --git a/plugins/uade2/uade-2.13/src/include/cia.h b/plugins/uade2/uade-2.13/src/include/cia.h deleted file mode 100644 index 558b11c0..00000000 --- a/plugins/uade2/uade-2.13/src/include/cia.h +++ /dev/null @@ -1,26 +0,0 @@ - /* - * UAE - The Un*x Amiga Emulator - * - * CIA chip support - * - * (c) 1995 Bernd Schmidt - */ - -extern void CIA_reset(void); -extern void CIA_vsync_handler(void); -extern void CIA_hsync_handler(void); -extern void CIA_handler(void); - -extern void diskindex_handler(void); - -extern void dumpcia(void); - -extern unsigned int ciaaicr,ciaaimask,ciabicr,ciabimask; -extern unsigned int ciaacra,ciaacrb,ciabcra,ciabcrb; -extern unsigned int ciaapra, ciabpra; -extern unsigned long ciaata,ciaatb,ciabta,ciabtb; -extern unsigned long ciaatod,ciabtod,ciaatol,ciabtol,ciaaalarm,ciabalarm; -extern int ciaatlatch,ciabtlatch; - -extern unsigned int gui_ledstate; -extern int gui_ledstate_forced; diff --git a/plugins/uade2/uade-2.13/src/include/commpipe.h b/plugins/uade2/uade-2.13/src/include/commpipe.h deleted file mode 100644 index c7f4d814..00000000 --- a/plugins/uade2/uade-2.13/src/include/commpipe.h +++ /dev/null @@ -1,155 +0,0 @@ - /* - * UAE - The Un*x Amiga Emulator - * - * Communication between threads - * - * Copyright 1997, 2001 Bernd Schmidt - */ - -typedef union { - int i; - uae_u32 u32; - void *pv; -} uae_pt; - -/* These currently require the maximum size to be known at initialization - * time, but it wouldn't be hard to use a "normal" pipe as an extension once the - * user-level one gets full. - * We queue up to chunks pieces of data before signalling the other thread to - * avoid overhead. */ - -typedef struct { - uae_sem_t lock; - uae_sem_t reader_wait; - uae_sem_t writer_wait; - uae_pt *data; - int size, chunks; - volatile int rdp, wrp; - volatile int writer_waiting; - volatile int reader_waiting; -} smp_comm_pipe; - -static inline void init_comm_pipe (smp_comm_pipe *p, int size, int chunks) -{ - p->data = (uae_pt *)malloc (size*sizeof (uae_pt)); - p->size = size; - p->chunks = chunks; - p->rdp = p->wrp = 0; - p->reader_waiting = 0; - p->writer_waiting = 0; - uae_sem_init (&p->lock, 0, 1); - uae_sem_init (&p->reader_wait, 0, 0); - uae_sem_init (&p->writer_wait, 0, 0); -} - -static inline void destroy_comm_pipe (smp_comm_pipe *p) -{ - uae_sem_destroy (&p->lock); - uae_sem_destroy (&p->reader_wait); - uae_sem_destroy (&p->writer_wait); -} - -static inline void maybe_wake_reader (smp_comm_pipe *p, int no_buffer) -{ - if (p->reader_waiting - && (no_buffer || ((p->wrp - p->rdp + p->size) % p->size) >= p->chunks)) - { - p->reader_waiting = 0; - uae_sem_post (&p->reader_wait); - } -} - -static inline void write_comm_pipe_pt (smp_comm_pipe *p, uae_pt data, int no_buffer) -{ - int nxwrp = (p->wrp + 1) % p->size; - - if (p->reader_waiting) { - /* No need to do all the locking */ - p->data[p->wrp] = data; - p->wrp = nxwrp; - maybe_wake_reader (p, no_buffer); - return; - } - - uae_sem_wait (&p->lock); - if (nxwrp == p->rdp) { - /* Pipe full! */ - p->writer_waiting = 1; - uae_sem_post (&p->lock); - /* Note that the reader could get in between here and do a - * sem_post on writer_wait before we wait on it. That's harmless. - * There's a similar case in read_comm_pipe_int_blocking. */ - uae_sem_wait (&p->writer_wait); - uae_sem_wait (&p->lock); - } - p->data[p->wrp] = data; - p->wrp = nxwrp; - maybe_wake_reader (p, no_buffer); - uae_sem_post (&p->lock); -} - -static inline uae_pt read_comm_pipe_pt_blocking (smp_comm_pipe *p) -{ - uae_pt data; - - uae_sem_wait (&p->lock); - if (p->rdp == p->wrp) { - p->reader_waiting = 1; - uae_sem_post (&p->lock); - uae_sem_wait (&p->reader_wait); - uae_sem_wait (&p->lock); - } - data = p->data[p->rdp]; - p->rdp = (p->rdp + 1) % p->size; - - /* We ignore chunks here. If this is a problem, make the size bigger in the init call. */ - if (p->writer_waiting) { - p->writer_waiting = 0; - uae_sem_post (&p->writer_wait); - } - uae_sem_post (&p->lock); - return data; -} - -static inline int comm_pipe_has_data (smp_comm_pipe *p) -{ - return p->rdp != p->wrp; -} - -static inline int read_comm_pipe_int_blocking (smp_comm_pipe *p) -{ - uae_pt foo = read_comm_pipe_pt_blocking (p); - return foo.i; -} -static inline uae_u32 read_comm_pipe_u32_blocking (smp_comm_pipe *p) -{ - uae_pt foo = read_comm_pipe_pt_blocking (p); - return foo.u32; -} - -static inline void *read_comm_pipe_pvoid_blocking (smp_comm_pipe *p) -{ - uae_pt foo = read_comm_pipe_pt_blocking (p); - return foo.pv; -} - -static inline void write_comm_pipe_int (smp_comm_pipe *p, int data, int no_buffer) -{ - uae_pt foo; - foo.i = data; - write_comm_pipe_pt (p, foo, no_buffer); -} - -static inline void write_comm_pipe_u32 (smp_comm_pipe *p, int data, int no_buffer) -{ - uae_pt foo; - foo.u32 = data; - write_comm_pipe_pt (p, foo, no_buffer); -} - -static inline void write_comm_pipe_pvoid (smp_comm_pipe *p, void *data, int no_buffer) -{ - uae_pt foo; - foo.pv = data; - write_comm_pipe_pt (p, foo, no_buffer); -} diff --git a/plugins/uade2/uade-2.13/src/include/compiler.h b/plugins/uade2/uade-2.13/src/include/compiler.h deleted file mode 100644 index 545dd6a4..00000000 --- a/plugins/uade2/uade-2.13/src/include/compiler.h +++ /dev/null @@ -1,111 +0,0 @@ - /* - * UAE - The Un*x Amiga Emulator - * - * m68k -> i386 compiler - * - * (c) 1995 Bernd Schmidt - */ - -typedef uaecptr (*code_execfunc)(void); - -struct code_page { - struct code_page *next; - uae_u32 allocmask; -}; - -struct hash_block { - struct hash_block *lru_next, *lru_prev; - struct hash_entry *he_first; - - struct code_page *cpage; - int alloclen; - uae_u32 page_allocmask; - char *compile_start; - - int nrefs; - - int translated:1; - int untranslatable:1; - int allocfailed:1; -}; - -struct hash_entry { - code_execfunc execute; /* For the sake of the stubs in X86.S */ - struct hash_entry *next,*prev; - struct hash_entry *next_same_block, *lru_next, *lru_prev; - struct hash_block *block; - - uaecptr addr; - uae_u32 matchword; - int ncalls:8; - int locked:1; - int cacheflush:1; -}; - -extern int nr_bbs_start; -extern uae_u8 nr_bbs_to_run; -extern code_execfunc exec_me; - -#ifdef USE_COMPILER -static inline void run_compiled_code(void) -{ - - /*if (regs.spcflags == SPCFLAG_EXEC && may_run_compiled) {*/ - while (regs.spcflags == SPCFLAG_EXEC) { - uaecptr newpc; - regs.spcflags = 0; - /* newpc = (*exec_me)();*/ - __asm__ __volatile__ ("pushl %%ebp; call *%1; popl %%ebp" : "=a" (newpc) : "r" (exec_me) : - "%eax", "%edx", "%ecx", "%ebx", - "%edi", "%esi", "memory", "cc"); - if (nr_bbs_to_run == 0) { - struct hash_entry *h = (struct hash_entry *)newpc; - regs.spcflags = SPCFLAG_EXEC; - exec_me = h->execute; - regs.pc = h->addr; - regs.pc_p = regs.pc_oldp = get_real_address(h->addr); - nr_bbs_to_run = nr_bbs_start; - } else - m68k_setpc_fast(newpc); - do_cycles(); - } -/*} else */ - regs.spcflags &= ~SPCFLAG_EXEC; -} - -extern void compiler_init(void); -extern void possible_loadseg(void); - -extern void m68k_do_rts(void); -extern void m68k_do_bsr(uaecptr, uae_s32); -extern void m68k_do_jsr(uaecptr, uaecptr); -extern void compiler_flush_jsr_stack(void); - -#else - -#define run_compiled_code() do { ; } while (0) -#define compiler_init() do { ; } while (0) -#define possible_loadseg() do { ; } while (0) -#define compiler_flush_jsr_stack() do { ; } while (0) - -static inline void m68k_do_rts(void) -{ - m68k_setpc(get_long(m68k_areg(regs, 7))); - m68k_areg(regs, 7) += 4; -} - -static inline void m68k_do_bsr(uaecptr oldpc, uae_s32 offset) -{ - m68k_areg(regs, 7) -= 4; - put_long(m68k_areg(regs, 7), oldpc); - m68k_incpc(offset); -} - -static inline void m68k_do_jsr(uaecptr oldpc, uaecptr dest) -{ - m68k_areg(regs, 7) -= 4; - put_long(m68k_areg(regs, 7), oldpc); - m68k_setpc(dest); -} - -#endif diff --git a/plugins/uade2/uade-2.13/src/include/custom.h b/plugins/uade2/uade-2.13/src/include/custom.h deleted file mode 100644 index 15e3d689..00000000 --- a/plugins/uade2/uade-2.13/src/include/custom.h +++ /dev/null @@ -1,115 +0,0 @@ - /* - * UAE - The Un*x Amiga Emulator - * - * custom chip support - * - * (c) 1995 Bernd Schmidt - */ - -/* These are the masks that are ORed together in the chipset_mask option. - * If CSMASK_AGA is set, the ECS bits are guaranteed to be set as well. */ -#define CSMASK_ECS_AGNUS 1 -#define CSMASK_ECS_DENISE 2 -#define CSMASK_AGA 4 - -extern void custom_init (void); -extern void customreset (void); -extern int intlev (void); -extern void dumpcustom (void); - -extern void do_disk (void); - -extern void notice_new_xcolors (void); -extern void notice_screen_contents_lost (void); -extern void init_row_map (void); - -extern int picasso_requested_on; -extern int picasso_on; - -/* Set to 1 to leave out the current frame in average frame time calculation. - * Useful if the debugger was active. */ -extern int bogusframe; - -extern uae_u16 dmacon; -extern uae_u16 intena,intreq; - -extern int current_hpos (void); - -static inline int dmaen (unsigned int dmamask) -{ - return (dmamask & dmacon) && (dmacon & 0x200); -} - -#define SPCFLAG_STOP 2 -#define SPCFLAG_DISK 4 -#define SPCFLAG_INT 8 -#define SPCFLAG_BRK 16 -#define SPCFLAG_EXTRA_CYCLES 32 -#define SPCFLAG_TRACE 64 -#define SPCFLAG_DOTRACE 128 -#define SPCFLAG_DOINT 256 -#define SPCFLAG_BLTNASTY 512 -#define SPCFLAG_EXEC 1024 -#define SPCFLAG_MODE_CHANGE 8192 - -extern int dskdmaen; -extern uae_u16 adkcon; - -extern unsigned int joy0dir, joy1dir; -extern int joy0button, joy1button; - -extern void INTREQ (uae_u16); -extern uae_u16 INTREQR (void); - -/* maximums for statically allocated tables */ - -/* PAL/NTSC values */ - -/* The HRM says: The vertical blanking area (PAL) ranges from line 0 to line 29, - * and no data can be displayed there. Nevertheless, we lose some overscan data - * if minfirstline is set to 29. */ - -#define MAXHPOS_PAL 227 -#define MAXHPOS_NTSC 227 -#define MAXVPOS_PAL 312 -#define MAXVPOS_NTSC 262 -#define MINFIRSTLINE_PAL 21 -#define MINFIRSTLINE_NTSC 18 -#define VBLANK_ENDLINE_PAL 29 -#define VBLANK_ENDLINE_NTSC 24 -#define VBLANK_HZ_PAL 50 -#define VBLANK_HZ_NTSC 60 - -#define SOUNDTICKS_PAL 3546895 -#define SOUNDTICKS_NTSC 3579545 - -#define MAXHPOS (MAXHPOS_PAL) -#define MAXVPOS (MAXVPOS_PAL) -#define SOUNDTICKS (SOUNDTICKS_PAL) - -extern int maxhpos, maxvpos, minfirstline, vblank_endline, numscrlines, vblank_hz; -extern unsigned long syncbase; -#define NUMSCRLINES (maxvpos+1-minfirstline+1) - -#define DMA_AUD0 0x0001 -#define DMA_AUD1 0x0002 -#define DMA_AUD2 0x0004 -#define DMA_AUD3 0x0008 -#define DMA_DISK 0x0010 -#define DMA_SPRITE 0x0020 -#define DMA_BLITTER 0x0040 -#define DMA_COPPER 0x0080 -#define DMA_BITPLANE 0x0100 -#define DMA_BLITPRI 0x0400 - -extern unsigned long frametime, timeframes; - -/* 50 words give you 800 horizontal pixels. An A500 can't do that, so it ought - * to be enough. Don't forget to update the definition in genp2c.c as well. */ -#define MAX_WORDS_PER_LINE 50 - -extern uae_u32 hirestab_h[256][2]; -extern uae_u32 lorestab_h[256][4]; - -extern uae_u32 hirestab_l[256][1]; -extern uae_u32 lorestab_l[256][2]; diff --git a/plugins/uade2/uade-2.13/src/include/debug.h b/plugins/uade2/uade-2.13/src/include/debug.h deleted file mode 100644 index 8ca10ab5..00000000 --- a/plugins/uade2/uade-2.13/src/include/debug.h +++ /dev/null @@ -1,25 +0,0 @@ - /* - * UAE - The Un*x Amiga Emulator - * - * Debugger - * - * (c) 1995 Bernd Schmidt - * - */ - -#define MAX_HIST 10000 - -extern int firsthist; -extern int lasthist; -extern int debugging; -extern int debug_interrupt_happened; - -#ifdef NEED_TO_DEBUG_BADLY -extern struct regstruct history[MAX_HIST]; -extern union flagu historyf[MAX_HIST]; -#else -extern uaecptr history[MAX_HIST]; -#endif - -extern void debug(void); -extern void activate_debugger(void); diff --git a/plugins/uade2/uade-2.13/src/include/events.h b/plugins/uade2/uade-2.13/src/include/events.h deleted file mode 100644 index 4b692650..00000000 --- a/plugins/uade2/uade-2.13/src/include/events.h +++ /dev/null @@ -1,83 +0,0 @@ - /* - * UAE - The Un*x Amiga Emulator - * - * Events - * These are best for low-frequency events. Having too many of them, - * or using them for events that occur too frequently, can cause massive - * slowdown. - * - * Copyright 1995-1998 Bernd Schmidt - */ - -extern void reset_frame_rate_hack (void); -extern int rpt_available; - -extern unsigned long int cycles, nextevent, is_lastline; -extern unsigned long int sample_evtime; -typedef void (*evfunc)(void); - -struct ev -{ - int active; - unsigned long int evtime, oldcycles; - evfunc handler; -}; - -enum { - ev_hsync, ev_copper, ev_cia, - ev_blitter, ev_diskblk, ev_diskindex, - ev_max -}; - -extern struct ev eventtab[ev_max]; - -static void events_schedule (void) -{ - unsigned long int mintime = ~0L; - unsigned long int eventtime; - /* HSYNC */ - if(eventtab[ev_hsync].active) { - eventtime = eventtab[ev_hsync].evtime - cycles; - if (eventtime < mintime) mintime = eventtime; - } - /* AUDIO */ -#if 0 - if(eventtab[ev_audio].active) { - eventtime = eventtab[ev_audio].evtime - cycles; - if (eventtime < mintime) mintime = eventtime; - } -#endif - /* CIA */ - if(eventtab[ev_cia].active) { - eventtime = eventtab[ev_cia].evtime - cycles; - if (eventtime < mintime) mintime = eventtime; - } - nextevent = cycles + mintime; -} - -static void do_cycles_slow (unsigned long cycles_to_add) { - if ((nextevent - cycles) <= cycles_to_add) { - for (; cycles_to_add != 0; cycles_to_add--) { - if (++cycles == nextevent) { - /* HSYNC */ - if(eventtab[ev_hsync].active && eventtab[ev_hsync].evtime == cycles) { - (*eventtab[ev_hsync].handler)(); - } - /* AUDIO */ -#if 0 - if(eventtab[ev_audio].active && eventtab[ev_audio].evtime == cycles) { - (*eventtab[ev_audio].handler)(); - } -#endif - /* CIA */ - if(eventtab[ev_cia].active && eventtab[ev_cia].evtime == cycles) { - (*eventtab[ev_cia].handler)(); - } - events_schedule(); - } - } - } - cycles += cycles_to_add; -} - -#define do_cycles do_cycles_slow diff --git a/plugins/uade2/uade-2.13/src/include/execlib.h b/plugins/uade2/uade-2.13/src/include/execlib.h deleted file mode 100644 index c0777221..00000000 --- a/plugins/uade2/uade-2.13/src/include/execlib.h +++ /dev/null @@ -1,40 +0,0 @@ - /* - * UAE - The Un*x Amiga Emulator - * - * Miscellaneous bits for exec emulation - * - * Copyright 1996 Bernd Schmidt - */ - -#define CMD_INVALID 0 -#define CMD_RESET 1 -#define CMD_READ 2 -#define CMD_WRITE 3 -#define CMD_UPDATE 4 -#define CMD_CLEAR 5 -#define CMD_STOP 6 -#define CMD_START 7 -#define CMD_FLUSH 8 -#define CMD_NONSTD 9 - -#define NT_TASK 1 -#define NT_DEVICE 3 -#define NT_MSGPORT 4 -#define NT_MESSAGE 5 -#define NT_FREEMSG 6 -#define NT_REPLYMSG 7 -#define NT_RESOURCE 8 -#define NT_LIBRARY 9 -#define NT_SIGNALSEM 15 - -#ifndef MEMF_PUBLIC /* protection for AmigaDOS */ -#define MEMF_PUBLIC 1 -#define MEMF_CHIP 2 -#define MEMF_FAST 4 -#define MEMF_LOCAL 256 -#define MEMF_24BITDMA 512 -#define MEMF_CLEAR (1<<16) -#define MEMF_LARGEST (1<<17) -#define MEMF_REVERSE (1<<18) -#define MEMF_TOTAL (1<<19) -#endif diff --git a/plugins/uade2/uade-2.13/src/include/gensound.h b/plugins/uade2/uade-2.13/src/include/gensound.h deleted file mode 100644 index 63daeb04..00000000 --- a/plugins/uade2/uade-2.13/src/include/gensound.h +++ /dev/null @@ -1,19 +0,0 @@ - /* - * UAE - The Un*x Amiga Emulator - * - * Prototypes for general sound related functions - * This use to be called sound.h, but that causes confusion - * - * Copyright 1997 Bernd Schmidt - */ - -extern int sound_available; - -/* Determine if we can produce any sound at all. This can be only a guess; - * if unsure, say yes. Any call to init_sound may change the value. */ -extern int setup_sound (void); - -extern void set_sound_freq (int x); -extern void init_sound (void); -extern void flush_sound (void); -extern void close_sound (void); diff --git a/plugins/uade2/uade-2.13/src/include/memory.h b/plugins/uade2/uade-2.13/src/include/memory.h deleted file mode 100644 index 96a967b5..00000000 --- a/plugins/uade2/uade-2.13/src/include/memory.h +++ /dev/null @@ -1,181 +0,0 @@ - /* - * UAE - The Un*x Amiga Emulator - * - * memory management - * - * Copyright 1995 Bernd Schmidt - */ - -/* Enabling this adds one additional native memory reference per 68k memory - * access, but saves one shift (on the x86). Enabling this is probably - * better for the cache. My favourite benchmark (PP2) doesn't show a - * difference, so I leave this enabled. */ - -#if 1 || defined SAVE_MEMORY -#define SAVE_MEMORY_BANKS -#endif - -#ifndef REGPARAM -#define REGPARAM -#endif - -typedef uae_u32 (*mem_get_func)(uaecptr) REGPARAM; -typedef void (*mem_put_func)(uaecptr, uae_u32) REGPARAM; -typedef uae_u8 *(*xlate_func)(uaecptr) REGPARAM; -typedef int (*check_func)(uaecptr, uae_u32) REGPARAM; - -extern char *address_space, *good_address_map; -extern uae_u8 *chipmemory; - -extern uae_u32 allocated_chipmem; -extern uae_u32 allocated_fastmem; -extern uae_u32 allocated_bogomem; -extern uae_u32 allocated_gfxmem; -extern uae_u32 allocated_z3fastmem; -extern uae_u32 allocated_a3000mem; - -#undef DIRECT_MEMFUNCS_SUCCESSFUL -#include "machdep/maccess.h" - -#ifndef CAN_MAP_MEMORY -#undef USE_COMPILER -#endif - -#if defined(USE_COMPILER) && !defined(USE_MAPPED_MEMORY) -#define USE_MAPPED_MEMORY -#endif - -#define kickmem_size 0x080000 - -#define chipmem_start 0x00000000 -#define bogomem_start 0x00C00000 -#define a3000mem_start 0x07000000 -#define kickmem_start 0x00F80000 - -extern int ersatzkickfile; - -typedef struct { - /* These ones should be self-explanatory... */ - mem_get_func lget, wget, bget; - mem_put_func lput, wput, bput; - /* Use xlateaddr to translate an Amiga address to a uae_u8 * that can - * be used to address memory without calling the wget/wput functions. - * This doesn't work for all memory banks, so this function may call - * abort(). */ - xlate_func xlateaddr; - /* To prevent calls to abort(), use check before calling xlateaddr. - * It checks not only that the memory bank can do xlateaddr, but also - * that the pointer points to an area of at least the specified size. - * This is used for example to translate bitplane pointers in custom.c */ - check_func check; -} addrbank; - -extern uae_u8 filesysory[65536]; - -extern addrbank chipmem_bank; -extern addrbank kickmem_bank; -extern addrbank custom_bank; -extern addrbank clock_bank; -extern addrbank cia_bank; -extern addrbank rtarea_bank; -extern addrbank expamem_bank; -extern addrbank fastmem_bank; -extern addrbank gfxmem_bank; - -extern void rtarea_init (void); -extern void rtarea_setup (void); -extern void expamem_init (void); -extern void expamem_reset (void); - -extern uae_u32 gfxmem_start; -extern uae_u8 *gfxmemory; -extern uae_u32 gfxmem_mask; -extern int address_space_24; - -/* Default memory access functions */ - -extern int default_check(uaecptr addr, uae_u32 size) REGPARAM; -extern uae_u8 *default_xlate(uaecptr addr) REGPARAM; - -#define bankindex(addr) (((uaecptr)(addr)) >> 16) - -#ifdef SAVE_MEMORY_BANKS -extern addrbank *mem_banks[65536]; -#define get_mem_bank(addr) (*mem_banks[bankindex(addr)]) -#define put_mem_bank(addr, b) (mem_banks[bankindex(addr)] = (b)) -#else -extern addrbank mem_banks[65536]; -#define get_mem_bank(addr) (mem_banks[bankindex(addr)]) -#define put_mem_bank(addr, b) (mem_banks[bankindex(addr)] = *(b)) -#endif - -extern void memory_init(void); -extern void map_banks(addrbank *bank, int first, int count); - -#ifndef NO_INLINE_MEMORY_ACCESS - -#define longget(addr) (call_mem_get_func(get_mem_bank(addr).lget, addr)) -#define wordget(addr) (call_mem_get_func(get_mem_bank(addr).wget, addr)) -#define byteget(addr) (call_mem_get_func(get_mem_bank(addr).bget, addr)) -#define longput(addr,l) (call_mem_put_func(get_mem_bank(addr).lput, addr, l)) -#define wordput(addr,w) (call_mem_put_func(get_mem_bank(addr).wput, addr, w)) -#define byteput(addr,b) (call_mem_put_func(get_mem_bank(addr).bput, addr, b)) - -#else - -extern uae_u32 alongget(uaecptr addr); -extern uae_u32 awordget(uaecptr addr); -extern uae_u32 longget(uaecptr addr); -extern uae_u32 wordget(uaecptr addr); -extern uae_u32 byteget(uaecptr addr); -extern void longput(uaecptr addr, uae_u32 l); -extern void wordput(uaecptr addr, uae_u32 w); -extern void byteput(uaecptr addr, uae_u32 b); - -#endif - -#ifndef MD_HAVE_MEM_1_FUNCS - -#define longget_1 longget -#define wordget_1 wordget -#define byteget_1 byteget -#define longput_1 longput -#define wordput_1 wordput -#define byteput_1 byteput - -#endif - -static inline uae_u32 get_long(uaecptr addr) -{ - return longget_1(addr); -} -static inline uae_u32 get_word(uaecptr addr) -{ - return wordget_1(addr); -} -static inline uae_u32 get_byte(uaecptr addr) -{ - return byteget_1(addr); -} -static inline void put_long(uaecptr addr, uae_u32 l) -{ - longput_1(addr, l); -} -static inline void put_word(uaecptr addr, uae_u32 w) -{ - wordput_1(addr, w); -} -static inline void put_byte(uaecptr addr, uae_u32 b) -{ - byteput_1(addr, b); -} - -static inline uae_u8 *get_real_address(uaecptr addr) -{ - return get_mem_bank(addr).xlateaddr(addr); -} - -static inline int valid_address(uaecptr addr, uae_u32 size) -{ - return get_mem_bank(addr).check(addr, size); -} diff --git a/plugins/uade2/uade-2.13/src/include/newcpu.h b/plugins/uade2/uade-2.13/src/include/newcpu.h deleted file mode 100644 index 84732f10..00000000 --- a/plugins/uade2/uade-2.13/src/include/newcpu.h +++ /dev/null @@ -1,275 +0,0 @@ - /* - * UAE - The Un*x Amiga Emulator - * - * MC68000 emulation - * - * Copyright 1995 Bernd Schmidt - */ - -#include <machdep/m68k.h> - -void m68k_run_1 (void); - -#ifndef SET_CFLG - -#define SET_CFLG(x) (CFLG = (x)) -#define SET_NFLG(x) (NFLG = (x)) -#define SET_VFLG(x) (VFLG = (x)) -#define SET_ZFLG(x) (ZFLG = (x)) -#define SET_XFLG(x) (XFLG = (x)) - -#define GET_CFLG CFLG -#define GET_NFLG NFLG -#define GET_VFLG VFLG -#define GET_ZFLG ZFLG -#define GET_XFLG XFLG - -#define CLEAR_CZNV do { \ - SET_CFLG (0); \ - SET_ZFLG (0); \ - SET_NFLG (0); \ - SET_VFLG (0); \ -while (0) - -#define COPY_CARRY (SET_XFLG (GET_CFLG)) -#endif - -extern int areg_byteinc[]; -extern int imm8_table[]; - -extern int movem_index1[256]; -extern int movem_index2[256]; -extern int movem_next[256]; - -extern int fpp_movem_index1[256]; -extern int fpp_movem_index2[256]; -extern int fpp_movem_next[256]; - -extern int broken_in; - -typedef unsigned long cpuop_func (uae_u32) REGPARAM; - -struct cputbl { - cpuop_func *handler; - int specific; - uae_u16 opcode; -}; - -extern unsigned long op_illg (uae_u32) REGPARAM; - -typedef char flagtype; - -extern struct regstruct -{ - uae_u32 regs[16]; - uaecptr usp,isp,msp; - uae_u16 sr; - flagtype t1; - flagtype t0; - flagtype s; - flagtype m; - flagtype x; - flagtype stopped; - int intmask; - - uae_u32 pc; - uae_u8 *pc_p; - uae_u8 *pc_oldp; - - uae_u32 vbr,sfc,dfc; - - double fp[8]; - uae_u32 fpcr,fpsr,fpiar; - - uae_u32 spcflags; - uae_u32 kick_mask; - - /* Fellow sources say this is 4 longwords. That's impossible. It needs - * to be at least a longword. The HRM has some cryptic comment about two - * instructions being on the same longword boundary. - * The way this is implemented now seems like a good compromise. - */ - uae_u32 prefetch; -} regs, lastint_regs; - -#define m68k_dreg(r,num) ((r).regs[(num)]) -#define m68k_areg(r,num) (((r).regs + 8)[(num)]) - -#define get_ibyte(o) do_get_mem_byte((uae_u8 *)(regs.pc_p + (o) + 1)) -#define get_iword(o) do_get_mem_word((uae_u16 *)(regs.pc_p + (o))) -#define get_ilong(o) do_get_mem_long((uae_u32 *)(regs.pc_p + (o))) - -#ifdef HAVE_GET_WORD_UNSWAPPED -#define GET_OPCODE (do_get_mem_word_unswapped (regs.pc_p)) -#else -#define GET_OPCODE (get_iword (0)) -#endif - -static inline uae_u32 get_ibyte_prefetch (uae_s32 o) -{ - if (o > 3 || o < 0) - return do_get_mem_byte((uae_u8 *)(regs.pc_p + o + 1)); - - return do_get_mem_byte((uae_u8 *)(((uae_u8 *)®s.prefetch) + o + 1)); -} -static inline uae_u32 get_iword_prefetch (uae_s32 o) -{ - if (o > 3 || o < 0) - return do_get_mem_word((uae_u16 *)(regs.pc_p + o)); - - return do_get_mem_word((uae_u16 *)(((uae_u8 *)®s.prefetch) + o)); -} -static inline uae_u32 get_ilong_prefetch (uae_s32 o) -{ - union { - uae_u32 *u32; - uae_u16 *u16; - } prefetch_u; - - if (o > 3 || o < 0) - return do_get_mem_long((uae_u32 *)(regs.pc_p + o)); - if (o == 0) - return do_get_mem_long(®s.prefetch); - - prefetch_u.u32 = ®s.prefetch; - - return (do_get_mem_word (prefetch_u.u16 + 1) << 16) | do_get_mem_word ((uae_u16 *)(regs.pc_p + 4)); -} - -#define m68k_incpc(o) (regs.pc_p += (o)) - -static inline void fill_prefetch_0 (void) -{ - uae_u32 r; -#ifdef UNALIGNED_PROFITABLE - r = *(uae_u32 *)regs.pc_p; - regs.prefetch = r; -#else - r = do_get_mem_long ((uae_u32 *)regs.pc_p); - do_put_mem_long (®s.prefetch, r); -#endif -} - -#if 0 -static inline void fill_prefetch_2 (void) -{ - uae_u32 r = do_get_mem_long (®s.prefetch) << 16; - uae_u32 r2 = do_get_mem_word (((uae_u16 *)regs.pc_p) + 1); - r |= r2; - do_put_mem_long (®s.prefetch, r); -} -#else -#define fill_prefetch_2 fill_prefetch_0 -#endif - -/* These are only used by the 68020/68881 code, and therefore don't - * need to handle prefetch. */ -static inline uae_u32 next_ibyte (void) -{ - uae_u32 r = get_ibyte (0); - m68k_incpc (2); - return r; -} - -static inline uae_u32 next_iword (void) -{ - uae_u32 r = get_iword (0); - m68k_incpc (2); - return r; -} - -static inline uae_u32 next_ilong (void) -{ - uae_u32 r = get_ilong (0); - m68k_incpc (4); - return r; -} - -#if !defined USE_COMPILER -static inline void m68k_setpc (uaecptr newpc) -{ - regs.pc_p = regs.pc_oldp = get_real_address(newpc); - regs.pc = newpc; -} -#else -extern void m68k_setpc (uaecptr newpc); -#endif - -static inline uaecptr m68k_getpc (void) -{ - return regs.pc + ((char *)regs.pc_p - (char *)regs.pc_oldp); -} - -static inline uaecptr m68k_getpc_p (uae_u8 *p) -{ - return regs.pc + ((char *)p - (char *)regs.pc_oldp); -} - -#ifdef USE_COMPILER -extern void m68k_setpc_fast (uaecptr newpc); -extern void m68k_setpc_bcc (uaecptr newpc); -extern void m68k_setpc_rte (uaecptr newpc); -#else -#define m68k_setpc_fast m68k_setpc -#define m68k_setpc_bcc m68k_setpc -#define m68k_setpc_rte m68k_setpc -#endif - -static inline void m68k_setstopped (int stop) -{ - regs.stopped = stop; - if (stop) - regs.spcflags |= SPCFLAG_STOP; -} - -extern uae_u32 get_disp_ea_020 (uae_u32 base, uae_u32 dp); -extern uae_u32 get_disp_ea_000 (uae_u32 base, uae_u32 dp); - -extern uae_s32 ShowEA (int reg, amodes mode, wordsizes size, char *buf); - -extern void MakeSR (void); -extern void MakeFromSR (void); -extern void Exception (int, uaecptr); -extern void dump_counts (void); -extern void m68k_move2c (int, uae_u32 *); -extern void m68k_movec2 (int, uae_u32 *); -extern void m68k_divl (uae_u32, uae_u32, uae_u16, uaecptr); -extern void m68k_mull (uae_u32, uae_u32, uae_u16); -extern void init_m68k (void); -extern void m68k_go (void); -extern void m68k_dumpstate (uaecptr *); -extern void m68k_disasm (uaecptr, uaecptr *, int); -extern void m68k_reset (void); - -extern void mmu_op (uae_u32, uae_u16); - -extern void fpp_opp (uae_u32, uae_u16); -extern void fdbcc_opp (uae_u32, uae_u16); -extern void fscc_opp (uae_u32, uae_u16); -extern void ftrapcc_opp (uae_u32,uaecptr); -extern void fbcc_opp (uae_u32, uaecptr, uae_u32); -extern void fsave_opp (uae_u32); -extern void frestore_opp (uae_u32); - -/* Opcode of faulting instruction */ -extern uae_u16 last_op_for_exception_3; -/* PC at fault time */ -extern uaecptr last_addr_for_exception_3; -/* Address that generated the exception */ -extern uaecptr last_fault_for_exception_3; - -#define CPU_OP_NAME(a) op ## a - -/* 68020 + 68881 */ -extern struct cputbl op_smalltbl_0[]; -/* 68020 */ -extern struct cputbl op_smalltbl_1[]; -/* 68010 */ -extern struct cputbl op_smalltbl_2[]; -/* 68000 */ -extern struct cputbl op_smalltbl_3[]; -/* 68000 slow but compatible. */ -extern struct cputbl op_smalltbl_4[]; - -extern cpuop_func *cpufunctbl[65536]; - diff --git a/plugins/uade2/uade-2.13/src/include/options.h b/plugins/uade2/uade-2.13/src/include/options.h deleted file mode 100644 index 2ec4befc..00000000 --- a/plugins/uade2/uade-2.13/src/include/options.h +++ /dev/null @@ -1,262 +0,0 @@ - /* - * UAE - The Un*x Amiga Emulator - * - * Stuff - * - * Copyright 1995, 1996 Ed Hanway - * Copyright 1995-98 Bernd Schmidt - */ - -#define UAEMAJOR 0 -#define UAEMINOR 8 -#define UAESUBREV 9 - -typedef enum { KBD_LANG_US, KBD_LANG_DE, KBD_LANG_SE, KBD_LANG_FR, KBD_LANG_IT, KBD_LANG_ES } KbdLang; - -extern long int version; - -struct uaedev_mount_info; - -struct strlist { - struct strlist *next; - char *str; -}; - -struct uae_prefs { - struct strlist *unknown_lines; - - char description[256]; - - int illegal_mem; - int no_xhair; - int use_serial; - int serial_demand; - int parallel_demand; - int automount_uaedev; - int use_gfxlib; - int socket_emu; - - int start_debugger; - int start_gui; - - int jport0; - int jport1; - KbdLang keyboard_lang; - int allow_save; - int emul_accuracy; - int test_drawing_speed; - - int produce_sound; - int stereo; - int sound_bits; - int sound_freq; - int sound_minbsiz; - int sound_maxbsiz; - int sound_pri_time; - int sound_pri_cutoff; - int sound_interpol; - - int gfx_framerate; - int gfx_width; - int gfx_height; - int gfx_lores; - int gfx_linedbl; - int gfx_correct_aspect; - int gfx_afullscreen; - int gfx_pfullscreen; - int gfx_xcenter; - int gfx_ycenter; - int color_mode; - - int blits_32bit_enabled; - int immediate_blits; - unsigned int chipset_mask; - int ntscmode; - - char df[4][256]; - char romfile[256]; - char keyfile[256]; - char prtname[256]; - - char path_floppy[256]; - char path_hardfile[256]; - char path_rom[256]; - - int m68k_speed; - int cpu_level; - int cpu_compatible; - int address_space_24; - - uae_u32 z3fastmem_size; - uae_u32 fastmem_size; - uae_u32 chipmem_size; - uae_u32 bogomem_size; - uae_u32 a3000mem_size; - uae_u32 gfxmem_size; - - struct uaedev_mount_info *mountinfo; - - /* Target specific options */ - int x11_use_low_bandwidth; - int x11_use_mitshm; - int x11_use_dgamode; - int x11_hide_cursor; - int svga_no_linear; - int win32_middle_mouse; - int win32_sound_style; - int win32_sound_tweak; - int win32_logfile; - int win32_iconified_nospeed; - int win32_iconified_nosound; -}; - -extern void save_options (FILE *, struct uae_prefs *); - -extern void default_prefs (struct uae_prefs *); -extern void discard_prefs (struct uae_prefs *); - -extern int cfgfile_yesno (char *option, char *value, char *name, int *location); -extern int cfgfile_intval (char *option, char *value, char *name, int *location, int scale); -extern int cfgfile_strval (char *option, char *value, char *name, int *location, const char *table[], int more); -extern int cfgfile_string (char *option, char *value, char *name, char *location, int maxsz); -extern char *cfgfile_subst_path (const char *path, const char *subst, const char *file); - -extern int target_parse_option (struct uae_prefs *, char *option, char *value); -extern void target_save_options (FILE *, struct uae_prefs *); - -extern int cfgfile_load (struct uae_prefs *, const char *filename); -extern int cfgfile_save (struct uae_prefs *, const char *filename); -extern void cfgfile_parse_line (struct uae_prefs *p, char *); -extern int cfgfile_parse_option (struct uae_prefs *p, char *option, char *value); -extern int cfgfile_get_description (const char *filename, char *description); -extern void cfgfile_show_usage (void); - -extern void fixup_prefs_dimensions (struct uae_prefs *prefs); - -extern void check_prefs_changed_custom (void); -extern void check_prefs_changed_cpu (void); -extern int check_prefs_changed_gfx (void); - -#define JSEM_DECODEVAL(n,v) ((n) == 0 ? (v)->jport0 : (v)->jport1) -/* Determine how port n is configured */ -#define JSEM_ISJOY0(n,v) (JSEM_DECODEVAL(n,v) == 0) -#define JSEM_ISJOY1(n,v) (JSEM_DECODEVAL(n,v) == 1) -#define JSEM_ISMOUSE(n,v) (JSEM_DECODEVAL(n,v) == 2) -#define JSEM_ISNUMPAD(n,v) (JSEM_DECODEVAL(n,v) == 3) -#define JSEM_ISCURSOR(n,v) (JSEM_DECODEVAL(n,v) == 4) -#define JSEM_ISSOMEWHEREELSE(n,v) (JSEM_DECODEVAL(n,v) == 5) -extern const char *gameport_state (int n); - -extern struct uae_prefs currprefs, changed_prefs; - -#if __GNUC__ - 1 > 1 || __GNUC_MINOR__ - 1 > 6 -extern void write_log (const char *, ...) __attribute__ ((format (printf, 1, 2))); -#else -extern void write_log (const char *, ...); -#endif - -extern void machdep_init (void); - -/* AIX doesn't think it is Unix. Neither do I. */ -#if defined(_ALL_SOURCE) || defined(_AIX) -#undef __unix -#define __unix -#endif - -extern char romfile[], keyfile[], prtname[], sername[]; - -extern int cloanto_rom; - -#define MAX_COLOR_MODES 5 - -extern int fast_memcmp(const void *foo, const void *bar, int len); -extern int memcmpy(void *foo, const void *bar, int len); - -/* - * You can specify numbers from 0 to 5 here. It is possible that higher - * numbers will make the CPU emulation slightly faster, but if the setting - * is too high, you will run out of memory while compiling. - * Best to leave this as it is. - */ -#define CPU_EMU_SIZE 0 - -/* #define NEED_TO_DEBUG_BADLY */ - -#if !defined(USER_PROGRAMS_BEHAVE) -#define USER_PROGRAMS_BEHAVE 0 -#endif - -/* Some memsets which know that they can safely overwrite some more memory - * at both ends and use that knowledge to align the pointers. */ - -#define QUADRUPLIFY(c) (((c) | ((c) << 8)) | (((c) | ((c) << 8)) << 16)) - -/* When you call this routine, bear in mind that it rounds the bounds and - * may need some padding for the array. */ - -#define fuzzy_memset(p, c, o, l) fuzzy_memset_1 ((p), QUADRUPLIFY (c), (o) & ~3, ((l) + 4) >> 2) -static inline void fuzzy_memset_1 (void *p, uae_u32 c, int offset, int len) -{ - uae_u32 *p2 = (uae_u32 *)((char *)p + offset); - int a = len & 7; - len >>= 3; - switch (a) { - case 7: p2--; goto l1; - case 6: p2-=2; goto l2; - case 5: p2-=3; goto l3; - case 4: p2-=4; goto l4; - case 3: p2-=5; goto l5; - case 2: p2-=6; goto l6; - case 1: p2-=7; goto l7; - case 0: if (!--len) return; break; - } - - for (;;) { - p2[0] = c; - l1: - p2[1] = c; - l2: - p2[2] = c; - l3: - p2[3] = c; - l4: - p2[4] = c; - l5: - p2[5] = c; - l6: - p2[6] = c; - l7: - p2[7] = c; - - if (!len) - break; - len--; - p2 += 8; - } -} - -/* This one knows it will never be asked to clear more than 32 bytes. Make sure you call this with a - constant for the length. */ -#define fuzzy_memset_le32(p, c, o, l) fuzzy_memset_le32_1 ((p), QUADRUPLIFY (c), (o) & ~3, ((l) + 7) >> 2) -static inline void fuzzy_memset_le32_1 (void *p, uae_u32 c, int offset, int len) -{ - uae_u32 *p2 = (uae_u32 *)((char *)p + offset); - - switch (len) { - case 9: p2[0] = c; p2[1] = c; p2[2] = c; p2[3] = c; p2[4] = c; p2[5] = c; p2[6] = c; p2[7] = c; p2[8] = c; break; - case 8: p2[0] = c; p2[1] = c; p2[2] = c; p2[3] = c; p2[4] = c; p2[5] = c; p2[6] = c; p2[7] = c; break; - case 7: p2[0] = c; p2[1] = c; p2[2] = c; p2[3] = c; p2[4] = c; p2[5] = c; p2[6] = c; break; - case 6: p2[0] = c; p2[1] = c; p2[2] = c; p2[3] = c; p2[4] = c; p2[5] = c; break; - case 5: p2[0] = c; p2[1] = c; p2[2] = c; p2[3] = c; p2[4] = c; break; - case 4: p2[0] = c; p2[1] = c; p2[2] = c; p2[3] = c; break; - case 3: p2[0] = c; p2[1] = c; p2[2] = c; break; - case 2: p2[0] = c; p2[1] = c; break; - case 1: p2[0] = c; break; - case 0: break; - default: printf("Hit the programmer.\n"); break; - } -} - -#if defined(AMIGA) && defined(__GNUC__) -/* #include "od-amiga/amiga-kludges.h" */ -#endif diff --git a/plugins/uade2/uade-2.13/src/include/osemu.h b/plugins/uade2/uade-2.13/src/include/osemu.h deleted file mode 100644 index 817c5c9b..00000000 --- a/plugins/uade2/uade-2.13/src/include/osemu.h +++ /dev/null @@ -1,19 +0,0 @@ - /* - * UAE - The Un*x Amiga Emulator - * - * OS emulation prototypes - * - * Copyright 1996 Bernd Schmidt - */ - -static inline char *raddr(uaecptr p) -{ - return p == 0 ? NULL : (char *)get_real_address(p); -} - -extern void gfxlib_install(void); - -/* graphics.library */ - -extern int GFX_WritePixel(uaecptr rp, int x, int y); - diff --git a/plugins/uade2/uade-2.13/src/include/readcpu.h b/plugins/uade2/uade-2.13/src/include/readcpu.h deleted file mode 100644 index 62a81c6a..00000000 --- a/plugins/uade2/uade-2.13/src/include/readcpu.h +++ /dev/null @@ -1,99 +0,0 @@ -ENUMDECL { - Dreg, Areg, Aind, Aipi, Apdi, Ad16, Ad8r, - absw, absl, PC16, PC8r, imm, imm0, imm1, imm2, immi, am_unknown, am_illg -} ENUMNAME (amodes); - -ENUMDECL { - i_ILLG, - - i_OR, i_AND, i_EOR, i_ORSR, i_ANDSR, i_EORSR, - i_SUB, i_SUBA, i_SUBX, i_SBCD, - i_ADD, i_ADDA, i_ADDX, i_ABCD, - i_NEG, i_NEGX, i_NBCD, i_CLR, i_NOT, i_TST, - i_BTST, i_BCHG, i_BCLR, i_BSET, - i_CMP, i_CMPM, i_CMPA, - i_MVPRM, i_MVPMR, i_MOVE, i_MOVEA, i_MVSR2, i_MV2SR, - i_SWAP, i_EXG, i_EXT, i_MVMEL, i_MVMLE, - i_TRAP, i_MVR2USP, i_MVUSP2R, i_RESET, i_NOP, i_STOP, i_RTE, i_RTD, - i_LINK, i_UNLK, - i_RTS, i_TRAPV, i_RTR, - i_JSR, i_JMP, i_BSR, i_Bcc, - i_LEA, i_PEA, i_DBcc, i_Scc, - i_DIVU, i_DIVS, i_MULU, i_MULS, - i_ASR, i_ASL, i_LSR, i_LSL, i_ROL, i_ROR, i_ROXL, i_ROXR, - i_ASRW, i_ASLW, i_LSRW, i_LSLW, i_ROLW, i_RORW, i_ROXLW, i_ROXRW, - i_CHK,i_CHK2, - i_MOVEC2, i_MOVE2C, i_CAS, i_CAS2, i_DIVL, i_MULL, - i_BFTST,i_BFEXTU,i_BFCHG,i_BFEXTS,i_BFCLR,i_BFFFO,i_BFSET,i_BFINS, - i_PACK, i_UNPK, i_TAS, i_BKPT, i_CALLM, i_RTM, i_TRAPcc, i_MOVES, - i_FPP, i_FDBcc, i_FScc, i_FTRAPcc, i_FBcc, i_FSAVE, i_FRESTORE, - i_MMUOP -} ENUMNAME (instrmnem); - -extern struct mnemolookup { - instrmnem mnemo; - const char *name; -} lookuptab[]; - -ENUMDECL { - sz_byte, sz_word, sz_long -} ENUMNAME (wordsizes); - -ENUMDECL { - fa_set, fa_unset, fa_zero, fa_one, fa_dontcare, fa_unknown, fa_isjmp -} ENUMNAME (flagaffect); - -ENUMDECL { - fu_used, fu_unused, fu_maybecc, fu_unknown, fu_isjmp -} ENUMNAME (flaguse); - -ENUMDECL { - bit0, bit1, bitc, bitC, bitf, biti, bitI, bitj, bitJ, bitk, bitK, - bits, bitS, bitd, bitD, bitr, bitR, bitz, lastbit -} ENUMNAME (bitvals); - -struct instr_def { - unsigned int bits; - int n_variable; - char bitpos[16]; - unsigned int mask; - int cpulevel; - int plevel; - struct { - unsigned int flaguse:3; - unsigned int flagset:3; - } flaginfo[5]; - unsigned char sduse; - const char *opcstr; -}; - -extern struct instr_def defs68k[]; -extern int n_defs68k; - -extern struct instr { - long int handler; - unsigned char dreg; - unsigned char sreg; - signed char dpos; - signed char spos; - unsigned char sduse; - int flagdead:8, flaglive:8; - unsigned int mnemo:8; - unsigned int cc:4; - unsigned int plev:2; - unsigned int size:2; - unsigned int smode:5; - unsigned int stype:3; - unsigned int dmode:5; - unsigned int suse:1; - unsigned int duse:1; - unsigned int unused1:1; - unsigned int clev:3; - unsigned int unused2:5; -} *table68k; - -extern void read_table68k (void); -extern void do_merges (void); -extern int get_no_mismatches (void); -extern int nr_cpuop_funcs; - diff --git a/plugins/uade2/uade-2.13/src/include/sinctable.h b/plugins/uade2/uade-2.13/src/include/sinctable.h deleted file mode 100644 index 56fb62d7..00000000 --- a/plugins/uade2/uade-2.13/src/include/sinctable.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef _SINCTABLE_H_ -#define _SINCTABLE_H_ - -#define SINC_QUEUE_MAX_AGE 2048 -extern const int winsinc_integral[5][SINC_QUEUE_MAX_AGE]; - -#endif diff --git a/plugins/uade2/uade-2.13/src/include/sysdeps.h b/plugins/uade2/uade-2.13/src/include/sysdeps.h deleted file mode 100644 index 5d407b2d..00000000 --- a/plugins/uade2/uade-2.13/src/include/sysdeps.h +++ /dev/null @@ -1,347 +0,0 @@ - /* - * UAE - The Un*x Amiga Emulator - * - * Try to include the right system headers and get other system-specific - * stuff right & other collected kludges. - * - * If you think about modifying this, think twice. Some systems rely on - * the exact order of the #include statements. That's also the reason - * why everything gets included unconditionally regardless of whether - * it's actually needed by the .c file. - * - * Copyright 1996, 1997 Bernd Schmidt - */ - -/* MODIF PMO */ -#ifndef _H_SYSDEPS -#define _H_SYSDEPS -/* ENDOF MODIF PMO */ - -#include <stdio.h> -#include <stdlib.h> -#include <errno.h> -#include <assert.h> -#include <limits.h> - -#ifndef __STDC__ -#error "Your compiler is not ANSI. Get a real one." -#endif - -#include <stdarg.h> - -#ifdef HAVE_SYS_TYPES_H -#include <sys/types.h> -#endif - -#ifdef HAVE_VALUES_H -#include <values.h> -#endif - -#ifdef HAVE_STRINGS_H -#include <strings.h> -#endif -#ifdef HAVE_STRING_H -#include <string.h> -#endif - -#ifdef HAVE_UNISTD_H -#include <unistd.h> -#endif -#ifdef HAVE_FCNTL_H -#include <fcntl.h> -#endif - -#ifdef HAVE_UTIME_H -#include <utime.h> -#endif - -#ifdef HAVE_SYS_STAT_H -#include <sys/stat.h> -#endif - -#if TIME_WITH_SYS_TIME -# include <sys/time.h> -# include <time.h> -#else -# if HAVE_SYS_TIME_H -# include <sys/time.h> -# else -# include <time.h> -# endif -#endif - -#if HAVE_DIRENT_H -# include <dirent.h> -#else -# define dirent direct -# if HAVE_SYS_NDIR_H -# include <sys/ndir.h> -# endif -# if HAVE_SYS_DIR_H -# include <sys/dir.h> -# endif -# if HAVE_NDIR_H -# include <ndir.h> -# endif -#endif - -#ifdef HAVE_SYS_UTIME_H -# include <sys/utime.h> -#endif - -#include <errno.h> -#include <assert.h> - -#if EEXIST == ENOTEMPTY -#define BROKEN_OS_PROBABLY_AIX -#endif - -#ifdef __NeXT__ -#define S_IRUSR S_IREAD -#define S_IWUSR S_IWRITE -#define S_IXUSR S_IEXEC -#define S_ISDIR(val) (S_IFDIR & val) -struct utimbuf -{ - time_t actime; - time_t modtime; -}; -#endif - -#define REGPARAM2 - -#ifdef __DOS__ -#include <pc.h> -#include <io.h> -#endif - -/* MODIF PMO */ -/* WIN32/UNIX compatibility */ -#ifdef WINDOWS_VCPP - #define COMP_SEPARATOR '\\' - #define COMP_S_SEPARATOR "\\" -#else - #define COMP_SEPARATOR '/' - #define COMP_S_SEPARATOR "/" -#endif -/* ENDOF MODIF PMO */ - -/* Acorn specific stuff */ -#ifdef ACORN - -#define S_IRUSR S_IREAD -#define S_IWUSR S_IWRITE -#define S_IXUSR S_IEXEC - -#define strcasecmp stricmp - -#endif - -#ifndef L_tmpnam -#define L_tmpnam 128 /* ought to be safe */ -#endif - -/* If char has more then 8 bits, good night. */ -typedef unsigned char uae_u8; -typedef signed char uae_s8; - -typedef struct { uae_u8 RGB[3]; } RGB; - -#if SIZEOF_SHORT == 2 -typedef unsigned short uae_u16; -typedef short uae_s16; -#elif SIZEOF_INT == 2 -typedef unsigned int uae_u16; -typedef int uae_s16; -#else -#error No 2 byte type, you lose. -#endif - -#if SIZEOF_INT == 4 -typedef unsigned int uae_u32; -typedef int uae_s32; -#elif SIZEOF_LONG == 4 -typedef unsigned long uae_u32; -typedef long uae_s32; -#else -#error No 4 byte type, you lose. -#endif - -typedef uae_u32 uaecptr; - -#undef uae_s64 -#undef uae_u64 - -#if SIZEOF_LONG_LONG == 8 -#define uae_s64 long long -#define uae_u64 long long -#define VAL64(a) (a ## LL) -#define UVAL64(a) (a ## uLL) -#elif SIZEOF___INT64 == 8 -#define uae_s64 __int64 -#define uae_u64 unsigned __int64 -#define VAL64(a) (a) -#define UVAL64(a) (a) -#elif SIZEOF_LONG == 8 -#define uae_s64 long; -#define uae_u64 unsigned long; -#define VAL64(a) (a ## l) -#define UVAL64(a) (a ## ul) -#endif - -#ifdef HAVE_STRDUP -#define my_strdup strdup -#else -extern char *my_strdup (const char*s); -#endif -extern void *xmalloc(size_t); - -/* We can only rely on GNU C getting enums right. Mickeysoft VSC++ is known - * to have problems, and it's likely that other compilers choke too. */ -#ifdef __GNUC__ -#define ENUMDECL typedef enum -#define ENUMNAME(name) name -#else -#define ENUMDECL enum -#define ENUMNAME(name) ; typedef int name -#endif - -/* - * Porters to weird systems, look! This is the preferred way to get - * filesys.c (and other stuff) running on your system. Define the - * appropriate macros and implement wrappers in a machine-specific file. - * - * I guess the Mac port could use this (Ernesto?) - */ - -#undef DONT_HAVE_POSIX -#undef DONT_HAVE_REAL_POSIX /* define if open+delete doesn't do what it should */ -#undef DONT_HAVE_STDIO -#undef DONT_HAVE_MALLOC - -#if defined _WIN32 - -#if defined __WATCOMC__ - -#define O_NDELAY 0 -#include <direct.h> -#define dirent direct -#define mkdir(a,b) mkdir(a) -#define strcasecmp stricmp - -#elif defined __MINGW32__ - -#define O_NDELAY 0 -#define mkdir(a,b) mkdir(a) - -#endif - -#endif /* _WIN32 */ - -#ifdef DONT_HAVE_POSIX - -#define access posixemu_access -extern int posixemu_access (const char *, int); -#define open posixemu_open -extern int posixemu_open (const char *, int, int); -#define close posixemu_close -extern void posixemu_close (int); -#define read posixemu_read -extern int posixemu_read (int, char *, int); -#define write posixemu_write -extern int posixemu_write (int, const char *, int); -#undef lseek -#define lseek posixemu_seek -extern int posixemu_seek (int, int, int); -#define stat(a,b) posixemu_stat ((a), (b)) -extern int posixemu_stat (const char *, STAT *); -#define mkdir posixemu_mkdir -extern int mkdir (const char *, int); -#define rmdir posixemu_rmdir -extern int posixemu_rmdir (const char *); -#define unlink posixemu_unlink -extern int posixemu_unlink (const char *); -#define truncate posixemu_truncate -extern int posixemu_truncate (const char *, long int); -#define rename posixemu_rename -extern int posixemu_rename (const char *, const char *); -#define chmod posixemu_chmod -extern int posixemu_chmod (const char *, int); -#define tmpnam posixemu_tmpnam -extern void posixemu_tmpnam (char *); -#define utime posixemu_utime -extern int posixemu_utime (const char *, struct utimbuf *); -#define opendir posixemu_opendir -extern DIR * posixemu_opendir (const char *); -#define readdir posixemu_readdir -extern struct dirent* readdir (DIR *); -#define closedir posixemu_closedir -extern void closedir (DIR *); - -/* This isn't the best place for this, but it fits reasonably well. The logic - * is that you probably don't have POSIX errnos if you don't have the above - * functions. */ -extern long dos_errno (void); - -#endif - -#ifdef DONT_HAVE_STDIO - -extern FILE *stdioemu_fopen (const char *, const char *); -#define fopen(a,b) stdioemu_fopen(a, b) -extern int stdioemu_fseek (FILE *, int, int); -#define fseek(a,b,c) stdioemu_fseek(a, b, c) -extern int stdioemu_fread (char *, int, int, FILE *); -#define fread(a,b,c,d) stdioemu_fread(a, b, c, d) -extern int stdioemu_fwrite (const char *, int, int, FILE *); -#define fwrite(a,b,c,d) stdioemu_fwrite(a, b, c, d) -extern int stdioemu_ftell (FILE *); -#define ftell(a) stdioemu_ftell(a) -extern int stdioemu_fclose (FILE *); -#define fclose(a) stdioemu_fclose(a) - -#endif - -#ifdef DONT_HAVE_MALLOC - -#define malloc(a) mallocemu_malloc(a) -extern void *mallocemu_malloc (int size); -#define free(a) mallocemu_free(a) -extern void mallocemu_free (void *ptr); - -#endif - -#ifdef X86_ASSEMBLY -#define ASM_SYM_FOR_FUNC(a) __asm__(a) -#else -#define ASM_SYM_FOR_FUNC(a) -#endif - -#if defined USE_COMPILER -#undef NO_PREFETCH_BUFFER -#undef NO_EXCEPTION_3 -#define NO_EXCEPTION_3 -#define NO_PREFETCH_BUFFER -#endif - -#include "target.h" - -#ifndef O_BINARY -#define O_BINARY 0 -#endif - -/* Every Amiga hardware clock cycle takes this many "virtual" cycles. This - used to be hardcoded as 1, but using higher values allows us to time some - stuff more precisely. - 512 is the official value from now on - it can't change, unless we want - _another_ config option "finegrain2_m68k_speed". - - We define this value here rather than in events.h so that gencpu.c sees - it. */ -#define CYCLE_UNIT 512 - -/* MODIF PMO */ -#endif - -/* ENDOF MODIF PMO */ - diff --git a/plugins/uade2/uade-2.13/src/include/text_scope.h b/plugins/uade2/uade-2.13/src/include/text_scope.h deleted file mode 100644 index 7bc9d206..00000000 --- a/plugins/uade2/uade-2.13/src/include/text_scope.h +++ /dev/null @@ -1,21 +0,0 @@ -#ifndef _TEXT_SCOPE_H_ -#define _TEXT_SCOPE_H_ - -#include "uadeconfig.h" - -#ifdef UADE_CONFIG_TEXT_SCOPE -#define TEXT_SCOPE(cycles, voice, e, value) \ - do { \ - if (use_text_scope) \ - text_scope(cycles, voice, e, value); \ - } while (0) -#else -#define TEXT_SCOPE(cycles, voice, e, value) do {} while (0) -#endif - -enum PaulaEventType {PET_VOL, PET_PER, PET_DAT, PET_LEN, PET_LCH, PET_LCL}; - -void text_scope(unsigned long cycles, int voice, enum PaulaEventType e, - int value); - -#endif diff --git a/plugins/uade2/uade-2.13/src/include/uade.h b/plugins/uade2/uade-2.13/src/include/uade.h deleted file mode 100644 index 91f590fe..00000000 --- a/plugins/uade2/uade-2.13/src/include/uade.h +++ /dev/null @@ -1,43 +0,0 @@ -#ifndef _UADE_MAIN_H_ -#define _UADE_MAIN_H_ - -#include <limits.h> -#include <stdlib.h> - -#include "uadeipc.h" - -struct uade_song { - char playername[PATH_MAX]; /* filename of eagleplayer */ - char modulename[PATH_MAX]; /* filename of song */ - char scorename[PATH_MAX]; /* filename of score file */ - - int min_subsong; - int max_subsong; - int cur_subsong; -}; - - -void uade_change_subsong(int subs); -void uade_check_sound_buffers(int bytes); -void uade_send_debug(const char *fmt, ...); -void uade_get_amiga_message(void); -void uade_handle_r_state(void); -void uade_option(int, char**); /* handles command line parameters */ -void uade_reset(void); -void uade_send_amiga_message(int msgtype); -void uade_set_automatic_song_end(int song_end_possible); -void uade_set_ntsc(int usentsc); -void uade_song_end(char *reason, int kill_it); -void uade_swap_buffer_bytes(void *data, int bytes); - -extern int uade_audio_output; -extern int uade_audio_skip; -extern int uade_debug; -extern int uade_local_sound; -extern int uade_read_size; -extern int uade_reboot; -extern int uade_time_critical; - -extern struct uade_ipc uadeipc; - -#endif diff --git a/plugins/uade2/uade-2.13/src/include/uadeconstants.h b/plugins/uade2/uade-2.13/src/include/uadeconstants.h deleted file mode 100644 index 5a69953a..00000000 --- a/plugins/uade2/uade-2.13/src/include/uadeconstants.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef _UADE_CONSTANTS_H_ -#define _UADE_CONSTANTS_H_ - -/* You must not change anything */ -#define UADE_CHANNELS (2) -#define UADE_DEFAULT_FREQUENCY (44100) -#define UADE_BYTES_PER_SAMPLE (2) -#define UADE_BYTES_PER_FRAME (UADE_CHANNELS * UADE_BYTES_PER_SAMPLE) - -#endif diff --git a/plugins/uade2/uade-2.13/src/include/uadeipc.h b/plugins/uade2/uade-2.13/src/include/uadeipc.h deleted file mode 100644 index 3bad980b..00000000 --- a/plugins/uade2/uade-2.13/src/include/uadeipc.h +++ /dev/null @@ -1,77 +0,0 @@ -#ifndef _UADEIPC_H_ -#define _UADEIPC_H_ - -#include <stdlib.h> -#include <stdint.h> - -#include "uadeutils.h" - -#define UADE_MAX_MESSAGE_SIZE (4096) - -enum uade_msgtype { - UADE_MSG_FIRST = 0, - UADE_COMMAND_ACTIVATE_DEBUGGER, - UADE_COMMAND_CHANGE_SUBSONG, - UADE_COMMAND_CONFIG, - UADE_COMMAND_SCORE, - UADE_COMMAND_PLAYER, - UADE_COMMAND_MODULE, - UADE_COMMAND_READ, - UADE_COMMAND_REBOOT, - UADE_COMMAND_SET_SUBSONG, - UADE_COMMAND_IGNORE_CHECK, - UADE_COMMAND_SONG_END_NOT_POSSIBLE, - UADE_COMMAND_SET_NTSC, - UADE_COMMAND_FILTER, - UADE_COMMAND_SET_FREQUENCY, - UADE_COMMAND_SET_PLAYER_OPTION, - UADE_COMMAND_SET_RESAMPLING_MODE, - UADE_COMMAND_SPEED_HACK, - UADE_COMMAND_TOKEN, - UADE_COMMAND_USE_TEXT_SCOPE, - UADE_REPLY_MSG, - UADE_REPLY_CANT_PLAY, - UADE_REPLY_CAN_PLAY, - UADE_REPLY_SONG_END, - UADE_REPLY_SUBSONG_INFO, - UADE_REPLY_PLAYERNAME, - UADE_REPLY_MODULENAME, - UADE_REPLY_FORMATNAME, - UADE_REPLY_DATA, - UADE_MSG_LAST -}; - -struct uade_msg { - uint32_t msgtype; - uint32_t size; - uint8_t data[0]; -} __attribute__((packed)); - -enum uade_control_state { - UADE_INITIAL_STATE = 0, - UADE_R_STATE, - UADE_S_STATE -}; - -struct uade_ipc { - void *input; - void *output; - unsigned int inputbytes; - char inputbuffer[UADE_MAX_MESSAGE_SIZE]; - enum uade_control_state state; -}; - -void uade_check_fix_string(struct uade_msg *um, size_t maxlen); -int uade_parse_u32_message(uint32_t *u1, struct uade_msg *um); -int uade_parse_two_u32s_message(uint32_t *u1, uint32_t *u2, struct uade_msg *um); -int uade_receive_message(struct uade_msg *um, size_t maxbytes, struct uade_ipc *ipc); -int uade_receive_short_message(enum uade_msgtype msgtype, struct uade_ipc *ipc); -int uade_receive_string(char *s, enum uade_msgtype msgtype, size_t maxlen, struct uade_ipc *ipc); -int uade_send_message(struct uade_msg *um, struct uade_ipc *ipc); -int uade_send_short_message(enum uade_msgtype msgtype, struct uade_ipc *ipc); -int uade_send_string(enum uade_msgtype msgtype, const char *str, struct uade_ipc *ipc); -int uade_send_u32(enum uade_msgtype com, uint32_t u, struct uade_ipc *ipc); -int uade_send_two_u32s(enum uade_msgtype com, uint32_t u1, uint32_t u2, struct uade_ipc *ipc); -void uade_set_peer(struct uade_ipc *ipc, int peer_is_client, const char *input, const char *output); - -#endif diff --git a/plugins/uade2/uade-2.13/src/include/uadeutils.h b/plugins/uade2/uade-2.13/src/include/uadeutils.h deleted file mode 100644 index fcd24233..00000000 --- a/plugins/uade2/uade-2.13/src/include/uadeutils.h +++ /dev/null @@ -1,27 +0,0 @@ -#ifndef _UADE_UTILS_H_ -#define _UADE_UTILS_H_ - -#include <stdint.h> - -#define uade_error(fmt, args...) do { \ - fprintf(stderr, "%s:%d: %s: " fmt, __FILE__, __LINE__, __func__, ## args); \ - abort(); \ - } while (0) - -static inline uint16_t read_be_u16(void *s) -{ - uint16_t x; - uint8_t *ptr = (uint8_t *) s; - x = ptr[1] + (ptr[0] << 8); - return x; -} - -static inline uint32_t read_be_u32(void *s) -{ - uint32_t x; - uint8_t *ptr = (uint8_t *) s; - x = (ptr[0] << 24) + (ptr[1] << 16) + (ptr[2] << 8) + ptr[3]; - return x; -} - -#endif diff --git a/plugins/uade2/uade-2.13/src/include/uae.h b/plugins/uade2/uade-2.13/src/include/uae.h deleted file mode 100644 index 1ab9d75f..00000000 --- a/plugins/uade2/uade-2.13/src/include/uae.h +++ /dev/null @@ -1,30 +0,0 @@ - /* - * UAE - The Un*x Amiga Emulator - * - * Prototypes for main.c - * - * Copyright 1996 Bernd Schmidt - */ - -extern int uade_main (int argc, char **argv); -extern void uae_quit (void); - -extern int quit_program; - -extern char warning_buffer[256]; - -/* This structure is used to define menus. The val field can hold key - * shortcuts, or one of these special codes: - * -4: deleted entry, not displayed, not selectable, but does count in - * select value - * -3: end of table - * -2: line that is displayed, but not selectable - * -1: line that is selectable, but has no keyboard shortcut - * 0: Menu title - */ -struct bstring { - const char *data; - int val; -}; - -extern char *colormodes[]; diff --git a/plugins/uade2/uade-2.13/src/include/unixatomic.h b/plugins/uade2/uade-2.13/src/include/unixatomic.h deleted file mode 100644 index 565cf864..00000000 --- a/plugins/uade2/uade-2.13/src/include/unixatomic.h +++ /dev/null @@ -1,15 +0,0 @@ -#ifndef _UNIXATOMIC_H_ -#define _UNIXATOMIC_H_ - -#include <stdlib.h> -#include <stdio.h> -#include <unistd.h> - -int atomic_close(int fd); -int atomic_dup2(int oldfd, int newfd); -size_t atomic_fread(void *ptr, size_t size, size_t nmemb, FILE *stream); -ssize_t atomic_read(int fd, const void *buf, size_t count); -void *atomic_read_file(size_t *fs, const char *filename); -ssize_t atomic_write(int fd, const void *buf, size_t count); - -#endif diff --git a/plugins/uade2/uade-2.13/src/include/unixsupport.h b/plugins/uade2/uade-2.13/src/include/unixsupport.h deleted file mode 100644 index dc7d545e..00000000 --- a/plugins/uade2/uade-2.13/src/include/unixsupport.h +++ /dev/null @@ -1,32 +0,0 @@ -#ifndef _UADE_UNIXSUPPORT_H_ -#define _UADE_UNIXSUPPORT_H_ - -#include <stdlib.h> -#include <stdio.h> -#include <sys/types.h> -#include <string.h> -#include <errno.h> - -#include "uadeipc.h" - - -#define die(fmt, args...) do { fprintf(stderr, "uade: " fmt, ## args); exit(1); } while(0) - -#define dieerror(fmt, args...) do { fprintf(stderr, "uade: " fmt ": %s\n", ## args, strerror(errno)); exit(1); } while(0) - - -char *uade_dirname(char *dst, char *src, size_t maxlen); -FILE *uade_open_amiga_file(char *aname, const char *playerdir); -void uade_portable_initializations(void); -void uade_arch_spawn(struct uade_ipc *ipc, pid_t *uadepid, const char *uadename); - -/* These read and write functions MUST read and write the full size_t amount - if they are able to. */ -ssize_t uade_ipc_read(void *f, const void *buf, size_t count); -ssize_t uade_ipc_write(void *f, const void *buf, size_t count); -void *uade_ipc_set_input(const char *input); -void *uade_ipc_set_output(const char *output); - -char *windows_to_cygwin_path(const char *path); - -#endif |