Merge branch '86Box:master' into nec-v20
This commit is contained in:
@@ -627,6 +627,7 @@ extern int machine_at_an430tx_init(const machine_t *);
|
||||
#endif
|
||||
extern int machine_at_ym430tx_init(const machine_t *);
|
||||
extern int machine_at_mb540n_init(const machine_t *);
|
||||
extern int machine_at_56a5_init(const machine_t *);
|
||||
extern int machine_at_p5mms98_init(const machine_t *);
|
||||
|
||||
extern int machine_at_ficva502_init(const machine_t *);
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#ifdef __cplusplus
|
||||
#include <atomic>
|
||||
using atomic_bool = std::atomic_bool;
|
||||
using atomic_int = std::atomic_int;
|
||||
#else
|
||||
#include <stdatomic.h>
|
||||
#endif
|
||||
@@ -112,7 +113,7 @@ typedef struct monitor_t
|
||||
int mon_force_resize;
|
||||
int mon_fullchange;
|
||||
int mon_changeframecount;
|
||||
int mon_screenshots;
|
||||
atomic_int mon_screenshots;
|
||||
uint32_t* mon_pal_lookup;
|
||||
int* mon_cga_palette;
|
||||
int mon_pal_lookup_static; /* Whether it should not be freed by the API. */
|
||||
|
||||
@@ -799,6 +799,36 @@ machine_at_mb540n_init(const machine_t *model)
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_56a5_init(const machine_t* model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/56a5/54p5b6b.bin",
|
||||
0x000e0000, 131072, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init_ex(model, 2);
|
||||
|
||||
pci_init(PCI_CONFIG_TYPE_1);
|
||||
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x11, PCI_CARD_NORMAL, 1, 2, 3, 4);
|
||||
pci_register_slot(0x12, PCI_CARD_NORMAL, 2, 3, 4, 1);
|
||||
pci_register_slot(0x13, PCI_CARD_NORMAL, 3, 4, 1, 2);
|
||||
pci_register_slot(0x14, PCI_CARD_NORMAL, 4, 1, 2, 3);
|
||||
pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); /* PIIX4 */
|
||||
pci_register_slot(0x10, PCI_CARD_NORMAL, 1, 2, 3, 4);
|
||||
device_add(&i430tx_device);
|
||||
device_add(&piix4_device);
|
||||
device_add(&keyboard_ps2_pci_device);
|
||||
device_add(&w83877f_device);
|
||||
device_add(&sst_flash_29ee010_device);
|
||||
spd_register(SPD_TYPE_SDRAM, 0x3, 128);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_p5mms98_init(const machine_t *model)
|
||||
|
||||
@@ -785,6 +785,8 @@ const machine_t machines[] = {
|
||||
{ "[i430TX] Intel YM430TX", "ym430tx", MACHINE_TYPE_SOCKET7, MACHINE_CHIPSET_INTEL_430TX, machine_at_ym430tx_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET5_7, CPU_BLOCK_NONE, 60000000, 66666667, 2800, 3520, 1.5, 3.0, MACHINE_PS2_PCI, MACHINE_IDE_DUAL, 8192, 262144, 8192, 255, NULL, NULL },
|
||||
/* The BIOS sends KBC command BB and expects it to output a byte, which is AMI KBC behavior. */
|
||||
{ "[i430TX] PC Partner MB540N", "mb540n", MACHINE_TYPE_SOCKET7, MACHINE_CHIPSET_INTEL_430TX, machine_at_mb540n_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET5_7, CPU_BLOCK_NONE, 60000000, 66666667, 2700, 3520, 1.5, 3.0, MACHINE_PS2_PCI, MACHINE_IDE_DUAL, 8192, 262144, 8192, 255, NULL, NULL },
|
||||
/* Award BIOS, PS2, EDO, SDRAM, 4 PCI, 4 ISA, VIA VT82C42N KBC */
|
||||
{ "[i430TX] Soltek SL-56A5", "56a5", MACHINE_TYPE_SOCKET7, MACHINE_CHIPSET_INTEL_430TX, machine_at_56a5_init, 0, 0, MACHINE_AVAILABLE, 0, CPU_PKG_SOCKET5_7, CPU_BLOCK_NONE, 55000000, 75000000, 2800, 3520, 1.5, 5.5, MACHINE_PS2_PCI, MACHINE_IDE_DUAL, 8192, 262144, 8192, 255, NULL, NULL },
|
||||
/* [TEST] Has AMIKey 'H' KBC firmware. */
|
||||
{ "[i430TX] Supermicro P5MMS98", "p5mms98", MACHINE_TYPE_SOCKET7, MACHINE_CHIPSET_INTEL_430TX, machine_at_p5mms98_init, 0, 0, MACHINE_AVAILABLE, 0 , CPU_PKG_SOCKET5_7, CPU_BLOCK_NONE, 50000000, 66666667, 2100, 3520, 1.5, 3.0, MACHINE_PS2_PCI, MACHINE_IDE_DUAL, 8192, 262144, 8192, 255, NULL, NULL },
|
||||
|
||||
|
||||
@@ -152,7 +152,7 @@ void D3D9Renderer::blit(int x, int y, int w, int h)
|
||||
srcRect.left = source.left();
|
||||
srcRect.right = source.right();
|
||||
|
||||
if (screenshots) {
|
||||
if (monitors[m_monitor_index].mon_screenshots) {
|
||||
video_screenshot_monitor((uint32_t *) &(monitors[m_monitor_index].target_buffer->line[y][x]), 0, 0, 2048, m_monitor_index);
|
||||
}
|
||||
if (SUCCEEDED(d3d9surface->LockRect(&lockRect, &srcRect, 0))) {
|
||||
|
||||
@@ -642,6 +642,13 @@ void MainWindow::showEvent(QShowEvent *event) {
|
||||
monitors[0].mon_scrnsz_x = fixed_size_x;
|
||||
monitors[0].mon_scrnsz_y = fixed_size_y;
|
||||
}
|
||||
if (window_remember && vid_resize == 1) {
|
||||
ui->stackedWidget->setFixedSize(window_w, window_h);
|
||||
adjustSize();
|
||||
ui->stackedWidget->setFixedSize(QWIDGETSIZE_MAX, QWIDGETSIZE_MAX);
|
||||
monitors[0].mon_scrnsz_x = window_w;
|
||||
monitors[0].mon_scrnsz_y = window_h;
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::on_actionKeyboard_requires_capture_triggered() {
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include <QFocusEvent>
|
||||
|
||||
#include <memory>
|
||||
#include <array>
|
||||
|
||||
class MediaMenu;
|
||||
class RendererStack;
|
||||
|
||||
@@ -425,7 +425,7 @@ OpenGLRenderer::onBlit(int buf_idx, int x, int y, int w, int h)
|
||||
}
|
||||
|
||||
if (!hasBufferStorage)
|
||||
glBufferSubData(GL_PIXEL_UNPACK_BUFFER, BUFFERBYTES * buf_idx, h * ROW_LENGTH * sizeof(uint32_t), (uint8_t *) unpackBuffer + BUFFERBYTES * buf_idx);
|
||||
glBufferSubData(GL_PIXEL_UNPACK_BUFFER, BUFFERBYTES * buf_idx, h * ROW_LENGTH * sizeof(uint32_t) + (y * ROW_LENGTH * sizeof(uint32_t)), (uint8_t *) unpackBuffer + BUFFERBYTES * buf_idx);
|
||||
|
||||
glPixelStorei(GL_UNPACK_SKIP_PIXELS, BUFFERPIXELS * buf_idx + y * ROW_LENGTH + x);
|
||||
glPixelStorei(GL_UNPACK_ROW_LENGTH, ROW_LENGTH);
|
||||
|
||||
@@ -2899,6 +2899,8 @@ static void s3_recalctimings(svga_t *svga)
|
||||
if (svga->crtc[0x5e] & 0x04) svga->vblankstart |= 0x400;
|
||||
if (svga->crtc[0x5e] & 0x10) svga->vsyncstart |= 0x400;
|
||||
if (svga->crtc[0x5e] & 0x40) svga->split |= 0x400;
|
||||
if (s3->accel.advfunc_cntl & 0x01)
|
||||
svga->split = 0x7fff;
|
||||
if (svga->crtc[0x51] & 0x30) svga->rowoffset |= (svga->crtc[0x51] & 0x30) << 4;
|
||||
else if (svga->crtc[0x43] & 0x04) svga->rowoffset |= 0x100;
|
||||
}
|
||||
@@ -3067,6 +3069,10 @@ static void s3_recalctimings(svga_t *svga)
|
||||
break;
|
||||
case 16:
|
||||
svga->render = svga_render_16bpp_highres;
|
||||
if ((s3->card_type == S3_ELSAWIN2KPROX_964) || (s3->card_type == S3_ELSAWIN2KPROX)) {
|
||||
if (s3->width == 1280 || s3->width == 1600)
|
||||
svga->hdisp <<= 1;
|
||||
}
|
||||
if ((s3->chip != S3_VISION964) && (s3->card_type != S3_SPEA_MIRAGE_86C801) &&
|
||||
(s3->card_type != S3_SPEA_MIRAGE_86C805)) {
|
||||
if (s3->chip == S3_86C928)
|
||||
|
||||
@@ -442,7 +442,7 @@ video_screenshot_monitor(uint32_t *buf, int start_x, int start_y, int row_len, i
|
||||
video_take_screenshot_monitor((const char *) path, buf, start_x, start_y, row_len, monitor_index);
|
||||
png_destroy_write_struct(&png_ptr[monitor_index], &info_ptr[monitor_index]);
|
||||
|
||||
monitors[monitor_index].mon_screenshots--;
|
||||
atomic_fetch_sub(&monitors[monitor_index].mon_screenshots, 1);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -942,6 +942,7 @@ video_monitor_init(int index)
|
||||
monitors[index].mon_force_resize = 1;
|
||||
monitors[index].mon_vid_type = VIDEO_FLAG_TYPE_NONE;
|
||||
atomic_init(&doresize_monitors[index], 0);
|
||||
atomic_init(&monitors[index].mon_screenshots, 0);
|
||||
if (index >= 1) ui_init_monitor(index);
|
||||
monitors[index].mon_blit_data_ptr->blit_thread = thread_create(blit_thread, monitors[index].mon_blit_data_ptr);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user