More cleanups.

Added more languages.
Updated SCAT machines (for the Asian demo machines.)
Fixed VC project files.
Started integrating building of language DLL's into mainline.
Added the Award 8088 XT Clone machine.
This commit is contained in:
waltje
2018-06-16 18:38:02 -04:00
parent eb5a5d6b71
commit 162afde8b8
35 changed files with 3597 additions and 4369 deletions

View File

@@ -12,7 +12,7 @@
* it should be malloc'ed and then linked to the NETCARD def. * it should be malloc'ed and then linked to the NETCARD def.
* Will be done later. * Will be done later.
* *
* Version: @(#)network.c 1.0.10 2018/05/24 * Version: @(#)network.c 1.0.11 2018/06/10
* *
* Author: Fred N. van Kempen, <decwiz@yahoo.com> * Author: Fred N. van Kempen, <decwiz@yahoo.com>
* *
@@ -54,7 +54,7 @@
#include <stdlib.h> #include <stdlib.h>
#include <stdarg.h> #include <stdarg.h>
#include <wchar.h> #include <wchar.h>
#ifdef WALTJE #ifdef ENABLE_NETWORK_DUMP
# include <ctype.h> # include <ctype.h>
#endif #endif
#define HAVE_STDARG_H #define HAVE_STDARG_H
@@ -102,47 +102,10 @@ static struct {
} poll_data; } poll_data;
#ifdef WALTJE #ifdef ENABLE_NETWORK_DUMP
# define is_print(c) (isalnum((int)(c)) || ((c) == ' ')) # define is_print(c) (isalnum((int)(c)) || ((c) == ' '))
#if 0
/* Dump a buffer in hex, standard output. */
static void
hexdump(uint8_t *bufp, int len)
{
char asci[20];
uint8_t c;
int addr;
addr = 0;
while (len-- > 0) {
c = bufp[addr];
if ((addr % 16) == 0) {
printf("%06X %02X", addr, c);
} else {
printf(" %02X", c);
}
asci[(addr & 15)] = (char)((is_print(c) ? c : '.') & 0xff);
if ((++addr % 16) == 0) {
asci[16] = '\0';
printf(" | %s |\n", asci);
}
}
if (addr % 16) {
while (addr % 16) {
printf(" ");
asci[(addr & 15)] = ' ';
addr++;
}
asci[16] = '\0';
printf(" | %s |\n", asci);
}
}
#endif
/* Dump a buffer in hex to output buffer. */ /* Dump a buffer in hex to output buffer. */
static void static void
hexdump_p(char *ptr, uint8_t *bufp, int len) hexdump_p(char *ptr, uint8_t *bufp, int len)
@@ -403,9 +366,9 @@ network_tx(uint8_t *bufp, int len)
{ {
ui_sb_icon_update(SB_NETWORK, 1); ui_sb_icon_update(SB_NETWORK, 1);
#ifdef WALTJE #ifdef ENABLE_NETWORK_DUMP
{ {
char temp[4096]; char temp[8192];
hexdump_p(temp, bufp, len); hexdump_p(temp, bufp, len);
pclog("NETWORK: >> len=%d\n%s\n", len, temp); pclog("NETWORK: >> len=%d\n%s\n", len, temp);
} }

View File

@@ -8,12 +8,12 @@
* *
* ATI 28800 emulation (VGA Charger and Korean VGA) * ATI 28800 emulation (VGA Charger and Korean VGA)
* *
* Version: @(#)vid_ati28800.c 1.0.13 2018/05/06 * Version: @(#)vid_ati28800.c 1.0.14 2018/06/11
* *
* Authors: Fred N. van Kempen, <decwiz@yahoo.com> * Authors: Fred N. van Kempen, <decwiz@yahoo.com>
* Miran Grca, <mgrca8@gmail.com> * Miran Grca, <mgrca8@gmail.com>
* Sarah Walker, <tommowalker@tommowalker.co.uk> * Sarah Walker, <tommowalker@tommowalker.co.uk>
* greatpsycho, * greatpsycho, <greatpsycho@yahoo.com>
* *
* Copyright 2017,2018 Fred N. van Kempen. * Copyright 2017,2018 Fred N. van Kempen.
* Copyright 2016-2018 Miran Grca. * Copyright 2016-2018 Miran Grca.
@@ -69,8 +69,7 @@
#define BIOS_ROM_PATH L"video/ati/ati28800/bios.bin" #define BIOS_ROM_PATH L"video/ati/ati28800/bios.bin"
typedef struct ati28800_t typedef struct {
{
svga_t svga; svga_t svga;
ati_eeprom_t eeprom; ati_eeprom_t eeprom;
@@ -91,289 +90,314 @@ typedef struct ati28800_t
} ati28800_t; } ati28800_t;
static void ati28800_out(uint16_t addr, uint8_t val, void *p) static void
ati28800_out(uint16_t addr, uint8_t val, void *p)
{ {
ati28800_t *ati28800 = (ati28800_t *)p; ati28800_t *ati = (ati28800_t *)p;
svga_t *svga = &ati28800->svga; svga_t *svga = &ati->svga;
uint8_t old; uint8_t old;
/* pclog("ati28800_out : %04X %02X %04X:%04X\n", addr, val, CS,pc); */ #if 0
pclog("ati28800_out : %04X %02X %04X:%04X\n", addr, val, CS,pc);
#endif
if (((addr&0xFFF0) == 0x3D0 || (addr&0xFFF0) == 0x3B0) && !(svga->miscout&1)) if (((addr&0xFFF0) == 0x3D0 ||
addr ^= 0x60; (addr&0xFFF0) == 0x3B0) && !(svga->miscout&1))
addr ^= 0x60;
switch (addr) {
case 0x1ce:
ati->index = val;
break;
case 0x1cf:
old = ati->regs[ati->index];
ati->regs[ati->index] = val;
switch (ati->index) {
case 0xb2:
case 0xbe:
if (ati->regs[0xbe] & 8) /*Read/write bank mode*/ {
svga->read_bank = ((ati->regs[0xb2] >> 5) & 7) * 0x10000;
svga->write_bank = ((ati->regs[0xb2] >> 1) & 7) * 0x10000;
} else /*Single bank mode*/
svga->read_bank = svga->write_bank = ((ati->regs[0xb2] >> 1) & 7) * 0x10000;
break;
case 0xb3:
ati_eeprom_write(&ati->eeprom, val & 8, val & 2, val & 1);
break;
switch (addr)
{
case 0x1ce:
ati28800->index = val;
break;
case 0x1cf:
old=ati28800->regs[ati28800->index];
ati28800->regs[ati28800->index] = val;
switch (ati28800->index)
{
case 0xb2:
case 0xbe:
if (ati28800->regs[0xbe] & 8) /*Read/write bank mode*/
{
svga->read_bank = ((ati28800->regs[0xb2] >> 5) & 7) * 0x10000;
svga->write_bank = ((ati28800->regs[0xb2] >> 1) & 7) * 0x10000;
}
else /*Single bank mode*/
svga->read_bank = svga->write_bank = ((ati28800->regs[0xb2] >> 1) & 7) * 0x10000;
break;
case 0xb3:
ati_eeprom_write(&ati28800->eeprom, val & 8, val & 2, val & 1);
break;
case 0xb6: case 0xb6:
if((old ^ val) & 0x10) svga_recalctimings(svga); if ((old ^ val) & 0x10)
break; svga_recalctimings(svga);
case 0xb8: break;
if((old ^ val) & 0x40) svga_recalctimings(svga);
break;
case 0xb9:
if((old ^ val) & 2) svga_recalctimings(svga);
}
break;
case 0x3D4: case 0xb8:
svga->crtcreg = val & 0x3f; if ((old ^ val) & 0x40)
return; svga_recalctimings(svga);
case 0x3D5: 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;
}
svga_out(addr, val, svga);
}
static void ati28800k_out(uint16_t addr, uint8_t val, void *p) case 0xb9:
{ if ((old ^ val) & 2)
ati28800_t *ati28800 = (ati28800_t *)p; svga_recalctimings(svga);
svga_t *svga = &ati28800->svga;
uint16_t oldaddr = addr;
if (((addr&0xFFF0) == 0x3D0 || (addr&0xFFF0) == 0x3B0) && !(svga->miscout&1))
addr ^= 0x60;
switch (addr)
{
case 0x1CF:
if (ati28800->index == 0xBF && ((ati28800->regs[0xBF] ^ val) & 0x20))
{
ati28800->ksc5601_mode_enabled = val & 0x20;
svga_recalctimings(svga);
}
ati28800_out(oldaddr, val, p);
break;
case 0x3DD:
ati28800->port_03dd_val = val;
if (val == 1) ati28800->get_korean_font_enabled = 0;
if (ati28800->in_get_korean_font_kind_set)
{
ati28800->get_korean_font_kind = (val << 8) | (ati28800->get_korean_font_kind & 0xFF);
ati28800->get_korean_font_enabled = 1;
ati28800->get_korean_font_index = 0;
ati28800->in_get_korean_font_kind_set = 0;
}
break;
case 0x3DE:
ati28800->in_get_korean_font_kind_set = 0;
if (ati28800->get_korean_font_enabled && (ati28800->regs[0xBF] & 0x20))
{
if ((ati28800->get_korean_font_base & 0x7F) > 0x20 && (ati28800->get_korean_font_base & 0x7F) < 0x7F)
fontdatksc5601_user[(ati28800->get_korean_font_kind & 4) * 24 + (ati28800->get_korean_font_base & 0x7F) - 0x20].chr[ati28800->get_korean_font_index] = val;
ati28800->get_korean_font_index++;
ati28800->get_korean_font_index &= 0x1F;
}
else
{
switch(ati28800->port_03dd_val)
{
case 0x10:
ati28800->get_korean_font_base = ((val & 0x7F) << 7) | (ati28800->get_korean_font_base & 0x7F);
break;
case 8:
ati28800->get_korean_font_base = (ati28800->get_korean_font_base & 0x3F80) | (val & 0x7F);
break;
case 1:
ati28800->get_korean_font_kind = (ati28800->get_korean_font_kind & 0xFF00) | val;
if(val & 2)
ati28800->in_get_korean_font_kind_set = 1;
break;
}
break;
} }
default: break;
ati28800_out(oldaddr, val, p);
break; case 0x3D4:
} svga->crtcreg = val & 0x3f;
return;
case 0x3D5:
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;
}
svga_out(addr, val, svga);
} }
static uint8_t ati28800_in(uint16_t addr, void *p)
static void
ati28800k_out(uint16_t addr, uint8_t val, void *p)
{ {
ati28800_t *ati28800 = (ati28800_t *)p; ati28800_t *ati = (ati28800_t *)p;
svga_t *svga = &ati28800->svga; svga_t *svga = &ati->svga;
uint8_t temp; uint16_t oldaddr = addr;
/* if (addr != 0x3da) pclog("ati28800_in : %04X ", addr); */ if (((addr&0xFFF0) == 0x3D0 ||
(addr&0xFFF0) == 0x3B0) && !(svga->miscout&1))
addr ^= 0x60;
if (((addr&0xFFF0) == 0x3D0 || (addr&0xFFF0) == 0x3B0) && !(svga->miscout&1)) addr ^= 0x60; switch (addr) {
case 0x1CF:
if (ati->index == 0xBF && ((ati->regs[0xBF] ^ val) & 0x20)) {
ati->ksc5601_mode_enabled = val & 0x20;
svga_recalctimings(svga);
switch (addr) }
{ ati28800_out(oldaddr, val, p);
case 0x1ce: break;
temp = ati28800->index;
break; case 0x3DD:
case 0x1cf: ati->port_03dd_val = val;
switch (ati28800->index) if (val == 1) ati->get_korean_font_enabled = 0;
{ if (ati->in_get_korean_font_kind_set) {
ati->get_korean_font_kind = (val << 8) | (ati->get_korean_font_kind & 0xFF);
ati->get_korean_font_enabled = 1;
ati->get_korean_font_index = 0;
ati->in_get_korean_font_kind_set = 0;
}
break;
case 0x3DE:
ati->in_get_korean_font_kind_set = 0;
if (ati->get_korean_font_enabled && (ati->regs[0xBF] & 0x20)) {
if ((ati->get_korean_font_base & 0x7F) > 0x20 && (ati->get_korean_font_base & 0x7F) < 0x7F)
fontdatksc5601_user[(ati->get_korean_font_kind & 4) * 24 + (ati->get_korean_font_base & 0x7F) - 0x20].chr[ati->get_korean_font_index] = val;
ati->get_korean_font_index++;
ati->get_korean_font_index &= 0x1F;
} else {
switch(ati->port_03dd_val) {
case 0x10:
ati->get_korean_font_base = ((val & 0x7F) << 7) | (ati->get_korean_font_base & 0x7F);
break;
case 8:
ati->get_korean_font_base = (ati->get_korean_font_base & 0x3F80) | (val & 0x7F);
break;
case 1:
ati->get_korean_font_kind = (ati->get_korean_font_kind & 0xFF00) | val;
if (val & 2)
ati->in_get_korean_font_kind_set = 1;
break;
}
}
break;
default:
ati28800_out(oldaddr, val, p);
break;
}
}
static uint8_t
ati28800_in(uint16_t addr, void *p)
{
ati28800_t *ati = (ati28800_t *)p;
svga_t *svga = &ati->svga;
uint8_t temp;
#if 0
if (addr != 0x3da) pclog("ati28800_in : %04X ", addr);
#endif
if (((addr&0xFFF0) == 0x3D0 ||
(addr&0xFFF0) == 0x3B0) && !(svga->miscout&1)) addr ^= 0x60;
switch (addr) {
case 0x1ce:
temp = ati->index;
break;
case 0x1cf:
switch (ati->index) {
case 0xb0: case 0xb0:
if (ati28800->memory == 256) if (ati->memory == 256)
return 0x08; return 0x08;
else if (ati28800->memory == 512) else if (ati->memory == 512)
return 0x10; return 0x10;
else else
return 0x18; return 0x18;
break; break;
case 0xb7: case 0xb7:
temp = ati28800->regs[ati28800->index] & ~8; temp = ati->regs[ati->index] & ~8;
if (ati_eeprom_read(&ati28800->eeprom)) if (ati_eeprom_read(&ati->eeprom))
temp |= 8; temp |= 8;
break; break;
default: default:
temp = ati28800->regs[ati28800->index]; temp = ati->regs[ati->index];
break; break;
} }
break; break;
case 0x3c2: case 0x3c2:
if ((svga->vgapal[0].r + svga->vgapal[0].g + svga->vgapal[0].b) >= 0x50) if ((svga->vgapal[0].r + svga->vgapal[0].g + svga->vgapal[0].b) >= 0x50)
temp = 0; temp = 0;
else else
temp = 0x10; temp = 0x10;
break; break;
case 0x3D4:
temp = svga->crtcreg; case 0x3D4:
break; temp = svga->crtcreg;
case 0x3D5: break;
temp = svga->crtc[svga->crtcreg];
break; case 0x3D5:
default: temp = svga->crtc[svga->crtcreg];
temp = svga_in(addr, svga); break;
break;
} default:
/* if (addr != 0x3da) pclog("%02X %04X:%04X\n", temp, CS,cpu_state.pc); */ temp = svga_in(addr, svga);
return temp; break;
}
#if 0
if (addr != 0x3da) pclog("%02X %04X:%04X\n", temp, CS,cpu_state.pc);
#endif
return temp;
} }
static uint8_t ati28800k_in(uint16_t addr, void *p)
static uint8_t
ati28800k_in(uint16_t addr, void *p)
{ {
ati28800_t *ati28800 = (ati28800_t *)p; ati28800_t *ati = (ati28800_t *)p;
svga_t *svga = &ati28800->svga; svga_t *svga = &ati->svga;
uint16_t oldaddr = addr; uint16_t oldaddr = addr;
uint8_t temp = 0xFF; uint8_t temp = 0xFF;
// if (addr != 0x3da) pclog("ati28800_in : %04X ", addr); #if 0
if (addr != 0x3da) pclog("ati28800_in : %04X ", addr);
#endif
if (((addr&0xFFF0) == 0x3D0 || (addr&0xFFF0) == 0x3B0) && !(svga->miscout&1)) addr ^= 0x60; if (((addr&0xFFF0) == 0x3D0 ||
(addr&0xFFF0) == 0x3B0) && !(svga->miscout&1)) addr ^= 0x60;
switch (addr) switch (addr) {
{ case 0x3DE:
case 0x3DE: if (ati->get_korean_font_enabled && (ati->regs[0xBF] & 0x20)) {
if (ati28800->get_korean_font_enabled && (ati28800->regs[0xBF] & 0x20)) switch(ati->get_korean_font_kind >> 8) {
{ case 4: /* ROM font */
switch(ati28800->get_korean_font_kind >> 8) temp = fontdatksc5601[ati->get_korean_font_base].chr[ati->get_korean_font_index++];
{ break;
case 4: /* ROM font */
temp = fontdatksc5601[ati28800->get_korean_font_base].chr[ati28800->get_korean_font_index++]; case 2: /* User defined font */
break; if ((ati->get_korean_font_base & 0x7F) > 0x20 && (ati->get_korean_font_base & 0x7F) < 0x7F)
case 2: /* User defined font */ temp = fontdatksc5601_user[(ati->get_korean_font_kind & 4) * 24 + (ati->get_korean_font_base & 0x7F) - 0x20].chr[ati->get_korean_font_index];
if((ati28800->get_korean_font_base & 0x7F) > 0x20 && (ati28800->get_korean_font_base & 0x7F) < 0x7F) else
temp = fontdatksc5601_user[(ati28800->get_korean_font_kind & 4) * 24 + (ati28800->get_korean_font_base & 0x7F) - 0x20].chr[ati28800->get_korean_font_index]; temp = 0xFF;
else ati->get_korean_font_index++;
temp = 0xFF; break;
ati28800->get_korean_font_index++;
break; default:
default: break;
break; }
} ati->get_korean_font_index &= 0x1F;
ati28800->get_korean_font_index &= 0x1F; }
} break;
break;
default: default:
temp = ati28800_in(oldaddr, p); temp = ati28800_in(oldaddr, p);
break; break;
} }
if (addr != 0x3da) pclog("%02X %04X:%04X\n", temp, CS,cpu_state.pc); #ifdef _DEBUG
return temp; if (addr != 0x3da) pclog("%02X %04X:%04X\n", temp, CS,cpu_state.pc);
#endif
return temp;
} }
static void ati28800_recalctimings(svga_t *svga)
static void
ati28800_recalctimings(svga_t *svga)
{ {
ati28800_t *ati28800 = (ati28800_t *)svga->p; ati28800_t *ati = (ati28800_t *)svga->p;
switch(((ati28800->regs[0xbe] & 0x10) >> 1) | ((ati28800->regs[0xb9] & 2) << 1) | ((svga->miscout & 0x0C) >> 2)) switch(((ati->regs[0xbe] & 0x10) >> 1) | ((ati->regs[0xb9] & 2) << 1) | ((svga->miscout & 0x0C) >> 2)) {
{ case 0x00: svga->clock = cpuclock / 42954000.0; break;
case 0x00: svga->clock = cpuclock / 42954000.0; break; case 0x01: svga->clock = cpuclock / 48771000.0; break;
case 0x01: svga->clock = cpuclock / 48771000.0; break; case 0x03: svga->clock = cpuclock / 36000000.0; break;
case 0x03: svga->clock = cpuclock / 36000000.0; break; case 0x04: svga->clock = cpuclock / 50350000.0; break;
case 0x04: svga->clock = cpuclock / 50350000.0; break; case 0x05: svga->clock = cpuclock / 56640000.0; break;
case 0x05: svga->clock = cpuclock / 56640000.0; break; case 0x07: svga->clock = cpuclock / 44900000.0; break;
case 0x07: svga->clock = cpuclock / 44900000.0; break; case 0x08: svga->clock = cpuclock / 30240000.0; break;
case 0x08: svga->clock = cpuclock / 30240000.0; break; case 0x09: svga->clock = cpuclock / 32000000.0; break;
case 0x09: svga->clock = cpuclock / 32000000.0; break; case 0x0A: svga->clock = cpuclock / 37500000.0; break;
case 0x0A: svga->clock = cpuclock / 37500000.0; break; case 0x0B: svga->clock = cpuclock / 39000000.0; break;
case 0x0B: svga->clock = cpuclock / 39000000.0; break; case 0x0C: svga->clock = cpuclock / 40000000.0; break;
case 0x0C: svga->clock = cpuclock / 40000000.0; break; case 0x0D: svga->clock = cpuclock / 56644000.0; break;
case 0x0D: svga->clock = cpuclock / 56644000.0; break; case 0x0E: svga->clock = cpuclock / 75000000.0; break;
case 0x0E: svga->clock = cpuclock / 75000000.0; break; case 0x0F: svga->clock = cpuclock / 65000000.0; break;
case 0x0F: svga->clock = cpuclock / 65000000.0; break; default: break;
default: break; }
}
if(ati28800->regs[0xb8] & 0x40) svga->clock *= 2; if (ati->regs[0xb8] & 0x40) svga->clock *= 2;
if (ati28800->regs[0xb6] & 0x10) if (ati->regs[0xb6] & 0x10) {
{ svga->hdisp <<= 1;
svga->hdisp <<= 1; svga->htotal <<= 1;
svga->htotal <<= 1; svga->rowoffset <<= 1;
svga->rowoffset <<= 1; }
}
if(svga->crtc[0x17] & 4) if (svga->crtc[0x17] & 4) {
{ svga->vtotal <<= 1;
svga->vtotal <<= 1; svga->dispend <<= 1;
svga->dispend <<= 1; svga->vsyncstart <<= 1;
svga->vsyncstart <<= 1; svga->split <<= 1;
svga->split <<= 1; svga->vblankstart <<= 1;
svga->vblankstart <<= 1; }
}
if (!svga->scrblank && (ati28800->regs[0xb0] & 0x20)) /*Extended 256 colour modes*/ if (!svga->scrblank && (ati->regs[0xb0] & 0x20)) {
{ /* Extended 256 color modes. */
svga->render = svga_render_8bpp_highres; svga->render = svga_render_8bpp_highres;
svga->bpp = 8; svga->bpp = 8;
svga->rowoffset <<= 1; svga->rowoffset <<= 1;
svga->ma <<= 1; svga->ma <<= 1;
} }
} }
static void * static void *
ati28800_init(const device_t *info) ati28800_init(const device_t *info)
{ {
@@ -413,9 +437,9 @@ ati28800_init(const device_t *info)
svga_init(&ati->svga, ati, ati->memory << 10, /*default: 512kb*/ svga_init(&ati->svga, ati, ati->memory << 10, /*default: 512kb*/
ati28800_recalctimings, ati28800_recalctimings,
ati28800_in, ati28800_out, ati28800_in, ati28800_out,
NULL, NULL,
NULL); NULL);
io_sethandler(0x01ce, 2, io_sethandler(0x01ce, 2,
ati28800_in, NULL, NULL, ati28800_in, NULL, NULL,
@@ -431,53 +455,60 @@ ati28800_init(const device_t *info)
return(ati); return(ati);
} }
void ati28800k_recalctimings(svga_t *svga)
static void
ati28800k_recalctimings(svga_t *svga)
{ {
ati28800_t *ati28800 = (ati28800_t *) svga->p; ati28800_t *ati = (ati28800_t *) svga->p;
ati28800_recalctimings(svga); ati28800_recalctimings(svga);
if (svga->render == svga_render_text_80 && ati28800->ksc5601_mode_enabled) if (svga->render == svga_render_text_80 && ati->ksc5601_mode_enabled) {
{ svga->render = svga_render_text_80_ksc5601;
svga->render = svga_render_text_80_ksc5601; }
}
} }
void *
static void *
ati28800k_init(const device_t *info) ati28800k_init(const device_t *info)
{ {
ati28800_t *ati28800 = malloc(sizeof(ati28800_t)); ati28800_t *ati = malloc(sizeof(ati28800_t));
memset(ati28800, 0, sizeof(ati28800_t)); memset(ati, 0, sizeof(ati28800_t));
ati28800->memory = device_get_config_int("memory"); ati->memory = device_get_config_int("memory");
ati28800->port_03dd_val = 0; ati->port_03dd_val = 0;
ati28800->get_korean_font_base = 0; ati->get_korean_font_base = 0;
ati28800->get_korean_font_index = 0; ati->get_korean_font_index = 0;
ati28800->get_korean_font_enabled = 0; ati->get_korean_font_enabled = 0;
ati28800->get_korean_font_kind = 0; ati->get_korean_font_kind = 0;
ati28800->in_get_korean_font_kind_set = 0; ati->in_get_korean_font_kind_set = 0;
ati28800->ksc5601_mode_enabled = 0; ati->ksc5601_mode_enabled = 0;
rom_init(&ati28800->bios_rom, BIOS_ATIKOR_PATH, 0xc0000, 0x8000, 0x7fff, 0, MEM_MAPPING_EXTERNAL); rom_init(&ati->bios_rom, BIOS_ATIKOR_PATH,
loadfont(FONT_ATIKOR_PATH, 6); 0xc0000, 0x8000, 0x7fff, 0, MEM_MAPPING_EXTERNAL);
loadfont(FONT_ATIKOR_PATH, 6);
svga_init(&ati28800->svga, ati28800, ati28800->memory << 10, /*Memory size, default 512KB*/ svga_init(&ati->svga, ati,
ati28800k_recalctimings, ati->memory << 10, /*Memory size, default 512KB*/
ati28800k_in, ati28800k_out, ati28800k_recalctimings,
NULL, ati28800k_in, ati28800k_out,
NULL); NULL,
NULL);
io_sethandler(0x01ce, 0x0002, ati28800k_in, NULL, NULL, ati28800k_out, NULL, NULL, ati28800); io_sethandler(0x01ce, 2,
io_sethandler(0x03c0, 0x0020, ati28800k_in, NULL, NULL, ati28800k_out, NULL, NULL, ati28800); ati28800k_in,NULL,NULL, ati28800k_out,NULL,NULL, ati);
io_sethandler(0x03c0, 32,
ati28800k_in,NULL,NULL, ati28800k_out,NULL,NULL, ati);
ati28800->svga.miscout = 1; ati->svga.miscout = 1;
ati_eeprom_load(&ati28800->eeprom, L"atikorvga.nvr", 0); ati_eeprom_load(&ati->eeprom, L"atikorvga.nvr", 0);
return ati28800; return(ati);
} }
static int static int
ati28800_available(void) ati28800_available(void)
{ {
@@ -525,9 +556,9 @@ ati28800_close(void *priv)
static void static void
ati28800_speed_changed(void *p) ati28800_speed_changed(void *p)
{ {
ati28800_t *ati28800 = (ati28800_t *)p; ati28800_t *ati = (ati28800_t *)p;
svga_recalctimings(&ati28800->svga); svga_recalctimings(&ati->svga);
} }
@@ -549,9 +580,10 @@ static void ati28800_add_status_info(char *s, int max_len, void *priv)
void ati28800k_add_status_info(char *s, int max_len, void *p) void ati28800k_add_status_info(char *s, int max_len, void *p)
{ {
char temps[128]; char temps[128];
ati28800_t *ati28800 = (ati28800_t *)p; ati28800_t *ati = (ati28800_t *)p;
sprintf(temps, "Korean SVGA mode enabled : %s\n\n", ati28800->ksc5601_mode_enabled ? "Yes" : "No"); sprintf(temps, "Korean SVGA mode enabled : %s\n\n",
ati->ksc5601_mode_enabled ? "Yes" : "No");
strncat(s, temps, max_len); strncat(s, temps, max_len);
ati28800_add_status_info(s, max_len, p); ati28800_add_status_info(s, max_len, p);
@@ -560,51 +592,51 @@ void ati28800k_add_status_info(char *s, int max_len, void *p)
static const device_config_t ati28800_config[] = static const device_config_t ati28800_config[] =
{ {
{ {
"memory", "Memory size", CONFIG_SELECTION, "", 512, "memory", "Memory size", CONFIG_SELECTION, "", 512,
{ {
{ {
"256 kB", 256 "256 kB", 256
}, },
{ {
"512 kB", 512 "512 kB", 512
}, },
{ {
"1024 kB", 1024 "1024 kB", 1024
}, },
{ {
"" ""
} }
} }
}, },
{ {
"", "", -1 "", "", -1
} }
}; };
#if defined(DEV_BRANCH) && defined(USE_XL24) #if defined(DEV_BRANCH) && defined(USE_XL24)
static const device_config_t ati28800_wonderxl_config[] = static const device_config_t ati28800_wonderxl_config[] =
{ {
{ {
"memory", "Memory size", CONFIG_SELECTION, "", 512, "memory", "Memory size", CONFIG_SELECTION, "", 512,
{ {
{ {
"256 kB", 256 "256 kB", 256
}, },
{ {
"512 kB", 512 "512 kB", 512
}, },
{ {
"1 MB", 1024 "1 MB", 1024
}, },
{ {
"" ""
} }
} }
}, },
{ {
"", "", -1 "", "", -1
} }
}; };
#endif #endif

File diff suppressed because it is too large Load Diff

View File

@@ -8,7 +8,7 @@
* *
* Handling of the emulated machines. * Handling of the emulated machines.
* *
* Version: @(#)machine.h 1.0.20 2018/04/25 * Version: @(#)machine.h 1.0.21 2018/06/14
* *
* Authors: Fred N. van Kempen, <decwiz@yahoo.com> * Authors: Fred N. van Kempen, <decwiz@yahoo.com>
* Miran Grca, <mgrca8@gmail.com> * Miran Grca, <mgrca8@gmail.com>
@@ -58,6 +58,7 @@
enum { enum {
ROM_IBMPC = 0, /* 301 keyboard error, 131 cassette (!!!) error */ ROM_IBMPC = 0, /* 301 keyboard error, 131 cassette (!!!) error */
ROM_AMIXT, /* XT Clone with AMI BIOS */ ROM_AMIXT, /* XT Clone with AMI BIOS */
ROM_AWDXT, /* XT Clone with Award BIOS */
ROM_DTKXT, ROM_DTKXT,
ROM_IBMXT, /* 301 keyboard error */ ROM_IBMXT, /* 301 keyboard error */
ROM_GENXT, /* 'Generic XT BIOS' */ ROM_GENXT, /* 'Generic XT BIOS' */

View File

@@ -11,7 +11,7 @@
* NOTES: OpenAT wip for 286-class machine with open BIOS. * NOTES: OpenAT wip for 286-class machine with open BIOS.
* PS2_M80-486 wip, pending receipt of TRM's for machine. * PS2_M80-486 wip, pending receipt of TRM's for machine.
* *
* Version: @(#)machine_table.c 1.0.22 2018/05/04 * Version: @(#)machine_table.c 1.0.23 2018/06/14
* *
* Authors: Fred N. van Kempen, <decwiz@yahoo.com> * Authors: Fred N. van Kempen, <decwiz@yahoo.com>
* Miran Grca, <mgrca8@gmail.com> * Miran Grca, <mgrca8@gmail.com>
@@ -59,6 +59,7 @@ const machine_t machines[] = {
{ "[8088] IBM XT", ROM_IBMXT, "ibm_xt", L"ibm/xt", {{"", cpus_8088}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, 0, MACHINE_ISA, 64, 640, 64, 0, machine_xt_init, &m_xt_device, NULL }, { "[8088] IBM XT", ROM_IBMXT, "ibm_xt", L"ibm/xt", {{"", cpus_8088}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, 0, MACHINE_ISA, 64, 640, 64, 0, machine_xt_init, &m_xt_device, NULL },
{ "[8088] OpenXT Generic Clone", ROM_GENXT, "open_xt", L"generic/open_xt", {{"", cpus_8088}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, 0, MACHINE_ISA, 64, 640, 64, 0, machine_xt_init, &m_xt_device, NULL }, { "[8088] OpenXT Generic Clone", ROM_GENXT, "open_xt", L"generic/open_xt", {{"", cpus_8088}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, 0, MACHINE_ISA, 64, 640, 64, 0, machine_xt_init, &m_xt_device, NULL },
{ "[8088] AMI XT clone", ROM_AMIXT, "ami_xt", L"generic/ami/xt", {{"", cpus_8088}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, 0, MACHINE_ISA, 64, 640, 64, 0, machine_xt_init, &m_xt_device, NULL }, { "[8088] AMI XT clone", ROM_AMIXT, "ami_xt", L"generic/ami/xt", {{"", cpus_8088}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, 0, MACHINE_ISA, 64, 640, 64, 0, machine_xt_init, &m_xt_device, NULL },
{ "[8088] Award XT clone", ROM_AWDXT, "awd_xt", L"generic/award/xt", {{"", cpus_8088}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, 0, MACHINE_ISA, 64, 640, 64, 0, machine_xt_init, &m_xt_device, NULL },
{ "[8088] Compaq Portable", ROM_PORTABLE, "compaq_portable", L"compaq/portable", {{"", cpus_8088}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, 0, MACHINE_ISA | MACHINE_VIDEO, 128, 640, 128, 0, machine_xt_compaq_init, NULL, NULL }, { "[8088] Compaq Portable", ROM_PORTABLE, "compaq_portable", L"compaq/portable", {{"", cpus_8088}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, 0, MACHINE_ISA | MACHINE_VIDEO, 128, 640, 128, 0, machine_xt_compaq_init, NULL, NULL },
{ "[8088] DTK XT clone", ROM_DTKXT, "dtk_xt", L"dtk/xt", {{"", cpus_8088}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, 0, MACHINE_ISA, 64, 640, 64, 0, machine_xt_init, &m_xt_device, NULL }, { "[8088] DTK XT clone", ROM_DTKXT, "dtk_xt", L"dtk/xt", {{"", cpus_8088}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, 0, MACHINE_ISA, 64, 640, 64, 0, machine_xt_init, &m_xt_device, NULL },
{ "[8088] Juko XT clone", ROM_JUKOPC, "juko_pc", L"juko/pc", {{"", cpus_8088}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, 0, MACHINE_ISA, 64, 640, 64, 0, machine_xt_init, NULL, NULL }, { "[8088] Juko XT clone", ROM_JUKOPC, "juko_pc", L"juko/pc", {{"", cpus_8088}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, 0, MACHINE_ISA, 64, 640, 64, 0, machine_xt_init, NULL, NULL },

View File

@@ -8,7 +8,7 @@
* *
* Main emulator module where most things are controlled. * Main emulator module where most things are controlled.
* *
* Version: @(#)pc.c 1.0.46 2018/05/26 * Version: @(#)pc.c 1.0.47 2018/06/10
* *
* Authors: Fred N. van Kempen, <decwiz@yahoo.com> * Authors: Fred N. van Kempen, <decwiz@yahoo.com>
* Miran Grca, <mgrca8@gmail.com> * Miran Grca, <mgrca8@gmail.com>
@@ -89,6 +89,9 @@
#include "plat.h" #include "plat.h"
#define PCLOG_BUFF_SIZE 8192 /* has to be big enough!! */
/* Commandline options. */ /* Commandline options. */
int dump_on_exit = 0; /* (O) dump regs on exit */ int dump_on_exit = 0; /* (O) dump regs on exit */
int do_dump_config = 0; /* (O) dump config on load */ int do_dump_config = 0; /* (O) dump config on load */
@@ -201,14 +204,18 @@ int64_t main_time;
* To avoid excessively-large logfiles because some * To avoid excessively-large logfiles because some
* module repeatedly logs, we keep track of what is * module repeatedly logs, we keep track of what is
* being logged, and catch repeating entries. * being logged, and catch repeating entries.
*
* Note: we need fairly large buffers here, to allow
* for the network code dumping packet content
* with this.
*/ */
void void
pclog_ex(const char *fmt, va_list ap) pclog_ex(const char *fmt, va_list ap)
{ {
#ifndef RELEASE_BUILD #ifndef RELEASE_BUILD
static char buff[1024]; static char buff[PCLOG_BUFF_SIZE];
static int seen = 0; static int seen = 0;
char temp[1024]; char temp[PCLOG_BUFF_SIZE];
if (stdlog == NULL) { if (stdlog == NULL) {
if (log_path[0] != L'\0') { if (log_path[0] != L'\0') {
@@ -306,9 +313,7 @@ fatal(const char *fmt, ...)
void void
pc_version(const char *platform) pc_version(const char *platform)
{ {
#if defined(BUILD) || defined(COMMIT) || defined(UPSTREAM) || defined(_MSC_VER)
char temp[128]; char temp[128];
#endif
sprintf(emu_title, "%s for %s", EMU_NAME, platform); sprintf(emu_title, "%s for %s", EMU_NAME, platform);
@@ -319,10 +324,16 @@ pc_version(const char *platform)
#endif #endif
strcpy(emu_fullversion, emu_version); strcpy(emu_fullversion, emu_version);
#ifdef _MSC_VER #if defined(_MSC_VER)
sprintf(temp, " [VC%d]", _MSC_VER); sprintf(temp, " [VC %d]", _MSC_VER);
strcat(emu_fullversion, temp); #elif defined(__clang_major__)
sprintf(temp, " [Clang %d.%d.%d]",
__clang_major__, __clang_minor__, __clang_patchlevel__);
#elif defined(__GNUC__)
sprintf(temp, " [GCC %d.%d.%d]",
__GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__);
#endif #endif
strcat(emu_fullversion, temp);
#ifdef BUILD #ifdef BUILD
sprintf(temp, " (Build %d", BUILD); sprintf(temp, " (Build %d", BUILD);

View File

@@ -17,7 +17,7 @@
* or to use a generic handler, and then pass it a pointer * or to use a generic handler, and then pass it a pointer
* to a command table. For now, we don't. * to a command table. For now, we don't.
* *
* Version: @(#)rom_load.c 1.0.11 2018/05/27 * Version: @(#)rom_load.c 1.0.12 2018/06/14
* *
* Author: Fred N. van Kempen, <decwiz@yahoo.com> * Author: Fred N. van Kempen, <decwiz@yahoo.com>
* *
@@ -471,5 +471,7 @@ rom_load_bios(romdef_t *r, const wchar_t *fn, int test_only)
i, r->total, biosmask); i, r->total, biosmask);
} }
if (! i) pclog("ROM: error in script '%ls'\n", script);
return(i); return(i);
} }

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -13,7 +13,7 @@
* it as the line-by-line base for the translated version, and * it as the line-by-line base for the translated version, and
* update fields as needed. * update fields as needed.
* *
* Version: @(#)VARCem-KZ.str 1.0.0 2018/06/10 * Version: @(#)VARCem-KZ.str 1.0.1 2018/06/10
* *
* Authors: Arbars Zagadkin, <arbars.zagadkin@mail.ru> * Authors: Arbars Zagadkin, <arbars.zagadkin@mail.ru>
* Fred N. van Kempen, <decwiz@yahoo.com> * Fred N. van Kempen, <decwiz@yahoo.com>
@@ -52,7 +52,7 @@
*/ */
/* Do not translate! */ /* Do not translate! */
#define TAG_VERSION 1,0,0 #define TAG_VERSION 1,0,1
#define TAG_AUTHOR "Arbars Zagadkin" #define TAG_AUTHOR "Arbars Zagadkin"
#define TAG_EMAIL "arbars.zagadkin@mail.ru" #define TAG_EMAIL "arbars.zagadkin@mail.ru"
@@ -128,9 +128,9 @@
/* UI: dialog: About (3200.) */ /* UI: dialog: About (3200.) */
#define STR_ABOUT "VARCem туралы..." #define STR_ABOUT "VARCem туралы..."
#define STR_3201 "Авторлар:" #define STR_3201 "Авторлар:"
#define STR_3202 "Fred N. van Kempen, Miran Grca, Sarah Walker, TheCollector1995, reenigne, John Elliott, greatpsycho, және тағы басқа." #define STR_3202 "Fred N. van Kempen, Miran Grca, Sarah Walker және тағы басқа.\nБағдарлама 86Box, PCem, MAME, DOSbox және Qemu алғашқы жазбахабардан негізделген"
#define STR_3203 "Бағдарлама 86Box, PCem, MAME, DOSbox және Qemu алғашқы жазбахабардан негізделген" #define STR_3203 "BSD 3 және GNU General Public License (2-ші немесе одан жоғары ңұсқасы) лицензиялар бойынша жарияланған."
#define STR_3204 "BSD 3 және GNU General Public License (2-ші немесе одан жоғары ңұсқасы) лицензиялар бойынша жарияланған. Мәліметтер LICENSE.txt файлда қараңыз" #define STR_3204 "Мәліметтер LICENSE.txt файлда қараңыз"
#define STR_LOCALIZE "Аударма" #define STR_LOCALIZE "Аударма"
#define STR_3211 "Анғылыштан басқа тілдерге аудармалар авторлар:" #define STR_3211 "Анғылыштан басқа тілдерге аудармалар авторлар:"
@@ -347,7 +347,7 @@
#define STR_4020 "Рендерер" #define STR_4020 "Рендерер"
/* Menu: View > Window Scale Factor */ /* Menu: View > Window Scale Factor */
#define STR_4030 Терезенің ауқығы" #define STR_4030 "Терезенің ауқығы"
#define STR_4031 "0.5x" #define STR_4031 "0.5x"
#define STR_4032 "1x" #define STR_4032 "1x"
#define STR_4033 "1.5x" #define STR_4033 "1.5x"

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

61
src/ui/lang/VARCem.lang Normal file
View File

@@ -0,0 +1,61 @@
#
# VARCem Virtual ARchaeological Computer EMulator.
# An emulator of (mostly) x86-based PC systems and devices,
# using the ISA,EISA,VLB,MCA and PCI system buses, roughly
# spanning the era between 1981 and 1995.
#
# This file is part of the VARCem Project.
#
# Supported Languages database.
#
# Version: @(#)VARCem.lang 1.0.1 2018/06/14
#
# Author: Fred N. van Kempen, <decwiz@yahoo.com>
#
# Copyright 2018 Fred N. van Kempen.
#
# Redistribution and use in source and binary forms, with
# or without modification, are permitted provided that the
# following conditions are met:
#
# 1. Redistributions of source code must retain the entire
# above notice, this list of conditions and the following
# disclaimer.
#
# 2. Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the
# following disclaimer in the documentation and/or other
# materials provided with the distribution.
#
# 3. Neither the name of the copyright holder nor the names
# of its contributors may be used to endorse or promote
# products derived from this software without specific
# prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
BY,0423,LANG_BELARUSIAN,SUBLANG_BELARUSIAN_BELARUS
CZ,0405,LANG_CZECH,SUBLANG_CZECH_CZECH_REPUBLIC
DE,0407,LANG_GERMAN,SUBLANG_GERMAN
DU,0413,LANG_DUTCH,SUBLANG_DUTCH
ES,040a,LANG_SPANISH,SUBLANG_SPANISH
FI,040b,LANG_FINNISH,SUBLANG_FINNISH_FINLAND
FR,040c,LANG_FRENCH,SUBLANG_FRENCH
IT,0410,LANG_ITALIAN,SUBLANG_ITALIAN
JP,0411,LANG_JAPANESE,SUBLANG_JAPANESE_JAPAN
KR,0412,LANG_KOREAN,SUBLANG_KOREAN
KZ,043f,LANG_KAZAK,SUBLANG_KAZAK_KAZAKHSTAN
LT,0427,LANG_LITHUANIAN,SUBLANG_LITHUANIAN_LITHUANIA
RU,0419,LANG_RUSSIAN,SUBLANG_RUSSIAN_RUSSIA
SL,0424,LANG_SLOVENIAN,SUBLANG_SLOVENIAN_SLOVENIA
UA,0422,LANG_UKRANIAN,SUBLANG_UKTRANIAN_UKRAINE

View File

@@ -8,7 +8,7 @@
* *
* Application resource script for Windows. * Application resource script for Windows.
* *
* Version: @(#)VARCem.rc 1.0.32 2018/06/02 * Version: @(#)VARCem.rc 1.0.33 2018/06/16
* *
* Author: Fred N. van Kempen, <decwiz@yahoo.com> * Author: Fred N. van Kempen, <decwiz@yahoo.com>
* *
@@ -245,6 +245,6 @@ VS_VERSION_INFO VERSIONINFO
END END
BLOCK "VarFileInfo" BLOCK "VarFileInfo"
BEGIN BEGIN
VALUE "Translation", 0x409, 1200 VALUE "Translation", 0x409, 65001
END END
END END

View File

@@ -1,332 +0,0 @@
/* zconf.h -- configuration of the zlib compression library
* Copyright (C) 1995-2005 Jean-loup Gailly.
* For conditions of distribution and use, see copyright notice in zlib.h
*/
/* @(#) $Id$ */
#ifndef ZCONF_H
#define ZCONF_H
/*
* If you *really* need a unique prefix for all types and library functions,
* compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
*/
#ifdef Z_PREFIX
# define deflateInit_ z_deflateInit_
# define deflate z_deflate
# define deflateEnd z_deflateEnd
# define inflateInit_ z_inflateInit_
# define inflate z_inflate
# define inflateEnd z_inflateEnd
# define deflateInit2_ z_deflateInit2_
# define deflateSetDictionary z_deflateSetDictionary
# define deflateCopy z_deflateCopy
# define deflateReset z_deflateReset
# define deflateParams z_deflateParams
# define deflateBound z_deflateBound
# define deflatePrime z_deflatePrime
# define inflateInit2_ z_inflateInit2_
# define inflateSetDictionary z_inflateSetDictionary
# define inflateSync z_inflateSync
# define inflateSyncPoint z_inflateSyncPoint
# define inflateCopy z_inflateCopy
# define inflateReset z_inflateReset
# define inflateBack z_inflateBack
# define inflateBackEnd z_inflateBackEnd
# define compress z_compress
# define compress2 z_compress2
# define compressBound z_compressBound
# define uncompress z_uncompress
# define adler32 z_adler32
# define crc32 z_crc32
# define get_crc_table z_get_crc_table
# define zError z_zError
# define alloc_func z_alloc_func
# define free_func z_free_func
# define in_func z_in_func
# define out_func z_out_func
# define Byte z_Byte
# define uInt z_uInt
# define uLong z_uLong
# define Bytef z_Bytef
# define charf z_charf
# define intf z_intf
# define uIntf z_uIntf
# define uLongf z_uLongf
# define voidpf z_voidpf
# define voidp z_voidp
#endif
#if defined(__MSDOS__) && !defined(MSDOS)
# define MSDOS
#endif
#if (defined(OS_2) || defined(__OS2__)) && !defined(OS2)
# define OS2
#endif
#if defined(_WINDOWS) && !defined(WINDOWS)
# define WINDOWS
#endif
#if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__)
# ifndef WIN32
# define WIN32
# endif
#endif
#if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32)
# if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__)
# ifndef SYS16BIT
# define SYS16BIT
# endif
# endif
#endif
/*
* Compile with -DMAXSEG_64K if the alloc function cannot allocate more
* than 64k bytes at a time (needed on systems with 16-bit int).
*/
#ifdef SYS16BIT
# define MAXSEG_64K
#endif
#ifdef MSDOS
# define UNALIGNED_OK
#endif
#ifdef __STDC_VERSION__
# ifndef STDC
# define STDC
# endif
# if __STDC_VERSION__ >= 199901L
# ifndef STDC99
# define STDC99
# endif
# endif
#endif
#if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus))
# define STDC
#endif
#if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__))
# define STDC
#endif
#if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32))
# define STDC
#endif
#if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__))
# define STDC
#endif
#if defined(__OS400__) && !defined(STDC) /* iSeries (formerly AS/400). */
# define STDC
#endif
#ifndef STDC
# ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
# define const /* note: need a more gentle solution here */
# endif
#endif
/* Some Mac compilers merge all .h files incorrectly: */
#if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__)
# define NO_DUMMY_DECL
#endif
/* Maximum value for memLevel in deflateInit2 */
#ifndef MAX_MEM_LEVEL
# ifdef MAXSEG_64K
# define MAX_MEM_LEVEL 8
# else
# define MAX_MEM_LEVEL 9
# endif
#endif
/* Maximum value for windowBits in deflateInit2 and inflateInit2.
* WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
* created by gzip. (Files created by minigzip can still be extracted by
* gzip.)
*/
#ifndef MAX_WBITS
# define MAX_WBITS 15 /* 32K LZ77 window */
#endif
/* The memory requirements for deflate are (in bytes):
(1 << (windowBits+2)) + (1 << (memLevel+9))
that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values)
plus a few kilobytes for small objects. For example, if you want to reduce
the default memory requirements from 256K to 128K, compile with
make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
Of course this will generally degrade compression (there's no free lunch).
The memory requirements for inflate are (in bytes) 1 << windowBits
that is, 32K for windowBits=15 (default value) plus a few kilobytes
for small objects.
*/
/* Type declarations */
#ifndef OF /* function prototypes */
# ifdef STDC
# define OF(args) args
# else
# define OF(args) ()
# endif
#endif
/* The following definitions for FAR are needed only for MSDOS mixed
* model programming (small or medium model with some far allocations).
* This was tested only with MSC; for other MSDOS compilers you may have
* to define NO_MEMCPY in zutil.h. If you don't need the mixed model,
* just define FAR to be empty.
*/
#ifdef SYS16BIT
# if defined(M_I86SM) || defined(M_I86MM)
/* MSC small or medium model */
# define SMALL_MEDIUM
# ifdef _MSC_VER
# define FAR _far
# else
# define FAR far
# endif
# endif
# if (defined(__SMALL__) || defined(__MEDIUM__))
/* Turbo C small or medium model */
# define SMALL_MEDIUM
# ifdef __BORLANDC__
# define FAR _far
# else
# define FAR far
# endif
# endif
#endif
#if defined(WINDOWS) || defined(WIN32)
/* If building or using zlib as a DLL, define ZLIB_DLL.
* This is not mandatory, but it offers a little performance increase.
*/
# ifdef ZLIB_DLL
# if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500))
# ifdef ZLIB_INTERNAL
# define ZEXTERN extern __declspec(dllexport)
# else
# define ZEXTERN extern __declspec(dllimport)
# endif
# endif
# endif /* ZLIB_DLL */
/* If building or using zlib with the WINAPI/WINAPIV calling convention,
* define ZLIB_WINAPI.
* Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI.
*/
# ifdef ZLIB_WINAPI
# ifdef FAR
# undef FAR
# endif
# include <windows.h>
/* No need for _export, use ZLIB.DEF instead. */
/* For complete Windows compatibility, use WINAPI, not __stdcall. */
# define ZEXPORT WINAPI
# ifdef WIN32
# define ZEXPORTVA WINAPIV
# else
# define ZEXPORTVA FAR CDECL
# endif
# endif
#endif
#if defined (__BEOS__)
# ifdef ZLIB_DLL
# ifdef ZLIB_INTERNAL
# define ZEXPORT __declspec(dllexport)
# define ZEXPORTVA __declspec(dllexport)
# else
# define ZEXPORT __declspec(dllimport)
# define ZEXPORTVA __declspec(dllimport)
# endif
# endif
#endif
#ifndef ZEXTERN
# define ZEXTERN extern
#endif
#ifndef ZEXPORT
# define ZEXPORT
#endif
#ifndef ZEXPORTVA
# define ZEXPORTVA
#endif
#ifndef FAR
# define FAR
#endif
#if !defined(__MACTYPES__)
typedef unsigned char Byte; /* 8 bits */
#endif
typedef unsigned int uInt; /* 16 bits or more */
typedef unsigned long uLong; /* 32 bits or more */
#ifdef SMALL_MEDIUM
/* Borland C/C++ and some old MSC versions ignore FAR inside typedef */
# define Bytef Byte FAR
#else
typedef Byte FAR Bytef;
#endif
typedef char FAR charf;
typedef int FAR intf;
typedef uInt FAR uIntf;
typedef uLong FAR uLongf;
#ifdef STDC
typedef void const *voidpc;
typedef void FAR *voidpf;
typedef void *voidp;
#else
typedef Byte const *voidpc;
typedef Byte FAR *voidpf;
typedef Byte *voidp;
#endif
#if 0 /* HAVE_UNISTD_H -- this line is updated by ./configure */
# include <sys/types.h> /* for off_t */
# include <unistd.h> /* for SEEK_* and off_t */
# ifdef VMS
# include <unixio.h> /* for off_t */
# endif
# define z_off_t off_t
#endif
#ifndef SEEK_SET
# define SEEK_SET 0 /* Seek from beginning of file. */
# define SEEK_CUR 1 /* Seek from current position. */
# define SEEK_END 2 /* Set file pointer to EOF plus "offset" */
#endif
#ifndef z_off_t
# define z_off_t long
#endif
#if defined(__OS400__)
# define NO_vsnprintf
#endif
#if defined(__MVS__)
# define NO_vsnprintf
# ifdef FAR
# undef FAR
# endif
#endif
/* MVS linker does not support external names larger than 8 bytes */
#if defined(__MVS__)
# pragma map(deflateInit_,"DEIN")
# pragma map(deflateInit2_,"DEIN2")
# pragma map(deflateEnd,"DEEND")
# pragma map(deflateBound,"DEBND")
# pragma map(inflateInit_,"ININ")
# pragma map(inflateInit2_,"ININ2")
# pragma map(inflateEnd,"INEND")
# pragma map(inflateSync,"INSY")
# pragma map(inflateSetDictionary,"INSEDI")
# pragma map(compressBound,"CMBND")
# pragma map(inflate_table,"INTABL")
# pragma map(inflate_fast,"INFA")
# pragma map(inflate_copyright,"INCOPY")
#endif
#endif /* ZCONF_H */

File diff suppressed because it is too large Load Diff

View File

@@ -13,8 +13,8 @@ Global
Release|x86 = Release|x86 Release|x86 = Release|x86
EndGlobalSection EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution GlobalSection(ProjectConfigurationPlatforms) = postSolution
{6E445F28-CA8F-430F-8CCF-C59C53516AC5}.Debug|x64.ActiveCfg = Debug|Win32 {6E445F28-CA8F-430F-8CCF-C59C53516AC5}.Debug|x64.ActiveCfg = Debug|x64
{6E445F28-CA8F-430F-8CCF-C59C53516AC5}.Debug|x64.Build.0 = Debug|Win32 {6E445F28-CA8F-430F-8CCF-C59C53516AC5}.Debug|x64.Build.0 = Debug|x64
{6E445F28-CA8F-430F-8CCF-C59C53516AC5}.Debug|x86.ActiveCfg = Debug|Win32 {6E445F28-CA8F-430F-8CCF-C59C53516AC5}.Debug|x86.ActiveCfg = Debug|Win32
{6E445F28-CA8F-430F-8CCF-C59C53516AC5}.Debug|x86.Build.0 = Debug|Win32 {6E445F28-CA8F-430F-8CCF-C59C53516AC5}.Debug|x86.Build.0 = Debug|Win32
{6E445F28-CA8F-430F-8CCF-C59C53516AC5}.Release|x64.ActiveCfg = Release|x64 {6E445F28-CA8F-430F-8CCF-C59C53516AC5}.Release|x64.ActiveCfg = Release|x64

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations"> <ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32"> <ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration> <Configuration>Debug</Configuration>
@@ -19,7 +19,7 @@
</ProjectConfiguration> </ProjectConfiguration>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClCompile Include="..\..\..\bugger.c" /> <ClCompile Include="..\..\..\devices\misc\bugger.c" />
<ClCompile Include="..\..\..\devices\cdrom\cdrom.c" /> <ClCompile Include="..\..\..\devices\cdrom\cdrom.c" />
<ClCompile Include="..\..\..\devices\cdrom\cdrom_dosbox.cpp" /> <ClCompile Include="..\..\..\devices\cdrom\cdrom_dosbox.cpp" />
<ClCompile Include="..\..\..\devices\cdrom\cdrom_image.cpp" /> <ClCompile Include="..\..\..\devices\cdrom\cdrom_image.cpp" />
@@ -43,256 +43,260 @@
<ClCompile Include="..\..\..\cpu\x86seg.c" /> <ClCompile Include="..\..\..\cpu\x86seg.c" />
<ClCompile Include="..\..\..\cpu\x87.c" /> <ClCompile Include="..\..\..\cpu\x87.c" />
<ClCompile Include="..\..\..\device.c" /> <ClCompile Include="..\..\..\device.c" />
<ClCompile Include="..\..\..\disk\hdc.c" /> <ClCompile Include="..\..\..\devices\disk\hdc.c" />
<ClCompile Include="..\..\..\disk\hdc_esdi_at.c" /> <ClCompile Include="..\..\..\devices\disk\hdc_esdi_at.c" />
<ClCompile Include="..\..\..\disk\hdc_esdi_mca.c" /> <ClCompile Include="..\..\..\devices\disk\hdc_esdi_mca.c" />
<ClCompile Include="..\..\..\disk\hdc_ide_ata.c" /> <ClCompile Include="..\..\..\devices\disk\hdc_ide_ata.c" />
<ClCompile Include="..\..\..\disk\hdc_ide_xta.c" /> <ClCompile Include="..\..\..\devices\disk\hdc_ide_xta.c" />
<ClCompile Include="..\..\..\disk\hdc_st506_at.c" /> <ClCompile Include="..\..\..\devices\disk\hdc_st506_at.c" />
<ClCompile Include="..\..\..\disk\hdc_st506_xt.c" /> <ClCompile Include="..\..\..\devices\disk\hdc_st506_xt.c" />
<ClCompile Include="..\..\..\disk\hdc_xtide.c" /> <ClCompile Include="..\..\..\devices\disk\hdc_xtide.c" />
<ClCompile Include="..\..\..\disk\hdd.c" /> <ClCompile Include="..\..\..\devices\disk\hdd.c" />
<ClCompile Include="..\..\..\disk\hdd_image.c" /> <ClCompile Include="..\..\..\devices\disk\hdd_image.c" />
<ClCompile Include="..\..\..\disk\hdd_table.c" /> <ClCompile Include="..\..\..\devices\disk\hdd_table.c" />
<ClCompile Include="..\..\..\disk\zip.c" /> <ClCompile Include="..\..\..\devices\disk\zip.c" />
<ClCompile Include="..\..\..\dma.c" /> <ClCompile Include="..\..\..\devices\network\slirp\bootp.c" />
<ClCompile Include="..\..\..\floppy\fdc.c" /> <ClCompile Include="..\..\..\devices\network\slirp\cksum.c" />
<ClCompile Include="..\..\..\floppy\fdd.c" /> <ClCompile Include="..\..\..\devices\network\slirp\debug.c" />
<ClCompile Include="..\..\..\floppy\fdd_86f.c" /> <ClCompile Include="..\..\..\devices\network\slirp\if.c" />
<ClCompile Include="..\..\..\floppy\fdd_common.c" /> <ClCompile Include="..\..\..\devices\network\slirp\ip_icmp.c" />
<ClCompile Include="..\..\..\floppy\fdd_fdi.c" /> <ClCompile Include="..\..\..\devices\network\slirp\ip_input.c" />
<ClCompile Include="..\..\..\floppy\fdd_imd.c" /> <ClCompile Include="..\..\..\devices\network\slirp\ip_output.c" />
<ClCompile Include="..\..\..\floppy\fdd_img.c" /> <ClCompile Include="..\..\..\devices\network\slirp\mbuf.c" />
<ClCompile Include="..\..\..\floppy\fdd_json.c" /> <ClCompile Include="..\..\..\devices\network\slirp\slirp_misc.c" />
<ClCompile Include="..\..\..\floppy\fdd_td0.c" /> <ClCompile Include="..\..\..\devices\network\slirp\queue.c" />
<ClCompile Include="..\..\..\floppy\fdi2raw.c" /> <ClCompile Include="..\..\..\devices\network\slirp\sbuf.c" />
<ClCompile Include="..\..\..\floppy\lzf\lzf_c.c" /> <ClCompile Include="..\..\..\devices\network\slirp\slirp.c" />
<ClCompile Include="..\..\..\floppy\lzf\lzf_d.c" /> <ClCompile Include="..\..\..\devices\network\slirp\socket.c" />
<ClCompile Include="..\..\..\i82335.c" /> <ClCompile Include="..\..\..\devices\network\slirp\tcp_input.c" />
<ClCompile Include="..\..\..\input\game\joystick.c" /> <ClCompile Include="..\..\..\devices\network\slirp\tcp_output.c" />
<ClCompile Include="..\..\..\input\game\js_ch_fs_pro.c" /> <ClCompile Include="..\..\..\devices\network\slirp\tcp_subr.c" />
<ClCompile Include="..\..\..\input\game\js_standard.c" /> <ClCompile Include="..\..\..\devices\network\slirp\tcp_timer.c" />
<ClCompile Include="..\..\..\input\game\js_sw_pad.c" /> <ClCompile Include="..\..\..\devices\network\slirp\udp.c" />
<ClCompile Include="..\..\..\input\game\js_tm_fcs.c" /> <ClCompile Include="..\..\..\devices\scsi\scsi.c" />
<ClCompile Include="..\..\..\input\keyboard.c" /> <ClCompile Include="..\..\..\devices\scsi\scsi_aha154x.c" />
<ClCompile Include="..\..\..\input\keyboard_at.c" /> <ClCompile Include="..\..\..\devices\scsi\scsi_bus.c" />
<ClCompile Include="..\..\..\input\keyboard_xt.c" /> <ClCompile Include="..\..\..\devices\scsi\scsi_buslogic.c" />
<ClCompile Include="..\..\..\input\mouse.c" /> <ClCompile Include="..\..\..\devices\scsi\scsi_device.c" />
<ClCompile Include="..\..\..\input\mouse_bus.c" /> <ClCompile Include="..\..\..\devices\scsi\scsi_disk.c" />
<ClCompile Include="..\..\..\input\mouse_ps2.c" /> <ClCompile Include="..\..\..\devices\scsi\scsi_ncr5380.c" />
<ClCompile Include="..\..\..\input\mouse_serial.c" /> <ClCompile Include="..\..\..\devices\scsi\scsi_ncr53c810.c" />
<ClCompile Include="..\..\..\intel.c" /> <ClCompile Include="..\..\..\devices\scsi\scsi_x54x.c" />
<ClCompile Include="..\..\..\intel_flash.c" /> <ClCompile Include="..\..\..\devices\sio\sio_detect.c" />
<ClCompile Include="..\..\..\intel_piix.c" /> <ClCompile Include="..\..\..\devices\sio\sio_fdc37c669.c" />
<ClCompile Include="..\..\..\intel_piix4.c" /> <ClCompile Include="..\..\..\devices\sio\sio_fdc37c66x.c" />
<ClCompile Include="..\..\..\intel_sio.c" /> <ClCompile Include="..\..\..\devices\sio\sio_fdc37c93x.c" />
<ClCompile Include="..\..\..\devices\sio\sio_pc87306.c" />
<ClCompile Include="..\..\..\devices\sio\sio_um8669f.c" />
<ClCompile Include="..\..\..\devices\sio\sio_w83877f.c" />
<ClCompile Include="..\..\..\devices\sound\dbopl.cpp" />
<ClCompile Include="..\..\..\devices\sound\midi.c" />
<ClCompile Include="..\..\..\devices\sound\midi_fluidsynth.c" />
<ClCompile Include="..\..\..\devices\sound\midi_mt32.c" />
<ClCompile Include="..\..\..\devices\sound\midi_system.c" />
<ClCompile Include="..\..\..\devices\sound\munt\Analog.cpp" />
<ClCompile Include="..\..\..\devices\sound\munt\BReverbModel.cpp" />
<ClCompile Include="..\..\..\devices\sound\munt\File.cpp" />
<ClCompile Include="..\..\..\devices\sound\munt\FileStream.cpp" />
<ClCompile Include="..\..\..\devices\sound\munt\LA32FloatWaveGenerator.cpp" />
<ClCompile Include="..\..\..\devices\sound\munt\LA32Ramp.cpp" />
<ClCompile Include="..\..\..\devices\sound\munt\LA32WaveGenerator.cpp" />
<ClCompile Include="..\..\..\devices\sound\munt\MidiStreamParser.cpp" />
<ClCompile Include="..\..\..\devices\sound\munt\Part.cpp" />
<ClCompile Include="..\..\..\devices\sound\munt\Partial.cpp" />
<ClCompile Include="..\..\..\devices\sound\munt\PartialManager.cpp" />
<ClCompile Include="..\..\..\devices\sound\munt\Poly.cpp" />
<ClCompile Include="..\..\..\devices\sound\munt\ROMInfo.cpp" />
<ClCompile Include="..\..\..\devices\sound\munt\SampleRateConverter_dummy.cpp" />
<ClCompile Include="..\..\..\devices\sound\munt\Synth.cpp" />
<ClCompile Include="..\..\..\devices\sound\munt\Tables.cpp" />
<ClCompile Include="..\..\..\devices\sound\munt\TVA.cpp" />
<ClCompile Include="..\..\..\devices\sound\munt\TVF.cpp" />
<ClCompile Include="..\..\..\devices\sound\munt\TVP.cpp" />
<ClCompile Include="..\..\..\devices\sound\nukedopl.cpp" />
<ClCompile Include="..\..\..\devices\sound\openal.c" />
<ClCompile Include="..\..\..\devices\sound\resid-fp\convolve-sse.cpp" />
<ClCompile Include="..\..\..\devices\sound\resid-fp\convolve.cpp" />
<ClCompile Include="..\..\..\devices\sound\resid-fp\envelope.cpp" />
<ClCompile Include="..\..\..\devices\sound\resid-fp\extfilt.cpp" />
<ClCompile Include="..\..\..\devices\sound\resid-fp\filter.cpp" />
<ClCompile Include="..\..\..\devices\sound\resid-fp\pot.cpp" />
<ClCompile Include="..\..\..\devices\sound\resid-fp\sid.cpp" />
<ClCompile Include="..\..\..\devices\sound\resid-fp\voice.cpp" />
<ClCompile Include="..\..\..\devices\sound\resid-fp\wave.cpp" />
<ClCompile Include="..\..\..\devices\sound\resid-fp\wave6581_PST.cpp" />
<ClCompile Include="..\..\..\devices\sound\resid-fp\wave6581_PS_.cpp" />
<ClCompile Include="..\..\..\devices\sound\resid-fp\wave6581_P_T.cpp" />
<ClCompile Include="..\..\..\devices\sound\resid-fp\wave6581__ST.cpp" />
<ClCompile Include="..\..\..\devices\sound\resid-fp\wave8580_PST.cpp" />
<ClCompile Include="..\..\..\devices\sound\resid-fp\wave8580_PS_.cpp" />
<ClCompile Include="..\..\..\devices\sound\resid-fp\wave8580_P_T.cpp" />
<ClCompile Include="..\..\..\devices\sound\resid-fp\wave8580__ST.cpp" />
<ClCompile Include="..\..\..\devices\sound\snd_ad1848.c" />
<ClCompile Include="..\..\..\devices\sound\snd_adlib.c" />
<ClCompile Include="..\..\..\devices\sound\snd_adlibgold.c" />
<ClCompile Include="..\..\..\devices\sound\snd_audiopci.c" />
<ClCompile Include="..\..\..\devices\sound\snd_cms.c" />
<ClCompile Include="..\..\..\devices\sound\snd_dbopl.cpp" />
<ClCompile Include="..\..\..\devices\sound\snd_emu8k.c" />
<ClCompile Include="..\..\..\devices\sound\snd_gus.c" />
<ClCompile Include="..\..\..\devices\sound\snd_lpt_dac.c" />
<ClCompile Include="..\..\..\devices\sound\snd_lpt_dss.c" />
<ClCompile Include="..\..\..\devices\sound\snd_mpu401.c" />
<ClCompile Include="..\..\..\devices\sound\snd_opl.c" />
<ClCompile Include="..\..\..\devices\sound\snd_pas16.c" />
<ClCompile Include="..\..\..\devices\sound\snd_resid.cpp" />
<ClCompile Include="..\..\..\devices\sound\snd_sb.c" />
<ClCompile Include="..\..\..\devices\sound\snd_sb_dsp.c" />
<ClCompile Include="..\..\..\devices\sound\snd_sn76489.c" />
<ClCompile Include="..\..\..\devices\sound\snd_speaker.c" />
<ClCompile Include="..\..\..\devices\sound\snd_ssi2001.c" />
<ClCompile Include="..\..\..\devices\sound\snd_wss.c" />
<ClCompile Include="..\..\..\devices\sound\snd_ym7128.c" />
<ClCompile Include="..\..\..\devices\sound\sound.c" />
<ClCompile Include="..\..\..\devices\sound\sound_dev.c" />
<ClCompile Include="..\..\..\devices\system\dma.c" />
<ClCompile Include="..\..\..\devices\system\i82335.c" />
<ClCompile Include="..\..\..\devices\system\intel.c" />
<ClCompile Include="..\..\..\devices\system\intel_flash.c" />
<ClCompile Include="..\..\..\devices\system\intel_piix.c" />
<ClCompile Include="..\..\..\devices\system\intel_piix4.c" />
<ClCompile Include="..\..\..\devices\system\intel_sio.c" />
<ClCompile Include="..\..\..\devices\system\mca.c" />
<ClCompile Include="..\..\..\devices\system\mcr.c" />
<ClCompile Include="..\..\..\devices\system\memregs.c" />
<ClCompile Include="..\..\..\devices\system\nmi.c" />
<ClCompile Include="..\..\..\devices\system\nvr_at.c" />
<ClCompile Include="..\..\..\devices\system\nvr_ps2.c" />
<ClCompile Include="..\..\..\devices\system\pci.c" />
<ClCompile Include="..\..\..\devices\system\pic.c" />
<ClCompile Include="..\..\..\devices\system\pit.c" />
<ClCompile Include="..\..\..\devices\system\ppi.c" />
<ClCompile Include="..\..\..\devices\floppy\fdc.c" />
<ClCompile Include="..\..\..\devices\floppy\fdd.c" />
<ClCompile Include="..\..\..\devices\floppy\fdd_86f.c" />
<ClCompile Include="..\..\..\devices\floppy\fdd_common.c" />
<ClCompile Include="..\..\..\devices\floppy\fdd_fdi.c" />
<ClCompile Include="..\..\..\devices\floppy\fdd_imd.c" />
<ClCompile Include="..\..\..\devices\floppy\fdd_img.c" />
<ClCompile Include="..\..\..\devices\floppy\fdd_json.c" />
<ClCompile Include="..\..\..\devices\floppy\fdd_td0.c" />
<ClCompile Include="..\..\..\devices\floppy\fdi2raw.c" />
<ClCompile Include="..\..\..\devices\floppy\lzf\lzf_c.c" />
<ClCompile Include="..\..\..\devices\floppy\lzf\lzf_d.c" />
<ClCompile Include="..\..\..\devices\input\game\joystick.c" />
<ClCompile Include="..\..\..\devices\input\game\js_ch_fs_pro.c" />
<ClCompile Include="..\..\..\devices\input\game\js_standard.c" />
<ClCompile Include="..\..\..\devices\input\game\js_sw_pad.c" />
<ClCompile Include="..\..\..\devices\input\game\js_tm_fcs.c" />
<ClCompile Include="..\..\..\devices\input\keyboard.c" />
<ClCompile Include="..\..\..\devices\input\keyboard_at.c" />
<ClCompile Include="..\..\..\devices\input\keyboard_xt.c" />
<ClCompile Include="..\..\..\devices\input\mouse.c" />
<ClCompile Include="..\..\..\devices\input\mouse_bus.c" />
<ClCompile Include="..\..\..\devices\input\mouse_ps2.c" />
<ClCompile Include="..\..\..\devices\input\mouse_serial.c" />
<ClCompile Include="..\..\..\devices\video\video_dev.c" />
<ClCompile Include="..\..\..\io.c" /> <ClCompile Include="..\..\..\io.c" />
<ClCompile Include="..\..\..\machine\machine.c" /> <ClCompile Include="..\..\..\machines\machine.c" />
<ClCompile Include="..\..\..\machine\machine_table.c" /> <ClCompile Include="..\..\..\machines\machine_table.c" />
<ClCompile Include="..\..\..\machine\m_amstrad.c" /> <ClCompile Include="..\..\..\machines\m_amstrad.c" />
<ClCompile Include="..\..\..\machine\m_at.c" /> <ClCompile Include="..\..\..\machines\m_at.c" />
<ClCompile Include="..\..\..\machine\m_at_430fx.c" /> <ClCompile Include="..\..\..\machines\m_at_430fx.c" />
<ClCompile Include="..\..\..\machine\m_at_430hx.c" /> <ClCompile Include="..\..\..\machines\m_at_430hx.c" />
<ClCompile Include="..\..\..\machine\m_at_430lx_nx.c" /> <ClCompile Include="..\..\..\machines\m_at_430lx_nx.c" />
<ClCompile Include="..\..\..\machine\m_at_430vx.c" /> <ClCompile Include="..\..\..\machines\m_at_430vx.c" />
<ClCompile Include="..\..\..\machine\m_at_440fx.c" /> <ClCompile Include="..\..\..\machines\m_at_440fx.c" />
<ClCompile Include="..\..\..\machine\m_at_4gpv31.c" /> <ClCompile Include="..\..\..\machines\m_at_4gpv31.c" />
<ClCompile Include="..\..\..\machine\m_at_ali1429.c" /> <ClCompile Include="..\..\..\machines\m_at_ali1429.c" />
<ClCompile Include="..\..\..\machine\m_at_commodore.c" /> <ClCompile Include="..\..\..\machines\m_at_commodore.c" />
<ClCompile Include="..\..\..\machine\m_at_compaq.c" /> <ClCompile Include="..\..\..\machines\m_at_compaq.c" />
<ClCompile Include="..\..\..\machine\m_at_headland.c" /> <ClCompile Include="..\..\..\machines\m_at_headland.c" />
<ClCompile Include="..\..\..\machine\m_at_neat.c" /> <ClCompile Include="..\..\..\machines\m_at_neat.c" />
<ClCompile Include="..\..\..\machine\m_at_opti495.c" /> <ClCompile Include="..\..\..\machines\m_at_opti495.c" />
<ClCompile Include="..\..\..\machine\m_at_scat.c" /> <ClCompile Include="..\..\..\machines\m_at_scat.c" />
<ClCompile Include="..\..\..\machine\m_at_sis_85c471.c" /> <ClCompile Include="..\..\..\machines\m_at_sis_85c471.c" />
<ClCompile Include="..\..\..\machine\m_at_sis_85c496.c" /> <ClCompile Include="..\..\..\machines\m_at_sis_85c496.c" />
<ClCompile Include="..\..\..\machine\m_at_sis_85c50x.c" /> <ClCompile Include="..\..\..\machines\m_at_sis_85c50x.c" />
<ClCompile Include="..\..\..\machine\m_at_t3100e.c" /> <ClCompile Include="..\..\..\machines\m_at_t3100e.c" />
<ClCompile Include="..\..\..\machine\m_at_t3100e_vid.c" /> <ClCompile Include="..\..\..\machines\m_at_t3100e_vid.c" />
<ClCompile Include="..\..\..\machine\m_at_wd76c10.c" /> <ClCompile Include="..\..\..\machines\m_at_wd76c10.c" />
<ClCompile Include="..\..\..\machine\m_europc.c" /> <ClCompile Include="..\..\..\machines\m_europc.c" />
<ClCompile Include="..\..\..\machine\m_olivetti_m24.c" /> <ClCompile Include="..\..\..\machines\m_olivetti_m24.c" />
<ClCompile Include="..\..\..\machine\m_pcjr.c" /> <ClCompile Include="..\..\..\machines\m_pcjr.c" />
<ClCompile Include="..\..\..\machine\m_ps1.c" /> <ClCompile Include="..\..\..\machines\m_ps1.c" />
<ClCompile Include="..\..\..\machine\m_ps1_hdc.c" /> <ClCompile Include="..\..\..\machines\m_ps1_hdc.c" />
<ClCompile Include="..\..\..\machine\m_ps2_isa.c" /> <ClCompile Include="..\..\..\machines\m_ps2_isa.c" />
<ClCompile Include="..\..\..\machine\m_ps2_mca.c" /> <ClCompile Include="..\..\..\machines\m_ps2_mca.c" />
<ClCompile Include="..\..\..\machine\m_tandy.c" /> <ClCompile Include="..\..\..\machines\m_tandy.c" />
<ClCompile Include="..\..\..\machine\m_xt.c" /> <ClCompile Include="..\..\..\machines\m_xt.c" />
<ClCompile Include="..\..\..\machine\m_xt_compaq.c" /> <ClCompile Include="..\..\..\machines\m_xt_compaq.c" />
<ClCompile Include="..\..\..\machine\m_xt_t1000.c" /> <ClCompile Include="..\..\..\machines\m_xt_laserxt.c" />
<ClCompile Include="..\..\..\machine\m_xt_t1000_vid.c" /> <ClCompile Include="..\..\..\machines\m_xt_t1000.c" />
<ClCompile Include="..\..\..\machine\m_xt_xi8088.c" /> <ClCompile Include="..\..\..\machines\m_xt_t1000_vid.c" />
<ClCompile Include="..\..\..\mca.c" /> <ClCompile Include="..\..\..\machines\m_xt_xi8088.c" />
<ClCompile Include="..\..\..\mcr.c" />
<ClCompile Include="..\..\..\mem.c" /> <ClCompile Include="..\..\..\mem.c" />
<ClCompile Include="..\..\..\memregs.c" /> <ClCompile Include="..\..\..\devices\network\network.c" />
<ClCompile Include="..\..\..\network\network.c" /> <ClCompile Include="..\..\..\devices\network\net_ne2000.c" />
<ClCompile Include="..\..\..\network\net_ne2000.c" /> <ClCompile Include="..\..\..\devices\network\net_pcap.c" />
<ClCompile Include="..\..\..\network\net_pcap.c" /> <ClCompile Include="..\..\..\devices\network\net_slirp.c" />
<ClCompile Include="..\..\..\network\net_slirp.c" /> <ClCompile Include="..\..\..\misc.c" />
<ClCompile Include="..\..\..\network\slirp\bootp.c" />
<ClCompile Include="..\..\..\network\slirp\cksum.c" />
<ClCompile Include="..\..\..\network\slirp\debug.c" />
<ClCompile Include="..\..\..\network\slirp\if.c" />
<ClCompile Include="..\..\..\network\slirp\ip_icmp.c" />
<ClCompile Include="..\..\..\network\slirp\ip_input.c" />
<ClCompile Include="..\..\..\network\slirp\ip_output.c" />
<ClCompile Include="..\..\..\network\slirp\mbuf.c" />
<ClCompile Include="..\..\..\network\slirp\misc.c" />
<ClCompile Include="..\..\..\network\slirp\queue.c" />
<ClCompile Include="..\..\..\network\slirp\sbuf.c" />
<ClCompile Include="..\..\..\network\slirp\slirp.c" />
<ClCompile Include="..\..\..\network\slirp\socket.c" />
<ClCompile Include="..\..\..\network\slirp\tcp_input.c" />
<ClCompile Include="..\..\..\network\slirp\tcp_output.c" />
<ClCompile Include="..\..\..\network\slirp\tcp_subr.c" />
<ClCompile Include="..\..\..\network\slirp\tcp_timer.c" />
<ClCompile Include="..\..\..\network\slirp\udp.c" />
<ClCompile Include="..\..\..\nmi.c" />
<ClCompile Include="..\..\..\nvr.c" /> <ClCompile Include="..\..\..\nvr.c" />
<ClCompile Include="..\..\..\nvr_at.c" />
<ClCompile Include="..\..\..\nvr_ps2.c" />
<ClCompile Include="..\..\..\pc.c" /> <ClCompile Include="..\..\..\pc.c" />
<ClCompile Include="..\..\..\pci.c" /> <ClCompile Include="..\..\..\devices\ports\game.c" />
<ClCompile Include="..\..\..\pic.c" /> <ClCompile Include="..\..\..\devices\ports\game_dev.c" />
<ClCompile Include="..\..\..\pit.c" /> <ClCompile Include="..\..\..\devices\ports\parallel.c" />
<ClCompile Include="..\..\..\ports\game.c" /> <ClCompile Include="..\..\..\devices\ports\parallel_dev.c" />
<ClCompile Include="..\..\..\ports\game_dev.c" /> <ClCompile Include="..\..\..\devices\ports\serial.c" />
<ClCompile Include="..\..\..\ports\parallel.c" />
<ClCompile Include="..\..\..\ports\parallel_dev.c" />
<ClCompile Include="..\..\..\ports\serial.c" />
<ClCompile Include="..\..\..\ppi.c" />
<ClCompile Include="..\..\..\random.c" /> <ClCompile Include="..\..\..\random.c" />
<ClCompile Include="..\..\..\rom.c" /> <ClCompile Include="..\..\..\rom.c" />
<ClCompile Include="..\..\..\rom_load.c" /> <ClCompile Include="..\..\..\rom_load.c" />
<ClCompile Include="..\..\..\scsi\scsi.c" /> <ClCompile Include="..\..\..\devices\sound\munt\c_interface\c_interface.cpp" />
<ClCompile Include="..\..\..\scsi\scsi_aha154x.c" /> <ClCompile Include="..\..\..\devices\sound\munt\sha1\sha1.cpp" />
<ClCompile Include="..\..\..\scsi\scsi_bus.c" />
<ClCompile Include="..\..\..\scsi\scsi_buslogic.c" />
<ClCompile Include="..\..\..\scsi\scsi_device.c" />
<ClCompile Include="..\..\..\scsi\scsi_disk.c" />
<ClCompile Include="..\..\..\scsi\scsi_ncr5380.c" />
<ClCompile Include="..\..\..\scsi\scsi_ncr53c810.c" />
<ClCompile Include="..\..\..\scsi\scsi_x54x.c" />
<ClCompile Include="..\..\..\sio\sio_detect.c" />
<ClCompile Include="..\..\..\sio\sio_fdc37c669.c" />
<ClCompile Include="..\..\..\sio\sio_fdc37c66x.c" />
<ClCompile Include="..\..\..\sio\sio_fdc37c93x.c" />
<ClCompile Include="..\..\..\sio\sio_pc87306.c" />
<ClCompile Include="..\..\..\sio\sio_um8669f.c" />
<ClCompile Include="..\..\..\sio\sio_w83877f.c" />
<ClCompile Include="..\..\..\sound\dbopl.cpp" />
<ClCompile Include="..\..\..\sound\midi.c" />
<ClCompile Include="..\..\..\sound\midi_mt32.c" />
<ClCompile Include="..\..\..\sound\midi_system.c" />
<ClCompile Include="..\..\..\sound\munt\Analog.cpp" />
<ClCompile Include="..\..\..\sound\munt\BReverbModel.cpp" />
<ClCompile Include="..\..\..\sound\munt\c_interface\c_interface.cpp" />
<ClCompile Include="..\..\..\sound\munt\File.cpp" />
<ClCompile Include="..\..\..\sound\munt\FileStream.cpp" />
<ClCompile Include="..\..\..\sound\munt\LA32FloatWaveGenerator.cpp" />
<ClCompile Include="..\..\..\sound\munt\LA32Ramp.cpp" />
<ClCompile Include="..\..\..\sound\munt\LA32WaveGenerator.cpp" />
<ClCompile Include="..\..\..\sound\munt\MidiStreamParser.cpp" />
<ClCompile Include="..\..\..\sound\munt\Part.cpp" />
<ClCompile Include="..\..\..\sound\munt\Partial.cpp" />
<ClCompile Include="..\..\..\sound\munt\PartialManager.cpp" />
<ClCompile Include="..\..\..\sound\munt\Poly.cpp" />
<ClCompile Include="..\..\..\sound\munt\ROMInfo.cpp" />
<ClCompile Include="..\..\..\sound\munt\SampleRateConverter_dummy.cpp" />
<ClCompile Include="..\..\..\sound\munt\sha1\sha1.cpp" />
<ClCompile Include="..\..\..\sound\munt\Synth.cpp" />
<ClCompile Include="..\..\..\sound\munt\Tables.cpp" />
<ClCompile Include="..\..\..\sound\munt\TVA.cpp" />
<ClCompile Include="..\..\..\sound\munt\TVF.cpp" />
<ClCompile Include="..\..\..\sound\munt\TVP.cpp" />
<ClCompile Include="..\..\..\sound\nukedopl.cpp" />
<ClCompile Include="..\..\..\sound\openal.c" />
<ClCompile Include="..\..\..\sound\resid-fp\convolve-sse.cpp" />
<ClCompile Include="..\..\..\sound\resid-fp\convolve.cpp" />
<ClCompile Include="..\..\..\sound\resid-fp\envelope.cpp" />
<ClCompile Include="..\..\..\sound\resid-fp\extfilt.cpp" />
<ClCompile Include="..\..\..\sound\resid-fp\filter.cpp" />
<ClCompile Include="..\..\..\sound\resid-fp\pot.cpp" />
<ClCompile Include="..\..\..\sound\resid-fp\sid.cpp" />
<ClCompile Include="..\..\..\sound\resid-fp\voice.cpp" />
<ClCompile Include="..\..\..\sound\resid-fp\wave.cpp" />
<ClCompile Include="..\..\..\sound\resid-fp\wave6581_PST.cpp" />
<ClCompile Include="..\..\..\sound\resid-fp\wave6581_PS_.cpp" />
<ClCompile Include="..\..\..\sound\resid-fp\wave6581_P_T.cpp" />
<ClCompile Include="..\..\..\sound\resid-fp\wave6581__ST.cpp" />
<ClCompile Include="..\..\..\sound\resid-fp\wave8580_PST.cpp" />
<ClCompile Include="..\..\..\sound\resid-fp\wave8580_PS_.cpp" />
<ClCompile Include="..\..\..\sound\resid-fp\wave8580_P_T.cpp" />
<ClCompile Include="..\..\..\sound\resid-fp\wave8580__ST.cpp" />
<ClCompile Include="..\..\..\sound\snd_ad1848.c" />
<ClCompile Include="..\..\..\sound\snd_adlib.c" />
<ClCompile Include="..\..\..\sound\snd_adlibgold.c" />
<ClCompile Include="..\..\..\sound\snd_audiopci.c" />
<ClCompile Include="..\..\..\sound\snd_cms.c" />
<ClCompile Include="..\..\..\sound\snd_dbopl.cpp" />
<ClCompile Include="..\..\..\sound\snd_emu8k.c" />
<ClCompile Include="..\..\..\sound\snd_gus.c" />
<ClCompile Include="..\..\..\sound\snd_lpt_dac.c" />
<ClCompile Include="..\..\..\sound\snd_lpt_dss.c" />
<ClCompile Include="..\..\..\sound\snd_mpu401.c" />
<ClCompile Include="..\..\..\sound\snd_opl.c" />
<ClCompile Include="..\..\..\sound\snd_pas16.c" />
<ClCompile Include="..\..\..\sound\snd_resid.cpp" />
<ClCompile Include="..\..\..\sound\snd_sb.c" />
<ClCompile Include="..\..\..\sound\snd_sb_dsp.c" />
<ClCompile Include="..\..\..\sound\snd_sn76489.c" />
<ClCompile Include="..\..\..\sound\snd_speaker.c" />
<ClCompile Include="..\..\..\sound\snd_ssi2001.c" />
<ClCompile Include="..\..\..\sound\snd_wss.c" />
<ClCompile Include="..\..\..\sound\snd_ym7128.c" />
<ClCompile Include="..\..\..\sound\sound.c" />
<ClCompile Include="..\..\..\sound\sound_dev.c" />
<ClCompile Include="..\..\..\timer.c" /> <ClCompile Include="..\..\..\timer.c" />
<ClCompile Include="..\..\..\ui\ui_main.c" /> <ClCompile Include="..\..\..\ui\ui_main.c" />
<ClCompile Include="..\..\..\ui\ui_new_floppy.c" /> <ClCompile Include="..\..\..\ui\ui_new_image.c" />
<ClCompile Include="..\..\..\ui\ui_stbar.c" /> <ClCompile Include="..\..\..\ui\ui_stbar.c" />
<ClCompile Include="..\..\..\video\video.c" /> <ClCompile Include="..\..\..\devices\video\video.c" />
<ClCompile Include="..\..\..\video\video_dev.c" /> <ClCompile Include="..\..\..\devices\video\vid_ati18800.c" />
<ClCompile Include="..\..\..\video\vid_ati18800.c" /> <ClCompile Include="..\..\..\devices\video\vid_ati28800.c" />
<ClCompile Include="..\..\..\video\vid_ati28800.c" /> <ClCompile Include="..\..\..\devices\video\vid_ati68860_ramdac.c" />
<ClCompile Include="..\..\..\video\vid_ati68860_ramdac.c" /> <ClCompile Include="..\..\..\devices\video\vid_ati_eeprom.c" />
<ClCompile Include="..\..\..\video\vid_ati_eeprom.c" /> <ClCompile Include="..\..\..\devices\video\vid_ati_mach64.c" />
<ClCompile Include="..\..\..\video\vid_ati_mach64.c" /> <ClCompile Include="..\..\..\devices\video\vid_bt485_ramdac.c" />
<ClCompile Include="..\..\..\video\vid_bt485_ramdac.c" /> <ClCompile Include="..\..\..\devices\video\vid_cga.c" />
<ClCompile Include="..\..\..\video\vid_cga.c" /> <ClCompile Include="..\..\..\devices\video\vid_cga_comp.c" />
<ClCompile Include="..\..\..\video\vid_cga_comp.c" /> <ClCompile Include="..\..\..\devices\video\vid_cl54xx.c" />
<ClCompile Include="..\..\..\video\vid_cl54xx.c" /> <ClCompile Include="..\..\..\devices\video\vid_colorplus.c" />
<ClCompile Include="..\..\..\video\vid_colorplus.c" /> <ClCompile Include="..\..\..\devices\video\vid_compaq_cga.c" />
<ClCompile Include="..\..\..\video\vid_compaq_cga.c" /> <ClCompile Include="..\..\..\devices\video\vid_ega.c" />
<ClCompile Include="..\..\..\video\vid_ega.c" /> <ClCompile Include="..\..\..\devices\video\vid_ega_render.c" />
<ClCompile Include="..\..\..\video\vid_ega_render.c" /> <ClCompile Include="..\..\..\devices\video\vid_et4000.c" />
<ClCompile Include="..\..\..\video\vid_et4000.c" /> <ClCompile Include="..\..\..\devices\video\vid_et4000w32.c" />
<ClCompile Include="..\..\..\video\vid_et4000w32.c" /> <ClCompile Include="..\..\..\devices\video\vid_genius.c" />
<ClCompile Include="..\..\..\video\vid_genius.c" /> <ClCompile Include="..\..\..\devices\video\vid_hercules.c" />
<ClCompile Include="..\..\..\video\vid_hercules.c" /> <ClCompile Include="..\..\..\devices\video\vid_herculesplus.c" />
<ClCompile Include="..\..\..\video\vid_herculesplus.c" /> <ClCompile Include="..\..\..\devices\video\vid_icd2061.c" />
<ClCompile Include="..\..\..\video\vid_icd2061.c" /> <ClCompile Include="..\..\..\devices\video\vid_ics2595.c" />
<ClCompile Include="..\..\..\video\vid_ics2595.c" /> <ClCompile Include="..\..\..\devices\video\vid_incolor.c" />
<ClCompile Include="..\..\..\video\vid_incolor.c" /> <ClCompile Include="..\..\..\devices\video\vid_mda.c" />
<ClCompile Include="..\..\..\video\vid_mda.c" /> <ClCompile Include="..\..\..\devices\video\vid_oak_oti.c" />
<ClCompile Include="..\..\..\video\vid_oak_oti.c" /> <ClCompile Include="..\..\..\devices\video\vid_paradise.c" />
<ClCompile Include="..\..\..\video\vid_paradise.c" /> <ClCompile Include="..\..\..\devices\video\vid_s3.c" />
<ClCompile Include="..\..\..\video\vid_s3.c" /> <ClCompile Include="..\..\..\devices\video\vid_s3_virge.c" />
<ClCompile Include="..\..\..\video\vid_s3_virge.c" /> <ClCompile Include="..\..\..\devices\video\vid_sc1502x_ramdac.c" />
<ClCompile Include="..\..\..\video\vid_sc1502x_ramdac.c" /> <ClCompile Include="..\..\..\devices\video\vid_sdac_ramdac.c" />
<ClCompile Include="..\..\..\video\vid_sdac_ramdac.c" /> <ClCompile Include="..\..\..\devices\video\vid_stg_ramdac.c" />
<ClCompile Include="..\..\..\video\vid_stg_ramdac.c" /> <ClCompile Include="..\..\..\devices\video\vid_svga.c" />
<ClCompile Include="..\..\..\video\vid_svga.c" /> <ClCompile Include="..\..\..\devices\video\vid_svga_render.c" />
<ClCompile Include="..\..\..\video\vid_svga_render.c" /> <ClCompile Include="..\..\..\devices\video\vid_tgui9440.c" />
<ClCompile Include="..\..\..\video\vid_tgui9440.c" /> <ClCompile Include="..\..\..\devices\video\vid_ti_cf62011.c" />
<ClCompile Include="..\..\..\video\vid_ti_cf62011.c" /> <ClCompile Include="..\..\..\devices\video\vid_tkd8001_ramdac.c" />
<ClCompile Include="..\..\..\video\vid_tkd8001_ramdac.c" /> <ClCompile Include="..\..\..\devices\video\vid_tvga.c" />
<ClCompile Include="..\..\..\video\vid_tvga.c" /> <ClCompile Include="..\..\..\devices\video\vid_vga.c" />
<ClCompile Include="..\..\..\video\vid_vga.c" /> <ClCompile Include="..\..\..\devices\video\vid_voodoo.c" />
<ClCompile Include="..\..\..\video\vid_voodoo.c" /> <ClCompile Include="..\..\..\devices\video\vid_wy700.c" />
<ClCompile Include="..\..\..\video\vid_wy700.c" /> <ClCompile Include="..\..\..\ui\ui_vidapi.c" />
<ClCompile Include="..\..\..\win\win.c" /> <ClCompile Include="..\..\..\win\win.c" />
<ClCompile Include="..\..\..\win\win_about.c" /> <ClCompile Include="..\..\..\win\win_about.c" />
<ClCompile Include="..\..\..\win\win_cdrom.c" /> <ClCompile Include="..\..\..\win\win_cdrom.c" />
@@ -307,16 +311,18 @@
<ClCompile Include="..\..\..\win\win_keyboard.c" /> <ClCompile Include="..\..\..\win\win_keyboard.c" />
<ClCompile Include="..\..\..\win\win_midi.c" /> <ClCompile Include="..\..\..\win\win_midi.c" />
<ClCompile Include="..\..\..\win\win_mouse.cpp" /> <ClCompile Include="..\..\..\win\win_mouse.cpp" />
<ClCompile Include="..\..\..\win\win_new_floppy.c" />
<ClCompile Include="..\..\..\win\win_opendir.c" /> <ClCompile Include="..\..\..\win\win_opendir.c" />
<ClCompile Include="..\..\..\win\win_settings.c" /> <ClCompile Include="..\..\..\win\win_settings.c" />
<ClCompile Include="..\..\..\win\win_snd_gain.c" /> <ClCompile Include="..\..\..\win\win_snd_gain.c" />
<ClCompile Include="..\..\..\win\win_status.c" /> <ClCompile Include="..\..\..\win\win_status.c" />
<ClCompile Include="..\..\..\win\win_thread.c" /> <ClCompile Include="..\..\..\win\win_thread.c" />
<ClCompile Include="..\..\..\win\win_ui.c" /> <ClCompile Include="..\..\..\win\win_ui.c" />
<ClCompile Include="..\..\win_lang.c" />
<ClCompile Include="..\..\win_new_image.c" />
<ClCompile Include="..\..\win_sdl.c" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClInclude Include="..\..\..\bugger.h" /> <ClInclude Include="..\..\..\devices\misc\bugger.h" />
<ClInclude Include="..\..\..\devices\cdrom\cdrom.h" /> <ClInclude Include="..\..\..\devices\cdrom\cdrom.h" />
<ClInclude Include="..\..\..\devices\cdrom\cdrom_dosbox.h" /> <ClInclude Include="..\..\..\devices\cdrom\cdrom_dosbox.h" />
<ClInclude Include="..\..\..\devices\cdrom\cdrom_image.h" /> <ClInclude Include="..\..\..\devices\cdrom\cdrom_image.h" />
@@ -562,18 +568,54 @@
<ClInclude Include="..\..\..\win\plat_dir.h" /> <ClInclude Include="..\..\..\win\plat_dir.h" />
<ClInclude Include="..\..\..\win\resource.h" /> <ClInclude Include="..\..\..\win\resource.h" />
<ClInclude Include="..\..\..\win\win.h" /> <ClInclude Include="..\..\..\win\win.h" />
<ClInclude Include="..\..\..\win\win_d3d.h" /> <ClInclude Include="..\..\win_opendir.h" />
<ClInclude Include="..\..\..\win\win_ddraw.h" /> <ClInclude Include="..\..\win_sdl.h" />
<ClInclude Include="..\..\win_settings_disk.h" />
<ClInclude Include="..\..\win_settings_floppy.h" />
<ClInclude Include="..\..\win_settings_input.h" />
<ClInclude Include="..\..\win_settings_machine.h" />
<ClInclude Include="..\..\win_settings_network.h" />
<ClInclude Include="..\..\win_settings_periph.h" />
<ClInclude Include="..\..\win_settings_ports.h" />
<ClInclude Include="..\..\win_settings_remov.h" />
<ClInclude Include="..\..\win_settings_sound.h" />
<ClInclude Include="..\..\win_settings_video.h" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ResourceCompile Include="..\..\VARCem.rc" /> <ResourceCompile Include="..\..\VARCem.rc">
<ShowProgress Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ShowProgress>
<ShowProgress Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ShowProgress>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">_MSC_VER</PreprocessorDefinitions>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">_MSC_VER</PreprocessorDefinitions>
</ResourceCompile>
</ItemGroup>
<ItemGroup>
<CustomBuild Include="..\..\VARCem.mpp">
<FileType>Document</FileType>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating Manifest file...</Message>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Generating Manifest file...</Message>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Generating Manifest file...</Message>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Generating Manifest file...</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">VARCem.manifest</Outputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">VARCem.manifest</Outputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">VARCem.manifest</Outputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">VARCem.manifest</Outputs>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">VARCem.rc</AdditionalInputs>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">VARCem.rc</AdditionalInputs>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">VARCem.rc</AdditionalInputs>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">VARCem.rc</AdditionalInputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">cl -nologo -EP %(FullPath) &gt; $(SolutionDir)..\..\%(Outputs)</Command>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">cl -nologo -EP %(FullPath) &gt; $(SolutionDir)..\..\%(Outputs)</Command>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">cl -nologo -EP %(FullPath) &gt; $(SolutionDir)..\..\%(Outputs)</Command>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">cl -nologo -EP %(FullPath) &gt; $(SolutionDir)..\..\%(Outputs)</Command>
</CustomBuild>
</ItemGroup> </ItemGroup>
<PropertyGroup Label="Globals"> <PropertyGroup Label="Globals">
<VCProjectVersion>15.0</VCProjectVersion> <VCProjectVersion>14.0</VCProjectVersion>
<ProjectGuid>{6E445F28-CA8F-430F-8CCF-C59C53516AC5}</ProjectGuid> <ProjectGuid>{6E445F28-CA8F-430F-8CCF-C59C53516AC5}</ProjectGuid>
<Keyword>Win32Proj</Keyword> <Keyword>Win32Proj</Keyword>
<RootNamespace>VARCem</RootNamespace> <RootNamespace>VARCem</RootNamespace>
<WindowsTargetPlatformVersion>10.0.10586.0</WindowsTargetPlatformVersion> <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
</PropertyGroup> </PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
@@ -627,20 +669,22 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental> <LinkIncremental>true</LinkIncremental>
<LibraryPath>$(ProjectDir)\..\Lib\x86;$(VC_LibraryPath_x86);$(WindowsSDK_LibraryPath_x86)</LibraryPath> <LibraryPath>$(ProjectDir)\..\Lib\x86;$(VC_LibraryPath_x86);$(WindowsSDK_LibraryPath_x86)</LibraryPath>
<GenerateManifest>false</GenerateManifest>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental> <LinkIncremental>true</LinkIncremental>
<GenerateManifest>false</GenerateManifest>
<LibraryPath>$(ProjectDir)\..\Lib\x64;$(VC_LibraryPath_x64);$(WindowsSDK_LibraryPath_x64)</LibraryPath> <LibraryPath>$(ProjectDir)\..\Lib\x64;$(VC_LibraryPath_x64);$(WindowsSDK_LibraryPath_x64)</LibraryPath>
<GenerateManifest>false</GenerateManifest>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental> <LinkIncremental>false</LinkIncremental>
<LibraryPath>$(ProjectDir)\..\Lib\x86;$(VC_LibraryPath_x86);$(WindowsSDK_LibraryPath_x86)</LibraryPath> <LibraryPath>$(ProjectDir)\..\Lib\x86;$(VC_LibraryPath_x86);$(WindowsSDK_LibraryPath_x86)</LibraryPath>
<GenerateManifest>false</GenerateManifest>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental> <LinkIncremental>false</LinkIncremental>
<GenerateManifest>false</GenerateManifest>
<LibraryPath>$(ProjectDir)\..\Lib\x64;$(VC_LibraryPath_x64);$(WindowsSDK_LibraryPath_x64)</LibraryPath> <LibraryPath>$(ProjectDir)\..\Lib\x64;$(VC_LibraryPath_x64);$(WindowsSDK_LibraryPath_x64)</LibraryPath>
<GenerateManifest>false</GenerateManifest>
</PropertyGroup> </PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile> <ClCompile>
@@ -649,12 +693,11 @@
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<SDLCheck>true</SDLCheck> <SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile> </ClCompile>
<Link> <Link>
<SubSystem>Windows</SubSystem> <SubSystem>Windows</SubSystem>
<GenerateDebugInformation>Debug</GenerateDebugInformation> <GenerateDebugInformation>Debug</GenerateDebugInformation>
<AdditionalDependencies>winmm.lib;ws2_32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;iphlpapi.lib;psapi.lib;Comctl32.lib;DInput8.lib;d3d9.lib;d3dx9.lib;ddraw.lib;dxguid.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>winmm.lib;ws2_32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;iphlpapi.lib;psapi.lib;Comctl32.lib;DInput8.lib;d3d9.lib;d3dx9.lib;ddraw.lib;dxguid.lib;version.lib;%(AdditionalDependencies)</AdditionalDependencies>
<MinimumRequiredVersion>5.01</MinimumRequiredVersion> <MinimumRequiredVersion>5.01</MinimumRequiredVersion>
</Link> </Link>
<ResourceCompile> <ResourceCompile>
@@ -669,12 +712,11 @@
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<SDLCheck>true</SDLCheck> <SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile> </ClCompile>
<Link> <Link>
<SubSystem>Windows</SubSystem> <SubSystem>Windows</SubSystem>
<GenerateDebugInformation>Debug</GenerateDebugInformation> <GenerateDebugInformation>Debug</GenerateDebugInformation>
<AdditionalDependencies>winmm.lib;ws2_32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;iphlpapi.lib;psapi.lib;Comctl32.lib;DInput8.lib;d3d9.lib;d3dx9.lib;ddraw.lib;dxguid.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>winmm.lib;ws2_32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;iphlpapi.lib;psapi.lib;Comctl32.lib;DInput8.lib;d3d9.lib;d3dx9.lib;ddraw.lib;dxguid.lib;version.lib;%(AdditionalDependencies)</AdditionalDependencies>
<MinimumRequiredVersion>5.01</MinimumRequiredVersion> <MinimumRequiredVersion>5.01</MinimumRequiredVersion>
</Link> </Link>
<ResourceCompile> <ResourceCompile>
@@ -690,14 +732,13 @@
<IntrinsicFunctions>true</IntrinsicFunctions> <IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck> <SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile> </ClCompile>
<Link> <Link>
<SubSystem>Windows</SubSystem> <SubSystem>Windows</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding> <EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences> <OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>Debug</GenerateDebugInformation> <GenerateDebugInformation>Debug</GenerateDebugInformation>
<AdditionalDependencies>winmm.lib;ws2_32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;iphlpapi.lib;psapi.lib;Comctl32.lib;DInput8.lib;d3d9.lib;d3dx9.lib;ddraw.lib;dxguid.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>winmm.lib;ws2_32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;iphlpapi.lib;psapi.lib;Comctl32.lib;DInput8.lib;d3d9.lib;d3dx9.lib;ddraw.lib;dxguid.lib;version.lib;%(AdditionalDependencies)</AdditionalDependencies>
<MinimumRequiredVersion>5.01</MinimumRequiredVersion> <MinimumRequiredVersion>5.01</MinimumRequiredVersion>
</Link> </Link>
<ResourceCompile> <ResourceCompile>
@@ -714,14 +755,13 @@
<IntrinsicFunctions>true</IntrinsicFunctions> <IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck> <SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile> </ClCompile>
<Link> <Link>
<SubSystem>Windows</SubSystem> <SubSystem>Windows</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding> <EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences> <OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>Debug</GenerateDebugInformation> <GenerateDebugInformation>Debug</GenerateDebugInformation>
<AdditionalDependencies>winmm.lib;ws2_32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;iphlpapi.lib;psapi.lib;Comctl32.lib;DInput8.lib;d3d9.lib;d3dx9.lib;ddraw.lib;dxguid.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>winmm.lib;ws2_32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;iphlpapi.lib;psapi.lib;Comctl32.lib;DInput8.lib;d3d9.lib;d3dx9.lib;ddraw.lib;dxguid.lib;version.lib;%(AdditionalDependencies)</AdditionalDependencies>
<MinimumRequiredVersion>5.01</MinimumRequiredVersion> <MinimumRequiredVersion>5.01</MinimumRequiredVersion>
</Link> </Link>
<ResourceCompile> <ResourceCompile>

File diff suppressed because it is too large Load Diff

View File

@@ -1,4 +1,19 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup /> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LocalDebuggerCommandArguments>-L varcem.log</LocalDebuggerCommandArguments>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LocalDebuggerCommandArguments>-L varcem.log</LocalDebuggerCommandArguments>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LocalDebuggerCommandArguments>-L varcem.log</LocalDebuggerCommandArguments>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LocalDebuggerCommandArguments>-L varcem.log</LocalDebuggerCommandArguments>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
</Project> </Project>

View File

@@ -3,11 +3,11 @@
<ImportGroup Label="PropertySheets" /> <ImportGroup Label="PropertySheets" />
<PropertyGroup Label="UserMacros" /> <PropertyGroup Label="UserMacros" />
<PropertyGroup> <PropertyGroup>
<IncludePath>$(ProjectDir)\..\Include;$(ProjectDir)\..\..\mingw\include;$(ProjectDir)\..\..\mingw\include\pcap;$(IncludePath)</IncludePath> <IncludePath>$(ProjectDir)\..\Include;$(ProjectDir)\..\..\mingw\include;$(ProjectDir)\..\..\mingw\include\pcap;P:\SDL\include\msvc;$(IncludePath)</IncludePath>
</PropertyGroup> </PropertyGroup>
<ItemDefinitionGroup> <ItemDefinitionGroup>
<ClCompile> <ClCompile>
<PreprocessorDefinitions>_USE_MATH_DEFINES;_CRT_NONSTDC_NO_DEPRECATE;_WINSOCK_DEPRECATED_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;USE_DYNAREC;USE_OPENAL</PreprocessorDefinitions> <PreprocessorDefinitions>_USE_MATH_DEFINES;_CRT_NONSTDC_NO_DEPRECATE;_WINSOCK_DEPRECATED_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;USE_DYNAREC;USE_OPENAL;USE_SDL</PreprocessorDefinitions>
</ClCompile> </ClCompile>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemGroup /> <ItemGroup />

View File

@@ -8,15 +8,12 @@
* *
* Rendering module for Microsoft DirectDraw 9. * Rendering module for Microsoft DirectDraw 9.
* *
* NOTES: This code should be re-merged into a single init() with a
* 'fullscreen' argument, indicating FS mode is requested.
*
* If configured with USE_LIBPNG, we try to load the external * If configured with USE_LIBPNG, we try to load the external
* PNG library and use that if found. Otherwise, we fall back * PNG library and use that if found. Otherwise, we fall back
* the original mode, which uses the Windows/DDraw built-in BMP * the original mode, which uses the Windows/DDraw built-in BMP
* format. * format.
* *
* Version: @(#)win_ddraw.cpp 1.0.13 2018/05/24 * Version: @(#)win_ddraw.cpp 1.0.15 2018/06/11
* *
* Authors: Fred N. van Kempen, <decwiz@yahoo.com> * Authors: Fred N. van Kempen, <decwiz@yahoo.com>
* Miran Grca, <mgrca8@gmail.com> * Miran Grca, <mgrca8@gmail.com>
@@ -91,6 +88,8 @@ png_structp (*PNG_create_write_struct)(png_const_charp user_png_ver,
png_voidp error_ptr, png_voidp error_ptr,
png_error_ptr error_fn, png_error_ptr error_fn,
png_error_ptr warn_fn); png_error_ptr warn_fn);
void (*PNG_destroy_write_struct)(png_structpp png_ptr_ptr,
png_infopp info_ptr_ptr);
png_infop (*PNG_create_info_struct)(png_const_structrp png_ptr); png_infop (*PNG_create_info_struct)(png_const_structrp png_ptr);
void (*PNG_init_io)(png_structrp png_ptr, png_FILE_p fp); void (*PNG_init_io)(png_structrp png_ptr, png_FILE_p fp);
void (*PNG_set_IHDR)(png_const_structrp png_ptr, void (*PNG_set_IHDR)(png_const_structrp png_ptr,
@@ -112,6 +111,7 @@ void (*PNG_write_end)(png_structrp png_ptr,
static const dllimp_t png_imports[] = { static const dllimp_t png_imports[] = {
{ "png_create_write_struct", &PNG_create_write_struct }, { "png_create_write_struct", &PNG_create_write_struct },
{ "png_destroy_write_struct", &PNG_destroy_write_struct },
{ "png_create_info_struct", &PNG_create_info_struct }, { "png_create_info_struct", &PNG_create_info_struct },
{ "png_init_io", &PNG_init_io }, { "png_init_io", &PNG_init_io },
{ "png_set_IHDR", &PNG_set_IHDR }, { "png_set_IHDR", &PNG_set_IHDR },
@@ -211,288 +211,6 @@ GetError(HRESULT hr)
} }
static HBITMAP
CopySurface(IDirectDrawSurface4 *pDDSurface)
{
HBITMAP hbmp, hbmprev;
DDSURFACEDESC2 ddsd;
HDC hdc, hmemdc;
pDDSurface->GetDC(&hdc);
hmemdc = CreateCompatibleDC(hdc);
ZeroMemory(&ddsd, sizeof(ddsd));
ddsd.dwSize = sizeof(ddsd);
pDDSurface->GetSurfaceDesc(&ddsd);
hbmp = CreateCompatibleBitmap(hdc, xs, ys);
hbmprev = (HBITMAP)SelectObject(hmemdc, hbmp);
BitBlt(hmemdc, 0, 0, xs, ys, hdc, 0, 0, SRCCOPY);
SelectObject(hmemdc, hbmprev);
DeleteDC(hmemdc);
pDDSurface->ReleaseDC(hdc);
return(hbmp);
}
static void
DoubleLines(uint8_t *dst, uint8_t *src)
{
int i = 0;
for (i = 0; i < ys; i++) {
memcpy(dst + (i * xs * 8), src + (i * xs * 4), xs * 4);
memcpy(dst + ((i * xs * 8) + (xs * 4)), src + (i * xs * 4), xs * 4);
}
}
#ifdef USE_LIBPNG
static void
bgra_to_rgb(png_bytep *b_rgb, uint8_t *bgra, int width, int height)
{
int i, j;
uint8_t *r, *b;
for (i = 0; i < height; i++) {
for (j = 0; j < width; j++) {
r = &b_rgb[(height - 1) - i][j * 3];
b = &bgra[((i * width) + j) * 4];
r[0] = b[2];
r[1] = b[1];
r[2] = b[0];
}
}
}
/* Not strictly needed, but hey.. */
static void
png_error_handler(png_structp arg, const char *str)
{
pclog("DDraw: PNG error '%08lx'\n", str);
}
/* Not strictly needed, but hey.. */
static void
png_warning_handler(png_structp arg, const char *str)
{
pclog("DDraw: PNG warning '%08lx'\n", str);
}
static void
SavePNG(const wchar_t *fn, HBITMAP hBitmap)
{
wchar_t temp[512];
BITMAPINFO bmpInfo;
HDC hdc;
LPVOID pBuf = NULL;
LPVOID pBuf2 = NULL;
png_bytep *b_rgb = NULL;
png_infop info_ptr;
png_structp png_ptr;
FILE *fp;
int i;
/* Create file. */
fp = plat_fopen(fn, L"wb");
if (fp == NULL) {
pclog("[SavePNG] File %ls could not be opened for writing!\n", fn);
_swprintf(temp, get_string(IDS_ERR_SCRSHOT), fn);
ui_msgbox(MBX_ERROR, temp);
return;
}
/* Initialize PNG stuff. */
png_ptr = PNGFUNC(create_write_struct)(PNG_LIBPNG_VER_STRING, (char *)1234,
png_error_handler, png_warning_handler);
if (png_ptr == NULL) {
(void)fclose(fp);
pclog("[SavePNG] png_create_write_struct failed!\n");
_swprintf(temp, get_string(IDS_ERR_SCRSHOT), fn);
ui_msgbox(MBX_ERROR, temp);
return;
}
info_ptr = PNGFUNC(create_info_struct)(png_ptr);
if (info_ptr == NULL) {
// PNGFUNC(destroy_write_struct)(&png_ptr, NULL, NULL);
(void)fclose(fp);
pclog("[SavePNG] png_create_info_struct failed!\n");
_swprintf(temp, get_string(IDS_ERR_SCRSHOT), fn);
ui_msgbox(MBX_ERROR, temp);
return;
}
PNGFUNC(init_io)(png_ptr, fp);
hdc = GetDC(NULL);
ZeroMemory(&bmpInfo, sizeof(BITMAPINFO));
bmpInfo.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
GetDIBits(hdc, hBitmap, 0, 0, NULL, &bmpInfo, DIB_RGB_COLORS);
if (bmpInfo.bmiHeader.biSizeImage <= 0)
bmpInfo.bmiHeader.biSizeImage =
bmpInfo.bmiHeader.biWidth*abs(bmpInfo.bmiHeader.biHeight)*(bmpInfo.bmiHeader.biBitCount+7)/8;
if ((pBuf = malloc(bmpInfo.bmiHeader.biSizeImage)) == NULL) {
// PNGFUNC(destroy_write_struct)(&png_ptr, &info_ptr, NULL);
(void)fclose(fp);
pclog("[SavePNG] Unable to allocate bitmap memory!\n");
_swprintf(temp, get_string(IDS_ERR_SCRSHOT), fn);
ui_msgbox(MBX_ERROR, temp);
return;
}
if (ys2 <= 250) {
bmpInfo.bmiHeader.biSizeImage <<= 1;
if ((pBuf2 = malloc(bmpInfo.bmiHeader.biSizeImage)) == NULL) {
// PNGFUNC(destroy_write_struct)(&png_ptr, &info_ptr, NULL);
(void)fclose(fp);
free(pBuf);
pclog("[SavePNG] Unable to allocate secondary bitmap memory!\n");
_swprintf(temp, get_string(IDS_ERR_SCRSHOT), fn);
ui_msgbox(MBX_ERROR, temp);
return;
}
bmpInfo.bmiHeader.biHeight <<= 1;
}
#if 1
pclog("save png w=%i h=%i\n",
bmpInfo.bmiHeader.biWidth, bmpInfo.bmiHeader.biHeight);
#endif
bmpInfo.bmiHeader.biCompression = BI_RGB;
GetDIBits(hdc, hBitmap, 0,
bmpInfo.bmiHeader.biHeight, pBuf, &bmpInfo, DIB_RGB_COLORS);
PNGFUNC(set_IHDR)(png_ptr, info_ptr,
bmpInfo.bmiHeader.biWidth, bmpInfo.bmiHeader.biHeight,
8, PNG_COLOR_TYPE_RGB, PNG_INTERLACE_NONE,
PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE);
b_rgb = (png_bytep *)malloc(sizeof(png_bytep)*bmpInfo.bmiHeader.biHeight);
if (b_rgb == NULL) {
// PNGFUNC(destroy_write_struct)(&png_ptr, NULL, NULL);
(void)fclose(fp);
free(pBuf);
free(pBuf2);
pclog("[SavePNG] Unable to allocate RGB bitmap memory!\n");
_swprintf(temp, get_string(IDS_ERR_SCRSHOT), fn);
ui_msgbox(MBX_ERROR, temp);
return;
}
for (i = 0; i < bmpInfo.bmiHeader.biHeight; i++)
b_rgb[i] = (png_byte *)malloc(PNGFUNC(get_rowbytes)(png_ptr, info_ptr));
if (pBuf2) {
DoubleLines((uint8_t *)pBuf2, (uint8_t *)pBuf);
bgra_to_rgb(b_rgb, (uint8_t *)pBuf2,
bmpInfo.bmiHeader.biWidth, bmpInfo.bmiHeader.biHeight);
} else
bgra_to_rgb(b_rgb, (uint8_t *)pBuf,
bmpInfo.bmiHeader.biWidth, bmpInfo.bmiHeader.biHeight);
PNGFUNC(write_info)(png_ptr, info_ptr);
PNGFUNC(write_image)(png_ptr, b_rgb);
PNGFUNC(write_end)(png_ptr, NULL);
/* Clean up. */
if (fp != NULL) fclose(fp);
// PNGFUNC(destroy_write_struct)(&png_ptr, &info_ptr, NULL);
if (hdc) ReleaseDC(NULL, hdc);
if (b_rgb != NULL) {
for (i = 0; i < bmpInfo.bmiHeader.biHeight; i++)
free(b_rgb[i]);
free(b_rgb);
}
if (pBuf != NULL) free(pBuf);
if (pBuf2 != NULL) free(pBuf2);
}
#endif
static void
SaveBMP(const wchar_t *fn, HBITMAP hBitmap)
{
wchar_t temp[512];
BITMAPFILEHEADER bmpFileHeader;
BITMAPINFO bmpInfo;
HDC hdc;
FILE *fp = NULL;
LPVOID pBuf = NULL;
LPVOID pBuf2 = NULL;
hdc = GetDC(NULL);
ZeroMemory(&bmpInfo, sizeof(BITMAPINFO));
bmpInfo.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
GetDIBits(hdc, hBitmap, 0, 0, NULL, &bmpInfo, DIB_RGB_COLORS);
if (bmpInfo.bmiHeader.biSizeImage <= 0)
bmpInfo.bmiHeader.biSizeImage =
bmpInfo.bmiHeader.biWidth*abs(bmpInfo.bmiHeader.biHeight)*(bmpInfo.bmiHeader.biBitCount+7)/8;
if ((pBuf = malloc(bmpInfo.bmiHeader.biSizeImage)) == NULL) {
pclog("[SaveBMP] Unable to allocate bitmap memory!\n");
_swprintf(temp, get_string(IDS_ERR_SCRSHOT), fn);
ui_msgbox(MBX_ERROR, temp);
return;
}
if (ys2 <= 250)
pBuf2 = malloc(bmpInfo.bmiHeader.biSizeImage * 2);
bmpInfo.bmiHeader.biCompression = BI_RGB;
GetDIBits(hdc, hBitmap, 0, bmpInfo.bmiHeader.biHeight,
pBuf, &bmpInfo, DIB_RGB_COLORS);
if ((fp = plat_fopen(fn, L"wb")) == NULL) {
pclog("[SaveBMP] File %ls could not be opened for writing!\n", fn);
_swprintf(temp, get_string(IDS_ERR_SCRSHOT), fn);
ui_msgbox(MBX_ERROR, temp);
return;
}
bmpFileHeader.bfReserved1 = 0;
bmpFileHeader.bfReserved2 = 0;
if (pBuf2) {
bmpInfo.bmiHeader.biSizeImage <<= 1;
bmpInfo.bmiHeader.biHeight <<= 1;
}
bmpFileHeader.bfSize=sizeof(BITMAPFILEHEADER)+sizeof(BITMAPINFOHEADER)+bmpInfo.bmiHeader.biSizeImage;
bmpFileHeader.bfType=0x4D42;
bmpFileHeader.bfOffBits=sizeof(BITMAPFILEHEADER)+sizeof(BITMAPINFOHEADER);
(void)fwrite(&bmpFileHeader,sizeof(BITMAPFILEHEADER),1,fp);
(void)fwrite(&bmpInfo.bmiHeader,sizeof(BITMAPINFOHEADER),1,fp);
if (pBuf2) {
DoubleLines((uint8_t *) pBuf2, (uint8_t *) pBuf);
(void)fwrite(pBuf2,bmpInfo.bmiHeader.biSizeImage,1,fp);
} else {
(void)fwrite(pBuf,bmpInfo.bmiHeader.biSizeImage,1,fp);
}
/* Clean up. */
if (fp != NULL) fclose(fp);
if (hdc != NULL) ReleaseDC(NULL, hdc);
if (pBuf2 != NULL) free(pBuf2);
if (pBuf != NULL) free(pBuf);
}
static void static void
ddraw_fs_size_default(RECT w_rect, RECT *r_dest) ddraw_fs_size_default(RECT w_rect, RECT *r_dest)
{ {
@@ -735,23 +453,23 @@ ddraw_close(void)
video_setblit(NULL); video_setblit(NULL);
if (lpdds_back2) { if (lpdds_back2 != NULL) {
lpdds_back2->Release(); lpdds_back2->Release();
lpdds_back2 = NULL; lpdds_back2 = NULL;
} }
if (lpdds_back) { if (lpdds_back != NULL) {
lpdds_back->Release(); lpdds_back->Release();
lpdds_back = NULL; lpdds_back = NULL;
} }
if (lpdds_pri) { if (lpdds_pri != NULL) {
lpdds_pri->Release(); lpdds_pri->Release();
lpdds_pri = NULL; lpdds_pri = NULL;
} }
if (lpdd_clipper) { if (lpdd_clipper != NULL) {
lpdd_clipper->Release(); lpdd_clipper->Release();
lpdd_clipper = NULL; lpdd_clipper = NULL;
} }
if (lpdd4) { if (lpdd4 != NULL) {
lpdd4->Release(); lpdd4->Release();
lpdd4 = NULL; lpdd4 = NULL;
} }
@@ -766,66 +484,6 @@ ddraw_close(void)
} }
#if 0
int
ddraw_init_fs(HWND h)
{
ddraw_w = GetSystemMetrics(SM_CXSCREEN);
ddraw_h = GetSystemMetrics(SM_CYSCREEN);
cgapal_rebuild();
if (FAILED(DirectDrawCreate(NULL, &lpdd, NULL))) return 0;
if (FAILED(lpdd->QueryInterface(IID_IDirectDraw4, (LPVOID *)&lpdd4))) return 0;
lpdd->Release();
lpdd = NULL;
atexit(ddraw_close);
if (FAILED(lpdd4->SetCooperativeLevel(h,
DDSCL_SETFOCUSWINDOW | \
DDSCL_CREATEDEVICEWINDOW | \
DDSCL_EXCLUSIVE | \
DDSCL_FULLSCREEN | \
DDSCL_ALLOWREBOOT))) return 0;
if (FAILED(lpdd4->SetDisplayMode(ddraw_w, ddraw_h, 32, 0 ,0))) return 0;
memset(&ddsd, 0, sizeof(ddsd));
ddsd.dwSize = sizeof(ddsd);
ddsd.dwFlags = DDSD_CAPS | DDSD_BACKBUFFERCOUNT;
ddsd.dwBackBufferCount = 1;
ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE | DDSCAPS_COMPLEX | DDSCAPS_FLIP;
if (FAILED(lpdd4->CreateSurface(&ddsd, &lpdds_pri, NULL))) return 0;
ddsd.ddsCaps.dwCaps = DDSCAPS_BACKBUFFER;
if (FAILED(lpdds_pri->GetAttachedSurface(&ddsd.ddsCaps, &lpdds_back2))) return 0;
memset(&ddsd, 0, sizeof(ddsd));
ddsd.dwSize = sizeof(ddsd);
ddsd.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT;
ddsd.dwWidth = 2048;
ddsd.dwHeight = 2048;
ddsd.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY;
if (FAILED(lpdd4->CreateSurface(&ddsd, &lpdds_back, NULL))) {
ddsd.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT;
ddsd.dwWidth = 2048;
ddsd.dwHeight = 2048;
ddsd.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY;
if (FAILED(lpdd4->CreateSurface(&ddsd, &lpdds_back, NULL))) return 0;
}
ddraw_hwnd = h;
video_setblit(ddraw_blit_fs);
return(1);
}
#endif
static int static int
ddraw_init(int fs) ddraw_init(int fs)
{ {
@@ -844,7 +502,6 @@ ddraw_init(int fs)
pclog("DDRAW: cannot create an instance (%s)\n", GetError(hr)); pclog("DDRAW: cannot create an instance (%s)\n", GetError(hr));
return(0); return(0);
} }
hr = lpdd->QueryInterface(IID_IDirectDraw4, (LPVOID *)&lpdd4); hr = lpdd->QueryInterface(IID_IDirectDraw4, (LPVOID *)&lpdd4);
if (FAILED(hr)) { if (FAILED(hr)) {
pclog("DDRAW: no interfaces found (%s)\n", GetError(hr)); pclog("DDRAW: no interfaces found (%s)\n", GetError(hr));
@@ -868,50 +525,107 @@ ddraw_init(int fs)
return(0); return(0);
} }
memset(&ddsd, 0, sizeof(ddsd)); if (fs) {
ddsd.dwSize = sizeof(ddsd); ddraw_w = GetSystemMetrics(SM_CXSCREEN);
ddraw_h = GetSystemMetrics(SM_CYSCREEN);
hr = lpdd4->SetDisplayMode(ddraw_w, ddraw_h, 32, 0, 0);
if (FAILED(hr)) {
pclog("DDRAW: SetDisplayMode failed (%s)\n", GetError(hr));
return(0);
}
}
memset(&ddsd, 0x00, sizeof(ddsd));
ddsd.dwSize = sizeof(ddsd);
ddsd.dwFlags = DDSD_CAPS; ddsd.dwFlags = DDSD_CAPS;
ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE; ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE;
if (FAILED(lpdd4->CreateSurface(&ddsd, &lpdds_pri, NULL))) return(0); if (fs) {
ddsd.dwFlags |= DDSD_BACKBUFFERCOUNT;
ddsd.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT; ddsd.ddsCaps.dwCaps |= (DDSCAPS_COMPLEX | DDSCAPS_FLIP);
ddsd.dwWidth = 2048; ddsd.dwBackBufferCount = 1;
ddsd.dwHeight = 2048; }
ddsd.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY; hr = lpdd4->CreateSurface(&ddsd, &lpdds_pri, NULL);
if (FAILED(lpdd4->CreateSurface(&ddsd, &lpdds_back, NULL))) { if (FAILED(hr)) {
ddsd.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT; pclog("DDRAW: CreateSurface failed (%s)\n", GetError(hr));
ddsd.dwWidth = 2048; return(0);
ddsd.dwHeight = 2048;
ddsd.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY;
if (FAILED(lpdd4->CreateSurface(&ddsd, &lpdds_back, NULL)))
fatal("CreateSurface back failed\n");
} }
memset(&ddsd, 0, sizeof(ddsd)); if (fs) {
memset(&ddsd, 0x00, sizeof(ddsd));
ddsd.dwSize = sizeof(ddsd);
ddsd.dwFlags = DDSD_CAPS;
ddsd.ddsCaps.dwCaps = DDSCAPS_BACKBUFFER;
hr = lpdds_pri->GetAttachedSurface(&ddsd.ddsCaps, &lpdds_back2);
if (FAILED(hr)) {
pclog("DDRAW: GetAttachedSurface failed (%s)\n", GetError(hr));
return(0);
}
}
memset(&ddsd, 0x00, sizeof(ddsd));
ddsd.dwSize = sizeof(ddsd); ddsd.dwSize = sizeof(ddsd);
ddsd.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT; ddsd.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT;
ddsd.dwWidth = 2048; ddsd.dwWidth = 2048;
ddsd.dwHeight = 2048; ddsd.dwHeight = 2048;
ddsd.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY; ddsd.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY;
if (FAILED(lpdd4->CreateSurface(&ddsd, &lpdds_back2, NULL))) { hr = lpdd4->CreateSurface(&ddsd, &lpdds_back, NULL);
if (FAILED(hr)) {
ddsd.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT; ddsd.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT;
ddsd.dwWidth = 2048; ddsd.dwWidth = 2048;
ddsd.dwHeight = 2048; ddsd.dwHeight = 2048;
ddsd.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY; ddsd.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY;
if (FAILED(lpdd4->CreateSurface(&ddsd, &lpdds_back2, NULL))) hr = lpdd4->CreateSurface(&ddsd, &lpdds_back, NULL);
fatal("CreateSurface back failed\n"); if (FAILED(hr)) {
pclog("DDRAW: CreateSurface(back) failed (%s)\n", GetError(hr));
return(0);
}
} }
if (FAILED(lpdd4->CreateClipper(0, &lpdd_clipper, NULL))) return(0); if (! fs) {
memset(&ddsd, 0x00, sizeof(ddsd));
ddsd.dwSize = sizeof(ddsd);
ddsd.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT;
ddsd.dwWidth = 2048;
ddsd.dwHeight = 2048;
ddsd.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY;
hr = lpdd4->CreateSurface(&ddsd, &lpdds_back2, NULL);
if (FAILED(hr)) {
ddsd.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT;
ddsd.dwWidth = 2048;
ddsd.dwHeight = 2048;
ddsd.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY;
hr = lpdd4->CreateSurface(&ddsd, &lpdds_back2, NULL);
if (FAILED(hr)) {
pclog("DDRAW: CreateSurface(back2) failed (%s)\n", GetError(hr));
return(0);
}
}
if (FAILED(lpdd_clipper->SetHWnd(0, h))) return(0); hr = lpdd4->CreateClipper(0, &lpdd_clipper, NULL);
if (FAILED(hr)) {
pclog("DDRAW: CreateClipper failed (%s)\n", GetError(hr));
return(0);
}
if (FAILED(lpdds_pri->SetClipper(lpdd_clipper))) return(0); hr = lpdd_clipper->SetHWnd(0, h);
if (FAILED(hr)) {
pclog("DDRAW: SetHWnd failed (%s)\n", GetError(hr));
return(0);
}
hr = lpdds_pri->SetClipper(lpdd_clipper);
if (FAILED(hr)) {
pclog("DDRAW: SetClipper failed (%s)\n", GetError(hr));
return(0);
}
}
ddraw_hwnd = h; ddraw_hwnd = h;
video_setblit(ddraw_blit); if (fs)
video_setblit(ddraw_blit_fs);
else
video_setblit(ddraw_blit);
#ifdef USE_LIBPNG #ifdef USE_LIBPNG
# if USE_LIBPNG == 2 # if USE_LIBPNG == 2
@@ -929,11 +643,197 @@ ddraw_init(int fs)
} }
#ifdef USE_LIBPNG
static void
bgra_to_rgb(png_bytep *b_rgb, uint8_t *bgra, int width, int height)
{
int h, w;
uint8_t *r, *b;
for (h = 0; h < height; h++) {
for (w = 0; w < width; w++) {
/* Get pointer to pixel in bitmap data. */
b = &bgra[((h * width) + w) * 4];
/* Get pointer to png row data. */
r = &b_rgb[(height - 1) - h][w * 3];
/* Copy the pixel data. */
r[0] = b[2];
r[1] = b[1];
r[2] = b[0];
}
}
}
static void
error_handler(png_structp arg, const char *str)
{
pclog("PNG: stream 0x%08lx error '%s'\n", arg, str);
}
static void
warning_handler(png_structp arg, const char *str)
{
pclog("PNG: stream 0x%08lx warning '%s'\n", arg, str);
}
static int
SavePNG(const wchar_t *fn, BITMAPINFO *bmi, uint8_t *pixels)
{
png_structp png = NULL;
png_infop info = NULL;
uint8_t *r, *b;
png_bytep row;
FILE *fp;
int h, w;
/* Create the image file. */
fp = plat_fopen(fn, L"wb");
if (fp == NULL) {
pclog("[SavePNG] File %ls could not be opened for writing!\n", fn);
error:
if (png != NULL)
PNGFUNC(destroy_write_struct)(&png, &info);
if (fp != NULL)
(void)fclose(fp);
return(0);
}
/* Initialize PNG stuff. */
png = PNGFUNC(create_write_struct)(PNG_LIBPNG_VER_STRING, NULL,
error_handler, warning_handler);
if (png == NULL) {
pclog("[SavePNG] create_write_struct failed!\n");
goto error;
}
info = PNGFUNC(create_info_struct)(png);
if (info == NULL) {
pclog("[SavePNG] create_info_struct failed!\n");
goto error;
}
PNGFUNC(init_io)(png, fp);
PNGFUNC(set_IHDR)(png, info,
bmi->bmiHeader.biWidth, bmi->bmiHeader.biHeight, 8,
PNG_COLOR_TYPE_RGB, PNG_INTERLACE_NONE,
PNG_COMPRESSION_TYPE_DEFAULT, PNG_FILTER_TYPE_DEFAULT);
pclog("PNG: write_info\n");
PNGFUNC(write_info)(png, info);
/* Create a buffer for one scanline of pixels. */
row = (png_bytep)malloc(PNGFUNC(get_rowbytes)(png, info));
/* Process all scanlines in the image. */
pclog("PNG: convert\n");
for (h = 0; h < bmi->bmiHeader.biHeight; h++) {
r = row;
for (w = 0; w < bmi->bmiHeader.biWidth; w++) {
/* Get pointer to pixel in bitmap data. */
b = &pixels[((h * bmi->bmiHeader.biWidth) + w) * 4];
/* Copy the pixel data. */
r[0] = b[2];
r[1] = b[1];
r[2] = b[0];
/* Next pixel on scanline. */
r += 3;
}
/* Write this row to the file. */
// png_write_row(png, row);
}
/* No longer need the row buffer. */
free(row);
#if 0
pclog("PNG: write_end\n");
PNGFUNC(write_end)(png, NULL);
#endif
pclog("PNG: destroy\n");
PNGFUNC(destroy_write_struct)(&png, &info);
/* Clean up. */
pclog("PNG: fclose\n");
(void)fclose(fp);
pclog("PNG: done!\n");
return(1);
}
#endif
static int
SaveBMP(const wchar_t *fn, BITMAPINFO *bmi, uint8_t *pixels)
{
BITMAPFILEHEADER bmpHdr;
FILE *fp;
if ((fp = plat_fopen(fn, L"wb")) == NULL) {
pclog("[SaveBMP] File %ls could not be opened for writing!\n", fn);
return(0);
}
memset(&bmpHdr, 0x00, sizeof(BITMAPFILEHEADER));
bmpHdr.bfSize = sizeof(BITMAPFILEHEADER) + \
sizeof(BITMAPINFOHEADER) + bmi->bmiHeader.biSizeImage;
bmpHdr.bfType = 0x4D42;
bmpHdr.bfOffBits = sizeof(BITMAPFILEHEADER) + sizeof(BITMAPINFOHEADER);
(void)fwrite(&bmpHdr, sizeof(BITMAPFILEHEADER), 1, fp);
(void)fwrite(&bmi->bmiHeader, sizeof(BITMAPINFOHEADER), 1, fp);
(void)fwrite(pixels, bmi->bmiHeader.biSizeImage, 1, fp);
/* Clean up. */
(void)fclose(fp);
return(1);
}
static HBITMAP
CopySurface(IDirectDrawSurface4 *pDDSurface)
{
HBITMAP hBmp, hOldBmp;
DDSURFACEDESC2 ddsd;
HDC hDC, hMemDC;
pDDSurface->GetDC(&hDC);
hMemDC = CreateCompatibleDC(hDC);
memset(&ddsd, 0x00, sizeof(ddsd));
ddsd.dwSize = sizeof(ddsd);
pDDSurface->GetSurfaceDesc(&ddsd);
hBmp = CreateCompatibleBitmap(hDC, xs, ys);
hOldBmp = (HBITMAP)SelectObject(hMemDC, hBmp);
BitBlt(hMemDC, 0, 0, xs, ys, hDC, 0, 0, SRCCOPY);
SelectObject(hMemDC, hOldBmp);
DeleteDC(hMemDC);
pDDSurface->ReleaseDC(hDC);
return(hBmp);
}
static void static void
ddraw_screenshot(const wchar_t *fn) ddraw_screenshot(const wchar_t *fn)
{ {
wchar_t path[512];
wchar_t temp[512]; wchar_t temp[512];
HBITMAP hbmp; BITMAPINFO bmi;
uint8_t *pixels;
uint8_t *pix2;
HBITMAP hBmp;
HDC hDC;
int i;
#if 0 #if 0
xs = xsize; xs = xsize;
@@ -962,24 +862,95 @@ ddraw_screenshot(const wchar_t *fn)
ys2 >>= 1; ys2 >>= 1;
} }
hbmp = CopySurface(lpdds_back2); /* Create a surface copy and store it as a bitmap. */
hBmp = CopySurface(lpdds_back);
/* Create a compatible DC. */
hDC = GetDC(NULL);
/* Request the size info from the bitmap. */
memset(&bmi, 0x00, sizeof(BITMAPINFO));
bmi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
GetDIBits(hDC, hBmp, 0, 0, NULL, &bmi, DIB_RGB_COLORS);
if (bmi.bmiHeader.biSizeImage <= 0) {
bmi.bmiHeader.biSizeImage = bmi.bmiHeader.biWidth * abs(bmi.bmiHeader.biHeight) * (bmi.bmiHeader.biBitCount + 7) / 8;
}
/* Allocate a buffer for the pixel data. */
if ((pixels = (uint8_t *)malloc(bmi.bmiHeader.biSizeImage)) == NULL) {
pclog("DDraw: unable to allocate bitmap memory!\n");
_swprintf(temp, get_string(IDS_ERR_SCRSHOT), fn);
ui_msgbox(MBX_ERROR, temp);
ReleaseDC(NULL, hDC);
return;
}
/* Now get the actual pixel data from the bitmap. */
bmi.bmiHeader.biCompression = BI_RGB;
GetDIBits(hDC, hBmp, 0, bmi.bmiHeader.biHeight,
pixels, &bmi, DIB_RGB_COLORS);
/* No longer need the DC. */
ReleaseDC(NULL, hDC);
/*
* For some CGA modes (320x200, 640x200 etc) we double-up
* the image height so it looks a little better. We simply
* copy each real scanline.
*/
if (ys <= 250) {
/* Save current buffer. */
pix2 = pixels;
/* Update bitmap image size. */
bmi.bmiHeader.biHeight <<= 1;
bmi.bmiHeader.biSizeImage <<= 1;
/* Allocate new buffer, doubled-up. */
pixels = (uint8_t *)malloc(bmi.bmiHeader.biSizeImage);
/* Copy scanlines. */
for (i = 0; i < ys; i++) {
/* Copy original line. */
memcpy(pixels + (i * xs * 8),
pix2 + (i * xs * 4), xs * 4);
/* And copy it once more, doubling it. */
memcpy(pixels + ((i * xs * 8) + (xs * 4)),
pix2 + (i * xs * 4), xs * 4);
}
/* No longer need original buffer. */
free(pix2);
}
/* Save filename. */
wcscpy(path, fn);
#ifdef USE_LIBPNG #ifdef USE_LIBPNG
/* Save the screenshot, using PNG if available. */ /* Save the screenshot, using PNG if available. */
if (png_handle != NULL) { if (png_handle != NULL) {
/* Use the PNG library. */ /* Use the PNG library. */
SavePNG(fn, hbmp); i = SavePNG(path, &bmi, pixels);
} else { } else {
#endif #endif
/* Use BMP, so fix the file name. */ /* Use BMP, so fix the file name. */
wcscpy(temp, fn); path[wcslen(path)-3] = L'b';
temp[wcslen(temp)-3] = L'b'; path[wcslen(path)-2] = L'm';
temp[wcslen(temp)-2] = L'm'; path[wcslen(path)-1] = L'p';
temp[wcslen(temp)-1] = L'p'; i = SaveBMP(path, &bmi, pixels);
SaveBMP(temp, hbmp);
#ifdef USE_LIBPNG #ifdef USE_LIBPNG
} }
#endif #endif
/* Release pixel buffer. */
free(pixels);
/* Show error message if needed. */
if (i == 0) {
_swprintf(temp, get_string(IDS_ERR_SCRSHOT), path);
ui_msgbox(MBX_ERROR, temp);
}
} }
@@ -994,114 +965,3 @@ const vidapi_t ddraw_vidapi = {
ddraw_screenshot, ddraw_screenshot,
NULL NULL
}; };
#if 0
@@@@@
if (fs) {
ddraw_w = GetSystemMetrics(SM_CXSCREEN);
ddraw_h = GetSystemMetrics(SM_CYSCREEN);
hr = lpdd4->SetDisplayMode(ddraw_w, ddraw_h, 32, 0, 0);
if (FAILED(hr)) {
pclog("DDRAW: SetDisplayMode failed (%s)\n", GetError(hr));
return(0);
}
}
memset(&ddsd, 0x00, sizeof(ddsd));
ddsd.dwSize = sizeof(ddsd);
ddsd.dwFlags = DDSD_CAPS;
ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE;
if (fs) {
ddsd.dwFlags |= DDSD_BACKBUFFERCOUNT;
ddsd.ddsCaps.dwCaps |= (DDSCAPS_COMPLEX | DDSCAPS_FLIP);
ddsd.dwBackBufferCount = 1;
}
hr = lpdd4->CreateSurface(&ddsd, &lpdds_pri, NULL);
if (FAILED(hr)) {
pclog("DDRAW: CreateSurface failed (%s)\n", GetError(hr));
return(0);
}
ddsd.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT;
ddsd.dwWidth = 2048;
ddsd.dwHeight = 2048;
ddsd.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY;
hr = lpdd4->CreateSurface(&ddsd, &lpdds_back, NULL);
if (FAILED(hr)) {
ddsd.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT;
ddsd.dwWidth = 2048;
ddsd.dwHeight = 2048;
ddsd.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY;
hr = lpdd4->CreateSurface(&ddsd, &lpdds_back, NULL);
if (FAILED(hr)) {
pclog("DDRAW: CreateSurface back failed (%s)\n", GetError(hr));
return(0);
}
}
if (fs) {
ddsd.ddsCaps.dwCaps = DDSCAPS_BACKBUFFER;
hr = lpdds_pri->GetAttachedSurface(&ddsd.ddsCaps, &lpdds_back2);
if (FAILED(hr)) {
pclog("DDRAW: GetAttachedSurface failed (%s)\n", GetError(hr));
return(0);
}
}
memset(&ddsd, 0x00, sizeof(ddsd));
ddsd.dwSize = sizeof(ddsd);
ddsd.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT;
ddsd.dwWidth = 2048;
ddsd.dwHeight = 2048;
ddsd.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY;
if (fs)
hr = lpdd4->CreateSurface(&ddsd, &lpdds_back, NULL);
else
hr = lpdd4->CreateSurface(&ddsd, &lpdds_back2, NULL);
if (FAILED(hr)) {
ddsd.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT;
ddsd.dwWidth = 2048;
ddsd.dwHeight = 2048;
ddsd.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY;
if (fs)
hr = lpdd4->CreateSurface(&ddsd, &lpdds_back, NULL);
else
hr = lpdd4->CreateSurface(&ddsd, &lpdds_back2, NULL);
if (FAILED(hr)) {
pclog("DDRAW: CreateSurface(back) failed (%s)\n", GetError(hr));
return(0);
}
}
if (! fs) {
hr = lpdd4->CreateClipper(0, &lpdd_clipper, NULL);
if (FAILED(hr)) {
pclog("DDRAW: CreateClipper failed (%s)\n", GetError(hr));
return(0);
}
hr = lpdd_clipper->SetHWnd(0, h);
if (FAILED(hr)) {
pclog("DDRAW: SetHWnd failed (%s)\n", GetError(hr));
return(0);
}
hr = lpdds_pri->SetClipper(lpdd_clipper);
if (FAILED(hr)) {
pclog("DDRAW: SetClipper failed (%s)\n", GetError(hr));
return(0);
}
}
ddraw_hwnd = h;
if (fs)
video_setblit(ddraw_blit_fs);
else
video_setblit(ddraw_blit);
return(1);
}
#endif

View File

@@ -8,7 +8,7 @@
* *
* Handle language support for the platform. * Handle language support for the platform.
* *
* Version: @(#)win_lang.c 1.0.3 2018/06/04 * Version: @(#)win_lang.c 1.0.4 2018/06/09
* *
* Author: Fred N. van Kempen, <decwiz@yahoo.com> * Author: Fred N. van Kempen, <decwiz@yahoo.com>
* *
@@ -108,7 +108,7 @@ static void
lang_add(lang_t *ptr, int sort) lang_add(lang_t *ptr, int sort)
{ {
lang_t *p, *pp; lang_t *p, *pp;
lang_t *prev = 0; lang_t *prev = NULL;
/* Create a copy of the entry data. */ /* Create a copy of the entry data. */
pp = (lang_t *)malloc(sizeof(lang_t)); pp = (lang_t *)malloc(sizeof(lang_t));

View File

@@ -12,7 +12,7 @@
* we will not use that, but, instead, use a new window which * we will not use that, but, instead, use a new window which
* coverrs the entire desktop. * coverrs the entire desktop.
* *
* Version: @(#)win_sdl.c 1.0.3 2018/05/26 * Version: @(#)win_sdl.c 1.0.4 2018/06/10
* *
* Authors: Fred N. van Kempen, <decwiz@yahoo.com> * Authors: Fred N. van Kempen, <decwiz@yahoo.com>
* Michael Dr<44>ing, <michael@drueing.de> * Michael Dr<44>ing, <michael@drueing.de>
@@ -138,7 +138,7 @@ sdl_blit(int x, int y, int y1, int y2, int w, int h)
int pitch; int pitch;
int yy; int yy;
if (buffer32 == NULL) { if ((y1 == y2) || (buffer32 == NULL)) {
video_blit_complete(); video_blit_complete();
return; return;
} }
@@ -152,7 +152,12 @@ sdl_blit(int x, int y, int y1, int y2, int w, int h)
for (yy = y1; yy < y2; yy++) { for (yy = y1; yy < y2; yy++) {
if ((y + yy) >= 0 && (y + yy) < buffer32->h) if ((y + yy) >= 0 && (y + yy) < buffer32->h)
memcpy((uint32_t *) &(((uint8_t *)pixeldata)[yy * pitch]), &(((uint32_t *)buffer32->line[y + yy])[x]), w * 4); #if 0
if (video_grayscale || invert_display)
video_transform_copy((uint32_t *) &(((uint8_t *)pixeldata)[yy * pitch]), &(((uint32_t *)buffer32->line[y + yy])[x]), w);
else
#endif
memcpy((uint32_t *) &(((uint8_t *)pixeldata)[yy * pitch]), &(((uint32_t *)buffer32->line[y + yy])[x]), w * 4);
} }
video_blit_complete(); video_blit_complete();
@@ -194,10 +199,13 @@ sdl_close(void)
if (sdl_hwnd != NULL) { if (sdl_hwnd != NULL) {
plat_set_input(hwndMain); plat_set_input(hwndMain);
#if 1
ShowWindow(hwndRender, TRUE);
SetFocus(hwndMain);
#endif
DestroyWindow(sdl_hwnd); DestroyWindow(sdl_hwnd);
sdl_hwnd = NULL; sdl_hwnd = NULL;
SetFocus(hwndMain);
} }
/* Quit and unload the DLL if possible. */ /* Quit and unload the DLL if possible. */
@@ -265,13 +273,6 @@ pclog("SDL: FS %dx%d window at %08lx\n", sdl_w, sdl_h, sdl_hwnd);
/* Now create the SDL window from that. */ /* Now create the SDL window from that. */
sdl_win = sdl_CreateWindowFrom((void *)sdl_hwnd); sdl_win = sdl_CreateWindowFrom((void *)sdl_hwnd);
} else { } else {
/* Redirect RawInput to this new window. */
plat_set_input(hwndMain);
ShowWindow(hwndRender, TRUE);
SetFocus(hwndMain);
/* Create the SDL window from the render window. */ /* Create the SDL window from the render window. */
sdl_win = sdl_CreateWindowFrom((void *)hwndRender); sdl_win = sdl_CreateWindowFrom((void *)hwndRender);
} }
@@ -329,7 +330,89 @@ sdl_resize(int x, int y)
static void static void
sdl_screenshot(const wchar_t *fn) sdl_screenshot(const wchar_t *fn)
{ {
/* TODO: implement */ #if 0
int i, res, x, y, width = 0, height = 0;
unsigned char* rgba = NULL;
png_bytep *b_rgb = NULL;
FILE *fp = NULL;
sdl_GetWindowSize(sdl_win, &width, &height);
/* Create file. */
if ((fp = plat_fopen(fn, L"wb")) == NULL) {
pclog("SDL: screenshot: file %ls could not be opened for writing\n", fn);
return;
}
/* initialize stuff */
png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
if (png_ptr == NULL) {
pclog("SDL: screenshot: create_write_struct failed\n");
fclose(fp);
return;
}
info_ptr = png_create_info_struct(png_ptr);
if (info_ptr == NULL) {
pclog("SDL: screenshot: create_info_struct failed");
fclose(fp);
return;
}
png_init_io(png_ptr, fp);
png_set_IHDR(png_ptr, info_ptr, width, height,
8, PNG_COLOR_TYPE_RGB, PNG_INTERLACE_NONE,
PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE);
pixels = (uint8_t *)malloc(width * height * 4);
if (pixels == NULL) {
pclog("SDL: screenshot: unable to allocate RGBA Bitmap memory\n");
fclose(fp);
return;
}
res = sdl_RenderReadPixels(sdl_render, NULL,
SDL_PIXELFORMAT_ABGR8888, pixels, width * 4);
if (res != 0) {
pclog("SDL: screenshot: error reading render pixels\n");
free(pixels);
fclose(fp);
return;
}
if ((b_rgb = (png_bytep *) malloc(sizeof(png_bytep) * height)) == NULL) {
sdl_log("[sdl_take_screenshot] Unable to Allocate RGB Bitmap Memory");
free(rgba);
fclose(fp);
return;
}
for (y = 0; y < height; ++y) {
b_rgb[y] = (png_byte *) malloc(png_get_rowbytes(png_ptr, info_ptr));
for (x = 0; x < width; ++x) {
b_rgb[y][(x) * 3 + 0] = rgba[(y * width + x) * 4 + 0];
b_rgb[y][(x) * 3 + 1] = rgba[(y * width + x) * 4 + 1];
b_rgb[y][(x) * 3 + 2] = rgba[(y * width + x) * 4 + 2];
}
}
png_write_info(png_ptr, info_ptr);
png_write_image(png_ptr, b_rgb);
png_write_end(png_ptr, NULL);
/* cleanup heap allocation */
for (i = 0; i < height; i++)
if (b_rgb[i]) free(b_rgb[i]);
if (b_rgb) free(b_rgb);
if (rgba) free(rgba);
if (fp) fclose(fp);
#endif
} }