mirror of
https://github.com/86Box/86Box.git
synced 2026-02-22 01:25:33 -07:00
Merge remote-tracking branch 'upstream/master' into feature/mtrr
This commit is contained in:
32
.github/ISSUE_TEMPLATE/bug_report.md
vendored
32
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@@ -1,32 +0,0 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Create a report to help us improve
|
||||
title: ''
|
||||
labels: bug
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Describe the bug**
|
||||
A clear and concise description of what the bug is.
|
||||
|
||||
**To Reproduce**
|
||||
Steps to reproduce the behavior:
|
||||
1. Go to '...'
|
||||
2. Click on '....'
|
||||
3. Scroll down to '....'
|
||||
4. See error
|
||||
|
||||
**Expected behavior**
|
||||
A clear and concise description of what you expected to happen.
|
||||
|
||||
**Screenshots**
|
||||
If applicable, add screenshots to help explain your problem.
|
||||
|
||||
**Desktop (please complete the following information):**
|
||||
- OS: [e.g. Windows 10]
|
||||
- 86Box version: [e.g. v3.7.1 build 4032; saying "Latest from Jenkins" isn't helpful]
|
||||
- Build information: [i.e. new/old dynarec, architecture and build type]
|
||||
|
||||
**Additional context**
|
||||
Add any other context about the problem here. If you are using an Optimized build, make sure to try the regular build too before filing a bug report!
|
||||
80
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
Normal file
80
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
Normal file
@@ -0,0 +1,80 @@
|
||||
name: Bug Report
|
||||
description: File a bug report
|
||||
title: "Title"
|
||||
labels: ["bug"]
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Thanks for taking the time to fill out this bug report!
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: What happened?
|
||||
description: Also tell us, what did you expect to happen?
|
||||
placeholder: Tell us what you see!
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Configuration file
|
||||
description: Please copy and paste your machine configuration file (`86box.cfg`). This will be automatically formatted into code, so no need for backticks.
|
||||
render: ini
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
attributes:
|
||||
label: Operating system
|
||||
description: What is your host operating system?
|
||||
placeholder: e.g. Windows 10
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
attributes:
|
||||
label: CPU
|
||||
description: What is your host CPU?
|
||||
placeholder: e.g. AMD Ryzen 5 5600G
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
attributes:
|
||||
label: 86Box version
|
||||
description: What version of 86Box are you running? (Saying "Latest from Jenkins" is not helpful.)
|
||||
placeholder: e.g. v4.0 build 5000
|
||||
validations:
|
||||
required: true
|
||||
- type: dropdown
|
||||
attributes:
|
||||
label: Build architecture
|
||||
description: 86Box for what architecture are you using?
|
||||
options:
|
||||
- Linux - ARM (32-bit)
|
||||
- Linux - ARM (64-bit)
|
||||
- Linux - x64 (64-bit)
|
||||
- Linux - x86 (32-bit)
|
||||
- macOS - Universal (Intel and Apple Silicon)
|
||||
- Windows - x64 (64-bit)
|
||||
- Windows - x86 (32-bit)
|
||||
validations:
|
||||
required: true
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: Build type
|
||||
description: What type of build are you using?
|
||||
options:
|
||||
- label: New recompiler
|
||||
- label: Debug build
|
||||
- type: dropdown
|
||||
attributes:
|
||||
label: Download source
|
||||
description: Where did you download 86Box from?
|
||||
options:
|
||||
- Official website (Jenkins, GitHub)
|
||||
- Manager auto-update
|
||||
- I built 86Box myself (please tell us more about your build configuration)
|
||||
- I got 86Box from a third party repository (please tell us where)
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Additional context
|
||||
description: Is there anything else you want to tell us?
|
||||
7
.github/ISSUE_TEMPLATE/config.yml
vendored
7
.github/ISSUE_TEMPLATE/config.yml
vendored
@@ -1,5 +1,8 @@
|
||||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: Question
|
||||
- name: Machine Request
|
||||
url: https://github.com/86Box/86Box/issues/3577#issue-comment-box
|
||||
about: Please submit machine addition requests under this tracking issue.
|
||||
- name: Feature Request or Question
|
||||
url: https://github.com/86Box/86Box/discussions
|
||||
about: Please ask and answer questions here.
|
||||
about: Please submit feature requests and ask questions here.
|
||||
|
||||
20
.github/ISSUE_TEMPLATE/feature_request.md
vendored
20
.github/ISSUE_TEMPLATE/feature_request.md
vendored
@@ -1,20 +0,0 @@
|
||||
---
|
||||
name: Feature request
|
||||
about: Suggest an idea for this project
|
||||
title: ''
|
||||
labels: feature
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Is your feature request related to a problem? Please describe.**
|
||||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||
|
||||
**Describe the solution you'd like**
|
||||
A clear and concise description of what you want to happen.
|
||||
|
||||
**Describe alternatives you've considered**
|
||||
A clear and concise description of any alternative solutions or features you've considered.
|
||||
|
||||
**Additional context**
|
||||
Add any other context or screenshots about the feature request here.
|
||||
9
.github/workflows/cmake.yml
vendored
9
.github/workflows/cmake.yml
vendored
@@ -411,8 +411,15 @@ jobs:
|
||||
slug: -Qt
|
||||
packages: >-
|
||||
qt@5
|
||||
src-packages: >-
|
||||
libsndfile
|
||||
|
||||
steps:
|
||||
- name: Install source dependencies
|
||||
run: >-
|
||||
brew reinstall -s
|
||||
${{ matrix.ui.src-packages }}
|
||||
|
||||
- name: Install dependencies
|
||||
run: >-
|
||||
brew install
|
||||
@@ -458,12 +465,10 @@ jobs:
|
||||
sonar-scanner --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}"
|
||||
|
||||
- name: Generate package
|
||||
if: 0
|
||||
run: |
|
||||
cmake --install build
|
||||
|
||||
- name: Upload artifact
|
||||
if: 0
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: '86Box${{ matrix.ui.slug }}${{ matrix.dynarec.slug }}${{ matrix.build.slug }}-macOS-x86_64-gha${{ github.run_number }}'
|
||||
|
||||
@@ -35,7 +35,7 @@ if(MUNT_EXTERNAL)
|
||||
endif()
|
||||
|
||||
project(86Box
|
||||
VERSION 4.0
|
||||
VERSION 4.0.1
|
||||
DESCRIPTION "Emulator of x86-based systems"
|
||||
HOMEPAGE_URL "https://86box.net"
|
||||
LANGUAGES C CXX)
|
||||
|
||||
@@ -31,8 +31,6 @@ Performance may vary depending on both host and guest configuration. Most emulat
|
||||
It is also recommended to use a manager application with 86Box for easier handling of multiple virtual machines.
|
||||
|
||||
* [86Box Manager](https://github.com/86Box/86BoxManager) by [Overdoze](https://github.com/daviunic) (Windows only)
|
||||
* [86Box Manager Lite](https://github.com/insanemal/86box_manager_py) by [Insanemal](https://github.com/insanemal)
|
||||
* [WinBox for 86Box](https://github.com/86Box/WinBox-for-86Box) by Laci bá' (Windows only)
|
||||
* [Linbox-qt5](https://github.com/Dungeonseeker/linbox-qt5) by Dungeonseeker (Linux focused, should work on Windows though untested)
|
||||
* [MacBox for 86Box](https://github.com/Moonif/MacBox) by [Moonif](https://github.com/Moonif) (MacOS only)
|
||||
|
||||
|
||||
4
debian/changelog
vendored
4
debian/changelog
vendored
@@ -1,5 +1,5 @@
|
||||
86box (4.0) UNRELEASED; urgency=medium
|
||||
86box (4.0.1) UNRELEASED; urgency=medium
|
||||
|
||||
* Bump release.
|
||||
|
||||
-- Jasmine Iwanek <jriwanek@gmail.com> Tue, 28 Feb 2023 00:02:16 -0500
|
||||
-- Jasmine Iwanek <jriwanek@gmail.com> Thu, 12 Oct 2023 00:00:31 +0200
|
||||
|
||||
162
src/86box.c
162
src/86box.c
@@ -123,7 +123,6 @@ int tracing_on = 0;
|
||||
|
||||
/* Commandline options. */
|
||||
int dump_on_exit = 0; /* (O) dump regs on exit */
|
||||
int do_dump_config = 0; /* (O) dump config on load */
|
||||
int start_in_fullscreen = 0; /* (O) start in fullscreen */
|
||||
#ifdef _WIN32
|
||||
int force_debug = 0; /* (O) force debug output */
|
||||
@@ -141,10 +140,14 @@ char rom_path[1024] = { '\0' }; /* (O) full path to ROMs */
|
||||
rom_path_t rom_paths = { "", NULL }; /* (O) full paths to ROMs */
|
||||
char log_path[1024] = { '\0' }; /* (O) full path of logfile */
|
||||
char vm_name[1024] = { '\0' }; /* (O) display name of the VM */
|
||||
int do_nothing = 0;
|
||||
int dump_missing = 0;
|
||||
#ifdef USE_INSTRUMENT
|
||||
uint8_t instru_enabled = 0;
|
||||
uint64_t instru_run_ms = 0;
|
||||
uint8_t instru_enabled = 0;
|
||||
uint64_t instru_run_ms = 0;
|
||||
#endif
|
||||
int clear_cmos = 0;
|
||||
int clear_flash = 0;
|
||||
|
||||
/* Configuration values. */
|
||||
int window_remember;
|
||||
@@ -398,6 +401,31 @@ pc_log(const char *fmt, ...)
|
||||
# define pc_log(fmt, ...)
|
||||
#endif
|
||||
|
||||
static void
|
||||
delete_nvr_file(uint8_t flash)
|
||||
{
|
||||
char *fn = NULL;
|
||||
int c;
|
||||
|
||||
/* Set up the NVR file's name. */
|
||||
c = strlen(machine_get_internal_name()) + 5;
|
||||
fn = (char *) malloc(c + 1);
|
||||
|
||||
if (fn == NULL)
|
||||
fatal("Error allocating memory for the removal of the %s file\n",
|
||||
flash ? "BIOS flash" : "CMOS");
|
||||
|
||||
if (flash)
|
||||
sprintf(fn, "%s.bin", machine_get_internal_name());
|
||||
else
|
||||
sprintf(fn, "%s.nvr", machine_get_internal_name());
|
||||
|
||||
remove(nvr_path(fn));
|
||||
|
||||
free(fn);
|
||||
fn = NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* Perform initial startup of the PC.
|
||||
*
|
||||
@@ -479,34 +507,40 @@ usage:
|
||||
|
||||
printf("\nUsage: 86box [options] [cfg-file]\n\n");
|
||||
printf("Valid options are:\n\n");
|
||||
printf("-? or --help - show this information\n");
|
||||
printf("-C or --config path - set 'path' to be config file\n");
|
||||
printf("-? or --help - show this information\n");
|
||||
printf("-B or --clearflash - clears the BIOS flash file\n");
|
||||
printf("-C or --config path - set 'path' to be config file\n");
|
||||
#ifdef _WIN32
|
||||
printf("-D or --debug - force debug output logging\n");
|
||||
printf("-D or --debug - force debug output logging\n");
|
||||
#endif
|
||||
#if 0
|
||||
printf("-E or --nographic - forces the old behavior\n");
|
||||
printf("-E or --nographic - forces the old behavior\n");
|
||||
#endif
|
||||
printf("-F or --fullscreen - start in fullscreen mode\n");
|
||||
printf("-G or --lang langid - start with specified language (e.g. en-US, or system)\n");
|
||||
printf("-F or --fullscreen - start in fullscreen mode\n");
|
||||
printf("-G or --lang langid - start with specified language (e.g. en-US, or system)\n");
|
||||
#ifdef _WIN32
|
||||
printf("-H or --hwnd id,hwnd - sends back the main dialog's hwnd\n");
|
||||
printf("-H or --hwnd id,hwnd - sends back the main dialog's hwnd\n");
|
||||
#endif
|
||||
printf("-I or --image d:path - load 'path' as floppy image on drive d\n");
|
||||
printf("-L or --logfile path - set 'path' to be the logfile\n");
|
||||
printf("-N or --noconfirm - do not ask for confirmation on quit\n");
|
||||
printf("-O or --dumpcfg - dump config file after loading\n");
|
||||
printf("-P or --vmpath path - set 'path' to be root for vm\n");
|
||||
printf("-R or --rompath path - set 'path' to be ROM path\n");
|
||||
printf("-S or --settings - show only the settings dialog\n");
|
||||
printf("-V or --vmname name - overrides the name of the running VM\n");
|
||||
printf("-Z or --lastvmpath - the last parameter is VM path rather than config\n");
|
||||
printf("-I or --image d:path - load 'path' as floppy image on drive d\n");
|
||||
#ifdef USE_INSTRUMENT
|
||||
printf("-J or --instrument name - set 'name' to be the profiling instrument\n");
|
||||
#endif
|
||||
printf("-K or --keycodes codes - set 'codes' to be the uncapture combination\n");
|
||||
printf("-L or --logfile path - set 'path' to be the logfile\n");
|
||||
printf("-M or --dumpmissing - dump missing machines and video cards\n");
|
||||
printf("-N or --noconfirm - do not ask for confirmation on quit\n");
|
||||
printf("-P or --vmpath path - set 'path' to be root for vm\n");
|
||||
printf("-Q or --clearnvr - clears the CMOS file\n");
|
||||
printf("-R or --rompath path - set 'path' to be ROM path\n");
|
||||
printf("-S or --settings - show only the settings dialog\n");
|
||||
printf("-V or --vmname name - overrides the name of the running VM\n");
|
||||
printf("-X or --clearboth - clears the CMOS and BIOS flash files\n");
|
||||
printf("-Y or --donothing - do not show any UI or run the emulation\n");
|
||||
printf("-Z or --lastvmpath - the last parameter is VM path rather than config\n");
|
||||
printf("\nA config file can be specified. If none is, the default file will be used.\n");
|
||||
return 0;
|
||||
} else if (!strcasecmp(argv[c], "--lastvmpath") || !strcasecmp(argv[c], "-Z")) {
|
||||
lvmp = 1;
|
||||
} else if (!strcasecmp(argv[c], "--dumpcfg") || !strcasecmp(argv[c], "-O")) {
|
||||
do_dump_config = 1;
|
||||
#ifdef _WIN32
|
||||
} else if (!strcasecmp(argv[c], "--debug") || !strcasecmp(argv[c], "-D")) {
|
||||
force_debug = 1;
|
||||
@@ -569,6 +603,24 @@ usage:
|
||||
settings_only = 1;
|
||||
} else if (!strcasecmp(argv[c], "--noconfirm") || !strcasecmp(argv[c], "-N")) {
|
||||
confirm_exit_cmdl = 0;
|
||||
} else if (!strcasecmp(argv[c], "--dumpmissing") || !strcasecmp(argv[c], "-M")) {
|
||||
dump_missing = 1;
|
||||
} else if (!strcasecmp(argv[c], "--donothing") || !strcasecmp(argv[c], "-Y")) {
|
||||
do_nothing = 1;
|
||||
} else if (!strcasecmp(argv[c], "--clearflash") || !strcasecmp(argv[c], "-B")) {
|
||||
clear_flash = 1;
|
||||
} else if (!strcasecmp(argv[c], "--clearnvr") || !strcasecmp(argv[c], "-Q")) {
|
||||
clear_cmos = 1;
|
||||
} else if (!strcasecmp(argv[c], "--keycodes") || !strcasecmp(argv[c], "-K")) {
|
||||
if ((c + 1) == argc)
|
||||
goto usage;
|
||||
|
||||
sscanf(argv[++c], "%03hX,%03hX,%03hX,%03hX,%03hX,%03hX",
|
||||
&key_prefix_1_1, &key_prefix_1_2, &key_prefix_2_1, &key_prefix_2_2,
|
||||
&key_uncapture_1, &key_uncapture_2);
|
||||
} else if (!strcasecmp(argv[c], "--clearboth") || !strcasecmp(argv[c], "-X")) {
|
||||
clear_cmos = 1;
|
||||
clear_flash = 1;
|
||||
#ifdef _WIN32
|
||||
} else if (!strcasecmp(argv[c], "--hwnd") || !strcasecmp(argv[c], "-H")) {
|
||||
|
||||
@@ -578,9 +630,8 @@ usage:
|
||||
uid = (uint32_t *) &unique_id;
|
||||
shwnd = (uint32_t *) &source_hwnd;
|
||||
sscanf(argv[++c], "%08X%08X,%08X%08X", uid + 1, uid, shwnd + 1, shwnd);
|
||||
} else if (!strcasecmp(argv[c], "--lang") || !strcasecmp(argv[c], "-G")) {
|
||||
|
||||
#endif
|
||||
} else if (!strcasecmp(argv[c], "--lang") || !strcasecmp(argv[c], "-G")) {
|
||||
// This function is currently unimplemented for *nix but has placeholders.
|
||||
|
||||
lang_init = plat_language_code(argv[++c]);
|
||||
@@ -590,13 +641,13 @@ usage:
|
||||
// The return value of 0 only means that the code is invalid,
|
||||
// not related to that translation is exists or not for the
|
||||
// selected language.
|
||||
} else if (!strcasecmp(argv[c], "--test")) {
|
||||
} else if (!strcasecmp(argv[c], "--test") || !strcasecmp(argv[c], "-T")) {
|
||||
/* some (undocumented) test function here.. */
|
||||
|
||||
/* .. and then exit. */
|
||||
return 0;
|
||||
#ifdef USE_INSTRUMENT
|
||||
} else if (!strcasecmp(argv[c], "--instrument")) {
|
||||
} else if (!strcasecmp(argv[c], "--instrument") || !strcasecmp(argv[c], "-J")) {
|
||||
if ((c + 1) == argc)
|
||||
goto usage;
|
||||
instru_enabled = 1;
|
||||
@@ -779,6 +830,18 @@ usage:
|
||||
/* Load the configuration file. */
|
||||
config_load();
|
||||
|
||||
/* Clear the CMOS and/or BIOS flash file, if we were started with
|
||||
the relevant parameter(s). */
|
||||
if (clear_cmos) {
|
||||
delete_nvr_file(0);
|
||||
clear_cmos = 0;
|
||||
}
|
||||
|
||||
if (clear_flash) {
|
||||
delete_nvr_file(1);
|
||||
clear_flash = 0;
|
||||
}
|
||||
|
||||
for (uint8_t i = 0; i < FDD_NUM; i++) {
|
||||
if (fn[i] != NULL) {
|
||||
if (strlen(fn[i]) <= 511)
|
||||
@@ -826,27 +889,29 @@ pc_init_modules(void)
|
||||
wchar_t temp[512];
|
||||
char tempc[512];
|
||||
|
||||
#ifdef PRINT_MISSING_MACHINES_AND_VIDEO_CARDS
|
||||
c = m = 0;
|
||||
while (machine_get_internal_name_ex(c) != NULL) {
|
||||
m = machine_available(c);
|
||||
if (!m)
|
||||
pclog("Missing machine: %s\n", machine_getname_ex(c));
|
||||
c++;
|
||||
}
|
||||
if (dump_missing) {
|
||||
dump_missing = 0;
|
||||
|
||||
c = m = 0;
|
||||
while (video_get_internal_name(c) != NULL) {
|
||||
memset(tempc, 0, sizeof(tempc));
|
||||
device_get_name(video_card_getdevice(c), 0, tempc);
|
||||
if ((c > 1) && !(tempc[0]))
|
||||
break;
|
||||
m = video_card_available(c);
|
||||
if (!m)
|
||||
pclog("Missing video card: %s\n", tempc);
|
||||
c++;
|
||||
c = m = 0;
|
||||
while (machine_get_internal_name_ex(c) != NULL) {
|
||||
m = machine_available(c);
|
||||
if (!m)
|
||||
pclog("Missing machine: %s\n", machine_getname_ex(c));
|
||||
c++;
|
||||
}
|
||||
|
||||
c = m = 0;
|
||||
while (video_get_internal_name(c) != NULL) {
|
||||
memset(tempc, 0, sizeof(tempc));
|
||||
device_get_name(video_card_getdevice(c), 0, tempc);
|
||||
if ((c > 1) && !(tempc[0]))
|
||||
break;
|
||||
m = video_card_available(c);
|
||||
if (!m)
|
||||
pclog("Missing video card: %s\n", tempc);
|
||||
c++;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
pc_log("Scanning for ROM images:\n");
|
||||
c = m = 0;
|
||||
@@ -945,6 +1010,11 @@ pc_init_modules(void)
|
||||
|
||||
machine_status_init();
|
||||
|
||||
if (do_nothing) {
|
||||
do_nothing = 0;
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -1212,10 +1282,6 @@ pc_close(UNUSED(thread_t *ptr))
|
||||
/* Terminate the UI thread. */
|
||||
is_quit = 1;
|
||||
|
||||
#if (defined(USE_DYNAREC) && defined(USE_NEW_DYNAREC))
|
||||
codegen_close();
|
||||
#endif
|
||||
|
||||
nvr_save();
|
||||
|
||||
config_save();
|
||||
|
||||
@@ -898,7 +898,6 @@ cdrom_get_audio_status_pioneer(cdrom_t *dev, uint8_t *b)
|
||||
{
|
||||
uint8_t ret;
|
||||
subchannel_t subc;
|
||||
uint32_t dat;
|
||||
|
||||
dev->ops->get_subchannel(dev, dev->seek_pos, &subc);
|
||||
|
||||
@@ -960,7 +959,6 @@ cdrom_get_audio_status_sony(cdrom_t *dev, uint8_t *b, int msf)
|
||||
void
|
||||
cdrom_get_current_subcodeq(cdrom_t *dev, uint8_t *b)
|
||||
{
|
||||
uint8_t ret;
|
||||
subchannel_t subc;
|
||||
|
||||
dev->ops->get_subchannel(dev, dev->seek_pos, &subc);
|
||||
|
||||
@@ -68,7 +68,6 @@ typedef struct _piix_ {
|
||||
uint8_t no_mirq0;
|
||||
uint8_t regs[4][256];
|
||||
uint8_t readout_regs[256];
|
||||
uint8_t board_config[2];
|
||||
uint16_t func0_id;
|
||||
uint16_t nvr_io_base;
|
||||
uint16_t acpi_io_base;
|
||||
@@ -1189,9 +1188,7 @@ board_write(uint16_t port, uint8_t val, void *priv)
|
||||
{
|
||||
piix_t *dev = (piix_t *) priv;
|
||||
|
||||
if (port == 0x0078)
|
||||
dev->board_config[0] = val;
|
||||
else if (port == 0x00e0)
|
||||
if (port == 0x00e0)
|
||||
dev->cur_readout_reg = val;
|
||||
else if (port == 0x00e1)
|
||||
dev->readout_regs[dev->cur_readout_reg] = val;
|
||||
@@ -1203,11 +1200,7 @@ board_read(uint16_t port, void *priv)
|
||||
const piix_t *dev = (piix_t *) priv;
|
||||
uint8_t ret = 0x64;
|
||||
|
||||
if (port == 0x0078)
|
||||
ret = dev->board_config[0];
|
||||
else if (port == 0x0079)
|
||||
ret = dev->board_config[1];
|
||||
else if (port == 0x00e0)
|
||||
if (port == 0x00e0)
|
||||
ret = dev->cur_readout_reg;
|
||||
else if (port == 0x00e1)
|
||||
ret = dev->readout_regs[dev->cur_readout_reg];
|
||||
@@ -1662,37 +1655,8 @@ piix_init(const device_t *info)
|
||||
else if (cpu_dmulti > 2.5)
|
||||
dev->readout_regs[1] |= 0x80;
|
||||
|
||||
io_sethandler(0x0078, 0x0002, board_read, NULL, NULL, board_write, NULL, NULL, dev);
|
||||
io_sethandler(0x00e0, 0x0002, board_read, NULL, NULL, board_write, NULL, NULL, dev);
|
||||
|
||||
dev->board_config[0] = 0xff;
|
||||
/* Register 0x0079: */
|
||||
/* Bit 7: 0 = Clear password, 1 = Keep password. */
|
||||
/* Bit 6: 0 = NVRAM cleared by jumper, 1 = NVRAM normal. */
|
||||
/* Bit 5: 0 = CMOS Setup disabled, 1 = CMOS Setup enabled. */
|
||||
/* Bit 4: External CPU clock (Switch 8). */
|
||||
/* Bit 3: External CPU clock (Switch 7). */
|
||||
/* 50 MHz: Switch 7 = Off, Switch 8 = Off. */
|
||||
/* 60 MHz: Switch 7 = On, Switch 8 = Off. */
|
||||
/* 66 MHz: Switch 7 = Off, Switch 8 = On. */
|
||||
/* Bit 2: 0 = On-board audio absent, 1 = On-board audio present. */
|
||||
/* Bit 1: 0 = Soft-off capable power supply present, 1 = Soft-off capable power supply absent. */
|
||||
/* Bit 0: 0 = 1.5x multiplier, 1 = 2x multiplier (Switch 6). */
|
||||
/* NOTE: A bit is read as 1 if switch is off, and as 0 if switch is on. */
|
||||
dev->board_config[1] = 0xe0;
|
||||
|
||||
if (cpu_busspeed <= 50000000)
|
||||
dev->board_config[1] |= 0x10;
|
||||
else if ((cpu_busspeed > 50000000) && (cpu_busspeed <= 60000000))
|
||||
dev->board_config[1] |= 0x18;
|
||||
else if (cpu_busspeed > 60000000)
|
||||
dev->board_config[1] |= 0x00;
|
||||
|
||||
if (cpu_dmulti <= 1.5)
|
||||
dev->board_config[1] |= 0x01;
|
||||
else
|
||||
dev->board_config[1] |= 0x00;
|
||||
|
||||
#if 0
|
||||
device_add(&i8254_sec_device);
|
||||
#endif
|
||||
|
||||
@@ -103,25 +103,11 @@
|
||||
#include <86box/timer.h>
|
||||
#include <86box/io.h>
|
||||
#include <86box/device.h>
|
||||
|
||||
#include <86box/mem.h>
|
||||
#include <86box/pci.h>
|
||||
#include <86box/plat_unused.h>
|
||||
#include <86box/port_92.h>
|
||||
#include <86box/smram.h>
|
||||
|
||||
#ifdef USE_DYNAREC
|
||||
# include "codegen_public.h"
|
||||
#else
|
||||
# ifdef USE_NEW_DYNAREC
|
||||
# define PAGE_MASK_SHIFT 6
|
||||
# else
|
||||
# define PAGE_MASK_INDEX_MASK 3
|
||||
# define PAGE_MASK_INDEX_SHIFT 10
|
||||
# define PAGE_MASK_SHIFT 4
|
||||
# endif
|
||||
# define PAGE_MASK_MASK 63
|
||||
#endif
|
||||
#include <86box/chipset.h>
|
||||
|
||||
#ifdef ENABLE_HB4_LOG
|
||||
|
||||
@@ -290,7 +290,6 @@ codegen_mark_code_present(codeblock_t *block, uint32_t start_pc, int len)
|
||||
}
|
||||
|
||||
extern void codegen_init(void);
|
||||
extern void codegen_close(void);
|
||||
extern void codegen_reset(void);
|
||||
extern void codegen_block_init(uint32_t phys_addr);
|
||||
extern void codegen_block_remove(void);
|
||||
|
||||
@@ -229,33 +229,6 @@ codegen_init(void)
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
codegen_close(void)
|
||||
{
|
||||
#ifdef DEBUG_EXTRA
|
||||
pclog("Instruction counts :\n");
|
||||
while (1) {
|
||||
int c;
|
||||
uint32_t highest_num = 0, highest_idx = 0;
|
||||
|
||||
for (c = 0; c < 256 * 256; c++) {
|
||||
if (instr_counts[c] > highest_num) {
|
||||
highest_num = instr_counts[c];
|
||||
highest_idx = c;
|
||||
}
|
||||
}
|
||||
if (!highest_num)
|
||||
break;
|
||||
|
||||
instr_counts[highest_idx] = 0;
|
||||
if (highest_idx > 256)
|
||||
pclog(" %02x %02x = %u\n", highest_idx >> 8, highest_idx & 0xff, highest_num);
|
||||
else
|
||||
pclog(" %02x = %u\n", highest_idx & 0xff, highest_num);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
codegen_reset(void)
|
||||
{
|
||||
|
||||
@@ -92,9 +92,6 @@ static uint16_t mem_addr = 0;
|
||||
static int schedule_fetch = 1;
|
||||
static int pasv = 0;
|
||||
|
||||
static int pfq_idle = 1;
|
||||
static int pfq_delay = 0;
|
||||
|
||||
#define BUS_OUT 1
|
||||
#define BUS_HIGH 2
|
||||
#define BUS_WIDE 4
|
||||
@@ -1236,19 +1233,6 @@ nearcall(uint16_t new_ip)
|
||||
push(&ret_ip);
|
||||
}
|
||||
|
||||
static void
|
||||
farcall(uint16_t new_cs, uint16_t new_ip, int jump)
|
||||
{
|
||||
if (jump)
|
||||
wait(1, 0);
|
||||
pfq_do_suspend();
|
||||
wait(3, 0);
|
||||
push(&CS);
|
||||
load_cs(new_cs);
|
||||
wait(2, 0);
|
||||
nearcall(new_ip);
|
||||
}
|
||||
|
||||
static void
|
||||
farcall2(uint16_t new_cs, uint16_t new_ip)
|
||||
{
|
||||
@@ -1268,7 +1252,6 @@ intr_routine(uint16_t intr, int skip_first)
|
||||
uint16_t tempf = cpu_state.flags & (is_nec ? 0x8fd7 : 0x0fd7);
|
||||
uint16_t new_cs;
|
||||
uint16_t new_ip;
|
||||
uint16_t old_ip;
|
||||
|
||||
if (!skip_first)
|
||||
wait(1, 0);
|
||||
@@ -1324,20 +1307,6 @@ sw_int(uint16_t intr)
|
||||
push(&old_ip);
|
||||
}
|
||||
|
||||
static void
|
||||
int1(void)
|
||||
{
|
||||
wait(2, 0);
|
||||
intr_routine(1, 1);
|
||||
}
|
||||
|
||||
static void
|
||||
int2(void)
|
||||
{
|
||||
wait(2, 0);
|
||||
intr_routine(2, 1);
|
||||
}
|
||||
|
||||
static void
|
||||
int3(void)
|
||||
{
|
||||
@@ -1345,17 +1314,6 @@ int3(void)
|
||||
intr_routine(3, 0);
|
||||
}
|
||||
|
||||
static void
|
||||
int_o(void)
|
||||
{
|
||||
wait(4, 0);
|
||||
|
||||
if (cpu_state.flags & V_FLAG) {
|
||||
wait(2, 0);
|
||||
intr_routine(4, 0);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
interrupt_808x(uint16_t addr)
|
||||
{
|
||||
@@ -1368,7 +1326,6 @@ custom_nmi(void)
|
||||
uint16_t tempf = cpu_state.flags & (is_nec ? 0x8fd7 : 0x0fd7);
|
||||
uint16_t new_cs;
|
||||
uint16_t new_ip;
|
||||
uint16_t old_ip;
|
||||
|
||||
wait(1, 0);
|
||||
wait(2, 0);
|
||||
@@ -1965,18 +1922,17 @@ stos(int bits)
|
||||
static void
|
||||
ins(int bits)
|
||||
{
|
||||
cpu_state.eaaddr = SI;
|
||||
cpu_state.eaaddr = DX;
|
||||
cpu_io(bits, 0, cpu_state.eaaddr);
|
||||
SI = string_increment(bits);
|
||||
stos(bits);
|
||||
}
|
||||
|
||||
static void
|
||||
outs(int bits)
|
||||
{
|
||||
cpu_state.eaaddr = DI;
|
||||
cpu_data = (bits == 16) ? AX : AL;
|
||||
lods(bits);
|
||||
cpu_state.eaaddr = DX;
|
||||
cpu_io(bits, 1, cpu_state.eaaddr);
|
||||
DI = string_increment(bits);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -2104,19 +2060,6 @@ farret(int far)
|
||||
set_ip(new_ip);
|
||||
}
|
||||
|
||||
/* The IRET microcode routine. */
|
||||
static void
|
||||
iret_routine(void)
|
||||
{
|
||||
wait(1, 0);
|
||||
farret(1);
|
||||
if (is_nec)
|
||||
cpu_state.flags = pop() | 0x8002;
|
||||
else
|
||||
cpu_state.flags = pop() | 0x0002;
|
||||
wait(1, 0);
|
||||
}
|
||||
|
||||
/* Executes instructions up to the specified number of cycles. */
|
||||
void
|
||||
execx86(int cycs)
|
||||
@@ -2155,7 +2098,6 @@ execx86(int cycs)
|
||||
uint16_t old_flags;
|
||||
uint16_t tmpa;
|
||||
int bits;
|
||||
uint32_t dest_seg;
|
||||
uint32_t i;
|
||||
uint32_t carry;
|
||||
uint32_t nibble;
|
||||
@@ -2280,7 +2222,6 @@ execx86(int cycs)
|
||||
bits = 8 << (opcode & 1);
|
||||
if (rep_start()) {
|
||||
ins(bits);
|
||||
set_accum(bits, cpu_data);
|
||||
wait(3, 0);
|
||||
|
||||
if (in_rep != 0) {
|
||||
@@ -2310,7 +2251,6 @@ execx86(int cycs)
|
||||
handled = 1;
|
||||
bits = 8 << (opcode & 1);
|
||||
if (rep_start()) {
|
||||
cpu_data = AX;
|
||||
wait(1, 0);
|
||||
outs(bits);
|
||||
if (in_rep != 0) {
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
#
|
||||
# 86Box A hypervisor and IBM PC system emulator that specializes in
|
||||
# running old operating systems and software designed for IBM
|
||||
# PC systems and compatibles from 1981 through fairly recent
|
||||
# system designs based on the PCI bus.
|
||||
#
|
||||
# This file is part of the 86Box distribution.
|
||||
#
|
||||
# CMake build script.
|
||||
#
|
||||
# Authors: David Hrdlička, <hrdlickadavid@outlook.com>
|
||||
#
|
||||
# Copyright 2020-2021 David Hrdlička.
|
||||
#
|
||||
|
||||
add_library(808x OBJECT queue.c)
|
||||
@@ -1,192 +0,0 @@
|
||||
/*
|
||||
* 86Box A hypervisor and IBM PC system emulator that specializes in
|
||||
* running old operating systems and software designed for IBM
|
||||
* PC systems and compatibles from 1981 through fairly recent
|
||||
* system designs based on the PCI bus.
|
||||
*
|
||||
* This file is part of the 86Box distribution.
|
||||
*
|
||||
* 808x CPU emulation, mostly ported from reenigne's XTCE, which
|
||||
* is cycle-accurate.
|
||||
*
|
||||
* Authors: gloriouscow, <https://github.com/dbalsom>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
*
|
||||
* Copyright 2023 gloriouscow.
|
||||
* Copyright 2023 Miran Grca.
|
||||
*/
|
||||
#include <inttypes.h>
|
||||
#include <math.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <wchar.h>
|
||||
|
||||
#define HAVE_STDARG_H
|
||||
#include <86box/86box.h>
|
||||
#include "cpu.h"
|
||||
#include "x86.h"
|
||||
#include <86box/machine.h>
|
||||
#include <86box/io.h>
|
||||
#include <86box/mem.h>
|
||||
#include <86box/rom.h>
|
||||
#include <86box/nmi.h>
|
||||
#include <86box/pic.h>
|
||||
#include <86box/ppi.h>
|
||||
#include <86box/timer.h>
|
||||
#include <86box/gdbstub.h>
|
||||
// #include "808x.h"
|
||||
#include "queue.h"
|
||||
|
||||
/* TODO: Move to cpu.h so this can eventually be reused for 286+ as well. */
|
||||
#define QUEUE_MAX 6
|
||||
|
||||
/* NOTE: When porting from Rust to C, please use uintptr_t and not size_t,
|
||||
so it can be printed with PRIuPTR. */
|
||||
typedef struct queue_t {
|
||||
uintptr_t size;
|
||||
uintptr_t len;
|
||||
uintptr_t back;
|
||||
uintptr_t front;
|
||||
uint8_t q[QUEUE_MAX];
|
||||
uint16_t preload;
|
||||
queue_delay_t delay;
|
||||
} queue_t;
|
||||
|
||||
static queue_t queue;
|
||||
|
||||
#ifdef ENABLE_QUEUE_LOG
|
||||
int queue_do_log = ENABLE_QUEUE_LOG;
|
||||
|
||||
static void
|
||||
queue_log(const char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
|
||||
if (queue_do_log) {
|
||||
va_start(ap, fmt);
|
||||
pclog_ex(fmt, ap);
|
||||
va_end(ap);
|
||||
}
|
||||
}
|
||||
#else
|
||||
# define queue_log(fmt, ...)
|
||||
#endif
|
||||
|
||||
void
|
||||
queue_set_size(uintptr_t size)
|
||||
{
|
||||
if (size > QUEUE_MAX)
|
||||
fatal("Requested prefetch queue of %" PRIuPTR " bytes is too big\n", size);
|
||||
|
||||
queue.size = size;
|
||||
}
|
||||
|
||||
uintptr_t
|
||||
queue_get_len(void)
|
||||
{
|
||||
return queue.len;
|
||||
}
|
||||
|
||||
int
|
||||
queue_is_full(void)
|
||||
{
|
||||
return (queue.len != queue.size);
|
||||
}
|
||||
|
||||
uint16_t
|
||||
queue_get_preload(void)
|
||||
{
|
||||
uint16_t ret = queue.preload;
|
||||
queue.preload = 0x0000;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
queue_has_preload(void)
|
||||
{
|
||||
return (queue.preload & FLAG_PRELOADED) ? 1 : 0;
|
||||
}
|
||||
|
||||
void
|
||||
queue_set_preload(void)
|
||||
{
|
||||
uint8_t byte;
|
||||
|
||||
if (queue.len > 0) {
|
||||
byte = queue_pop();
|
||||
queue.preload = ((uint16_t) byte) | FLAG_PRELOADED;
|
||||
} else
|
||||
fatal("Tried to preload with empty queue\n");
|
||||
}
|
||||
|
||||
void
|
||||
queue_push8(uint8_t byte)
|
||||
{
|
||||
if (queue.len < queue.size) {
|
||||
queue.q[queue.front] = byte;
|
||||
queue.front = (queue.front + 1) % queue.size;
|
||||
queue.len++;
|
||||
|
||||
if (queue.len == 3)
|
||||
queue.delay = DELAY_WRITE;
|
||||
else
|
||||
queue.delay = DELAY_NONE;
|
||||
} else
|
||||
fatal("Queue overrun\n");
|
||||
}
|
||||
|
||||
void
|
||||
queue_push16(uint16_t word)
|
||||
{
|
||||
queue_push8((uint8_t) (word & 0xff));
|
||||
queue_push8((uint8_t) ((word >> 8) & 0xff));
|
||||
}
|
||||
|
||||
uint8_t
|
||||
queue_pop(void)
|
||||
{
|
||||
uint8_t byte = 0xff;
|
||||
|
||||
if (queue.len > 0) {
|
||||
byte = queue.q[queue.back];
|
||||
|
||||
queue.back = (queue.back + 1) % queue.size;
|
||||
queue.len--;
|
||||
|
||||
if (queue.len >= 3)
|
||||
queue.delay = DELAY_READ;
|
||||
else
|
||||
queue.delay = DELAY_NONE;
|
||||
} else
|
||||
fatal("Queue underrun\n");
|
||||
|
||||
return byte;
|
||||
}
|
||||
|
||||
queue_delay_t
|
||||
queue_get_delay(void)
|
||||
{
|
||||
return queue.delay;
|
||||
}
|
||||
|
||||
void
|
||||
queue_flush(void)
|
||||
{
|
||||
memset(&queue, 0x00, sizeof(queue_t));
|
||||
|
||||
queue.delay = DELAY_NONE;
|
||||
}
|
||||
|
||||
void
|
||||
queue_init(void)
|
||||
{
|
||||
queue_flush();
|
||||
|
||||
if (is8086)
|
||||
queue_set_size(6);
|
||||
else
|
||||
queue_set_size(4);
|
||||
}
|
||||
@@ -1,42 +0,0 @@
|
||||
/*
|
||||
* 86Box A hypervisor and IBM PC system emulator that specializes in
|
||||
* running old operating systems and software designed for IBM
|
||||
* PC systems and compatibles from 1981 through fairly recent
|
||||
* system designs based on the PCI bus.
|
||||
*
|
||||
* This file is part of the 86Box distribution.
|
||||
*
|
||||
* Prefetch queue implementation header.
|
||||
*
|
||||
* Authors: gloriouscow, <https://github.com/dbalsom>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
*
|
||||
* Copyright 2023 gloriouscow.
|
||||
* Copyright 2023 Miran Grca.
|
||||
*/
|
||||
#ifndef EMU_QUEUE_H
|
||||
#define EMU_QUEUE_H
|
||||
|
||||
typedef enum queue_delay_t {
|
||||
DELAY_READ,
|
||||
DELAY_WRITE,
|
||||
DELAY_NONE
|
||||
} queue_delay_t;
|
||||
|
||||
#define FLAG_PRELOADED 0x8000
|
||||
|
||||
extern void queue_set_size(uintptr_t size);
|
||||
extern uintptr_t queue_get_len(void);
|
||||
extern int queue_is_full(void);
|
||||
extern uint16_t queue_get_preload(void);
|
||||
extern int queue_has_preload(void);
|
||||
extern void queue_set_preload(void);
|
||||
extern void queue_push8(uint8_t byte);
|
||||
extern void queue_push16(uint16_t word);
|
||||
extern uint8_t queue_pop(void);
|
||||
extern queue_delay_t queue_get_delay(void);
|
||||
extern void queue_flush(void);
|
||||
|
||||
extern void queue_init(void);
|
||||
|
||||
#endif /*EMU_QUEUE_H*/
|
||||
@@ -36,6 +36,3 @@ endif()
|
||||
|
||||
add_subdirectory(softfloat)
|
||||
target_link_libraries(86Box softfloat)
|
||||
|
||||
add_subdirectory(808x)
|
||||
target_link_libraries(86Box 808x)
|
||||
|
||||
@@ -50,9 +50,6 @@
|
||||
#endif
|
||||
|
||||
extern void codegen_init(void);
|
||||
#ifdef USE_NEW_DYNAREC
|
||||
extern void codegen_close(void);
|
||||
#endif
|
||||
extern void codegen_flush(void);
|
||||
|
||||
/*Current physical page of block being recompiled. -1 if no recompilation taking place */
|
||||
|
||||
@@ -1926,7 +1926,10 @@ cpu_CPUID(void)
|
||||
EDX = 0x49656e69;
|
||||
ECX = 0x6c65746e;
|
||||
} else if (EAX == 1) {
|
||||
EAX = CPUID;
|
||||
if ((CPUID == 0x0436) && (cr0 & (1 << 29)))
|
||||
EAX = 0x0470;
|
||||
else
|
||||
EAX = CPUID;
|
||||
EBX = ECX = 0;
|
||||
EDX = CPUID_FPU | CPUID_VME;
|
||||
} else
|
||||
|
||||
@@ -439,13 +439,13 @@ const cpu_family_t cpu_families[] = {
|
||||
{"", 0}
|
||||
}
|
||||
}, {
|
||||
.package = CPU_PKG_SOCKET3_PC330,
|
||||
.package = CPU_PKG_SOCKET1 | CPU_PKG_SOCKET3_PC330,
|
||||
.manufacturer = "Intel",
|
||||
.name = "i486DX2",
|
||||
.name = "i486DX2 WB",
|
||||
.internal_name = "i486dx2_pc330",
|
||||
.cpus = (const CPU[]) {
|
||||
{"50", CPU_i486DX_SLENH, fpus_internal, 50000000, 2, 5000, 0x470, 0x470, 0, CPU_SUPPORTS_DYNAREC, 8, 8,6,6, 6},
|
||||
{"66", CPU_i486DX_SLENH, fpus_internal, 66666666, 2, 5000, 0x470, 0x470, 0, CPU_SUPPORTS_DYNAREC, 12,12,6,6, 8},
|
||||
{"50", CPU_i486DX_SLENH, fpus_internal, 50000000, 2, 5000, 0x436, 0x436, 0, CPU_SUPPORTS_DYNAREC, 8, 8,6,6, 6},
|
||||
{"66", CPU_i486DX_SLENH, fpus_internal, 66666666, 2, 5000, 0x436, 0x436, 0, CPU_SUPPORTS_DYNAREC, 12,12,6,6, 8},
|
||||
{"", 0}
|
||||
}
|
||||
}, {
|
||||
|
||||
@@ -183,7 +183,7 @@ isapnp_reset_ld_config(isapnp_device_t *ld)
|
||||
|
||||
/* Populate configuration registers. */
|
||||
ld->regs[0x30] = !!config->activate;
|
||||
uint8_t reg_base;
|
||||
uint8_t reg_base;
|
||||
uint32_t size;
|
||||
for (uint8_t i = 0; i < 4; i++) {
|
||||
reg_base = 0x40 + (8 * i);
|
||||
@@ -795,22 +795,28 @@ isapnp_update_card_rom(void *priv, uint8_t *rom, uint16_t rom_size)
|
||||
#ifdef ENABLE_ISAPNP_LOG
|
||||
uint16_t vendor = (card->rom[0] << 8) | card->rom[1];
|
||||
isapnp_log("ISAPnP: Parsing ROM resources for card %c%c%c%02X%02X (serial %08X)\n", '@' + ((vendor >> 10) & 0x1f), '@' + ((vendor >> 5) & 0x1f), '@' + (vendor & 0x1f), card->rom[2], card->rom[3], (card->rom[7] << 24) | (card->rom[6] << 16) | (card->rom[5] << 8) | card->rom[4]);
|
||||
const char *df_priority[] = { "good", "acceptable", "sub-optimal", "unknown priority" };
|
||||
const char *mem_control[] = { "8-bit", "16-bit", "8/16-bit", "32-bit" };
|
||||
const char *dma_transfer[] = { "8-bit", "8/16-bit", "16-bit", "unknown" };
|
||||
const char *dma_speed[] = { "compatibility", "Type A", "Type B", "Type F" };
|
||||
#endif
|
||||
uint16_t i = 9;
|
||||
uint8_t existing = 0;
|
||||
uint8_t ldn = 0;
|
||||
uint8_t ldn = 0;
|
||||
uint8_t res;
|
||||
uint8_t in_df = 0;
|
||||
uint8_t irq = 0;
|
||||
uint8_t io = 0;
|
||||
uint8_t mem_range = 0;
|
||||
uint8_t mem_range_32 = 0;
|
||||
uint8_t irq_df = 0;
|
||||
uint8_t io_df = 0;
|
||||
uint8_t mem_range_df = 0;
|
||||
uint8_t in_df = 0;
|
||||
uint8_t irq = 0;
|
||||
uint8_t dma = 0;
|
||||
uint8_t io = 0;
|
||||
uint8_t mem_range = 0;
|
||||
uint8_t mem_range_32 = 0;
|
||||
uint8_t irq_df = 0;
|
||||
uint8_t dma_df = 0;
|
||||
uint8_t io_df = 0;
|
||||
uint8_t mem_range_df = 0;
|
||||
uint8_t mem_range_32_df = 0;
|
||||
uint32_t len;
|
||||
isapnp_device_t *ld = NULL;
|
||||
isapnp_device_t *ld = NULL;
|
||||
isapnp_device_t *prev_ld = NULL;
|
||||
|
||||
/* Check if this is an existing card which already has logical devices.
|
||||
@@ -838,7 +844,10 @@ isapnp_update_card_rom(void *priv, uint8_t *rom, uint16_t rom_size)
|
||||
break;
|
||||
}
|
||||
|
||||
isapnp_log("ISAPnP: >>%s Memory range %d uses upper limit = ", in_df ? ">" : "", mem_range);
|
||||
isapnp_log("ISAPnP: >>%s Memory range %d with %d bytes at %06X-%06X, align %d",
|
||||
in_df ? ">" : "", mem_range,
|
||||
*((uint16_t *) &card->rom[i + 10]) << 8, *((uint16_t *) &card->rom[i + 4]) << 8, ((card->rom[i + 3] & 0x4) ? 0 : (*((uint16_t *) &card->rom[i + 4]) << 8)) + (*((uint16_t *) &card->rom[i + 6]) << 8),
|
||||
(*((uint16_t *) &card->rom[i + 8]) + 1) << 16);
|
||||
res = 1 << mem_range;
|
||||
mem_range++;
|
||||
} else {
|
||||
@@ -852,18 +861,27 @@ isapnp_update_card_rom(void *priv, uint8_t *rom, uint16_t rom_size)
|
||||
break;
|
||||
}
|
||||
|
||||
isapnp_log("ISAPnP: >>%s 32-bit memory range %d uses upper limit = ", in_df ? ">" : "", mem_range_32);
|
||||
isapnp_log("ISAPnP: >>%s 32-bit memory range %d with %d bytes at %08X-%08X, align %d", in_df ? ">" : "", mem_range_32,
|
||||
*((uint32_t *) &card->rom[i + 16]) << 8, *((uint32_t *) &card->rom[i + 4]) << 8, ((card->rom[i + 3] & 0x4) ? 0 : (*((uint32_t *) &card->rom[i + 4]) << 8)) + (*((uint32_t *) &card->rom[i + 8]) << 8),
|
||||
*((uint32_t *) &card->rom[i + 12]));
|
||||
res = 1 << (4 + mem_range_32);
|
||||
mem_range_32++;
|
||||
}
|
||||
|
||||
if (card->rom[i + 3] & 0x4) {
|
||||
isapnp_log("yes\n");
|
||||
#ifdef ENABLE_ISAPNP_LOG
|
||||
isapnp_log(" bytes, %swritable, %sread cacheable, %s, %sshadowable, %sexpansion ROM\n",
|
||||
(card->rom[i + 3] & 0x01) ? "not " : "",
|
||||
(card->rom[i + 3] & 0x02) ? "not " : "",
|
||||
(card->rom[i + 3] & 0x04) ? "upper limit" : "range length",
|
||||
mem_control[(card->rom[i + 3] >> 3) & 0x03],
|
||||
(card->rom[i + 3] & 0x20) ? "not " : "",
|
||||
(card->rom[i + 3] & 0x40) ? "not " : "");
|
||||
#endif
|
||||
|
||||
if (card->rom[i + 3] & 0x4)
|
||||
ld->mem_upperlimit |= res;
|
||||
} else {
|
||||
isapnp_log("no\n");
|
||||
else
|
||||
ld->mem_upperlimit &= ~res;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
@@ -874,14 +892,11 @@ isapnp_update_card_rom(void *priv, uint8_t *rom, uint16_t rom_size)
|
||||
isapnp_log("ISAPnP: >%s ANSI identifier: \"%s\"\n", ldn ? ">" : "", &card->rom[i + 3]);
|
||||
card->rom[i + 3 + len] = res;
|
||||
break;
|
||||
#endif
|
||||
|
||||
default:
|
||||
isapnp_log("ISAPnP: >%s%s Large resource %02X (length %d)\n", ldn ? ">" : "", in_df ? ">" : "", res, (card->rom[i + 2] << 8) | card->rom[i + 1]);
|
||||
break;
|
||||
#else
|
||||
default:
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
|
||||
i += 3; /* header */
|
||||
@@ -890,7 +905,13 @@ isapnp_update_card_rom(void *priv, uint8_t *rom, uint16_t rom_size)
|
||||
len = card->rom[i] & 0x07;
|
||||
|
||||
switch (res) {
|
||||
case 0x02:
|
||||
#ifdef ENABLE_ISAPNP_LOG
|
||||
case 0x01: /* PnP version */
|
||||
isapnp_log("ISAPnP: > PnP version %d.%d, vendor-specific version %02X\n", card->rom[i + 1] >> 4, card->rom[i + 1] & 0x0f, card->rom[i + 2]);
|
||||
break;
|
||||
#endif
|
||||
|
||||
case 0x02: /* logical device */
|
||||
#ifdef ENABLE_ISAPNP_LOG
|
||||
vendor = (card->rom[i + 1] << 8) | card->rom[i + 2];
|
||||
isapnp_log("ISAPnP: > Logical device %02X: %c%c%c%02X%02X\n", ldn, '@' + ((vendor >> 10) & 0x1f), '@' + ((vendor >> 5) & 0x1f), '@' + (vendor & 0x1f), card->rom[i + 3], card->rom[i + 4]);
|
||||
@@ -931,7 +952,7 @@ isapnp_update_card_rom(void *priv, uint8_t *rom, uint16_t rom_size)
|
||||
ld->number = ldn++;
|
||||
|
||||
/* Start the position counts over. */
|
||||
irq = io = mem_range = mem_range_32 = irq_df = io_df = mem_range_df = mem_range_32_df = 0;
|
||||
irq = dma = io = mem_range = mem_range_32 = irq_df = dma_df = io_df = mem_range_df = mem_range_32_df = 0;
|
||||
|
||||
break;
|
||||
|
||||
@@ -963,7 +984,7 @@ isapnp_update_card_rom(void *priv, uint8_t *rom, uint16_t rom_size)
|
||||
else /* specific */
|
||||
res = card->rom[i + 3] & 0x0f;
|
||||
|
||||
isapnp_log("ISAPnP: >>%s IRQ index %d interrupt types = %01X\n", in_df ? ">" : "", irq, res);
|
||||
isapnp_log("ISAPnP: >>%s IRQ index %d with mask %04X, types %01X\n", in_df ? ">" : "", irq, *((uint16_t *) &card->rom[i + 1]), res);
|
||||
|
||||
ld->irq_types &= ~(0x0f << (4 * irq));
|
||||
ld->irq_types |= res << (4 * irq);
|
||||
@@ -972,24 +993,39 @@ isapnp_update_card_rom(void *priv, uint8_t *rom, uint16_t rom_size)
|
||||
|
||||
break;
|
||||
|
||||
#ifdef ENABLE_ISAPNP_LOG
|
||||
case 0x05: /* DMA */
|
||||
isapnp_log("ISAPnP: >>%s DMA index %d with mask %02X, %s, %sbus master, %scount by byte, %scount by word, %s speed\n", in_df ? ">" : "", dma++, card->rom[i + 1],
|
||||
dma_transfer[card->rom[i + 2] & 3],
|
||||
(card->rom[i + 2] & 0x04) ? "not " : "",
|
||||
(card->rom[i + 2] & 0x08) ? "not " : "",
|
||||
(card->rom[i + 2] & 0x10) ? "not " : "",
|
||||
dma_speed[(card->rom[i + 2] >> 5) & 3]);
|
||||
break;
|
||||
#endif
|
||||
|
||||
case 0x06: /* start dependent function */
|
||||
if (!ld) {
|
||||
isapnp_log("ISAPnP: >> Start dependent function with no logical device\n");
|
||||
break;
|
||||
}
|
||||
|
||||
isapnp_log("ISAPnP: >> Start dependent function: %s\n", (((len == 0) || (card->rom[i + 1] == 1)) ? "acceptable" : ((card->rom[i + 1] == 0) ? "good" : ((card->rom[i + 1] == 2) ? "sub-optimal" : "unknown priority"))));
|
||||
#ifdef ENABLE_ISAPNP_LOG
|
||||
isapnp_log("ISAPnP: >> Start dependent function: %s\n", df_priority[(len < 1) ? 1 : (card->rom[i + 1] & 3)]);
|
||||
#endif
|
||||
|
||||
if (in_df) {
|
||||
/* We're in a dependent function and this is the next one starting.
|
||||
Walk positions back to the saved values. */
|
||||
irq = irq_df;
|
||||
dma = dma_df;
|
||||
io = io_df;
|
||||
mem_range = mem_range_df;
|
||||
mem_range_32 = mem_range_32_df;
|
||||
} else {
|
||||
/* Save current positions to restore at the next DF. */
|
||||
irq_df = irq;
|
||||
dma_df = dma;
|
||||
io_df = io;
|
||||
mem_range_df = mem_range;
|
||||
mem_range_32_df = mem_range_32;
|
||||
@@ -1014,7 +1050,7 @@ isapnp_update_card_rom(void *priv, uint8_t *rom, uint16_t rom_size)
|
||||
break;
|
||||
}
|
||||
|
||||
isapnp_log("ISAPnP: >>%s I/O range %d %d-bit decode, %d ports\n", in_df ? ">" : "", io, (card->rom[i + 1] & 0x01) ? 16 : 10, card->rom[i + 7]);
|
||||
isapnp_log("ISAPnP: >>%s I/O range %d with %d ports at %04X-%04X, align %d, %d-bit decode\n", in_df ? ">" : "", io, card->rom[i + 7], *((uint16_t *) &card->rom[i + 2]), *((uint16_t *) &card->rom[i + 4]), card->rom[i + 6], (card->rom[i + 1] & 0x01) ? 16 : 10);
|
||||
|
||||
if (card->rom[i + 1] & 0x01)
|
||||
ld->io_16bit |= 1 << io;
|
||||
@@ -1042,9 +1078,7 @@ isapnp_update_card_rom(void *priv, uint8_t *rom, uint16_t rom_size)
|
||||
break;
|
||||
|
||||
default:
|
||||
#ifdef ENABLE_ISAPNP_LOG
|
||||
isapnp_log("ISAPnP: >%s%s Small resource %02X (length %d)\n", ldn ? ">" : "", in_df ? ">" : "", res, card->rom[i] & 0x07);
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -29,6 +29,25 @@
|
||||
#include "cpu.h"
|
||||
|
||||
int keyboard_scan;
|
||||
|
||||
#ifdef _WIN32
|
||||
/* Windows: F8+F12 */
|
||||
uint16_t key_prefix_1_1 = 0x042; /* F8 */
|
||||
uint16_t key_prefix_1_2 = 0x000; /* Invalid */
|
||||
uint16_t key_prefix_2_1 = 0x000; /* Invalid */
|
||||
uint16_t key_prefix_2_2 = 0x000; /* Invalid */
|
||||
uint16_t key_uncapture_1 = 0x058; /* F12 */
|
||||
uint16_t key_uncapture_2 = 0x000; /* Invalid */
|
||||
#else
|
||||
/* WxWidgets cannot do two regular keys.. CTRL+END */
|
||||
uint16_t key_prefix_1_1 = 0x01d; /* Left Ctrl */
|
||||
uint16_t key_prefix_1_2 = 0x11d; /* Right Ctrl */
|
||||
uint16_t key_prefix_2_1 = 0x000; /* Invalid */
|
||||
uint16_t key_prefix_2_2 = 0x000; /* Invalid */
|
||||
uint16_t key_uncapture_1 = 0x04f; /* Numpad End */
|
||||
uint16_t key_uncapture_2 = 0x14f; /* End */
|
||||
#endif
|
||||
|
||||
void (*keyboard_send)(uint16_t val);
|
||||
|
||||
static int recv_key[512]; /* keyboard input buffer */
|
||||
@@ -350,15 +369,15 @@ keyboard_isfsexit_up(void)
|
||||
return (!recv_key[0x01d] && !recv_key[0x11d] && !recv_key[0x038] && !recv_key[0x138] && !recv_key[0x051] && !recv_key[0x151]);
|
||||
}
|
||||
|
||||
/* Do we have F8-F12 in the keyboard buffer? */
|
||||
/* Do we have the mouse uncapture combination in the keyboard buffer? */
|
||||
int
|
||||
keyboard_ismsexit(void)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
/* Windows: F8+F12 */
|
||||
return (recv_key[0x042] && recv_key[0x058]);
|
||||
#else
|
||||
/* WxWidgets cannot do two regular keys.. CTRL+END */
|
||||
return ((recv_key[0x01D] || recv_key[0x11D]) && (recv_key[0x04F] || recv_key[0x14F]));
|
||||
#endif
|
||||
if ((key_prefix_2_1 != 0x000) || (key_prefix_2_2 != 0x000))
|
||||
return ((recv_key[key_prefix_1_1] || recv_key[key_prefix_1_2]) &&
|
||||
(recv_key[key_prefix_2_1] || recv_key[key_prefix_2_2]) &&
|
||||
(recv_key[key_uncapture_1] || recv_key[key_uncapture_2]));
|
||||
else
|
||||
return ((recv_key[key_prefix_1_1] || recv_key[key_prefix_1_2]) &&
|
||||
(recv_key[key_uncapture_1] || recv_key[key_uncapture_2]));
|
||||
}
|
||||
|
||||
@@ -78,7 +78,6 @@ extern "C" {
|
||||
extern uint32_t lang_sys; /* (-) system language code */
|
||||
|
||||
extern int dump_on_exit; /* (O) dump regs on exit*/
|
||||
extern int do_dump_config; /* (O) dump cfg after load */
|
||||
extern int start_in_fullscreen; /* (O) start in fullscreen */
|
||||
#ifdef _WIN32
|
||||
extern int force_debug; /* (O) force debug output */
|
||||
@@ -147,13 +146,21 @@ extern int enable_discord; /* (C) enable Discord integration */
|
||||
|
||||
extern int fixed_size_x;
|
||||
extern int fixed_size_y;
|
||||
extern double mouse_sensitivity; /* (C) Mouse sensitivity scale */
|
||||
extern double mouse_sensitivity; /* (C) Mouse sensitivity scale */
|
||||
#ifdef _Atomic
|
||||
extern _Atomic double mouse_x_error; /* Mouse error accumulator - Y */
|
||||
extern _Atomic double mouse_y_error; /* Mouse error accumulator - Y */
|
||||
extern _Atomic double mouse_x_error; /* Mouse error accumulator - Y */
|
||||
extern _Atomic double mouse_y_error; /* Mouse error accumulator - Y */
|
||||
#endif
|
||||
extern int pit_mode; /* (C) force setting PIT mode */
|
||||
extern int fm_driver; /* (C) select FM sound driver */
|
||||
extern int pit_mode; /* (C) force setting PIT mode */
|
||||
extern int fm_driver; /* (C) select FM sound driver */
|
||||
|
||||
/* Keyboard variables for future key combination redefinition. */
|
||||
extern uint16_t key_prefix_1_1;
|
||||
extern uint16_t key_prefix_1_2;
|
||||
extern uint16_t key_prefix_2_1;
|
||||
extern uint16_t key_prefix_2_2;
|
||||
extern uint16_t key_uncapture_1;
|
||||
extern uint16_t key_uncapture_2;
|
||||
|
||||
extern char exe_path[2048]; /* path (dir) of executable */
|
||||
extern char usr_path[1024]; /* path (dir) of user data */
|
||||
|
||||
@@ -340,6 +340,7 @@ extern const machine_filter_t machine_chipsets[];
|
||||
extern const machine_t machines[];
|
||||
extern int bios_only;
|
||||
extern int machine;
|
||||
extern void * machine_snd;
|
||||
|
||||
/* Core functions. */
|
||||
extern int machine_count(void);
|
||||
@@ -371,16 +372,25 @@ extern void machine_close(void);
|
||||
extern int machine_has_mouse(void);
|
||||
extern int machine_is_sony(void);
|
||||
|
||||
extern uint8_t machine_get_p1_default(void);
|
||||
extern uint8_t machine_get_p1(void);
|
||||
extern void machine_set_p1_default(uint8_t val);
|
||||
extern void machine_set_p1(uint8_t val);
|
||||
extern void machine_and_p1(uint8_t val);
|
||||
extern void machine_init_p1(void);
|
||||
extern uint8_t machine_handle_p1(uint8_t write, uint8_t val);
|
||||
extern uint32_t machine_get_gpio_default(void);
|
||||
extern uint32_t machine_get_gpio(void);
|
||||
extern void machine_set_gpio_default(uint32_t val);
|
||||
extern void machine_set_gpio(uint32_t val);
|
||||
extern void machine_and_gpio(uint32_t val);
|
||||
extern void machine_init_gpio(void);
|
||||
extern uint32_t machine_handle_gpio(uint8_t write, uint32_t val);
|
||||
extern uint32_t machine_get_gpio_acpi_default(void);
|
||||
extern uint32_t machine_get_gpio_acpi(void);
|
||||
extern void machine_set_gpio_acpi(uint32_t gpio_val);
|
||||
extern void machine_set_gpio_acpi_default(uint32_t val);
|
||||
extern void machine_set_gpio_acpi(uint32_t val);
|
||||
extern void machine_and_gpio_acpi(uint32_t val);
|
||||
extern void machine_init_gpio_acpi(void);
|
||||
extern uint32_t machine_handle_gpio_acpi(uint8_t write, uint32_t val);
|
||||
|
||||
@@ -612,6 +622,7 @@ extern int machine_at_exp8551_init(const machine_t *);
|
||||
extern int machine_at_gw2katx_init(const machine_t *);
|
||||
extern int machine_at_thor_init(const machine_t *);
|
||||
extern int machine_at_mrthor_init(const machine_t *);
|
||||
extern uint32_t machine_at_endeavor_gpio_handler(uint8_t write, uint32_t val);
|
||||
extern int machine_at_endeavor_init(const machine_t *);
|
||||
extern int machine_at_ms5119_init(const machine_t *);
|
||||
extern int machine_at_pb640_init(const machine_t *);
|
||||
@@ -636,6 +647,7 @@ extern int machine_at_p55t2p4_init(const machine_t *);
|
||||
extern int machine_at_m7shi_init(const machine_t *);
|
||||
extern int machine_at_tc430hx_init(const machine_t *);
|
||||
extern int machine_at_infinia7200_init(const machine_t *);
|
||||
extern int machine_at_cu430hx_init(const machine_t *);
|
||||
extern int machine_at_equium5200_init(const machine_t *);
|
||||
extern int machine_at_pcv90_init(const machine_t *);
|
||||
extern int machine_at_p65up5_cp55t2d_init(const machine_t *);
|
||||
|
||||
@@ -71,7 +71,6 @@ typedef struct sb_ct1345_mixer_t {
|
||||
|
||||
uint8_t index;
|
||||
uint8_t regs[256];
|
||||
|
||||
} sb_ct1345_mixer_t;
|
||||
|
||||
/* SB16 and AWE32 */
|
||||
@@ -147,6 +146,7 @@ typedef struct sb_t {
|
||||
uint8_t pnp_rom[512];
|
||||
|
||||
uint16_t opl_pnp_addr;
|
||||
uint16_t gameport_addr;
|
||||
|
||||
void *opl_mixer;
|
||||
void (*opl_mix)(void*, double*, double*);
|
||||
|
||||
@@ -81,6 +81,9 @@ extern void inital(void);
|
||||
extern void givealbuffer(void *buf);
|
||||
extern void givealbuffer_cd(void *buf);
|
||||
|
||||
#define sb_vibra16c_onboard_relocate_base sb_vibra16s_onboard_relocate_base
|
||||
extern void sb_vibra16s_onboard_relocate_base(uint16_t new_addr, void *priv);
|
||||
|
||||
#ifdef EMU_DEVICE_H
|
||||
/* AdLib and AdLib Gold */
|
||||
extern const device_t adlib_device;
|
||||
@@ -128,6 +131,11 @@ extern const device_t sb_pro_v2_device;
|
||||
extern const device_t sb_pro_mcv_device;
|
||||
extern const device_t sb_pro_compat_device;
|
||||
extern const device_t sb_16_device;
|
||||
extern const device_t sb_vibra16s_onboard_device;
|
||||
extern const device_t sb_vibra16s_device;
|
||||
extern const device_t sb_vibra16xv_device;
|
||||
extern const device_t sb_vibra16c_onboard_device;
|
||||
extern const device_t sb_vibra16c_device;
|
||||
extern const device_t sb_16_pnp_device;
|
||||
extern const device_t sb_16_compat_device;
|
||||
extern const device_t sb_16_compat_nompu_device;
|
||||
|
||||
@@ -1,3 +1,24 @@
|
||||
/*
|
||||
* 86Box A hypervisor and IBM PC system emulator that specializes in
|
||||
* running old operating systems and software designed for IBM
|
||||
* PC systems and compatibles from 1981 through fairly recent
|
||||
* system designs based on the PCI bus.
|
||||
*
|
||||
* This file is part of the 86Box distribution.
|
||||
*
|
||||
* Thread API header.
|
||||
*
|
||||
*
|
||||
*
|
||||
* Authors: Sarah Walker, <https://pcem-emulator.co.uk/>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
*
|
||||
* Copyright 2008-2023 Sarah Walker.
|
||||
* Copyright 2016-2023 Miran Grca.
|
||||
*/
|
||||
#ifndef THREAD_H
|
||||
# define THREAD_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
@@ -44,3 +65,5 @@ extern int thread_release_mutex(mutex_t *mutex);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /*THREAD_H*/
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
*
|
||||
* Copyright 2022 TheCollector1995.
|
||||
*/
|
||||
|
||||
#ifndef VIDEO_8514A_H
|
||||
#define VIDEO_8514A_H
|
||||
|
||||
@@ -203,4 +202,5 @@ typedef struct ibm8514_t {
|
||||
int ext_pitch;
|
||||
int ext_crt_pitch;
|
||||
} ibm8514_t;
|
||||
|
||||
#endif /*VIDEO_8514A_H*/
|
||||
|
||||
@@ -16,11 +16,6 @@
|
||||
* Copyright 2008-2020 Sarah Walker.
|
||||
* Copyright 2016-2020 Miran Grca.
|
||||
*/
|
||||
|
||||
#include <86box/thread.h>
|
||||
#include <86box/vid_8514a.h>
|
||||
#include <86box/vid_xga.h>
|
||||
|
||||
#ifndef VIDEO_SVGA_H
|
||||
# define VIDEO_SVGA_H
|
||||
|
||||
@@ -58,8 +53,6 @@ typedef union {
|
||||
} latch_t;
|
||||
|
||||
typedef struct svga_t {
|
||||
ibm8514_t dev8514;
|
||||
xga_t xga;
|
||||
mem_mapping_t mapping;
|
||||
|
||||
uint8_t fast;
|
||||
@@ -269,11 +262,14 @@ typedef struct svga_t {
|
||||
|
||||
/* Pointer to monitor */
|
||||
monitor_t *monitor;
|
||||
|
||||
void * dev8514;
|
||||
void * xga;
|
||||
} svga_t;
|
||||
|
||||
extern int vga_on;
|
||||
|
||||
extern void ibm8514_poll(ibm8514_t *dev, svga_t *svga);
|
||||
extern void ibm8514_poll(void *priv, svga_t *svga);
|
||||
extern void ibm8514_recalctimings(svga_t *svga);
|
||||
extern uint8_t ibm8514_ramdac_in(uint16_t port, void *priv);
|
||||
extern void ibm8514_ramdac_out(uint16_t port, uint8_t val, void *priv);
|
||||
@@ -283,7 +279,7 @@ extern void ibm8514_accel_out_pixtrans(svga_t *svga, uint16_t port, uint16_t
|
||||
extern void ibm8514_short_stroke_start(int count, int cpu_input, uint32_t mix_dat, uint32_t cpu_dat, svga_t *svga, uint8_t ssv, int len);
|
||||
extern void ibm8514_accel_start(int count, int cpu_input, uint32_t mix_dat, uint32_t cpu_dat, svga_t *svga, int len);
|
||||
|
||||
extern void xga_poll(xga_t *xga, svga_t *svga);
|
||||
extern void xga_poll(void *priv, svga_t *svga);
|
||||
extern void xga_recalctimings(svga_t *svga);
|
||||
|
||||
extern int svga_init(const device_t *info, svga_t *svga, void *priv, int memsize,
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
*
|
||||
* Copyright 2022 TheCollector1995.
|
||||
*/
|
||||
|
||||
#ifndef VIDEO_XGA_H
|
||||
#define VIDEO_XGA_H
|
||||
|
||||
@@ -232,4 +231,5 @@ typedef struct xga_t {
|
||||
|
||||
int big_endian_linear;
|
||||
} xga_t;
|
||||
|
||||
#endif /*VIDEO_XGA_H*/
|
||||
|
||||
@@ -22,12 +22,12 @@
|
||||
#define EMU_NAME "86Box"
|
||||
#define EMU_NAME_W LSTR(EMU_NAME)
|
||||
|
||||
#define EMU_VERSION "4.0"
|
||||
#define EMU_VERSION "4.0.1"
|
||||
#define EMU_VERSION_W LSTR(EMU_VERSION)
|
||||
#define EMU_VERSION_EX "3.50" /* frozen due to IDE re-detection behavior on Windows */
|
||||
#define EMU_VERSION_MAJ 4
|
||||
#define EMU_VERSION_MIN 0
|
||||
#define EMU_VERSION_PATCH 0
|
||||
#define EMU_VERSION_PATCH 1
|
||||
|
||||
#define EMU_BUILD_NUM 0
|
||||
|
||||
|
||||
@@ -158,6 +158,39 @@ machine_at_apollo_init(const machine_t *model)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void
|
||||
machine_at_zappa_gpio_init(void)
|
||||
{
|
||||
uint32_t gpio = 0xffffe6ff;
|
||||
|
||||
/* Register 0x0079: */
|
||||
/* Bit 7: 0 = Clear password, 1 = Keep password. */
|
||||
/* Bit 6: 0 = NVRAM cleared by jumper, 1 = NVRAM normal. */
|
||||
/* Bit 5: 0 = CMOS Setup disabled, 1 = CMOS Setup enabled. */
|
||||
/* Bit 4: External CPU clock (Switch 8). */
|
||||
/* Bit 3: External CPU clock (Switch 7). */
|
||||
/* 50 MHz: Switch 7 = Off, Switch 8 = Off. */
|
||||
/* 60 MHz: Switch 7 = On, Switch 8 = Off. */
|
||||
/* 66 MHz: Switch 7 = Off, Switch 8 = On. */
|
||||
/* Bit 2: No Connect. */
|
||||
/* Bit 1: No Connect. */
|
||||
/* Bit 0: 2x multiplier, 1 = 1.5x multiplier (Switch 6). */
|
||||
/* NOTE: A bit is read as 1 if switch is off, and as 0 if switch is on. */
|
||||
if (cpu_busspeed <= 50000000)
|
||||
gpio |= 0xffff00ff;
|
||||
else if ((cpu_busspeed > 50000000) && (cpu_busspeed <= 60000000))
|
||||
gpio |= 0xffff08ff;
|
||||
else if (cpu_busspeed > 60000000)
|
||||
gpio |= 0xffff10ff;
|
||||
|
||||
if (cpu_dmulti <= 1.5)
|
||||
gpio |= 0xffff01ff;
|
||||
else
|
||||
gpio |= 0xffff00ff;
|
||||
|
||||
machine_set_gpio_default(gpio);
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_zappa_init(const machine_t *model)
|
||||
{
|
||||
@@ -171,6 +204,7 @@ machine_at_zappa_init(const machine_t *model)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init_ex(model, 2);
|
||||
machine_at_zappa_gpio_init();
|
||||
|
||||
pci_init(PCI_CONFIG_TYPE_1);
|
||||
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
|
||||
|
||||
@@ -171,6 +171,42 @@ machine_at_m7shi_init(const machine_t *model)
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* The Sony VAIO is an AG430HX, I'm assuming it has the same configuration bits
|
||||
as the TC430HX, hence the #define. */
|
||||
#define machine_at_ag430hx_gpio_init machine_at_tc430hx_gpio_init
|
||||
|
||||
/* The PB680 is a NV430VX, I'm assuming it has the same configuration bits as
|
||||
the TC430HX, hence the #define. */
|
||||
#define machine_at_nv430vx_gpio_init machine_at_tc430hx_gpio_init
|
||||
|
||||
static void
|
||||
machine_at_tc430hx_gpio_init(void)
|
||||
{
|
||||
uint32_t gpio = 0xffffe1ff;
|
||||
|
||||
/* Register 0x0079: */
|
||||
/* Bit 7: 0 = Clear password, 1 = Keep password. */
|
||||
/* Bit 6: 0 = NVRAM cleared by jumper, 1 = NVRAM normal. */
|
||||
/* Bit 5: 0 = CMOS Setup disabled, 1 = CMOS Setup enabled. */
|
||||
/* Bit 4: External CPU clock (Switch 8). */
|
||||
/* Bit 3: External CPU clock (Switch 7). */
|
||||
/* 50 MHz: Switch 7 = Off, Switch 8 = Off. */
|
||||
/* 60 MHz: Switch 7 = On, Switch 8 = Off. */
|
||||
/* 66 MHz: Switch 7 = Off, Switch 8 = On. */
|
||||
/* Bit 2: 0 = On-board audio absent, 1 = On-board audio present. */
|
||||
/* Bit 1: 0 = Soft-off capable power supply present, 1 = Soft-off capable power supply absent. */
|
||||
/* Bit 0: 0 = Reserved. */
|
||||
/* NOTE: A bit is read as 1 if switch is off, and as 0 if switch is on. */
|
||||
if (cpu_busspeed <= 50000000)
|
||||
gpio |= 0xffff10ff;
|
||||
else if ((cpu_busspeed > 50000000) && (cpu_busspeed <= 60000000))
|
||||
gpio |= 0xffff18ff;
|
||||
else if (cpu_busspeed > 60000000)
|
||||
gpio |= 0xffff00ff;
|
||||
|
||||
machine_set_gpio_default(gpio);
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_tc430hx_init(const machine_t *model)
|
||||
{
|
||||
@@ -187,6 +223,7 @@ machine_at_tc430hx_init(const machine_t *model)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init_ex(model, 2);
|
||||
machine_at_tc430hx_gpio_init();
|
||||
|
||||
pci_init(PCI_CONFIG_TYPE_1);
|
||||
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
|
||||
@@ -196,7 +233,10 @@ machine_at_tc430hx_init(const machine_t *model)
|
||||
pci_register_slot(0x0F, PCI_CARD_NORMAL, 3, 4, 1, 2);
|
||||
pci_register_slot(0x10, PCI_CARD_NORMAL, 4, 1, 2, 3);
|
||||
pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0);
|
||||
device_add(&s3_virge_375_pci_device);
|
||||
|
||||
if (gfxcard[0] == VID_INTERNAL)
|
||||
device_add(machine_get_vid_device(machine));
|
||||
|
||||
device_add(&i430hx_device);
|
||||
device_add(&piix3_device);
|
||||
device_add(&keyboard_ps2_ami_pci_device);
|
||||
@@ -222,6 +262,7 @@ machine_at_infinia7200_init(const machine_t *model)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init_ex(model, 2);
|
||||
machine_at_tc430hx_gpio_init();
|
||||
|
||||
pci_init(PCI_CONFIG_TYPE_1);
|
||||
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
|
||||
@@ -231,7 +272,10 @@ machine_at_infinia7200_init(const machine_t *model)
|
||||
pci_register_slot(0x0F, PCI_CARD_NORMAL, 3, 4, 1, 2);
|
||||
pci_register_slot(0x10, PCI_CARD_NORMAL, 4, 1, 2, 3);
|
||||
pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0);
|
||||
device_add(&s3_virge_375_pci_device);
|
||||
|
||||
if (gfxcard[0] == VID_INTERNAL)
|
||||
device_add(machine_get_vid_device(machine));
|
||||
|
||||
device_add(&i430hx_device);
|
||||
device_add(&piix3_device);
|
||||
device_add(&keyboard_ps2_ami_pci_device);
|
||||
@@ -241,7 +285,83 @@ machine_at_infinia7200_init(const machine_t *model)
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Information about that machine on machine.h */
|
||||
static void
|
||||
machine_at_cu430hx_gpio_init(void)
|
||||
{
|
||||
uint32_t gpio = 0xffffe1ff;
|
||||
|
||||
/* Register 0x0079: */
|
||||
/* Bit 7: 0 = Clear password, 1 = Keep password. */
|
||||
/* Bit 6: 0 = NVRAM cleared by jumper, 1 = NVRAM normal. */
|
||||
/* Bit 5: 0 = CMOS Setup disabled, 1 = CMOS Setup enabled. */
|
||||
/* Bit 4: External CPU clock (Switch 8). */
|
||||
/* Bit 3: External CPU clock (Switch 7). */
|
||||
/* 50 MHz: Switch 7 = Off, Switch 8 = Off. */
|
||||
/* 60 MHz: Switch 7 = On, Switch 8 = Off. */
|
||||
/* 66 MHz: Switch 7 = Off, Switch 8 = On. */
|
||||
/* Bit 2: 0 = On-board audio absent, 1 = On-board audio present. */
|
||||
/* Bit 1: 0 = Soft-off capable power supply present, 1 = Soft-off capable power supply absent. */
|
||||
/* Bit 0: 0 = Reserved. */
|
||||
/* NOTE: A bit is read as 1 if switch is off, and as 0 if switch is on. */
|
||||
if (cpu_busspeed <= 50000000)
|
||||
gpio |= 0xffff10ff;
|
||||
else if ((cpu_busspeed > 50000000) && (cpu_busspeed <= 60000000))
|
||||
gpio |= 0xffff18ff;
|
||||
else if (cpu_busspeed > 60000000)
|
||||
gpio |= 0xffff00ff;
|
||||
|
||||
if ((sound_card_current[0] == SOUND_INTERNAL) && machine_get_snd_device(machine)->available())
|
||||
gpio |= 0xffff04ff;
|
||||
|
||||
machine_set_gpio_default(gpio);
|
||||
}
|
||||
|
||||
static void
|
||||
machine_at_cu430hx_common_init(const machine_t *model)
|
||||
{
|
||||
machine_at_common_init_ex(model, 2);
|
||||
machine_at_cu430hx_gpio_init();
|
||||
|
||||
pci_init(PCI_CONFIG_TYPE_1);
|
||||
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x08, PCI_CARD_VIDEO, 4, 0, 0, 0); // ATI VGA Graphics
|
||||
pci_register_slot(0x0C, PCI_CARD_NETWORK, 4, 0, 0, 0); // Intel 82557 Ethernet Network
|
||||
pci_register_slot(0x11, PCI_CARD_NORMAL, 1, 2, 3, 4);
|
||||
pci_register_slot(0x13, PCI_CARD_NORMAL, 2, 3, 4, 1);
|
||||
pci_register_slot(0x0B, PCI_CARD_NORMAL, 3, 4, 1, 2);
|
||||
pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x0A, PCI_CARD_NORMAL, 3, 0, 0, 0); // riser
|
||||
|
||||
if ((sound_card_current[0] == SOUND_INTERNAL) && machine_get_snd_device(machine)->available())
|
||||
machine_snd = device_add(machine_get_snd_device(machine));
|
||||
|
||||
device_add(&i430hx_device);
|
||||
device_add(&piix3_device);
|
||||
device_add(&keyboard_ps2_ami_pci_device);
|
||||
device_add(&pc87306_device);
|
||||
device_add(&intel_flash_bxt_ami_device);
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_cu430hx_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear_combined2("roms/machines/cu430hx/1006DK0_.BIO",
|
||||
"roms/machines/cu430hx/1006DK0_.BI1",
|
||||
"roms/machines/cu430hx/1006DK0_.BI2",
|
||||
"roms/machines/cu430hx/1006DK0_.BI3",
|
||||
"roms/machines/cu430hx/1006DK0_.RCV",
|
||||
0x3a000, 128);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_cu430hx_common_init(model);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_equium5200_init(const machine_t *model)
|
||||
{
|
||||
@@ -257,21 +377,7 @@ machine_at_equium5200_init(const machine_t *model)
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init_ex(model, 2);
|
||||
|
||||
pci_init(PCI_CONFIG_TYPE_1);
|
||||
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x08, PCI_CARD_VIDEO, 4, 0, 0, 0);
|
||||
pci_register_slot(0x11, PCI_CARD_NORMAL, 1, 2, 3, 4);
|
||||
pci_register_slot(0x13, PCI_CARD_NORMAL, 2, 3, 4, 1);
|
||||
pci_register_slot(0x0B, PCI_CARD_NORMAL, 3, 4, 1, 2);
|
||||
pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x0A, PCI_CARD_NORMAL, 3, 0, 0, 0); // riser
|
||||
device_add(&i430hx_device);
|
||||
device_add(&piix3_device);
|
||||
device_add(&keyboard_ps2_ami_pci_device);
|
||||
device_add(&pc87306_device);
|
||||
device_add(&intel_flash_bxt_ami_device);
|
||||
machine_at_cu430hx_common_init(model);
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -292,6 +398,7 @@ machine_at_pcv90_init(const machine_t *model)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init_ex(model, 2);
|
||||
machine_at_ag430hx_gpio_init();
|
||||
|
||||
pci_init(PCI_CONFIG_TYPE_1);
|
||||
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
|
||||
@@ -548,6 +655,7 @@ machine_at_pb680_init(const machine_t *model)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init_ex(model, 2);
|
||||
machine_at_nv430vx_gpio_init();
|
||||
|
||||
pci_init(PCI_CONFIG_TYPE_1);
|
||||
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
|
||||
@@ -556,6 +664,10 @@ machine_at_pb680_init(const machine_t *model)
|
||||
pci_register_slot(0x13, PCI_CARD_NORMAL, 2, 3, 4, 1);
|
||||
pci_register_slot(0x0B, PCI_CARD_NORMAL, 3, 4, 1, 2);
|
||||
pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0);
|
||||
|
||||
if (gfxcard[0] == VID_INTERNAL)
|
||||
device_add(machine_get_vid_device(machine));
|
||||
|
||||
device_add(&i430vx_device);
|
||||
device_add(&piix3_device);
|
||||
device_add(&keyboard_ps2_ami_pci_device);
|
||||
|
||||
@@ -41,11 +41,58 @@
|
||||
#include <86box/fdc.h>
|
||||
#include <86box/nvr.h>
|
||||
#include <86box/plat_unused.h>
|
||||
#include <86box/sound.h>
|
||||
|
||||
static void
|
||||
machine_at_thor_common_init(const machine_t *model, UNUSED(int mr))
|
||||
machine_at_thor_gpio_init(void)
|
||||
{
|
||||
uint32_t gpio = 0xffffe1cf;
|
||||
|
||||
/* Register 0x0078 (Undocumented): */
|
||||
/* Bit 5: 0 = Multiplier. */
|
||||
/* Bit 4: 0 = Multiplier. */
|
||||
/* 1.5: 0, 0. */
|
||||
/* 3.0: 0, 1. */
|
||||
/* 2.0: 1, 0. */
|
||||
/* 2.5: 1, 1. */
|
||||
/* Bit 1: 0 = Error beep, 1 = No error. */
|
||||
if (cpu_dmulti <= 1.5)
|
||||
gpio |= 0xffff0000;
|
||||
else if ((cpu_dmulti > 1.5) && (cpu_dmulti <= 2.0))
|
||||
gpio |= 0xffff0020;
|
||||
else if ((cpu_dmulti > 2.0) && (cpu_dmulti <= 2.5))
|
||||
gpio |= 0xffff0030;
|
||||
else if (cpu_dmulti > 2.5)
|
||||
gpio |= 0xffff0010;
|
||||
|
||||
/* Register 0x0079: */
|
||||
/* Bit 7: 0 = Clear password, 1 = Keep password. */
|
||||
/* Bit 6: 0 = NVRAM cleared by jumper, 1 = NVRAM normal. */
|
||||
/* Bit 5: 0 = CMOS Setup disabled, 1 = CMOS Setup enabled. */
|
||||
/* Bit 4: External CPU clock (Switch 8). */
|
||||
/* Bit 3: External CPU clock (Switch 7). */
|
||||
/* 50 MHz: Switch 7 = Off, Switch 8 = Off. */
|
||||
/* 60 MHz: Switch 7 = On, Switch 8 = Off. */
|
||||
/* 66 MHz: Switch 7 = Off, Switch 8 = On. */
|
||||
/* Bit 2: 0 = On-board audio absent, 1 = On-board audio present. */
|
||||
/* Bit 1: 0 = Soft-off capable power supply present, 1 = Soft-off capable power supply absent. */
|
||||
/* Bit 0: 0 = Reserved. */
|
||||
/* NOTE: A bit is read as 1 if switch is off, and as 0 if switch is on. */
|
||||
if (cpu_busspeed <= 50000000)
|
||||
gpio |= 0xffff0000;
|
||||
else if ((cpu_busspeed > 50000000) && (cpu_busspeed <= 60000000))
|
||||
gpio |= 0xffff0800;
|
||||
else if (cpu_busspeed > 60000000)
|
||||
gpio |= 0xffff1000;
|
||||
|
||||
machine_set_gpio_default(gpio);
|
||||
}
|
||||
|
||||
static void
|
||||
machine_at_thor_common_init(const machine_t *model, int has_video)
|
||||
{
|
||||
machine_at_common_init_ex(model, 2);
|
||||
machine_at_thor_gpio_init();
|
||||
|
||||
pci_init(PCI_CONFIG_TYPE_1);
|
||||
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
|
||||
@@ -56,8 +103,8 @@ machine_at_thor_common_init(const machine_t *model, UNUSED(int mr))
|
||||
pci_register_slot(0x10, PCI_CARD_NORMAL, 4, 3, 2, 1);
|
||||
pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0);
|
||||
|
||||
if (gfxcard[0] == VID_INTERNAL)
|
||||
device_add(&s3_phoenix_trio64vplus_onboard_pci_device);
|
||||
if (has_video && (gfxcard[0] == VID_INTERNAL))
|
||||
device_add(machine_get_vid_device(machine));
|
||||
|
||||
device_add(&keyboard_ps2_intel_ami_pci_device);
|
||||
device_add(&i430fx_device);
|
||||
@@ -175,7 +222,7 @@ machine_at_thor_init(const machine_t *model)
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_thor_common_init(model, 0);
|
||||
machine_at_thor_common_init(model, 1);
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -191,7 +238,93 @@ machine_at_mrthor_init(const machine_t *model)
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_thor_common_init(model, 1);
|
||||
machine_at_thor_common_init(model, 0);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void
|
||||
machine_at_endeavor_gpio_init(void)
|
||||
{
|
||||
uint32_t gpio = 0xffffe0cf;
|
||||
uint16_t addr;
|
||||
|
||||
/* Register 0x0078 (Undocumented): */
|
||||
/* Bit 5,4: Vibra 16S base address: 0 = 220h, 1 = 260h, 2 = 240h, 3 = 280h. */
|
||||
device_context(machine_get_snd_device(machine));
|
||||
addr = device_get_config_hex16("base");
|
||||
switch (addr) {
|
||||
case 0x0220:
|
||||
gpio |= 0xffff00cf;
|
||||
break;
|
||||
case 0x0240:
|
||||
gpio |= 0xffff00ef;
|
||||
break;
|
||||
case 0x0260:
|
||||
gpio |= 0xffff00df;
|
||||
break;
|
||||
case 0x0280:
|
||||
gpio |= 0xffff00ff;
|
||||
break;
|
||||
}
|
||||
device_context_restore();
|
||||
|
||||
/* Register 0x0079: */
|
||||
/* Bit 7: 0 = Clear password, 1 = Keep password. */
|
||||
/* Bit 6: 0 = NVRAM cleared by jumper, 1 = NVRAM normal. */
|
||||
/* Bit 5: 0 = CMOS Setup disabled, 1 = CMOS Setup enabled. */
|
||||
/* Bit 4: External CPU clock (Switch 8). */
|
||||
/* Bit 3: External CPU clock (Switch 7). */
|
||||
/* 50 MHz: Switch 7 = Off, Switch 8 = Off. */
|
||||
/* 60 MHz: Switch 7 = On, Switch 8 = Off. */
|
||||
/* 66 MHz: Switch 7 = Off, Switch 8 = On. */
|
||||
/* Bit 2: 0 = On-board audio absent, 1 = On-board audio present. */
|
||||
/* Bit 1: 0 = Soft-off capable power supply present, 1 = Soft-off capable power supply absent. */
|
||||
/* Bit 0: 0 = 2x multiplier, 1 = 1.5x multiplier (Switch 6). */
|
||||
/* NOTE: A bit is read as 1 if switch is off, and as 0 if switch is on. */
|
||||
if (cpu_busspeed <= 50000000)
|
||||
gpio |= 0xffff0000;
|
||||
else if ((cpu_busspeed > 50000000) && (cpu_busspeed <= 60000000))
|
||||
gpio |= 0xffff0800;
|
||||
else if (cpu_busspeed > 60000000)
|
||||
gpio |= 0xffff1000;
|
||||
|
||||
if (sound_card_current[0] == SOUND_INTERNAL)
|
||||
gpio |= 0xffff0400;
|
||||
|
||||
if (cpu_dmulti <= 1.5)
|
||||
gpio |= 0xffff0100;
|
||||
else
|
||||
gpio |= 0xffff0000;
|
||||
|
||||
machine_set_gpio_default(gpio);
|
||||
}
|
||||
|
||||
uint32_t
|
||||
machine_at_endeavor_gpio_handler(uint8_t write, uint32_t val)
|
||||
{
|
||||
uint32_t ret = machine_get_gpio_default();
|
||||
|
||||
if (write) {
|
||||
ret &= ((val & 0xffffffcf) | 0xffff0000);
|
||||
ret |= (val & 0x00000030);
|
||||
if (machine_snd != NULL) switch ((val >> 4) & 0x03) {
|
||||
case 0x00:
|
||||
sb_vibra16s_onboard_relocate_base(0x0220, machine_snd);
|
||||
break;
|
||||
case 0x01:
|
||||
sb_vibra16s_onboard_relocate_base(0x0260, machine_snd);
|
||||
break;
|
||||
case 0x02:
|
||||
sb_vibra16s_onboard_relocate_base(0x0240, machine_snd);
|
||||
break;
|
||||
case 0x03:
|
||||
sb_vibra16s_onboard_relocate_base(0x0280, machine_snd);
|
||||
break;
|
||||
}
|
||||
machine_set_gpio(ret);
|
||||
} else
|
||||
ret = machine_get_gpio();
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -209,6 +342,7 @@ machine_at_endeavor_init(const machine_t *model)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init_ex(model, 2);
|
||||
machine_at_endeavor_gpio_init();
|
||||
|
||||
pci_init(PCI_CONFIG_TYPE_1);
|
||||
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
|
||||
@@ -220,7 +354,10 @@ machine_at_endeavor_init(const machine_t *model)
|
||||
pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0);
|
||||
|
||||
if (gfxcard[0] == VID_INTERNAL)
|
||||
device_add(&s3_phoenix_trio64_onboard_pci_device);
|
||||
device_add(machine_get_vid_device(machine));
|
||||
|
||||
if (sound_card_current[0] == SOUND_INTERNAL)
|
||||
machine_snd = device_add(machine_get_snd_device(machine));
|
||||
|
||||
device_add(&keyboard_ps2_intel_ami_pci_device);
|
||||
device_add(&i430fx_device);
|
||||
@@ -236,7 +373,7 @@ machine_at_ms5119_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/ms5119/A37E.ROM",
|
||||
ret = bios_load_linear("roms/machines/ms5119/A37EB.ROM",
|
||||
0x000e0000, 131072, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
@@ -260,6 +397,39 @@ machine_at_ms5119_init(const machine_t *model)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void
|
||||
machine_at_pb640_gpio_init(void)
|
||||
{
|
||||
uint32_t gpio = 0xffffe6ff;
|
||||
|
||||
/* Register 0x0079: */
|
||||
/* Bit 7: 0 = Clear password, 1 = Keep password. */
|
||||
/* Bit 6: 0 = NVRAM cleared by jumper, 1 = NVRAM normal. */
|
||||
/* Bit 5: 0 = CMOS Setup disabled, 1 = CMOS Setup enabled. */
|
||||
/* Bit 4: External CPU clock (Switch 8). */
|
||||
/* Bit 3: External CPU clock (Switch 7). */
|
||||
/* 50 MHz: Switch 7 = Off, Switch 8 = Off. */
|
||||
/* 60 MHz: Switch 7 = On, Switch 8 = Off. */
|
||||
/* 66 MHz: Switch 7 = Off, Switch 8 = On. */
|
||||
/* Bit 2: No Connect. */
|
||||
/* Bit 1: No Connect. */
|
||||
/* Bit 0: 2x multiplier, 1 = 1.5x multiplier (Switch 6). */
|
||||
/* NOTE: A bit is read as 1 if switch is off, and as 0 if switch is on. */
|
||||
if (cpu_busspeed <= 50000000)
|
||||
gpio |= 0xffff00ff;
|
||||
else if ((cpu_busspeed > 50000000) && (cpu_busspeed <= 60000000))
|
||||
gpio |= 0xffff08ff;
|
||||
else if (cpu_busspeed > 60000000)
|
||||
gpio |= 0xffff10ff;
|
||||
|
||||
if (cpu_dmulti <= 1.5)
|
||||
gpio |= 0xffff01ff;
|
||||
else
|
||||
gpio |= 0xffff00ff;
|
||||
|
||||
machine_set_gpio_default(gpio);
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_pb640_init(const machine_t *model)
|
||||
{
|
||||
@@ -272,6 +442,7 @@ machine_at_pb640_init(const machine_t *model)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init_ex(model, 2);
|
||||
machine_at_pb640_gpio_init();
|
||||
|
||||
pci_init(PCI_CONFIG_TYPE_1);
|
||||
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
|
||||
|
||||
@@ -72,7 +72,15 @@ machine_init_ex(int m)
|
||||
if (!bios_only) {
|
||||
machine_log("Initializing as \"%s\"\n", machine_getname());
|
||||
|
||||
machine_init_p1();
|
||||
|
||||
machine_init_gpio();
|
||||
machine_init_gpio_acpi();
|
||||
|
||||
machine_snd = NULL;
|
||||
|
||||
is_vpc = 0;
|
||||
|
||||
standalone_gameport_type = NULL;
|
||||
gameport_instance_id = 0;
|
||||
|
||||
|
||||
@@ -9071,7 +9071,7 @@ const machine_t machines[] = {
|
||||
.device = NULL,
|
||||
.fdc_device = NULL,
|
||||
.sio_device = NULL,
|
||||
.vid_device = &s3_phoenix_trio64vplus_onboard_pci_device,
|
||||
.vid_device = NULL,
|
||||
.snd_device = NULL,
|
||||
.net_device = NULL
|
||||
},
|
||||
@@ -9085,7 +9085,7 @@ const machine_t machines[] = {
|
||||
.chipset = MACHINE_CHIPSET_INTEL_430FX,
|
||||
.init = machine_at_endeavor_init,
|
||||
.p1_handler = NULL,
|
||||
.gpio_handler = NULL,
|
||||
.gpio_handler = machine_at_endeavor_gpio_handler,
|
||||
.available_flag = MACHINE_AVAILABLE,
|
||||
.gpio_acpi_handler = NULL,
|
||||
.cpu = {
|
||||
@@ -9099,7 +9099,7 @@ const machine_t machines[] = {
|
||||
.max_multi = 3.0
|
||||
},
|
||||
.bus_flags = MACHINE_PS2_PCI,
|
||||
.flags = MACHINE_IDE_DUAL | MACHINE_VIDEO | MACHINE_APM | MACHINE_ACPI,
|
||||
.flags = MACHINE_IDE_DUAL | MACHINE_VIDEO | MACHINE_SOUND | MACHINE_APM | MACHINE_ACPI,
|
||||
.ram = {
|
||||
.min = 8192,
|
||||
.max = 131072,
|
||||
@@ -9114,7 +9114,7 @@ const machine_t machines[] = {
|
||||
.fdc_device = NULL,
|
||||
.sio_device = NULL,
|
||||
.vid_device = &s3_phoenix_trio64_onboard_pci_device,
|
||||
.snd_device = NULL,
|
||||
.snd_device = &sb_vibra16s_onboard_device,
|
||||
.net_device = NULL
|
||||
},
|
||||
/* This has an AMIKey-2, which is an updated version of type 'H'. */
|
||||
@@ -9770,12 +9770,11 @@ const machine_t machines[] = {
|
||||
.device = NULL,
|
||||
.fdc_device = NULL,
|
||||
.sio_device = NULL,
|
||||
.vid_device = NULL,
|
||||
.vid_device = &s3_virge_375_pci_device,
|
||||
.snd_device = NULL,
|
||||
.net_device = NULL
|
||||
},
|
||||
/* OEM version of Intel TC430HX, has AMI MegaKey KBC firmware on the PC87306
|
||||
Super I/O chip */
|
||||
/* OEM version of Intel TC430HX, has AMI MegaKey KBC firmware on the PC87306 Super I/O chip. */
|
||||
{
|
||||
.name = "[i430HX] Toshiba Infinia 7200",
|
||||
.internal_name = "infinia7200",
|
||||
@@ -9811,13 +9810,51 @@ const machine_t machines[] = {
|
||||
.device = NULL,
|
||||
.fdc_device = NULL,
|
||||
.sio_device = NULL,
|
||||
.vid_device = NULL,
|
||||
.vid_device = &s3_virge_375_pci_device,
|
||||
.snd_device = NULL,
|
||||
.net_device = NULL
|
||||
},
|
||||
/* According to tests from real hardware: This has AMI MegaKey KBC firmware on the
|
||||
PC87306 Super I/O chip, command 0xA1 returns '5'.
|
||||
Command 0xA0 copyright string: (C)1994 AMI . */
|
||||
/* OEM-only Intel CU430HX, has AMI MegaKey KBC firmware on the PC87306 Super I/O chip. */
|
||||
{
|
||||
.name = "[i430HX] Intel CU430HX",
|
||||
.internal_name = "cu430hx",
|
||||
.type = MACHINE_TYPE_SOCKET7,
|
||||
.chipset = MACHINE_CHIPSET_INTEL_430HX,
|
||||
.init = machine_at_cu430hx_init,
|
||||
.p1_handler = NULL,
|
||||
.gpio_handler = NULL,
|
||||
.available_flag = MACHINE_AVAILABLE,
|
||||
.gpio_acpi_handler = NULL,
|
||||
.cpu = {
|
||||
.package = CPU_PKG_SOCKET5_7,
|
||||
.block = CPU_BLOCK_NONE,
|
||||
.min_bus = 50000000,
|
||||
.max_bus = 66666667,
|
||||
.min_voltage = 2800,
|
||||
.max_voltage = 3520,
|
||||
.min_multi = 1.5,
|
||||
.max_multi = 3.0
|
||||
},
|
||||
.bus_flags = MACHINE_PS2_PCI,
|
||||
.flags = MACHINE_IDE_DUAL | MACHINE_SOUND | MACHINE_APM | MACHINE_ACPI,
|
||||
.ram = {
|
||||
.min = 8192,
|
||||
.max = 196608,
|
||||
.step = 8192
|
||||
},
|
||||
.nvrmask = 255,
|
||||
.kbc_device = NULL,
|
||||
.kbc_p1 = 0xff,
|
||||
.gpio = 0xffffffff,
|
||||
.gpio_acpi = 0xffffffff,
|
||||
.device = NULL,
|
||||
.fdc_device = NULL,
|
||||
.sio_device = NULL,
|
||||
.vid_device = NULL,
|
||||
.snd_device = &sb_vibra16c_onboard_device,
|
||||
.net_device = NULL
|
||||
},
|
||||
/* OEM-only Intel CU430HX, has AMI MegaKey KBC firmware on the PC87306 Super I/O chip. */
|
||||
{
|
||||
.name = "[i430HX] Toshiba Equium 5200D",
|
||||
.internal_name = "equium5200",
|
||||
@@ -9839,7 +9876,7 @@ const machine_t machines[] = {
|
||||
.max_multi = 3.0
|
||||
},
|
||||
.bus_flags = MACHINE_PS2_PCI,
|
||||
.flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI,
|
||||
.flags = MACHINE_IDE_DUAL | MACHINE_SOUND | MACHINE_APM | MACHINE_ACPI,
|
||||
.ram = {
|
||||
.min = 8192,
|
||||
.max = 196608,
|
||||
@@ -9854,7 +9891,7 @@ const machine_t machines[] = {
|
||||
.fdc_device = NULL,
|
||||
.sio_device = NULL,
|
||||
.vid_device = NULL,
|
||||
.snd_device = NULL,
|
||||
.snd_device = &sb_vibra16c_onboard_device,
|
||||
.net_device = NULL
|
||||
},
|
||||
/* According to tests from real hardware: This has AMI MegaKey KBC firmware on the
|
||||
@@ -10288,7 +10325,7 @@ const machine_t machines[] = {
|
||||
.max_multi = 3.0
|
||||
},
|
||||
.bus_flags = MACHINE_PS2_PCI,
|
||||
.flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI,
|
||||
.flags = MACHINE_VIDEO | MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI,
|
||||
.ram = {
|
||||
.min = 8192,
|
||||
.max = 131072,
|
||||
@@ -10302,7 +10339,7 @@ const machine_t machines[] = {
|
||||
.device = NULL,
|
||||
.fdc_device = NULL,
|
||||
.sio_device = NULL,
|
||||
.vid_device = NULL,
|
||||
.vid_device = &s3_phoenix_trio64vplus_onboard_pci_device,
|
||||
.snd_device = NULL,
|
||||
.net_device = NULL
|
||||
},
|
||||
@@ -13339,11 +13376,23 @@ const machine_t machines[] = {
|
||||
|
||||
/* Saved copies - jumpers get applied to these.
|
||||
We use also machine_gpio to store IBM PC/XT jumpers as they need more than one byte. */
|
||||
static uint8_t machine_p1_default;
|
||||
static uint8_t machine_p1;
|
||||
|
||||
static uint32_t machine_gpio_default;
|
||||
static uint32_t machine_gpio;
|
||||
|
||||
static uint32_t machine_gpio_acpi_default;
|
||||
static uint32_t machine_gpio_acpi;
|
||||
|
||||
void *machine_snd = NULL;
|
||||
|
||||
uint8_t
|
||||
machine_get_p1_default(void)
|
||||
{
|
||||
return machine_p1_default;
|
||||
}
|
||||
|
||||
uint8_t
|
||||
machine_get_p1(void)
|
||||
{
|
||||
@@ -13351,11 +13400,22 @@ machine_get_p1(void)
|
||||
}
|
||||
|
||||
void
|
||||
machine_set_p1(uint8_t val)
|
||||
machine_set_p1_default(uint8_t val)
|
||||
{
|
||||
machine_p1 = machines[machine].kbc_p1 & val;
|
||||
machine_p1 = machine_p1_default = val;
|
||||
}
|
||||
|
||||
void
|
||||
machine_set_p1(uint8_t val)
|
||||
{
|
||||
machine_p1 = val;
|
||||
}
|
||||
|
||||
void
|
||||
machine_and_p1(uint8_t val)
|
||||
{
|
||||
machine_p1 = machine_p1_default & val;
|
||||
}
|
||||
|
||||
uint8_t
|
||||
machine_handle_p1(uint8_t write, uint8_t val)
|
||||
@@ -13366,7 +13426,7 @@ machine_handle_p1(uint8_t write, uint8_t val)
|
||||
ret = machines[machine].p1_handler(write, val);
|
||||
else {
|
||||
if (write)
|
||||
machine_p1 = machines[machine].kbc_p1 & val;
|
||||
machine_p1 = machine_p1_default & val;
|
||||
else
|
||||
ret = machine_p1;
|
||||
}
|
||||
@@ -13377,7 +13437,13 @@ machine_handle_p1(uint8_t write, uint8_t val)
|
||||
void
|
||||
machine_init_p1(void)
|
||||
{
|
||||
machine_p1 = machines[machine].kbc_p1;
|
||||
machine_p1 = machine_p1_default = machines[machine].kbc_p1;
|
||||
}
|
||||
|
||||
uint32_t
|
||||
machine_get_gpio_default(void)
|
||||
{
|
||||
return machine_gpio_default;
|
||||
}
|
||||
|
||||
uint32_t
|
||||
@@ -13386,10 +13452,22 @@ machine_get_gpio(void)
|
||||
return machine_gpio;
|
||||
}
|
||||
|
||||
void
|
||||
machine_set_gpio_default(uint32_t val)
|
||||
{
|
||||
machine_gpio = machine_gpio_default = val;
|
||||
}
|
||||
|
||||
void
|
||||
machine_set_gpio(uint32_t val)
|
||||
{
|
||||
machine_gpio = machines[machine].gpio & val;
|
||||
machine_gpio = val;
|
||||
}
|
||||
|
||||
void
|
||||
machine_and_gpio(uint32_t val)
|
||||
{
|
||||
machine_gpio = machine_gpio_default & val;
|
||||
}
|
||||
|
||||
uint32_t
|
||||
@@ -13401,7 +13479,7 @@ machine_handle_gpio(uint8_t write, uint32_t val)
|
||||
ret = machines[machine].gpio_handler(write, val);
|
||||
else {
|
||||
if (write)
|
||||
machine_gpio = machines[machine].gpio & val;
|
||||
machine_gpio = machine_gpio_default & val;
|
||||
else
|
||||
ret = machine_gpio;
|
||||
}
|
||||
@@ -13412,7 +13490,13 @@ machine_handle_gpio(uint8_t write, uint32_t val)
|
||||
void
|
||||
machine_init_gpio(void)
|
||||
{
|
||||
machine_gpio = machines[machine].gpio;
|
||||
machine_gpio = machine_gpio_default = machines[machine].gpio;
|
||||
}
|
||||
|
||||
uint32_t
|
||||
machine_get_gpio_acpi_default(void)
|
||||
{
|
||||
return machine_gpio_acpi_default;
|
||||
}
|
||||
|
||||
uint32_t
|
||||
@@ -13421,10 +13505,22 @@ machine_get_gpio_acpi(void)
|
||||
return machine_gpio_acpi;
|
||||
}
|
||||
|
||||
void
|
||||
machine_set_gpio_acpi_default(uint32_t val)
|
||||
{
|
||||
machine_gpio_acpi = machine_gpio_acpi_default = val;
|
||||
}
|
||||
|
||||
void
|
||||
machine_set_gpio_acpi(uint32_t val)
|
||||
{
|
||||
machine_gpio_acpi = machines[machine].gpio_acpi & val;
|
||||
machine_gpio_acpi = val;
|
||||
}
|
||||
|
||||
void
|
||||
machine_and_gpio_acpi(uint32_t val)
|
||||
{
|
||||
machine_gpio_acpi = machine_gpio_acpi_default & val;
|
||||
}
|
||||
|
||||
uint32_t
|
||||
@@ -13436,7 +13532,7 @@ machine_handle_gpio_acpi(uint8_t write, uint32_t val)
|
||||
ret = machines[machine].gpio_acpi_handler(write, val);
|
||||
else {
|
||||
if (write)
|
||||
machine_gpio_acpi = machines[machine].gpio_acpi & val;
|
||||
machine_gpio_acpi = machine_gpio_acpi_default & val;
|
||||
else
|
||||
ret = machine_gpio_acpi;
|
||||
}
|
||||
@@ -13447,7 +13543,7 @@ machine_handle_gpio_acpi(uint8_t write, uint32_t val)
|
||||
void
|
||||
machine_init_gpio_acpi(void)
|
||||
{
|
||||
machine_gpio_acpi = machines[machine].gpio_acpi;
|
||||
machine_gpio_acpi = machine_gpio_acpi_default = machines[machine].gpio_acpi;
|
||||
}
|
||||
|
||||
int
|
||||
|
||||
@@ -38,22 +38,6 @@
|
||||
#include <86box/plat.h>
|
||||
#include <86box/rom.h>
|
||||
#include <86box/gdbstub.h>
|
||||
#ifdef USE_DYNAREC
|
||||
# include "codegen_public.h"
|
||||
#else
|
||||
# ifdef USE_NEW_DYNAREC
|
||||
# define PAGE_MASK_SHIFT 6
|
||||
# else
|
||||
# define PAGE_MASK_INDEX_MASK 3
|
||||
# define PAGE_MASK_INDEX_SHIFT 10
|
||||
# define PAGE_MASK_SHIFT 4
|
||||
# endif
|
||||
# define PAGE_MASK_MASK 63
|
||||
#endif
|
||||
#if (!defined(USE_DYNAREC) && defined(USE_NEW_DYNAREC))
|
||||
# define BLOCK_PC_INVALID 0xffffffff
|
||||
# define BLOCK_INVALID 0
|
||||
#endif
|
||||
|
||||
uint8_t
|
||||
mem_readb_map(uint32_t addr)
|
||||
|
||||
@@ -54,7 +54,6 @@ static pc_timer_t pic_timer;
|
||||
static int shadow = 0;
|
||||
static int elcr_enabled = 0;
|
||||
static int tmr_inited = 0;
|
||||
static int latched = 0;
|
||||
static int pic_pci = 0;
|
||||
static int kbd_latch = 0;
|
||||
static int mouse_latch = 0;
|
||||
|
||||
@@ -212,7 +212,7 @@ msgid "&Existing image..."
|
||||
msgstr "既存のイメージを開く(&E)..."
|
||||
|
||||
msgid "Existing image (&Write-protected)..."
|
||||
msgstr "既存のイメージを開く(書き込み保護)(&W)..."
|
||||
msgstr "既存のイメージを開く(書き込み禁止)(&W)..."
|
||||
|
||||
msgid "&Record"
|
||||
msgstr "録音(&R)"
|
||||
@@ -311,7 +311,7 @@ msgid "Icon set:"
|
||||
msgstr "アイコンセット:"
|
||||
|
||||
msgid "Gain"
|
||||
msgstr "ゲイン値"
|
||||
msgstr "音量"
|
||||
|
||||
msgid "File name:"
|
||||
msgstr "ファイル名:"
|
||||
@@ -335,7 +335,7 @@ msgid "Lock to this size"
|
||||
msgstr "サイズを固定"
|
||||
|
||||
msgid "Machine type:"
|
||||
msgstr "マシン タイプ:"
|
||||
msgstr "マシンタイプ:"
|
||||
|
||||
msgid "Machine:"
|
||||
msgstr "マシン:"
|
||||
@@ -374,7 +374,7 @@ msgid "Enabled (UTC)"
|
||||
msgstr "有効(UTC)"
|
||||
|
||||
msgid "Dynamic Recompiler"
|
||||
msgstr "動的リコンパイラ"
|
||||
msgstr "動的再コンパイル"
|
||||
|
||||
msgid "Video:"
|
||||
msgstr "ビデオカード:"
|
||||
@@ -638,7 +638,7 @@ msgid " - PAUSED"
|
||||
msgstr " - 一時停止"
|
||||
|
||||
msgid "Press Ctrl+Alt+PgDn to return to windowed mode."
|
||||
msgstr "Ctrl+Alt+PgDnでウィンドウモードに戻ります。"
|
||||
msgstr "Ctrl+Alt+PgDnでウィンドウ モードに戻ります。"
|
||||
|
||||
msgid "Speed"
|
||||
msgstr "速度"
|
||||
@@ -650,7 +650,7 @@ msgid "ZIP images"
|
||||
msgstr "ZIPイメージ"
|
||||
|
||||
msgid "86Box could not find any usable ROM images.\n\nPlease <a href=\"https://github.com/86Box/roms/releases/latest\">download</a> a ROM set and extract it into the \"roms\" directory."
|
||||
msgstr "86Boxで使用可能なROMイメージが見つかりませんでした。\n\nROMセットを<a href=\"https://github.com/86Box/roms/releases/latest\">ダウンロード</a>して、「roms」ディレクトリに解凍してください。"
|
||||
msgstr "86Boxで使用可能なROMイメージが見つかりません。\n\nROMセットを<a href=\"https://github.com/86Box/roms/releases/latest\">ダウンロード</a>して、roms ディレクトリに解凍してください。"
|
||||
|
||||
msgid "(empty)"
|
||||
msgstr "(空)"
|
||||
@@ -671,10 +671,10 @@ msgid "All images"
|
||||
msgstr "すべてのイメージ"
|
||||
|
||||
msgid "Basic sector images"
|
||||
msgstr "基本的なセクターイメージ"
|
||||
msgstr "ベーシック セクター イメージ"
|
||||
|
||||
msgid "Surface images"
|
||||
msgstr "表面イメージ"
|
||||
msgstr "サーフェス イメージ"
|
||||
|
||||
msgid "Machine \"%hs\" is not available due to missing ROMs in the roms/machines directory. Switching to an available machine."
|
||||
msgstr "roms/machines ディレクトリにROMがないため、マシン「%hs」は使用できません。使用可能なマシンに切り替えます。"
|
||||
@@ -686,7 +686,7 @@ msgid "Machine"
|
||||
msgstr "マシン"
|
||||
|
||||
msgid "Display"
|
||||
msgstr "画面表示"
|
||||
msgstr "ディスプレイ"
|
||||
|
||||
msgid "Input devices"
|
||||
msgstr "入力デバイス"
|
||||
@@ -701,28 +701,28 @@ msgid "Ports (COM & LPT)"
|
||||
msgstr "ポート (COM/LPT)"
|
||||
|
||||
msgid "Storage controllers"
|
||||
msgstr "ストレージ コントローラ"
|
||||
msgstr "ストレージコントローラ"
|
||||
|
||||
msgid "Hard disks"
|
||||
msgstr "ハード ディスク"
|
||||
msgstr "ハードディスク"
|
||||
|
||||
msgid "Floppy & CD-ROM drives"
|
||||
msgstr "フロッピー/CD-ROMドライブ"
|
||||
msgstr "フロッピー/CD-ROMドライブ"
|
||||
|
||||
msgid "Other removable devices"
|
||||
msgstr "他のリムーバブル デバイス"
|
||||
msgstr "他のリムーバブルデバイス"
|
||||
|
||||
msgid "Other peripherals"
|
||||
msgstr "他の周辺デバイス"
|
||||
|
||||
msgid "Click to capture mouse"
|
||||
msgstr "クリックするとマウスをキャプチャします"
|
||||
msgstr "左クリックでマウスをキャプチャします"
|
||||
|
||||
msgid "Press F8+F12 to release mouse"
|
||||
msgstr "F8+F12キーでマウスを解放します"
|
||||
|
||||
msgid "Press F8+F12 or middle button to release mouse"
|
||||
msgstr "F8+F12キーまたはマウスの中ボタンを押してマウスを解放します"
|
||||
msgstr "F8+F12キーまたは中クリックでマウスを解放します"
|
||||
|
||||
msgid "Bus"
|
||||
msgstr "バス"
|
||||
@@ -761,7 +761,7 @@ msgid "No PCap devices found"
|
||||
msgstr "PCapデバイスがありません"
|
||||
|
||||
msgid "Invalid PCap device"
|
||||
msgstr "不正なPCapデバイスです"
|
||||
msgstr "不正なPCapデバイス"
|
||||
|
||||
msgid "Standard 2-button joystick(s)"
|
||||
msgstr "標準ジョイスティック(2ボタン)"
|
||||
@@ -899,7 +899,7 @@ msgid "CD-ROM images"
|
||||
msgstr "CD-ROMイメージ"
|
||||
|
||||
msgid "%hs Device Configuration"
|
||||
msgstr "%hs デバイスの設定"
|
||||
msgstr "%hs のデバイス設定"
|
||||
|
||||
msgid "Monitor in sleep mode"
|
||||
msgstr "モニターのスリープモード"
|
||||
@@ -911,7 +911,7 @@ msgid "OpenGL options"
|
||||
msgstr "OpenGL設定"
|
||||
|
||||
msgid "You are loading an unsupported configuration"
|
||||
msgstr "サポートされていない設定を読み込んでいます"
|
||||
msgstr "読み込んでいる設定がサポートされません"
|
||||
|
||||
msgid "CPU type filtering based on selected machine is disabled for this emulated machine.\n\nThis makes it possible to choose a CPU that is otherwise incompatible with the selected machine. However, you may run into incompatibilities with the machine BIOS or other software.\n\nEnabling this setting is not officially supported and any bug reports filed may be closed as invalid."
|
||||
msgstr "選択したマシンに基づくCPUタイプのフィルター機能は、使用中のマシンでは無効になっています。\n\nこれにより、選択したマシンと互換性のないCPUが選択できます。しかし、マシンのBIOSや他のソフトウェアと互換性がない場合があります。\n\nこの設定を有効にすることは公式にはサポートされておらず、バグレポートは無効として中止される可能性があります。"
|
||||
@@ -935,7 +935,7 @@ msgid "Error initializing renderer"
|
||||
msgstr "レンダラーの初期化エラー"
|
||||
|
||||
msgid "OpenGL (3.0 Core) renderer could not be initialized. Use another renderer."
|
||||
msgstr "OpenGL (3.0コア) レンダラーが初期化できませんでした。別のレンダラーを使用してください。"
|
||||
msgstr "OpenGL (3.0コア) レンダラーが初期化できません。別のレンダラーを使用してください。"
|
||||
|
||||
msgid "Resume execution"
|
||||
msgstr "実行を再開"
|
||||
@@ -944,10 +944,10 @@ msgid "Pause execution"
|
||||
msgstr "実行を一時停止"
|
||||
|
||||
msgid "Press Ctrl+Alt+Del"
|
||||
msgstr "Ctrl+Alt+DELを押し"
|
||||
msgstr "Ctrl+Alt+DELを押す"
|
||||
|
||||
msgid "Press Ctrl+Alt+Esc"
|
||||
msgstr "Ctrl+Alt+Escを押し"
|
||||
msgstr "Ctrl+Alt+Escを押す"
|
||||
|
||||
msgid "Hard reset"
|
||||
msgstr "ハードリセット"
|
||||
@@ -965,13 +965,13 @@ msgid "%01i"
|
||||
msgstr "%01i"
|
||||
|
||||
msgid "MFM/RLL or ESDI CD-ROM drives never existed"
|
||||
msgstr "MFM/RLLまたはESDIのCD-ROMドライブが存在しません"
|
||||
msgstr "MFM/RLLやESDI CD-ROMドライブが存在しません"
|
||||
|
||||
msgid "Custom..."
|
||||
msgstr "カスタム..."
|
||||
|
||||
msgid "Custom (large)..."
|
||||
msgstr "カスタム (大型)..."
|
||||
msgstr "カスタム (大容量)..."
|
||||
|
||||
msgid "Add New Hard Disk"
|
||||
msgstr "新規のディスクを追加"
|
||||
@@ -1181,7 +1181,7 @@ msgid "5.25\" 1.3 GB"
|
||||
msgstr "5.25\" 1.3 GB"
|
||||
|
||||
msgid "Perfect RPM"
|
||||
msgstr "規定のRPM"
|
||||
msgstr "既定RPM"
|
||||
|
||||
msgid "1% below perfect RPM"
|
||||
msgstr "1%低いRPM"
|
||||
|
||||
@@ -1388,31 +1388,36 @@ t128_read(uint32_t addr, void *priv)
|
||||
uint8_t ret = 0xff;
|
||||
|
||||
addr &= 0x3fff;
|
||||
if (addr >= 0 && addr < 0x1800)
|
||||
if (ncr_dev->t128.bios_enabled && (addr >= 0) && (addr < 0x1800))
|
||||
ret = ncr_dev->bios_rom.rom[addr & 0x1fff];
|
||||
else if (addr >= 0x1800 && addr < 0x1880)
|
||||
else if ((addr >= 0x1800) && (addr < 0x1880))
|
||||
ret = ncr_dev->t128.ext_ram[addr & 0x7f];
|
||||
else if (addr >= 0x1c00 && addr < 0x1c20) {
|
||||
else if ((addr >= 0x1c00) && (addr < 0x1c20))
|
||||
ret = ncr_dev->t128.ctrl;
|
||||
} else if (addr >= 0x1c20 && addr < 0x1c40) {
|
||||
else if ((addr >= 0x1c20) && (addr < 0x1c40)) {
|
||||
ret = ncr_dev->t128.status;
|
||||
ncr_log("T128 status read = %02x, cur bus = %02x, req = %02x, dma = %02x\n", ret, ncr->cur_bus, ncr->cur_bus & BUS_REQ, ncr->mode & MODE_DMA);
|
||||
} else if (addr >= 0x1d00 && addr < 0x1e00) {
|
||||
ncr_log("T128 status read = %02x, cur bus = %02x, req = %02x, dma = %02x\n",
|
||||
ret, ncr->cur_bus, ncr->cur_bus & BUS_REQ, ncr->mode & MODE_DMA);
|
||||
} else if ((addr >= 0x1d00) && (addr < 0x1e00))
|
||||
ret = ncr_read((addr - 0x1d00) >> 5, ncr_dev);
|
||||
} else if (addr >= 0x1e00 && addr < 0x2000) {
|
||||
if (ncr_dev->t128.host_pos >= MIN(512, dev->buffer_length) || ncr->dma_mode != DMA_INITIATOR_RECEIVE) {
|
||||
else if (addr >= 0x1e00 && addr < 0x2000) {
|
||||
if ((ncr_dev->t128.host_pos >= MIN(512, dev->buffer_length)) ||
|
||||
(ncr->dma_mode != DMA_INITIATOR_RECEIVE))
|
||||
ret = 0xff;
|
||||
} else {
|
||||
else {
|
||||
ret = ncr_dev->t128.buffer[ncr_dev->t128.host_pos++];
|
||||
|
||||
ncr_log("Read transfer, addr = %i, pos = %i\n", addr & 0x1ff, ncr_dev->t128.host_pos);
|
||||
ncr_log("Read transfer, addr = %i, pos = %i\n", addr & 0x1ff,
|
||||
ncr_dev->t128.host_pos);
|
||||
|
||||
if (ncr_dev->t128.host_pos == MIN(512, dev->buffer_length)) {
|
||||
ncr_dev->t128.status &= ~0x04;
|
||||
ncr_log("Transfer busy read, status = %02x, period = %lf\n", ncr_dev->t128.status, ncr_dev->period);
|
||||
ncr_log("Transfer busy read, status = %02x, period = %lf\n",
|
||||
ncr_dev->t128.status, ncr_dev->period);
|
||||
if (ncr_dev->period == 0.2 || ncr_dev->period == 0.02)
|
||||
timer_on_auto(&ncr_dev->timer, 40.2);
|
||||
} else if (ncr_dev->t128.host_pos < MIN(512, dev->buffer_length) && scsi_device_get_callback(dev) > 100.0)
|
||||
} else if ((ncr_dev->t128.host_pos < MIN(512, dev->buffer_length)) &&
|
||||
(scsi_device_get_callback(dev) > 100.0))
|
||||
cycles += 100; /*Needed to avoid timer de-syncing with transfers.*/
|
||||
}
|
||||
}
|
||||
@@ -1428,23 +1433,25 @@ t128_write(uint32_t addr, uint8_t val, void *priv)
|
||||
const scsi_device_t *dev = &scsi_devices[ncr_dev->bus][ncr->target_id];
|
||||
|
||||
addr &= 0x3fff;
|
||||
if (addr >= 0x1800 && addr < 0x1880)
|
||||
if ((addr >= 0x1800) && (addr < 0x1880))
|
||||
ncr_dev->t128.ext_ram[addr & 0x7f] = val;
|
||||
else if (addr >= 0x1c00 && addr < 0x1c20) {
|
||||
else if ((addr >= 0x1c00) && (addr < 0x1c20)) {
|
||||
if ((val & 0x02) && !(ncr_dev->t128.ctrl & 0x02)) {
|
||||
ncr_dev->t128.status |= 0x02;
|
||||
ncr_log("Timer fired\n");
|
||||
}
|
||||
ncr_dev->t128.ctrl = val;
|
||||
ncr_log("T128 ctrl write = %02x\n", val);
|
||||
} else if (addr >= 0x1d00 && addr < 0x1e00)
|
||||
} else if ((addr >= 0x1d00) && (addr < 0x1e00))
|
||||
ncr_write((addr - 0x1d00) >> 5, val, ncr_dev);
|
||||
else if (addr >= 0x1e00 && addr < 0x2000) {
|
||||
if (ncr_dev->t128.host_pos < MIN(512, dev->buffer_length) && ncr->dma_mode == DMA_SEND) {
|
||||
else if ((addr >= 0x1e00) && (addr < 0x2000)) {
|
||||
if ((ncr_dev->t128.host_pos < MIN(512, dev->buffer_length)) &&
|
||||
(ncr->dma_mode == DMA_SEND)) {
|
||||
ncr_dev->t128.buffer[ncr_dev->t128.host_pos] = val;
|
||||
ncr_dev->t128.host_pos++;
|
||||
|
||||
ncr_log("Write transfer, addr = %i, pos = %i, val = %02x\n", addr & 0x1ff, ncr_dev->t128.host_pos, val);
|
||||
ncr_log("Write transfer, addr = %i, pos = %i, val = %02x\n",
|
||||
addr & 0x1ff, ncr_dev->t128.host_pos, val);
|
||||
|
||||
if (ncr_dev->t128.host_pos == MIN(512, dev->buffer_length)) {
|
||||
ncr_dev->t128.status &= ~0x04;
|
||||
@@ -1605,8 +1612,9 @@ ncr_init(const device_t *info)
|
||||
ncr_dev->irq = device_get_config_int("irq");
|
||||
ncr_dev->t128.bios_enabled = device_get_config_int("boot");
|
||||
|
||||
rom_init(&ncr_dev->bios_rom, T128_ROM,
|
||||
ncr_dev->rom_addr, 0x4000, 0x3fff, 0, MEM_MAPPING_EXTERNAL);
|
||||
if (ncr_dev->t128.bios_enabled)
|
||||
rom_init(&ncr_dev->bios_rom, T128_ROM,
|
||||
ncr_dev->rom_addr, 0x4000, 0x3fff, 0, MEM_MAPPING_EXTERNAL);
|
||||
|
||||
mem_mapping_add(&ncr_dev->mapping, ncr_dev->rom_addr, 0x4000,
|
||||
t128_read, NULL, NULL,
|
||||
@@ -1644,6 +1652,9 @@ ncr_init(const device_t *info)
|
||||
} else {
|
||||
ncr_dev->t128.status = 0x04;
|
||||
ncr_dev->t128.host_pos = 512;
|
||||
|
||||
if (!ncr_dev->t128.bios_enabled)
|
||||
ncr_dev->t128.status |= 0x80;
|
||||
}
|
||||
timer_add(&ncr_dev->timer, ncr_callback, ncr_dev, 0);
|
||||
|
||||
@@ -1894,6 +1905,13 @@ static const device_config_t t128_config[] = {
|
||||
{ .description = "" }
|
||||
},
|
||||
},
|
||||
{
|
||||
.name = "boot",
|
||||
.description = "Enable Boot ROM",
|
||||
.type = CONFIG_BINARY,
|
||||
.default_string = "",
|
||||
.default_int = 1
|
||||
},
|
||||
{ .name = "", .description = "", .type = CONFIG_END }
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
#include <86box/fdc.h>
|
||||
#include <86box/sio.h>
|
||||
#include <86box/plat_unused.h>
|
||||
#include <86box/machine.h>
|
||||
|
||||
typedef struct pc87306_t {
|
||||
uint8_t tries;
|
||||
@@ -51,16 +52,32 @@ static void
|
||||
pc87306_gpio_write(uint16_t port, uint8_t val, void *priv)
|
||||
{
|
||||
pc87306_t *dev = (pc87306_t *) priv;
|
||||
uint32_t gpio = 0xffff0000;
|
||||
|
||||
dev->gpio[port & 1] = val;
|
||||
dev->gpio[port & 0x0001] = val;
|
||||
|
||||
if (port & 0x0001) {
|
||||
gpio |= ((uint32_t) val) << 8;
|
||||
gpio |= dev->gpio[0];
|
||||
} else {
|
||||
gpio |= ((uint32_t) dev->gpio[1]) << 8;
|
||||
gpio |= val;
|
||||
}
|
||||
|
||||
(void) machine_handle_gpio(1, gpio);
|
||||
}
|
||||
|
||||
uint8_t
|
||||
pc87306_gpio_read(uint16_t port, void *priv)
|
||||
{
|
||||
const pc87306_t *dev = (pc87306_t *) priv;
|
||||
uint32_t ret = machine_handle_gpio(0, 0xffffffff);
|
||||
|
||||
return dev->gpio[port & 1];
|
||||
if (port & 0x0001)
|
||||
ret = (ret >> 8) & 0xff;
|
||||
else
|
||||
ret &= 0xff;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -81,11 +98,11 @@ pc87306_gpio_init(pc87306_t *dev)
|
||||
|
||||
if (dev->gpioba != 0x0000) {
|
||||
if ((dev->regs[0x12]) & 0x10)
|
||||
io_sethandler(dev->regs[0x0f] << 2, 0x0001,
|
||||
io_sethandler(dev->gpioba, 0x0001,
|
||||
pc87306_gpio_read, NULL, NULL, pc87306_gpio_write, NULL, NULL, dev);
|
||||
|
||||
if ((dev->regs[0x12]) & 0x20)
|
||||
io_sethandler((dev->regs[0x0f] << 2) + 1, 0x0001,
|
||||
io_sethandler(dev->gpioba + 1, 0x0001,
|
||||
pc87306_gpio_read, NULL, NULL, pc87306_gpio_write, NULL, NULL, dev);
|
||||
}
|
||||
}
|
||||
@@ -236,8 +253,6 @@ pc87306_write(uint16_t port, uint8_t val, void *priv)
|
||||
if ((dev->cur_reg <= 28) && (dev->cur_reg != 8)) {
|
||||
if (dev->cur_reg == 0)
|
||||
val &= 0x5f;
|
||||
if (((dev->cur_reg == 0x0F) || (dev->cur_reg == 0x12)) && valxor)
|
||||
pc87306_gpio_remove(dev);
|
||||
dev->regs[dev->cur_reg] = val;
|
||||
} else
|
||||
return;
|
||||
@@ -248,7 +263,7 @@ pc87306_write(uint16_t port, uint8_t val, void *priv)
|
||||
}
|
||||
|
||||
switch (dev->cur_reg) {
|
||||
case 0:
|
||||
case 0x00:
|
||||
if (valxor & 1) {
|
||||
lpt1_remove();
|
||||
if ((val & 1) && !(dev->regs[2] & 1))
|
||||
@@ -270,7 +285,7 @@ pc87306_write(uint16_t port, uint8_t val, void *priv)
|
||||
fdc_set_base(dev->fdc, (val & 0x20) ? FDC_SECONDARY_ADDR : FDC_PRIMARY_ADDR);
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
case 0x01:
|
||||
if (valxor & 3) {
|
||||
lpt1_remove();
|
||||
if ((dev->regs[0] & 1) && !(dev->regs[2] & 1))
|
||||
@@ -287,7 +302,7 @@ pc87306_write(uint16_t port, uint8_t val, void *priv)
|
||||
serial_handler(dev, 1);
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
case 0x02:
|
||||
if (valxor & 1) {
|
||||
lpt1_remove();
|
||||
serial_remove(dev->uart[0]);
|
||||
@@ -311,23 +326,23 @@ pc87306_write(uint16_t port, uint8_t val, void *priv)
|
||||
lpt1_handler(dev);
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
case 0x04:
|
||||
if (valxor & 0x80)
|
||||
nvr_lock_set(0x00, 256, !!(val & 0x80), dev->nvr);
|
||||
break;
|
||||
case 5:
|
||||
case 0x05:
|
||||
if (valxor & 0x08)
|
||||
nvr_at_handler(!!(val & 0x08), 0x0070, dev->nvr);
|
||||
if (valxor & 0x20)
|
||||
nvr_bank_set(0, !!(val & 0x20), dev->nvr);
|
||||
break;
|
||||
case 9:
|
||||
case 0x09:
|
||||
if (valxor & 0x44) {
|
||||
fdc_update_enh_mode(dev->fdc, (val & 4) ? 1 : 0);
|
||||
fdc_update_densel_polarity(dev->fdc, (val & 0x40) ? 1 : 0);
|
||||
}
|
||||
break;
|
||||
case 0xF:
|
||||
case 0x0f:
|
||||
if (valxor)
|
||||
pc87306_gpio_handler(dev);
|
||||
break;
|
||||
@@ -394,7 +409,7 @@ pc87306_read(uint16_t port, void *priv)
|
||||
}
|
||||
|
||||
void
|
||||
pc87306_reset(void *priv)
|
||||
pc87306_reset_common(void *priv)
|
||||
{
|
||||
pc87306_t *dev = (pc87306_t *) priv;
|
||||
|
||||
@@ -411,9 +426,6 @@ pc87306_reset(void *priv)
|
||||
dev->regs[0x12] = 0x30;
|
||||
dev->regs[0x19] = 0xEF;
|
||||
|
||||
dev->gpio[0] = 0xff;
|
||||
dev->gpio[1] = 0xfb;
|
||||
|
||||
/*
|
||||
0 = 360 rpm @ 500 kbps for 3.5"
|
||||
1 = Default, 300 rpm @ 500, 300, 250, 1000 kbps for 3.5"
|
||||
@@ -432,6 +444,17 @@ pc87306_reset(void *priv)
|
||||
nvr_wp_set(0, 0, dev->nvr);
|
||||
}
|
||||
|
||||
void
|
||||
pc87306_reset(void *priv)
|
||||
{
|
||||
pc87306_t *dev = (pc87306_t *) priv;
|
||||
|
||||
pc87306_gpio_write(0x0000, 0xff, dev);
|
||||
pc87306_gpio_write(0x0001, 0xff, dev);
|
||||
|
||||
pc87306_reset_common(dev);
|
||||
}
|
||||
|
||||
static void
|
||||
pc87306_close(void *priv)
|
||||
{
|
||||
@@ -453,7 +476,9 @@ pc87306_init(UNUSED(const device_t *info))
|
||||
|
||||
dev->nvr = device_add(&at_mb_nvr_device);
|
||||
|
||||
pc87306_reset(dev);
|
||||
dev->gpio[0] = dev->gpio[1] = 0xff;
|
||||
|
||||
pc87306_reset_common(dev);
|
||||
|
||||
io_sethandler(0x02e, 0x0002,
|
||||
pc87306_read, NULL, NULL, pc87306_write, NULL, NULL, dev);
|
||||
|
||||
@@ -2172,7 +2172,7 @@ emu8k_init(emu8k_t *emu8k, uint16_t emu_addr, int onboard_ram)
|
||||
int c;
|
||||
double out;
|
||||
|
||||
fp = rom_fopen("roms/sound/awe32.raw", "rb");
|
||||
fp = rom_fopen("roms/sound/creative/awe32.raw", "rb");
|
||||
if (!fp)
|
||||
fatal("AWE32.RAW not found\n");
|
||||
|
||||
|
||||
@@ -98,7 +98,7 @@ public:
|
||||
memset(m_samples, 0, sizeof(m_samples));
|
||||
memset(m_oldsamples, 0, sizeof(m_oldsamples));
|
||||
m_rateratio = (samplerate << RSM_FRAC) / m_chip.sample_rate(m_clock);
|
||||
m_clock_us = 1000000 / (double) m_clock;
|
||||
m_clock_us = 1000000.0 / (double) m_clock;
|
||||
m_subtract[0] = 80.0;
|
||||
m_subtract[1] = 320.0;
|
||||
m_type = type;
|
||||
@@ -139,7 +139,7 @@ public:
|
||||
virtual void set_clock(uint32_t clock) override
|
||||
{
|
||||
m_clock = clock;
|
||||
m_clock_us = 1000000 / (double) m_clock;
|
||||
m_clock_us = 1000000.0 / (double) m_clock;
|
||||
m_rateratio = (m_samplerate << RSM_FRAC) / m_chip.sample_rate(m_clock);
|
||||
|
||||
ymfm_set_timer(0, m_duration_in_clocks[0]);
|
||||
@@ -150,9 +150,14 @@ public:
|
||||
{
|
||||
for (uint32_t i = 0; i < num_samples; i++) {
|
||||
m_chip.generate(&m_output);
|
||||
if(m_type == FM_YMF278B) {
|
||||
*data++ += m_output.data[4 % ChipType::OUTPUTS];
|
||||
*data++ += m_output.data[5 % ChipType::OUTPUTS];
|
||||
if ((m_type == FM_YMF278B) && (sizeof(m_output.data) > (4 * sizeof(int32_t)))) {
|
||||
if (ChipType::OUTPUTS == 1) {
|
||||
*data++ = m_output.data[4];
|
||||
*data++ = m_output.data[4];
|
||||
} else {
|
||||
*data++ = m_output.data[4];
|
||||
*data++ = m_output.data[5];
|
||||
}
|
||||
} else if (ChipType::OUTPUTS == 1) {
|
||||
*data++ = m_output.data[0];
|
||||
*data++ = m_output.data[0];
|
||||
@@ -170,9 +175,14 @@ public:
|
||||
m_oldsamples[0] = m_samples[0];
|
||||
m_oldsamples[1] = m_samples[1];
|
||||
m_chip.generate(&m_output);
|
||||
if(m_type == FM_YMF278B) {
|
||||
m_samples[0] += m_output.data[4 % ChipType::OUTPUTS];
|
||||
m_samples[1] += m_output.data[5 % ChipType::OUTPUTS];
|
||||
if ((m_type == FM_YMF278B) && (sizeof(m_output.data) > (4 * sizeof(int32_t)))) {
|
||||
if (ChipType::OUTPUTS == 1) {
|
||||
m_samples[0] = m_output.data[4];
|
||||
m_samples[1] = m_output.data[4];
|
||||
} else {
|
||||
m_samples[0] = m_output.data[4];
|
||||
m_samples[1] = m_output.data[5];
|
||||
}
|
||||
} else if (ChipType::OUTPUTS == 1) {
|
||||
m_samples[0] = m_output.data[0];
|
||||
m_samples[1] = m_output.data[0];
|
||||
@@ -312,11 +322,13 @@ ymfm_drv_init(const device_t *info)
|
||||
break;
|
||||
|
||||
case FM_YMF289B:
|
||||
fm = (YMFMChipBase *) new YMFMChip<ymfm::ymf289b>(33868800, FM_YMF289B, OPL_FREQ);
|
||||
/* According to the datasheet, we should be using 33868800, but YMFM appears
|
||||
to cheat and does it using the same values as the YMF262. */
|
||||
fm = (YMFMChipBase *) new YMFMChip<ymfm::ymf289b>(14318181, FM_YMF289B, OPL_FREQ);
|
||||
break;
|
||||
|
||||
case FM_YMF278B:
|
||||
fm = (YMFMChipBase *) new YMFMChip<ymfm::ymf278b>(33868800, FM_YMF278B, 48000);
|
||||
fm = (YMFMChipBase *) new YMFMChip<ymfm::ymf278b>(33868800, FM_YMF278B, OPL_FREQ);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -854,6 +854,15 @@ sb_ct1745_mixer_write(uint16_t addr, uint8_t val, void *priv)
|
||||
|
||||
case 0x84:
|
||||
/* MPU Control register, per the Linux source code. */
|
||||
/* Bits 2-1: MPU-401 address:
|
||||
0, 0 = 330h;
|
||||
0, 1 = Disabled;
|
||||
1, 0 = 300h;
|
||||
1, 1 = ???? (Reserved?)
|
||||
Bit 0: Gameport address:
|
||||
0, 0 = 200-207h;
|
||||
0, 1 = Disabled
|
||||
*/
|
||||
if (sb->mpu != NULL) {
|
||||
if ((val & 0x06) == 0x00)
|
||||
mpu401_change_addr(sb->mpu, 0x330);
|
||||
@@ -862,6 +871,12 @@ sb_ct1745_mixer_write(uint16_t addr, uint8_t val, void *priv)
|
||||
else if ((val & 0x06) == 0x02)
|
||||
mpu401_change_addr(sb->mpu, 0);
|
||||
}
|
||||
sb->gameport_addr = 0;
|
||||
gameport_remap(sb->gameport, 0);
|
||||
if (!(val & 0x01)) {
|
||||
sb->gameport_addr = 0x200;
|
||||
gameport_remap(sb->gameport, 0x200);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -1055,6 +1070,8 @@ sb_ct1745_mixer_read(uint16_t addr, void *priv)
|
||||
else
|
||||
ret = 0x06; /* Should never happen. */
|
||||
}
|
||||
if (!sb->gameport_addr)
|
||||
ret |= 0x01;
|
||||
break;
|
||||
|
||||
case 0x90:
|
||||
@@ -1375,6 +1392,45 @@ sb_16_reply_mca_write(int port, uint8_t val, void *priv)
|
||||
sb_dsp_setdma16(&sb->dsp, high_dma);
|
||||
}
|
||||
|
||||
void
|
||||
sb_vibra16s_onboard_relocate_base(uint16_t new_addr, void *priv)
|
||||
{
|
||||
sb_t *sb = (sb_t *) priv;
|
||||
uint16_t addr = sb->dsp.sb_addr;
|
||||
|
||||
io_removehandler(addr, 0x0004,
|
||||
sb->opl.read, NULL, NULL,
|
||||
sb->opl.write, NULL, NULL,
|
||||
sb->opl.priv);
|
||||
io_removehandler(addr + 8, 0x0002,
|
||||
sb->opl.read, NULL, NULL,
|
||||
sb->opl.write, NULL, NULL,
|
||||
sb->opl.priv);
|
||||
io_removehandler(addr + 4, 0x0002,
|
||||
sb_ct1745_mixer_read, NULL, NULL,
|
||||
sb_ct1745_mixer_write, NULL, NULL,
|
||||
sb);
|
||||
|
||||
sb_dsp_setaddr(&sb->dsp, 0);
|
||||
|
||||
addr = new_addr;
|
||||
|
||||
io_sethandler(addr, 0x0004,
|
||||
sb->opl.read, NULL, NULL,
|
||||
sb->opl.write, NULL, NULL,
|
||||
sb->opl.priv);
|
||||
io_sethandler(addr + 8, 0x0002,
|
||||
sb->opl.read, NULL, NULL,
|
||||
sb->opl.write, NULL, NULL,
|
||||
sb->opl.priv);
|
||||
io_sethandler(addr + 4, 0x0002,
|
||||
sb_ct1745_mixer_read, NULL, NULL,
|
||||
sb_ct1745_mixer_write, NULL, NULL,
|
||||
sb);
|
||||
|
||||
sb_dsp_setaddr(&sb->dsp, addr);
|
||||
}
|
||||
|
||||
static void
|
||||
sb_16_pnp_config_changed(uint8_t ld, isapnp_device_config_t *config, void *priv)
|
||||
{
|
||||
@@ -1481,6 +1537,100 @@ sb_16_pnp_config_changed(uint8_t ld, isapnp_device_config_t *config, void *priv)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
sb_vibra16_pnp_config_changed(uint8_t ld, isapnp_device_config_t *config, void *priv)
|
||||
{
|
||||
sb_t *sb = (sb_t *) priv;
|
||||
uint16_t addr = sb->dsp.sb_addr;
|
||||
uint8_t val;
|
||||
|
||||
switch (ld) {
|
||||
case 0: /* Audio */
|
||||
io_removehandler(addr, 0x0004,
|
||||
sb->opl.read, NULL, NULL,
|
||||
sb->opl.write, NULL, NULL,
|
||||
sb->opl.priv);
|
||||
io_removehandler(addr + 8, 0x0002,
|
||||
sb->opl.read, NULL, NULL,
|
||||
sb->opl.write, NULL, NULL,
|
||||
sb->opl.priv);
|
||||
io_removehandler(addr + 4, 0x0002,
|
||||
sb_ct1745_mixer_read, NULL, NULL,
|
||||
sb_ct1745_mixer_write, NULL, NULL,
|
||||
sb);
|
||||
|
||||
addr = sb->opl_pnp_addr;
|
||||
if (addr) {
|
||||
sb->opl_pnp_addr = 0;
|
||||
io_removehandler(addr, 0x0004,
|
||||
sb->opl.read, NULL, NULL,
|
||||
sb->opl.write, NULL, NULL,
|
||||
sb->opl.priv);
|
||||
}
|
||||
|
||||
sb_dsp_setaddr(&sb->dsp, 0);
|
||||
sb_dsp_setirq(&sb->dsp, 0);
|
||||
sb_dsp_setdma8(&sb->dsp, ISAPNP_DMA_DISABLED);
|
||||
sb_dsp_setdma16(&sb->dsp, ISAPNP_DMA_DISABLED);
|
||||
|
||||
mpu401_change_addr(sb->mpu, 0);
|
||||
|
||||
if (config->activate) {
|
||||
addr = config->io[0].base;
|
||||
if (addr != ISAPNP_IO_DISABLED) {
|
||||
io_sethandler(addr, 0x0004,
|
||||
sb->opl.read, NULL, NULL,
|
||||
sb->opl.write, NULL, NULL,
|
||||
sb->opl.priv);
|
||||
io_sethandler(addr + 8, 0x0002,
|
||||
sb->opl.read, NULL, NULL,
|
||||
sb->opl.write, NULL, NULL,
|
||||
sb->opl.priv);
|
||||
io_sethandler(addr + 4, 0x0002,
|
||||
sb_ct1745_mixer_read, NULL, NULL,
|
||||
sb_ct1745_mixer_write, NULL, NULL,
|
||||
sb);
|
||||
|
||||
sb_dsp_setaddr(&sb->dsp, addr);
|
||||
}
|
||||
|
||||
addr = config->io[1].base;
|
||||
if (addr != ISAPNP_IO_DISABLED)
|
||||
mpu401_change_addr(sb->mpu, addr);
|
||||
|
||||
addr = config->io[2].base;
|
||||
if (addr != ISAPNP_IO_DISABLED) {
|
||||
sb->opl_pnp_addr = addr;
|
||||
io_sethandler(addr, 0x0004,
|
||||
sb->opl.read, NULL, NULL,
|
||||
sb->opl.write, NULL, NULL,
|
||||
sb->opl.priv);
|
||||
}
|
||||
|
||||
val = config->irq[0].irq;
|
||||
if (val != ISAPNP_IRQ_DISABLED)
|
||||
sb_dsp_setirq(&sb->dsp, val);
|
||||
|
||||
val = config->dma[0].dma;
|
||||
if (val != ISAPNP_DMA_DISABLED)
|
||||
sb_dsp_setdma8(&sb->dsp, val);
|
||||
|
||||
val = config->dma[1].dma;
|
||||
if (val != ISAPNP_DMA_DISABLED)
|
||||
sb_dsp_setdma16(&sb->dsp, val);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 1: /* Game */
|
||||
gameport_remap(sb->gameport, (config->activate && (config->io[0].base != ISAPNP_IO_DISABLED)) ? config->io[0].base : 0);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
sb_awe32_pnp_config_changed(uint8_t ld, isapnp_device_config_t *config, void *priv)
|
||||
{
|
||||
@@ -1926,7 +2076,7 @@ sb_16_init(UNUSED(const device_t *info))
|
||||
|
||||
sb->opl_enabled = device_get_config_int("opl");
|
||||
if (sb->opl_enabled)
|
||||
fm_driver_get(FM_YMF262, &sb->opl);
|
||||
fm_driver_get(info->local, &sb->opl);
|
||||
|
||||
sb_dsp_init(&sb->dsp, SB16, SB_SUBTYPE_DEFAULT, sb);
|
||||
sb_dsp_setaddr(&sb->dsp, addr);
|
||||
@@ -1968,6 +2118,9 @@ sb_16_init(UNUSED(const device_t *info))
|
||||
if (device_get_config_int("receive_input"))
|
||||
midi_in_handler(1, sb_dsp_input_msg, sb_dsp_input_sysex, &sb->dsp);
|
||||
|
||||
sb->gameport = gameport_add(&gameport_pnp_device);
|
||||
sb->gameport_addr = 0x200;
|
||||
|
||||
return sb;
|
||||
}
|
||||
|
||||
@@ -2003,6 +2156,8 @@ sb_16_reply_mca_init(UNUSED(const device_t *info))
|
||||
sb->pos_regs[0] = 0x38;
|
||||
sb->pos_regs[1] = 0x51;
|
||||
|
||||
sb->gameport_addr = 0x200;
|
||||
|
||||
return sb;
|
||||
}
|
||||
|
||||
@@ -2045,6 +2200,94 @@ sb_16_pnp_init(UNUSED(const device_t *info))
|
||||
mpu401_change_addr(sb->mpu, 0);
|
||||
ide_remove_handlers(2);
|
||||
|
||||
sb->gameport_addr = 0;
|
||||
gameport_remap(sb->gameport, 0);
|
||||
|
||||
return sb;
|
||||
}
|
||||
|
||||
static int
|
||||
sb_vibra16xv_available(void)
|
||||
{
|
||||
return rom_present("roms/sound/creative/CT4170 PnP.BIN");
|
||||
}
|
||||
|
||||
static int
|
||||
sb_vibra16c_available(void)
|
||||
{
|
||||
return rom_present("roms/sound/creative/CT4180 PnP.BIN");
|
||||
}
|
||||
|
||||
static void *
|
||||
sb_vibra16_pnp_init(UNUSED(const device_t *info))
|
||||
{
|
||||
sb_t *sb = malloc(sizeof(sb_t));
|
||||
memset(sb, 0x00, sizeof(sb_t));
|
||||
|
||||
sb->opl_enabled = 1;
|
||||
fm_driver_get(FM_YMF262, &sb->opl);
|
||||
|
||||
sb_dsp_init(&sb->dsp, SB16, SB_SUBTYPE_DEFAULT, sb);
|
||||
sb_ct1745_mixer_reset(sb);
|
||||
|
||||
sb->mixer_enabled = 1;
|
||||
sb->mixer_sb16.output_filter = 1;
|
||||
sound_add_handler(sb_get_buffer_sb16_awe32, sb);
|
||||
sound_set_cd_audio_filter(sb16_awe32_filter_cd_audio, sb);
|
||||
|
||||
sb->mpu = (mpu_t *) malloc(sizeof(mpu_t));
|
||||
memset(sb->mpu, 0, sizeof(mpu_t));
|
||||
mpu401_init(sb->mpu, 0, 0, M_UART, device_get_config_int("receive_input401"));
|
||||
sb_dsp_set_mpu(&sb->dsp, sb->mpu);
|
||||
|
||||
if (device_get_config_int("receive_input"))
|
||||
midi_in_handler(1, sb_dsp_input_msg, sb_dsp_input_sysex, &sb->dsp);
|
||||
|
||||
sb->gameport = gameport_add(&gameport_pnp_device);
|
||||
|
||||
const char *pnp_rom_file = NULL;
|
||||
switch (info->local) {
|
||||
case 0:
|
||||
pnp_rom_file = "roms/sound/creative/CT4170 PnP.BIN";
|
||||
break;
|
||||
|
||||
case 1:
|
||||
pnp_rom_file = "roms/sound/creative/CT4180 PnP.BIN";
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
uint8_t *pnp_rom = NULL;
|
||||
if (pnp_rom_file) {
|
||||
FILE *fp = rom_fopen(pnp_rom_file, "rb");
|
||||
if (fp) {
|
||||
if (fread(sb->pnp_rom, 1, 512, fp) == 512)
|
||||
pnp_rom = sb->pnp_rom;
|
||||
fclose(fp);
|
||||
}
|
||||
}
|
||||
|
||||
switch (info->local) {
|
||||
case 0:
|
||||
case 1:
|
||||
isapnp_add_card(pnp_rom, sizeof(sb->pnp_rom), sb_vibra16_pnp_config_changed,
|
||||
NULL, NULL, NULL, sb);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
sb_dsp_setaddr(&sb->dsp, 0);
|
||||
sb_dsp_setirq(&sb->dsp, 0);
|
||||
sb_dsp_setdma8(&sb->dsp, ISAPNP_DMA_DISABLED);
|
||||
sb_dsp_setdma16(&sb->dsp, ISAPNP_DMA_DISABLED);
|
||||
|
||||
mpu401_change_addr(sb->mpu, 0);
|
||||
|
||||
sb->gameport_addr = 0;
|
||||
gameport_remap(sb->gameport, 0);
|
||||
|
||||
return sb;
|
||||
@@ -2069,43 +2312,46 @@ sb_16_compat_init(const device_t *info)
|
||||
mpu401_init(sb->mpu, 0, 0, M_UART, info->local);
|
||||
sb_dsp_set_mpu(&sb->dsp, sb->mpu);
|
||||
|
||||
sb->gameport = gameport_add(&gameport_pnp_device);
|
||||
sb->gameport_addr = 0x200;
|
||||
|
||||
return sb;
|
||||
}
|
||||
|
||||
static int
|
||||
sb_awe32_available(void)
|
||||
{
|
||||
return rom_present("roms/sound/awe32.raw");
|
||||
return rom_present("roms/sound/creative/awe32.raw");
|
||||
}
|
||||
|
||||
static int
|
||||
sb_32_pnp_available(void)
|
||||
{
|
||||
return sb_awe32_available() && rom_present("roms/sound/CT3600 PnP.BIN");
|
||||
return sb_awe32_available() && rom_present("roms/sound/creative/CT3600 PnP.BIN");
|
||||
}
|
||||
|
||||
static int
|
||||
sb_awe32_pnp_available(void)
|
||||
{
|
||||
return sb_awe32_available() && rom_present("roms/sound/CT3980 PnP.BIN");
|
||||
return sb_awe32_available() && rom_present("roms/sound/creative/CT3980 PnP.BIN");
|
||||
}
|
||||
|
||||
static int
|
||||
sb_awe64_value_available(void)
|
||||
{
|
||||
return sb_awe32_available() && rom_present("roms/sound/CT4520 PnP.BIN");
|
||||
return sb_awe32_available() && rom_present("roms/sound/creative/CT4520 PnP.BIN");
|
||||
}
|
||||
|
||||
static int
|
||||
sb_awe64_available(void)
|
||||
{
|
||||
return sb_awe32_available() && rom_present("roms/sound/CT4520 PnP.BIN");
|
||||
return sb_awe32_available() && rom_present("roms/sound/creative/CT4520 PnP.BIN");
|
||||
}
|
||||
|
||||
static int
|
||||
sb_awe64_gold_available(void)
|
||||
{
|
||||
return sb_awe32_available() && rom_present("roms/sound/CT4540 PnP.BIN");
|
||||
return sb_awe32_available() && rom_present("roms/sound/creative/CT4540 PnP.BIN");
|
||||
}
|
||||
|
||||
static void *
|
||||
@@ -2165,6 +2411,9 @@ sb_awe32_init(UNUSED(const device_t *info))
|
||||
if (device_get_config_int("receive_input"))
|
||||
midi_in_handler(1, sb_dsp_input_msg, sb_dsp_input_sysex, &sb->dsp);
|
||||
|
||||
sb->gameport = gameport_add(&gameport_pnp_device);
|
||||
sb->gameport_addr = 0x200;
|
||||
|
||||
return sb;
|
||||
}
|
||||
|
||||
@@ -2205,20 +2454,20 @@ sb_awe32_pnp_init(const device_t *info)
|
||||
const char *pnp_rom_file = NULL;
|
||||
switch (info->local) {
|
||||
case 0:
|
||||
pnp_rom_file = "roms/sound/CT3600 PnP.BIN";
|
||||
pnp_rom_file = "roms/sound/creative/CT3600 PnP.BIN";
|
||||
break;
|
||||
|
||||
case 1:
|
||||
pnp_rom_file = "roms/sound/CT3980 PnP.BIN";
|
||||
pnp_rom_file = "roms/sound/creative/CT3980 PnP.BIN";
|
||||
break;
|
||||
|
||||
case 2:
|
||||
case 3:
|
||||
pnp_rom_file = "roms/sound/CT4520 PnP.BIN";
|
||||
pnp_rom_file = "roms/sound/creative/CT4520 PnP.BIN";
|
||||
break;
|
||||
|
||||
case 4:
|
||||
pnp_rom_file = "roms/sound/CT4540 PnP.BIN";
|
||||
pnp_rom_file = "roms/sound/creative/CT4540 PnP.BIN";
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -2264,6 +2513,8 @@ sb_awe32_pnp_init(const device_t *info)
|
||||
|
||||
emu8k_change_addr(&sb->emu8k, 0);
|
||||
|
||||
sb->gameport_addr = 0;
|
||||
|
||||
gameport_remap(sb->gameport, 0);
|
||||
|
||||
return sb;
|
||||
@@ -3599,7 +3850,7 @@ const device_t sb_16_device = {
|
||||
.name = "Sound Blaster 16",
|
||||
.internal_name = "sb16",
|
||||
.flags = DEVICE_ISA | DEVICE_AT,
|
||||
.local = 0,
|
||||
.local = FM_YMF262,
|
||||
.init = sb_16_init,
|
||||
.close = sb_close,
|
||||
.reset = NULL,
|
||||
@@ -3609,6 +3860,76 @@ const device_t sb_16_device = {
|
||||
.config = sb_16_config
|
||||
};
|
||||
|
||||
const device_t sb_vibra16s_onboard_device = {
|
||||
.name = "Sound Blaster ViBRA 16S (On-Board)",
|
||||
.internal_name = "sb_vibra16s_onboard",
|
||||
.flags = DEVICE_ISA | DEVICE_AT,
|
||||
.local = FM_YMF289B,
|
||||
.init = sb_16_init,
|
||||
.close = sb_close,
|
||||
.reset = NULL,
|
||||
{ .available = NULL },
|
||||
.speed_changed = sb_speed_changed,
|
||||
.force_redraw = NULL,
|
||||
.config = sb_16_config
|
||||
};
|
||||
|
||||
const device_t sb_vibra16s_device = {
|
||||
.name = "Sound Blaster ViBRA 16S",
|
||||
.internal_name = "sb_vibra16s",
|
||||
.flags = DEVICE_ISA | DEVICE_AT,
|
||||
.local = FM_YMF289B,
|
||||
.init = sb_16_init,
|
||||
.close = sb_close,
|
||||
.reset = NULL,
|
||||
{ .available = NULL },
|
||||
.speed_changed = sb_speed_changed,
|
||||
.force_redraw = NULL,
|
||||
.config = sb_16_config
|
||||
};
|
||||
|
||||
const device_t sb_vibra16xv_device = {
|
||||
.name = "Sound Blaster ViBRA 16XV",
|
||||
.internal_name = "sb_vibra16xv",
|
||||
.flags = DEVICE_ISA | DEVICE_AT,
|
||||
.local = 0,
|
||||
.init = sb_vibra16_pnp_init,
|
||||
.close = sb_close,
|
||||
.reset = NULL,
|
||||
{ .available = sb_vibra16xv_available },
|
||||
.speed_changed = sb_speed_changed,
|
||||
.force_redraw = NULL,
|
||||
.config = sb_16_pnp_config
|
||||
};
|
||||
|
||||
const device_t sb_vibra16c_onboard_device = {
|
||||
.name = "Sound Blaster ViBRA 16C (On-Board)",
|
||||
.internal_name = "sb_vibra16c_onboard",
|
||||
.flags = DEVICE_ISA | DEVICE_AT,
|
||||
.local = 1,
|
||||
.init = sb_vibra16_pnp_init,
|
||||
.close = sb_close,
|
||||
.reset = NULL,
|
||||
{ .available = sb_vibra16c_available },
|
||||
.speed_changed = sb_speed_changed,
|
||||
.force_redraw = NULL,
|
||||
.config = sb_16_pnp_config
|
||||
};
|
||||
|
||||
const device_t sb_vibra16c_device = {
|
||||
.name = "Sound Blaster ViBRA 16C",
|
||||
.internal_name = "sb_vibra16c",
|
||||
.flags = DEVICE_ISA | DEVICE_AT,
|
||||
.local = 1,
|
||||
.init = sb_vibra16_pnp_init,
|
||||
.close = sb_close,
|
||||
.reset = NULL,
|
||||
{ .available = sb_vibra16c_available },
|
||||
.speed_changed = sb_speed_changed,
|
||||
.force_redraw = NULL,
|
||||
.config = sb_16_pnp_config
|
||||
};
|
||||
|
||||
const device_t sb_16_reply_mca_device = {
|
||||
.name = "Sound Blaster 16 Reply MCA",
|
||||
.internal_name = "sb16_reply_mca",
|
||||
|
||||
@@ -134,6 +134,9 @@ static const SOUND_CARD sound_cards[] = {
|
||||
{ &sb_awe64_value_device },
|
||||
{ &sb_awe64_device },
|
||||
{ &sb_awe64_gold_device },
|
||||
{ &sb_vibra16c_device },
|
||||
{ &sb_vibra16s_device },
|
||||
{ &sb_vibra16xv_device },
|
||||
{ &ssi2001_device },
|
||||
#if defined(DEV_BRANCH) && defined(USE_PAS16)
|
||||
{ &pas16_device },
|
||||
@@ -219,7 +222,7 @@ sound_card_get_from_internal_name(const char *s)
|
||||
void
|
||||
sound_card_init(void)
|
||||
{
|
||||
if (sound_cards[sound_card_current[0]].device)
|
||||
if ((sound_card_current[0] != SOUND_INTERNAL) && (sound_cards[sound_card_current[0]].device))
|
||||
device_add(sound_cards[sound_card_current[0]].device);
|
||||
if (sound_cards[sound_card_current[1]].device)
|
||||
device_add(sound_cards[sound_card_current[1]].device);
|
||||
@@ -512,14 +515,14 @@ sound_reset(void)
|
||||
filter_cd_audio_p = NULL;
|
||||
|
||||
sound_set_cd_volume(65535, 65535);
|
||||
|
||||
/* Reset the MPU-401 already loaded flag and the chain of input/output handlers. */
|
||||
midi_in_handlers_clear();
|
||||
}
|
||||
|
||||
void
|
||||
sound_card_reset(void)
|
||||
{
|
||||
/* Reset the MPU-401 already loaded flag and the chain of input/output handlers. */
|
||||
midi_in_handlers_clear();
|
||||
|
||||
sound_card_init();
|
||||
|
||||
if (mpu401_standalone_enable)
|
||||
|
||||
@@ -1523,7 +1523,7 @@ void fm_engine_base<RegisterType>::engine_timer_expired(uint32_t tnum)
|
||||
}
|
||||
|
||||
// Make sure the array does not go out of bounds to keep gcc happy
|
||||
if(tnum < 2) {
|
||||
if ((tnum < 2) || (sizeof(m_timer_running) > (2 * sizeof(uint8_t)))) {
|
||||
// reset
|
||||
m_timer_running[tnum] = false;
|
||||
}
|
||||
|
||||
@@ -12,10 +12,10 @@
|
||||
# After a successful build, you can install the RPMs as follows:
|
||||
# sudo dnf install RPMS/$(uname -m)/86Box-3* RPMS/noarch/86Box-roms*
|
||||
|
||||
%global romver 4.0
|
||||
%global romver 4.0.1
|
||||
|
||||
Name: 86Box
|
||||
Version: 4.0
|
||||
Version: 4.0.1
|
||||
Release: 1%{?dist}
|
||||
Summary: Classic PC emulator
|
||||
License: GPLv2+
|
||||
@@ -121,5 +121,5 @@ popd
|
||||
%{_datadir}/%{name}/roms
|
||||
|
||||
%changelog
|
||||
* Sat Aug 26 2023 Robert de Rooy <robert.de.rooy[AT]gmail.com> 4.0-1
|
||||
* Thu Oct 12 2023 Robert de Rooy <robert.de.rooy[AT]gmail.com> 4.0.1-1
|
||||
- Bump release
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
</categories>
|
||||
<launchable type="desktop-id">net.86box.86Box.desktop</launchable>
|
||||
<releases>
|
||||
<release version="4.0" date="2023-02-28"/>
|
||||
<release version="4.0.1" date="2023-10-12"/>
|
||||
</releases>
|
||||
<content_rating type="oars-1.1" />
|
||||
<description>
|
||||
|
||||
@@ -34,6 +34,8 @@
|
||||
#include <86box/plat.h>
|
||||
#include <86box/thread.h>
|
||||
#include <86box/video.h>
|
||||
#include <86box/vid_8514a.h>
|
||||
#include <86box/vid_xga.h>
|
||||
#include <86box/vid_svga.h>
|
||||
#include <86box/vid_svga_render.h>
|
||||
#include "cpu.h"
|
||||
@@ -193,7 +195,7 @@ int ibm8514_active = 0;
|
||||
int
|
||||
ibm8514_cpu_src(svga_t *svga)
|
||||
{
|
||||
const ibm8514_t *dev = &svga->dev8514;
|
||||
const ibm8514_t *dev = (ibm8514_t *) svga->dev8514;
|
||||
|
||||
if (!(dev->accel.cmd & 0x100))
|
||||
return 0;
|
||||
@@ -207,7 +209,7 @@ ibm8514_cpu_src(svga_t *svga)
|
||||
int
|
||||
ibm8514_cpu_dest(svga_t *svga)
|
||||
{
|
||||
const ibm8514_t *dev = &svga->dev8514;
|
||||
const ibm8514_t *dev = (ibm8514_t *) svga->dev8514;
|
||||
|
||||
if (!(dev->accel.cmd & 0x100))
|
||||
return 0;
|
||||
@@ -221,7 +223,7 @@ ibm8514_cpu_dest(svga_t *svga)
|
||||
void
|
||||
ibm8514_accel_out_pixtrans(svga_t *svga, UNUSED(uint16_t port), uint16_t val, int len)
|
||||
{
|
||||
ibm8514_t *dev = &svga->dev8514;
|
||||
ibm8514_t *dev = (ibm8514_t *) svga->dev8514;
|
||||
uint8_t nibble = 0;
|
||||
uint32_t pixelxfer = 0;
|
||||
uint32_t monoxfer = 0xffffffff;
|
||||
@@ -443,7 +445,7 @@ regular_nibble:
|
||||
static void
|
||||
ibm8514_accel_out_fifo(svga_t *svga, uint16_t port, uint32_t val, int len)
|
||||
{
|
||||
ibm8514_t *dev = &svga->dev8514;
|
||||
ibm8514_t *dev = (ibm8514_t *) svga->dev8514;
|
||||
|
||||
switch (port) {
|
||||
case 0x82e8:
|
||||
@@ -845,7 +847,7 @@ ibm8514_io_set(svga_t *svga)
|
||||
static void
|
||||
ibm8514_accel_out(uint16_t port, uint32_t val, svga_t *svga, int len)
|
||||
{
|
||||
ibm8514_t *dev = &svga->dev8514;
|
||||
ibm8514_t *dev = (ibm8514_t *) svga->dev8514;
|
||||
|
||||
if (port & 0x8000) {
|
||||
ibm8514_accel_out_fifo(svga, port, val, len);
|
||||
@@ -993,7 +995,7 @@ ibm8514_accel_outw(uint16_t port, uint16_t val, void *priv)
|
||||
static uint32_t
|
||||
ibm8514_accel_in(uint16_t port, svga_t *svga, int len)
|
||||
{
|
||||
ibm8514_t *dev = &svga->dev8514;
|
||||
ibm8514_t *dev = (ibm8514_t *) svga->dev8514;
|
||||
uint32_t temp = 0;
|
||||
int cmd;
|
||||
int vpos = 0;
|
||||
@@ -1138,7 +1140,7 @@ ibm8514_accel_inw(uint16_t port, void *priv)
|
||||
void
|
||||
ibm8514_short_stroke_start(int count, int cpu_input, uint32_t mix_dat, uint32_t cpu_dat, svga_t *svga, uint8_t ssv, int len)
|
||||
{
|
||||
ibm8514_t *dev = &svga->dev8514;
|
||||
ibm8514_t *dev = (ibm8514_t *) svga->dev8514;
|
||||
|
||||
if (!cpu_input) {
|
||||
dev->accel.ssv_len = ssv & 0x0f;
|
||||
@@ -1156,7 +1158,7 @@ ibm8514_short_stroke_start(int count, int cpu_input, uint32_t mix_dat, uint32_t
|
||||
void
|
||||
ibm8514_accel_start(int count, int cpu_input, uint32_t mix_dat, uint32_t cpu_dat, svga_t *svga, UNUSED(int len))
|
||||
{
|
||||
ibm8514_t *dev = &svga->dev8514;
|
||||
ibm8514_t *dev = (ibm8514_t *) svga->dev8514;
|
||||
uint16_t *vram_w = (uint16_t *) dev->vram;
|
||||
uint16_t src_dat = 0;
|
||||
uint16_t dest_dat;
|
||||
@@ -3817,7 +3819,7 @@ bitblt:
|
||||
void
|
||||
ibm8514_render_8bpp(svga_t *svga)
|
||||
{
|
||||
ibm8514_t *dev = &svga->dev8514;
|
||||
ibm8514_t *dev = (ibm8514_t *) svga->dev8514;
|
||||
uint32_t *p;
|
||||
uint32_t dat;
|
||||
|
||||
@@ -3855,7 +3857,7 @@ ibm8514_render_8bpp(svga_t *svga)
|
||||
void
|
||||
ibm8514_render_15bpp(svga_t *svga)
|
||||
{
|
||||
ibm8514_t *dev = &svga->dev8514;
|
||||
ibm8514_t *dev = (ibm8514_t *) svga->dev8514;
|
||||
int x;
|
||||
uint32_t *p;
|
||||
uint32_t dat;
|
||||
@@ -3896,7 +3898,7 @@ ibm8514_render_15bpp(svga_t *svga)
|
||||
void
|
||||
ibm8514_render_16bpp(svga_t *svga)
|
||||
{
|
||||
ibm8514_t *dev = &svga->dev8514;
|
||||
ibm8514_t *dev = (ibm8514_t *) svga->dev8514;
|
||||
int x;
|
||||
uint32_t *p;
|
||||
uint32_t dat;
|
||||
@@ -3937,7 +3939,7 @@ ibm8514_render_16bpp(svga_t *svga)
|
||||
void
|
||||
ibm8514_render_24bpp(svga_t *svga)
|
||||
{
|
||||
ibm8514_t *dev = &svga->dev8514;
|
||||
ibm8514_t *dev = (ibm8514_t *) svga->dev8514;
|
||||
uint32_t *p;
|
||||
uint32_t dat;
|
||||
|
||||
@@ -3973,7 +3975,7 @@ ibm8514_render_24bpp(svga_t *svga)
|
||||
void
|
||||
ibm8514_render_BGR(svga_t *svga)
|
||||
{
|
||||
ibm8514_t *dev = &svga->dev8514;
|
||||
ibm8514_t *dev = (ibm8514_t *) svga->dev8514;
|
||||
uint32_t *p;
|
||||
uint32_t dat;
|
||||
|
||||
@@ -4009,7 +4011,7 @@ ibm8514_render_BGR(svga_t *svga)
|
||||
void
|
||||
ibm8514_render_ABGR8888(svga_t *svga)
|
||||
{
|
||||
ibm8514_t *dev = &svga->dev8514;
|
||||
ibm8514_t *dev = (ibm8514_t *) svga->dev8514;
|
||||
int x;
|
||||
uint32_t *p;
|
||||
uint32_t dat;
|
||||
@@ -4036,7 +4038,7 @@ ibm8514_render_ABGR8888(svga_t *svga)
|
||||
void
|
||||
ibm8514_render_RGBA8888(svga_t *svga)
|
||||
{
|
||||
ibm8514_t *dev = &svga->dev8514;
|
||||
ibm8514_t *dev = (ibm8514_t *) svga->dev8514;
|
||||
int x;
|
||||
uint32_t *p;
|
||||
uint32_t dat;
|
||||
@@ -4090,8 +4092,9 @@ ibm8514_render_overscan_right(ibm8514_t *dev, svga_t *svga)
|
||||
}
|
||||
|
||||
void
|
||||
ibm8514_poll(ibm8514_t *dev, svga_t *svga)
|
||||
ibm8514_poll(void *priv, svga_t *svga)
|
||||
{
|
||||
ibm8514_t *dev = (ibm8514_t *) priv;
|
||||
uint32_t x;
|
||||
int wx;
|
||||
int wy;
|
||||
@@ -4238,7 +4241,7 @@ ibm8514_poll(ibm8514_t *dev, svga_t *svga)
|
||||
void
|
||||
ibm8514_recalctimings(svga_t *svga)
|
||||
{
|
||||
ibm8514_t *dev = &svga->dev8514;
|
||||
ibm8514_t *dev = (ibm8514_t *) svga->dev8514;
|
||||
|
||||
if (dev->on) {
|
||||
dev->h_disp = (dev->hdisp + 1) << 3;
|
||||
@@ -4307,7 +4310,7 @@ static uint8_t
|
||||
ibm8514_mca_read(int port, void *priv)
|
||||
{
|
||||
const svga_t *svga = (svga_t *) priv;
|
||||
const ibm8514_t *dev = &svga->dev8514;
|
||||
const ibm8514_t *dev = (ibm8514_t *) svga->dev8514;
|
||||
|
||||
return (dev->pos_regs[port & 7]);
|
||||
}
|
||||
@@ -4316,7 +4319,7 @@ static void
|
||||
ibm8514_mca_write(int port, uint8_t val, void *priv)
|
||||
{
|
||||
svga_t *svga = (svga_t *) priv;
|
||||
ibm8514_t *dev = &svga->dev8514;
|
||||
ibm8514_t *dev = (ibm8514_t *) svga->dev8514;
|
||||
|
||||
/* MCA does not write registers below 0x0100. */
|
||||
if (port < 0x0102)
|
||||
@@ -4330,7 +4333,7 @@ static uint8_t
|
||||
ibm8514_mca_feedb(void *priv)
|
||||
{
|
||||
const svga_t *svga = (svga_t *) priv;
|
||||
const ibm8514_t *dev = &svga->dev8514;
|
||||
const ibm8514_t *dev = (ibm8514_t *) svga->dev8514;
|
||||
|
||||
return dev->pos_regs[2] & 1;
|
||||
}
|
||||
@@ -4341,8 +4344,10 @@ ibm8514_init(const device_t *info)
|
||||
if (svga_get_pri() == NULL)
|
||||
return NULL;
|
||||
|
||||
svga_t *svga = svga_get_pri();
|
||||
ibm8514_t *dev = &svga->dev8514;
|
||||
svga_t *svga = svga_get_pri();
|
||||
ibm8514_t *dev = (ibm8514_t *) calloc(1, sizeof(ibm8514_t));
|
||||
|
||||
svga->dev8514 = dev;
|
||||
|
||||
dev->vram_size = 1024 << 10;
|
||||
dev->vram = calloc(dev->vram_size, 1);
|
||||
@@ -4368,11 +4373,13 @@ static void
|
||||
ibm8514_close(void *priv)
|
||||
{
|
||||
svga_t *svga = (svga_t *) priv;
|
||||
ibm8514_t *dev = &svga->dev8514;
|
||||
ibm8514_t *dev = (ibm8514_t *) svga->dev8514;
|
||||
|
||||
if (dev) {
|
||||
free(dev->vram);
|
||||
free(dev->changedvram);
|
||||
|
||||
free(dev);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -46,6 +46,7 @@
|
||||
#include <86box/mem.h>
|
||||
#include <86box/timer.h>
|
||||
#include <86box/video.h>
|
||||
#include <86box/vid_8514a.h>
|
||||
#include <86box/vid_svga.h>
|
||||
#include <86box/vid_svga_render.h>
|
||||
#include <86box/plat_unused.h>
|
||||
@@ -68,20 +69,20 @@ void
|
||||
ati68860_ramdac_out(uint16_t addr, uint8_t val, void *priv, svga_t *svga)
|
||||
{
|
||||
ati68860_ramdac_t *ramdac = (ati68860_ramdac_t *) priv;
|
||||
const ibm8514_t *dev = &svga->dev8514;
|
||||
const ibm8514_t *dev = (ibm8514_t *) svga->dev8514;
|
||||
|
||||
switch (addr) {
|
||||
case 0:
|
||||
svga_out(dev->on ? 0x2ec : 0x3c8, val, svga);
|
||||
svga_out((dev && dev->on) ? 0x2ec : 0x3c8, val, svga);
|
||||
break;
|
||||
case 1:
|
||||
svga_out(dev->on ? 0x2ed : 0x3c9, val, svga);
|
||||
svga_out((dev && dev->on) ? 0x2ed : 0x3c9, val, svga);
|
||||
break;
|
||||
case 2:
|
||||
svga_out(dev->on ? 0x2ea : 0x3c6, val, svga);
|
||||
svga_out((dev && dev->on) ? 0x2ea : 0x3c6, val, svga);
|
||||
break;
|
||||
case 3:
|
||||
svga_out(dev->on ? 0x2eb : 0x3c7, val, svga);
|
||||
svga_out((dev && dev->on) ? 0x2eb : 0x3c7, val, svga);
|
||||
break;
|
||||
default:
|
||||
ramdac->regs[addr & 0xf] = val;
|
||||
@@ -172,21 +173,21 @@ uint8_t
|
||||
ati68860_ramdac_in(uint16_t addr, void *priv, svga_t *svga)
|
||||
{
|
||||
const ati68860_ramdac_t *ramdac = (ati68860_ramdac_t *) priv;
|
||||
const ibm8514_t *dev = &svga->dev8514;
|
||||
const ibm8514_t *dev = (ibm8514_t *) svga->dev8514;
|
||||
uint8_t temp = 0;
|
||||
|
||||
switch (addr) {
|
||||
case 0:
|
||||
temp = svga_in(dev->on ? 0x2ec : 0x3c8, svga);
|
||||
temp = svga_in((dev && dev->on) ? 0x2ec : 0x3c8, svga);
|
||||
break;
|
||||
case 1:
|
||||
temp = svga_in(dev->on ? 0x2ed : 0x3c9, svga);
|
||||
temp = svga_in((dev && dev->on) ? 0x2ed : 0x3c9, svga);
|
||||
break;
|
||||
case 2:
|
||||
temp = svga_in(dev->on ? 0x2ea : 0x3c6, svga);
|
||||
temp = svga_in((dev && dev->on) ? 0x2ea : 0x3c6, svga);
|
||||
break;
|
||||
case 3:
|
||||
temp = svga_in(dev->on ? 0x2eb : 0x3c7, svga);
|
||||
temp = svga_in((dev && dev->on) ? 0x2eb : 0x3c7, svga);
|
||||
break;
|
||||
case 4:
|
||||
case 8:
|
||||
|
||||
@@ -420,7 +420,7 @@ mach64_out(uint16_t addr, uint8_t val, void *priv)
|
||||
case 0x3C8:
|
||||
case 0x3C9:
|
||||
if (mach64->type == MACH64_GX)
|
||||
ati68860_ramdac_out((addr & 3) | ((mach64->dac_cntl & 3) << 2), val, mach64->svga.ramdac, svga);
|
||||
ati68860_ramdac_out((addr & 3) | ((mach64->dac_cntl & 3) << 2), val, svga->ramdac, svga);
|
||||
else
|
||||
svga_out(addr, val, svga);
|
||||
return;
|
||||
@@ -487,7 +487,7 @@ mach64_in(uint16_t addr, void *priv)
|
||||
case 0x3C8:
|
||||
case 0x3C9:
|
||||
if (mach64->type == MACH64_GX)
|
||||
return ati68860_ramdac_in((addr & 3) | ((mach64->dac_cntl & 3) << 2), mach64->svga.ramdac, svga);
|
||||
return ati68860_ramdac_in((addr & 3) | ((mach64->dac_cntl & 3) << 2), svga->ramdac, svga);
|
||||
return svga_in(addr, svga);
|
||||
|
||||
case 0x3D4:
|
||||
@@ -654,6 +654,7 @@ mach64_update_irqs(mach64_t *mach64)
|
||||
pci_clear_irq(mach64->pci_slot, PCI_INTA, &mach64->irq_state);
|
||||
}
|
||||
|
||||
#if 0
|
||||
static __inline void
|
||||
wake_fifo_thread(mach64_t *mach64)
|
||||
{
|
||||
@@ -668,6 +669,7 @@ mach64_wait_fifo_idle(mach64_t *mach64)
|
||||
thread_wait_event(mach64->fifo_not_full_event, 1);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#define READ8(addr, var) \
|
||||
switch ((addr) &3) { \
|
||||
@@ -1167,6 +1169,7 @@ mach64_accel_write_fifo_l(mach64_t *mach64, uint32_t addr, uint32_t val)
|
||||
}
|
||||
}
|
||||
|
||||
#if 0
|
||||
static void
|
||||
fifo_thread(void *param)
|
||||
{
|
||||
@@ -1230,6 +1233,7 @@ mach64_queue(mach64_t *mach64, uint32_t addr, uint32_t val, uint32_t type)
|
||||
if (FIFO_ENTRIES > 0xe000 || FIFO_ENTRIES < 8)
|
||||
wake_fifo_thread(mach64);
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
mach64_start_fill(mach64_t *mach64)
|
||||
@@ -2517,26 +2521,26 @@ mach64_ext_readb(uint32_t addr, void *priv)
|
||||
case 0x101:
|
||||
case 0x102:
|
||||
case 0x103:
|
||||
mach64_wait_fifo_idle(mach64);
|
||||
//mach64_wait_fifo_idle(mach64);
|
||||
READ8(addr, mach64->dst_off_pitch);
|
||||
break;
|
||||
case 0x104:
|
||||
case 0x105:
|
||||
mach64_wait_fifo_idle(mach64);
|
||||
//mach64_wait_fifo_idle(mach64);
|
||||
READ8(addr, mach64->dst_y_x);
|
||||
break;
|
||||
case 0x108:
|
||||
case 0x109:
|
||||
case 0x11c:
|
||||
case 0x11d:
|
||||
mach64_wait_fifo_idle(mach64);
|
||||
//mach64_wait_fifo_idle(mach64);
|
||||
READ8(addr + 2, mach64->dst_y_x);
|
||||
break;
|
||||
case 0x10c:
|
||||
case 0x10d:
|
||||
case 0x10e:
|
||||
case 0x10f:
|
||||
mach64_wait_fifo_idle(mach64);
|
||||
//mach64_wait_fifo_idle(mach64);
|
||||
READ8(addr, mach64->dst_y_x);
|
||||
break;
|
||||
case 0x110:
|
||||
@@ -2551,7 +2555,7 @@ mach64_ext_readb(uint32_t addr, void *priv)
|
||||
case 0x11b:
|
||||
case 0x11e:
|
||||
case 0x11f:
|
||||
mach64_wait_fifo_idle(mach64);
|
||||
//mach64_wait_fifo_idle(mach64);
|
||||
READ8(addr, mach64->dst_height_width);
|
||||
break;
|
||||
|
||||
@@ -2559,28 +2563,28 @@ mach64_ext_readb(uint32_t addr, void *priv)
|
||||
case 0x121:
|
||||
case 0x122:
|
||||
case 0x123:
|
||||
mach64_wait_fifo_idle(mach64);
|
||||
//mach64_wait_fifo_idle(mach64);
|
||||
READ8(addr, mach64->dst_bres_lnth);
|
||||
break;
|
||||
case 0x124:
|
||||
case 0x125:
|
||||
case 0x126:
|
||||
case 0x127:
|
||||
mach64_wait_fifo_idle(mach64);
|
||||
//mach64_wait_fifo_idle(mach64);
|
||||
READ8(addr, mach64->dst_bres_err);
|
||||
break;
|
||||
case 0x128:
|
||||
case 0x129:
|
||||
case 0x12a:
|
||||
case 0x12b:
|
||||
mach64_wait_fifo_idle(mach64);
|
||||
//mach64_wait_fifo_idle(mach64);
|
||||
READ8(addr, mach64->dst_bres_inc);
|
||||
break;
|
||||
case 0x12c:
|
||||
case 0x12d:
|
||||
case 0x12e:
|
||||
case 0x12f:
|
||||
mach64_wait_fifo_idle(mach64);
|
||||
//mach64_wait_fifo_idle(mach64);
|
||||
READ8(addr, mach64->dst_bres_dec);
|
||||
break;
|
||||
|
||||
@@ -2588,7 +2592,7 @@ mach64_ext_readb(uint32_t addr, void *priv)
|
||||
case 0x131:
|
||||
case 0x132:
|
||||
case 0x133:
|
||||
mach64_wait_fifo_idle(mach64);
|
||||
//mach64_wait_fifo_idle(mach64);
|
||||
READ8(addr, mach64->dst_cntl);
|
||||
break;
|
||||
|
||||
@@ -2596,75 +2600,75 @@ mach64_ext_readb(uint32_t addr, void *priv)
|
||||
case 0x181:
|
||||
case 0x182:
|
||||
case 0x183:
|
||||
mach64_wait_fifo_idle(mach64);
|
||||
//mach64_wait_fifo_idle(mach64);
|
||||
READ8(addr, mach64->src_off_pitch);
|
||||
break;
|
||||
case 0x184:
|
||||
case 0x185:
|
||||
mach64_wait_fifo_idle(mach64);
|
||||
//mach64_wait_fifo_idle(mach64);
|
||||
READ8(addr, mach64->src_y_x);
|
||||
break;
|
||||
case 0x188:
|
||||
case 0x189:
|
||||
mach64_wait_fifo_idle(mach64);
|
||||
//mach64_wait_fifo_idle(mach64);
|
||||
READ8(addr + 2, mach64->src_y_x);
|
||||
break;
|
||||
case 0x18c:
|
||||
case 0x18d:
|
||||
case 0x18e:
|
||||
case 0x18f:
|
||||
mach64_wait_fifo_idle(mach64);
|
||||
//mach64_wait_fifo_idle(mach64);
|
||||
READ8(addr, mach64->src_y_x);
|
||||
break;
|
||||
case 0x190:
|
||||
case 0x191:
|
||||
mach64_wait_fifo_idle(mach64);
|
||||
//mach64_wait_fifo_idle(mach64);
|
||||
READ8(addr + 2, mach64->src_height1_width1);
|
||||
break;
|
||||
case 0x194:
|
||||
case 0x195:
|
||||
mach64_wait_fifo_idle(mach64);
|
||||
//mach64_wait_fifo_idle(mach64);
|
||||
READ8(addr, mach64->src_height1_width1);
|
||||
break;
|
||||
case 0x198:
|
||||
case 0x199:
|
||||
case 0x19a:
|
||||
case 0x19b:
|
||||
mach64_wait_fifo_idle(mach64);
|
||||
//mach64_wait_fifo_idle(mach64);
|
||||
READ8(addr, mach64->src_height1_width1);
|
||||
break;
|
||||
case 0x19c:
|
||||
case 0x19d:
|
||||
mach64_wait_fifo_idle(mach64);
|
||||
//mach64_wait_fifo_idle(mach64);
|
||||
READ8(addr, mach64->src_y_x_start);
|
||||
break;
|
||||
case 0x1a0:
|
||||
case 0x1a1:
|
||||
mach64_wait_fifo_idle(mach64);
|
||||
//mach64_wait_fifo_idle(mach64);
|
||||
READ8(addr + 2, mach64->src_y_x_start);
|
||||
break;
|
||||
case 0x1a4:
|
||||
case 0x1a5:
|
||||
case 0x1a6:
|
||||
case 0x1a7:
|
||||
mach64_wait_fifo_idle(mach64);
|
||||
//mach64_wait_fifo_idle(mach64);
|
||||
READ8(addr, mach64->src_y_x_start);
|
||||
break;
|
||||
case 0x1a8:
|
||||
case 0x1a9:
|
||||
mach64_wait_fifo_idle(mach64);
|
||||
//mach64_wait_fifo_idle(mach64);
|
||||
READ8(addr + 2, mach64->src_height2_width2);
|
||||
break;
|
||||
case 0x1ac:
|
||||
case 0x1ad:
|
||||
mach64_wait_fifo_idle(mach64);
|
||||
//mach64_wait_fifo_idle(mach64);
|
||||
READ8(addr, mach64->src_height2_width2);
|
||||
break;
|
||||
case 0x1b0:
|
||||
case 0x1b1:
|
||||
case 0x1b2:
|
||||
case 0x1b3:
|
||||
mach64_wait_fifo_idle(mach64);
|
||||
//mach64_wait_fifo_idle(mach64);
|
||||
READ8(addr, mach64->src_height2_width2);
|
||||
break;
|
||||
|
||||
@@ -2672,7 +2676,7 @@ mach64_ext_readb(uint32_t addr, void *priv)
|
||||
case 0x1b5:
|
||||
case 0x1b6:
|
||||
case 0x1b7:
|
||||
mach64_wait_fifo_idle(mach64);
|
||||
//mach64_wait_fifo_idle(mach64);
|
||||
READ8(addr, mach64->src_cntl);
|
||||
break;
|
||||
|
||||
@@ -2680,7 +2684,7 @@ mach64_ext_readb(uint32_t addr, void *priv)
|
||||
case 0x241:
|
||||
case 0x242:
|
||||
case 0x243:
|
||||
mach64_wait_fifo_idle(mach64);
|
||||
//mach64_wait_fifo_idle(mach64);
|
||||
READ8(addr, mach64->host_cntl);
|
||||
break;
|
||||
|
||||
@@ -2688,14 +2692,14 @@ mach64_ext_readb(uint32_t addr, void *priv)
|
||||
case 0x281:
|
||||
case 0x282:
|
||||
case 0x283:
|
||||
mach64_wait_fifo_idle(mach64);
|
||||
//mach64_wait_fifo_idle(mach64);
|
||||
READ8(addr, mach64->pat_reg0);
|
||||
break;
|
||||
case 0x284:
|
||||
case 0x285:
|
||||
case 0x286:
|
||||
case 0x287:
|
||||
mach64_wait_fifo_idle(mach64);
|
||||
//mach64_wait_fifo_idle(mach64);
|
||||
READ8(addr, mach64->pat_reg1);
|
||||
break;
|
||||
|
||||
@@ -2703,7 +2707,7 @@ mach64_ext_readb(uint32_t addr, void *priv)
|
||||
case 0x289:
|
||||
case 0x28a:
|
||||
case 0x28b:
|
||||
mach64_wait_fifo_idle(mach64);
|
||||
//mach64_wait_fifo_idle(mach64);
|
||||
READ8(addr, mach64->pat_cntl);
|
||||
break;
|
||||
|
||||
@@ -2711,7 +2715,7 @@ mach64_ext_readb(uint32_t addr, void *priv)
|
||||
case 0x2a1:
|
||||
case 0x2a8:
|
||||
case 0x2a9:
|
||||
mach64_wait_fifo_idle(mach64);
|
||||
//mach64_wait_fifo_idle(mach64);
|
||||
READ8(addr, mach64->sc_left_right);
|
||||
break;
|
||||
case 0x2a4:
|
||||
@@ -2720,7 +2724,7 @@ mach64_ext_readb(uint32_t addr, void *priv)
|
||||
fallthrough;
|
||||
case 0x2aa:
|
||||
case 0x2ab:
|
||||
mach64_wait_fifo_idle(mach64);
|
||||
//mach64_wait_fifo_idle(mach64);
|
||||
READ8(addr, mach64->sc_left_right);
|
||||
break;
|
||||
|
||||
@@ -2728,7 +2732,7 @@ mach64_ext_readb(uint32_t addr, void *priv)
|
||||
case 0x2ad:
|
||||
case 0x2b4:
|
||||
case 0x2b5:
|
||||
mach64_wait_fifo_idle(mach64);
|
||||
//mach64_wait_fifo_idle(mach64);
|
||||
READ8(addr, mach64->sc_top_bottom);
|
||||
break;
|
||||
case 0x2b0:
|
||||
@@ -2737,7 +2741,7 @@ mach64_ext_readb(uint32_t addr, void *priv)
|
||||
fallthrough;
|
||||
case 0x2b6:
|
||||
case 0x2b7:
|
||||
mach64_wait_fifo_idle(mach64);
|
||||
//mach64_wait_fifo_idle(mach64);
|
||||
READ8(addr, mach64->sc_top_bottom);
|
||||
break;
|
||||
|
||||
@@ -2745,14 +2749,14 @@ mach64_ext_readb(uint32_t addr, void *priv)
|
||||
case 0x2c1:
|
||||
case 0x2c2:
|
||||
case 0x2c3:
|
||||
mach64_wait_fifo_idle(mach64);
|
||||
//mach64_wait_fifo_idle(mach64);
|
||||
READ8(addr, mach64->dp_bkgd_clr);
|
||||
break;
|
||||
case 0x2c4:
|
||||
case 0x2c5:
|
||||
case 0x2c6:
|
||||
case 0x2c7:
|
||||
mach64_wait_fifo_idle(mach64);
|
||||
//mach64_wait_fifo_idle(mach64);
|
||||
READ8(addr, mach64->dp_frgd_clr);
|
||||
break;
|
||||
|
||||
@@ -2760,7 +2764,7 @@ mach64_ext_readb(uint32_t addr, void *priv)
|
||||
case 0x2c9:
|
||||
case 0x2ca:
|
||||
case 0x2cb:
|
||||
mach64_wait_fifo_idle(mach64);
|
||||
//mach64_wait_fifo_idle(mach64);
|
||||
READ8(addr, mach64->write_mask);
|
||||
break;
|
||||
|
||||
@@ -2768,7 +2772,7 @@ mach64_ext_readb(uint32_t addr, void *priv)
|
||||
case 0x2cd:
|
||||
case 0x2ce:
|
||||
case 0x2cf:
|
||||
mach64_wait_fifo_idle(mach64);
|
||||
//mach64_wait_fifo_idle(mach64);
|
||||
READ8(addr, mach64->chain_mask);
|
||||
break;
|
||||
|
||||
@@ -2776,21 +2780,21 @@ mach64_ext_readb(uint32_t addr, void *priv)
|
||||
case 0x2d1:
|
||||
case 0x2d2:
|
||||
case 0x2d3:
|
||||
mach64_wait_fifo_idle(mach64);
|
||||
//mach64_wait_fifo_idle(mach64);
|
||||
READ8(addr, mach64->dp_pix_width);
|
||||
break;
|
||||
case 0x2d4:
|
||||
case 0x2d5:
|
||||
case 0x2d6:
|
||||
case 0x2d7:
|
||||
mach64_wait_fifo_idle(mach64);
|
||||
//mach64_wait_fifo_idle(mach64);
|
||||
READ8(addr, mach64->dp_mix);
|
||||
break;
|
||||
case 0x2d8:
|
||||
case 0x2d9:
|
||||
case 0x2da:
|
||||
case 0x2db:
|
||||
mach64_wait_fifo_idle(mach64);
|
||||
//mach64_wait_fifo_idle(mach64);
|
||||
READ8(addr, mach64->dp_src);
|
||||
break;
|
||||
|
||||
@@ -2798,64 +2802,53 @@ mach64_ext_readb(uint32_t addr, void *priv)
|
||||
case 0x301:
|
||||
case 0x302:
|
||||
case 0x303:
|
||||
mach64_wait_fifo_idle(mach64);
|
||||
//mach64_wait_fifo_idle(mach64);
|
||||
READ8(addr, mach64->clr_cmp_clr);
|
||||
break;
|
||||
case 0x304:
|
||||
case 0x305:
|
||||
case 0x306:
|
||||
case 0x307:
|
||||
mach64_wait_fifo_idle(mach64);
|
||||
//mach64_wait_fifo_idle(mach64);
|
||||
READ8(addr, mach64->clr_cmp_mask);
|
||||
break;
|
||||
case 0x308:
|
||||
case 0x309:
|
||||
case 0x30a:
|
||||
case 0x30b:
|
||||
mach64_wait_fifo_idle(mach64);
|
||||
//mach64_wait_fifo_idle(mach64);
|
||||
READ8(addr, mach64->clr_cmp_cntl);
|
||||
break;
|
||||
|
||||
case 0x310:
|
||||
case 0x311:
|
||||
if (((mach64->crtc_gen_cntl >> 8) & 7) == BPP_24) {
|
||||
ret = 0;
|
||||
} else {
|
||||
if (!FIFO_EMPTY)
|
||||
wake_fifo_thread(mach64);
|
||||
ret = 0;
|
||||
if (FIFO_FULL)
|
||||
ret = 0xff;
|
||||
}
|
||||
ret = 0;
|
||||
break;
|
||||
|
||||
case 0x320:
|
||||
case 0x321:
|
||||
case 0x322:
|
||||
case 0x323:
|
||||
mach64_wait_fifo_idle(mach64);
|
||||
//mach64_wait_fifo_idle(mach64);
|
||||
READ8(addr, mach64->context_mask);
|
||||
break;
|
||||
|
||||
case 0x330:
|
||||
case 0x331:
|
||||
mach64_wait_fifo_idle(mach64);
|
||||
//mach64_wait_fifo_idle(mach64);
|
||||
READ8(addr, mach64->dst_cntl);
|
||||
break;
|
||||
case 0x332:
|
||||
mach64_wait_fifo_idle(mach64);
|
||||
//mach64_wait_fifo_idle(mach64);
|
||||
READ8(addr - 2, mach64->src_cntl);
|
||||
break;
|
||||
case 0x333:
|
||||
mach64_wait_fifo_idle(mach64);
|
||||
//mach64_wait_fifo_idle(mach64);
|
||||
READ8(addr - 3, mach64->pat_cntl);
|
||||
break;
|
||||
|
||||
case 0x338:
|
||||
if (((mach64->crtc_gen_cntl >> 8) & 7) == BPP_24)
|
||||
ret = 0;
|
||||
else
|
||||
ret = FIFO_EMPTY ? 0 : 1;
|
||||
ret = 0;
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -3039,10 +3032,7 @@ mach64_ext_writeb(uint32_t addr, uint8_t val, void *priv)
|
||||
|
||||
mach64_log("nmach64_ext_writeb: addr=%04x val=%02x\n", addr, val);
|
||||
} else if (addr & 0x300) {
|
||||
if (((mach64->crtc_gen_cntl >> 8) & 7) == BPP_24)
|
||||
mach64_accel_write_fifo(mach64, addr & 0x3ff, val);
|
||||
else
|
||||
mach64_queue(mach64, addr & 0x3ff, val, FIFO_WRITE_BYTE);
|
||||
mach64_accel_write_fifo(mach64, addr & 0x3ff, val);
|
||||
} else
|
||||
switch (addr & 0x3ff) {
|
||||
case 0x00:
|
||||
@@ -3051,6 +3041,7 @@ mach64_ext_writeb(uint32_t addr, uint8_t val, void *priv)
|
||||
case 0x03:
|
||||
WRITE8(addr, mach64->crtc_h_total_disp, val);
|
||||
svga_recalctimings(&mach64->svga);
|
||||
svga->fullchange = svga->monitor->mon_changeframecount;
|
||||
break;
|
||||
case 0x08:
|
||||
case 0x09:
|
||||
@@ -3058,6 +3049,7 @@ mach64_ext_writeb(uint32_t addr, uint8_t val, void *priv)
|
||||
case 0x0b:
|
||||
WRITE8(addr, mach64->crtc_v_total_disp, val);
|
||||
svga_recalctimings(&mach64->svga);
|
||||
svga->fullchange = svga->monitor->mon_changeframecount;
|
||||
break;
|
||||
case 0x0c:
|
||||
case 0x0d:
|
||||
@@ -3065,6 +3057,7 @@ mach64_ext_writeb(uint32_t addr, uint8_t val, void *priv)
|
||||
case 0x0f:
|
||||
WRITE8(addr, mach64->crtc_v_sync_strt_wid, val);
|
||||
svga_recalctimings(&mach64->svga);
|
||||
svga->fullchange = svga->monitor->mon_changeframecount;
|
||||
break;
|
||||
|
||||
case 0x14:
|
||||
@@ -3094,6 +3087,7 @@ mach64_ext_writeb(uint32_t addr, uint8_t val, void *priv)
|
||||
svga->fb_only = 0;
|
||||
svga->dpms = !!(mach64->crtc_gen_cntl & 0x0c);
|
||||
svga_recalctimings(&mach64->svga);
|
||||
svga->fullchange = svga->monitor->mon_changeframecount;
|
||||
break;
|
||||
|
||||
case 0x40:
|
||||
@@ -3268,10 +3262,7 @@ mach64_ext_writew(uint32_t addr, uint16_t val, void *priv)
|
||||
mach64_ext_writeb(addr, val, priv);
|
||||
mach64_ext_writeb(addr + 1, val >> 8, priv);
|
||||
} else if (addr & 0x300) {
|
||||
if (((mach64->crtc_gen_cntl >> 8) & 7) == BPP_24)
|
||||
mach64_accel_write_fifo_w(mach64, addr & 0x3fe, val);
|
||||
else
|
||||
mach64_queue(mach64, addr & 0x3fe, val, FIFO_WRITE_WORD);
|
||||
mach64_accel_write_fifo_w(mach64, addr & 0x3fe, val);
|
||||
} else
|
||||
switch (addr & 0x3fe) {
|
||||
default:
|
||||
@@ -3292,10 +3283,7 @@ mach64_ext_writel(uint32_t addr, uint32_t val, void *priv)
|
||||
mach64_ext_writew(addr, val, priv);
|
||||
mach64_ext_writew(addr + 2, val >> 16, priv);
|
||||
} else if (addr & 0x300) {
|
||||
if (((mach64->crtc_gen_cntl >> 8) & 7) == BPP_24)
|
||||
mach64_accel_write_fifo_l(mach64, addr & 0x3fc, val);
|
||||
else
|
||||
mach64_queue(mach64, addr & 0x3fc, val, FIFO_WRITE_DWORD);
|
||||
mach64_accel_write_fifo_l(mach64, addr & 0x3fc, val);
|
||||
} else
|
||||
switch (addr & 0x3fc) {
|
||||
default:
|
||||
@@ -4382,20 +4370,23 @@ mach64_pci_write(UNUSED(int func), int addr, uint8_t val, void *priv)
|
||||
static void *
|
||||
mach64_common_init(const device_t *info)
|
||||
{
|
||||
svga_t *svga;
|
||||
mach64_t *mach64 = malloc(sizeof(mach64_t));
|
||||
memset(mach64, 0, sizeof(mach64_t));
|
||||
|
||||
svga = &mach64->svga;
|
||||
|
||||
mach64->vram_size = device_get_config_int("memory");
|
||||
mach64->vram_mask = (mach64->vram_size << 20) - 1;
|
||||
|
||||
svga_init(info, &mach64->svga, mach64, mach64->vram_size << 20,
|
||||
svga_init(info, svga, mach64, mach64->vram_size << 20,
|
||||
mach64_recalctimings,
|
||||
mach64_in, mach64_out,
|
||||
NULL,
|
||||
mach64_overlay_draw);
|
||||
mach64->svga.dac_hwcursor.cur_ysize = 64;
|
||||
svga->dac_hwcursor.cur_ysize = 64;
|
||||
|
||||
mem_mapping_add(&mach64->linear_mapping, 0, 0, svga_read_linear, svga_readw_linear, svga_readl_linear, svga_write_linear, svga_writew_linear, svga_writel_linear, NULL, MEM_MAPPING_EXTERNAL, &mach64->svga);
|
||||
mem_mapping_add(&mach64->linear_mapping, 0, 0, svga_read_linear, svga_readw_linear, svga_readl_linear, svga_write_linear, svga_writew_linear, svga_writel_linear, NULL, MEM_MAPPING_EXTERNAL, svga);
|
||||
mem_mapping_add(&mach64->mmio_linear_mapping, 0, 0, mach64_ext_readb, mach64_ext_readw, mach64_ext_readl, mach64_ext_writeb, mach64_ext_writew, mach64_ext_writel, NULL, MEM_MAPPING_EXTERNAL, mach64);
|
||||
mem_mapping_add(&mach64->mmio_linear_mapping_2, 0, 0, mach64_ext_readb, mach64_ext_readw, mach64_ext_readl, mach64_ext_writeb, mach64_ext_writew, mach64_ext_writel, NULL, MEM_MAPPING_EXTERNAL, mach64);
|
||||
mem_mapping_add(&mach64->mmio_mapping, 0xbc000, 0x04000, mach64_ext_readb, mach64_ext_readw, mach64_ext_readl, mach64_ext_writeb, mach64_ext_writew, mach64_ext_writel, NULL, MEM_MAPPING_EXTERNAL, mach64);
|
||||
@@ -4411,21 +4402,16 @@ mach64_common_init(const device_t *info)
|
||||
mach64->pci_regs[0x32] = 0x0c;
|
||||
mach64->pci_regs[0x33] = 0x00;
|
||||
|
||||
mach64->svga.ramdac = device_add(&ati68860_ramdac_device);
|
||||
mach64->svga.dac_hwcursor_draw = ati68860_hwcursor_draw;
|
||||
svga->ramdac = device_add(&ati68860_ramdac_device);
|
||||
svga->dac_hwcursor_draw = ati68860_hwcursor_draw;
|
||||
|
||||
mach64->svga.clock_gen = device_add(&ics2595_device);
|
||||
svga->clock_gen = device_add(&ics2595_device);
|
||||
|
||||
mach64->dst_cntl = 3;
|
||||
|
||||
mach64->i2c = i2c_gpio_init("ddc_ati_mach64");
|
||||
mach64->ddc = ddc_init(i2c_gpio_get_bus(mach64->i2c));
|
||||
|
||||
mach64->wake_fifo_thread = thread_create_event();
|
||||
mach64->fifo_not_full_event = thread_create_event();
|
||||
mach64->thread_run = 1;
|
||||
mach64->fifo_thread = thread_create(fifo_thread, mach64);
|
||||
|
||||
return mach64;
|
||||
}
|
||||
|
||||
@@ -4521,12 +4507,6 @@ mach64_close(void *priv)
|
||||
{
|
||||
mach64_t *mach64 = (mach64_t *) priv;
|
||||
|
||||
mach64->thread_run = 0;
|
||||
thread_set_event(mach64->wake_fifo_thread);
|
||||
thread_wait(mach64->fifo_thread);
|
||||
thread_destroy_event(mach64->fifo_not_full_event);
|
||||
thread_destroy_event(mach64->wake_fifo_thread);
|
||||
|
||||
svga_close(&mach64->svga);
|
||||
|
||||
ddc_close(mach64->ddc);
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
#include <86box/video.h>
|
||||
#include <86box/i2c.h>
|
||||
#include <86box/vid_ddc.h>
|
||||
#include <86box/vid_8514a.h>
|
||||
#include <86box/vid_svga.h>
|
||||
#include <86box/vid_svga_render.h>
|
||||
#include <86box/vid_ati_eeprom.h>
|
||||
@@ -100,6 +101,7 @@ typedef struct mach_t {
|
||||
uint8_t bank_r;
|
||||
uint16_t shadow_set;
|
||||
int ext_on;
|
||||
int ati_mode;
|
||||
|
||||
struct {
|
||||
uint8_t line_idx;
|
||||
@@ -2299,7 +2301,7 @@ mach_out(uint16_t addr, uint8_t val, void *priv)
|
||||
{
|
||||
mach_t *mach = (mach_t *) priv;
|
||||
svga_t *svga = &mach->svga;
|
||||
const ibm8514_t *dev = &svga->dev8514;
|
||||
const ibm8514_t *dev = (ibm8514_t *) svga->dev8514;
|
||||
uint8_t old;
|
||||
uint8_t rs2;
|
||||
uint8_t rs3;
|
||||
@@ -2472,7 +2474,7 @@ mach_in(uint16_t addr, void *priv)
|
||||
{
|
||||
mach_t *mach = (mach_t *) priv;
|
||||
svga_t *svga = &mach->svga;
|
||||
const ibm8514_t *dev = &svga->dev8514;
|
||||
const ibm8514_t *dev = (ibm8514_t *) svga->dev8514;
|
||||
uint8_t temp = 0xff;
|
||||
uint8_t rs2;
|
||||
uint8_t rs3;
|
||||
@@ -2569,7 +2571,7 @@ static void
|
||||
mach_recalctimings(svga_t *svga)
|
||||
{
|
||||
const mach_t *mach = (mach_t *) svga->priv;
|
||||
ibm8514_t *dev = &svga->dev8514;
|
||||
ibm8514_t *dev = (ibm8514_t *) svga->dev8514;
|
||||
int clock_sel;
|
||||
|
||||
clock_sel = ((svga->miscout >> 2) & 3) | ((mach->regs[0xbe] & 0x10) >> 1) | ((mach->regs[0xb9] & 2) << 1);
|
||||
@@ -3622,7 +3624,7 @@ static void
|
||||
mach_accel_out(uint16_t port, uint8_t val, mach_t *mach)
|
||||
{
|
||||
svga_t *svga = &mach->svga;
|
||||
ibm8514_t *dev = &svga->dev8514;
|
||||
ibm8514_t *dev = (ibm8514_t *) svga->dev8514;
|
||||
|
||||
mach_log("Port accel out = %04x, val = %04x.\n", port, val);
|
||||
|
||||
@@ -3706,6 +3708,7 @@ mach_accel_out(uint16_t port, uint8_t val, mach_t *mach)
|
||||
mach_log("ATI 8514/A: (0x4ae9) val = %04x, ext = %d.\n", dev->accel.advfunc_cntl & 0x01, mach->ext_on);
|
||||
mach32_updatemapping(mach);
|
||||
}
|
||||
mach->ati_mode = 0;
|
||||
svga_recalctimings(svga);
|
||||
break;
|
||||
|
||||
@@ -3831,9 +3834,11 @@ mach_accel_out(uint16_t port, uint8_t val, mach_t *mach)
|
||||
WRITE8(port, mach->accel.clock_sel, val);
|
||||
if (port & 1) {
|
||||
dev->on = mach->accel.clock_sel & 0x01;
|
||||
mach->ext_on = dev->on;
|
||||
vga_on = !dev->on;
|
||||
pclog("ATI 8514/A: (0x4aef) val = %04x, ext = %d.\n", mach->accel.clock_sel & 0x01, mach->ext_on);
|
||||
mach_log("ATI 8514/A: (0x4aef) val = %04x, ext = %d.\n", mach->accel.clock_sel & 0x01, mach->ext_on);
|
||||
}
|
||||
mach->ati_mode = 1;
|
||||
svga_recalctimings(svga);
|
||||
break;
|
||||
|
||||
@@ -3931,7 +3936,11 @@ mach_accel_out(uint16_t port, uint8_t val, mach_t *mach)
|
||||
break;
|
||||
}
|
||||
svga_set_ramdac_type(svga, !!(mach->accel.ext_ge_config & 0x4000));
|
||||
mach_log("7AEE write val = %04x.\n", mach->accel.ext_ge_config);
|
||||
if (port & 1) {
|
||||
mach->ati_mode = 1;
|
||||
mach_log("ATI 8514/A: (0x%04x) val = %04x.\n", port, val);
|
||||
mach32_updatemapping(mach);
|
||||
}
|
||||
}
|
||||
svga_recalctimings(svga);
|
||||
break;
|
||||
@@ -4349,7 +4358,7 @@ static uint8_t
|
||||
mach_accel_in(uint16_t port, mach_t *mach)
|
||||
{
|
||||
svga_t *svga = &mach->svga;
|
||||
ibm8514_t *dev = &svga->dev8514;
|
||||
ibm8514_t *dev = (ibm8514_t *) svga->dev8514;
|
||||
uint8_t temp = 0;
|
||||
int vpos = 0;
|
||||
int vblankend = svga->vblankstart + svga->crtc[0x16];
|
||||
@@ -4550,7 +4559,7 @@ mach_accel_outb(uint16_t port, uint8_t val, void *priv)
|
||||
svga_t *svga = &mach->svga;
|
||||
|
||||
if (port & 0x8000)
|
||||
mach_accel_out_fifo(mach, svga, &svga->dev8514, port, val, 1);
|
||||
mach_accel_out_fifo(mach, svga, (ibm8514_t *) svga->dev8514, port, val, 1);
|
||||
else
|
||||
mach_accel_out(port, val, mach);
|
||||
}
|
||||
@@ -4562,7 +4571,7 @@ mach_accel_outw(uint16_t port, uint16_t val, void *priv)
|
||||
svga_t *svga = &mach->svga;
|
||||
|
||||
if (port & 0x8000)
|
||||
mach_accel_out_fifo(mach, svga, &svga->dev8514, port, val, 2);
|
||||
mach_accel_out_fifo(mach, svga, (ibm8514_t *) svga->dev8514, port, val, 2);
|
||||
else {
|
||||
mach_accel_out(port, val, mach);
|
||||
mach_accel_out(port + 1, (val >> 8), mach);
|
||||
@@ -4576,8 +4585,8 @@ mach_accel_outl(uint16_t port, uint32_t val, void *priv)
|
||||
svga_t *svga = &mach->svga;
|
||||
|
||||
if (port & 0x8000) {
|
||||
mach_accel_out_fifo(mach, svga, &svga->dev8514, port, val & 0xffff, 2);
|
||||
mach_accel_out_fifo(mach, svga, &svga->dev8514, port + 2, val >> 16, 2);
|
||||
mach_accel_out_fifo(mach, svga, (ibm8514_t *) svga->dev8514, port, val & 0xffff, 2);
|
||||
mach_accel_out_fifo(mach, svga, (ibm8514_t *) svga->dev8514, port + 2, val >> 16, 2);
|
||||
} else {
|
||||
mach_accel_out(port, val, mach);
|
||||
mach_accel_out(port + 1, (val >> 8), mach);
|
||||
@@ -4593,7 +4602,7 @@ mach_accel_inb(uint16_t port, void *priv)
|
||||
uint8_t temp;
|
||||
|
||||
if (port & 0x8000)
|
||||
temp = mach_accel_in_fifo(mach, svga, &svga->dev8514, port, 1);
|
||||
temp = mach_accel_in_fifo(mach, svga, (ibm8514_t *) svga->dev8514, port, 1);
|
||||
else
|
||||
temp = mach_accel_in(port, mach);
|
||||
|
||||
@@ -4608,7 +4617,7 @@ mach_accel_inw(uint16_t port, void *priv)
|
||||
uint16_t temp;
|
||||
|
||||
if (port & 0x8000)
|
||||
temp = mach_accel_in_fifo(mach, svga, &svga->dev8514, port, 2);
|
||||
temp = mach_accel_in_fifo(mach, svga, (ibm8514_t *) svga->dev8514, port, 2);
|
||||
else {
|
||||
temp = mach_accel_in(port, mach);
|
||||
temp |= (mach_accel_in(port + 1, mach) << 8);
|
||||
@@ -4624,8 +4633,8 @@ mach_accel_inl(uint16_t port, void *priv)
|
||||
uint32_t temp;
|
||||
|
||||
if (port & 0x8000) {
|
||||
temp = mach_accel_in_fifo(mach, svga, &svga->dev8514, port, 2);
|
||||
temp = (mach_accel_in_fifo(mach, svga, &svga->dev8514, port + 2, 2) << 16);
|
||||
temp = mach_accel_in_fifo(mach, svga, (ibm8514_t *) svga->dev8514, port, 2);
|
||||
temp = (mach_accel_in_fifo(mach, svga, (ibm8514_t *) svga->dev8514, port + 2, 2) << 16);
|
||||
} else {
|
||||
temp = mach_accel_in(port, mach);
|
||||
temp |= (mach_accel_in(port + 1, mach) << 8);
|
||||
@@ -4639,7 +4648,7 @@ static void
|
||||
mach32_write_linear(uint32_t addr, uint8_t val, void *priv)
|
||||
{
|
||||
svga_t *svga = (svga_t *) priv;
|
||||
ibm8514_t *dev = &svga->dev8514;
|
||||
ibm8514_t *dev = (ibm8514_t *) svga->dev8514;
|
||||
int writemask2 = svga->writemask;
|
||||
int reset_wm = 0;
|
||||
latch_t vall;
|
||||
@@ -4802,7 +4811,7 @@ static uint8_t
|
||||
mach32_read_linear(uint32_t addr, void *priv)
|
||||
{
|
||||
svga_t *svga = (svga_t *) priv;
|
||||
const ibm8514_t *dev = &svga->dev8514;
|
||||
const ibm8514_t *dev = (ibm8514_t *) svga->dev8514;
|
||||
uint32_t latch_addr = 0;
|
||||
int readplane = svga->readplane;
|
||||
uint8_t count;
|
||||
@@ -5066,7 +5075,7 @@ static void
|
||||
mach32_updatemapping(mach_t *mach)
|
||||
{
|
||||
svga_t *svga = &mach->svga;
|
||||
ibm8514_t *dev = &svga->dev8514;
|
||||
ibm8514_t *dev = (ibm8514_t *) svga->dev8514;
|
||||
|
||||
if (mach->pci_bus && (!(mach->pci_regs[PCI_REG_COMMAND] & PCI_COMMAND_MEM))) {
|
||||
mem_mapping_disable(&svga->mapping);
|
||||
@@ -5116,7 +5125,7 @@ mach32_updatemapping(mach_t *mach)
|
||||
mach->ap_size = 4;
|
||||
mem_mapping_disable(&mach->mmio_linear_mapping);
|
||||
}
|
||||
if (mach->ext_on && (dev->local >= 2)) {
|
||||
if (mach->ext_on && (dev->local >= 2) && mach->ati_mode) {
|
||||
mem_mapping_set_handler(&svga->mapping, mach32_read, mach32_readw, mach32_readl, mach32_write, mach32_writew, mach32_writel);
|
||||
mem_mapping_set_p(&svga->mapping, mach);
|
||||
} else {
|
||||
@@ -5129,7 +5138,7 @@ static void
|
||||
mach32_hwcursor_draw(svga_t *svga, int displine)
|
||||
{
|
||||
const mach_t *mach = (mach_t *) svga->priv;
|
||||
ibm8514_t *dev = &svga->dev8514;
|
||||
ibm8514_t *dev = (ibm8514_t *) svga->dev8514;
|
||||
uint16_t dat;
|
||||
int comb;
|
||||
int offset = dev->hwcursor_latch.x - dev->hwcursor_latch.xoff;
|
||||
@@ -5452,7 +5461,7 @@ mach_mca_reset(void *priv)
|
||||
{
|
||||
mach_t *mach = (mach_t *) priv;
|
||||
svga_t *svga = &mach->svga;
|
||||
ibm8514_t *dev = &svga->dev8514;
|
||||
ibm8514_t *dev = (ibm8514_t *) svga->dev8514;
|
||||
|
||||
mem_mapping_disable(&mach->bios_rom.mapping);
|
||||
mem_mapping_disable(&mach->bios_rom2.mapping);
|
||||
@@ -5552,20 +5561,25 @@ mach32_pci_write(UNUSED(int func), int addr, uint8_t val, void *priv)
|
||||
case PCI_REG_COMMAND:
|
||||
mach->pci_regs[PCI_REG_COMMAND] = val & 0x27;
|
||||
if (val & PCI_COMMAND_IO) {
|
||||
io_removehandler(0x02ea, 4, mach_in, NULL, NULL, mach_out, NULL, NULL, mach);
|
||||
io_removehandler(0x03c0, 32, mach_in, NULL, NULL, mach_out, NULL, NULL, mach);
|
||||
io_sethandler(0x02ea, 4, mach_in, NULL, NULL, mach_out, NULL, NULL, mach);
|
||||
io_sethandler(0x03c0, 32, mach_in, NULL, NULL, mach_out, NULL, NULL, mach);
|
||||
} else
|
||||
} else {
|
||||
io_removehandler(0x03c0, 32, mach_in, NULL, NULL, mach_out, NULL, NULL, mach);
|
||||
|
||||
io_removehandler(0x02ea, 4, mach_in, NULL, NULL, mach_out, NULL, NULL, mach);
|
||||
}
|
||||
mach32_updatemapping(mach);
|
||||
break;
|
||||
|
||||
case 0x12:
|
||||
mach->linear_base = (mach->linear_base & 0xff000000) | ((val & 0xc0) << 16);
|
||||
mach->ati_mode = 1;
|
||||
mach32_updatemapping(mach);
|
||||
break;
|
||||
case 0x13:
|
||||
mach->linear_base = (mach->linear_base & 0xc00000) | (val << 24);
|
||||
mach->ati_mode = 1;
|
||||
mach32_updatemapping(mach);
|
||||
break;
|
||||
|
||||
@@ -5599,11 +5613,12 @@ mach8_init(const device_t *info)
|
||||
svga_t *svga;
|
||||
ibm8514_t *dev;
|
||||
|
||||
mach = malloc(sizeof(mach_t));
|
||||
memset(mach, 0x00, sizeof(mach_t));
|
||||
mach = calloc(1, sizeof(mach_t));
|
||||
|
||||
svga = &mach->svga;
|
||||
dev = &svga->dev8514;
|
||||
svga = &mach->svga;
|
||||
dev = (ibm8514_t *) calloc(1, sizeof(ibm8514_t));
|
||||
|
||||
svga->dev8514 = dev;
|
||||
|
||||
mach->pci_bus = !!(info->flags & DEVICE_PCI);
|
||||
mach->vlb_bus = !!(info->flags & DEVICE_VLB);
|
||||
@@ -5800,11 +5815,13 @@ mach_close(void *priv)
|
||||
{
|
||||
mach_t *mach = (mach_t *) priv;
|
||||
svga_t *svga = &mach->svga;
|
||||
ibm8514_t *dev = &svga->dev8514;
|
||||
ibm8514_t *dev = (ibm8514_t *) svga->dev8514;
|
||||
|
||||
if (dev) {
|
||||
free(dev->vram);
|
||||
free(dev->changedvram);
|
||||
|
||||
free(dev);
|
||||
}
|
||||
|
||||
svga_close(svga);
|
||||
|
||||
@@ -39,6 +39,8 @@
|
||||
#include <86box/plat.h>
|
||||
#include <86box/ui.h>
|
||||
#include <86box/video.h>
|
||||
#include <86box/vid_8514a.h>
|
||||
#include <86box/vid_xga.h>
|
||||
#include <86box/vid_svga.h>
|
||||
#include <86box/vid_svga_render.h>
|
||||
#include <86box/vid_xga_device.h>
|
||||
@@ -110,11 +112,14 @@ void
|
||||
svga_out(uint16_t addr, uint8_t val, void *priv)
|
||||
{
|
||||
svga_t *svga = (svga_t *) priv;
|
||||
ibm8514_t *dev = &svga->dev8514;
|
||||
xga_t *xga = &svga->xga;
|
||||
ibm8514_t *dev = (ibm8514_t *) svga->dev8514;
|
||||
xga_t *xga = (xga_t *) svga->xga;
|
||||
uint8_t o;
|
||||
uint8_t index;
|
||||
|
||||
if (!dev && (addr >= 0x2ea) && (addr <= 0x2ed))
|
||||
return;
|
||||
|
||||
switch (addr) {
|
||||
case 0x2ea:
|
||||
dev->dac_mask = val;
|
||||
@@ -357,10 +362,13 @@ uint8_t
|
||||
svga_in(uint16_t addr, void *priv)
|
||||
{
|
||||
svga_t *svga = (svga_t *) priv;
|
||||
ibm8514_t *dev = &svga->dev8514;
|
||||
ibm8514_t *dev = (ibm8514_t *) svga->dev8514;
|
||||
uint8_t index;
|
||||
uint8_t ret = 0xff;
|
||||
|
||||
if (!dev && (addr >= 0x2ea) && (addr <= 0x2ed))
|
||||
return ret;
|
||||
|
||||
switch (addr) {
|
||||
case 0x2ea:
|
||||
ret = dev->dac_mask;
|
||||
@@ -512,8 +520,8 @@ svga_in(uint16_t addr, void *priv)
|
||||
void
|
||||
svga_set_ramdac_type(svga_t *svga, int type)
|
||||
{
|
||||
ibm8514_t *dev = &svga->dev8514;
|
||||
xga_t *xga = &svga->xga;
|
||||
ibm8514_t *dev = (ibm8514_t *) svga->dev8514;
|
||||
xga_t *xga = (xga_t *) svga->xga;
|
||||
|
||||
if (svga->ramdac_type != type) {
|
||||
svga->ramdac_type = type;
|
||||
@@ -548,7 +556,7 @@ svga_set_ramdac_type(svga_t *svga, int type)
|
||||
void
|
||||
svga_recalctimings(svga_t *svga)
|
||||
{
|
||||
const ibm8514_t *dev = &svga->dev8514;
|
||||
const ibm8514_t *dev = (ibm8514_t *) svga->dev8514;
|
||||
double crtcconst;
|
||||
double _dispontime;
|
||||
double _dispofftime;
|
||||
@@ -716,12 +724,12 @@ svga_recalctimings(svga_t *svga)
|
||||
svga->recalctimings_ex(svga);
|
||||
}
|
||||
|
||||
if (ibm8514_active) {
|
||||
if (ibm8514_active && (svga->dev8514 != NULL)) {
|
||||
if (!dev->local)
|
||||
ibm8514_recalctimings(svga);
|
||||
}
|
||||
|
||||
if (xga_active)
|
||||
if (xga_active && (svga->xga != NULL))
|
||||
xga_recalctimings(svga);
|
||||
|
||||
if (svga->hdisp >= 2048)
|
||||
@@ -816,8 +824,8 @@ void
|
||||
svga_poll(void *priv)
|
||||
{
|
||||
svga_t *svga = (svga_t *) priv;
|
||||
ibm8514_t *dev = &svga->dev8514;
|
||||
xga_t *xga = &svga->xga;
|
||||
ibm8514_t *dev = (ibm8514_t *) svga->dev8514;
|
||||
xga_t *xga = (xga_t *) svga->xga;
|
||||
uint32_t x;
|
||||
uint32_t blink_delay;
|
||||
int wx;
|
||||
@@ -825,15 +833,17 @@ svga_poll(void *priv)
|
||||
int ret;
|
||||
int old_ma;
|
||||
|
||||
if (ibm8514_active && dev->on) {
|
||||
ibm8514_poll(dev, svga);
|
||||
return;
|
||||
}
|
||||
if (xga_active && xga->on) {
|
||||
if ((xga->disp_cntl_2 & 7) >= 2) {
|
||||
xga_poll(xga, svga);
|
||||
if (!svga->override) {
|
||||
if (ibm8514_active && dev->on) {
|
||||
ibm8514_poll(dev, svga);
|
||||
return;
|
||||
}
|
||||
if (xga_active && xga->on) {
|
||||
if ((xga->disp_cntl_2 & 7) >= 2) {
|
||||
xga_poll(xga, svga);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!svga->linepos) {
|
||||
@@ -1229,7 +1239,7 @@ static __inline void
|
||||
svga_write_common(uint32_t addr, uint8_t val, uint8_t linear, void *priv)
|
||||
{
|
||||
svga_t *svga = (svga_t *) priv;
|
||||
xga_t *xga = &svga->xga;
|
||||
xga_t *xga = (xga_t *) svga->xga;
|
||||
int writemask2 = svga->writemask;
|
||||
int reset_wm = 0;
|
||||
latch_t vall;
|
||||
@@ -1449,7 +1459,7 @@ static __inline uint8_t
|
||||
svga_read_common(uint32_t addr, uint8_t linear, void *priv)
|
||||
{
|
||||
svga_t *svga = (svga_t *) priv;
|
||||
xga_t *xga = &svga->xga;
|
||||
xga_t *xga = (xga_t *) svga->xga;
|
||||
uint32_t latch_addr = 0;
|
||||
int readplane = svga->readplane;
|
||||
uint8_t count;
|
||||
|
||||
@@ -760,10 +760,18 @@ tgui_recalctimings(svga_t *svga)
|
||||
case 8:
|
||||
svga->render = svga_render_8bpp_highres;
|
||||
if (tgui->type >= TGUI_9660) {
|
||||
if ((svga->dispend == 510) || (svga->dispend == 512))
|
||||
svga->hdisp = 1280;
|
||||
else if ((svga->dispend == 600) && (svga->hdisp == 800) && svga->interlace)
|
||||
svga->hdisp = 1600;
|
||||
if (svga->dispend == ((1024 >> 1) - 2))
|
||||
svga->dispend += 2;
|
||||
if (svga->dispend == (1024 >> 1))
|
||||
svga->hdisp <<= 1;
|
||||
else if ((svga->hdisp == (1600 >> 1)) && (svga->dispend == (1200 >> 1)) && svga->interlace)
|
||||
svga->hdisp <<= 1;
|
||||
else if (svga->hdisp == (1024 >> 1)) {
|
||||
if (svga->interlace && (svga->dispend == (768 >> 1)))
|
||||
svga->hdisp <<= 1;
|
||||
else if (!svga->interlace && (svga->dispend == 768))
|
||||
svga->hdisp <<= 1;
|
||||
}
|
||||
|
||||
if (ger22upper & 0x80) {
|
||||
svga->htotal <<= 1;
|
||||
@@ -799,7 +807,7 @@ tgui_recalctimings(svga_t *svga)
|
||||
case 32:
|
||||
svga->render = svga_render_32bpp_highres;
|
||||
if (tgui->type >= TGUI_9660) {
|
||||
if (svga->hdisp == 1024)
|
||||
if (!ger22upper)
|
||||
svga->rowoffset <<= 1;
|
||||
}
|
||||
break;
|
||||
@@ -1399,7 +1407,6 @@ tgui_accel_command(int count, uint32_t cpu_dat, tgui_t *tgui)
|
||||
uint32_t trans_col = (tgui->accel.flags & TGUI_TRANSREV) ? tgui->accel.fg_col : tgui->accel.bg_col;
|
||||
uint16_t *vram_w = (uint16_t *) svga->vram;
|
||||
uint32_t *vram_l = (uint32_t *) svga->vram;
|
||||
uint8_t ger22upper = (tgui->accel.ger22 >> 8);
|
||||
|
||||
if (tgui->accel.bpp == 0) {
|
||||
trans_col &= 0xff;
|
||||
@@ -1455,15 +1462,21 @@ tgui_accel_command(int count, uint32_t cpu_dat, tgui_t *tgui)
|
||||
}
|
||||
}
|
||||
|
||||
/*For delayed mode switches.*/
|
||||
if (tgui->type == TGUI_9440) {
|
||||
if (tgui->accel.pitch == 800)
|
||||
tgui->accel.pitch += 32;
|
||||
/*See this: https://android.googlesource.com/kernel/tegra/+/android-tegra-flounder-3.10-lollipop-release/drivers/video/tridentfb.c for the pitch*/
|
||||
tgui->accel.pitch = svga->rowoffset;
|
||||
|
||||
if (tgui->accel.bpp == 1) {
|
||||
if (!ger22upper)
|
||||
tgui->accel.pitch = svga->rowoffset << 2;
|
||||
}
|
||||
switch (svga->bpp) {
|
||||
case 8:
|
||||
case 24:
|
||||
tgui->accel.pitch <<= 3;
|
||||
break;
|
||||
case 15:
|
||||
case 16:
|
||||
tgui->accel.pitch <<= 2;
|
||||
break;
|
||||
case 32:
|
||||
tgui->accel.pitch <<= 1;
|
||||
break;
|
||||
}
|
||||
#if 0
|
||||
pclog("TGUI accel command = %x, ger22 = %04x, hdisp = %d, dispend = %d, vtotal = %d, rowoffset = %d, svgabpp = %d, interlace = %d, accelbpp = %d, pitch = %d.\n", tgui->accel.command, tgui->accel.ger22, svga->hdisp, svga->dispend, svga->vtotal, svga->rowoffset, svga->bpp, svga->interlace, tgui->accel.bpp, tgui->accel.pitch);
|
||||
@@ -2056,7 +2069,6 @@ tgui_accel_out(uint16_t addr, uint8_t val, void *priv)
|
||||
switch (addr) {
|
||||
case 0x2122:
|
||||
tgui->accel.ger22 = (tgui->accel.ger22 & 0xff00) | val;
|
||||
tgui->accel.pitch = 0x200 << ((val >> 2) & 3);
|
||||
switch (svga->bpp) {
|
||||
case 8:
|
||||
case 24:
|
||||
@@ -2076,7 +2088,8 @@ tgui_accel_out(uint16_t addr, uint8_t val, void *priv)
|
||||
break;
|
||||
|
||||
case 0x2123:
|
||||
//pclog("Pitch IO23: val = %02x, rowoffset = %x, pitch = %d.\n", val, svga->rowoffset, tgui->accel.pitch);
|
||||
tgui->accel.ger22 = (tgui->accel.ger22 & 0xff) | (val << 8);
|
||||
//pclog("Pitch IO23: val = %02x, rowoffset = %x.\n", tgui->accel.ger22, svga->crtc[0x13]);
|
||||
switch (svga->bpp) {
|
||||
case 8:
|
||||
case 24:
|
||||
@@ -2090,24 +2103,6 @@ tgui_accel_out(uint16_t addr, uint8_t val, void *priv)
|
||||
tgui->accel.bpp = 3;
|
||||
break;
|
||||
}
|
||||
tgui->accel.ger22 = (tgui->accel.ger22 & 0xff) | (val << 8);
|
||||
if ((val & 0x80) || ((val & 0xc0) == 0x40))
|
||||
tgui->accel.pitch = svga->rowoffset << 3;
|
||||
else if (tgui->accel.pitch <= 1024) {
|
||||
tgui->accel.pitch = svga->rowoffset << 3;
|
||||
if (!val)
|
||||
tgui->accel.pitch = 1024;
|
||||
}
|
||||
|
||||
if (tgui->accel.pitch == 800)
|
||||
tgui->accel.pitch += 32;
|
||||
|
||||
if (tgui->accel.bpp == 1)
|
||||
tgui->accel.pitch >>= 1;
|
||||
else if (tgui->accel.bpp == 3)
|
||||
tgui->accel.pitch >>= 2;
|
||||
|
||||
svga_recalctimings(svga);
|
||||
break;
|
||||
|
||||
case 0x2124: /*Command*/
|
||||
@@ -2724,59 +2719,11 @@ tgui_accel_write(uint32_t addr, uint8_t val, void *priv)
|
||||
|
||||
switch (addr & 0xff) {
|
||||
case 0x22:
|
||||
tgui->accel.ger22 = (tgui->accel.ger22 & 0xff00) | val;
|
||||
tgui->accel.pitch = 0x200 << ((val >> 2) & 3);
|
||||
switch (svga->bpp) {
|
||||
case 8:
|
||||
case 24:
|
||||
tgui->accel.bpp = 0;
|
||||
break;
|
||||
case 15:
|
||||
case 16:
|
||||
tgui->accel.bpp = 1;
|
||||
break;
|
||||
case 32:
|
||||
tgui->accel.bpp = 3;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
tgui_accel_out(0x2122, val, tgui);
|
||||
break;
|
||||
|
||||
case 0x23:
|
||||
switch (svga->bpp) {
|
||||
case 8:
|
||||
case 24:
|
||||
tgui->accel.bpp = 0;
|
||||
break;
|
||||
case 15:
|
||||
case 16:
|
||||
tgui->accel.bpp = 1;
|
||||
break;
|
||||
case 32:
|
||||
tgui->accel.bpp = 3;
|
||||
break;
|
||||
}
|
||||
tgui->accel.ger22 = (tgui->accel.ger22 & 0xff) | (val << 8);
|
||||
if ((val & 0x80) || ((val & 0xc0) == 0x40))
|
||||
tgui->accel.pitch = svga->rowoffset << 3;
|
||||
else if (tgui->accel.pitch <= 1024) {
|
||||
tgui->accel.pitch = svga->rowoffset << 3;
|
||||
if (!val)
|
||||
tgui->accel.pitch = 1024;
|
||||
}
|
||||
|
||||
if (tgui->accel.pitch == 800)
|
||||
tgui->accel.pitch += 32;
|
||||
|
||||
if (tgui->accel.bpp == 1)
|
||||
tgui->accel.pitch >>= 1;
|
||||
else if (tgui->accel.bpp == 3)
|
||||
tgui->accel.pitch >>= 2;
|
||||
|
||||
//pclog("Pitch MM23: fullval = %04x, rowoffset = %x, pitch = %d.\n", tgui->accel.ger22, svga->rowoffset, tgui->accel.pitch);
|
||||
svga_recalctimings(svga);
|
||||
tgui_accel_out(0x2123, val, tgui);
|
||||
break;
|
||||
|
||||
case 0x24: /*Command*/
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
#include <86box/device.h>
|
||||
#include <86box/timer.h>
|
||||
#include <86box/video.h>
|
||||
#include <86box/vid_xga.h>
|
||||
#include <86box/vid_svga.h>
|
||||
#include <86box/vid_svga_render.h>
|
||||
#include <86box/vid_xga_device.h>
|
||||
@@ -143,7 +144,7 @@ svga_xga_in(uint16_t addr, void *priv)
|
||||
void
|
||||
xga_updatemapping(svga_t *svga)
|
||||
{
|
||||
xga_t *xga = &svga->xga;
|
||||
xga_t *xga = (xga_t *) svga->xga;
|
||||
|
||||
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,
|
||||
@@ -186,7 +187,7 @@ xga_updatemapping(svga_t *svga)
|
||||
void
|
||||
xga_recalctimings(svga_t *svga)
|
||||
{
|
||||
xga_t *xga = &svga->xga;
|
||||
xga_t *xga = (xga_t *) svga->xga;
|
||||
|
||||
if (xga->on) {
|
||||
xga->v_total = xga->vtotal + 1;
|
||||
@@ -505,7 +506,7 @@ static void
|
||||
xga_ext_outb(uint16_t addr, uint8_t val, void *priv)
|
||||
{
|
||||
svga_t *svga = (svga_t *) priv;
|
||||
xga_t *xga = &svga->xga;
|
||||
xga_t *xga = (xga_t *) svga->xga;
|
||||
|
||||
xga_log("[%04X:%08X]: EXT OUTB = %02x, val = %02x\n", CS, cpu_state.pc, addr, val);
|
||||
|
||||
@@ -567,7 +568,7 @@ static uint8_t
|
||||
xga_ext_inb(uint16_t addr, void *priv)
|
||||
{
|
||||
svga_t *svga = (svga_t *) priv;
|
||||
xga_t *xga = &svga->xga;
|
||||
xga_t *xga = (xga_t *) svga->xga;
|
||||
uint8_t ret = 0;
|
||||
uint8_t index;
|
||||
|
||||
@@ -906,7 +907,7 @@ xga_ext_inb(uint16_t addr, void *priv)
|
||||
static uint32_t
|
||||
xga_accel_read_pattern_map_pixel(svga_t *svga, int x, int y, int map, uint32_t base, int width)
|
||||
{
|
||||
const xga_t *xga = &svga->xga;
|
||||
const xga_t *xga = (xga_t *) svga->xga;
|
||||
uint32_t addr = base;
|
||||
int bits;
|
||||
uint8_t byte;
|
||||
@@ -944,7 +945,7 @@ xga_accel_read_pattern_map_pixel(svga_t *svga, int x, int y, int map, uint32_t b
|
||||
static uint32_t
|
||||
xga_accel_read_map_pixel(svga_t *svga, int x, int y, int map, uint32_t base, int width, UNUSED(int usesrc))
|
||||
{
|
||||
xga_t *xga = &svga->xga;
|
||||
xga_t *xga = (xga_t *) svga->xga;
|
||||
uint32_t addr = base;
|
||||
int bits;
|
||||
uint32_t byte;
|
||||
@@ -1024,7 +1025,7 @@ xga_accel_read_map_pixel(svga_t *svga, int x, int y, int map, uint32_t base, int
|
||||
static void
|
||||
xga_accel_write_map_pixel(svga_t *svga, int x, int y, int map, uint32_t base, uint32_t pixel, int width)
|
||||
{
|
||||
xga_t *xga = &svga->xga;
|
||||
xga_t *xga = (xga_t *) svga->xga;
|
||||
uint32_t addr = base;
|
||||
uint8_t byte;
|
||||
uint8_t mask;
|
||||
@@ -1125,7 +1126,7 @@ xga_accel_write_map_pixel(svga_t *svga, int x, int y, int map, uint32_t base, ui
|
||||
static void
|
||||
xga_short_stroke(svga_t *svga, uint8_t ssv)
|
||||
{
|
||||
xga_t *xga = &svga->xga;
|
||||
xga_t *xga = (xga_t *) svga->xga;
|
||||
uint32_t src_dat;
|
||||
uint32_t dest_dat;
|
||||
uint32_t old_dest_dat;
|
||||
@@ -1254,7 +1255,7 @@ xga_short_stroke(svga_t *svga, uint8_t ssv)
|
||||
static void
|
||||
xga_line_draw_write(svga_t *svga)
|
||||
{
|
||||
xga_t *xga = &svga->xga;
|
||||
xga_t *xga = (xga_t *) svga->xga;
|
||||
uint32_t src_dat;
|
||||
uint32_t dest_dat;
|
||||
uint32_t old_dest_dat;
|
||||
@@ -1476,7 +1477,7 @@ xga_line_draw_write(svga_t *svga)
|
||||
static void
|
||||
xga_bitblt(svga_t *svga)
|
||||
{
|
||||
xga_t *xga = &svga->xga;
|
||||
xga_t *xga = (xga_t *) svga->xga;
|
||||
uint8_t area_state = 0;
|
||||
uint32_t src_dat;
|
||||
uint32_t dest_dat;
|
||||
@@ -1499,7 +1500,6 @@ xga_bitblt(svga_t *svga)
|
||||
int mix = 0;
|
||||
int xdir;
|
||||
int ydir;
|
||||
int skip = 0;
|
||||
int x = 0;
|
||||
int y = 0;
|
||||
|
||||
@@ -2284,7 +2284,7 @@ static void
|
||||
xga_memio_writeb(uint32_t addr, uint8_t val, void *priv)
|
||||
{
|
||||
svga_t *svga = (svga_t *) priv;
|
||||
xga_t *xga = &svga->xga;
|
||||
xga_t *xga = (xga_t *) svga->xga;
|
||||
|
||||
xga_mem_write(addr, val, xga, svga, 1);
|
||||
|
||||
@@ -2295,7 +2295,7 @@ static void
|
||||
xga_memio_writew(uint32_t addr, uint16_t val, void *priv)
|
||||
{
|
||||
svga_t *svga = (svga_t *) priv;
|
||||
xga_t *xga = &svga->xga;
|
||||
xga_t *xga = (xga_t *) svga->xga;
|
||||
|
||||
xga_mem_write(addr, val, xga, svga, 2);
|
||||
|
||||
@@ -2306,7 +2306,7 @@ static void
|
||||
xga_memio_writel(uint32_t addr, uint32_t val, void *priv)
|
||||
{
|
||||
svga_t *svga = (svga_t *) priv;
|
||||
xga_t *xga = &svga->xga;
|
||||
xga_t *xga = (xga_t *) svga->xga;
|
||||
|
||||
xga_mem_write(addr, val, xga, svga, 4);
|
||||
|
||||
@@ -2401,7 +2401,7 @@ static uint8_t
|
||||
xga_memio_readb(uint32_t addr, void *priv)
|
||||
{
|
||||
svga_t *svga = (svga_t *) priv;
|
||||
xga_t *xga = &svga->xga;
|
||||
xga_t *xga = (xga_t *) svga->xga;
|
||||
uint8_t temp;
|
||||
|
||||
temp = xga_mem_read(addr, xga, svga);
|
||||
@@ -2415,7 +2415,7 @@ static uint16_t
|
||||
xga_memio_readw(uint32_t addr, void *priv)
|
||||
{
|
||||
svga_t *svga = (svga_t *) priv;
|
||||
xga_t *xga = &svga->xga;
|
||||
xga_t *xga = (xga_t *) svga->xga;
|
||||
uint16_t temp;
|
||||
|
||||
temp = xga_mem_read(addr, xga, svga);
|
||||
@@ -2430,7 +2430,7 @@ static uint32_t
|
||||
xga_memio_readl(uint32_t addr, void *priv)
|
||||
{
|
||||
svga_t *svga = (svga_t *) priv;
|
||||
xga_t *xga = &svga->xga;
|
||||
xga_t *xga = (xga_t *) svga->xga;
|
||||
uint32_t temp;
|
||||
|
||||
temp = xga_mem_read(addr, xga, svga);
|
||||
@@ -2446,7 +2446,7 @@ xga_memio_readl(uint32_t addr, void *priv)
|
||||
static void
|
||||
xga_hwcursor_draw(svga_t *svga, int displine)
|
||||
{
|
||||
xga_t *xga = &svga->xga;
|
||||
xga_t *xga = (xga_t *) svga->xga;
|
||||
uint8_t dat = 0;
|
||||
int offset = xga->hwcursor_latch.x - xga->hwcursor_latch.xoff;
|
||||
int x_pos;
|
||||
@@ -2532,7 +2532,7 @@ xga_render_overscan_right(xga_t *xga, svga_t *svga)
|
||||
static void
|
||||
xga_render_4bpp(svga_t *svga)
|
||||
{
|
||||
xga_t *xga = &svga->xga;
|
||||
xga_t *xga = (xga_t *) svga->xga;
|
||||
uint32_t *p;
|
||||
uint32_t dat;
|
||||
|
||||
@@ -2573,7 +2573,7 @@ xga_render_4bpp(svga_t *svga)
|
||||
static void
|
||||
xga_render_8bpp(svga_t *svga)
|
||||
{
|
||||
xga_t *xga = &svga->xga;
|
||||
xga_t *xga = (xga_t *) svga->xga;
|
||||
uint32_t *p;
|
||||
uint32_t dat;
|
||||
|
||||
@@ -2610,7 +2610,7 @@ xga_render_8bpp(svga_t *svga)
|
||||
static void
|
||||
xga_render_16bpp(svga_t *svga)
|
||||
{
|
||||
xga_t *xga = &svga->xga;
|
||||
xga_t *xga = (xga_t *) svga->xga;
|
||||
int x;
|
||||
uint32_t *p;
|
||||
uint32_t dat;
|
||||
@@ -2651,7 +2651,7 @@ static void
|
||||
xga_write(uint32_t addr, uint8_t val, void *priv)
|
||||
{
|
||||
svga_t *svga = (svga_t *) priv;
|
||||
xga_t *xga = &svga->xga;
|
||||
xga_t *xga = (xga_t *) svga->xga;
|
||||
|
||||
if (!xga->on) {
|
||||
svga_write(addr, val, svga);
|
||||
@@ -2679,7 +2679,7 @@ static void
|
||||
xga_writew(uint32_t addr, uint16_t val, void *priv)
|
||||
{
|
||||
svga_t *svga = (svga_t *) priv;
|
||||
xga_t *xga = &svga->xga;
|
||||
xga_t *xga = (xga_t *) svga->xga;
|
||||
|
||||
if (!xga->on) {
|
||||
svga_writew(addr, val, svga);
|
||||
@@ -2694,7 +2694,7 @@ static void
|
||||
xga_writel(uint32_t addr, uint32_t val, void *priv)
|
||||
{
|
||||
svga_t *svga = (svga_t *) priv;
|
||||
xga_t *xga = &svga->xga;
|
||||
xga_t *xga = (xga_t *) svga->xga;
|
||||
|
||||
if (!xga->on) {
|
||||
svga_writel(addr, val, svga);
|
||||
@@ -2711,7 +2711,7 @@ static uint8_t
|
||||
xga_read(uint32_t addr, void *priv)
|
||||
{
|
||||
svga_t *svga = (svga_t *) priv;
|
||||
xga_t *xga = &svga->xga;
|
||||
xga_t *xga = (xga_t *) svga->xga;
|
||||
uint8_t ret = 0xff;
|
||||
|
||||
if (!xga->on) {
|
||||
@@ -2741,7 +2741,7 @@ static uint16_t
|
||||
xga_readw(uint32_t addr, void *priv)
|
||||
{
|
||||
svga_t *svga = (svga_t *) priv;
|
||||
xga_t *xga = &svga->xga;
|
||||
xga_t *xga = (xga_t *) svga->xga;
|
||||
uint16_t ret = 0xffff;
|
||||
|
||||
if (!xga->on) {
|
||||
@@ -2759,7 +2759,7 @@ static uint32_t
|
||||
xga_readl(uint32_t addr, void *priv)
|
||||
{
|
||||
svga_t *svga = (svga_t *) priv;
|
||||
xga_t *xga = &svga->xga;
|
||||
xga_t *xga = (xga_t *) svga->xga;
|
||||
uint32_t ret = 0xffffffff;
|
||||
|
||||
if (!xga->on) {
|
||||
@@ -2779,7 +2779,7 @@ static void
|
||||
xga_write_linear(uint32_t addr, uint8_t val, void *priv)
|
||||
{
|
||||
svga_t *svga = (svga_t *) priv;
|
||||
xga_t *xga = &svga->xga;
|
||||
xga_t *xga = (xga_t *) svga->xga;
|
||||
|
||||
if (!xga->on) {
|
||||
svga_write_linear(addr, val, svga);
|
||||
@@ -2811,7 +2811,7 @@ static void
|
||||
xga_writew_linear(uint32_t addr, uint16_t val, void *priv)
|
||||
{
|
||||
svga_t *svga = (svga_t *) priv;
|
||||
const xga_t *xga = &svga->xga;
|
||||
const xga_t *xga = (xga_t *) svga->xga;
|
||||
|
||||
if (!xga->on) {
|
||||
svga_writew_linear(addr, val, svga);
|
||||
@@ -2826,7 +2826,7 @@ static void
|
||||
xga_writel_linear(uint32_t addr, uint32_t val, void *priv)
|
||||
{
|
||||
svga_t *svga = (svga_t *) priv;
|
||||
const xga_t *xga = &svga->xga;
|
||||
const xga_t *xga = (xga_t *) svga->xga;
|
||||
|
||||
if (!xga->on) {
|
||||
svga_writel_linear(addr, val, svga);
|
||||
@@ -2843,7 +2843,7 @@ static uint8_t
|
||||
xga_read_linear(uint32_t addr, void *priv)
|
||||
{
|
||||
svga_t *svga = (svga_t *) priv;
|
||||
const xga_t *xga = &svga->xga;
|
||||
const xga_t *xga = (xga_t *) svga->xga;
|
||||
uint8_t ret = 0xff;
|
||||
|
||||
if (!xga->on)
|
||||
@@ -2873,7 +2873,7 @@ static uint16_t
|
||||
xga_readw_linear(uint32_t addr, void *priv)
|
||||
{
|
||||
svga_t *svga = (svga_t *) priv;
|
||||
const xga_t *xga = &svga->xga;
|
||||
const xga_t *xga = (xga_t *) svga->xga;
|
||||
uint16_t ret;
|
||||
|
||||
if (!xga->on)
|
||||
@@ -2889,7 +2889,7 @@ static uint32_t
|
||||
xga_readl_linear(uint32_t addr, void *priv)
|
||||
{
|
||||
svga_t *svga = (svga_t *) priv;
|
||||
const xga_t *xga = &svga->xga;
|
||||
const xga_t *xga = (xga_t *) svga->xga;
|
||||
uint32_t ret;
|
||||
|
||||
if (!xga->on)
|
||||
@@ -2906,7 +2906,7 @@ xga_readl_linear(uint32_t addr, void *priv)
|
||||
static void
|
||||
xga_do_render(svga_t *svga)
|
||||
{
|
||||
xga_t *xga = &svga->xga;
|
||||
xga_t *xga = (xga_t *) svga->xga;
|
||||
|
||||
xga_log("DISPCNTL = %d, vga = %d.\n", xga->disp_cntl_2 & 7, vga_on);
|
||||
switch (xga->disp_cntl_2 & 7) {
|
||||
@@ -2937,8 +2937,9 @@ xga_do_render(svga_t *svga)
|
||||
}
|
||||
|
||||
void
|
||||
xga_poll(xga_t *xga, svga_t *svga)
|
||||
xga_poll(void *priv, svga_t *svga)
|
||||
{
|
||||
xga_t *xga = (xga_t *) priv;
|
||||
uint32_t x;
|
||||
int wx;
|
||||
int wy;
|
||||
@@ -3076,7 +3077,7 @@ static uint8_t
|
||||
xga_mca_read(int port, void *priv)
|
||||
{
|
||||
const svga_t *svga = (svga_t *) priv;
|
||||
const xga_t *xga = &svga->xga;
|
||||
const xga_t *xga = (xga_t *) svga->xga;
|
||||
uint8_t ret = xga->pos_regs[port & 7];
|
||||
|
||||
if (((port & 7) == 3) && !(ret & 1)) /*Always enable the mapping.*/
|
||||
@@ -3092,7 +3093,7 @@ static void
|
||||
xga_mca_write(int port, uint8_t val, void *priv)
|
||||
{
|
||||
svga_t *svga = (svga_t *) priv;
|
||||
xga_t *xga = &svga->xga;
|
||||
xga_t *xga = (xga_t *) svga->xga;
|
||||
|
||||
/* MCA does not write registers below 0x0100. */
|
||||
if (port < 0x0102)
|
||||
@@ -3134,7 +3135,7 @@ static uint8_t
|
||||
xga_mca_feedb(void *priv)
|
||||
{
|
||||
const svga_t *svga = (svga_t *) priv;
|
||||
const xga_t *xga = &svga->xga;
|
||||
const xga_t *xga = (xga_t *) svga->xga;
|
||||
|
||||
return xga->pos_regs[2] & 1;
|
||||
}
|
||||
@@ -3143,7 +3144,7 @@ static void
|
||||
xga_mca_reset(void *priv)
|
||||
{
|
||||
svga_t *svga = (svga_t *) priv;
|
||||
xga_t *xga = &svga->xga;
|
||||
xga_t *xga = (xga_t *) svga->xga;
|
||||
|
||||
mem_mapping_disable(&xga->bios_rom.mapping);
|
||||
mem_mapping_disable(&xga->memio_mapping);
|
||||
@@ -3156,7 +3157,7 @@ static void
|
||||
xga_reset(void *priv)
|
||||
{
|
||||
svga_t *svga = (svga_t *) priv;
|
||||
xga_t *xga = &svga->xga;
|
||||
xga_t *xga = (xga_t *) svga->xga;
|
||||
|
||||
mem_mapping_disable(&xga->bios_rom.mapping);
|
||||
mem_mapping_disable(&xga->memio_mapping);
|
||||
@@ -3170,7 +3171,7 @@ static uint8_t
|
||||
xga_pos_in(uint16_t addr, void *priv)
|
||||
{
|
||||
svga_t *svga = (svga_t *) priv;
|
||||
xga_t *xga = &svga->xga;
|
||||
xga_t *xga = (xga_t *) svga->xga;
|
||||
uint8_t ret = 0xff;
|
||||
|
||||
if (!xga_standalone_enabled) {
|
||||
@@ -3286,7 +3287,7 @@ static void
|
||||
xga_pos_out(uint16_t addr, uint8_t val, void *priv)
|
||||
{
|
||||
svga_t *svga = (svga_t *) priv;
|
||||
xga_t *xga = &svga->xga;
|
||||
xga_t *xga = (xga_t *) svga->xga;
|
||||
|
||||
if (!xga_standalone_enabled) {
|
||||
switch (addr) {
|
||||
@@ -3338,10 +3339,12 @@ xga_init(const device_t *info)
|
||||
if (svga_get_pri() == NULL)
|
||||
return NULL;
|
||||
|
||||
svga_t *svga = svga_get_pri();
|
||||
xga_t *xga = &svga->xga;
|
||||
svga_t *svga = svga_get_pri();
|
||||
xga_t *xga = (xga_t *) calloc(1, sizeof(xga_t));
|
||||
FILE *fp;
|
||||
uint8_t *rom = NULL;
|
||||
uint8_t *rom = NULL;
|
||||
|
||||
svga->xga = xga;
|
||||
|
||||
xga->ext_mem_addr = device_get_config_hex16("ext_mem_addr");
|
||||
xga->instance_isa = device_get_config_int("instance");
|
||||
@@ -3428,8 +3431,7 @@ xga_init(const device_t *info)
|
||||
static void *
|
||||
svga_xga_init(const device_t *info)
|
||||
{
|
||||
svga_t *svga = malloc(sizeof(svga_t));
|
||||
memset(svga, 0, sizeof(svga_t));
|
||||
svga_t *svga = (svga_t *) calloc(1, sizeof(svga_t));
|
||||
|
||||
video_inform(VIDEO_FLAG_TYPE_XGA, &timing_xga_isa);
|
||||
|
||||
@@ -3452,11 +3454,13 @@ static void
|
||||
xga_close(void *priv)
|
||||
{
|
||||
svga_t *svga = (svga_t *) priv;
|
||||
xga_t *xga = &svga->xga;
|
||||
xga_t *xga = (xga_t *) svga->xga;
|
||||
|
||||
if (svga) {
|
||||
free(xga->vram);
|
||||
free(xga->changedvram);
|
||||
|
||||
free(xga);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -571,8 +571,6 @@ MAINOBJ := 86box.o config.o log.o random.o timer.o io.o acpi.o apm.o dma.o ddma.
|
||||
MEMOBJ := catalyst_flash.o i2c_eeprom.o intel_flash.o mem.o mmu_2386.o rom.o row.o \
|
||||
smram.o spd.o sst_flash.o
|
||||
|
||||
CPU808XOBJ := queue.o
|
||||
|
||||
CPUOBJ := $(DYNARECOBJ) \
|
||||
$(CGTOBJ) \
|
||||
cpu.o cpu_table.o fpu.o x86.o \
|
||||
@@ -801,7 +799,7 @@ ifeq ($(RTMIDI), y)
|
||||
SNDOBJ += midi_rtmidi.o
|
||||
endif
|
||||
|
||||
OBJ := $(MAINOBJ) $(CPU808XOBJ) $(CPUOBJ) $(CHIPSETOBJ) $(MCHOBJ) $(DEVOBJ) $(MEMOBJ) \
|
||||
OBJ := $(MAINOBJ) $(CPUOBJ) $(CHIPSETOBJ) $(MCHOBJ) $(DEVOBJ) $(MEMOBJ) \
|
||||
$(FDDOBJ) $(GAMEOBJ) $(CDROMOBJ) $(ZIPOBJ) $(MOOBJ) $(HDDOBJ) $(MINIVHDOBJ) \
|
||||
$(NETOBJ) $(PRINTOBJ) $(SCSIOBJ) $(SIOOBJ) $(SNDOBJ) $(VIDOBJ) $(VOODOOOBJ) \
|
||||
$(PLATOBJ) $(UIOBJ) $(FSYNTHOBJ) $(MUNTOBJ) $(DEVBROBJ) $(MINITRACEOBJ) $(THREADOBJ)
|
||||
|
||||
@@ -140,7 +140,7 @@ BEGIN
|
||||
MENUITEM "新規イメージ(&N)...", IDM_CASSETTE_IMAGE_NEW
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "既存のイメージを開く(&E)...", IDM_CASSETTE_IMAGE_EXISTING
|
||||
MENUITEM "既存のイメージを開く(書き込み保護)(&W)...", IDM_CASSETTE_IMAGE_EXISTING_WP
|
||||
MENUITEM "既存のイメージを開く(書き込み禁止)(&W)...", IDM_CASSETTE_IMAGE_EXISTING_WP
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "記録(&R)", IDM_CASSETTE_RECORD
|
||||
MENUITEM "再生(&P)", IDM_CASSETTE_PLAY
|
||||
@@ -168,7 +168,7 @@ BEGIN
|
||||
MENUITEM "新規イメージ(&N)...", IDM_FLOPPY_IMAGE_NEW
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "既存のイメージを開く(&E)...", IDM_FLOPPY_IMAGE_EXISTING
|
||||
MENUITEM "既存のイメージを開く(書き込み保護)(&W)...", IDM_FLOPPY_IMAGE_EXISTING_WP
|
||||
MENUITEM "既存のイメージを開く(書き込み禁止)(&W)...", IDM_FLOPPY_IMAGE_EXISTING_WP
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "86Fイメージにエクスポート(&X)...", IDM_FLOPPY_EXPORT_TO_86F
|
||||
MENUITEM SEPARATOR
|
||||
@@ -197,7 +197,7 @@ BEGIN
|
||||
MENUITEM "新規イメージ(&N)...", IDM_ZIP_IMAGE_NEW
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "既存のイメージを開く(&E)...", IDM_ZIP_IMAGE_EXISTING
|
||||
MENUITEM "既存のイメージを開く(書き込み保護)(&W)...", IDM_ZIP_IMAGE_EXISTING_WP
|
||||
MENUITEM "既存のイメージを開く(書き込み禁止)(&W)...", IDM_ZIP_IMAGE_EXISTING_WP
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "取り出す(&J)", IDM_ZIP_EJECT
|
||||
MENUITEM "前のイメージを再読み込み(&R)", IDM_ZIP_RELOAD
|
||||
@@ -211,7 +211,7 @@ BEGIN
|
||||
MENUITEM "新規イメージ(&N)...", IDM_MO_IMAGE_NEW
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "既存のイメージを開く(&E)...", IDM_MO_IMAGE_EXISTING
|
||||
MENUITEM "既存のイメージを開く(書き込み保護)(&W)...", IDM_MO_IMAGE_EXISTING_WP
|
||||
MENUITEM "既存のイメージを開く(書き込み禁止)(&W)...", IDM_MO_IMAGE_EXISTING_WP
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "取り出す(&J)", IDM_MO_EJECT
|
||||
MENUITEM "前のイメージを再読み込み(&R)", IDM_MO_RELOAD
|
||||
@@ -253,7 +253,7 @@ END
|
||||
#define STR_LANGUAGE "言語:"
|
||||
#define STR_ICONSET "アイコン セット:"
|
||||
|
||||
#define STR_GAIN "ゲイン値"
|
||||
#define STR_GAIN "音量"
|
||||
|
||||
#define STR_FILE_NAME "ファイル名:"
|
||||
#define STR_DISK_SIZE "ディスク サイズ:"
|
||||
@@ -262,7 +262,7 @@ END
|
||||
|
||||
#define STR_WIDTH "幅:"
|
||||
#define STR_HEIGHT "高さ:"
|
||||
#define STR_LOCK_TO_SIZE "このサイズを固定"
|
||||
#define STR_LOCK_TO_SIZE "サイズを固定"
|
||||
|
||||
#define STR_MACHINE_TYPE "マシン タイプ:"
|
||||
#define STR_MACHINE "マシン:"
|
||||
@@ -277,7 +277,7 @@ END
|
||||
#define STR_DISABLED "無効"
|
||||
#define STR_ENABLED_LOCAL "有効(現地時間)"
|
||||
#define STR_ENABLED_UTC "有効(UTC)"
|
||||
#define STR_DYNAREC "動的リコンパイラ"
|
||||
#define STR_DYNAREC "動的再コンパイル"
|
||||
#define STR_SOFTFLOAT "Softfloat FPU"
|
||||
|
||||
#define STR_VIDEO "ビデオカード:"
|
||||
@@ -402,34 +402,34 @@ BEGIN
|
||||
IDS_2053 "速度"
|
||||
IDS_2054 "ZIP %03i %i (%s): %ls"
|
||||
IDS_2055 "ZIPイメージ (*.IM?;*.ZDI)\0*.IM?;*.ZDI\0"
|
||||
IDS_2056 "86Boxで使用可能なROMイメージが見つかりませんでした。\n\nROMセットを<a href=""https://github.com/86Box/roms/releases/latest"">ダウンロード</a>して、「roms」ディレクトリに解凍してください。"
|
||||
IDS_2056 "86Boxで使用可能なROMイメージが見つかりません。\n\nROMセットを<a href=""https://github.com/86Box/roms/releases/latest"">ダウンロード</a>して、「roms」ディレクトリに解凍してください。"
|
||||
IDS_2057 "(空)"
|
||||
IDS_2058 "ZIPイメージ (*.IM?;*.ZDI)\0*.IM?;*.ZDI\0すべてのファイル (*.*)\0*.*\0"
|
||||
IDS_2059 "高速"
|
||||
IDS_2060 "オン"
|
||||
IDS_2061 "オフ"
|
||||
IDS_2062 "すべてのイメージ (*.86F;*.DSK;*.FLP;*.IM?;*.*FD?)\0*.86F;*.DSK;*.FLP;*.IM?;*.*FD?\0基本的なセクターイメージ (*.DSK;*.FLP;*.IM?;*.*FD?)\0*.DSK;*.FLP;*.IM?;*.IMG;*.*FD?\0表面イメージ (*.86F)\0*.86F\0"
|
||||
IDS_2063 "「roms/machines」ディレクトリにROMがないため、マシン「%hs」は使用できません。使用可能なマシンに切り替えます。"
|
||||
IDS_2062 "すべてのイメージ (*.86F;*.DSK;*.FLP;*.IM?;*.*FD?)\0*.86F;*.DSK;*.FLP;*.IM?;*.*FD?\0ベーシック セクター イメージ (*.DSK;*.FLP;*.IM?;*.*FD?)\0*.DSK;*.FLP;*.IM?;*.IMG;*.*FD?\0サーフェス イメージ (*.86F)\0*.86F\0"
|
||||
IDS_2063 "roms/machines ディレクトリにROMがないため、マシン「%hs」は使用できません。使用可能なマシンに切り替えます。"
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_2064 "「roms/video」ディレクトリにROMがないため、ビデオカード「%hs」は使用できません。使用可能なビデオカードに切り替えます。"
|
||||
IDS_2064 "roms/video ディレクトリにROMがないため、ビデオカード「%hs」は使用できません。使用可能なビデオカードに切り替えます。"
|
||||
IDS_2065 "マシン"
|
||||
IDS_2066 "画面表示"
|
||||
IDS_2066 "ディスプレイ"
|
||||
IDS_2067 "入力デバイス"
|
||||
IDS_2068 "サウンド"
|
||||
IDS_2069 "ネットワーク"
|
||||
IDS_2070 "ポート (COM/LPT)"
|
||||
IDS_2071 "ストレージ コントローラ"
|
||||
IDS_2072 "ハード ディスク"
|
||||
IDS_2073 "フロッピー/CD-ROMドライブ"
|
||||
IDS_2073 "フロッピー/CD-ROMドライブ"
|
||||
IDS_2074 "他のリムーバブル デバイス"
|
||||
IDS_2075 "他の周辺デバイス"
|
||||
IDS_2076 "表面イメージ (*.86F)\0*.86F\0"
|
||||
IDS_2077 "クリックするとマウスをキャプチャします"
|
||||
IDS_2076 "サーフェス イメージ (*.86F)\0*.86F\0"
|
||||
IDS_2077 "左クリックでマウスをキャプチャします"
|
||||
IDS_2078 "F8+F12キーを押してマウスを解放します"
|
||||
IDS_2079 "F8+F12キーまたはマウスの中ボタンを押してマウスを解放します"
|
||||
IDS_2079 "F8+F12キーまたは中クリックでマウスを解放します"
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
@@ -449,7 +449,7 @@ BEGIN
|
||||
IDS_2093 "タイプ"
|
||||
IDS_2094 "PCapのセットアップに失敗しました"
|
||||
IDS_2095 "PCapデバイスがありません"
|
||||
IDS_2096 "不正なPCapデバイスです"
|
||||
IDS_2096 "不正なPCapデバイス"
|
||||
IDS_2097 "標準ジョイスティック(2ボタン)"
|
||||
IDS_2098 "標準ジョイスティック(4ボタン)"
|
||||
IDS_2099 "標準ジョイスティック(6ボタン)"
|
||||
@@ -463,7 +463,7 @@ BEGIN
|
||||
IDS_2107 "%u"
|
||||
IDS_2108 "%u MB (CHS値: %i、%i、%i)"
|
||||
IDS_2109 "フロッピー %i (%s): %ls"
|
||||
IDS_2110 "すべてのイメージ (*.0??;*.1??;*.??0;*.86F;*.BIN;*.CQ?;*.D??;*.FLP;*.HDM;*.IM?;*.JSON;*.TD0;*.*FD?;*.MFM;*.XDF)\0*.0??;*.1??;*.??0;*.86F;*.BIN;*.CQ?;*.D??;*.FLP;*.HDM;*.IM?;*.JSON;*.TD0;*.*FD?;*.MFM;*.XDF\0アドバンスドセクターイメージ (*.IMD;*.JSON;*.TD0)\0*.IMD;*.JSON;*.TD0\0基本セクターイメージ (*.0??;*.1??;*.??0;*.BIN;*.CQ?;*.D??;*.FLP;*.HDM;*.IM?;*.XDF;*.*FD?)\0*.0??;*.1??;*.??0;*.BIN;*.CQ?;*.D??;*.FLP;*.HDM;*.IM?;*.XDF;*.*FD?\0フラックスイメージ (*.FDI)\0*.FDI\0表面イメージ (*.86F;*.MFM)\0*.86F;*.MFM\0すべてのファイル (*.*)\0*.*\0"
|
||||
IDS_2110 "すべてのイメージ (*.0??;*.1??;*.??0;*.86F;*.BIN;*.CQ?;*.D??;*.FLP;*.HDM;*.IM?;*.JSON;*.TD0;*.*FD?;*.MFM;*.XDF)\0*.0??;*.1??;*.??0;*.86F;*.BIN;*.CQ?;*.D??;*.FLP;*.HDM;*.IM?;*.JSON;*.TD0;*.*FD?;*.MFM;*.XDF\0アドバンスド セクター イメージ (*.IMD;*.JSON;*.TD0)\0*.IMD;*.JSON;*.TD0\0ベーシック セクター イメージ (*.0??;*.1??;*.??0;*.BIN;*.CQ?;*.D??;*.FLP;*.HDM;*.IM?;*.XDF;*.*FD?)\0*.0??;*.1??;*.??0;*.BIN;*.CQ?;*.D??;*.FLP;*.HDM;*.IM?;*.XDF;*.*FD?\0フラックスイメージ (*.FDI)\0*.FDI\0サーフェス イメージ (*.86F;*.MFM)\0*.86F;*.MFM\0すべてのファイル (*.*)\0*.*\0"
|
||||
IDS_2112 "SDLが初期化できません。SDL2.dllが必要です"
|
||||
IDS_2113 "使用中のマシンをハードリ セットしますか?"
|
||||
IDS_2114 "86Boxを終了しますか?"
|
||||
@@ -503,11 +503,11 @@ BEGIN
|
||||
IDS_2139 "リセットしない"
|
||||
IDS_2140 "光磁気イメージ (*.IM?;*.MDI)\0*.IM?;*.MDI\0すべてのファイル (*.*)\0*.*\0"
|
||||
IDS_2141 "CD-ROMイメージ (*.ISO;*.CUE)\0*.ISO;*.CUE\0すべてのファイル (*.*)\0*.*\0"
|
||||
IDS_2142 "%hs デバイスの設定"
|
||||
IDS_2142 "%hs のデバイス設定"
|
||||
IDS_2143 "モニターのスリープ モード"
|
||||
IDS_2144 "OpenGLシェーダー (*.GLSL)\0*.GLSL\0すべてのファイル (*.*)\0*.*\0"
|
||||
IDS_2145 "OpenGL設定"
|
||||
IDS_2146 "サポートされていない設定を読み込んでいます"
|
||||
IDS_2146 "読み込んでいる設定がサポートされません"
|
||||
IDS_2147 "選択したマシンに基づくCPUタイプのフィルター機能は、使用中のマシンでは無効になっています。\n\nこれにより、選択したマシンと互換性のないCPUが選択できます。しかし、マシンのBIOSや他のソフトウェアと互換性がない場合があります。\n\nこの設定を有効にすることは公式にはサポートされておらず、バグレポートは無効として中止される可能性があります。"
|
||||
IDS_2148 "続行"
|
||||
IDS_2149 "カセット: %s"
|
||||
@@ -515,18 +515,18 @@ BEGIN
|
||||
IDS_2151 "カートリッジ %i: %ls"
|
||||
IDS_2152 "カートリッジ イメージ (*.A;*.B;*.JRC)\0*.A;*.B;*.JRC\0すべてのファイル (*.*)\0*.*\0"
|
||||
IDS_2153 "レンダラーの初期化エラー"
|
||||
IDS_2154 "OpenGL (3.0コア) レンダラーが初期化できませんでした。別のレンダラーを使用してください。"
|
||||
IDS_2154 "OpenGL (3.0コア) レンダラーが初期化できません。別のレンダラーを使用してください。"
|
||||
IDS_2155 "実行を再開"
|
||||
IDS_2156 "実行を一時停止"
|
||||
IDS_2157 "Ctrl+Alt+DELを押し"
|
||||
IDS_2158 "Ctrl+Alt+Escを押し"
|
||||
IDS_2157 "Ctrl+Alt+DELを押す"
|
||||
IDS_2158 "Ctrl+Alt+Escを押す"
|
||||
IDS_2159 "ハードリセット"
|
||||
IDS_2160 "ACPIシャットダウン"
|
||||
IDS_2161 "設定"
|
||||
IDS_2162 "タイプ"
|
||||
IDS_2163 "Dynarecなし"
|
||||
IDS_2164 "旧型Dynarec"
|
||||
IDS_2165 "新型Dynarec"
|
||||
IDS_2163 "動的再コンパイル禁止"
|
||||
IDS_2164 "旧型の動的再コンパイル"
|
||||
IDS_2165 "新型の動的再コンパイル"
|
||||
IDS_2166 "「roms/video」ディレクトリにROMがないため、ビデオカード#2「%hs」は使用できません。2枚目のビデオカードを無効にします。"
|
||||
IDS_2167 "ネットワーク ドライバの初期化に失敗しました。"
|
||||
IDS_2168 "ネットワーク設定がヌル ドライバに切り替えられます"
|
||||
@@ -537,7 +537,7 @@ BEGIN
|
||||
IDS_4096 "ハード ディスク (%s)"
|
||||
IDS_4097 "%01i:%01i"
|
||||
IDS_4098 "%01i"
|
||||
IDS_4099 "MFM/RLLまたはESDIのCD-ROMドライブが存在しません"
|
||||
IDS_4099 "MFM/RLLやESDI CD-ROMドライブが存在しません"
|
||||
IDS_4100 "カスタム..."
|
||||
IDS_4101 "カスタム (大容量)..."
|
||||
IDS_4102 "新規のディスクを追加"
|
||||
@@ -572,7 +572,7 @@ BEGIN
|
||||
IDS_4131 "親VHDの選択"
|
||||
IDS_4132 "親イメージが差分イメージの作成の後に変更される可能性があります。\n\nイメージ ファイルが移動またはコピーされたか、イメージ ファイルを作成したプログラムにバグが発生した可能性があります。\n\nタイム スタンプを修正しますか?"
|
||||
IDS_4133 "親ディスクと子ディスクのタイム スタンプが一致しません"
|
||||
IDS_4134 "VHD のタイム スタンプを修正できませんでした。"
|
||||
IDS_4134 "VHD のタイム スタンプを修正できません。"
|
||||
IDS_4135 "%01i:%02i"
|
||||
|
||||
IDS_4352 "MFM/RLL"
|
||||
@@ -624,7 +624,7 @@ BEGIN
|
||||
IDS_5910 "5.25"" 1 GB"
|
||||
IDS_5911 "5.25"" 1.3 GB"
|
||||
|
||||
IDS_6144 "規定のRPM"
|
||||
IDS_6144 "既定RPM"
|
||||
IDS_6145 "1%低いRPM"
|
||||
IDS_6146 "1.5%低いRPM"
|
||||
IDS_6147 "2%低いRPM"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "86box",
|
||||
"version-string": "4.0",
|
||||
"version-string": "4.0.1",
|
||||
"homepage": "https://86box.net/",
|
||||
"documentation": "https://86box.readthedocs.io/",
|
||||
"license": "GPL-2.0-or-later",
|
||||
|
||||
Reference in New Issue
Block a user