The TX97 now correctly uses the W83877 and removed VNC from the Dev branch.

This commit is contained in:
OBattler
2020-04-17 19:40:10 +02:00
parent 63b873892e
commit 3e6994a11c
11 changed files with 10 additions and 78 deletions

View File

@@ -275,16 +275,7 @@
#define IDM_VID_REMEMBER 40041 #define IDM_VID_REMEMBER 40041
#define IDM_VID_SDL_SW 40050 #define IDM_VID_SDL_SW 40050
#define IDM_VID_SDL_HW 40051 #define IDM_VID_SDL_HW 40051
#ifdef USE_D2D
#define IDM_VID_D2D 40052
#ifdef USE_VNC
#define IDM_VID_VNC 40053
#endif
#else
#ifdef USE_VNC
#define IDM_VID_VNC 40052 #define IDM_VID_VNC 40052
#endif
#endif
#define IDM_VID_SCALE_1X 40055 #define IDM_VID_SCALE_1X 40055
#define IDM_VID_SCALE_2X 40056 #define IDM_VID_SCALE_2X 40056
#define IDM_VID_SCALE_3X 40057 #define IDM_VID_SCALE_3X 40057

View File

@@ -64,11 +64,7 @@
/* The emulator has shut down. */ /* The emulator has shut down. */
#define WM_HAS_SHUTDOWN 0x8897 #define WM_HAS_SHUTDOWN 0x8897
#ifdef USE_VNC
#define RENDERERS_NUM 3 #define RENDERERS_NUM 3
#else
#define RENDERERS_NUM 2
#endif
#ifdef __cplusplus #ifdef __cplusplus

View File

@@ -575,7 +575,7 @@ machine_at_tx97_init(const machine_t *model)
device_add(&i430tx_device); device_add(&i430tx_device);
device_add(&piix4_device); device_add(&piix4_device);
device_add(&keyboard_ps2_pci_device); device_add(&keyboard_ps2_pci_device);
device_add(&w83977tf_device); device_add(&w83877tf_acorp_device);
device_add(&intel_flash_bxt_device); device_add(&intel_flash_bxt_device);
hwm_values_t machine_hwm = { hwm_values_t machine_hwm = {

View File

@@ -100,7 +100,7 @@ w83977f_lpt_handler(w83977f_t *dev)
{ {
uint16_t io_mask, io_base = (dev->dev_regs[1][0x30] << 8) | dev->dev_regs[1][0x31]; uint16_t io_mask, io_base = (dev->dev_regs[1][0x30] << 8) | dev->dev_regs[1][0x31];
int io_len = get_lpt_length(dev); int io_len = get_lpt_length(dev);
io_base &= (0xfff & ~io_len); io_base &= (0xff8 | io_len);
io_mask = 0xffc; io_mask = 0xffc;
if (io_len == 8) if (io_len == 8)
io_mask = 0xff8; io_mask = 0xff8;

View File

@@ -83,8 +83,8 @@ vnc_ptrevent(int but, int x, int y, rfbClientPtr cl)
if (x>=0 && x<allowedX && y>=0 && y<allowedY) { if (x>=0 && x<allowedX && y>=0 && y<allowedY) {
/* VNC uses absolute positions within the window, no deltas. */ /* VNC uses absolute positions within the window, no deltas. */
if (x != ptr_x || y != ptr_y) { if (x != ptr_x || y != ptr_y) {
mouse_x += (x - ptr_x); mouse_x += (x - ptr_x) / 100;
mouse_y += (y - ptr_y); mouse_y += (y - ptr_y) / 100;
ptr_x = x; ptr_y = y; ptr_x = x; ptr_y = y;
} }

View File

@@ -68,12 +68,7 @@ BEGIN
BEGIN BEGIN
MENUITEM "&SDL (Software)", IDM_VID_SDL_SW MENUITEM "&SDL (Software)", IDM_VID_SDL_SW
MENUITEM "&SDL (Hardware)", IDM_VID_SDL_HW MENUITEM "&SDL (Hardware)", IDM_VID_SDL_HW
#ifdef USE_D2D
MENUITEM "Direct&2D 1.0", IDM_VID_D2D
#endif
#ifdef USE_VNC
MENUITEM "&VNC", IDM_VID_VNC MENUITEM "&VNC", IDM_VID_VNC
#endif
END END
MENUITEM SEPARATOR MENUITEM SEPARATOR
MENUITEM "F&orce 4:3 display ratio", IDM_VID_FORCE43 MENUITEM "F&orce 4:3 display ratio", IDM_VID_FORCE43

View File

@@ -80,9 +80,6 @@ ifeq ($(DEV_BUILD), y)
ifndef VGAWONDER ifndef VGAWONDER
VGAWONDER := y VGAWONDER := y
endif endif
ifndef VNC
VNC := y
endif
ifndef XL24 ifndef XL24
XL24 := y XL24 := y
endif endif
@@ -132,9 +129,6 @@ else
ifndef VGAWONDER ifndef VGAWONDER
VGAWONDER := n VGAWONDER := n
endif endif
ifndef VNC
VNC := n
endif
ifndef XL24 ifndef XL24
XL24 := n XL24 := n
endif endif
@@ -379,16 +373,12 @@ MUNTOBJ := midi_mt32.o \
Tables.o TVA.o TVF.o TVP.o sha1.o c_interface.o Tables.o TVA.o TVF.o TVP.o sha1.o c_interface.o
endif endif
ifeq ($(VNC), y)
OPTS += -DUSE_VNC
RFLAGS += -DUSE_VNC
ifneq ($(VNC_PATH), ) ifneq ($(VNC_PATH), )
OPTS += -I$(VNC_PATH)\INCLUDE OPTS += -I$(VNC_PATH)\INCLUDE
VNCLIB := -L$(VNC_PATH)\LIB VNCLIB := -L$(VNC_PATH)\LIB
endif endif
VNCLIB += -lvncserver VNCLIB += -lvncserver
VNCOBJ := vnc.o vnc_keymap.o VNCOBJ := vnc.o vnc_keymap.o
endif
ifeq ($(DISCORD), y) ifeq ($(DISCORD), y)
OPTS += -DUSE_DISCORD OPTS += -DUSE_DISCORD
@@ -677,9 +667,7 @@ ifeq ($(DEBUG), y)
LIBS += -lssp LIBS += -lssp
endif endif
ifeq ($(VNC), y)
LIBS += $(VNCLIB) -lws2_32 LIBS += $(VNCLIB) -lws2_32
endif
ifneq ($(WX), n) ifneq ($(WX), n)
LIBS += $(WX_LIBS) -lm LIBS += $(WX_LIBS) -lm
endif endif

View File

@@ -80,9 +80,6 @@ ifeq ($(DEV_BUILD), y)
ifndef VGAWONDER ifndef VGAWONDER
VGAWONDER := y VGAWONDER := y
endif endif
ifndef VNC
VNC := y
endif
ifndef XL24 ifndef XL24
XL24 := y XL24 := y
endif endif
@@ -135,9 +132,6 @@ else
ifndef VGAWONDER ifndef VGAWONDER
VGAWONDER := n VGAWONDER := n
endif endif
ifndef VNC
VNC := n
endif
ifndef XL24 ifndef XL24
XL24 := n XL24 := n
endif endif
@@ -388,16 +382,12 @@ MUNTOBJ := midi_mt32.o \
Tables.o TVA.o TVF.o TVP.o sha1.o c_interface.o Tables.o TVA.o TVF.o TVP.o sha1.o c_interface.o
endif endif
ifeq ($(VNC), y)
OPTS += -DUSE_VNC
RFLAGS += -DUSE_VNC
ifneq ($(VNC_PATH), ) ifneq ($(VNC_PATH), )
OPTS += -I$(VNC_PATH)\INCLUDE OPTS += -I$(VNC_PATH)\INCLUDE
VNCLIB := -L$(VNC_PATH)\LIB VNCLIB := -L$(VNC_PATH)\LIB
endif endif
VNCLIB += -lvncserver VNCLIB += -lvncserver
VNCOBJ := vnc.o vnc_keymap.o VNCOBJ := vnc.o vnc_keymap.o
endif
ifeq ($(DISCORD), y) ifeq ($(DISCORD), y)
OPTS += -DUSE_DISCORD OPTS += -DUSE_DISCORD
@@ -678,9 +668,7 @@ endif
LIBS := -mwindows -lcomctl32 \ LIBS := -mwindows -lcomctl32 \
-lopenal -lole32 -lopenal -lole32
ifeq ($(VNC), y)
LIBS += $(VNCLIB) -lws2_32 LIBS += $(VNCLIB) -lws2_32
endif
ifneq ($(WX), n) ifneq ($(WX), n)
LIBS += $(WX_LIBS) -lm LIBS += $(WX_LIBS) -lm
endif endif

View File

@@ -42,9 +42,7 @@
#include <86box/plat.h> #include <86box/plat.h>
#include <86box/plat_midi.h> #include <86box/plat_midi.h>
#include <86box/ui.h> #include <86box/ui.h>
#ifdef USE_VNC #include <86box/vnc.h>
# include <86box/vnc.h>
#endif
#include <86box/win_sdl.h> #include <86box/win_sdl.h>
#include <86box/win.h> #include <86box/win.h>
@@ -88,17 +86,13 @@ static const struct {
} vid_apis[2][RENDERERS_NUM] = { } vid_apis[2][RENDERERS_NUM] = {
{ {
{ "SDL_Software", 1, (int(*)(void*))sdl_inits, sdl_close, NULL, sdl_pause, sdl_enable }, { "SDL_Software", 1, (int(*)(void*))sdl_inits, sdl_close, NULL, sdl_pause, sdl_enable },
{ "SDL_Hardware", 1, (int(*)(void*))sdl_inith, sdl_close, NULL, sdl_pause, sdl_enable } { "SDL_Hardware", 1, (int(*)(void*))sdl_inith, sdl_close, NULL, sdl_pause, sdl_enable },
#ifdef USE_VNC { "VNC", 0, vnc_init, vnc_close, vnc_resize, vnc_pause, NULL }
,{ "VNC", 0, vnc_init, vnc_close, vnc_resize, vnc_pause, NULL }
#endif
}, },
{ {
{ "SDL_Software", 1, (int(*)(void*))sdl_inits_fs, sdl_close, sdl_resize, sdl_pause, sdl_enable }, { "SDL_Software", 1, (int(*)(void*))sdl_inits_fs, sdl_close, sdl_resize, sdl_pause, sdl_enable },
{ "SDL_Hardware", 1, (int(*)(void*))sdl_inith_fs, sdl_close, sdl_resize, sdl_pause, sdl_enable } { "SDL_Hardware", 1, (int(*)(void*))sdl_inith_fs, sdl_close, sdl_resize, sdl_pause, sdl_enable },
#ifdef USE_VNC { "VNC", 0, vnc_init, vnc_close, vnc_resize, vnc_pause, NULL }
,{ "VNC", 0, vnc_init, vnc_close, vnc_resize, vnc_pause, NULL }
#endif
}, },
}; };
@@ -691,12 +685,9 @@ plat_vidapi_name(int api)
break; break;
case 1: case 1:
break; break;
#ifdef USE_VNC
case 2: case 2:
name = "vnc"; name = "vnc";
break; break;
#endif
default: default:
fatal("Unknown renderer: %i\n", api); fatal("Unknown renderer: %i\n", api);
break; break;

View File

@@ -89,7 +89,6 @@ win_mouse_handle(PRAWINPUT raw)
* seems to work fine for RDP on Windows 10 * seems to work fine for RDP on Windows 10
* Not sure about other environments. * Not sure about other environments.
*/ */
x=state.lLastX, y=state.lLastY;
mousestate.dx += (state.lLastX - x)/100; mousestate.dx += (state.lLastX - x)/100;
mousestate.dy += (state.lLastY - y)/100; mousestate.dy += (state.lLastY - y)/100;
x=state.lLastX; x=state.lLastX;

View File

@@ -119,12 +119,6 @@ ResetAllMenus(void)
EnableMenuItem(menuMain, IDM_CONFIG_SAVE, MF_DISABLED); EnableMenuItem(menuMain, IDM_CONFIG_SAVE, MF_DISABLED);
#endif #endif
#ifdef USE_D2D
/* Disable Direct2D menu option on NT5 */
if(LOBYTE(LOWORD(GetVersion())) < 6)
EnableMenuItem(menuMain, IDM_VID_D2D, MF_GRAYED);
#endif
CheckMenuItem(menuMain, IDM_ACTION_RCTRL_IS_LALT, MF_UNCHECKED); CheckMenuItem(menuMain, IDM_ACTION_RCTRL_IS_LALT, MF_UNCHECKED);
CheckMenuItem(menuMain, IDM_UPDATE_ICONS, MF_UNCHECKED); CheckMenuItem(menuMain, IDM_UPDATE_ICONS, MF_UNCHECKED);
@@ -160,12 +154,7 @@ ResetAllMenus(void)
CheckMenuItem(menuMain, IDM_VID_RESIZE, MF_UNCHECKED); CheckMenuItem(menuMain, IDM_VID_RESIZE, MF_UNCHECKED);
CheckMenuItem(menuMain, IDM_VID_SDL_SW, MF_UNCHECKED); CheckMenuItem(menuMain, IDM_VID_SDL_SW, MF_UNCHECKED);
CheckMenuItem(menuMain, IDM_VID_SDL_HW, MF_UNCHECKED); CheckMenuItem(menuMain, IDM_VID_SDL_HW, MF_UNCHECKED);
#ifdef USE_D2D
CheckMenuItem(menuMain, IDM_VID_D2D, MF_UNCHECKED);
#endif
#ifdef USE_VNC
CheckMenuItem(menuMain, IDM_VID_VNC, MF_UNCHECKED); CheckMenuItem(menuMain, IDM_VID_VNC, MF_UNCHECKED);
#endif
CheckMenuItem(menuMain, IDM_VID_FS_FULL+0, MF_UNCHECKED); CheckMenuItem(menuMain, IDM_VID_FS_FULL+0, MF_UNCHECKED);
CheckMenuItem(menuMain, IDM_VID_FS_FULL+1, MF_UNCHECKED); CheckMenuItem(menuMain, IDM_VID_FS_FULL+1, MF_UNCHECKED);
CheckMenuItem(menuMain, IDM_VID_FS_FULL+2, MF_UNCHECKED); CheckMenuItem(menuMain, IDM_VID_FS_FULL+2, MF_UNCHECKED);
@@ -447,12 +436,7 @@ MainWindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
case IDM_VID_SDL_SW: case IDM_VID_SDL_SW:
case IDM_VID_SDL_HW: case IDM_VID_SDL_HW:
#ifdef USE_D2D
case IDM_VID_D2D:
#endif
#ifdef USE_VNC
case IDM_VID_VNC: case IDM_VID_VNC:
#endif
CheckMenuItem(hmenu, IDM_VID_SDL_SW + vid_api, MF_UNCHECKED); CheckMenuItem(hmenu, IDM_VID_SDL_SW + vid_api, MF_UNCHECKED);
plat_setvid(LOWORD(wParam) - IDM_VID_SDL_SW); plat_setvid(LOWORD(wParam) - IDM_VID_SDL_SW);
CheckMenuItem(hmenu, IDM_VID_SDL_SW + vid_api, MF_CHECKED); CheckMenuItem(hmenu, IDM_VID_SDL_SW + vid_api, MF_CHECKED);