mirror of
https://github.com/pspdev/pspsdk.git
synced 2025-10-04 01:00:09 +00:00
Add DMAC definitions
This commit is contained in:
@@ -5,6 +5,7 @@ SUBDIRS = \
|
|||||||
ctrl \
|
ctrl \
|
||||||
debug \
|
debug \
|
||||||
display \
|
display \
|
||||||
|
dmac \
|
||||||
fpu \
|
fpu \
|
||||||
ge \
|
ge \
|
||||||
gu \
|
gu \
|
||||||
|
20
src/dmac/Makefile.am
Normal file
20
src/dmac/Makefile.am
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
libdir := @PSPSDK_LIBDIR@
|
||||||
|
|
||||||
|
CC = @PSP_CC@
|
||||||
|
CCAS = $(CC)
|
||||||
|
AR = @PSP_AR@
|
||||||
|
RANLIB = @PSP_RANLIB@
|
||||||
|
|
||||||
|
CCASFLAGS := @PSPSDK_CFLAGS@ -I$(top_srcdir)/src/base
|
||||||
|
|
||||||
|
DMAC_OBJS := sceDmac_0000.o sceDmac_0001.o sceDmac_0002.o
|
||||||
|
|
||||||
|
libpspdmacincludedir := @PSPSDK_INCLUDEDIR@
|
||||||
|
libpspdmacinclude_HEADERS := pspdmac.h
|
||||||
|
|
||||||
|
lib_LIBRARIES := libpspdmac.a
|
||||||
|
libpspdmac_a_SOURCES := sceDmac.S
|
||||||
|
libpspdmac_a_LIBADD := $(DMAC_OBJS)
|
||||||
|
|
||||||
|
$(DMAC_OBJS): sceCtrl.S
|
||||||
|
$(AM_V_CPPAS)$(CPPASCOMPILE) -DF_$* $< -c -o $@
|
24
src/dmac/pspdmac.h
Normal file
24
src/dmac/pspdmac.h
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
/*
|
||||||
|
* PSP Software Development Kit - http://www.pspdev.org
|
||||||
|
* -----------------------------------------------------------------------
|
||||||
|
* Licensed under the BSD license, see LICENSE in PSPSDK root for details.
|
||||||
|
*
|
||||||
|
* dmac.c - A DMAC function
|
||||||
|
*
|
||||||
|
* Copyright (c) 2016 173210 <root.3.173210@live.com>
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <psptypes.h>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Copy data in memory using DMAC
|
||||||
|
*
|
||||||
|
* @param dst - The pointer to the destination
|
||||||
|
* @param src - The pointer to the source
|
||||||
|
* @param n - The size of data
|
||||||
|
*
|
||||||
|
* @return 0 on success; otherwise an error code
|
||||||
|
*/
|
||||||
|
int sceDmacMemcpy(void *dst, const void *src, SceSize n);
|
||||||
|
|
||||||
|
int sceDmacTryMemcpy(void *dst, const void *src, SceSize n);
|
11
src/dmac/sceDmac.S
Normal file
11
src/dmac/sceDmac.S
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
#include "pspimport.s"
|
||||||
|
|
||||||
|
#ifdef F_sceDmac_0000
|
||||||
|
IMPORT_START "sceDmac", 0x40010011
|
||||||
|
#endif
|
||||||
|
#ifdef F_sceDmac_0001
|
||||||
|
IMPORT_FUNC "sceDmac", 0x617F3FE6, sceDmacMemcpy
|
||||||
|
#endif
|
||||||
|
#ifdef F_sceDmac_0002
|
||||||
|
IMPORT_FUNC "sceDmac", 0xD97F94D8, sceDmacTryMemcpy
|
||||||
|
#endif
|
Reference in New Issue
Block a user