mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-04 23:07:46 -04:00
platform ps2, fixes for gcc14
This commit is contained in:
parent
c055f15cd5
commit
257baf1520
5 changed files with 11 additions and 8 deletions
|
@ -969,6 +969,7 @@ void PicoVideoCacheSAT(int load);
|
|||
// misc.c
|
||||
PICO_INTERNAL_ASM void memcpy16bswap(unsigned short *dest, void *src, int count);
|
||||
PICO_INTERNAL_ASM void memset32(void *dest, int c, int count);
|
||||
PICO_INTERNAL_ASM void memset32_uncached(int *dest, int c, int count);
|
||||
|
||||
// eeprom.c
|
||||
void EEPROM_write8(unsigned int a, unsigned int d);
|
||||
|
|
|
@ -131,7 +131,7 @@ void mp3_start_play(void *f_, int pos1024)
|
|||
void mp3_update(s32 *buffer, int length, int stereo)
|
||||
{
|
||||
int length_mp3;
|
||||
void (*mix_samples)(int *dest_buf, short *mp3_buf, int count, int fac16) = mix_16h_to_32_resample_stereo;
|
||||
void (*mix_samples)(s32 *dest_buf, short *mp3_buf, int count, int fac16) = mix_16h_to_32_resample_stereo;
|
||||
|
||||
if (mp3_current_file == NULL || mp3_file_pos >= mp3_file_len)
|
||||
return; /* no file / EOF */
|
||||
|
|
|
@ -64,7 +64,7 @@ static GSTEXTURE *g_screens[2];
|
|||
static int g_screen_index;
|
||||
static GSTEXTURE *g_screen;
|
||||
static GSPRIMUVPOINT *g_screen_vertices;
|
||||
static u16 *g_screen_palette;
|
||||
static void *g_screen_palette;
|
||||
|
||||
static GSTEXTURE *osd;
|
||||
static uint32_t osd_vertices_count;
|
||||
|
@ -386,7 +386,7 @@ void set_g_screen_values() {
|
|||
g_screen_vertices = (GSPRIMUVPOINT *)calloc(2, sizeof(GSPRIMUVPOINT));
|
||||
for (i = 0; i < 2; i++) {
|
||||
g_screens[i] = (GSTEXTURE *)calloc(1, sizeof(GSTEXTURE));
|
||||
g_screens[i]->Mem = (uint32_t *)malloc(g_screenSize);
|
||||
g_screens[i]->Mem = malloc(g_screenSize);
|
||||
|
||||
g_screens[i]->Width = 328;
|
||||
g_screens[i]->Height = 256;
|
||||
|
@ -414,7 +414,7 @@ void set_cdleds_values() {
|
|||
size_t cdledsSize = gsKit_texture_size_ee(14, 5, GS_PSM_CT16);
|
||||
|
||||
cdleds = (GSTEXTURE *)calloc(1, sizeof(GSTEXTURE));
|
||||
cdleds->Mem = (uint32_t *)malloc(cdledsSize);
|
||||
cdleds->Mem = malloc(cdledsSize);
|
||||
cdleds_vertices = (GSPRIMUVPOINT *)calloc(2, sizeof(GSPRIMUVPOINT));
|
||||
|
||||
cdleds->Width = 14;
|
||||
|
@ -435,7 +435,7 @@ void set_osd_values() {
|
|||
int num_osds = 4, i;
|
||||
|
||||
osd = (GSTEXTURE *)calloc(1, sizeof(GSTEXTURE));
|
||||
osd->Mem = (uint32_t *)malloc(osdSize);
|
||||
osd->Mem = malloc(osdSize);
|
||||
|
||||
osd_vertices_count = 2*num_osds;
|
||||
osd_vertices = (GSPRIMUVPOINT *)calloc(osd_vertices_count, sizeof(GSPRIMUVPOINT));
|
||||
|
@ -488,7 +488,7 @@ static void video_init(void)
|
|||
set_osd_values();
|
||||
set_cdleds_values();
|
||||
|
||||
g_menubg_ptr = (uint8_t *)malloc(2 * g_menuscreen_pp * g_menuscreen_h);
|
||||
g_menubg_ptr = malloc(2 * g_menuscreen_pp * g_menuscreen_h);
|
||||
g_menubg_src_w = g_screen->Width;
|
||||
g_menubg_src_h = g_screen->Height;
|
||||
g_menubg_src_pp = g_screen->Width;
|
||||
|
@ -654,7 +654,7 @@ static void osd_text(int x, const char *text)
|
|||
int old_pitch = g_screen_ppitch;
|
||||
|
||||
int len = strlen(text) * 8;
|
||||
u16 *osd_buf = osd->Mem;
|
||||
u16 *osd_buf = (u16 *)osd->Mem;
|
||||
int *p, h;
|
||||
|
||||
g_screen_ptr = osd_buf;
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
#include <malloc.h>
|
||||
|
||||
#include "libpad.h"
|
||||
#include "libmtap.h"
|
||||
|
@ -21,7 +22,7 @@
|
|||
static int in_ps2_combo_keys = 0;
|
||||
static int in_ps2_combo_acts = 0;
|
||||
|
||||
static uintptr_t padBuf[2][4];
|
||||
static void *padBuf[2][4];
|
||||
static uint32_t padConnected[2][4]; // 2 ports, 4 slots
|
||||
static uint32_t padOpen[2][4];
|
||||
static uint32_t maxslot[2];
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
#include <string.h>
|
||||
#include <sys/time.h>
|
||||
#include <stdlib.h>
|
||||
#include <malloc.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include <kernel.h>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue