diff --git a/src/FrameBuffer.cpp b/src/FrameBuffer.cpp index 411c63ea..ebadd77f 100644 --- a/src/FrameBuffer.cpp +++ b/src/FrameBuffer.cpp @@ -1255,8 +1255,11 @@ bool FrameBufferList::RdpUpdate::update(RdpUpdateResult & _result) _result.vi_maxhpass = hres_clamped ? 0 : 7; _result.vi_width = _SHIFTR(*REG.VI_WIDTH, 0, 12); _result.vi_lowerfield = lowerfield; - //_result.vi_origin = _SHIFTR(*REG.VI_ORIGIN, 0, 24); +#ifndef NATIVE + _result.vi_origin = _SHIFTR(*REG.VI_ORIGIN, 0, 24); +#else _result.vi_origin = *REG.VI_ORIGIN;//This is incorrect REG.VI_ORIGIN should contain only 24 bits of the frame buffer address +#endif _result.vi_fsaa = (*REG.VI_STATUS & 512) == 0; _result.vi_divot = (*REG.VI_STATUS & VI_STATUS_DIVOT_ENABLED) != 0; return true; diff --git a/src/native/Native.cpp b/src/native/Native.cpp index ed17b7bb..acc8f191 100644 --- a/src/native/Native.cpp +++ b/src/native/Native.cpp @@ -131,7 +131,6 @@ extern "C" { RDRAMSize = (word)-1; api().RomOpen(romName); - //config.frameBufferEmulation.aspect = Config::aAdjust; } void gfx_shutdown() { @@ -155,7 +154,6 @@ extern "C" { void gfx_fbe_enable(int enable) { config.frameBufferEmulation.enable = enable; - //gfx_resize(g_width, g_height); } void gfx_fbe_sync(GraphicsContext* gfxCtx, GameInfo* GameInfo) { @@ -171,15 +169,15 @@ extern "C" { gfxCtx->curFrameBuffer = &frameBuffers.getCurrent()->m_startAddress; gfxCtx->viMode->fldRegs->origin = frameBuffers.getCurrent()->m_startAddress; - cfb->fb1 = gfxCtx->curFrameBuffer; + cfb->fb1 = gfxCtx->curFrameBuffer; cfb->swapBuffer = gfxCtx->curFrameBuffer; cfb->viMode = gfxCtx->viMode; cfb->features = gfxCtx->viFeatures; - cfb->xScale = gfxCtx->xScale; - cfb->xScale = gfxCtx->yScale; - cfb->unk_10 = 0; - cfb->updateRate = R_UPDATE_RATE; + cfb->xScale = gfxCtx->xScale; + cfb->xScale = gfxCtx->yScale; + cfb->unk_10 = 0; + cfb->updateRate = (s8)R_UPDATE_RATE; REG.VI_STATUS = &cfb->viMode->comRegs.ctrl;