mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-06 15:48:05 -04:00
32x, add support for h32 mode rendering
This commit is contained in:
parent
23cd73bc8f
commit
52e4a905c8
6 changed files with 79 additions and 31 deletions
|
@ -8,6 +8,14 @@
|
|||
*/
|
||||
#include "../pico_int.h"
|
||||
|
||||
// NB: 32X officially doesn't support H32 mode. However, it does work since the
|
||||
// cartridge slot carries the EDCLK signal which is always H40 clock and is used
|
||||
// as video clock by the 32X. The H32 MD image is overlayed with the 320 px 32X
|
||||
// image which has the same on-screen width. How the /YS signal on the cartridge
|
||||
// slot (signalling the display of background color) is processed in this case
|
||||
// is however unclear and might lead to glitches due to race conditions by the
|
||||
// different video clocks for H32 and H40.
|
||||
|
||||
// BGR555 to native conversion
|
||||
#if defined(USE_BGR555)
|
||||
#define PXCONV(t) ((t)&(mr|mg|mb|mp))
|
||||
|
@ -122,8 +130,6 @@ void FinalizeLine32xRGB555(int sh, int line, struct PicoEState *est)
|
|||
FinalizeLine555(sh, line, est);
|
||||
|
||||
if ((Pico32x.vdp_regs[0] & P32XV_Mx) == 0 || // 32x blanking
|
||||
// XXX: how is 32col mode handled by real hardware?
|
||||
!(Pico.video.reg[12] & 1) || // 32col mode
|
||||
(Pico.video.debug_p & PVD_KILL_32X))
|
||||
{
|
||||
return;
|
||||
|
@ -310,14 +316,6 @@ void PicoDraw32xLayerMdOnly(int offs, int lines)
|
|||
int poffs = 0, plen = 320;
|
||||
int l, p;
|
||||
|
||||
if (!(Pico.video.reg[12] & 1)) {
|
||||
// 32col mode. for some render modes MD pixel data carries an offset
|
||||
if (!(PicoIn.opt & POPT_DIS_32C_BORDER))
|
||||
pmd += 32;
|
||||
poffs = 32;
|
||||
plen = 256;
|
||||
}
|
||||
|
||||
PicoDrawUpdateHighPal();
|
||||
|
||||
dst += poffs;
|
||||
|
@ -350,6 +348,8 @@ void PicoDrawSetOutFormat32x(pdso_t which, int use_32x_line_mode)
|
|||
PicoDrawSetInternalBuf(NULL, 0);
|
||||
PicoDrawSetOutBufMD(Pico.est.Draw2FB, 328);
|
||||
}
|
||||
// always need upscaling for H32, before mixing in 32X layer
|
||||
PicoIn.opt |= POPT_EN_SOFTSCALE;
|
||||
|
||||
if (use_32x_line_mode)
|
||||
// we'll draw via FinalizeLine32xRGB555 (rare)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue