diff --git a/src/86box.h b/src/86box.h index b14a9477a..9af4e6e55 100644 --- a/src/86box.h +++ b/src/86box.h @@ -8,13 +8,32 @@ * * Main emulator include file. * - * Version: @(#)86box.h 1.0.0 2017/05/30 + * Version: @(#)86box.h 1.0.1 2017/06/03 * * Author: Miran Grca, * Copyright 2016-2017 Miran Grca. */ +#ifndef BOX_H +# define BOX_H -#define emulator_version "2.00" -#define emulator_version_w L"2.00" -#define CONFIG_FILE L"86box.cfg" +#if defined(ENABLE_BUSLOGIC_LOG) || \ + defined(ENABLE_CDROM_LOG) || \ + defined(ENABLE_D86F_LOG) || \ + defined(ENABLE_FDC_LOG) || \ + defined(ENABLE_IDE_LOG) || \ + defined(ENABLE_NIC_LOG) +# define ENABLE_LOG_TOGGLES 1 +#endif + + +#define EMU_VERSION "2.00" +#define EMU_VERSION_W L"2.00" + +#define EMU_NAME "86Box" +#define EMU_NAME_W L"86Box" + +#define CONFIG_FILE_W L"86box.cfg" + + +#endif /*BOX_H*/ diff --git a/src/CPU/cpu.c b/src/CPU/cpu.c index cbb7161fb..5f6f00b16 100644 --- a/src/CPU/cpu.c +++ b/src/CPU/cpu.c @@ -8,18 +8,18 @@ * * CPU type handler. * - * Version: @(#)cpu.c 1.0.0 2017/05/30 + * Version: @(#)cpu.c 1.0.1 2017/06/03 * - * Author: Sarah Walker, + * Authors: Sarah Walker, * leilei, * Miran Grca, * Copyright 2008-2017 Sarah Walker. * Copyright 2016-2017 leilei. * Copyright 2016-2017 Miran Grca. */ - #include "../ibm.h" #include "cpu.h" +#include "../device.h" #include "../model.h" #include "../io.h" #include "x86_ops.h" diff --git a/src/Makefile.mingw b/src/Makefile.mingw index 02c65792b..1a6f76df5 100644 --- a/src/Makefile.mingw +++ b/src/Makefile.mingw @@ -6,7 +6,7 @@ # # This file is part of the 86Box distribution. # -# Modified Makefile for Win32 MinGW 32-bit environment. +# Modified Makefile for Win32 (MinGW32) environment. # # Version: @(#)Makefile.mingw 1.0.23 2017/06/03 # @@ -29,8 +29,16 @@ STUFF = endif # Add feature selections here. -# -DBUGGER adds the ISA BusBugger emulation. # -DANSI_CFG forces the config file to ANSI encoding. +# -DENABLE_VRAM_DUMP enables Video Ram dumping. +# -DENABLE_LOG_BREAKPOINT enables extra logging. +# -DENABLE_BUSLOGIC_LOG enables extra logging. +# -DENABLE_CDROM_LOG enables extra logging. +# -DENABLE_D86F_LOG enables extra logging. +# -DENABLE_FDC_LOG enables extra logging. +# -DENABLE_IDE_LOG enables extra logging. +# -DENABLE_SERIAL_LOG enables extra logging. +# -DENABLE_NIC_LOG enables extra logging. ifndef EXTRAS EXTRAS = endif @@ -42,15 +50,15 @@ endif ifndef OPTIM OPTIM = n endif -ifndef X64 -X64 = n -endif ifndef RELEASE RELEASE = n endif ifndef USB USB = n endif +ifndef X64 +X64 = n +endif ######################################################################### @@ -131,11 +139,11 @@ SYSOBJ = model.o \ i430hx.o i430lx.o i430fx.o i430nx.o i430vx.o i440fx.o \ neat.o \ ali1429.o \ - laserxt.o \ opti495.o \ scat.o \ sis496.o \ wd76c10.o \ + laserxt.o \ acer386sx.o acerm3a.o amstrad.o \ compaq.o olivetti_m24.o jim.o ps1.o ps2.o ps2_mca.o \ tandy_eeprom.o tandy_rom.o @@ -157,7 +165,7 @@ DEVOBJ = bugger.o lpt.o serial.o \ disc_random.o disc_td0.o \ cdrom.o \ cdrom_dosbox.o cdrom_image.o cdrom_ioctl.o cdrom_null.o -ifeq ($(USB), y) +ifdef USB USBOBJ = usb.o endif NETOBJ = network.o \ @@ -175,7 +183,7 @@ SNDOBJ = sound.o \ snd_adlib.o snd_adlibgold.o snd_ad1848.o \ snd_sb.o snd_sb_dsp.o snd_cms.o snd_dbopl.o \ snd_emu8k.o snd_gus.o snd_opl.o \ - snd_mpu401.o snd_resid.o \ + snd_mpu401.o snd_pas16.o snd_resid.o \ snd_sn76489.o snd_ssi2001.o snd_wss.o \ snd_ym7128.o VIDOBJ = video.o \ @@ -265,7 +273,7 @@ clean: 86Box.res: 86Box.rc @echo Processing $< - @$(WINDRES) $(RFLAGS) -i win/86Box.rc -o 86Box.res + @$(WINDRES) $(RFLAGS) $(EXTRAS) -i win/86Box.rc -o 86Box.res pcap_if.res: pcap_if.rc @echo Processing $< diff --git a/src/Makefile_AMD.mingw b/src/Makefile_AMD.mingw deleted file mode 100644 index 436b11d5f..000000000 --- a/src/Makefile_AMD.mingw +++ /dev/null @@ -1,2 +0,0 @@ -include Makefile.mingw -CFLAGS = -O3 -march=amdfam10 -mtune=amdfam10 -fbranch-probabilities -fvpt -funroll-loops -fpeel-loops -ftracer -fomit-frame-pointer -ffast-math -msse -msse2 -msse3 -mfpmath=sse -mstackrealign \ No newline at end of file diff --git a/src/Makefile_AMD.mingw64 b/src/Makefile_AMD.mingw64 deleted file mode 100644 index d891ed4a4..000000000 --- a/src/Makefile_AMD.mingw64 +++ /dev/null @@ -1,2 +0,0 @@ -include Makefile.mingw64 -CFLAGS = -O3 -march=amdfam10 -mtune=amdfam10 -fbranch-probabilities -fvpt -funroll-loops -fpeel-loops -ftracer -fomit-frame-pointer -ffast-math -msse -msse2 -msse3 -mfpmath=sse -mstackrealign \ No newline at end of file diff --git a/src/SOUND/snd_sb_dsp.c b/src/SOUND/snd_sb_dsp.c index 3d7c95cf8..a4cc3286b 100644 --- a/src/SOUND/snd_sb_dsp.c +++ b/src/SOUND/snd_sb_dsp.c @@ -6,12 +6,12 @@ #include #include #include "../ibm.h" -#include "../device.h" #include "../io.h" #include "../pic.h" #include "../dma.h" #include "../win/plat_midi.h" /*YUCK*/ #include "../timer.h" +#include "../device.h" #include "sound.h" #include "snd_mpu401.h" #include "snd_sb_dsp.h" diff --git a/src/WIN/86Box.rc b/src/WIN/86Box.rc index 1020c2767..b4983a802 100644 --- a/src/WIN/86Box.rc +++ b/src/WIN/86Box.rc @@ -8,28 +8,19 @@ * * Windows resource script. * - * Version: @(#)86Box.rc 1.0.0 2017/05/30 + * Version: @(#)86Box.rc 1.0.1 2017/06/03 * - * Author: Miran Grca, + * Authors: Miran Grca, + * Fred N. van Kempen, * Copyright 2016-2017 Miran Grca. */ - #include - -//Microsoft Developer Studio generated resource script. -// #include "resource.h" #define APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 2 resource. -// #define APSTUDIO_HIDDEN_SYMBOLS #include "windows.h" #undef APSTUDIO_HIDDEN_SYMBOLS - -///////////////////////////////////////////////////////////////////////////// #undef APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// @@ -46,14 +37,12 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US // Menu // -STATUSBARMENU MENU DISCARDABLE -BEGIN -END - MAINMENU MENU DISCARDABLE BEGIN POPUP "&Action" BEGIN + MENUITEM "Take s&creenshot\tCtrl+F11", IDM_VID_SCREENSHOT + MENUITEM SEPARATOR MENUITEM "&Hard Reset", IDM_FILE_HRESET MENUITEM "&Ctrl+Alt+Del\tCtrl+F12", IDM_FILE_RESET_CAD MENUITEM SEPARATOR @@ -68,7 +57,7 @@ BEGIN MENUITEM SEPARATOR POPUP "&Video" BEGIN - MENUITEM "&Resizeable window", IDM_VID_RESIZE + MENUITEM "&Resizeable window", IDM_VID_RESIZE MENUITEM "R&emember size && position", IDM_VID_REMEMBER MENUITEM SEPARATOR MENUITEM "&DirectDraw", IDM_VID_DDRAW @@ -100,42 +89,38 @@ BEGIN MENUITEM "Take s&creenshot\tCtrl+F11", IDM_VID_SCREENSHOT END MENUITEM "S&tatus", IDM_STATUS -#ifdef ENABLE_LOG_TOGGLES -# if defined(ENABLE_BUSLOGIC_LOG) || defined(ENABLE_CDROM_LOG) || \ - defined(ENABLE_D86F_LOG) || defined(ENABLE_FDC_LOG) || \ - defined(ENABLE_IDE_LOG) || defined(ENABLE_NE2000_LOG) - MENUITEM SEPARATOR -# endif + END + POPUP "&Logging" + BEGIN #ifdef ENABLE_BUSLOGIC_LOG - MENUITEM "Enable BusLogic logs\tCtrl+F4", IDM_LOG_BUSLOGIC + MENUITEM "Enable BusLogic logs\tCtrl+F4", IDM_LOG_BUSLOGIC #endif #ifdef ENABLE_CDROM_LOG - MENUITEM "Enable CD-ROM logs\tCtrl+F5", IDM_LOG_CDROM + MENUITEM "Enable CD-ROM logs\tCtrl+F5", IDM_LOG_CDROM #endif #ifdef ENABLE_D86F_LOG - MENUITEM "Enable floppy (86F) logs\tCtrl+F6", IDM_LOG_D86F + MENUITEM "Enable floppy (86F) logs\tCtrl+F6", IDM_LOG_D86F #endif #ifdef ENABLE_FDC_LOG - MENUITEM "Enable floppy controller logs\tCtrl+F7", IDM_LOG_FDC + MENUITEM "Enable floppy controller logs\tCtrl+F7", IDM_LOG_FDC #endif #ifdef ENABLE_IDE_LOG - MENUITEM "Enable IDE logs\tCtrl+F8", IDM_LOG_IDE + MENUITEM "Enable IDE logs\tCtrl+F8", IDM_LOG_IDE #endif -#ifdef ENABLE_NE2000_LOG - MENUITEM "Enable NE2000 logs\tCtrl+F9", IDM_LOG_NE2000 +#ifdef ENABLE_SERIAL_LOG + MENUITEM "Enable Serial Port logs\tCtrl+F3", IDM_LOG_SERIAL #endif +#ifdef ENABLE_NIC_LOG + MENUITEM "Enable Network logs\tCtrl+F9", IDM_LOG_NIC #endif -#ifdef ENABLE_LOG_BREAKPOINT - MENUITEM SEPARATOR - MENUITEM "&Log breakpoint\tCtrl+F10", IDM_LOG_BREAKPOINT -#ifdef ENABLE_VRAM_DUMP - MENUITEM "Dump &video RAM\tCtrl+F1", IDM_DUMP_VRAM -#endif -#else -#ifdef ENABLE_VRAM_DUMP - MENUITEM SEPARATOR - MENUITEM "Dump &video RAM\tCtrl+F1", IDM_DUMP_VRAM -#endif +#if defined(ENABLE_LOG_BREAKPOINT) || defined(ENABLE_VRAM_DUMP) + MENUITEM SEPARATOR +# ifdef ENABLE_LOG_BREAKPOINT + MENUITEM "&Log breakpoint\tCtrl+F10", IDM_LOG_BREAKPOINT +# endif +# ifdef ENABLE_VRAM_DUMP + MENUITEM "Dump &video RAM\tCtrl+F1", IDM_DUMP_VRAM +# endif #endif END POPUP "&Help" @@ -153,30 +138,33 @@ END MAINACCEL ACCELERATORS MOVEABLE PURE BEGIN #ifdef ENABLE_VRAM_DUMP - VK_F1, IDM_DUMP_VRAM, CONTROL, VIRTKEY + VK_F1, IDM_DUMP_VRAM, CONTROL, VIRTKEY #endif #ifdef ENABLE_LOG_TOGGLES -#ifdef ENABLE_BUSLOGIC_LOG - VK_F4, IDM_LOG_BUSLOGIC, CONTROL, VIRTKEY -#endif -#ifdef ENABLE_CDROM_LOG - VK_F5, IDM_LOG_CDROM, CONTROL, VIRTKEY -#endif -#ifdef ENABLE_D86F_LOG - VK_F6, IDM_LOG_D86F, CONTROL, VIRTKEY -#endif -#ifdef ENABLE_FDC_LOG - VK_F7, IDM_LOG_FDC, CONTROL, VIRTKEY -#endif -#ifdef ENABLE_IDE_LOG - VK_F8, IDM_LOG_IDE, CONTROL, VIRTKEY -#endif -#ifdef ENABLE_NE2000_LOG - VK_F9, IDM_LOG_NE2000, CONTROL, VIRTKEY -#endif +# ifdef ENABLE_SERIAL_LOG + VK_F3, IDM_LOG_SERIAL, CONTROL, VIRTKEY +# endif +# ifdef ENABLE_BUSLOGIC_LOG + VK_F4, IDM_LOG_BUSLOGIC, CONTROL, VIRTKEY +# endif +# ifdef ENABLE_CDROM_LOG + VK_F5, IDM_LOG_CDROM, CONTROL, VIRTKEY +# endif +# ifdef ENABLE_D86F_LOG + VK_F6, IDM_LOG_D86F, CONTROL, VIRTKEY +# endif +# ifdef ENABLE_FDC_LOG + VK_F7, IDM_LOG_FDC, CONTROL, VIRTKEY +# endif +# ifdef ENABLE_IDE_LOG + VK_F8, IDM_LOG_IDE, CONTROL, VIRTKEY +# endif +# ifdef ENABLE_NIC_LOG + VK_F9, IDM_LOG_NIC, CONTROL, VIRTKEY +# endif #endif #ifdef ENABLE_LOG_BREAKPOINT - VK_F10, IDM_LOG_BREAKPOINT, CONTROL, VIRTKEY + VK_F10, IDM_LOG_BREAKPOINT, CONTROL, VIRTKEY #endif VK_PRIOR, IDM_VID_FULLSCREEN, VIRTKEY, CONTROL , ALT VK_F11, IDM_VID_SCREENSHOT, VIRTKEY, CONTROL @@ -188,8 +176,30 @@ END // // Dialog // +DLG_ABOUT DIALOG DISCARDABLE 0, 0, 209, 114 +STYLE DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "About 86Box" +FONT 9, "Segoe UI" +BEGIN + DEFPUSHBUTTON "OK",IDOK,129,94,71,12 + ICON 100,IDC_ABOUT_ICON,7,7,20,20 + LTEXT "86Box v2.00 - A fork of PCem\n\nAuthors: Sarah Walker, Miran Grca, waltje, SA1988, MoochMcGee, reenigne, leilei, JohnElliott, greatpsycho, and others.\n\nReleased under the GNU General Public License version 2. See LICENSE for more information.", + IDC_ABOUT_ICON,54,7,146,73 + CONTROL "",IDC_ABOUT_ICON,"Static",SS_BLACKFRAME | SS_SUNKEN,0, + 86,208,1 +END -CONFIGUREDLG_MAIN DIALOG DISCARDABLE 0, 0, 366, 241 +DLG_STATUS DIALOG DISCARDABLE 0, 0, 186, 386 +STYLE DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Status" +FONT 9, "Segoe UI" +BEGIN + LTEXT "1",IDC_STEXT_DEVICE,16,16,180,1000 + LTEXT "1",IDC_STEXT1,16,186,180,1000 +END + + +DLG_CFG_MAIN DIALOG DISCARDABLE 0, 0, 366, 241 STYLE DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "86Box Settings" FONT 9, "Segoe UI" @@ -199,12 +209,180 @@ BEGIN CONTROL "List2",IDC_SETTINGSCATLIST,"SysListView32",LVS_LIST | LVS_SHOWSELALWAYS | LVS_SINGLESEL | WS_BORDER | WS_TABSTOP,7,7,90,197 CONTROL "",-1,"Static",SS_BLACKFRAME | SS_SUNKEN,1,211,363,1 - LTEXT "Language:",2047,7,222,41,10 + LTEXT "Language:",IDS_LANG_ENUS,7,222,41,10 COMBOBOX IDC_COMBO_LANG,48,221,108,120,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP END -CONFIGUREDLG_HARD_DISKS_ADD DIALOG DISCARDABLE 0, 0, 219, 111 +DLG_CFG_MACHINE DIALOG DISCARDABLE 97, 0, 267, 112 +STYLE DS_CONTROL | WS_CHILD +FONT 9, "Segoe UI" +BEGIN + COMBOBOX IDC_COMBO_MACHINE,71,7,138,120,CBS_DROPDOWNLIST | + WS_VSCROLL | WS_TABSTOP + LTEXT "Machine:",1794,7,8,60,10 + PUSHBUTTON "Configure",IDC_CONFIGURE_MACHINE,214,7,46,12 + COMBOBOX IDC_COMBO_CPU_TYPE,71,25,45,120,CBS_DROPDOWNLIST | + WS_VSCROLL | WS_TABSTOP + LTEXT "CPU type:",1796,7,26,59,10 + COMBOBOX IDC_COMBO_WS,71,44,189,120,CBS_DROPDOWNLIST | WS_VSCROLL | + WS_TABSTOP + LTEXT "Wait states:",1798,7,45,60,10 + COMBOBOX IDC_COMBO_CPU,145,25,115,120,CBS_DROPDOWNLIST | + WS_VSCROLL | WS_TABSTOP + LTEXT "CPU:",1797,124,26,18,10 + CONTROL "Dynamic Recompiler",IDC_CHECK_DYNAREC,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,7,80,94,10 + CONTROL "Enable FPU",IDC_CHECK_FPU,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,147,80,113,10 + EDITTEXT IDC_MEMTEXT,70,63,45,12,ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_MEMSPIN,"msctls_updown32",UDS_SETBUDDYINT | + UDS_ALIGNRIGHT | UDS_ARROWKEYS | UDS_NOTHOUSANDS,113,63, + 12,12 + LTEXT "MB",IDC_TEXT_MB,123,64,10,10 + LTEXT "Memory:",1802,7,64,30,10 + CONTROL "Enable time sync",IDC_CHECK_SYNC,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,7,95,102,10 +END + +DLG_CFG_VIDEO DIALOG DISCARDABLE 97, 0, 267, 63 +STYLE DS_CONTROL | WS_CHILD +FONT 9, "Segoe UI" +BEGIN + COMBOBOX IDC_COMBO_VIDEO,71,7,140,120,CBS_DROPDOWNLIST | + WS_VSCROLL | WS_TABSTOP + LTEXT "Video:",1795,7,8,55,10 + COMBOBOX IDC_COMBO_VIDEO_SPEED,71,25,189,120,CBS_DROPDOWNLIST | + WS_VSCROLL | WS_TABSTOP + LTEXT "Video speed:",1800,7,26,58,10 + CONTROL "Voodoo Graphics",IDC_CHECK_VOODOO,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,7,45,199,10 + PUSHBUTTON "Configure",IDC_CONFIGURE_VOODOO,214,44,46,12 + PUSHBUTTON "Configure",IDC_CONFIGUREVID,214,7,46,12 +END + +DLG_CFG_INPUT DIALOG DISCARDABLE 97, 0, 267, 65 +STYLE DS_CONTROL | WS_CHILD +FONT 9, "Segoe UI" +BEGIN + LTEXT "Mouse :",IDC_STATIC,7,8,57,10 + COMBOBOX IDC_COMBO_MOUSE,71,7,189,120,CBS_DROPDOWN | WS_VSCROLL | + WS_TABSTOP + LTEXT "Joystick :",1793,7,26,58,10 + COMBOBOX IDC_COMBO_JOYSTICK,71,25,189,120,CBS_DROPDOWNLIST | + WS_VSCROLL | WS_TABSTOP + DEFPUSHBUTTON "Joystick 1...",IDC_JOY1,7,44,50,14 + PUSHBUTTON "Joystick 2...",IDC_JOY2,74,44,50,14 + DEFPUSHBUTTON "Joystick 3...",IDC_JOY3,141,44,50,14 + PUSHBUTTON "Joystick 4...",IDC_JOY4,209,44,50,14 +END + +DLG_CFG_SOUND DIALOG DISCARDABLE 97, 0, 267, 98 +STYLE DS_CONTROL | WS_CHILD +FONT 9, "Segoe UI" +BEGIN + COMBOBOX IDC_COMBOSND,71,7,140,120,CBS_DROPDOWNLIST | WS_VSCROLL | + WS_TABSTOP + LTEXT "Sound card:",1800,7,8,59,10 + PUSHBUTTON "Configure",IDC_CONFIGURESND,214,7,46,12 + COMBOBOX IDC_COMBO_MIDI,71,25,189,120,CBS_DROPDOWNLIST | WS_VSCROLL | + WS_TABSTOP + LTEXT "MIDI Out Device:",1801,7,26,59,10 + + CONTROL "Standalone MPU-401",IDC_CHECK_MPU401,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,7,45,199,10 + PUSHBUTTON "Configure",IDC_CONFIGURE_MPU401,214,44,46,12 + + CONTROL "Innovation SSI-2001",IDC_CHECKSSI,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,7,63,94,10 + CONTROL "CMS / Game Blaster",IDC_CHECKCMS,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,147,63,94,10 + + CONTROL "Gravis Ultrasound",IDC_CHECKGUS,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,7,81,94,10 + CONTROL "Use Nuked OPL",IDC_CHECKNUKEDOPL,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,147,81,94,10 +END + +DLG_CFG_NETWORK DIALOG DISCARDABLE 97, 0, 267, 63 +STYLE DS_CONTROL | WS_CHILD +FONT 9, "Segoe UI" +BEGIN + LTEXT "Network type:",1800,7,8,59,10 + COMBOBOX IDC_COMBONETTYPE,71,7,189,120,CBS_DROPDOWNLIST | WS_VSCROLL | + WS_TABSTOP + + LTEXT "PCap device:",1801,7,26,59,10 + COMBOBOX IDC_COMBOPCAP,71,25,189,120,CBS_DROPDOWNLIST | WS_VSCROLL | + WS_TABSTOP + + LTEXT "Network adapter:",1802,7,44,59,10 + COMBOBOX IDC_COMBONET,71,43,140,120,CBS_DROPDOWNLIST | WS_VSCROLL | + WS_TABSTOP + PUSHBUTTON "Configure",IDC_CONFIGURENET,214,43,46,12 +END + +DLG_CFG_PERIPHERALS DIALOG DISCARDABLE 97, 0, 267, 115 +STYLE DS_CONTROL | WS_CHILD +FONT 9, "Segoe UI" +BEGIN + LTEXT "SCSI Controller:",1804,7,8,59,10 + COMBOBOX IDC_COMBO_SCSI,71,7,140,120,CBS_DROPDOWNLIST | + WS_VSCROLL | WS_TABSTOP + PUSHBUTTON "Configure",IDC_CONFIGURE_SCSI,214,7,46,12 + + LTEXT "HD Controller:",1799,7,26,61,10 + COMBOBOX IDC_COMBO_HDC,71,25,189,120,CBS_DROPDOWNLIST | + WS_VSCROLL | WS_TABSTOP + + LTEXT "Tertiary IDE:",1802,7,44,61,10 + COMBOBOX IDC_COMBO_IDE_TER,71,43,189,120,CBS_DROPDOWNLIST | + WS_VSCROLL | WS_TABSTOP + + LTEXT "Quaternary IDE:",1803,7,62,61,10 + COMBOBOX IDC_COMBO_IDE_QUA,71,61,189,120,CBS_DROPDOWNLIST | + WS_VSCROLL | WS_TABSTOP + + CONTROL "Serial port 1",IDC_CHECKSERIAL1,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,7,80,94,10 + CONTROL "Serial port 2",IDC_CHECKSERIAL2,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,147,80,94,10 + + CONTROL "Parallel port",IDC_CHECKPARALLEL,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,7,98,94,10 + CONTROL "ISABugger device",IDC_CHECKBUGGER,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,147,98,94,10 +END + +DLG_CFG_HARD_DISKS DIALOG DISCARDABLE 97, 0, 267, 154 +STYLE DS_CONTROL | WS_CHILD +FONT 9, "Segoe UI" +BEGIN + CONTROL "List1",IDC_LIST_HARD_DISKS,"SysListView32",LVS_REPORT | + LVS_SHOWSELALWAYS | LVS_SINGLESEL | WS_BORDER | + WS_TABSTOP,7,18,253,92 + LTEXT "Hard disks:",-1,7,7,34,8 + PUSHBUTTON "&New...",IDC_BUTTON_HDD_ADD_NEW,60,137,62,10 + PUSHBUTTON "&Existing...",IDC_BUTTON_HDD_ADD,129,137,62,10 + PUSHBUTTON "&Remove",IDC_BUTTON_HDD_REMOVE,198,137,62,10 + COMBOBOX IDC_COMBO_HD_BUS,33,117,90,12,CBS_DROPDOWNLIST | + WS_VSCROLL | WS_TABSTOP + LTEXT "Bus:",1798,7,118,24,8 + COMBOBOX IDC_COMBO_HD_CHANNEL,170,117,90,12,CBS_DROPDOWNLIST | + WS_VSCROLL | WS_TABSTOP + LTEXT "Channel:",1799,131,118,38,8 + COMBOBOX IDC_COMBO_HD_ID,170,117,22,12,CBS_DROPDOWNLIST | + WS_VSCROLL | WS_TABSTOP + LTEXT "ID:",1800,131,118,38,8 + COMBOBOX IDC_COMBO_HD_LUN,239,117,22,12,CBS_DROPDOWNLIST | + WS_VSCROLL | WS_TABSTOP + LTEXT "LUN:",1801,200,118,38,8 + COMBOBOX IDC_COMBO_HD_CHANNEL_IDE,170,117,90,12,CBS_DROPDOWNLIST | + WS_VSCROLL | WS_TABSTOP + LTEXT "Channel:",1802,131,118,38,8 +END + +DLG_CFG_HARD_DISKS_ADD DIALOG DISCARDABLE 0, 0, 219, 111 STYLE DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Add Hard Disk" FONT 9, "Segoe UI" @@ -242,197 +420,7 @@ BEGIN LTEXT "Channel:",1802,99,72,34,8 END -STATUSDLG DIALOG DISCARDABLE 0, 0, 186, 386 -STYLE DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Status" -FONT 9, "Segoe UI" -BEGIN - LTEXT "1",IDC_STEXT_DEVICE,16,16,180,1000 - LTEXT "1",IDC_STEXT1,16,186,180,1000 -END - -ABOUTDLG DIALOG DISCARDABLE 0, 0, 209, 114 -STYLE DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "About 86Box" -FONT 9, "Segoe UI" -BEGIN - DEFPUSHBUTTON "OK",IDOK,129,94,71,12 - ICON 100,IDC_ABOUT_ICON,7,7,20,20 - LTEXT "86Box v1.20 - A fork of PCem\n\nAuthors: Sarah Walker, Miran Grca, waltje, SA1988, MoochMcGee, reenigne, leilei, JohnElliott, greatpsycho, and others.\n\nReleased under the GNU General Public License version 2. See LICENSE for more information.", - IDC_ABOUT_ICON,54,7,146,73 - CONTROL "",IDC_ABOUT_ICON,"Static",SS_BLACKFRAME | SS_SUNKEN,0, - 86,208,1 -END - -CONFIGUREDLG_MACHINE DIALOG DISCARDABLE 97, 0, 267, 112 -STYLE DS_CONTROL | WS_CHILD -FONT 9, "Segoe UI" -BEGIN - COMBOBOX IDC_COMBO_MACHINE,71,7,138,120,CBS_DROPDOWNLIST | - WS_VSCROLL | WS_TABSTOP - LTEXT "Machine:",1794,7,8,60,10 - PUSHBUTTON "Configure",IDC_CONFIGURE_MACHINE,214,7,46,12 - COMBOBOX IDC_COMBO_CPU_TYPE,71,25,45,120,CBS_DROPDOWNLIST | - WS_VSCROLL | WS_TABSTOP - LTEXT "CPU type:",1796,7,26,59,10 - COMBOBOX IDC_COMBO_WS,71,44,189,120,CBS_DROPDOWNLIST | WS_VSCROLL | - WS_TABSTOP - LTEXT "Wait states:",1798,7,45,60,10 - COMBOBOX IDC_COMBO_CPU,145,25,115,120,CBS_DROPDOWNLIST | - WS_VSCROLL | WS_TABSTOP - LTEXT "CPU:",1797,124,26,18,10 - CONTROL "Dynamic Recompiler",IDC_CHECK_DYNAREC,"Button", - BS_AUTOCHECKBOX | WS_TABSTOP,7,80,94,10 - CONTROL "Enable FPU",IDC_CHECK_FPU,"Button",BS_AUTOCHECKBOX | - WS_TABSTOP,147,80,113,10 - EDITTEXT IDC_MEMTEXT,70,63,45,12,ES_AUTOHSCROLL | ES_NUMBER - CONTROL "",IDC_MEMSPIN,"msctls_updown32",UDS_SETBUDDYINT | - UDS_ALIGNRIGHT | UDS_ARROWKEYS | UDS_NOTHOUSANDS,113,63, - 12,12 - LTEXT "MB",IDC_TEXT_MB,123,64,10,10 - LTEXT "Memory:",1802,7,64,30,10 - CONTROL "Enable time sync",IDC_CHECK_SYNC,"Button", - BS_AUTOCHECKBOX | WS_TABSTOP,7,95,102,10 -END - -CONFIGUREDLG_VIDEO DIALOG DISCARDABLE 97, 0, 267, 63 -STYLE DS_CONTROL | WS_CHILD -FONT 9, "Segoe UI" -BEGIN - COMBOBOX IDC_COMBO_VIDEO,71,7,140,120,CBS_DROPDOWNLIST | - WS_VSCROLL | WS_TABSTOP - LTEXT "Video:",1795,7,8,55,10 - COMBOBOX IDC_COMBO_VIDEO_SPEED,71,25,189,120,CBS_DROPDOWNLIST | - WS_VSCROLL | WS_TABSTOP - LTEXT "Video speed:",1800,7,26,58,10 - CONTROL "Voodoo Graphics",IDC_CHECK_VOODOO,"Button", - BS_AUTOCHECKBOX | WS_TABSTOP,7,45,199,10 - PUSHBUTTON "Configure",IDC_CONFIGURE_VOODOO,214,44,46,12 - PUSHBUTTON "Configure",IDC_CONFIGUREVID,214,7,46,12 -END - -CONFIGUREDLG_INPUT DIALOG DISCARDABLE 97, 0, 267, 65 -STYLE DS_CONTROL | WS_CHILD -FONT 9, "Segoe UI" -BEGIN - LTEXT "Mouse :",IDC_STATIC,7,8,57,10 - COMBOBOX IDC_COMBO_MOUSE,71,7,189,120,CBS_DROPDOWN | WS_VSCROLL | - WS_TABSTOP - LTEXT "Joystick :",1793,7,26,58,10 - COMBOBOX IDC_COMBO_JOYSTICK,71,25,189,120,CBS_DROPDOWNLIST | - WS_VSCROLL | WS_TABSTOP - DEFPUSHBUTTON "Joystick 1...",IDC_JOY1,7,44,50,14 - PUSHBUTTON "Joystick 2...",IDC_JOY2,74,44,50,14 - DEFPUSHBUTTON "Joystick 3...",IDC_JOY3,141,44,50,14 - PUSHBUTTON "Joystick 4...",IDC_JOY4,209,44,50,14 -END - -CONFIGUREDLG_SOUND DIALOG DISCARDABLE 97, 0, 267, 98 -STYLE DS_CONTROL | WS_CHILD -FONT 9, "Segoe UI" -BEGIN - COMBOBOX IDC_COMBOSND,71,7,140,120,CBS_DROPDOWNLIST | WS_VSCROLL | - WS_TABSTOP - LTEXT "Sound card:",1800,7,8,59,10 - PUSHBUTTON "Configure",IDC_CONFIGURESND,214,7,46,12 - COMBOBOX IDC_COMBO_MIDI,71,25,189,120,CBS_DROPDOWNLIST | WS_VSCROLL | - WS_TABSTOP - LTEXT "MIDI Out Device:",1801,7,26,59,10 - - CONTROL "Standalone MPU-401",IDC_CHECK_MPU401,"Button", - BS_AUTOCHECKBOX | WS_TABSTOP,7,45,199,10 - PUSHBUTTON "Configure",IDC_CONFIGURE_MPU401,214,44,46,12 - - CONTROL "Innovation SSI-2001",IDC_CHECKSSI,"Button", - BS_AUTOCHECKBOX | WS_TABSTOP,7,63,94,10 - CONTROL "CMS / Game Blaster",IDC_CHECKCMS,"Button", - BS_AUTOCHECKBOX | WS_TABSTOP,147,63,94,10 - - CONTROL "Gravis Ultrasound",IDC_CHECKGUS,"Button", - BS_AUTOCHECKBOX | WS_TABSTOP,7,81,94,10 - CONTROL "Use Nuked OPL",IDC_CHECKNUKEDOPL,"Button", - BS_AUTOCHECKBOX | WS_TABSTOP,147,81,94,10 -END - -CONFIGUREDLG_NETWORK DIALOG DISCARDABLE 97, 0, 267, 63 -STYLE DS_CONTROL | WS_CHILD -FONT 9, "Segoe UI" -BEGIN - LTEXT "Network type:",1800,7,8,59,10 - COMBOBOX IDC_COMBONETTYPE,71,7,189,120,CBS_DROPDOWNLIST | WS_VSCROLL | - WS_TABSTOP - - LTEXT "PCap device:",1801,7,26,59,10 - COMBOBOX IDC_COMBOPCAP,71,25,189,120,CBS_DROPDOWNLIST | WS_VSCROLL | - WS_TABSTOP - - LTEXT "Network adapter:",1802,7,44,59,10 - COMBOBOX IDC_COMBONET,71,43,140,120,CBS_DROPDOWNLIST | WS_VSCROLL | - WS_TABSTOP - PUSHBUTTON "Configure",IDC_CONFIGURENET,214,43,46,12 -END - -CONFIGUREDLG_PERIPHERALS DIALOG DISCARDABLE 97, 0, 267, 115 -STYLE DS_CONTROL | WS_CHILD -FONT 9, "Segoe UI" -BEGIN - LTEXT "SCSI Controller:",1804,7,8,59,10 - COMBOBOX IDC_COMBO_SCSI,71,7,140,120,CBS_DROPDOWNLIST | - WS_VSCROLL | WS_TABSTOP - PUSHBUTTON "Configure",IDC_CONFIGURE_SCSI,214,7,46,12 - - LTEXT "HD Controller:",1799,7,26,61,10 - COMBOBOX IDC_COMBO_HDC,71,25,189,120,CBS_DROPDOWNLIST | - WS_VSCROLL | WS_TABSTOP - - LTEXT "Tertiary IDE:",1802,7,44,61,10 - COMBOBOX IDC_COMBO_IDE_TER,71,43,189,120,CBS_DROPDOWNLIST | - WS_VSCROLL | WS_TABSTOP - - LTEXT "Quaternary IDE:",1803,7,62,61,10 - COMBOBOX IDC_COMBO_IDE_QUA,71,61,189,120,CBS_DROPDOWNLIST | - WS_VSCROLL | WS_TABSTOP - - CONTROL "Serial port 1",IDC_CHECKSERIAL1,"Button", - BS_AUTOCHECKBOX | WS_TABSTOP,7,80,94,10 - CONTROL "Serial port 2",IDC_CHECKSERIAL2,"Button", - BS_AUTOCHECKBOX | WS_TABSTOP,147,80,94,10 - - CONTROL "Parallel port",IDC_CHECKPARALLEL,"Button", - BS_AUTOCHECKBOX | WS_TABSTOP,7,98,94,10 - CONTROL "ISABugger device",IDC_CHECKBUGGER,"Button", - BS_AUTOCHECKBOX | WS_TABSTOP,147,98,94,10 -END - -CONFIGUREDLG_HARD_DISKS DIALOG DISCARDABLE 97, 0, 267, 154 -STYLE DS_CONTROL | WS_CHILD -FONT 9, "Segoe UI" -BEGIN - CONTROL "List1",IDC_LIST_HARD_DISKS,"SysListView32",LVS_REPORT | - LVS_SHOWSELALWAYS | LVS_SINGLESEL | WS_BORDER | - WS_TABSTOP,7,18,253,92 - LTEXT "Hard disks:",-1,7,7,34,8 - PUSHBUTTON "&New...",IDC_BUTTON_HDD_ADD_NEW,60,137,62,10 - PUSHBUTTON "&Existing...",IDC_BUTTON_HDD_ADD,129,137,62,10 - PUSHBUTTON "&Remove",IDC_BUTTON_HDD_REMOVE,198,137,62,10 - COMBOBOX IDC_COMBO_HD_BUS,33,117,90,12,CBS_DROPDOWNLIST | - WS_VSCROLL | WS_TABSTOP - LTEXT "Bus:",1798,7,118,24,8 - COMBOBOX IDC_COMBO_HD_CHANNEL,170,117,90,12,CBS_DROPDOWNLIST | - WS_VSCROLL | WS_TABSTOP - LTEXT "Channel:",1799,131,118,38,8 - COMBOBOX IDC_COMBO_HD_ID,170,117,22,12,CBS_DROPDOWNLIST | - WS_VSCROLL | WS_TABSTOP - LTEXT "ID:",1800,131,118,38,8 - COMBOBOX IDC_COMBO_HD_LUN,239,117,22,12,CBS_DROPDOWNLIST | - WS_VSCROLL | WS_TABSTOP - LTEXT "LUN:",1801,200,118,38,8 - COMBOBOX IDC_COMBO_HD_CHANNEL_IDE,170,117,90,12,CBS_DROPDOWNLIST | - WS_VSCROLL | WS_TABSTOP - LTEXT "Channel:",1802,131,118,38,8 -END - -CONFIGUREDLG_REMOVABLE_DEVICES DIALOG DISCARDABLE 97, 0, 267, 202 +DLG_CFG_REMOVABLE_DEVICES DIALOG DISCARDABLE 97, 0, 267, 202 STYLE DS_CONTROL | WS_CHILD FONT 9, "Segoe UI" BEGIN @@ -829,7 +817,7 @@ BEGIN IDS_2173"All floppy images (*.0??;*.12;*.144;*.360;*.720;*.86F;*.BIN;*.CQ;*.CQM;*.DSK;*.FDI;*.FDF;*.FLP;*.HDM;*.IMA;*.IMD;*.IMG;*.TD0;*.VFD;*.XDF)\0*.0??;*.12;*.144;*.360;*.720;*.86F;*.BIN;*.CQ;*.CQM;*.DSK;*.FDI;*.FDF;*.FLP;*.HDM;*.IMA;*.IMD;*.IMG;*.TD0;*.VFD;*.XDF\0Advanced sector-based images (*.IMD;*.TD0)\0*.IMD;*.TD0\0Basic sector-based images (*.0??;*.12;*.144;*.360;*.720;*.BIN;*.CQ;*.CQM;*.DSK;*.FDI;*.FDF;*.FLP;*.HDM;*.IMA;*.IMG;*.VFD;*.XDF)\0*.0??;*.12;*.144;*.360;*.720;*.BIN;*.CQ;*.CQM;*.DSK;*.FDI;*.FDF;*.FLP;*.HDM;*.IMA;*.IMG;*.VFD;*.XDF\0Flux images (*.FDI)\0*.FDI\0Surface-based images (*.86F)\0*.86F\0All files (*.*)\0*.*\0" IDS_2174 "Configuration files (*.CFG)\0*.CFG\0All files (*.*)\0*.*\0" IDS_2175 "CD-ROM image (*.ISO;*.CUE)\0*.ISO;*.CUE\0All files (*.*)\0*.*\0" - IDS_2176 "Use CTRL + ALT + PAGE DOWN to return to windowed mode" + IDS_2176 "Use CTRL+ALT+PAGE DOWN to return to windowed mode" IDS_2177 "Olivetti M24 mouse" IDS_2178 "This image exists and will be overwritten.\nAre you sure you want to use it?" IDS_2179 "Floppy %i (%s): %ws" @@ -846,7 +834,7 @@ BEGIN IDS_2190 "ATAPI (PIO and DMA)" IDS_2191 "ATAPI (PIO-only) (%01i:%01i)" IDS_2192 "ATAPI (PIO and DMA) (%01i:%01i)" - IDS_2193 "Use CTRL + ALT + PAGE DOWN to return to windowed mode" + IDS_2193 "Use CTRL+ALT+PAGE DOWN to return to windowed mode" IDS_2194 "Unable to create bitmap file: %s" IDS_2195 "IDE (PIO-only) (%01i:%01i)" IDS_2196 "Add New Hard Disk" @@ -942,4 +930,3 @@ END ///////////////////////////////////////////////////////////////////////////// #endif // not APSTUDIO_INVOKED - diff --git a/src/WIN/resource.h b/src/WIN/resource.h index 52edb590a..b89a90fd3 100644 --- a/src/WIN/resource.h +++ b/src/WIN/resource.h @@ -8,31 +8,38 @@ * * Windows resource defines. * - * Version: @(#)resource.h 1.0.1 2017/05/30 + * NOTE: Strings 2176 and 2193 are same. * - * Author: Sarah Walker, + * Version: @(#)resource.h 1.0.2 2017/06/03 + * + * Authors: Sarah Walker, * Miran Grca, + * Fred N. van Kempem, * Copyright 2008-2017 Sarah Walker. * Copyright 2016-2017 Miran Grca. */ +#ifndef WIN_RESOURCE_H +# define WIN_RESOURCE_H + /* {{NO_DEPENDENCIES}} Microsoft Developer Studio generated include file. Used by 86Box.rc */ -#define IDHDCONFIG 3 -#define IDCDCONFIG 4 -#define CONFIGUREDLG_MACHINE 101 -#define CONFIGUREDLG_VIDEO 102 -#define CONFIGUREDLG_INPUT 103 -#define CONFIGUREDLG_SOUND 104 -#define CONFIGUREDLG_NETWORK 105 -#define CONFIGUREDLG_PERIPHERALS 106 -#define CONFIGUREDLG_HARD_DISKS 107 -#define CONFIGUREDLG_REMOVABLE_DEVICES 108 -#define ABOUTDLG 109 -#define CONFIGUREDLG_HARD_DISKS_ADD 110 -#define CONFIGUREDLG_MAIN 117 + +#define DLG_ABOUT 101 +#define DLG_STATUS 102 +#define DLG_CONFIG 110 +#define DLG_CFG_MACHINE 111 +#define DLG_CFG_VIDEO 112 +#define DLG_CFG_INPUT 113 +#define DLG_CFG_SOUND 114 +#define DLG_CFG_NETWORK 115 +#define DLG_CFG_PERIPHERALS 116 +#define DLG_CFG_HARD_DISKS 117 +#define DLG_CFG_HARD_DISKS_ADD 118 +#define DLG_CFG_REMOVABLE_DEVICES 119 + #define IDC_SETTINGSCATLIST 1004 #define IDC_LIST_HARD_DISKS 1005 #define IDC_COMBO_MACHINE 1006 @@ -66,7 +73,7 @@ #define IDC_BUTTON_HDD_ADD 1028 #define IDC_BUTTON_CDROM_REMOVE 1029 #define IDC_BUTTON_HDD_REMOVE 1029 -#define IDC_CHECKTURBO 1030 +#define IDC_CHECKTURBO 1030 #define IDC_HDIMAGE_NEW 1035 #define IDC_HD_BUS 1036 #define IDC_HDIMAGE_EXISTING 1037 @@ -102,196 +109,186 @@ #define IDC_CHECK_CDROM_3_AUDIO_ENABLED 1586 #define IDC_CHECK_CDROM_4_AUDIO_ENABLED 1587 -#define IDS_STRINGS 2048 -#define IDS_2049 2049 -#define IDS_2050 2050 -#define IDS_2051 2051 -#define IDS_2052 2052 -#define IDS_2053 2053 -#define IDS_2054 2054 -#define IDS_2055 2055 -#define IDS_2056 2056 -#define IDS_2057 2057 -#define IDS_2058 2058 -#define IDS_2059 2059 -#define IDS_2060 2060 -#define IDS_2061 2061 -#define IDS_2062 2062 -#define IDS_2063 2063 -#define IDS_2064 2064 -#define IDS_2065 2065 -#define IDS_2066 2066 -#define IDS_2067 2067 -#define IDS_2068 2068 -#define IDS_2069 2069 -#define IDS_2070 2070 -#define IDS_2071 2071 -#define IDS_2072 2072 -#define IDS_2073 2073 -#define IDS_2074 2074 -#define IDS_2075 2075 -#define IDS_2076 2076 -#define IDS_2077 2077 -#define IDS_2078 2078 -#define IDS_2079 2079 -#define IDS_2080 2080 -#define IDS_2081 2081 -#define IDS_2082 2082 -#define IDS_2083 2083 -#define IDS_2084 2084 -#define IDS_2085 2085 -#define IDS_2086 2086 -#define IDS_2087 2087 -#define IDS_2088 2088 -#define IDS_2089 2089 -#define IDS_2090 2090 -#define IDS_2091 2091 -#define IDS_2092 2092 -#define IDS_2093 2093 -#define IDS_2094 2094 -#define IDS_2095 2095 -#define IDS_2096 2096 -#define IDS_2097 2097 -#define IDS_2098 2098 -#define IDS_2099 2099 -#define IDS_2100 2100 -#define IDS_2101 2101 -#define IDS_2102 2102 -#define IDS_2103 2103 -#define IDS_2104 2104 -#define IDS_2105 2105 -#define IDS_2106 2106 -#define IDS_2107 2107 -#define IDS_2108 2108 -#define IDS_2109 2109 -#define IDS_2110 2110 -#define IDS_2111 2111 -#define IDS_2112 2112 -#define IDS_2113 2113 -#define IDS_2114 2114 -#define IDS_2115 2115 -#define IDS_2116 2116 -#define IDS_2117 2117 -#define IDS_2118 2118 -#define IDS_2119 2119 -#define IDS_2120 2120 -#define IDS_2121 2121 -#define IDS_2122 2122 -#define IDS_2123 2123 -#define IDS_2124 2124 -#define IDS_2125 2125 -#define IDS_2126 2126 -#define IDS_2127 2127 -#define IDS_2128 2128 -#define IDS_2129 2129 -#define IDS_2130 2130 -#define IDS_2131 2131 -#define IDS_2132 2132 -#define IDS_2133 2133 -#define IDS_2134 2134 -#define IDS_2135 2135 -#define IDS_2136 2136 -#define IDS_2137 2137 -#define IDS_2138 2138 -#define IDS_2139 2139 -#define IDS_2140 2140 -#define IDS_2141 2141 -#define IDS_2142 2142 -#define IDS_2143 2143 -#define IDS_2144 2144 -#define IDS_2145 2145 -#define IDS_2146 2146 -#define IDS_2147 2147 -#define IDS_2148 2148 -#define IDS_2149 2149 -#define IDS_2150 2150 -#define IDS_2151 2151 -#define IDS_2152 2152 -#define IDS_2153 2153 -#define IDS_2154 2154 -#define IDS_2155 2155 -#define IDS_2156 2156 -#define IDS_2157 2157 -#define IDS_2158 2158 -#define IDS_2159 2159 -#define IDS_2160 2160 -#define IDS_2161 2161 -#define IDS_2162 2162 -#define IDS_2163 2163 -#define IDS_2164 2164 -#define IDS_2165 2165 -#define IDS_2166 2166 -#define IDS_2167 2167 -#define IDS_2168 2168 -#define IDS_2169 2169 -#define IDS_2170 2170 -#define IDS_2171 2171 -#define IDS_2172 2172 -#define IDS_2173 2173 -#define IDS_2174 2174 -#define IDS_2175 2175 -#define IDS_2176 2176 -#define IDS_2177 2177 -#define IDS_2178 2178 -#define IDS_2179 2179 -#define IDS_2180 2180 -#define IDS_2181 2181 -#define IDS_2182 2182 -#define IDS_2183 2183 -#define IDS_2184 2184 -#define IDS_2185 2185 -#define IDS_2186 2186 -#define IDS_2187 2187 -#define IDS_2188 2188 -#define IDS_2189 2189 -#define IDS_2190 2190 -#define IDS_2191 2191 -#define IDS_2192 2192 -#define IDS_2193 2193 -#define IDS_2194 2194 -#define IDS_2195 2195 -#define IDS_2196 2196 -#define IDS_2197 2197 -#define IDS_2198 2198 -#define IDS_2199 2199 -#define IDS_2200 2200 -#define IDS_2201 2201 -#define IDS_2202 2202 -#define IDS_2203 2203 -#define IDS_2204 2204 -#define IDS_2205 2205 -#define IDS_2206 2206 -#define IDS_2207 2207 -#define IDS_2208 2208 -#define IDS_2209 2209 -#define IDS_2200 2200 -#define IDS_2201 2201 -#define IDS_2202 2202 -#define IDS_2203 2203 -#define IDS_2204 2204 -#define IDS_2205 2205 -#define IDS_2206 2206 -#define IDS_2207 2207 -#define IDS_2208 2208 -#define IDS_2209 2209 -#define IDS_2210 2210 -#define IDS_2211 2211 -#define IDS_2212 2212 -#define IDS_2213 2213 -#define IDS_2214 2214 -#define IDS_2215 2215 -#define IDS_2216 2216 -#define IDS_2217 2217 -#define IDS_2218 2218 -#define IDS_2219 2219 -#define IDS_2220 2220 -#define IDS_2221 2221 -#define IDS_2222 2222 -#define IDS_2223 2223 -#define IDS_2224 2224 -#define IDS_2225 2225 +#define IDS_STRINGS 2048 // "86Box" +#define IDS_2049 2049 // "86Box Error" +#define IDS_2050 2050 // "86Box Fatal Error" +#define IDS_2051 2051 // "This will reset 86Box.." +#define IDS_2052 2052 // "DirectDraw Screenshot Error" +#define IDS_2053 2053 // "Invalid number of sectors.." +#define IDS_2054 2054 // "Invalid number of heads.." +#define IDS_2055 2055 // "Invalid number of cylinders.." +#define IDS_2056 2056 // "Please enter a valid file name" +#define IDS_2057 2057 // "Unable to open the file for write" +#define IDS_2058 2058 // "Attempting to create a HDI.." +#define IDS_2059 2059 // "Remember to partition and.." +#define IDS_2060 2060 // "Unable to open the file.." +#define IDS_2061 2061 // "HDI or HDX image with a.." +#define IDS_2062 2062 // "86Box was unable to find any.." +#define IDS_2063 2063 // "Configured ROM set not avai.." +#define IDS_2064 2064 // "Configured video BIOS not.." +#define IDS_2065 2065 // "Machine" +#define IDS_2066 2066 // "Video" +#define IDS_2067 2067 // "Input devices" +#define IDS_2068 2068 // "Sound" +#define IDS_2069 2069 // "Network" +#define IDS_2070 2070 // "Other peripherals" +#define IDS_2071 2071 // "Hard disks" +#define IDS_2072 2072 // "Removable devices" +#define IDS_2073 2073 // "%i"" floppy drive: %s" +#define IDS_2074 2074 // "Disabled CD-ROM drive" +#define IDS_2075 2075 // "%s CD-ROM drive: %s" +#define IDS_2076 2076 // "Host CD/DVD Drive (%c:)" +#define IDS_2077 2077 // "Click to capture mouse" +#define IDS_2078 2078 // "Press F12-F8 to release mouse" +#define IDS_2079 2079 // "Press F12-F8 or middle button.." +#define IDS_2080 2080 // "Drive" +#define IDS_2081 2081 // "Location" +#define IDS_2082 2082 // "Bus" +#define IDS_2083 2083 // "File" +#define IDS_2084 2084 // "C" +#define IDS_2085 2085 // "H" +#define IDS_2086 2086 // "S" +#define IDS_2087 2087 // "MB" +#define IDS_2088 2088 // "%i" +#define IDS_2089 2089 // "Enabled" +#define IDS_2090 2090 // "Mute" +#define IDS_2091 2091 // "Type" +#define IDS_2092 2092 // "Bus" +#define IDS_2093 2093 // "DMA" +#define IDS_2094 2094 // "KB" +#define IDS_2095 2095 // "MFM, RLL, or ESDI CD-ROM.." +#define IDS_2096 2096 // "Slave" +#define IDS_2097 2097 // "SCSI (ID %s, LUN %s)" +#define IDS_2098 2098 // "Adapter Type" +#define IDS_2099 2099 // "Base Address" +#define IDS_2100 2100 // "IRQ" +#define IDS_2101 2101 // "8-bit DMA" +#define IDS_2102 2102 // "16-bit DMA" +#define IDS_2103 2103 // "BIOS" +#define IDS_2104 2104 // "Network Type" +#define IDS_2105 2105 // "Surround Module" +#define IDS_2106 2106 // "MPU-401 Base Address" +#define IDS_2107 2107 // "No PCap devices found" +#define IDS_2108 2108 // "On-board RAM" +#define IDS_2109 2109 // "Memory Size" +#define IDS_2110 2110 // "Display Type" +#define IDS_2111 2111 // "RGB" +#define IDS_2112 2112 // "Composite" +#define IDS_2113 2113 // "Composite Type" +#define IDS_2114 2114 // "Old" +#define IDS_2115 2115 // "New" +#define IDS_2116 2116 // "RGB Type" +#define IDS_2117 2117 // "Color" +#define IDS_2118 2118 // "Monochrome (Green)" +#define IDS_2119 2119 // "Monochrome (Amber)" +#define IDS_2120 2120 // "Monochrome (Gray)" +#define IDS_2121 2121 // "Color (no brown)" +#define IDS_2122 2122 // "Monochrome (Default)" +#define IDS_2123 2123 // "Snow Emulation" +#define IDS_2124 2124 // "Bilinear Filtering" +#define IDS_2125 2125 // "Dithering" +#define IDS_2126 2126 // "Framebuffer Memory Size" +#define IDS_2127 2127 // "Texture Memory Size" +#define IDS_2128 2128 // "Screen Filter" +#define IDS_2129 2129 // "Render Threads" +#define IDS_2130 2130 // "Recompiler" +#define IDS_2131 2131 // "System Default" +#define IDS_2132 2132 // "%i Wait state(s)" +#define IDS_2133 2133 // "8-bit" +#define IDS_2134 2134 // "Slow 16-bit" +#define IDS_2135 2135 // "Fast 16-bit" +#define IDS_2136 2136 // "Slow VLB/PCI" +#define IDS_2137 2137 // "Mid VLB/PCI" +#define IDS_2138 2138 // "Fast VLB/PCI" +#define IDS_2139 2139 // "Microsoft 2-button mouse (serial)" +#define IDS_2140 2140 // "Mouse Systems mouse (serial)" +#define IDS_2141 2141 // "2-button mouse (PS/2)" +#define IDS_2142 2142 // "Microsoft Intellimouse (PS/2)" +#define IDS_2143 2143 // "Bus mouse" +#define IDS_2144 2144 // "Standard 2-button joystick(s)" +#define IDS_2145 2145 // "Standard 4-button joystick" +#define IDS_2146 2146 // "Standard 6-button joystick" +#define IDS_2147 2147 // "Standard 8-button joystick" +#define IDS_2148 2148 // "CH Flightstick Pro" +#define IDS_2149 2149 // "Microsoft SideWinder Pad" +#define IDS_2150 2150 // "Thrustmaster Flight Control System" +#define IDS_2151 2151 // "Disabled" +#define IDS_2152 2152 // "None" +#define IDS_2153 2153 // "AT Fixed Disk Adapter" +#define IDS_2154 2154 // "Internal IDE" +#define IDS_2155 2155 // "IRQ %i" +#define IDS_2156 2156 // "MFM (%01i:%01i)" +#define IDS_2157 2157 // "IDE (PIO+DMA) (%01i:%01i)" +#define IDS_2158 2158 // "SCSI (%02i:%02i)" +#define IDS_2159 2159 // "Invalid number of cylinders.." +#define IDS_2160 2160 // "%" PRIu64 +#define IDS_2161 2161 // "Genius Bus mouse" +#define IDS_2162 2162 // "Amstrad mouse" +#define IDS_2163 2163 // "Attempting to create a spuriously.." +#define IDS_2164 2164 // "Invalid number of sectors.." +#define IDS_2165 2165 // "MFM" +#define IDS_2166 2166 // "XT IDE" +#define IDS_2167 2167 // "RLL" +#define IDS_2168 2168 // "IDE (PIO-only)" +#define IDS_2169 2169 // "%01i:%01i" +#define IDS_2170 2170 // "Custom..." +#define IDS_2171 2171 // "%" PRIu64 " MB (CHS: %" .. +#define IDS_2172 2172 // "Hard disk images .." +#define IDS_2173 2173 // "All floppy images .." +#define IDS_2174 2174 // "Configuration files .." +#define IDS_2175 2175 // "CD-ROM image .." +#define IDS_2176 2176 // "Use CTRL+ALT+PAGE DOWN .." +#define IDS_2177 2177 // "Olivetti M24 mouse" +#define IDS_2178 2178 // "This image exists and will.." +#define IDS_2179 2179 // "Floppy %i (%s): %ws" +#define IDS_2180 2180 // "CD-ROM %i: %ws" +#define IDS_2181 2181 // "MFM hard disk" +#define IDS_2182 2182 // "IDE hard disk (PIO-only)" +#define IDS_2183 2183 // "IDE hard disk (PIO and DMA)" +#define IDS_2184 2184 // "SCSI hard disk" +#define IDS_2185 2185 // "(empty)" +#define IDS_2186 2186 // "(host drive %c:)" +#define IDS_2187 2187 // "Custom (large)..." +#define IDS_2188 2188 // "Type" +#define IDS_2189 2189 // "ATAPI (PIO-only)" +#define IDS_2190 2190 // "ATAPI (PIO and DMA)" +#define IDS_2191 2191 // "ATAPI (PIO-only) (%01i:%01i)" +#define IDS_2192 2192 // "ATAPI (PIO and DMA) (%01i:%01i)" +#define IDS_2193 2193 // "Use CTRL+ALT+PAGE DOWN to .." +#define IDS_2194 2194 // "Unable to create bitmap file: %s" +#define IDS_2195 2195 // "IDE (PIO-only) (%01i:%01i)" +#define IDS_2196 2196 // "Add New Hard Disk" +#define IDS_2197 2197 // "Add Existing Hard Disk" +#define IDS_2198 2198 // "SCSI removable disk %i: %s" +#define IDS_2199 2199 // "USB is not yet supported" +#define IDS_2200 2200 // "Invalid PCap device" +#define IDS_2201 2201 // "&Notify disk change" +#define IDS_2202 2202 // "SCSI (removable)" +#define IDS_2203 2203 // "SCSI (removable) (%02i:%02i)" +#define IDS_2204 2204 // "Pcap Library Not Available" +#define IDS_2205 2205 // "RLL (%01i:%01i)" +#define IDS_2206 2206 // "XT IDE (%01i:%01i)" +#define IDS_2207 2207 // "RLL hard disk" +#define IDS_2208 2208 // "XT IDE hard disk" +#define IDS_2209 2209 // "IDE (PIO and DMA)" +#define IDS_2210 2210 // "SCSI" +#define IDS_2211 2211 // "&New image..." +#define IDS_2212 2212 // "Existing image..." +#define IDS_2213 2213 // "Existing image (&Write-.." +#define IDS_2214 2214 // "E&ject" +#define IDS_2215 2215 // "&Mute" +#define IDS_2216 2216 // "E&mpty" +#define IDS_2217 2217 // "&Reload previous image" +#define IDS_2218 2218 // "&Image..." +#define IDS_2219 2219 // "PCap failed to set up .." +#define IDS_2220 2220 // "Image (&Write-protected)..." +#define IDS_2221 2221 // "Turbo" +#define IDS_2222 2222 // "On" +#define IDS_2223 2223 // "Off" +#define IDS_2224 2224 // "" +#define IDS_2225 2225 // "English (United States)" -#define IDS_LANG_ENUS IDS_2225 +#define IDS_LANG_ENUS IDS_2225 #define IDM_ABOUT 40001 @@ -341,25 +338,26 @@ #define IDM_IDE_QUA_IRQ14 44033 #define IDM_IDE_QUA_IRQ15 44035 -#ifdef ENABLE_LOG_TOGGLES -# ifdef ENABLE_BUSLOGIC_LOG -# define IDM_LOG_BUSLOGIC 51200 -# endif -# ifdef ENABLE_CDROM_LOG -# define IDM_LOG_CDROM 51201 -# endif -# ifdef ENABLE_D86F_LOG -# define IDM_LOG_D86F 51202 -# endif -# ifdef ENABLE_FDC_LOG -# define IDM_LOG_FDC 51203 -# endif -# ifdef ENABLE_IDE_LOG -# define IDM_LOG_IDE 51204 -# endif -# ifdef ENABLE_NE2000_LOG -# define IDM_LOG_NE2000 51205 -# endif +#ifdef ENABLE_BUSLOGIC_LOG +# define IDM_LOG_BUSLOGIC 51200 +#endif +#ifdef ENABLE_CDROM_LOG +# define IDM_LOG_CDROM 51201 +#endif +#ifdef ENABLE_D86F_LOG +# define IDM_LOG_D86F 51202 +#endif +#ifdef ENABLE_FDC_LOG +# define IDM_LOG_FDC 51203 +#endif +#ifdef ENABLE_IDE_LOG +# define IDM_LOG_IDE 51204 +#endif +#ifdef ENABLE_NIC_LOG +# define IDM_LOG_NIC 51205 +#endif +#ifdef ENABLE_SERIAL_LOG +# define IDM_LOG_SERIAL 51208 #endif #ifdef ENABLE_LOG_BREAKPOINT # define IDM_LOG_BREAKPOINT 51206 @@ -368,81 +366,81 @@ # define IDM_DUMP_VRAM 51207 #endif -#define IDC_COMBO1 1000 -#define IDC_COMBOVID 1001 -#define IDC_COMBO3 1002 -#define IDC_COMBO4 1003 -#define IDC_COMBO5 1004 -#define IDC_COMBO386 1005 -#define IDC_COMBO486 1006 -#define IDC_COMBOSND 1007 -#define IDC_COMBONETTYPE 1008 -#define IDC_COMBOPCAP 1009 -#define IDC_COMBONET 1010 -#define IDC_COMBOCPUM 1060 -#define IDC_COMBOSPD 1061 -#define IDC_COMBODR1 1062 -#define IDC_COMBODR2 1063 -#define IDC_COMBODR3 1064 -#define IDC_COMBODR4 1065 -#define IDC_COMBOJOY 1066 -#define IDC_COMBOWS 1067 -#define IDC_COMBOMOUSE 1068 -#define IDC_COMBOHDD 1069 -#define IDC_CHECK1 1010 -#define IDC_CHECK2 1011 -#define IDC_CHECK3 1012 -#define IDC_CHECKSSI 1014 -#define IDC_CHECKVOODOO 1015 -#define IDC_CHECKDYNAREC 1016 -#define IDC_CHECKBUSLOGIC 1017 -#define IDC_CHECKSYNC 1024 -#define IDC_CHECKXTIDE 1025 -#define IDC_CHECKFPU 1026 -#define IDC_EDIT1 1030 -#define IDC_EDIT2 1031 -#define IDC_EDIT3 1032 -#define IDC_EDIT4 1033 -#define IDC_EDIT5 1034 -#define IDC_EDIT6 1035 -#define IDC_COMBOHDT 1036 +#define IDC_COMBO1 1000 +#define IDC_COMBOVID 1001 +#define IDC_COMBO3 1002 +#define IDC_COMBO4 1003 +#define IDC_COMBO5 1004 +#define IDC_COMBO386 1005 +#define IDC_COMBO486 1006 +#define IDC_COMBOSND 1007 +#define IDC_COMBONETTYPE 1008 +#define IDC_COMBOPCAP 1009 +#define IDC_COMBONET 1010 /*FIXME*/ +#define IDC_CHECK1 1010 /*FIXME*/ +#define IDC_CHECK2 1011 +#define IDC_CHECK3 1012 +#define IDC_CHECKSSI 1014 +#define IDC_CHECKVOODOO 1015 +#define IDC_CHECKDYNAREC 1016 +#define IDC_CHECKBUSLOGIC 1017 +#define IDC_CHECKSYNC 1024 +#define IDC_CHECKXTIDE 1025 +#define IDC_CHECKFPU 1026 +#define IDC_EDIT1 1030 +#define IDC_EDIT2 1031 +#define IDC_EDIT3 1032 +#define IDC_EDIT4 1033 +#define IDC_EDIT5 1034 +#define IDC_EDIT6 1035 +#define IDC_COMBOHDT 1036 +#define IDC_COMBOCPUM 1060 +#define IDC_COMBOSPD 1061 +#define IDC_COMBODR1 1062 +#define IDC_COMBODR2 1063 +#define IDC_COMBODR3 1064 +#define IDC_COMBODR4 1065 +#define IDC_COMBOJOY 1066 +#define IDC_COMBOWS 1067 +#define IDC_COMBOMOUSE 1068 +#define IDC_COMBOHDD 1069 -#define IDC_CFILE 1060 +#define IDC_CFILE 1060 -#define IDC_HDTYPE 1280 +#define IDC_HDTYPE 1280 -#define IDC_RENDER 1281 -#define IDC_STATUS 1282 +#define IDC_RENDER 1281 +#define IDC_STATUS 1282 -#define IDC_MEMSPIN 1100 -#define IDC_MEMTEXT 1101 -#define IDC_STEXT1 1102 -#define IDC_STEXT2 1103 -#define IDC_STEXT3 1104 -#define IDC_STEXT4 1105 -#define IDC_STEXT5 1106 -#define IDC_STEXT6 1107 -#define IDC_STEXT7 1108 -#define IDC_STEXT8 1109 -#define IDC_STEXT_DEVICE 1110 -#define IDC_TEXT_MB 1111 -#define IDC_TEXT1 1115 -#define IDC_TEXT2 1116 +#define IDC_MEMSPIN 1100 +#define IDC_MEMTEXT 1101 +#define IDC_STEXT1 1102 +#define IDC_STEXT2 1103 +#define IDC_STEXT3 1104 +#define IDC_STEXT4 1105 +#define IDC_STEXT5 1106 +#define IDC_STEXT6 1107 +#define IDC_STEXT7 1108 +#define IDC_STEXT8 1109 +#define IDC_STEXT_DEVICE 1110 +#define IDC_TEXT_MB 1111 +#define IDC_TEXT1 1115 +#define IDC_TEXT2 1116 -#define IDC_CONFIGUREVID 1200 -#define IDC_CONFIGURESND 1201 -#define IDC_CONFIGUREVOODOO 1202 -#define IDC_CONFIGUREMOD 1203 -#define IDC_CONFIGURENETTYPE 1204 -#define IDC_CONFIGUREBUSLOGIC 1205 -#define IDC_CONFIGUREPCAP 1206 -#define IDC_CONFIGURENET 1207 -#define IDC_JOY1 1210 -#define IDC_JOY2 1211 -#define IDC_JOY3 1212 -#define IDC_JOY4 1213 +#define IDC_CONFIGUREVID 1200 +#define IDC_CONFIGURESND 1201 +#define IDC_CONFIGUREVOODOO 1202 +#define IDC_CONFIGUREMOD 1203 +#define IDC_CONFIGURENETTYPE 1204 +#define IDC_CONFIGUREBUSLOGIC 1205 +#define IDC_CONFIGUREPCAP 1206 +#define IDC_CONFIGURENET 1207 +#define IDC_JOY1 1210 +#define IDC_JOY2 1211 +#define IDC_JOY3 1212 +#define IDC_JOY4 1213 -#define IDC_CONFIG_BASE 1200 +#define IDC_CONFIG_BASE 1200 /* The biggest amount of low bits needed for CD-ROMS (2 bits for ID and 5 bits for host drive, so 7 bits), and removable disks (5 bits for ID), so we choose an 256-entry spacing for convenience. */ @@ -479,3 +477,6 @@ #endif #define STRINGS_NUM 178 + + +#endif /*WIN_RESOURCE_H*/ diff --git a/src/WIN/win.c b/src/WIN/win.c index c7dbdabe7..410774cf8 100644 --- a/src/WIN/win.c +++ b/src/WIN/win.c @@ -8,7 +8,7 @@ * * The Emulator's Windows core. * - * Version: @(#)win.c 1.0.0 2017/05/30 + * Version: @(#)win.c 1.0.1 2017/06/03 * * Authors: Sarah Walker, * Miran Grca, @@ -1407,7 +1407,7 @@ int WINAPI WinMain (HINSTANCE hThisInstance, HINSTANCE hPrevInstance, LPSTR lpsz menu = LoadMenu(hThisInstance, TEXT("MainMenu")); - _swprintf(emulator_title, L"86Box v%s", emulator_version_w); + _swprintf(emulator_title, L"%s v%s", EMU_NAME_W, EMU_VERSION_W); /* The class is registered, let's create the program*/ hwnd = CreateWindowEx ( @@ -1484,24 +1484,28 @@ int WINAPI WinMain (HINSTANCE hThisInstance, HINSTANCE hPrevInstance, LPSTR lpsz else SetWindowLongPtr(hwnd, GWL_STYLE, (WS_OVERLAPPEDWINDOW&~WS_SIZEBOX&~WS_THICKFRAME&~WS_MAXIMIZEBOX&~WS_MINIMIZEBOX)|WS_VISIBLE); #ifdef ENABLE_LOG_TOGGLES -#ifdef ENABLE_BUSLOGIC_LOG +# ifdef ENABLE_BUSLOGIC_LOG CheckMenuItem(menu, IDM_LOG_BUSLOGIC, buslogic_do_log ? MF_CHECKED : MF_UNCHECKED); -#endif -#ifdef ENABLE_CDROM_LOG +# endif +# ifdef ENABLE_CDROM_LOG CheckMenuItem(menu, IDM_LOG_CDROM, cdrom_do_log ? MF_CHECKED : MF_UNCHECKED); -#endif -#ifdef ENABLE_D86F_LOG +# endif +# ifdef ENABLE_D86F_LOG CheckMenuItem(menu, IDM_LOG_D86F, d86f_do_log ? MF_CHECKED : MF_UNCHECKED); -#endif -#ifdef ENABLE_FDC_LOG +# endif +# ifdef ENABLE_FDC_LOG CheckMenuItem(menu, IDM_LOG_FDC, fdc_do_log ? MF_CHECKED : MF_UNCHECKED); -#endif -#ifdef ENABLE_IDE_LOG +# endif +# ifdef ENABLE_IDE_LOG CheckMenuItem(menu, IDM_LOG_IDE, ide_do_log ? MF_CHECKED : MF_UNCHECKED); -#endif -#ifdef ENABLE_NE2000_LOG - CheckMenuItem(menu, IDM_LOG_NE2000, ne2000_do_log ? MF_CHECKED : MF_UNCHECKED); -#endif +# endif +# ifdef ENABLE_SERIAL_LOG + CheckMenuItem(menu, IDM_LOG_SERIAL, serial_do_log ? MF_CHECKED : MF_UNCHECKED); +# endif +# ifdef ENABLE_NIC_LOG + /*FIXME: should be network_setlog(1:0) */ + CheckMenuItem(menu, IDM_LOG_NIC, nic_do_log ? MF_CHECKED : MF_UNCHECKED); +# endif #endif CheckMenuItem(menu, IDM_VID_FORCE43, force_43 ? MF_CHECKED : MF_UNCHECKED); @@ -1754,7 +1758,7 @@ static BOOL CALLBACK about_dlgproc(HWND hdlg, UINT message, WPARAM wParam, LPARA void about_open(HWND hwnd) { - DialogBox(hinstance, (LPCTSTR) ABOUTDLG, hwnd, about_dlgproc); + DialogBox(hinstance, (LPCTSTR)DLG_ABOUT, hwnd, about_dlgproc); } static void win_pc_reset(int hard) @@ -1982,10 +1986,18 @@ LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM break; #endif -#ifdef ENABLE_NE2000_LOG - case IDM_LOG_NE2000: - ne2000_do_log ^= 1; - CheckMenuItem(hmenu, IDM_LOG_NE2000, ne2000_do_log ? MF_CHECKED : MF_UNCHECKED); +#ifdef ENABLE_SERIAL_LOG + case IDM_LOG_SERIAL: + serial_do_log ^= 1; + CheckMenuItem(hmenu, IDM_LOG_SERIAL, serial_do_log ? MF_CHECKED : MF_UNCHECKED); + break; +#endif + +#ifdef ENABLE_NIC_LOG + case IDM_LOG_NIC: + /*FIXME: should be network_setlog() */ + nic_do_log ^= 1; + CheckMenuItem(hmenu, IDM_LOG_NIC, nic_do_log ? MF_CHECKED : MF_UNCHECKED); break; #endif #endif diff --git a/src/WIN/win_d3d_fs.cc b/src/WIN/win_d3d_fs.cc index 811dec696..0f894dc34 100644 --- a/src/WIN/win_d3d_fs.cc +++ b/src/WIN/win_d3d_fs.cc @@ -8,7 +8,7 @@ * * Direct3D 9 full screen rendererer and screenshots taking. * - * Version: @(#)win_d3d_fs.cc 1.0.0 2017/05/30 + * Version: @(#)win_d3d_fs.cc 1.0.1 2017/06/03 * * Authors: Sarah Walker, * Miran Grca, @@ -168,7 +168,8 @@ int d3d_fs_init(HWND h) d3d_hwnd = h; - _swprintf(emulator_title, L"86Box v%s", emulator_version_w); + /*FIXME: should be done once, in win.c */ + _swprintf(emulator_title, L"%s v%s", EMU_NAME_W, EMU_VERSION_W); d3d_device_window = CreateWindowEx ( 0, szSubClassName, diff --git a/src/WIN/win_settings.c b/src/WIN/win_settings.c index 97cd7ed5b..392477e9d 100644 --- a/src/WIN/win_settings.c +++ b/src/WIN/win_settings.c @@ -8,7 +8,7 @@ * * Windows 86Box Settings dialog handler. * - * Version: @(#)win_midi.c 1.0.0 2017/05/30 + * Version: @(#)win_settings.c 1.0.1 2017/06/03 * * Author: Miran Grca, * Copyright 2016-2017 Miran Grca. @@ -25,8 +25,8 @@ #include "../mem.h" #include "../cpu/cpu.h" #include "../nvr.h" -#include "../model.h" #include "../device.h" +#include "../model.h" #include "../cdrom.h" #include "../disc.h" #include "../fdd.h" @@ -3118,7 +3118,8 @@ void hard_disk_add_open(HWND hwnd, int is_existing) existing = is_existing; hard_disk_added = 0; - ret = DialogBox(hinstance, (LPCWSTR) CONFIGUREDLG_HARD_DISKS_ADD, hwnd, win_settings_hard_disks_add_proc); + ret = DialogBox(hinstance, (LPCWSTR)DLG_CFG_HARD_DISKS_ADD, + hwnd, win_settings_hard_disks_add_proc); } int ignore_change = 0; @@ -4077,28 +4078,28 @@ void win_settings_show_child(HWND hwndParent, DWORD child_id) switch(child_id) { case 0: - hwndChildDialog = CreateDialog(hinstance, (LPCWSTR) CONFIGUREDLG_MACHINE, hwndParent, win_settings_machine_proc); + hwndChildDialog = CreateDialog(hinstance, (LPCWSTR)DLG_CFG_MACHINE, hwndParent, win_settings_machine_proc); break; case 1: - hwndChildDialog = CreateDialog(hinstance, (LPCWSTR) CONFIGUREDLG_VIDEO, hwndParent, win_settings_video_proc); + hwndChildDialog = CreateDialog(hinstance, (LPCWSTR)DLG_CFG_VIDEO, hwndParent, win_settings_video_proc); break; case 2: - hwndChildDialog = CreateDialog(hinstance, (LPCWSTR) CONFIGUREDLG_INPUT, hwndParent, win_settings_input_proc); + hwndChildDialog = CreateDialog(hinstance, (LPCWSTR)DLG_CFG_INPUT, hwndParent, win_settings_input_proc); break; case 3: - hwndChildDialog = CreateDialog(hinstance, (LPCWSTR) CONFIGUREDLG_SOUND, hwndParent, win_settings_sound_proc); + hwndChildDialog = CreateDialog(hinstance, (LPCWSTR)DLG_CFG_SOUND, hwndParent, win_settings_sound_proc); break; case 4: - hwndChildDialog = CreateDialog(hinstance, (LPCWSTR) CONFIGUREDLG_NETWORK, hwndParent, win_settings_network_proc); + hwndChildDialog = CreateDialog(hinstance, (LPCWSTR)DLG_CFG_NETWORK, hwndParent, win_settings_network_proc); break; case 5: - hwndChildDialog = CreateDialog(hinstance, (LPCWSTR) CONFIGUREDLG_PERIPHERALS, hwndParent, win_settings_peripherals_proc); + hwndChildDialog = CreateDialog(hinstance, (LPCWSTR)DLG_CFG_PERIPHERALS, hwndParent, win_settings_peripherals_proc); break; case 6: - hwndChildDialog = CreateDialog(hinstance, (LPCWSTR) CONFIGUREDLG_HARD_DISKS, hwndParent, win_settings_hard_disks_proc); + hwndChildDialog = CreateDialog(hinstance, (LPCWSTR)DLG_CFG_HARD_DISKS, hwndParent, win_settings_hard_disks_proc); break; case 7: - hwndChildDialog = CreateDialog(hinstance, (LPCWSTR) CONFIGUREDLG_REMOVABLE_DEVICES, hwndParent, win_settings_removable_devices_proc); + hwndChildDialog = CreateDialog(hinstance, (LPCWSTR)DLG_CFG_REMOVABLE_DEVICES, hwndParent, win_settings_removable_devices_proc); break; default: fatal("Invalid child dialog ID\n"); @@ -4239,5 +4240,5 @@ static BOOL CALLBACK win_settings_main_proc(HWND hdlg, UINT message, WPARAM wPar void win_settings_open(HWND hwnd) { - DialogBox(hinstance, (LPCWSTR) CONFIGUREDLG_MAIN, hwnd, win_settings_main_proc); + DialogBox(hinstance, (LPCWSTR)DLG_CONFIG, hwnd, win_settings_main_proc); } diff --git a/src/WIN/win_status.c b/src/WIN/win_status.c index 32012cb75..fbc1949ad 100644 --- a/src/WIN/win_status.c +++ b/src/WIN/win_status.c @@ -89,6 +89,6 @@ static BOOL CALLBACK status_dlgproc(HWND hdlg, UINT message, WPARAM wParam, LPAR void status_open(HWND hwnd) { - status_hwnd = CreateDialog(hinstance, TEXT("StatusDlg"), hwnd, status_dlgproc); + status_hwnd = CreateDialog(hinstance, (LPCSTR)DLG_STATUS, hwnd, status_dlgproc); ShowWindow(status_hwnd, SW_SHOW); } diff --git a/src/cdrom.c b/src/cdrom.c index 2f02f42cd..2bcfc20cc 100644 --- a/src/cdrom.c +++ b/src/cdrom.c @@ -9,12 +9,11 @@ * Implementation of the CD-ROM drive with SCSI(-like) * commands, for both ATAPI and SCSI usage. * - * Version: @(#)cdrom.c 1.0.0 2017/05/30 + * Version: @(#)cdrom.c 1.0.1 2017/06/03 * * Author: Miran Grca, * Copyright 2016-2017 Miran Grca. */ - #include #include #include @@ -28,7 +27,7 @@ #include "piix.h" #include "scsi.h" #include "timer.h" -#include "WIN/plat_iodev.h" +#include "win/plat_iodev.h" /* Bits of 'status' */ #define ERR_STAT 0x01 @@ -2341,9 +2340,9 @@ void cdrom_command(uint8_t id, uint8_t *cdb) device_identify[7] = id + 0x30; device_identify_ex[7] = id + 0x30; - device_identify_ex[10] = emulator_version[0]; - device_identify_ex[12] = emulator_version[2]; - device_identify_ex[13] = emulator_version[3]; + device_identify_ex[10] = EMU_VERSION[0]; + device_identify_ex[12] = EMU_VERSION[2]; + device_identify_ex[13] = EMU_VERSION[3]; cdrom[id].data_pos = 0; @@ -3196,7 +3195,7 @@ cdrom_readtoc_fallback: cdbufferb[idx++] = 0x01; cdbufferb[idx++] = 0x00; cdbufferb[idx++] = 68; - ide_padstr8(cdbufferb + idx, 8, "86Box"); /* Vendor */ + ide_padstr8(cdbufferb + idx, 8, EMU_NAME); /* Vendor */ idx += 8; ide_padstr8(cdbufferb + idx, 40, device_identify_ex); /* Product */ idx += 40; @@ -3221,9 +3220,9 @@ cdrom_readtoc_fallback: cdbufferb[3] = (cdrom_drives[id].bus_type == CDROM_BUS_SCSI) ? 0x02 : 0x21; cdbufferb[4] = 31; - ide_padstr8(cdbufferb + 8, 8, "86Box"); /* Vendor */ + ide_padstr8(cdbufferb + 8, 8, EMU_NAME); /* Vendor */ ide_padstr8(cdbufferb + 16, 16, device_identify); /* Product */ - ide_padstr8(cdbufferb + 32, 4, emulator_version); /* Revision */ + ide_padstr8(cdbufferb + 32, 4, EMU_VERSION); /* Revision */ idx = 36; } diff --git a/src/cdrom.h b/src/cdrom.h index 871dc1f02..5b7cb1f8b 100644 --- a/src/cdrom.h +++ b/src/cdrom.h @@ -9,17 +9,16 @@ * Implementation of the CD-ROM drive with SCSI(-like) * commands, for both ATAPI and SCSI usage. * - * Version: @(#)cdrom.h 1.0.0 2017/05/30 + * Version: @(#)cdrom.h 1.0.1 2017/06/03 * * Author: Miran Grca, * Copyright 2016-2017 Miran Grca. */ +#ifndef EMU_CDROM_H +#define EMU_CDROM_H -#ifndef __CDROM_H__ -#define __CDROM_H__ -/*CD-ROM stuff*/ -#define CDROM_NUM 4 +#define CDROM_NUM 4 #define CDROM_PHASE_IDLE 0 #define CDROM_PHASE_COMMAND 1 @@ -37,8 +36,8 @@ #define IDE_TIME (5 * 100 * (1 << TIMER_SHIFT)) #define CDROM_TIME (5 * 100 * (1 << TIMER_SHIFT)) -typedef struct CDROM -{ + +typedef struct { int (*ready)(uint8_t id); int (*medium_changed)(uint8_t id); int (*media_type_id)(uint8_t id); @@ -62,13 +61,8 @@ typedef struct CDROM void (*exit)(uint8_t id); } CDROM; -#ifdef __MSC__ -# pragma pack(push,1) -typedef struct -#else -typedef struct __attribute__((__packed__)) -#endif -{ +#pragma pack(push,1) +typedef struct { uint8_t previous_command; int toctimes; @@ -136,19 +130,10 @@ typedef struct __attribute__((__packed__)) int init_length; } cdrom_t; -#ifdef __MSC__ -# pragma pack(pop) -#endif +#pragma pack(pop) -extern cdrom_t cdrom[CDROM_NUM]; - -#ifdef __MSC__ -# pragma pack(push,1) -typedef struct -#else -typedef struct __attribute__((__packed__)) -#endif -{ +#pragma pack(push,1) +typedef struct { int max_blocks_at_once; CDROM *handler; @@ -168,22 +153,9 @@ typedef struct __attribute__((__packed__)) unsigned int sound_on; unsigned int atapi_dma; } cdrom_drive_t; -#ifdef __MSC__ -# pragma pack(pop) -#endif +#pragma pack(pop) -extern cdrom_drive_t cdrom_drives[CDROM_NUM]; - -extern uint8_t atapi_cdrom_drives[8]; - -extern uint8_t scsi_cdrom_drives[16][8]; - -extern int (*ide_bus_master_read)(int channel, uint8_t *data, int transfer_length); -extern int (*ide_bus_master_write)(int channel, uint8_t *data, int transfer_length); -extern void (*ide_bus_master_set_irq)(int channel); - -typedef struct -{ +typedef struct { int image_is_iso; uint32_t last_block; @@ -200,10 +172,7 @@ typedef struct int cd_buflen; } cdrom_image_t; -cdrom_image_t cdrom_image[CDROM_NUM]; - -typedef struct -{ +typedef struct { uint32_t last_block; uint32_t cdrom_capacity; int ioctl_inited; @@ -223,20 +192,29 @@ typedef struct int last_subchannel_pos; } cdrom_ioctl_t; -void ioctl_close(uint8_t id); -cdrom_ioctl_t cdrom_ioctl[CDROM_NUM]; +extern cdrom_t cdrom[CDROM_NUM]; +extern cdrom_drive_t cdrom_drives[CDROM_NUM]; +extern uint8_t atapi_cdrom_drives[8]; +extern uint8_t scsi_cdrom_drives[16][8]; + cdrom_image_t cdrom_image[CDROM_NUM]; + cdrom_ioctl_t cdrom_ioctl[CDROM_NUM]; -uint32_t cdrom_mode_sense_get_channel(uint8_t id, int channel); -uint32_t cdrom_mode_sense_get_volume(uint8_t id, int channel); -void build_atapi_cdrom_map(); -void build_scsi_cdrom_map(); -int cdrom_CDROM_PHASE_to_scsi(uint8_t id); -int cdrom_atapi_phase_to_scsi(uint8_t id); -void cdrom_command(uint8_t id, uint8_t *cdb); -void cdrom_phase_callback(uint8_t id); -uint32_t cdrom_read(uint8_t channel, int length); -void cdrom_write(uint8_t channel, uint32_t val, int length); +extern int (*ide_bus_master_read)(int channel, uint8_t *data, int transfer_length); +extern int (*ide_bus_master_write)(int channel, uint8_t *data, int transfer_length); +extern void (*ide_bus_master_set_irq)(int channel); +extern void ioctl_close(uint8_t id); + +extern uint32_t cdrom_mode_sense_get_channel(uint8_t id, int channel); +extern uint32_t cdrom_mode_sense_get_volume(uint8_t id, int channel); +extern void build_atapi_cdrom_map(void); +extern void build_scsi_cdrom_map(void); +extern int cdrom_CDROM_PHASE_to_scsi(uint8_t id); +extern int cdrom_atapi_phase_to_scsi(uint8_t id); +extern void cdrom_command(uint8_t id, uint8_t *cdb); +extern void cdrom_phase_callback(uint8_t id); +extern uint32_t cdrom_read(uint8_t channel, int length); +extern void cdrom_write(uint8_t channel, uint32_t val, int length); #ifdef __cplusplus extern "C" { @@ -262,4 +240,5 @@ int find_cdrom_for_scsi_id(uint8_t scsi_id, uint8_t scsi_lun); #define cdrom_ascq cdrom[id].sense[13] #define cdrom_drive cdrom_drives[id].host_drive -#endif \ No newline at end of file + +#endif /*EMU_CDROM_H*/ diff --git a/src/cdrom_ioctl.c b/src/cdrom_ioctl.c index 408f691b7..201753e47 100644 --- a/src/cdrom_ioctl.c +++ b/src/cdrom_ioctl.c @@ -9,14 +9,13 @@ * Implementation of the CD-ROM host drive IOCTL interface for * Windows using SCSI Passthrough Direct. * - * Version: @(#)cdrom_ioctl.c 1.0.1 2017/05/31 + * Version: @(#)cdrom_ioctl.c 1.0.2 2017/06/03 * - * Author: Sarah Walker, + * Authors: Sarah Walker, * Miran Grca, * Copyright 2008-2016 Sarah Walker. * Copyright 2016-2017 Miran Grca. */ - #define WINVER 0x0600 #include #include diff --git a/src/cdrom_ioctl.h b/src/cdrom_ioctl.h index a5c710230..b57689bf9 100644 --- a/src/cdrom_ioctl.h +++ b/src/cdrom_ioctl.h @@ -9,25 +9,27 @@ * Implementation of the CD-ROM host drive IOCTL interface for * Windows using SCSI Passthrough Direct. * - * Version: @(#)cdrom_ioctl.h 1.0.0 2017/05/30 + * This file lists the functions provided by various platform- + * specific cdrom-ioctl files. * - * Author: Sarah Walker, + * Version: @(#)cdrom_ioctl.h 1.0.1 2017/06/03 + * + * Authors: Sarah Walker, * Miran Grca, * Copyright 2008-2016 Sarah Walker. * Copyright 2016-2017 Miran Grca. */ +#ifndef EMU_CDROM_IOCTL_H +#define EMU_CDROM_IOCTL_H -#ifndef CDROM_IOCTL_H -#define CDROM_IOCTL_H - -/* this header file lists the functions provided by - various platform specific cdrom-ioctl files */ extern uint32_t cdrom_capacity; - -extern int ioctl_open(uint8_t id, char d); -extern void ioctl_reset(uint8_t id); -extern void ioctl_close(uint8_t id); -#endif /* ! CDROM_IOCTL_H */ +extern int ioctl_open(uint8_t id, char d); +extern void ioctl_reset(uint8_t id); + +extern void ioctl_close(uint8_t id); + + +#endif /*EMU_CDROM_IOCTL_H */ diff --git a/src/cdrom_null.c b/src/cdrom_null.c index c9d759bba..91acaf92f 100644 --- a/src/cdrom_null.c +++ b/src/cdrom_null.c @@ -9,20 +9,21 @@ * Implementation of the CD-ROM null interface for unmounted * guest CD-ROM drives. * - * Version: @(#)cdrom_null.c 1.0.0 2017/05/30 + * Version: @(#)cdrom_null.c 1.0.1 2017/06/03 * - * Author: Sarah Walker, + * Authors: Sarah Walker, * Miran Grca, * Copyright 2008-2016 Sarah Walker. * Copyright 2016-2017 Miran Grca. */ - #include "ibm.h" #include "cdrom.h" #include "cdrom_ioctl.h" + static CDROM null_cdrom; + static int null_ready(uint8_t id) { return 0; diff --git a/src/cdrom_null.h b/src/cdrom_null.h index 69117d43f..75cc71da5 100644 --- a/src/cdrom_null.h +++ b/src/cdrom_null.h @@ -9,22 +9,20 @@ * Implementation of the CD-ROM null interface for unmounted * guest CD-ROM drives. * - * Version: @(#)cdrom_null.h 1.0.0 2017/05/30 + * Version: @(#)cdrom_null.h 1.0.1 2017/06/03 * - * Author: Sarah Walker, + * Authors: Sarah Walker, * Miran Grca, * Copyright 2008-2016 Sarah Walker. * Copyright 2016-2017 Miran Grca. */ +#ifndef EMU_CDROM_NULL_H +#define EMU_CDROM_NULL_H -#ifndef CDROM_NULL_H -#define CDROM_NULL_H -/* this header file lists the functions provided by - various platform specific cdrom-ioctl files */ +extern int cdrom_null_open(uint8_t id, char d); +extern void cdrom_null_reset(uint8_t id); +extern void null_close(uint8_t id); -int cdrom_null_open(uint8_t id, char d); -void cdrom_null_reset(uint8_t id); -void null_close(uint8_t id); -#endif /* ! CDROM_NULL_H */ +#endif /*EMU_CDROM_NULL_H*/ diff --git a/src/device.c b/src/device.c index 1f7e5b577..9b90c9ea1 100644 --- a/src/device.c +++ b/src/device.c @@ -9,14 +9,13 @@ * Implementation of the generic device interface to handle * all devices attached to the emulator. * - * Version: @(#)device.c 1.0.0 2017/05/30 + * Version: @(#)device.c 1.0.1 2017/06/03 * - * Author: Sarah Walker, + * Authors: Sarah Walker, * Miran Grca, * Copyright 2008-2016 Sarah Walker. * Copyright 2016-2017 Miran Grca. */ - #include "ibm.h" #include "cpu/cpu.h" #include "config.h" @@ -27,10 +26,10 @@ static void *device_priv[256]; static device_t *devices[256]; - static device_t *current_device; -void device_init() + +void device_init(void) { memset(devices, 0, sizeof(devices)); } @@ -86,7 +85,7 @@ int device_available(device_t *d) return 1; } -void device_speed_changed() +void device_speed_changed(void) { int c; @@ -104,7 +103,7 @@ void device_speed_changed() sound_speed_changed(); } -void device_force_redraw() +void device_force_redraw(void) { int c; diff --git a/src/device.h b/src/device.h index acb875dcc..5a2f9b17e 100644 --- a/src/device.h +++ b/src/device.h @@ -9,21 +9,35 @@ * Implementation of the generic device interface to handle * all devices attached to the emulator. * - * Version: @(#)device.h 1.0.0 2017/05/30 + * Version: @(#)device.h 1.0.1 2017/06/03 * - * Author: Sarah Walker, + * Authors: Sarah Walker, * Miran Grca, * Copyright 2008-2016 Sarah Walker. * Copyright 2016-2017 Miran Grca. */ +#ifndef EMU_DEVICE_H +# define EMU_DEVICE_H -#define CONFIG_STRING 0 -#define CONFIG_INT 1 -#define CONFIG_BINARY 2 + +#define CONFIG_STRING 0 +#define CONFIG_INT 1 +#define CONFIG_BINARY 2 #define CONFIG_SELECTION 3 -#define CONFIG_HEX16 4 -#define CONFIG_HEX20 5 -#define CONFIG_MAC 6 +#define CONFIG_HEX16 4 +#define CONFIG_HEX20 5 +#define CONFIG_MAC 6 + + +enum +{ + DEVICE_NOT_WORKING = 1, /*Device does not currently work correctly and will be disabled in a release build*/ + DEVICE_AT = 2, /*Device requires an AT-compatible system*/ + DEVICE_PS2 = 4, /*Device requires a PS/1 or PS/2 system*/ + DEVICE_MCA = 0x20, /*Device requires the MCA bus*/ + DEVICE_PCI = 0x40 /*Device requires the PCI bus*/ +}; + typedef struct device_config_selection_t { @@ -54,33 +68,28 @@ typedef struct device_t device_config_t *config; } device_t; -void device_init(); -void device_add(device_t *d); -void device_close_all(); -int device_available(device_t *d); -void device_speed_changed(); -void device_force_redraw(); -char *device_add_status_info(char *s, int max_len); -int device_get_config_int(char *name); -int device_get_config_int_ex(char *s, int default_int); -int device_get_config_hex16(char *name); -int device_get_config_hex20(char *name); -int device_get_config_mac(char *name, int default_int); -void device_set_config_int(char *s, int val); -void device_set_config_hex16(char *s, int val); -void device_set_config_hex20(char *s, int val); -void device_set_config_mac(char *s, int val); -char *device_get_config_string(char *name); +extern void device_init(void); +extern void device_add(device_t *d); +extern void device_close_all(void); +extern int device_available(device_t *d); +extern void device_speed_changed(void); +extern void device_force_redraw(void); +extern char *device_add_status_info(char *s, int max_len); -enum -{ - DEVICE_NOT_WORKING = 1, /*Device does not currently work correctly and will be disabled in a release build*/ - DEVICE_AT = 2, /*Device requires an AT-compatible system*/ - DEVICE_PS2 = 4, /*Device requires a PS/1 or PS/2 system*/ - DEVICE_MCA = 0x20, /*Device requires the MCA bus*/ - DEVICE_PCI = 0x40 /*Device requires the PCI bus*/ -}; +extern int device_get_config_int(char *name); +extern int device_get_config_int_ex(char *s, int default_int); +extern int device_get_config_hex16(char *name); +extern int device_get_config_hex20(char *name); +extern int device_get_config_mac(char *name, int default_int); +extern void device_set_config_int(char *s, int val); +extern void device_set_config_hex16(char *s, int val); +extern void device_set_config_hex20(char *s, int val); +extern void device_set_config_mac(char *s, int val); +extern char *device_get_config_string(char *name); -int model_get_config_int(char *s); -char *model_get_config_string(char *s); +extern int model_get_config_int(char *s); +extern char *model_get_config_string(char *s); + + +#endif /*EMU_DEVICE_H*/ diff --git a/src/disc.c b/src/disc.c index 46b2517c6..015f4ff11 100644 --- a/src/disc.c +++ b/src/disc.c @@ -9,19 +9,17 @@ * Generic floppy disk interface that communicates with the * other handlers. * - * Version: @(#)disc.c 1.0.0 2017/05/30 + * Version: @(#)disc.c 1.0.1 2017/06/03 * - * Author: Sarah Walker, + * Authors: Sarah Walker, * Miran Grca, * Copyright 2008-2017 Sarah Walker. * Copyright 2016-2017 Miran Grca. */ - #define UNICODE #include #include "ibm.h" - #include "config.h" #include "disc.h" #include "disc_fdi.h" @@ -33,6 +31,7 @@ #include "fdd.h" #include "timer.h" + wchar_t discfns[4][256]; extern int driveempty[4]; @@ -76,14 +75,14 @@ int (*fdc_getdata)(int last); void (*fdc_sectorid)(uint8_t track, uint8_t side, uint8_t sector, uint8_t size, uint8_t crc1, uint8_t crc2); void (*fdc_indexpulse)();*/ + static struct { wchar_t *ext; void (*load)(int drive, wchar_t *fn); void (*close)(int drive); int size; -} -loaders[]= +} loaders[]= { {L"001", img_load, img_close, -1}, {L"002", img_load, img_close, -1}, diff --git a/src/disc.h b/src/disc.h index 62ba83d83..b065b4b53 100644 --- a/src/disc.h +++ b/src/disc.h @@ -9,16 +9,20 @@ * Generic floppy disk interface that communicates with the * other handlers. * - * Version: @(#)disc.h 1.0.0 2017/05/30 + * Version: @(#)disc.h 1.0.1 2017/06/03 * - * Author: Sarah Walker, + * Authors: Sarah Walker, * Miran Grca, * Copyright 2008-2017 Sarah Walker. * Copyright 2016-2017 Miran Grca. */ +#ifndef EMU_DISC_H +# define EMU_DISC_H + #define FDD_NUM 4 + typedef struct { void (*seek)(int drive, int track); @@ -33,42 +37,49 @@ typedef struct void (*poll)(int drive); } DRIVE; -extern DRIVE drives[FDD_NUM]; -extern int curdrive; +extern DRIVE drives[FDD_NUM]; +extern int curdrive; -void disc_load(int drive, wchar_t *fn); -void disc_new(int drive, char *fn); -void disc_close(int drive); -void disc_init(); -void disc_reset(); -void disc_poll(int drive); -void disc_poll_0(); -void disc_poll_1(); -void disc_seek(int drive, int track); -void disc_readsector(int drive, int sector, int track, int side, int density, int sector_size); -void disc_writesector(int drive, int sector, int track, int side, int density, int sector_size); -void disc_comparesector(int drive, int sector, int track, int side, int density, int sector_size); -void disc_readaddress(int drive, int side, int density); -void disc_format(int drive, int side, int density, uint8_t fill); -int disc_hole(int drive); -double disc_byteperiod(int drive); -void disc_stop(int drive); -int disc_empty(int drive); -void disc_set_rate(int drive, int drvden, int rate); -extern int disc_time; -extern int disc_poll_time[FDD_NUM]; +extern int disc_time; +extern int disc_poll_time[FDD_NUM]; + + +extern void disc_load(int drive, wchar_t *fn); +extern void disc_new(int drive, char *fn); +extern void disc_close(int drive); +extern void disc_init(void); +extern void disc_reset(void); +extern void disc_poll(int drive); +extern void disc_poll_0(void); +extern void disc_poll_1(void); +extern void disc_seek(int drive, int track); +extern void disc_readsector(int drive, int sector, int track, + int side, int density, int sector_size); +extern void disc_writesector(int drive, int sector, int track, + int side, int density, int sector_size); +extern void disc_comparesector(int drive, int sector, int track, + int side, int density, int sector_size); +extern void disc_readaddress(int drive, int side, int density); +extern void disc_format(int drive, int side, int density, uint8_t fill); +extern int disc_hole(int drive); +extern double disc_byteperiod(int drive); +extern void disc_stop(int drive); +extern int disc_empty(int drive); +extern void disc_set_rate(int drive, int drvden, int rate); + +extern void fdc_callback(void); +extern int fdc_data(uint8_t dat); +extern void fdc_spindown(void); +extern void fdc_finishread(void); +extern void fdc_datacrcerror(void); +extern void fdc_headercrcerror(void); +extern void fdc_writeprotect(void); +extern int fdc_getdata(int last); +extern void fdc_sectorid(uint8_t track, uint8_t side, uint8_t sector, + uint8_t size, uint8_t crc1, uint8_t crc2); +extern void fdc_indexpulse(void); -void fdc_callback(); -int fdc_data(uint8_t dat); -void fdc_spindown(); -void fdc_finishread(); -void fdc_datacrcerror(); -void fdc_headercrcerror(); -void fdc_writeprotect(); -int fdc_getdata(int last); -void fdc_sectorid(uint8_t track, uint8_t side, uint8_t sector, uint8_t size, uint8_t crc1, uint8_t crc2); -void fdc_indexpulse(); /*extern int fdc_time; extern int fdc_ready; extern int fdc_indexcount;*/ @@ -217,3 +228,6 @@ typedef union uint8_t byte_array[4]; sector_id_fields_t id; } sector_id_t; + + +#endif /*EMU_DISC_H*/ diff --git a/src/dma.c b/src/dma.c index a90156a6d..1e2982adf 100644 --- a/src/dma.c +++ b/src/dma.c @@ -8,14 +8,13 @@ * * Implementation of the Intel DMA controllers. * - * Version: @(#)dma.c 1.0.0 2017/05/30 + * Version: @(#)dma.c 1.0.1 2017/06/03 * - * Author: Sarah Walker, + * Authors: Sarah Walker, * Miran Grca, * Copyright 2008-2017 Sarah Walker. * Copyright 2016-2017 Miran Grca. */ - #include "ibm.h" #include "cpu/x86.h" #include "mem.h" @@ -505,7 +504,7 @@ void dma_alias_remove_piix(void) io_removehandler(0x009C, 0x0003, dma_page_read, NULL, NULL, dma_page_write, NULL, NULL, NULL); } -void ps2_dma_init() +void ps2_dma_init(void) { io_sethandler(0x0018, 0x0001, dma_ps2_read, NULL, NULL, dma_ps2_write, NULL, NULL, NULL); io_sethandler(0x001a, 0x0001, dma_ps2_read, NULL, NULL, dma_ps2_write, NULL, NULL, NULL); diff --git a/src/dma.h b/src/dma.h index 947d80425..29b3bba23 100644 --- a/src/dma.h +++ b/src/dma.h @@ -8,37 +8,46 @@ * * Implementation of the Intel DMA controllers. * - * Version: @(#)dma.h 1.0.0 2017/05/30 + * Version: @(#)dma.h 1.0.1 2017/06/03 * - * Author: Sarah Walker, + * Authors: Sarah Walker, * Miran Grca, * Copyright 2008-2017 Sarah Walker. * Copyright 2016-2017 Miran Grca. */ +#ifndef EMU_DMA_H +# define EMU_DMA_H -void dma_init(void); -void dma16_init(void); -void ps2_dma_init(void); -void dma_reset(void); -int dma_mode(int channel); #define DMA_NODATA -1 #define DMA_OVER 0x10000 #define DMA_VERIFY 0x20000 -void readdma0(void); -int readdma1(void); -uint8_t readdma2(void); -int readdma3(void); -void writedma2(uint8_t temp); +extern void dma_init(void); +extern void dma16_init(void); +extern void ps2_dma_init(void); +extern void dma_reset(void); +extern int dma_mode(int channel); -int dma_channel_read(int channel); -int dma_channel_write(int channel, uint16_t val); +extern void readdma0(void); +extern int readdma1(void); +extern uint8_t readdma2(void); +extern int readdma3(void); -void dma_alias_set(void); -void dma_alias_remove(void); -void dma_alias_remove_piix(void); +extern void writedma2(uint8_t temp); -void DMAPageRead(uint32_t PhysAddress, char *DataRead, uint32_t TotalSize); -void DMAPageWrite(uint32_t PhysAddress, const char *DataWrite, uint32_t TotalSize); +extern int dma_channel_read(int channel); +extern int dma_channel_write(int channel, uint16_t val); + +extern void dma_alias_set(void); +extern void dma_alias_remove(void); +extern void dma_alias_remove_piix(void); + +extern void DMAPageRead(uint32_t PhysAddress, char *DataRead, + uint32_t TotalSize); +extern void DMAPageWrite(uint32_t PhysAddress, const char *DataWrite, + uint32_t TotalSize); + + +#endif /*EMU_DMA_H*/ diff --git a/src/ibm.h b/src/ibm.h index 658ca5513..4291d095e 100644 --- a/src/ibm.h +++ b/src/ibm.h @@ -8,14 +8,13 @@ * * General include file. * - * Version: @(#)ibm.h 1.0.0 2017/05/30 + * Version: @(#)ibm.h 1.0.1 2017/06/03 * - * Author: Sarah Walker, + * Authors: Sarah Walker, * Miran Grca, * Copyright 2008-2017 Sarah Walker. * Copyright 2016-2017 Miran Grca. */ - #include #include #include @@ -703,7 +702,8 @@ extern int cdrom_do_log; extern int d86f_do_log; extern int fdc_do_log; extern int ide_do_log; -extern int ne2000_do_log; +extern int serial_do_log; +extern int nic_do_log; #endif extern int suppress_overscan; diff --git a/src/ide.c b/src/ide.c index b83a84fd6..87822a628 100644 --- a/src/ide.c +++ b/src/ide.c @@ -9,16 +9,15 @@ * Implementation of the IDE emulation for hard disks and ATAPI * CD-ROM devices. * - * Version: @(#)ide.c 1.0.0 2017/05/30 + * Version: @(#)ide.c 1.0.1 2017/06/03 * - * Author: Sarah Walker, + * Authors: Sarah Walker, * Miran Grca, * TheCollector1995, * Copyright 2008-2017 Sarah Walker. * Copyright 2016-2017 Miran Grca. * Copyright 2016-2017 TheCollector1995. */ - #define _LARGEFILE_SOURCE #define _LARGEFILE64_SOURCE #define _GNU_SOURCE @@ -394,7 +393,7 @@ static void ide_identify(IDE *ide) ide->buffer[3] = hdc[ide->hdc_num].hpc; /* Heads */ ide->buffer[6] = hdc[ide->hdc_num].spt; /* Sectors */ ide_padstr((char *) (ide->buffer + 10), "", 20); /* Serial Number */ - ide_padstr((char *) (ide->buffer + 23), emulator_version, 8); /* Firmware */ + ide_padstr((char *) (ide->buffer + 23), EMU_VERSION, 8); /* Firmware */ ide_padstr((char *) (ide->buffer + 27), device_identify, 40); /* Model */ ide->buffer[20] = 3; /*Buffer type*/ ide->buffer[21] = 512; /*Buffer size*/ @@ -465,7 +464,7 @@ static void ide_atapi_identify(IDE *ide) ide->buffer[0] = 0x8000 | (5<<8) | 0x80 | (2<<5); /* ATAPI device, CD-ROM drive, removable media, accelerated DRQ */ ide_padstr((char *) (ide->buffer + 10), "", 20); /* Serial Number */ - ide_padstr((char *) (ide->buffer + 23), emulator_version, 8); /* Firmware */ + ide_padstr((char *) (ide->buffer + 23), EMU_VERSION, 8); /* Firmware */ ide_padstr((char *) (ide->buffer + 27), device_identify, 40); /* Model */ ide->buffer[49] = 0x200; /* LBA supported */ diff --git a/src/ide.h b/src/ide.h index be7fe0c50..003cbbb07 100644 --- a/src/ide.h +++ b/src/ide.h @@ -18,17 +18,12 @@ * Copyright 2016-2017 Miran Grca. * Copyright 2016-2017 TheCollector1995. */ +#ifndef EMU_IDE_H +# define EMU_IDE_H -#ifndef __IDE__ -#define __IDE__ -#ifdef __MSC__ -# pragma pack(push,1) -typedef struct IDE -#else -typedef struct __attribute__((__packed__)) IDE -#endif -{ +#pragma pack(push,1) +typedef struct { int type; int board; uint8_t atastat; @@ -58,50 +53,50 @@ typedef struct __attribute__((__packed__)) IDE uint8_t specify_success; int mdma_mode; } IDE; -#ifdef __MSC__ -# pragma pack(pop) -#endif +#pragma pack(pop) -extern void writeide(int ide_board, uint16_t addr, uint8_t val); -extern void writeidew(int ide_board, uint16_t val); -extern uint8_t readide(int ide_board, uint16_t addr); -extern uint16_t readidew(int ide_board); -extern void callbackide(int ide_board); -extern void resetide(void); -extern void ide_init(); -extern void ide_xtide_init(); -extern void ide_ter_init(); -extern void ide_qua_init(); -extern void ide_pri_enable(); -extern void ide_sec_enable(); -extern void ide_ter_enable(); -extern void ide_qua_enable(); -extern void ide_pri_disable(); -extern void ide_sec_disable(); -extern void ide_ter_disable(); -extern void ide_qua_disable(); -extern void ide_set_bus_master(int (*read)(int channel, uint8_t *data, int transfer_length), int (*write)(int channel, uint8_t *data, int transfer_length), void (*set_irq)(int channel)); extern int ideboard; extern int ide_enable[5]; extern int ide_irq[5]; +IDE ide_drives[IDE_NUM + XTIDE_NUM]; + + extern int idecallback[5]; +extern void writeide(int ide_board, uint16_t addr, uint8_t val); +extern void writeidew(int ide_board, uint16_t val); +extern uint8_t readide(int ide_board, uint16_t addr); +extern uint16_t readidew(int ide_board); +extern void callbackide(int ide_board); +extern void resetide(void); +extern void ide_init(void); +extern void ide_xtide_init(void); +extern void ide_ter_init(void); +extern void ide_qua_init(void); +extern void ide_pri_enable(void); +extern void ide_sec_enable(void); +extern void ide_ter_enable(void); +extern void ide_qua_enable(void); +extern void ide_pri_disable(void); +extern void ide_sec_disable(void); +extern void ide_ter_disable(void); +extern void ide_qua_disable(void); +extern void ide_set_bus_master(int (*read)(int channel, uint8_t *data, int transfer_length), int (*write)(int channel, uint8_t *data, int transfer_length), void (*set_irq)(int channel)); void ide_irq_raise(IDE *ide); void ide_irq_lower(IDE *ide); -IDE ide_drives[IDE_NUM + XTIDE_NUM]; - void ide_padstr8(uint8_t *buf, int buf_size, const char *src); void win_cdrom_eject(uint8_t id); void win_cdrom_reload(uint8_t id); -#endif - -void ide_pri_disable(); -void ide_pri_enable_ex(); +void ide_pri_disable(void); +void ide_pri_enable_ex(void); void ide_set_base(int controller, uint16_t port); void ide_set_side(int controller, uint16_t port); + + +#endif /*EMU_IDE_H*/ diff --git a/src/model.c b/src/model.c index 209bbb017..b08d3a01f 100644 --- a/src/model.c +++ b/src/model.c @@ -8,21 +8,22 @@ * * Handling of the emulated machines. * - * Version: @(#)model.c 1.0.0 2017/05/30 + * Version: @(#)model.c 1.0.1 2017/06/03 * - * Author: Sarah Walker, + * Authors: Sarah Walker, * Miran Grca, * Copyright 2008-2017 Sarah Walker. * Copyright 2016-2017 Miran Grca. */ - #include #include + #include "ibm.h" #include "cpu/cpu.h" #include "io.h" #include "mem.h" #include "rom.h" +#include "device.h" #include "model.h" #include "mouse.h" #include "mouse_ps2.h" @@ -32,7 +33,6 @@ #include "ali1429.h" #include "amstrad.h" #include "compaq.h" -#include "device.h" #include "disc.h" #include "dma.h" #include "fdc.h" @@ -92,56 +92,57 @@ #include "xtide.h" #include "bugger.h" -void xt_init(); -void pcjr_init(); -void tandy1k_init(); -void tandy1ksl2_init(); -void ams_init(); -void europc_init(); -void olim24_init(); -void at_init(); -void ibm_at_init(); -void at_ide_init(); -void deskpro386_init(); -void ps1_m2011_init(); -void ps1_m2121_init(); -void ps1_m2133_init(); -void ps2_m30_286_init(); -void ps2_model_50_init(); -void ps2_model_55sx_init(); -void ps2_model_80_init(); -void at_neat_init(); -void at_scat_init(); -void at_wd76c10_init(); -void at_ali1429_init(); -void at_headland_init(); -void at_opti495_init(); -void at_sis496_init(); -void at_i430vx_init(); -void at_batman_init(); -void at_endeavor_init(); -void at_dtk486_init(); -void at_r418_init(); -#if 0 -void at_586mc1_init(); -#endif -void at_plato_init(); -void at_mb500n_init(); -void at_p54tp4xe_init(); -void at_ap53_init(); -void at_p55t2s_init(); -void at_acerm3a_init(); -#if 0 -void at_acerv35n_init(); -#endif -void at_p55t2p4_init(); -void at_p55tvp4_init(); -void at_p55va_init(); -void at_i440fx_init(); -void at_s1668_init(); +extern void xt_init(void); +extern void pcjr_init(void); +extern void tandy1k_init(void); +extern void tandy1ksl2_init(void); +extern void ams_init(void); +extern void europc_init(void); +extern void olim24_init(void); +extern void at_init(void); +extern void ibm_at_init(void); +extern void at_ide_init(void); +extern void deskpro386_init(void); +extern void ps1_m2011_init(void); +extern void ps1_m2121_init(void); +extern void ps1_m2133_init(void); +extern void ps2_m30_286_init(void); +extern void ps2_model_50_init(void); +extern void ps2_model_55sx_init(void); +extern void ps2_model_80_init(void); +extern void at_neat_init(void); +extern void at_scat_init(void); +extern void at_wd76c10_init(void); +extern void at_ali1429_init(void); +extern void at_headland_init(void); +extern void at_opti495_init(void); +extern void at_sis496_init(void); +extern void at_i430vx_init(void); +extern void at_batman_init(void); +extern void at_endeavor_init(void); -void xt_laserxt_init(); +extern void at_dtk486_init(void); +extern void at_r418_init(void); +#if 0 +extern void at_586mc1_init(void); +#endif +extern void at_plato_init(void); +extern void at_mb500n_init(void); +extern void at_p54tp4xe_init(void); +extern void at_ap53_init(void); +extern void at_p55t2s_init(void); +extern void at_acerm3a_init(void); +#if 0 +extern void at_acerv35n_init(void); +#endif +extern void at_p55t2p4_init(void); +extern void at_p55tvp4_init(void); +extern void at_p55va_init(void); +extern void at_i440fx_init(void); +extern void at_s1668_init(void); + +extern void xt_laserxt_init(void); int model; @@ -233,12 +234,13 @@ MODEL models[] = {"", -1, "", {"", 0, "", 0, "", 0}, 0,0,0, 0} }; -int model_count() + +int model_count(void) { return (sizeof(models) / sizeof(MODEL)) - 1; } -int model_getromset() +int model_getromset(void) { return models[model].id; } @@ -273,7 +275,7 @@ device_t *model_getdevice(int model) return models[model].device; } -char *model_get_internal_name() +char *model_get_internal_name(void) { return models[model].internal_name; } @@ -292,7 +294,7 @@ int model_get_model_from_internal_name(char *s) return 0; } -void common_init() +void common_init(void) { dma_init(); fdc_add(); @@ -312,7 +314,7 @@ void common_init() } } -void xt_init() +void xt_init(void) { common_init(); mem_add_bios(); @@ -326,7 +328,7 @@ void xt_init() } } -void pcjr_init() +void pcjr_init(void) { mem_add_bios(); fdc_add_pcjr(); @@ -342,7 +344,7 @@ void pcjr_init() nmi_mask = 0x80; } -void tandy1k_init() +void tandy1k_init(void) { TANDY = 1; common_init(); @@ -357,7 +359,7 @@ void tandy1k_init() device_add(&tandy_eeprom_device); if (joystick_type != 7) device_add(&gameport_device); } -void tandy1ksl2_init() +void tandy1ksl2_init(void) { common_init(); mem_add_bios(); @@ -369,7 +371,7 @@ void tandy1ksl2_init() if (joystick_type != 7) device_add(&gameport_device); } -void ams_init() +void ams_init(void) { AMSTRAD = 1; common_init(); @@ -382,7 +384,7 @@ void ams_init() if (joystick_type != 7) device_add(&gameport_device); } -void europc_init() +void europc_init(void) { common_init(); mem_add_bios(); @@ -392,7 +394,7 @@ void europc_init() if (joystick_type != 7) device_add(&gameport_device); } -void olim24_init() +void olim24_init(void) { common_init(); mem_add_bios(); @@ -403,13 +405,13 @@ void olim24_init() if (joystick_type != 7) device_add(&gameport_device); } -void xt_laserxt_init() +void xt_laserxt_init(void) { xt_init(); laserxt_init(); } -void at_init() +void at_init(void) { AT = 1; common_init(); @@ -430,25 +432,25 @@ void at_init() } } -void ibm_at_init() +void ibm_at_init(void) { at_init(); mem_remap_top_384k(); } -void at_ide_init() +void at_ide_init(void) { at_init(); ide_init(); } -void deskpro386_init() +void deskpro386_init(void) { at_init(); compaq_init(); } -void ps1_common_init() +void ps1_common_init(void) { AT = 1; common_init(); @@ -471,26 +473,26 @@ void ps1_common_init() if (joystick_type != 7) device_add(&gameport_201_device); } -void ps1_m2011_init() +void ps1_m2011_init(void) { ps1_common_init(); ps1mb_init(); } -void ps1_m2121_init() +void ps1_m2121_init(void) { ps1_common_init(); ps1mb_m2121_init(); fdc_set_ps1(); } -void ps1_m2133_init() +void ps1_m2133_init(void) { ps1_common_init(); ps1mb_m2133_init(); } -void ps2_m30_286_init() +void ps2_m30_286_init(void) { AT = 1; common_init(); @@ -505,7 +507,7 @@ void ps2_m30_286_init() fdc_set_ps1(); } -static void ps2_common_init() +static void ps2_common_init(void) { AT = 1; common_init(); @@ -522,67 +524,67 @@ static void ps2_common_init() pit_ps2_init(); } -void ps2_model_50_init() +void ps2_model_50_init(void) { ps2_common_init(); ps2_mca_board_model_50_init(); } -void ps2_model_55sx_init() +void ps2_model_55sx_init(void) { ps2_common_init(); ps2_mca_board_model_55sx_init(); } -void ps2_model_80_init() +void ps2_model_80_init(void) { ps2_common_init(); ps2_mca_board_model_80_type2_init(); } -void at_neat_init() +void at_neat_init(void) { at_ide_init(); neat_init(); } -void at_scat_init() +void at_scat_init(void) { at_ide_init(); scat_init(); } -/* void at_acer386sx_init() +/* void at_acer386sx_init(void) { at_ide_init(); acer386sx_init(); } -void at_82335_init() +void at_82335_init(void) { at_ide_init(); i82335_init(); } */ -void at_wd76c10_init() +void at_wd76c10_init(void) { at_ide_init(); wd76c10_init(); } -void at_headland_init() +void at_headland_init(void) { at_ide_init(); headland_init(); } -void at_opti495_init() +void at_opti495_init(void) { at_ide_init(); opti495_init(); } -void secondary_ide_check() +void secondary_ide_check(void) { int i = 0; int secondary_cdroms = 0; @@ -597,7 +599,7 @@ void secondary_ide_check() if (!secondary_cdroms) ide_sec_disable(); } -void at_ali1429_init() +void at_ali1429_init(void) { ali1429_reset(); @@ -607,14 +609,14 @@ void at_ali1429_init() secondary_ide_check(); } -/* void at_um8881f_init() +/* void at_um8881f_init(void) { at_ide_init(); pci_init(PCI_CONFIG_TYPE_1, 0, 31); um8881f_init(); } */ -void at_dtk486_init() +void at_dtk486_init(void) { at_ide_init(); memregs_init(); @@ -622,7 +624,7 @@ void at_dtk486_init() secondary_ide_check(); } -void at_sis496_init() +void at_sis496_init(void) { at_ide_init(); memregs_init(); @@ -634,13 +636,13 @@ void at_sis496_init() trc_init(); } -void at_r418_init() +void at_r418_init(void) { at_sis496_init(); fdc37c665_init(); } -void at_premiere_common_init() +void at_premiere_common_init(void) { at_ide_init(); memregs_init(); @@ -654,14 +656,14 @@ void at_premiere_common_init() device_add(&intel_flash_bxt_ami_device); } -void at_batman_init() +void at_batman_init(void) { at_premiere_common_init(); i430lx_init(); } #if 0 -void at_586mc1_init() +void at_586mc1_init(void) { at_ide_init(); memregs_init(); @@ -676,13 +678,13 @@ void at_586mc1_init() } #endif -void at_plato_init() +void at_plato_init(void) { at_premiere_common_init(); i430nx_init(); } -void at_advanced_common_init() +void at_advanced_common_init(void) { at_ide_init(); memregs_init(); @@ -696,13 +698,13 @@ void at_advanced_common_init() pc87306_init(); } -void at_endeavor_init() +void at_endeavor_init(void) { at_advanced_common_init(); device_add(&intel_flash_bxt_ami_device); } -void at_mb500n_init() +void at_mb500n_init(void) { at_ide_init(); pci_init(PCI_CONFIG_TYPE_1); @@ -716,7 +718,7 @@ void at_mb500n_init() device_add(&intel_flash_bxt_device); } -void at_p54tp4xe_init() +void at_p54tp4xe_init(void) { at_ide_init(); memregs_init(); @@ -731,7 +733,7 @@ void at_p54tp4xe_init() device_add(&intel_flash_bxt_device); } -void at_ap53_init() +void at_ap53_init(void) { at_ide_init(); memregs_init(); @@ -748,7 +750,7 @@ void at_ap53_init() device_add(&intel_flash_bxt_device); } -void at_p55t2s_init() +void at_p55t2s_init(void) { at_ide_init(); memregs_init(); @@ -765,7 +767,7 @@ void at_p55t2s_init() device_add(&intel_flash_bxt_device); } -void at_acerm3a_init() +void at_acerm3a_init(void) { at_ide_init(); memregs_init(); @@ -783,7 +785,7 @@ void at_acerm3a_init() } #if 0 -void at_acerv35n_init() +void at_acerv35n_init(void) { at_ide_init(); memregs_init(); @@ -801,7 +803,7 @@ void at_acerv35n_init() } #endif -void at_p55t2p4_init() +void at_p55t2p4_init(void) { at_ide_init(); memregs_init(); @@ -816,7 +818,7 @@ void at_p55t2p4_init() device_add(&intel_flash_bxt_device); } -void at_i430vx_init() +void at_i430vx_init(void) { at_ide_init(); memregs_init(); @@ -831,7 +833,7 @@ void at_i430vx_init() device_add(&intel_flash_bxt_device); } -void at_p55tvp4_init() +void at_p55tvp4_init(void) { at_ide_init(); memregs_init(); @@ -846,7 +848,7 @@ void at_p55tvp4_init() device_add(&intel_flash_bxt_device); } -void at_p55va_init() +void at_p55va_init(void) { at_ide_init(); memregs_init(); @@ -861,7 +863,7 @@ void at_p55va_init() device_add(&intel_flash_bxt_device); } -void at_i440fx_init() +void at_i440fx_init(void) { at_ide_init(); memregs_init(); @@ -876,7 +878,7 @@ void at_i440fx_init() device_add(&intel_flash_bxt_device); } -void at_s1668_init() +void at_s1668_init(void) { at_ide_init(); memregs_init(); @@ -891,7 +893,7 @@ void at_s1668_init() device_add(&intel_flash_bxt_device); } -void model_init() +void model_init(void) { pclog("Initializing as %s\n", model_getname()); AMSTRAD = AT = PCI = TANDY = 0; diff --git a/src/model.h b/src/model.h index a337b122b..f483cd1aa 100644 --- a/src/model.h +++ b/src/model.h @@ -8,13 +8,16 @@ * * Handling of the emulated machines. * - * Version: @(#)model.h 1.0.0 2017/05/30 + * Version: @(#)model.h 1.0.1 2017/06/03 * - * Author: Sarah Walker, + * Authors: Sarah Walker, * Miran Grca, * Copyright 2008-2017 Sarah Walker. * Copyright 2016-2017 Miran Grca. */ +#ifndef EMU_MODEL_H +# define EMU_MODEL_H + #define MODEL_AT 1 #define MODEL_PS2 2 @@ -28,34 +31,37 @@ #define MODEL_FUJITSU 512 #define MODEL_RM 1024 -typedef struct -{ - char name[32]; - int id; - char internal_name[24]; - struct - { - char name[16]; - CPU *cpus; - } cpu[5]; - int fixed_gfxcard; - int flags; - int min_ram, max_ram; - int ram_granularity; - void (*init)(); - struct device_t *device; + +typedef struct { + char name[32]; + int id; + char internal_name[24]; + struct { + char name[16]; + CPU *cpus; + } cpu[5]; + int fixed_gfxcard; + int flags; + int min_ram, max_ram; + int ram_granularity; + void (*init)(void); + device_t *device; } MODEL; -extern MODEL models[]; +extern MODEL models[]; extern int model; -int model_count(); -int model_getromset(); -int model_getmodel(int romset); -char *model_getname(); -char *model_get_internal_name(); -int model_get_model_from_internal_name(char *s); -void model_init(); -struct device_t *model_getdevice(int model); -int model_getromset_ex(int m); + +extern int model_count(void); +extern int model_getromset(void); +extern int model_getmodel(int romset); +extern char *model_getname(void); +extern char *model_get_internal_name(void); +extern int model_get_model_from_internal_name(char *s); +extern void model_init(void); +extern device_t *model_getdevice(int model); +extern int model_getromset_ex(int m); + + +#endif /*EMU_MODEL_H*/ diff --git a/src/mouse.h b/src/mouse.h index 4ae2d8d76..25aa07888 100644 --- a/src/mouse.h +++ b/src/mouse.h @@ -1,5 +1,5 @@ -#ifndef MOUSE_H -# define MOUSE_H +#ifndef EMU_MOUSE_H +# define EMU_MOUSE_H #define MOUSE_TYPE_SERIAL 0 /* Serial Mouse */ @@ -38,4 +38,4 @@ extern int mouse_get_type(int mouse); extern int mouse_get_ndev(void); -#endif /*MOUSE_H*/ +#endif /*EMU_MOUSE_H*/ diff --git a/src/net_ne2000.c b/src/net_ne2000.c index 212353622..7194adf68 100644 --- a/src/net_ne2000.c +++ b/src/net_ne2000.c @@ -10,7 +10,7 @@ * * NOTE: The file will also implement an NE1000 for 8-bit ISA systems. * - * Version: @(#)net_ne2000.c 1.0.9 2017/06/02 + * Version: @(#)net_ne2000.c 1.0.10 2017/06/03 * * Authors: Fred N. van Kempen, * Peter Grehan, grehan@iprg.nokia.com> @@ -38,11 +38,6 @@ #include "bswap.h" -#ifdef WALTJE -# define ENABLE_NE2000_LOG 2 -#endif - - /* ROM BIOS file paths. */ #define ROM_PATH_NE1000 L"roms/network/ne1000/ne1000.rom" #define ROM_PATH_NE2000 L"roms/network/ne2000/ne2000.rom" @@ -61,13 +56,6 @@ typedef union { } bar_t; -#if ENABLE_NE2000_LOG -static int nic_do_log = ENABLE_NE2000_LOG; -#else -static int nic_do_log = 0; -#endif - - /* Never completely fill the ne2k ring so that we never hit the unclear completely full buffer condition. */ #define NE2K_NEVER_FULL_RING (1) @@ -239,7 +227,7 @@ static void nic_tx(nic_t *, uint32_t); static void nelog(int lvl, const char *fmt, ...) { -#ifdef ENABLE_NE2000_LOG +#ifdef ENABLE_NIC_LOG va_list ap; if (nic_do_log >= lvl) { diff --git a/src/network.c b/src/network.c index be58eaac2..cd6cc3ea5 100644 --- a/src/network.c +++ b/src/network.c @@ -12,10 +12,9 @@ * it should be malloc'ed and then linked to the NETCARD def. * Will be done later. * - * Version: @(#)network.c 1.0.7 2017/05/29 + * Version: @(#)network.c 1.0.9 2017/06/03 * - * Authors: Kotori, - * Fred N. van Kempen, + * Author: Fred N. van Kempen, */ #include #include @@ -47,6 +46,7 @@ static netcard_t net_cards[] = { int network_card; int network_type; int network_ndev; +int nic_do_log; netdev_t network_devs[32]; char network_pcap[512]; @@ -63,6 +63,12 @@ network_init(void) { int i; +#if ENABLE_NIC_LOG + nic_do_log = ENABLE_NIC_LOG; +#else + nic_do_log = 0; +#endif + #if 0 network_type = NET_TYPE_NONE; network_card = 0; diff --git a/src/network.h b/src/network.h index f36c87a5e..1c3e748a1 100644 --- a/src/network.h +++ b/src/network.h @@ -8,13 +8,12 @@ * * Definitions for the network module. * - * Version: @(#)network.h 1.0.5 2017/05/21 + * Version: @(#)network.h 1.0.7 2017/06/03 * - * Authors: Kotori, - * Fred N. van Kempen, + * Author: Fred N. van Kempen, */ -#ifndef NETWORK_H -# define NETWORK_H +#ifndef EMU_NETWORK_H +# define EMU_NETWORK_H # include @@ -48,6 +47,7 @@ typedef struct { /* Global variables. */ +extern int nic_do_log; extern int network_card; extern int network_type; extern int network_ndev; @@ -81,4 +81,4 @@ extern int network_card_get_from_internal_name(char *); extern device_t *network_card_getdevice(int); -#endif /*NETWORK_H*/ +#endif /*EMU_NETWORK_H*/ diff --git a/src/nvr.c b/src/nvr.c index 5888c1005..8862ec08f 100644 --- a/src/nvr.c +++ b/src/nvr.c @@ -8,16 +8,15 @@ * * CMOS NVRAM emulation. * - * Version: @(#)nvr.c 1.0.0 2017/05/30 + * Version: @(#)nvr.c 1.0.1 2017/06/03 * - * Author: Sarah Walker, + * Authors: Sarah Walker, * Miran Grca, * Mahod, * Copyright 2008-2017 Sarah Walker. * Copyright 2016-2017 Miran Grca. * Copyright 2016-2017 Mahod. */ - #include #include "ibm.h" #include "io.h" @@ -39,12 +38,12 @@ static int nvr_onesec_time = 0, nvr_onesec_cnt = 0; static int rtctime; -void getnvrtime() +void getnvrtime(void) { time_get(nvrram); } -void nvr_recalc() +void nvr_recalc(void) { int c; int newrtctime; @@ -204,7 +203,7 @@ uint8_t readnvr(uint16_t addr, void *priv) return nvraddr; } -void loadnvr() +void loadnvr(void) { FILE *f; int c; @@ -292,7 +291,7 @@ void loadnvr() c = 1 << ((nvrram[RTC_REGA] & RTC_RS) - 1); rtctime += (int)(RTCCONST * c * (1 << TIMER_SHIFT)); } -void savenvr() +void savenvr(void) { FILE *f; switch (oldromset) @@ -357,7 +356,7 @@ void savenvr() fclose(f); } -void nvr_init() +void nvr_init(void) { io_sethandler(0x0070, 0x0002, readnvr, NULL, NULL, writenvr, NULL, NULL, NULL); timer_add(nvr_rtc, &rtctime, TIMER_ALWAYS_ENABLED, NULL); diff --git a/src/nvr.h b/src/nvr.h index 46eaa07ec..0c7780240 100644 --- a/src/nvr.h +++ b/src/nvr.h @@ -8,25 +8,28 @@ * * CMOS NVRAM emulation. * - * Version: @(#)nvr.h 1.0.0 2017/05/30 + * Version: @(#)nvr.h 1.0.1 2017/06/03 * - * Author: Sarah Walker, + * Authors: Sarah Walker, * Miran Grca, * Mahod, * Copyright 2008-2017 Sarah Walker. * Copyright 2016-2017 Miran Grca. * Copyright 2016-2017 Mahod. */ +#ifndef EMU_NVR_H +# define EMU_NVR_H -void nvr_init(); extern int enable_sync; - extern int nvr_dosave; -void time_get(char *nvrram); -void nvr_recalc(); +extern void nvr_init(void); +extern void time_get(char *nvrram); +extern void nvr_recalc(void); +extern void loadnvr(void); +extern void savenvr(void); -void loadnvr(); -void savenvr(); + +#endif /*EMU_NVR_H*/ diff --git a/src/pc.c b/src/pc.c index 544c5ee30..f60a03a3e 100644 --- a/src/pc.c +++ b/src/pc.c @@ -8,17 +8,17 @@ * * Emulation core dispatcher. * - * Version: @(#)pc.c 1.0.1 2017/05/30 + * Version: @(#)pc.c 1.0.3 2017/06/03 * - * Author: Sarah Walker, + * Authors: Sarah Walker, * Miran Grca, * Copyright 2008-2017 Sarah Walker. * Copyright 2016-2017 Miran Grca. */ - #include #include #include + #include "86box.h" #include "ibm.h" #include "mem.h" @@ -348,7 +348,7 @@ void initpc(int argc, wchar_t *argv[]) if (config_file == NULL) { - append_filename_w(config_file_default, pcempath, L"86box.cfg", 511); + append_filename_w(config_file_default, pcempath, CONFIG_FILE_W, 511); } else { @@ -659,7 +659,7 @@ void runpc(void) win_title_update=0; mbstowcs(wmodel, model_getname(), strlen(model_getname()) + 1); mbstowcs(wcpu, models[model].cpu[cpu_manufacturer].cpus[cpu].name, strlen(models[model].cpu[cpu_manufacturer].cpus[cpu].name) + 1); - _swprintf(s, L"86Box v%s - %i%% - %s - %s - %s", emulator_version_w, fps, wmodel, wcpu, (!mousecapture) ? win_language_get_string_from_id(2077) : ((mouse_get_type(mouse_type) & MOUSE_TYPE_3BUTTON) ? win_language_get_string_from_id(2078) : win_language_get_string_from_id(2079))); + _swprintf(s, L"%s v%s - %i%% - %s - %s - %s", EMU_NAME_W, EMU_VERSION_W, fps, wmodel, wcpu, (!mousecapture) ? win_language_get_string_from_id(2077) : ((mouse_get_type(mouse_type) & MOUSE_TYPE_3BUTTON) ? win_language_get_string_from_id(2078) : win_language_get_string_from_id(2079))); set_window_title(s); } done++; diff --git a/src/scsi_buslogic.c b/src/scsi_buslogic.c index 8a03a52b2..b88e7de99 100644 --- a/src/scsi_buslogic.c +++ b/src/scsi_buslogic.c @@ -10,9 +10,9 @@ * 0 - BT-542B ISA; * 1 - BT-958 PCI (but BT-542B ISA on non-PCI machines) * - * Version: @(#)scsi_buslogic.c 1.0.2 2017/06/02 + * Version: @(#)scsi_buslogic.c 1.0.3 2017/06/03 * - * Author: TheCollector1995, + * Authors: TheCollector1995, * Miran Grca, * Fred N. van Kempen, * Copyright 2008-2017 Sarah Walker. @@ -506,12 +506,7 @@ enum { }; -#ifdef WALTJE -int buslogic_do_log = 1; -# define ENABLE_BUSLOGIC_LOG -#else int buslogic_do_log = 0; -#endif static void diff --git a/src/scsi_disk.c b/src/scsi_disk.c index 33b88a4bb..69726cf0b 100644 --- a/src/scsi_disk.c +++ b/src/scsi_disk.c @@ -6,15 +6,16 @@ * * Emulation of SCSI fixed and removable disks. * - * Version: @(#)scsi_disk.c 1.0.0 2017/05/30 + * Version: @(#)scsi_disk.c 1.0.1 2017/06/03 * * Author: Miran Grca, * Copyright 2017-2017 Miran Grca. */ - #define _LARGEFILE_SOURCE #define _LARGEFILE64_SOURCE #define _GNU_SOURCE +#include +#include #include #include #include @@ -22,10 +23,6 @@ #include #include -#include - -#include - #include "86box.h" #include "cdrom.h" #include "ibm.h" @@ -34,7 +31,7 @@ #include "scsi.h" #include "scsi_disk.h" #include "timer.h" -#include "WIN/plat_iodev.h" +#include "win/plat_iodev.h" /* Bits of 'status' */ #define ERR_STAT 0x01 @@ -1200,9 +1197,9 @@ void scsi_hd_command(uint8_t id, uint8_t *cdb) device_identify_ex[6] = (id / 10) + 0x30; device_identify_ex[7] = (id % 10) + 0x30; - device_identify_ex[10] = emulator_version[0]; - device_identify_ex[12] = emulator_version[2]; - device_identify_ex[13] = emulator_version[3]; + device_identify_ex[10] = EMU_VERSION[0]; + device_identify_ex[12] = EMU_VERSION[2]; + device_identify_ex[13] = EMU_VERSION[3]; if (hdc[id].bus == HDD_BUS_SCSI_REMOVABLE) { @@ -1508,7 +1505,7 @@ void scsi_hd_command(uint8_t id, uint8_t *cdb) tempbuffer[idx++] = 0x01; tempbuffer[idx++] = 0x00; tempbuffer[idx++] = 68; - ide_padstr8(tempbuffer + idx, 8, "86Box"); /* Vendor */ + ide_padstr8(tempbuffer + idx, 8, EMU_NAME); /* Vendor */ idx += 8; ide_padstr8(tempbuffer + idx, 40, device_identify_ex); /* Product */ idx += 40; @@ -1540,9 +1537,9 @@ void scsi_hd_command(uint8_t id, uint8_t *cdb) tempbuffer[3] = 0x02; tempbuffer[4] = 31; - ide_padstr8(tempbuffer + 8, 8, "86Box"); /* Vendor */ + ide_padstr8(tempbuffer + 8, 8, EMU_NAME); /* Vendor */ ide_padstr8(tempbuffer + 16, 16, device_identify); /* Product */ - ide_padstr8(tempbuffer + 32, 4, emulator_version); /* Revision */ + ide_padstr8(tempbuffer + 32, 4, EMU_VERSION); /* Revision */ idx = 36; } diff --git a/src/serial.c b/src/serial.c index bed3e1a62..bf6e6a45c 100644 --- a/src/serial.c +++ b/src/serial.c @@ -47,11 +47,6 @@ #include "plat_serial.h" -#ifdef WALTJE -# define ENABLE_SERIAL_LOG 2 -#endif - - enum { SERINT_LSR = 1, SERINT_RECEIVE = 2, @@ -144,11 +139,7 @@ enum { static SERIAL serial1, /* serial port 1 data */ serial2; /* serial port 2 data */ -#if ENABLE_SERIAL_LOG -static int serial_do_log = ENABLE_SERIAL_LOG; -#else -static int serial_do_log = 0; -#endif + int serial_do_log; static void @@ -231,6 +222,16 @@ serial_write_fifo(SERIAL *sp, uint8_t dat) } +#ifdef WALTJE +static void +serial_write_str(SERIAL *sp, const char *str) +{ + while (*str) + serial_write_fifo(sp, (uint8_t)*str++); +} +#endif + + static uint8_t read_fifo(SERIAL *sp) { @@ -265,7 +266,7 @@ serial_write(uint16_t addr, uint8_t val, void *priv) uint16_t baud; long speed; -#if 0 +#if ENABLE_SERIAL_LOG serial_log(2, "Serial%d: write(%04x, %02x)\n", sp->port, addr, val); #endif switch (addr & 0x07) { @@ -348,15 +349,23 @@ serial_write(uint16_t addr, uint8_t val, void *priv) } if ((val & MCR_OUT2) && !(sp->mctrl & MCR_OUT2)) { - if (sp->bh != NULL) { - /* Linked, start reading from host port. */ - (void)bhtty_read((BHTTY *)sp->bh, &sp->hold, 1); - } else { + if (sp->bh == NULL) { /* Not linked, start RX timer. */ timer_add(serial_timer, &sp->receive_delay, &sp->receive_delay, sp); - serial_log(1, "Serial%d: RX timer started!\n",sp->port); + + /* Fake CTS, DSR and DCD (for now.) */ + sp->msr = (MSR_CTS | MSR_DCTS | + MSR_DSR | MSR_DDSR | + MSR_DCD | MSR_DDCD); + sp->int_status |= SERINT_MSR; + update_ints(sp); + +#ifdef WALTJE + /* For testing. */ + serial_write_str(sp, "Welcome!\r\n"); +#endif } } sp->mctrl = val; @@ -411,14 +420,12 @@ static void serial_rd_done(void *arg, int num) { SERIAL *sp = (SERIAL *)arg; +#ifdef WALTJE serial_log(0, "%04x: %d bytes available: %02x (%c)\n",sp->addr,num,sp->hold,sp->hold); +#endif /* Stuff the byte in the FIFO and set intr. */ serial_write_fifo(sp, sp->hold); - - /* Start up the next read from the real port. */ - if (sp->bh != NULL) - (void)bhtty_read((BHTTY *)sp->bh, &sp->hold, 1); } @@ -553,7 +560,8 @@ serial_remove(int port) #endif /* Close the host device. */ - (void)serial_link(port, NULL); + if (sp->bh != NULL) + (void)serial_link(port, NULL); /* Release our I/O range. */ if (sp->addr != 0x0000) { @@ -570,16 +578,22 @@ serial_remove(int port) void serial_init(void) { +#if ENABLE_SERIAL_LOG + serial_do_log = ENABLE_SERIAL_LOG; +#endif memset(&serial1, 0x00, sizeof(SERIAL)); serial1.port = 1; - serial_setup(1, SERIAL1_ADDR, SERIAL1_IRQ); -#ifdef WALTJE - serial_link(1, "COM2"); + serial_setup(serial1.port, SERIAL1_ADDR, SERIAL1_IRQ); +#ifdef xWALTJE + serial_link(serial1.port, "COM1"); #endif memset(&serial2, 0x00, sizeof(SERIAL)); serial2.port = 2; - serial_setup(2, SERIAL2_ADDR, SERIAL2_IRQ); + serial_setup(serial2.port, SERIAL2_ADDR, SERIAL2_IRQ); +#ifdef xWALTJE + serial_link(serial2.port, "COM2"); +#endif } diff --git a/src/serial.h b/src/serial.h index bf361a0b1..4602429f0 100644 --- a/src/serial.h +++ b/src/serial.h @@ -8,13 +8,13 @@ * * Definitions for the SERIAL card. * - * Version: @(#)serial.h 1.0.3 2017/05/07 + * Version: @(#)serial.h 1.0.4 2017/06/03 * * Author: Fred N. van Kempen, * Copyright 2017 Fred N. van Kempen. */ -#ifndef SERIAL_H -# define SERIAL_H +#ifndef EMU_SERIAL_H +# define EMU_SERIAL_H /* Default settings for the standard ports. */ @@ -61,4 +61,4 @@ extern int serial_link(int, char *); extern void serial_write_fifo(SERIAL *, uint8_t); -#endif /*SERIAL_H*/ +#endif /*EMU_SERIAL_H*/ diff --git a/src/xtide.c b/src/xtide.c index b6deef1a5..e7997d8fa 100644 --- a/src/xtide.c +++ b/src/xtide.c @@ -8,14 +8,13 @@ * * XT IDE controller emulation. * - * Version: @(#)xtide.c 1.0.0 2017/05/30 + * Version: @(#)xtide.c 1.0.1 2017/06/03 * - * Author: Sarah Walker, + * Authors: Sarah Walker, * Miran Grca, * Copyright 2008-2017 Sarah Walker. * Copyright 2016-2017 Miran Grca. */ - #include #include "ibm.h" #include "io.h" @@ -26,6 +25,10 @@ #include "xtide.h" +#define XTIDE_ROM_PATH L"roms/ide_xt.bin" +#define ATIDE_ROM_PATH L"roms/ide_at.bin" + + typedef struct xtide_t { uint8_t data_high; @@ -92,7 +95,7 @@ static void *xtide_init(void) xtide_t *xtide = malloc(sizeof(xtide_t)); memset(xtide, 0, sizeof(xtide_t)); - rom_init(&xtide->bios_rom, L"roms/ide_xt.bin", 0xc8000, 0x4000, 0x3fff, 0, MEM_MAPPING_EXTERNAL); + rom_init(&xtide->bios_rom, XTIDE_ROM_PATH, 0xc8000, 0x4000, 0x3fff, 0, MEM_MAPPING_EXTERNAL); ide_xtide_init(); io_sethandler(0x0300, 0x0010, xtide_read, NULL, NULL, xtide_write, NULL, NULL, xtide); @@ -105,7 +108,7 @@ static void *xtide_at_init(void) xtide_t *xtide = malloc(sizeof(xtide_t)); memset(xtide, 0, sizeof(xtide_t)); - rom_init(&xtide->bios_rom, L"roms/ide_at.bin", 0xc8000, 0x4000, 0x3fff, 0, MEM_MAPPING_EXTERNAL); + rom_init(&xtide->bios_rom, ATIDE_ROM_PATH, 0xc8000, 0x4000, 0x3fff, 0, MEM_MAPPING_EXTERNAL); ide_init(); return xtide; diff --git a/src/xtide.h b/src/xtide.h index 925d96568..f1f0a3da2 100644 --- a/src/xtide.h +++ b/src/xtide.h @@ -8,15 +8,21 @@ * * XT IDE controller emulation. * - * Version: @(#)xtide.h 1.0.0 2017/05/30 + * Version: @(#)xtide.h 1.0.1 2017/06/03 * - * Author: Sarah Walker, + * Authors: Sarah Walker, * Miran Grca, * Copyright 2008-2017 Sarah Walker. * Copyright 2016-2017 Miran Grca. */ +#ifndef EMU_XTIDE_H +# define EMU_XTIDE_H + extern device_t xtide_device; extern device_t xtide_at_device; extern device_t xtide_ps2_device; extern device_t xtide_at_ps2_device; + + +#endif /*EMU_XTIDE_H*/