Commit 78770041 authored by Stephanie Gawroriski's avatar Stephanie Gawroriski
Browse files

Add base handler and manager for IPC calls.

parent ae225d52
......@@ -571,6 +571,9 @@ extern "C"
*************************** FRAMEBUFFER PROPERTIES ***************************
*****************************************************************************/
/** The ID used for IPC calls for graphics. */
#define SJME_FRAMEBUFFER_IPC_ID SJME_JINT_C(0x47665821)
/** Returns the address of the framebuffer. */
#define SJME_FRAMEBUFFER_PROPERTY_ADDRESS SJME_JINT_C(1)
......
......@@ -114,7 +114,9 @@ public final class ClassLoadingAdjustments
case "cc/squirreljme/jvm/Assembly":
case "cc/squirreljme/jvm/ClassInfo":
case "cc/squirreljme/jvm/Constants":
case "cc/squirreljme/jvm/IPCCallback":
case "cc/squirreljme/jvm/IPCException":
case "cc/squirreljme/jvm/IPCManager":
case "cc/squirreljme/jvm/JVMFunction":
case "cc/squirreljme/jvm/SoftDouble":
case "cc/squirreljme/jvm/SoftFloat":
......
......@@ -154,5 +154,9 @@ public interface FramebufferProperty
/** Screen is packed 4 bit values. */
public static final byte FORMAT_PACKED_FOUR =
5;
/** The IPC ID for the graphics callbacks. */
public static final int IPC_ID =
0x47665821;
}
// -*- Mode: Java; indent-tabs-mode: t; tab-width: 4 -*-
// ---------------------------------------------------------------------------
// Multi-Phasic Applications: SquirrelJME
// Copyright (C) Stephanie Gawroriski <xer@multiphasicapps.net>
// ---------------------------------------------------------------------------
// SquirrelJME is under the GNU General Public License v3+, or later.
// See license.mkd for licensing and copyright information.
// ---------------------------------------------------------------------------
package cc.squirreljme.jvm;
/**
* Anything which would like to listen for IPCs must implement and register
* this callback.
*
* @since 2019/12/28
*/
public interface IPCCallback
{
/**
* Any classes which
*
* @param __tid The origin task ID.
* @param __ipcid The ID number of the IPC interface.
* @param __a Argument A.
* @param __b Argument B.
* @param __c Argument C.
* @param __d Argument D.
* @param __e Argument E.
* @param __f Argument F.
* @param __g Argument G.
* @param __h Argument H.
* @return The result of the IPC call.
* @since 2019/12/28
*/
public abstract long ipcCall(int __tid, int __ipcid, int __a, int __b,
int __c, int __d, int __e, int __f, int __g, int __h);
}
// -*- Mode: Java; indent-tabs-mode: t; tab-width: 4 -*-
// ---------------------------------------------------------------------------
// Multi-Phasic Applications: SquirrelJME
// Copyright (C) Stephanie Gawroriski <xer@multiphasicapps.net>
// ---------------------------------------------------------------------------
// SquirrelJME is under the GNU General Public License v3+, or later.
// See license.mkd for licensing and copyright information.
// ---------------------------------------------------------------------------
package cc.squirreljme.jvm;
/**
* This class is used to manage the IPC interface and allow any service to
* register IPC messages and such.
*
* @since 2019/12/28
*/
public final class IPCManager
{
/**
* No instances of this class.
*
* @since 2019/12/28
*/
private IPCManager()
{
}
/**
* This is the handler for IPC messages.
*
* @param __tid The origin task ID.
* @param __ipcid The ID number of the IPC interface.
* @param __a Argument A.
* @param __b Argument B.
* @param __c Argument C.
* @param __d Argument D.
* @param __e Argument E.
* @param __f Argument F.
* @param __g Argument G.
* @param __h Argument H.
* @return The result of the IPC call.
* @since 2019/12/28
*/
public static final long ipcCall(int __tid, int __ipcid, int __a, int __b,
int __c, int __d, int __e, int __f, int __g, int __h)
{
throw new todo.TODO();
}
}
......@@ -114,7 +114,9 @@ public final class ClassLoadingAdjustments
case "cc/squirreljme/jvm/Assembly":
case "cc/squirreljme/jvm/ClassInfo":
case "cc/squirreljme/jvm/Constants":
case "cc/squirreljme/jvm/IPCCallback":
case "cc/squirreljme/jvm/IPCException":
case "cc/squirreljme/jvm/IPCManager":
case "cc/squirreljme/jvm/JVMFunction":
case "cc/squirreljme/jvm/SoftDouble":
case "cc/squirreljme/jvm/SoftFloat":
......
......@@ -154,5 +154,9 @@ public interface FramebufferProperty
/** Screen is packed 4 bit values. */
public static final byte FORMAT_PACKED_FOUR =
5;
/** The IPC ID for the graphics callbacks. */
public static final int IPC_ID =
0x47665821;
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment