]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
Add ifdef sections to code
authorDimitris Panokostas <midwan@gmail.com>
Fri, 28 Mar 2025 23:13:42 +0000 (00:13 +0100)
committerDimitris Panokostas <midwan@gmail.com>
Fri, 28 Mar 2025 23:13:42 +0000 (00:13 +0100)
This adds #ifdef sections to code, allowing for more minimal versions to be compiled.

65 files changed:
a2091.cpp
akiko.cpp
arcadia.cpp
audio.cpp
autoconf.cpp
blitter.cpp
blkdev.cpp
blkdev_cdimage.cpp
calc.cpp
cd32_fmv.cpp
cdtv.cpp
cfgfile.cpp
cia.cpp
cpuboard.cpp
custom.cpp
debug.cpp
debugmem.cpp
devices.cpp
disasm.cpp
disk.cpp
draco.cpp
drawing.cpp
dsp3210/DSP3210_emulation.cpp
enforcer.cpp
ethernet.cpp
events.cpp
expansion.cpp
filesys.cpp
fpp.cpp
fpp_native.cpp
fsusage.cpp
gayle.cpp
gfxboard.cpp
idecontrollers.cpp
include/newcpu.h
inputdevice.cpp
inputrecord.cpp
keybuf.cpp
luascript.cpp
main.cpp
mame/mameglue.h
memory.cpp
ncr9x_scsi.cpp
ncr_scsi.cpp
newcpu.cpp
od-win32/sysconfig.h
pcem/keyboard_at_draco.cpp
pcem/pcemglue.cpp
pcem/vid_inmos.cpp
pcem/vid_permedia2.cpp
pcem/vid_voodoo.cpp
pcem/vid_voodoo_render.cpp
ppc/ppc.cpp
qemuvga/qemu.cpp
qemuvga/qemuuaeglue.h
rommgr.cpp
savestate.cpp
scp.cpp
scsitape.cpp
specialmonitors.cpp
uaenative.cpp
vm.cpp
x86.cpp
zfile.cpp
zfile_archive.cpp

index 007f0034178cd49a1e8e3f12946f957f2d4cd374..aa5ec9f06278499480df0f28df1cd1b2d69e103a 100644 (file)
--- a/a2091.cpp
+++ b/a2091.cpp
@@ -45,7 +45,9 @@
 #include "cpuboard.h"
 #include "rtc.h"
 #include "devices.h"
+#ifdef WITH_DSP
 #include "dsp3210/dsp_glue.h"
+#endif
 
 #define DMAC_8727_ROM_VECTOR 0x8000
 #define CDMAC_ROM_VECTOR 0x2000
@@ -3628,9 +3630,11 @@ static void mbdmac_write_word (struct wd_state *wd, uae_u32 addr, uae_u32 val)
                break;
        case 0x5e:
        case 0x80:
+#ifdef WITH_DSP
                if (is_dsp_installed) {
                        dsp_write(val);
                }
+#endif
                break;
        }
 }
@@ -3654,9 +3658,11 @@ static void mbdmac_write_byte (struct wd_state *wd, uae_u32 addr, uae_u32 val)
                break;
        case 0x5f:
        case 0x80:
+#ifdef WITH_DSP
                if (is_dsp_installed) {
                        dsp_write(val);
                }
+#endif
                break;
        default:
                if (addr & 1)
@@ -3726,9 +3732,11 @@ static uae_u32 mbdmac_read_word (struct wd_state *wd, uae_u32 addr)
                break;
        case 0x5e:
        case 0x80:
+#ifdef WITH_DSP
                if (is_dsp_installed) {
                        v = dsp_read();
                }
+#endif
                break;
        }
 #if A3000_DEBUG_IO > 1
@@ -3762,9 +3770,11 @@ static uae_u32 mbdmac_read_byte (struct wd_state *wd, uae_u32 addr)
                break;
        case 0x5f:
        case 0x80:
+#ifdef WITH_DSP
                if (is_dsp_installed) {
                        v = dsp_read();
                }
+#endif
                break;
        }
 #if A3000_DEBUG_IO > 1
index dad0793761e3b8c110e483332018111bfad82bd0..47197fee3063afa243850b7932d71a16d6bee907 100644 (file)
--- a/akiko.cpp
+++ b/akiko.cpp
@@ -198,11 +198,15 @@ static void *cd32_eeprom;
 static uae_u8 cd32_i2c_direction;
 static bool cd32_i2c_data_scl, cd32_i2c_data_sda;
 struct zfile *cd32_flashfile;
+#ifdef ARCADIA
 extern uae_u8 *cubo_nvram;
+#endif
 
 static void nvram_read (void)
 {
+#ifdef ARCADIA
        cubo_nvram = NULL;
+#endif
        zfile_fclose(cd32_flashfile);
        cd32_flashfile = NULL;
        eeprom_free(cd32_eeprom);
@@ -219,9 +223,11 @@ static void nvram_read (void)
                cd32_nvram = xmalloc(uae_u8, maxlen);
        }
        memset(cd32_nvram, 0, maxlen);
+#ifdef ARCADIA
        if (is_board_enabled(&currprefs, ROMTYPE_CUBO, 0)) {
                cubo_nvram = cd32_nvram + currprefs.cs_cd32nvram_size;
        }
+#endif
        TCHAR path[MAX_DPATH];
        cfgfile_resolve_path_out_load(currprefs.flashfile, path, MAX_DPATH, PATH_ROM);
        cd32_flashfile = zfile_fopen (path, _T("rb+"), ZFD_NORMAL);
@@ -229,8 +235,10 @@ static void nvram_read (void)
                cd32_flashfile = zfile_fopen (path, _T("wb"), 0);
        if (cd32_flashfile) {
                size_t size = zfile_fread(cd32_nvram, 1, currprefs.cs_cd32nvram_size, cd32_flashfile);
+#ifdef ARCADIA
                if (size == currprefs.cs_cd32nvram_size && maxlen > currprefs.cs_cd32nvram_size)
                        size += zfile_fread(cubo_nvram, 1, maxlen - currprefs.cs_cd32nvram_size, cd32_flashfile);
+#endif
                if (size < maxlen)
                        zfile_fwrite(cd32_nvram + size, 1, maxlen - size, cd32_flashfile);
        }
index 299d4729d19aebb5f05ae778376a5d9200b84dc7..2ff20a2e7aa962fa4e71327212ab402095090452 100644 (file)
@@ -23,7 +23,9 @@
 #include "debug.h"
 #include "arcadia.h"
 #include "zfile.h"
+#ifdef AVIOUTPUT
 #include "videograb.h"
+#endif
 #include "xwin.h"
 #include "drawing.h"
 #include "statusline.h"
@@ -928,7 +930,9 @@ static void sony_serial_read(uae_u16 w)
                ld_mode = LD_MODE_PLAY;
                ld_direction = 0;
                ld_repcnt = -1;
+#ifdef AVIOUTPUT
                pausevideograb(0);
+#endif
        }
        ack();
        if (log_ld)
@@ -942,7 +946,9 @@ static void sony_serial_read(uae_u16 w)
                write_log(_T("LD: FAST FORWARD PLAY\n"));
        break;
        case 0x3f: // STOP '?'
+#ifdef AVIOUTPUT
        pausevideograb(1);
+#endif
        ld_direction = 0;
        ld_repcnt = -1;
        ld_mode = LD_MODE_STOP;
@@ -984,6 +990,7 @@ static void sony_serial_read(uae_u16 w)
                ack();
                // delay seek status response by 2 frames (Platoon requires this)
                ld_wait_seek = arcadia_hsync_cnt + 2 * maxvpos;
+#ifdef AVIOUTPUT
                if (ld_address > endpos) {
                        ld_address = endpos;
                        getsetpositionvideograb(ld_address);
@@ -992,6 +999,7 @@ static void sony_serial_read(uae_u16 w)
                        getsetpositionvideograb(ld_address);
                        ld_wait_seek_status = 0x01; // COMPLETION
                }
+#endif
                ld_mode = LD_MODE_STILL;
                ld_mode_value = 0;
                ld_direction = 0;
@@ -1007,7 +1015,9 @@ static void sony_serial_read(uae_u16 w)
        break;
        case 0x4a: // R-PLAY 'J'
        ld_mode = LD_MODE_PLAY;
+#ifdef AVIOUTPUT
        pausevideograb(1);
+#endif
        ld_direction = -1;
        ack();
        if (log_ld)
@@ -1015,7 +1025,9 @@ static void sony_serial_read(uae_u16 w)
        break;
        case 0x4b: // Fast reverse play 'K'
        ld_mode = LD_MODE_PLAY;
+#ifdef AVIOUTPUT
        pausevideograb(1);
+#endif
        ld_direction = -2;
        ack();
        if (log_ld)
@@ -1024,7 +1036,9 @@ static void sony_serial_read(uae_u16 w)
        case 0x4f: // STILL 'O'
        ld_mode = LD_MODE_STILL;
        ld_direction = 0;
+#ifdef AVIOUTPUT
        pausevideograb(1);
+#endif
        ack();
        if (log_ld)
                write_log(_T("LD: PAUSE\n"));
@@ -1034,7 +1048,9 @@ static void sony_serial_read(uae_u16 w)
        ld_mode = LD_MODE_STILL;
        ld_mode_value = LD_MODE_SEARCH;
        ld_direction = 0;
+#ifdef AVIOUTPUT
        pausevideograb(1);
+#endif
        ld_value = 0;
        if (log_ld)
                write_log(_T("LD: SEARCH\n"));
@@ -1043,7 +1059,9 @@ static void sony_serial_read(uae_u16 w)
        ack();
        ld_mode_value = LD_MODE_REPEAT;
        ld_direction = 0;
+#ifdef AVIOUTPUT
        pausevideograb(1);
+#endif
        ld_value = 0;
        if (log_ld)
                write_log(_T("LD: REPEAT\n"));
@@ -1051,28 +1069,36 @@ static void sony_serial_read(uae_u16 w)
        case 0x46: // CH-1 ON 'F'
        ack();
        ld_audio |= 1;
+#ifdef AVIOUTPUT
        setchflagsvideograb(ld_audio, false);
+#endif
        if (log_ld)
                write_log(_T("LD: CH-1 ON\n"));
        break;
        case 0x48: // CH-2 ON 'H'
        ack();
        ld_audio |= 2;
+#ifdef AVIOUTPUT
        setchflagsvideograb(ld_audio, false);
+#endif
        if (log_ld)
                write_log(_T("LD: CH-2 ON\n"));
        break;
        case 0x47: // CH-1 OFF 'G'
        ack();
        ld_audio &= ~1;
+#ifdef AVIOUTPUT
        setchflagsvideograb(ld_audio, false);
+#endif
        if (log_ld)
                write_log(_T("LD: CH-1 OFF\n"));
        break;
        case 0x49: // CH-2 OFF 'I'
        ack();
        ld_audio &= ~2;
+#ifdef AVIOUTPUT
        setchflagsvideograb(ld_audio, false);
+#endif
        if (log_ld)
                write_log(_T("LD: CH-2 OFF\n"));
        break;
@@ -1099,16 +1125,20 @@ static void sony_serial_read(uae_u16 w)
        ld_direction = 0;
        ld_video = true;
        ld_value = 0;
+#ifdef AVIOUTPUT
        pausevideograb(1);
+#endif
        ack();
        if (log_ld)
                write_log(_T("LD: CL\n"));
        break;
        case 0x60: // ADDR INQ '`'
        {
+#ifdef AVIOUTPUT
                if (!ld_save_restore && isvideograb() && ld_direction == 0) {
                        ld_address = (uae_u32)getsetpositionvideograb(-1);
                }
+#endif
                uae_u32 v = ld_address;
                uae_u32 m = 10000;
                for (int i = 0; i < 5; i++) {
@@ -1169,6 +1199,7 @@ static void alg_vsync(void)
 {
        ld_vsync++;
        if (ld_save_restore) {
+#ifdef AVIOUTPUT
                if (ld_address == 0 || getsetpositionvideograb(ld_address) > 0) {
                        ld_save_restore = false;
                        setchflagsvideograb(ld_audio, false);
@@ -1176,33 +1207,41 @@ static void alg_vsync(void)
                if (ld_save_restore) {
                        return;
                }
+#endif
        }
 
        if (ld_mode == LD_MODE_PLAY) {
+#ifdef AVIOUTPUT
                if (log_ld && (ld_vsync & 63) == 0) {
                        uae_s64 pos = getsetpositionvideograb(-1);
                        write_log(_T("LD: frame %lld\n"), pos);
                }
                pausevideograb(0);
+#endif
                if (ld_direction < 0) {
                        if (ld_address > 0) {
                                ld_address -= (-ld_direction);
                                if ((ld_vsync & 15) == 0) {
+#ifdef AVIOUTPUT
                                        if (isvideograb()) {
                                                getsetpositionvideograb(ld_address);
                                        }
+#endif
                                }
                        }
                } else {
                        ld_address += 1 + ld_direction;
                        if (ld_direction > 0) {
                                if ((ld_vsync & 15) == 0) {
+#ifdef AVIOUTPUT
                                        if (isvideograb()) {
                                                getsetpositionvideograb(ld_address);
                                        }
+#endif
                                }
                        }
                }
+#ifdef AVIOUTPUT
                if (ld_repcnt >= 0 || ld_mark >= 0) {
                        uae_s64 f = getsetpositionvideograb(-1);
                        if (ld_repcnt >= 0) {
@@ -1244,6 +1283,7 @@ static void alg_vsync(void)
                }
        } else {
                pausevideograb(1);
+#endif
        }
        if (algmemory_modified > 0) {
                algmemory_modified--;
@@ -1537,7 +1577,9 @@ void alg_map_banks(void)
        if (alg_picmatic_nova == 1) {
                map_banks(&alg_ram_bank, 0xf6, 1, 0);
        }
+#ifdef AVIOUTPUT
        pausevideograb(1);
+#endif
 
        currprefs.cs_floppydatapullup = changed_prefs.cs_floppydatapullup = true;
        device_add_vsync_pre(arcadia_vsync);
@@ -1628,8 +1670,11 @@ uae_u8 *save_alg(size_t *len)
 
        dstbak = dst = xmalloc(uae_u8, 1000);
        save_u32(1);
-
+#ifdef AVIOUTPUT
        uae_u32 addr = (uae_u32)getsetpositionvideograb(-1);
+#else
+       uae_u32 addr = 0;
+#endif
 
        save_u32(alg_flag);
        save_u32(ld_value);
index 1058bdb71be21eca5146bf35f145021b98334515..14846165d6cab9b98782ea591701e716026879e7 100644 (file)
--- a/audio.cpp
+++ b/audio.cpp
 #include "gui.h"
 #include "xwin.h"
 #include "debug.h"
+#ifdef WITH_SNDBOARD
 #include "sndboard.h"
+#endif
 #ifdef AVIOUTPUT
 #include "avioutput.h"
 #endif
 #ifdef AHI
 #include "traps.h"
 #include "ahidsound.h"
+#ifdef AHI_v2
 #include "ahidsound_new.h"
 #endif
+#endif
 #include "threaddep/thread.h"
 
 #include <math.h>
@@ -2029,7 +2033,9 @@ void audio_reset (void)
 
 #ifdef AHI
        ahi_close_sound ();
+#ifdef AHI_v2
        free_ahi_v2 ();
+#endif
 #endif
        reset_sound ();
        memset (sound_filter_state, 0, sizeof sound_filter_state);
@@ -2172,7 +2178,9 @@ void set_audio (void)
 
        sound_cd_volume[0] = sound_cd_volume[1] = (100 - (currprefs.sound_volume_cd < 0 ? 0 : currprefs.sound_volume_cd)) * 32768 / 100;
        sound_paula_volume[0] = sound_paula_volume[1] = (100 - currprefs.sound_volume_paula) * 32768 / 100;
+#ifdef WITH_SNDBOARD
        sndboard_ext_volume();
+#endif
 
        if (ch >= 0) {
                if (currprefs.produce_sound >= 2) {
index fddfaa62c97909e24eb2465ab31d0cde5c7dda7d..079bb1fa3ae5e5b6652a483c9674bf0a1c2ff7e1 100644 (file)
@@ -24,7 +24,9 @@
 #include "threaddep/thread.h"
 #include "native2amiga.h"
 #include "inputdevice.h"
+#ifdef WITH_PPC
 #include "uae/ppc.h"
+#endif
 #include "devices.h"
 
 /* Commonly used autoconfig strings */
index 18d93db182c43fa74988419bd9e2c352eb97c668..f807c6bb8b4957d292ee2cd9619c8720a86f1693 100644 (file)
@@ -438,6 +438,7 @@ static void blitter_end(void)
        blt_info.blit_queued = 0;
        event2_remevent(ev2_blitter);
        unset_special(SPCFLAG_BLTNASTY);
+#if BLITTER_DEBUG
        if (log_blitter & 1) {
 
                if (blt_info.vblitsize > 100) {
@@ -448,6 +449,7 @@ static void blitter_end(void)
                        blit_totalcyclecounter, blit_misscyclecounter, blit_totalcyclecounter + blit_misscyclecounter);
 
        }
+#endif
 }
 
 static void blitter_done_all(bool all)
@@ -1104,8 +1106,10 @@ static void blit_bltset(int con)
                                //blitter_dump();
                                blitshifterdebug(bltcon0_old, false);
                                blit_warned--;
+#ifdef DEBUGGER
                                if (log_blitter & 16)
                                        activate_debugger();
+#endif
                        }
                }
        }
@@ -2027,13 +2031,13 @@ void do_blitter(int copper, uaecptr pc)
 {
        int cycles;
 
-       //activate_debugger();
-
+#if BLITTER_DEBUG
        if ((log_blitter & 2)) {
                if (blt_info.blit_main) {
                        write_log (_T("blitter was already active! PC=%08x\n"), M68K_GETPC);
                }
        }
+#endif
 
        bltcon0_old = blt_info.bltcon0;
        bltcon1_old = blt_info.bltcon1;
@@ -2066,6 +2070,7 @@ void do_blitter(int copper, uaecptr pc)
        }
 #endif
 
+#if BLITTER_DEBUG
        if ((log_blitter & 1) || ((log_blitter & 32) && !blitline)) {
                if (1) {
                        int ch = 0;
@@ -2084,6 +2089,7 @@ void do_blitter(int copper, uaecptr pc)
                        blitter_dump();
                }
        }
+#endif
 
        blit_slowdown = 0;
 
@@ -2191,6 +2197,7 @@ void maybe_blit(int hack)
 #ifdef DEBUGGER
                debugtest (DEBUGTEST_BLITTER, _T("program does not wait for blitter tc=%d\n"), blit_cyclecounter);
 #endif
+#if BLITTER_DEBUG
                if (log_blitter)
                        warned = 0;
                if (log_blitter & 2) {
@@ -2199,6 +2206,7 @@ void maybe_blit(int hack)
                        //activate_debugger();
                        //blitter_done (hpos);
                }
+#endif
        }
 
        if (blitter_cycle_exact) {
@@ -2211,8 +2219,10 @@ void maybe_blit(int hack)
 
        blitter_handler(0);
 end:;
+#if BLITTER_DEBUG
        if (log_blitter)
                blitter_delayed_debug = 1;
+#endif
 }
 
 int blitnasty(void)
@@ -2615,8 +2625,10 @@ uae_u8 *save_blitter_new(size_t *len, uae_u8 *dstptr)
 
        if (blt_info.blit_main) {
                write_log(_T("BLITTER active while saving state\n"));
+#if BLITTER_DEBUG
                if (log_blitter)
                        blitter_dump();
+#endif
        }
 
        save_u32((uae_u32)blit_first_cycle);
index 92a60a80f8840d9777723f50742331a3e4cb2130..8ba8677a420e92af776ebd7547f715e020fd1618 100644 (file)
@@ -247,7 +247,11 @@ void blkdev_fix_prefs (struct uae_prefs *p)
                        continue;
                if (p->cdslots[i].inuse || p->cdslots[i].name[0]) {
                        TCHAR *name = p->cdslots[i].name;
+#ifdef _WIN32
                        if (_tcslen (name) == 3 && name[1] == ':' && name[2] == '\\') {
+#else
+                       if (name[0] == '/' && name[1] == 'd' && name[2] == 'e' && name[3] == 'v' && name[4] == '/') {
+#endif
                                if (currprefs.scsi && (currprefs.win32_uaescsimode == UAESCSI_SPTI || currprefs.win32_uaescsimode == UAESCSI_SPTISCAN))
                                        cdscsidevicetype[i] = SCSI_UNIT_SPTI;
                                else
@@ -392,6 +396,7 @@ static int get_standard_cd_unit2 (struct uae_prefs *p, cd_standard_unit csu)
                return unitnum;
        }
        device_func_init (SCSI_UNIT_IOCTL);
+#ifdef _WIN32
        for (int drive = 'C'; drive <= 'Z'; ++drive) {
                TCHAR vol[100];
                _stprintf (vol, _T("%c:\\"), drive);
@@ -404,6 +409,7 @@ static int get_standard_cd_unit2 (struct uae_prefs *p, cd_standard_unit csu)
                        }
                }
        }
+#endif
        if (isaudio) {
                TCHAR vol[100];
                _stprintf (vol, _T("%c:\\"), isaudio);
index 7b7c3305f9d9b64679a94431e72952fbc98c67e9..11ff9305c86ec0a5960afc5427e7e018f91b8355 100644 (file)
@@ -492,7 +492,15 @@ static bool cdda_play_func2 (struct cdunit *cdu, int *outpos)
                if (oldplay != cdu->cdda_play) {
                        struct cdtoc *t;
                        int sector, diff;
+#ifdef WIN32
                        struct _timeb tb1, tb2;
+#else
+#ifdef HAVE_SYS_TIMEB_H
+                       struct timespec ts1, ts2;
+#else
+#warning Missing timing functions
+#endif
+#endif
 
                        idleframes = 0;
                        silentframes = 0;
index 98a66af0966b96ab90b28193e05df6e481452a38..7cd8a68f73b9736431a4371395fe469f7d05482a 100644 (file)
--- a/calc.cpp
+++ b/calc.cpp
 #define MAX_VALUES 32
 #define IOBUFFERS 256
 
+#ifdef DEBUGGER
 uae_u32 get_byte_debug(uaecptr addr);
 uae_u32 get_word_debug(uaecptr addr);
 uae_u32 get_long_debug(uaecptr addr);
 int getregidx(TCHAR **c);
 uae_u32 returnregx(int regid);
+#endif
 
 static double parsedvaluesd[MAX_VALUES];
 static TCHAR *parsedvaluess[MAX_VALUES];
@@ -400,6 +402,7 @@ static bool docalcx(TCHAR op, double v1, double v2, double *valp)
         case ':':
         v = v1;
         break;
+#ifdef DEBUGGER
         case 0xf0:
         v = get_byte_debug((uaecptr)v1);
         break;
@@ -409,7 +412,7 @@ static bool docalcx(TCHAR op, double v1, double v2, double *valp)
         case 0xf2:
         v = get_long_debug((uaecptr)v1);
         break;
-
+#endif
         default:
         return false;
     }
index 986ea2287a614b7a0cf1fdc58d43fbcf0805043a..b4e0c146f382f8186c10c074a9756c5b37f83131 100644 (file)
 
 #include "cda_play.h"
 #include "archivers/mp2/kjmp2.h"
+
+#ifdef USE_LIBMPEG2
+#if (!defined _WIN32 && !defined ANDROID)
+extern "C" {
+#include "mpeg2dec/mpeg2.h"
+#include "mpeg2dec/mpeg2convert.h"
+}
+#else
 #include "mpeg2.h"
 #include "mpeg2convert.h"
+#endif
 
 #define FMV_DEBUG 0
 static int fmv_audio_debug = 0;
index af7ab11a05c71326392fa61cb10a488782d76047..ae36068d3908cbeb2112e8f6512fa62e62aaf171 100644 (file)
--- a/cdtv.cpp
+++ b/cdtv.cpp
@@ -29,7 +29,9 @@
 #include "gui.h"
 #include "zfile.h"
 #include "threaddep/thread.h"
+#ifdef A2091
 #include "a2091.h"
+#endif
 #include "uae.h"
 #include "savestate.h"
 #include "scsi.h"
@@ -1065,17 +1067,23 @@ static void dmac_start_dma (void)
 {
        if (!(dmac_cntr & CNTR_PDMD)) { // non-scsi dma
                write_comm_pipe_u32 (&requests, 0x0100, 1);
-       } else {
+       }
+#ifdef A2091
+       else {
                scsi_dmac_a2091_start_dma (wd_cdtv);
        }
+#endif
 }
 static void dmac_stop_dma (void)
 {
        if (!(dmac_cntr & CNTR_PDMD)) { // non-scsi dma
                ;
-       } else {
+       }
+#ifdef A2091
+       else {
                scsi_dmac_a2091_stop_dma (wd_cdtv);
        }
+#endif
 }
 
 void cdtv_getdmadata (uae_u32 *acr)
@@ -1086,12 +1094,13 @@ void cdtv_getdmadata (uae_u32 *acr)
 static void checkint (void)
 {
        int irq = 0;
-
+#ifdef A2091
        if (cdtvscsi && (wdscsi_getauxstatus (&wd_cdtv->wc) & 0x80)) {
                dmac_istr |= ISTR_INTS;
                if ((dmac_cntr & CNTR_INTEN) && (dmac_istr & ISTR_INTS))
                        irq = 1;
        }
+#endif
        if ((dmac_cntr & CNTR_INTEN) && (dmac_istr & ISTR_E_INT))
                irq = 1;
        if (irq)
@@ -1278,14 +1287,18 @@ static uae_u32 dmac_bget2 (uaecptr addr)
                v = dmac_cntr;
                break;
        case 0x91:
+#ifdef A2091
                if (cdtvscsi)
                        v = wdscsi_getauxstatus (&wd_cdtv->wc);
+#endif
                break;
        case 0x93:
+#ifdef A2091
                if (cdtvscsi) {
                        v = wdscsi_get (&wd_cdtv->wc, wd_cdtv);
                        checkint ();
                }
+#endif
                break;
        case 0xa1:
                sten = 0;
@@ -1385,16 +1398,20 @@ static void dmac_bput2 (uaecptr addr, uae_u32 b)
                dmac_dawr |= b << 0;
                break;
        case 0x91:
+#ifdef A2091
                if (cdtvscsi) {
                        wdscsi_sasr (&wd_cdtv->wc, b);
                        checkint ();
                }
+#endif
                break;
        case 0x93:
+#ifdef A2091
                if (cdtvscsi) {
                        wdscsi_put (&wd_cdtv->wc, wd_cdtv, b);
                        checkint ();
                }
+#endif
                break;
        case 0xa1:
                cdrom_command (b);
@@ -1772,8 +1789,10 @@ bool cdtvscsi_init(struct autoconfig_info *aci)
        if (!aci->doinit)
                return true;
        cdtvscsi = true;
+#ifdef A2091
        init_wd_scsi(wd_cdtv, aci->rc->dma24bit);
        wd_cdtv->dmac_type = COMMODORE_DMAC;
+#endif
        if (configured > 0)
                map_banks_z2(&dmac_bank, configured, 0x10000 >> 16);
        return true;
index 19e9686675a97a6a71ab564905c745fa6cff061b..19a41640938e5f843919148c95bf9c8a44fb5b99 100644 (file)
 #include "calc.h"
 #include "gfxboard.h"
 #include "cpuboard.h"
+#ifdef WITH_LUA
 #include "luascript.h"
+#endif
 #include "ethernet.h"
 #include "native2amiga_api.h"
 #include "ini.h"
+#ifdef WITH_SPECIALMONITORS
 #include "specialmonitors.h"
+#endif
 
 #define cfgfile_warning write_log
 #define cfgfile_warning_obsolete write_log
@@ -2161,11 +2165,13 @@ void cfgfile_save_options (struct zfile *f, struct uae_prefs *p, int type)
                }
        }
 
+#ifdef WITH_LUA
        for (i = 0; i < MAX_LUA_STATES; i++) {
                if (p->luafiles[i][0]) {
                        cfgfile_write_path2(f, _T("lua"), p->luafiles[i], PATH_NONE);
                }
        }
+#endif
 
        if (p->trainerfile[0])
                cfgfile_write_path2(f, _T("trainerfile"), p->trainerfile, PATH_NONE);
@@ -2618,9 +2624,9 @@ void cfgfile_save_options (struct zfile *f, struct uae_prefs *p, int type)
                }
                cfgfile_dwrite_str(f, _T("genlock_effects"), tmp);
        }
-
-
+#ifdef WITH_SPECIALMONITORS
        cfgfile_dwrite_strarr(f, _T("monitoremu"), specialmonitorconfignames, p->monitoremu);
+#endif
        cfgfile_dwrite(f, _T("monitoremu_monitor"), _T("%d"), p->monitoremu_mon);
        cfgfile_dwrite_coords(f, _T("lightpen_offset"), p->lightpen_offset[0], p->lightpen_offset[1]);
        cfgfile_dwrite_bool(f, _T("lightpen_crosshair"), p->lightpen_crosshair);
@@ -2827,8 +2833,10 @@ void cfgfile_save_options (struct zfile *f, struct uae_prefs *p, int type)
                }
                cfgfile_writeramboard(p, f, _T("fastmem"), i, &p->fastmem[i]);
        }
+#ifdef DEBUGGER
        cfgfile_write(f, _T("debugmem_start"), _T("0x%x"), p->debugmem_start);
        cfgfile_write(f, _T("debugmem_size"), _T("%d"), p->debugmem_size / 0x100000);
+#endif
        cfgfile_write(f, _T("mem25bit_size"), _T("%d"), p->mem25bit.size / 0x100000);
        cfgfile_writeramboard(p, f, _T("mem25bit"), 0, &p->mem25bit);
        cfgfile_write(f, _T("a3000mem_size"), _T("%d"), p->mbresmem_low.size / 0x100000);
@@ -3609,6 +3617,7 @@ static int cfgfile_parse_host (struct uae_prefs *p, TCHAR *option, TCHAR *value)
                }
        }
 
+#ifdef WITH_LUA
        if (!_tcsicmp (option, _T("lua"))) {
                for (i = 0; i < MAX_LUA_STATES; i++) {
                        if (!p->luafiles[i][0]) {
@@ -3618,7 +3627,8 @@ static int cfgfile_parse_host (struct uae_prefs *p, TCHAR *option, TCHAR *value)
                }
                return 1;
        }
-               
+#endif
+
        if (cfgfile_strval (option, value, _T("gfx_autoresolution_min_vertical"), &p->gfx_autoresolution_minv, vertmode, 0)) {
                p->gfx_autoresolution_minv--;
                return 1;
@@ -3794,8 +3804,10 @@ static int cfgfile_parse_host (struct uae_prefs *p, TCHAR *option, TCHAR *value)
                return 1;
        }       
 
+#ifdef DEBUGGER
        if (cfgfile_multichoice(option, value, _T("debugging_features"), &p->debugging_features, debugfeatures))
                return 1;
+#endif
 
        if (cfgfile_yesno(option, value, _T("gfx_api_hdr"), &vb)) {
                if (vb && p->gfx_api == 2) {
@@ -6049,7 +6061,9 @@ static int cfgfile_parse_hardware (struct uae_prefs *p, const TCHAR *option, TCH
                || cfgfile_strval(option, value, _T("comp_trustnaddr"), &p->comptrustnaddr, compmode, 0)
                || cfgfile_strval(option, value, _T("collision_level"), &p->collision_level, collmode, 0)
                || cfgfile_strval(option, value, _T("parallel_matrix_emulation"), &p->parallel_matrix_emulation, epsonprinter, 0)
+#ifdef WITH_SPECIALMONITORS
                || cfgfile_strval(option, value, _T("monitoremu"), &p->monitoremu, specialmonitorconfignames, 0)
+#endif
                || cfgfile_strval(option, value, _T("genlockmode"), &p->genlock_image, genlockmodes, 0)
                || cfgfile_strval(option, value, _T("waiting_blits"), &p->waiting_blits, waitblits, 0)
                || cfgfile_strval(option, value, _T("floppy_auto_extended_adf"), &p->floppy_auto_ext2, autoext2, 0)
@@ -7687,7 +7701,9 @@ int parse_cmdline_option (struct uae_prefs *p, TCHAR c, const TCHAR *arg)
 
                /* case 'g': p->use_gfxlib = 1; break; */
        case 'G': p->start_gui = 0; break;
+#ifdef DEBUGGER
        case 'D': p->start_debugger = 1; break;
+#endif
 
        case 'n':
                if (_tcschr (arg, 'i') != 0)
@@ -8042,9 +8058,13 @@ static int execcmdline(struct uae_prefs *prefs, int argv, TCHAR **argc, TCHAR *o
                                                }
                                        }
                                        filesys_shellexecute2(cmd, NULL, NULL, 0, 0, 0, flags, NULL, 0, shellexec_cb, NULL);
-                               } else if (!_tcsicmp(argc[i], _T("dbg"))) {
+                               } 
+#ifdef DEBUGGER
+               else if (!_tcsicmp(argc[i], _T("dbg"))) {
                                        debug_parser(argc[i + 1], out, outsize);
-                               } else if (!inputdevice_uaelib(argc[i], argc[i + 1])) {
+                               }
+#endif
+                               else if (!inputdevice_uaelib(argc[i], argc[i + 1])) {
                                        if (!cfgfile_parse_uaelib_option(prefs, argc[i], argc[i + 1], 0)) {
                                                if (!cfgfile_parse_option(prefs, argc[i], argc[i + 1], 0)) {
                                                        ret = 5;
@@ -8604,11 +8624,11 @@ void default_prefs (struct uae_prefs *p, bool reset, int type)
        _tcscpy (p->floppyslots[1].df, _T("df1.adf"));
        _tcscpy (p->floppyslots[2].df, _T("df2.adf"));
        _tcscpy (p->floppyslots[3].df, _T("df3.adf"));
-
+#ifdef WITH_LUA
        for (int i = 0; i < MAX_LUA_STATES; i++) {
                p->luafiles[i][0] = 0;
        }
-
+#endif
        configure_rom (p, roms, 0);
        _tcscpy (p->romextfile, _T(""));
        _tcscpy (p->romextfile2, _T(""));
@@ -8938,6 +8958,8 @@ static void set_68020_compa (struct uae_prefs *p, int compa, int cd32)
                p->address_space_24 = 0;
 #ifdef JIT
                p->cachesize = MAX_JIT_CACHE;
+#else
+               p->cachesize = 0;
 #endif
                break;
        }
@@ -8991,7 +9013,11 @@ static int bip_a3000 (struct uae_prefs *p, int config, int compa, int romcheck)
                p->mmu_model = 68030;
        } else {
 #ifdef JIT
+               p->mmu_model = 0;
                p->cachesize = MAX_JIT_CACHE;
+#else
+               p->mmu_model = 0;
+               p->cachesize = 0;
 #endif
        }
        p->chipset_mask = CSMASK_ECS_AGNUS | CSMASK_ECS_DENISE;
@@ -9023,6 +9049,7 @@ static int bip_a4000 (struct uae_prefs *p, int config, int compa, int romcheck)
        p->mbresmem_low.size = 8 * 1024 * 1024;
        p->cpu_model = 68030;
        p->fpu_model = 68882;
+       p->mmu_model = 0;
        switch (config)
        {
                case 1:
@@ -9032,11 +9059,13 @@ static int bip_a4000 (struct uae_prefs *p, int config, int compa, int romcheck)
                case 2:
                p->cpu_model = 68060;
                p->fpu_model = 68060;
+#ifdef WITH_PPC
                p->ppc_mode = 1;
                cpuboard_setboard(p, BOARD_CYBERSTORM, BOARD_CYBERSTORM_SUB_PPC);
                p->cpuboardmem1.size = 128 * 1024 * 1024;
                int roms_ppc[] = { 98, -1 };
                configure_rom(p, roms_ppc, romcheck);
+#endif
                break;
        }
        p->chipset_mask = CSMASK_AGA | CSMASK_ECS_AGNUS | CSMASK_ECS_DENISE;
@@ -9046,6 +9075,8 @@ static int bip_a4000 (struct uae_prefs *p, int config, int compa, int romcheck)
        p->produce_sound = 2;
 #ifdef JIT
        p->cachesize = MAX_JIT_CACHE;
+#else
+       p->cachesize = 0;
 #endif
        p->floppyslots[0].dfxtype = DRV_35_HD;
        p->floppyslots[1].dfxtype = DRV_35_HD;
@@ -9070,6 +9101,7 @@ static int bip_a4000t (struct uae_prefs *p, int config, int compa, int romcheck)
        p->mbresmem_low.size = 8 * 1024 * 1024;
        p->cpu_model = 68030;
        p->fpu_model = 68882;
+       p->mmu_model = 0;
        if (config > 0) {
                p->cpu_model = 68040;
                p->fpu_model = 68040;
@@ -9081,6 +9113,8 @@ static int bip_a4000t (struct uae_prefs *p, int config, int compa, int romcheck)
        p->produce_sound = 2;
 #ifdef JIT
        p->cachesize = MAX_JIT_CACHE;
+#else
+       p->cachesize = 0;
 #endif
        p->floppyslots[0].dfxtype = DRV_35_HD;
        p->floppyslots[1].dfxtype = DRV_35_HD;
@@ -9093,6 +9127,7 @@ static int bip_a4000t (struct uae_prefs *p, int config, int compa, int romcheck)
 
 static void bip_velvet(struct uae_prefs *p, int config, int compa, int romcheck)
 {
+       p->mmu_model = 0;
        p->chipset_mask = CSMASK_A1000;
        p->bogomem.size = 0;
        p->sound_filter = FILTER_SOUND_ON;
@@ -9113,6 +9148,7 @@ static int bip_a1000 (struct uae_prefs *p, int config, int compa, int romcheck)
 
        roms[0] = 24;
        roms[1] = -1;
+       p->mmu_model = 0;
        p->chipset_mask = CSMASK_A1000;
        p->bogomem.size = 0;
        p->sound_filter = FILTER_SOUND_ON;
@@ -9138,6 +9174,7 @@ static int bip_cdtvcr (struct uae_prefs *p, int config, int compa, int romcheck)
 {
        int roms[4];
 
+       p->mmu_model = 0;
        p->bogomem.size = 0;
        p->chipmem.size = 0x100000;
        p->chipset_mask = CSMASK_ECS_AGNUS | CSMASK_ECS_DENISE;
@@ -9174,6 +9211,7 @@ static int bip_cdtv (struct uae_prefs *p, int config, int compa, int romcheck)
        if (config >= 2)
                return bip_cdtvcr(p, config - 2, compa, romcheck);
 
+       p->mmu_model = 0;
        p->bogomem.size = 0;
        p->chipmem.size = 0x100000;
        p->chipset_mask = CSMASK_ECS_AGNUS;
@@ -9216,6 +9254,7 @@ static int bip_cd32 (struct uae_prefs *p, int config, int compa, int romcheck)
        p->floppyslots[0].dfxtype = DRV_NONE;
        p->floppyslots[1].dfxtype = DRV_NONE;
        p->cs_unmapped_space = 1;
+       p->mmu_model = 0;
        set_68020_compa (p, compa, 1);
        p->cs_compatible = CP_CD32;
        built_in_chipset_prefs (p);
@@ -9260,54 +9299,65 @@ static int bip_a1200 (struct uae_prefs *p, int config, int compa, int romcheck)
        roms_bliz[0] = -1;
        roms_bliz[1] = -1;
        p->cs_rtc = 0;
+       p->mmu_model = 0;
        p->cs_compatible = CP_A1200;
        built_in_chipset_prefs (p);
-       switch (config)
-       {
-               case 1:
-               p->fastmem[0].size = 0x400000;
-               p->cs_rtc = 1;
-               break;
-               case 2:
-               cpuboard_setboard(p, BOARD_BLIZZARD, BOARD_BLIZZARD_SUB_1230IV);
-               p->cpuboardmem1.size = 32 * 1024 * 1024;
-               p->cpu_model = 68030;
-               p->cs_rtc = 1;
-               roms_bliz[0] = 89;
-               configure_rom(p, roms_bliz, romcheck);
-               break;
-               case 3:
-               cpuboard_setboard(p, BOARD_BLIZZARD, BOARD_BLIZZARD_SUB_1260);
-               p->cpuboardmem1.size = 32 * 1024 * 1024;
-               p->cpu_model = 68040;
-               p->fpu_model = 68040;
-               p->cs_rtc = 1;
-               roms_bliz[0] = 90;
-               configure_rom(p, roms_bliz, romcheck);
-               break;
-               case 4:
-               cpuboard_setboard(p, BOARD_BLIZZARD, BOARD_BLIZZARD_SUB_1260);
-               p->cpuboardmem1.size = 32 * 1024 * 1024;
-               p->cpu_model = 68060;
-               p->fpu_model = 68060;
-               p->cs_rtc = 1;
-               roms_bliz[0] = 90;
-               configure_rom(p, roms_bliz, romcheck);
-               break;
-               case 5:
-               cpuboard_setboard(p, BOARD_BLIZZARD, BOARD_BLIZZARD_SUB_PPC);
-               p->cpuboardmem1.size = 256 * 1024 * 1024;
-               p->cpu_model = 68060;
-               p->fpu_model = 68060;
-               p->ppc_mode = 1;
-               p->cs_rtc = 1;
-               roms[0] = 15;
-               roms[1] = 11;
-               roms[2] = -1;
-               roms_bliz[0] = 100;
-               configure_rom(p, roms_bliz, romcheck);
-               break;
-       }
+    switch (config)
+    {
+        case 1:
+            p->fastmem[0].size = 0x400000;
+            p->cs_rtc = 1;
+            break;
+#ifdef WITH_CPUBOARD
+        case 2:
+            cpuboard_setboard(p, BOARD_BLIZZARD, BOARD_BLIZZARD_SUB_1230IV);
+            p->cpuboardmem1.size = 32 * 1024 * 1024;
+            p->cpu_model = 68030;
+            p->cs_rtc = 1;
+            roms_bliz[0] = 89;
+            configure_rom(p, roms_bliz, romcheck);
+            break;
+        case 3:
+            cpuboard_setboard(p, BOARD_BLIZZARD, BOARD_BLIZZARD_SUB_1260);
+            p->cpuboardmem1.size = 32 * 1024 * 1024;
+            p->cpu_model = 68040;
+            p->fpu_model = 68040;
+            p->cs_rtc = 1;
+            roms_bliz[0] = 90;
+            configure_rom(p, roms_bliz, romcheck);
+            break;
+        case 4:
+            cpuboard_setboard(p, BOARD_BLIZZARD, BOARD_BLIZZARD_SUB_1260);
+            p->cpuboardmem1.size = 32 * 1024 * 1024;
+            p->cpu_model = 68060;
+            p->fpu_model = 68060;
+            p->cs_rtc = 1;
+            roms_bliz[0] = 90;
+            configure_rom(p, roms_bliz, romcheck);
+            break;
+#ifdef WITH_PPC
+        case 5:
+            cpuboard_setboard(p, BOARD_BLIZZARD, BOARD_BLIZZARD_SUB_PPC);
+            p->cpuboardmem1.size = 256 * 1024 * 1024;
+            p->cpu_model = 68060;
+            p->fpu_model = 68060;
+            p->ppc_mode = 1;
+            p->cs_rtc = 1;
+            roms[0] = 15;
+            roms[1] = 11;
+            roms[2] = -1;
+            roms_bliz[0] = 100;
+            configure_rom(p, roms_bliz, romcheck);
+            break;
+#endif
+#else
+        case 2:
+            p->fastmem[0].size = 0x800000;
+            p->cs_rtc = 1;
+            break;
+#endif
+       default: break;
+    }
        set_68020_compa (p, compa, 0);
        return configure_rom (p, roms, romcheck);
 }
@@ -9324,6 +9374,7 @@ static int bip_a600 (struct uae_prefs *p, int config, int compa, int romcheck)
        p->cs_compatible = CP_A600;
        p->bogomem.size = 0;
        p->chipmem.size = 0x100000;
+       p->mmu_model = 0;
        if (config > 0)
                p->cs_rtc = 1;
        if (config == 1)
@@ -9429,6 +9480,8 @@ static int bip_super (struct uae_prefs *p, int config, int compa, int romcheck)
        p->produce_sound = 2;
 #ifdef JIT
        p->cachesize = MAX_JIT_CACHE;
+#else
+       p->cachesize = 0;
 #endif
        p->floppyslots[0].dfxtype = DRV_35_HD;
        p->floppyslots[1].dfxtype = DRV_35_HD;
diff --git a/cia.cpp b/cia.cpp
index b34100e2982161e65d8548eccc0d4f63a12e4619..1adc2409c8a9436c58b609a24aac2fb0903ce5a3 100644 (file)
--- a/cia.cpp
+++ b/cia.cpp
 #include "inputdevice.h"
 #include "zfile.h"
 #include "ar.h"
+#ifdef PARALLEL_PORT
 #include "parallel.h"
+#endif
 #include "akiko.h"
 #include "cdtv.h"
 #include "debug.h"
+#ifdef ARCADIA
 #include "arcadia.h"
+#endif
 #include "audio.h"
 #include "keyboard.h"
 #include "uae.h"
+#ifdef AMAX
 #include "amax.h"
+#endif
 #include "sampler.h"
 #include "dongle.h"
 #include "inputrecord.h"
+#ifdef WITH_PPC
 #include "uae/ppc.h"
+#endif
 #include "rommgr.h"
 #include "scsi.h"
 #include "rtc.h"
@@ -1804,7 +1812,9 @@ static uae_u8 ReadCIAA(uae_u32 addr, uae_u32 *flags)
                v |= handle_joystick_buttons(c->pra, c->dra);
                v |= (c->pra | (c->dra ^ 3)) & 0x03;
                v = dongle_cia_read(0, reg, c->dra, v);
+#ifdef ARCADIA
                v = alg_joystick_buttons(c->pra, c->dra, v);
+#endif
 
                // 391078-01 CIA: output mode bits always return PRA contents
                if (currprefs.cs_ciatype[0]) {
@@ -2027,7 +2037,9 @@ static void WriteCIAA(uae_u16 addr, uae_u8 val, uae_u32 *flags)
 #endif
                c->prb = val;
                dongle_cia_write(0, reg, c->drb, val);
+#ifdef ARCADIA
                alg_parallel_port(c->drb, val);
+#endif
 #ifdef PARALLEL_PORT
                if (isprinter()) {
                        if (isprinter() > 0) {
index 6f200cd08750cd8f4750f65ec090f0f8cab2bc38..3393e47cd2bba739ad981f50a4affda679214e1d 100644 (file)
@@ -29,7 +29,9 @@
 #include "debug.h"
 #include "flashrom.h"
 #include "uae.h"
+#ifdef WITH_PPC
 #include "uae/ppc.h"
+#endif
 #include "uae/vm.h"
 #include "idecontrollers.h"
 #include "scsi.h"
@@ -170,6 +172,7 @@ static bool blizzardmaprom_bank_mapped, blizzardmaprom2_bank_mapped;
 static bool cpuboard_non_byte_ea;
 static uae_u16 a2630_io;
 
+#ifdef WITH_PPC
 static bool ppc_irq_pending;
 
 static void set_ppc_interrupt(void)
@@ -241,6 +244,7 @@ bool ppc_interrupt(int new_m68k_ipl)
 
        return m68kint;
 }
+#endif
 
 static bool mapromconfigured(void)
 {
@@ -401,7 +405,7 @@ static addrbank cpuboardmem2_bank = {
        ABFLAG_RAM | ABFLAG_THREADSAFE, 0, 0
 };
 
-
+#ifdef WITH_CPUBOARD
 DECLARE_MEMORY_FUNCTIONS(blizzardio);
 static addrbank blizzardio_bank = {
        blizzardio_lget, blizzardio_wget, blizzardio_bget,
@@ -539,6 +543,7 @@ static void REGPARAM2 blizzardram_nojit_bput(uaecptr addr, uae_u32 b)
        blizzardram_nojit_bank.baseaddr[addr] = b;
 }
 #endif
+#endif // WITH_CPUBOARD
 
 static void no_rom_protect(void)
 {
@@ -569,6 +574,7 @@ static void maprom_writeprotect(uae_u8 *addr, int size)
                uae_vm_protect(addr, size, UAE_VM_READ);
 }
 
+#ifdef WITH_CPUBOARD
 MEMORY_BGET(blizzardmaprom2);
 MEMORY_WGET(blizzardmaprom2);
 MEMORY_LGET(blizzardmaprom2);
@@ -995,6 +1001,7 @@ static void csamagnum40_domaprom(void)
                set_roms_modified();
        }
 }
+#endif
 
 static const uae_u32 gvp_a530_maprom[7] =
 {
@@ -1057,20 +1064,28 @@ void cpuboard_rethink(void)
                        safe_interrupt_set(IRQ_SOURCE_CPUBOARD, 0, false);
                        if (currprefs.cachesize)
                                atomic_or(&uae_int_requested, 0x010000);
+#ifdef WITH_PPC
                        uae_ppc_wakeup_main();
+#endif
                } else if (!(io_reg[CSIII_REG_IRQ] & (P5_IRQ_PPC_1 | P5_IRQ_PPC_2))) {
                        safe_interrupt_set(IRQ_SOURCE_CPUBOARD, 1, false);
                        if (currprefs.cachesize)
                                atomic_or(&uae_int_requested, 0x010000);
+#ifdef WITH_PPC
                        uae_ppc_wakeup_main();
+#endif
                } else {
                        atomic_and(&uae_int_requested, ~0x010000);
                }
+#ifdef WITH_PPC
                check_ppc_int_lvl();
                ppc_interrupt(intlev());
+#endif
        }
 }
 
+#ifdef WITH_CPUBOARD
+
 static void blizzardppc_maprom(void)
 {
        if (cpuboard_size <= 2 * 524288)
@@ -1554,14 +1569,18 @@ static void REGPARAM2 blizzardio_lput(uaecptr addr, uae_u32 v)
        }
 }
 
+#endif //WITH_CPUBOARD
+
 static void cpuboard_hsync(void)
 {
        // we should call check_ppc_int_lvl() immediately
        // after PPC CPU's interrupt flag is cleared but this
        // should be fast enough for now
+#ifdef WITH_PPC
        if (is_csmk3(&currprefs) || is_blizzardppc(&currprefs)) {
                check_ppc_int_lvl();
        }
+#endif
 }
 
 static void cpuboard_vsync(void)
@@ -1579,7 +1598,7 @@ void cpuboard_map(void)
                return;
 
        bool fallback_cpu = currprefs.cpu_model < 68020;
-
+#ifdef WITH_CPUBOARD
        if (is_magnum40(&currprefs)) {
                map_banks(&blizzardio_bank, 0x0c0c0000 >> 16, 0x10000 >> 16, 0);
        }
@@ -1728,6 +1747,7 @@ void cpuboard_map(void)
        if (is_a1230s2(&currprefs)) {
                map_banks(&blizzardio_bank, 0x03000000 >> 16, 1, 0);
        }
+#endif //WITH_CPUBOARD
 }
 
 bool cpuboard_forced_hardreset(void)
@@ -1785,7 +1805,9 @@ void cpuboard_cleanup(void)
        flashrom_file = NULL;
 
 //     if (blizzard_jit) {
+#ifdef WITH_CPUBOARD
                mapped_free(&blizzardram_bank);
+#endif //WITH_CPUBOARD
 #if 0
 } else {
                if (blizzardram_nojit_bank.baseaddr) {
@@ -1797,12 +1819,15 @@ void cpuboard_cleanup(void)
                }
        }
 #endif
+#ifdef WITH_CPUBOARD
        if (blizzardmaprom_bank_mapped)
                mapped_free(&blizzardmaprom_bank);
        if (blizzardmaprom2_bank_mapped)
                mapped_free(&blizzardmaprom2_bank);
+#endif //WITH_CPUBOARD
        maprom_unwriteprotect();
 
+#ifdef WITH_CPUBOARD
        blizzardram_bank.baseaddr = NULL;
 //     blizzardram_nojit_bank.baseaddr = NULL;
        blizzardmaprom_bank.baseaddr = NULL;
@@ -1815,11 +1840,14 @@ void cpuboard_cleanup(void)
 
        mapped_free(&blizzardea_bank);
        blizzardea_bank.baseaddr = NULL;
+#endif //WITH_CPUBOARD
 
        cpuboard_size = cpuboard2_size = -1;
 
+#ifdef WITH_CPUBOARD
        blizzardmaprom_bank.flags &= ~(ABFLAG_INDIRECT | ABFLAG_NOALLOC);
        blizzardmaprom2_bank.flags &= ~(ABFLAG_INDIRECT | ABFLAG_NOALLOC);
+#endif //WITH_CPUBOARD
 
        mapped_free(&cpuboardmem1_bank);
        mapped_free(&cpuboardmem2_bank);
@@ -1869,6 +1897,7 @@ static void cpuboard_init_2(void)
        cpuboard_size = currprefs.cpuboardmem1.size;
        cpuboardmem1_bank.reserved_size = 0;
        cpuboardmem2_bank.reserved_size = 0;
+#ifdef WITH_CPUBOARD
 
        if (is_kupke(&currprefs) || is_mtec_ematrix530(&currprefs) || is_sx32pro(&currprefs) || is_dce_typhoon2(&currprefs) || is_apollo630(&currprefs)) {
                // plain 64k autoconfig, nothing else.
@@ -2185,6 +2214,7 @@ static void cpuboard_init_2(void)
 
        }
 
+#endif //WITH_CPUBOARD
 
        if (!cpuboardmem1_bank.baseaddr)
                cpuboardmem1_bank.reserved_size = 0;
@@ -2207,8 +2237,10 @@ void cpuboard_init(void)
 void cpuboard_overlay_override(void)
 {
        if (is_a2630(&currprefs) || is_harms_3kp(&currprefs)) {
+#ifdef WITH_CPUBOARD
                if (!(a2630_io & 2))
                        map_banks(&blizzardf0_bank, 0xf80000 >> 16, f0rom_size >> 16, 0);
+#endif //WITH_CPUBOARD
                if (mem25bit_bank.allocated_size)
                        map_banks(&chipmem_bank, (mem25bit_bank.start + mem25bit_bank.allocated_size) >> 16, (1024 * 1024) >> 16, 0);
                else
@@ -2218,12 +2250,14 @@ void cpuboard_overlay_override(void)
 
 void cpuboard_clear(void)
 {
+#ifdef WITH_CPUBOARD
        if (blizzardmaprom_bank.baseaddr)
                memset(blizzardmaprom_bank.baseaddr, 0, 524288);
        if (blizzardmaprom2_bank.baseaddr)
                memset(blizzardmaprom2_bank.baseaddr, 0, 524288);
        if (is_csmk3(&currprefs)) // SCSI RAM
                memset(blizzardf0_bank.baseaddr + 0x40000, 0, 0x10000);
+#endif
 }
 
 // Adds resource resident that CSPPC/BPPC flash updater checks.
@@ -2277,6 +2311,7 @@ bool cpuboard_maprom(void)
 {
        if (!currprefs.cpuboard_type || !cpuboard_size)
                return false;
+#ifdef WITH_CPUBOARD
        if (is_blizzard(&currprefs) || is_blizzardppc(&currprefs)) {
                if (maprom_state)
                        blizzard_copymaprom();
@@ -2284,6 +2319,7 @@ bool cpuboard_maprom(void)
                if (maprom_state)
                        cyberstorm_copymaprom();
        }
+#endif
        return true;
 }
 
@@ -2368,7 +2404,9 @@ bool cpuboard_io_special(int addr, uae_u32 *val, int size, bool write)
                                if (w & 2) {
                                        if (currprefs.mmu_model == 68030) {
                                                // HACK!
+#ifdef CPUEMU_22
                                                mmu030_fake_prefetch = 0x4ed0;
+#endif
                                        }
                                        map_banks(&kickmem_bank, 0xF8, 8, 0);
                                        write_log(_T("A2630 boot rom unmapped\n"));
@@ -2816,7 +2854,7 @@ bool cpuboard_autoconfig_init(struct autoconfig_info *aci)
 
                write_log(_T("CPUBoard '%s' ROM '%s' %lld loaded\n"), boardname, zfile_getname(autoconfig_rom), zfile_size(autoconfig_rom));
        }
-
+#ifdef WITH_CPUBOARD
        uae_u8 *blizzardea_tmp = blizzardea_bank.baseaddr;
        uae_u8 *blizzardf0_tmp = blizzardf0_bank.baseaddr;
        if (!aci->doinit) {
@@ -2825,8 +2863,12 @@ bool cpuboard_autoconfig_init(struct autoconfig_info *aci)
        } else {
                protect_roms(false);
        }
+#else
+               protect_roms(false);
+#endif
 
        cpuboard_non_byte_ea = true;
+#ifdef WITH_CPUBOARD
 
        if (is_sx32pro(p)) {
                earom_size = 65536;
@@ -3093,29 +3135,36 @@ bool cpuboard_autoconfig_init(struct autoconfig_info *aci)
                autoconfig_rom = NULL;
        }
 
+#endif //WITH_CPUBOARD
        if (autoconf_stop) {
                aci->addrbank = &expamem_none;
        } else if (!autoconf) {
                aci->zorro = 0;
        } else if (autoconfig_data[0]) {
+#ifdef WITH_CPUBOARD
                aci->addrbank = &blizzarde8_bank;
                memcpy(aci->autoconfig_bytes, autoconfig_data, sizeof aci->autoconfig_bytes);
                aci->autoconfigp = aci->autoconfig_bytes;
+#endif
                aci->zorro = 2;
                aci->autoconfig_automatic = true;
        } else {
+#ifdef WITH_CPUBOARD
                aci->addrbank = &blizzarde8_bank;
                memcpy(aci->autoconfig_raw, blizzardea_bank.baseaddr, sizeof aci->autoconfig_raw);
+#endif
                aci->zorro = 2;
        }
 
        zfile_fclose(autoconfig_rom);
 
        if (!aci->doinit) {
+#ifdef WITH_CPUBOARD
                xfree(blizzardea_bank.baseaddr);
                xfree(blizzardf0_bank.baseaddr);
                blizzardea_bank.baseaddr = blizzardea_tmp;
                blizzardf0_bank.baseaddr = blizzardf0_tmp;
+#endif
                flash_free(flashrom);
                flashrom = NULL;
                return true;
@@ -3145,6 +3194,7 @@ bool cpuboard_autoconfig_init(struct autoconfig_info *aci)
                        map_banks(&blizzardf0_bank, 0xf00000 >> 16, (f0rom_size > 262144 ? 262144 : f0rom_size) >> 16, 0);
                }
        }
+#endif //WITH_CPUBOARD
 
        device_add_vsync_pre(cpuboard_vsync);
        device_add_hsync(cpuboard_hsync);
index 490f650b3a4d712b3cd46b2b205b86a4c36e175a..7bf3ed0c71ca3126bbf41a007c0d00040c375233 100644 (file)
 #include "enforcer.h"
 #endif
 #include "threaddep/thread.h"
+#ifdef WITH_LUA
 #include "luascript.h"
+#endif
+#include "crc32.h"
 #include "devices.h"
 #include "rommgr.h"
+#ifdef WITH_SPECIALMONITORS
 #include "specialmonitors.h"
+#endif
 
 
 #define VPOSW_DEBUG 0
@@ -6217,6 +6222,7 @@ void vsync_event_done(void)
                events_reset_syncline();
                return;
        }
+#ifdef WITH_BEAMRACER
        if (currprefs.gfx_display_sections <= 1) {
                if (vsync_vblank >= 85)
                        linesync_beam_single_dual();
@@ -6230,6 +6236,7 @@ void vsync_event_done(void)
                else
                        linesync_beam_multi_single();
        }
+#endif
 }
 
 static void cia_hsync_do(void)
@@ -6341,7 +6348,7 @@ static void hsync_handler_post(bool onvsync)
                maybe_process_pull_audio();
 
        } else if (isvsync_chipset() < 0) {
-
+#ifdef WITH_BEAMRACER
                if (currprefs.gfx_display_sections <= 1) {
                        if (vsync_vblank >= 85)
                                input_read_done = linesync_beam_single_dual();
@@ -6355,7 +6362,7 @@ static void hsync_handler_post(bool onvsync)
                        else
                                input_read_done = linesync_beam_multi_single();
                }
-
+#endif
        } else if (!currprefs.cpu_thread && !cpu_sleepmode && currprefs.m68k_speed < 0 && !currprefs.cpu_memory_cycle_exact) {
 
                static int sleeps_remaining;
@@ -6602,7 +6609,9 @@ void custom_reset(bool hardreset, bool keyboardreset)
        target_reset();
        devices_reset(hardreset);
        write_log(_T("Reset at %08X. Chipset mask = %08X\n"), M68K_GETPC, currprefs.chipset_mask);
+#ifdef DEBUGGER
        memory_map_dump();
+#endif
 
        rga_slot_first_offset = 0;
        rga_slot_in_offset = 1;
@@ -6838,8 +6847,9 @@ void custom_reset(bool hardreset, bool keyboardreset)
                        INTENA(0x8000 | 0x4000 | 0x1000 | 0x2000 | 0x0080 | 0x0010 | 0x0008 | 0x0001);
                }
        }
-
+#ifdef WITH_SPECIALMONITORS
        specialmonitor_reset();
+#endif
        update_mirrors();
 
        unset_special(~(SPCFLAG_BRK | SPCFLAG_MODE_CHANGE | SPCFLAG_CHECK));
@@ -7137,7 +7147,7 @@ static uae_u32 REGPARAM2 custom_wget_1(int hpos, uaecptr addr, int noput, bool i
 #endif
 
        default:
-writeonly:;
+writeonly:
                /* OCS/ECS:
                * reading write-only register causes write with last value in chip
                * bus (custom registers, chipram, slowram)
index 4319b7d8bf9ffa8f09cd0fba899423f4e4884406..db5452723ff434e39ad1d6410ce8b1b9e37526f4 100644 (file)
--- a/debug.cpp
+++ b/debug.cpp
 #include "cpummu.h"
 #include "cpummu030.h"
 #include "ar.h"
+#ifdef WITH_PCI
 #include "pci.h"
+#endif
+#ifdef WITH_PPC
 #include "ppc/ppcd.h"
 #include "uae/io.h"
 #include "uae/ppc.h"
+#endif
 #include "drawing.h"
 #include "devices.h"
 #include "blitter.h"
@@ -5222,7 +5226,9 @@ static void memory_map_dump_3(UaeMemoryMap *map, int log)
                        a1 = a2;
                }
        }
+#ifdef WITH_PCI
        pci_dump(log);
+#endif
        currprefs.illegal_mem = imold;
 }
 
@@ -6590,6 +6596,7 @@ static void m68k_modify (TCHAR **inptr)
 
 static void ppc_disasm(uaecptr addr, uaecptr *nextpc, int cnt)
 {
+#ifdef WITH_PPC
        PPCD_CB disa;
 
        while(cnt-- > 0) {
@@ -6606,6 +6613,7 @@ static void ppc_disasm(uaecptr addr, uaecptr *nextpc, int cnt)
        }
        if (nextpc)
                *nextpc = addr;
+#endif
 }
 
 static void dma_disasm(int frames, int vp, int hp, int frames_end, int vp_end, int hp_end)
index 9654d38be5daef7af441bede1e184e85d89ef8b7..a7f5d7e1e3b47b11d3a8236879b512db8671d6c5 100644 (file)
@@ -352,10 +352,11 @@ static void debugreport(struct debugmemdata *dm, uaecptr addr, int rwi, int size
                !(state & (DEBUGMEM_ALLOCATED | DEBUGMEM_INUSE)) ? 'I' : (state & DEBUGMEM_WRITE) ? 'W' : 'R',
                (state & DEBUGMEM_WRITE) ? '*' : (state & DEBUGMEM_INITIALIZED) ? '+' : '-',
                dm->unused_start, PAGE_SIZE - dm->unused_end - 1);
-
+#ifdef DEBUGGER
        if (peekdma_data.mask && (peekdma_data.addr == addr || (size > 2 && peekdma_data.addr + 2 == addr))) {
                console_out_f(_T("DMA DAT=%04x PTR=%04x\n"), peekdma_data.reg, peekdma_data.ptrreg);
        }
+#endif
 
        debugmem_break(1);
 }
@@ -1076,8 +1077,10 @@ void debugmem_trap(uaecptr stack)
        }
        console_out_f(_T("\n"));
        // always return back to faulted instruction
+#ifdef DEBUGGER
        put_long(stack + 6, regs.instruction_pc_user_exception);
        debugmem_break_pc(13, regs.instruction_pc_user_exception, 2);
+#endif
 }
 
 static struct debugmemallocs *debugmem_reserve(uaecptr addr, uae_u32 size, uae_u32 parentid)
@@ -1910,10 +1913,10 @@ uaecptr debugmem_reloc(uaecptr exeaddress, uae_u32 len, uaecptr dbgaddress, uae_
        }
 
        console_out_f(_T("Executable load complete.\n"));
-
+#ifdef DEBUGGER
        uaecptr execbase = get_long_debug(4);
        exec_thistask = get_real_address(execbase + 276);
-
+#endif
        setchipbank(true);
        chipmem_setindirect();
        debugger_scan_libraries();
@@ -1934,6 +1937,7 @@ static uae_char *gethunktext(uae_u8 *p, uae_char *namebuf, int len)
 
 static void scan_library_list(uaecptr v, int *cntp)
 {
+#ifdef DEBUGGER
        while ((v = get_long_debug(v))) {
                uae_u32 v2;
                uae_u8 *p;
@@ -1975,10 +1979,12 @@ static void scan_library_list(uaecptr v, int *cntp)
                        //console_out_f(_T("%08x = '%s'\n"), found->base, found->name);
                }
        }
+#endif
 }
 
 void debugger_scan_libraries(void)
 {
+#ifdef DEBUGGER
        if (!libnamecnt)
                return;
        uaecptr v = get_long_debug(4);
@@ -1990,6 +1996,7 @@ void debugger_scan_libraries(void)
        scan_library_list(v + 350, &cnt);
        scan_library_list(v + 336, &cnt);
        console_out_f(_T("%d libraries matched with library symbols.\n"), cnt);
+#endif
 }
 
 
@@ -3607,8 +3614,10 @@ bool debugmem_get_symbol_value(const TCHAR *name, uae_u32 *valp)
                                        if (!_tcsicmp(name + lnlen + 1, lvo->name)) {
                                                uaecptr addr = libname->base + lvo->value;
                                                // JMP xxxxxxxx?
+#ifdef DEBUGGER
                                                if (get_word_debug(addr) == 0x4ef9)
                                                        addr = get_long_debug(addr + 2);
+#endif
                                                *valp = addr;
                                                return true;
                                        }
@@ -3917,8 +3926,10 @@ uae_u32 debugmem_chiphit(uaecptr addr, uae_u32 v, int size)
                }
        }
        if (debugmem_active && debugmem_mapped) {
+#ifdef DEBUGGER
                if (!dbg)
                        m68k_dumpstate(0, 0xffffffff);
+#endif
        }
        recursive--;
        return 0xdeadf00d;
@@ -3942,8 +3953,10 @@ bool debugmem_extinvalidmem(uaecptr addr, uae_u32 v, int size)
                console_out_f(_T("%s read from %08x\n"), size == 4 ? _T("Long") : (size == 2 ? _T("Word") : _T("Byte")), addr, v);
                dbg = debugmem_break(9);
        }
+#ifdef DEBUGGER
        if (!dbg)
                m68k_dumpstate(0, 0xffffffff);
+#endif
        recursive--;
        return true;
 }
@@ -3987,7 +4000,9 @@ bool debugmem_list_stackframe(bool super)
                uae_u32 sregs[16];
                memcpy(sregs, regs.regs, sizeof(uae_u32) * 16);
                memcpy(regs.regs, sf->regs, sizeof(uae_u32) * 16);
+#ifdef DEBUGGER
                m68k_disasm(sf->current_pc, NULL, 0xffffffff, 2);
+#endif
                memcpy(regs.regs, sregs, sizeof(uae_u32) * 16);
                console_out_f(_T("\n"));
        }
index 981a5bbe57b181883be683d74f0aafccfe355d61..27687324d938b693687c181c3d3e1446500ecaf9 100644 (file)
@@ -7,15 +7,21 @@
 #include "threaddep/thread.h"
 #include "memory.h"
 #include "audio.h"
+#ifdef GFXBOARD
 #include "gfxboard.h"
+#endif
 #include "scsi.h"
 #include "scsidev.h"
 #include "sana2.h"
 #include "clipboard.h"
 #include "cpuboard.h"
+#ifdef WITH_SNDBOARD
 #include "sndboard.h"
+#endif
 #include "statusline.h"
+#ifdef WITH_PPC
 #include "uae/ppc.h"
+#endif
 #ifdef CD32
 #include "cd32_fmv.h"
 #include "akiko.h"
 #include "uaenative.h"
 #endif
 #include "tabletlibrary.h"
+#ifdef WITH_LUA
 #include "luascript.h"
+#endif
 #ifdef DRIVESOUND
 #include "driveclick.h"
 #endif
+#ifdef WITH_X86
 #include "x86.h"
+#endif
 #include "ethernet.h"
 #include "drawing.h"
+#ifdef AVIOUTPUT
 #include "videograb.h"
+#endif
 #include "rommgr.h"
 #include "newcpu.h"
 #ifdef WITH_MIDIEMU
 #ifdef RETROPLATFORM
 #include "rp.h"
 #endif
+#ifdef WITH_DRACO
 #include "draco.h"
+#endif
+#ifdef WITH_DSP
 #include "dsp3210/dsp_glue.h"
+#endif
 #include "keyboard_mcu.h"
 
 #define MAX_DEVICE_ITEMS 64
@@ -301,9 +317,13 @@ void devices_rethink(void)
 void devices_update_sound(float clk, float syncadjust)
 {
        update_sound (clk);
+#ifdef WITH_SNDBOARD
        update_sndboard_sound (clk / syncadjust);
+#endif
        update_cda_sound(clk / syncadjust);
+#ifdef WITH_X86
        x86_update_sound(clk / syncadjust);
+#endif
 #ifdef WITH_MIDIEMU
        midi_update_sound(clk / syncadjust);
 #endif
@@ -347,7 +367,9 @@ void virtualdevice_free(void)
 #ifdef WITH_LUA
        uae_lua_free();
 #endif
+#ifdef GFXBOARD
        gfxboard_free();
+#endif
        savestate_free();
        memory_cleanup();
        free_shm();
@@ -448,7 +470,9 @@ void devices_restore_start(void)
 
 void devices_syncchange(void)
 {
+#ifdef WITH_X86
        x86_bridge_sync_change();
+#endif
 }
 
 void devices_pause(void)
@@ -463,7 +487,9 @@ void devices_pause(void)
 #ifdef RETROPLATFORM
        rp_pause(1);
 #endif
+#ifdef AVIOUTPUT
        pausevideograb(1);
+#endif
        ethernet_pause(1);
 }
 
@@ -479,7 +505,9 @@ void devices_unpause(void)
 #ifdef WITH_DSP
        dsp_pause(0);
 #endif
+#ifdef AVIOUTPUT
        pausevideograb(0);
+#endif
        ethernet_pause(0);
 }
 
index dbbbaf1b80b6efe556d7c239d03c2379e46b21c4..d4c98d4f2c7b0766ac95e5a2d98015286c0cd6c9 100644 (file)
@@ -20,6 +20,7 @@ static TCHAR disasm_areg, disasm_dreg, disasm_byte, disasm_word, disasm_long;
 static TCHAR disasm_pcreg[3], disasm_fpreg[3];
 static bool absshort_long = false;
 
+#ifdef DEBUGGER
 void disasm_init(void)
 {
        _tcscpy(disasm_pcreg, _T("PC"));
@@ -204,7 +205,7 @@ static void showea_val(TCHAR *buffer, uae_u16 opcode, uaecptr addr, int size)
        struct instr *table = &table68k[opcode];
 
 #ifndef CPU_TESTER
-#if UAE
+#ifdef UAE
        if (addr >= 0xe90000 && addr < 0xf00000)
                goto skip;
        if (addr >= 0xdff000 && addr < 0xe00000)
@@ -2560,3 +2561,4 @@ void sm68k_disasm (TCHAR *instrname, TCHAR *instrcode, uaecptr addr, uaecptr *ne
        if (nextpc)
                *nextpc = pc;
 }
+#endif
index 76a3a20cd59c4905a5fb01221841a4caf7ef87e6..427c19cbbdb7ad8679a8aa42b3df66db4fddf457 100644 (file)
--- a/disk.cpp
+++ b/disk.cpp
@@ -41,7 +41,9 @@ int disk_debug_track = -1;
 #ifdef FDI2RAW
 #include "fdi2raw.h"
 #endif
+#ifdef CATWEASEL
 #include "catweasel.h"
+#endif
 #ifdef DRIVESOUND
 #include "driveclick.h"
 #endif
@@ -53,7 +55,9 @@ int disk_debug_track = -1;
 #endif
 #include "crc32.h"
 #include "inputrecord.h"
+#ifdef AMAX
 #include "amax.h"
+#endif
 #ifdef RETROPLATFORM
 #include "rp.h"
 #endif
@@ -1372,7 +1376,9 @@ static int drive_insert (drive *drv, struct uae_prefs *p, int dnum, const TCHAR
        drv->buffered_side = -1;
        if (!fake) {
                drv->dskeject = false;
+#ifdef RETROPLATFORM
                gui_disk_image_change (dnum, outname, drv->wrprot);
+#endif
        }
 
        if (!drv->motoroff) {
@@ -2995,7 +3001,9 @@ static void drive_eject (drive * drv)
        drive_settype_id (drv); /* Back to 35 DD */
        if (disk_debug_logging > 0)
                write_log (_T("eject drive %ld\n"), drv - &floppy[0]);
+#ifdef RETROPLATFORM
        gui_disk_image_change(drv->drvnum, NULL, drv->wrprot);
+#endif
        inprec_recorddiskchange (drv->drvnum, NULL, false);
 }
 
@@ -3689,8 +3697,10 @@ uae_u8 DISK_status_ciaa(void)
        for (int dr = 0; dr < MAX_FLOPPY_DRIVES; dr++) {
                drive *drv = floppy + dr;
                if (drv->amax) {
+#ifdef AMAX
                        if (amax_active())
                                st = amax_disk_status (st);
+#endif
                } else if (!((selected | disabled) & (1 << dr))) {
                        if (drive_running (drv)) {
                                if (drv->catweasel) {
@@ -4705,7 +4715,7 @@ void DISK_hsync (void)
 
 #ifdef FLOPPYBRIDGE
                if (drv->bridge && drv->writepending) {
-                       // With bridge we wait for the disk to commit the data before fireing the DMA
+                       // With bridge we wait for the disk to commit the data before firing the DMA
                        if (drv->bridge->isWriteComplete()) {
                                disk_dmafinished();
                                drv->writepending = false;
@@ -5455,7 +5465,9 @@ void DISK_init (void)
 #endif
        if (disk_empty (0))
                write_log (_T("No disk in drive 0.\n"));
+#ifdef AMAX
        amax_init ();
+#endif
 }
 
 void DISK_reset (void)
index 49fe7acb6a993f07ae43b70f5f5726214e8b770f..2b5f01c067e12c7bd10a0037c0ba6e52f0cc05e9 100644 (file)
--- a/draco.cpp
+++ b/draco.cpp
@@ -7,6 +7,7 @@
 #include "sysconfig.h"
 #include "sysdeps.h"
 
+#ifdef WITH_DRACO
 #include "options.h"
 #include "uae.h"
 #include "memory.h"
@@ -1583,3 +1584,4 @@ void draco_map_overlay(void)
        map_banks(&draco_bank, 0x04000000 >> 16, 0x01000000 >> 16, 0);
        map_banks(&draco_bank, 0x21000000 >> 16, 0x1f000000 >> 16, 0);
 }
+#endif //WITH_DRACO
index 48825656b41c04ed21de5cf56a7f17067d321d6d..9ff3de8ac7cd5cf7e2d3e81dd4be717e0d6e9b93 100644 (file)
@@ -35,7 +35,9 @@
 #ifdef CD32
 #include "cd32_fmv.h"
 #endif
+#ifdef WITH_SPECIALMONITORS
 #include "specialmonitors.h"
+#endif
 #include "devices.h"
 #include "gfxboard.h"
 
@@ -711,11 +713,12 @@ void set_custom_limits (int w, int h, int dx, int dy, bool blank)
                h = 0;
                dy = 0;
        }
-
+#ifdef WITH_SPECIALMONITORS
        if (specialmonitor_uses_control_lines() || !blank) {
                w = -1;
                h = -1;
        }
+#endif
 
        if (w <= 0 || dx < 0) {
                visible_left_start = 0;
@@ -1564,7 +1567,9 @@ static void draw_debug_status_line(int monid, int line)
        struct vidbuf_description *vidinfo = &adisplays[monid].gfxvidinfo;
        xlinebuffer = row_map[line];
        xlinebuffer_genlock = row_map_genlock[line];
+#ifdef DEBUGGER
        debug_draw(xlinebuffer, xlinebuffer_genlock, line, vidinfo->inbuffer->outwidth, vidinfo->inbuffer->outheight, xredcolors, xgreencolors, xbluecolors);
+#endif
 }
 
 #define LIGHTPEN_HEIGHT 12
@@ -1749,6 +1754,7 @@ bool drawing_can_lineoptimizations(void)
 
 static void draw_frame_extras(struct vidbuffer *vb, int y_start, int y_end)
 {
+#ifdef DEBUGGER
        if (debug_dma > 1 || debug_heatmap > 1) {
                if (denise_lock()) {
                        for (int i = 0; i < vb->outheight; i++) {
@@ -1757,6 +1763,7 @@ static void draw_frame_extras(struct vidbuffer *vb, int y_start, int y_end)
                        }
                }
        }
+#endif
 
        if (lightpen_active) {
                if (lightpen_active & 1) {
@@ -1821,6 +1828,7 @@ static void finish_drawing_frame(bool drawlines)
        vbout->last_drawn_line = 0;
        draw_frame_extras(vbin, -1, -1);
 
+#ifdef WITH_SPECIALMONITORS
        // video port adapters
        if (currprefs.monitoremu) {
                if (!denise_lock()) {
@@ -1887,6 +1895,7 @@ static void finish_drawing_frame(bool drawlines)
                }
                vbcopied = true;
        }
+#endif
 
 #ifdef CD32
        // cd32 fmv
@@ -1905,6 +1914,7 @@ static void finish_drawing_frame(bool drawlines)
 #endif
 
        // grayscale
+#ifdef WITH_SPECIALMONITORS
        if (!currprefs.monitoremu && vidinfo->tempbuffer.bufmem_allocated &&
                ((!currprefs.genlock && (!bplcolorburst_field && currprefs.cs_color_burst)) || currprefs.gfx_grayscale)) {
                if (!denise_lock()) {
@@ -1917,6 +1927,7 @@ static void finish_drawing_frame(bool drawlines)
                }
                vbcopied = true;
        }
+#endif
 
        if (denise_locked) {
                if (!vbcopied) {
index e8a8ee6c713f15a5f977957cf62b4969a957f6b7..30cb478e6e8930fc7d15f7beb05489d25fe0cd19 100644 (file)
@@ -6,7 +6,9 @@
 #include "DSP3210_emulation.h"
 
 extern void write_log(const char *, ...);
+#ifdef DEBUGGER
 extern void activate_debugger(void);
+#endif
 
 /* Typedefs */
 typedef union 
index 59328141895e123ffdf0ed06128d9f8bc3bae832..7eddaa388a3e1691a6d29185d3eefd5d775a757c 100644 (file)
@@ -336,7 +336,9 @@ static void enforcer_display_hit (const TCHAR *addressmode, uae_u32 pc, uaecptr
                if (bestpc_idxs[i] == -1) {
                        for (j = 0; j < 5; j++) {
                                pospc -= 2;
+#ifdef DEBUGGER
                                sm68k_disasm (buf, NULL, pospc, &nextpc, 0xffffffff);
+#endif
                                if (nextpc == temppc) {
                                        bestpc_idxs[i] = j;
                                        bestpc_array[i][j] = bestpc = pospc;
@@ -383,7 +385,9 @@ static void enforcer_display_hit (const TCHAR *addressmode, uae_u32 pc, uaecptr
                        continue;
                }
 
+#ifdef DEBUGGER
                sm68k_disasm (buf, instrcode, bestpc, NULL, 0xffffffff);
+#endif
                _stprintf (lines[i], _T("%08x :   %-20s %s\n"), bestpc, instrcode, buf);
                temppc = bestpc;
        }
@@ -397,7 +401,9 @@ static void enforcer_display_hit (const TCHAR *addressmode, uae_u32 pc, uaecptr
        /* Now the instruction after the pc including the pc */
        temppc = pc;
        for (i = 0; i < (INSTRUCTIONLINES + 1) / 2; i++) {
+#ifdef DEBUGGER
                sm68k_disasm (buf, instrcode, temppc, &nextpc, 0xffffffff);
+#endif
                _stprintf (enforcer_buf_ptr, _T("%08x : %s %-20s %s\n"), temppc,
                        (i == 0 ? _T("*") : _T(" ")), instrcode, buf);
                enforcer_buf_ptr += _tcslen (enforcer_buf_ptr);
@@ -411,10 +417,14 @@ static void enforcer_display_hit (const TCHAR *addressmode, uae_u32 pc, uaecptr
 
        console_out (enforcer_buf);
        write_log (_T("%s"), enforcer_buf);
+#ifdef DEBUGGER
        if (!debug_enforcer()) {
+#endif
                sleep_millis (5);
                doflashscreen ();
+#ifdef DEBUGGER
        }
+#endif
 
 end:
        xfree (native_task_name);
index 843a0fb7283190d81c324df6e557cdf7fa20c1ff..9b374c2ca1067c898669527cc5d8025760d7dd86 100644 (file)
@@ -77,6 +77,7 @@ void ethernet_trigger (struct netdriverdata *ndd, void *vsd)
        gui_flicker_led(LED_NET, 0, gui_data.net | 2);
        switch (ndd->type)
        {
+#ifdef WITH_SLIRP
                case UAENET_SLIRP:
                case UAENET_SLIRP_INBOUND:
                {
@@ -96,6 +97,7 @@ void ethernet_trigger (struct netdriverdata *ndd, void *vsd)
                        }
                }
                return;
+#endif
 #ifdef WITH_UAENET_PCAP
                case UAENET_PCAP:
                uaenet_trigger (vsd);
@@ -108,6 +110,7 @@ int ethernet_open (struct netdriverdata *ndd, void *vsd, void *user, ethernet_go
 {
        switch (ndd->type)
        {
+#ifdef WITH_SLIRP
                case UAENET_SLIRP:
                case UAENET_SLIRP_INBOUND:
                {
@@ -155,6 +158,7 @@ int ethernet_open (struct netdriverdata *ndd, void *vsd, void *user, ethernet_go
                        uae_slirp_start ();
                }
                return 1;
+#endif
 #ifdef WITH_UAENET_PCAP
                case UAENET_PCAP:
                if (uaenet_open (vsd, ndd, user, gotfunc, getfunc, promiscuous, mac)) {
@@ -173,6 +177,7 @@ void ethernet_close (struct netdriverdata *ndd, void *vsd)
                return;
        switch (ndd->type)
        {
+#ifdef WITH_SLIRP
                case UAENET_SLIRP:
                case UAENET_SLIRP_INBOUND:
                if (slirp_data) {
@@ -183,6 +188,7 @@ void ethernet_close (struct netdriverdata *ndd, void *vsd)
                        uae_sem_destroy (&slirp_sem2);
                }
                return;
+#endif
 #ifdef WITH_UAENET_PCAP
                case UAENET_PCAP:
                return uaenet_close (vsd);
index 209d5383365470ed40babb8130bb5e233563400f..a265dda87b4c4838400f7198e855f017d5376de8 100644 (file)
 #include "events.h"
 #include "memory.h"
 #include "newcpu.h"
+#ifdef WITH_PPC
 #include "uae/ppc.h"
+#endif
 #include "xwin.h"
+#ifdef WITH_X86
 #include "x86.h"
+#endif
 #include "audio.h"
 #include "cia.h"
 
index fe225af9eb6a1ea12b46fe510bf1aef154391511..b302138dfa4f1ebf4c5f9f5d478a320daadefb12 100644 (file)
 #include "newcpu.h"
 #include "savestate.h"
 #include "zfile.h"
+#ifdef CATWEASEL
 #include "catweasel.h"
+#endif
 #include "cdtv.h"
 #include "cdtvcr.h"
 #include "threaddep/thread.h"
+#ifdef A2091
 #include "a2091.h"
+#endif
+#ifdef A2065
 #include "a2065.h"
+#endif
 #include "gfxboard.h"
 #ifdef CD32
 #include "cd32_fmv.h"
 #endif
+#ifdef NCR
 #include "ncr_scsi.h"
+#endif
+#ifdef NCR9X
 #include "ncr9x_scsi.h"
+#endif
 #include "scsi.h"
 #include "debug.h"
 #include "gayle.h"
 #include "idecontrollers.h"
 #include "cpuboard.h"
+#ifdef WITH_SNDBOARD
 #include "sndboard.h"
+#endif
+#ifdef WITH_PPC
 #include "uae/ppc.h"
+#endif
 #include "autoconf.h"
+#ifdef WITH_SPECIALMONITORS
 #include "specialmonitors.h"
+#endif
 #include "inputdevice.h"
+#ifdef WITH_PCI
 #include "pci.h"
+#endif
+#ifdef WITH_X86
 #include "x86.h"
+#endif
 #include "filesys.h"
 #include "ethernet.h"
 #include "sana2.h"
+#ifdef ARCADIA
 #include "arcadia.h"
+#endif
 #include "devices.h"
+#ifdef WITH_DSP
 #include "dsp3210/dsp_glue.h"
+#endif
 
 
 #define CARD_FLAG_CAN_Z3 1
@@ -396,7 +420,9 @@ static addrbank *expamem_init_last (void)
 {
        expamem_init_clear2 ();
        write_log (_T("Memory map after autoconfig:\n"));
+#ifdef DEBUGGER
        memory_map_dump ();
+#endif
        mman_set_barriers(false);
        return NULL;
 }
@@ -3626,7 +3652,7 @@ static void expansion_add_autoconfig(struct uae_prefs *p)
                cards_set[cardno].zorro = BOARD_NONAUTOCONFIG_BEFORE;
                cards_set[cardno++].map = NULL;
        }
-
+#ifdef GFXBOARD
        for (int i = 0; i < MAX_RTG_BOARDS; i++) {
                struct rtgboardconfig *rbc = &p->rtgboards[i];
                int type = gfxboard_get_configtype(rbc);
@@ -3637,6 +3663,7 @@ static void expansion_add_autoconfig(struct uae_prefs *p)
                        cards_set[cardno++].initnum = gfxboard_init_memory;
                }
        }
+#endif
 
        // add possible non-autoconfig boards
        add_cpu_expansions(p, BOARD_NONAUTOCONFIG_BEFORE, NULL);
@@ -3737,12 +3764,14 @@ static void expansion_add_autoconfig(struct uae_prefs *p)
                }
        }
 #endif
+#ifdef WITH_SPECIALMONITORS
        if (p->monitoremu == MONITOREMU_FIRECRACKER24) {
                cards_set[cardno].flags = 0;
                cards_set[cardno].name = _T("FireCracker24");
                cards_set[cardno].zorro = 2;
                cards_set[cardno++].initnum = specialmonitor_autoconfig_init;
        }
+#endif
 
        /* Z3 boards last */
 
@@ -5339,12 +5368,14 @@ const struct expansionromtype expansionroms[] = {
                NULL, 0,
                false, EXPANSIONTYPE_INTERNAL | EXPANSIONTYPE_SCSI
        },
+#ifdef NCR
        {
                _T("scsi_a4000t"), _T("A4000T SCSI"), _T("Commodore"),
                NULL, a4000t_scsi_init, NULL, a4000t_add_scsi_unit, ROMTYPE_SCSI_A4000T | ROMTYPE_NOT, 0, 0, BOARD_NONAUTOCONFIG_BEFORE, true,
                NULL, 0,
                false, EXPANSIONTYPE_INTERNAL | EXPANSIONTYPE_SCSI
        },
+#endif
        {
                _T("ide_mb"), _T("A600/A1200/A4000 IDE"), _T("Commodore"),
                NULL, gayle_ide_init, NULL, gayle_add_ide_unit, ROMTYPE_MB_IDE | ROMTYPE_NOT, 0, 0, BOARD_NONAUTOCONFIG_BEFORE, true,
@@ -5367,13 +5398,14 @@ const struct expansionromtype expansionroms[] = {
        },
 #endif
        {
-               _T("a1000wom512k"), _T("A1000 512k WOM"), _T("Jörg Huth"),
+               _T("a1000wom512k"), _T("A1000 512k WOM"), _T("Jörg Huth"),
                NULL, NULL, NULL, NULL, ROMTYPE_512KWOM | ROMTYPE_NOT, 0, 0, BOARD_NONAUTOCONFIG_BEFORE, true,
                NULL, 0,
                false, EXPANSIONTYPE_INTERNAL
        },
 
        /* PCI Bridgeboards */
+#ifdef WITH_PCI
 
        {
                _T("grex"), _T("G-REX"), _T("DCE"),
@@ -5405,6 +5437,7 @@ const struct expansionromtype expansionroms[] = {
                0, 0, 0, false, NULL,
                false, 0, bridge_settings
        },
+#endif
 
        /* SCSI/IDE expansion */
 
@@ -5443,6 +5476,7 @@ const struct expansionromtype expansionroms[] = {
                false, 0, NULL,
                { 0xd1, 0x30, 0x00, 0x00, 0x08, 0x40, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00 },
        },
+#ifdef NCR9X
        {
                _T("blizzardscsikitiii"), _T("SCSI Kit III"), _T("Phase 5"),
                NULL, NULL, NULL, cpuboard_ncr9x_add_scsi_unit, ROMTYPE_BLIZKIT3, 0, 0, 0, true,
@@ -5461,6 +5495,7 @@ const struct expansionromtype expansionroms[] = {
                NULL, 0,
                false, EXPANSIONTYPE_SCSI
        },
+#endif
        {
                _T("accessx"), _T("AccessX"), _T("Breitfeld Computersysteme"),
                NULL, accessx_init, NULL, accessx_add_ide_unit, ROMTYPE_ACCESSX, 0, 0, BOARD_AUTOCONFIG_Z2, false,
@@ -5469,12 +5504,14 @@ const struct expansionromtype expansionroms[] = {
                0, 0, 0, true, NULL,
                false, 2
        },
+#ifdef NCR9X
        {
                _T("oktagon2008"), _T("Oktagon 2008"), _T("BSC/Alfa Data"),
                NULL, ncr_oktagon_autoconfig_init, NULL, oktagon_add_scsi_unit, ROMTYPE_OKTAGON, 0, 0, BOARD_AUTOCONFIG_Z2, false,
                NULL, 0,
                true, EXPANSIONTYPE_SCSI
        },
+#endif
        {
                _T("alfapower"), _T("AlfaPower/AT-Bus 2008"), _T("BSC/Alfa Data"),
                NULL, alf_init, NULL, alf_add_ide_unit, ROMTYPE_ALFA, 0, 0, BOARD_AUTOCONFIG_Z2, false,
@@ -5539,6 +5576,7 @@ const struct expansionromtype expansionroms[] = {
                true, EXPANSIONTYPE_SCSI | EXPANSIONTYPE_CUSTOM_SECONDARY | EXPANSIONTYPE_DMA24,
                commodore, commodore_a2091, 0, true, NULL
        },
+#ifdef NCR
        {
                _T("a4091"), _T("A4091"), _T("Commodore"),
                NULL, ncr710_a4091_autoconfig_init, NULL, a4091_add_scsi_unit, ROMTYPE_A4091, 0, 0, BOARD_AUTOCONFIG_Z3, false,
@@ -5547,6 +5585,7 @@ const struct expansionromtype expansionroms[] = {
                0, 0, 0, false, NULL,
                true, 0, a4091_settings
        },
+#endif
        {
                _T("comspec"), _T("SA series"), _T("Comspec Communications"),
                comspec_preinit, comspec_init, NULL, comspec_add_scsi_unit, ROMTYPE_COMSPEC, 0, 0, BOARD_AUTOCONFIG_Z2, true,
@@ -5555,6 +5594,7 @@ const struct expansionromtype expansionroms[] = {
                0, 0, 0, false, NULL,
                false, 0, comspec_settings
        },
+#ifdef NCR9X
        {
                _T("rapidfire"), _T("RapidFire/SpitFire"), _T("DKB"),
                NULL, ncr_rapidfire_init, NULL, rapidfire_add_scsi_unit, ROMTYPE_RAPIDFIRE, 0, 0, BOARD_AUTOCONFIG_Z2, false,
@@ -5564,6 +5604,7 @@ const struct expansionromtype expansionroms[] = {
                true, 0, NULL,
                { 0xd2, 0x0f ,0x00, 0x00, 0x07, 0xdc, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00 },
        },
+#endif
        {
                _T("fastata4000"), _T("FastATA 4000"), _T("Elbox"),
                NULL, fastata4k_init, NULL, fastata4k_add_ide_unit, ROMTYPE_FASTATA4K, 0, 0, BOARD_AUTOCONFIG_Z3, false,
@@ -5715,7 +5756,7 @@ const struct expansionromtype expansionroms[] = {
                { 0xd1, 0x31, 0x00, 0x00, 0x08, 0x40, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00 },
        },
        {
-               _T("kommos"), _T("Kommos A500/A2000 SCSI"), _T("Jürgen Kommos"),
+               _T("kommos"), _T("Kommos A500/A2000 SCSI"), _T("Jürgen Kommos"),
                NULL, kommos_init, NULL, kommos_add_scsi_unit, ROMTYPE_KOMMOS, 0, 0, BOARD_NONAUTOCONFIG_BEFORE, true,
                NULL, 0,
                false, EXPANSIONTYPE_SCSI
@@ -5741,6 +5782,7 @@ const struct expansionromtype expansionroms[] = {
                0, 0, 0, false, NULL,
                true, 0, golemfast_settings
        },
+#ifdef NCR9X
        {
                _T("multievolution"), _T("Multi Evolution 500/2000"), _T("MacroSystem"),
                NULL, ncr_multievolution_init, NULL, multievolution_add_scsi_unit, ROMTYPE_MEVOLUTION, 0, 0, BOARD_NONAUTOCONFIG_BEFORE, true,
@@ -5748,6 +5790,7 @@ const struct expansionromtype expansionroms[] = {
                false, EXPANSIONTYPE_SCSI,
                18260, 8, 0, true
        },
+#endif
        {
                _T("mastfb"), _T("Fireball"), _T("M.A.S.T."),
                NULL, fireball_init, NULL, fireball_add_scsi_unit, ROMTYPE_MASTFB, 0, 0, BOARD_AUTOCONFIG_Z2, false,
@@ -5766,6 +5809,7 @@ const struct expansionromtype expansionroms[] = {
                false, 0, NULL,
                { 0xd1, 3, 0x40, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00 }
        },
+#ifdef NCR9X
        {
                _T("scram5394"), _T("SCRAM (NCR53C94)"), _T("MegaMicro"),
                NULL, ncr_scram5394_init, NULL, scram5394_add_scsi_unit, ROMTYPE_SCRAM5394, 0, 0, BOARD_AUTOCONFIG_Z2, false,
@@ -5775,6 +5819,7 @@ const struct expansionromtype expansionroms[] = {
                false, 0, NULL,
                { 0xd1, 7, 0x40, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00 }
        },
+#endif
        {
                _T("paradox"), _T("Paradox SCSI"), _T("Mainhattan Data"),
                NULL, paradox_init, NULL, paradox_add_scsi_unit, ROMTYPE_PARADOX | ROMTYPE_NOT, 0, 0, BOARD_NONAUTOCONFIG_BEFORE, false,
@@ -5793,12 +5838,14 @@ const struct expansionromtype expansionroms[] = {
                NULL, 0,
                true, EXPANSIONTYPE_IDE
        },
+#ifdef NCR9X
        {
                _T("mtecmastercard"), _T("Mastercard"), _T("M-Tec"),
                NULL, ncr_mtecmastercard_init, NULL, mtecmastercard_add_scsi_unit, ROMTYPE_MASTERCARD, 0, 0, BOARD_AUTOCONFIG_Z2, false,
                NULL, 0,
                true, EXPANSIONTYPE_SCSI
        },
+#endif
        {
                _T("masoboshi"), _T("MasterCard"), _T("Masoboshi"),
                NULL, masoboshi_init, NULL, masoboshi_add_idescsi_unit, ROMTYPE_MASOBOSHI | ROMTYPE_NONE, 0, 0, BOARD_AUTOCONFIG_Z2, false,
@@ -5841,6 +5888,7 @@ const struct expansionromtype expansionroms[] = {
                false, 0, NULL,
                { 0xd1, 16, 0x00, 0x00, 0x08, 0x40, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00 }
        },
+#ifdef NCR9X
        {
                _T("fastlane"), _T("Fastlane"), _T("Phase 5"),
                NULL, ncr_fastlane_autoconfig_init, NULL, fastlane_add_scsi_unit, ROMTYPE_FASTLANE, 0, 0, BOARD_AUTOCONFIG_Z3, false,
@@ -5848,6 +5896,7 @@ const struct expansionromtype expansionroms[] = {
                false, EXPANSIONTYPE_SCSI,
                8512, 10, 0, false, fastlane_memory_callback
        },
+#endif
        {
                _T("phoenixboard"), _T("Phoenix Board SCSI"), _T("Phoenix Microtechnologies"),
                NULL, phoenixboard_init, NULL, phoenixboard_add_scsi_unit, ROMTYPE_PHOENIXB, 0, 0, BOARD_AUTOCONFIG_Z2, true,
@@ -5940,6 +5989,7 @@ const struct expansionromtype expansionroms[] = {
                NULL, 0,
                false, EXPANSIONTYPE_CUSTOM | EXPANSIONTYPE_SCSI
        },
+#ifdef NCR
        {
                _T("alf3"), _T("A.L.F.3"), _T("Elaborate Bytes"),
                NULL, ncr_alf3_autoconfig_init, NULL, alf3_add_scsi_unit, ROMTYPE_ALF3 | ROMTYPE_NONE, 0, 0, BOARD_AUTOCONFIG_Z2, false,
@@ -5948,8 +5998,9 @@ const struct expansionromtype expansionroms[] = {
                0, 0, 0, false, NULL,
                true, 0, alf3_settings
        },
+#endif
        {
-               _T("promigos"), _T("Promigos"), _T("Flesch und Hörnemann"),
+               _T("promigos"), _T("Promigos"), _T("Flesch und Hörnemann"),
                NULL, promigos_init, NULL, promigos_add_scsi_unit, ROMTYPE_PROMIGOS | ROMTYPE_NOT, 0, 0, BOARD_NONAUTOCONFIG_BEFORE, true,
                NULL, 0,
                false, EXPANSIONTYPE_CUSTOM | EXPANSIONTYPE_SCSI
@@ -6008,6 +6059,7 @@ const struct expansionromtype expansionroms[] = {
                _T("amax"), _T("AMAX ROM dongle"), _T("ReadySoft"),
                NULL, NULL, NULL, NULL, ROMTYPE_AMAX | ROMTYPE_NONE, 0, 0, 0, false
        },
+#ifdef WITH_X86
        {
                _T("x86athdprimary"), _T("AT IDE Primary"), NULL,
                NULL, x86_at_hd_init_1, NULL, x86_add_at_hd_unit_1, ROMTYPE_X86_AT_HD1 | ROMTYPE_NOT, 0, 0, BOARD_NONAUTOCONFIG_AFTER_Z2, true,
@@ -6031,6 +6083,7 @@ const struct expansionromtype expansionroms[] = {
                false, 0, x86_rt1000_settings
 
        },
+#endif
 #ifndef NDEBUG
        {
                _T("dev_ide"), _T("DEV IDE"), NULL,
@@ -6053,6 +6106,7 @@ const struct expansionromtype expansionroms[] = {
        },
 
        /* PC Bridgeboards */
+#ifdef WITH_X86
 
        {
                _T("a1060"), _T("A1060 Sidecar"), _T("Commodore"),
@@ -6094,6 +6148,7 @@ const struct expansionromtype expansionroms[] = {
                0, 0, 0, false, NULL,
                false, 0, x86at386_bridge_settings
        },
+#endif
 
        // only here for rom selection and settings
        {
@@ -6166,6 +6221,7 @@ const struct expansionromtype expansionroms[] = {
        },
 
        /* Sound Cards */
+#ifdef WITH_TOCCATA
        {
                _T("prelude"), _T("Prelude"), _T("Albrecht Computer Technik"),
                NULL, prelude_init, NULL, NULL, ROMTYPE_PRELUDE | ROMTYPE_NOT, 0, 0, BOARD_AUTOCONFIG_Z2, true,
@@ -6192,6 +6248,8 @@ const struct expansionromtype expansionroms[] = {
                false, 0, toccata_soundcard_settings,
                { 0xc1, 12, 0, 0, 18260 >> 8, 18260 & 255 }
        },
+#endif
+#ifdef WITH_PCI
        {
                _T("es1370"), _T("ES1370 PCI"), _T("Ensoniq"),
                NULL, pci_expansion_init, NULL, NULL, ROMTYPE_ES1370 | ROMTYPE_NOT, 0, 0, BOARD_PCI, true,
@@ -6204,6 +6262,8 @@ const struct expansionromtype expansionroms[] = {
                NULL, 0,
                false, EXPANSIONTYPE_SOUND
        },
+#endif
+#ifdef WITH_TOCCATA
        {
                _T("uaesnd_z2"), _T("UAESND Z2"), NULL,
                NULL, uaesndboard_init_z2, NULL, NULL, ROMTYPE_UAESNDZ2 | ROMTYPE_NOT, 0, 0, BOARD_AUTOCONFIG_Z2, true,
@@ -6222,6 +6282,8 @@ const struct expansionromtype expansionroms[] = {
                false, 0, NULL,
                { 0x80, 2, 0x10, 0x00, 6502 >> 8, 6502 & 255, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }
        },
+#endif
+#ifdef WITH_X86
        {
                _T("sb_isa"), _T("SoundBlaster ISA (Creative)"), NULL,
                NULL, isa_expansion_init, NULL, NULL, ROMTYPE_SBISA | ROMTYPE_NOT, 0, 0, BOARD_NONAUTOCONFIG_BEFORE, true,
@@ -6230,6 +6292,7 @@ const struct expansionromtype expansionroms[] = {
                0, 0, 0, false, NULL,
                false, 0, sb_isa_settings
        },
+#endif
 
 
 #if 0
@@ -6263,6 +6326,7 @@ const struct expansionromtype expansionroms[] = {
                false, 0, ethernet_settings,
                { 0xc1, 0xc9, 0x00, 0x00, 2167 >> 8, 2167 & 255, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }
        },
+#ifdef WITH_QEMU_CPU
        {
                _T("ariadne2"), _T("Ariadne II"), _T("Village Tronic"),
                NULL, ariadne2_init, NULL, NULL, ROMTYPE_ARIADNE2 | ROMTYPE_NOT, 0, 0, BOARD_AUTOCONFIG_Z2, true,
@@ -6317,6 +6381,7 @@ const struct expansionromtype expansionroms[] = {
                false, 0, ethernet_settings,
                { 0x82, 0x64, 0x32, 0x00, 4626 >> 8, 4626 & 255, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00 }
        },
+#endif
        {
                _T("ne2000pcmcia"), _T("RTL8019 PCMCIA (NE2000 compatible)"), NULL,
                NULL, gayle_init_board_io_pcmcia, NULL, NULL, ROMTYPE_NE2KPCMCIA | ROMTYPE_NOT, 0, 0, BOARD_NONAUTOCONFIG_BEFORE, true,
@@ -6325,6 +6390,7 @@ const struct expansionromtype expansionroms[] = {
                0, 0, 0, false, NULL,
                false, 0, ethernet_settings,
        },
+#ifdef WITH_PCI
        {
                _T("ne2000_pci"), _T("RTL8029 PCI (NE2000 compatible)"), NULL,
                NULL, pci_expansion_init, NULL, NULL, ROMTYPE_NE2KPCI | ROMTYPE_NOT, 0, 0, BOARD_PCI, true,
@@ -6333,6 +6399,8 @@ const struct expansionromtype expansionroms[] = {
                0, 0, 0, false, NULL,
                false, 0, ethernet_settings,
        },
+#endif
+#ifdef WITH_X86
        {
                _T("ne2000_isa"), _T("RTL8019 ISA (NE2000 compatible)"), NULL,
                NULL, isa_expansion_init, NULL, NULL, ROMTYPE_NE2KISA | ROMTYPE_NOT, 0, 0, BOARD_NONAUTOCONFIG_BEFORE, true,
@@ -6341,7 +6409,9 @@ const struct expansionromtype expansionroms[] = {
                0, 0, 0, false, NULL,
                false, 0, ne2k_isa_settings
        },
+#endif
 
+#ifdef CATWEASEL
                /* Catweasel */
        {
                _T("catweasel"), _T("Catweasel"), _T("Individual Computers"),
@@ -6349,6 +6419,7 @@ const struct expansionromtype expansionroms[] = {
                NULL, 0,
                false, EXPANSIONTYPE_FLOPPY
        },
+#endif
 
        // misc
 
@@ -6366,6 +6437,7 @@ const struct expansionromtype expansionroms[] = {
                NULL, 0,
                false, EXPANSIONTYPE_CUSTOM | EXPANSIONTYPE_PCMCIA | EXPANSIONTYPE_CUSTOMDISK,
        },
+#ifdef WITH_TOCCATA
        {
                _T("uaeboard_z2"), _T("UAEBOARD Z2"), NULL,
                NULL, uaesndboard_init_z2, NULL, NULL, ROMTYPE_UAEBOARDZ2 | ROMTYPE_NOT, 0, 0, BOARD_AUTOCONFIG_Z2, true,
@@ -6378,6 +6450,7 @@ const struct expansionromtype expansionroms[] = {
                NULL, 0,
                false, EXPANSIONTYPE_CUSTOM
        },
+#endif
        {
                _T("cubo"), _T("Cubo CD32"), NULL,
                NULL, cubo_init, NULL, NULL, ROMTYPE_CUBO | ROMTYPE_NOT, 0, 0, BOARD_NONAUTOCONFIG_BEFORE, true,
@@ -6386,6 +6459,7 @@ const struct expansionromtype expansionroms[] = {
                0, 0, 0, false, NULL,
                false, 0, cubo_settings,
        },
+#ifdef WITH_X86
        {
                _T("x86_mouse"), _T("x86 Bridgeboard mouse"), NULL,
                NULL, isa_expansion_init, NULL, NULL, ROMTYPE_X86MOUSE | ROMTYPE_NOT, 0, 0, BOARD_NONAUTOCONFIG_BEFORE, true,
@@ -6394,6 +6468,7 @@ const struct expansionromtype expansionroms[] = {
                0, 0, 0, false, NULL,
                false, 0, x86_mouse_settings
        },
+#endif
 
 
        {
@@ -6494,6 +6569,7 @@ static const struct cpuboardsubtype gvpboard_sub[] = {
                0,
                gvp_init_accelerator, NULL, BOARD_AUTOCONFIG_Z2, 1
        },
+#ifdef NCR
        {
                _T("Tek Magic 2040/2060"),
                _T("TekMagic"),
@@ -6502,6 +6578,7 @@ static const struct cpuboardsubtype gvpboard_sub[] = {
                BOARD_MEMORY_HIGHMEM,
                128 * 1024 * 1024
        },
+#endif
        {
                _T("A1230 Turbo+"),
                _T("A1230SI"),
@@ -6522,6 +6599,7 @@ static const struct cpuboardsubtype gvpboard_sub[] = {
                gvpa1230s2_settings, NULL,
                2017, 9, 0, false
        },
+#ifdef NCR
        {
                _T("QuikPak XP"),
                _T("quikpakxp"),
@@ -6538,11 +6616,13 @@ static const struct cpuboardsubtype gvpboard_sub[] = {
                BOARD_MEMORY_HIGHMEM,
                128 * 1024 * 1024
        },
+#endif
        {
                NULL
        }
 };
 static const struct cpuboardsubtype blizzardboard_sub[] = {
+#ifdef NCR9X
        {
                _T("Blizzard 1230 I/II"),
                _T("Blizzard1230II"),
@@ -6554,6 +6634,7 @@ static const struct cpuboardsubtype blizzardboard_sub[] = {
                NULL, NULL, 0, 0,
                blizzardboard_settings_mk2
        },
+#endif
        {
                _T("Blizzard 1230 III"),
                _T("Blizzard1230III"),
@@ -6587,6 +6668,7 @@ static const struct cpuboardsubtype blizzardboard_sub[] = {
                NULL, NULL, 0, 0,
                blizzardboard_settings
        },
+#ifdef NCR9X
        {
                _T("Blizzard 2060"),
                _T("Blizzard2060"),
@@ -6606,6 +6688,7 @@ static const struct cpuboardsubtype blizzardboard_sub[] = {
                BOARD_MEMORY_BLIZZARD_PPC,
                256 * 1024 * 1024
        },
+#endif
        {
                NULL
        }
@@ -6622,6 +6705,7 @@ static const struct cpuboardsubtype cyberstormboard_sub[] = {
                NULL, NULL, 0, 0,
                NULL
        },
+#ifdef NCR9X
        {
                _T("CyberStorm MK II"),
                _T("CyberStormMK2"),
@@ -6646,6 +6730,7 @@ static const struct cpuboardsubtype cyberstormboard_sub[] = {
                BOARD_MEMORY_HIGHMEM,
                128 * 1024 * 1024
        },
+#endif
        {
                NULL
        }
@@ -6680,6 +6765,7 @@ static const struct expansionboardsettings draco_settings[] = {
        }
 };
 static const struct cpuboardsubtype macrosystem_sub[] = {
+#ifdef NCR
        {
                _T("Warp Engine A4000"),
                _T("WarpEngineA4000"),
@@ -6691,6 +6777,7 @@ static const struct cpuboardsubtype macrosystem_sub[] = {
                ncr710_warpengine_autoconfig_init, NULL, BOARD_AUTOCONFIG_Z3, 1,
                warpengine_settings
        },
+#endif
        {
                _T("Falcon 040"),
                _T("Falcon040"),
@@ -6699,6 +6786,7 @@ static const struct cpuboardsubtype macrosystem_sub[] = {
                0,
                128 * 1024 * 1024,
        },
+#ifdef WITH_DRACO
        {
                _T("DraCo"),
                _T("draco"),
@@ -6720,6 +6808,7 @@ static const struct cpuboardsubtype macrosystem_sub[] = {
                0,
                NULL, NULL, BOARD_NONAUTOCONFIG_BEFORE, 1,
        },
+#endif
        {
                NULL
        }
@@ -6734,6 +6823,7 @@ static const struct expansionboardsettings mtec_settings[] = {
        }
 };
 static const struct cpuboardsubtype mtec_sub[] = {
+#ifdef NCR9X
        {
                _T("E-Matrix 530"),
                _T("e-matrix530"),
@@ -6745,6 +6835,7 @@ static const struct cpuboardsubtype mtec_sub[] = {
                ncr_ematrix_autoconfig_init, NULL, BOARD_AUTOCONFIG_Z2, 1,
                mtec_settings
        },
+#endif
        {
                NULL
        }
@@ -6824,6 +6915,7 @@ static const struct expansionboardsettings cpuboard_dkb_cobra_settings[] = {
        }
 };
 static const struct cpuboardsubtype dbk_sub[] = {
+#ifdef NCR9X
        {
                _T("1230/1240/Cobra"),
                _T("DKB12x0"),
@@ -6835,6 +6927,7 @@ static const struct cpuboardsubtype dbk_sub[] = {
                ncr_dkb_autoconfig_init, NULL, BOARD_AUTOCONFIG_Z2, 0,
                cpuboard_dkb_cobra_settings
        },
+#ifdef WITH_PCI
        {
                _T("Wildfire"),
                _T("wildfire"),
@@ -6845,6 +6938,8 @@ static const struct cpuboardsubtype dbk_sub[] = {
                0,
                dkb_wildfire_pci_init, NULL, BOARD_NONAUTOCONFIG_BEFORE, 0
        },
+#endif // WITH_PCI
+#endif
        {
                NULL
        }
@@ -6913,6 +7008,7 @@ static const struct expansionboardsettings zeus040_settings[] = {
        }
 };
 static const struct cpuboardsubtype pps_sub[] = {
+#ifdef NCR
        {
                _T("Zeus 040"),
                _T("Zeus"),
@@ -6925,12 +7021,14 @@ static const struct cpuboardsubtype pps_sub[] = {
                zeus040_settings, NULL,
                2016, 150, 0, false
        },
+#endif
        {
                NULL
        }
 };
 
 static const struct cpuboardsubtype csa_sub[] = {
+#ifdef NCR
        {
                _T("Magnum 40/4"),
                _T("Magnum40"),
@@ -6942,6 +7040,7 @@ static const struct cpuboardsubtype csa_sub[] = {
                ncr710_magnum40_autoconfig_init, NULL, BOARD_AUTOCONFIG_Z2, 1,
                magnum40_settings, NULL
        },
+#endif
        {
                _T("Twelve Gauge"),
                _T("twelvegauge"),
@@ -7030,6 +7129,7 @@ static const struct cpuboardsubtype dceboard_sub[] = {
                BOARD_MEMORY_CUSTOM_32,
                128 * 1024 * 1024
        },
+#ifdef NCR9X
        {
                _T("Typhoon MK2"),
                _T("typhoon2"),
@@ -7040,6 +7140,7 @@ static const struct cpuboardsubtype dceboard_sub[] = {
                0,
                typhoon2scsi_init, NULL, BOARD_AUTOCONFIG_Z2, 1
        },
+#endif
        {
                NULL
        }
index 0140fea8f62373065962862bd043065739f60e59..767bca419e971cfd2ea6c1e90c2602bd56b43c4c 100644 (file)
 #include "gayle.h"
 #include "idecontrollers.h"
 #include "savestate.h"
+#ifdef A2091
 #include "a2091.h"
+#endif
+#ifdef NCR
 #include "ncr_scsi.h"
+#endif
 #include "cdtv.h"
 #include "sana2.h"
 #include "bsdsocket.h"
diff --git a/fpp.cpp b/fpp.cpp
index d7dbd9591fe83bb885f6da20d34f2e64bec141e7..13d54a2899d0d5a2553262f603f29853e1d9ef3d 100644 (file)
--- a/fpp.cpp
+++ b/fpp.cpp
@@ -3705,7 +3705,9 @@ void fpu_reset (void)
        }
 
 #if defined(CPU_i386) || defined(CPU_x86_64)
+#ifndef __MACH__
        init_fpucw_x87();
+#endif
 #ifdef MSVC_LONG_DOUBLE
        init_fpucw_x87_80();
 #endif
index b95381eca233efef2fccc5ad3dbb1125581e14da..d66eb0f4211091e64ca80e86d263872ec3ccf315 100644 (file)
@@ -158,9 +158,11 @@ static void set_fpucw_x87(uae_u32 m68k_cw)
 
 static void native_set_fpucw(uae_u32 m68k_cw)
 {
+#ifndef __MACH__
 #if defined(CPU_i386) || defined(CPU_x86_64)
        set_fpucw_x87(m68k_cw);
 #endif
+#endif
 }
 
 /* Functions for setting host/library modes and getting status */
index 455f0589215036f54fef311aa366d8ae53016282..3b4e1b880dcafc7a18521c18bf2537483069c882 100644 (file)
@@ -25,6 +25,15 @@ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 #include <sys/stat.h>
 #endif
 
+#if defined(STAT_STATVFS) && !defined(__ANDROID__)
+#include <sys/statvfs.h>
+// For osx, sigurbjornl
+#elif defined (__MACH__)
+#include <sys/mount.h>
+#else
+#include <sys/vfs.h>
+#endif
+
 #include "fsusage.h"
 
 /* Return the number of TOSIZE-byte blocks used by
@@ -100,7 +109,7 @@ int statfs ();
 # include <sys/mount.h>
 #endif
 
-#if HAVE_SYS_VFS_H
+#if HAVE_SYS_VFS_H and !defined(__MACH__)
 # include <sys/vfs.h>
 #endif
 
@@ -116,7 +125,7 @@ int statfs ();
 # include <fcntl.h>
 #endif
 
-#if HAVE_SYS_STATFS_H
+#if HAVE_SYS_STATFS_H and !defined(__MACH__)
 # include <sys/statfs.h>
 #endif
 
index 82299be5e96fdd3af6c5bcac7ef40b5ce238482f..c13d56bdcc5bf8332c710b31fd0ff32c2b3e8017 100644 (file)
--- a/gayle.cpp
+++ b/gayle.cpp
 #include "uae.h"
 #include "gui.h"
 #include "threaddep/thread.h"
+#ifdef A2091
 #include "a2091.h"
+#endif
 #include "ncr_scsi.h"
 #include "ncr9x_scsi.h"
 #include "blkdev.h"
 #include "scsi.h"
 #include "ide.h"
 #include "idecontrollers.h"
+#ifdef WITH_PCI
 #include "pci_hw.h"
+#endif
 #include "debug.h"
 #include "autoconf.h"
 #include "rommgr.h"
 #include "devices.h"
+#ifdef WITH_DSP
 #include "dsp3210/dsp_glue.h"
+#endif
 
 #define PCMCIA_SRAM 1
 #define PCMCIA_IDE 2
@@ -476,7 +482,7 @@ static int gayle_read (uaecptr addr)
        uaecptr oaddr = addr;
        uae_u32 v = 0;
        int got = 0;
-
+#ifdef WITH_DSP
        if (is_dsp_installed) {
                uaecptr daddr = addr & 0xffff;
                if (daddr == 0x5f || daddr == 0x80) {
@@ -484,6 +490,7 @@ static int gayle_read (uaecptr addr)
                        return v;
                }
        }
+#endif
        if (currprefs.cs_ide == IDE_A600A1200) {
                if ((addr & 0xA0000) != 0xA0000)
                        return 0;
@@ -522,13 +529,14 @@ static void gayle_write (uaecptr addr, int val)
 {
        uaecptr oaddr = addr;
        int got = 0;
-
+#ifdef WITH_DSP
        if (is_dsp_installed) {
                uaecptr daddr = addr & 0xffff;
                if (daddr  == 0x5f || daddr == 0x80) {
                        dsp_write(val);
                }
        }
+#endif
        if (currprefs.cs_ide == IDE_A600A1200) {
                if ((addr & 0xA0000) != 0xA0000) {
                        return;
@@ -1022,8 +1030,10 @@ static uae_u8 *pcmcia_common;
 static uae_u8 *pcmcia_attrs;
 static int pcmcia_write_min, pcmcia_write_max;
 static uae_u16 pcmcia_idedata;
+#ifdef WITH_PCI
 static const struct pci_board *ne2000;
 static struct pci_board_state *ne2000_board_state;
+#endif
 
 static uaecptr from_gayle_pcmcmia(uaecptr addr)
 {
@@ -1138,12 +1148,15 @@ static uae_u32 gayle_attr_read (uaecptr addr)
                        return pcmcia_configuration[offset];
                } else if (pcmcia_configured >= 0 && (addr & 0xffff) >= 0x300) {
                        int reg = get_pcmcmia_ne2000_reg(addr);
+#ifdef WITH_PCI
                        if (ne2000) {
                                v = ne2000->bars[0].bget(ne2000_board_state, reg);
                        }
+#endif
                        return v;
                }
        } else if (pcmcia_type == PCMCIA_SURFSQUIRREL) {
+#ifdef NCR9X
                if ((addr & 0x20600) == 0x20400) {
                        int reg = (addr >> 12) & 15;
                        v = squirrel_ncr9x_scsi_get(reg, 0);
@@ -1153,6 +1166,7 @@ static uae_u32 gayle_attr_read (uaecptr addr)
                        v = squirrel_ncr9x_scsi_get(16, 0);
                        return v;
                }
+#endif
        }
        if (pcmcia_attrs_full) {
                v = pcmcia_attrs[addr];
@@ -1213,11 +1227,14 @@ static void gayle_attr_write (uaecptr addr, uae_u32 v)
                                write_log(_T("PCMCIA NE2000 IO configured = %02x\n"), v);
                        } else if (pcmcia_configured >= 0 && (addr & 0xffff) >= 0x300) {
                                int reg = get_pcmcmia_ne2000_reg(addr);
+#ifdef WITH_PCI
                                if (ne2000) {
                                        ne2000->bars[0].bput(ne2000_board_state, reg, v);
                                }
+#endif
                        }
                } else if (pcmcia_type == PCMCIA_SURFSQUIRREL) {
+#ifdef NCR9X
                        if ((addr & 0x20400) == 0x20400) {
                                int reg = (addr >> 12) & 15;
                                squirrel_ncr9x_scsi_put(reg, v, 0);
@@ -1225,6 +1242,7 @@ static void gayle_attr_write (uaecptr addr, uae_u32 v)
                        if ((addr & 0x20600) == 0x20200) {
                                squirrel_ncr9x_scsi_put(16, v, 0);
                        }
+#endif
                }
        }
 }
@@ -1468,12 +1486,14 @@ static int freepcmcia (int reset)
                }
        }
        remove_ide_unit(idedrive, PCMCIA_IDE_ID * 2);
+#ifdef WITH_PCI
        if (ne2000) {
                ne2000->free(ne2000_board_state);
                xfree(ne2000_board_state);
                ne2000_board_state = NULL;
                ne2000 = NULL;
        }
+#endif
 
        if (pcmcia_card)
                gayle_cs_change (GAYLE_CS_CCDET, 0);
@@ -1572,7 +1592,7 @@ static int initpcmcia (const TCHAR *path, int readonly, int type, int reset, str
                initscideattr (pcmcia_readonly);
 
        } else if (type == PCMCIA_NE2000) {
-
+#ifdef WITH_PCI
                ne2000 = &ne2000_pci_board_pcmcia;
                ne2000_board_state = xcalloc(pci_board_state, 1);
                ne2000_board_state->irq_callback = ne2000_pcmcia_irq_callback;
@@ -1589,6 +1609,7 @@ static int initpcmcia (const TCHAR *path, int readonly, int type, int reset, str
                        pcmcia_card = 1;
                        initne2000attr();
                }
+#endif
        
        } else if (type == PCMCIA_ARCHOSHD) {
 
@@ -1630,11 +1651,15 @@ static int initpcmcia (const TCHAR *path, int readonly, int type, int reset, str
 
                struct romconfig *rc = get_device_romconfig(&currprefs, ROMTYPE_SSQUIRREL, 0);
                if (rc) {
+#ifdef NCR9X
                        ncr_squirrel_init(rc, 0xa00000);
+#endif
                }
 
                if (reset && path) {
+#ifdef NCR9X
                        squirrel_add_scsi_unit(0, uci, rc);
+#endif
                }
 
        }
@@ -1774,6 +1799,7 @@ static uae_u32 REGPARAM2 gayle_attr_wget (uaecptr addr)
                                return pcmcia_idedata;
                        }
                } else if (pcmcia_type == PCMCIA_NE2000) {
+#ifdef WITH_PCI
                        int reg = get_pcmcmia_ne2000_reg(addr);
                        if (reg >= 0) {
                                if (ne2000) {
@@ -1782,6 +1808,7 @@ static uae_u32 REGPARAM2 gayle_attr_wget (uaecptr addr)
                                }
                                return v;
                        }
+#endif
                }
        }
 
@@ -1811,6 +1838,7 @@ static void REGPARAM2 gayle_attr_wput (uaecptr addr, uae_u32 value)
                                return;
                        }
                } else if (pcmcia_type == PCMCIA_NE2000) {
+#ifdef WITH_PCI
                        int reg = get_pcmcmia_ne2000_reg(addr);
                        if (reg >= 0) {
                                if (ne2000) {
@@ -1820,6 +1848,7 @@ static void REGPARAM2 gayle_attr_wput (uaecptr addr, uae_u32 value)
                                }
                                return;
                        }
+#endif
                }
        }
 
@@ -2136,8 +2165,10 @@ static void pcmcia_card_check(int changecheck, int insertdev)
 
 static void gayle_hsync(void)
 {
+#ifdef WITH_PCI
        if (ne2000)
                ne2000->hsync(ne2000_board_state);
+#endif
        if (ide_interrupt_hsync(idedrive[0]) || ide_interrupt_hsync(idedrive[2]) || ide_interrupt_hsync(idedrive[4]) || checkpcmciane2000irq())
                devices_rethink_all(rethink_gayle);
        if (archoshd[0])
index d09c549c29318e876a447cba811e571a16e1799b..18429635824a44a3ce741c038577eb0b2d42381a 100644 (file)
@@ -936,8 +936,10 @@ static void gfxboard_rethink(void)
                if (gb->pcemdev && gb->pcemobject) {
                        int irq = 0;
                        if (gb->board->bustype == GFXBOARD_BUSTYPE_DRACO) {
+#ifdef WITH_DRACO
                                void draco_svga_irq(bool state);
                                draco_svga_irq(gb->gfxboard_intreq);
+#endif
                        } else if (gb->gfxboard_intena) {
                                bool intreq = gb->gfxboard_intreq;
                                if (gb->gfxboard_external_interrupt) {
@@ -6161,7 +6163,9 @@ static void special_pcem_put(uaecptr addr, uae_u32 v, int size)
        if (boardnum == GFXBOARD_ID_ALTAIS_Z3) {
 
                if ((addr & 0xffff) < 0x100) {
+#ifdef WITH_DRACO
                        draco_bustimeout(addr);
+#endif
                        return;
                }
                addr &= 0xffff;
@@ -6627,7 +6631,9 @@ static uae_u32 special_pcem_get(uaecptr addr, int size)
        if (boardnum == GFXBOARD_ID_ALTAIS_Z3) {
 
                if ((addr & 0xffff) < 0x100) {
+#ifdef WITH_DRACO
                        draco_bustimeout(addr);
+#endif
                        return v;
                }
                addr &= 0xffff;
index 27db5d2a2b3684f5307efd1bbe03d6b11c57a491..220df249eabbfa638f82c0d707672fb6b4a0c51d 100644 (file)
@@ -269,12 +269,15 @@ static void idecontroller_rethink(void)
 {
        bool irq = false;
        for (int i = 0; ide_boards[i]; i++) {
+#ifdef WITH_X86
                if (ide_boards[i] == x86_at_ide_board[0] || ide_boards[i] == x86_at_ide_board[1]) {
                        bool x86irq = ide_rethink(ide_boards[i], true);
                        if (x86irq && ide_boards[i] == x86_at_ide_board[0]) {
                                x86_doirq(14);
                        }
-               } else {
+               } else
+#endif
+               {
                        if (ide_rethink(ide_boards[i], false))
                                safe_interrupt_set(IRQ_SOURCE_IDE, i, ide_boards[i]->intlev6);
                }
@@ -746,7 +749,9 @@ static uae_u32 ide_read_byte2(struct ide_board *board, uaecptr addr)
                                v = board->rom[addr & board->rom_mask];
                        }
                } else if ((addr & 0x8700) == 0x8400 || (addr & 0x8700) == 0x8000) {
+#ifdef NCR9X
                        v = golemfast_ncr9x_scsi_get(oaddr, getidenum(board, golemfast_board));
+#endif
                } else if ((addr & 0x8700) == 0x8100) {
                        int regnum = get_golemfast_reg(addr, board);
                        if (regnum >= 0) {
@@ -773,8 +778,10 @@ static uae_u32 ide_read_byte2(struct ide_board *board, uaecptr addr)
                        }
                } else if ((addr >= 0xf000 && addr <= 0xf00f) || (addr >= 0xf100 && addr <= 0xf10f)) {
                        // scsi dma controller
+#ifdef NCR9X
                        if (board->subtype)
                                v = masoboshi_ncr9x_scsi_get(oaddr, getidenum(board, masoboshi_board));
+#endif
                } else if (addr == 0xf040) {
                        v = 1;
                        if (ide_irq_check(board->ide[0], false)) {
@@ -792,9 +799,11 @@ static uae_u32 ide_read_byte2(struct ide_board *board, uaecptr addr)
                        if (regnum >= 0) {
                                v = get_ide_reg(board, regnum);
                        } else if (addr >= MASOBOSHI_SCSI_OFFSET && addr < MASOBOSHI_SCSI_OFFSET_END) {
+#ifdef NCR9X
                                if (board->subtype)
                                        v = masoboshi_ncr9x_scsi_get(oaddr, getidenum(board, masoboshi_board));
                                else
+#endif
                                        v = 0xff;
                        }
                }
@@ -812,9 +821,11 @@ static uae_u32 ide_read_byte2(struct ide_board *board, uaecptr addr)
                        }
                }
                if (addr >= TRIFECTA_SCSI_OFFSET && addr < TRIFECTA_SCSI_OFFSET_END) {
+#ifdef NCR9X
                        if (board->subtype)
                                v = trifecta_ncr9x_scsi_get(oaddr, getidenum(board, trifecta_board));
                        else
+#endif
                                v = 0xff;
                }
                if (addr == 0x401) {
@@ -1479,14 +1490,18 @@ static void ide_write_byte(struct ide_board *board, uaecptr addr, uae_u8 v)
                                board->configured = 1;
                                if (board->type == ROCHARD_IDE) {
                                        rochard_scsi_init(board->original_rc, board->baseaddress);
+#ifdef NCR9X
                                } else if (board->type == MASOBOSHI_IDE) {
                                        ncr_masoboshi_autoconfig_init(board->original_rc, board->baseaddress);
                                } else if (board->type == GOLEMFAST_IDE) {
                                        ncr_golemfast_autoconfig_init(board->original_rc, board->baseaddress);
+#endif
                                } else if (board->type == DATAFLYERPLUS_IDE) {
                                        dataflyerplus_scsi_init(board->original_rc, board->baseaddress);
+#ifdef NCR9X
                                } else if (board->type == TRIFECTA_IDE) {
                                        ncr_trifecta_autoconfig_init(board->original_rc, board->baseaddress);
+#endif
                                }
                                expamem_next(ab, NULL);
                        }
@@ -1576,10 +1591,12 @@ static void ide_write_byte(struct ide_board *board, uaecptr addr, uae_u8 v)
                        write_log(_T("ALF PUT %08x %02x %d %08x\n"), addr, v, regnum, M68K_GETPC);
 #endif
                } else if (board->type == GOLEMFAST_IDE) {
-
+#ifdef NCR9X
                        if ((addr & 0x8700) == 0x8400 || (addr & 0x8700) == 0x8000) {
                                golemfast_ncr9x_scsi_put(oaddr, v, getidenum(board, golemfast_board));
-                       } else if ((addr & 0x8700) == 0x8100) {
+                       } else
+#endif
+                       if ((addr & 0x8700) == 0x8100) {
                                int regnum = get_golemfast_reg(addr, board);
                                if (regnum >= 0)
                                        put_ide_reg(board, regnum, v);
@@ -1594,14 +1611,20 @@ static void ide_write_byte(struct ide_board *board, uaecptr addr, uae_u8 v)
                        if (regnum >= 0) {
                                put_ide_reg(board, regnum, v);
                        } else if (addr >= MASOBOSHI_SCSI_OFFSET && addr < MASOBOSHI_SCSI_OFFSET_END) {
+#ifdef NCR9X
                                if (board->subtype)
                                        masoboshi_ncr9x_scsi_put(oaddr, v, getidenum(board, masoboshi_board));
+#endif
                        } else if ((addr >= 0xf000 && addr <= 0xf007)) {
+#ifdef NCR9X
                                if (board->subtype)
                                        masoboshi_ncr9x_scsi_put(oaddr, v, getidenum(board, masoboshi_board));
+#endif
                        } else if (addr >= 0xf00a && addr <= 0xf00f) {
+#ifdef NCR9X
                                // scsi dma controller
                                masoboshi_ncr9x_scsi_put(oaddr, v, getidenum(board, masoboshi_board));
+#endif
                        } else if (addr >= 0xf040 && addr <= 0xf04f) {
                                // ide dma controller
                                if (addr >= 0xf04c && addr < 0xf050) {
@@ -1661,11 +1684,15 @@ static void ide_write_byte(struct ide_board *board, uaecptr addr, uae_u8 v)
                                }
                        }
                        if (addr >= TRIFECTA_SCSI_OFFSET && addr < TRIFECTA_SCSI_OFFSET_END) {
+#ifdef NCR9X
                                if (board->subtype)
                                        trifecta_ncr9x_scsi_put(oaddr, v, getidenum(board, trifecta_board));
+#endif
                        }
                        if (addr >= 0x400 && addr <= 0x407) {
+#ifdef NCR9X
                                trifecta_ncr9x_scsi_put(oaddr, v, getidenum(board, trifecta_board));
+#endif
                        }
                        
                } else if (board->type == APOLLO_IDE) {
@@ -2513,12 +2540,16 @@ void masoboshi_add_idescsi_unit (int ch, struct uaedev_config_info *ci, struct r
 {
        if (ch < 0) {
                masoboshi_add_ide_unit(ch, ci, rc);
+#ifdef NCR9X
                masoboshi_add_scsi_unit(ch, ci, rc);
+#endif
        } else {
                if (ci->controller_type < HD_CONTROLLER_TYPE_SCSI_FIRST)
                        masoboshi_add_ide_unit(ch, ci, rc);
+#ifdef NCR9X
                else
                        masoboshi_add_scsi_unit(ch, ci, rc);
+#endif
        }
 }
 
@@ -2571,12 +2602,16 @@ void trifecta_add_idescsi_unit(int ch, struct uaedev_config_info *ci, struct rom
 {
        if (ch < 0) {
                trifecta_add_ide_unit(ch, ci, rc);
+#ifdef NCR9X
                trifecta_add_scsi_unit(ch, ci, rc);
+#endif
        } else {
                if (ci->controller_type < HD_CONTROLLER_TYPE_SCSI_FIRST)
                        trifecta_add_ide_unit(ch, ci, rc);
+#ifdef NCR9X
                else
                        trifecta_add_scsi_unit(ch, ci, rc);
+#endif
        }
 }
 
@@ -2784,12 +2819,16 @@ void golemfast_add_idescsi_unit(int ch, struct uaedev_config_info *ci, struct ro
 {
        if (ch < 0) {
                golemfast_add_ide_unit(ch, ci, rc);
+#ifdef NCR9X
                golemfast_add_scsi_unit(ch, ci, rc);
+#endif
        } else {
                if (ci->controller_type < HD_CONTROLLER_TYPE_SCSI_FIRST)
                        golemfast_add_ide_unit(ch, ci, rc);
+#ifdef NCR9X
                else
                        golemfast_add_scsi_unit(ch, ci, rc);
+#endif
        }
 }
 
@@ -3327,6 +3366,7 @@ void ripple_add_ide_unit(int ch, struct uaedev_config_info *ci, struct romconfig
        add_ide_standard_unit(ch, ci, rc, ripple_board, RIPPLE_IDE, false, false, 4);
 }
 
+#ifdef WITH_X86
 extern void x86_xt_ide_bios(struct zfile*, struct romconfig*);
 static bool x86_at_hd_init(struct autoconfig_info *aci, int type)
 {
@@ -3457,3 +3497,4 @@ uae_u16 x86_ide_hd_get(int portnum, int size)
        }
        return v;
 }
+#endif
index c752bea96e56cb6cb485bc0953a2129d6af49645..4de33d80eee83d6da09dd6b5f561748c5a7102a2 100644 (file)
 #include "readcpu.h"
 #include "machdep/m68k.h"
 #include "events.h"
+
+#ifdef WITH_SOFTFLOAT
 #include <softfloat/softfloat.h>
+#endif
 
 #ifndef SET_CFLG
 
@@ -163,7 +166,9 @@ typedef struct {
 
 typedef struct
 {
+#ifdef WITH_SOFTFLOAT
        floatx80 fpx;
+#endif
 #ifdef MSVC_LONG_DOUBLE
        union {
                fptype fp;
index 447bafbf2479fd35f8e2898470f16b836900867e..87db700777da6a7e8be0c78447c0e98d217a105b 100644 (file)
@@ -37,7 +37,9 @@
 #include "newcpu.h"
 #include "uae.h"
 #include "picasso96.h"
+#ifdef CATWEASEL
 #include "catweasel.h"
+#endif
 #include "debug.h"
 #include "ar.h"
 #include "gui.h"
 #include "audio.h"
 #include "sounddep/sound.h"
 #include "savestate.h"
+#ifdef ARCADIA
 #include "arcadia.h"
+#endif
 #include "zfile.h"
 #include "cia.h"
 #include "autoconf.h"
+#ifdef WITH_X86
 #include "x86.h"
+#endif
+#ifdef WITH_DRACO
 #include "draco.h"
+#endif
 #ifdef RETROPLATFORM
 #include "rp.h"
 #endif
@@ -199,8 +207,10 @@ static int temp_uid_cnt[IDTYPE_MAX];
 static int gp_swappeddevices[MAX_INPUT_DEVICES][IDTYPE_MAX];
 static int osk_state;
 
+#ifdef WITH_DRACO
 extern int draco_keyboard_get_rate(void);
 static int draco_keybord_repeat_cnt, draco_keybord_repeat_code;
+#endif
 
 bool osk_status(void)
 {
@@ -2749,6 +2759,7 @@ void inputdevice_tablet_strobe (void)
 
 int inputdevice_get_lightpen_id(void)
 {
+#ifdef ARCADIA
        if (!alg_flag) {
                if (lightpen_enabled2) 
                        return alg_get_player(potgo_value);
@@ -2756,6 +2767,7 @@ int inputdevice_get_lightpen_id(void)
        } else {
                return alg_get_player(potgo_value);
        }
+#endif
 }
 
 void tablet_lightpen(int tx, int ty, int tmaxx, int tmaxy, int touch, int buttonmask, bool touchmode, int devid, int lpnum)
@@ -3410,12 +3422,16 @@ static void mouseupdate (int pct, bool vsync)
        static int mxd, myd;
 
        if (vsync) {
-
-               if (x86_mouse(0, 0, 0, 0, -1) || draco_mouse(0, 0, 0, 0, -1)) {
+#ifdef WITH_DRACO
+               if (
+#ifdef WITH_X86
+                       x86_mouse(0, 0, 0, 0, -1) ||
+#endif
+                       draco_mouse(0, 0, 0, 0, -1)) {
                        pcmouse = true;
                        pct = 1000;
                }
-
+#endif
 
                if (mxd < 0) {
                        if (mouseedge_x > 0)
@@ -3507,9 +3523,12 @@ static void mouseupdate (int pct, bool vsync)
                                        pc_mouse_buttons[i] |= 4;
                                else
                                        pc_mouse_buttons[i] &= ~4;
-
+#ifdef WITH_X86
                                x86_mouse(0, v1, v2, v3, pc_mouse_buttons[i]);
+#endif
+#ifdef WITH_DRACO
                                draco_mouse(0, v1, v2, v3, pc_mouse_buttons[i]);
+#endif
                        }
 
 
@@ -3683,7 +3702,9 @@ uae_u16 JOY0DAT (void)
        readinput ();
        v = getjoystate (0);
        v = dongle_joydat (0, v);
+#ifdef ARCADIA
        v = alg_joydat(0, v);
+#endif
        return v;
 }
 
@@ -3693,7 +3714,9 @@ uae_u16 JOY1DAT (void)
        readinput ();
        v = getjoystate (1);
        v = dongle_joydat (1, v);
+#ifdef ARCADIA
        v = alg_joydat(1, v);
+#endif
        return v;
 }
 
@@ -4026,11 +4049,11 @@ static uae_u16 handle_joystick_potgor (uae_u16 potgor)
                        // normal second button pressed: always zero. Overrides CD32 mode.
                        if (getbuttonstate(i, JOYBUTTON_2))
                                potgor &= ~p9dat;
-
-               } else  if (alg_flag) {
+#ifdef ARCADIA
+               } else if (alg_flag) {
 
                        potgor = alg_potgor(potgo_value);
-
+#endif
                } else if (lightpen_enabled2 && lightpen_port_number() == i) {
 
                        int button;
@@ -4268,8 +4291,10 @@ int handle_custom_event (const TCHAR *custom, int append)
                        set_config_changed ();
                } else if (!_tcsnicmp(p, _T("shellexec "), 10)) {
                        uae_ShellExecute(p + 10);
+#ifdef DEBUGGER
                } else if (!_tcsnicmp(p, _T("dbg "), 4)) {
                        debug_parser(p + 4, NULL, -1);
+#endif
                } else if (!_tcsnicmp (p, _T("kbr "), 4)) {
                        inject_events (p + 4);
                } else if (!_tcsnicmp (p, _T("evt "), 4)) {
@@ -4394,6 +4419,7 @@ void inputdevice_hsync (bool forceread)
                        maybe_read_input();
                }
        }
+#ifdef WITH_DRACO
        if (draco_keybord_repeat_cnt > 0) {
                draco_keybord_repeat_cnt--;
                if (draco_keybord_repeat_cnt == 0) {
@@ -4405,6 +4431,7 @@ void inputdevice_hsync (bool forceread)
                        draco_keycode(draco_keybord_repeat_code, 1);
                }
        }
+#endif
 }
 
 static uae_u16 POTDAT (int joy)
@@ -5269,14 +5296,19 @@ static int handle_input_event2(int nr, int state, int max, int flags, int extra)
                isaks = true;
        }
 
+#ifdef DEBUGGER
        if (isaks) {
                if (debug_trainer_event(ie->data, state))
+               {
                        return 0;
+               }
        } else {
                if (debug_trainer_event(nr, state))
+               {
                        return 0;
+               }
        }
-
+#endif
        if (!isaks) {
                if (input_record && input_record != INPREC_RECORD_PLAYING)
                        inprec_recordevent (nr, state, max, autofire);
@@ -5839,8 +5871,12 @@ void inputdevice_reset (void)
        }
        lightpen_trigger2 = 0;
        cubo_flag = 0;
+#ifdef ARCADIA
        alg_flag &= 1;
+#endif
+#ifdef WITH_DRACO
        draco_keybord_repeat_cnt = 0;
+#endif
 }
 
 static int getoldport (struct uae_input_device *id)
@@ -7683,9 +7719,11 @@ static void compatibility_copy (struct uae_prefs *prefs, bool gameports)
                        }
                }
        }
+#ifdef ARCADIA
        if (arcadia_bios) {
                setcompakb(prefs, keyboard_default_kbmaps[KBR_DEFAULT_MAP_ARCADIA], ip_arcadia, 0, 0);
        }
+#endif
        if (0 && currprefs.cs_cdtvcd) {
                setcompakb(prefs, keyboard_default_kbmaps[KBR_DEFAULT_MAP_CDTV], ip_mediacdtv, 0, 0);
        }
@@ -10492,6 +10530,7 @@ void clear_inputstate (void)
 
 void inputdevice_draco_key(int kc)
 {
+#ifdef WITH_DRACO
        int state = (kc & 1) == 0;
        kc >>= 1;
        for (int i = 1; events[i].name; i++) {
@@ -10513,4 +10552,5 @@ void inputdevice_draco_key(int kc)
                        }
                }
        }
+#endif
 }
index 117fc79bfc9654f0c586e4e55217498a4550fda6..383e6259f676a05d19758747dc00ef73d02ced9a 100644 (file)
@@ -55,7 +55,9 @@ static uae_u32 cycleoffset;
 
 static uae_u32 pcs[16];
 static uae_u64 pcs2[16];
+#ifdef DEBUGGER
 extern void activate_debugger (void);
+#endif
 static int warned;
 
 static void setlasthsync (void)
index 456bcbe910e6376a646f759508db8d81f97b9d52..7a00032e4b7c218d5d4dc28ca526212ff37be80c 100644 (file)
@@ -294,7 +294,7 @@ int record_key_direct(int kc, bool direct)
 {
        int kpb_next = kpb_first + 1;
        int kcd = (kc << 7) | (kc >> 1);
-
+#ifdef WITH_DRACO
        if (currprefs.cs_compatible == CP_DRACO) {
                if (currprefs.cpuboard_settings & 0x10) {
                        inputdevice_draco_key(kc);
@@ -303,7 +303,7 @@ int record_key_direct(int kc, bool direct)
                        return 1;
                }
        }
-
+#endif
        if (!direct) {
                if (key_swap_hack2) {
                        // $0D <> $0C
index c58a44a807873b1df40589fcffe2b88dc8735a1c..71256c296569f65cb22fa1306dfec93b4e435f74 100644 (file)
@@ -8,8 +8,9 @@
 
 #include "sysconfig.h"
 #include "sysdeps.h"
-
+#ifdef WITH_LUA
 #include <lualib.h>
+#endif
 
 #include "options.h"
 #include "savestate.h"
index b434935564cbeb3cce2b26b49745cbdc0931b59a..bc730f73955bf31d0d1ee855c0634084a62f5e7b 100644 (file)
--- a/main.cpp
+++ b/main.cpp
 #include "blkdev.h"
 #include "consolehook.h"
 #include "gfxboard.h"
+#ifdef WITH_LUA
 #include "luascript.h"
+#endif
 #include "uaenative.h"
 #include "tabletlibrary.h"
 #include "cpuboard.h"
+#ifdef WITH_PPC
 #include "uae/ppc.h"
+#endif
 #include "devices.h"
 #ifdef JIT
 #include "jit/compemu.h"
@@ -283,6 +287,7 @@ void fixup_cpu (struct uae_prefs *p)
                error_log(_T("Threaded CPU mode is not compatible with PPC emulation, More compatible or Cycle Exact modes. CPU type must be 68020 or higher."));
        }
 
+#ifdef WITH_PPC
        // 1 = "automatic" PPC config
        if (p->ppc_mode == 1) {
                cpuboard_setboard(p,  BOARD_CYBERSTORM, BOARD_CYBERSTORM_SUB_PPC);
@@ -296,6 +301,7 @@ void fixup_cpu (struct uae_prefs *p)
                if (p->cpuboardmem1.size < 8 * 1024 * 1024)
                        p->cpuboardmem1.size = 8 * 1024 * 1024;
        }
+#endif
 
        if (p->cachesize_inhibit) {
                p->cachesize = 0;
@@ -1229,7 +1235,9 @@ static int real_main2 (int argc, TCHAR **argv)
        /* force sound settings change */
        currprefs.produce_sound = 0;
 
+#ifdef SAVESTATE
        savestate_init ();
+#endif
        keybuf_init (); /* Must come after init_joystick */
 
 #ifdef DEBUGGER
index 988845a911a7da66d6b0e60d4ac612a0b7b20231..f1b20b7c882839c9205675e66acc6b53f2f88f23 100644 (file)
@@ -6,7 +6,9 @@
 #define LSB_FIRST
 
 extern void write_log(const char *, ...);
+#ifdef DEBUGGER
 extern void activate_debugger(void);
+#endif
 
 #define MIN(a, b) ((a) > (b) ? (a) : (b))
 
@@ -44,7 +46,9 @@ inline UINT64 mulu_32x32(UINT32 a, UINT32 b)
        return (UINT64)a * (UINT64)b;
 }
 
+#ifndef NULL
 #define NULL 0
+#endif
 
 class direct_read_data
 {
index c6e96088bf29414bd0310b8912ce0d22a0e18b2b..073e263b4794e2001e604b9f538d04e70fdefc7f 100644 (file)
 #include "gui.h"
 #include "cdtv.h"
 #include "akiko.h"
+#ifdef ARCADIA
 #include "arcadia.h"
+#endif
+#ifdef ENFORCER
 #include "enforcer.h"
+#endif
 #include "threaddep/thread.h"
 #include "gayle.h"
 #include "debug.h"
 #include "debugmem.h"
 #include "gfxboard.h"
 #include "cpuboard.h"
+#ifdef WITH_PPC
 #include "uae/ppc.h"
+#endif
 #include "devices.h"
 #include "inputdevice.h"
+#ifdef WITH_DRACO
 #include "draco.h"
+#endif
 
 bool canbang;
 uaecptr highest_ram;
@@ -1408,7 +1416,9 @@ uae_u8 *REGPARAM2 default_xlate (uaecptr addr)
                                        }
                                        write_log (_T("\n"));
                                }
+#ifdef DEBUGGER
                                memory_map_dump();
+#endif
                        }
                        if (0 || (gary_toenb && (gary_nonrange(addr) || (size > 1 && gary_nonrange(addr + size - 1))))) {
                                hardware_exception2(addr, 0, true, true, size);
@@ -1785,10 +1795,12 @@ static bool load_extendedkickstart (const TCHAR *romextfile, int type)
 
        if (romextfile[0] == '\0')
                return false;
+#ifdef ARCADIA
        if (is_arcadia_rom (romextfile) == ARCADIA_BIOS) {
                extendedkickmem_type = EXTENDED_ROM_ARCADIA;
                return false;
        }
+#endif
        f = read_rom_name (romextfile, false);
        if (!f) {
                notify_user (NUMSG_NOEXTROM);
@@ -1797,11 +1809,13 @@ static bool load_extendedkickstart (const TCHAR *romextfile, int type)
        zfile_fseek (f, 0, SEEK_END);
        size = zfile_ftell32(f);
        extendedkickmem_bank.reserved_size = ROM_SIZE_512;
+#ifdef ARCADIA
        struct romdata *rd = get_alg_rom(romextfile);
        if (rd) {
                size = rd->size;
                type = EXTENDED_ROM_ALG;
        }
+#endif
        off = 0;
        if (type == 0) {
                if (currprefs.cs_cd32cd) {
@@ -2688,7 +2702,9 @@ static void allocate_memory (void)
                if (a3000hmem_bank.allocated_size > 0)
                        restore_ram (a3000hmem_filepos, a3000hmem_bank.baseaddr);
        } else {
+#ifdef ARCADIA
                alg_flag = 0;
+#endif
        }
 #ifdef AGA
        chipmem_bank_ce2.baseaddr = chipmem_bank.baseaddr;
@@ -2811,7 +2827,7 @@ void map_overlay (int chip)
 
        if (chip < 0)
                chip = overlay_state;
-
+#ifdef WITH_DRACO
        if (currprefs.cs_compatible == CP_CASABLANCA) {
                casablanca_map_overlay();
                return;
@@ -2819,7 +2835,7 @@ void map_overlay (int chip)
                draco_map_overlay();
                return;
        }
-
+#endif
        size = chipmem_bank.allocated_size >= 0x180000 ? (chipmem_bank.allocated_size >> 16) : 32;
        if (bogomem_aliasing)
                size = 8;
@@ -3263,8 +3279,10 @@ void memory_reset (void)
                break;
 #endif
        case EXTENDED_ROM_ALG:
+#ifdef ARCADIA
                map_banks_set(&extendedkickmem_bank, 0xF0, 4, 0);
                alg_map_banks();
+#endif
                break;
        }
 
index a90bce2d64dfca568d287d8a729732920b881d67..e8be15bfaab4eaad47a62f76879b0913293bd0a0 100644 (file)
 #include "cpuboard.h"
 #include "flashrom.h"
 #include "autoconf.h"
+#ifdef WITH_QEMU_CPU
 #include "qemuvga/qemuuaeglue.h"
 #include "qemuvga/queue.h"
 #include "qemuvga/scsi/scsi.h"
 #include "qemuvga/scsi/esp.h"
+#endif
 #include "gui.h"
 #include "devices.h"
 
index f6835134f9321c72186e0ac2f1b9482c802dfda4..a7335efe7f6caf3153c6b295019d0ca468df713a 100644 (file)
 #include "zfile.h"
 #include "blkdev.h"
 #include "cpuboard.h"
+#ifdef WITH_QEMU_CPU
 #include "qemuvga/qemuuaeglue.h"
 #include "qemuvga/queue.h"
 #include "qemuvga/scsi/scsi.h"
+#endif
 #include "autoconf.h"
 #include "gui.h"
 #include "devices.h"
@@ -1076,6 +1078,7 @@ bool ncr710_magnum40_autoconfig_init(struct autoconfig_info *aci)
 
 bool ncr710_draco_init(struct autoconfig_info *aci)
 {
+#ifdef WITH_DRACO
        device_add_reset(ncr_reset);
        if (!aci->doinit) {
                return true;
@@ -1094,6 +1097,9 @@ bool ncr710_draco_init(struct autoconfig_info *aci)
 
        aci->addrbank = &ncr_bank_generic;
        return true;
+#else
+       return false;
+#endif
 }
 
 
@@ -1250,10 +1256,12 @@ extern void draco_set_scsi_irq(int, int);
 
 void draco_add_scsi_unit(int ch, struct uaedev_config_info *ci, struct romconfig *rc)
 {
+#ifdef WITH_DRACO
        ncr_add_scsi_unit(&ncr_cpuboard, ch, ci, rc, false);
        ncr_cpuboard->irq_func = draco_set_scsi_irq;
        ncr_cpuboard->irqlevel = true;
        ncr_cpuboard->bank = &ncr_bank_generic;
+#endif
 }
 
 #endif
index 3f7286f3cf6b1f0616eb7dacaeb72e5bc05845d4..3646ea2ca197bb7c5e5a00989cf4194feca45a61 100644 (file)
 #include "audio.h"
 #include "fpp.h"
 #include "statusline.h"
+#ifdef WITH_PPC
 #include "uae/ppc.h"
+#endif
 #include "cpuboard.h"
 #include "threaddep/thread.h"
+#ifdef WITH_X86
 #include "x86.h"
+#endif
 #include "bsdsocket.h"
 #include "devices.h"
+#ifdef WITH_DRACO
 #include "draco.h"
+#endif
 #ifdef JIT
 #include "jit/compemu.h"
 #include <signal.h>
@@ -2777,8 +2783,10 @@ static void Exception_ce000 (int nr)
                        cpu_halt (CPU_HALT_DOUBLE_FAULT);
                        return;
                }
+#ifdef DEBUGGER
                write_log(_T("Exception %d (%08x %x) at %x -> %x!\n"),
                        nr, last_op_for_exception_3, last_addr_for_exception_3, currpc, get_long_debug(4 * nr));
+#endif
                if (currprefs.cpu_model == 68000) {
                        // 68000 bus/address error
                        uae_u16 mode = (sv ? 4 : 0) | last_fc_for_exception_3;
@@ -3030,7 +3038,9 @@ static void Exception_mmu (int nr, uaecptr oldpc)
                        Exception_build_stack_frame(regs.mmu_fault_addr, currpc, regs.mmu_fslw, vector_nr, 0x4);
        } else if (nr == 3) { // address error
         Exception_build_stack_frame(last_fault_for_exception_3, currpc, 0, vector_nr, 0x2);
+#ifdef DEBUGGER
                write_log (_T("Exception %d (%x) at %x -> %x!\n"), nr, last_fault_for_exception_3, currpc, get_long_debug (regs.vbr + 4 * nr));
+#endif
        } else if (regs.m && interrupt) { /* M + Interrupt */
                Exception_build_stack_frame(oldpc, currpc, regs.mmu_ssw, vector_nr, 0x0);
                MakeSR();
@@ -3293,7 +3303,9 @@ static void Exception_normal (int nr)
                                Exception_build_stack_frame(oldpc, currpc, ssw, vector_nr, 0x08);
                                used_exception_build_stack_frame = true;
                        }
+#ifdef DEBUGGER
                        write_log (_T("Exception %d (%x) at %x -> %x!\n"), nr, regs.instruction_pc, currpc, get_long_debug (regs.vbr + 4 * vector_nr));
+#endif
                } else if (regs.m && interrupt) { /* M + Interrupt */
                        m68k_areg (regs, 7) -= 2;
                        x_put_word (m68k_areg (regs, 7), vector_nr * 4);
@@ -3322,7 +3334,9 @@ static void Exception_normal (int nr)
                        mode |= last_notinstruction_for_exception_3 ? 8 : 0;
                        exception_in_exception = -1;
                        Exception_build_68000_address_error_stack_frame(mode, last_op_for_exception_3, last_fault_for_exception_3, last_addr_for_exception_3);
+#ifdef DEBUGGER
                        write_log (_T("Exception %d (%x) at %x -> %x!\n"), nr, last_fault_for_exception_3, currpc, get_long_debug (regs.vbr + 4 * vector_nr));
+#endif
                        goto kludge_me_do;
                }
        }
@@ -3735,13 +3749,17 @@ static void cpu_do_fallback(void)
                memcpy(&regs, &fallback_regs, sizeof(regs));
                restore_banks();
                memory_restore();
+#ifdef DEBUGGER
                memory_map_dump();
+#endif
                m68k_setpc(fallback_regs.pc);
        } else {
                // 68000/010/EC020
                memory_restore();
                expansion_cpu_fallback();
+#ifdef DEBUGGER
                memory_map_dump();
+#endif
        }
 }
 
@@ -3834,7 +3852,9 @@ uae_u32 REGPARAM2 op_illg (uae_u32 opcode)
                        Exception(8);
                } else {
                        if (warned < 20) {
+#ifdef DEBUGGER
                                write_log(_T("B-Trap %04X at %08X -> %08X\n"), opcode, pc, get_long_debug(regs.vbr + 0x2c));
+#endif
                                warned++;
                        }
                        Exception(0xB);
@@ -3844,7 +3864,9 @@ uae_u32 REGPARAM2 op_illg (uae_u32 opcode)
        }
        if ((opcode & 0xF000) == 0xA000) {
                if (warned < 20) {
+#ifdef DEBUGGER
                        write_log(_T("A-Trap %04X at %08X -> %08X\n"), opcode, pc, get_long_debug(regs.vbr + 0x28));
+#endif
                        warned++;
                }
                Exception (0xA);
@@ -3852,7 +3874,9 @@ uae_u32 REGPARAM2 op_illg (uae_u32 opcode)
                return 4;
        }
        if (warned < 20) {
+#ifdef DEBUGGER
                write_log (_T("Illegal instruction: %04x at %08X -> %08X\n"), opcode, pc, get_long_debug(regs.vbr + 0x10));
+#endif
                warned++;
                //activate_debugger_new();
        }
@@ -4223,13 +4247,17 @@ static void int_request_do(bool i6)
 {
        if (i6) {
                if (currprefs.cs_compatible == CP_DRACO || currprefs.cs_compatible == CP_CASABLANCA) {
+#ifdef WITH_DRACO
                        draco_ext_interrupt(true);
+#endif
                } else {
                        INTREQ_f(0x8000 | 0x2000);
                }
        } else {
                if (currprefs.cs_compatible == CP_DRACO || currprefs.cs_compatible == CP_CASABLANCA) {
+#ifdef WITH_DRACO
                        draco_ext_interrupt(false);
+#endif
                } else {
                        INTREQ_f(0x8000 | 0x0008);
                }
@@ -4295,7 +4323,9 @@ void safe_interrupt_set(int num, int id, bool i6)
                atomic_or(&uae_interrupt, 1);
        } else {
                if (currprefs.cs_compatible == CP_DRACO || currprefs.cs_compatible == CP_CASABLANCA) {
+#ifdef WITH_DRACO
                        draco_ext_interrupt(i6);
+#endif
                } else {
                        int inum = i6 ? 13 : 3;
                        uae_u16 v = 1 << inum;
@@ -6586,7 +6616,9 @@ void m68k_go (int may_quit)
                        /* We may have been restoring state, but we're done now.  */
                        if (isrestore ()) {
                                restored = savestate_restore_finish ();
+#ifdef DEBUGGER
                                memory_map_dump ();
+#endif
                                if (currprefs.mmu_model == 68030) {
                                        mmu030_decode_tc (tc_030, true);
                                } else if (currprefs.mmu_model >= 68040) {
index 3bbf51cf4297cb51c45843620a198a9a7aaeea65..32889276cb878d767a5e5277bcd79c93a54f47d6 100644 (file)
@@ -48,6 +48,7 @@
 #define WINDDK /* Windows DDK available, keyboard leds and harddrive support */
 #define CATWEASEL /* Catweasel MK2/3 support */
 #define AHI /* AHI sound emulation */
+//#define AHI_v2 // AHI v2 was never completed on the Amiga-side
 #define ENFORCER /* UAE Enforcer */
 #define ECS_DENISE /* ECS DENISE new features */
 #define AGA /* AGA chipset emulation (ECS_DENISE must be enabled) */
 #define WITH_MIDIEMU
 #define WITH_DSP
 #define WITH_DRACO
-
+#define WITH_MIDI
 
 #else
 
 #define WITH_SCSI_IOCTL
 #define WITH_SCSI_SPTI
 
+// Sound boards support
+#define WITH_SNDBOARD
+
+// CPU accelerator board support
+#define WITH_CPUBOARD
+
+// Special Monitors support
+#define WITH_SPECIALMONITORS
+
+//#define VIDEOGRAB 1
+
+// Beam racing support
+//#define WITH_BEAMRACER
+
 #define A_ZIP
 #define A_RAR
 #define A_7Z
@@ -345,7 +360,13 @@ typedef long uae_atomic;
 #define isnan _isnan
 
 #ifndef LT_MODULE_EXT
+#ifdef _WIN32
 #define LT_MODULE_EXT _T(".dll")
+#elif __MACH__
+#define LT_MODULE_EXT _T(".dylib")
+#else
+#define LT_MODULE_EXT _T(".so")
+#endif
 #endif
 
 /* Define if you have the bcopy function.  */
index f9db91e6f0ec8e9e5212df3728d24e17f809d312..def58a0dcd9d1209b22870d9fa8e45d97bdbdc3b 100644 (file)
@@ -197,7 +197,9 @@ static void kbc_at_dev_queue_add(void *d, uint8_t val, int state)
     if (keyboard_mode == 3) {
         //val = draco_kbc_translate(val);
     }
+#ifdef WITH_DRACO
     draco_kdb_queue_add(d, val, state);
+#endif
 }
 
 
index 866c1d9763f3b0010e623c94d1e6f21320b9b863..bfef9645929245c4898129e8b2491d2c135f6d9e 100644 (file)
@@ -16,6 +16,9 @@
 
 #ifdef _WIN32
 #include <windows.h>
+#endif
+
+#ifdef WITH_MIDI
 #include "midi.h"
 #endif
 
@@ -91,8 +94,9 @@ void pclog(char const *format, ...)
        write_log("%s", buf);
        va_end(parms);
 }
-
+#ifdef DEBUGGER
 extern void activate_debugger(void);
+#endif
 void fatal(char const *format, ...)
 {
        va_list parms;
@@ -101,7 +105,9 @@ void fatal(char const *format, ...)
        vsprintf(buf, format, parms);
        write_log("PCEMFATAL: %s", buf);
        va_end(parms);
+#ifdef DEBUGGER
        activate_debugger();
+#endif
 }
 
 void video_updatetiming(void)
@@ -349,16 +355,20 @@ static int midi_open;
 
 void midi_write(uint8_t v)
 {
+#ifdef WITH_MIDI
        if (!midi_open) {
                midi_open = Midi_Open();
        }
        Midi_Parse(midi_output, &v);
+#endif
 }
 
 void pcem_close(void)
 {
+#ifdef WITH_MIDI
        if (midi_open)
                Midi_Close();
+#endif
        midi_open = 0;
 }
 
index b2d405df9767176df12fa75e4eed6260bac2aaed..3e8884453860986f0500bb358c7e613bc96af344 100644 (file)
@@ -15,7 +15,9 @@
 #include "vid_svga_render.h"
 #include "vid_sdac_ramdac.h"
 
+#ifdef DEBUGGER
 extern void activate_debugger(void);
+#endif
 
 enum
 {
index f6b32adc70571007cdf637a4c306de624661fd47..cd80073134cae7f7890ffccbbb5d45dd47f8c015 100644 (file)
@@ -79,7 +79,9 @@ Not emulated and Someone Else's Problem:
 #define REG_FBSOURCEDELTA              0x0d88
 #define REG_CONFIG                             0x0d90
 
+#ifdef DEBUGGER
 extern void activate_debugger(void);
+#endif
 
 typedef struct permedia2_t
 {
index 7868bd6ca70a00ebc6625fcca57e34f67b562cf6..5895726ce67386e0fda12d167fcc858f8b17251a 100644 (file)
@@ -1085,7 +1085,9 @@ void *voodoo_card_init()
                 ai88[c].b = c & 0xff;
         }
 #ifndef NO_CODEGEN
+#if (defined WIN32 || defined WIN64)
         voodoo_codegen_init(voodoo);
+#endif
 #endif
 
         voodoo->disp_buffer = 0;
@@ -1203,7 +1205,9 @@ void *voodoo_2d3d_card_init(int type)
                 ai88[c].b = c & 0xff;
         }
 #ifndef NO_CODEGEN
+#if (defined WIN32 || defined WIN64)
         voodoo_codegen_init(voodoo);
+#endif
 #endif
 
         voodoo->disp_buffer = 0;
@@ -1318,7 +1322,9 @@ void voodoo_card_close(voodoo_t *voodoo)
                 free(voodoo->texture_cache[0][c].data);
         }
 #ifndef NO_CODEGEN
+#if (defined WIN32 || defined WIN64)
         voodoo_codegen_close(voodoo);
+#endif
 #endif
         if (voodoo->type < VOODOO_BANSHEE && voodoo->fb_mem)
         {
index 9a5118d1d8cfae1d95d2acf3b2e13d32ca333ff9..67eba7caeafd403b8cacb999aa87ed95cdfa6952 100644 (file)
@@ -1,5 +1,6 @@
-
+#ifdef _WIN32
 #include <intrin.h>
+#endif
 
 #include <math.h>
 #include <stddef.h>
@@ -647,7 +648,7 @@ static inline void voodoo_tmu_fetch_and_blend(voodoo_t *voodoo, voodoo_params_t
 
 #if (defined i386 || defined __i386 || defined __i386__ || defined _X86_ || defined WIN32 || defined _WIN32 || defined _WIN32) && !(defined __amd64__)
 #include "vid_voodoo_codegen_x86.h"
-#elif (defined __amd64__)
+#elif (defined __amd64__ && defined WIN64)
 #include "vid_voodoo_codegen_x86-64.h"
 #else
 int voodoo_recomp = 0;
@@ -777,9 +778,11 @@ static void voodoo_half_triangle(voodoo_t *voodoo, voodoo_params_t *params, vood
         }
 #ifndef NO_CODEGEN
         typedef uint8_t(__cdecl *VOODOO_DRAW)(voodoo_state_t*,voodoo_params_t*, int,int);
+#if (defined WIN32 || defined WIN64)
         if (voodoo->use_recompiler)
                 voodoo_draw = (VOODOO_DRAW)voodoo_get_block(voodoo, params, state, odd_even);
         else
+#endif
                 voodoo_draw = NULL;
 #endif
 
index 8f5fe421cad52027942ca4810d5bbe20ff293d09..1b5df8f6c743ffeff77bf01b8462e34b5a7574c6 100644 (file)
@@ -32,7 +32,7 @@
 
 #define TRACE(format, ...) write_log(_T("PPC: ") format, ## __VA_ARGS__)
 
-#ifdef WINUAE
+#ifdef WIN32
 #define WIN32_SPINLOCK
 #endif
 
@@ -401,7 +401,9 @@ static void map_banks(void)
 
        PPCMemoryRegion regions[UAE_MEMORY_REGIONS_MAX];
        UaeMemoryMap map;
+#ifdef DEBUGGER
        uae_memory_map(&map);
+#endif
 
        for (int i = 0; i < map.num_regions; i++) {
                UaeMemoryRegion *r = &map.regions[i];
index 4f99464edb68306f09ad5be5519fb34e40669790..a00331b53d02f380d6e8bfd34d818cc15f438f61 100644 (file)
@@ -2,7 +2,9 @@
 #include "sysdeps.h"
 
 #include "uae/dlopen.h"
+#ifdef WITH_PPC
 #include "uae/ppc.h"
+#endif
 #include "uae/qemu.h"
 
 UAE_DEFINE_IMPORT_FUNCTION(qemu_uae_version)
@@ -17,6 +19,7 @@ UAE_DEFINE_IMPORT_FUNCTION(qemu_uae_ppc_in_cpu_thread)
 
 static void init_ppc(UAE_DLHANDLE handle)
 {
+#ifdef WITH_PPC
        UAE_IMPORT_FUNCTION(handle, qemu_uae_ppc_init);
        UAE_IMPORT_FUNCTION(handle, qemu_uae_ppc_in_cpu_thread);
 
@@ -28,6 +31,7 @@ static void init_ppc(UAE_DLHANDLE handle)
                qemu_uae_ppc_init(model_s, hid1);
                free(model_s);
        }
+#endif
 }
 
 #ifdef WITH_QEMU_SLIRP
index 2e88f19053123aae532166097cac3e95f0ded8c9..7c32f14b86b675593c2ae2207a81706991eae637 100644 (file)
@@ -3,8 +3,11 @@
 #include <stdint.h>
 #include <stdio.h>
 #include <string.h>
+#include "sysconfig.h"
 
+#ifdef DEBUGGER
 extern void activate_debugger(void);
+#endif
 
 //#define DEBUG_VGA_REG
 //#define DEBUG_VGA
index 707f6850d10152276f65924023e1963ac6258873..57649eb140807747fead01c57f699d0c1d082f2f 100644 (file)
@@ -2432,11 +2432,13 @@ int configure_rom (struct uae_prefs *p, const int *rom, int msg)
                _stprintf(p->flashfile + _tcslen(p->flashfile), _T("%s.nvr"), rd->name);
                clean_path(p->flashfile);
        }
+#ifdef ARCADIA
        if (rd->type & ROMTYPE_ALG) {
                fetch_videopath(p->genlock_video_file, sizeof(p->genlock_video_file) / sizeof(TCHAR));
                _stprintf(p->genlock_video_file + _tcslen(p->genlock_video_file), _T("%s.avi"), rd->name);
                clean_path(p->genlock_video_file);
        }
+#endif
        return 1;
 }
 
index abfe4a9119dabfded4717e8b5857a19057a4dea4..99376cbd3703d300fdf51844262f9d35a724daf0 100644 (file)
@@ -1148,9 +1148,11 @@ static int save_state_internal (struct zfile *f, const TCHAR *description, int c
        save_chunk (f, dst, len, _T("CD32"), 0);
        xfree (dst);
 #endif
+#ifdef ARCADIA
        dst = save_alg(&len);
        save_chunk(f, dst, len, _T("ALG "), 0);
        xfree(dst);
+#endif
 #ifdef CDTV
        dst = save_cdtv (&len, NULL);
        save_chunk (f, dst, len, _T("CDTV"), 0);
diff --git a/scp.cpp b/scp.cpp
index c7d7e2ef3c57fd5469193b81ea1e2eebfb438ae4..1df8d444c102ba1c6b924df533021500fc175443 100644 (file)
--- a/scp.cpp
+++ b/scp.cpp
 #include "uae/endian.h"
 
 #include <stdint.h>
+#if defined __MACH__
+#include <machine/endian.h>
+#include <libkern/OSByteOrder.h>
+#define htobe16(x) OSSwapHostToBigInt16(x)
+#define htole16(x) OSSwapHostToLittleInt16(x)
+#define be16toh(x) OSSwapBigToHostInt16(x)
+#define le16toh(x) OSSwapLittleToHostInt16(x)
+#define htobe32(x) OSSwapHostToBigInt32(x)
+#define htole32(x) OSSwapHostToLittleInt32(x)
+#define be32toh(x) OSSwapBigToHostInt32(x)
+#define le32toh(x) OSSwapLittleToHostInt32(x)
+#define htobe64(x) OSSwapHostToBigInt64(x)
+#define htole64(x) OSSwapHostToLittleInt64(x)
+#define be64toh(x) OSSwapBigToHostInt64(x)
+#define le64toh(x) OSSwapLittleToHostInt64(x)
+#endif
 
 #define MAX_REVS 5
 
index a6af8b18fc4ebc527b1b22a6d4d493b3a5c4953c..e2d1cca80b211dae11f7990829b91b521322f99c 100644 (file)
@@ -17,7 +17,9 @@
 #include "zfile.h"
 #include "memory.h"
 #include "threaddep/thread.h"
+#ifdef A2091
 #include "a2091.h"
+#endif
 #include "fsdb.h"
 
 int log_tapeemu = 1;
index 2b66323cf99cf797f0e6ae935cb7ec7334a87dca..6dbd5e1e8c9ad8a57e10557be0754eb97b3dbe7b 100755 (executable)
 #include "specialmonitors.h"
 #include "debug.h"
 #include "zfile.h"
+#ifdef VIDEOGRAB
 #include "videograb.h"
+#endif
 #include "arcadia.h"
 
-#define VIDEOGRAB 1
+// We have this in sysconfig.h
+//#define VIDEOGRAB 1
 
 const TCHAR *specialmonitorfriendlynames[] =
 {
@@ -2379,7 +2382,7 @@ static bool do_genlock(struct vidbuffer *src, struct vidbuffer *dst, bool double
 
        uae_u8 *genlock_image = NULL;
 
-#if VIDEOGRAB
+#ifdef VIDEOGRAB
        if (currprefs.genlock_image == 5) {
                genlock_blank = false;
                if ((!genlock_video && !genlock_error) || _tcsicmp(_T(":CAPTURE:"), genlock_video_file)) {
@@ -2479,7 +2482,7 @@ skip:
                xfree(genlock_image_data);
                genlock_image_data = NULL;
        }
-#if VIDEOGRAB
+#ifdef VIDEOGRAB
        if (genlock_video && currprefs.genlock_image != 4 && currprefs.genlock_image != 5 && currprefs.genlock_image < 6) {
                uninitvideograb();
                genlock_video = false;
@@ -3659,7 +3662,9 @@ void specialmonitor_reset(void)
 {
        if (!currprefs.monitoremu)
                return;
+#ifdef VIDEOGRAB
        uninitvideograb();
+#endif
        specialmonitor_store_fmode(-1, -1, 0);
        fc24_reset();
 }
index 7f5ae5bcc225af3815701fb8638e09a8fa60a28b..fe62cfa11d1f88cac0441e76983c8ce7b58caf29 100644 (file)
@@ -72,6 +72,16 @@ static int g_max_handle = -1;
 #ifndef OS_NAME
 #define OS_NAME _T("windows")
 #endif
+#else
+#ifdef __MACH__
+#ifndef OS_NAME
+#define OS_NAME _T("macos")
+#endif
+#else
+#ifndef OS_NAME
+#define OS_NAME _T("linux")
+#endif
+#endif
 #endif
 
 #if defined(__x86_64__) || defined(_M_AMD64) || defined(_M_X64)
@@ -80,6 +90,8 @@ static int g_max_handle = -1;
     #define ARCH_NAME _T("x86")
 #elif defined(__ppc__)
     #define ARCH_NAME _T("ppc")
+#elif defined(__arm__)
+       #define ARCH_NAME _T("arm")
 #else
     #define ARCH_NAME _T("unknown")
 #endif
diff --git a/vm.cpp b/vm.cpp
index a01feba93ddc4c4e902400242e3bd6100f805fb0..4eb52a00ee5e408a79341ad8f739c7f91a688b6f 100644 (file)
--- a/vm.cpp
+++ b/vm.cpp
@@ -24,7 +24,8 @@
 #include <sys/sysctl.h>
 #endif
 
-#if defined(LINUX) && defined(CPU_x86_64)
+//#if defined(LINUX) && defined(CPU_x86_64)
+#if defined(CPU_x86_64) && !defined(__APPLE__)
 #define HAVE_MAP_32BIT 1
 #endif
 
@@ -157,7 +158,7 @@ static void *uae_vm_alloc_with_flags(uae_u32 size, int flags, int protect)
        int mmap_prot = protect_to_native(protect);
 #endif
 
-#ifndef CPU_64_BIT
+#if !defined(CPU_64_BIT) or defined(__APPLE__)
        flags &= ~UAE_VM_32BIT;
 #endif
        if (flags & UAE_VM_32BIT) {
diff --git a/x86.cpp b/x86.cpp
index d92fd77f1fc0e690ed4fb63feb48bd9e1d81284d..357d076064cc5f5769458b47f25b9799e612aafb 100644 (file)
--- a/x86.cpp
+++ b/x86.cpp
@@ -29,6 +29,8 @@
 #include "sysconfig.h"
 #include "sysdeps.h"
 
+#ifdef WITH_X86
+
 #include "options.h"
 #include "custom.h"
 #include "memory.h"
@@ -4325,3 +4327,5 @@ void x86_initfloppy(X86_INTERRUPT_CALLBACK irq_callback)
        xb->irq_callback = irq_callback;
        floppy_hardreset();
 }
+
+#endif //WITH_X86
index c66c20691b4ce200b55896618534b843d4e7c92f..f1f968432462f1064e3c3a04139e70b06f602a1a 100644 (file)
--- a/zfile.cpp
+++ b/zfile.cpp
 #include "diskutil.h"
 #include "fdi2raw.h"
 #include "uae/io.h"
+// OS X does not have off64_t, fopen64, fseeko64 or ftello64, the functions are already 64bit
+#ifdef __MACH__
+#  define off64_t off_t
+#  define fopen64 fopen
+#  define fseeko64 fseeko
+#  define ftello64 ftello
+#endif
 
 #include "archivers/zip/unzip.h"
 #include "archivers/dms/pfile.h"
index 93d3251f9a6b51cd0626fa7f862610f579a5372a..f85c3a9915760347ea0dc8b7e8eba7392b438568 100644 (file)
@@ -529,7 +529,11 @@ static ISzAlloc allocTempImp;
 static SRes SzFileReadImp (void *object, void *buffer, size_t *size)
 {
        CFileInStream *s = (CFileInStream *)object;
+#ifdef _WIN32
        struct zfile *zf = (struct zfile*)s->file.myhandle;
+#else
+       struct zfile *zf = (struct zfile*)s->file.file;
+#endif
        *size = zfile_fread (buffer, 1, *size, zf);
        return SZ_OK;
 }
@@ -537,7 +541,11 @@ static SRes SzFileReadImp (void *object, void *buffer, size_t *size)
 static SRes SzFileSeekImp(void *object, Int64 *pos, ESzSeek origin)
 {
        CFileInStream *s = (CFileInStream *)object;
+#ifdef _WIN32
        struct zfile *zf = (struct zfile*)s->file.myhandle;
+#else
+       struct zfile *zf =(struct zfile*) s->file.file;
+#endif
        int org = 0;
        switch (origin)
        {
@@ -598,7 +606,11 @@ struct zvolume *archive_directory_7z (struct zfile *z)
        ctx->blockIndex = 0xffffffff;
        ctx->archiveStream.s.Read = SzFileReadImp;
        ctx->archiveStream.s.Seek = SzFileSeekImp;
+#ifdef _WIN32
        ctx->archiveStream.file.myhandle = (void*)z;
+#else
+       ctx->archiveStream.file.file = (FILE*)z;
+#endif
        LookToRead_CreateVTable (&ctx->lookStream, False);
        ctx->lookStream.realStream = &ctx->archiveStream.s;
        LookToRead_Init (&ctx->lookStream);