mirror of
https://github.com/86Box/86Box.git
synced 2026-02-24 02:18:20 -07:00
Merge branch '86Box:master' into master
This commit is contained in:
@@ -686,9 +686,10 @@ remap_update(neat_t *dev, uint8_t val)
|
||||
mem_mapping_set_addr(&ram_low_mapping, 0x00000000, dev->remap_base << 10);
|
||||
|
||||
if (dev->remap_base > 1024) {
|
||||
uint32_t base = (val & RB7_EMSEN) ? (0x00100000 + (dev->ems_size << 10)) : 0x00100000;
|
||||
|
||||
mem_mapping_set_addr(&ram_high_mapping, 0x00100000, (dev->remap_base << 10) - 0x00100000);
|
||||
mem_mapping_set_exec(&ram_high_mapping, &(ram[(val & RB7_EMSEN) ? 0x00100000 :
|
||||
(0x00100000 + (dev->ems_size << 10))]));
|
||||
mem_mapping_set_exec(&ram_high_mapping, &(ram[base]));
|
||||
} else
|
||||
mem_mapping_disable(&ram_high_mapping);
|
||||
|
||||
@@ -941,6 +942,13 @@ neat_write(uint16_t port, uint8_t val, void *priv)
|
||||
break;
|
||||
}
|
||||
|
||||
if (mem_size < 1024)
|
||||
/* No RAM left for EMS at all. */
|
||||
dev->ems_size = 0;
|
||||
else if (mem_size < (dev->ems_size + 1024))
|
||||
/* Limit EMS size to the entirety of the remaining extended memory. */
|
||||
dev->ems_size = mem_size - 1024;
|
||||
|
||||
if (dev->regs[REG_RB7] & RB7_EMSEN) {
|
||||
remap_update(dev, dev->regs[REG_RB7]);
|
||||
|
||||
|
||||
@@ -658,8 +658,8 @@ machine_at_if386sx_init(const machine_t *model)
|
||||
|
||||
device_add(&neat_sx_device);
|
||||
|
||||
if (gfxcard[0] == VID_INTERNAL)
|
||||
device_add(&if386jega_device);
|
||||
device_add(&if386jega_device);
|
||||
|
||||
if (fdc_current[0] == FDC_INTERNAL)
|
||||
device_add(&fdc_at_device);
|
||||
|
||||
|
||||
@@ -4768,7 +4768,7 @@ const machine_t machines[] = {
|
||||
.max_multi = 0
|
||||
},
|
||||
.bus_flags = MACHINE_AT,
|
||||
.flags = MACHINE_VIDEO,
|
||||
.flags = MACHINE_VIDEO_FIXED,
|
||||
.ram = {
|
||||
.min = 1024,
|
||||
.max = 4096,
|
||||
|
||||
@@ -1533,10 +1533,28 @@ readmemql(uint32_t addr)
|
||||
addr = addr64a[0] & rammask;
|
||||
|
||||
map = read_mapping[addr >> MEM_GRANULARITY_BITS];
|
||||
if (map && map->read_l)
|
||||
return map->read_l(addr, map->priv) | ((uint64_t) map->read_l(addr + 4, map->priv) << 32);
|
||||
|
||||
return readmemll(addr) | ((uint64_t) readmemll(addr + 4) << 32);
|
||||
if (map && map->read_l)
|
||||
return map->read_l(addr, map->priv) |
|
||||
((uint64_t) map->read_l(addr + 4, map->priv) << 32);
|
||||
|
||||
if (map && map->read_w)
|
||||
return map->read_w(addr, map->priv) |
|
||||
((uint64_t) map->read_w(addr + 2, map->priv) << 16) |
|
||||
((uint64_t) map->read_w(addr + 4, map->priv) << 32) |
|
||||
((uint64_t) map->read_w(addr + 6, map->priv) << 48);
|
||||
|
||||
if (map && map->read_b)
|
||||
return map->read_b(addr, map->priv) |
|
||||
((uint64_t) map->read_b(addr + 1, map->priv) << 8) |
|
||||
((uint64_t) map->read_b(addr + 2, map->priv) << 16) |
|
||||
((uint64_t) map->read_b(addr + 3, map->priv) << 24) |
|
||||
((uint64_t) map->read_b(addr + 4, map->priv) << 32) |
|
||||
((uint64_t) map->read_b(addr + 5, map->priv) << 40) |
|
||||
((uint64_t) map->read_b(addr + 6, map->priv) << 48) |
|
||||
((uint64_t) map->read_b(addr + 7, map->priv) << 56);
|
||||
|
||||
return 0xffffffffffffffffULL;
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -102,8 +102,8 @@ mem_readw_map(uint32_t addr)
|
||||
if (((addr & MEM_GRANULARITY_MASK) <= MEM_GRANULARITY_HBOUND) && (map && map->read_w))
|
||||
ret = map->read_w(addr, map->priv);
|
||||
else {
|
||||
ret = mem_readb_phys(addr + 1) << 8;
|
||||
ret |= mem_readb_phys(addr);
|
||||
ret = mem_readb_map(addr);
|
||||
ret |= ((uint16_t) mem_readb_map(addr + 1)) << 8;
|
||||
}
|
||||
|
||||
return ret;
|
||||
@@ -120,8 +120,8 @@ mem_readl_map(uint32_t addr)
|
||||
if (!cpu_16bitbus && ((addr & MEM_GRANULARITY_MASK) <= MEM_GRANULARITY_QBOUND) && (map && map->read_l))
|
||||
ret = map->read_l(addr, map->priv);
|
||||
else {
|
||||
ret = mem_readw_phys(addr + 2) << 16;
|
||||
ret |= mem_readw_phys(addr);
|
||||
ret = mem_readw_map(addr);
|
||||
ret |= ((uint32_t) mem_readw_map(addr + 2)) << 16;
|
||||
}
|
||||
|
||||
return ret;
|
||||
@@ -148,8 +148,8 @@ mem_writew_map(uint32_t addr, uint16_t val)
|
||||
if (((addr & MEM_GRANULARITY_MASK) <= MEM_GRANULARITY_HBOUND) && (map && map->write_w))
|
||||
map->write_w(addr, val, map->priv);
|
||||
else {
|
||||
mem_writeb_phys(addr, val & 0xff);
|
||||
mem_writeb_phys(addr + 1, val >> 8);
|
||||
mem_writeb_map(addr, val & 0xff);
|
||||
mem_writeb_map(addr + 1, val >> 8);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -161,10 +161,10 @@ mem_writel_map(uint32_t addr, uint32_t val)
|
||||
mem_logical_addr = 0xffffffff;
|
||||
|
||||
if (!cpu_16bitbus && ((addr & MEM_GRANULARITY_MASK) <= MEM_GRANULARITY_QBOUND) && (map && map->write_l))
|
||||
map->write_l(addr, val, map->priv);
|
||||
map->write_l(addr, val, map->priv);
|
||||
else {
|
||||
mem_writew_phys(addr, val & 0xffff);
|
||||
mem_writew_phys(addr + 2, val >> 16);
|
||||
mem_writew_map(addr, val & 0xffff);
|
||||
mem_writew_map(addr + 2, val >> 16);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -649,7 +649,7 @@ readmemll_2386(uint32_t addr)
|
||||
/* No need to waste precious CPU host cycles on mmutranslate's that were already done, just pass
|
||||
their result as a parameter to be used if needed. */
|
||||
return readmemwl_no_mmut_2386(addr, addr64a) |
|
||||
(((uint32_t) readmemwl_no_mmut(addr + 2, &(addr64a[2]))) << 16);
|
||||
(((uint32_t) readmemwl_no_mmut_2386(addr + 2, &(addr64a[2]))) << 16);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -925,10 +925,28 @@ readmemql_2386(uint32_t addr)
|
||||
addr = addr64a[0] & rammask;
|
||||
|
||||
map = read_mapping[addr >> MEM_GRANULARITY_BITS];
|
||||
if (map && map->read_l)
|
||||
return map->read_l(addr, map->priv) | ((uint64_t) map->read_l(addr + 4, map->priv) << 32);
|
||||
|
||||
return readmemll(addr) | ((uint64_t) readmemll(addr + 4) << 32);
|
||||
if (map && map->read_l)
|
||||
return map->read_l(addr, map->priv) |
|
||||
((uint64_t) map->read_l(addr + 4, map->priv) << 32);
|
||||
|
||||
if (map && map->read_w)
|
||||
return map->read_w(addr, map->priv) |
|
||||
((uint64_t) map->read_w(addr + 2, map->priv) << 16) |
|
||||
((uint64_t) map->read_w(addr + 4, map->priv) << 32) |
|
||||
((uint64_t) map->read_w(addr + 6, map->priv) << 48);
|
||||
|
||||
if (map && map->read_b)
|
||||
return map->read_b(addr, map->priv) |
|
||||
((uint64_t) map->read_b(addr + 1, map->priv) << 8) |
|
||||
((uint64_t) map->read_b(addr + 2, map->priv) << 16) |
|
||||
((uint64_t) map->read_b(addr + 3, map->priv) << 24) |
|
||||
((uint64_t) map->read_b(addr + 4, map->priv) << 32) |
|
||||
((uint64_t) map->read_b(addr + 5, map->priv) << 40) |
|
||||
((uint64_t) map->read_b(addr + 6, map->priv) << 48) |
|
||||
((uint64_t) map->read_b(addr + 7, map->priv) << 56);
|
||||
|
||||
return 0xffffffffffffffffULL;
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -798,6 +798,30 @@ MainWindow::closeEvent(QCloseEvent *event)
|
||||
event->accept();
|
||||
}
|
||||
|
||||
void
|
||||
MainWindow::resizeEvent(QResizeEvent *event)
|
||||
{
|
||||
//qDebug() << pos().x() + event->size().width();
|
||||
//qDebug() << pos().y() + event->size().height();
|
||||
if (vid_resize == 1)
|
||||
return;
|
||||
|
||||
int newX = pos().x();
|
||||
int newY = pos().y();
|
||||
|
||||
if (((frameGeometry().x() + event->size().width() + 1) > util::screenOfWidget(this)->availableGeometry().right())) {
|
||||
//move(util::screenOfWidget(this)->availableGeometry().right() - size().width() - 1, pos().y());
|
||||
newX = util::screenOfWidget(this)->availableGeometry().right() - frameGeometry().width() - 1;
|
||||
if (newX < 1) newX = 1;
|
||||
}
|
||||
|
||||
if (((frameGeometry().y() + event->size().height() + 1) > util::screenOfWidget(this)->availableGeometry().bottom())) {
|
||||
newY = util::screenOfWidget(this)->availableGeometry().bottom() - frameGeometry().height() - 1;
|
||||
if (newY < 1) newY = 1;
|
||||
}
|
||||
move(newX, newY);
|
||||
}
|
||||
|
||||
void
|
||||
MainWindow::initRendererMonitorSlot(int monitor_index)
|
||||
{
|
||||
|
||||
@@ -137,6 +137,7 @@ protected:
|
||||
void showEvent(QShowEvent *event) override;
|
||||
void closeEvent(QCloseEvent *event) override;
|
||||
void changeEvent(QEvent *event) override;
|
||||
void resizeEvent(QResizeEvent *event) override;
|
||||
|
||||
private slots:
|
||||
void on_actionPen_triggered();
|
||||
|
||||
@@ -116,6 +116,11 @@ ProgSettings::ProgSettings(QWidget *parent)
|
||||
ui->horizontalSlider->setValue(mouseSensitivity * 100.);
|
||||
ui->openDirUsrPath->setChecked(open_dir_usr_path > 0);
|
||||
ui->checkBoxMultimediaKeys->setChecked(inhibit_multimedia_keys);
|
||||
ui->checkBoxConfirmExit->setChecked(confirm_exit);
|
||||
ui->checkBoxConfirmSave->setChecked(confirm_save);
|
||||
ui->checkBoxConfirmHardReset->setChecked(confirm_reset);
|
||||
ui->checkBoxFullscreenFirst->setChecked(video_fullscreen_first);
|
||||
|
||||
#ifndef Q_OS_WINDOWS
|
||||
ui->checkBoxMultimediaKeys->setHidden(true);
|
||||
#endif
|
||||
@@ -127,6 +132,10 @@ ProgSettings::accept()
|
||||
strcpy(icon_set, ui->comboBox->currentData().toString().toUtf8().data());
|
||||
lang_id = ui->comboBoxLanguage->currentData().toUInt();
|
||||
open_dir_usr_path = ui->openDirUsrPath->isChecked() ? 1 : 0;
|
||||
confirm_exit = ui->checkBoxConfirmExit->isChecked() ? 1 : 0;
|
||||
confirm_save = ui->checkBoxConfirmSave->isChecked() ? 1 : 0;
|
||||
confirm_reset = ui->checkBoxConfirmHardReset->isChecked() ? 1 : 0;
|
||||
video_fullscreen_first = ui->checkBoxFullscreenFirst->isChecked() ? 1 : 0;
|
||||
inhibit_multimedia_keys = ui->checkBoxMultimediaKeys->isChecked();
|
||||
|
||||
loadTranslators(QCoreApplication::instance());
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>458</width>
|
||||
<height>374</height>
|
||||
<height>391</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
@@ -29,13 +29,17 @@
|
||||
<property name="sizeConstraint">
|
||||
<enum>QLayout::SizeConstraint::SetFixedSize</enum>
|
||||
</property>
|
||||
<item row="9" column="0">
|
||||
<widget class="QCheckBox" name="openDirUsrPath">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>When selecting media images (CD-ROM, floppy, etc.) the open dialog will start in the same directory as the 86Box configuration file. This setting will likely only make a difference on macOS.</p></body></html></string>
|
||||
</property>
|
||||
<item row="5" column="1">
|
||||
<widget class="QPushButton" name="pushButtonLanguage">
|
||||
<property name="text">
|
||||
<string>Select media images from program working directory</string>
|
||||
<string>Default</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0" colspan="2">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Icon set:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -52,19 +56,6 @@
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Orientation::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="4" column="0" colspan="2">
|
||||
<widget class="QComboBox" name="comboBoxLanguage">
|
||||
<property name="maxVisibleItems">
|
||||
@@ -77,15 +68,25 @@
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<widget class="QPushButton" name="pushButtonLanguage">
|
||||
<item row="9" column="0">
|
||||
<widget class="QCheckBox" name="openDirUsrPath">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>When selecting media images (CD-ROM, floppy, etc.) the open dialog will start in the same directory as the 86Box configuration file. This setting will likely only make a difference on macOS.</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Select media images from program working directory</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QPushButton" name="pushButton">
|
||||
<property name="text">
|
||||
<string>Default</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<spacer name="horizontalSpacer">
|
||||
<item row="5" column="0">
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Orientation::Horizontal</enum>
|
||||
</property>
|
||||
@@ -97,27 +98,10 @@
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="13" column="0" colspan="2">
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Orientation::Horizontal</enum>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::StandardButton::Cancel|QDialogButtonBox::StandardButton::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0" colspan="2">
|
||||
<widget class="QLabel" name="label">
|
||||
<item row="8" column="1">
|
||||
<widget class="QPushButton" name="pushButton_2">
|
||||
<property name="text">
|
||||
<string>Icon set:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0" colspan="2">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Language:</string>
|
||||
<string>Default</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -143,6 +127,37 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0" colspan="2">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Language:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="11" column="0">
|
||||
<widget class="QCheckBox" name="checkBoxConfirmSave">
|
||||
<property name="text">
|
||||
<string>Ask for confirmation before saving settings</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="16" column="0" colspan="2">
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Orientation::Horizontal</enum>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::StandardButton::Cancel|QDialogButtonBox::StandardButton::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="0">
|
||||
<widget class="QCheckBox" name="checkBoxMultimediaKeys">
|
||||
<property name="text">
|
||||
<string>Inhibit multimedia keys on Windows</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" colspan="2">
|
||||
<widget class="QComboBox" name="comboBox">
|
||||
<property name="editable">
|
||||
@@ -158,6 +173,19 @@
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Orientation::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
@@ -165,24 +193,24 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QPushButton" name="pushButton">
|
||||
<item row="13" column="0">
|
||||
<widget class="QCheckBox" name="checkBoxConfirmHardReset">
|
||||
<property name="text">
|
||||
<string>Default</string>
|
||||
<string>Ask for confirmation before hard resetting</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="1">
|
||||
<widget class="QPushButton" name="pushButton_2">
|
||||
<item row="12" column="0">
|
||||
<widget class="QCheckBox" name="checkBoxConfirmExit">
|
||||
<property name="text">
|
||||
<string>Default</string>
|
||||
<string>Ask for confirmation before quitting</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="0">
|
||||
<widget class="QCheckBox" name="checkBoxMultimediaKeys">
|
||||
<item row="14" column="0">
|
||||
<widget class="QCheckBox" name="checkBoxFullscreenFirst">
|
||||
<property name="text">
|
||||
<string>Inhibit multimedia keys on Windows</string>
|
||||
<string>Display hotkey message when entering full-screen mode</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include <QStackedWidget>
|
||||
#include <QWidget>
|
||||
#include <QCursor>
|
||||
#include <QScreen>
|
||||
|
||||
#include <atomic>
|
||||
#include <memory>
|
||||
@@ -14,6 +15,7 @@
|
||||
#include <vector>
|
||||
|
||||
#include "qt_renderercommon.hpp"
|
||||
#include "qt_util.hpp"
|
||||
|
||||
#include <atomic>
|
||||
|
||||
@@ -21,6 +23,11 @@ namespace Ui {
|
||||
class RendererStack;
|
||||
}
|
||||
|
||||
extern "C"
|
||||
{
|
||||
extern int vid_resize;
|
||||
}
|
||||
|
||||
class RendererCommon;
|
||||
class RendererStack : public QStackedWidget {
|
||||
Q_OBJECT
|
||||
@@ -43,6 +50,22 @@ public:
|
||||
void changeEvent(QEvent *event) override;
|
||||
void resizeEvent(QResizeEvent *event) override
|
||||
{
|
||||
if (this->m_monitor_index != 0 && vid_resize != 1) {
|
||||
int newX = pos().x();
|
||||
int newY = pos().y();
|
||||
|
||||
if (((frameGeometry().x() + event->size().width() + 1) > util::screenOfWidget(this)->availableGeometry().right())) {
|
||||
//move(util::screenOfWidget(this)->availableGeometry().right() - size().width() - 1, pos().y());
|
||||
newX = util::screenOfWidget(this)->availableGeometry().right() - frameGeometry().width() - 1;
|
||||
if (newX < 1) newX = 1;
|
||||
}
|
||||
|
||||
if (((frameGeometry().y() + event->size().height() + 1) > util::screenOfWidget(this)->availableGeometry().bottom())) {
|
||||
newY = util::screenOfWidget(this)->availableGeometry().bottom() - frameGeometry().height() - 1;
|
||||
if (newY < 1) newY = 1;
|
||||
}
|
||||
move(newX, newY);
|
||||
}
|
||||
onResize(event->size().width(), event->size().height());
|
||||
}
|
||||
void keyPressEvent(QKeyEvent *event) override
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#include <86box/timer.h>
|
||||
#include <86box/pic.h>
|
||||
#include <86box/pit.h>
|
||||
#include <86box/plat.h>
|
||||
#include <86box/mem.h>
|
||||
#include <86box/rom.h>
|
||||
#include <86box/device.h>
|
||||
@@ -800,9 +801,11 @@ if386_p6x_write(uint16_t port, uint8_t val, void *priv)
|
||||
}
|
||||
jega_recalctimings(jega);
|
||||
} else if (p65idx == 0x05) {
|
||||
if (val & 0x10) { /* Power off (instead this call hardware reset here) */
|
||||
if (val & 0x10)
|
||||
/* Power off (instead this call hardware reset here) */
|
||||
resetx86();
|
||||
}
|
||||
/* Actually, power off - we have a function for that! */
|
||||
// plat_power_off();
|
||||
}
|
||||
}
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user