Merge branch 'master' of https://github.com/86Box/86Box
This commit is contained in:
@@ -293,11 +293,11 @@ static int opPOPFD(uint32_t fetchdat)
|
|||||||
else if (IOPLp) cpu_state.flags = (cpu_state.flags & 0x3000) | (templ & 0x4fd5) | 2;
|
else if (IOPLp) cpu_state.flags = (cpu_state.flags & 0x3000) | (templ & 0x4fd5) | 2;
|
||||||
else cpu_state.flags = (cpu_state.flags & 0x3200) | (templ & 0x4dd5) | 2;
|
else cpu_state.flags = (cpu_state.flags & 0x3200) | (templ & 0x4dd5) | 2;
|
||||||
|
|
||||||
templ &= (is486) ? 0x3c0000 : 0;
|
templ &= (is486 || isibm486) ? 0x3c0000 : 0;
|
||||||
templ |= ((cpu_state.eflags&3) << 16);
|
templ |= ((cpu_state.eflags&3) << 16);
|
||||||
if (cpu_CR4_mask & CR4_VME) cpu_state.eflags = (templ >> 16) & 0x3f;
|
if (cpu_CR4_mask & CR4_VME) cpu_state.eflags = (templ >> 16) & 0x3f;
|
||||||
else if (CPUID) cpu_state.eflags = (templ >> 16) & 0x27;
|
else if (CPUID) cpu_state.eflags = (templ >> 16) & 0x27;
|
||||||
else if (is486) cpu_state.eflags = (templ >> 16) & 7;
|
else if (is486 || isibm486) cpu_state.eflags = (templ >> 16) & 7;
|
||||||
else cpu_state.eflags = (templ >> 16) & 3;
|
else cpu_state.eflags = (templ >> 16) & 3;
|
||||||
|
|
||||||
flags_extract();
|
flags_extract();
|
||||||
|
@@ -302,7 +302,7 @@ mmutranslatereal_normal(uint32_t addr, int rw)
|
|||||||
|
|
||||||
if ((temp & 0x80) && (cr4 & CR4_PSE)) {
|
if ((temp & 0x80) && (cr4 & CR4_PSE)) {
|
||||||
/*4MB page*/
|
/*4MB page*/
|
||||||
if (((CPL == 3) && !(temp & 4) && !cpl_override) || (rw && !(temp & 2) && (((CPL == 3) && !cpl_override) || (is486 && (cr0 & WP_FLAG))))) {
|
if (((CPL == 3) && !(temp & 4) && !cpl_override) || (rw && !(temp & 2) && (((CPL == 3) && !cpl_override) || ((is486 || isibm486) && (cr0 & WP_FLAG))))) {
|
||||||
cr2 = addr;
|
cr2 = addr;
|
||||||
temp &= 1;
|
temp &= 1;
|
||||||
if (CPL == 3)
|
if (CPL == 3)
|
||||||
@@ -323,7 +323,7 @@ mmutranslatereal_normal(uint32_t addr, int rw)
|
|||||||
|
|
||||||
temp = rammap((temp & ~0xfff) + ((addr >> 10) & 0xffc));
|
temp = rammap((temp & ~0xfff) + ((addr >> 10) & 0xffc));
|
||||||
temp3 = temp & temp2;
|
temp3 = temp & temp2;
|
||||||
if (!(temp & 1) || ((CPL == 3) && !(temp3 & 4) && !cpl_override) || (rw && !(temp3 & 2) && (((CPL == 3) && !cpl_override) || (is486 && (cr0 & WP_FLAG))))) {
|
if (!(temp & 1) || ((CPL == 3) && !(temp3 & 4) && !cpl_override) || (rw && !(temp3 & 2) && (((CPL == 3) && !cpl_override) || ((is486 || isibm486) && (cr0 & WP_FLAG))))) {
|
||||||
cr2 = addr;
|
cr2 = addr;
|
||||||
temp &= 1;
|
temp &= 1;
|
||||||
if (CPL == 3)
|
if (CPL == 3)
|
||||||
|
@@ -46,7 +46,9 @@ void HardwareRenderer::initializeGL()
|
|||||||
{
|
{
|
||||||
m_context->makeCurrent(this);
|
m_context->makeCurrent(this);
|
||||||
initializeOpenGLFunctions();
|
initializeOpenGLFunctions();
|
||||||
m_texture = new QOpenGLTexture(QImage(2048,2048, QImage::Format::Format_RGB32));
|
auto image = QImage(2048, 2048, QImage::Format_RGB32);
|
||||||
|
image.fill(0xff000000);
|
||||||
|
m_texture = new QOpenGLTexture(image);
|
||||||
m_blt = new QOpenGLTextureBlitter;
|
m_blt = new QOpenGLTextureBlitter;
|
||||||
m_blt->setRedBlueSwizzle(true);
|
m_blt->setRedBlueSwizzle(true);
|
||||||
m_blt->create();
|
m_blt->create();
|
||||||
@@ -138,6 +140,7 @@ void HardwareRenderer::initializeGL()
|
|||||||
pclog("OpenGL shader language version: %s\n", glGetString(GL_SHADING_LANGUAGE_VERSION));
|
pclog("OpenGL shader language version: %s\n", glGetString(GL_SHADING_LANGUAGE_VERSION));
|
||||||
glClearColor(0, 0, 0, 1);
|
glClearColor(0, 0, 0, 1);
|
||||||
m_texture->setWrapMode(QOpenGLTexture::ClampToEdge);
|
m_texture->setWrapMode(QOpenGLTexture::ClampToEdge);
|
||||||
|
update();
|
||||||
}
|
}
|
||||||
|
|
||||||
void HardwareRenderer::paintGL() {
|
void HardwareRenderer::paintGL() {
|
||||||
|
@@ -154,7 +154,7 @@ MainWindow::MainWindow(QWidget *parent) :
|
|||||||
ui->stackedWidget->setMouseTracking(true);
|
ui->stackedWidget->setMouseTracking(true);
|
||||||
statusBar()->setVisible(!hide_status_bar);
|
statusBar()->setVisible(!hide_status_bar);
|
||||||
statusBar()->setStyleSheet("QStatusBar::item {border: None; } QStatusBar QLabel { margin-right: 2px; margin-bottom: 1px; }");
|
statusBar()->setStyleSheet("QStatusBar::item {border: None; } QStatusBar QLabel { margin-right: 2px; margin-bottom: 1px; }");
|
||||||
this->setStyleSheet("#centralWidget { background-color: black; }");
|
this->centralWidget()->setStyleSheet("background-color: black;");
|
||||||
ui->toolBar->setVisible(!hide_tool_bar);
|
ui->toolBar->setVisible(!hide_tool_bar);
|
||||||
renderers[0].reset(nullptr);
|
renderers[0].reset(nullptr);
|
||||||
auto toolbar_spacer = new QWidget();
|
auto toolbar_spacer = new QWidget();
|
||||||
@@ -507,15 +507,6 @@ MainWindow::MainWindow(QWidget *parent) :
|
|||||||
#endif
|
#endif
|
||||||
if (!vnc_enabled) video_setblit(qt_blit);
|
if (!vnc_enabled) video_setblit(qt_blit);
|
||||||
|
|
||||||
if (start_in_fullscreen) {
|
|
||||||
connect(ui->stackedWidget, &RendererStack::blit, this, [this] () {
|
|
||||||
if (start_in_fullscreen) {
|
|
||||||
QTimer::singleShot(100, ui->actionFullscreen, &QAction::trigger);
|
|
||||||
start_in_fullscreen = 0;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef MTR_ENABLED
|
#ifdef MTR_ENABLED
|
||||||
{
|
{
|
||||||
ui->actionBegin_trace->setVisible(true);
|
ui->actionBegin_trace->setVisible(true);
|
||||||
@@ -711,6 +702,10 @@ void MainWindow::showEvent(QShowEvent *event) {
|
|||||||
QApplication::processEvents();
|
QApplication::processEvents();
|
||||||
this->adjustSize();
|
this->adjustSize();
|
||||||
}
|
}
|
||||||
|
if (start_in_fullscreen) {
|
||||||
|
start_in_fullscreen = 0;
|
||||||
|
QTimer::singleShot(0, ui->actionFullscreen, &QAction::trigger);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::on_actionKeyboard_requires_capture_triggered() {
|
void MainWindow::on_actionKeyboard_requires_capture_triggered() {
|
||||||
|
@@ -14,6 +14,7 @@
|
|||||||
* Copyright 2022 Teemu Korhonen
|
* Copyright 2022 Teemu Korhonen
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <GL/gl.h>
|
||||||
#include <QCoreApplication>
|
#include <QCoreApplication>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
#include <QOpenGLShaderProgram>
|
#include <QOpenGLShaderProgram>
|
||||||
@@ -194,6 +195,9 @@ OpenGLRenderer::initialize()
|
|||||||
|
|
||||||
emit initialized();
|
emit initialized();
|
||||||
|
|
||||||
|
glClear(GL_COLOR_BUFFER_BIT);
|
||||||
|
|
||||||
|
context->swapBuffers(this);
|
||||||
} catch (const opengl_init_error &e) {
|
} catch (const opengl_init_error &e) {
|
||||||
/* Mark all buffers as in use */
|
/* Mark all buffers as in use */
|
||||||
for (auto &flag : buf_usage)
|
for (auto &flag : buf_usage)
|
||||||
|
@@ -416,6 +416,7 @@ RendererStack::createRenderer(Renderer renderer)
|
|||||||
current->setFocusPolicy(Qt::NoFocus);
|
current->setFocusPolicy(Qt::NoFocus);
|
||||||
current->setFocusProxy(this);
|
current->setFocusProxy(this);
|
||||||
current->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
current->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
||||||
|
current->setStyleSheet("background-color: black");
|
||||||
addWidget(current.get());
|
addWidget(current.get());
|
||||||
|
|
||||||
this->setStyleSheet("background-color: black");
|
this->setStyleSheet("background-color: black");
|
||||||
|
Reference in New Issue
Block a user