mirror of
https://github.com/libretro/RetroArch
synced 2025-03-01 07:13:35 +00:00
Apply NTCS mode
This commit is contained in:
parent
1591bc2db2
commit
e2ca8aa1b5
@ -1,8 +1,8 @@
|
|||||||
BUILD_PRX = 0
|
BUILD_PRX = 0
|
||||||
DEBUG = 1
|
DEBUG = 0
|
||||||
HAVE_KERNEL_PRX = 0
|
HAVE_KERNEL_PRX = 0
|
||||||
HAVE_LOGGER = 0
|
HAVE_LOGGER = 0
|
||||||
HAVE_FILE_LOGGER = 1
|
HAVE_FILE_LOGGER = 0
|
||||||
HAVE_THREADS = 0
|
HAVE_THREADS = 0
|
||||||
BIG_STACK = 0
|
BIG_STACK = 0
|
||||||
WHOLE_ARCHIVE_LINK = 0
|
WHOLE_ARCHIVE_LINK = 0
|
||||||
|
@ -57,17 +57,15 @@ static void audioMainLoop(void *data)
|
|||||||
while (ps2->running)
|
while (ps2->running)
|
||||||
{
|
{
|
||||||
WaitSema(ps2->lock);
|
WaitSema(ps2->lock);
|
||||||
if (fifo_read_avail(ps2->buffer) >= sizeof(out_tmp)) {
|
size_t size = MIN(fifo_read_avail(ps2->buffer), sizeof(out_tmp));
|
||||||
fifo_read(ps2->buffer, out_tmp, sizeof(out_tmp));
|
fifo_read(ps2->buffer, out_tmp, size);
|
||||||
} else {
|
|
||||||
memset(out_tmp, 0, sizeof(out_tmp));
|
|
||||||
}
|
|
||||||
iSignalSema(ps2->lock);
|
iSignalSema(ps2->lock);
|
||||||
iSignalSema(ps2->cond_lock);
|
iSignalSema(ps2->cond_lock);
|
||||||
|
|
||||||
int ret;
|
int ret;
|
||||||
audsrv_wait_audio(sizeof(out_tmp));
|
audsrv_wait_audio(size);
|
||||||
ret = audsrv_play_audio(out_tmp, sizeof(out_tmp));
|
ret = audsrv_play_audio(out_tmp, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
audsrv_stop_audio();
|
audsrv_stop_audio();
|
||||||
@ -83,7 +81,7 @@ static void audioCreateThread(ps2_audio_t *ps2) {
|
|||||||
thread.stack=audioThreadStack;
|
thread.stack=audioThreadStack;
|
||||||
thread.stack_size=sizeof(audioThreadStack);
|
thread.stack_size=sizeof(audioThreadStack);
|
||||||
thread.gp_reg=&_gp;
|
thread.gp_reg=&_gp;
|
||||||
thread.initial_priority=0x50;
|
thread.initial_priority=0x40;
|
||||||
thread.attr=thread.option=0;
|
thread.attr=thread.option=0;
|
||||||
|
|
||||||
/*Backup the PS2 content to be used in the thread */
|
/*Backup the PS2 content to be used in the thread */
|
||||||
@ -258,6 +256,27 @@ static bool ps2_audio_use_float(void *data)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static size_t psp_write_avail(void *data)
|
||||||
|
{
|
||||||
|
size_t val;
|
||||||
|
ps2_audio_t* ps2 = (ps2_audio_t*)data;
|
||||||
|
|
||||||
|
if (!ps2||!ps2->running)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
WaitSema(ps2->lock);
|
||||||
|
size_t size = AUDIO_BUFFER - fifo_read_avail(ps2->buffer);
|
||||||
|
iSignalSema(ps2->lock);
|
||||||
|
|
||||||
|
|
||||||
|
return size;
|
||||||
|
}
|
||||||
|
|
||||||
|
static size_t psp_buffer_size(void *data)
|
||||||
|
{
|
||||||
|
return AUDIO_BUFFER ;
|
||||||
|
}
|
||||||
|
|
||||||
audio_driver_t audio_ps2 = {
|
audio_driver_t audio_ps2 = {
|
||||||
ps2_audio_init,
|
ps2_audio_init,
|
||||||
ps2_audio_write,
|
ps2_audio_write,
|
||||||
|
@ -44,6 +44,12 @@ typedef struct ps2_video
|
|||||||
static GSGLOBAL *init_GSGlobal(void) {
|
static GSGLOBAL *init_GSGlobal(void) {
|
||||||
GSGLOBAL *gsGlobal = gsKit_init_global();
|
GSGLOBAL *gsGlobal = gsKit_init_global();
|
||||||
|
|
||||||
|
gsGlobal->Mode = GS_MODE_NTSC;
|
||||||
|
gsGlobal->Interlace = GS_INTERLACED;
|
||||||
|
gsGlobal->Field = GS_FIELD;
|
||||||
|
gsGlobal->Width = 640;
|
||||||
|
gsGlobal->Height = 448;
|
||||||
|
|
||||||
gsGlobal->PSM = GS_PSM_CT16;
|
gsGlobal->PSM = GS_PSM_CT16;
|
||||||
gsGlobal->PSMZ = GS_PSMZ_16;
|
gsGlobal->PSMZ = GS_PSMZ_16;
|
||||||
gsGlobal->DoubleBuffering = GS_SETTING_OFF;
|
gsGlobal->DoubleBuffering = GS_SETTING_OFF;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user