Another round of cleanups - the main code no longer refers to, let alone uses, anything in the platform folder - completely separated!

This commit is contained in:
waltje
2017-10-11 05:40:44 -04:00
parent efda4bde0d
commit c7cb446684
105 changed files with 2319 additions and 1585 deletions

View File

@@ -8,7 +8,7 @@
#
# Modified Makefile for Win32 (MinGW32) environment.
#
# Version: @(#)Makefile.mingw 1.0.55 2017/10/09
# Version: @(#)Makefile.mingw 1.0.56 2017/10/10
#
# Authors: Miran Grca, <mgrca8@gmail.com>
# Fred N. van Kempen, <decwiz@yahoo.com>
@@ -327,6 +327,7 @@ SNDOBJ := sound.o \
snd_ym7128.o
VIDOBJ := video.o \
vid_table.o \
vid_cga.o vid_cga_comp.o vid_mda.o \
vid_ega.o vid_ega_render.o \
vid_vga.o vid_svga.o vid_svga_render.o \
@@ -353,18 +354,18 @@ VIDOBJ := video.o \
vid_pc200.o \
vid_tandy.o vid_tandysl.o
WINOBJ := win.o \
PLATOBJ := win.o \
win_ddraw.o win_ddraw_fs.o win_d3d.o win_d3d_fs.o \
win_dynld.o win_thread.o $(WSERIAL) win_cdrom.o win_cdrom_ioctl.o \
win_keyboard.o win_mouse.o win_joystick.o win_midi.o \
win_dialog.o win_about.o win_status.o win_stbar.o \
win_settings.o $(OPENDIR) win_dynld.o win_video.o \
$(WSERIAL) win_keyboard.o win_mouse.o win_joystick.o \
win_midi.o win_cdrom.o win_cdrom_ioctl.o \
win_thread.o win_deviceconfig.o win_joystickconfig.o
win_settings.o win_deviceconfig.o win_joystickconfig.o \
$(OPENDIR)
OBJ := $(MAINOBJ) $(CPUOBJ) $(MCHOBJ) $(DEVOBJ) \
$(FDDOBJ) $(CDROMOBJ) $(HDDOBJ) \
$(USBOBJ) $(NETOBJ) $(SCSIOBJ) $(SNDOBJ) $(VIDOBJ) \
$(WINOBJ) $(DEVBROBJ)
$(PLATOBJ) $(DEVBROBJ)
ifdef EXOBJ
OBJ += $(EXOBJ)
endif

View File

@@ -22,6 +22,7 @@
#include <stdarg.h>
#include <wchar.h>
#include "../86box.h"
#include "../config.h"
#include "../ibm.h"
#include "../timer.h"
#include "../device.h"
@@ -4012,3 +4013,22 @@ void cdrom_general_init(void)
}
}
}
void
cdrom_close(uint8_t id)
{
switch (cdrom_drives[id].host_drive) {
case 0:
null_close(id);
break;
case 200:
image_close(id);
break;
default:
ioctl_close(id);
break;
}
}

View File

@@ -8,7 +8,7 @@
*
* Configuration file handler.
*
* Version: @(#)config.c 1.0.15 2017/10/09
* Version: @(#)config.c 1.0.16 2017/10/10
*
* Authors: Sarah Walker,
* Miran Grca, <mgrca8@gmail.com>
@@ -54,8 +54,8 @@
#include "sound/sound.h"
#include "video/video.h"
#include "ui.h"
#include "win/plat_joystick.h"
#include "win/plat_midi.h"
#include "plat_joystick.h"
#include "plat_midi.h"
typedef struct _list_ {

View File

@@ -16,7 +16,7 @@
#include "joystick_standard.h"
#include "joystick_sw_pad.h"
#include "joystick_tm_fcs.h"
#include "../win/plat_joystick.h"
#include "../plat_joystick.h"
int joystick_type;

View File

@@ -6,7 +6,7 @@
#include "../ibm.h"
#include "../device.h"
#include "../timer.h"
#include "../win/plat_joystick.h"
#include "../plat_joystick.h"
#include "gameport.h"
#include "joystick_standard.h"

View File

@@ -6,7 +6,7 @@
#include "../ibm.h"
#include "../device.h"
#include "../timer.h"
#include "../win/plat_joystick.h"
#include "../plat_joystick.h"
#include "gameport.h"
#include "joystick_standard.h"

View File

@@ -27,7 +27,7 @@
#include "../ibm.h"
#include "../device.h"
#include "../timer.h"
#include "../win/plat_joystick.h"
#include "../plat_joystick.h"
#include "gameport.h"
#include "joystick_sw_pad.h"

View File

@@ -6,7 +6,7 @@
#include "../ibm.h"
#include "../device.h"
#include "../timer.h"
#include "../win/plat_joystick.h"
#include "../plat_joystick.h"
#include "gameport.h"
#include "joystick_standard.h"

View File

@@ -8,7 +8,7 @@
*
* Host to guest keyboard interface and keyboard scan code sets.
*
* Version: @(#)keyboard.c 1.0.3 2017/10/09
* Version: @(#)keyboard.c 1.0.4 2017/10/10
*
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com>
@@ -21,7 +21,7 @@
#include <string.h>
#include <wchar.h>
#include "ibm.h"
#include "win/plat_keyboard.h"
#include "plat_keyboard.h"
#include "keyboard.h"

View File

@@ -6,7 +6,7 @@
#include "ibm.h"
#include "keyboard_at.h"
#include "mouse.h"
#include "win/plat_mouse.h"
#include "plat_mouse.h"
int mouse_scan = 0;

View File

@@ -8,9 +8,11 @@
*
* Handle WinPcap library processing.
*
* Version: @(#)net_pcap.c 1.0.7 2017/10/09
* Version: @(#)net_pcap.c 1.0.8 2017/10/10
*
* Author: Fred N. van Kempen, <decwiz@yahoo.com>
*
* Copyright 2017 Fred N. van Kempen.
*/
#include <stdio.h>
#include <stdint.h>
@@ -21,8 +23,8 @@
#include "../ibm.h"
#include "../config.h"
#include "../device.h"
#include "../win/plat_dynld.h"
#include "../win/plat_thread.h"
#include "../plat.h"
#include "../plat_dynld.h"
#include "network.h"

View File

@@ -8,9 +8,11 @@
*
* Handle SLiRP library processing.
*
* Version: @(#)net_slirp.c 1.0.6 2017/10/09
* Version: @(#)net_slirp.c 1.0.7 2017/10/10
*
* Author: Fred N. van Kempen, <decwiz@yahoo.com>
*
* Copyright 2017 Fred N. van Kempen.
*/
#include <stdio.h>
#include <stdint.h>
@@ -22,7 +24,7 @@
#include "../ibm.h"
#include "../config.h"
#include "../device.h"
#include "../win/plat_thread.h"
#include "../plat.h"
#include "network.h"

View File

@@ -10,7 +10,7 @@
*
* Based on the "libpcap" examples.
*
* Version: @(#)pcap_if.c 1.0.4 2017/10/09
* Version: @(#)pcap_if.c 1.0.5 2017/10/10
*
* Author: Fred N. van Kempen, <decwiz@yahoo.com>
*
@@ -21,7 +21,7 @@
#include <stdarg.h>
#include <ctype.h>
#include <pcap.h>
#include "../win/plat_dynld.h"
#include "../plat_dynld.h"
static void *pcap_handle; /* handle to WinPcap DLL */

View File

@@ -8,7 +8,7 @@
*
* Emulation core dispatcher.
*
* Version: @(#)pc.c 1.0.21 2017/10/10
* Version: @(#)pc.c 1.0.22 2017/10/10
*
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com>
@@ -70,15 +70,15 @@
#ifdef WALTJE
# define UNICODE
# include <direct.h>
# include "win/plat_dir.h"
# include "plat_dir.h"
# undef UNICODE
#endif
#include "ui.h"
#include "plat.h"
#include "win/plat_joystick.h"
#include "win/plat_keyboard.h"
#include "win/plat_midi.h"
#include "win/plat_mouse.h"
#include "plat_joystick.h"
#include "plat_keyboard.h"
#include "plat_midi.h"
#include "plat_mouse.h"
int window_w, window_h, window_x, window_y, window_remember;

View File

@@ -43,7 +43,7 @@ void setpitclock(float clock)
VGACONST2=(clock/28322000.0);
isa_timing = clock/8000000.0;
bus_timing = clock/(double)cpu_busspeed;
video_updatetiming();
video_update_timing();
xt_cpu_multi = (int64_t)((14318184.0*(double)(1 << TIMER_SHIFT)) / (double)machines[machine].cpu[cpu_manufacturer].cpus[cpu].rspeed);
RTCCONST=clock/32768.0;

View File

@@ -8,7 +8,7 @@
*
* Define the various platform support functions.
*
* Version: @(#)plat.h 1.0.2 2017/10/09
* Version: @(#)plat.h 1.0.3 2017/10/10
*
* Authors: Miran Grca, <mgrca8@gmail.com>
* Fred N. van Kempen, <decwiz@yahoo.com>
@@ -34,6 +34,7 @@ extern int dir_check_exist(wchar_t *path);
extern int dir_create(wchar_t *path);
extern void leave_fullscreen(void);
/* Resource management. */
extern wchar_t *plat_get_string(int id);
extern wchar_t *plat_get_string_from_string(char *str);
@@ -56,14 +57,44 @@ extern void ioctl_reset(uint8_t id);
extern void ioctl_close(uint8_t id);
/* Thread support. */
typedef void thread_t;
typedef void event_t;
extern thread_t *thread_create(void (*thread_rout)(void *param), void *param);
extern void thread_kill(thread_t *handle);
extern event_t *thread_create_event(void);
extern void thread_set_event(event_t *event);
extern void thread_reset_event(event_t *_event);
extern int thread_wait_event(event_t *event, int timeout);
extern void thread_destroy_event(event_t *_event);
extern void thread_sleep(int t);
extern void *thread_create_mutex(wchar_t *name);
extern void thread_close_mutex(void *mutex);
extern uint8_t thread_wait_mutex(void *mutex);
extern uint8_t thread_release_mutex(void *mutex);
/* Other stuff. */
extern void startblit(void);
extern void endblit(void);
extern void take_screenshot(void);
extern uint32_t get_ticks(void);
extern void delay_ms(uint32_t count);
#ifdef __cplusplus
}
#endif
extern void startslirp(void);
extern void endslirp(void);
#endif /*EMU_PLAT_H*/

View File

@@ -21,7 +21,7 @@ typedef struct {
char name[80]; /* name of open port */
void (*rd_done)(void *, int);
void *rd_arg;
#ifdef BHTTY_C
#ifdef PLAT_SERIAL_C
HANDLE handle;
OVERLAPPED rov, /* READ and WRITE events */
wov;

View File

@@ -13,8 +13,8 @@
#include <wchar.h>
#include "ibm.h"
#include "pit.h"
#include "win/plat_keyboard.h"
#include "win/plat_mouse.h"
#include "plat_keyboard.h"
#include "plat_mouse.h"
PPI ppi;

View File

@@ -12,7 +12,7 @@
*
* NOTE: THIS IS CURRENTLY A MESS, but will be cleaned up as I go.
*
* Version: @(#)scsi_aha154x.c 1.0.25 2017/10/10
* Version: @(#)scsi_aha154x.c 1.0.26 2017/10/10
*
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
* Original Buslogic version by SA1988 and Miran Grca.
@@ -36,7 +36,7 @@
#include "../pic.h"
#include "../timer.h"
#include "../device.h"
#include "../win/plat_thread.h"
#include "../plat.h"
#include "scsi.h"
#include "scsi_bios_command.h"
#include "scsi_device.h"
@@ -449,7 +449,7 @@ static void aha_cmd_thread(void *priv);
static thread_t *poll_tid;
#if ENABLE_AHA154X_LOG
#ifdef ENABLE_AHA154X_LOG
int aha_do_log = ENABLE_AHA154X_LOG;
#endif

View File

@@ -10,11 +10,12 @@
* 0 - BT-545C ISA;
* 1 - BT-958D PCI (but BT-545C ISA on non-PCI machines)
*
* Version: @(#)scsi_buslogic.c 1.0.20 2017/10/10
* Version: @(#)scsi_buslogic.c 1.0.21 2017/10/10
*
* Authors: TheCollector1995, <mariogplayer@gmail.com>
* Miran Grca, <mgrca8@gmail.com>
* Fred N. van Kempen, <decwiz@yahoo.com>
*
* Copyright 2016,2017 Miran Grca.
* Copyright 2017 Fred N. van Kempen.
*/
@@ -34,7 +35,7 @@
#include "../pci.h"
#include "../timer.h"
#include "../device.h"
#include "../win/plat_thread.h"
#include "../plat.h"
#include "scsi.h"
#include "scsi_bios_command.h"
#include "scsi_device.h"
@@ -530,7 +531,7 @@ enum {
CHIP_BUSLOGIC_PCI
};
#if ENABLE_BUSLOGIC_LOG
#ifdef ENABLE_BUSLOGIC_LOG
int buslogic_do_log = ENABLE_BUSLOGIC_LOG;
#endif

View File

@@ -9,7 +9,7 @@
* Implementation of the NCR 5380 series of SCSI Host Adapters
* made by NCR. These controllers were designed for the ISA bus.
*
* Version: @(#)scsi_ncr5380.c 1.0.2 2017/10/08
* Version: @(#)scsi_ncr5380.c 1.0.3 2017/10/10
*
* Authors: Sarah Walker, <tommowalker@tommowalker.co.uk>
* TheCollector1995, <mariogplayer@gmail.com>
@@ -31,7 +31,7 @@
#include "../pic.h"
#include "../timer.h"
#include "../device.h"
#include "../win/plat_thread.h"
#include "../plat.h"
#include "scsi.h"
#include "scsi_device.h"
#include "scsi_ncr5380.h"

View File

@@ -5,8 +5,8 @@
#include <wchar.h>
#include "../device.h"
#include "../ibm.h"
#include "../win/plat_midi.h"
#include "../win/plat_ticks.h"
#include "../plat.h"
#include "../plat_midi.h"
#include "midi.h"
#include "midi_system.h"
#ifdef USE_FLUIDSYNTH

View File

@@ -4,11 +4,11 @@
#include <stdlib.h>
#include <wchar.h>
#include "munt/c_interface/c_interface.h"
#include "../win/plat_thread.h"
#include "../ibm.h"
#include "../device.h"
#include "../mem.h"
#include "../rom.h"
#include "../plat.h"
#include "sound.h"
#include "midi.h"
#include "midi_mt32.h"

View File

@@ -4,7 +4,8 @@
#include <stdlib.h>
#include <wchar.h>
#include "../device.h"
#include "../win/plat_midi.h"
#include "../plat.h"
#include "../plat_midi.h"
#include "midi.h"
#include "midi_system.h"

View File

@@ -8,10 +8,11 @@
*
* Sound emulation core.
*
* Version: @(#)sound.c 1.0.4 2017/09/24
* Version: @(#)sound.c 1.0.5 2017/10/10
*
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com>
*
* Copyright 2008-2017 Sarah Walker.
* Copyright 2016,2017 Miran Grca.
*/
@@ -24,16 +25,14 @@
#include "../device.h"
#include "../timer.h"
#include "../cdrom/cdrom.h"
#include "../win/plat_thread.h"
#include "../plat.h"
#include "sound.h"
#include "midi.h"
#include "snd_opl.h"
#include "snd_adlib.h"
#include "snd_adlibgold.h"
#ifdef DEV_BRANCH
# ifdef USE_PAS16
# include "snd_pas16.h"
# endif
#if defined(DEV_BRANCH) && defined(USE_PAS16)
# include "snd_pas16.h"
#endif
#include "snd_sb.h"
#include "snd_sb_dsp.h"
@@ -64,10 +63,8 @@ static SOUND_CARD sound_cards[] =
{ "[ISA] Sound Blaster Pro v2", "sbprov2", &sb_pro_v2_device },
{ "[ISA] Sound Blaster 16", "sb16", &sb_16_device },
{ "[ISA] Sound Blaster AWE32", "sbawe32", &sb_awe32_device },
#ifdef DEV_BRANCH
#ifdef USE_PAS16
#if defined(DEV_BRANCH) && defined(USE_PAS16)
{ "[ISA] Pro Audio Spectrum 16","pas16", &pas16_device },
#endif
#endif
{ "[ISA] Windows Sound System", "wss", &wss_device },
{ "[MCA] Adlib", "adlib_mca", &adlib_mca_device },

View File

@@ -1,7 +1,21 @@
/* Copyright holders: Sarah Walker, Melissa Goad
see COPYING for more details
*/
/*ATI 18800 emulation (VGA Edge-16)*/
/*
* 86Box A hypervisor and IBM PC system emulator that specializes in
* running old operating systems and software designed for IBM
* PC systems and compatibles from 1981 through fairly recent
* system designs based on the PCI bus.
*
* This file is part of the 86Box distribution.
*
* ATI 18800 emulation (VGA Edge-16)
*
* Version: @(#)vid_ati18800.c 1.0.1 2017/10/10
*
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com>
*
* Copyright 2008-2017 Sarah Walker.
* Copyright 2016,2017 Miran Grca.
*/
#include <stdio.h>
#include <stdint.h>
#include <string.h>
@@ -29,7 +43,8 @@ typedef struct ati18800_t
int index;
} ati18800_t;
void ati18800_out(uint16_t addr, uint8_t val, void *p)
static void ati18800_out(uint16_t addr, uint8_t val, void *p)
{
ati18800_t *ati18800 = (ati18800_t *)p;
svga_t *svga = &ati18800->svga;
@@ -103,7 +118,7 @@ void ati18800_out(uint16_t addr, uint8_t val, void *p)
svga_out(addr, val, svga);
}
uint8_t ati18800_in(uint16_t addr, void *p)
static uint8_t ati18800_in(uint16_t addr, void *p)
{
ati18800_t *ati18800 = (ati18800_t *)p;
svga_t *svga = &ati18800->svga;
@@ -162,7 +177,7 @@ void ati18800_recalctimings(svga_t *svga)
}
}
void *ati18800_init(device_t *info)
static void *ati18800_init(device_t *info)
{
ati18800_t *ati18800 = malloc(sizeof(ati18800_t));
memset(ati18800, 0, sizeof(ati18800_t));
@@ -190,7 +205,7 @@ static int ati18800_available(void)
return rom_present(L"roms/video/ati18800/vga88.BIN");
}
void ati18800_close(void *p)
static void ati18800_close(void *p)
{
ati18800_t *ati18800 = (ati18800_t *)p;
@@ -199,21 +214,21 @@ void ati18800_close(void *p)
free(ati18800);
}
void ati18800_speed_changed(void *p)
static void ati18800_speed_changed(void *p)
{
ati18800_t *ati18800 = (ati18800_t *)p;
svga_recalctimings(&ati18800->svga);
}
void ati18800_force_redraw(void *p)
static void ati18800_force_redraw(void *p)
{
ati18800_t *ati18800 = (ati18800_t *)p;
ati18800->svga.fullchange = changeframecount;
}
void ati18800_add_status_info(char *s, int max_len, void *p)
static void ati18800_add_status_info(char *s, int max_len, void *p)
{
ati18800_t *ati18800 = (ati18800_t *)p;

View File

@@ -1,7 +1,21 @@
/* Copyright holders: Sarah Walker, Tenshi
see COPYING for more details
*/
/*ATI 28800 emulation (VGA Charger)*/
/*
* 86Box A hypervisor and IBM PC system emulator that specializes in
* running old operating systems and software designed for IBM
* PC systems and compatibles from 1981 through fairly recent
* system designs based on the PCI bus.
*
* This file is part of the 86Box distribution.
*
* ATI 28800 emulation (VGA Charger)
*
* Version: @(#)vid_ati28800.c 1.0.1 2017/10/10
*
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com>
*
* Copyright 2008-2017 Sarah Walker.
* Copyright 2016,2017 Miran Grca.
*/
#include <stdio.h>
#include <stdint.h>
#include <string.h>
@@ -31,9 +45,11 @@ typedef struct ati28800_t
int index;
} ati28800_t;
void ati28800_svga_recalctimings(ati28800_t *ati28800);
void ati28800_out(uint16_t addr, uint8_t val, void *p)
static void ati28800_svga_recalctimings(ati28800_t *ati28800);
static void ati28800_out(uint16_t addr, uint8_t val, void *p)
{
ati28800_t *ati28800 = (ati28800_t *)p;
svga_t *svga = &ati28800->svga;
@@ -101,7 +117,7 @@ void ati28800_out(uint16_t addr, uint8_t val, void *p)
svga_out(addr, val, svga);
}
uint8_t ati28800_in(uint16_t addr, void *p)
static uint8_t ati28800_in(uint16_t addr, void *p)
{
ati28800_t *ati28800 = (ati28800_t *)p;
svga_t *svga = &ati28800->svga;
@@ -155,7 +171,7 @@ uint8_t ati28800_in(uint16_t addr, void *p)
return temp;
}
void ati28800_svga_recalctimings(ati28800_t *ati28800)
static void ati28800_svga_recalctimings(ati28800_t *ati28800)
{
double crtcconst;
double _dispontime, _dispofftime, disptime;
@@ -307,7 +323,8 @@ void ati28800_svga_recalctimings(ati28800_t *ati28800)
pclog("svga->render %08X\n", svga->render);*/
}
void ati28800_recalctimings(svga_t *svga)
static void ati28800_recalctimings(svga_t *svga)
{
ati28800_t *ati28800 = (ati28800_t *)svga->p;
uint8_t clock_sel = (svga->miscout >> 2) & 3;
@@ -354,7 +371,7 @@ void ati28800_recalctimings(svga_t *svga)
}
}
void *ati28800_init(device_t *info)
static void *ati28800_init(device_t *info)
{
uint32_t memory = 512;
ati28800_t *ati28800;
@@ -411,7 +428,7 @@ static int ati28800_wonderxl24_available(void)
return (rom_present(L"roms/video/ati28800/112-14318-102.bin") && rom_present(L"roms/video/ati28800/112-14319-102.bin"));
}
void ati28800_close(void *p)
static void ati28800_close(void *p)
{
ati28800_t *ati28800 = (ati28800_t *)p;
@@ -420,21 +437,21 @@ void ati28800_close(void *p)
free(ati28800);
}
void ati28800_speed_changed(void *p)
static void ati28800_speed_changed(void *p)
{
ati28800_t *ati28800 = (ati28800_t *)p;
ati28800_svga_recalctimings(ati28800);
}
void ati28800_force_redraw(void *p)
static void ati28800_force_redraw(void *p)
{
ati28800_t *ati28800 = (ati28800_t *)p;
ati28800->svga.fullchange = changeframecount;
}
void ati28800_add_status_info(char *s, int max_len, void *p)
static void ati28800_add_status_info(char *s, int max_len, void *p)
{
ati28800_t *ati28800 = (ati28800_t *)p;

View File

@@ -1,26 +1,41 @@
/* Copyright holders: Sarah Walker
see COPYING for more details
*/
/*ATI 68860 RAMDAC emulation (for Mach64)*/
/*
ATI 68860/68880 Truecolor DACs:
REG08 (R/W):
bit 0-? Always 2 ??
REG0A (R/W):
bit 0-? Always 1Dh ??
REG0B (R/W): (GMR ?)
bit 0-7 Mode. 82h: 4bpp, 83h: 8bpp, A0h: 15bpp, A1h: 16bpp, C0h: 24bpp,
E3h: 32bpp (80h for VGA modes ?)
REG0C (R/W): Device Setup Register A
bit 0 Controls 6/8bit DAC. 0: 8bit DAC/LUT, 1: 6bit DAC/LUT
2-3 Depends on Video memory (= VRAM width ?) . 1: Less than 1Mb, 2: 1Mb,
3: > 1Mb
5-6 Always set ?
7 If set can remove "snow" in some cases (A860_Delay_L ?) ??
*/
* 86Box A hypervisor and IBM PC system emulator that specializes in
* running old operating systems and software designed for IBM
* PC systems and compatibles from 1981 through fairly recent
* system designs based on the PCI bus.
*
* This file is part of the 86Box distribution.
*
* ATI 68860 RAMDAC emulation (for Mach64)
*
* ATI 68860/68880 Truecolor DACs:
* REG08 (R/W):
* bit 0-? Always 2 ??
*
* REG0A (R/W):
* bit 0-? Always 1Dh ??
*
* REG0B (R/W): (GMR ?)
* bit 0-7 Mode. 82h: 4bpp, 83h: 8bpp,
* A0h: 15bpp, A1h: 16bpp, C0h: 24bpp,
* E3h: 32bpp (80h for VGA modes ?)
*
* REG0C (R/W): Device Setup Register A
* bit 0 Controls 6/8bit DAC. 0: 8bit DAC/LUT, 1: 6bit DAC/LUT
* 2-3 Depends on Video memory (= VRAM width ?) .
* 1: Less than 1Mb, 2: 1Mb, 3: > 1Mb
* 5-6 Always set ?
* 7 If set can remove "snow" in some cases
* (A860_Delay_L ?) ??
*
* Version: @(#)vid_ati68860.c 1.0.1 2017/10/10
*
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com>
*
* Copyright 2008-2017 Sarah Walker.
* Copyright 2016,2017 Miran Grca.
*/
#include <stdio.h>
#include <stdint.h>
#include <string.h>

View File

@@ -1,6 +1,21 @@
/* Copyright holders: Sarah Walker
see COPYING for more details
*/
/*
* 86Box A hypervisor and IBM PC system emulator that specializes in
* running old operating systems and software designed for IBM
* PC systems and compatibles from 1981 through fairly recent
* system designs based on the PCI bus.
*
* This file is part of the 86Box distribution.
*
* Emulation of the EEPROM on select ATI cards.
*
* Version: @(#)vid_ati_eeprom.c 1.0.1 2017/10/10
*
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com>
*
* Copyright 2008-2017 Sarah Walker.
* Copyright 2016,2017 Miran Grca.
*/
#include <stdio.h>
#include <stdint.h>
#include <string.h>

View File

@@ -8,10 +8,11 @@
*
* ATi Mach64 graphics card emulation.
*
* Version: @(#)vid_ati_mach64.c 1.0.3 2017/10/04
* Version: @(#)vid_ati_mach64.c 1.0.4 2017/10/10
*
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com>
*
* Copyright 2008-2017 Sarah Walker.
* Copyright 2016,2017 Miran Grca.
*/
@@ -26,7 +27,7 @@
#include "../mem.h"
#include "../pci.h"
#include "../rom.h"
#include "../win/plat_thread.h"
#include "../plat.h"
#include "video.h"
#include "vid_svga.h"
#include "vid_svga_render.h"

View File

@@ -1,13 +1,29 @@
/* Copyright holders: Tenshi
see COPYING for more details
*/
/*Brooktree BT485 true colour RAMDAC emulation*/
/*Currently only a dummy stub for logging and passing output to the generic SVGA handler*/
#include "../ibm.h"
/*
* 86Box A hypervisor and IBM PC system emulator that specializes in
* running old operating systems and software designed for IBM
* PC systems and compatibles from 1981 through fairly recent
* system designs based on the PCI bus.
*
* This file is part of the 86Box distribution.
*
* Brooktree BT485 true colour RAMDAC emulation.
*
* Currently only a dummy stub for logging and passing output
* to the generic SVGA handler.
*
* Version: @(#)vid_bt485_ramdac.c 1.0.1 2017/10/10
*
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com>
*
* Copyright 2008-2017 Sarah Walker.
* Copyright 2016,2017 Miran Grca.
*/
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include <wchar.h>
#include "../ibm.h"
#include "../mem.h"
#include "video.h"
#include "vid_svga.h"

View File

@@ -8,10 +8,11 @@
*
* Emulation of the old and new IBM CGA graphics cards.
*
* Version: @(#)vid_cga.c 1.0.3 2017/10/04
* Version: @(#)vid_cga.c 1.0.4 2017/10/10
*
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com>
*
* Copyright 2008-2017 Sarah Walker.
* Copyright 2016,2017 Miran Grca.
*/
@@ -30,9 +31,6 @@
#include "video.h"
#include "vid_cga.h"
#include "vid_cga_comp.h"
#ifndef __unix
# include "../win/win_cgapal.h" /*YUCK*/
#endif
#define CGA_RGB 0

View File

@@ -9,12 +9,13 @@
* IBM CGA composite filter, borrowed from reenigne's DOSBox
* patch and ported to C.
*
* Version: @(#)vid_cga.c 1.0.1 2017/09/24
* Version: @(#)vid_cga_comp.c 1.0.2 2017/10/10
*
* Authors: reenigne,
* Miran Grca, <mgrca8@gmail.com>
*
* Copyright 2015-2017 reenigne.
* Copyright 2015,2017 Miran Grca.
* Copyright 2015-2017 Miran Grca.
*/
#include <stdio.h>
#include <stdint.h>

View File

@@ -1,3 +1,21 @@
/*
* 86Box A hypervisor and IBM PC system emulator that specializes in
* running old operating systems and software designed for IBM
* PC systems and compatibles from 1981 through fairly recent
* system designs based on the PCI bus.
*
* This file is part of the 86Box distribution.
*
* Emulation of select Cirrus Logic cards.
*
* Version: @(#)vid_cl_gd.c 1.0.1 2017/10/10
*
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com>
*
* Copyright 2008-2017 Sarah Walker.
* Copyright 2016,2017 Miran Grca.
*/
#include <stdio.h>
#include <stdint.h>
#include <string.h>

View File

@@ -1,4 +1,19 @@
/*This is the CL-GD 5446 blitter, directly from QEMU*/
/*
* 86Box A hypervisor and IBM PC system emulator that specializes in
* running old operating systems and software designed for IBM
* PC systems and compatibles from 1981 through fairly recent
* system designs based on the PCI bus.
*
* This file is part of the 86Box distribution.
*
* This is the CL-GD 5446 blitter, directly from QEMU.
*
* Version: @(#)vid_cl_gd_blit.c 1.0.1 2017/10/10
*
* Author: Miran Grca, <mgrca8@gmail.com>
*
* Copyright 2016,2017 Miran Grca.
*/
#include <stdio.h>
#include <stdint.h>
#include <string.h>

View File

@@ -1,3 +1,19 @@
/*
* 86Box A hypervisor and IBM PC system emulator that specializes in
* running old operating systems and software designed for IBM
* PC systems and compatibles from 1981 through fairly recent
* system designs based on the PCI bus.
*
* This file is part of the 86Box distribution.
*
* Emulation of the Cirrus Logic RAMDAC.
*
* Version: @(#)vid_cl_ramdac.c 1.0.1 2017/10/10
*
* Author: Miran Grca, <mgrca8@gmail.com>
*
* Copyright 2016,2017 Miran Grca.
*/
#include <stdio.h>
#include <stdint.h>
#include <string.h>

View File

@@ -1,4 +1,21 @@
/*Plantronics ColorPlus emulation*/
/*
* 86Box A hypervisor and IBM PC system emulator that specializes in
* running old operating systems and software designed for IBM
* PC systems and compatibles from 1981 through fairly recent
* system designs based on the PCI bus.
*
* This file is part of the 86Box distribution.
*
* Plantronics ColorPlus emulation.
*
* Version: @(#)vid_colorplus.c 1.0.1 2017/10/10
*
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com>
*
* Copyright 2008-2017 Sarah Walker.
* Copyright 2016,2017 Miran Grca.
*/
#include <stdio.h>
#include <stdint.h>
#include <string.h>

View File

@@ -9,11 +9,12 @@
* Emulation of the EGA, Chips & Technologies SuperEGA, and
* AX JEGA graphics cards.
*
* Version: @(#)vid_ega.c 1.0.5 2017/10/04
* Version: @(#)vid_ega.c 1.0.6 2017/10/10
*
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com>
* akm,
* akm
*
* Copyright 2008-2017 Sarah Walker.
* Copyright 2016,2017 Miran Grca.
*/

View File

@@ -8,10 +8,11 @@
*
* EGA renderers.
*
* Version: @(#)vid_ega_render.c 1.0.2 2017/09/24
* Version: @(#)vid_ega_render.c 1.0.3 2017/10/10
*
* Author: Sarah Walker, <http://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com>
*
* Copyright 2008-2017 Sarah Walker.
* Copyright 2016,2017 Miran Grca.
*/

View File

@@ -1,7 +1,21 @@
/* Copyright holders: Sarah Walker
see COPYING for more details
*/
/*ET4000 emulation*/
/*
* 86Box A hypervisor and IBM PC system emulator that specializes in
* running old operating systems and software designed for IBM
* PC systems and compatibles from 1981 through fairly recent
* system designs based on the PCI bus.
*
* This file is part of the 86Box distribution.
*
* Emulation of the Tseng Labs ET4000.
*
* Version: @(#)vid_et4000.c 1.0.1 2017/10/10
*
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com>
*
* Copyright 2008-2017 Sarah Walker.
* Copyright 2016,2017 Miran Grca.
*/
#include <stdio.h>
#include <stdint.h>
#include <string.h>

View File

@@ -1,8 +1,23 @@
/*ET4000/W32p emulation (Diamond Stealth 32)*/
/*Known bugs :
- Accelerator doesn't work in planar modes
*/
/*
* 86Box A hypervisor and IBM PC system emulator that specializes in
* running old operating systems and software designed for IBM
* PC systems and compatibles from 1981 through fairly recent
* system designs based on the PCI bus.
*
* This file is part of the 86Box distribution.
*
* ET4000/W32p emulation (Diamond Stealth 32)
*
* Known bugs: Accelerator doesn't work in planar modes
*
* Version: @(#)vid_et4000w32.c 1.0.1 2017/10/10
*
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com>
*
* Copyright 2008-2017 Sarah Walker.
* Copyright 2016,2017 Miran Grca.
*/
#include <stdio.h>
#include <stdint.h>
#include <string.h>
@@ -14,7 +29,7 @@
#include "../pci.h"
#include "../rom.h"
#include "../device.h"
#include "../win/plat_thread.h"
#include "../plat.h"
#include "video.h"
#include "vid_svga.h"
#include "vid_icd2061.h"

View File

@@ -1,12 +1,25 @@
/* Copyright holders: Sarah Walker
see COPYING for more details
*/
/*The below is (with some removals) a reasonable emulation of the ET4000/W32i blitter.
Unfortunately the Diamond Stealth 32 is actually an ET4000/W32p! Which has a different
blitter. If only I'd dug out and looked at the card before trying to emulate it.
This might be of use for an attempt at emulating an ET4000/W32i.
*/
/*
* 86Box A hypervisor and IBM PC system emulator that specializes in
* running old operating systems and software designed for IBM
* PC systems and compatibles from 1981 through fairly recent
* system designs based on the PCI bus.
*
* This file is part of the 86Box distribution.
*
* The below is (with some removals) a reasonable emulation
* of the ET4000/W32i blitter. Unfortunately the Diamond
* Stealth 32 is actually an ET4000/W32p! Which has a different
* blitter. If only I'd dug out and looked at the card before
* trying to emulate it.
*
* This might be of use for an attempt at an ET4000/W32i.
*
* Version: @(#)vid_et4000w32i.c 1.0.1 2017/10/10
*
* Author: Sarah Walker, <http://pcem-emulator.co.uk/>
*
* Copyright 2008-2017 Sarah Walker.
*/
#if 0
#include <stdio.h>

View File

@@ -1,4 +1,21 @@
/* MDSI Genius VHR emulation*/
/*
* 86Box A hypervisor and IBM PC system emulator that specializes in
* running old operating systems and software designed for IBM
* PC systems and compatibles from 1981 through fairly recent
* system designs based on the PCI bus.
*
* This file is part of the 86Box distribution.
*
* MDSI Genius VHR emulation.
*
* Version: @(#)vid_genius.c 1.0.1 2017/10/10
*
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com>
*
* Copyright 2008-2017 Sarah Walker.
* Copyright 2016,2017 Miran Grca.
*/
#include <stdio.h>
#include <stdint.h>
#include <string.h>
@@ -10,6 +27,7 @@
#include "../rom.h"
#include "../timer.h"
#include "../device.h"
#include "../plat.h"
#include "video.h"
#include "vid_genius.h"
@@ -18,10 +36,9 @@
#define GENIUS_YSIZE 1008
void updatewindowsize(int x, int y);
extern uint8_t fontdat8x12[256][16];
/* I'm at something of a disadvantage writing this emulation: I don't have an
* MDSI Genius card, nor do I have the BIOS extension (VHRBIOS.SYS) that came
* with it. What I do have are the GEM and Windows 1.04 drivers, plus a driver

View File

@@ -1,7 +1,21 @@
/* Copyright holders: Sarah Walker
see COPYING for more details
*/
/*Hercules emulation*/
/*
* 86Box A hypervisor and IBM PC system emulator that specializes in
* running old operating systems and software designed for IBM
* PC systems and compatibles from 1981 through fairly recent
* system designs based on the PCI bus.
*
* This file is part of the 86Box distribution.
*
* Hercules emulation.
*
* Version: @(#)vid_hercules.c 1.0.1 2017/10/10
*
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com>
*
* Copyright 2008-2017 Sarah Walker.
* Copyright 2016,2017 Miran Grca.
*/
#include <stdio.h>
#include <stdint.h>
#include <string.h>
@@ -15,9 +29,6 @@
#include "../device.h"
#include "video.h"
#include "vid_hercules.h"
#ifndef __unix
# include "../win/win_cgapal.h" /*YUCK*/
#endif
typedef struct hercules_t

View File

@@ -1,7 +1,21 @@
/* Copyright holders: John Elliott
see COPYING for more details
*/
/*Hercules InColor emulation*/
/*
* 86Box A hypervisor and IBM PC system emulator that specializes in
* running old operating systems and software designed for IBM
* PC systems and compatibles from 1981 through fairly recent
* system designs based on the PCI bus.
*
* This file is part of the 86Box distribution.
*
* Hercules InColor emulation.
*
* Version: @(#)vid_herculesplus.c 1.0.1 2017/10/10
*
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com>
*
* Copyright 2008-2017 Sarah Walker.
* Copyright 2016,2017 Miran Grca.
*/
#include <stdio.h>
#include <stdint.h>
#include <string.h>

View File

@@ -1,10 +1,23 @@
/* Copyright holders: Sarah Walker
see COPYING for more details
*/
/*PCem v8.1 by Tom Walker
ICD2061 clock generator emulation
Used by ET4000w32/p (Diamond Stealth 32)*/
/*
* 86Box A hypervisor and IBM PC system emulator that specializes in
* running old operating systems and software designed for IBM
* PC systems and compatibles from 1981 through fairly recent
* system designs based on the PCI bus.
*
* This file is part of the 86Box distribution.
*
* ICD2061 clock generator emulation.
*
* Used by ET4000w32/p (Diamond Stealth 32)
*
* Version: @(#)vid_icd2061.c 1.0.1 2017/10/10
*
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com>
*
* Copyright 2008-2017 Sarah Walker.
* Copyright 2016,2017 Miran Grca.
*/
#include <stdio.h>
#include <stdint.h>
#include <string.h>

View File

@@ -1,8 +1,21 @@
/* Copyright holders: Sarah Walker
see COPYING for more details
*/
/*ICS2595 clock chip emulation
Used by ATI Mach64*/
/*
* 86Box A hypervisor and IBM PC system emulator that specializes in
* running old operating systems and software designed for IBM
* PC systems and compatibles from 1981 through fairly recent
* system designs based on the PCI bus.
*
* This file is part of the 86Box distribution.
*
* ICS2595 clock chip emulation. Used by ATI Mach64.
*
* Version: @(#)vid_ics2595.c 1.0.1 2017/10/10
*
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com>
*
* Copyright 2008-2017 Sarah Walker.
* Copyright 2016,2017 Miran Grca.
*/
#include <stdio.h>
#include <stdint.h>
#include <string.h>

View File

@@ -1,7 +1,21 @@
/* Copyright holders: John Elliott
see COPYING for more details
*/
/*Hercules InColor emulation*/
/*
* 86Box A hypervisor and IBM PC system emulator that specializes in
* running old operating systems and software designed for IBM
* PC systems and compatibles from 1981 through fairly recent
* system designs based on the PCI bus.
*
* This file is part of the 86Box distribution.
*
* Hercules InColor emulation.
*
* Version: @(#)vid_incolor.c 1.0.1 2017/10/10
*
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com>
*
* Copyright 2008-2017 Sarah Walker.
* Copyright 2016,2017 Miran Grca.
*/
#include <stdio.h>
#include <stdint.h>
#include <string.h>
@@ -18,7 +32,6 @@
/* extended CRTC registers */
#define INCOLOR_CRTC_XMODE 20 /* xMode register */
#define INCOLOR_CRTC_UNDER 21 /* Underline */
#define INCOLOR_CRTC_OVER 22 /* Overstrike */

View File

@@ -1,7 +1,21 @@
/* Copyright holders: Sarah Walker
see COPYING for more details
*/
/*MDA emulation*/
/*
* 86Box A hypervisor and IBM PC system emulator that specializes in
* running old operating systems and software designed for IBM
* PC systems and compatibles from 1981 through fairly recent
* system designs based on the PCI bus.
*
* This file is part of the 86Box distribution.
*
* MDA emulation.
*
* Version: @(#)vid_mda.c 1.0.1 2017/10/10
*
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com>
*
* Copyright 2008-2017 Sarah Walker.
* Copyright 2016,2017 Miran Grca.
*/
#include <stdio.h>
#include <stdint.h>
#include <string.h>
@@ -15,9 +29,6 @@
#include "../device.h"
#include "video.h"
#include "vid_mda.h"
#ifndef __unix
# include "../win/win_cgapal.h" /*YUCK*/
#endif
typedef struct mda_t

View File

@@ -1,7 +1,21 @@
/* Copyright holders: Melissa Goad, Tenshi
see COPYING for more details
*/
/*nVidia RIVA 128 emulation*/
/*
* 86Box A hypervisor and IBM PC system emulator that specializes in
* running old operating systems and software designed for IBM
* PC systems and compatibles from 1981 through fairly recent
* system designs based on the PCI bus.
*
* This file is part of the 86Box distribution.
*
* nVidia RIVA 128 emulation.
*
* Version: @(#)vid_nv_riva128.c 1.0.1 2017/10/10
*
* Author: Melissa Goad
* Miran Grca, <mgrca8@gmail.com>
*
* Copyright 2017 Melissa Goad.
* Copyright 2017 Miran Grca.
*/
#include <stdio.h>
#include <stdint.h>
#include <string.h>
@@ -15,7 +29,7 @@
#include "../rom.h"
#include "../timer.h"
#include "../device.h"
#include "../win/plat_thread.h"
#include "../plat.h"
#include "video.h"
#include "vid_nv_riva128.h"
#include "vid_svga.h"

View File

@@ -1,8 +1,21 @@
/* Copyright holders: Sarah Walker
see COPYING for more details
*/
/*Olivetti M24 video emulation
Essentially double-res CGA*/
/*
* 86Box A hypervisor and IBM PC system emulator that specializes in
* running old operating systems and software designed for IBM
* PC systems and compatibles from 1981 through fairly recent
* system designs based on the PCI bus.
*
* This file is part of the 86Box distribution.
*
* Olivetti M24 video emulation- essentially double-res CGA.
*
* Version: @(#)vid_olivetti_m24.c 1.0.1 2017/10/10
*
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com>
*
* Copyright 2008-2017 Sarah Walker.
* Copyright 2016,2017 Miran Grca.
*/
#include <stdio.h>
#include <stdint.h>
#include <string.h>

View File

@@ -1,7 +1,21 @@
/* Copyright holders: Sarah Walker, Tenshi
see COPYING for more details
*/
/*Oak OTI067 emulation*/
/*
* 86Box A hypervisor and IBM PC system emulator that specializes in
* running old operating systems and software designed for IBM
* PC systems and compatibles from 1981 through fairly recent
* system designs based on the PCI bus.
*
* This file is part of the 86Box distribution.
*
* Oak OTI067/077 emulation.
*
* Version: @(#)vid_oti067.c 1.0.1 2017/10/10
*
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com>
*
* Copyright 2008-2017 Sarah Walker.
* Copyright 2016,2017 Miran Grca.
*/
#include <stdio.h>
#include <stdint.h>
#include <string.h>
@@ -17,298 +31,339 @@
#include "vid_svga.h"
typedef struct oti067_t
typedef struct {
svga_t svga;
rom_t bios_rom;
int index;
uint8_t regs[32];
uint8_t pos;
uint32_t vram_size;
uint32_t vram_mask;
uint8_t chip_id;
} oti_t;
static void
oti_out(uint16_t addr, uint8_t val, void *p)
{
svga_t svga;
rom_t bios_rom;
int index;
uint8_t regs[32];
uint8_t pos;
uint32_t vram_size;
uint32_t vram_mask;
oti_t *oti = (oti_t *)p;
svga_t *svga = &oti->svga;
uint8_t old;
uint8_t chip_id;
} oti067_t;
if ((((addr&0xFFF0) == 0x3D0 || (addr&0xFFF0) == 0x3B0) && addr < 0x3de) &&
!(svga->miscout & 1)) addr ^= 0x60;
void oti067_out(uint16_t addr, uint8_t val, void *p)
{
oti067_t *oti067 = (oti067_t *)p;
svga_t *svga = &oti067->svga;
uint8_t old;
switch (addr) {
case 0x3D4:
svga->crtcreg = val & 31;
return;
if ((((addr&0xFFF0) == 0x3D0 || (addr&0xFFF0) == 0x3B0) && addr < 0x3de) && !(svga->miscout & 1)) addr ^= 0x60;
switch (addr)
{
case 0x3D4:
svga->crtcreg = val & 31;
return;
case 0x3D5:
case 0x3D5:
if (svga->crtcreg <= 0x18)
val &= mask_crtc[svga->crtcreg];
if ((svga->crtcreg < 7) && (svga->crtc[0x11] & 0x80))
return;
if ((svga->crtcreg == 7) && (svga->crtc[0x11] & 0x80))
val = (svga->crtc[7] & ~0x10) | (val & 0x10);
old = svga->crtc[svga->crtcreg];
svga->crtc[svga->crtcreg] = val;
if (old != val)
{
if (svga->crtcreg < 0xE || svga->crtcreg > 0x10)
{
svga->fullchange = changeframecount;
svga_recalctimings(svga);
}
}
break;
if ((svga->crtcreg < 7) && (svga->crtc[0x11] & 0x80))
return;
if ((svga->crtcreg == 7) && (svga->crtc[0x11] & 0x80))
val = (svga->crtc[7] & ~0x10) | (val & 0x10);
old = svga->crtc[svga->crtcreg];
svga->crtc[svga->crtcreg] = val;
if (old != val) {
if (svga->crtcreg < 0xE || svga->crtcreg > 0x10) {
svga->fullchange = changeframecount;
svga_recalctimings(svga);
}
}
break;
case 0x3DE:
oti067->index = val & 0x1f;
return;
case 0x3DF:
oti067->regs[oti067->index] = val;
switch (oti067->index)
{
case 0xD:
svga->vrammask = (val & 0xc) ? oti067->vram_mask : 0x3ffff;
if ((val & 0x80) && oti067->vram_size == 256)
mem_mapping_disable(&svga->mapping);
else
mem_mapping_enable(&svga->mapping);
if (!(val & 0x80))
svga->vrammask = 0x3ffff;
break;
case 0x11:
svga->read_bank = (val & 0xf) * 65536;
svga->write_bank = (val >> 4) * 65536;
break;
}
return;
}
svga_out(addr, val, svga);
case 0x3DE:
oti->index = val & 0x1f;
return;
case 0x3DF:
oti->regs[oti->index] = val;
switch (oti->index) {
case 0xD:
svga->vrammask = (val & 0xc) ? oti->vram_mask : 0x3ffff;
if ((val & 0x80) && oti->vram_size == 256)
mem_mapping_disable(&svga->mapping);
else
mem_mapping_enable(&svga->mapping);
if (!(val & 0x80))
svga->vrammask = 0x3ffff;
break;
case 0x11:
svga->read_bank = (val & 0xf) * 65536;
svga->write_bank = (val >> 4) * 65536;
break;
}
return;
}
svga_out(addr, val, svga);
}
uint8_t oti067_in(uint16_t addr, void *p)
{
oti067_t *oti067 = (oti067_t *)p;
svga_t *svga = &oti067->svga;
uint8_t temp;
if ((((addr&0xFFF0) == 0x3D0 || (addr&0xFFF0) == 0x3B0) && addr < 0x3de) && !(svga->miscout & 1)) addr ^= 0x60;
switch (addr)
{
case 0x3D4:
temp = svga->crtcreg;
break;
case 0x3D5:
temp = svga->crtc[svga->crtcreg];
break;
case 0x3DE:
temp = oti067->index | (oti067->chip_id << 5);
break;
case 0x3DF:
if (oti067->index==0x10) temp = 0x18;
else temp = oti067->regs[oti067->index];
break;
default:
temp = svga_in(addr, svga);
break;
}
return temp;
static uint8_t
oti_in(uint16_t addr, void *p)
{
oti_t *oti = (oti_t *)p;
svga_t *svga = &oti->svga;
uint8_t temp;
if ((((addr&0xFFF0) == 0x3D0 || (addr&0xFFF0) == 0x3B0) && addr < 0x3de) &&
!(svga->miscout & 1)) addr ^= 0x60;
switch (addr) {
case 0x3D4:
temp = svga->crtcreg;
break;
case 0x3D5:
temp = svga->crtc[svga->crtcreg];
break;
case 0x3DE:
temp = oti->index | (oti->chip_id << 5);
break;
case 0x3DF:
if (oti->index==0x10)
temp = 0x18;
else
temp = oti->regs[oti->index];
break;
default:
temp = svga_in(addr, svga);
break;
}
return(temp);
}
void oti067_pos_out(uint16_t addr, uint8_t val, void *p)
{
oti067_t *oti067 = (oti067_t *)p;
if ((val & 8) != (oti067->pos & 8))
{
if (val & 8)
io_sethandler(0x03c0, 0x0020, oti067_in, NULL, NULL, oti067_out, NULL, NULL, oti067);
else
io_removehandler(0x03c0, 0x0020, oti067_in, NULL, NULL, oti067_out, NULL, NULL, oti067);
}
oti067->pos = val;
static void
oti_pos_out(uint16_t addr, uint8_t val, void *p)
{
oti_t *oti = (oti_t *)p;
if ((val & 8) != (oti->pos & 8)) {
if (val & 8)
io_sethandler(0x03c0, 32, oti_in, NULL, NULL,
oti_out, NULL, NULL, oti);
else
io_removehandler(0x03c0, 32, oti_in, NULL, NULL,
oti_out, NULL, NULL, oti);
}
oti->pos = val;
}
uint8_t oti067_pos_in(uint16_t addr, void *p)
{
oti067_t *oti067 = (oti067_t *)p;
return oti067->pos;
}
void oti067_recalctimings(svga_t *svga)
static uint8_t
oti_pos_in(uint16_t addr, void *p)
{
oti067_t *oti067 = (oti067_t *)svga->p;
if (oti067->regs[0x14] & 0x08) svga->ma_latch |= 0x10000;
if (oti067->regs[0x0d] & 0x0c) svga->rowoffset <<= 1;
if (oti067->regs[0x14] & 0x80)
{
svga->vtotal *= 2;
svga->dispend *= 2;
svga->vblankstart *= 2;
svga->vsyncstart *=2;
svga->split *= 2;
}
oti_t *oti = (oti_t *)p;
return(oti->pos);
}
static void
oti_recalctimings(svga_t *svga)
{
oti_t *oti = (oti_t *)svga->p;
if (oti->regs[0x14] & 0x08) svga->ma_latch |= 0x10000;
if (oti->regs[0x0d] & 0x0c) svga->rowoffset <<= 1;
if (oti->regs[0x14] & 0x80) {
svga->vtotal *= 2;
svga->dispend *= 2;
svga->vblankstart *= 2;
svga->vsyncstart *=2;
svga->split *= 2;
}
}
void *oti067_common_init(wchar_t *bios_fn, int vram_size, int chip_id)
static void *
oti_common_init(wchar_t *bios_fn, int vram_size, int chip_id)
{
oti067_t *oti067 = malloc(sizeof(oti067_t));
memset(oti067, 0, sizeof(oti067_t));
rom_init(&oti067->bios_rom, bios_fn, 0xc0000, 0x8000, 0x7fff, 0, MEM_MAPPING_EXTERNAL);
oti_t *oti = malloc(sizeof(oti_t));
oti067->vram_size = vram_size;
oti067->vram_mask = (vram_size << 10) - 1;
memset(oti, 0x00, sizeof(oti_t));
oti067->chip_id = chip_id;
svga_init(&oti067->svga, oti067, vram_size << 10,
oti067_recalctimings,
oti067_in, oti067_out,
NULL,
NULL);
rom_init(&oti->bios_rom, bios_fn,
0xc0000, 0x8000, 0x7fff, 0, MEM_MAPPING_EXTERNAL);
io_sethandler(0x03c0, 0x0020, oti067_in, NULL, NULL, oti067_out, NULL, NULL, oti067);
io_sethandler(0x46e8, 0x0001, oti067_pos_in, NULL, NULL, oti067_pos_out, NULL, NULL, oti067);
oti067->svga.miscout = 1;
return oti067;
oti->vram_size = vram_size;
oti->vram_mask = (vram_size << 10) - 1;
oti->chip_id = chip_id;
svga_init(&oti->svga, oti, vram_size << 10,
oti_recalctimings, oti_in, oti_out, NULL, NULL);
io_sethandler(0x03c0, 32,
oti_in, NULL, NULL, oti_out, NULL, NULL, oti);
io_sethandler(0x46e8, 1, oti_pos_in,NULL,NULL, oti_pos_out,NULL,NULL, oti);
oti->svga.miscout = 1;
return(oti);
}
void *oti067_init(device_t *info)
static void *
oti067_init(device_t *info)
{
int vram_size = device_get_config_int("memory");
return oti067_common_init(L"roms/video/oti/bios.bin", vram_size, 2);
int vram_size = device_get_config_int("memory");
return(oti_common_init(L"roms/video/oti/bios.bin", vram_size, 2));
}
void *oti077_init(device_t *info)
static void *
oti077_init(device_t *info)
{
int vram_size = device_get_config_int("memory");
return oti067_common_init(L"roms/video/oti/oti077.vbi", vram_size, 5);
int vram_size = device_get_config_int("memory");
return(oti_common_init(L"roms/video/oti/oti077.vbi", vram_size, 5));
}
static int oti067_available(void)
static int
oti067_available(void)
{
return rom_present(L"roms/video/oti/bios.bin");
return(rom_present(L"roms/video/oti/bios.bin"));
}
static int oti077_available(void)
static int
oti077_available(void)
{
return rom_present(L"roms/video/oti/oti077.vbi");
return(rom_present(L"roms/video/oti/oti077.vbi"));
}
static void oti067_close(void *p)
{
oti067_t *oti067 = (oti067_t *)p;
svga_close(&oti067->svga);
free(oti067);
static void
oti_close(void *p)
{
oti_t *oti = (oti_t *)p;
svga_close(&oti->svga);
free(oti);
}
static void oti067_speed_changed(void *p)
{
oti067_t *oti067 = (oti067_t *)p;
svga_recalctimings(&oti067->svga);
}
static void oti067_force_redraw(void *p)
{
oti067_t *oti067 = (oti067_t *)p;
oti067->svga.fullchange = changeframecount;
static void
oti_speed_changed(void *p)
{
oti_t *oti = (oti_t *)p;
svga_recalctimings(&oti->svga);
}
static void
oti_force_redraw(void *p)
{
oti_t *oti = (oti_t *)p;
oti->svga.fullchange = changeframecount;
}
static void oti067_add_status_info(char *s, int max_len, void *p)
static void
oti_add_status_info(char *s, int max_len, void *p)
{
oti067_t *oti067 = (oti067_t *)p;
svga_add_status_info(s, max_len, &oti067->svga);
oti_t *oti = (oti_t *)p;
svga_add_status_info(s, max_len, &oti->svga);
}
static device_config_t oti067_config[] =
{
{
"memory", "Memory size", CONFIG_SELECTION, "", 512,
{
{
"256 kB", 256
},
{
"512 kB", 512
},
{
""
}
}
},
{
"", "", -1
}
{
"memory", "Memory size", CONFIG_SELECTION, "", 512,
{
{
"256 kB", 256
},
{
"512 kB", 512
},
{
""
}
}
},
{
"", "", -1
}
};
static device_config_t oti077_config[] =
{
{
"memory", "Memory size", CONFIG_SELECTION, "", 1024,
{
{
"256 kB", 256
},
{
"512 kB", 512
},
{
"1 MB", 1024
},
{
""
}
}
},
{
"", "", -1
}
{
"memory", "Memory size", CONFIG_SELECTION, "", 1024,
{
{
"256 kB", 256
},
{
"512 kB", 512
},
{
"1 MB", 1024
},
{
""
}
}
},
{
"", "", -1
}
};
device_t oti067_device =
{
"Oak OTI-067",
DEVICE_ISA,
"Oak OTI-067",
DEVICE_ISA,
0,
oti067_init,
oti067_close,
oti067_init,
oti_close,
NULL,
oti067_available,
oti067_speed_changed,
oti067_force_redraw,
oti067_add_status_info,
oti067_config
oti067_available,
oti_speed_changed,
oti_force_redraw,
oti_add_status_info,
oti067_config
};
device_t oti077_device =
{
"Oak OTI-077",
DEVICE_ISA,
"Oak OTI-077",
DEVICE_ISA,
0,
oti077_init,
oti067_close,
oti077_init,
oti_close,
NULL,
oti077_available,
oti067_speed_changed,
oti067_force_redraw,
oti067_add_status_info,
oti077_config
oti077_available,
oti_speed_changed,
oti_force_redraw,
oti_add_status_info,
oti077_config
};

View File

@@ -1,11 +1,23 @@
/* Copyright holders: Sarah Walker, Tenshi
see COPYING for more details
*/
/*Paradise VGA emulation
PC2086, PC3086 use PVGA1A
MegaPC uses W90C11A
*/
/*
* 86Box A hypervisor and IBM PC system emulator that specializes in
* running old operating systems and software designed for IBM
* PC systems and compatibles from 1981 through fairly recent
* system designs based on the PCI bus.
*
* This file is part of the 86Box distribution.
*
* Paradise VGA emulation
* PC2086, PC3086 use PVGA1A
* MegaPC uses W90C11A
*
* Version: @(#)vid_paradise.c 1.0.1 2017/10/10
*
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com>
*
* Copyright 2008-2017 Sarah Walker.
* Copyright 2016,2017 Miran Grca.
*/
#include <stdio.h>
#include <stdint.h>
#include <string.h>

View File

@@ -1,14 +1,28 @@
/* Copyright holders: Sarah Walker
see COPYING for more details
*/
/*PC1512 CGA emulation
The PC1512 extends CGA with a bit-planar 640x200x16 mode.
Most CRTC registers are fixed.
The Technical Reference Manual lists the video waitstate time as between 12
and 46 cycles. PCem currently always uses the lower number.*/
/*
* 86Box A hypervisor and IBM PC system emulator that specializes in
* running old operating systems and software designed for IBM
* PC systems and compatibles from 1981 through fairly recent
* system designs based on the PCI bus.
*
* This file is part of the 86Box distribution.
*
* PC1512 CGA emulation
*
* The PC1512 extends CGA with a bit-planar 640x200x16 mode.
* Most CRTC registers are fixed.
*
* The Technical Reference Manual lists the video waitstate
* time as between 12 and 46 cycles. We currently always use
* the lower number.
*
* Version: @(#)vid_pc1512.c 1.0.1 2017/10/10
*
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com>
*
* Copyright 2008-2017 Sarah Walker.
* Copyright 2016,2017 Miran Grca.
*/
#include <stdio.h>
#include <stdint.h>
#include <string.h>

View File

@@ -1,8 +1,22 @@
/* Copyright holders: Sarah Walker
see COPYING for more details
*/
/*PC1640 video emulation.
Mostly standard EGA, but with CGA & Hercules emulation*/
/*
* 86Box A hypervisor and IBM PC system emulator that specializes in
* running old operating systems and software designed for IBM
* PC systems and compatibles from 1981 through fairly recent
* system designs based on the PCI bus.
*
* This file is part of the 86Box distribution.
*
* PC1640 video emulation.
* Mostly standard EGA, but with CGA & Hercules emulation.
*
* Version: @(#)vid_pc1640.c 1.0.1 2017/10/10
*
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com>
*
* Copyright 2008-2017 Sarah Walker.
* Copyright 2016,2017 Miran Grca.
*/
#include <stdio.h>
#include <stdint.h>
#include <string.h>

View File

@@ -1,9 +1,23 @@
/* Copyright holders: Sarah Walker
see COPYING for more details
*/
/*PC200 video emulation.
CGA with some NMI stuff. But we don't need that as it's only used for TV and
LCD displays, and we're emulating a CRT*/
/*
* 86Box A hypervisor and IBM PC system emulator that specializes in
* running old operating systems and software designed for IBM
* PC systems and compatibles from 1981 through fairly recent
* system designs based on the PCI bus.
*
* This file is part of the 86Box distribution.
*
* PC200 video emulation.
* CGA with some NMI stuff. But we don't need that as it's only
* used for TV and LCD displays, and we're emulating a CRT.
*
* Version: @(#)vid_pc200.c 1.0.1 2017/10/10
*
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com>
*
* Copyright 2008-2017 Sarah Walker.
* Copyright 2016,2017 Miran Grca.
*/
#include <stdio.h>
#include <stdint.h>
#include <string.h>

View File

@@ -1,3 +1,21 @@
/*
* 86Box A hypervisor and IBM PC system emulator that specializes in
* running old operating systems and software designed for IBM
* PC systems and compatibles from 1981 through fairly recent
* system designs based on the PCI bus.
*
* This file is part of the 86Box distribution.
*
* Video emulation for IBM PCjr.
*
* Version: @(#)vid_pcjr.c 1.0.1 2017/10/10
*
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com>
*
* Copyright 2008-2017 Sarah Walker.
* Copyright 2016,2017 Miran Grca.
*/
#include <stdio.h>
#include <stdint.h>
#include <string.h>

View File

@@ -1,12 +1,29 @@
/*Emulation of the SVGA chip in the IBM PS/1 Model 2121, or at least the
20 MHz version.
I am not entirely sure what this chip actually is, possibly a CF62011? I can
not find any documentation on the chip so have implemented enough to pass
self-test in the PS/1 BIOS. It has 512kb video memory but I have not found any
native drivers for any operating system and there is no VBE implementation, so
it's just a VGA for now.
*/
/*
* 86Box A hypervisor and IBM PC system emulator that specializes in
* running old operating systems and software designed for IBM
* PC systems and compatibles from 1981 through fairly recent
* system designs based on the PCI bus.
*
* This file is part of the 86Box distribution.
*
* Emulation of the SVGA chip in the IBM PS/1 Model 2121, or
* at least the 20 MHz version.
*
* I am not entirely sure what this chip actually is, possibly
* a CF62011? I can not find any documentation on the chip so
* have implemented enough to pass self-test in the PS/1 BIOS.
* It has 512kb video memory but I have not found any native
* drivers for any operating system and there is no VBE
* implementation, so it's just a VGA for now.
*
* Version: @(#)vid_ps1_svga.c 1.0.1 2017/10/10
*
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com>
*
* Copyright 2008-2017 Sarah Walker.
* Copyright 2016,2017 Miran Grca.
*/
#include <stdio.h>
#include <stdint.h>
#include <string.h>

View File

@@ -1,4 +1,21 @@
/*S3 emulation*/
/*
* 86Box A hypervisor and IBM PC system emulator that specializes in
* running old operating systems and software designed for IBM
* PC systems and compatibles from 1981 through fairly recent
* system designs based on the PCI bus.
*
* This file is part of the 86Box distribution.
*
* S3 emulation.
*
* Version: @(#)vid_s3.c 1.0.1 2017/10/10
*
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com>
*
* Copyright 2008-2017 Sarah Walker.
* Copyright 2016,2017 Miran Grca.
*/
#include <stdio.h>
#include <stdint.h>
#include <string.h>
@@ -10,7 +27,7 @@
#include "../mem.h"
#include "../pci.h"
#include "../rom.h"
#include "../win/plat_thread.h"
#include "../plat.h"
#include "video.h"
#include "vid_s3.h"
#include "vid_svga.h"

View File

@@ -1,7 +1,21 @@
/* Copyright holders: Sarah Walker
see COPYING for more details
*/
/*S3 ViRGE emulation*/
/*
* 86Box A hypervisor and IBM PC system emulator that specializes in
* running old operating systems and software designed for IBM
* PC systems and compatibles from 1981 through fairly recent
* system designs based on the PCI bus.
*
* This file is part of the 86Box distribution.
*
* S3 ViRGE emulation.
*
* Version: @(#)vid_s3_virge.c 1.0.1 2017/10/10
*
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com>
*
* Copyright 2008-2017 Sarah Walker.
* Copyright 2016,2017 Miran Grca.
*/
#include <stdio.h>
#include <stdint.h>
#include <string.h>
@@ -13,7 +27,7 @@
#include "../pci.h"
#include "../rom.h"
#include "../device.h"
#include "../win/plat_thread.h"
#include "../plat.h"
#include "video.h"
#include "vid_s3_virge.h"
#include "vid_svga.h"

View File

@@ -1,10 +1,23 @@
/* Copyright holders: Sarah Walker, Tenshi
see COPYING for more details
*/
/*It is unknown exactly what RAMDAC this is
It is possibly a Sierra 1502x
It's addressed by the TLIVESA1 driver for ET4000*/
/* Note by Tenshi: Not possibly, this *IS* a Sierra 1502x. */
/*
* 86Box A hypervisor and IBM PC system emulator that specializes in
* running old operating systems and software designed for IBM
* PC systems and compatibles from 1981 through fairly recent
* system designs based on the PCI bus.
*
* This file is part of the 86Box distribution.
*
* Emulation of a Sierra SC1502X RAMDAC.
*
* Used by the TLIVESA1 driver for ET4000.
*
* Version: @(#)vid_sc1502x_ramdac.c 1.0.1 2017/10/10
*
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com>
*
* Copyright 2008-2017 Sarah Walker.
* Copyright 2016,2017 Miran Grca.
*/
#include <stdio.h>
#include <stdint.h>
#include <string.h>

View File

@@ -1,8 +1,23 @@
/* Copyright holders: Sarah Walker, Tenshi
see COPYING for more details
*/
/*87C716 'SDAC' true colour RAMDAC emulation*/
/*Misidentifies as AT&T 21C504*/
/*
* 86Box A hypervisor and IBM PC system emulator that specializes in
* running old operating systems and software designed for IBM
* PC systems and compatibles from 1981 through fairly recent
* system designs based on the PCI bus.
*
* This file is part of the 86Box distribution.
*
* 87C716 'SDAC' true colour RAMDAC emulation.
*
* Misidentifies as AT&T 21C504.
*
* Version: @(#)vid_sdac_ramdac.c 1.0.1 2017/10/10
*
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com>
*
* Copyright 2008-2017 Sarah Walker.
* Copyright 2016,2017 Miran Grca.
*/
#include <stdio.h>
#include <stdint.h>
#include <string.h>

View File

@@ -1,7 +1,21 @@
/* Copyright holders: Sarah Walker, Tenshi
see COPYING for more details
*/
/*STG1702 true colour RAMDAC emulation*/
/*
* 86Box A hypervisor and IBM PC system emulator that specializes in
* running old operating systems and software designed for IBM
* PC systems and compatibles from 1981 through fairly recent
* system designs based on the PCI bus.
*
* This file is part of the 86Box distribution.
*
* STG1702 true colour RAMDAC emulation.
*
* Version: @(#)vid_stg_ramdac.c 1.0.1 2017/10/10
*
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com>
*
* Copyright 2008-2017 Sarah Walker.
* Copyright 2016,2017 Miran Grca.
*/
#include <stdio.h>
#include <stdint.h>
#include <string.h>

View File

@@ -11,10 +11,11 @@
* This is intended to be used by another SVGA driver,
* and not as a card in it's own right.
*
* Version: @(#)vid_svga.c 1.0.4 2017/10/02
* Version: @(#)vid_svga.c 1.0.5 2017/10/10
*
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com>
*
* Copyright 2008-2017 Sarah Walker.
* Copyright 2016,2017 Miran Grca.
*/

View File

@@ -8,10 +8,11 @@
*
* SVGA renderers.
*
* Version: @(#)vid_svga_render.c 1.0.1 2017/09/24
* Version: @(#)vid_svga_render.c 1.0.2 2017/10/10
*
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com>
*
* Copyright 2008-2017 Sarah Walker.
* Copyright 2016,2017 Miran Grca.
*/
@@ -30,6 +31,7 @@ int invert_display = 0;
int video_grayscale = 0;
int video_graytype = 0;
uint32_t shade[5][256] =
{
{0}, // RGB Color (unused)

298
src/video/vid_table.c Normal file
View File

@@ -0,0 +1,298 @@
/*
* 86Box A hypervisor and IBM PC system emulator that specializes in
* running old operating systems and software designed for IBM
* PC systems and compatibles from 1981 through fairly recent
* system designs based on the PCI bus.
*
* This file is part of the 86Box distribution.
*
* Define all known video cards.
*
* Version: @(#)vid_table.c 1.0.1 2017/10/10
*
* Authors: Miran Grca, <mgrca8@gmail.com>
* Fred N. van Kempen, <decwiz@yahoo.com>
*
* Copyright 2016,2017 Miran Grca.
* Copyright 2017 Fred N. van Kempen.
*/
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include <wchar.h>
#include "../ibm.h"
#include "../mem.h"
#include "../rom.h"
#include "../device.h"
#include "../timer.h"
#include "../plat.h"
#include "video.h"
#include "vid_svga.h"
#include "vid_ati18800.h"
#include "vid_ati28800.h"
#include "vid_ati_mach64.h"
#include "vid_cga.h"
#ifdef DEV_BRANCH
# ifdef USE_CIRRUS
# include "vid_cl_ramdac.h" /* vid_cl_gd.c needs this */
# include "vid_cl_gd.h"
# endif
#endif
#include "vid_ega.h"
#include "vid_et4000.h"
#include "vid_et4000w32.h"
#include "vid_genius.h"
#include "vid_hercules.h"
#include "vid_herculesplus.h"
#include "vid_incolor.h"
#include "vid_colorplus.h"
#include "vid_mda.h"
#ifdef DEV_BRANCH
# ifdef USE_RIVA
# include "vid_nv_riva128.h"
# endif
#endif
#include "vid_olivetti_m24.h"
#include "vid_oti067.h"
#include "vid_paradise.h"
#include "vid_pc1512.h"
#include "vid_pc1640.h"
#include "vid_pc200.h"
#include "vid_pcjr.h"
#include "vid_ps1_svga.h"
#include "vid_s3.h"
#include "vid_s3_virge.h"
#include "vid_tandy.h"
#include "vid_tandysl.h"
#include "vid_tgui9440.h"
#include "vid_tvga.h"
#include "vid_vga.h"
#include "vid_wy700.h"
typedef struct {
char name[64];
char internal_name[24];
device_t *device;
int legacy_id;
} VIDEO_CARD;
static VIDEO_CARD
video_cards[] = {
{"[ISA] ATI VGA Charger (ATI-28800-5)", "ati28800", &ati28800_device, GFX_VGACHARGER },
{"[ISA] ATI VGA Wonder XL24 (ATI-28800-6)", "ati28800w", &ati28800_wonderxl24_device, GFX_VGAWONDERXL24 },
{"[ISA] ATI VGA Edge-16 (ATI-18800)", "ati18800", &ati18800_device, GFX_VGAEDGE16 },
{"[ISA] CGA", "cga", &cga_device, GFX_CGA },
{"[ISA] Chips & Technologies SuperEGA", "superega", &sega_device, GFX_SUPER_EGA },
{"[ISA] Compaq ATI VGA Wonder XL (ATI-28800-5)","compaq_ati28800", &compaq_ati28800_device, GFX_VGAWONDERXL },
{"[ISA] Compaq EGA", "compaq_ega", &cpqega_device, GFX_COMPAQ_EGA },
{"[ISA] EGA", "ega", &ega_device, GFX_EGA },
{"[ISA] Hercules", "hercules", &hercules_device, GFX_HERCULES },
{"[ISA] Hercules Plus", "hercules_plus", &herculesplus_device, GFX_HERCULESPLUS },
{"[ISA] Hercules InColor", "incolor", &incolor_device, GFX_INCOLOR },
{"[ISA] MDA", "mda", &mda_device, GFX_MDA },
{"[ISA] MDSI Genius", "genius", &genius_device, GFX_GENIUS },
{"[ISA] OAK OTI-067", "oti067", &oti067_device, GFX_OTI067 },
{"[ISA] OAK OTI-077", "oti077", &oti077_device, GFX_OTI077 },
{"[ISA] Paradise WD90C11", "wd90c11", &paradise_wd90c11_device, GFX_WD90C11 },
{"[ISA] Plantronics ColorPlus", "plantronics", &colorplus_device, GFX_COLORPLUS },
{"[ISA] Trident TVGA8900D", "tvga8900d", &tvga8900d_device, GFX_TVGA },
{"[ISA] Tseng ET4000AX", "et4000ax", &et4000_device, GFX_ET4000 },
{"[ISA] VGA", "vga", &vga_device, GFX_VGA },
{"[ISA] Wyse 700", "wy700", &wy700_device, GFX_WY700 },
{"[VLB] ATI Graphics Pro Turbo (Mach64 GX)", "mach64x_vlb", &mach64gx_vlb_device, GFX_MACH64GX_VLB },
{"[VLB] Diamond Stealth 32 (Tseng ET4000/w32p)","stealth32_vlb", &et4000w32p_vlb_device, GFX_ET4000W32_VLB },
{"[VLB] Diamond Stealth 3D 2000 (S3 ViRGE)", "stealth3d_2000_vlb", &s3_virge_vlb_device, GFX_VIRGE_VLB },
{"[VLB] Diamond Stealth 3D 3000 (S3 ViRGE/VX)", "stealth3d_3000_vlb", &s3_virge_988_vlb_device, GFX_VIRGEVX_VLB },
{"[VLB] Diamond Stealth 64 DRAM (S3 Trio64)", "stealth64d_vlb", &s3_diamond_stealth64_vlb_device, GFX_STEALTH64_VLB },
{"[VLB] Number Nine 9FX (S3 Trio64)", "n9_9fx_vlb", &s3_9fx_vlb_device, GFX_N9_9FX_VLB },
{"[VLB] Paradise Bahamas 64 (S3 Vision864)", "bahamas64_vlb", &s3_bahamas64_vlb_device, GFX_BAHAMAS64_VLB },
{"[VLB] Phoenix S3 Vision864", "px_vision864_vlb", &s3_phoenix_vision864_vlb_device, GFX_PHOENIX_VISION864_VLB },
{"[VLB] Phoenix S3 Trio32", "px_trio32_vlb", &s3_phoenix_trio32_vlb_device, GFX_PHOENIX_TRIO32_VLB },
{"[VLB] Phoenix S3 Trio64", "px_trio64_vlb", &s3_phoenix_trio64_vlb_device, GFX_PHOENIX_TRIO64_VLB },
{"[VLB] S3 ViRGE/DX", "virge375_vlb", &s3_virge_375_vlb_device, GFX_VIRGEDX_VLB },
{"[VLB] S3 ViRGE/DX (VBE 2.0)", "virge375_vbe20_vlb", &s3_virge_375_4_vlb_device, GFX_VIRGEDX4_VLB },
{"[VLB] Trident TGUI9440", "tgui9440_vlb", &tgui9440_vlb_device, GFX_TGUI9440_VLB },
{"[PCI] ATI Graphics Pro Turbo (Mach64 GX)", "mach64x_pci", &mach64gx_pci_device, GFX_MACH64GX_PCI },
{"[PCI] ATI Video Xpression (Mach64 VT2)", "mach64vt2", &mach64vt2_device, GFX_MACH64VT2 },
{"[PCI] Diamond Stealth 32 (Tseng ET4000/w32p)","stealth32_pci", &et4000w32p_pci_device, GFX_ET4000W32_PCI },
{"[PCI] Diamond Stealth 3D 2000 (S3 ViRGE)", "stealth3d_2000_pci", &s3_virge_pci_device, GFX_VIRGE_PCI },
{"[PCI] Diamond Stealth 3D 3000 (S3 ViRGE/VX)", "stealth3d_3000_pci", &s3_virge_988_pci_device, GFX_VIRGEVX_PCI },
{"[PCI] Diamond Stealth 64 DRAM (S3 Trio64)", "stealth64d_pci", &s3_diamond_stealth64_pci_device, GFX_STEALTH64_PCI },
#if defined(DEV_BRANCH) && defined(USE_RIVA)
{"[PCI] nVidia RIVA 128", "riva128", &riva128_device, GFX_RIVA128 },
{"[PCI] nVidia RIVA TNT", "rivatnt", &rivatnt_device, GFX_RIVATNT },
{"[PCI] nVidia RIVA TNT2", "rivatnt2", &rivatnt2_device, GFX_RIVATNT2 },
#endif
{"[PCI] Number Nine 9FX (S3 Trio64)", "n9_9fx_pci", &s3_9fx_pci_device, GFX_N9_9FX_PCI },
{"[PCI] Paradise Bahamas 64 (S3 Vision864)", "bahamas64_pci", &s3_bahamas64_pci_device, GFX_BAHAMAS64_PCI },
{"[PCI] Phoenix S3 Vision864", "px_vision864_pci", &s3_phoenix_vision864_pci_device, GFX_PHOENIX_VISION864_PCI },
{"[PCI] Phoenix S3 Trio32", "px_trio32_pci", &s3_phoenix_trio32_pci_device, GFX_PHOENIX_TRIO32_PCI },
{"[PCI] Phoenix S3 Trio64", "px_trio64_pci", &s3_phoenix_trio64_pci_device, GFX_PHOENIX_TRIO64_PCI },
{"[PCI] S3 ViRGE/DX", "virge375_pci", &s3_virge_375_pci_device, GFX_VIRGEDX_PCI },
{"[PCI] S3 ViRGE/DX (VBE 2.0)", "virge375_vbe20_pci", &s3_virge_375_4_pci_device, GFX_VIRGEDX4_PCI },
{"[PCI] Trident TGUI9440", "tgui9440_pci", &tgui9440_pci_device, GFX_TGUI9440_PCI },
{"", "", NULL, 0 }
};
/* This will be merged into machine.c soon. --FvK */
void
video_reset_device(int rs, int gc)
{
pclog("Video_reset_device(rom=%i, gfx=%i)\n", rs, gc);
switch (rs) {
case ROM_IBMPCJR:
device_add(&pcjr_video_device);
return;
case ROM_TANDY:
case ROM_TANDY1000HX:
device_add(&tandy_device);
return;
case ROM_TANDY1000SL2:
device_add(&tandysl_device);
return;
case ROM_PC1512:
device_add(&pc1512_device);
return;
case ROM_PC1640:
device_add(&pc1640_device);
return;
case ROM_PC200:
device_add(&pc200_device);
return;
case ROM_OLIM24:
device_add(&m24_device);
return;
case ROM_PC2086:
device_add(&paradise_pvga1a_pc2086_device);
return;
case ROM_PC3086:
device_add(&paradise_pvga1a_pc3086_device);
return;
case ROM_MEGAPC:
device_add(&paradise_wd90c11_megapc_device);
return;
case ROM_ACER386:
device_add(&oti067_device);
return;
case ROM_IBMPS1_2011:
case ROM_IBMPS2_M30_286:
case ROM_IBMPS2_M50:
case ROM_IBMPS2_M55SX:
case ROM_IBMPS2_M80:
device_add(&ps1vga_device);
return;
case ROM_IBMPS1_2121:
device_add(&ps1_m2121_svga_device);
return;
}
device_add(video_cards[video_old_to_new(gc)].device);
}
int
video_card_available(int card)
{
if (video_cards[card].device)
return(device_available(video_cards[card].device));
return(1);
}
char *
video_card_getname(int card)
{
return(video_cards[card].name);
}
device_t *
video_card_getdevice(int card)
{
return(video_cards[card].device);
}
int
video_card_has_config(int card)
{
return(video_cards[card].device->config ? 1 : 0);
}
int
video_card_getid(char *s)
{
int c = 0;
while (video_cards[c].device) {
if (!strcmp(video_cards[c].name, s))
return(c);
c++;
}
return(0);
}
int
video_old_to_new(int card)
{
int c = 0;
while (video_cards[c].device) {
if (video_cards[c].legacy_id == card)
return(c);
c++;
}
return(0);
}
int
video_new_to_old(int card)
{
return(video_cards[card].legacy_id);
}
char *
video_get_internal_name(int card)
{
return(video_cards[card].internal_name);
}
int
video_get_video_from_internal_name(char *s)
{
int c = 0;
while (video_cards[c].legacy_id != -1) {
if (!strcmp(video_cards[c].internal_name, s))
return(video_cards[c].legacy_id);
c++;
}
return(0);
}

View File

@@ -1,3 +1,21 @@
/*
* 86Box A hypervisor and IBM PC system emulator that specializes in
* running old operating systems and software designed for IBM
* PC systems and compatibles from 1981 through fairly recent
* system designs based on the PCI bus.
*
* This file is part of the 86Box distribution.
*
* Emulation of the Tandy Model 1000 video.
*
* Version: @(#)vid_tandy.c 1.0.1 2017/10/10
*
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com>
*
* Copyright 2008-2017 Sarah Walker.
* Copyright 2016,2017 Miran Grca.
*/
#include <stdio.h>
#include <stdint.h>
#include <string.h>

View File

@@ -1,6 +1,21 @@
/* Copyright holders: Sarah Walker
see COPYING for more details
*/
/*
* 86Box A hypervisor and IBM PC system emulator that specializes in
* running old operating systems and software designed for IBM
* PC systems and compatibles from 1981 through fairly recent
* system designs based on the PCI bus.
*
* This file is part of the 86Box distribution.
*
* Emulation of the Tandy Model 1000/SL video.
*
* Version: @(#)vid_tandysl.c 1.0.1 2017/10/10
*
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com>
*
* Copyright 2008-2017 Sarah Walker.
* Copyright 2016,2017 Miran Grca.
*/
#include <stdio.h>
#include <stdint.h>
#include <string.h>

View File

@@ -1,7 +1,21 @@
/* Copyright holders: Sarah Walker
see COPYING for more details
*/
/*Trident TGUI9440 emulation*/
/*
* 86Box A hypervisor and IBM PC system emulator that specializes in
* running old operating systems and software designed for IBM
* PC systems and compatibles from 1981 through fairly recent
* system designs based on the PCI bus.
*
* This file is part of the 86Box distribution.
*
* Trident TGUI9440 emulation.
*
* Version: @(#)vid_tgui9440.c 1.0.1 2017/10/10
*
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com>
*
* Copyright 2008-2017 Sarah Walker.
* Copyright 2016,2017 Miran Grca.
*/
#include <stdio.h>
#include <stdint.h>
#include <string.h>
@@ -13,7 +27,7 @@
#include "../pci.h"
#include "../rom.h"
#include "../device.h"
#include "../win/plat_thread.h"
#include "../plat.h"
#include "video.h"
#include "vid_svga.h"
#include "vid_svga_render.h"

View File

@@ -1,7 +1,21 @@
/* Copyright holders: Sarah Walker
see COPYING for more details
*/
/*Trident TKD8001 RAMDAC emulation*/
/*
* 86Box A hypervisor and IBM PC system emulator that specializes in
* running old operating systems and software designed for IBM
* PC systems and compatibles from 1981 through fairly recent
* system designs based on the PCI bus.
*
* This file is part of the 86Box distribution.
*
* Trident TKD8001 RAMDAC emulation.
*
* Version: @(#)vid_tkd8001_ramdac.c 1.0.1 2017/10/10
*
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com>
*
* Copyright 2008-2017 Sarah Walker.
* Copyright 2016,2017 Miran Grca.
*/
#include <stdio.h>
#include <stdint.h>
#include <string.h>

View File

@@ -1,7 +1,21 @@
/* Copyright holders: Sarah Walker, SA1988
see COPYING for more details
*/
/*Trident TVGA (8900D) emulation*/
/*
* 86Box A hypervisor and IBM PC system emulator that specializes in
* running old operating systems and software designed for IBM
* PC systems and compatibles from 1981 through fairly recent
* system designs based on the PCI bus.
*
* This file is part of the 86Box distribution.
*
* Trident TVGA (8900D) emulation.
*
* Version: @(#)vid_tvga.c 1.0.1 2017/10/10
*
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com>
*
* Copyright 2008-2017 Sarah Walker.
* Copyright 2016,2017 Miran Grca.
*/
#include <stdio.h>
#include <stdint.h>
#include <string.h>

View File

@@ -1,7 +1,21 @@
/* Copyright holders: Sarah Walker
see COPYING for more details
*/
/*IBM VGA emulation*/
/*
* 86Box A hypervisor and IBM PC system emulator that specializes in
* running old operating systems and software designed for IBM
* PC systems and compatibles from 1981 through fairly recent
* system designs based on the PCI bus.
*
* This file is part of the 86Box distribution.
*
* IBM VGA emulation.
*
* Version: @(#)vid_vga.c 1.0.1 2017/10/10
*
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com>
*
* Copyright 2008-2017 Sarah Walker.
* Copyright 2016,2017 Miran Grca.
*/
#include <stdio.h>
#include <stdint.h>
#include <string.h>

View File

@@ -1,3 +1,20 @@
/*
* 86Box A hypervisor and IBM PC system emulator that specializes in
* running old operating systems and software designed for IBM
* PC systems and compatibles from 1981 through fairly recent
* system designs based on the PCI bus.
*
* This file is part of the 86Box distribution.
*
* Emulation of the 3DFX Voodoo Graphics controller.
*
* Version: @(#)vid_voodoo.c 1.0.1 2017/10/10
*
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
* leilei
*
* Copyright 2008-2017 Sarah Walker.
*/
#include <stdio.h>
#include <stdint.h>
#include <string.h>
@@ -11,12 +28,13 @@
#include "../pci.h"
#include "../timer.h"
#include "../device.h"
#include "../win/plat_thread.h"
#include "../plat.h"
#include "video.h"
#include "vid_svga.h"
#include "vid_voodoo.h"
#include "vid_voodoo_dither.h"
#ifdef MIN
#undef MIN
#endif
@@ -38,6 +56,7 @@
#define TEX_CACHE_MAX 64
enum
{
VOODOO_1 = 0,
@@ -45,6 +64,7 @@ enum
VOODOO_2 = 2
};
static uint32_t texture_offset[LOD_MAX+3] =
{
0,

View File

@@ -1,4 +1,21 @@
/* Wyse-700 emulation*/
/*
* 86Box A hypervisor and IBM PC system emulator that specializes in
* running old operating systems and software designed for IBM
* PC systems and compatibles from 1981 through fairly recent
* system designs based on the PCI bus.
*
* This file is part of the 86Box distribution.
*
* Wyse-700 emulation.
*
* Version: @(#)vid_wy700.c 1.0.1 2017/10/10
*
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com>
*
* Copyright 2008-2017 Sarah Walker.
* Copyright 2016,2017 Miran Grca.
*/
#include <stdio.h>
#include <stdint.h>
#include <string.h>

File diff suppressed because it is too large Load Diff

View File

@@ -1,132 +1,126 @@
/* Copyright holders: Sarah Walker, Tenshi
see COPYING for more details
*/
#ifndef EMU_VIDEO_H
# define EMU_VIDEO_H
typedef struct
{
int w, h;
uint8_t *dat;
uint8_t *line[];
} BITMAP;
extern BITMAP *screen;
BITMAP *create_bitmap(int w, int h);
typedef struct
{
uint8_t r, g, b;
} RGB;
typedef RGB PALETTE[256];
#define makecol(r, g, b) ((b) | ((g) << 8) | ((r) << 16))
#define makecol32(r, g, b) ((b) | ((g) << 8) | ((r) << 16))
extern BITMAP *buffer, *buffer32;
int video_card_available(int card);
char *video_card_getname(int card);
#ifdef EMU_DEVICE_H
device_t *video_card_getdevice(int card);
#endif
int video_card_has_config(int card);
int video_card_getid(char *s);
int video_old_to_new(int card);
int video_new_to_old(int card);
char *video_get_internal_name(int card);
int video_get_video_from_internal_name(char *s);
extern int video_fullscreen, video_fullscreen_scale, video_fullscreen_first;
enum
{
FULLSCR_SCALE_FULL = 0,
FULLSCR_SCALE_43,
FULLSCR_SCALE_SQ,
FULLSCR_SCALE_INT
enum {
FULLSCR_SCALE_FULL = 0,
FULLSCR_SCALE_43,
FULLSCR_SCALE_SQ,
FULLSCR_SCALE_INT
};
extern int egareads,egawrites;
extern int fullchange;
extern int changeframecount;
typedef struct {
int w, h;
uint8_t *dat;
uint8_t *line[];
} BITMAP;
extern uint8_t fontdat[256][8];
extern uint8_t fontdatm[256][16];
typedef struct {
uint8_t r, g, b;
} RGB;
typedef RGB PALETTE[256];
extern uint32_t *video_6to8, *video_15to32, *video_16to32;
extern int xsize,ysize;
extern BITMAP *screen,
*buffer,
*buffer32;
extern PALETTE cgapal,
cgapal_mono[6];
extern uint32_t pal_lookup[256];
extern int video_fullscreen,
video_fullscreen_scale,
video_fullscreen_first;
extern int egareads,egawrites;
extern int fullchange;
extern int changeframecount;
extern uint8_t fontdat[256][8];
extern uint8_t fontdatm[256][16];
extern uint32_t *video_6to8,
*video_15to32,
*video_16to32;
extern int xsize,ysize;
extern int enable_overscan;
extern int overscan_x,
overscan_y;
extern int force_43;
extern int video_timing_b,
video_timing_w,
video_timing_l;
extern int video_speed;
extern int video_res_x,
video_res_y,
video_bpp;
extern int vid_resize;
extern int winsizex,
winsizey;
extern int cga_palette;
extern int vid_cga_contrast;
extern int video_grayscale;
extern int video_graytype;
extern float cpuclock;
extern float cpuclock;
extern int emu_fps,
frames;
extern int readflash;
extern int emu_fps, frames;
extern int readflash;
extern void (*video_recalctimings)();
void video_blit_memtoscreen(int x, int y, int y1, int y2, int w, int h);
void video_blit_memtoscreen_8(int x, int y, int w, int h);
extern void (*video_blit_memtoscreen_func)(int x, int y, int y1, int y2, int w, int h);
extern void (*video_blit_memtoscreen_8_func)(int x, int y, int w, int h);
/* Enable EGA/(S)VGA overscan border. */
extern int enable_overscan;
extern int overscan_x, overscan_y;
/* Forcibly stretch emulated video output to 4:3 or not. */
extern int force_43;
extern int video_timing_b, video_timing_w, video_timing_l;
extern int video_speed;
extern int video_res_x, video_res_y, video_bpp;
extern int vid_resize;
void video_wait_for_blit(void);
void video_wait_for_buffer(void);
extern int winsizex,winsizey;
#ifdef __cplusplus
extern "C" {
#endif
void take_screenshot(void);
void d3d_take_screenshot(wchar_t *fn);
void d3d_fs_take_screenshot(wchar_t *fn);
void ddraw_take_screenshot(wchar_t *fn);
void ddraw_fs_take_screenshot(wchar_t *fn);
/* Function handler pointers. */
extern void (*video_recalctimings)(void);
extern void (*video_blit_memtoscreen_func)(int x, int y, int y1, int y2, int w, int h);
extern void (*video_blit_memtoscreen_8_func)(int x, int y, int w, int h);
/* Table functions. */
extern int video_card_available(int card);
extern char *video_card_getname(int card);
#ifdef EMU_DEVICE_H
extern device_t *video_card_getdevice(int card);
#endif
extern int video_card_has_config(int card);
extern int video_card_getid(char *s);
extern int video_old_to_new(int card);
extern int video_new_to_old(int card);
extern char *video_get_internal_name(int card);
extern int video_get_video_from_internal_name(char *s);
extern void video_blit_memtoscreen(int x, int y, int y1, int y2, int w, int h);
extern void video_blit_memtoscreen_8(int x, int y, int w, int h);
extern void video_wait_for_blit(void);
extern void video_wait_for_buffer(void);
extern BITMAP *create_bitmap(int w, int h);
extern void destroy_bitmap(BITMAP *b);
extern void cgapal_rebuild(void);
extern void hline(BITMAP *b, int x1, int y, int x2, uint32_t col);
extern void updatewindowsize(int x, int y);
extern void video_init(void);
extern void video_close(void);
extern void video_reset(void);
extern void video_reset_device(int, int);
extern void video_update_timing(void);
extern void loadfont(wchar_t *s, int format);
#ifdef ENABLE_VRAM_DUMP
extern void svga_dump_vram(void);
#endif
#ifdef __cplusplus
}
#endif
extern int cga_palette;
extern int vid_cga_contrast;
extern int video_grayscale;
extern int video_graytype;
void loadfont(wchar_t *s, int format);
void video_init(void);
void video_close(void);
void video_reset(void);
void video_updatetiming(void);
void hline(BITMAP *b, int x1, int y, int x2, uint32_t col);
void updatewindowsize(int x, int y);
#ifdef ENABLE_VRAM_DUMP
void svga_dump_vram(void);
#endif
#endif /*EMU_VIDEO_H*/

View File

@@ -1,4 +0,0 @@
/* Copyright holders: Sarah Walker
see COPYING for more details
*/
extern LPDIRECTINPUT lpdi;

View File

@@ -1,32 +0,0 @@
/* Copyright holders: Sarah Walker
see COPYING for more details
*/
#ifndef PLAT_THREAD_H
# define PLAT_THREAD_H
typedef void thread_t;
typedef void event_t;
extern thread_t *thread_create(void (*thread_rout)(void *param), void *param);
extern void thread_kill(thread_t *handle);
extern event_t *thread_create_event(void);
extern void thread_set_event(event_t *event);
extern void thread_reset_event(event_t *_event);
extern int thread_wait_event(event_t *event, int timeout);
extern void thread_destroy_event(event_t *_event);
extern void thread_sleep(int t);
extern void *thread_create_mutex(wchar_t *name);
extern void thread_close_mutex(void *mutex);
extern uint8_t thread_wait_mutex(void *mutex);
extern uint8_t thread_release_mutex(void *mutex);
extern void startslirp(void);
extern void endslirp(void);
#endif /*PLAT_THREAD_H*/

View File

@@ -1,2 +0,0 @@
uint32_t get_ticks(void);
void delay_ms(uint32_t count);

View File

@@ -8,7 +8,7 @@
*
* The Emulator's Windows core.
*
* Version: @(#)win.c 1.0.19 2017/10/09
* Version: @(#)win.c 1.0.20 2017/10/10
*
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com>
@@ -33,6 +33,7 @@
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include <time.h>
#include <wchar.h>
#include "../86box.h"
#include "../config.h"
@@ -53,14 +54,11 @@
#include "../sound/sound.h"
#include "../sound/snd_dbopl.h"
#include "../plat.h"
#include "../plat_keyboard.h"
#include "../plat_mouse.h"
#include "../plat_midi.h"
#include "../ui.h"
#include "plat_keyboard.h"
#include "plat_mouse.h"
#include "plat_midi.h"
#include "plat_thread.h"
#include "plat_ticks.h"
#include "win.h"
#include "win_cgapal.h"
#include "win_ddraw.h"
#include "win_d3d.h"
@@ -527,10 +525,10 @@ MainWindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
case IDM_VID_D3D:
startblit();
video_wait_for_blit();
CheckMenuItem(hmenu, IDM_VID_DDRAW + vid_api, MF_UNCHECKED);
CheckMenuItem(hmenu, IDM_VID_DDRAW+vid_api, MF_UNCHECKED);
vid_apis[0][vid_api].close();
vid_api = LOWORD(wParam) - IDM_VID_DDRAW;
CheckMenuItem(hmenu, IDM_VID_DDRAW + vid_api, MF_CHECKED);
CheckMenuItem(hmenu, IDM_VID_DDRAW+vid_api, MF_CHECKED);
vid_apis[0][vid_api].init(hwndRender);
endblit();
config_save();
@@ -1469,6 +1467,60 @@ plat_get_string_from_string(char *str)
}
/* If these are in the headers, doesn't work...? --FvK */
//extern void ddraw_take_screenshot(wchar_t *);
//extern void ddraw_fs_take_screenshot(wchar_t *);
//extern void d3d_take_screenshot(wchar_t *);
//extern void d3d_fs_take_screenshot(wchar_t *);
void
take_screenshot(void)
{
wchar_t path[1024], fn[128];
struct tm *info;
time_t now;
pclog("Screenshot: video API is: %i\n", vid_api);
if ((vid_api < 0) || (vid_api > 1)) return;
memset(fn, 0, sizeof(fn));
memset(path, 0, sizeof(path));
(void)time(&now);
info = localtime(&now);
append_filename_w(path, cfg_path, SCREENSHOT_PATH, sizeof(path)-2);
if (! dir_check_exist(path))
dir_create(path);
#ifdef WIN32
wcscat(path, L"\\");
#else
wcscat(path, L"/");
#endif
if (vid_api == 1) {
wcsftime(fn, 128, L"%Y%m%d_%H%M%S.png", info);
append_filename_w(path, cfg_path, fn, 1024);
if (video_fullscreen)
d3d_fs_take_screenshot(path);
else
d3d_take_screenshot(path);
} else if (vid_api == 0) {
wcsftime(path, 128, L"%Y%m%d_%H%M%S.bmp", info);
append_filename_w(path, cfg_path, fn, 1024);
if (video_fullscreen)
ddraw_fs_take_screenshot(path);
else
ddraw_take_screenshot(path);
}
pclog("Screenshot: fn='%ws'\n", path);
}
void
startblit(void)
{

View File

@@ -1,29 +0,0 @@
/*
* 86Box A hypervisor and IBM PC system emulator that specializes in
* running old operating systems and software designed for IBM
* PC systems and compatibles from 1981 through fairly recent
* system designs based on the PCI bus.
*
* This file is part of the 86Box distribution.
*
* The Windows CGA palette handler header.
*
* Version: @(#)win_cgapal.h 1.0.0 2017/05/30
*
* Author: Miran Grca, <mgrca8@gmail.com>
* Copyright 2016-2017 Miran Grca.
*/
extern PALETTE cgapal;
extern PALETTE cgapal_mono[6];
extern uint32_t pal_lookup[256];
#ifdef __cplusplus
extern "C" {
#endif
void cgapal_rebuild();
void destroy_bitmap(BITMAP *b);
#ifdef __cplusplus
}
#endif

View File

@@ -8,10 +8,11 @@
*
* Direct3D 9 rendererer and screenshots taking.
*
* Version: @(#)win_d3d.cc 1.0.1 2017/08/23
* Version: @(#)win_d3d.cc 1.0.2 2017/10/10
*
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com>
*
* Copyright 2008-2017 Sarah Walker.
* Copyright 2016,2017 Miran Grca.
*/
@@ -19,7 +20,6 @@
#include "../video/video.h"
#include "win.h"
#include "win_d3d.h"
#include "win_cgapal.h"
extern "C" void fatal(const char *format, ...);
@@ -28,6 +28,7 @@ extern "C" void pclog(const char *format, ...);
extern "C" void device_force_redraw(void);
extern "C" void video_blit_complete(void);
extern "C" void d3d_take_screenshot(wchar_t *fn);
void d3d_init_objects(void);
void d3d_close_objects(void);
@@ -99,9 +100,13 @@ int d3d_init(HWND h)
fatal("CreateDevice failed\n");
d3d_init_objects();
#if 0
video_setblit(d3d_blit_memtoscreen_8, d3d_blit_memtoscreen);
#else
video_blit_memtoscreen_func = d3d_blit_memtoscreen;
video_blit_memtoscreen_8_func = d3d_blit_memtoscreen_8;
#endif
return 1;
}

View File

@@ -8,14 +8,14 @@
*
* Direct3D 9 rendererer and screenshots taking.
*
* Version: @(#)win_d3d.h 1.0.0 2017/05/30
* Version: @(#)win_d3d.h 1.0.1 2017/10/10
*
* Author: Sarah Walker, <http://pcem-emulator.co.uk/>
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com>
*
* Copyright 2008-2017 Sarah Walker.
* Copyright 2016-2017 Miran Grca.
* Copyright 2016,2017 Miran Grca.
*/
#ifndef WIN_D3D_H
# define WIN_D3D_H
# define UNICODE
@@ -39,6 +39,7 @@ extern int d3d_fs_init(HWND h);
extern void d3d_fs_close(void);
extern void d3d_fs_reset(void);
extern void d3d_fs_resize(int x, int y);
extern void d3d_fs_take_screenshot(wchar_t *fn);
#ifdef __cplusplus
}

View File

@@ -8,10 +8,11 @@
*
* Direct3D 9 full-screen rendererer.
*
* Version: @(#)win_d3d_fs.cc 1.0.3 2017/10/05
* Version: @(#)win_d3d_fs.cc 1.0.4 2017/10/10
*
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com>
*
* Copyright 2008-2017 Sarah Walker.
* Copyright 2016,2017 Miran Grca.
*/
@@ -21,7 +22,6 @@
#include "../video/video.h"
#include "win.h"
#include "win_d3d.h"
#include "win_cgapal.h"
extern "C" void fatal(const char *format, ...);
@@ -29,13 +29,15 @@ extern "C" void pclog(const char *format, ...);
extern "C" void device_force_redraw(void);
extern "C" void video_blit_complete(void);
extern "C" void d3d_fs_take_screenshot(wchar_t *fn);
static void d3d_fs_init_objects(void);
static void d3d_fs_close_objects(void);
static void d3d_fs_blit_memtoscreen(int x, int y, int y1, int y2, int w, int h);
static void d3d_fs_blit_memtoscreen_8(int x, int y, int w, int h);
extern "C" void video_blit_complete(void);
static LPDIRECT3D9 d3d = NULL;
static LPDIRECT3DDEVICE9 d3ddev = NULL;
@@ -56,75 +58,6 @@ struct CUSTOMVERTEX
};
PALETTE cgapal = {
{0,0,0},{0,42,0},{42,0,0},{42,21,0},
{0,0,0},{0,42,42},{42,0,42},{42,42,42},
{0,0,0},{21,63,21},{63,21,21},{63,63,21},
{0,0,0},{21,63,63},{63,21,63},{63,63,63},
{0,0,0},{0,0,42},{0,42,0},{0,42,42},
{42,0,0},{42,0,42},{42,21,00},{42,42,42},
{21,21,21},{21,21,63},{21,63,21},{21,63,63},
{63,21,21},{63,21,63},{63,63,21},{63,63,63},
{0,0,0},{0,21,0},{0,0,42},{0,42,42},
{42,0,21},{21,10,21},{42,0,42},{42,0,63},
{21,21,21},{21,63,21},{42,21,42},{21,63,63},
{63,0,0},{42,42,0},{63,21,42},{41,41,41},
{0,0,0},{0,42,42},{42,0,0},{42,42,42},
{0,0,0},{0,42,42},{42,0,0},{42,42,42},
{0,0,0},{0,63,63},{63,0,0},{63,63,63},
{0,0,0},{0,63,63},{63,0,0},{63,63,63},
};
PALETTE cgapal_mono[6] = {
{ /* 0 - green, 4-color-optimized contrast. */
{0x00,0x00,0x00},{0x00,0x0d,0x03},{0x01,0x17,0x05},
{0x01,0x1a,0x06},{0x02,0x28,0x09},{0x02,0x2c,0x0a},
{0x03,0x39,0x0d},{0x03,0x3c,0x0e},{0x00,0x07,0x01},
{0x01,0x13,0x04},{0x01,0x1f,0x07},{0x01,0x23,0x08},
{0x02,0x31,0x0b},{0x02,0x35,0x0c},{0x05,0x3f,0x11},{0x0d,0x3f,0x17},
},
{ /* 1 - green, 16-color-optimized contrast. */
{0x00,0x00,0x00},{0x00,0x0d,0x03},{0x01,0x15,0x05},
{0x01,0x17,0x05},{0x01,0x21,0x08},{0x01,0x24,0x08},
{0x02,0x2e,0x0b},{0x02,0x31,0x0b},{0x01,0x22,0x08},
{0x02,0x28,0x09},{0x02,0x30,0x0b},{0x02,0x32,0x0c},
{0x03,0x39,0x0d},{0x03,0x3b,0x0e},{0x09,0x3f,0x14},{0x0d,0x3f,0x17},
},
{ /* 2 - amber, 4-color-optimized contrast. */
{0x00,0x00,0x00},{0x15,0x05,0x00},{0x20,0x0b,0x00},
{0x24,0x0d,0x00},{0x33,0x18,0x00},{0x37,0x1b,0x00},
{0x3f,0x26,0x01},{0x3f,0x2b,0x06},{0x0b,0x02,0x00},
{0x1b,0x08,0x00},{0x29,0x11,0x00},{0x2e,0x14,0x00},
{0x3b,0x1e,0x00},{0x3e,0x21,0x00},{0x3f,0x32,0x0a},{0x3f,0x38,0x0d},
},
{ /* 3 - amber, 16-color-optimized contrast. */
{0x00,0x00,0x00},{0x15,0x05,0x00},{0x1e,0x09,0x00},
{0x21,0x0b,0x00},{0x2b,0x12,0x00},{0x2f,0x15,0x00},
{0x38,0x1c,0x00},{0x3b,0x1e,0x00},{0x2c,0x13,0x00},
{0x32,0x17,0x00},{0x3a,0x1e,0x00},{0x3c,0x1f,0x00},
{0x3f,0x27,0x01},{0x3f,0x2a,0x04},{0x3f,0x36,0x0c},{0x3f,0x38,0x0d},
},
{ /* 4 - grey, 4-color-optimized contrast. */
{0x00,0x00,0x00},{0x0e,0x0f,0x10},{0x15,0x17,0x18},
{0x18,0x1a,0x1b},{0x24,0x25,0x25},{0x27,0x28,0x28},
{0x33,0x34,0x32},{0x37,0x38,0x35},{0x09,0x0a,0x0b},
{0x11,0x12,0x13},{0x1c,0x1e,0x1e},{0x20,0x22,0x22},
{0x2c,0x2d,0x2c},{0x2f,0x30,0x2f},{0x3c,0x3c,0x38},{0x3f,0x3f,0x3b},
},
{ /* 5 - grey, 16-color-optimized contrast. */
{0x00,0x00,0x00},{0x0e,0x0f,0x10},{0x13,0x14,0x15},
{0x15,0x17,0x18},{0x1e,0x20,0x20},{0x20,0x22,0x22},
{0x29,0x2a,0x2a},{0x2c,0x2d,0x2c},{0x1f,0x21,0x21},
{0x23,0x25,0x25},{0x2b,0x2c,0x2b},{0x2d,0x2e,0x2d},
{0x34,0x35,0x33},{0x37,0x37,0x34},{0x3e,0x3e,0x3a},{0x3f,0x3f,0x3b},
}
};
uint32_t pal_lookup[256];
static CUSTOMVERTEX d3d_verts[] =
{
{ 0.0f, 0.0f, 1.0f, 1.0f, 0xffffff, 0.0f, 0.0f},
@@ -145,43 +78,6 @@ static CUSTOMVERTEX d3d_verts[] =
};
void cgapal_rebuild(void)
{
int c;
for (c = 0; c < 256; c++)
{
pal_lookup[c] = makecol(video_6to8[cgapal[c].r], video_6to8[cgapal[c].g], video_6to8[cgapal[c].b]);
}
if ((cga_palette > 1) && (cga_palette < 8))
{
if (vid_cga_contrast != 0)
{
for (c = 0; c < 16; c++)
{
pal_lookup[c] = makecol(video_6to8[cgapal_mono[cga_palette - 2][c].r], video_6to8[cgapal_mono[cga_palette - 2][c].g], video_6to8[cgapal_mono[cga_palette - 2][c].b]);
pal_lookup[c + 16] = makecol(video_6to8[cgapal_mono[cga_palette - 2][c].r], video_6to8[cgapal_mono[cga_palette - 2][c].g], video_6to8[cgapal_mono[cga_palette - 2][c].b]);
pal_lookup[c + 32] = makecol(video_6to8[cgapal_mono[cga_palette - 2][c].r], video_6to8[cgapal_mono[cga_palette - 2][c].g], video_6to8[cgapal_mono[cga_palette - 2][c].b]);
pal_lookup[c + 48] = makecol(video_6to8[cgapal_mono[cga_palette - 2][c].r], video_6to8[cgapal_mono[cga_palette - 2][c].g], video_6to8[cgapal_mono[cga_palette - 2][c].b]);
}
}
else
{
for (c = 0; c < 16; c++)
{
pal_lookup[c] = makecol(video_6to8[cgapal_mono[cga_palette - 1][c].r], video_6to8[cgapal_mono[cga_palette - 1][c].g], video_6to8[cgapal_mono[cga_palette - 1][c].b]);
pal_lookup[c + 16] = makecol(video_6to8[cgapal_mono[cga_palette - 1][c].r], video_6to8[cgapal_mono[cga_palette - 1][c].g], video_6to8[cgapal_mono[cga_palette - 1][c].b]);
pal_lookup[c + 32] = makecol(video_6to8[cgapal_mono[cga_palette - 1][c].r], video_6to8[cgapal_mono[cga_palette - 1][c].g], video_6to8[cgapal_mono[cga_palette - 1][c].b]);
pal_lookup[c + 48] = makecol(video_6to8[cgapal_mono[cga_palette - 1][c].r], video_6to8[cgapal_mono[cga_palette - 1][c].g], video_6to8[cgapal_mono[cga_palette - 1][c].b]);
}
}
}
if (cga_palette == 8)
{
pal_lookup[0x16] = makecol(video_6to8[42], video_6to8[42], video_6to8[0]);
}
}
int d3d_fs_init(HWND h)
{
int c;
@@ -190,11 +86,10 @@ int d3d_fs_init(HWND h)
d3d_fs_w = GetSystemMetrics(SM_CXSCREEN);
d3d_fs_h = GetSystemMetrics(SM_CYSCREEN);
d3d_hwnd = h;
for (c = 0; c < 256; c++)
pal_lookup[c] = makecol(cgapal[c].r << 2, cgapal[c].g << 2, cgapal[c].b << 2);
d3d_hwnd = h;
/*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 (
@@ -234,9 +129,13 @@ int d3d_fs_init(HWND h)
fatal("CreateDevice failed\n");
d3d_fs_init_objects();
#if 0
video_setblit(d3d_fs_blit_memtoscreen_8, d3d_fs_blit_memtoscreen);
#else
video_blit_memtoscreen_func = d3d_fs_blit_memtoscreen;
video_blit_memtoscreen_8_func = d3d_fs_blit_memtoscreen_8;
#endif
return 1;
}

View File

@@ -11,7 +11,6 @@
#include "../plat.h"
#include "../ui.h"
#include "win_ddraw.h"
#include "win_cgapal.h"
#include "win.h"
@@ -22,6 +21,7 @@ extern "C" void device_force_redraw(void);
extern "C" int ddraw_init(HWND h);
extern "C" void ddraw_close(void);
extern "C" void ddraw_take_screenshot(wchar_t *fn);
extern "C" void video_blit_complete(void);
@@ -365,8 +365,13 @@ ddraw_init(HWND h)
if (FAILED(lpdds_pri->SetClipper(lpdd_clipper))) return(0);
ddraw_hwnd = h;
#if 0
video_setblit(ddraw_blit_memtoscreen_8, ddraw_blit_memtoscreen);
#else
video_blit_memtoscreen_func = ddraw_blit_memtoscreen;
video_blit_memtoscreen_8_func = ddraw_blit_memtoscreen_8;
#endif
return(1);
}

View File

@@ -19,6 +19,7 @@ extern void ddraw_take_screenshot(wchar_t *fn);
extern int ddraw_fs_init(HWND h);
extern void ddraw_fs_close(void);
extern void ddraw_fs_take_screenshot(wchar_t *fn);
#ifdef __cplusplus
}

View File

@@ -4,7 +4,6 @@
#include <stdint.h>
#include "../video/video.h"
#include "win_ddraw.h"
#include "win_cgapal.h"
static LPDIRECTDRAW lpdd = NULL;
@@ -25,6 +24,7 @@ extern "C" void device_force_redraw(void);
extern "C" int ddraw_fs_init(HWND h);
extern "C" void ddraw_fs_close(void);
extern "C" void ddraw_fs_take_screenshot(wchar_t *fn);
extern void ddraw_common_take_screenshot(wchar_t *fn, IDirectDrawSurface7 *pDDSurface);
@@ -92,8 +92,12 @@ int ddraw_fs_init(HWND h)
pclog("DDRAW_INIT complete\n");
ddraw_hwnd = h;
#if 0
video_setblit(ddraw_fs_blit_memtoscreen_8, ddraw_fs_blit_memtoscreen);
#else
video_blit_memtoscreen_func = ddraw_fs_blit_memtoscreen;
video_blit_memtoscreen_8_func = ddraw_fs_blit_memtoscreen_8;
#endif
return 1;
}

View File

@@ -8,7 +8,7 @@
*
* Windows device configuration dialog implementation.
*
* Version: @(#)win_deviceconfig.c 1.0.5 2017/10/09
* Version: @(#)win_deviceconfig.c 1.0.7 2017/10/10
*
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com>
@@ -24,8 +24,8 @@
#include "../config.h"
#include "../device.h"
#include "../plat.h"
#include "../plat_midi.h"
#include "../ui.h"
#include "plat_midi.h"
#include "win.h"
#include <windowsx.h>

View File

@@ -8,9 +8,10 @@
*
* Try to load a support DLL.
*
* Version: @(#)win_dynld.c 1.0.3 2017/09/24
* Version: @(#)win_dynld.c 1.0.4 2017/10/10
*
* Author: Fred N. van Kempen, <decwiz@yahoo.com>
*
* Copyright 2017 Fred N. van Kempen
*/
#include <stdio.h>
@@ -20,8 +21,8 @@
#include <wchar.h>
#include <pcap.h>
#include <windows.h>
#include "plat_dynld.h"
#include "../ibm.h"
#include "../plat_dynld.h"
void *

View File

@@ -8,10 +8,11 @@
*
* Joystick interface to host device.
*
* Version: @(#)win_joystick.cc 1.0.2 2017/10/01
* Version: @(#)win_joystick.cc 1.0.3 2017/10/10
*
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com>
*
* Copyright 2008-2017 Sarah Walker.
* Copyright 2016,2017 Miran Grca.
*/
@@ -23,7 +24,8 @@ extern "C" {
#include "../device.h"
#include "../game/gameport.h"
}
#include "plat_joystick.h"
#include "../plat.h"
#include "../plat_joystick.h"
#include "win.h"
extern "C" int video_fullscreen;

View File

@@ -13,7 +13,8 @@
#include "../config.h"
#include "../device.h"
#include "../game/gameport.h"
#include "plat_joystick.h"
#include "../plat.h"
#include "../plat_joystick.h"
#include "win.h"

View File

@@ -8,28 +8,27 @@
*
* Windows raw keyboard input handler.
*
* Version: @(#)win_d3d.cc 1.0.1 2017/09/24
* Version: @(#)win_keyboard.c 1.0.2 2017/10/10
*
* Author: Miran Grca, <mgrca8@gmail.com>
*
* Copyright 2016-2017 Miran Grca.
*/
#define UNICODE
#define _WIN32_WINNT 0x0501
#define BITMAP WINDOWS_BITMAP
#include <windows.h>
#include <windowsx.h>
#undef BITMAP
#include <commctrl.h>
#include <commdlg.h>
#include <process.h>
#include <string.h>
#include <stdio.h>
#include <stdarg.h>
#include <stdlib.h>
//#include <commctrl.h>
//#include <commdlg.h>
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "../device.h"
#include "plat_keyboard.h"
#include "../plat.h"
#include "../plat_keyboard.h"
#include "win.h"

View File

@@ -7,13 +7,14 @@
#include "../ibm.h"
#include "../config.h"
#include "../sound/midi.h"
#include "plat_midi.h"
#include "../plat.h"
#include "../plat_midi.h"
int midi_id = 0;
static HMIDIOUT midi_out_device = NULL;
HANDLE m_event;
static HMIDIOUT midi_out_device = NULL;
static uint8_t midi_rt_buf[1024];
static uint8_t midi_cmd_buf[1024];
static int midi_cmd_pos = 0;

View File

@@ -8,17 +8,19 @@
*
* Mouse interface to host device.
*
* Version: @(#)win_mouse.cc 1.0.2 2017/09/24
* Version: @(#)win_mouse.cc 1.0.3 2017/10/10
*
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com>
*
* Copyright 2008-2017 Sarah Walker.
* Copyright 2016,2017 Miran Grca.
*/
#define DIRECTINPUT_VERSION 0x0800
#include <dinput.h>
#include <stdint.h>
#include "plat_mouse.h"
#include "../plat.h"
#include "../plat_mouse.h"
#include "win.h"

Some files were not shown because too many files have changed in this diff Show More