Browse Source

getting ready for release

tags/v4
parent
commit
15cccb753c
Signed by: govanify <gauvain@govanify.com> GPG Key ID: DE62E1E2A6145556
7 changed files with 57 additions and 24 deletions
  1. +1
    -1
      Doxyfile
  2. +15
    -21
      README.md
  3. +8
    -0
      bindings/README.md
  4. +28
    -1
      bindings/c/c_ffi.h
  5. +1
    -1
      bindings/lua/README.md
  6. +2
    -0
      src/pcsx2_ipc.h
  7. +2
    -0
      utils/build-release.sh

+ 1
- 1
Doxyfile View File

@@ -467,7 +467,7 @@ LOOKUP_CACHE_SIZE = 0
# normally produced when WARNINGS is set to YES.
# The default value is: NO.

EXTRACT_ALL = NO
EXTRACT_ALL = YES

# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will
# be included in the documentation.


+ 15
- 21
README.md View File

@@ -1,33 +1,27 @@
PCSX2 IPC Client Example
PCSX2 IPC Client-Side Reference API
======
You'll find [here](https://code.govanify.com/govanify/pcsx2_ipc/)
the reference implementation of PCSX2 IPC Socket client-side C++ API.
the reference implementation of PCSX2 IPC Socket client-side C++ API, along with
different language bindings and examples.

Here is a list of files included in this repository:
A small C++ client example is provided along with the API. It can be compiled
by executing the command `meson build && cd build && ninja` in the folder
"example" that is included in the releases.


* .clang-format: A syntax formatting definition for this project files.
* .gitignore: A file to avoid commiting unnecessary files.
* Doxyfile: Doxygen configuration to automatically generate our documentation.
* meson.build: The file that is used to define how to build the
program.
* README.md: Take a wild guess.
* windows\_qt.pro: A Qt build definition file. Useful if you want to compile
this example on Windows with Qt Creator.
* bindings/: A folder containing bindings for multiple popular languages.


A small client example is provided along with the API. It can be compiled on
by using the command `meson build && cd build && ninja`. Please
refer to [meson documentation](https://mesonbuild.com/Using-with-Visual-Studio.html) if you want
to use another generator, say, Visual Studio, instead of ninja.
Meson and ninja ARE portable across OSes as-is and shouldn't require any tinkering. Please
refer to [the meson documentation](https://mesonbuild.com/Using-with-Visual-Studio.html)
if you really want to use another generator, say, Visual Studio, instead of ninja.
Alternatively, loading the "windows-qt.pro" on Windows with Qt Creator will work just fine if you're lazy.
Once it builds just hack on it and make whatever you want!
If you dislike C++
[bindings in popular languages are
available](https://code.govanify.com/govanify/pcsx2_ipc/src/branch/master/bindings/).

On Doxygen you can find the documentation of the API [here](@ref PCSX2Ipc).
On Doxygen you can find the documentation of the C++ API [here](@ref PCSX2Ipc).
The C API is documented [here](@ref bindings/c/c_ffi.h) and is probably what you
want to read if you use language bindings.

Language bindings will require you to compile the C bindings library for the OS
you target. Please refer to `binding/c` documentation for building it.

Have fun!
-Gauvain "GovanifY" Roussel-Tarbouriech, 2020

+ 8
- 0
bindings/README.md View File

@@ -0,0 +1,8 @@
You'll find here bindings for different popular programming languages.

Please note that currently only the C and Python bindings are full bindings, while the rest
are partial bindings. This is because all of the other bindings rely on the C
library and I do not want to rewrite those per-language bindings for every change I make.

Rest assured though, it shouldn't take you more than 2 minutes of copy paste
to get started :)

+ 28
- 1
bindings/c/c_ffi.h View File

@@ -12,26 +12,53 @@ extern "C" {

typedef struct PCSX2Ipc PCSX2Ipc;

/**
* @see PCSX2Ipc::PCSX2Ipc
*/
PCSX2Ipc *newPCSX2Ipc();

/**
* @see PCSX2Ipc::InitializeBatch
*/
void InitializeBatch(PCSX2Ipc *v);

/**
* @see PCSX2Ipc::FinalizeBatch
*/
PCSX2Ipc::BatchCommand FinalizeBatch(PCSX2Ipc *v);

/* We always cast as uint64_t to make the bindings easier to make/use */
/**
* We always cast as uint64_t to make the bindings easier to make/use.
* @see PCSX2Ipc::GetReply
*/
uint64_t GetReplyRead(PCSX2Ipc *v, PCSX2Ipc::BatchCommand cmd, int place,
PCSX2Ipc::IPCCommand msg);

/**
* @see PCSX2Ipc::SendCommand
*/
void SendCommand(PCSX2Ipc *v, PCSX2Ipc::BatchCommand cmd);

/**
* @see PCSX2Ipc::Read
*/
uint64_t Read(PCSX2Ipc *v, uint32_t address, PCSX2Ipc::IPCCommand msg,
bool batch);

/**
* @see PCSX2Ipc::Write
*/
void Write(PCSX2Ipc *v, uint32_t address, uint8_t val, PCSX2Ipc::IPCCommand msg,
bool batch);

/**
* @see PCSX2Ipc::~PCSX2Ipc
*/
void deletePCSX2Ipc(PCSX2Ipc *v);

/**
* @see PCSX2Ipc::GetError
*/
PCSX2Ipc::IPCStatus GetError(PCSX2Ipc *v);

#ifdef __cplusplus


+ 1
- 1
bindings/lua/README.md View File

@@ -1,4 +1,4 @@
Lua bindings for the IPC lib.
Lua(Jit) bindings for the IPC lib.

This requires you to build the C library for your OS first.
Refer to `bindings/c` for that.


+ 2
- 0
src/pcsx2_ipc.h View File

@@ -518,6 +518,7 @@ class PCSX2Ipc {
* @see GetReply
* @param address The address to read.
* @param T Flag to enable batch processing or not.
* @param Y The type of the variable to read (eg uint8_t).
* @return The value read in memory. If in batch mode the IPC message.
*/
template <typename Y, bool T = false>
@@ -576,6 +577,7 @@ class PCSX2Ipc {
* @param address The address to write to.
* @param value The value to write.
* @param T Flag to enable batch processing or not.
* @param Y The type of the variable to write (eg uint8_t).
* @return If in batch mode the IPC message otherwise void.
*/
template <typename Y, bool T = false>


+ 2
- 0
utils/build-release.sh View File

@@ -15,4 +15,6 @@ cp -rf latex/refman.pdf release/docs
find release -type d -name build -prune -exec rm -rf {} \;
find release -type d -name bin -prune -exec rm -rf {} \;
find release -type d -name obj -prune -exec rm -rf {} \;
find release -type d -name libpcsx2_ipc_c.so -prune -exec rm -rf {} \;
find release -type d -name target -prune -exec rm -rf {} \;
zip -r release.zip release

Loading…
Cancel
Save