\r
#include "vid.h"\r
#include "../Engine.h"\r
-#include <Pico/PicoInt.h>\r
+#include <pico/pico_int.h>\r
#include "../../common/emu.h"\r
#include "blit.h"\r
#include "debug.h"\r
static void *screenbuff = 0; // pointer to real device video memory\r
//static\r
extern "C" { unsigned char *PicoDraw2FB = 0; } // temporary buffer\r
-const int framebuffsize = (8+320)*(8+240+8)*2+8*2; // actual framebuffer size (in bytes+to support new rendering mode)\r
+const int framebuffsize = (8+320)*(8+240+8)*2+8*2; // PicoDraw2FB size (in bytes+to support new rendering mode)\r
\r
// drawer function pointers\r
static void (*drawTextFps)(const char *text) = 0;\r
vidConvCpy_90(pd, ps, localPal, 320/8);\r
else {\r
if(full) vidClear(pd, 32);\r
- pd += 256*32;\r
+ pd += (240+VID_BORDER_R)*32;\r
vidConvCpy_90(pd, ps, localPal, 256/8);\r
- if(full) vidClear(pd + 256*256, 32);\r
+ if(full) vidClear(pd + (240+VID_BORDER_R)*256, 32);\r
}\r
}\r
\r
vidConvCpy_270(pd, ps, localPal, 320/8);\r
else {\r
if(full) vidClear(pd, 32);\r
- pd += 256*32;\r
+ pd += (240+VID_BORDER_R)*32;\r
ps -= 64; // the blitter starts copying from the right border, so we need to adjust\r
vidConvCpy_270(pd, ps, localPal, 256/8);\r
- if(full) vidClear(pd + 256*256, 32);\r
+ if(full) vidClear(pd + (240+VID_BORDER_R)*256, 32);\r
}\r
}\r
\r
\r
if(Pico.video.reg[12]&1) ps += 32;\r
vidConvCpy_center_0(pd, ps, localPal);\r
- if(full) vidClear(pd + 224*256, 96);\r
+ if(full) vidClear(pd + (240+VID_BORDER_R)*224, 96);\r
}\r
\r
\r
\r
if(Pico.video.reg[12]&1) ps += 32;\r
vidConvCpy_center_180(pd, ps, localPal);\r
- if(full) vidClear(pd + 224*256, 96);\r
+ if(full) vidClear(pd + (240+VID_BORDER_R)*224, 96);\r
}\r
\r
\r
static void vidBlitFit_0(int full)\r
{\r
if(Pico.video.reg[12]&1)\r
- vidConvCpy_center2_40c_0(screenbuff, PicoDraw2FB+328*8, localPal, 168);\r
+ vidConvCpy_center2_40c_0(screenbuff, PicoDraw2FB+328*8, localPal, 168);\r
else vidConvCpy_center2_32c_0(screenbuff, PicoDraw2FB+328*8, localPal, 168);\r
- if(full) vidClear((unsigned long *)screenbuff + 168*256, 320-168);\r
+ if(full) vidClear((unsigned long *)screenbuff + (240+VID_BORDER_R)*168, 320-168);\r
}\r
\r
\r
if(Pico.video.reg[12]&1)\r
vidConvCpy_center2_40c_180(screenbuff, PicoDraw2FB+328*8, localPal, 168);\r
else vidConvCpy_center2_32c_180(screenbuff, PicoDraw2FB+328*8-64, localPal, 168);\r
- if(full) vidClear((unsigned long *)screenbuff + 168*256, 320-168);\r
+ if(full) vidClear((unsigned long *)screenbuff + (240+VID_BORDER_R)*168, 320-168);\r
}\r
\r
\r
if(Pico.video.reg[12]&1)\r
vidConvCpy_center2_40c_0(screenbuff, PicoDraw2FB+328*8, localPal, 224);\r
else vidConvCpy_center2_32c_0(screenbuff, PicoDraw2FB+328*8, localPal, 224);\r
- if(full) vidClear((unsigned long *)screenbuff + 224*256, 96);\r
+ if(full) vidClear((unsigned long *)screenbuff + (240+VID_BORDER_R)*224, 96);\r
}\r
\r
\r
if(Pico.video.reg[12]&1)\r
vidConvCpy_center2_40c_180(screenbuff, PicoDraw2FB+328*8, localPal, 224);\r
else vidConvCpy_center2_32c_180(screenbuff, PicoDraw2FB+328*8-64, localPal, 224);\r
- if(full) vidClear((unsigned long *)screenbuff + 224*256, 96);\r
+ if(full) vidClear((unsigned long *)screenbuff + (240+VID_BORDER_R)*224, 96);\r
}\r
\r
-\r
static void vidBlitCfg(void)\r
{\r
unsigned short *ps = (unsigned short *) PicoDraw2FB;\r
//for (int i = 1; i < 320; i++, ps += 240, pd += 256)\r
// vidConvCpyRGB32(pd, ps, 240);\r
\r
- for (i = 0; i < 320; i++, pd += 16)\r
+ for (i = 0; i < 320; i++, pd += VID_BORDER_R)\r
for (int u = 0; u < 240; u++, ps++, pd++)\r
*pd = ((*ps & 0xf) << 20) | ((*ps & 0xf0) << 8) | ((*ps & 0xf00) >> 4);\r
}\r
// select suitable blitters\r
vidBlit = vidBlit_270;\r
PicoScanBegin = EmuScanBegin8;\r
+ PicoScanEnd = NULL;\r
drawTextFps = drawTextFps0;\r
drawTextNotice = drawTextNotice0;\r
\r
vidBlit = vidBlitFit_0;\r
drawTextFps = drawTextFpsFit0;\r
drawTextNotice = drawTextNoticeFit0;\r
+ PicoScanBegin = NULL;\r
PicoScanEnd = EmuScanEndFit0;\r
}\r
} else if (currentConfig.rotation == TPicoConfig::PRot90) {\r
vidBlit = vidBlitFit_180;\r
drawTextFps = drawTextFpsFit0;\r
drawTextNotice = drawTextNoticeFit0;\r
+ PicoScanBegin = NULL;\r
PicoScanEnd = EmuScanEndFit0;\r
}\r
}\r