Merge remote-tracking branch 'origin/master' into dev

This commit is contained in:
Flyinghead 2023-07-30 18:05:38 +02:00
commit c637ae8281
7 changed files with 66 additions and 39 deletions

View File

@ -15,6 +15,7 @@ jobs:
CCACHE_DIR: ${{ github.workspace }}/.ccache CCACHE_DIR: ${{ github.workspace }}/.ccache
strategy: strategy:
fail-fast: false
matrix: matrix:
config: config:
- {name: i686-pc-windows-msvc, os: windows-latest, shell: cmd, arch: x86, cmakeArgs: -G Ninja, buildType: Release} - {name: i686-pc-windows-msvc, os: windows-latest, shell: cmd, arch: x86, cmakeArgs: -G Ninja, buildType: Release}

View File

@ -37,10 +37,6 @@ Join us on our [**Discord server**](https://discord.gg/X8YWP8w) for a chat.
### Xbox One/Series ![xbox logo](https://flyinghead.github.io/flycast-builds/xbox.png) ### Xbox One/Series ![xbox logo](https://flyinghead.github.io/flycast-builds/xbox.png)
#### Retail:
Open [**gamr13's github page**](https://gamr13.github.io/) from your Xbox console.
#### Dev Mode:
Grab the latest build from [**the builds page**](https://flyinghead.github.io/flycast-builds/), or the [**GitHub Actions**](https://github.com/flyinghead/flycast/actions/workflows/uwp.yml). Then install it using the **Xbox Device Portal**. Grab the latest build from [**the builds page**](https://flyinghead.github.io/flycast-builds/), or the [**GitHub Actions**](https://github.com/flyinghead/flycast/actions/workflows/uwp.yml). Then install it using the **Xbox Device Portal**.
### Binaries ![android](https://flyinghead.github.io/flycast-builds/android.jpg) ![windows](https://flyinghead.github.io/flycast-builds/windows.png) ![linux](https://flyinghead.github.io/flycast-builds/ubuntu.png) ![apple](https://flyinghead.github.io/flycast-builds/apple.png) ![switch](https://flyinghead.github.io/flycast-builds/switch.png) ![xbox](https://flyinghead.github.io/flycast-builds/xbox.png) ### Binaries ![android](https://flyinghead.github.io/flycast-builds/android.jpg) ![windows](https://flyinghead.github.io/flycast-builds/windows.png) ![linux](https://flyinghead.github.io/flycast-builds/ubuntu.png) ![apple](https://flyinghead.github.io/flycast-builds/apple.png) ![switch](https://flyinghead.github.io/flycast-builds/switch.png) ![xbox](https://flyinghead.github.io/flycast-builds/xbox.png)

View File

@ -279,8 +279,19 @@ static void emitDataProcOp(const ArmOp& op)
static void jump(const void *code) static void jump(const void *code)
{ {
ptrdiff_t offset = reinterpret_cast<uintptr_t>(code) - ass.GetBuffer()->GetStartAddress<uintptr_t>(); ptrdiff_t offset = reinterpret_cast<uintptr_t>(code) - ass.GetBuffer()->GetStartAddress<uintptr_t>();
Label code_label(offset); if (offset < -32 * 1024 * 1024 || offset >= 32 * 1024 * 1024)
ass.B(&code_label); {
INFO_LOG(AICA_ARM, "jump offset too large: %d", offset);
UseScratchRegisterScope scope(&ass);
Register reg = scope.Acquire();
ass.Mov(reg, (u32)code);
ass.Bx(reg);
}
else
{
Label code_label(offset);
ass.B(&code_label);
}
} }
static void call(const void *code, bool saveFlags = true) static void call(const void *code, bool saveFlags = true)
@ -288,8 +299,19 @@ static void call(const void *code, bool saveFlags = true)
if (saveFlags) if (saveFlags)
storeFlags(); storeFlags();
ptrdiff_t offset = reinterpret_cast<uintptr_t>(code) - ass.GetBuffer()->GetStartAddress<uintptr_t>(); ptrdiff_t offset = reinterpret_cast<uintptr_t>(code) - ass.GetBuffer()->GetStartAddress<uintptr_t>();
Label code_label(offset); if (offset < -32 * 1024 * 1024 || offset >= 32 * 1024 * 1024)
ass.Bl(&code_label); {
INFO_LOG(AICA_ARM, "call offset too large: %d", offset);
UseScratchRegisterScope scope(&ass);
Register reg = scope.Acquire();
ass.Mov(reg, (u32)code);
ass.Blx(reg);
}
else
{
Label code_label(offset);
ass.Bl(&code_label);
}
if (saveFlags) if (saveFlags)
loadFlags(); loadFlags();
} }

View File

@ -109,7 +109,7 @@ static void read_sectors_to(u32 addr, u32 sector, u32 count)
static void GDROM_HLE_ReadDMA() static void GDROM_HLE_ReadDMA()
{ {
u32 fad = gd_hle_state.params[0]; u32 fad = gd_hle_state.params[0] & 0xffffff;
u32 nsect = gd_hle_state.params[1]; u32 nsect = gd_hle_state.params[1];
u32 buffer = gd_hle_state.params[2]; u32 buffer = gd_hle_state.params[2];
// params[3] 0 // params[3] 0
@ -123,7 +123,7 @@ static void GDROM_HLE_ReadDMA()
static void GDROM_HLE_ReadPIO() static void GDROM_HLE_ReadPIO()
{ {
u32 fad = gd_hle_state.params[0]; u32 fad = gd_hle_state.params[0] & 0xffffff;
u32 nsect = gd_hle_state.params[1]; u32 nsect = gd_hle_state.params[1];
u32 buffer = gd_hle_state.params[2]; u32 buffer = gd_hle_state.params[2];
// params[3] seekAhead (wince) or 0 // params[3] seekAhead (wince) or 0
@ -309,8 +309,8 @@ static void GD_HLE_Command(gd_command cc)
case GDCC_PLAY2: case GDCC_PLAY2:
{ {
cdda.StartAddr.FAD = gd_hle_state.params[0]; cdda.StartAddr.FAD = gd_hle_state.params[0] & 0xffffff;
cdda.EndAddr.FAD = gd_hle_state.params[1]; cdda.EndAddr.FAD = gd_hle_state.params[1] & 0xffffff;
cdda.repeats = gd_hle_state.params[2]; cdda.repeats = gd_hle_state.params[2];
// params[3] debug (0) // params[3] debug (0)
DEBUG_LOG(REIOS, "GDROM: CMD PLAYSEC from %d to %d repeats %d", cdda.StartAddr.FAD, cdda.EndAddr.FAD, cdda.repeats); DEBUG_LOG(REIOS, "GDROM: CMD PLAYSEC from %d to %d repeats %d", cdda.StartAddr.FAD, cdda.EndAddr.FAD, cdda.repeats);
@ -337,7 +337,7 @@ static void GD_HLE_Command(gd_command cc)
case GDCC_SEEK: case GDCC_SEEK:
DEBUG_LOG(REIOS, "GDROM: CMD SEEK"); DEBUG_LOG(REIOS, "GDROM: CMD SEEK");
cdda.CurrAddr.FAD = cdda.StartAddr.FAD = gd_hle_state.params[0]; cdda.CurrAddr.FAD = cdda.StartAddr.FAD = gd_hle_state.params[0] & 0xffffff;
// params[1] debug (0) // params[1] debug (0)
cdda.status = cdda_t::Paused; cdda.status = cdda_t::Paused;
SecNumber.Status = GD_PAUSE; SecNumber.Status = GD_PAUSE;
@ -382,7 +382,7 @@ static void GD_HLE_Command(gd_command cc)
case GDCC_DMA_READ_REQ: case GDCC_DMA_READ_REQ:
{ {
u32 sector = gd_hle_state.params[0]; u32 sector = gd_hle_state.params[0] & 0xffffff;
u32 num = gd_hle_state.params[1]; u32 num = gd_hle_state.params[1];
DEBUG_LOG(REIOS, "GDROM: CMD READ Sector=%d, Num=%d", sector, num); DEBUG_LOG(REIOS, "GDROM: CMD READ Sector=%d, Num=%d", sector, num);
@ -509,7 +509,7 @@ static void GD_HLE_Command(gd_command cc)
case GDCC_MULTI_DMAREAD: case GDCC_MULTI_DMAREAD:
case GDCC_MULTI_PIOREAD: case GDCC_MULTI_PIOREAD:
{ {
u32 sector = gd_hle_state.params[0]; u32 sector = gd_hle_state.params[0] & 0xffffff;
u32 num = gd_hle_state.params[1]; u32 num = gd_hle_state.params[1];
// params[2] seekAhead (wince) // params[2] seekAhead (wince)
bool dma = cc == GDCC_MULTI_DMAREAD; bool dma = cc == GDCC_MULTI_DMAREAD;

View File

@ -708,6 +708,7 @@ void VulkanContext::CreateSwapChain()
renderCompleteSemaphores.push_back(device->createSemaphoreUnique(vk::SemaphoreCreateInfo())); renderCompleteSemaphores.push_back(device->createSemaphoreUnique(vk::SemaphoreCreateInfo()));
imageAcquiredSemaphores.push_back(device->createSemaphoreUnique(vk::SemaphoreCreateInfo())); imageAcquiredSemaphores.push_back(device->createSemaphoreUnique(vk::SemaphoreCreateInfo()));
} }
currentSemaphore = 0;
quadPipeline->Init(shaderManager.get(), *renderPass, 0); quadPipeline->Init(shaderManager.get(), *renderPass, 0);
quadPipelineWithAlpha->Init(shaderManager.get(), *renderPass, 0); quadPipelineWithAlpha->Init(shaderManager.get(), *renderPass, 0);
quadDrawer->Init(quadPipeline.get()); quadDrawer->Init(quadPipeline.get());

View File

@ -396,30 +396,37 @@ void input_sdl_handle()
case SDL_MOUSEBUTTONDOWN: case SDL_MOUSEBUTTONDOWN:
case SDL_MOUSEBUTTONUP: case SDL_MOUSEBUTTONUP:
gui_set_mouse_position(event.button.x, event.button.y);
gui_set_mouse_button(event.button.button - 1, event.button.state == SDL_PRESSED);
checkRawInput();
if (!config::UseRawInput)
{ {
if (!mouseCaptured || !gameRunning) Uint8 button;
sdl_mouse->setAbsPos(event.button.x, event.button.y); gui_set_mouse_position(event.button.x, event.button.y);
bool pressed = event.button.state == SDL_PRESSED; // Swap middle and right clicks for GUI
switch (event.button.button) { button = event.button.button;
case SDL_BUTTON_LEFT: if (button == SDL_BUTTON_MIDDLE || button == SDL_BUTTON_RIGHT)
sdl_mouse->setButton(Mouse::LEFT_BUTTON, pressed); button ^= 1;
break; gui_set_mouse_button(button - 1, event.button.state == SDL_PRESSED);
case SDL_BUTTON_RIGHT: checkRawInput();
sdl_mouse->setButton(Mouse::RIGHT_BUTTON, pressed); if (!config::UseRawInput)
break; {
case SDL_BUTTON_MIDDLE: if (!mouseCaptured || !gameRunning)
sdl_mouse->setButton(Mouse::MIDDLE_BUTTON, pressed); sdl_mouse->setAbsPos(event.button.x, event.button.y);
break; bool pressed = event.button.state == SDL_PRESSED;
case SDL_BUTTON_X1: switch (event.button.button) {
sdl_mouse->setButton(Mouse::BUTTON_4, pressed); case SDL_BUTTON_LEFT:
break; sdl_mouse->setButton(Mouse::LEFT_BUTTON, pressed);
case SDL_BUTTON_X2: break;
sdl_mouse->setButton(Mouse::BUTTON_5, pressed); case SDL_BUTTON_RIGHT:
break; sdl_mouse->setButton(Mouse::RIGHT_BUTTON, pressed);
break;
case SDL_BUTTON_MIDDLE:
sdl_mouse->setButton(Mouse::MIDDLE_BUTTON, pressed);
break;
case SDL_BUTTON_X1:
sdl_mouse->setButton(Mouse::BUTTON_4, pressed);
break;
case SDL_BUTTON_X2:
sdl_mouse->setButton(Mouse::BUTTON_5, pressed);
break;
}
} }
} }
break; break;

View File

@ -56569,7 +56569,7 @@ struct retro_core_options_v2 options_ru = {
#define OPTION_VAL_LIGHT_PURPLE_2_16_SK "Svetlofialová (2)" #define OPTION_VAL_LIGHT_PURPLE_2_16_SK "Svetlofialová (2)"
#define OPTION_VAL_LIGHT_GREEN_2_17_SK "Svetlozelená (2)" #define OPTION_VAL_LIGHT_GREEN_2_17_SK "Svetlozelená (2)"
#define OPTION_VAL_LIGHT_GREEN_3_18_SK "Svetlozelená (3)" #define OPTION_VAL_LIGHT_GREEN_3_18_SK "Svetlozelená (3)"
#define OPTION_VAL_LIGHT_CYAN_2_19_SK NULL #define OPTION_VAL_LIGHT_CYAN_2_19_SK "Svetloazúrová (2)"
#define OPTION_VAL_LIGHT_RED_2_20_SK "Svetločervená (2)" #define OPTION_VAL_LIGHT_RED_2_20_SK "Svetločervená (2)"
#define OPTION_VAL_MAGENTA_21_SK "Purpurová" #define OPTION_VAL_MAGENTA_21_SK "Purpurová"
#define OPTION_VAL_LIGHT_PURPLE_3_22_SK "Svetlofialová (3)" #define OPTION_VAL_LIGHT_PURPLE_3_22_SK "Svetlofialová (3)"