Skip to content

Commit

Permalink
[DOGBAIT]: switch led state instead of making it blink
Browse files Browse the repository at this point in the history
  • Loading branch information
israpps authored Apr 27, 2024
1 parent 3ef923e commit 01af49e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions iop/system2x6/dogbait/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,21 @@

IRX_ID(MODNAME, MAJOR, MINOR);
char rdata[16];
char wdata[2] = {0x42, (char)(1 << 8)};
char wdata[1] = {0x0};

//the loop waiting was made to mirror what rom0:DAEMON did
void bait(void*)
{
int x;
printf("DOGBAIT v%d.%d by El_isra\n", MAJOR, MINOR);
do {
wdata[0] = !wdata[0];
#ifdef DEBUG
x =
#endif
//thanks uyjulian for the idea. arcade CDVDMAN has the blue led control export stubbed so directly calling the CMD was the only choice
sceCdApplySCmd(0x1c, wdata, sizeof(wdata), rdata);
DPRINTF("sceCdApplySCmd() ret %d\n", x);
DPRINTF("sceCdApplySCmd(0x1c, %x) ret %d\n", wdata[0], x);
x = 0x3c;
while (0 < x) {
DelayThread(1000000);
Expand Down

0 comments on commit 01af49e

Please sign in to comment.