From b471f16a0a4b47c37002b12d865b257ec63cc990 Mon Sep 17 00:00:00 2001 From: Lars Brinkhoff Date: Wed, 25 Nov 2020 09:12:08 +0100 Subject: [PATCH] IMLAC: Use sim_video stubs rather than #ifdefs. --- imlac/imlac_bel.c | 2 -- imlac/imlac_cpu.c | 4 ---- imlac/imlac_crt.c | 8 +++++++- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/imlac/imlac_bel.c b/imlac/imlac_bel.c index 370be45c..6b07ba5f 100644 --- a/imlac/imlac_bel.c +++ b/imlac/imlac_bel.c @@ -58,9 +58,7 @@ bel_iot (uint16 insn, uint16 AC) sim_debug (DBG, &bel_dev, "IOT\n"); if ((insn & 0771) == 0711) { /* BEL */ sim_debug (DBG, &bel_dev, "Dong!\n"); -#ifdef HAVE_LIBSDL vid_beep (); -#endif } return AC; } diff --git a/imlac/imlac_cpu.c b/imlac/imlac_cpu.c index 4b6823f8..3c5a3e63 100644 --- a/imlac/imlac_cpu.c +++ b/imlac/imlac_cpu.c @@ -25,9 +25,7 @@ */ #include "imlac_defs.h" -#ifdef HAVE_LIBSDL #include "display/display.h" -#endif /* Debug */ @@ -668,7 +666,6 @@ rom_show_type (FILE *st, UNIT *up, int32 v, CONST void *dp) return SCPE_OK; } -#ifdef HAVE_LIBSDL /* Called from display library to get data switches. */ void 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; } -#endif /* HAVE_LIBSDL */ diff --git a/imlac/imlac_crt.c b/imlac/imlac_crt.c index 6ecb2316..b3277f7d 100644 --- a/imlac/imlac_crt.c +++ b/imlac/imlac_crt.c @@ -47,12 +47,18 @@ static DEBTAB crt_deb[] = { { NULL, 0 } }; +#if defined(USE_SIM_VIDEO) && defined(HAVE_LIBSDL) +#define CRT_DIS 0 +#else +#define CRT_DIS DEV_DIS +#endif + DEVICE crt_dev = { "CRT", &crt_unit, NULL, NULL, 1, 8, 16, 1, 8, 16, NULL, NULL, &crt_reset, 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 };