Skip to content

Commit

Permalink
Update to latest PS2SDK.
Browse files Browse the repository at this point in the history
  • Loading branch information
Wolf3s committed Sep 29, 2024
1 parent 1b91395 commit 98e56ee
Show file tree
Hide file tree
Showing 8 changed files with 47 additions and 122 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/compilation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
jobs:
build:
runs-on: ubuntu-latest
container: ps2dev/ps2dev:v1.0
container: ps2dev/ps2dev:latest
# instead of "ps2dev/ps2dev:latest" you can use different tags, for example for old projects you can use "ps2dev/ps2dev:v1.0"
steps:
- name: Install dependencies
Expand Down
3 changes: 1 addition & 2 deletions ee/src/sjpcm_rpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,12 @@ void SjPCM_Puts(char *format, ...)
{
static char buff[4096];
va_list args;
int rv;

if (!sjpcm_inited)
return;

va_start(args, format);
rv = vsnprintf(buff, 4096, format, args);
vsnprintf(buff, 4096, format, args);

memcpy((char *)(&sbuff[0]), buff, 252);
SifCallRpc(&cd0, SJPCM_PUTS, 0, (void *)(&sbuff[0]), 252, (void *)(&sbuff[0]), 252, 0, 0);
Expand Down
14 changes: 11 additions & 3 deletions iop/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ IOP_SRC_DIR = src/

IOP_BIN = $(IOP_BIN_DIR)isjpcm.irx
IOP_OBJS = hw.o sjpcm_irx.o spu2.o imports.o
IOP_OBJS := $(IOP_OBJS:%=$(IOP_OBJS_DIR)%)

IOP_CFLAGS += -fno-builtin-printf
# IOP_CFLAGS += -DISJPCM
Expand All @@ -27,6 +26,15 @@ all: $(IOP_OBJS_DIR) $(IOP_BIN_DIR) $(IOP_BIN) builtin
builtin:
bin2c $(IOP_BIN) $(IOP_BIN_DIR)isjpcmIrx.c isjpcmIrx

$(IOP_OBJS_DIR):
$(MKDIR) -p $(IOP_OBJS_DIR)

$(IOP_BIN_DIR):
$(MKDIR) -p $(IOP_BIN_DIR)

$(IOP_LIB_DIR):
$(MKDIR) -p $(IOP_LIB_DIR)

clean:
rm -f -r $(IOP_OBJS_DIR) $(IOP_BIN_DIR)

Expand All @@ -35,5 +43,5 @@ install:
cp $(IOP_BIN) $(DESTDIR)$(PS2DEV)/isjpcm/bin

include $(PS2SDK)/Defs.make
# include $(PS2SDK)/samples/Makefile.iopglobal
include ./Rules.make
include $(PS2SDK)/samples/Makefile.iopglobal

74 changes: 0 additions & 74 deletions iop/Rules.make

This file was deleted.

38 changes: 0 additions & 38 deletions iop/Rules.release

This file was deleted.

13 changes: 13 additions & 0 deletions iop/src/hw.S
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
/*
# _____ ___ ____ ___ ____
# ____| | ____| | | |____|
# | ___| |____ ___| ____| | \ PS2DEV Open Source Project.
#-----------------------------------------------------------------------
# Copyright 2001-2004, ps2dev - http://www.ps2dev.org
# Licenced under Academic Free License version 2.0
# Review ps2sdk README & LICENSE files for further details.
*/


.text
.set push
.set noreorder

.globl wmemcpy
Expand All @@ -21,3 +33,4 @@ wmemcopy_end:
nop
.end wmemcpy

.set pop
20 changes: 20 additions & 0 deletions iop/src/hw.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*
# _____ ___ ____ ___ ____
# ____| | ____| | | |____|
# | ___| |____ ___| ____| | \ PS2DEV Open Source Project.
#-----------------------------------------------------------------------
# Copyright 2005, ps2dev - http://www.ps2dev.org
# Licenced under GNU Library General Public License version 2
*/

/**
* @file
* word-copy helper
*/

#ifndef __WMEMCPY_INCLUDED__
#define __WMEMCPY_INCLUDED__

void wmemcpy(void *dest, const void *src, int numwords);

#endif
5 changes: 1 addition & 4 deletions iop/src/sjpcm_irx.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
*/

#include "irx_imports.h"
#include "hw.h"

#if defined(LIBSD) && defined(ISJPCM)
#error You must either define LIBSD or ISJPCM, not both at once.
Expand Down Expand Up @@ -103,10 +104,6 @@ void *SjPCM_SetNumBlocks(unsigned int *sbuff);
void *SjPCM_SetThreshold(unsigned int *sbuff);
void *SjPCM_Quit();

extern void wmemcpy(void *dest, void *src, int numwords);



static unsigned int buffer[0x80];

int memoryAllocated = 0;
Expand Down

0 comments on commit 98e56ee

Please sign in to comment.