Skip to content

Commit

Permalink
HLE cellGcmSys: Make IOTable accurate
Browse files Browse the repository at this point in the history
Affects cellGcmAddressToOffset when using addresses above 0xC0000000
  • Loading branch information
elad335 authored and AniLeo committed Feb 19, 2020
1 parent 1aa1144 commit 6de91a1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
9 changes: 4 additions & 5 deletions rpcs3/Emu/Cell/Modules/cellGcmSys.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,12 @@ void InitOffsetTable()
{
const auto cfg = g_fxo->get<gcm_config>();

cfg->offsetTable.ioAddress.set(vm::alloc(3072 * sizeof(u16), vm::main));
cfg->offsetTable.eaAddress.set(vm::alloc(512 * sizeof(u16), vm::main));
const u32 addr = vm::alloc((3072 + 512) * sizeof(u16), vm::main);

std::memset(cfg->offsetTable.ioAddress.get_ptr(), 0xFF, 3072 * sizeof(u16));
std::memset(cfg->offsetTable.eaAddress.get_ptr(), 0xFF, 512 * sizeof(u16));
cfg->offsetTable.ioAddress.set(addr);
cfg->offsetTable.eaAddress.set(addr + (3072 * sizeof(u16)));

cfg->reserved_size = 0;
std::memset(vm::base(addr), 0xFF, (3072 + 512) * sizeof(u16));
}

//----------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion rpcs3/Emu/Cell/Modules/cellGcmSys.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ struct gcm_config
CellGcmContextData current_context;
gcmInfo gcm_info;

CellGcmOffsetTable offsetTable;
CellGcmOffsetTable offsetTable{};
u16 IoMapTable[0xC00]{};
shared_mutex gcmio_mutex;

Expand Down

0 comments on commit 6de91a1

Please sign in to comment.