Compare commits

..

50 commits

Author SHA1 Message Date
Luke Usher
3515449200 Merge branch 'testbed' 2024-06-07 20:05:04 +01:00
Luke Usher
6aba34fe0d Merge branch 'master' of https://github.com/cxbx-reloaded/cxbx-reloaded 2024-06-07 20:04:53 +01:00
Luke Usher
a3b2306b12 Merge branch 'master' of https://github.com/cxbx-reloaded/cxbx-reloaded into testbed 2024-06-07 20:04:18 +01:00
PatrickvL
bfae57175e
Merge pull request #2458 from LukeUsher/fix-compilation-vs2022 2024-05-25 11:02:05 +02:00
Luke Usher
23134a1d44 chihiro: merge experimental Chihiro emulation 2024-05-23 09:55:44 +01:00
Luke Usher
00939039c4 Revert "Update dependencies"
This ended up fetching SDL3 which broke the build

This reverts commit 643ce9207c.
2024-05-23 09:46:24 +01:00
Luke Usher
4cdb5f5cba Merge remote-tracking branch 'ergo720/less_busy_loops' into testbed 2024-05-23 09:22:33 +01:00
Luke Usher
5eb505a71b EmuX86: Let invalid memory accesses trigger a warning rather than a fatal error
This seems to resolve most regressions we have had in recent history.
2024-05-22 14:02:38 +01:00
Luke Usher
eb2381eb8e Merge branch 'fix-compilation-vs2022' 2024-05-22 12:50:04 +01:00
Luke Usher
953c91a8c2
Merge pull request #2457 from Ryce-Fast/master
Update dependencies
2024-05-22 12:48:43 +01:00
Ryce-Fast
643ce9207c Update dependencies
I have updated the dependencies that I think are worth updating. SDL2 notably adds new compatible controllers.
2024-03-14 14:06:25 +01:00
Luke Usher
c3f52e33cc chihiro: prevent JVS register updates from being missed due to long delays
This really needs a better solution, but for now, this will do.
2023-10-29 11:37:44 +01:00
Luke Usher
78f7e097d5 chihiro: emulate a chihiro system when boot.id is present 2023-10-29 11:37:44 +01:00
Luke Usher
30e00d8f24 chihiro: fix an issue where media board detection failed due to instant response time 2023-10-29 11:37:44 +01:00
RadWolfie
04ce11fd87 Cleanly rebase chihiro-work on develop
Co-authored-by: Luke Usher <luke.usher@outlook.com>
Co-authored-by: wutno <aaron@installgentoo.net>
Co-authored-by: RadWolfie <RadWolfie@users.noreply.github.com>
2023-10-29 11:37:44 +01:00
ergo720
7563dd3ecf Never change the thread priority on the host and the disable boost flag too
This fixes almost all the games that were broken in this branch
2023-04-05 17:48:31 +02:00
ergo720
32ec4ee6f9 Use a DPC for expired timers + don't execute NV2A DPCs from the timer thread to avoid the exception overhead 2023-04-01 19:17:20 +02:00
ergo720
e89b5b2130 Fixed an issue in WaitApc where the wait block was not removed when using a zero timeout or when satisfied by a user APC + properly lock the wait block operations to avoid a race between SatisfyWait and KiTimerExpiration 2023-03-31 15:53:28 +02:00
ergo720
709108b045 Implemented PTIMER alarm interrupt of NV2A + fixed a bug in timer_init
This fixes DOAU showing the dirty disk error in PAL50 mode
2023-03-28 17:59:11 +02:00
ergo720
ccd77fcf4d Fixed wrong nv2a clock frequency
This is accessed by DOAU via PTIMER only in PAL50 mode
2023-03-26 21:26:30 +02:00
ergo720
ea1657018f Fixed a bug in KeTickCount + check all timer indices when we are late in KiClockIsr
This almost completely fixes the slowness in Panzer Dragoon Orta
2023-03-23 01:54:45 +01:00
ergo720
ac31523b09 Make sure to reset WaitStatus when a new wait starts
This fixes an issue in Panzer Dragoon Orta, where KeDelayExecutionThread would return X_STATUS_TIMEOUT | X_STATUS_USER_APC
2023-03-22 21:42:34 +01:00
ergo720
680340f53d Make sure that GetNativeHandle succeeds before attempting to get the native handle
This fixes a sporadic crash in Panzer Dragoon Orta, where the title calls KeSetBasePriorityThread on a thread that has already terminated
2023-03-22 20:51:21 +01:00
ergo720
c292874487 Fixed a bug in KiInsertTimerTable + log all objects being waited on in NtWaitForMultipleObjectsEx
This fixes a crash in Metal Slug 3
2023-03-22 12:17:00 +01:00
ergo720
9238ae3f81 Account for partial milliseconds in KiClockIsr
This fixes the slowness in The lord of the rings: the third era
2023-03-22 12:17:00 +01:00
ergo720
e454e901cc Fixed a race condition in WaitApc + removed wrong InsertTailList for ktimers used during a timeout
This fixes almost all broken games in this branch. Still broken: PDO: 1 fps vs 10 fps, DOA3: freezes after title screen, Lord of the rings The third era: Unable to determine default Xbox backbuffer error???
2023-03-22 12:17:00 +01:00
ergo720
253c198421 Always create a wait object even when we satisfy the wait on the host side + fixed a bug in KiWaitTestNoYield
This fixes an occasionl freeze in Steel Battalion + the slowness in JSRF
2023-03-22 12:16:59 +01:00
ergo720
8cefa8ba8f Revert to using the host to do thread suspension 2023-03-19 23:01:44 +01:00
ergo720
c3b3a1b107 Hack: <= thread priority instead of >= 2023-03-19 23:01:43 +01:00
ergo720
745f450a6c Setup a KTIMER for the other functions using WaitApc too 2023-03-19 23:01:43 +01:00
ergo720
fad4120841 Restore single interrupt loop in update_non_periodic_events 2023-03-19 23:01:43 +01:00
ergo720
9e3873d1df Place nvnet in its own thread 2023-03-19 23:01:43 +01:00
ergo720
7dc2ac080f Use get_now directly in system_events instead of qpc 2023-03-19 23:01:43 +01:00
ergo720
5d510752e6 Adjust KeSystemTime when the host system time is changed by the user 2023-03-19 23:01:42 +01:00
ergo720
b72cfaa909 Account for delays between calls to KiClockIsr
This fixes the slowness in the dashboard
2023-03-19 23:01:42 +01:00
ergo720
32b4393085 Raise priority of system events thread 2023-03-19 23:01:42 +01:00
ergo720
4ea6ecd247 Removed delta amount added to KeSystemTime 2023-03-19 23:01:42 +01:00
ergo720
c828d586db Fixed thread order initialization when a thread starts suspended 2023-03-19 23:01:41 +01:00
ergo720
d1c9883604 Make sure to hold the DPC lock until the DPC list has been emptied
This fixes a crash in Lord of the rings: The fellowship of the ring
2023-03-19 23:01:41 +01:00
ergo720
f52e261c4a Implemented kernel unwait routines + updated/fixed KeWaitForMultipleObjects and KeWaitForSingleObject 2023-03-19 23:01:41 +01:00
ergo720
e323ad50b5 Only change the priority of a thread if it is being set above normal 2023-03-19 23:01:41 +01:00
ergo720
b1ee59fab2 Unpatch D3DDevice_BlockUntilVerticalBlank and D3DDevice_SetVerticalBlankCallback 2023-03-19 23:01:40 +01:00
ergo720
6e63ecd7cc Avoid triggering multiple gpu interrupts outside the vblank 2023-03-19 23:01:40 +01:00
ergo720
c349fbbc00 Moved position of ObfDereferenceObject in NtSuspendThread 2023-03-19 23:01:40 +01:00
ergo720
d8ae1892b4 Removed scaling hack in KeInterruptTime and KeTickCount + added yield in system_events routine
This fixes the stuttering in Halo 2, Metal slug 3, JSRF and restores PDO, PSO to the same state as in master
2023-03-19 23:01:39 +01:00
ergo720
c7c107720e Implemented suspend/resume kernel Nt routines with the corresponding Ke routines 2023-03-19 23:01:39 +01:00
ergo720
d11a5e8773 Fixed a bug in KeSetBasePriorityThread 2023-03-19 23:01:39 +01:00
ergo720
6d8bd34049 Merge many different periodic events in a single thread, instead of each having its own busy loop
This merges vblank, ohci's eof, pit interrupt, dsound sync and async workers, nvnet packet processing and system interrupt
2023-03-19 23:01:39 +01:00
ergo720
a3fda7b275 Merge lle and hle vblank routines in a single thread 2023-03-19 23:01:39 +01:00
ergo720
2476ad43b0 Removed unnecessary lock in the interrupt thread 2023-03-19 23:01:39 +01:00
14 changed files with 60 additions and 118 deletions

112
.github/labeler.yml vendored
View file

@ -1,111 +1,75 @@
# Labels are in alphabetical order. # Labels are in alphabetical order.
cmake: cmake:
- changed-files: - 'CMake*'
- any-glob-to-any-file: - '**/CMakeLists.txt'
- 'CMake*' - '**/*.cmake'
- '**/CMakeLists.txt'
- '**/*.cmake'
cpu-emulation: cpu-emulation:
- changed-files: - 'src/devices/x86/**'
- any-glob-to-any-file:
- 'src/devices/x86/**'
deployment: deployment:
- changed-files: - '*.yml'
- any-glob-to-any-file: - '.github/workflows/CI.yml'
- '*.yml'
- '.github/workflows/CI.yml'
file-system: file-system:
- changed-files: - 'src/core/kernel/support/EmuFile*'
- any-glob-to-any-file:
- 'src/core/kernel/support/EmuFile*'
graphics: graphics:
- changed-files: - 'src/core/hle/D3D8/**'
- any-glob-to-any-file: - 'src/core/hle/XGRAPHIC/**'
- 'src/core/hle/D3D8/**' - 'src/devices/video/**'
- 'src/core/hle/XGRAPHIC/**' - 'src/gui/*Video*'
- 'src/devices/video/**'
- 'src/gui/*Video*'
HLE: HLE:
- changed-files: - 'src/core/hle/**'
- any-glob-to-any-file: - 'src/core/kernel/**'
- 'src/core/hle/**'
- 'src/core/kernel/**'
informational: informational:
- changed-files: - '**/*Logging*'
- any-glob-to-any-file: - '**/*Logging*/**'
- '**/*Logging*' - '**/README.md'
- '**/*Logging*/**'
- '**/README.md'
input: input:
- changed-files: - 'src/common/input/**'
- any-glob-to-any-file: - 'src/core/hle/XAPI/input/**'
- 'src/common/input/**' - 'src/devices/usb/**'
- 'src/core/hle/XAPI/input/**' - 'src/gui/controllers/**'
- 'src/devices/usb/**' - 'src/gui/*Input*'
- 'src/gui/controllers/**'
- 'src/gui/*Input*'
kernel: kernel:
- changed-files: - 'src/core/kernel/**'
- any-glob-to-any-file:
- 'src/core/kernel/**'
LLE: LLE:
- changed-files: - 'src/devices/**'
- any-glob-to-any-file:
- 'src/devices/**'
memory: memory:
- changed-files: - 'src/core/kernel/memory-manager/**'
- any-glob-to-any-file:
- 'src/core/kernel/memory-manager/**'
networking: networking:
- changed-files: - 'src/core/hle/XONLINE/**'
- any-glob-to-any-file: - 'src/devices/network/**'
- 'src/core/hle/XONLINE/**' - 'src/gui/*Network*'
- 'src/devices/network/**'
- 'src/gui/*Network*'
sound: sound:
- changed-files: - 'src/common/audio/**'
- any-glob-to-any-file: - 'src/core/hle/DSOUND/**'
- 'src/common/audio/**' - 'src/core/hle/XACTENG/**'
- 'src/core/hle/DSOUND/**' - 'src/devices/audio/**'
- 'src/core/hle/XACTENG/**' - 'src/gui/*Audio*'
- 'src/devices/audio/**'
- 'src/gui/*Audio*'
modules: modules:
- changed-files: - 'import/**'
- any-glob-to-any-file:
- 'import/**'
threading: threading:
- changed-files: - 'src/core/kernel/support/EmuFS*'
- any-glob-to-any-file:
- 'src/core/kernel/support/EmuFS*'
timing: timing:
- changed-files: - 'src/common/Timer*'
- any-glob-to-any-file:
- 'src/common/Timer*'
user interface: user interface:
- changed-files: - 'src/core/common/imgui/*'
- any-glob-to-any-file: - 'src/gui/**'
- 'src/core/common/imgui/*'
- 'src/gui/**'
xbdm: xbdm:
- changed-files: - 'src/common/xbdm/**'
- any-glob-to-any-file:
- 'src/common/xbdm/**'

View file

@ -30,21 +30,19 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
configuration: [Release, Debug] configuration: [Release, Debug]
vsver: [2019] vsver: [2022]
winver: [7]
sdkver: [10.0.22621.0]
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with: with:
submodules: recursive submodules: recursive
- name: Generate CMake files - name: Generate CMake files
run: cmake -B build -A Win32,version=${{ matrix.sdkver }} -DCMAKE_SYSTEM_VERSION=${{ matrix.winver }} run: cmake -B build -A Win32
- name: Build - name: Build
run: cmake --build build --config ${{ matrix.configuration }} -j $env:NUMBER_OF_PROCESSORS run: cmake --build build --config ${{ matrix.configuration }} -j $env:NUMBER_OF_PROCESSORS
- name: Prepare artifacts - name: Prepare artifacts
if: matrix.configuration == 'Release' if: matrix.configuration == 'Release'
run: cmake --install build --config ${{ matrix.configuration }} --prefix artifacts run: cmake --install build --config ${{ matrix.configuration }} --prefix artifacts
- uses: actions/upload-artifact@v4 - uses: actions/upload-artifact@v3
if: matrix.configuration == 'Release' if: matrix.configuration == 'Release'
with: with:
name: CxbxReloaded-${{ matrix.configuration }}-VS${{ matrix.vsver }} name: CxbxReloaded-${{ matrix.configuration }}-VS${{ matrix.vsver }}
@ -61,7 +59,7 @@ jobs:
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Download artifacts - name: Download artifacts
uses: actions/download-artifact@v4 uses: actions/download-artifact@v3
with: with:
path: artifacts path: artifacts
- name: Re-zip artifacts - name: Re-zip artifacts

View file

@ -7,9 +7,9 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v3
- name: Automatically close issues that don't follow the issue template - name: Automatically close issues that don't follow the issue template
uses: ergo720/auto-close-issues@v1 uses: ergo720/auto-close-issues@v1.0.4
with: with:
github-token: ${{ secrets.GITHUB_TOKEN }} github-token: ${{ secrets.GITHUB_TOKEN }}
issue-close-message: "@${issue.user.login}: your issue has been automatically closed because it does not follow the issue template." # optional property issue-close-message: "@${issue.user.login}: your issue has been automatically closed because it does not follow the issue template." # optional property

View file

@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Labeler - name: Labeler
uses: actions/labeler@v5 uses: actions/labeler@v4
with: with:
repo-token: ${{ secrets.GITHUB_TOKEN }} repo-token: ${{ secrets.GITHUB_TOKEN }}
sync-labels: true sync-labels: true

2
.gitmodules vendored
View file

@ -1,6 +1,6 @@
[submodule "import/subhook"] [submodule "import/subhook"]
path = import/subhook path = import/subhook
url = https://github.com/Cxbx-Reloaded/subhook.git url = https://github.com/Zeex/subhook.git
shallow = true shallow = true
[submodule "import/cs_x86"] [submodule "import/cs_x86"]
path = import/cs_x86 path = import/cs_x86

2
import/SDL2 vendored

@ -1 +1 @@
Subproject commit fa24d868ac2f8fd558e4e914c9863411245db8fd Subproject commit b424665e0899769b200231ba943353a5fee1b6b6

View file

@ -46,7 +46,7 @@ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
# Enable Chihiro work # Enable Chihiro work
CHIHIRO_WORK CHIHIRO_WORK
) )
# Reference: https://docs.microsoft.com/en-us/cpp/build/reference/compiler-options-listed-alphabetically # Reference: https://docs.microsoft.com/en-us/cpp/build/reference/compiler-options-listed-alphabetically
add_compile_options( add_compile_options(
# Catch synchronous (C++) exceptions only # Catch synchronous (C++) exceptions only
@ -68,7 +68,7 @@ XXH_INLINE_ALL
) )
file (GLOB RESOURCES file (GLOB RESOURCES
"${CXBXR_ROOT_DIR}/CONTRIBUTORS" "${CXBXR_ROOT_DIR}/CONTRIBUTORS"
"${CXBXR_ROOT_DIR}/COPYING" "${CXBXR_ROOT_DIR}/COPYING"
"${CXBXR_ROOT_DIR}/README.md" "${CXBXR_ROOT_DIR}/README.md"
@ -90,7 +90,7 @@ source_group(TREE ${CXBXR_ROOT_DIR}/import PREFIX import FILES
${CXBXR_SOURCE_EMU_IMPORT} ${CXBXR_SOURCE_EMU_IMPORT}
) )
source_group(TREE ${CXBXR_ROOT_DIR}/src PREFIX source FILES source_group(TREE ${CXBXR_ROOT_DIR}/src PREFIX source FILES
${CXBXR_SOURCE_GUIv1} ${CXBXR_SOURCE_GUIv1}
${CXBXR_SOURCE_COMMON} ${CXBXR_SOURCE_COMMON}
) )
@ -121,7 +121,7 @@ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
# Reference: https://docs.microsoft.com/en-us/cpp/build/reference/compiler-options-listed-alphabetically # Reference: https://docs.microsoft.com/en-us/cpp/build/reference/compiler-options-listed-alphabetically
# /Zi = create a PDB file without affecting optimization # /Zi = create a PDB file without affecting optimization
# /Ob3 = Controls inline expansion of functions. # /Ob2 = Controls inline expansion of functions.
# /Oi = Generate intrinsic functions # /Oi = Generate intrinsic functions
# /Ot = In favor of using fast code than small code # /Ot = In favor of using fast code than small code
# /GL = Whole program optimization # /GL = Whole program optimization
@ -132,7 +132,7 @@ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
# Set optimization options for release build # Set optimization options for release build
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} \ set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} \
/Zi \ /Zi \
/Ob3 \ /Ob2 \
/Oi \ /Oi \
/Ot \ /Ot \
/GL \ /GL \
@ -142,7 +142,7 @@ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
/Qpar \ /Qpar \
" "
) )
# disable optimization for CxbxKrnl.cpp file # disable optimization for CxbxKrnl.cpp file
set_source_files_properties( set_source_files_properties(
${CXBXR_KRNL_CPP} PROPERTIES COMPILE_FLAGS "/Od /GL-" ${CXBXR_KRNL_CPP} PROPERTIES COMPILE_FLAGS "/Od /GL-"
@ -150,7 +150,7 @@ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
endif() endif()
# Windows libraries # Windows libraries
set(WINS_LIB set(WINS_LIB
legacy_stdio_definitions legacy_stdio_definitions
d3d9 d3d9
d3dcompiler d3dcompiler
@ -170,7 +170,6 @@ set(WINS_LIB
comctl32 comctl32
XINPUT9_1_0 XINPUT9_1_0
Iphlpapi Iphlpapi
Dwmapi
) )
target_link_libraries(cxbx target_link_libraries(cxbx

View file

@ -131,7 +131,7 @@ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
# Set optimization options for release build # Set optimization options for release build
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} \ set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} \
/Zi \ /Zi \
/Ob3 \ /Ob2 \
/Oi \ /Oi \
/Ot \ /Ot \
/GL \ /GL \
@ -144,7 +144,7 @@ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
endif() endif()
# Windows libraries # Windows libraries
set(WINS_LIB set(WINS_LIB
legacy_stdio_definitions legacy_stdio_definitions
d3d9 d3d9
d3dcompiler d3dcompiler

View file

@ -178,7 +178,7 @@ void JVS_Init()
std::string baseBoardBackupRamPath = "backup_ram.bin"; std::string baseBoardBackupRamPath = "backup_ram.bin";
if (!JVS_LoadFile((romPath + "\\" + baseBoardQcFirmwarePath).c_str(), g_BaseBoardQcFirmware)) { if (!JVS_LoadFile((romPath + "\\" + baseBoardQcFirmwarePath).c_str(), g_BaseBoardQcFirmware)) {
CxbxrAbort("Failed to load base board firmware: %s", baseBoardQcFirmwarePath.c_str()); ("Failed to load base board firmware: %s", baseBoardQcFirmwarePath.c_str());
} }
if (!JVS_LoadFile((romPath + "\\" + baseBoardScFirmwarePath).c_str(), g_BaseBoardScFirmware)) { if (!JVS_LoadFile((romPath + "\\" + baseBoardScFirmwarePath).c_str(), g_BaseBoardScFirmware)) {

View file

@ -281,17 +281,6 @@ XBSYSAPI EXPORTNUM(66) xbox::ntstatus_xt NTAPI xbox::IoCreateFile
// Force ShareAccess to all // Force ShareAccess to all
ShareAccess = FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE; ShareAccess = FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE;
// Force set DELETE permission flag if write attributes flag is set.
// Testcase: dashupdate.xbe (4928, untested with other versions but newer dashupdate did not call for deletion on fail).
if (DesiredAccess & FILE_WRITE_ATTRIBUTES) {
DesiredAccess |= DELETE;
}
// Force sanitize before call to NtDll::NtCreateFile
// Testcase:
// * Exhibition Demo discs - Attempt to create music folder fail internally which then show unable to copy soundtrack dialog.
FileAttributes &= FILE_ATTRIBUTE_VALID_FLAGS;
if (SUCCEEDED(ret)) if (SUCCEEDED(ret))
{ {
// redirect to NtCreateFile // redirect to NtCreateFile

View file

@ -153,8 +153,7 @@ void InitXboxHardware(HardwareModel hardwareModel)
// Create devices // Create devices
g_MCPX = new MCPXDevice(mcpx_revision); g_MCPX = new MCPXDevice(mcpx_revision);
// TODO: For Chihiro, different games modes require different DIP switch settings
// TODO: For Chihiro, different games modes require different DIP switch settings
// Chihiro FilterBoard dip-switches 6,7,8 change this value! // Chihiro FilterBoard dip-switches 6,7,8 change this value!
g_SMC = new SMCDevice(smc_revision, IS_CHIHIRO(hardwareModel) ? 0 : 1); // 0 = AV_PACK_SCART, 1 = AV_PACK_HDTV. Chihiro doesn't support HDTV! g_SMC = new SMCDevice(smc_revision, IS_CHIHIRO(hardwareModel) ? 0 : 1); // 0 = AV_PACK_SCART, 1 = AV_PACK_HDTV. Chihiro doesn't support HDTV!
// SMC uses different AV_PACK values than the Kernel // SMC uses different AV_PACK values than the Kernel
@ -165,7 +164,7 @@ void InitXboxHardware(HardwareModel hardwareModel)
g_ADM1032 = new ADM1032Device(); g_ADM1032 = new ADM1032Device();
g_USB0 = new USBDevice(); g_USB0 = new USBDevice();
if (IS_CHIHIRO(hardwareModel)) { if (g_bIsChihiro) {
g_MediaBoard = new MediaBoard(); g_MediaBoard = new MediaBoard();
char MediaBoardMountPath[xbox::max_path]; char MediaBoardMountPath[xbox::max_path];
g_EmuShared->GetTitleMountPath(MediaBoardMountPath); g_EmuShared->GetTitleMountPath(MediaBoardMountPath);

View file

@ -63,7 +63,6 @@ uint32_t MediaBoard::LpcRead(uint32_t addr, int size)
case 0x4020: return 0x00A0; // XBAM String (SEGABOOT reports Media Board is not present if these values change) case 0x4020: return 0x00A0; // XBAM String (SEGABOOT reports Media Board is not present if these values change)
case 0x4022: return 0x4258; // Continued case 0x4022: return 0x4258; // Continued
case 0x4024: return 0x4D41; // Continued case 0x4024: return 0x4D41; // Continued
// TODO: Find a way to make the switch between Type-1 and Type-3 (internal value holder maybe?)
case 0x40F0: return 0x0000; // Media Board Type (Type-1 vs Type-3), 0x0000 = Type-1, 0x0100 = Type-3 case 0x40F0: return 0x0000; // Media Board Type (Type-1 vs Type-3), 0x0000 = Type-1, 0x0100 = Type-3
case 0x40F4: return 0x03; // 1GB case 0x40F4: return 0x03; // 1GB
} }

View file

@ -61,7 +61,7 @@ typedef struct {
uint8_t day; // 0x2B uint8_t day; // 0x2B
uint8_t videoMode; // 0x2C unknown bitmask, resolutions + horizontal/vertical uint8_t videoMode; // 0x2C unknown bitmask, resolutions + horizontal/vertical
uint8_t unknown3; uint8_t unknown3;
uint8_t type3Compatible; // 0x2E (Type-3 compatible titles have this set to 1) uint8_t type3Compatible; // 0x2E (Type-3 compatibile titles have this set to 1)
uint8_t unknown4; uint8_t unknown4;
char gameId[8]; // 0x30 char gameId[8]; // 0x30
uint32_t regionFlags; // 0x38 uint32_t regionFlags; // 0x38

View file

@ -56,8 +56,6 @@
#undef GetSystemMetrics // Force remove DirectX 8's multimon.h defined function (redirect to xGetSystemMetrics). #undef GetSystemMetrics // Force remove DirectX 8's multimon.h defined function (redirect to xGetSystemMetrics).
#include <WinUser.h> // For GetSystemMetrics #include <WinUser.h> // For GetSystemMetrics
#include <dwmapi.h> // For DwmSetWindowAttribute
#include <io.h> #include <io.h>
#include <shlobj.h> #include <shlobj.h>
@ -325,10 +323,6 @@ LRESULT CALLBACK WndMain::WndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lP
ChangeWindowMessageFilterEx(hwnd, WM_COPYDATA, MSGFLT_ALLOW, nullptr); ChangeWindowMessageFilterEx(hwnd, WM_COPYDATA, MSGFLT_ALLOW, nullptr);
ChangeWindowMessageFilterEx(hwnd, 0x0049, MSGFLT_ALLOW, nullptr); ChangeWindowMessageFilterEx(hwnd, 0x0049, MSGFLT_ALLOW, nullptr);
// Remove rounded corners from the render window on Windows 11
const DWM_WINDOW_CORNER_PREFERENCE corner_preference = DWMWCP_DONOTROUND;
DwmSetWindowAttribute(hwnd, DWMWA_WINDOW_CORNER_PREFERENCE, &corner_preference, sizeof(corner_preference));
m_bCreated = true; m_bCreated = true;
} }
break; break;