More cleanups, also updated Makefile.local with all "user-settable" parts.

This commit is contained in:
waltje
2017-10-19 21:08:34 -04:00
parent 1d60a99ea3
commit 0af26c1c3b
13 changed files with 102 additions and 90 deletions

View File

@@ -10,7 +10,7 @@
# settings, so we can avoid changing the main one for all of # settings, so we can avoid changing the main one for all of
# our local setups. # our local setups.
# #
# Version: @(#)Makefile.local 1.0.4 2017/10/14 # Version: @(#)Makefile.local 1.0.5 2017/10/19
# #
# Author: Fred N. van Kempen, <decwiz@yahoo.com> # Author: Fred N. van Kempen, <decwiz@yahoo.com>
# #
@@ -27,10 +27,56 @@ COPTIM := -O1
# Name of the executable. # Name of the executable.
PROG := yourexe PROG := yourexe
# Various compile-time options.
STUFF := #-DROM_TRACE=0xC800 -DIO_TRACE=0x70
EXTRAS := #-DYOURNAME
# Various compile-time options.
# -DROM_TRACE=0xc800 traces ROM access from segment C800
# -DIO_TRACE=0x66 traces I/O on port 0x66
STUFF :=
# Add feature selections here.
# -DANSI_CFG forces the config file to ANSI encoding.
# -DENABLE_VRAM_DUMP enables Video Ram dumping.
# -DENABLE_LOG_BREAKPOINT enables extra logging.
# -DENABLE_KEYBOARD_AMSTRAD_LOG=N sets logging level at N.
# -DENABLE_KEYBOARD_AT_LOG=N sets logging level at N.
# -DENABLE_KEYBOARD_LOG=N sets logging level at N.
# -DENABLE_PCI_LOG=N sets logging level at N.
# -DENABLE_CDROM_LOG=N sets logging level at N.
# -DENABLE_HDD_LOG=N sets logging level at N.
# -DENABLE_IDE_LOG=N sets logging level at N.
# -DENABLE_FDC_LOG=N sets logging level at N.
# -DENABLE_D86F_LOG=N sets logging level at N.
# -DENABLE_NIC_LOG=N sets logging level at N.
# -DENABLE_SCSI_BUS_LOG=N sets logging level at N.
# -DENABLE_SCSI_DISK_LOG=N sets logging level at N.
# -DENABLE_X54X_LOG=N sets logging level at N.
# -DENABLE_AHA154X_LOG=N sets logging level at N.
# -DENABLE_BUSLOGIC_LOG=N sets logging level at N.
# -DENABLE_NCR5380_LOG=N sets logging level at N.
# -DENABLE_AUDIOPCI_LOG=N sets logging level at N.
# -DENABLE_EMU8K_LOG=N sets logging level at N.
# -DENABLE_VRAM_DUMP=N sets logging level at N.
# -DENABLE_SERIAL_LOG=N sets logging level at N.
EXTRAS :=
AUTODEP := n
DEBUG := n
OPTIM := n
X64 := n
RELEASE := n
USB := n
VNC := n
RDP := n
DEV_BUILD := n
DEV_BRANCH := n
CIRRUS := n
NE1000 := n
NV_RIVA := n
FLUIDSYNTH := y
MUNT := y
PAS16 := n
DYNAREC := y
######################################################################### #########################################################################

View File

@@ -8,7 +8,7 @@
* *
* Handling of hard disk image files. * Handling of hard disk image files.
* *
* Version: @(#)hdd_image.c 1.0.5 2017/10/16 * Version: @(#)hdd_image.c 1.0.6 2017/10/19
* *
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/> * Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com> * Miran Grca, <mgrca8@gmail.com>
@@ -50,11 +50,13 @@ static char empty_sector[512];
static char *empty_sector_1mb; static char *empty_sector_1mb;
int hdd_image_do_log = 0; #ifdef ENABLE_HDD_LOG
int hdd_image_do_log = ENABLE_HDD_LOG;
#endif
void hdd_image_log(const char *format, ...) void hdd_image_log(const char *format, ...)
{ {
#ifdef ENABLE_HDD_IMAGE_LOG #ifdef ENABLE_HDD_LOG
if (hdd_image_do_log) if (hdd_image_do_log)
{ {
va_list ap; va_list ap;

View File

@@ -168,7 +168,9 @@ int floppyrate[4];
int floppyint; int floppyint;
int fdc_do_log = 0; #ifdef ENABLE_FDC_LOG
int fdc_do_log = ENABLE_FDC_LOG;
#endif
void fdc_log(const char *format, ...) void fdc_log(const char *format, ...)
{ {

View File

@@ -10,7 +10,7 @@
* data in the form of FM/MFM-encoded transitions) which also * data in the form of FM/MFM-encoded transitions) which also
* forms the core of the emulator's floppy disk emulation. * forms the core of the emulator's floppy disk emulation.
* *
* Version: @(#)floppy_86f.c 1.0.8 2017/10/16 * Version: @(#)floppy_86f.c 1.0.9 2017/10/19
* *
* Author: Miran Grca, <mgrca8@gmail.com> * Author: Miran Grca, <mgrca8@gmail.com>
* Copyright 2016,2017 Miran Grca. * Copyright 2016,2017 Miran Grca.
@@ -113,36 +113,24 @@ enum
static uint16_t CRCTable[256]; static uint16_t CRCTable[256];
#ifdef __MSC__
#pragma pack(push,1) #pragma pack(push,1)
typedef struct typedef struct
#else
typedef struct __attribute__((__packed__))
#endif
{ {
uint8_t buffer[10]; uint8_t buffer[10];
uint32_t pos; uint32_t pos;
uint32_t len; uint32_t len;
} sliding_buffer_t; } sliding_buffer_t;
#ifdef __MSC__
#pragma pack(pop) #pragma pack(pop)
#endif
#ifdef __MSC__
#pragma pack(push,1) #pragma pack(push,1)
typedef struct typedef struct
#else
typedef struct __attribute__((__packed__))
#endif
{ {
uint32_t sync_marks; uint32_t sync_marks;
uint32_t bits_obtained; uint32_t bits_obtained;
uint32_t bytes_obtained; uint32_t bytes_obtained;
uint32_t sync_pos; uint32_t sync_pos;
} find_t; } find_t;
#ifdef __MSC__
#pragma pack(pop) #pragma pack(pop)
#endif
uint8_t encoded_fm[64] = { 0xAA, 0xAB, 0xAE, 0xAF, 0xBA, 0xBB, 0xBE, 0xBF, 0xEA, 0xEB, 0xEE, 0xEF, 0xFA, 0xFB, 0xFE, 0xFF, uint8_t encoded_fm[64] = { 0xAA, 0xAB, 0xAE, 0xAF, 0xBA, 0xBB, 0xBE, 0xBF, 0xEA, 0xEB, 0xEE, 0xEF, 0xFA, 0xFB, 0xFE, 0xFF,
0xAA, 0xAB, 0xAE, 0xAF, 0xBA, 0xBB, 0xBE, 0xBF, 0xEA, 0xEB, 0xEE, 0xEF, 0xFA, 0xFB, 0xFE, 0xFF, 0xAA, 0xAB, 0xAE, 0xAF, 0xBA, 0xBB, 0xBE, 0xBF, 0xEA, 0xEB, 0xEE, 0xEF, 0xFA, 0xFB, 0xFE, 0xFF,
@@ -176,19 +164,13 @@ enum
FMT_POSTTRK_GAP4 FMT_POSTTRK_GAP4
}; };
#ifdef __MSC__
#pragma pack(push,1) #pragma pack(push,1)
typedef struct typedef struct
#else
typedef struct __attribute__((__packed__))
#endif
{ {
unsigned nibble0 :4; unsigned nibble0 :4;
unsigned nibble1 :4; unsigned nibble1 :4;
} split_byte_t; } split_byte_t;
#ifdef __MSC__
#pragma pack(pop) #pragma pack(pop)
#endif
typedef union { typedef union {
uint8_t byte; uint8_t byte;
@@ -206,12 +188,8 @@ typedef union {
Bits 10, 9 Zone type (3 = Commodore 64 zoned, 2 = Apple zoned, 1 = Pre-Apple zoned #2, 0 = Pre-Apple zoned #1) Bits 10, 9 Zone type (3 = Commodore 64 zoned, 2 = Apple zoned, 1 = Pre-Apple zoned #2, 0 = Pre-Apple zoned #1)
Bit 11 Data and surface bits are stored in reverse byte endianness */ Bit 11 Data and surface bits are stored in reverse byte endianness */
#ifdef __MSC__
#pragma pack(push,1) #pragma pack(push,1)
struct struct
#else
struct __attribute__((__packed__))
#endif
{ {
FILE *f; FILE *f;
uint16_t version; uint16_t version;
@@ -256,11 +234,11 @@ struct __attribute__((__packed__))
int turbo_pos; int turbo_pos;
uint16_t sector_id_bit_field[2][256][256][256]; uint16_t sector_id_bit_field[2][256][256][256];
} d86f[FDD_NUM]; } d86f[FDD_NUM];
#ifdef __MSC__
#pragma pack(pop) #pragma pack(pop)
#endif
int d86f_do_log = 0; #ifdef ENABLE_D86F_LOG
int d86f_do_log = ENABLE_D86F_LOG;
#endif
void d86f_log(const char *format, ...) void d86f_log(const char *format, ...)
{ {

View File

@@ -8,7 +8,7 @@
* *
* Intel 8042 (AT keyboard controller) emulation. * Intel 8042 (AT keyboard controller) emulation.
* *
* Version: @(#)keyboard_at.c 1.0.4 2017/10/16 * Version: @(#)keyboard_at.c 1.0.5 2017/10/19
* *
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/> * Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com> * Miran Grca, <mgrca8@gmail.com>
@@ -18,7 +18,9 @@
*/ */
#include <stdio.h> #include <stdio.h>
#include <stdint.h> #include <stdint.h>
#include <stdlib.h>
#include <string.h> #include <string.h>
#include <stdarg.h>
#include <wchar.h> #include <wchar.h>
#include "86box.h" #include "86box.h"
#include "ibm.h" #include "ibm.h"
@@ -129,7 +131,9 @@ static uint8_t nont_to_t[256] = { 0xFF, 0x43, 0x41, 0x3F, 0x3D, 0x3B, 0x3C, 0x58
0xE0, 0xE1, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7, 0xE8, 0xE9, 0xEA, 0xEB, 0xEC, 0xED, 0xEE, 0xEF, 0xE0, 0xE1, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7, 0xE8, 0xE9, 0xEA, 0xEB, 0xEC, 0xED, 0xEE, 0xEF,
0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7, 0xF8, 0xF9, 0xFA, 0xFB, 0xFC, 0xFD, 0xFE, 0xFF }; 0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7, 0xF8, 0xF9, 0xFA, 0xFB, 0xFC, 0xFD, 0xFE, 0xFF };
int keyboard_at_do_log = 0; #ifdef ENABLE_KEYBOARD_AT_LOG
int keyboard_at_do_log = ENABLE_KEYBOARD_AT_LOG;
#endif
void keyboard_at_log(const char *format, ...) void keyboard_at_log(const char *format, ...)
{ {

View File

@@ -12,7 +12,7 @@
* it should be malloc'ed and then linked to the NETCARD def. * it should be malloc'ed and then linked to the NETCARD def.
* Will be done later. * Will be done later.
* *
* Version: @(#)network.c 1.0.15 2017/10/16 * Version: @(#)network.c 1.0.16 2017/10/19
* *
* Author: Fred N. van Kempen, <decwiz@yahoo.com> * Author: Fred N. van Kempen, <decwiz@yahoo.com>
* *
@@ -54,9 +54,10 @@ int network_ndev;
int network_card; int network_card;
netdev_t network_devs[32]; netdev_t network_devs[32];
char network_pcap[512]; char network_pcap[512];
int nic_do_log; #ifdef ENABLE_NIC_LOG
static volatile int nic_do_log = ENABLE_NIC_LOG;
mutex_t *netMutex; #endif
static volatile mutex_t *netMutex;
static struct static struct
@@ -119,12 +120,6 @@ network_init(void)
{ {
int i; int i;
#if ENABLE_NIC_LOG
nic_do_log = ENABLE_NIC_LOG;
#else
nic_do_log = 0;
#endif
/* Initialize to a known state. */ /* Initialize to a known state. */
network_type = NET_TYPE_NONE; network_type = NET_TYPE_NONE;
network_card = 0; network_card = 0;

View File

@@ -10,7 +10,7 @@
* made by Adaptec, Inc. These controllers were designed for * made by Adaptec, Inc. These controllers were designed for
* the ISA bus. * the ISA bus.
* *
* Version: @(#)scsi_aha154x.c 1.0.30 2017/10/16 * Version: @(#)scsi_aha154x.c 1.0.31 2017/10/19
* *
* Authors: Fred N. van Kempen, <decwiz@yahoo.com> * Authors: Fred N. van Kempen, <decwiz@yahoo.com>
* Original Buslogic version by SA1988 and Miran Grca. * Original Buslogic version by SA1988 and Miran Grca.
@@ -87,7 +87,7 @@ int aha_do_log = ENABLE_AHA154X_LOG;
static void static void
aha_log(const char *fmt, ...) aha_log(const char *fmt, ...)
{ {
#if ENABLE_AHA154X_LOG #ifdef ENABLE_AHA154X_LOG
va_list ap; va_list ap;
if (aha_do_log) { if (aha_do_log) {

View File

@@ -6,7 +6,7 @@
* *
* Emulation of SCSI fixed and removable disks. * Emulation of SCSI fixed and removable disks.
* *
* Version: @(#)scsi_disk.c 1.0.17 2017/10/16 * Version: @(#)scsi_disk.c 1.0.18 2017/10/19
* *
* Author: Miran Grca, <mgrca8@gmail.com> * Author: Miran Grca, <mgrca8@gmail.com>
* *
@@ -447,13 +447,13 @@ uint8_t scsi_hd_mode_sense_pages_saved[HDD_NUM][0x40][0x40] =
[0x30] = { 0xB0, 0x16, '8', '6', 'B', 'o', 'x', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ' } } [0x30] = { 0xB0, 0x16, '8', '6', 'B', 'o', 'x', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ' } }
}; };
#ifdef ENABLE_SCSI_HD_LOG #ifdef ENABLE_SCSI_DISK_LOG
int scsi_hd_do_log = ENABLE_SCSI_HD_LOG; int scsi_hd_do_log = ENABLE_SCSI_DISK_LOG;
#endif #endif
void scsi_hd_log(const char *format, ...) void scsi_hd_log(const char *format, ...)
{ {
#ifdef ENABLE_SCSI_HD_LOG #ifdef ENABLE_SCSI_DISK_LOG
if (scsi_hd_do_log) if (scsi_hd_do_log)
{ {
va_list ap; va_list ap;

View File

@@ -9,7 +9,7 @@
* Implementation of the NCR 5380 series of SCSI Host Adapters * Implementation of the NCR 5380 series of SCSI Host Adapters
* made by NCR. These controllers were designed for the ISA bus. * made by NCR. These controllers were designed for the ISA bus.
* *
* Version: @(#)scsi_ncr5380.c 1.0.4 2017/10/16 * Version: @(#)scsi_ncr5380.c 1.0.5 2017/10/19
* *
* Authors: Sarah Walker, <tommowalker@tommowalker.co.uk> * Authors: Sarah Walker, <tommowalker@tommowalker.co.uk>
* TheCollector1995, <mariogplayer@gmail.com> * TheCollector1995, <mariogplayer@gmail.com>
@@ -37,9 +37,6 @@
#include "scsi_ncr5380.h" #include "scsi_ncr5380.h"
//#define ENABLE_NCR5380_LOG 1
#define LCS6821N_ROM L"roms/scsi/ncr5380/Longshine LCS-6821N - BIOS version 1.04.bin" #define LCS6821N_ROM L"roms/scsi/ncr5380/Longshine LCS-6821N - BIOS version 1.04.bin"
#define RT1000B_ROM L"roms/scsi/ncr5380/Rancho_RT1000_RTBios_version_8.10R.bin" #define RT1000B_ROM L"roms/scsi/ncr5380/Rancho_RT1000_RTBios_version_8.10R.bin"
#define T130B_ROM L"roms/scsi/ncr5380/trantor_t130b_bios_v2.14.bin" #define T130B_ROM L"roms/scsi/ncr5380/trantor_t130b_bios_v2.14.bin"
@@ -155,7 +152,7 @@ int ncr5380_do_log = ENABLE_NCR5380_LOG;
static void static void
ncr_log(const char *fmt, ...) ncr_log(const char *fmt, ...)
{ {
#if ENABLE_NCR5380_LOG #ifdef ENABLE_NCR5380_LOG
va_list ap; va_list ap;
if (ncr5380_do_log) { if (ncr5380_do_log) {

View File

@@ -11,7 +11,7 @@
* series of SCSI Host Adapters made by Mylex. * series of SCSI Host Adapters made by Mylex.
* These controllers were designed for various buses. * These controllers were designed for various buses.
* *
* Version: @(#)scsi_x54x.c 1.0.2 2017/10/16 * Version: @(#)scsi_x54x.c 1.0.3 2017/10/19
* *
* Authors: TheCollector1995, <mariogplayer@gmail.com> * Authors: TheCollector1995, <mariogplayer@gmail.com>
* Miran Grca, <mgrca8@gmail.com> * Miran Grca, <mgrca8@gmail.com>
@@ -70,7 +70,7 @@ int x54x_do_log = ENABLE_X54X_LOG;
static void static void
x54x_log(const char *fmt, ...) x54x_log(const char *fmt, ...)
{ {
#if ENABLE_X54X_LOG #ifdef ENABLE_X54X_LOG
va_list ap; va_list ap;
if (x54x_do_log) { if (x54x_do_log) {

View File

@@ -1,7 +1,8 @@
#include <stdarg.h> #include <stdio.h>
#include <stdint.h> #include <stdint.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <stdarg.h>
#include "../86box.h" #include "../86box.h"
#include "../ibm.h" #include "../ibm.h"
#include "../device.h" #include "../device.h"
@@ -12,7 +13,8 @@
#include "sound.h" #include "sound.h"
#include "snd_audiopci.h" #include "snd_audiopci.h"
typedef struct es1371_t
typedef struct
{ {
uint8_t pci_command, pci_serr; uint8_t pci_command, pci_serr;
@@ -129,10 +131,10 @@ static void update_legacy(es1371_t *es1371);
int audiopci_do_log = ENABLE_AUDIOPCI_LOG; int audiopci_do_log = ENABLE_AUDIOPCI_LOG;
#endif #endif
void audiopci_log(const char *format, ...) static void audiopci_log(const char *format, ...)
{ {
#ifdef ENABLE_AUDIOPCI_LOG #ifdef ENABLE_AUDIOPCI_LOG
if (emu8k_audiopci_log) if (audiopci_do_log)
{ {
va_list ap; va_list ap;
va_start(ap, format); va_start(ap, format);

View File

@@ -8,7 +8,7 @@
* *
* Roland MPU-401 emulation. * Roland MPU-401 emulation.
* *
* Version: @(#)snd_mpu401.c 1.0.4 2017/10/16 * Version: @(#)snd_mpu401.c 1.0.5 2017/10/19
* *
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/> * Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
* DOSBox Team, * DOSBox Team,
@@ -52,7 +52,7 @@ static int64_t mpu401_eoi_callback = 0LL;
static int64_t mpu401_reset_callback = 0LL; static int64_t mpu401_reset_callback = 0LL;
#ifdef ENABLE_MPU401_LOG #ifdef ENABLE_MPU401_LOG
static int mpu401_do_log = 1; static int mpu401_do_log = ENABLE_MPU401_LOG;
static char logfmt[512]; static char logfmt[512];
#endif #endif

View File

@@ -8,7 +8,7 @@
# #
# Makefile for Win32 (MinGW32) environment. # Makefile for Win32 (MinGW32) environment.
# #
# Version: @(#)Makefile.mingw 1.0.64 2017/10/18 # Version: @(#)Makefile.mingw 1.0.65 2017/10/19
# #
# Authors: Miran Grca, <mgrca8@gmail.com> # Authors: Miran Grca, <mgrca8@gmail.com>
# Fred N. van Kempen, <decwiz@yahoo.com> # Fred N. van Kempen, <decwiz@yahoo.com>
@@ -20,25 +20,11 @@ PROG := 86Box
endif endif
# Various compile-time options. # Various compile-time options.
# -DROM_TRACE=0xc800 traces ROM access from segment C800 ifndef STUFF
# -DIO_TRACE=0x66 traces I/O on port 0x66
STUFF := STUFF :=
endif
# Add feature selections here. # Add feature selections here.
# -DANSI_CFG forces the config file to ANSI encoding.
# -DENABLE_VRAM_DUMP enables Video Ram dumping.
# -DENABLE_LOG_BREAKPOINT enables extra logging.
# -DENABLE_SCSI_BIOS_COMMAND_LOG=n enables extra logging.
# -DENABLE_AHA154X_LOG=n enables extra logging.
# -DENABLE_BUSLOGIC_LOG=n enables extra logging.
# -DENABLE_CDROM_LOG enables extra logging.
# -DENABLE_D86F_LOG enables extra logging.
# -DENABLE_FDC_LOG enables extra logging.
# -DENABLE_HDD_IMAGE_LOG enables extra logging.
# -DENABLE_IDE_LOG enables extra logging.
# -DENABLE_SERIAL_LOG enables extra logging.
# -DENABLE_NIC_LOG enables extra logging.
# -DENABLE_KEYBOARD_LOG enables extra logging.
ifndef EXTRAS ifndef EXTRAS
EXTRAS := EXTRAS :=
endif endif