Comments (1)
The hang was because the param was not being filled in when the file does not have a valid handle.
The code below solves that ... but it still has problems - I think because the params are not right. Needs more investigation.
void CMcServ::Read(uint32* args, uint32 argsSize, uint32* ret, uint32 retSize, uint8* ram)
{
FILECMD* cmd = reinterpret_cast<FILECMD*>(args);
CLog::GetInstance().Print(LOG_NAME, "Read(handle = %i, size = 0x%08X, bufferAddress = 0x%08X, paramAddress = 0x%08X);\r\n",
cmd->handle, cmd->size, cmd->bufferAddress, cmd->paramAddress);
if(cmd->paramAddress != 0)
{
//This param buffer is used in the callback after calling this method... No clue what it's for
reinterpret_cast<uint32*>(&ram[cmd->paramAddress])[0] = 0;
reinterpret_cast<uint32*>(&ram[cmd->paramAddress])[1] = 0;
}
assert(cmd->bufferAddress != 0);
void* dst = &ram[cmd->bufferAddress];
auto file = GetFileFromHandle(cmd->handle);
if(file == nullptr)
{
ret[0] = -4;
}
else if(file->IsEOF())
{
ret[0] = 0;
}
else
{
ret[0] = static_cast<uint32>(file->Read(dst, cmd->size));
//Sync pointer for games that write after read without seeking or flushing
file->Seek(file->Tell(), Framework::STREAM_SEEK_SET);
}
}
from play-.
Related Issues (20)
- The iDOLM@STER io control board failure. HOT 3
- Dragon Chronicle Online - Great Sky Battle could not be started. HOT 1
- Namco 2x6 support on IOS, use bios, mcd files HOT 2
- Enabling JIT via TrollJitEnabler causes extreme lag
- Cannot emcmake Cmake play js for web browser. HOT 7
- HLE vs LLE mcServe differences HOT 2
- JVS deinterlace option for 2x6 HOT 2
- Problem with play_libretro.dll to run games Nanco System 2x6 does not accept .zip format
- Tekken 4/5 input issue HOT 1
- [Request] optimize vulkan (NVIDIA)
- Compatibility table with game list and current status
- Please add the ability to enable jit natively on ios when installing via trollstore. TrollJitEnabler.dylib doesnโt work and crashes the app. HOT 1
- Soul Calibur 2 opponent auto block HOT 1
- "Invalid ISO9660 Volume Descriptor" when booting Tekken 5 Dark Resurrection HOT 4
- Sony Dualshock 3 With Official Drivers is not Detected (Windows)
- [Request] Multi CPU/multi threading support
- Add auto frame Skip support in emulator
- Add support for PS2 bios in the play emulator! To feel that nostalgia on your cell phone HOT 1
- my roms aren't loading (chromebook web emulator) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from play-.