Merge remote-tracking branch 'upstream/master' into version/4.1

This commit is contained in:
Jasmine Iwanek
2023-08-16 14:05:00 -04:00
40 changed files with 1086 additions and 629 deletions

View File

@@ -191,6 +191,10 @@ jobs:
triplet: x64-windows-static
toolchain: ./cmake/llvm-win32-x86_64.cmake
vcvars: x64
# - name: ARM
# triplet: arm-windows-static
# toolchain: ./cmake/llvm-win32-arm.cmake
# vcvars: x64_arm
- name: ARM64
triplet: arm64-windows-static
toolchain: ./cmake/llvm-win32-aarch64.cmake
@@ -217,7 +221,7 @@ jobs:
- name: Setup NuGet Credentials
run: >
& (C:/vcpkg/vcpkg fetch nuget | tail -n 2)
& (C:/vcpkg/vcpkg --vcpkg-root "${{ env.VCPKG_ROOT }}" fetch nuget | tail -n 2)
sources add
-source "https://nuget.pkg.github.com/86Box/index.json"
-storepasswordincleartext

View File

@@ -2,6 +2,7 @@
=====
[![Build Status](https://ci.86box.net/job/86Box/badge/icon)](https://ci.86box.net/job/86Box/)
[![License](https://img.shields.io/github/license/86Box/86Box)](COPYING) [![Latest release](https://img.shields.io/github/release/86Box/86Box.svg)](https://github.com/86Box/86Box/releases) [![Downloads](https://img.shields.io/github/downloads/86Box/86Box/total.svg)](https://github.com/86Box/86Box/releases)
**86Box** is a low level x86 emulator that runs older operating systems and software designed for IBM PC systems and compatibles from 1981 through fairly recent system designs based on the PCI bus.

View File

@@ -1868,10 +1868,8 @@ cdrom_insert(uint8_t id)
{
cdrom_t *dev = &cdrom[id];
if (dev->bus_type) {
if (dev->insert)
dev->insert(dev->priv);
}
if (dev->bus_type && dev->insert)
dev->insert(dev->priv);
}
/* The mechanics of ejecting a CD-ROM from a drive. */

View File

@@ -445,6 +445,7 @@ mvhd_file_is_vhd(FILE* f)
}
mvhd_fseeko64(f, -MVHD_FOOTER_SIZE, SEEK_END);
(void) !fread(con_str, sizeof con_str, 1, f);
if (mvhd_is_conectix_str(con_str)) {
return 1;
}

View File

@@ -63,7 +63,8 @@ enum {
#define KNOWN_CDROM_DRIVE_TYPES 35
#define BUS_TYPE_IDE CDROM_BUS_ATAPI
#define BUS_TYPE_SCSI CDROM_BUS_SCSI
#define BUS_TYPE_BOTH -1
#define BUS_TYPE_BOTH -2
#define BUS_TYPE_NONE -1
static const struct
{
@@ -109,7 +110,7 @@ static const struct
{ "TOSHIBA", "CD-ROM DRIVE:XM", "3433", "(SCSI) TOSHIBA CD-ROM DRIVE:XM 3433", "TOSHIBA_CD-ROM_DRIVEXM_3433", BUS_TYPE_SCSI }, /*33*/
{ "TOSHIBA", "CD-ROM XM-3301TA", "0272", "(SCSI) TOSHIBA CD-ROM XM-3301TA 0272", "TOSHIBA_CD-ROM_XM-3301TA_0272", BUS_TYPE_SCSI }, /*34*/
{ "TOSHIBA", "CD-ROM XM-5701TA", "3136", "(SCSI) TOSHIBA CD-ROM XM-5701TA 3136", "TOSHIBA_CD-ROM_XM-5701TA_3136", BUS_TYPE_SCSI }, /*35*/
{ "", "", "", "", "", -1 },
{ "", "", "", "", "", BUS_TYPE_NONE },
};
/* To shut up the GCC compilers. */

View File

@@ -55,15 +55,6 @@ extern int strnicmp(const char *s1, const char *s2, size_t n);
# define off64_t off_t
#endif
#if __has_attribute(fallthrough)
# define fallthrough __attribute__((fallthrough))
#else
# if __has_attribute(__fallthrough__)
# define fallthrough __attribute__((__fallthrough__))
# endif
# define fallthrough do {} while (0) /* fallthrough */
#endif
#ifdef _MSC_VER
# define UNUSED(arg) arg
#else
@@ -89,6 +80,19 @@ extern "C" {
# define ssize_t intptr_t
#endif
#ifdef _MSC_VER
# define fallthrough do {} while (0) /* fallthrough */
#else
# if __has_attribute(fallthrough)
# define fallthrough __attribute__((fallthrough))
# else
# if __has_attribute(__fallthrough__)
# define fallthrough __attribute__((__fallthrough__))
# endif
# define fallthrough do {} while (0) /* fallthrough */
# endif
#endif
/* Global variables residing in the platform module. */
extern int dopause; /* system is paused */
extern int mouse_capture; /* mouse is captured in app */

View File

@@ -18,13 +18,17 @@
#ifndef EMU_PLAT_FALLTHROUGH_H
#define EMU_PLAT_FALLTHROUGH_H
#if __has_attribute(__fallthrough__)
# define fallthrough __attribute__((__fallthrough__))
#ifdef _MSC_VER
# define fallthrough do {} while (0) /* fallthrough */
#else
# if __has_attribute(fallthrough)
# define fallthrough __attribute__((fallthrough))
# else
# if __has_attribute(__fallthrough__)
# define fallthrough __attribute__((__fallthrough__))
# endif
# define fallthrough do {} while (0) /* fallthrough */
# endif
# define fallthrough do {} while (0) /* fallthrough */
#endif
#endif /*EMU_PLAT_FALLTHROUGH_H*/

View File

@@ -166,7 +166,7 @@ machine_common_init(UNUSED(const machine_t *model))
int pit_type = IS_AT(machine) ? PIT_8254 : PIT_8253;
/* Select fast PIT if needed */
if ((pit_mode == -1 && is486) || pit_mode == 1)
if (((pit_mode == -1) && is486) || (pit_mode == 1))
pit_type += 2;
pit_common_init(pit_type, pit_irq0_timer, NULL);

View File

@@ -656,7 +656,7 @@ msgid "(empty)"
msgstr "(prázdné)"
msgid "All files"
msgstr "All files"
msgstr "Všechny soubory"
msgid "Turbo"
msgstr "Turbo"
@@ -932,10 +932,10 @@ msgid "Cartridge images"
msgstr "Obrazy cartridge"
msgid "Error initializing renderer"
msgstr "Error initializing renderer"
msgstr "Chyba při inicializaci vykreslovače"
msgid "OpenGL (3.0 Core) renderer could not be initialized. Use another renderer."
msgstr "OpenGL (3.0 Core) renderer could not be initialized. Use another renderer."
msgstr "Vykreslovač OpenGL (3.0 Core) se nepodařilo inicializovat. Použijte jiný renderer."
msgid "Resume execution"
msgstr "Obnovit"
@@ -1196,8 +1196,19 @@ msgid "(System Default)"
msgstr "(Výchozí nastavení systému)"
msgid "Failed to initialize network driver"
msgstr "Failed to initialize network driver"
msgstr "Nepodařilo se inicializovat síťový ovladač"
msgid "The network configuration will be switched to the null driver"
msgstr "The network configuration will be switched to the null driver"
msgstr "Konfigurace sítě bude přepnuta na nulový ovladač"
msgid "PIT mode:"
msgstr "Režim PIT:"
msgid "Auto"
msgstr "Automatický"
msgid "Slow"
msgstr "Pomalý"
msgid "Fast"
msgstr "Rychlý"

View File

@@ -98,7 +98,7 @@ msgid "Filter method"
msgstr "Filteringmethode"
msgid "&Nearest"
msgstr "&Nearest"
msgstr "&Nächst"
msgid "&Linear"
msgstr "&Linear"
@@ -1196,8 +1196,20 @@ msgid "(System Default)"
msgstr "(Systemstandard)"
msgid "Failed to initialize network driver"
msgstr "Failed to initialize network driver"
msgstr "Netzwerktreiber konnte nicht initialisiert werden"
msgid "The network configuration will be switched to the null driver"
msgstr "The network configuration will be switched to the null driver"
msgstr "Die Netzwerkkonfiguration wird auf den Nulltreiber umgestellt"
msgid "PIT mode:"
msgstr "PIT-Modus:"
msgid "Auto"
msgstr "Auto"
msgid "Slow"
msgstr "Langsam"
msgid "Fast"
msgstr "Schnell"

View File

@@ -1201,3 +1201,15 @@ msgstr "Failed to initialize network driver"
msgid "The network configuration will be switched to the null driver"
msgstr "The network configuration will be switched to the null driver"
msgid "PIT mode:"
msgstr "PIT mode:"
msgid "Auto"
msgstr "Auto"
msgid "Slow"
msgstr "Slow"
msgid "Fast"
msgstr "Fast"

View File

@@ -1201,3 +1201,15 @@ msgstr "Failed to initialize network driver"
msgid "The network configuration will be switched to the null driver"
msgstr "The network configuration will be switched to the null driver"
msgid "PIT mode:"
msgstr "PIT mode:"
msgid "Auto"
msgstr "Auto"
msgid "Slow"
msgstr "Slow"
msgid "Fast"
msgstr "Fast"

View File

@@ -932,28 +932,28 @@ msgid "Cartridge images"
msgstr "Imágenes de Cartucho"
msgid "Error initializing renderer"
msgstr "Error initializing renderer"
msgstr "Error al inicializar el renderizador"
msgid "OpenGL (3.0 Core) renderer could not be initialized. Use another renderer."
msgstr "OpenGL (3.0 Core) renderer could not be initialized. Use another renderer."
msgstr "No se ha podido inicializar el renderizador OpenGL (3.0 Core). Utilice otro renderizador."
msgid "Resume execution"
msgstr "Resume execution"
msgstr "Retomar la ejecución"
msgid "Pause execution"
msgstr "Pause execution"
msgstr "Pausar la ejecución"
msgid "Press Ctrl+Alt+Del"
msgstr "Press Ctrl+Alt+Del"
msgstr "Pulsar Ctrl+Alt+Supr"
msgid "Press Ctrl+Alt+Esc"
msgstr "Press Ctrl+Alt+Esc"
msgstr "Pulsar Ctrl+Alt+Esc"
msgid "Hard reset"
msgstr "Hard reset"
msgid "ACPI shutdown"
msgstr "ACPI shutdown"
msgstr "Parada ACPI"
msgid "Hard disk (%s)"
msgstr "Disco duro (%s)"
@@ -1196,8 +1196,20 @@ msgid "(System Default)"
msgstr "(Por defecto del sistema)"
msgid "Failed to initialize network driver"
msgstr "Failed to initialize network driver"
msgstr "Error al inicializar el controlador de red"
msgid "The network configuration will be switched to the null driver"
msgstr "The network configuration will be switched to the null driver"
msgstr "La configuración de red se cambiará al controlador nulo"
msgid "PIT mode:"
msgstr "Modalidad PIT:"
msgid "Auto"
msgstr "Automática"
msgid "Slow"
msgstr "Lenta"
msgid "Fast"
msgstr "Rápida"

View File

@@ -1196,8 +1196,20 @@ msgid "(System Default)"
msgstr "(Järjestelmän oletus)"
msgid "Failed to initialize network driver"
msgstr "Failed to initialize network driver"
msgstr "Verkkoajurin alustaminen epäonnistui"
msgid "The network configuration will be switched to the null driver"
msgstr "The network configuration will be switched to the null driver"
msgstr "Verkkokokoonpano vaihtuu nolla-ajuriin"
msgid "PIT mode:"
msgstr "PIT-tila:"
msgid "Auto"
msgstr "Automaattinen"
msgid "Slow"
msgstr "Hidas"
msgid "Fast"
msgstr "Nopea"

View File

@@ -932,28 +932,28 @@ msgid "Cartridge images"
msgstr "Images cartouche"
msgid "Error initializing renderer"
msgstr "Error initializing renderer"
msgstr "Erreur d'initialisation du moteur de rendu"
msgid "OpenGL (3.0 Core) renderer could not be initialized. Use another renderer."
msgstr "OpenGL (3.0 Core) renderer could not be initialized. Use another renderer."
msgstr "Le moteur de rendu OpenGL (3.0 Core) n'a pas pu être initialisé. Utilisez un autre moteur de rendu."
msgid "Resume execution"
msgstr "Resume execution"
msgstr "Reprendre l'exécution"
msgid "Pause execution"
msgstr "Pause execution"
msgstr "Pause de l'exécution"
msgid "Press Ctrl+Alt+Del"
msgstr "Press Ctrl+Alt+Del"
msgstr "Appuyer sur Ctrl+Alt+Suppr."
msgid "Press Ctrl+Alt+Esc"
msgstr "Press Ctrl+Alt+Esc"
msgstr "Appuyer sur Ctrl+Alt+Esc"
msgid "Hard reset"
msgstr "Hard reset"
msgid "ACPI shutdown"
msgstr "ACPI shutdown"
msgstr "Arrêt ACPI"
msgid "Hard disk (%s)"
msgstr "Disque dur (%s)"
@@ -1196,8 +1196,20 @@ msgid "(System Default)"
msgstr "(Défaut du système)"
msgid "Failed to initialize network driver"
msgstr "Failed to initialize network driver"
msgstr "Échec de l'initialisation du pilote réseau"
msgid "The network configuration will be switched to the null driver"
msgstr "The network configuration will be switched to the null driver"
msgstr "La configuration du réseau passera au pilote nul"
msgid "PIT mode:"
msgstr "Mode PIT:"
msgid "Auto"
msgstr "Auto"
msgid "Slow"
msgstr "Lent"
msgid "Fast"
msgstr "Rapide"

View File

@@ -1196,8 +1196,20 @@ msgid "(System Default)"
msgstr "(Zadana postavka operativnog sustava)"
msgid "Failed to initialize network driver"
msgstr "Failed to initialize network driver"
msgstr "Neuspješno pokretanje mrežnog upravljačkog programa"
msgid "The network configuration will be switched to the null driver"
msgstr "The network configuration will be switched to the null driver"
msgstr "Konfiguracija mreže bit će prebačena na nulti upravljački program"
msgid "PIT mode:"
msgstr "PIT način:"
msgid "Auto"
msgstr "Auto"
msgid "Slow"
msgstr "Spori"
msgid "Fast"
msgstr "Brzi"

View File

@@ -938,22 +938,22 @@ msgid "OpenGL (3.0 Core) renderer could not be initialized. Use another renderer
msgstr "Az OpenGL (3.0 Core) megjelenítő-motort nem sikerült inicializálni. Kérem használjon másik renderelőt."
msgid "Resume execution"
msgstr "Resume execution"
msgstr "Folytassa a végrehajtást"
msgid "Pause execution"
msgstr "Pause execution"
msgstr "Kivitelezés szüneteltetése"
msgid "Press Ctrl+Alt+Del"
msgstr "Press Ctrl+Alt+Del"
msgstr "Nyomja meg a Ctrl+Alt+Del"
msgid "Press Ctrl+Alt+Esc"
msgstr "Press Ctrl+Alt+Esc"
msgstr "Nyomja meg a Ctrl+Alt+Esc"
msgid "Hard reset"
msgstr "Hard reset"
msgstr "Hardveres újraindítás"
msgid "ACPI shutdown"
msgstr "ACPI shutdown"
msgstr "ACPI leállítás"
msgid "Hard disk (%s)"
msgstr "Merevlemez (%s)"
@@ -1196,8 +1196,20 @@ msgid "(System Default)"
msgstr "(A rendszer nyelve)"
msgid "Failed to initialize network driver"
msgstr "Failed to initialize network driver"
msgstr "Nem sikerült inicializálni a hálózati illesztőprogramot"
msgid "The network configuration will be switched to the null driver"
msgstr "The network configuration will be switched to the null driver"
msgstr "A hálózati konfiguráció átvált a null illesztőprogramra"
msgid "PIT mode:"
msgstr "PIT üzemmód:"
msgid "Auto"
msgstr "Automatikus"
msgid "Slow"
msgstr "Lassú"
msgid "Fast"
msgstr "Gyors"

View File

@@ -866,7 +866,7 @@ msgid "libpcap"
msgstr "libpcap"
msgid "Make sure libpcap is installed and that you are on a libpcap-compatible network connection."
msgstr "Controlla se libpcap è installato e che tu sia connesso ad una connessione libpcap compatibile."
msgstr "Controllare se libpcap è installato e che tu sia connesso ad una connessione libpcap compatibile."
msgid "Invalid configuration"
msgstr "Configurazione invalida"
@@ -932,28 +932,28 @@ msgid "Cartridge images"
msgstr "Immagini cartuccia"
msgid "Error initializing renderer"
msgstr "Error initializing renderer"
msgstr "Errore nell'inizializzazione del renderer"
msgid "OpenGL (3.0 Core) renderer could not be initialized. Use another renderer."
msgstr "OpenGL (3.0 Core) renderer could not be initialized. Use another renderer."
msgstr "Non è stato possibile inizializzare il renderer OpenGL (3.0 Core). Utilizzare un altro renderer."
msgid "Resume execution"
msgstr "Resume execution"
msgstr "Riprendere l'esecuzione"
msgid "Pause execution"
msgstr "Pause execution"
msgstr "Sospendere l'esecuzione"
msgid "Press Ctrl+Alt+Del"
msgstr "Press Ctrl+Alt+Del"
msgstr "Premere Ctrl+Alt+Canc"
msgid "Press Ctrl+Alt+Esc"
msgstr "Press Ctrl+Alt+Esc"
msgstr "Premere Ctrl+Alt+Esc"
msgid "Hard reset"
msgstr "Hard reset"
msgstr "Riavvia"
msgid "ACPI shutdown"
msgstr "ACPI shutdown"
msgstr "Arresto ACPI"
msgid "Hard disk (%s)"
msgstr "Hard disk (%s)"
@@ -1196,8 +1196,20 @@ msgid "(System Default)"
msgstr "(Predefinito del sistema)"
msgid "Failed to initialize network driver"
msgstr "Failed to initialize network driver"
msgstr "Impossibile inizializzare il driver di rete"
msgid "The network configuration will be switched to the null driver"
msgstr "The network configuration will be switched to the null driver"
msgstr "La configurazione di rete verrà commutata sul driver nullo"
msgid "PIT mode:"
msgstr "Modalità PIT:"
msgid "Auto"
msgstr "Automatica"
msgid "Slow"
msgstr "Lenta"
msgid "Fast"
msgstr "Veloce"

View File

@@ -1196,8 +1196,20 @@ msgid "(System Default)"
msgstr "(システム既定値)"
msgid "Failed to initialize network driver"
msgstr "Failed to initialize network driver"
msgstr "ネットワークドライバの初期化に失敗しました"
msgid "The network configuration will be switched to the null driver"
msgstr "The network configuration will be switched to the null driver"
msgstr "ネットワーク設定がヌル・ドライバに切り替わる"
msgid "PIT mode:"
msgstr "PITモード:"
msgid "Auto"
msgstr "オート"
msgid "Slow"
msgstr "遅い"
msgid "Fast"
msgstr "速い"

View File

@@ -1196,8 +1196,20 @@ msgid "(System Default)"
msgstr "(시스템 기본값)"
msgid "Failed to initialize network driver"
msgstr "Failed to initialize network driver"
msgstr "네트워크 드라이버를 초기화하지 못했습니다"
msgid "The network configuration will be switched to the null driver"
msgstr "The network configuration will be switched to the null driver"
msgstr "네트워크 구성이 널 드라이버로 전환됩니다"
msgid "PIT mode:"
msgstr "PIT 모드:"
msgid "Auto"
msgstr "자동"
msgid "Slow"
msgstr "느린"
msgid "Fast"
msgstr "빠른"

View File

@@ -1196,8 +1196,20 @@ msgid "(System Default)"
msgstr "(Domyślne ustawienie systemowe)"
msgid "Failed to initialize network driver"
msgstr "Failed to initialize network driver"
msgstr "Nie udało się zainicjować sterownika sieciowego"
msgid "The network configuration will be switched to the null driver"
msgstr "The network configuration will be switched to the null driver"
msgstr "Konfiguracja sieci zostanie przełączona na sterownik null"
msgid "PIT mode:"
msgstr "Tryb PIT:"
msgid "Auto"
msgstr "Automatyczny"
msgid "Slow"
msgstr "Powolny"
msgid "Fast"
msgstr "Szybki"

View File

@@ -1201,3 +1201,15 @@ msgstr "Falha ao inicializar o driver de rede"
msgid "The network configuration will be switched to the null driver"
msgstr "A configuração de rede será alterada para o driver nulo"
msgid "PIT mode:"
msgstr "Modo PIT:"
msgid "Auto"
msgstr "Automático"
msgid "Slow"
msgstr "Lento"
msgid "Fast"
msgstr "Rápido"

View File

@@ -1196,8 +1196,20 @@ msgid "(System Default)"
msgstr "(Padrão do sistema)"
msgid "Failed to initialize network driver"
msgstr "Failed to initialize network driver"
msgstr "Falha ao inicializar o driver de rede"
msgid "The network configuration will be switched to the null driver"
msgstr "The network configuration will be switched to the null driver"
msgstr "A configuração da rede será alterada para o controlador nulo"
msgid "PIT mode:"
msgstr "Modo PIT:"
msgid "Auto"
msgstr "Automático"
msgid "Slow"
msgstr "Lento"
msgid "Fast"
msgstr "Rápido"

View File

@@ -1196,8 +1196,20 @@ msgid "(System Default)"
msgstr "(Системный)"
msgid "Failed to initialize network driver"
msgstr "Failed to initialize network driver"
msgstr "Не удалось инициализировать сетевой драйвер"
msgid "The network configuration will be switched to the null driver"
msgstr "The network configuration will be switched to the null driver"
msgstr "Сетевая конфигурация будет переключена на нулевой драйвер"
msgid "PIT mode:"
msgstr "Режим PIT:"
msgid "Auto"
msgstr "Авто"
msgid "Slow"
msgstr "Медленный"
msgid "Fast"
msgstr "Быстрый"

View File

@@ -944,10 +944,10 @@ msgid "Pause execution"
msgstr "Prekini izvajanje"
msgid "Press Ctrl+Alt+Del"
msgstr "Press Ctrl+Alt+Del"
msgstr "Pritisni Ctrl+Alt+Del"
msgid "Press Ctrl+Alt+Esc"
msgstr "Press Ctrl+Alt+Esc"
msgstr "Pritisni Ctrl+Alt+Esc"
msgid "Hard reset"
msgstr "Ponovni zagon"
@@ -1196,8 +1196,20 @@ msgid "(System Default)"
msgstr "(Sistemsko privzeto)"
msgid "Failed to initialize network driver"
msgstr "Failed to initialize network driver"
msgstr "Ni uspelo inicializirati omrežnega gonilnika"
msgid "The network configuration will be switched to the null driver"
msgstr "The network configuration will be switched to the null driver"
msgstr "Omrežne nastavitve bodo preklopljene na ničelni gonilnik"
msgid "PIT mode:"
msgstr "Način PIT:"
msgid "Auto"
msgstr "Samodejni"
msgid "Slow"
msgstr "Počasni"
msgid "Fast"
msgstr "Hitri"

View File

@@ -1196,8 +1196,20 @@ msgid "(System Default)"
msgstr "(Sistem Varsayılanı)"
msgid "Failed to initialize network driver"
msgstr "Failed to initialize network driver"
msgstr "Ağ sürücüsü başlatılamadı"
msgid "The network configuration will be switched to the null driver"
msgstr "The network configuration will be switched to the null driver"
msgstr "Ağ yapılandırması null sürücüye geçirilecektir"
msgid "PIT mode:"
msgstr "PIT modu:"
msgid "Auto"
msgstr "Otomatik"
msgid "Slow"
msgstr "Yavaş"
msgid "Fast"
msgstr "Hızlı"

View File

@@ -1196,8 +1196,20 @@ msgid "(System Default)"
msgstr "(Системний)"
msgid "Failed to initialize network driver"
msgstr "Failed to initialize network driver"
msgstr "Не вдалося ініціалізувати мережевий драйвер"
msgid "The network configuration will be switched to the null driver"
msgstr "The network configuration will be switched to the null driver"
msgstr "Конфігурацію мережі буде змінено на нульовий драйвер"
msgid "PIT mode:"
msgstr "Режим PIT:"
msgid "Auto"
msgstr "Авто"
msgid "Slow"
msgstr "Повільний"
msgid "Fast"
msgstr "Швидкий"

View File

@@ -1196,8 +1196,20 @@ msgid "(System Default)"
msgstr "(系统默认)"
msgid "Failed to initialize network driver"
msgstr "Failed to initialize network driver"
msgstr "网络驱动程序初始化失败"
msgid "The network configuration will be switched to the null driver"
msgstr "The network configuration will be switched to the null driver"
msgstr "网络配置将切换为空驱动程序"
msgid "PIT mode:"
msgstr "PIT 模式:"
msgid "Auto"
msgstr "汽车"
msgid "Slow"
msgstr "慢"
msgid "Fast"
msgstr "快速"

View File

@@ -1196,8 +1196,20 @@ msgid "(System Default)"
msgstr "(系統預設)"
msgid "Failed to initialize network driver"
msgstr "Failed to initialize network driver"
msgstr "初始化網絡驅動程序失敗"
msgid "The network configuration will be switched to the null driver"
msgstr "The network configuration will be switched to the null driver"
msgstr "網絡配置將切換為空驅動程序"
msgid "PIT mode:"
msgstr "點模式:"
msgid "Auto"
msgstr "汽車"
msgid "Slow"
msgstr "慢的"
msgid "Fast"
msgstr "快速地"

View File

@@ -72,12 +72,13 @@
<addaction name="actionRight_CTRL_is_left_ALT"/>
<addaction name="menuTablet_tool"/>
<addaction name="separator"/>
<addaction name="actionHard_Reset"/>
<addaction name="actionCtrl_Alt_Del"/>
<addaction name="separator"/>
<addaction name="actionPause"/>
<addaction name="actionCtrl_Alt_Esc"/>
<addaction name="separator"/>
<addaction name="actionPause"/>
<addaction name="actionACPI_Shutdown"/>
<addaction name="separator"/>
<addaction name="actionHard_Reset"/>
<addaction name="actionCtrl_Alt_Del"/>
<addaction name="separator"/>
<addaction name="actionExit"/>
</widget>
@@ -254,11 +255,12 @@
<bool>false</bool>
</attribute>
<addaction name="actionPause"/>
<addaction name="actionHard_Reset"/>
<addaction name="actionCtrl_Alt_Esc"/>
<addaction name="separator"/>
<addaction name="actionACPI_Shutdown"/>
<addaction name="separator"/>
<addaction name="actionHard_Reset"/>
<addaction name="actionCtrl_Alt_Del"/>
<addaction name="actionCtrl_Alt_Esc"/>
<addaction name="separator"/>
<addaction name="actionSettings"/>
</widget>
@@ -760,6 +762,9 @@
<property name="visible">
<bool>true</bool>
</property>
<property name="iconVisibleInMenu">
<bool>false</bool>
</property>
</action>
<action name="actionBegin_trace">
<property name="text">

View File

@@ -57,9 +57,6 @@ extern "C" {
struct mouseinputdata {
atomic_bool mouse_tablet_in_proximity;
std::atomic<double> x_abs;
std::atomic<double> y_abs;
char *mouse_type;
};
static mouseinputdata mousedata;
@@ -143,32 +140,6 @@ qt_mouse_capture(int on)
return;
}
void
RendererStack::mousePoll()
{
if (m_monitor_index >= 1) {
if (mouse_mode >= 1) {
mouse_x_abs = mousedata.x_abs;
mouse_y_abs = mousedata.y_abs;
if (!mouse_tablet_in_proximity)
mouse_tablet_in_proximity = mousedata.mouse_tablet_in_proximity;
}
return;
}
#ifdef Q_OS_WINDOWS
if (mouse_mode == 0) {
mouse_x_abs = mousedata.x_abs;
mouse_y_abs = mousedata.y_abs;
return;
}
#endif
mouse_x_abs = mousedata.x_abs;
mouse_y_abs = mousedata.y_abs;
mouse_tablet_in_proximity = mousedata.mouse_tablet_in_proximity;
}
int ignoreNextMouseEvent = 1;
void
RendererStack::mouseReleaseEvent(QMouseEvent *event)
@@ -269,7 +240,6 @@ RendererStack::mouseMoveEvent(QMouseEvent *event)
#endif
}
void
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
RendererStack::enterEvent(QEnterEvent *event)
@@ -556,11 +526,30 @@ RendererStack::event(QEvent* event)
{
if (event->type() == QEvent::MouseMove) {
QMouseEvent* mouse_event = (QMouseEvent*)event;
if (mouse_mode >= 1) {
mousedata.x_abs = (mouse_event->localPos().x()) / (long double)width();
mousedata.y_abs = (mouse_event->localPos().y()) / (long double)height();
if (m_monitor_index >= 1) {
if (mouse_mode >= 1) {
mouse_x_abs = (mouse_event->localPos().x()) / (long double)width();
mouse_y_abs = (mouse_event->localPos().y()) / (long double)height();
if (!mouse_tablet_in_proximity)
mouse_tablet_in_proximity = mousedata.mouse_tablet_in_proximity;
}
return QStackedWidget::event(event);
}
#ifdef Q_OS_WINDOWS
if (mouse_mode == 0) {
mouse_x_abs = (mouse_event->localPos().x()) / (long double)width();
mouse_y_abs = (mouse_event->localPos().y()) / (long double)height();
return QStackedWidget::event(event);
}
#endif
mouse_x_abs = (mouse_event->localPos().x()) / (long double)width();
mouse_y_abs = (mouse_event->localPos().y()) / (long double)height();
mouse_tablet_in_proximity = mousedata.mouse_tablet_in_proximity;
}
return QStackedWidget::event(event);
}

View File

@@ -88,7 +88,6 @@ public slots:
void blitCommon(int x, int y, int w, int h);
void blitRenderer(int x, int y, int w, int h);
void blitDummy(int x, int y, int w, int h);
void mousePoll();
private:
void createRenderer(Renderer renderer);

View File

@@ -45,13 +45,12 @@ static void
setFloppyType(QAbstractItemModel *model, const QModelIndex &idx, int type)
{
QIcon icon;
if (type == 0) {
if (type == 0)
icon = ProgSettings::loadIcon("/floppy_disabled.ico");
} else if (type >= 1 && type <= 6) {
else if (type >= 1 && type <= 6)
icon = ProgSettings::loadIcon("/floppy_525.ico");
} else {
else
icon = ProgSettings::loadIcon("/floppy_35.ico");
}
model->setData(idx, QObject::tr(fdd_getname(type)));
model->setData(idx, type, Qt::UserRole);
@@ -62,6 +61,7 @@ static void
setCDROMBus(QAbstractItemModel *model, const QModelIndex &idx, uint8_t bus, uint8_t channel)
{
QIcon icon;
switch (bus) {
case CDROM_BUS_DISABLED:
icon = ProgSettings::loadIcon("/cdrom_disabled.ico");
@@ -94,11 +94,10 @@ static void
setCDROMType(QAbstractItemModel *model, const QModelIndex &idx, int type)
{
auto i = idx.siblingAtColumn(2);
if (idx.siblingAtColumn(0).data(Qt::UserRole).toUInt() == CDROM_BUS_DISABLED) {
if (idx.siblingAtColumn(0).data(Qt::UserRole).toUInt() == CDROM_BUS_DISABLED)
model->setData(i, QCoreApplication::translate("", "None"));
} else if (idx.siblingAtColumn(0).data(Qt::UserRole).toUInt() != CDROM_BUS_MITSUMI) {
else if (idx.siblingAtColumn(0).data(Qt::UserRole).toUInt() != CDROM_BUS_MITSUMI)
model->setData(i, QObject::tr(cdrom_getname(type)));
}
model->setData(i, type, Qt::UserRole);
}
@@ -112,9 +111,8 @@ SettingsFloppyCDROM::SettingsFloppyCDROM(QWidget *parent)
int i = 0;
while (true) {
QString name = tr(fdd_getname(i));
if (name.isEmpty()) {
if (name.isEmpty())
break;
}
Models::AddEntry(model, name, i);
++i;
@@ -139,26 +137,27 @@ SettingsFloppyCDROM::SettingsFloppyCDROM(QWidget *parent)
ui->tableViewFloppy->resizeColumnsToContents();
ui->tableViewFloppy->horizontalHeader()->setSectionResizeMode(0, QHeaderView::Stretch);
connect(ui->tableViewFloppy->selectionModel(), &QItemSelectionModel::currentRowChanged, this, &SettingsFloppyCDROM::onFloppyRowChanged);
connect(ui->tableViewFloppy->selectionModel(), &QItemSelectionModel::currentRowChanged,
this, &SettingsFloppyCDROM::onFloppyRowChanged);
ui->tableViewFloppy->setCurrentIndex(model->index(0, 0));
Harddrives::populateRemovableBuses(ui->comboBoxBus->model());
model = ui->comboBoxSpeed->model();
for (int i = 0; i < 72; i++) {
for (int i = 0; i < 72; i++)
Models::AddEntry(model, QString("%1x").arg(i + 1), i + 1);
}
#if 0
model = ui->comboBoxCDROMType->model();
i = 0;
while (true) {
QString name = tr(cdrom_getname(i));
if (name.isEmpty()) {
if (name.isEmpty())
break;
}
Models::AddEntry(model, name, i);
++i;
}
#endif
model = new QStandardItemModel(0, 3, this);
ui->tableViewCDROM->setModel(model);
@@ -175,15 +174,43 @@ SettingsFloppyCDROM::SettingsFloppyCDROM(QWidget *parent)
if (cdrom[i].bus_type == CDROM_BUS_ATAPI)
Harddrives::busTrackClass->device_track(1, DEV_CDROM, cdrom[i].bus_type, cdrom[i].ide_channel);
else if (cdrom[i].bus_type == CDROM_BUS_SCSI)
Harddrives::busTrackClass->device_track(1, DEV_CDROM, cdrom[i].bus_type, cdrom[i].scsi_device_id);
Harddrives::busTrackClass->device_track(1, DEV_CDROM, cdrom[i].bus_type,
cdrom[i].scsi_device_id);
else if (cdrom[i].bus_type == CDROM_BUS_MITSUMI)
Harddrives::busTrackClass->device_track(1, DEV_CDROM, cdrom[i].bus_type, 0);
}
ui->tableViewCDROM->resizeColumnsToContents();
ui->tableViewCDROM->horizontalHeader()->setSectionResizeMode(0, QHeaderView::Stretch);
connect(ui->tableViewCDROM->selectionModel(), &QItemSelectionModel::currentRowChanged, this, &SettingsFloppyCDROM::onCDROMRowChanged);
connect(ui->tableViewCDROM->selectionModel(), &QItemSelectionModel::currentRowChanged,
this, &SettingsFloppyCDROM::onCDROMRowChanged);
ui->tableViewCDROM->setCurrentIndex(model->index(0, 0));
uint8_t bus_type = ui->comboBoxBus->currentData().toUInt();
int cdromIdx = ui->tableViewCDROM->selectionModel()->currentIndex().data().toInt();
auto *modelType = ui->comboBoxCDROMType->model();
int removeRows = modelType->rowCount();
int j = 0;
int selectedTypeRow = 0;
int eligibleRows = 0;
while (cdrom_drive_types[j].bus_type != BUS_TYPE_NONE) {
if (((bus_type == CDROM_BUS_ATAPI) || (bus_type == CDROM_BUS_SCSI)) &&
((cdrom_drive_types[j].bus_type == bus_type) ||
(cdrom_drive_types[j].bus_type == BUS_TYPE_BOTH))) {
QString name = tr(cdrom_getname(j));
Models::AddEntry(modelType, name, j);
if ((cdrom[cdromIdx].bus_type == bus_type) && (cdrom[cdromIdx].type == j))
selectedTypeRow = eligibleRows;
++eligibleRows;
}
++j;
}
modelType->removeRows(0, removeRows);
ui->comboBoxCDROMType->setEnabled(eligibleRows > 1);
ui->comboBoxCDROMType->setCurrentIndex(-1);
ui->comboBoxCDROMType->setCurrentIndex(selectedTypeRow);
}
SettingsFloppyCDROM::~SettingsFloppyCDROM()
@@ -234,20 +261,18 @@ SettingsFloppyCDROM::onCDROMRowChanged(const QModelIndex &current)
uint8_t bus = current.siblingAtColumn(0).data(Qt::UserRole).toUInt();
uint8_t channel = current.siblingAtColumn(0).data(Qt::UserRole + 1).toUInt();
uint8_t speed = current.siblingAtColumn(1).data(Qt::UserRole).toUInt();
int type = current.siblingAtColumn(2).data(Qt::UserRole).toInt();
int type = current.siblingAtColumn(2).data(Qt::UserRole).toInt();
ui->comboBoxBus->setCurrentIndex(-1);
auto* model = ui->comboBoxBus->model();
auto match = model->match(model->index(0, 0), Qt::UserRole, bus);
if (! match.isEmpty()) {
if (! match.isEmpty())
ui->comboBoxBus->setCurrentIndex(match.first().row());
}
model = ui->comboBoxChannel->model();
match = model->match(model->index(0, 0), Qt::UserRole, channel);
if (!match.isEmpty()) {
if (!match.isEmpty())
ui->comboBoxChannel->setCurrentIndex(match.first().row());
}
ui->comboBoxSpeed->setCurrentIndex(speed == 0 ? 7 : speed - 1);
ui->comboBoxCDROMType->setCurrentIndex(type);
@@ -257,36 +282,37 @@ void
SettingsFloppyCDROM::on_checkBoxTurboTimings_stateChanged(int arg1)
{
auto idx = ui->tableViewFloppy->selectionModel()->currentIndex();
ui->tableViewFloppy->model()->setData(idx.siblingAtColumn(1), arg1 == Qt::Checked ? tr("On") : tr("Off"));
ui->tableViewFloppy->model()->setData(idx.siblingAtColumn(1), arg1 == Qt::Checked ?
tr("On") : tr("Off"));
}
void
SettingsFloppyCDROM::on_checkBoxCheckBPB_stateChanged(int arg1)
{
auto idx = ui->tableViewFloppy->selectionModel()->currentIndex();
ui->tableViewFloppy->model()->setData(idx.siblingAtColumn(2), arg1 == Qt::Checked ? tr("On") : tr("Off"));
ui->tableViewFloppy->model()->setData(idx.siblingAtColumn(2), arg1 == Qt::Checked ?
tr("On") : tr("Off"));
}
void
SettingsFloppyCDROM::on_comboBoxFloppyType_activated(int index)
{
setFloppyType(ui->tableViewFloppy->model(), ui->tableViewFloppy->selectionModel()->currentIndex(), index);
setFloppyType(ui->tableViewFloppy->model(),
ui->tableViewFloppy->selectionModel()->currentIndex(), index);
}
void
SettingsFloppyCDROM::on_comboBoxBus_currentIndexChanged(int index)
{
if (index < 0) {
return;
if (index >= 0) {
int bus = ui->comboBoxBus->currentData().toInt();
bool enabled = (bus != CDROM_BUS_DISABLED);
ui->comboBoxChannel->setEnabled((bus == CDROM_BUS_MITSUMI) ? 0 : enabled);
ui->comboBoxSpeed->setEnabled((bus == CDROM_BUS_MITSUMI) ? 0 : enabled);
ui->comboBoxCDROMType->setEnabled((bus == CDROM_BUS_MITSUMI) ? 0 : enabled);
Harddrives::populateBusChannels(ui->comboBoxChannel->model(), bus);
}
int bus = ui->comboBoxBus->currentData().toInt();
bool enabled = (bus != CDROM_BUS_DISABLED);
ui->comboBoxChannel->setEnabled((bus == CDROM_BUS_MITSUMI) ? 0 : enabled);
ui->comboBoxSpeed->setEnabled((bus == CDROM_BUS_MITSUMI) ? 0 : enabled);
ui->comboBoxCDROMType->setEnabled((bus == CDROM_BUS_MITSUMI) ? 0 : enabled);
Harddrives::populateBusChannels(ui->comboBoxChannel->model(), bus);
}
void
@@ -299,10 +325,13 @@ SettingsFloppyCDROM::on_comboBoxSpeed_activated(int index)
void
SettingsFloppyCDROM::on_comboBoxBus_activated(int)
{
auto i = ui->tableViewCDROM->selectionModel()->currentIndex().siblingAtColumn(0);
uint8_t bus_type = ui->comboBoxBus->currentData().toUInt();
auto i = ui->tableViewCDROM->selectionModel()->currentIndex().siblingAtColumn(0);
uint8_t bus_type = ui->comboBoxBus->currentData().toUInt();
int cdromIdx = ui->tableViewCDROM->selectionModel()->currentIndex().data().toInt();
Harddrives::busTrackClass->device_track(0, DEV_CDROM, ui->tableViewCDROM->model()->data(i, Qt::UserRole).toInt(), ui->tableViewCDROM->model()->data(i, Qt::UserRole + 1).toInt());
Harddrives::busTrackClass->device_track(0, DEV_CDROM, ui->tableViewCDROM->model()->data(i,
Qt::UserRole).toInt(), ui->tableViewCDROM->model()->data(i,
Qt::UserRole + 1).toInt());
if (bus_type == CDROM_BUS_ATAPI)
ui->comboBoxChannel->setCurrentIndex(Harddrives::busTrackClass->next_free_ide_channel());
else if (bus_type == CDROM_BUS_SCSI)
@@ -310,38 +339,64 @@ SettingsFloppyCDROM::on_comboBoxBus_activated(int)
else if (bus_type == CDROM_BUS_MITSUMI)
ui->comboBoxChannel->setCurrentIndex(0);
setCDROMBus(
ui->tableViewCDROM->model(),
ui->tableViewCDROM->selectionModel()->currentIndex(),
bus_type,
ui->comboBoxChannel->currentData().toUInt());
setCDROMType(
ui->tableViewCDROM->model(),
ui->tableViewCDROM->selectionModel()->currentIndex(),
ui->comboBoxCDROMType->currentData().toUInt());
Harddrives::busTrackClass->device_track(1, DEV_CDROM, ui->tableViewCDROM->model()->data(i, Qt::UserRole).toInt(), ui->tableViewCDROM->model()->data(i, Qt::UserRole + 1).toInt());
setCDROMBus(ui->tableViewCDROM->model(),
ui->tableViewCDROM->selectionModel()->currentIndex(),
bus_type,
ui->comboBoxChannel->currentData().toUInt());
Harddrives::busTrackClass->device_track(1, DEV_CDROM, ui->tableViewCDROM->model()->data(i,
Qt::UserRole).toInt(), ui->tableViewCDROM->model()->data(i,
Qt::UserRole + 1).toInt());
auto *modelType = ui->comboBoxCDROMType->model();
int removeRows = modelType->rowCount();
int j = 0;
int selectedTypeRow = 0;
int eligibleRows = 0;
while (cdrom_drive_types[j].bus_type != BUS_TYPE_NONE) {
if (((bus_type == CDROM_BUS_ATAPI) || (bus_type == CDROM_BUS_SCSI)) &&
((cdrom_drive_types[j].bus_type == bus_type) ||
(cdrom_drive_types[j].bus_type == BUS_TYPE_BOTH))) {
QString name = tr(cdrom_getname(j));
Models::AddEntry(modelType, name, j);
if ((cdrom[cdromIdx].bus_type == bus_type) && (cdrom[cdromIdx].type == j))
selectedTypeRow = eligibleRows;
++eligibleRows;
}
++j;
}
modelType->removeRows(0, removeRows);
ui->comboBoxCDROMType->setEnabled(eligibleRows > 1);
ui->comboBoxCDROMType->setCurrentIndex(-1);
ui->comboBoxCDROMType->setCurrentIndex(selectedTypeRow);
setCDROMType(ui->tableViewCDROM->model(),
ui->tableViewCDROM->selectionModel()->currentIndex(),
ui->comboBoxCDROMType->currentData().toUInt());
}
void
SettingsFloppyCDROM::on_comboBoxChannel_activated(int)
{
auto i = ui->tableViewCDROM->selectionModel()->currentIndex().siblingAtColumn(0);
Harddrives::busTrackClass->device_track(0, DEV_CDROM, ui->tableViewCDROM->model()->data(i, Qt::UserRole).toInt(), ui->tableViewCDROM->model()->data(i, Qt::UserRole + 1).toInt());
setCDROMBus(
ui->tableViewCDROM->model(),
ui->tableViewCDROM->selectionModel()->currentIndex(),
ui->comboBoxBus->currentData().toUInt(),
ui->comboBoxChannel->currentData().toUInt());
Harddrives::busTrackClass->device_track(1, DEV_CDROM, ui->tableViewCDROM->model()->data(i, Qt::UserRole).toInt(), ui->tableViewCDROM->model()->data(i, Qt::UserRole + 1).toInt());
Harddrives::busTrackClass->device_track(0, DEV_CDROM, ui->tableViewCDROM->model()->data(i,
Qt::UserRole).toInt(), ui->tableViewCDROM->model()->data(i,
Qt::UserRole + 1).toInt());
setCDROMBus(ui->tableViewCDROM->model(),
ui->tableViewCDROM->selectionModel()->currentIndex(),
ui->comboBoxBus->currentData().toUInt(),
ui->comboBoxChannel->currentData().toUInt());
Harddrives::busTrackClass->device_track(1, DEV_CDROM, ui->tableViewCDROM->model()->data(i,
Qt::UserRole).toInt(), ui->tableViewCDROM->model()->data(i,
Qt::UserRole + 1).toInt());
}
void
SettingsFloppyCDROM::on_comboBoxCDROMType_activated(int)
{
setCDROMType(
ui->tableViewCDROM->model(),
ui->tableViewCDROM->selectionModel()->currentIndex(),
ui->comboBoxCDROMType->currentData().toUInt());
setCDROMType(ui->tableViewCDROM->model(),
ui->tableViewCDROM->selectionModel()->currentIndex(),
ui->comboBoxCDROMType->currentData().toUInt());
ui->tableViewCDROM->resizeColumnsToContents();
ui->tableViewCDROM->horizontalHeader()->setSectionResizeMode(0, QHeaderView::Stretch);
}

View File

@@ -72,6 +72,21 @@ SettingsMachine::SettingsMachine(QWidget *parent)
waitStatesModel->setData(idx, i + 1, Qt::UserRole);
}
auto *pitModeModel = ui->comboBoxPitMode->model();
pitModeModel->insertRows(0, 3);
idx = pitModeModel->index(0, 0);
pitModeModel->setData(idx, tr("Auto"), Qt::DisplayRole);
pitModeModel->setData(idx, -1, Qt::UserRole);
idx = pitModeModel->index(1, 0);
pitModeModel->setData(idx, tr("Slow"), Qt::DisplayRole);
pitModeModel->setData(idx, 0, Qt::UserRole);
idx = pitModeModel->index(2, 0);
pitModeModel->setData(idx, tr("Fast"), Qt::DisplayRole);
pitModeModel->setData(idx, 1, Qt::UserRole);
ui->comboBoxPitMode->setCurrentIndex(-1);
ui->comboBoxPitMode->setCurrentIndex(pit_mode + 1);
int selectedMachineType = 0;
auto *machineTypesModel = ui->comboBoxMachineType->model();
for (int i = 1; i < MACHINE_TYPE_MAX; ++i) {
@@ -79,9 +94,8 @@ SettingsMachine::SettingsMachine(QWidget *parent)
while (machine_get_internal_name_ex(j) != nullptr) {
if (machine_available(j) && (machine_get_type(j) == i)) {
int row = Models::AddEntry(machineTypesModel, machine_types[i].name, machine_types[i].id);
if (machine_types[i].id == machine_get_type(machine)) {
if (machine_types[i].id == machine_get_type(machine))
selectedMachineType = row;
}
break;
}
j++;
@@ -113,202 +127,191 @@ SettingsMachine::save()
fpu_softfloat = ui->checkBoxFPUSoftfloat->isChecked() ? 1 : 0;
int64_t temp_mem_size;
if (machine_get_ram_granularity(machine) < 1024) {
if (machine_get_ram_granularity(machine) < 1024)
temp_mem_size = ui->spinBoxRAM->value();
} else {
else
temp_mem_size = ui->spinBoxRAM->value() * 1024;
}
temp_mem_size &= ~(machine_get_ram_granularity(machine) - 1);
if (temp_mem_size < machine_get_min_ram(machine)) {
if (temp_mem_size < machine_get_min_ram(machine))
temp_mem_size = machine_get_min_ram(machine);
} else if (temp_mem_size > machine_get_max_ram(machine)) {
else if (temp_mem_size > machine_get_max_ram(machine))
temp_mem_size = machine_get_max_ram(machine);
}
mem_size = static_cast<uint32_t>(temp_mem_size);
if (ui->comboBoxWaitStates->isEnabled()) {
if (ui->comboBoxWaitStates->isEnabled())
cpu_waitstates = ui->comboBoxWaitStates->currentData().toInt();
} else {
else
cpu_waitstates = 0;
}
pit_mode = ui->comboBoxPitMode->currentData().toInt();
time_sync = 0;
if (ui->radioButtonLocalTime->isChecked()) {
if (ui->radioButtonLocalTime->isChecked())
time_sync = TIME_SYNC_ENABLED;
}
if (ui->radioButtonUTC->isChecked()) {
if (ui->radioButtonUTC->isChecked())
time_sync = TIME_SYNC_ENABLED | TIME_SYNC_UTC;
}
}
void
SettingsMachine::on_comboBoxMachineType_currentIndexChanged(int index)
{
if (index < 0) {
return;
}
if (index >= 0) {
auto *model = ui->comboBoxMachine->model();
int removeRows = model->rowCount();
auto *model = ui->comboBoxMachine->model();
int removeRows = model->rowCount();
int selectedMachineRow = 0;
for (int i = 0; i < machine_count(); ++i) {
if ((machine_get_type(i) == ui->comboBoxMachineType->currentData().toInt()) && machine_available(i)) {
int row = Models::AddEntry(model, machines[i].name, i);
if (i == machine) {
selectedMachineRow = row - removeRows;
int selectedMachineRow = 0;
for (int i = 0; i < machine_count(); ++i) {
if ((machine_get_type(i) == ui->comboBoxMachineType->currentData().toInt()) &&
machine_available(i)) {
int row = Models::AddEntry(model, machines[i].name, i);
if (i == machine)
selectedMachineRow = row - removeRows;
}
}
}
model->removeRows(0, removeRows);
model->removeRows(0, removeRows);
ui->comboBoxMachine->setCurrentIndex(-1);
ui->comboBoxMachine->setCurrentIndex(selectedMachineRow);
ui->comboBoxMachine->setCurrentIndex(-1);
ui->comboBoxMachine->setCurrentIndex(selectedMachineRow);
}
}
void
SettingsMachine::on_comboBoxMachine_currentIndexChanged(int index)
{
// win_settings_machine_recalc_machine
if (index < 0) {
return;
}
if (index >= 0) {
int machineId = ui->comboBoxMachine->currentData().toInt();
const auto *device = machine_get_device(machineId);
ui->pushButtonConfigure->setEnabled((device != nullptr) && (device->config != nullptr));
int machineId = ui->comboBoxMachine->currentData().toInt();
const auto *device = machine_get_device(machineId);
ui->pushButtonConfigure->setEnabled((device != nullptr) && (device->config != nullptr));
auto *modelCpu = ui->comboBoxCPU->model();
int removeRows = modelCpu->rowCount();
auto *modelCpu = ui->comboBoxCPU->model();
int removeRows = modelCpu->rowCount();
int i = 0;
int eligibleRows = 0;
int selectedCpuFamilyRow = 0;
while (cpu_families[i].package != 0) {
if (cpu_family_is_eligible(&cpu_families[i], machineId)) {
Models::AddEntry(modelCpu, QString("%1 %2").arg(cpu_families[i].manufacturer, cpu_families[i].name), i);
if (&cpu_families[i] == cpu_f) {
selectedCpuFamilyRow = eligibleRows;
int i = 0;
int eligibleRows = 0;
int selectedCpuFamilyRow = 0;
while (cpu_families[i].package != 0) {
if (cpu_family_is_eligible(&cpu_families[i], machineId)) {
Models::AddEntry(modelCpu, QString("%1 %2").arg(cpu_families[i].manufacturer,
cpu_families[i].name), i);
if (&cpu_families[i] == cpu_f)
selectedCpuFamilyRow = eligibleRows;
++eligibleRows;
}
++eligibleRows;
++i;
}
++i;
}
modelCpu->removeRows(0, removeRows);
ui->comboBoxCPU->setEnabled(eligibleRows > 1);
ui->comboBoxCPU->setCurrentIndex(-1);
ui->comboBoxCPU->setCurrentIndex(selectedCpuFamilyRow);
modelCpu->removeRows(0, removeRows);
ui->comboBoxCPU->setEnabled(eligibleRows > 1);
ui->comboBoxCPU->setCurrentIndex(-1);
ui->comboBoxCPU->setCurrentIndex(selectedCpuFamilyRow);
int divisor;
if (machine_get_ram_granularity(machineId) < 1024) {
divisor = 1;
ui->spinBoxRAM->setSuffix(QCoreApplication::translate("", "KB").prepend(' '));
} else {
divisor = 1024;
ui->spinBoxRAM->setSuffix(QCoreApplication::translate("", "MB").prepend(' '));
}
ui->spinBoxRAM->setMinimum(machine_get_min_ram(machineId) / divisor);
ui->spinBoxRAM->setMaximum(machine_get_max_ram(machineId) / divisor);
ui->spinBoxRAM->setSingleStep(machine_get_ram_granularity(machineId) / divisor);
ui->spinBoxRAM->setValue(mem_size / divisor);
ui->spinBoxRAM->setEnabled(machine_get_min_ram(machineId) != machine_get_max_ram(machineId));
int divisor;
if (machine_get_ram_granularity(machineId) < 1024) {
divisor = 1;
ui->spinBoxRAM->setSuffix(QCoreApplication::translate("", "KB").prepend(' '));
} else {
divisor = 1024;
ui->spinBoxRAM->setSuffix(QCoreApplication::translate("", "MB").prepend(' '));
}
ui->spinBoxRAM->setMinimum(machine_get_min_ram(machineId) / divisor);
ui->spinBoxRAM->setMaximum(machine_get_max_ram(machineId) / divisor);
ui->spinBoxRAM->setSingleStep(machine_get_ram_granularity(machineId) / divisor);
ui->spinBoxRAM->setValue(mem_size / divisor);
ui->spinBoxRAM->setEnabled(machine_get_min_ram(machineId) != machine_get_max_ram(machineId));
emit currentMachineChanged(machineId);
emit currentMachineChanged(machineId);
}
}
void
SettingsMachine::on_comboBoxCPU_currentIndexChanged(int index)
{
if (index < 0) {
return;
}
if (index >= 0) {
int machineId = ui->comboBoxMachine->currentData().toInt();
int cpuFamilyId = ui->comboBoxCPU->currentData().toInt();
const auto *cpuFamily = &cpu_families[cpuFamilyId];
int machineId = ui->comboBoxMachine->currentData().toInt();
int cpuFamilyId = ui->comboBoxCPU->currentData().toInt();
const auto *cpuFamily = &cpu_families[cpuFamilyId];
auto *modelSpeed = ui->comboBoxSpeed->model();
int removeRows = modelSpeed->rowCount();
auto *modelSpeed = ui->comboBoxSpeed->model();
int removeRows = modelSpeed->rowCount();
// win_settings_machine_recalc_cpu_m
int i = 0;
int eligibleRows = 0;
int selectedSpeedRow = 0;
while (cpuFamily->cpus[i].cpu_type != 0) {
if (cpu_is_eligible(cpuFamily, i, machineId)) {
Models::AddEntry(modelSpeed, QString("%1").arg(cpuFamily->cpus[i].name), i);
if (cpu == i) {
selectedSpeedRow = eligibleRows;
// win_settings_machine_recalc_cpu_m
int i = 0;
int eligibleRows = 0;
int selectedSpeedRow = 0;
while (cpuFamily->cpus[i].cpu_type != 0) {
if (cpu_is_eligible(cpuFamily, i, machineId)) {
Models::AddEntry(modelSpeed, QString("%1").arg(cpuFamily->cpus[i].name), i);
if (cpu == i)
selectedSpeedRow = eligibleRows;
++eligibleRows;
}
++eligibleRows;
++i;
}
++i;
modelSpeed->removeRows(0, removeRows);
ui->comboBoxSpeed->setEnabled(eligibleRows > 1);
ui->comboBoxSpeed->setCurrentIndex(-1);
ui->comboBoxSpeed->setCurrentIndex(selectedSpeedRow);
}
modelSpeed->removeRows(0, removeRows);
ui->comboBoxSpeed->setEnabled(eligibleRows > 1);
ui->comboBoxSpeed->setCurrentIndex(-1);
ui->comboBoxSpeed->setCurrentIndex(selectedSpeedRow);
}
void
SettingsMachine::on_comboBoxSpeed_currentIndexChanged(int index)
{
if (index < 0) {
return;
}
if (index >= 0) {
// win_settings_machine_recalc_cpu
int cpuFamilyId = ui->comboBoxCPU->currentData().toInt();
const auto *cpuFamily = &cpu_families[cpuFamilyId];
int cpuId = ui->comboBoxSpeed->currentData().toInt();
uint cpuType = cpuFamily->cpus[cpuId].cpu_type;
// win_settings_machine_recalc_cpu
int cpuFamilyId = ui->comboBoxCPU->currentData().toInt();
const auto *cpuFamily = &cpu_families[cpuFamilyId];
int cpuId = ui->comboBoxSpeed->currentData().toInt();
uint cpuType = cpuFamily->cpus[cpuId].cpu_type;
if ((cpuType >= CPU_286) && (cpuType <= CPU_386DX)) {
ui->comboBoxWaitStates->setEnabled(true);
ui->comboBoxWaitStates->setCurrentIndex(cpu_waitstates);
} else {
ui->comboBoxWaitStates->setCurrentIndex(0);
ui->comboBoxWaitStates->setEnabled(false);
}
if ((cpuType >= CPU_286) && (cpuType <= CPU_386DX)) {
ui->comboBoxWaitStates->setEnabled(true);
ui->comboBoxWaitStates->setCurrentIndex(cpu_waitstates);
} else {
ui->comboBoxWaitStates->setCurrentIndex(0);
ui->comboBoxWaitStates->setEnabled(false);
}
#ifdef USE_DYNAREC
uint8_t flags = cpuFamily->cpus[cpuId].cpu_flags;
if (!(flags & CPU_SUPPORTS_DYNAREC)) {
ui->checkBoxDynamicRecompiler->setChecked(false);
ui->checkBoxDynamicRecompiler->setEnabled(false);
} else if (flags & CPU_REQUIRES_DYNAREC) {
ui->checkBoxDynamicRecompiler->setChecked(true);
ui->checkBoxDynamicRecompiler->setEnabled(false);
} else {
ui->checkBoxDynamicRecompiler->setChecked(cpu_use_dynarec);
ui->checkBoxDynamicRecompiler->setEnabled(true);
}
uint8_t flags = cpuFamily->cpus[cpuId].cpu_flags;
if (!(flags & CPU_SUPPORTS_DYNAREC)) {
ui->checkBoxDynamicRecompiler->setChecked(false);
ui->checkBoxDynamicRecompiler->setEnabled(false);
} else if (flags & CPU_REQUIRES_DYNAREC) {
ui->checkBoxDynamicRecompiler->setChecked(true);
ui->checkBoxDynamicRecompiler->setEnabled(false);
} else {
ui->checkBoxDynamicRecompiler->setChecked(cpu_use_dynarec);
ui->checkBoxDynamicRecompiler->setEnabled(true);
}
#endif
// win_settings_machine_recalc_fpu
int machineId = ui->comboBoxMachine->currentData().toInt();
auto *modelFpu = ui->comboBoxFPU->model();
int removeRows = modelFpu->rowCount();
// win_settings_machine_recalc_fpu
int machineId = ui->comboBoxMachine->currentData().toInt();
auto *modelFpu = ui->comboBoxFPU->model();
int removeRows = modelFpu->rowCount();
int i = 0;
int selectedFpuRow = 0;
for (const char *fpuName = fpu_get_name_from_index(cpuFamily, cpuId, i); fpuName != nullptr; fpuName = fpu_get_name_from_index(cpuFamily, cpuId, ++i)) {
auto fpuType = fpu_get_type_from_index(cpuFamily, cpuId, i);
Models::AddEntry(modelFpu, QString("%1").arg(fpuName), fpuType);
if (fpu_type == fpuType) {
selectedFpuRow = i;
int i = 0;
int selectedFpuRow = 0;
for (const char *fpuName = fpu_get_name_from_index(cpuFamily, cpuId, i);
fpuName != nullptr; fpuName = fpu_get_name_from_index(cpuFamily, cpuId, ++i)) {
auto fpuType = fpu_get_type_from_index(cpuFamily, cpuId, i);
Models::AddEntry(modelFpu, QString("%1").arg(fpuName), fpuType);
if (fpu_type == fpuType)
selectedFpuRow = i;
}
modelFpu->removeRows(0, removeRows);
ui->comboBoxFPU->setEnabled(modelFpu->rowCount() > 1);
ui->comboBoxFPU->setCurrentIndex(-1);
ui->comboBoxFPU->setCurrentIndex(selectedFpuRow);
ui->checkBoxFPUSoftfloat->setChecked(machine_has_flags(machineId, MACHINE_SOFTFLOAT_ONLY) ?
true : fpu_softfloat);
ui->checkBoxFPUSoftfloat->setEnabled(machine_has_flags(machineId, MACHINE_SOFTFLOAT_ONLY) ?
false : true);
}
modelFpu->removeRows(0, removeRows);
ui->comboBoxFPU->setEnabled(modelFpu->rowCount() > 1);
ui->comboBoxFPU->setCurrentIndex(-1);
ui->comboBoxFPU->setCurrentIndex(selectedFpuRow);
ui->checkBoxFPUSoftfloat->setChecked(machine_has_flags(machineId, MACHINE_SOFTFLOAT_ONLY) ? true : fpu_softfloat);
ui->checkBoxFPUSoftfloat->setEnabled(machine_has_flags(machineId, MACHINE_SOFTFLOAT_ONLY) ? false : true);
}
void

View File

@@ -41,6 +41,192 @@
<property name="bottomMargin">
<number>0</number>
</property>
<item row="2" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>CPU type:</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QWidget" name="widget_2" native="true">
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QComboBox" name="comboBoxCPU">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_7">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Speed:</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="comboBoxSpeed">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="6" column="1">
<widget class="QWidget" name="widget_4" native="true">
<layout class="QHBoxLayout" name="horizontalLayout_3">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QComboBox" name="comboBoxFPU">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_5">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Wait states:</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="comboBoxWaitStates">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="7" column="0">
<widget class="QLabel" name="label_8">
<property name="text">
<string>PIT mode:</string>
</property>
</widget>
</item>
<item row="7" column="1">
<widget class="QWidget" name="widget_5" native="true">
<layout class="QHBoxLayout" name="horizontalLayout_4">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QComboBox" name="comboBoxPitMode">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_6">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Memory:</string>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="spinBoxRAM">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="comboBoxMachineType"/>
</item>
<item row="6" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string>FPU:</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="text">
@@ -48,9 +234,6 @@
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="comboBoxMachineType"/>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
@@ -92,125 +275,51 @@
</layout>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>CPU type:</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QWidget" name="widget_2" native="true">
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QComboBox" name="comboBoxCPU">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_7">
<property name="text">
<string>Speed:</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="comboBoxSpeed">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string>FPU:</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QComboBox" name="comboBoxFPU"/>
</item>
<item row="4" column="0">
<widget class="QLabel" name="label_5">
<property name="text">
<string>Wait states:</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QComboBox" name="comboBoxWaitStates"/>
</item>
<item row="5" column="0">
<widget class="QLabel" name="label_6">
<property name="text">
<string>Memory:</string>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QSpinBox" name="spinBoxRAM">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkBoxDynamicRecompiler">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>2</horstretch>
<verstretch>2</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Dynamic Recompiler</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkBoxFPUSoftfloat">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>3</horstretch>
<verstretch>3</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Softfloat FPU</string>
</property>
<widget class="QWidget" name="widget_6" native="true">
<layout class="QHBoxLayout" name="horizontalLayout_5">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QCheckBox" name="checkBoxDynamicRecompiler">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>2</horstretch>
<verstretch>2</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Dynamic Recompiler</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkBoxFPUSoftfloat">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>3</horstretch>
<verstretch>3</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>SoftFloat FPU</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>

View File

@@ -36,7 +36,8 @@ extern "C" {
static QString
moDriveTypeName(int i)
{
return QString("%1 %2 %3").arg(mo_drive_types[i].vendor, mo_drive_types[i].model, mo_drive_types[i].revision);
return QString("%1 %2 %3").arg(mo_drive_types[i].vendor, mo_drive_types[i].model,
mo_drive_types[i].revision);
}
static void
@@ -64,11 +65,10 @@ static void
setMOType(QAbstractItemModel *model, const QModelIndex &idx, uint32_t type)
{
auto i = idx.siblingAtColumn(1);
if (idx.siblingAtColumn(0).data(Qt::UserRole).toUInt() == MO_BUS_DISABLED) {
if (idx.siblingAtColumn(0).data(Qt::UserRole).toUInt() == MO_BUS_DISABLED)
model->setData(i, QCoreApplication::translate("", "None"));
} else {
else
model->setData(i, moDriveTypeName(type));
}
model->setData(i, type, Qt::UserRole);
}
@@ -187,15 +187,13 @@ SettingsOtherRemovable::onMORowChanged(const QModelIndex &current)
ui->comboBoxMOBus->setCurrentIndex(-1);
auto *model = ui->comboBoxMOBus->model();
auto match = model->match(model->index(0, 0), Qt::UserRole, bus);
if (!match.isEmpty()) {
if (!match.isEmpty())
ui->comboBoxMOBus->setCurrentIndex(match.first().row());
}
model = ui->comboBoxMOChannel->model();
match = model->match(model->index(0, 0), Qt::UserRole, channel);
if (!match.isEmpty()) {
if (!match.isEmpty())
ui->comboBoxMOChannel->setCurrentIndex(match.first().row());
}
ui->comboBoxMOType->setCurrentIndex(type);
}
@@ -209,73 +207,75 @@ SettingsOtherRemovable::onZIPRowChanged(const QModelIndex &current)
ui->comboBoxZIPBus->setCurrentIndex(-1);
auto *model = ui->comboBoxZIPBus->model();
auto match = model->match(model->index(0, 0), Qt::UserRole, bus);
if (!match.isEmpty()) {
if (!match.isEmpty())
ui->comboBoxZIPBus->setCurrentIndex(match.first().row());
}
model = ui->comboBoxZIPChannel->model();
match = model->match(model->index(0, 0), Qt::UserRole, channel);
if (!match.isEmpty()) {
if (!match.isEmpty())
ui->comboBoxZIPChannel->setCurrentIndex(match.first().row());
}
ui->checkBoxZIP250->setChecked(is250);
}
void
SettingsOtherRemovable::on_comboBoxMOBus_currentIndexChanged(int index)
{
if (index < 0) {
return;
if (index >= 0) {
int bus = ui->comboBoxMOBus->currentData().toInt();
bool enabled = (bus != MO_BUS_DISABLED);
ui->comboBoxMOChannel->setEnabled(enabled);
ui->comboBoxMOType->setEnabled(enabled);
Harddrives::populateBusChannels(ui->comboBoxMOChannel->model(), bus);
}
int bus = ui->comboBoxMOBus->currentData().toInt();
bool enabled = (bus != MO_BUS_DISABLED);
ui->comboBoxMOChannel->setEnabled(enabled);
ui->comboBoxMOType->setEnabled(enabled);
Harddrives::populateBusChannels(ui->comboBoxMOChannel->model(), bus);
}
void
SettingsOtherRemovable::on_comboBoxMOBus_activated(int)
{
auto i = ui->tableViewMO->selectionModel()->currentIndex().siblingAtColumn(0);
Harddrives::busTrackClass->device_track(0, DEV_MO, ui->tableViewMO->model()->data(i, Qt::UserRole).toInt(), ui->tableViewMO->model()->data(i, Qt::UserRole + 1).toInt());
ui->comboBoxMOChannel->setCurrentIndex(ui->comboBoxMOBus->currentData().toUInt() == MO_BUS_ATAPI ? Harddrives::busTrackClass->next_free_ide_channel() : Harddrives::busTrackClass->next_free_scsi_id());
Harddrives::busTrackClass->device_track(0, DEV_MO, ui->tableViewMO->model()->data(i,
Qt::UserRole).toInt(), ui->tableViewMO->model()->data(i,
Qt::UserRole + 1).toInt());
ui->comboBoxMOChannel->setCurrentIndex(ui->comboBoxMOBus->currentData().toUInt() ==
MO_BUS_ATAPI ? Harddrives::busTrackClass->next_free_ide_channel() :
Harddrives::busTrackClass->next_free_scsi_id());
ui->tableViewMO->model()->data(i, Qt::UserRole + 1);
setMOBus(
ui->tableViewMO->model(),
ui->tableViewMO->selectionModel()->currentIndex(),
ui->comboBoxMOBus->currentData().toUInt(),
ui->comboBoxMOChannel->currentData().toUInt());
setMOType(
ui->tableViewMO->model(),
ui->tableViewMO->selectionModel()->currentIndex(),
ui->comboBoxMOType->currentData().toUInt());
setMOBus(ui->tableViewMO->model(),
ui->tableViewMO->selectionModel()->currentIndex(),
ui->comboBoxMOBus->currentData().toUInt(),
ui->comboBoxMOChannel->currentData().toUInt());
setMOType(ui->tableViewMO->model(),
ui->tableViewMO->selectionModel()->currentIndex(),
ui->comboBoxMOType->currentData().toUInt());
ui->tableViewMO->resizeColumnsToContents();
ui->tableViewMO->horizontalHeader()->setSectionResizeMode(0, QHeaderView::Stretch);
Harddrives::busTrackClass->device_track(1, DEV_MO, ui->tableViewMO->model()->data(i, Qt::UserRole).toInt(), ui->tableViewMO->model()->data(i, Qt::UserRole + 1).toInt());
Harddrives::busTrackClass->device_track(1, DEV_MO, ui->tableViewMO->model()->data(i,
Qt::UserRole).toInt(), ui->tableViewMO->model()->data(i,
Qt::UserRole + 1).toInt());
}
void
SettingsOtherRemovable::on_comboBoxMOChannel_activated(int)
{
auto i = ui->tableViewMO->selectionModel()->currentIndex().siblingAtColumn(0);
Harddrives::busTrackClass->device_track(0, DEV_MO, ui->tableViewMO->model()->data(i, Qt::UserRole).toInt(), ui->tableViewMO->model()->data(i, Qt::UserRole + 1).toInt());
setMOBus(
ui->tableViewMO->model(),
ui->tableViewMO->selectionModel()->currentIndex(),
ui->comboBoxMOBus->currentData().toUInt(),
ui->comboBoxMOChannel->currentData().toUInt());
Harddrives::busTrackClass->device_track(1, DEV_MO, ui->tableViewMO->model()->data(i, Qt::UserRole).toInt(), ui->tableViewMO->model()->data(i, Qt::UserRole + 1).toInt());
Harddrives::busTrackClass->device_track(0, DEV_MO, ui->tableViewMO->model()->data(i,
Qt::UserRole).toInt(), ui->tableViewMO->model()->data(i,
Qt::UserRole + 1).toInt());
setMOBus(ui->tableViewMO->model(),
ui->tableViewMO->selectionModel()->currentIndex(),
ui->comboBoxMOBus->currentData().toUInt(),
ui->comboBoxMOChannel->currentData().toUInt());
Harddrives::busTrackClass->device_track(1, DEV_MO, ui->tableViewMO->model()->data(i,
Qt::UserRole).toInt(), ui->tableViewMO->model()->data(i,
Qt::UserRole + 1).toInt());
}
void
SettingsOtherRemovable::on_comboBoxMOType_activated(int)
{
setMOType(
ui->tableViewMO->model(),
ui->tableViewMO->selectionModel()->currentIndex(),
ui->comboBoxMOType->currentData().toUInt());
setMOType(ui->tableViewMO->model(),
ui->tableViewMO->selectionModel()->currentIndex(),
ui->comboBoxMOType->currentData().toUInt());
ui->tableViewMO->resizeColumnsToContents();
ui->tableViewMO->horizontalHeader()->setSectionResizeMode(0, QHeaderView::Stretch);
}
@@ -283,49 +283,54 @@ SettingsOtherRemovable::on_comboBoxMOType_activated(int)
void
SettingsOtherRemovable::on_comboBoxZIPBus_currentIndexChanged(int index)
{
if (index < 0) {
return;
if (index >= 0) {
int bus = ui->comboBoxZIPBus->currentData().toInt();
bool enabled = (bus != ZIP_BUS_DISABLED);
ui->comboBoxZIPChannel->setEnabled(enabled);
ui->checkBoxZIP250->setEnabled(enabled);
Harddrives::populateBusChannels(ui->comboBoxZIPChannel->model(), bus);
}
int bus = ui->comboBoxZIPBus->currentData().toInt();
bool enabled = (bus != ZIP_BUS_DISABLED);
ui->comboBoxZIPChannel->setEnabled(enabled);
ui->checkBoxZIP250->setEnabled(enabled);
Harddrives::populateBusChannels(ui->comboBoxZIPChannel->model(), bus);
}
void
SettingsOtherRemovable::on_comboBoxZIPBus_activated(int)
{
auto i = ui->tableViewZIP->selectionModel()->currentIndex().siblingAtColumn(0);
Harddrives::busTrackClass->device_track(0, DEV_ZIP, ui->tableViewZIP->model()->data(i, Qt::UserRole).toInt(), ui->tableViewZIP->model()->data(i, Qt::UserRole + 1).toInt());
ui->comboBoxZIPChannel->setCurrentIndex(ui->comboBoxZIPBus->currentData().toUInt() == ZIP_BUS_ATAPI ? Harddrives::busTrackClass->next_free_ide_channel() : Harddrives::busTrackClass->next_free_scsi_id());
setZIPBus(
ui->tableViewZIP->model(),
ui->tableViewZIP->selectionModel()->currentIndex(),
ui->comboBoxZIPBus->currentData().toUInt(),
ui->comboBoxZIPChannel->currentData().toUInt());
Harddrives::busTrackClass->device_track(1, DEV_ZIP, ui->tableViewZIP->model()->data(i, Qt::UserRole).toInt(), ui->tableViewZIP->model()->data(i, Qt::UserRole + 1).toInt());
Harddrives::busTrackClass->device_track(0, DEV_ZIP, ui->tableViewZIP->model()->data(i,
Qt::UserRole).toInt(), ui->tableViewZIP->model()->data(i,
Qt::UserRole + 1).toInt());
ui->comboBoxZIPChannel->setCurrentIndex(ui->comboBoxZIPBus->currentData().toUInt() == ZIP_BUS_ATAPI ?
Harddrives::busTrackClass->next_free_ide_channel() :
Harddrives::busTrackClass->next_free_scsi_id());
setZIPBus(ui->tableViewZIP->model(),
ui->tableViewZIP->selectionModel()->currentIndex(),
ui->comboBoxZIPBus->currentData().toUInt(),
ui->comboBoxZIPChannel->currentData().toUInt());
Harddrives::busTrackClass->device_track(1, DEV_ZIP, ui->tableViewZIP->model()->data(i,
Qt::UserRole).toInt(), ui->tableViewZIP->model()->data(i,
Qt::UserRole + 1).toInt());
}
void
SettingsOtherRemovable::on_comboBoxZIPChannel_activated(int)
{
auto i = ui->tableViewZIP->selectionModel()->currentIndex().siblingAtColumn(0);
Harddrives::busTrackClass->device_track(0, DEV_ZIP, ui->tableViewZIP->model()->data(i, Qt::UserRole).toInt(), ui->tableViewZIP->model()->data(i, Qt::UserRole + 1).toInt());
setZIPBus(
ui->tableViewZIP->model(),
ui->tableViewZIP->selectionModel()->currentIndex(),
ui->comboBoxZIPBus->currentData().toUInt(),
ui->comboBoxZIPChannel->currentData().toUInt());
Harddrives::busTrackClass->device_track(1, DEV_ZIP, ui->tableViewZIP->model()->data(i, Qt::UserRole).toInt(), ui->tableViewZIP->model()->data(i, Qt::UserRole + 1).toInt());
Harddrives::busTrackClass->device_track(0, DEV_ZIP, ui->tableViewZIP->model()->data(i,
Qt::UserRole).toInt(), ui->tableViewZIP->model()->data(i,
Qt::UserRole + 1).toInt());
setZIPBus(ui->tableViewZIP->model(),
ui->tableViewZIP->selectionModel()->currentIndex(),
ui->comboBoxZIPBus->currentData().toUInt(),
ui->comboBoxZIPChannel->currentData().toUInt());
Harddrives::busTrackClass->device_track(1, DEV_ZIP, ui->tableViewZIP->model()->data(i,
Qt::UserRole).toInt(),
ui->tableViewZIP->model()->data(i, Qt::UserRole + 1).toInt());
}
void
SettingsOtherRemovable::on_checkBoxZIP250_stateChanged(int state)
{
setZIPType(
ui->tableViewZIP->model(),
ui->tableViewZIP->selectionModel()->currentIndex(),
state == Qt::Checked);
setZIPType(ui->tableViewZIP->model(),
ui->tableViewZIP->selectionModel()->currentIndex(),
state == Qt::Checked);
}

View File

@@ -3688,7 +3688,7 @@ mach_accel_out(uint16_t port, uint8_t val, mach_t *mach)
} else {
dev->on = (dev->accel.advfunc_cntl & 0x01);
vga_on = !dev->on;
pclog("ATI 8514/A: (0x4ae8) val = %04x\n", val & 0x01);
mach_log("ATI 8514/A: (0x4ae8) val = %04x\n", val & 0x01);
}
svga_recalctimings(svga);
break;
@@ -3813,7 +3813,7 @@ mach_accel_out(uint16_t port, uint8_t val, mach_t *mach)
case 0x4aef:
WRITE8(port, mach->accel.clock_sel, val);
if (port & 1) {
pclog("ATI 8514/A: (0x4aee) val = %04x\n", mach->accel.clock_sel & 0x01);
mach_log("ATI 8514/A: (0x4aee) val = %04x\n", mach->accel.clock_sel & 0x01);
dev->on = mach->accel.clock_sel & 0x01;
vga_on = !dev->on;
}
@@ -3877,9 +3877,7 @@ mach_accel_out(uint16_t port, uint8_t val, mach_t *mach)
case 0x76ee:
case 0x76ef:
WRITE8(port, mach->accel.ge_pitch, val);
if (port & 1)
dev->ext_pitch = ((mach->accel.ge_pitch & 0xff) << 3);
dev->ext_pitch = ((mach->accel.ge_pitch & 0xff) << 3);
svga_recalctimings(svga);
break;

View File

@@ -51,6 +51,24 @@ static uint16_t xga_readw(uint32_t addr, void *priv);
int xga_has_vga = 0;
#ifdef ENABLE_XGA_LOG
int xga_do_log = ENABLE_XGA_LOG;
static void
xga_log(const char *fmt, ...)
{
va_list ap;
if (xga_do_log) {
va_start(ap, fmt);
pclog_ex(fmt, ap);
va_end(ap);
}
}
#else
# define xga_log(fmt, ...)
#endif
void
svga_xga_out(uint16_t addr, uint8_t val, void *priv)
{
@@ -123,9 +141,11 @@ xga_updatemapping(svga_t *svga)
{
xga_t *xga = &svga->xga;
#if 0
pclog("OpMode = %x, linear base = %08x, aperture cntl = %d, access mode = %x, map = %x, endian reverse = %d, a5test = %d, XGA on = %d.\n", xga->op_mode, xga->linear_base, xga->aperture_cntl, xga->access_mode, svga->gdcreg[6] & 0x0c, xga->linear_endian_reverse, xga->a5_test, xga->on);
#endif
xga_log("OpMode = %x, linear base = %08x, aperture cntl = %d, access mode = %x, map = %x, "
"endian reverse = %d, a5test = %d, XGA on = %d.\n", xga->op_mode, xga->linear_base,
xga->aperture_cntl, xga->access_mode, svga->gdcreg[6] & 0x0c,
xga->linear_endian_reverse, xga->a5_test, xga->on);
if (((xga->op_mode & 7) >= 4) || ((xga->op_mode & 7) == 0)) {
if ((xga->aperture_cntl == 1) || (xga->aperture_cntl == 2)) {
mem_mapping_disable(&svga->mapping);
@@ -157,13 +177,12 @@ xga_updatemapping(svga_t *svga)
vga_on = !xga->on;
}
}
#if 0
pclog("XGA opmode (extended) = %d, disp mode = %d, aperture = %d.\n", xga->op_mode & 7, xga->disp_cntl_2 & 7, xga->aperture_cntl);
#endif
xga_log("XGA opmode (extended) = %d, disp mode = %d, aperture = %d.\n", xga->op_mode & 7,
xga->disp_cntl_2 & 7, xga->aperture_cntl);
}
#if 0
pclog("VGA on = %d.\n", vga_on);
#endif
xga_log("VGA on = %d.\n", vga_on);
}
void
@@ -403,9 +422,9 @@ xga_ext_out_reg(xga_t *xga, svga_t *svga, uint8_t idx, uint8_t val)
xga->cursor_data_on = 0;
}
}
#if 0
pclog("Sprite POS = %d, data on = %d, idx = %d, apcntl = %d\n", xga->sprite_pos, xga->cursor_data_on, xga->sprite_pal_addr_idx, xga->aperture_cntl);
#endif
xga_log("Sprite POS = %d, data on = %d, idx = %d, apcntl = %d\n", xga->sprite_pos,
xga->cursor_data_on, xga->sprite_pal_addr_idx, xga->aperture_cntl);
break;
case 0x62:
@@ -484,9 +503,8 @@ xga_ext_outb(uint16_t addr, uint8_t val, void *priv)
svga_t *svga = (svga_t *) priv;
xga_t *xga = &svga->xga;
#if 0
pclog("[%04X:%08X]: EXT OUTB = %02x, val = %02x\n", CS, cpu_state.pc, addr, val);
#endif
xga_log("[%04X:%08X]: EXT OUTB = %02x, val = %02x\n", CS, cpu_state.pc, addr, val);
switch (addr & 0x0f) {
case 0:
xga->op_mode = val;
@@ -502,9 +520,8 @@ xga_ext_outb(uint16_t addr, uint8_t val, void *priv)
break;
case 8:
xga->ap_idx = val;
#if 0
pclog("Aperture CNTL = %d, val = %02x, up to bit6 = %02x\n", xga->aperture_cntl, val, val & 0x3f);
#endif
xga_log("Aperture CNTL = %d, val = %02x, up to bit6 = %02x\n", xga->aperture_cntl,
val, val & 0x3f);
if ((xga->op_mode & 7) < 4) {
xga->write_bank = xga->read_bank = 0;
} else {
@@ -742,9 +759,8 @@ xga_ext_inb(uint16_t addr, void *priv)
break;
case 0x6a:
#if 0
pclog("Sprite POS Read = %d, addr idx = %04x\n", xga->sprite_pos, xga->sprite_pal_addr_idx_prefetch);
#endif
xga_log("Sprite POS Read = %d, addr idx = %04x\n", xga->sprite_pos,
xga->sprite_pal_addr_idx_prefetch);
ret = xga->sprite_data[xga->sprite_pos_prefetch];
xga->sprite_pos_prefetch = (xga->sprite_pos_prefetch + 1) & 0x3ff;
break;
@@ -773,9 +789,7 @@ xga_ext_inb(uint16_t addr, void *priv)
break;
}
#if 0
pclog("[%04X:%08X]: EXT INB = %02x, ret = %02x\n", CS, cpu_state.pc, addr, ret);
#endif
xga_log("[%04X:%08X]: EXT INB = %02x, ret = %02x\n", CS, cpu_state.pc, addr, ret);
return ret;
}
@@ -1410,10 +1424,15 @@ xga_bitblt(svga_t *svga)
xga->accel.pattern = 0;
#if 0
pclog("XGA bitblt linear endian reverse=%d, access_mode=%x, octanty=%d, src command = %08x, pxsrcmap=%x, pxpatmap=%x, pxdstmap=%x, srcmap=%d, patmap=%d, dstmap=%d, usesrcvramfr=%d, usevrambk=%d.\n",
xga->linear_endian_reverse, xga->access_mode & 0x0f, ydir, xga->accel.command, xga->accel.px_map_format[xga->accel.src_map] & 0x0f, xga->accel.px_map_format[xga->accel.pat_src] & 0x0f, xga->accel.px_map_format[xga->accel.dst_map] & 0x0f, xga->accel.src_map, xga->accel.pat_src, xga->accel.dst_map, ((xga->accel.command >> 28) & 3), ((xga->accel.command >> 30) & 3));
#endif
xga_log("XGA bitblt linear endian reverse=%d, access_mode=%x, octanty=%d, src command = %08x, "
"pxsrcmap=%x, pxpatmap=%x, pxdstmap=%x, srcmap=%d, patmap=%d, dstmap=%d, "
"usesrcvramfr=%d, usevrambk=%d.\n",
xga->linear_endian_reverse, xga->access_mode & 0x0f, ydir, xga->accel.command,
xga->accel.px_map_format[xga->accel.src_map] & 0x0f,
xga->accel.px_map_format[xga->accel.pat_src] & 0x0f,
xga->accel.px_map_format[xga->accel.dst_map] & 0x0f,
xga->accel.src_map, xga->accel.pat_src,
xga->accel.dst_map, ((xga->accel.command >> 28) & 3), ((xga->accel.command >> 30) & 3));
if (xga->accel.pat_src == 8) {
if (srcheight == 7)
@@ -1427,10 +1446,17 @@ xga_bitblt(svga_t *svga)
}
}
}
#if 0
pclog("Pattern Map = 8: CMD = %08x: SRCBase = %08x, DSTBase = %08x, from/to vram dir = %d, cmd dir = %06x\n", xga->accel.command, srcbase, dstbase, xga->from_to_vram, xga->accel.dir_cmd);
pclog("CMD = %08x: Y = %d, X = %d, patsrc = %02x, srcmap = %d, dstmap = %d, py = %d, sy = %d, dy = %d, width0 = %d, width1 = %d, width2 = %d, width3 = %d\n", xga->accel.command, xga->accel.y, xga->accel.x, xga->accel.pat_src, xga->accel.src_map, xga->accel.dst_map, xga->accel.py, xga->accel.sy, xga->accel.dy, xga->accel.px_map_width[0], xga->accel.px_map_width[1], xga->accel.px_map_width[2], xga->accel.px_map_width[3]);
#endif
xga_log("Pattern Map = 8: CMD = %08x: SRCBase = %08x, DSTBase = %08x, from/to vram dir = %d, "
"cmd dir = %06x\n", xga->accel.command, srcbase, dstbase, xga->from_to_vram,
xga->accel.dir_cmd);
xga_log("CMD = %08x: Y = %d, X = %d, patsrc = %02x, srcmap = %d, dstmap = %d, py = %d, "
"sy = %d, dy = %d, width0 = %d, width1 = %d, width2 = %d, width3 = %d\n",
xga->accel.command, xga->accel.y, xga->accel.x, xga->accel.pat_src, xga->accel.src_map,
xga->accel.dst_map, xga->accel.py, xga->accel.sy, xga->accel.dy,
xga->accel.px_map_width[0], xga->accel.px_map_width[1],
xga->accel.px_map_width[2], xga->accel.px_map_width[3]);
while (xga->accel.y >= 0) {
if (xga->accel.command & 0xc0) {
if ((xga->accel.dx >= xga->accel.mask_map_origin_x_off) && (xga->accel.dx <= ((xga->accel.px_map_width[0] & 0xfff) + xga->accel.mask_map_origin_x_off)) && (xga->accel.dy >= xga->accel.mask_map_origin_y_off) && (xga->accel.dy <= ((xga->accel.px_map_height[0] & 0xfff) + xga->accel.mask_map_origin_y_off))) {
@@ -1507,11 +1533,22 @@ xga_bitblt(svga_t *svga)
}
}
#if 0
pclog("XGA bitblt linear endian reverse=%d, octanty=%d, src command = %08x, pxsrcmap=%x, pxdstmap=%x, srcmap=%d, patmap=%d, dstmap=%d, dstwidth=%d, dstheight=%d, srcwidth=%d, srcheight=%d, dstbase=%08x, srcbase=%08x.\n", xga->linear_endian_reverse, ydir, xga->accel.command, xga->accel.px_map_format[xga->accel.src_map] & 0x0f, xga->accel.px_map_format[xga->accel.dst_map] & 0x0f, xga->accel.src_map, xga->accel.pat_src, xga->accel.dst_map, dstwidth, dstheight, srcwidth, srcheight, dstbase, srcbase);
pclog("Pattern Map = %d: CMD = %08x: PATBase = %08x, SRCBase = %08x, DSTBase = %08x\n", xga->accel.pat_src, xga->accel.command, patbase, srcbase, dstbase);
pclog("CMD = %08x: Y = %d, X = %d, patsrc = %02x, srcmap = %d, dstmap = %d, py = %d, sy = %d, dy = %d, width0 = %d, width1 = %d, width2 = %d, width3 = %d\n", xga->accel.command, xga->accel.y, xga->accel.x, xga->accel.pat_src, xga->accel.src_map, xga->accel.dst_map, xga->accel.py, xga->accel.sy, xga->accel.dy, xga->accel.px_map_width[0], xga->accel.px_map_width[1], xga->accel.px_map_width[2], xga->accel.px_map_width[3]);
#endif
xga_log("XGA bitblt linear endian reverse=%d, octanty=%d, src command = %08x, pxsrcmap=%x, "
"pxdstmap=%x, srcmap=%d, patmap=%d, dstmap=%d, dstwidth=%d, dstheight=%d, srcwidth=%d, "
"srcheight=%d, dstbase=%08x, srcbase=%08x.\n", xga->linear_endian_reverse, ydir,
xga->accel.command, xga->accel.px_map_format[xga->accel.src_map] & 0x0f,
xga->accel.px_map_format[xga->accel.dst_map] & 0x0f, xga->accel.src_map,
xga->accel.pat_src, xga->accel.dst_map, dstwidth, dstheight, srcwidth, srcheight,
dstbase, srcbase);
xga_log("Pattern Map = %d: CMD = %08x: PATBase = %08x, SRCBase = %08x, DSTBase = %08x\n",
xga->accel.pat_src, xga->accel.command, patbase, srcbase, dstbase);
xga_log("CMD = %08x: Y = %d, X = %d, patsrc = %02x, srcmap = %d, dstmap = %d, py = %d, "
"sy = %d, dy = %d, width0 = %d, width1 = %d, width2 = %d, width3 = %d\n",
xga->accel.command, xga->accel.y, xga->accel.x, xga->accel.pat_src,
xga->accel.src_map, xga->accel.dst_map, xga->accel.py, xga->accel.sy, xga->accel.dy,
xga->accel.px_map_width[0], xga->accel.px_map_width[1],
xga->accel.px_map_width[2], xga->accel.px_map_width[3]);
while (xga->accel.y >= 0) {
mix = xga_accel_read_pattern_map_pixel(svga, xga->accel.px, xga->accel.py, xga->accel.pat_src, patbase, patwidth + 1);
@@ -1702,9 +1739,10 @@ xga_mem_write(uint32_t addr, uint32_t val, xga_t *xga, svga_t *svga, int len)
xga->accel.short_stroke_vector3 = (xga->accel.short_stroke >> 16) & 0xff;
xga->accel.short_stroke_vector4 = (xga->accel.short_stroke >> 24) & 0xff;
#if 0
pclog("1Vector = %02x, 2Vector = %02x, 3Vector = %02x, 4Vector = %02x\n", xga->accel.short_stroke_vector1, xga->accel.short_stroke_vector2, xga->accel.short_stroke_vector3, xga->accel.short_stroke_vector4);
#endif
xga_log("1Vector = %02x, 2Vector = %02x, 3Vector = %02x, 4Vector = %02x\n",
xga->accel.short_stroke_vector1, xga->accel.short_stroke_vector2,
xga->accel.short_stroke_vector3, xga->accel.short_stroke_vector4);
xga_short_stroke(svga, xga->accel.short_stroke_vector1);
xga_short_stroke(svga, xga->accel.short_stroke_vector2);
xga_short_stroke(svga, xga->accel.short_stroke_vector3);
@@ -1975,51 +2013,52 @@ exec_command:
xga->accel.dst_map = ((xga->accel.command >> 16) & 0x0f);
xga->accel.src_map = ((xga->accel.command >> 20) & 0x0f);
#if 0
if (xga->accel.pat_src) {
pclog("[%04X:%08X]: Accel Command = %02x, full = %08x, patwidth = %d, dstwidth = %d, srcwidth = %d, patheight = %d, dstheight = %d, srcheight = %d, px = %d, py = %d, dx = %d, dy = %d, sx = %d, sy = %d, patsrc = %d, dstmap = %d, srcmap = %d, dstbase = %08x, srcbase = %08x, patbase = %08x, dstformat = %x, srcformat = %x, planemask = %08x\n",
CS, cpu_state.pc, ((xga->accel.command >> 24) & 0x0f), xga->accel.command, xga->accel.px_map_width[xga->accel.pat_src],
xga->accel.px_map_width[xga->accel.dst_map], xga->accel.px_map_width[xga->accel.src_map],
xga->accel.px_map_height[xga->accel.pat_src], xga->accel.px_map_height[xga->accel.dst_map],
xga->accel.px_map_height[xga->accel.src_map],
xga->accel.pat_map_x, xga->accel.pat_map_y,
xga->accel.dst_map_x, xga->accel.dst_map_y,
xga->accel.src_map_x, xga->accel.src_map_y,
xga->accel.pat_src, xga->accel.dst_map, xga->accel.src_map,
xga->accel.px_map_base[xga->accel.dst_map], xga->accel.px_map_base[xga->accel.src_map], xga->accel.px_map_base[xga->accel.pat_src],
xga->accel.px_map_format[xga->accel.dst_map] & 0x0f, xga->accel.px_map_format[xga->accel.src_map] & 0x0f, xga->accel.plane_mask);
pclog("\n");
}
#ifdef ENABLE_XGA_LOG
if (xga->accel.pat_src)
xga_log("[%04X:%08X]: Accel Command = %02x, full = %08x, patwidth = %d, "
"dstwidth = %d, srcwidth = %d, patheight = %d, dstheight = %d, "
"srcheight = %d, px = %d, py = %d, dx = %d, dy = %d, sx = %d, "
"sy = %d, patsrc = %d, dstmap = %d, srcmap = %d, dstbase = %08x, "
"srcbase = %08x, patbase = %08x, dstformat = %x, srcformat = %x, "
"planemask = %08x\n\n",
CS, cpu_state.pc, ((xga->accel.command >> 24) & 0x0f),
xga->accel.command, xga->accel.px_map_width[xga->accel.pat_src],
xga->accel.px_map_width[xga->accel.dst_map],
xga->accel.px_map_width[xga->accel.src_map],
xga->accel.px_map_height[xga->accel.pat_src],
xga->accel.px_map_height[xga->accel.dst_map],
xga->accel.px_map_height[xga->accel.src_map],
xga->accel.pat_map_x, xga->accel.pat_map_y,
xga->accel.dst_map_x, xga->accel.dst_map_y,
xga->accel.src_map_x, xga->accel.src_map_y,
xga->accel.pat_src, xga->accel.dst_map,
xga->accel.src_map, xga->accel.px_map_base[xga->accel.dst_map],
xga->accel.px_map_base[xga->accel.src_map],
xga->accel.px_map_base[xga->accel.pat_src],
xga->accel.px_map_format[xga->accel.dst_map] & 0x0f,
xga->accel.px_map_format[xga->accel.src_map] & 0x0f,
xga->accel.plane_mask);
#endif
switch ((xga->accel.command >> 24) & 0x0f) {
case 3: /*Bresenham Line Draw Read*/
#if 0
pclog("Line Draw Read\n");
#endif
xga_log("Line Draw Read\n");
break;
case 4: /*Short Stroke Vectors*/
#if 0
pclog("Short Stroke Vectors.\n");
#endif
xga_log("Short Stroke Vectors.\n");
break;
case 5: /*Bresenham Line Draw Write*/
#if 0
pclog("Line Draw Write.\n");
#endif
xga_log("Line Draw Write.\n");
xga_line_draw_write(svga);
break;
case 8: /*BitBLT*/
xga_bitblt(svga);
break;
case 9: /*Inverting BitBLT*/
#if 0
pclog("Inverting BitBLT\n");
#endif
xga_log("Inverting BitBLT\n");
break;
case 0x0a: /*Area Fill*/
#if 0
pclog("Area Fill.\n");
#endif
xga_log("Area Fill.\n");
break;
default:
@@ -2061,9 +2100,8 @@ xga_memio_writeb(uint32_t addr, uint8_t val, void *priv)
xga_t *xga = &svga->xga;
xga_mem_write(addr, val, xga, svga, 1);
#if 0
pclog("Write MEMIOB = %04x, val = %02x\n", addr & 0x7f, val);
#endif
xga_log("Write MEMIOB = %04x, val = %02x\n", addr & 0x7f, val);
}
static void
@@ -2073,9 +2111,8 @@ xga_memio_writew(uint32_t addr, uint16_t val, void *priv)
xga_t *xga = &svga->xga;
xga_mem_write(addr, val, xga, svga, 2);
#if 0
pclog("Write MEMIOW = %04x, val = %04x\n", addr & 0x7f, val);
#endif
xga_log("Write MEMIOW = %04x, val = %04x\n", addr & 0x7f, val);
}
static void
@@ -2085,9 +2122,8 @@ xga_memio_writel(uint32_t addr, uint32_t val, void *priv)
xga_t *xga = &svga->xga;
xga_mem_write(addr, val, xga, svga, 4);
#if 0
pclog("Write MEMIOL = %04x, val = %08x\n", addr & 0x7f, val);
#endif
xga_log("Write MEMIOL = %04x, val = %08x\n", addr & 0x7f, val);
}
static uint8_t
@@ -2183,9 +2219,7 @@ xga_memio_readb(uint32_t addr, void *priv)
temp = xga_mem_read(addr, xga, svga);
#if 0
pclog("[%04X:%08X]: Read MEMIOB = %04x, temp = %02x\n", CS, cpu_state.pc, addr, temp);
#endif
xga_log("[%04X:%08X]: Read MEMIOB = %04x, temp = %02x\n", CS, cpu_state.pc, addr, temp);
return temp;
}
@@ -2200,9 +2234,8 @@ xga_memio_readw(uint32_t addr, void *priv)
temp = xga_mem_read(addr, xga, svga);
temp |= (xga_mem_read(addr + 1, xga, svga) << 8);
#if 0
pclog("[%04X:%08X]: Read MEMIOW = %04x, temp = %04x\n", CS, cpu_state.pc, addr, temp);
#endif
xga_log("[%04X:%08X]: Read MEMIOW = %04x, temp = %04x\n", CS, cpu_state.pc, addr, temp);
return temp;
}
@@ -2218,9 +2251,8 @@ xga_memio_readl(uint32_t addr, void *priv)
temp |= (xga_mem_read(addr + 2, xga, svga) << 16);
temp |= (xga_mem_read(addr + 3, xga, svga) << 24);
#if 0
pclog("Read MEMIOL = %04x, temp = %08x\n", addr, temp);
#endif
xga_log("Read MEMIOL = %04x, temp = %08x\n", addr, temp);
return temp;
}
@@ -2817,9 +2849,8 @@ xga_mca_read(int port, void *priv)
if (((port & 7) == 3) && !(ret & 1)) /*Always enable the mapping.*/
ret |= 1;
#if 0
pclog("[%04X:%08X]: POS Read Port = %x, val = %02x\n", CS, cpu_state.pc, port & 7, xga->pos_regs[port & 7]);
#endif
xga_log("[%04X:%08X]: POS Read Port = %x, val = %02x\n", CS, cpu_state.pc,
port & 7, xga->pos_regs[port & 7]);
return ret;
}
@@ -2860,9 +2891,10 @@ xga_mca_write(int port, uint8_t val, void *priv)
else
mem_mapping_set_addr(&xga->memio_mapping, xga->rom_addr + 0x1c00 + (xga->instance * 0x80), 0x80);
}
#if 0
pclog("[%04X:%08X]: POS Write Port = %x, val = %02x, linear base = %08x, instance = %d, rom addr = %05x\n", CS, cpu_state.pc, port & 7, val, xga->linear_base, xga->instance, xga->rom_addr);
#endif
xga_log("[%04X:%08X]: POS Write Port = %x, val = %02x, linear base = %08x, instance = %d, "
"rom addr = %05x\n", CS, cpu_state.pc, port & 7, val, xga->linear_base,
xga->instance, xga->rom_addr);
}
static uint8_t
@@ -2926,13 +2958,12 @@ xga_pos_in(uint16_t addr, void *priv)
ret = xga->pos_idx & 0xff;
break;
case 0x0103:
if (!(xga->pos_idx & 3)) {
if (!(xga->pos_idx & 3))
ret = xga->pos_regs[3];
} else
else
ret = 0;
#if 0
pclog("POS IDX for 0103 = %d, ret = %02x.\n", xga->pos_idx & 3, ret);
#endif
xga_log("POS IDX for 0103 = %d, ret = %02x.\n", xga->pos_idx & 3, ret);
break;
case 0x0104:
switch (xga->pos_idx & 3) {
@@ -2952,9 +2983,8 @@ xga_pos_in(uint16_t addr, void *priv)
default:
break;
}
#if 0
pclog("POS IDX for 0104 = %d, ret = %02x.\n", xga->pos_idx & 3, ret);
#endif
xga_log("POS IDX for 0104 = %d, ret = %02x.\n", xga->pos_idx & 3, ret);
break;
case 0x0108:
case 0x0109:
@@ -3030,9 +3060,7 @@ xga_pos_out(uint16_t addr, uint8_t val, void *priv)
break;
case 0x0107:
xga->pos_idx = (xga->pos_idx & 0xff00) | val;
#if 0
pclog("POS IDX Write = %04x.\n", xga->pos_idx);
#endif
xga_log("POS IDX Write = %04x.\n", xga->pos_idx);
break;
case 0x0108:
case 0x0109:
@@ -3103,6 +3131,7 @@ xga_init(const device_t *info)
rom = malloc(xga->bios_rom.sz);
memset(rom, 0xff, xga->bios_rom.sz);
(void) fread(rom, xga->bios_rom.sz, 1, f);
(void) fclose(f);
xga->bios_rom.rom = rom;

View File

@@ -94,7 +94,7 @@ vnc_ptrevent(int but, int x, int y, rfbClientPtr cl)
dy = (y - ptr_y) / 0.96;
/* VNC uses absolute positions within the window, no deltas. */
mouse_scale_x(dx, dy);
mouse_scale(dx, dy);
ptr_x = x;
ptr_y = y;

View File

@@ -9,7 +9,8 @@
"libpng",
"sdl2",
"rtmidi",
"libslirp"
"libslirp",
"fluidsynth"
],
"features": {
"qt-ui": {