Age | Commit message (Collapse) | Author |
|
After the dynarec writes new instructions, it has to flush the
instruction and data caches. Some of these flush operations are
privileged on the 3DS, so the clear cache functions have to run
through svcBackdoor. The Nintendo implementation (and CFW
reimplementation) of svcBackdoor has a problem where interrupts and
context switches will cause crashes.
Even though we can disable interrupts in the flush function, there's
still a window of time between svcBackdoor being called and the
function being run where an interrupt will corrupt the stack.
Luma3DS implemements a svcCustomBackdoor call we can use that also
runs a function in supervisor mode, but uses an implementation that
avoids this problem.
|
|
Merge upstream changes
|
|
|
|
This reverts commit 7070d5c660963aec56e1d667211b4a09a62d400d.
|
|
Reset is common when using runahead, this seems to prevent crashes
when resets occur rapidly.
|
|
Also prefer MAP_FIXED_NOREPLACE over MAP_FIXED, as it won't remove old memory maps
|
|
The original code did not have a license header, and as a result was
licensed under the GPLv2 which means that it was impossible to link it
with LGPL code.
The new code originates from MAME and is under a BSD-3-Clause license,
which is GPL-compatible, and also much cleaner.
Signed-off-by: Paul Cercueil <paul@crapouillou.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Lightrec dynarec
|
|
For some Eboot .PBP game images, when loading a savestate, a zlib error
like 'uncompress failed with -5 for block 5383, sector 86132' would be
output to stdout/stderr. The savestate would still be playable, though.
Traced it down to cdrFreeze() failing to convert cdr.Prev from BCD->int
when calling ReadTrack(). Note that the odd 'cdr.Prev[0]++;' line seems
to be someone's hacky way of forcing ReadTrack() to avoid skipping what
it thinks is a duplicate sector read.
|
|
Signed-off-by: Paul Cercueil <paul@crapouillou.net>
|
|
This permits the Lightrec dynarec to emit better code.
Signed-off-by: Paul Cercueil <paul@crapouillou.net>
|
|
Update psxbios.c
|
|
|
|
Update
|
|
|
|
For some Eboot .PBP game images, when loading a savestate, a zlib error
like 'uncompress failed with -5 for block 5383, sector 86132' would be
output to stdout/stderr. The savestate would still be playable, though.
Traced it down to cdrFreeze() failing to convert cdr.Prev from BCD->int
when calling ReadTrack(). Note that the odd 'cdr.Prev[0]++;' line seems
to be someone's hacky way of forcing ReadTrack() to avoid skipping what
it thinks is a duplicate sector read.
|
|
Basic Guncon support
|
|
same syntaxis as beetle-psx, name the sbi file after the pbp and append an underscore and the number of the disc at the end.
|
|
|
|
- This is fixed by adding the missing SaveMcd() to buwrite().
Tested on Wild Arms and Breath of Fire III
|
|
- silence a few more truncated warnings
- change "disable" to "disabled" in core options
|
|
- Save files for games that are suppose to work with HLE bios are now corrupted from the last HLE BIOS improvements PR.
- This only affects memcard 2 slot when enabled and used. Saves on memcard 1 are fine since those are directly handled through the Libretro API.
- This is fixed by adding the missing SaveMcd() to buwrite().
Tested on Wild Arms and Breath of Fire III
NOTE: HLE bios is still not compatible for most games. For example, memory card save functions are broken or does not work at all. Most of Konami games i have tested does not work with HLE BIOS for memory card saves.
|
|
- This just silences some [-Wpointer-sign] warning from last PR
|
|
- Wild Arms EU and US version has non-standard string (probably for region protection) causing auto-region detection to fail and wrong CDROM info in log.
- This fix sanitizes the string name to remove unneeded characters ("EXE\" in this case that comes before the serial-number). This would sanitize the CD-ROM info in log as well.
|
|
-strncpy replaced with strcpy and memcpy where appropriate
|
|
- Increasing the maximum size of destination char array to x2 to silence this warning.
|
|
|
|
|
|
- this should silence warning for another PACKAGE_VERSION define used for flac
- PACKAGE_VERSION is not used within pcsx other than version logging. Savestate does not check for this and is using another define for savestate version number.
|
|
- Merge update from https://github.com/libretro/pcsx_rearmed
|
|
- at least one game (Wild Arms) is continouos spamming the log window. Silence this in a way that its easy to enable when need to.
- Remove unnecessary message in Makefile
|
|
HLE BIOS improvements (based on nocash doc, pcsx4all, upstream pcsxr etc...)
|
|
Notaz said this could corrupt the emulator (even though
the console allowed this and it was a bug) so limit it to 0x3FF.
|
|
This should work as intended now.
|
|
This fixes Looney Tunes Sheep Raiders.
|
|
According to nocash PSX doc, ChangeThread and CloseThread should
always return 1. Fix it accordingly.
|
|
|
|
See Garbage Area at Address 00000000h in Nocash PSX Specifications for more inf>
R-types will refuse to boot if psxM[0] is zero.
Fade to Black can crash upon memory card access if psxM[5] is set to the wrong >
Crash Team Racing will refuse to boot if psxM[2] and psxM[3] are not zero.
(Previously, that region of memory would be overwritten above. No explanation why.)
It's set as such according to nocash :
[00000000h]=3C1A0000h ;<-- but overwritten by 00000003h after soon
[00000004h]=275A0C80h ;<-- or 275A0C50h (in older BIOS)
[00000008h]=03400008h
[0000000Ch]=00000000h
Note that setting 00000000h to 00000003h doesn't work for R-types.
|
|
|
|
I already fixed this for bufile :
ptr = Mcd##mcd##Data + 128 * (nfile + 1); \
instead of
ptr = Mcd##mcd##Data + 128 * nfile; \
But i forgot to also fix psxBios_firstfile accordingly.
So nfile would still start from block 2 and it would
cause all kinds of issues.
This was the original comment on pcsxr codeplex
as my patch was based on it :
"The HLE-Bios start to read memory card blocks at block 2. You need to change
ptr = Mcd##mcd##Data + 128 * nfile; \ to
ptr = Mcd##mcd##Data + 128 * (nfile + 1); \
for #define bufile(mcd) { \ and changing nfile = 1; to nfile = 0; for psxBios_firstfile() { // 42 Starts numbering slots in the right position."
|
|
|