partially revived platform support for PSP (unfinished)

just to have a platform with an unusal screen resolution
- suspend/resume handling probably non-working
- no scaling settings
- no image generation
currently no intentions to finish this.
This commit is contained in:
kub 2021-01-10 12:09:18 +01:00
parent f821bb7011
commit cdc6aac4c0
17 changed files with 961 additions and 2468 deletions

View file

@ -12,6 +12,9 @@
#if defined(USE_BGR555)
#define PXCONV(t) (t)
#define PXPRIO 0x8000 // prio in MSB
#elif defined(USE_BGR565)
#define PXCONV(t) (((t)&m1) | (((t)&(m2|m3)) << 1))
#define PXPRIO 0x0020 // prio in LS green bit
#else // RGB565
#define PXCONV(t) ((((t)&m1) << 11) | (((t)&m2) << 1) | (((t)&m3) >> 10))
#define PXPRIO 0x0020 // prio in LS green bit

View file

@ -148,7 +148,11 @@ char *PDebugSpriteList(void)
}
#define GREEN1 0x0700
#ifdef USE_BGR555
#if defined(USE_BGR555)
#define YELLOW1 0x039c
#define BLUE1 0x7800
#define RED1 0x001e
#elif defined(USE_BGR565)
#define YELLOW1 0x071c
#define BLUE1 0xf000
#define RED1 0x001e

View file

@ -69,6 +69,10 @@ u32 VdpSATCache[128]; // VDP sprite cache (1st 32 sprite attr bits)
#define PXCONV(t) ((t & 0x000e000e)<< 1) | ((t & 0x00e000e0)<<2) | ((t & 0x0e000e00)<<3)
#define PXMASKL 0x04210421 // 0x0c630c63, LSB for all colours
#define PXMASKH 0x39ce39ce // 0x3def3def, all but MSB for all colours
#elif defined(USE_BGR565)
#define PXCONV(t) ((t & 0x000e000e)<< 1) | ((t & 0x00e000e0)<<3) | ((t & 0x0e000e00)<<4)
#define PXMASKL 0x08610861 // 0x18e318e3
#define PXMASKH 0x738e738e // 0x7bef7bef
#else // RGB565
#define PXCONV(t) ((t & 0x000e000e)<<12) | ((t & 0x00e000e0)<<3) | ((t & 0x0e000e00)>>7)
#define PXMASKL 0x08610861 // 0x18e318e3
@ -2004,7 +2008,7 @@ void PicoDrawSetOutFormat(pdso_t which, int use_32x_line_mode)
void PicoDrawSetOutBufMD(void *dest, int increment)
{
if (FinalizeLine == FinalizeLine8bit && increment == 328) {
if (FinalizeLine == FinalizeLine8bit && increment >= 328) {
// kludge for no-copy mode
PicoDrawSetInternalBuf(dest, increment);
}

View file

@ -8,7 +8,7 @@
*
* this is highly specialized, be careful if changing related C code!
*
* NB only does RGB565 output, BGR555 isn't supported
* NB only does RGB565 output, BGR isn't supported
*/
#include "pico_int_offs.h"

View file

@ -337,9 +337,12 @@ void PicoDoHighPal555M4(void)
/* cram is always stored as shorts, even though real hardware probably uses bytes */
for (i = 0x20/2; i > 0; i--, spal++, dpal++) {
t = *spal;
#ifdef USE_BGR555
#if defined(USE_BGR555)
t = ((t & 0x00030003)<< 3) | ((t & 0x000c000c)<<6) | ((t & 0x00300030)<<9);
t |= (t >> 2) | ((t >> 4) & 0x04210421);
#elif defined(USE_BGR565)
t = ((t & 0x00030003)<< 3) | ((t & 0x000c000c)<<7) | ((t & 0x00300030)<<10);
t |= (t >> 2) | ((t >> 4) & 0x08610861);
#else
t = ((t & 0x00030003)<<14) | ((t & 0x000c000c)<<7) | ((t & 0x00300030)>>1);
t |= (t >> 2) | ((t >> 4) & 0x08610861);