IMLAC: Use sim_video stubs rather than #ifdefs.

This commit is contained in:
Lars Brinkhoff 2020-11-25 09:12:08 +01:00
parent 66a426c48e
commit b471f16a0a
3 changed files with 7 additions and 7 deletions

View file

@ -58,9 +58,7 @@ bel_iot (uint16 insn, uint16 AC)
sim_debug (DBG, &bel_dev, "IOT\n"); sim_debug (DBG, &bel_dev, "IOT\n");
if ((insn & 0771) == 0711) { /* BEL */ if ((insn & 0771) == 0711) { /* BEL */
sim_debug (DBG, &bel_dev, "Dong!\n"); sim_debug (DBG, &bel_dev, "Dong!\n");
#ifdef HAVE_LIBSDL
vid_beep (); vid_beep ();
#endif
} }
return AC; return AC;
} }

View file

@ -25,9 +25,7 @@
*/ */
#include "imlac_defs.h" #include "imlac_defs.h"
#ifdef HAVE_LIBSDL
#include "display/display.h" #include "display/display.h"
#endif
/* Debug */ /* Debug */
@ -668,7 +666,6 @@ rom_show_type (FILE *st, UNIT *up, int32 v, CONST void *dp)
return SCPE_OK; return SCPE_OK;
} }
#ifdef HAVE_LIBSDL
/* Called from display library to get data switches. */ /* Called from display library to get data switches. */
void void
cpu_get_switches (unsigned long *p1, unsigned long *p2) cpu_get_switches (unsigned long *p1, unsigned long *p2)
@ -683,4 +680,3 @@ cpu_set_switches (unsigned long p1, unsigned long p2)
{ {
DS = p1 & 0177777; DS = p1 & 0177777;
} }
#endif /* HAVE_LIBSDL */

View file

@ -47,12 +47,18 @@ static DEBTAB crt_deb[] = {
{ NULL, 0 } { NULL, 0 }
}; };
#if defined(USE_SIM_VIDEO) && defined(HAVE_LIBSDL)
#define CRT_DIS 0
#else
#define CRT_DIS DEV_DIS
#endif
DEVICE crt_dev = { DEVICE crt_dev = {
"CRT", &crt_unit, NULL, NULL, "CRT", &crt_unit, NULL, NULL,
1, 8, 16, 1, 8, 16, 1, 8, 16, 1, 8, 16,
NULL, NULL, &crt_reset, NULL, NULL, &crt_reset,
NULL, NULL, NULL, NULL, NULL, NULL,
NULL, DEV_DISABLE | DEV_DEBUG | DEV_DIS, 0, crt_deb, NULL, DEV_DISABLE | DEV_DEBUG | CRT_DIS, 0, crt_deb,
NULL, NULL, NULL, NULL, NULL, NULL NULL, NULL, NULL, NULL, NULL, NULL
}; };