|
From: kosmirror <kos...@us...> - 2025-09-05 10:06:23
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "A pseudo Operating System for the Dreamcast.".
The branch, master has been updated
via 3dcb6c7507d2c1a6a0e07dbe9841c000354b70f0 (commit)
via 07bb4a1b70358db900c06b8771a78f4d9dfbc517 (commit)
via 1cf6345122f9fcdd0ccf2b82466ac279842aad02 (commit)
via e4e50b1e7ac9b1dbf461824c18f6911767618484 (commit)
via 05167610e60b1bb4e46e180dee4206cce15b7e44 (commit)
via cdcf919eea5181434647804101d04c748914a3c9 (commit)
via 7e2e257c47ed28ff3e69aca19a5ae83c02f8d34d (commit)
from 3a34e9a1c7fcee85e39b4b48f8472ecbd36e536e (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 3dcb6c7507d2c1a6a0e07dbe9841c000354b70f0
Author: QuzarDC <qu...@co...>
Date: Fri Aug 8 10:48:42 2025 -0400
rumble: Update example to use new effect members and a safe stop effect.
Primarily just adjusting the printouts and data members to use the new
struct types, which allowed getting rid of the custom defined ones.
Additionally changing the 'stop' baked in effect to define stopping the
default motor 1. Sending a 0 in `motor` is now disallowed by the driver
as it will cause official hardware rumble to throw errors and stop working.
commit 07bb4a1b70358db900c06b8771a78f4d9dfbc517
Author: QuzarDC <qu...@co...>
Date: Thu Aug 14 00:55:52 2025 -0400
puru: constify `purupuru_rumble` param.
We were never intending to modify the data, but lets guarntee it.
commit 1cf6345122f9fcdd0ccf2b82466ac279842aad02
Author: QuzarDC <qu...@co...>
Date: Thu Aug 14 00:00:03 2025 -0400
puru: Deprecate old effect struct members and macros.
The new specified members of `purupuru_effect_t` should be used
instead.
commit e4e50b1e7ac9b1dbf461824c18f6911767618484
Author: QuzarDC <qu...@co...>
Date: Wed Aug 13 23:34:08 2025 -0400
puru: Add new field accessors for rumble effect and error checking.
These fields match data provided by megavolt in a few github comments
with modifications to (hopefully) improve readability.
The new fields are then leveraged to test for error conditions. This
helps support for the official pack that will throw a hardware error
(`MAPLE_RESPONSE_BADFUNC`) when invalid conditions are sent. Specifically
we have been using `0x00000000` for 'stop rumbling' but the motor select
field must be non-zero. I have additionally added a check for another
invalid condition which is for both convergent and divergent vibration
to be set at once.
commit 05167610e60b1bb4e46e180dee4206cce15b7e44
Author: QuzarDC <qu...@co...>
Date: Thu Aug 7 17:24:30 2025 -0400
maple_irq: Enhanced error reporting.
This allows for clear signalling if an unexpected response
is coming back from the autocheck and testing a specific error
response that is related to the puru not functioning.
With the new dbglog settings these shouldn't cause spamming,
but if they do then that should indicate something that needs
fixing.
commit cdcf919eea5181434647804101d04c748914a3c9
Author: QuzarDC <qu...@co...>
Date: Thu Aug 7 17:20:09 2025 -0400
puru: Restructure `purupuru_effect_t`
For no good reason that I can see the members of the struct
were in reverse order and relied on being shuffled back. This
does break the ABI but anyone who was using the type should not
have been casting a `uint32` to it.
These struct members will end up being deprecated, but this will
allow for better compatibility.
commit 7e2e257c47ed28ff3e69aca19a5ae83c02f8d34d
Author: QuzarDC <qu...@co...>
Date: Thu Aug 7 13:21:29 2025 -0400
puru: Switch to stdint types.
Additionally drop the unnecessary include of genwait.
-----------------------------------------------------------------------
Summary of changes:
examples/dreamcast/rumble/rumble.c | 154 ++++----------------
kernel/arch/dreamcast/hardware/maple/maple_irq.c | 10 +-
kernel/arch/dreamcast/hardware/maple/purupuru.c | 26 ++--
kernel/arch/dreamcast/include/dc/maple/purupuru.h | 164 ++++++++--------------
4 files changed, 107 insertions(+), 247 deletions(-)
diff --git a/examples/dreamcast/rumble/rumble.c b/examples/dreamcast/rumble/rumble.c
index f08f7755..f75a23d7 100644
--- a/examples/dreamcast/rumble/rumble.c
+++ b/examples/dreamcast/rumble/rumble.c
@@ -2,7 +2,7 @@
rumble.c
Copyright (C) 2004 SinisterTengu
- Copyright (C) 2008, 2023 Donald Haase
+ Copyright (C) 2008, 2023, 2025 Donald Haase
Copyright (C) 2024 Daniel Fairchild
*/
@@ -37,120 +37,19 @@ KOS_INIT_FLAGS(INIT_DEFAULT);
plx_fcxt_t *cxt;
+void print_rumble_fields(purupuru_effect_t fields) {
-typedef union rumble_fields {
- uint32_t raw;
- struct {
- /* Special Effects and motor select. The normal purupuru packs will
-only have one motor. Selecting MOTOR2 for these is probably not
-a good idea. The PULSE setting here supposably creates a sharp
-pulse effect, when ORed with the special field. */
-
- /** \brief Yet another pulse effect.
- This supposedly creates a sharp pulse effect.
- */
- uint32_t special_pulse : 1;
- uint32_t : 3; // unused
-
- /** \brief Select motor #1.
-
- Most jump packs only have one motor, but on things that do have more
- than one motor (like PS1->Dreamcast controller adapters that support
- rumble), this selects the first motor.
- */
- uint32_t special_motor1 : 1;
- uint32_t : 2; // unused
-
- /** \brief Select motor #2.
-
- Most jump packs only have one motor, but on things that do have more
- than one motor (like PS1->Dreamcast controller adapters that support
- rumble), this selects the second motor.
- */
- uint32_t special_motor2 : 1;
-
- /** \brief Ignore this command.
-
- Valid value 15 (0xF).
-
- Most jump packs will ignore commands with this set in effect1,
- apparently.
- */
- uint32_t fx1_powersave : 4;
-
- /** \brief Upper nibble of effect1.
-
- This value works with the lower nibble of the effect2 field to
- increase the intensity of the rumble effect.
- Valid values are 0-7.
-
- \see rumble_fields_t.fx2_lintensity
- */
- uint32_t fx1_intensity : 3;
-
- /** \brief Give a pulse effect to the rumble.
-
- This probably should be used with rumble_fields_t.fx1_pulse as well.
-
- \see rumble_fields_t.fx2_pulse
- */
- uint32_t fx1_pulse : 1;
-
- /** \brief Lower-nibble of effect2.
-
- This value works with the upper nibble of the effect1
- field to increase the intensity of the rumble effect.
- Valid values are 0-7.
-
- \see rumble_fields_t.fx1_intensity
- */
- uint32_t fx2_lintensity : 3;
-
- /** \brief Give a pulse effect to the rumble.
-
- This probably should be used with rumble_fields_t.fx1_pulse as well.
-
- \see rumble_fields_t.fx1_intensity
- */
- uint32_t fx2_pulse : 1;
-
- /** \brief Upper-nibble of effect2.
-
- This apparently lowers the rumble's intensity somewhat.
- Valid values are 0-7.
- */
- uint32_t fx2_uintensity : 3;
-
- /* OR these in with your effect2 value if you feel so inclined.
- if you or the PULSE effect in here, you probably should also
- do so with the effect1 one below. */
-
- /** \brief Give a decay effect to the rumble on some packs. */
- uint32_t fx2_decay : 1;
-
- /** \brief The duration of the effect. No idea on units... */
- uint32_t duration : 8;
- };
-} rumble_fields_t;
-
-
-void print_rumble_fields(uint32_t raw) {
- rumble_fields_t fields = {.raw = raw};
printf("Rumble Fields:\n");
- printf(" .special_pulse = %u,\n", fields.special_pulse);
- printf(" .special_motor1 = %u,\n", fields.special_motor1);
- printf(" .special_motor2 = %u,\n", fields.special_motor2);
-
- printf(" .fx1_pulse = %u,\n", fields.fx1_pulse);
- printf(" .fx1_powersave = %u,\n", fields.fx1_powersave);
- printf(" .fx1_intensity = %u,\n", fields.fx1_intensity);
+ printf(" .cont = %s,\n", fields.cont ? "true" : "false");
+ printf(" .motor = %u,\n", fields.motor);
- printf(" .fx2_lintensity = %u,\n", fields.fx2_lintensity);
- printf(" .fx2_pulse = %u,\n", fields.fx2_pulse);
- printf(" .fx2_uintensity = %u,\n", fields.fx2_uintensity);
- printf(" .fx2_decay = %u,\n", fields.fx2_decay);
+ printf(" .bpow = %u,\n", fields.bpow);
+ printf(" .fpow = %u,\n", fields.fpow);
+ printf(" .div = %s,\n", fields.div ? "true" : "false");
+ printf(" .conv = %s,\n", fields.conv ? "true" : "false");
- printf(" .duration = %u,\n", fields.duration);
+ printf(" .freq = %u,\n", fields.freq);
+ printf(" .inc = %u,\n", fields.inc);
}
/* This blocks waiting for a specified device to be present and valid */
void wait_for_dev_attach(maple_device_t **dev_ptr, unsigned int func) {
@@ -189,18 +88,21 @@ void wait_for_dev_attach(maple_device_t **dev_ptr, unsigned int func) {
typedef struct {
- uint32_t pattern;
+ purupuru_effect_t effect;
const char *description;
} baked_pattern_t;
+/* motor cannot be 0 (will generate error on official hardware), but we can set everything else to 0 for stopping */
+static const purupuru_effect_t rumble_stop = {.motor = 1};
+
static size_t catalog_index = 0;
static const baked_pattern_t catalog[] = {
- {.pattern = 0x011A7010, .description = "Basic Thud (simple .5s jolt)"},
- {.pattern = 0x31071011, .description = "Car Idle (69 Mustang)"},
- {.pattern = 0x2615F010, .description = "Car Idle (VW beetle)"},
- {.pattern = 0x3339F010, .description = "Eathquake (Vibrate, and fade out)"},
- {.pattern = 0x05281011, .description = "Helicopter"},
- {.pattern = 0x00072010, .description = "Ship's Thrust (as in AAC)"},
+ {.effect = {.cont = false, .motor = 1, .fpow = 7, .freq = 26, .inc = 1}, .description = "Basic Thud (simple .5s jolt)"},
+ {.effect = {.cont = true, .motor = 1, .fpow = 1, .freq = 7, .inc = 49}, .description = "Car Idle (69 Mustang)"},
+ {.effect = {.cont = false, .motor = 1, .fpow = 7, .conv = true, .freq = 21, .inc = 38}, .description = "Car Idle (VW beetle)"},
+ {.effect = {.cont = false, .motor = 1, .fpow = 7, .conv = true, .freq = 57, .inc = 51}, .description = "Eathquake (Vibrate, and fade out)"},
+ {.effect = {.cont = true, .motor = 1, .fpow = 1, .freq = 40, .inc = 5}, .description = "Helicopter"},
+ {.effect = {.cont = false, .motor = 1, .fpow = 2, .freq = 7, .inc = 0}, .description = "Ship's Thrust (as in AAC)"},
};
static inline void word2hexbytes(uint32_t word, uint8_t *bytes) {
@@ -218,7 +120,7 @@ int main(int argc, char *argv[]) {
point_t w;
int i = 0, count = 0;
uint16_t old_buttons = 0, rel_buttons = 0;
- uint32_t effect = 0;
+ purupuru_effect_t effect = {.raw = 0};
uint8_t n[8];
char s[8][2] = { "", "", "", "", "", "", "", "" };
word2hexbytes(0, n);
@@ -295,8 +197,8 @@ int main(int argc, char *argv[]) {
}
if ((state->buttons & CONT_X) && (rel_buttons & CONT_X)) {
- printf("Setting baked pattern:\n\t'%s'\n", catalog[catalog_index].description);
- word2hexbytes(catalog[catalog_index].pattern, n);
+ printf("Setting baked effect:\n\t'%s'\n", catalog[catalog_index].description);
+ word2hexbytes(catalog[catalog_index].effect.raw, n);
catalog_index++;
if (catalog_index >= sizeof(catalog) / sizeof(baked_pattern_t)) {
catalog_index = 0;
@@ -305,17 +207,17 @@ int main(int argc, char *argv[]) {
if((state->buttons & CONT_A) && (rel_buttons & CONT_A)) {
- effect = (n[0] << 28) + (n[1] << 24) + (n[2] << 20) + (n[3] << 16) +
+ effect.raw = (n[0] << 28) + (n[1] << 24) + (n[2] << 20) + (n[3] << 16) +
(n[4] << 12) + (n[5] << 8) + (n[6] << 4) + (n[7] << 0);
- purupuru_rumble_raw(purudev, effect);
+ purupuru_rumble(purudev, &effect);
/* We print these out to make it easier to track the options chosen */
- printf("Rumble: 0x%lx!\n", effect);
+ printf("Rumble: 0x%lx!\n", effect.raw);
print_rumble_fields(effect);
}
if((state->buttons & CONT_B) && (rel_buttons & CONT_B)) {
- purupuru_rumble_raw(purudev, 0x00000000);
+ purupuru_rumble(purudev, &rumble_stop);
printf("Rumble Stopped!\n");
}
@@ -355,7 +257,7 @@ int main(int argc, char *argv[]) {
/* Stop rumbling before exiting, if it still exists. */
if((purudev != NULL) && purudev->valid)
- purupuru_rumble_raw(purudev, 0x00000000);
+ purupuru_rumble(purudev, &rumble_stop);
plx_font_destroy(fnt);
plx_fcxt_destroy(cxt);
diff --git a/kernel/arch/dreamcast/hardware/maple/maple_irq.c b/kernel/arch/dreamcast/hardware/maple/maple_irq.c
index f5d02e41..6a0d481a 100644
--- a/kernel/arch/dreamcast/hardware/maple/maple_irq.c
+++ b/kernel/arch/dreamcast/hardware/maple/maple_irq.c
@@ -183,8 +183,8 @@ static void vbl_autodet_callback(maple_state_t *state, maple_frame_t *frm) {
vbl_chk_next_subdev(state, frm, p);
}
else {
- /* dbglog(DBG_KDEBUG, "maple: unknown response %d on device %c%c\n",
- resp->response, 'A'+p, '0'+u); */
+ dbglog(DBG_DEBUG, "maple: unknown response %d on device %c%c\n",
+ resp->response, 'A'+p, '0'+u);
state->scan_ready_mask |= 1 << p;
maple_frame_unlock(frm);
}
@@ -275,6 +275,12 @@ void maple_dma_irq_hnd(uint32 code, void *data) {
i->state = MAPLE_FRAME_UNSENT;
continue;
}
+ /* This error is generated in the case where bad input is sent to the purupuru.
+ For instance, when setting motor selection to '0' rather than '1'. */
+ else if(resp == MAPLE_RESPONSE_BADFUNC) {
+ dbglog(DBG_ERROR, "maple_irq: error EBADFUNC on %c%i when sending command: %i\n",
+ ('A' - i->dst_port), i->dst_unit, i->cmd);
+ }
if(__is_defined(MAPLE_DMA_DEBUG))
maple_sentinel_verify("i->recv_buf", i->recv_buf, 1024);
diff --git a/kernel/arch/dreamcast/hardware/maple/purupuru.c b/kernel/arch/dreamcast/hardware/maple/purupuru.c
index 29255721..a458df2d 100644
--- a/kernel/arch/dreamcast/hardware/maple/purupuru.c
+++ b/kernel/arch/dreamcast/hardware/maple/purupuru.c
@@ -3,19 +3,19 @@
purupuru.c
Copyright (C) 2003 Megan Potter
Copyright (C) 2005 Lawrence Sebald
+ Copyright (C) 2025 Donald Haase
*/
#include <assert.h>
#include <kos/dbglog.h>
-#include <kos/genwait.h>
#include <dc/maple.h>
#include <dc/maple/purupuru.h>
/* Be warned, not all purus are created equal, in fact, most of
them act different for just about everything you feed to them. */
-int purupuru_rumble_raw(maple_device_t *dev, uint32 effect) {
- uint32 *send_buf;
+int purupuru_rumble_raw(maple_device_t *dev, uint32_t effect) {
+ uint32_t *send_buf;
assert(dev != NULL);
@@ -25,7 +25,7 @@ int purupuru_rumble_raw(maple_device_t *dev, uint32 effect) {
/* Reset the frame */
maple_frame_init(&dev->frame);
- send_buf = (uint32 *)dev->frame.recv_buf;
+ send_buf = (uint32_t *)dev->frame.recv_buf;
send_buf[0] = MAPLE_FUNC_PURUPURU;
send_buf[1] = effect;
dev->frame.cmd = MAPLE_COMMAND_SETCOND;
@@ -39,16 +39,20 @@ int purupuru_rumble_raw(maple_device_t *dev, uint32 effect) {
return MAPLE_EOK;
}
-int purupuru_rumble(maple_device_t *dev, purupuru_effect_t *effect) {
- uint32 comp_effect;
+int purupuru_rumble(maple_device_t *dev, const purupuru_effect_t *effect) {
- assert(dev != NULL);
+ /* Error checking to prevent hardware-level errors */
+ if(!effect->motor) {
+ dbglog(DBG_WARNING, "puru: invalid rumble effect sent. motor must be nonzero.\n");
+ return MAPLE_EINVALID;
+ }
- /* "Compile" the effect */
- comp_effect = (effect->duration << 24) | (effect->effect2 << 16) |
- (effect->effect1 << 8) | (effect->special);
+ if(effect->conv && effect->div) {
+ dbglog(DBG_WARNING, "puru: invalid rumble effect sent. Divergent and Convergent rumble cannot be set together.\n");
+ return MAPLE_EINVALID;
+ }
- return purupuru_rumble_raw(dev, comp_effect);
+ return purupuru_rumble_raw(dev, effect->raw);
}
diff --git a/kernel/arch/dreamcast/include/dc/maple/purupuru.h b/kernel/arch/dreamcast/include/dc/maple/purupuru.h
index a88bb9c4..90191502 100644
--- a/kernel/arch/dreamcast/include/dc/maple/purupuru.h
+++ b/kernel/arch/dreamcast/include/dc/maple/purupuru.h
@@ -3,6 +3,7 @@
dc/maple/purupuru.h
Copyright (C) 2003 Megan Potter
Copyright (C) 2005, 2010 Lawrence Sebald
+ Copyright (C) 2025 Donald Haase
*/
@@ -28,6 +29,7 @@
that does absolutely nothing on the first try.
\author Lawrence Sebald
+ \author Donald Haase
*/
#ifndef __DC_MAPLE_PURUPURU_H
@@ -36,7 +38,8 @@
#include <kos/cdefs.h>
__BEGIN_DECLS
-#include <arch/types.h>
+#include <stdbool.h>
+#include <stdint.h>
#include <dc/maple.h>
/** \defgroup peripherals_rumble Rumble Pack
@@ -49,114 +52,58 @@ __BEGIN_DECLS
/** \brief Effect generation structure.
This structure is used for convenience to send an effect to the jump pack.
- This, along with the various macros in this file can give a slightly better
- idea of the effect being generated than using the raw values.
+ The members in the structure note general explanations of their use as well
+ as some limitations and suggestions. There shouldn't be a need to use the
+ raw accessor with the new fully specified members.
*/
-typedef struct purupuru_effect {
- /** \brief The duration of the effect. No idea on units... */
- uint8 duration;
-
- /** \brief 2nd effect field. */
- uint8 effect2;
-
- /** \brief 1st effect field. */
- uint8 effect1;
-
- /** \brief Special effects field. */
- uint8 special;
+typedef union purupuru_effect {
+ /** \brief Access the raw 32-bit value to be sent to the puru */
+ uint32_t raw;
+ /** \brief Deprecated old structure which has been inverted now to union with raw. */
+ struct {
+ uint8_t special __depr("Please see purupuru_effect_t which has new members.");
+ uint8_t effect1 __depr("Please see purupuru_effect_t which has new members.");
+ uint8_t effect2 __depr("Please see purupuru_effect_t which has new members.");
+ uint8_t duration __depr("Please see purupuru_effect_t which has new members.");
+ };
+ struct {
+ /** \brief Continuous Vibration. When set vibration will continue until stopped */
+ bool cont : 1;
+ /** \brief Reserved. Always 0s */
+ uint32_t res : 3;
+ /** \brief Motor number. 0 will cause an error. 1 is the typical setting. */
+ uint32_t motor : 4;
+
+ /** \brief Backward direction (- direction) intensity setting bits. 0 stops vibration. */
+ uint32_t bpow : 3;
+ /** \brief Divergent vibration. The rumble will get stronger until it stops. */
+ bool div : 1;
+ /** \brief Forward direction (+ direction) intensity setting bits. 0 stops vibration. */
+ uint32_t fpow : 3;
+ /** \brief Convergent vibration. The rumble will get weaker until it stops. */
+ bool conv : 1;
+
+ /** \brief Vibration frequency. for most purupuru 4-59. */
+ uint8_t freq;
+ /** \brief Vibration inclination period. */
+ uint8_t inc;
+ };
} purupuru_effect_t;
-/* Set one of each of the following in the effect2 field of the
- purupuru_effect_t. Valid values for each are 0-7. The LINTENSITY
- value works with the INTENSITY of effect1 to increase the intensity
- of the rumble, where UINTENSITY apparently lowers the rumble's
- intensity somewhat. */
+_Static_assert(sizeof(purupuru_effect_t) == 4, "Invalid effect size");
-/** \brief Upper-nibble of effect2 convenience macro.
-
- This macro is for setting the upper nibble of the effect2 field of the
- purupuru_effect_t. This apparently lowers the rumble's intensity somewhat.
- Valid values are 0-7.
-*/
-#define PURUPURU_EFFECT2_UINTENSITY(x) (x << 4)
-
-/** \brief Lower-nibble of effect2 convenience macro.
-
- This macro is for setting the lower nibble of the effect2 field of the
- purupuru_effect_t. This value works with the upper nibble of the effect1
- field to increase the intensity of the rumble effect. Valid values are 0-7.
-
- \see PURUPURU_EFFECT1_INTENSITY
-*/
-#define PURUPURU_EFFECT2_LINTENSITY(x) (x)
+ /* Compat */
+static inline uint32_t __depr("Please see purupuru_effect_t for modern equivalent.") PURUPURU_EFFECT2_UINTENSITY(uint8_t x) {return (x << 4);}
+static inline uint32_t __depr("Please see purupuru_effect_t for modern equivalent.") PURUPURU_EFFECT2_LINTENSITY(uint8_t x) {return (x);}
+static inline uint32_t __depr("Please see purupuru_effect_t for modern equivalent.") PURUPURU_EFFECT1_INTENSITY(uint8_t x) {return (x << 4);}
-/* OR these in with your effect2 value if you feel so inclined.
- if you or the PULSE effect in here, you probably should also
- do so with the effect1 one below. */
-/** \brief Give a decay effect to the rumble on some packs. */
-#define PURUPURU_EFFECT2_DECAY (8 << 4)
-
-/** \brief Give a pulse effect to the rumble.
-
- This probably should be used with PURUPURU_EFFECT1_PULSE as well.
-
- \see PURUPURU_EFFECT1_PULSE
-*/
-#define PURUPURU_EFFECT2_PULSE (8)
-
-/* Set one value for this in the effect1 field of the effect structure. */
-/** \brief Upper nibble of effect1 convenience macro.
-
- This macro is for setting the upper nibble of the effect1 field of the
- purupuru_effect_t. This value works with the lower nibble of the effect2
- field to increase the intensity of the rumble effect. Valid values are 0-7.
-
- \see PURUPURU_EFFECT2_LINTENSITY
-*/
-#define PURUPURU_EFFECT1_INTENSITY(x) (x << 4)
-
-/* OR these in with your effect1 value, if you need them. PULSE
- should probably be used with the PULSE in effect2, as well.
- POWERSAVE will probably make your purupuru ignore that command. */
-/** \brief Give a pulse effect to the rumble.
-
- This probably should be used with PURUPURU_EFFECT2_PULSE as well.
-
- \see PURUPURU_EFFECT2_PULSE
-*/
-#define PURUPURU_EFFECT1_PULSE (8 << 4)
-
-/** \brief Ignore this command.
-
- Most jump packs will ignore commands with this set in effect1, apparently.
-*/
-#define PURUPURU_EFFECT1_POWERSAVE (15)
-
-/* Special Effects and motor select. The normal purupuru packs will
- only have one motor. Selecting MOTOR2 for these is probably not
- a good idea. The PULSE setting here supposably creates a sharp
- pulse effect, when ORed with the special field. */
-/** \brief Select motor #1.
-
- Most jump packs only have one motor, but on things that do have more than
- one motor (like PS1->Dreamcast controller adapters that support rumble),
- this selects the first motor.
-*/
-#define PURUPURU_SPECIAL_MOTOR1 (1 << 4)
-
-/** \brief Select motor #2.
-
- Most jump packs only have one motor, but on things that do have more than
- one motor (like PS1->Dreamcast controller adapters that support rumble),
- this selects the second motor.
-*/
-#define PURUPURU_SPECIAL_MOTOR2 (1 << 7)
-
-/** \brief Yet another pulse effect.
-
- This supposedly creates a sharp pulse effect.
-*/
-#define PURUPURU_SPECIAL_PULSE (1)
+static const uint8_t PURUPURU_EFFECT2_DECAY __depr("Please see purupuru_effect_t for modern equivalent.") = (8 << 4);
+static const uint8_t PURUPURU_EFFECT2_PULSE __depr("Please see purupuru_effect_t for modern equivalent.") = (8);
+static const uint8_t PURUPURU_EFFECT1_PULSE __depr("Please see purupuru_effect_t for modern equivalent.") = (8 << 4);
+static const uint8_t PURUPURU_EFFECT1_POWERSAVE __depr("Please see purupuru_effect_t for modern equivalent.") = (15);
+static const uint8_t PURUPURU_SPECIAL_MOTOR1 __depr("Please see purupuru_effect_t for modern equivalent.") = (1 << 4);
+static const uint8_t PURUPURU_SPECIAL_MOTOR2 __depr("Please see purupuru_effect_t for modern equivalent.") = (1 << 7);
+static const uint8_t PURUPURU_SPECIAL_PULSE __depr("Please see purupuru_effect_t for modern equivalent.") = (1);
/** \brief Send an effect to a jump pack.
...<truncated>...
hooks/post-receive
--
A pseudo Operating System for the Dreamcast.
|