New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update cellSpudll #2651
Merged
Merged
Update cellSpudll #2651
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,47 @@ | ||
#include "stdafx.h" | ||
#include "Emu/Cell/PPUModule.h" | ||
|
||
namespace vm { using namespace ps3; } | ||
#include "cellSpudll.h" | ||
|
||
logs::channel cellSpudll("cellSpudll", logs::level::notice); | ||
|
||
s32 cellSpudllGetImageSize(vm::ptr<u32> psize, vm::cptr<void> so_elf, vm::cptr<struct CellSpudllHandleConfig> config) | ||
s32 cellSpudllGetImageSize(vm::ptr<u32> psize, vm::cptr<void> so_elf, vm::cptr<CellSpudllHandleConfig> config) | ||
{ | ||
fmt::throw_exception("Unimplemented" HERE); | ||
cellSpudll.todo("cellSpudllGetImageSize(psize=*0x%x, so_elf=*0x%x, config=*0x%x)", psize, so_elf, config); | ||
|
||
if (!psize || !so_elf) | ||
{ | ||
return CELL_SPUDLL_ERROR_NULL_POINTER; | ||
} | ||
|
||
// todo | ||
|
||
return CELL_OK; | ||
} | ||
|
||
s32 cellSpudllHandleConfigSetDefaultValues(vm::ptr<struct CellSpudllHandleConfig> config) | ||
s32 cellSpudllHandleConfigSetDefaultValues(vm::ptr<CellSpudllHandleConfig> config) | ||
{ | ||
fmt::throw_exception("Unimplemented" HERE); | ||
cellSpudll.trace("cellSpudllHandleConfigSetDefaultValues(config=*0x%x)", config); | ||
|
||
if (!config) | ||
{ | ||
return CELL_SPUDLL_ERROR_NULL_POINTER; | ||
} | ||
|
||
config->mode = 0; | ||
config->dmaTag = 0; | ||
config->numMaxReferred = 16; | ||
config->unresolvedSymbolValueForFunc = vm::null; | ||
config->unresolvedSymbolValueForObject = vm::null; | ||
config->unresolvedSymbolValueForOther = vm::null; | ||
|
||
std::memset(config->__reserved__, 0, sizeof(config->__reserved__)); | ||
|
||
return CELL_OK; | ||
} | ||
|
||
DECLARE(ppu_module_manager::cellSpudll)("cellSpudll", []() | ||
{ | ||
REG_FUNC(cellSpudll, cellSpudllGetImageSize); | ||
REG_FUNC(cellSpudll, cellSpudllHandleConfigSetDefaultValues); | ||
REG_FUNC(cellSpudll, cellSpudllHandleConfigSetDefaultValues).flags = MFF_PERFECT; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#pragma once | ||
|
||
namespace vm { using namespace ps3; } | ||
|
||
enum | ||
{ | ||
CELL_SPUDLL_ERROR_INVAL = 0x80410602, | ||
CELL_SPUDLL_ERROR_STAT = 0x8041060f, | ||
CELL_SPUDLL_ERROR_ALIGN = 0x80410610, | ||
CELL_SPUDLL_ERROR_NULL_POINTER = 0x80410611, | ||
CELL_SPUDLL_ERROR_SRCH = 0x80410605, | ||
CELL_SPUDLL_ERROR_UNDEF = 0x80410612, | ||
CELL_SPUDLL_ERROR_FATAL = 0x80410613, | ||
}; | ||
|
||
struct CellSpudllHandleConfig | ||
{ | ||
be_t<u32> mode; | ||
be_t<u32> dmaTag; | ||
be_t<u32> numMaxReferred; | ||
be_t<u32> numMaxDepend; | ||
vm::bptr<void> unresolvedSymbolValueForFunc; | ||
vm::bptr<void> unresolvedSymbolValueForObject; | ||
vm::bptr<void> unresolvedSymbolValueForOther; | ||
be_t<u32> __reserved__[9]; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure about these three lines above. I have wanted to use NULL but found vm::null instead. Is that correct ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's ok. Note that
using namespace ps3;
should only be used in cpp files.