mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-06 15:48:05 -04:00
eliminate texrels, part 3
This commit is contained in:
parent
6027c719ba
commit
98a2714234
16 changed files with 125 additions and 112 deletions
|
@ -155,11 +155,11 @@ static void blit(const char *fps, const char *notice)
|
|||
}
|
||||
// a hack for VR
|
||||
if (PicoAHW & PAHW_SVP)
|
||||
memset32((int *)(PicoDraw2FB+328*8+328*223), 0xe0e0e0e0, 328);
|
||||
memset32((int *)(Pico.est.Draw2FB+328*8+328*223), 0xe0e0e0e0, 328);
|
||||
if (!(Pico.video.reg[12]&1)) lines_flags|=0x10000;
|
||||
if (currentConfig.EmuOpt&0x4000)
|
||||
lines_flags|=0x40000; // (Pico.m.frame_count&1)?0x20000:0x40000;
|
||||
vidCpy8to16((unsigned short *)giz_screen+321*8, PicoDraw2FB+328*8, localPal, lines_flags);
|
||||
vidCpy8to16((unsigned short *)giz_screen+321*8, Pico.est.Draw2FB+328*8, localPal, lines_flags);
|
||||
}
|
||||
else if (!(emu_opt&0x80))
|
||||
{
|
||||
|
@ -187,7 +187,7 @@ static void blit(const char *fps, const char *notice)
|
|||
if (!(Pico.video.reg[12]&1)) lines_flags|=0x10000;
|
||||
if (currentConfig.EmuOpt&0x4000)
|
||||
lines_flags|=0x40000; // (Pico.m.frame_count&1)?0x20000:0x40000;
|
||||
vidCpy8to16((unsigned short *)giz_screen+321*8, PicoDraw2FB+328*8, localPal, lines_flags);
|
||||
vidCpy8to16((unsigned short *)giz_screen+321*8, Pico.est.Draw2FB+328*8, localPal, lines_flags);
|
||||
}
|
||||
|
||||
if (notice || (emu_opt & 2)) {
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
* - 8bpp tile renderer
|
||||
* In 32x mode:
|
||||
* - 32x layer is overlayed on top of 16bpp one
|
||||
* - line internal one done on PicoDraw2FB, then mixed with 32x
|
||||
* - tile internal one done on PicoDraw2FB, then mixed with 32x
|
||||
* - line internal one done on .Draw2FB, then mixed with 32x
|
||||
* - tile internal one done on .Draw2FB, then mixed with 32x
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
@ -311,8 +311,8 @@ static int make_local_pal_md(int fast_mode)
|
|||
pallen = 0x100;
|
||||
}
|
||||
else if (Pico.est.rendstatus & PDRAW_SONIC_MODE) { // mid-frame palette changes
|
||||
bgr444_to_rgb32(localPal+0x40, HighPal);
|
||||
bgr444_to_rgb32(localPal+0x80, HighPal+0x40);
|
||||
bgr444_to_rgb32(localPal+0x40, Pico.est.HighPal);
|
||||
bgr444_to_rgb32(localPal+0x80, Pico.est.HighPal+0x40);
|
||||
}
|
||||
else
|
||||
memcpy32(localPal+0x80, localPal, 0x40); // for spr prio mess
|
||||
|
@ -355,9 +355,9 @@ void pemu_finalize_frame(const char *fps, const char *notice)
|
|||
}
|
||||
// a hack for VR
|
||||
if (PicoAHW & PAHW_SVP)
|
||||
memset32((int *)(PicoDraw2FB+328*8+328*223), 0xe0e0e0e0, 328);
|
||||
memset32((int *)(Pico.est.Draw2FB+328*8+328*223), 0xe0e0e0e0, 328);
|
||||
// do actual copy
|
||||
vidcpyM2(g_screen_ptr, PicoDraw2FB+328*8,
|
||||
vidcpyM2(g_screen_ptr, Pico.est.Draw2FB+328*8,
|
||||
!(Pico.video.reg[12] & 1), !(PicoOpt & POPT_DIS_32C_BORDER));
|
||||
}
|
||||
else if (get_renderer() == RT_8BIT_ACC)
|
||||
|
|
|
@ -70,8 +70,8 @@ void pemu_finalize_frame(const char *fps, const char *notice)
|
|||
{
|
||||
if (currentConfig.renderer != RT_16BIT && !(PicoAHW & PAHW_32X)) {
|
||||
unsigned short *pd = (unsigned short *)g_screen_ptr + 8 * g_screen_width;
|
||||
unsigned char *ps = PicoDraw2FB + 328*8 + 8;
|
||||
unsigned short *pal = HighPal;
|
||||
unsigned char *ps = Pico.est.Draw2FB + 328*8 + 8;
|
||||
unsigned short *pal = Pico.est.HighPal;
|
||||
int i, x;
|
||||
if (Pico.m.dirtyPal)
|
||||
PicoDrawUpdateHighPal();
|
||||
|
@ -101,7 +101,7 @@ static void apply_renderer(void)
|
|||
case RT_8BIT_ACC:
|
||||
PicoOpt &= ~POPT_ALT_RENDERER;
|
||||
PicoDrawSetOutFormat(PDF_8BIT, 0);
|
||||
PicoDrawSetOutBuf(PicoDraw2FB + 8, 328);
|
||||
PicoDrawSetOutBuf(Pico.est.Draw2FB + 8, 328);
|
||||
break;
|
||||
case RT_8BIT_FAST:
|
||||
PicoOpt |= POPT_ALT_RENDERER;
|
||||
|
|
|
@ -36,7 +36,7 @@ int sceAudio_E0727056(int volume, void *buffer); // blocking output
|
|||
int sceAudioOutput2GetRestSample();
|
||||
|
||||
|
||||
//unsigned char *PicoDraw2FB = (unsigned char *)VRAM_CACHED_STUFF + 8; // +8 to be able to skip border with 1 quadword..
|
||||
//unsigned char *Draw2FB = (unsigned char *)VRAM_CACHED_STUFF + 8; // +8 to be able to skip border with 1 quadword..
|
||||
int engineStateSuspend;
|
||||
|
||||
#define PICO_PEN_ADJUST_X 4
|
||||
|
@ -400,9 +400,9 @@ void blit1(void)
|
|||
int i;
|
||||
unsigned char *pd;
|
||||
// clear top and bottom trash
|
||||
for (pd = PicoDraw2FB+8, i = 8; i > 0; i--, pd += 512)
|
||||
for (pd = Pico.est.Draw2FB+8, i = 8; i > 0; i--, pd += 512)
|
||||
memset32((int *)pd, 0xe0e0e0e0, 320/4);
|
||||
for (pd = PicoDraw2FB+512*232+8, i = 8; i > 0; i--, pd += 512)
|
||||
for (pd = Pico.est.Draw2FB+512*232+8, i = 8; i > 0; i--, pd += 512)
|
||||
memset32((int *)pd, 0xe0e0e0e0, 320/4);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue