disable unused aica regs

This commit is contained in:
Anthony Pesch 2016-01-24 15:24:05 -08:00
parent 57944b3ceb
commit 631a23c11f
5 changed files with 29 additions and 29 deletions

View File

@ -8,7 +8,7 @@ using namespace dvm::hw::holly;
AICA::AICA(Dreamcast *dc) : dc_(dc) {}
bool AICA::Init() {
aica_regs_ = dc_->aica_regs();
// aica_regs_ = dc_->aica_regs();
wave_ram_ = dc_->wave_ram();
return true;
@ -27,17 +27,17 @@ bool AICA::Init() {
// return cycles;
// }
uint32_t AICA::ReadRegister(void *ctx, uint32_t addr) {
AICA *self = reinterpret_cast<AICA *>(ctx);
// LOG_INFO("AICA::ReadRegister32 0x%x", addr);
return dvm::load<uint32_t>(&self->aica_regs_[addr]);
}
// uint32_t AICA::ReadRegister(void *ctx, uint32_t addr) {
// AICA *self = reinterpret_cast<AICA *>(ctx);
// // LOG_INFO("AICA::ReadRegister32 0x%x", addr);
// return dvm::load<uint32_t>(&self->aica_regs_[addr]);
// }
void AICA::WriteRegister(void *ctx, uint32_t addr, uint32_t value) {
AICA *self = reinterpret_cast<AICA *>(ctx);
// LOG_INFO("AICA::WriteRegister32 0x%x", addr);
dvm::store(&self->aica_regs_[addr], value);
}
// void AICA::WriteRegister(void *ctx, uint32_t addr, uint32_t value) {
// AICA *self = reinterpret_cast<AICA *>(ctx);
// // LOG_INFO("AICA::WriteRegister32 0x%x", addr);
// dvm::store(&self->aica_regs_[addr], value);
// }
uint32_t AICA::ReadWave(void *ctx, uint32_t addr) {
AICA *self = reinterpret_cast<AICA *>(ctx);

View File

@ -15,15 +15,15 @@ class AICA {
bool Init();
static uint32_t ReadRegister(void *ctx, uint32_t addr);
static void WriteRegister(void *ctx, uint32_t addr, uint32_t value);
// static uint32_t ReadRegister(void *ctx, uint32_t addr);
// static void WriteRegister(void *ctx, uint32_t addr, uint32_t value);
static uint32_t ReadWave(void *ctx, uint32_t addr);
static void WriteWave(void *ctx, uint32_t addr, uint32_t value);
private:
hw::Dreamcast *dc_;
uint8_t *aica_regs_;
// uint8_t *aica_regs_;
uint8_t *wave_ram_;
};
}

View File

@ -155,16 +155,16 @@ bool Dreamcast::MapMemory() {
nullptr,
&PVR2::WriteRegister,
nullptr);
RegionHandle aica_reg_handle = memory_->AllocRegion(
AICA_REG_START, AICA_REG_SIZE, aica(),
nullptr,
nullptr,
&AICA::ReadRegister,
nullptr,
nullptr,
nullptr,
&AICA::WriteRegister,
nullptr);
// RegionHandle aica_reg_handle = memory_->AllocRegion(
// AICA_REG_START, AICA_REG_SIZE, aica(),
// nullptr,
// nullptr,
// &AICA::ReadRegister,
// nullptr,
// nullptr,
// nullptr,
// &AICA::WriteRegister,
// nullptr);
RegionHandle wave_ram_handle = memory_->AllocRegion(
WAVE_RAM_START, WAVE_RAM_SIZE, aica(),
nullptr,
@ -248,7 +248,7 @@ bool Dreamcast::MapMemory() {
memmap.Mount(a7_handle, AREA7_SIZE, AREA7_START);
memmap.Mount(holly_handle, HOLLY_REG_SIZE, HOLLY_REG_START);
memmap.Mount(pvr_reg_handle, PVR_REG_SIZE, PVR_REG_START);
memmap.Mount(aica_reg_handle, AICA_REG_SIZE, AICA_REG_START);
// memmap.Mount(aica_reg_handle, AICA_REG_SIZE, AICA_REG_START);
memmap.Mount(wave_ram_handle, WAVE_RAM_SIZE, WAVE_RAM_START);
memmap.Mount(pvr_vram64_handle, PVR_VRAM64_SIZE, PVR_VRAM64_START);
memmap.Mount(ta_cmd_handle, TA_CMD_SIZE, TA_CMD_START);
@ -282,7 +282,7 @@ bool Dreamcast::MapMemory() {
wave_ram_ = memory_->virtual_base() + WAVE_RAM_START;
palette_ram_ = memory_->virtual_base() + PVR_PALETTE_START;
video_ram_ = memory_->virtual_base() + PVR_VRAM32_START;
aica_regs_ = memory_->virtual_base() + AICA_REG_START;
// aica_regs_ = memory_->virtual_base() + AICA_REG_START;
ram_ = memory_->virtual_base() + MAIN_RAM_1_START;
return true;

View File

@ -139,7 +139,7 @@ enum {
class Dreamcast {
public:
uint8_t *aica_regs() { return aica_regs_; }
// uint8_t *aica_regs() { return aica_regs_; }
Register *holly_regs() { return holly_regs_; }
Register *pvr_regs() { return pvr_regs_; }
@ -192,7 +192,7 @@ class Dreamcast {
private:
bool MapMemory();
uint8_t *aica_regs_;
// uint8_t *aica_regs_;
uint8_t *bios_;
uint8_t *flash_;
uint8_t *palette_ram_;

View File

@ -336,7 +336,7 @@ void SH4::WriteSQ(void *ctx, uint32_t addr, T value) {
uint32_t SH4::CompilePC() {
SH4CodeCache *code_cache = s_current_cpu->code_cache_;
SH4Context *ctx = &s_current_cpu->ctx_;
BlockEntry *block = code_cache->CompileBlock(ctx.pc, ctx);
BlockEntry *block = code_cache->CompileBlock(ctx->pc, ctx);
return block->run();
}