Merge pull request #144 from retro-wertz/vsuni_updates

Fix for vsunisystem input not working
This commit is contained in:
Twinaphex
2017-09-07 23:41:59 +02:00
committed by GitHub
5 changed files with 14 additions and 11 deletions

View File

@@ -591,7 +591,7 @@ void retro_get_system_av_info(struct retro_system_av_info *info)
static void check_system_specs(void)
{
// TODO - when we get it running at fullspeed on PSP, set to 4
/* TODO - when we get it running at fullspeed on PSP, set to 4 */
unsigned level = 5;
environ_cb(RETRO_ENVIRONMENT_SET_PERFORMANCE_LEVEL, &level);
}
@@ -707,7 +707,7 @@ void FCEUD_RegionOverride(int region)
FCEUPPU_SetVideoSystem(w || dendy);
SetSoundVariables();
// Update the geometry
/* Update the geometry */
retro_get_system_av_info(&av_info);
environ_cb(RETRO_ENVIRONMENT_SET_GEOMETRY, &av_info);
}
@@ -1053,10 +1053,7 @@ static void FCEUD_UpdateInput(void)
}
if (GameInfo->type == GIT_VSUNI)
FCEU_VSUniSwap(&pad[0], &pad[1]); /* TODO: Incomplete! Some
* non-zapper/gun game
* still has no input.
*/
FCEU_VSUniSwap(&pad[0], &pad[1]);
JSReturn[0] = pad[0] | (pad[1] << 8);
@@ -1103,7 +1100,7 @@ static void retro_run_blit(uint8_t *gfx)
width -= 16;
height -= 16;
}
texture_vram_p = (void*) (0x44200000 - (256 * 256)); // max VRAM address - frame size
texture_vram_p = (void*) (0x44200000 - (256 * 256)); /* max VRAM address - frame size */
sceKernelDcacheWritebackRange(retro_palette,256 * 2);
sceKernelDcacheWritebackRange(XBuf, 256*240 );
@@ -1715,7 +1712,6 @@ void *retro_get_memory_data(unsigned type)
data = NULL;
break;
case RETRO_MEMORY_SYSTEM_RAM:
// TODO: add ExWRAM(0x2000) support ?
data = RAM;
break;
default:
@@ -1741,8 +1737,6 @@ size_t retro_get_memory_size(unsigned type)
size = 0;
break;
case RETRO_MEMORY_SYSTEM_RAM:
// TODO: detect ExWRAM(0x2000) ?
// NES BASE RAM (0x800)
size = 0x800;
break;
default:

View File

@@ -98,8 +98,11 @@ static void FP_FASTAPASS(3) UpdateGP(int w, void *data, int arg) {
if (FCEUnetplay) NetplayUpdate(joy);
#endif
FCEUMOV_AddJoy(joy);
if (GameInfo->type == GIT_VSUNI)
#ifdef __LIBRETRO__
#else
if (GameInfo->type == GIT_VSUNI) /* moved to libretro.c */
FCEU_VSUniSwap(&joy[0], &joy[1]);
#endif
}
static INPUTC GPC = { ReadGP, 0, StrobeGP, UpdateGP, 0, 0 };

View File

@@ -56,6 +56,7 @@ static pal *palpoint[8] =
rp2c04_0002,
rp2c04_0003,
rp2c04_0004,
rp2c03,
};
void FCEUI_SetPaletteArray(uint8 *pal) {

View File

@@ -13,6 +13,10 @@ pal rp2c04_0004[64] = {
#include "rp2c04-0004.h"
};
pal rp2c03[64] = {
#include "rp2c03.h"
};
pal unvpalette[7] = {
{ 0x00 << 2, 0x00 << 2, 0x00 << 2 }, // Black
{ 0x3F << 2, 0x3F << 2, 0x34 << 2 }, // White

View File

@@ -296,6 +296,7 @@ void FCEU_VSUniCheck(uint64 md5partial, int *MapperNo, uint8 *Mirroring) {
while (vs->name) {
if (md5partial == vs->md5partial) {
if (vs->ppu < RCP2C03B) pale = vs->ppu;
else pale = 5;
*MapperNo = vs->mapper;
*Mirroring = vs->mirroring;
GameInfo->type = GIT_VSUNI;