--- hatari/src/debug/natfeats.c 2019/04/09 08:55:37 1.1.1.3 +++ hatari/src/debug/natfeats.c 2019/04/09 08:56:50 1.1.1.4 @@ -1,7 +1,7 @@ /* * Hatari - natfeats.c * - * Copyright (C) 2012-2014 by Eero Tamminen + * Copyright (C) 2012-2016 by Eero Tamminen * * This file is distributed under the GNU General Public License, version 2 * or at your option any later version. Read the file gpl.txt for details. @@ -20,7 +20,8 @@ const char Natfeats_fileid[] = "Hatari n #include "stMemory.h" #include "m68000.h" #include "natfeats.h" -#include "control.h" +#include "debugui.h" +#include "nf_scsidrv.h" #include "log.h" @@ -142,7 +143,7 @@ static bool nf_exit(Uint32 stack, Uint32 static bool nf_debugger(Uint32 stack, Uint32 subid, Uint32 *retval) { LOG_TRACE(TRACE_NATFEATS, "NF_DEBUGGER()\n"); - M68000_SetSpecial(SPCFLAG_DEBUGGER); + DebugUI(REASON_PROGRAM); return true; } @@ -206,6 +207,9 @@ static const struct { { "NF_EXIT", false, nf_exit }, { "NF_DEBUGGER", false, nf_debugger }, { "NF_FASTFORWARD", false, nf_fastforward } +#if defined(__linux__) + ,{ "NF_SCSIDRV", true, nf_scsidrv } +#endif }; /* macros from Aranym */ @@ -237,7 +241,7 @@ bool NatFeat_ID(Uint32 stack, Uint32 *re name = (const char *)STMemory_STAddrToPointer ( ptr ); LOG_TRACE(TRACE_NATFEATS, "NF ID(0x%x \"%s\")\n", ptr, name); - for (i = 0; i < ARRAYSIZE(features); i++) { + for (i = 0; i < ARRAY_SIZE(features); i++) { if (strcmp(features[i].name, name) == 0) { *retval = IDX2MASTERID(i); return true; @@ -261,7 +265,7 @@ bool NatFeat_Call(Uint32 stack, bool sup unsigned int idx = MASTERID2IDX(subid); subid = MASKOUTMASTERID(subid); - if (idx >= ARRAYSIZE(features)) { + if (idx >= ARRAY_SIZE(features)) { LOG_TRACE(TRACE_NATFEATS, "ERROR: invalid NF ID %d requested\n", idx); return true; /* undefined */ }