]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
header guards, include uae/types.h, a few related changes
authorFrode Solheim <frode@fs-uae.net>
Fri, 4 Sep 2015 16:59:30 +0000 (09:59 -0700)
committerFrode Solheim <frode@fs-uae.net>
Fri, 4 Sep 2015 17:01:31 +0000 (19:01 +0200)
116 files changed:
bsdsocket.cpp
include/a2065.h
include/a2091.h
include/akiko.h
include/amax.h
include/ar.h
include/arcadia.h
include/audio.h
include/autoconf.h
include/blitter.h
include/blkdev.h
include/bsdsocket.h
include/calc.h
include/catweasel.h
include/cd32_fmv.h
include/cdtv.h
include/cdtvcr.h
include/cia.h
include/clipboard.h
include/commpipe.h
include/consolehook.h
include/cpu_prefetch.h
include/cpuboard.h
include/cpummu.h
include/cpummu030.h
include/crc32.h
include/custom.h
include/debug.h
include/devices.h
include/disk.h
include/diskutil.h
include/dongle.h
include/drawing.h
include/driveclick.h
include/enforcer.h
include/epsonprinter.h
include/ersatz.h
include/events.h
include/execio.h
include/execlib.h
include/fdi2raw.h
include/filesys.h
include/flags_x86.h
include/flashrom.h
include/fpp-ieee-be.h
include/fpp-unknown.h
include/fsdb.h
include/fsusage.h
include/gayle.h
include/genblitter.h
include/gensound.h
include/gfxfilter.h
include/gui.h
include/ide.h
include/idecontrollers.h
include/identify.h
include/inputdevice.h
include/inputrecord.h
include/isofs_api.h
include/keyboard.h
include/keybuf.h
include/luascript.h
include/mackbd.h
include/memory.h
include/mmu_common.h
include/moduleripper.h
include/native2amiga.h
include/native2amiga_api.h
include/ncr9x_scsi.h
include/ncr_scsi.h
include/newcpu.h
include/options.h
include/osemu.h
include/packed.h
include/parallel.h
include/pci.h
include/pci_hw.h
include/picasso96.h
include/readcpu.h
include/rtgmodes.h
include/sampler.h
include/sana2.h
include/savestate.h
include/scp.h
include/scsi.h
include/scsidev.h
include/serial.h
include/sndboard.h
include/specialmonitors.h
include/statusline.h
include/sysdeps.h
include/tabletlibrary.h
include/traps.h
include/uae.h
include/uae/attributes.h
include/uae/cdrom.h
include/uae/dlopen.h
include/uae/likely.h [new file with mode: 0644]
include/uae/log.h
include/uae/ppc.h
include/uae/qemu.h
include/uae/types.h
include/uaeexe.h
include/uaeipc.h
include/uaenative.h
include/uaeresource.h
include/uaeserial.h
include/uni_common.h
include/unpacked.h
include/x86.h
include/xwin.h
include/zarchive.h
include/zfile.h
memory.cpp
od-win32/parser.cpp
uaeserial.cpp

index a86c3e491da081be0369dd308a1cdd216917e49c..0f3282bcdddd43d59eec9c2b1502f3a783d707ce 100644 (file)
@@ -158,7 +158,7 @@ uae_u32 callfdcallback (TrapContext *context, SB, uae_u32 fd, uae_u32 action)
        return v;
 }
 
-BOOL checksd(TrapContext *context, SB, int sd)
+bool checksd(TrapContext *context, SB, int sd)
 {
        int iCounter;
        SOCKET s;
index a61c0c96ad647fdd91251fe44934f8ff6cd561d8..bced619ade8e0008c643e8f89e6cd34fc8ecc86a 100644 (file)
@@ -1,3 +1,5 @@
+#ifndef UAE_A2065_H
+#define UAE_A2065_H
 
 #ifdef A2065
 
@@ -10,3 +12,4 @@ extern void rethink_a2065 (void);
 
 #endif
 
+#endif /* UAE_A2065_H */
index 084019742670167e0500c9a1c1ce60107b8a31af..f59b488a7d0a90c2f3db973c40c97b484e12bdc2 100644 (file)
@@ -1,6 +1,5 @@
-
-#ifndef A2091_H
-#define A2091_H
+#ifndef UAE_A2091_H
+#define UAE_A2091_H
 
 #ifdef A2091
 
@@ -147,6 +146,6 @@ extern int add_wd_scsi_hd (struct wd_state *wd, int ch, struct hd_hardfiledata *
 extern int add_wd_scsi_cd (struct wd_state *wd, int ch, int unitnum);
 extern int add_wd_scsi_tape (struct wd_state *wd, int ch, const TCHAR *tape_directory, bool readonly);
 
-#endif
+#endif /* A2091 */
 
-#endif /* A2091H */
+#endif /* UAE_A2091_H */
index a8229245161f5a8e739721e64df2e381d0b9f876..07c5c9e91db289076d48469d93322189941e317d 100644 (file)
@@ -1,4 +1,5 @@
-
+#ifndef UAE_AKIKO_H
+#define UAE_AKIKO_H
 
 #define AKIKO_BASE 0xb80000
 #define AKIKO_BASE_END 0xb80100 /* ?? */
@@ -11,3 +12,5 @@ extern void AKIKO_hsync_handler (void);
 extern void akiko_mute (int);
 
 extern void rethink_akiko (void);
+
+#endif /* UAE_AKIKO_H */
index eec6ea8c68a7482e1fbe47309628eb5d235d82a0..0334941cf441164212c9b401b82844fa0fc199fd 100644 (file)
@@ -1,3 +1,7 @@
+#ifndef UAE_AMAX_H
+#define UAE_AMAX_H
+
+#include "uae/types.h"
 
 void amax_diskwrite (uae_u16 w);
 void amax_bfe001_write (uae_u8 pra, uae_u8 dra);
@@ -6,3 +10,5 @@ void amax_disk_select (uae_u8 v, uae_u8 ov, int);
 void amax_reset (void);
 void amax_init (void);
 bool amax_active(void);
+
+#endif /* UAE_AMAX_H */
index b1cb263a1ffdf1ea444177d2a5c8489c7d924659..eab7d56cca6cda90c48b1ccf6c34f1a6418077d9 100644 (file)
@@ -1,3 +1,7 @@
+#ifndef UAE_AR_H
+#define UAE_AR_H
+
+#include "uae/types.h"
 
 /* disable HRTMon support by commenting this out */
 #define ACTION_REPLAY_HRTMON
@@ -67,3 +71,5 @@ extern uae_u32 hrtmem_start, hrtmem_size;
 extern uae_u8 ar_custom[2*256], ar_ciaa[16], ar_ciab[16];
 
 extern int hrtmon_lang;
+
+#endif /* UAE_AR_H */
index 9225d230253f989cad43348c3240d9c2d0c4ab0c..d82a3b20361c4a4b64fa879ebc82a08c715aa000 100644 (file)
@@ -28,6 +28,6 @@ extern int arcadia_flag, arcadia_coin[2];
 #define ARCADIA_BIOS 1
 #define ARCADIA_GAME 2
 
-#endif
+#endif /* ARCADIA */
 
-#endif // UAE_ARCADIA_H
+#endif /* UAE_ARCADIA_H */
index b3c9c50c2270cb82c78202977f51e88e3e0a4750..dd9ea983bcaa58a50370e52e3dfc8ff7aeceed0b 100644 (file)
@@ -1,49 +1,53 @@
- /*
-  * UAE - The Un*x Amiga Emulator
-  *
-  * Sound emulation stuff
-  *
-  * Copyright 1995, 1996, 1997 Bernd Schmidt
-  */
+/*
+ * UAE - The Un*x Amiga Emulator
+ *
+ * Sound emulation stuff
+ *
+ * Copyright 1995, 1996, 1997 Bernd Schmidt
+ */
+
+#ifndef UAE_AUDIO_H
+#define UAE_AUDIO_H
+
+#include "uae/types.h"
 
 #define PERIOD_MAX ULONG_MAX
 #define MAX_EV ~0u
 
-extern void aud0_handler (void);
-extern void aud1_handler (void);
-extern void aud2_handler (void);
-extern void aud3_handler (void);
-
-extern void AUDxDAT (int nr, uae_u16 value);
-extern void AUDxDAT (int nr, uae_u16 value, uaecptr addr);
-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);
-
-extern uae_u16 audio_dmal (void);
-extern void audio_state_machine (void);
-extern uaecptr audio_getpt (int nr, bool reset);
-
-extern int init_audio (void);
-extern void ahi_install (void);
-extern void audio_reset (void);
-extern void update_audio (void);
-extern void audio_evhandler (void);
-extern void audio_hsync (void);
-extern void audio_update_adkmasks (void);
-extern void update_sound (double clk);
-extern void update_cda_sound (double clk);
-extern void led_filter_audio (void);
-extern void set_audio (void);
-extern int audio_activate (void);
-extern void audio_deactivate (void);
-extern void audio_vsync (void);
-
-extern void audio_sampleripper(int);
+void aud0_handler (void);
+void aud1_handler (void);
+void aud2_handler (void);
+void aud3_handler (void);
+
+void AUDxDAT (int nr, uae_u16 value);
+void AUDxDAT (int nr, uae_u16 value, uaecptr addr);
+void AUDxVOL (int nr, uae_u16 value);
+void AUDxPER (int nr, uae_u16 value);
+void AUDxLCH (int nr, uae_u16 value);
+void AUDxLCL (int nr, uae_u16 value);
+void AUDxLEN (int nr, uae_u16 value);
+
+uae_u16 audio_dmal (void);
+void audio_state_machine (void);
+uaecptr audio_getpt (int nr, bool reset);
+int init_audio (void);
+void ahi_install (void);
+void audio_reset (void);
+void update_audio (void);
+void audio_evhandler (void);
+void audio_hsync (void);
+void audio_update_adkmasks (void);
+void update_sound (double clk);
+void update_cda_sound (double clk);
+void led_filter_audio (void);
+void set_audio (void);
+int audio_activate (void);
+void audio_deactivate (void);
+void audio_vsync (void);
+void audio_sampleripper(int);
+void write_wavheader (struct zfile *wavfile, uae_u32 size, uae_u32 freq);
+
 extern int sampleripper_enabled;
-extern void write_wavheader (struct zfile *wavfile, uae_u32 size, uae_u32 freq);
 
 extern void audio_update_sndboard(unsigned int);
 extern void audio_enable_sndboard(bool);
@@ -65,40 +69,51 @@ extern int sound_paula_volume[2];
 #define AUDIO_CHANNEL_CDA_RIGHT 7
 
 enum {
-    SND_MONO, SND_STEREO, SND_4CH_CLONEDSTEREO, SND_4CH, SND_6CH_CLONEDSTEREO, SND_6CH, SND_NONE };
-STATIC_INLINE int get_audio_stereomode (int channels)
+       SND_MONO,
+       SND_STEREO,
+       SND_4CH_CLONEDSTEREO,
+       SND_4CH,
+       SND_6CH_CLONEDSTEREO,
+       SND_6CH,
+       SND_NONE
+};
+
+static inline int get_audio_stereomode (int channels)
 {
-    switch (channels)
-    {
+       switch (channels)
+       {
        case 1:
-       return SND_MONO;
+               return SND_MONO;
        case 2:
-       return SND_STEREO;
+               return SND_STEREO;
        case 4:
-       return SND_4CH;
+               return SND_4CH;
        case 6:
-       return SND_6CH;
-    }
-    return SND_STEREO;
+               return SND_6CH;
+       }
+       return SND_STEREO;
 }
+
 STATIC_INLINE int get_audio_nativechannels (int stereomode)
 {
-    int ch[] = { 1, 2, 4, 4, 6, 6, 0 };
-    return ch[stereomode];
+       int ch[] = { 1, 2, 4, 4, 6, 6, 0 };
+       return ch[stereomode];
 }
+
 STATIC_INLINE int get_audio_amigachannels (int stereomode)
 {
-    int ch[] = { 1, 2, 2, 4, 2, 4, 0 };
-    return ch[stereomode];
+       int ch[] = { 1, 2, 2, 4, 2, 4, 0 };
+       return ch[stereomode];
 }
+
 STATIC_INLINE int get_audio_ismono (int stereomode)
 {
-    if (stereomode == 0)
-       return 1;
-    return 0;
+       return stereomode == 0;
 }
 
- #define SOUND_MAX_DELAY_BUFFER 1024
- #define SOUND_MAX_LOG_DELAY 10
- #define MIXED_STEREO_MAX 16
- #define MIXED_STEREO_SCALE 32
+#define SOUND_MAX_DELAY_BUFFER 1024
+#define SOUND_MAX_LOG_DELAY 10
+#define MIXED_STEREO_MAX 16
+#define MIXED_STEREO_SCALE 32
+
+#endif /* UAE_AUDIO_H */
index feae86c8d8be944aaced94224e2d22ad441fe7a2..27e917536298c0a22d8e33a50ee9869d704e9b90 100644 (file)
@@ -6,6 +6,11 @@
   * (c) 1996 Ed Hanway
   */
 
+#ifndef UAE_AUTOCONF_H
+#define UAE_AUTOCONF_H
+
+#include "uae/types.h"
+
 #define RTAREA_DEFAULT 0xf00000
 #define RTAREA_BACKUP  0xef0000
 #define RTAREA_BACKUP_2 0xdb0000
@@ -31,6 +36,7 @@ extern uaecptr makedatatable (uaecptr resid, uaecptr resname, uae_u8 type, uae_s
 extern void align (int);
 
 extern volatile int uae_int_requested, uaenet_int_requested;
+extern volatile int uaenet_vsync_requested;
 extern void set_uae_int_flag (void);
 
 #define RTS 0x4e75
@@ -102,7 +108,6 @@ extern void uaegfx_install_code (uaecptr);
 
 extern uae_u32 emulib_target_getcpurate (uae_u32, uae_u32*);
 
-
 typedef addrbank*(*DEVICE_INIT)(struct romconfig*);
 typedef void(*DEVICE_ADD)(int, struct uaedev_config_info*, struct romconfig*);
 typedef bool(*E8ACCESS)(int, uae_u32*, int, bool);
@@ -190,3 +195,5 @@ struct cpuboardtype
        int defaultsubtype;
 };
 extern const struct cpuboardtype cpuboards[];
+
+#endif /* UAE_AUTOCONF_H */
index c9c80b470479be4f8a9006f9355e499f48b9e9ee..7bb7492725f4b798f39282f2a128d7b7ab24092e 100644 (file)
@@ -6,6 +6,11 @@
   * (c) 1995 Bernd Schmidt
   */
 
+#ifndef UAE_BLITTER_H
+#define UAE_BLITTER_H
+
+#include "uae/types.h"
+
 struct bltinfo {
     int blitzero;
     int blitashift, blitbshift, blitdownashift, blitdownbshift;
@@ -60,3 +65,5 @@ extern uae_u32 blit_masktable[BLITTER_MAX_WORDS];
 #define BLIT_MODE_APPROXIMATE 0
 #define BLIT_MODE_COMPATIBLE 1
 #define BLIT_MODE_EXACT 2
+
+#endif /* UAE_BLITTER_H */
index fb1df03af3bbf75110c70207c3c560d9f453906a..7a96a005e60491e31445210b602963692afd2505 100644 (file)
@@ -1,6 +1,8 @@
 #ifndef UAE_BLKDEV_H
 #define UAE_BLKDEV_H
 
+#include "uae/types.h"
+
 #define DEVICE_SCSI_BUFSIZE (65536 - 1024)
 
 #define SCSI_UNIT_DISABLED -1
index 27d4c21c928ff6a04cb6b4ab66e96a49a34151e7..a250fabf68fa443eae30fe4e4153c74d27acea1e 100644 (file)
@@ -7,6 +7,11 @@
   *
   */
 
+#ifndef UAE_BSDSOCKET_H
+#define UAE_BSDSOCKET_H
+
+#include "uae/types.h"
+
 #define BSD_TRACING_ENABLED 0
 
 extern int log_bsd;
@@ -138,7 +143,6 @@ uae_u32 addmem (uae_u32 * dst, const uae_char *src, int len);
 extern void bsdsocklib_seterrno (SB, int);
 extern void bsdsocklib_setherrno (SB, int);
 
-extern void sockmsg (unsigned int, WPARAM, LPARAM);
 extern void sockabort (SB);
 
 extern void addtosigqueue (SB, int);
@@ -147,7 +151,7 @@ extern void sigsockettasks (void);
 extern void locksigqueue (void);
 extern void unlocksigqueue (void);
 
-extern BOOL checksd(TrapContext*, SB, int sd);
+extern bool checksd(TrapContext*, SB, int sd);
 extern void setsd(TrapContext*, SB, int , SOCKET_TYPE);
 extern int getsd (TrapContext*, SB, SOCKET_TYPE);
 extern SOCKET_TYPE getsock (SB, int);
@@ -203,3 +207,9 @@ extern uae_u32 callfdcallback (TrapContext *context, SB, uae_u32 fd, uae_u32 act
 extern uaecptr bsdlib_startup (uaecptr);
 extern void bsdlib_install (void);
 extern void bsdlib_reset (void);
+
+void bsdsock_fake_int_handler(void);
+
+extern int volatile bsd_int_requested;
+
+#endif /* UAE_BSDSOCKET_H */
index be732348953eb0a9e7b83d63de258f468c6bb6c0..33ae11a25d4b84c6a98d2f7828224402cd17ff3a 100644 (file)
@@ -1,3 +1,9 @@
+#ifndef UAE_CALC_H
+#define UAE_CALC_H
+
+#include "uae/types.h"
 
 extern bool calc(const TCHAR *input, double *outval);
 extern bool iscalcformula (const TCHAR *formula);
+
+#endif /* UAE_CALC_H */
index acee5bd8ef0508fa6b392eebed5dcc44f10ca5d7..62ec613e5b92c6379c1a99d9b0c6a22ea1b5fc73 100644 (file)
@@ -1,3 +1,5 @@
+#ifndef UAE_CATWEASEL_H
+#define UAE_CATWEASEL_H
 
 #ifdef CATWEASEL
 
@@ -92,4 +94,6 @@ int catweasel_diskready(catweasel_drive *d);
 int catweasel_track0(catweasel_drive *d);
 
 
-#endif
+#endif /* CATWEASEL */
+
+#endif /* UAE_CATWEASEL_H */
index c54d9a6dcf3110259d8bdedc0645e3df9c0aa342..96adc99efd35bd87e25cf82f9371a78854bfcf7d 100644 (file)
@@ -1,3 +1,7 @@
+#ifndef UAE_CD32_FMV_H
+#define UAE_CD32_FMV_H
+
+#include "uae/types.h"
 
 extern addrbank *cd32_fmv_init (uaecptr);
 extern void cd32_fmv_reset(void);
@@ -13,3 +17,5 @@ extern void cd32_fmv_new_border_color(uae_u32);
 extern void cd32_fmv_set_sync(double svpos, double adjust);
 
 extern int cd32_fmv_active;
+
+#endif /* UAE_CD32_FMV_H */
index 181d3796da8e44dd19115945655bde5cd8b88230..9b90d6f925346b80f886caef3b7b5c74420cac3a 100644 (file)
@@ -1,3 +1,7 @@
+#ifndef UAE_CDTV_H
+#define UAE_CDTV_H
+
+#include "uae/types.h"
 
 #ifdef CDTV
 
@@ -25,5 +29,6 @@ extern void cdtv_scsi_clear_int (void);
 
 extern bool cdtv_front_panel (int);
 
-#endif
+#endif /* CDTV */
 
+#endif /* UAE_CDTV_H */
index 99f19d843e74957737dbbce4104969cdac1c07c5..473ae98fdba62a1b3c201ed45c70eb293fb65a43 100644 (file)
@@ -1,3 +1,5 @@
+#ifndef UAE_CDTVCR_H
+#define UAE_CDTVCR_H
 
 void cdtvcr_reset(void);
 void cdtvcr_free(void);
@@ -5,3 +7,4 @@ void rethink_cdtvcr(void);
 
 extern void CDTVCR_hsync_handler(void);
 
+#endif /* UAE_CDTVCR_H */
index 3dae1157363459b3c9561c453801347741d53ac2..1b4ee43a0655f8d3520652efb5dfa2d8272f26c5 100644 (file)
@@ -6,6 +6,11 @@
   * (c) 1995 Bernd Schmidt
   */
 
+#ifndef UAE_CIA_H
+#define UAE_CIA_H
+
+#include "uae/types.h"
+
 extern void CIA_reset (void);
 extern void CIA_vsync_prehandler (void);
 extern void CIA_hsync_prehandler (void);
@@ -22,6 +27,7 @@ extern void dumpcia (void);
 extern void rethink_cias (void);
 extern int resetwarning_do (int);
 extern void cia_set_overlay (bool);
+void cia_heartbeat (void);
 
 extern int parallel_direct_write_data (uae_u8, uae_u8);
 extern int parallel_direct_read_data (uae_u8*);
@@ -29,3 +35,5 @@ extern int parallel_direct_write_status (uae_u8, uae_u8);
 extern int parallel_direct_read_status (uae_u8*);
 
 extern void rtc_hardreset (void);
+
+#endif /* UAE_CIA_H */
index 148bcfe8d920aed474c8d0d02556b84d18bd48c2..00c46d7554e92a3a6dbacef73ee4d6c24b479b5c 100644 (file)
@@ -1,3 +1,7 @@
+#ifndef UAE_CLIPBOARD_H
+#define UAE_CLIPBOARD_H
+
+#include "uae/types.h"
 
 extern int amiga_clipboard_want_data (void);
 extern void amiga_clipboard_got_data (uaecptr data, uae_u32 size, uae_u32 actual);
@@ -6,4 +10,6 @@ extern void amiga_clipboard_init (void);
 extern uaecptr amiga_clipboard_proc_start (void);
 extern void amiga_clipboard_task_start (uaecptr);
 extern void clipboard_disable (bool);
-extern void clipboard_vsync (void);
\ No newline at end of file
+extern void clipboard_vsync (void);
+
+#endif /* UAE_CLIPBOARD_H */
index 9c44f41e539e26ce0ac5a87e10725f19a48c4c86..f8bd100f7b46ef723996c6e52fa1d929e62cc794 100644 (file)
@@ -6,6 +6,11 @@
   * Copyright 1997, 2001 Bernd Schmidt
   */
 
+#ifndef UAE_COMMPIPE_H
+#define UAE_COMMPIPE_H
+
+#include "uae/types.h"
+
 typedef union {
     int i;
     uae_u32 u32;
@@ -154,3 +159,5 @@ STATIC_INLINE void write_comm_pipe_pvoid (smp_comm_pipe *p, void *data, int no_b
     foo.pv = data;
     write_comm_pipe_pt (p, foo, no_buffer);
 }
+
+#endif /* UAE_COMMPIPE_H */
index 4a5b2137f4e7aaf51c87adf432e32f3a78e63e25..05110a8fb99d07ee9f306f04eeebe4edc170eef4 100644 (file)
@@ -1,5 +1,11 @@
+#ifndef UAE_CONSOLEHOOK_H
+#define UAE_CONSOLEHOOK_H
+
+#include "uae/types.h"
 
 int consolehook_activate (void);
 void consolehook_ret (uaecptr condev, uaecptr oldbeginio);
 uaecptr consolehook_beginio (uaecptr request);
 void consolehook_config (struct uae_prefs *p);
+
+#endif /* UAE_CONSOLEHOOK_H */
index c479346d99cea3f05021d63c8d94022a2ad3bdfe..acf9e5b11610f47143d6fd59d2050141f1a96016 100644 (file)
@@ -1,3 +1,7 @@
+#ifndef UAE_CPU_PREFETCH_H
+#define UAE_CPU_PREFETCH_H
+
+#include "uae/types.h"
 
 #ifdef CPUEMU_20
 
@@ -502,3 +506,5 @@ STATIC_INLINE uae_u32 get_disp_ea_000 (uae_u32 base, uae_u32 dp)
                regd = (uae_s32)(uae_s16)regd;
        return base + (uae_s8)dp + regd;
 }
+
+#endif /* UAE_CPU_PREFETCH_H */
index 5aa0f3158e0029abc040a1177d11407c55117308..e788612edb5dacd939b4cfb726ce488bc435c917 100644 (file)
@@ -1,3 +1,7 @@
+#ifndef UAE_CPUBOARD_H
+#define UAE_CPUBOARD_H
+
+#include "uae/types.h"
 
 extern addrbank *cpuboard_autoconfig_init(struct romconfig*);
 extern bool cpuboard_maprom(void);
@@ -27,6 +31,10 @@ extern uae_u32 cyberstorm_scsi_ram_get(uaecptr addr);
 extern int REGPARAM3 cyberstorm_scsi_ram_check(uaecptr addr, uae_u32 size) REGPARAM;
 extern uae_u8 *REGPARAM3 cyberstorm_scsi_ram_xlate(uaecptr addr) REGPARAM;
 
+void cyberstorm_irq(int level);
+void cyberstorm_mk3_ppc_irq(int level);
+void blizzardppc_irq(int level);
+
 #define BOARD_MEMORY_Z2 1
 #define BOARD_MEMORY_Z3 2
 #define BOARD_MEMORY_HIGHMEM 3
@@ -80,3 +88,4 @@ extern uae_u8 *REGPARAM3 cyberstorm_scsi_ram_xlate(uaecptr addr) REGPARAM;
 #define BOARD_IC 11
 #define BOARD_IC_ACA500 0
 
+#endif /* UAE_CPUBOARD_H */
index f5b2274f14a8f9fc2810c4a2388af3ca4590dbd0..79372c50150c52ed0b347fc59138eb63bd785fba 100644 (file)
  */
 
 
-#ifndef CPUMMU_H
-#define CPUMMU_H
+#ifndef UAE_CPUMMU_H
+#define UAE_CPUMMU_H
+
+#include "uae/types.h"
 
 #include "mmu_common.h"
 
@@ -921,4 +923,4 @@ extern void m68k_do_rts_mmu060 (void);
 extern void m68k_do_rte_mmu060 (uaecptr a7);
 extern void m68k_do_bsr_mmu060 (uaecptr oldpc, uae_s32 offset);
 
-#endif /* CPUMMU_H */
+#endif /* UAE_CPUMMU_H */
index 9eaebd82b15af0fc5e729b10c89226140aae11fe..63b4927c996690c433289d929158b9682bda6304 100644 (file)
@@ -1,5 +1,7 @@
-#ifndef CPUMMU030_H
-#define CPUMMU030_H
+#ifndef UAE_CPUMMU030_H
+#define UAE_CPUMMU030_H
+
+#include "uae/types.h"
 
 #include "mmu_common.h"
 
@@ -470,4 +472,4 @@ extern void m68k_do_rte_mmu030 (uaecptr a7);
 extern void flush_mmu030 (uaecptr, int);
 extern void m68k_do_bsr_mmu030 (uaecptr oldpc, uae_s32 offset);
 
-#endif
+#endif /* UAE_CPUMMU030_H */
index 0c8fbf7e585e1000f2a1000776fc0f63db01d609..7972fb5f3b6857cc72a68c50f99b82ebd5fcd453 100644 (file)
@@ -1,6 +1,13 @@
+#ifndef UAE_CRC32_H
+#define UAE_CRC32_H
+
+#include "uae/types.h"
+
 extern uae_u32 get_crc32 (void *p, int size);
 extern uae_u16 get_crc16 (void *p, int size);
 extern uae_u32 get_crc32_val (uae_u8 v, uae_u32 crc);
 extern void get_sha1 (void *p, int size, void *out);
 extern const TCHAR *get_sha1_txt (void *p, int size);
 #define SHA1_SIZE 20
+
+#endif /* UAE_CRC32_H */
index 960d1636aab35cfff07244e271fcba6f630b91c7..e876bd47fd5299baae553ada9adb5bff5e2470d0 100644 (file)
@@ -6,9 +6,10 @@
 * (c) 1995 Bernd Schmidt
 */
 
-#ifndef CUSTOM_H
-#define CUSTOM_H
+#ifndef UAE_CUSTOM_H
+#define UAE_CUSTOM_H
 
+#include "uae/types.h"
 #include "machdep/rpt.h"
 
 /* These are the masks that are ORed together in the chipset_mask option.
@@ -238,5 +239,6 @@ extern int current_maxvpos (void);
 extern struct chipset_refresh *get_chipset_refresh (void);
 extern void compute_framesync (void);
 extern void getsyncregisters(uae_u16 *phsstrt, uae_u16 *phsstop, uae_u16 *pvsstrt, uae_u16 *pvsstop);
+int is_bitplane_dma (int hpos);
 
-#endif /* CUSTOM_H */
+#endif /* UAE_CUSTOM_H */
index 6c00de7d55ae36cb5170177edd4a6f339bf2344d..6fdb02f729942f3438617977177c3fc8a8376ca3 100644 (file)
@@ -7,6 +7,11 @@
   *
   */
 
+#ifndef UAE_DEBUG_H
+#define UAE_DEBUG_H
+
+#include "uae/types.h"
+
 #ifdef DEBUGGER
 
 #define        MAX_HIST 500
@@ -166,4 +171,6 @@ extern void debug_draw_cycles (uae_u8 *buf, int bpp, int line, int width, int he
 
 STATIC_INLINE void activate_debugger (void) { };
 
-#endif
+#endif /* DEBUGGER */
+
+#endif /* UAE_DEBUG_H */
index f9df21545cd7b3d63eb7e13e0578602113d4d82b..da84997365006f9b54677f5ff63761fee99f81e0 100644 (file)
@@ -1,3 +1,5 @@
+#ifndef UAE_DEVICES_H
+#define UAE_DEVICES_H
 
 void devices_reset(int hardreset);
 void devices_vsync_pre(void);
@@ -10,4 +12,6 @@ void devices_update_sync(double svpos, double syncadjust);
 void reset_all_systems(void);
 void do_leave_program(void);
 void virtualdevice_init(void);
-void devices_restore_start(void);
\ No newline at end of file
+void devices_restore_start(void);
+
+#endif /* UAE_DEVICES_H */
index b4c724a2589033325a0ec4445069fab61a22fef9..25227b6e9fc6c4f02ec1869acd58e6add5f056da 100644 (file)
@@ -6,6 +6,11 @@
   * (c) 1995 Bernd Schmidt
   */
 
+#ifndef UAE_DISK_H
+#define UAE_DISK_H
+
+#include "uae/types.h"
+
 typedef enum { DRV_NONE = -1, DRV_35_DD = 0, DRV_35_HD, DRV_525_SD, DRV_35_DD_ESCOM, DRV_PC_ONLY_40, DRV_PC_ONLY_80 } drive_type;
 
 #define HISTORY_FLOPPY 0
@@ -99,3 +104,4 @@ extern int disk_debug_track;
 
 #define MAX_PREVIOUS_IMAGES 50
 
+#endif /* UAE_DISK_H */
index b390818ab8ebeec677b1d1d11a334f4cb6ddff07..e3b848d0c990467ad3a32998b300b91772704b58 100644 (file)
@@ -1,3 +1,9 @@
+#ifndef UAE_DISKUTIL_H
+#define UAE_DISKUTIL_H
+
+#include "uae/types.h"
 
 int isamigatrack (uae_u16 *amigamfmbuffer, uae_u8 *mfmdata, int len, uae_u8 *writebuffer, uae_u8 *writebuffer_ok, int track, int *outsize);
 int ispctrack (uae_u16 *amigamfmbuffer, uae_u8 *mfmdata, int len, uae_u8 *writebuffer, uae_u8 *writebuffer_ok, int track, int *outsize);
+
+#endif /* UAE_DISKUTIL_H */
index d2f8e4f06ba767e71fb6ab9c7ed25e5de9fcc765..22d425e1a9f63607f3f1aa2494eadb97aa89f69b 100644 (file)
@@ -1,3 +1,8 @@
+#ifndef UAE_DONGLE_H
+#define UAE_DONGLE_H
+
+#include "uae/types.h"
+
 extern void dongle_reset (void);
 extern uae_u8 dongle_cia_read (int, int, uae_u8);
 extern void dongle_cia_write (int, int, uae_u8);
@@ -5,4 +10,6 @@ extern void dongle_joytest (uae_u16);
 extern uae_u16 dongle_joydat (int, uae_u16);
 extern void dongle_potgo (uae_u16);
 extern uae_u16 dongle_potgor (uae_u16);
-extern int dongle_analogjoy (int, int);
\ No newline at end of file
+extern int dongle_analogjoy (int, int);
+
+#endif /* UAE_DONGLE_H */
index 3b85af12d127d272fcbb9d0f07c0b35bd4f8f747..cd0a4eca1a4644afa1094b52df6fb200a75bfc76 100644 (file)
@@ -4,6 +4,11 @@
 * Copyright 1996-1998 Bernd Schmidt
 */
 
+#ifndef UAE_DRAWING_H
+#define UAE_DRAWING_H
+
+#include "uae/types.h"
+
 #define SMART_UPDATE 1
 
 #ifdef SUPPORT_PENGUINS
@@ -289,6 +294,7 @@ extern void set_custom_limits (int w, int h, int dx, int dy);
 extern void check_custom_limits (void);
 extern void get_custom_topedge (int *x, int *y, bool max);
 extern void get_custom_raw_limits (int *pw, int *ph, int *pdx, int *pdy);
+void get_custom_mouse_limits (int *pw, int *ph, int *pdx, int *pdy, int dbl);
 extern void putpixel (uae_u8 *buf, int bpp, int x, xcolnr c8, int opaq);
 extern void allocvidbuffer (struct vidbuffer *buf, int width, int height, int depth);
 extern void freevidbuffer (struct vidbuffer *buf);
@@ -315,3 +321,5 @@ STATIC_INLINE void toggle_inhibit_frame (int bit)
 {
        inhibit_frame ^= 1 << bit;
 }
+
+#endif /* UAE_DRAWING_H */
index 9267ea60bbfeda1f38971b9167a268c4509d20de..33a8171b9cb196667125160e62a48df462d1d5f6 100644 (file)
@@ -6,6 +6,10 @@
   * Copyright 2004 James Bagg, Toni Wilen
   */
 
+#ifndef UAE_DRIVECLICK_H
+#define UAE_DRIVECLICK_H
+
+#include "uae/types.h"
 
 #define CLICK_TRACKS 84
 
@@ -48,4 +52,6 @@ extern void driveclick_fdrawcmd_detect (void);
 extern void driveclick_fdrawcmd_seek (int, int);
 extern void driveclick_fdrawcmd_motor (int, int);
 extern void driveclick_fdrawcmd_vsync (void);
-extern int driveclick_pcdrivemask, driveclick_pcdrivenum;
\ No newline at end of file
+extern int driveclick_pcdrivemask, driveclick_pcdrivenum;
+
+#endif /* UAE_DRIVECLICK_H */
index 04723a7cf0fcd2f38d711fadf42c26c23ddc517c..32c50ddb1871eab2185a9c3dd5e022b455a28387 100644 (file)
@@ -1,9 +1,9 @@
-#ifndef UAE__ENFORCER_H
-#define UAE__ENFORCER_H
+#ifndef UAE_ENFORCER_H
+#define UAE_ENFORCER_H
 
 int enforcer_enable(int);
 int enforcer_disable(void);
 
 extern int enforcermode;
 
-#endif
\ No newline at end of file
+#endif /* UAE_ENFORCER_H */
index 4a70f61a14197593f5723ea012d9b1bf05145f0f..a70b6c4d946ec3822e9589875aa18fd91172d1ac 100644 (file)
@@ -16,6 +16,9 @@
  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  */
 
+#ifndef UAE_EPSONPRINTER_H
+#define UAE_EPSONPRINTER_H
+
 #define Bit16u uae_u16
 #define Bit16s uae_s16
 #define Bit8u uae_u8
 #define Bits uae_s32
 #define Bit32u uae_u32
 
-#if !defined __PRINTER_H
-#define __PRINTER_H
-
 #ifndef WINFONT
-s#include "ft2build.h"
+#include "ft2build.h"
 #include FT_FREETYPE_H
 #endif
 
@@ -83,6 +83,4 @@ enum Typeface
        svjittra = 31
 };
 
-
-
-#endif
+#endif /* UAE_EPSONPRINTER_H */
index 2833e4bae558c8e251298524200881c2c67d6564..1569bf60223c3e6166b0e71775a9a1d2d75e6d83 100644 (file)
@@ -6,7 +6,14 @@
   * (c) 1995 Bernd Schmidt
   */
 
+#ifndef UAE_ERSATZ_H
+#define UAE_ERSATZ_H
+
+#include "uae/types.h"
+
 extern void init_ersatz_rom (uae_u8 *data);
 extern void ersatz_chipcopy (void);
 extern void ersatz_perform (uae_u16);
 extern void DISK_ersatz_read (int,int, uaecptr);
+
+#endif /* UAE_ERSATZ_H */
index f63d5450690996638883167b43ce39e9214bb547..7257ea5a87b61ed4a0ceaaef9cb2f4ca26074688 100644 (file)
@@ -1,6 +1,3 @@
-#ifndef EVENTS_H
-#define EVENTS_H
-
  /*
   * UAE - The Un*x Amiga Emulator
   *
@@ -12,6 +9,11 @@
   * Copyright 1995-1998 Bernd Schmidt
   */
 
+#ifndef UAE_EVENTS_H
+#define UAE_EVENTS_H
+
+#include "uae/types.h"
+
 #undef EVENT_DEBUG
 
 #include "machdep/rpt.h"
@@ -153,5 +155,4 @@ STATIC_INLINE void event2_remevent (int no)
        eventtab2[no].active = 0;
 }
 
-
-#endif
+#endif /* UAE_EVENTS_H */
index 6a0465a80241c9c32277f826fce1dfa9233779f7..178870414cddd3891cca63ab680664ffe8f37540 100644 (file)
@@ -1,3 +1,5 @@
+#ifndef UAE_EXECIO_H
+#define UAE_EXECIO_H
 
 #define IOERR_OPENFAIL  -1
 #define IOERR_ABORTED   -2
 #define NSCMD_TD_WRITE64 0xc001
 #define NSCMD_TD_SEEK64 0xc002
 #define NSCMD_TD_FORMAT64 0xc003
+
+#endif /* UAE_EXECIO_H */
index c1fe051343e968b44d2113564f6041f49de73e53..709066260a86355c2ac5a51a6e08caebc85e1d2c 100644 (file)
@@ -6,6 +6,9 @@
   * Copyright 1996 Bernd Schmidt
   */
 
+#ifndef UAE_EXECLIB_H
+#define UAE_EXECLIB_H
+
 #define CMD_INVALID 0
 #define CMD_RESET   1
 #define CMD_READ    2
@@ -45,3 +48,5 @@
 #define MEMF_REVERSE (1<<18)
 #define MEMF_TOTAL (1<<19)
 #endif
+
+#endif /* UAE_EXECLIB_H */
index ad99d84d8ce2b10a00c6fc2d217ef47ae3e5ff4a..0878870d404e88c9a3defec4d51acbd31bfe20cc 100644 (file)
@@ -1,8 +1,8 @@
-#ifndef __FDI2RAW_H
-#define __FDI2RAW_H
+#ifndef UAE_FDI2RAW_H
+#define UAE_FDI2RAW_H
+
+#include "uae/types.h"
 
-//#include "types.h"
-#include <stdio.h>
 typedef struct fdi FDI;
 
 #ifdef __cplusplus
@@ -25,4 +25,4 @@ extern int fdi2raw_get_write_protect (FDI *);
 }
 #endif
 
-#endif
+#endif /* UAE_FDI2RAW_H */
index 31700a6a6181c3a7c51f9ebde2777e75214de481..1d8e79d607a6251e1d7c1c308ace501fed26602a 100644 (file)
@@ -6,8 +6,10 @@
   * Copyright 1997 Bernd Schmidt
   */
 
-#ifndef FILESYS_H
-#define FILESYS_H
+#ifndef UAE_FILESYS_H
+#define UAE_FILESYS_H
+
+#include "uae/types.h"
 
 struct hardfilehandle;
 
@@ -156,4 +158,4 @@ extern void getchsgeometry (uae_u64 size, int *pcyl, int *phead, int *psectorspe
 extern void getchsgeometry_hdf (struct hardfiledata *hfd, uae_u64 size, int *pcyl, int *phead, int *psectorspertrack);
 extern void getchspgeometry (uae_u64 total, int *pcyl, int *phead, int *psectorspertrack, bool idegeometry);
 
-#endif /* MEMORY_H */
+#endif /* UAE_FILESYS_H */
index f3129ea5cdd1522106691b94c7e52768d28e9922..3192fbcc4353e476d1a6f0e6de33ef6f9e801249 100644 (file)
@@ -23,8 +23,8 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
-#ifndef NATIVE_FLAGS_X86_H
-#define NATIVE_FLAGS_X86_H
+#ifndef UAE_FLAGS_X86_H
+#define UAE_FLAGS_X86_H
 
 /* Native integer code conditions */
 enum {
@@ -44,4 +44,4 @@ enum {
        NATIVE_CC_LE = 14
 };
 
-#endif /* NATIVE_FLAGS_X86_H */
+#endif /* UAE_FLAGS_X86_H */
index 1b2cb06fdab7d5fae566f13f5d39defdeb01fd21..158595382f2b1877ac852e8520224695d0ad6aed 100644 (file)
@@ -1,3 +1,7 @@
+#ifndef UAE_FLASHROM_H
+#define UAE_FLASHROM_H
+
+#include "uae/types.h"
 
 /* FLASH */
 
@@ -23,4 +27,4 @@ int eeprom_i2c_set(void *i2c, int line, int level);
 #define FLASHROM_EVERY_OTHER_BYTE_ODD 2
 #define FLASHROM_PARALLEL_EEPROM 4
 
-
+#endif /* UAE_FLASHROM_H */
index 061c7ab21c7b02c0e06be8d06e07d28c15a6c2cc..29f5280865e4a664fa7faf4e495011cb31e86eb3 100644 (file)
@@ -9,6 +9,12 @@
   * Copyright 1999 Sam Jordan
   */
 
+#ifndef UAE_FPP_IEEE_BE_H
+#define UAE_FPP_IEEE_BE_H
+
+#include "uae/types.h"
+
+
 STATIC_INLINE double to_single (uae_u32 value)
 {
     union {
@@ -62,3 +68,5 @@ STATIC_INLINE void from_double(double src, uae_u32 * wrd1, uae_u32 * wrd2)
 
 /* Get the rest of the conversion functions defined.  */
 #include "fpp-unknown.h"
+
+#endif /* UAE_FPP_IEEE_BE_H */
index aa99164023ab2b19c8af76f7c6a7d11b981b8973..05707a99670bcbe158af4e6d9e5c33add53b9af7 100644 (file)
@@ -8,6 +8,11 @@
   * Copyright 1996 Herman ten Brugge
   */
 
+#ifndef UAE_FPP_UNKNOWN_H
+#define UAE_FPP_UNKNOWN_H
+
+#include "uae/types.h"
+
 #ifndef HAVE_to_single
 STATIC_INLINE double to_single (uae_u32 value)
 {
@@ -137,3 +142,5 @@ STATIC_INLINE void from_double(double src, uae_u32 * wrd1, uae_u32 * wrd2)
     *wrd2 = (uae_u32) (frac * 9007199254740992.0 - tmp * 4294967296.0);
 }
 #endif
+
+#endif /* UAE_FPP_UNKNOWN_H */
index 55db4e56382a8c112bdab36d4aa1a364adff863a..7fa086bb132d7ffde355eaa826d49dfd550648e1 100644 (file)
@@ -7,6 +7,11 @@
   * Copyright 1999 Bernd Schmidt
   */
 
+#ifndef UAE_FSDB_H
+#define UAE_FSDB_H
+
+#include "uae/types.h"
+
 #ifndef FSDB_FILE
 #define FSDB_FILE _T("_UAEFSDB.___")
 #endif
@@ -85,9 +90,9 @@ typedef struct a_inode_struct {
     uae_u32 uniq;
     /* For a directory that is being ExNext()ed, the number of child ainos
        which must be kept locked in core.  */
-    unsigned long locked_children;
+    unsigned int locked_children;
     /* How many ExNext()s are going on in this directory?  */
-    unsigned long exnext_count;
+    unsigned int exnext_count;
     /* AmigaOS locking bits.  */
     int shlock;
     long db_offset;
@@ -192,3 +197,5 @@ extern int custom_fsdb_used_as_nname (a_inode *base, const TCHAR *nname);
 #define MYVOLUMEINFO_CDFS 16
 
 extern int my_getvolumeinfo (const TCHAR *root);
+
+#endif /* UAE_FSDB_H */
index 01783bf2f2c1567e022a8c9a85859913100ff116..0a11dd0448c98f837b26627913a92208219cdc6b 100644 (file)
@@ -1,19 +1,24 @@
 /* fsusage.h -- declarations for filesystem space usage info
-   Copyright (C) 1991, 1992 Free Software Foundation, Inc.
+ * Copyright (C) 1991, 1992 Free Software Foundation, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ *  Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
+#ifndef UAE_FSUSAGE_H
+#define UAE_FSUSAGE_H
 
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software Foundation,
-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
+#include "uae/types.h"
 
 /* Space usage statistics for a filesystem.  Blocks are 512-byte. */
 struct fs_usage
@@ -26,3 +31,5 @@ struct fs_usage
 };
 
 int get_fs_usage (const TCHAR *path, const TCHAR *disk, struct fs_usage *fsp);
+
+#endif /* UAE_FSUSAGE_H */
index 3cb18f9a418ed0828628e96016cf9904b31ba4e6..671aed37e26555a319f88baaf90fdfcd5ebe5b8a 100644 (file)
@@ -1,3 +1,7 @@
+#ifndef UAE_GAYLE_H
+#define UAE_GAYLE_H
+
+#include "uae/types.h"
 
 extern void gayle_reset (int);
 extern void gayle_hsync (void);
@@ -17,4 +21,6 @@ extern int gary_timeout; // non-existing memory access = delay
 #define PCMCIA_COMMON_START 0x600000
 #define PCMCIA_COMMON_SIZE 0x400000
 
-extern void gayle_dataflyer_enable(bool);
\ No newline at end of file
+extern void gayle_dataflyer_enable(bool);
+
+#endif /* UAE_GAYLE_H */
index 3b333febdac7554c8dfef6270ecf0c3c39083479..cb8116da3fce98acc5b7305008e28b65926262a4 100644 (file)
@@ -7,9 +7,14 @@
   * Copyright 1996 Alessandro Bissacco
   */
 
+#ifndef UAE_GENBLITTER_H
+#define UAE_GENBLITTER_H
+
 struct blitop {
     const char *s;
     int used;
 };
 
 extern struct blitop blitops[256];
+
+#endif /* UAE_GENBLITTER_H */
index 4be557e28dc330b93fe134f2abb6ed48d742f2e6..24c589ae411d42d8ca3506f8deaf5c07f5164e5f 100644 (file)
@@ -7,13 +7,15 @@
   * Copyright 1997 Bernd Schmidt
   */
 
+#ifndef UAE_GENSOUND_H
+#define UAE_GENSOUND_H
+
 extern int sound_available;
 
 extern void (*sample_handler) (void);
 /* sample_evtime is in normal Amiga cycles; scaled_sample_evtime is in our
    event cycles. */
 extern float scaled_sample_evtime;
-extern float scaled_sample_evtime_orig;
 
 /* 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.  */
@@ -28,3 +30,4 @@ extern void sample16s_handler (void);
 extern void sample16ss_handler (void);
 extern void sample8s_handler (void);
 
+#endif /* UAE_GENSOUND_H */
index 74d1eebf18fa76db9707902b45668a0616f4331e..914b5178cedff1d9d1363f5ffaaa483c15c1df4c 100644 (file)
@@ -1,3 +1,7 @@
+#ifndef UAE_GFXFILTER_H
+#define UAE_GFXFILTER_H
+
+#include "uae/types.h"
 
 #ifdef GFXFILTER
 
@@ -88,4 +92,7 @@ uae_u8 *getrtgbuffer (int *widthp, int *heightp, int *pitch, int *depth, uae_u8
 void freertgbuffer (uae_u8 *dst);
 
 extern void getrtgfilterrect2 (RECT *sr, RECT *dr, RECT *zr, int dst_width, int dst_height);
-#endif
+
+#endif /* GFXFILTER */
+
+#endif /* UAE_GFXFILTER_H */
index 890e1584c712c5baa1471a2acb38ed235a3918ae..55aa30a1e2aa9eeeaf77398441f17e7687ebb027 100644 (file)
@@ -6,6 +6,11 @@
   * Copyright 1996 Bernd Schmidt
   */
 
+#ifndef UAE_GUI_H
+#define UAE_GUI_H
+
+#include "uae/types.h"
+
 extern int gui_init (void);
 extern int gui_update (void);
 extern void gui_exit (void);
@@ -73,13 +78,32 @@ extern void gui_update_gfx (void);
 void notify_user (int msg);
 void notify_user_parms (int msg, const TCHAR *parms, ...);
 int translate_message (int msg, TCHAR *out);
+
 typedef enum {
-    NUMSG_NEEDEXT2, NUMSG_NOROM, NUMSG_NOROMKEY,
-    NUMSG_KSROMCRCERROR, NUMSG_KSROMREADERROR, NUMSG_NOEXTROM,
-    NUMSG_MODRIP_NOTFOUND, NUMSG_MODRIP_FINISHED, NUMSG_MODRIP_SAVE,
-    NUMSG_KS68EC020, NUMSG_KS68020, NUMSG_KS68030,
-    NUMSG_ROMNEED, NUMSG_EXPROMNEED, NUMSG_NOZLIB, NUMSG_STATEHD,
-    NUMSG_NOCAPS, NUMSG_OLDCAPS, NUMSG_KICKREP, NUMSG_KICKREPNO,
-       NUMSG_KS68030PLUS, NUMSG_NO_PPC, NUMSG_UAEBOOTROM_PPC
+       NUMSG_NEEDEXT2, // 0
+       NUMSG_NOROM,
+       NUMSG_NOROMKEY,
+       NUMSG_KSROMCRCERROR,
+       NUMSG_KSROMREADERROR,
+       NUMSG_NOEXTROM, // 5
+       NUMSG_MODRIP_NOTFOUND,
+       NUMSG_MODRIP_FINISHED,
+       NUMSG_MODRIP_SAVE,
+       NUMSG_KS68EC020,
+       NUMSG_KS68020, // 10
+       NUMSG_KS68030,
+       NUMSG_ROMNEED,
+       NUMSG_EXPROMNEED,
+       NUMSG_NOZLIB,
+       NUMSG_STATEHD, // 15
+       NUMSG_NOCAPS,
+       NUMSG_OLDCAPS,
+       NUMSG_KICKREP,
+       NUMSG_KICKREPNO,
+       NUMSG_KS68030PLUS, // 20
+       NUMSG_NO_PPC,
+       NUMSG_UAEBOOTROM_PPC,
+       NUMSG_LAST
 } notify_user_msg;
 
+#endif /* UAE_GUI_H */
index a0f2855d1526c8499cbb2dc7d17f49eb54595c76..4807b6485b41792ca06b1ebac7fca9a5b4cfd9d6 100644 (file)
@@ -1,3 +1,7 @@
+#ifndef UAE_IDE_H
+#define UAE_IDE_H
+
+#include "uae/types.h"
 
 /* IDE drive registers */
 #define IDE_DATA       0x00
@@ -130,30 +134,32 @@ uae_u8 *ide_save_state(uae_u8 *dst, struct ide_hdf *ide);
 uae_u8 *ide_restore_state(uae_u8 *src, struct ide_hdf *ide);
 
 #define IDE_MEMORY_FUNCTIONS(x, y, z) \
-static void REGPARAM2 x ## _bput(uaecptr addr, uae_u32 b) \
+void REGPARAM2 x ## _bput(uaecptr addr, uae_u32 b) \
 { \
-       y ## _write_byte(## z, addr, b); \
+       y ## _write_byte(z, addr, b); \
 } \
-static void REGPARAM2 x ## _wput(uaecptr addr, uae_u32 b) \
+void REGPARAM2 x ## _wput(uaecptr addr, uae_u32 b) \
 { \
-       y ## _write_word(## z, addr, b); \
+       y ## _write_word(z, addr, b); \
 } \
-static void REGPARAM2 x ## _lput(uaecptr addr, uae_u32 b) \
+void REGPARAM2 x ## _lput(uaecptr addr, uae_u32 b) \
 { \
-       y ## _write_word(## z, addr, b >> 16); \
-       y ## _write_word(## z, addr + 2, b); \
+       y ## _write_word(z, addr, b >> 16); \
+       y ## _write_word(z, addr + 2, b); \
 } \
-static uae_u32 REGPARAM2 x ## _bget(uaecptr addr) \
+uae_u32 REGPARAM2 x ## _bget(uaecptr addr) \
 { \
-return y ## _read_byte(## z, addr); \
+return y ## _read_byte(z, addr); \
 } \
-static uae_u32 REGPARAM2 x ## _wget(uaecptr addr) \
+uae_u32 REGPARAM2 x ## _wget(uaecptr addr) \
 { \
-return y ## _read_word(## z, addr); \
+return y ## _read_word(z, addr); \
 } \
-static uae_u32 REGPARAM2 x ## _lget(uaecptr addr) \
+uae_u32 REGPARAM2 x ## _lget(uaecptr addr) \
 { \
-       uae_u32 v = y ## _read_word(## z, addr) << 16; \
-       v |= y ## _read_word(## z, addr + 2); \
+       uae_u32 v = y ## _read_word(z, addr) << 16; \
+       v |= y ## _read_word(z, addr + 2); \
        return v; \
 }
+
+#endif /* UAE_IDE_H */
index 3fe355f4a7b54af19c6dbde51331705f94873d22..482577d215a7599f583925a67b40e3565c9fc846 100644 (file)
@@ -1,3 +1,8 @@
+#ifndef UAE_IDECONTROLLERS_H
+#define UAE_IDECONTROLLERS_H
+
+#include "uae/types.h"
+
 // Other IDE controllers
 
 void idecontroller_free(void);
@@ -45,3 +50,5 @@ addrbank *x86_at_hd_init_2(struct romconfig *rc);
 void x86_add_at_hd_unit_2(int ch, struct uaedev_config_info *ci, struct romconfig *rc);
 addrbank *x86_at_hd_init_xt(struct romconfig *rc);
 void x86_add_at_hd_unit_xt(int ch, struct uaedev_config_info *ci, struct romconfig *rc);
+
+#endif /* UAE_IDECONTROLLERS_H */
index 27103a5e9506457db15f294acb4f8fd950d43ebb..ff027706c2807862b791eac697d0dbc283af6370 100644 (file)
@@ -5,6 +5,11 @@
   *
   */
 
+#ifndef UAE_IDENTIFY_H
+#define UAE_IDENTIFY_H
+
+#include "uae/types.h"
+
 struct mem_labels
 {
     const TCHAR *name;
@@ -32,3 +37,4 @@ extern const struct mem_labels int_labels[];
 extern const struct mem_labels trap_labels[];
 extern const struct customData custd[];
 
+#endif /* UAE_IDENTIFY_H */
index c88c2de783aa7abc7fa582e50b7ca01806a2174f..071b8d6b7be4b13db9934701f10aa1ac5973376f 100644 (file)
@@ -7,6 +7,11 @@
   * Copyright 2001-2002 Toni Wilen
   */
 
+#ifndef UAE_INPUTDEVICE_H
+#define UAE_INPUTDEVICE_H
+
+#include "uae/types.h"
+
 #define DIR_LEFT_BIT 0
 #define DIR_RIGHT_BIT 1
 #define DIR_UP_BIT 2
@@ -88,23 +93,23 @@ struct inputevent {
 #define ID_FLAG_GAMEPORTSCUSTOM_MASK (ID_FLAG_GAMEPORTSCUSTOM1 | ID_FLAG_GAMEPORTSCUSTOM2)
 #define ID_FLAG_AUTOFIRE_MASK (ID_FLAG_TOGGLE | ID_FLAG_INVERTTOGGLE | ID_FLAG_AUTOFIRE)
 
-#define ID_FLAG_QUALIFIER1          0x000000100000000
-#define ID_FLAG_QUALIFIER1_R        0x000000200000000
-#define ID_FLAG_QUALIFIER2          0x000000400000000
-#define ID_FLAG_QUALIFIER3          0x000001000000000
-#define ID_FLAG_QUALIFIER4          0x000004000000000
-#define ID_FLAG_QUALIFIER5          0x000010000000000
-#define ID_FLAG_QUALIFIER6          0x000040000000000
-#define ID_FLAG_QUALIFIER7          0x000100000000000
-#define ID_FLAG_QUALIFIER8          0x000400000000000
-#define ID_FLAG_QUALIFIER_SPECIAL   0x001000000000000
-#define ID_FLAG_QUALIFIER_SPECIAL_R 0x002000000000000
-#define ID_FLAG_QUALIFIER_SHIFT     0x004000000000000
-#define ID_FLAG_QUALIFIER_CONTROL   0x010000000000000
-#define ID_FLAG_QUALIFIER_ALT       0x040000000000000
-#define ID_FLAG_QUALIFIER_WIN       0x100000000000000
-#define ID_FLAG_QUALIFIER_MASK      0xfffffff00000000
-#define ID_FLAG_QUALIFIER_MASK_R    0xaaaaaaa00000000
+#define ID_FLAG_QUALIFIER1          0x000000100000000ULL
+#define ID_FLAG_QUALIFIER1_R        0x000000200000000ULL
+#define ID_FLAG_QUALIFIER2          0x000000400000000ULL
+#define ID_FLAG_QUALIFIER3          0x000001000000000ULL
+#define ID_FLAG_QUALIFIER4          0x000004000000000ULL
+#define ID_FLAG_QUALIFIER5          0x000010000000000ULL
+#define ID_FLAG_QUALIFIER6          0x000040000000000ULL
+#define ID_FLAG_QUALIFIER7          0x000100000000000ULL
+#define ID_FLAG_QUALIFIER8          0x000400000000000ULL
+#define ID_FLAG_QUALIFIER_SPECIAL   0x001000000000000ULL
+#define ID_FLAG_QUALIFIER_SPECIAL_R 0x002000000000000ULL
+#define ID_FLAG_QUALIFIER_SHIFT     0x004000000000000ULL
+#define ID_FLAG_QUALIFIER_CONTROL   0x010000000000000ULL
+#define ID_FLAG_QUALIFIER_ALT       0x040000000000000ULL
+#define ID_FLAG_QUALIFIER_WIN       0x100000000000000ULL
+#define ID_FLAG_QUALIFIER_MASK      0xfffffff00000000ULL
+#define ID_FLAG_QUALIFIER_MASK_R    0xaaaaaaa00000000ULL
 
 #define ID_FLAG_SAVE_MASK_CONFIG 0x000001ff
 #define ID_FLAG_SAVE_MASK_QUALIFIERS ID_FLAG_QUALIFIER_MASK
@@ -126,20 +131,20 @@ struct inputevent {
 #define IDEV_MAPPED_SET_ONOFF 128
 #define IDEV_MAPPED_SET_ONOFF_VAL 256
 
-#define IDEV_MAPPED_QUALIFIER1          0x000000100000000
-#define IDEV_MAPPED_QUALIFIER2          0x000000400000000
-#define IDEV_MAPPED_QUALIFIER3          0x000001000000000
-#define IDEV_MAPPED_QUALIFIER4          0x000004000000000
-#define IDEV_MAPPED_QUALIFIER5          0x000010000000000
-#define IDEV_MAPPED_QUALIFIER6          0x000040000000000
-#define IDEV_MAPPED_QUALIFIER7          0x000100000000000
-#define IDEV_MAPPED_QUALIFIER8          0x000400000000000
-#define IDEV_MAPPED_QUALIFIER_SPECIAL   0x001000000000000
-#define IDEV_MAPPED_QUALIFIER_SHIFT     0x004000000000000
-#define IDEV_MAPPED_QUALIFIER_CONTROL   0x010000000000000
-#define IDEV_MAPPED_QUALIFIER_ALT       0x040000000000000
-#define IDEV_MAPPED_QUALIFIER_WIN       0x100000000000000
-#define IDEV_MAPPED_QUALIFIER_MASK      0xfffffff00000000
+#define IDEV_MAPPED_QUALIFIER1          0x000000100000000ULL
+#define IDEV_MAPPED_QUALIFIER2          0x000000400000000ULL
+#define IDEV_MAPPED_QUALIFIER3          0x000001000000000ULL
+#define IDEV_MAPPED_QUALIFIER4          0x000004000000000ULL
+#define IDEV_MAPPED_QUALIFIER5          0x000010000000000ULL
+#define IDEV_MAPPED_QUALIFIER6          0x000040000000000ULL
+#define IDEV_MAPPED_QUALIFIER7          0x000100000000000ULL
+#define IDEV_MAPPED_QUALIFIER8          0x000400000000000ULL
+#define IDEV_MAPPED_QUALIFIER_SPECIAL   0x001000000000000ULL
+#define IDEV_MAPPED_QUALIFIER_SHIFT     0x004000000000000ULL
+#define IDEV_MAPPED_QUALIFIER_CONTROL   0x010000000000000ULL
+#define IDEV_MAPPED_QUALIFIER_ALT       0x040000000000000ULL
+#define IDEV_MAPPED_QUALIFIER_WIN       0x100000000000000ULL
+#define IDEV_MAPPED_QUALIFIER_MASK      0xfffffff00000000ULL
 
 #define SET_ONOFF_ON_VALUE  0x7fffff01
 #define SET_ONOFF_OFF_VALUE 0x7fffff00
@@ -195,7 +200,7 @@ extern int input_get_default_keyboard (int num);
 #define DEFEVENT(A, B, C, D, E, F) INPUTEVENT_ ## A,
 enum inputevents {
 INPUTEVENT_ZERO,
-#include "inputevents.def"
+#include "../inputevents.def"
 INPUTEVENT_END
 };
 #undef DEFEVENT
@@ -337,3 +342,5 @@ extern void inputdevice_settest (int);
 extern int inputdevice_testread_count (void);
 
 extern bool target_can_autoswitchdevice(void);
+
+#endif /* UAE_INPUTDEVICE_H */
index 0a3076166ffbd4addd2619eec8491849465e696f..7adf4ec9d3800f4e4434a233d0cc817c792fa46b 100644 (file)
@@ -6,6 +6,11 @@
   * Copyright 2010 Toni Wilen
   */
 
+#ifndef UAE_INPUTRECORD_H
+#define UAE_INPUTRECORD_H
+
+#include "uae/types.h"
+
 extern int inputrecord_debug;
 
 //#define INPREC_JOYPORT 1
@@ -53,4 +58,6 @@ extern void inprec_playdebug_cia (uae_u32, uae_u32, uae_u32);
 extern int inprec_getposition (void);
 extern void inprec_setposition (int offset, int replaycounter);
 extern bool inprec_realtime (void);
-extern void inprec_getstatus (TCHAR*);
\ No newline at end of file
+extern void inprec_getstatus (TCHAR*);
+
+#endif /* UAE_INPUTRECORD_H */
index dac30837eaf560eb1dabb90238854e281f1f2bcf..843afcdf3b20d7149414562923a48232481dc075 100644 (file)
@@ -1,3 +1,7 @@
+#ifndef UAE_ISOFS_API_H
+#define UAE_ISOFS_API_H
+
+#include "uae/types.h"
 
 struct cd_opendir_s;
 struct cd_openfile_s;
@@ -30,3 +34,5 @@ void isofs_closefile(struct cd_openfile_s*);
 uae_s64 isofs_lseek(struct cd_openfile_s*, uae_s64, int);
 uae_s64 isofs_fsize(struct cd_openfile_s*);
 uae_s64 isofs_read(struct cd_openfile_s*, void*, unsigned int);
+
+#endif /* UAE_ISOFS_API_H */
index ed8a275c4e0144eb24ec3e1a22e9bd88cc46756a..91b4b67eed1331116522f81506ca6993487b519d 100644 (file)
@@ -6,6 +6,9 @@
   * (c) 1995 Bernd Schmidt
   */
 
+#ifndef UAE_KEYBOARD_H
+#define UAE_KEYBOARD_H
+
 /* First, two dummies */
 #define AK_mousestuff 0x100
 #define AK_inhibit 0x101
@@ -174,4 +177,6 @@ enum aks { AKS_ENTERGUI = 0x200, AKS_SCREENSHOT_FILE, AKS_SCREENSHOT_CLIPBOARD,
 
 #define AKS_FIRST AKS_ENTERGUI
 
-extern int target_checkcapslock (int, int *);
\ No newline at end of file
+extern int target_checkcapslock (int, int *);
+
+#endif /* UAE_KEYBOARD_H */
index 7f5390f548d7d668f01a51154a9f6a11d4016383..436e36edd9a04fba8104f1400ae90028584a57a4 100644 (file)
@@ -7,6 +7,9 @@
   * (c) 1996 Bernd Schmidt
   */
 
+#ifndef UAE_KEYBUF_H
+#define UAE_KEYBUF_H
+
 extern int get_next_key (void);
 extern int keys_available (void);
 extern int record_key (int);
@@ -14,3 +17,5 @@ extern int record_key_direct (int);
 extern void keybuf_init (void);
 extern int getcapslockstate (void);
 extern void setcapslockstate (int);
+
+#endif /* UAE_KEYBUF_H */
index 5f0eb13f5aec79625621d51b0aa3dbec70999825..ce1572f8e8b98f9b6030248a0b37010e541e6993 100644 (file)
@@ -6,8 +6,8 @@
 * Copyright 2013 Frode SOlheim
 */
 
-#ifndef LUASCRIPT_H_
-#define LUASCRIPT_H_
+#ifndef UAE_LUASCRIPT_H
+#define UAE_LUASCRIPT_H
 
 #ifdef WITH_LUA
 #include <lauxlib.h>
@@ -21,6 +21,6 @@ void uae_lua_run_handler(const char *name);
 void uae_lua_aquire_lock();
 void uae_lua_release_lock();
 
-#endif // WITH_LUA
+#endif /* WITH_LUA */
 
-#endif // LUASCRIPT_H_
+#endif /* UAE_LUASCRIPT_H */
index bbd5764c5389f2e074a4786fbbc06563506ad201..ce37e6bb44dc09fe81cf8640cbc53c97a3977b2d 100644 (file)
@@ -6,6 +6,9 @@
   * (c) 1996 Ernesto Corvi
   */
 
+#ifndef UAE_MACKBD_H
+#define UAE_MACKBD_H
+
 #define kUpArrowKeyMap                         0x7E    /* key map offset for up arrow */
 #define kDownArrowKeyMap                       0x7D    /* key map offset for down arrow */
 #define kRightArrowKeyMap                      0x7C    /* key map offset for right arrow */
 #define kKP7KeyMap                                     0x59
 #define kKP8KeyMap                                     0x5B
 #define kKP9KeyMap                                     0x5C
+
+#endif /* UAE_MACKBD_H */
index 84279b348a758a92fa3a2bad939703ee1af0196d..713f668015066eeac665f0e1b1b991e1f71cc3aa 100644 (file)
@@ -6,8 +6,8 @@
 * Copyright 1995 Bernd Schmidt
 */
 
-#ifndef MEMORY_H
-#define MEMORY_H
+#ifndef UAE_MEMORY_H
+#define UAE_MEMORY_H
 
 extern void memory_reset (void);
 extern void a1000_reset (void);
@@ -281,16 +281,28 @@ static uae_u8 *REGPARAM2 name ## _xlate (uaecptr addr) \
 #endif
 
 #define DECLARE_MEMORY_FUNCTIONS(name) \
- static uae_u32 REGPARAM3 name ## _lget (uaecptr) REGPARAM; \
- static uae_u32 REGPARAM3 name ## _lgeti (uaecptr) REGPARAM; \
- static uae_u32 REGPARAM3 name ## _wget (uaecptr) REGPARAM; \
- static uae_u32 REGPARAM3 name ## _wgeti (uaecptr) REGPARAM; \
- static uae_u32 REGPARAM3 name ## _bget (uaecptr) REGPARAM; \
- static void REGPARAM3 name ## _lput (uaecptr, uae_u32) REGPARAM; \
- static void REGPARAM3 name ## _wput (uaecptr, uae_u32) REGPARAM; \
- static void REGPARAM3 name ## _bput (uaecptr, uae_u32) REGPARAM; \
- static int REGPARAM3 name ## _check (uaecptr addr, uae_u32 size) REGPARAM; \
- static uae_u8 *REGPARAM3 name ## _xlate (uaecptr addr) REGPARAM;
+static uae_u32 REGPARAM3 NOWARN_UNUSED(name ## _lget) (uaecptr) REGPARAM; \
+static uae_u32 REGPARAM3 NOWARN_UNUSED(name ## _lgeti) (uaecptr) REGPARAM; \
+static uae_u32 REGPARAM3 NOWARN_UNUSED(name ## _wget) (uaecptr) REGPARAM; \
+static uae_u32 REGPARAM3 NOWARN_UNUSED(name ## _wgeti) (uaecptr) REGPARAM; \
+static uae_u32 REGPARAM3 NOWARN_UNUSED(name ## _bget) (uaecptr) REGPARAM; \
+static void REGPARAM3 NOWARN_UNUSED(name ## _lput) (uaecptr, uae_u32) REGPARAM; \
+static void REGPARAM3 NOWARN_UNUSED(name ## _wput) (uaecptr, uae_u32) REGPARAM; \
+static void REGPARAM3 NOWARN_UNUSED(name ## _bput) (uaecptr, uae_u32) REGPARAM; \
+static int REGPARAM3 NOWARN_UNUSED(name ## _check) (uaecptr addr, uae_u32 size) REGPARAM; \
+static uae_u8 *REGPARAM3 NOWARN_UNUSED(name ## _xlate) (uaecptr addr) REGPARAM;
+
+#define DECLARE_MEMORY_FUNCTIONS_WITH_SUFFIX(name, suffix) \
+static uae_u32 REGPARAM3 NOWARN_UNUSED(name ## _lget_ ## suffix) (uaecptr) REGPARAM; \
+static uae_u32 REGPARAM3 NOWARN_UNUSED(name ## _lgeti_ ## suffix) (uaecptr) REGPARAM; \
+static uae_u32 REGPARAM3 NOWARN_UNUSED(name ## _wget_ ## suffix) (uaecptr) REGPARAM; \
+static uae_u32 REGPARAM3 NOWARN_UNUSED(name ## _wgeti_ ## suffix) (uaecptr) REGPARAM; \
+static uae_u32 REGPARAM3 NOWARN_UNUSED(name ## _bget_ ## suffix) (uaecptr) REGPARAM; \
+static void REGPARAM3 NOWARN_UNUSED(name ## _lput_ ## suffix) (uaecptr, uae_u32) REGPARAM; \
+static void REGPARAM3 NOWARN_UNUSED(name ## _wput_ ## suffix) (uaecptr, uae_u32) REGPARAM; \
+static void REGPARAM3 NOWARN_UNUSED(name ## _bput_ ## suffix) (uaecptr, uae_u32) REGPARAM; \
+static int REGPARAM3 NOWARN_UNUSED(name ## _check_ ## suffix) (uaecptr addr, uae_u32 size) REGPARAM; \
+static uae_u8 *REGPARAM3 NOWARN_UNUSED(name ## _xlate_ ## suffix) (uaecptr addr) REGPARAM;
 
 #define MEMORY_FUNCTIONS(name) \
 MEMORY_LGET(name, 0); \
@@ -437,6 +449,9 @@ extern void reload_roms(void);
 
 STATIC_INLINE uae_u32 get_long (uaecptr addr)
 {
+#if 0
+       printf("get_long %08x -> %08x\n", addr, longget(addr));
+#endif
        return longget (addr);
 }
 STATIC_INLINE uae_u32 get_word (uaecptr addr)
@@ -583,6 +598,8 @@ typedef struct shmpiece_reg {
 
 extern shmpiece *shm_start;
 
+extern uae_u8* natmem_offset;
+
 #endif
 
 extern bool mapped_malloc (addrbank*);
@@ -599,7 +616,7 @@ extern void memcpyah_safe (uae_u8 *dst, uaecptr src, int size);
 extern void memcpyah (uae_u8 *dst, uaecptr src, int size);
 
 extern uae_s32 getz2size (struct uae_prefs *p);
-extern ULONG getz2endaddr (void);
+uae_u32 getz2endaddr (void);
 
 #define UAE_MEMORY_REGIONS_MAX 64
 #define UAE_MEMORY_REGION_NAME_LENGTH 64
@@ -612,7 +629,7 @@ extern ULONG getz2endaddr (void);
 
 typedef struct UaeMemoryRegion {
        uaecptr start;
-       int size;
+       uae_u32 size;
        TCHAR name[UAE_MEMORY_REGION_NAME_LENGTH];
        TCHAR rom_name[UAE_MEMORY_REGION_NAME_LENGTH];
        uaecptr alias;
@@ -627,4 +644,4 @@ typedef struct UaeMemoryMap {
 
 void uae_memory_map(UaeMemoryMap *map);
 
-#endif /* MEMORY_H */
+#endif /* UAE_MEMORY_H */
index 6f061d2da3e5734f4620f504cf52e295e1e05856..d3caf6e57500053c6b67c25e093f7943807dd015 100644 (file)
@@ -1,16 +1,13 @@
+#ifndef UAE_MMU_COMMON_H
+#define UAE_MMU_COMMON_H
 
-#ifndef MMU_COMMON_H
-#define MMU_COMMON_H
+#include "uae/types.h"
+#include "uae/likely.h"
 
 #define MMUDEBUG 0
 #define MMUINSDEBUG 0
 #define MMUDEBUGMISC 0
 
-#ifdef _MSC_VER
-#define unlikely(x) x
-#define likely(x) x
-#endif
-
 #ifdef __cplusplus
 struct m68k_exception {
        int prb;
@@ -156,4 +153,4 @@ extern void(*x_phys_put_byte)(uaecptr, uae_u32);
 extern void(*x_phys_put_word)(uaecptr, uae_u32);
 extern void(*x_phys_put_long)(uaecptr, uae_u32);
 
-#endif
+#endif /* UAE_MMU_COMMON_H */
index 5dd3830a4d17fcbd37af055bef04c37905cd6234..6e3457232065296f1f69df0085e6d4c845032888 100644 (file)
@@ -1,3 +1,7 @@
+#ifndef UAE_MODULERIPPER_H
+#define UAE_MODULERIPPER_H
 
 extern "C" int prowizard_search (unsigned char *in_data, int in_size);
 extern void moduleripper (void);
+
+#endif /* UAE_MODULERIPPER_H */
index a4b7eb63e8c020f4e5d93ea31fa768abb68a9e60..7a3bafe1b65bd860ceb8c7818f8f15ea28305920 100644 (file)
   * and some of it needs thread support.
   */
 
-#include "native2amiga_api.h"
+#ifndef UAE_NATIVE2AMIGA_H
+#define UAE_NATIVE2AMIGA_H
 
+#include "uae/types.h"
+#include "native2amiga_api.h"
 #include "traps.h"
 
 /*
@@ -52,3 +55,5 @@ STATIC_INLINE void do_uae_int_requested (void)
     uae_int_requested |= 1;
     set_uae_int_flag ();
 }
+
+#endif /* UAE_NATIVE2AMIGA_H */
index ffa8ba128ab25cb0aab6969ec38609fc984f573f..df2ea8b4973f1211e608f90c4fbea3283290317f 100644 (file)
@@ -3,6 +3,12 @@
  * Amiga counterpart, but can be called in situation where calling
  * the exec.library functions is impossible.
  */
+
+#ifndef UAE_NATIVE2AMIGA_API_H
+#define UAE_NATIVE2AMIGA_API_H
+
+#include "uae/types.h"
+
 #ifdef SUPPORT_THREADS
 void uae_Cause(uaecptr interrupt);
 void uae_ReplyMsg(uaecptr msg);
@@ -11,4 +17,6 @@ void uae_Signal(uaecptr task, uae_u32 mask);
 void uae_NotificationHack(uaecptr, uaecptr);
 #endif
 void uae_NewList(uaecptr list);
-int native2amiga_isfree (void);
\ No newline at end of file
+int native2amiga_isfree (void);
+
+#endif /* UAE_NATIVE2AMIGA_API_H */
index 95b023ea8f25a1dc5d6f0aa2aa8effd7d94bb1d0..c38ea88dd62bb50d98498c40b123ba97459f6660 100644 (file)
@@ -1,4 +1,7 @@
+#ifndef UAE_NCR9X_SCSI_H
+#define UAE_NCR9X_SCSI_H
 
+#include "uae/types.h"
 
 extern void ncr9x_init(void);
 extern void ncr9x_free(void);
@@ -40,3 +43,4 @@ void ncr_masoboshi_autoconfig_init(struct romconfig*, uaecptr);
 #define CYBERSTORM_MK1_DMA_OFFSET 0xf800
 #define CYBERSTORM_MK1_JUMPER_OFFSET 0xfc02
 
+#endif /* UAE_NCR9X_SCSI_H */
index 02ff459f72a744bf24527b6f33ae705fd7301453..33f7a05106c5a977b661714e1625ff7cb5026710 100644 (file)
@@ -1,3 +1,7 @@
+#ifndef UAE_NCR_SCSI_H
+#define UAE_NCR_SCSI_H
+
+#include "uae/types.h"
 
 void ncr710_io_bput_a4000t(uaecptr, uae_u32);
 uae_u32 ncr710_io_bget_a4000t(uaecptr);
@@ -28,3 +32,4 @@ extern void blizzardppc_add_scsi_unit(int ch, struct uaedev_config_info *ci, str
 extern void a4091_add_scsi_unit(int ch, struct uaedev_config_info *ci, struct romconfig *rc);
 extern void wildfire_add_scsi_unit(int ch, struct uaedev_config_info *ci, struct romconfig *rc);
 
+#endif /* UAE_NCR_SCSI_H */
index 1b1eb3bcdf3bae832501b3f38b8c2254bc43a7c5..37adf0671eb7e96da97e48360cfe73d25969433e 100644 (file)
@@ -6,10 +6,13 @@
 * Copyright 1995 Bernd Schmidt
 */
 
+#ifndef UAE_NEWCPU_H
+#define UAE_NEWCPU_H
+
+#include "uae/types.h"
 #include "readcpu.h"
 #include "machdep/m68k.h"
 #include "events.h"
-
 #ifdef WITH_SOFTFLOAT
 #include <softfloat.h>
 #endif
@@ -650,11 +653,11 @@ extern cpuop_func *cpufunctbl[65536] ASM_SYM_FOR_FUNC ("cpufunctbl");
 extern void flush_icache(uaecptr, int);
 extern void flush_icache_hard(uaecptr, int);
 extern void compemu_reset(void);
-extern bool check_prefs_changed_comp (void);
 #else
 #define flush_icache(uaecptr, int) do {} while (0)
 #define flush_icache_hard(uaecptr, int) do {} while (0)
 #endif
+bool check_prefs_changed_comp (void);
 extern void flush_dcache (uaecptr, int);
 extern void flush_mmu (uaecptr, int);
 
@@ -686,3 +689,5 @@ void cpu_semaphore_get(void);
 void cpu_semaphore_release(void);
 bool execute_other_cpu(int until);
 void execute_other_cpu_single(void);
+
+#endif /* UAE_NEWCPU_H */
index 5065be9c258b12cc0f0a7f237c7655bf2d436bb2..2c78af7325fb582abe75811943c23613cc4f90c4 100644 (file)
@@ -10,6 +10,8 @@
 #ifndef UAE_OPTIONS_H
 #define UAE_OPTIONS_H
 
+#include "uae/types.h"
+
 #define UAEMAJOR 3
 #define UAEMINOR 2
 #define UAESUBREV 0
@@ -676,7 +678,7 @@ struct uae_prefs {
        bool win32_filesystem_mangle_reserved_names;
        bool right_control_is_right_win_key;
 #ifdef WITH_SLIRP
-       struct slirp_redir slirp_redirs[MAX_SLIRP_REDIRS]; 
+       struct slirp_redir slirp_redirs[MAX_SLIRP_REDIRS];
 #endif
        int statecapturerate, statecapturebuffersize;
 
index 4295f55c3612774e69f50af8159182067e5a02ba..2821691e4c49c498ec4e073bb7ccfbb38c0bd9e5 100644 (file)
@@ -6,6 +6,11 @@
   * Copyright 1996 Bernd Schmidt
   */
 
+#ifndef UAE_OSEMU_H
+#define UAE_OSEMU_H
+
+#include "uae/types.h"
+
 STATIC_INLINE char *raddr(uaecptr p)
 {
     return p == 0 ? NULL : (char *)get_real_address (p);
@@ -17,3 +22,4 @@ extern void gfxlib_install(void);
 
 extern int GFX_WritePixel(uaecptr rp, int x, int y);
 
+#endif /* UAE_OSEMU_H */
index 0ac0fd6420fd87eb5700d575e863b462913281a6..ac2af01d29ee61d8a1943307affbe1aa569eaa1d 100644 (file)
@@ -1,5 +1,2 @@
-#ifdef _MSC_VER
 #define PACKED
 #pragma pack(push,1)
-#endif
-
index 70d30197d65c1a76db6de8c544b8c9b83a501109..7ebbb1028c95cb8f7c42c2dda42d5dff2664f677 100644 (file)
@@ -1,7 +1,13 @@
+#ifndef UAE_PARALLEL_H
+#define UAE_PARALLEL_H
+
+#include "uae/types.h"
 
 extern int isprinter (void);
 extern void doprinter (uae_u8);
 extern void flushprinter (void);
 extern void closeprinter (void);
 extern int isprinteropen (void);
-extern void initparallel (void);
\ No newline at end of file
+extern void initparallel (void);
+
+#endif /* UAE_PARALLEL_H */
index 63f0e6a67c0c7e79421f47abacced0fde841faa9..6b8d86faf5568f3c7815656d1ced277c5a3bf796 100644 (file)
@@ -1,3 +1,5 @@
+#ifndef UAE_PCI_H
+#define UAE_PCI_H
 
 extern void pci_free(void);
 extern void pci_reset(void);
@@ -11,3 +13,5 @@ extern addrbank *cbvision_init(struct romconfig *rc);;
 extern addrbank *grex_init(struct romconfig *rc);
 extern addrbank *mediator_init(struct romconfig *rc);
 extern addrbank *mediator_init2(struct romconfig *rc);
+
+#endif /* UAE_PCI_H */
index cefb693a7789c32fc8c8d08179083d954908a113..508db12553ef7a01db23b9c761f8831583ba2745 100644 (file)
@@ -1,4 +1,7 @@
+#ifndef UAE_PCI_HW_H
+#define UAE_PCI_HW_H
 
+#include "uae/types.h"
 
 #define MAX_PCI_BOARDS 6
 #define MAX_PCI_BARS 7
@@ -120,3 +123,5 @@ extern const struct pci_board es1370_pci_board;
 extern const struct pci_board fm801_pci_board;
 extern const struct pci_board fm801_pci_board_func1;
 extern const struct pci_board solo1_pci_board;
+
+#endif /* UAE_PCI_HW_H */
index 0d6930af57bc154fe2a7948dddb9b2d3bbe23c1f..b573624d6bc6122938e841924daa960134e455d1 100644 (file)
@@ -1,3 +1,11 @@
+#ifndef UAE_PICASSO96_H
+#define UAE_PICASSO96_H
+
+#include "uae/types.h"
+#include "traps.h"
+
+void picasso96_alloc (TrapContext* ctx);
+uae_u32 picasso_demux (uae_u32 arg, TrapContext *ctx);
 
 #ifdef WIN32
 
@@ -585,3 +593,5 @@ extern int p96refresh_active;
 #endif
 
 #endif
+
+#endif /* UAE_PICASSO96_H */
index 02043fadafa49fe6d623f0c416ec4f5228900777..d1bf8011922809603b89c388c087e549599660d1 100644 (file)
@@ -1,5 +1,7 @@
-#ifndef READCPU_H
-#define READCPU_H
+#ifndef UAE_READCPU_H
+#define UAE_READCPU_H
+
+#include "uae/types.h"
 
 ENUMDECL {
   Dreg, Areg, Aind, Aipi, Apdi, Ad16, Ad8r,
@@ -114,4 +116,4 @@ extern void do_merges (void);
 extern int get_no_mismatches (void);
 extern int nr_cpuop_funcs;
 
-#endif /* READCPU_H */
\ No newline at end of file
+#endif /* UAE_READCPU_H */
index 41818fbf1c77f47d910068c8e26da46d24ba91dc..4ca2f62f2604e61209990ea912d5d3d54ef6551a 100644 (file)
@@ -1,3 +1,6 @@
+#ifndef UAE_RTGMODES_H
+#define UAE_RTGMODES_H
+
 /* Types for RGBFormat used */
 typedef enum {
     RGBFB_NONE,                /* no valid RGB format (should not happen) */
@@ -63,3 +66,5 @@ typedef enum {
 
 #define        RGBFB_PLANAR    RGBFB_NONE
 #define        RGBFB_CHUNKY    RGBFB_CLUT
+
+#endif /* UAE_RTGMODES_H */
index 471ecb1b2eb9a3eff6ff227c700723ed661b3b2a..39bc5dca90dbb07b19d05a525a73f0d0150139cd 100644 (file)
@@ -1,6 +1,11 @@
+#ifndef UAE_SAMPLER_H
+#define UAE_SAMPLER_H
+
+#include "uae/types.h"
 
 extern uae_u8 sampler_getsample (int);
 extern int sampler_init (void);
 extern void sampler_free (void);
 extern void sampler_vsync (void);
 
+#endif /* UAE_SAMPLER_H */
index db4691d097f9f66d5003a9c746488905c68fd553..b5bb7bedf5652b8543a1bf0442d70c6de55aa66e 100644 (file)
@@ -6,6 +6,11 @@
   * (c) 2007 Toni Wilen
   */
 
+#ifndef UAE_SANA2_H
+#define UAE_SANA2_H
+
+#include "uae/types.h"
+
 #define MAX_TOTAL_NET_DEVICES 10
 
 uaecptr netdev_startup (uaecptr resaddr);
@@ -14,3 +19,5 @@ void netdev_reset (void);
 void netdev_start_threads (void);
 
 extern int log_net;
+
+#endif /* UAE_SANA2_H */
index af628a3a39d4faaaceaa139c721148b7d42656ba..83e37562fda3574d295500bb65ac731b8f537f84 100644 (file)
@@ -6,6 +6,10 @@
   * (c) 1999-2001 Toni Wilen
   */
 
+#ifndef UAE_SAVESTATE_H
+#define UAE_SAVESTATE_H
+
+#include "uae/types.h"
 
 /* functions to save byte,word or long word
  * independent of CPU's endianess */
@@ -248,3 +252,5 @@ extern int savestate_dorewind (int);
 extern void savestate_listrewind (void);
 extern void statefile_save_recording (const TCHAR*);
 extern void savestate_capture_request (void);
+
+#endif /* UAE_SAVESTATE_H */
index 1f73cdced7ec8e0da678e04c94bd923b55de2de5..574420f4764ebc6280f2edb09ae7b50c25483809 100644 (file)
@@ -1,3 +1,8 @@
+#ifndef UAE_SCP_H
+#define UAE_SCP_H
+
+#include "uae/types.h"
+
 int scp_open(struct zfile *zf, int drv, int *num_tracks);
 void scp_close(int drv);
 int scp_loadtrack(
@@ -7,3 +12,5 @@ int scp_loadtrack(
 void scp_loadrevolution(
     uae_u16 *mfmbuf, int drv, uae_u16 *tracktiming,
     int *tracklength);
+
+#endif /* UAE_SCP_H */
index b9665c89eea3309c9bc9120248d919a39cc4113e..d7f28e1c3a23f1bc54907257a3795a01857c9c44 100644 (file)
@@ -1,3 +1,7 @@
+#ifndef UAE_SCSI_H
+#define UAE_SCSI_H
+
+#include "uae/types.h"
 
 #define SCSI_DEFAULT_DATA_BUFFER_SIZE (256 * 512)
 
@@ -126,27 +130,27 @@ void scsi_addnative(struct scsi_data **sd);
 #define SCSI_MEMORY_FUNCTIONS(x, y, z) \
 static void REGPARAM2 x ## _bput(uaecptr addr, uae_u32 b) \
 { \
-       y ## _bput(& ## z, addr, b); \
+       y ## _bput(&z, addr, b); \
 } \
 static void REGPARAM2 x ## _wput(uaecptr addr, uae_u32 b) \
 { \
-       y ## _wput(& ## z, addr, b); \
+       y ## _wput(&z, addr, b); \
 } \
 static void REGPARAM2 x ## _lput(uaecptr addr, uae_u32 b) \
 { \
-       y ## _lput(& ## z, addr, b); \
+       y ## _lput(&z, addr, b); \
 } \
 static uae_u32 REGPARAM2 x ## _bget(uaecptr addr) \
 { \
-return y ## _bget(& ## z, addr); \
+return y ## _bget(&z, addr); \
 } \
 static uae_u32 REGPARAM2 x ## _wget(uaecptr addr) \
 { \
-return y ## _wget(& ## z, addr); \
+return y ## _wget(&z, addr); \
 } \
 static uae_u32 REGPARAM2 x ## _lget(uaecptr addr) \
 { \
-return y ## _lget(& ## z, addr); \
+return y ## _lget(&z, addr); \
 }
 
 void soft_scsi_put(uaecptr addr, int size, uae_u32 v);
@@ -237,3 +241,5 @@ void x86_xt_hd_bput(int, uae_u8);
 uae_u8 x86_xt_hd_bget(int);
 addrbank *x86_xt_hd_init(struct romconfig *rc);
 void x86_add_xt_hd_unit(int ch, struct uaedev_config_info *ci, struct romconfig *rc);
+
+#endif /* UAE_SCSI_H */
index aaa542f784e9516bbe6e242686a083a478ffffd3..3f25ad8e5641f59bddc6d20bdbf593adcd986ee8 100644 (file)
@@ -8,6 +8,11 @@
   * (c) 2001-2005 Toni Wilen
   */
 
+#ifndef UAE_SCSIDEV_H
+#define UAE_SCSIDEV_H
+
+#include "uae/types.h"
+
 uaecptr scsidev_startup (uaecptr resaddr);
 void scsidev_install (void);
 void scsidev_reset (void);
@@ -25,4 +30,6 @@ extern int log_scsi;
 #define UAESCSI_SPTI 1
 #define UAESCSI_SPTISCAN 2
 #define UAESCSI_LAST 2
-#endif
\ No newline at end of file
+#endif
+
+#endif /* UAE_SCSIDEV_H */
index bdfee4e47a455e4ee8666ce962a73963c613ae50..89e1412fc684681e53269b4d6a208cb5b4eb3f17 100644 (file)
@@ -7,6 +7,11 @@
   * Copyright 1997 Christian Schmitt <schmitt@freiburg.linux.de>
   */
 
+#ifndef UAE_SERIAL_H
+#define UAE_SERIAL_H
+
+#include "uae/types.h"
+
 extern void serial_init (void);
 extern void serial_exit (void);
 extern void serial_dtr_off (void);
@@ -29,7 +34,7 @@ extern void serial_flush_buffer (void);
 extern void serial_hsynchandler (void);
 extern void serial_check_irq (void);
 
-extern int uaeser_getdatalenght (void);
+extern int uaeser_getdatalength (void);
 extern int uaeser_getbytespending (void*);
 extern int uaeser_open (void*, void*, int);
 extern void uaeser_close (void*);
@@ -47,3 +52,5 @@ extern int enet_readseravail (void);
 extern int enet_readser (uae_u16 *buffer);
 extern int enet_open (TCHAR *name);
 extern void enet_close (void);
+
+#endif /* UAE_SERIAL_H */
index 4793aa642abd78f93e2d1d8f49cfd75f82207d31..3cd708dad69b7ab5b7083bf102a659f65b95d8f9 100644 (file)
@@ -1,3 +1,7 @@
+#ifndef UAE_SNDBOARD_H
+#define UAE_SNDBOARD_H
+
+#include "uae/types.h"
 
 addrbank *sndboard_init(int devnum);
 void sndboard_free(void);
@@ -8,3 +12,4 @@ void update_sndboard_sound(double);
 void sndboard_reset(void);
 void sndboard_ext_volume(void);
 
+#endif /* UAE_SNDBOARD_H */
index ee82198eb7e8fb353246919a45ec08fb834b1fd1..efe09f3548ca1b1eb08d10dac2c942b75538f6b1 100644 (file)
@@ -1,7 +1,13 @@
+#ifndef UAE_SPECIALMONITORS_H
+#define UAE_SPECIALMONITORS_H
 
-bool emulate_specialmonitors (struct vidbuffer*, struct vidbuffer*);
+#include "memory.h"
+
+bool emulate_specialmonitors(struct vidbuffer *src, struct vidbuffer *dst);
 void specialmonitor_store_fmode(int vpos, int hpos, uae_u16 fmode);
 void specialmonitor_reset(void);
 bool specialmonitor_need_genlock(void);
 addrbank *specialmonitor_autoconfig_init(int devnum);
 bool emulate_genlock(struct vidbuffer*, struct vidbuffer*);
+
+#endif /* UAE_SPECIALMONITORS_H */
index 5fafc7efa7657c590841fb3064b9a5511e3c0b79..31f5a2d59e41fe46fc27baf0e0be138c6c4f275a 100644 (file)
@@ -1,6 +1,8 @@
 #ifndef UAE_STATUSLINE_H
 #define UAE_STATUSLINE_H
 
+#include "uae/types.h"
+
 #define TD_PADX 4
 #define TD_PADY 2
 #define TD_WIDTH 30
@@ -39,4 +41,4 @@ extern void statusline_updated(void);
 extern bool has_statusline_updated(void);
 extern const TCHAR *statusline_fetch(void);
 
-#endif // UAE_STATUSLINE_H
+#endif /* UAE_STATUSLINE_H */
index 68f4ffbad106dc926cc7954420762c1aa3960f82..1e7c0e61e7bedb1be2f3f7555b6dae83046e4861 100644 (file)
   *
   * Copyright 1996, 1997 Bernd Schmidt
   */
+#ifdef __cplusplus
 #include <string>
 using namespace std;
+#else
+#include <string.h>
+#include <ctype.h>
+#endif
 #include <stdio.h>
 #include <stdlib.h>
 #include <errno.h>
@@ -282,8 +287,11 @@ extern void to_upper (TCHAR *s, int len);
 #define DONT_HAVE_POSIX
 #endif
 
-#if defined _WIN32
+#if !defined(FSUAE) && defined _WIN32
 
+//#ifdef FSUAE
+//#error _WIN32 should not be defined here
+//#endif
 #if defined __WATCOMC__
 
 #define O_NDELAY 0
@@ -294,9 +302,22 @@ extern void to_upper (TCHAR *s, int len);
 
 #elif defined __MINGW32__
 
+#include <winsock.h>
+
 #define O_NDELAY 0
+
+#define FILEFLAG_DIR     0x1
+#define FILEFLAG_ARCHIVE 0x2
+#define FILEFLAG_WRITE   0x4
+#define FILEFLAG_READ    0x8
+#define FILEFLAG_EXECUTE 0x10
+#define FILEFLAG_SCRIPT  0x20
+#define FILEFLAG_PURE    0x40
+
 #define mkdir(a,b) mkdir(a)
 
+#include "uae/regparam.h"
+
 #elif defined _MSC_VER
 
 #ifdef HAVE_GETTIMEOFDAY
@@ -443,8 +464,8 @@ extern void mallocemu_free (void *ptr);
 #endif
 
 #if __GNUC__ - 1 > 1 || __GNUC_MINOR__ - 1 > 6
-extern void write_log (const TCHAR *, ...) __attribute__ ((format (printf, 1, 2)));
-extern void write_log (char *, ...) __attribute__ ((format (printf, 1, 2)));
+extern void write_log (const TCHAR *, ...);
+extern void write_log (const char *, ...) __attribute__ ((format (printf, 1, 2)));
 #else
 extern void write_log (const TCHAR *, ...);
 extern void write_log (const char *, ...);
@@ -492,7 +513,6 @@ extern void log_close (FILE *f);
 #define NORETURN
 #endif
 #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.
@@ -538,8 +558,6 @@ extern void log_close (FILE *f);
 # endif
 #endif
 
-#endif
-
 #ifndef __cplusplus
 
 #define xmalloc(T, N) malloc(sizeof (T) * (N))
@@ -563,3 +581,11 @@ extern void xfree (const void*);
 #endif
 
 #define DBLEQU(f, i) (abs ((f) - (i)) < 0.000001)
+
+#ifdef HAVE_VAR_ATTRIBUTE_UNUSED
+#define NOWARN_UNUSED(x) __attribute__((unused)) x
+#else
+#define NOWARN_UNUSED(x) x
+#endif
+
+#endif /* UAE_SYSDEPS_H */
index 211ea5c0e851a8a7d84bf55d77250787c2e22807..f0931939a60b04a2e07a28106cdddf3b324633bd 100644 (file)
@@ -1,3 +1,7 @@
+#ifndef UAE_TABLETLIBRARY_H
+#define UAE_TABLETLIBRARY_H
+
+#include "uae/types.h"
 
 uaecptr tabletlib_startup (uaecptr resaddr);
 void tabletlib_install (void);
@@ -6,3 +10,5 @@ extern void tabletlib_tablet (int x, int y, int z,
              int pressure, int maxpressure, uae_u32 buttonbits, int inproximity,
              int ax, int ay, int az);
 extern void tabletlib_tablet_info (int maxx, int maxy, int maxz, int maxax, int maxay, int maxaz, int xres, int yres);
+
+#endif /* UAE_TABLETLIBRARY_H */
index e196d96cd98ac5fe507bde05a1489570bb497355..1271abeac454b31aea2511b601303a6c1e9320be 100644 (file)
   * Copyright 1996 Ed Hanway
   */
 
-#ifndef TRAPS_H
-#define TRAPS_H
+#ifndef UAE_TRAPS_H
+#define UAE_TRAPS_H
+
+#include "uae/types.h"
 
 /*
  * Data passed to a trap handler
@@ -55,4 +57,4 @@ void init_extended_traps (void);
 #define deftrap2(f, mode, str) define_trap((f), (mode), (str))
 #define deftrapres(f, mode, str) define_trap((f), (mode | TRAPFLAG_UAERES), (str))
 
-#endif
+#endif /* UAE_TRAPS_H */
index c0db69fc4de76cf100b0eeaf950d7e3960a4545e..12f71bac77e3e2bc72ea4d4b412cb23ed0a489c4 100644 (file)
@@ -6,6 +6,11 @@
   * Copyright 1996 Bernd Schmidt
   */
 
+#ifndef UAE_UAE_H
+#define UAE_UAE_H
+
+#include "uae/types.h"
+
 extern void do_start_program (void);
 extern void start_program (void);
 extern void leave_program (void);
@@ -75,3 +80,10 @@ extern uae_u32 uaerand (void);
 extern uae_u32 uaesrand (uae_u32 seed);
 extern uae_u32 uaerandgetseed (void);
 
+/* the following prototypes should probably be moved somewhere else */
+
+int get_guid_target (uae_u8 *out);
+void filesys_addexternals (void);
+void jit_abort (const TCHAR *format,...);
+
+#endif /* UAE_UAE_H */
index ec768df06b4cb6458b950df28496ad8fea027f11..1047c84591d84b1b5ce56072092ba5fcfb50f347 100644 (file)
@@ -21,4 +21,6 @@
 #define UAE_PRINTF_FORMAT(f, a)
 #endif
 
+#define UAE_WPRINTF_FORMAT(f, a)
+
 #endif /* UAE_ATTRIBUTES_H */
index 81f4f6d999e904e0a3fc85dc6c7151734ba316e5..ca813568e0ea1f269451bd45d28223ca5e80b98b 100644 (file)
@@ -1,6 +1,8 @@
 #ifndef UAE_CDROM_H
 #define UAE_CDROM_H
 
+#include "uae/types.h"
+
 void encode_l2(uae_u8 *p, int address);
 
 #endif /* UAE_CDROM_H */
index 04719d578526f7353d9847bd91a70b1ab12a80f8..1162b8e9e6d5734a1303bd50f04f834cb08eb8c4 100644 (file)
@@ -17,6 +17,8 @@
 #define UAE_DLHANDLE void *
 #endif
 
+/* General loadable module support */
+
 UAE_DLHANDLE uae_dlopen(const TCHAR *path);
 void *uae_dlsym(UAE_DLHANDLE handle, const char *symbol);
 void uae_dlclose(UAE_DLHANDLE handle);
diff --git a/include/uae/likely.h b/include/uae/likely.h
new file mode 100644 (file)
index 0000000..635ed39
--- /dev/null
@@ -0,0 +1,16 @@
+#ifndef UAE_LIKELY_H
+#define UAE_LIKELY_H
+
+#ifdef HAVE___BUILTIN_EXPECT
+
+#define likely(x)   __builtin_expect(!!(x), 1)
+#define unlikely(x) __builtin_expect(!!(x), 0)
+
+#else
+
+#define likely(x)   x
+#define unlikely(x) x
+
+#endif
+
+#endif /* UAE_LIKELY_H */
index 385942b8599e3946aac597aa4a82e598ccbfb72c..f48019512a0d05a813b8573dcaa8f0a09daaa6c6 100644 (file)
@@ -6,8 +6,8 @@
  * See the file 'COPYING' for full license text.
  */
 
-#ifndef UAE_LOGGING_H
-#define UAE_LOGGING_H
+#ifndef UAE_LOG_H
+#define UAE_LOG_H
 
 /* This file is intended to be included by external libraries as well,
  * so don't pull in too much UAE-specific stuff. */
@@ -47,6 +47,10 @@ void uae_fatal(const char *format, ...) UAE_PRINTF_FORMAT(1, 2);
 
 /* Helpers to log use of stubbed functions */
 
+#ifdef _MSC_VER
+#define __func__ __FUNCTION__
+#endif
+
 #define UAE_LOG_STUB(format, ...) \
 { \
        uae_log(" -- stub -- %s " format "\n", __func__, ##__VA_ARGS__); \
@@ -75,7 +79,7 @@ void uae_fatal(const char *format, ...) UAE_PRINTF_FORMAT(1, 2);
 
 void write_log (const char *, ...) UAE_PRINTF_FORMAT(1, 2);
 #if SIZEOF_TCHAR != 1
-void write_log (const TCHAR *, ...) UAE_PRINTF_FORMAT(1, 2);
+void write_log (const TCHAR *, ...) UAE_WPRINTF_FORMAT(1, 2);
 #endif
 
 #endif
@@ -91,4 +95,4 @@ void write_log (const TCHAR *, ...) UAE_PRINTF_FORMAT(1, 2);
 
 #endif
 
-#endif /* UAE_LOGGING_H */
+#endif /* UAE_LOG_H */
index 0042a9734ea3ed70937cd912e44825f39b46f02f..c1f0d0af6fb14ea70eac9d97a676bbf6f67ca96e 100644 (file)
@@ -27,6 +27,7 @@
 #ifdef UAE
 
 void uae_ppc_get_model(const TCHAR **model, uint32_t *hid1);
+
 void uae_ppc_doze(void);
 void uae_ppc_crash(void);
 void uae_ppc_cpu_reboot(void);
@@ -94,7 +95,7 @@ typedef struct PPCMemoryRegion {
     uint32_t start;
     uint32_t size;
     void *memory;
-    const char *name;
+    char *name;
     uint32_t alias;
 } PPCMemoryRegion;
 
@@ -120,6 +121,7 @@ void PPCCALL ppc_cpu_reset(void);
 //int PPCCALL ppc_cpu_get_state();
 bool PPCCALL ppc_cpu_check_state(int state);
 void PPCCALL ppc_cpu_set_state(int state);
+
 /* Other PPC defines */
 
 #define PPC_IMPLEMENTATION_AUTO 0
index 97feaa43577e576d7eaa6c0dd901e6a868964999..8e6638e6c30901be13727407b9b730f0dde88c76 100644 (file)
@@ -4,13 +4,14 @@
 /* This file is intended to be included by external libraries as well,
  * so don't pull in too much UAE-specific stuff. */
 
+#include "uae/types.h"
 #include "uae/api.h"
 
 /* The qemu-uae major version must match this */
 #define QEMU_UAE_VERSION_MAJOR 3
 
 /* The qemu-uae minor version must be at least this */
-#define QEMU_UAE_VERSION_MINOR 4
+#define QEMU_UAE_VERSION_MINOR 5
 
 UAE_DECLARE_IMPORT_FUNCTION(
        void, qemu_uae_version, int *major, int *minor, int *revision)
index 5cb7448ded85bf42b0a6e0fd48cec86283e5baac..b7162f24947f7b03ea296f5b959a10219686760e 100644 (file)
@@ -34,11 +34,15 @@ typedef uint32_t uae_u32;
 #ifndef uae_s64
 typedef long long int uae_s64;
 #endif
-
 #ifndef uae_u64
 typedef unsigned long long int uae_u64;
 #endif
 
+#ifdef HAVE___UINT128_T
+#define HAVE_UAE_U128
+typedef __uint128_t uae_u128;
+#endif
+
 /* Parts of the UAE/WinUAE code uses the bool type (from C++).
  * Including stdbool.h lets this be valid also when compiling with C. */
 
@@ -78,9 +82,6 @@ typedef char TCHAR;
 #endif
 #endif
 
-#ifndef BOOL
-#define BOOL int
-#endif
 #ifndef FALSE
 #define FALSE 0
 #endif
index c215b3b0dffe8ebf4666ebeae1c2fe53f017b9b9..7423fec66e8f3d9976b66983232a0d3b4c10a7d9 100644 (file)
@@ -4,6 +4,11 @@
  *  (c) 1997 by Samuel Devulder
  */
 
+#ifndef UAE_UAEEXE_H
+#define UAE_UAEEXE_H
+
+#include "uae/types.h"
+
 struct uae_xcmd {
     struct uae_xcmd *prev, *next;
     TCHAR *cmd;
@@ -18,4 +23,4 @@ struct uae_xcmd {
 extern void uaeexe_install (void);
 extern int uaeexe (const TCHAR *cmd);
 
-
+#endif /* UAE_UAEEXE_H */
index 94b6af2aa58f018c8ac0010c8d488036eb7889f4..fb6935554a4ac949a5a75a5df24002709d8b9520 100644 (file)
@@ -1,3 +1,7 @@
+#ifndef UAE_UAEIPC_H
+#define UAE_UAEIPC_H
+
+#include "uae/types.h"
 
 extern void *createIPC (const TCHAR *name, int);
 extern void closeIPC (void*);
@@ -6,3 +10,5 @@ extern void *geteventhandleIPC (void*);
 extern int sendBinIPC (void*, uae_u8 *msg, int len);
 extern int sendIPC (void*, TCHAR *msg);
 extern int isIPC (const TCHAR *pipename);
+
+#endif /* UAE_UAEIPC_H */
index b06af08f39ebb84990a4a4f3ace682630eb4a3c3..bedf9ddef7dacf8e8883ab3cae8fec1af9a1efce 100644 (file)
@@ -6,23 +6,12 @@
 * Copyright 2013-2014 Frode Solheim
 */
 
-#ifndef _UAE_UAENATIVE_H_
-#define _UAE_UAENATIVE_H_
+#ifndef UAE_UAENATIVE_H
+#define UAE_UAENATIVE_H
 
 #ifdef WITH_UAENATIVE
 
-#if defined(_WIN32) || defined(WINDOWS)
-
-    #define UNIAPI __declspec(dllimport)
-    #define UNICALL __cdecl
-
-#else // _WIN32 not defined
-
-    #define UNIAPI
-    #define UNICALL
-
-#endif
-
+#define UNI_IMPORT
 #include "uni_common.h"
 
 #define UNI_FLAG_ASYNCHRONOUS 1
@@ -44,6 +33,6 @@ uaecptr uaenative_startup (uaecptr resaddr);
  * be de-allocated. */
 const TCHAR **uaenative_get_library_dirs(void);
 
-#endif // WITH_UAENATIVE
+#endif /* WITH_UAENATIVE */
 
-#endif // _UAE_UAENATIVE_H_
+#endif /* UAE_UAENATIVE_H */
index 46828d45250ca64863e462499115bc3e50ae3ef5..22766d66900b4b84f4aac3fa9557fa1d22ad59ca 100644 (file)
@@ -1,3 +1,9 @@
+#ifndef UAE_UAERESOURCE_H
+#define UAE_UAERESOURCE_H
+
+#include "uae/types.h"
 
 uaecptr uaeres_startup (uaecptr resaddr);
-void uaeres_install (void);
\ No newline at end of file
+void uaeres_install (void);
+
+#endif /* UAE_UAERESOURCE_H */
index 30d4bce9db095d3c2375ced463b9d728ae180558..b69d30cb4bb427a251dac9118cd4a92992c2eba2 100644 (file)
@@ -6,6 +6,11 @@
   * (c) 2006 Toni Wilen
   */
 
+#ifndef UAE_UAESERIAL_H
+#define UAE_UAESERIAL_H
+
+#include "uae/types.h"
+
 uaecptr uaeserialdev_startup (uaecptr resaddr);
 void uaeserialdev_install (void);
 void uaeserialdev_reset (void);
@@ -20,3 +25,5 @@ struct uaeserialdata
     void *writeevent;
 #endif
 };
+
+#endif /* UAE_UAESERIAL_H */
index 47487ad22ada96b2f76ba8a4596c580edd1ebdbe..d0c1abda8fc885560f30bb13e5dddc14a3d7b5e7 100644 (file)
@@ -6,17 +6,29 @@
 * Copyright 2013-2014 Frode Solheim
 */
 
-#ifndef _UAE_UNI_COMMON_H_
-#define _UAE_UNI_COMMON_H_
+#ifndef UAE_UNI_COMMON_H
+#define UAE_UNI_COMMON_H
 
 #define UNI_VERSION 1
 
 #ifndef UNI_MIN_VERSION
 // MIN_UNI_VERSION decides which callback functions are declared available.
-// The default, unless overriden is to required the current UNI version.
+// The default, unless overridden is to require the current UNI version.
 #define UNI_MIN_VERSION UNI_VERSION
 #endif
 
+#ifdef _WIN32
+#ifdef UNI_IMPORT
+#define UNIAPI __declspec(dllimport)
+#else
+#define UNIAPI __declspec(dllexport)
+#endif
+#define UNICALL __cdecl
+#else
+#define UNIAPI
+#define UNICALL
+#endif
+
 #define UNI_ERROR_NOT_ENABLED            0x70000001
 #define UNI_ERROR_INVALID_LIBRARY        0x70000002
 #define UNI_ERROR_INVALID_FUNCTION       0x70000002
 #define UNI_ERROR_INIT_FAILED            0x70000009
 #define UNI_ERROR_INTERFACE_TOO_OLD      0x7000000a
 
-// these errors are only return from the Amiga-side uni wrappers
+// these errors are only returned from the Amiga-side uni wrappers
 #define UNI_ERROR_AMIGALIB_NOT_OPEN      0x71000000
 
-// On all current platforms, char, short and int short be 1, 2 and 4 bytes
-// respectively, so we just use these simple types.
+#include <stdint.h>
+
+typedef int8_t   uni_byte;
+typedef uint8_t  uni_ubyte;
+typedef int16_t  uni_word;
+typedef uint16_t uni_uword;
+typedef int32_t  uni_long;
+typedef uint32_t uni_ulong;
 
-typedef char           uni_char;
-typedef unsigned char  uni_uchar;
-typedef short          uni_short;
-typedef unsigned short uni_ushort;
-typedef int            uni_long;
-typedef unsigned int   uni_ulong;
+// deprecated typedefs
+typedef int8_t   uni_char;
+typedef uint8_t  uni_uchar;
+typedef int16_t  uni_short;
+typedef uint16_t uni_ushort;
 
 typedef int (UNICALL *uni_version_function)();
 typedef void * (UNICALL *uni_resolve_function)(uni_ulong ptr);
-typedef const uni_char * (UNICALL *uni_uae_version_function)(void);
+typedef const char * (UNICALL *uni_uae_version_function)(void);
 
 struct uni {
     uni_long d1;
@@ -77,4 +94,4 @@ struct uni {
 #endif
 };
 
-#endif // _UAE_UNI_COMMON_H_
+#endif /* UAE_UNI_COMMON_H */
index c5608d675399cbc4501338cbb88241cd39fcd3c8..e4ef961295820ed8161d440d050d04c2fc76e524 100644 (file)
@@ -1,8 +1,3 @@
-#ifdef _MSC_VER
 ;
 #pragma pack(pop)
 #undef PACKED
-#else
-PACKED__;
-#endif
-
index 8ec53ac835ac8d4de37619fa8ce49e0bc168752b..4d5bb1f891113ff31a741aa6347c9b02bfd96273 100644 (file)
@@ -1,3 +1,5 @@
+#ifndef UAE_X86_H
+#define UAE_X86_H
 
 extern addrbank *a1060_init(struct romconfig *rc);
 extern addrbank *a2088xt_init(struct romconfig *rc);
@@ -17,3 +19,5 @@ void x86_bridge_sync_change(void);
 int is_x86_cpu(struct uae_prefs*);
 void x86_bridge_execute_until(int until);
 extern bool x86_turbo_on;
+
+#endif /* UAE_X86_H */
index 0cdbe689dbc9ea407093a0d383d16d70276d183d..14fc5920bbb4d35508758af12047288de594e10f 100644 (file)
@@ -6,6 +6,10 @@
   * Copyright 1995-1997 Bernd Schmidt
   */
 
+#ifndef UAE_XWIN_H
+#define UAE_XWIN_H
+
+#include "uae/types.h"
 #include "machdep/rpt.h"
 
 typedef uae_u32 xcolnr;
@@ -27,7 +31,10 @@ extern void setup_brkhandler (void);
 extern int isfullscreen (void);
 extern void toggle_fullscreen (int);
 extern bool toggle_rtg (int);
+
 extern void toggle_mousegrab (void);
+void setmouseactivexy (int x, int y, int dir);
+
 extern void desktop_coords (int *dw, int *dh, int *x, int *y, int *w, int *h);
 extern bool vsync_switchmode (int);
 extern frame_time_t vsync_busywait_end (int*);
@@ -54,9 +61,13 @@ extern int lockscr (struct vidbuffer*, bool);
 extern void unlockscr (struct vidbuffer*);
 extern bool target_graphics_buffer_update (void);
 
+void getgfxoffset (float *dxp, float *dyp, float *mxp, float *myp);
+double getcurrentvblankrate (void); /* todo: remove from od-win32/win32gfx.h */
+
 extern int debuggable (void);
 extern void LED (int);
 extern void screenshot (int,int);
+void refreshtitle (void);
 
 extern int bits_in_mask (unsigned long mask);
 extern int mask_shift (unsigned long mask);
@@ -161,3 +172,4 @@ extern struct vidbuf_description gfxvidinfo;
 extern struct bstring *video_mode_menu;
 extern void vidmode_menu_selected(int);
 
+#endif /* UAE_XWIN_H */
index 49b23e31771b04d8a801ad686e457d1adff2e429..07ac17cd929b89603d211b650bd70ce4517569b1 100644 (file)
@@ -1,3 +1,7 @@
+#ifndef UAE_ZARCHIVE_H
+#define UAE_ZARCHIVE_H
+
+#include "uae/types.h"
 
 typedef uae_s64 (*ZFILEREAD)(void*, uae_u64, uae_u64, struct zfile*);
 typedef uae_s64 (*ZFILEWRITE)(const void*, uae_u64, uae_u64, struct zfile*);
@@ -144,3 +148,5 @@ extern struct zfile *archive_getzfile (struct znode *zn, unsigned int id, int fl
 extern struct zfile *archive_unpackzfile (struct zfile *zf);
 
 extern struct zfile *decompress_zfd (struct zfile*);
+
+#endif /* UAE_ZARCHIVE_H */
index 4f08adedee87c0782d5dbc4904045de8b225fe01..ac3c0739039b16474a7da0a8af074ec1b758c52a 100644 (file)
@@ -9,6 +9,8 @@
 #ifndef UAE_ZFILE_H
 #define UAE_ZFILE_H
 
+#include "uae/types.h"
+
 struct zfile;
 struct zvolume;
 struct zdirectory;
@@ -153,4 +155,4 @@ struct mystat
 extern void timeval_to_amiga (struct mytimeval *tv, int* days, int* mins, int* ticks, int tickcount);
 extern void amiga_to_timeval (struct mytimeval *tv, int days, int mins, int ticks, int tickcount);
 
-#endif // UAE_ZFILE_H
+#endif /* UAE_ZFILE_H */
index 7084ad9e1a7c7731513b586f4e16728f44c041af..ad8ad73d896b066dd092faca95ba745b124a5ac9 100644 (file)
@@ -2217,7 +2217,7 @@ uae_s32 getz2size (struct uae_prefs *p)
        return start;
 }
 
-ULONG getz2endaddr (void)
+uae_u32 getz2endaddr (void)
 {
        ULONG start;
        start = currprefs.fastmem_size;
index 7de113727c076d54933ff8054adb5f26888298c7..ff646ef4888f98b6afa30e71a0a9880cf4565e19 100644 (file)
@@ -557,7 +557,7 @@ struct uaeserialdatawin32
        void *user;
 };
 
-int uaeser_getdatalenght (void)
+int uaeser_getdatalength (void)
 {
        return sizeof (struct uaeserialdatawin32);
 }
index 9e3d66292fb650337a96fb67dd3663ffb8f13a33..154d9687b01e4b4c93b1ebd89d2eeea8e7d6a3b8 100644 (file)
@@ -277,7 +277,7 @@ static uae_u32 REGPARAM2 dev_open (TrapContext *context)
        if (i == MAX_TOTAL_DEVICES)
                return openfail (ioreq, IOERR_OPENFAIL);
        dev = &devst[i];
-       dev->sysdata = xcalloc (uae_u8, uaeser_getdatalenght ());
+       dev->sysdata = xcalloc (uae_u8, uaeser_getdatalength ());
        if (!uaeser_open (dev->sysdata, dev, unit)) {
                xfree (dev->sysdata);
                return openfail (ioreq, IOERR_OPENFAIL);