Skip to content

Commit ca8c0fc

Browse files
gcn: trim noise off the per-port readout; add screenshots to each README
GameCube readout cleanups (visible in the new screenshot): - Pak field now only renders for N64-style entries (N64 controller, N64 mouse, N64 mic) where the accessory slot is actually a thing. GCN / WaveBird / Wheel / Keyboard / GBA-attached ports drop the "Pak: None" filler. - Keyboard line stripped to just "Style: Keyboard". The old "Pak: None / Rumble: Unavailable" trailers were nonsense for a keyboard -- it has neither an accessory slot nor a rumble motor. - GBA-detected port now prints just "Boot: <state>" (Booted / BootIdle / BootFail). When state is BootFail it also surfaces the err code; on a successful boot or while still uploading the err field is suppressed. The Kawasedo-handshake echo-sample diagnostics (e=XXXXXXXX XXXXXXXX XXXXXXXX s=XX) that used to follow were first-time-bring-up debug noise -- removed. The supporting GBA_LastEcho / GBA_LastEchoStat / GBA_SnapEchoSamples accessors and their sample_* / last_echo* statics in gba.c/.h are dead-code removed in the same commit. README screenshots: - Each per-console README now embeds a screenshot at the top of "## What it tests": gcn/branding/screenshot.png (Dolphin output showing GCN / GBA-multiboot / Keyboard / spoofed-N64 across four ports), gba/branding/screenshot.png (the tester variant rendering in mGBA), pce/branding/screenshot.png (the main screen with yellow title + white data + cyan footer).
1 parent 5f76035 commit ca8c0fc

9 files changed

Lines changed: 39 additions & 48 deletions

File tree

gba/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ repo's GameCube/Wii host or run from a flash cart.
88

99
## What it tests
1010

11+
<p align="center">
12+
<img src="branding/screenshot.png" alt="GBA Joypad Tester tester-variant rendering: 'JOYPAD TESTER' header, 'GC Link: connected', 2-column live button list (A/B/Sel/Start/L on the left, Up/Down/Left/Right/R on the right), and a Raw hex of the joybus payload" width="480">
13+
</p>
14+
1115
Each variant boots the same Doridian-style joybus controller loop and
1216
reports button state back to the host the moment a button changes. The
1317
two variants differ in what they render on the GBA screen:

gba/branding/screenshot.png

30.9 KB
Loading

gcn/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ keyboard.
77

88
## What it tests
99

10+
<p align="center">
11+
<img src="branding/screenshot.png" alt="GameCube Joypad Tester running in Dolphin showing GCN on Port 1, GBA-multiboot on Port 2, ASCII keyboard on Port 3, and N64 controller with Rumble Pak on Port 4" width="600">
12+
</p>
13+
1014
All four SI ports rendered live, simultaneously, with no active-port toggle.
1115
Each port shows:
1216

gcn/branding/screenshot.png

34.5 KB
Loading

gcn/ppc/gba.c

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -42,21 +42,6 @@ static u8 cmd_buf[8] ATTRIBUTE_ALIGN(32);
4242
static u8 resp_buf[8] ATTRIBUTE_ALIGN(32);
4343
static volatile u32 xfer_done_mask;
4444

45-
// Diagnostic: last echo value read while waiting for payload handshake.
46-
static u32 last_echo[4];
47-
static u8 last_echo_stat[4];
48-
static u32 sample_echo[4][3];
49-
static u8 sample_stat[4][3];
50-
51-
u32 GBA_LastEcho(int chan) { return last_echo[chan & 3]; }
52-
u8 GBA_LastEchoStat(int chan) { return last_echo_stat[chan & 3]; }
53-
void GBA_SnapEchoSamples(int chan, u32 echoes[3], u8 stats[3]) {
54-
for (int i = 0; i < 3; i++) {
55-
echoes[i] = sample_echo[chan & 3][i];
56-
stats[i] = sample_stat[chan & 3][i];
57-
}
58-
}
59-
6045
static void si_cb(s32 chan, u32 err) {
6146
(void)err;
6247
xfer_done_mask |= (1u << chan);
@@ -252,24 +237,11 @@ int GBA_BootEmbedded(int chan) {
252237
// Wait for payload's game-code echo.
253238
u32 expected = (u32)rom[0xAC] | ((u32)rom[0xAD] << 8) |
254239
((u32)rom[0xAE] << 16) | ((u32)rom[0xAF] << 24);
255-
last_echo[chan & 3] = 0;
256-
last_echo_stat[chan & 3] = 0;
257-
for (int s = 0; s < 3; s++) {
258-
sample_echo[chan & 3][s] = 0;
259-
sample_stat[chan & 3][s] = 0;
260-
}
261-
int sample_idx = 0;
262240
bool got_echo = false;
263241
for (int p = 0; p < GBA_ECHO_ATTEMPTS; p++) {
264242
if (jb_read4(chan, r5)) {
265243
u32 v = (u32)r5[0] | ((u32)r5[1] << 8) | ((u32)r5[2] << 16) |
266244
((u32)r5[3] << 24);
267-
if (sample_idx < 3) {
268-
sample_echo[chan & 3][sample_idx] = v;
269-
sample_stat[chan & 3][sample_idx] = r5[4];
270-
sample_idx++;
271-
}
272-
if (v != 0) { last_echo[chan & 3] = v; last_echo_stat[chan & 3] = r5[4]; }
273245
if (v == expected) { got_echo = true; break; }
274246
}
275247
busy_ms(GBA_ECHO_INTERVAL_MS);

gcn/ppc/gba.h

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,6 @@ bool GBA_Detect(int chan);
1515
// detection event.
1616
int GBA_BootEmbedded(int chan);
1717

18-
// Diagnostic accessors — last value seen when waiting for the post-boot
19-
// game-code echo. Useful for distinguishing "BIOS rejected upload" (=
20-
// last encrypted word residue) from "payload running but unexpected
21-
// echo" (= 0x30303030 with byte-shift, or arbitrary garbage).
22-
u32 GBA_LastEcho(int chan);
23-
u8 GBA_LastEchoStat(int chan);
24-
// Capture of first 3 echo samples (post-multiboot reads), to spot
25-
// patterns. echoes[i] = value, stats[i] = JOYSTAT byte.
26-
void GBA_SnapEchoSamples(int chan, u32 echoes[3], u8 stats[3]);
27-
2818
// After multiboot, read the GBA payload's input report.
2919
// Fills `out[2]` with [keys_lo, keys_hi]:
3020
// out[0] bits 0..7 = A, B, Select, Start, Right, Left, Up, Down

gcn/ppc/main.c

Lines changed: 27 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -382,20 +382,35 @@ static void print_port(int p, const pad_snap_t *s) {
382382
printf("Port %d ", p + 1);
383383
SetFgColor(3, 2);
384384
printf("Style: %s ", format_style(s->style));
385-
printf("Pak: %s ", format_pak(s->pak));
385+
// Pak is N64-controller-specific (Memory / Rumble / Transfer / Bio /
386+
// Snap Station). Standard GCN controllers, WaveBirds, the keyboard,
387+
// the wheel, and an attached GBA have no Pak slot, so the field
388+
// only renders for N64-style entries.
389+
if (s->style == STYLE_N64 || s->style == STYLE_MOUSE ||
390+
s->style == STYLE_MIC) {
391+
printf("Pak: %s ", format_pak(s->pak));
392+
} else {
393+
printf(" ");
394+
}
386395
if (s->pak == PAK_BIO_SENSOR) {
387396
printf("BPM: %03d %-9s\n", s->bio_bpm,
388397
s->bio_pulsing ? "(Pulsing)" : "(Resting)");
389398
} else if (s->style == STYLE_GBA) {
390-
const char *st = s->gba_state == 1 ? "Booted "
399+
const char *st = s->gba_state == 1 ? "Booted"
391400
: s->gba_state == 2 ? "BootFail"
392401
: "BootIdle";
393-
u32 e[3]; u8 st3[3];
394-
GBA_SnapEchoSamples(p, e, st3);
395-
printf("Boot:%s err%+d e=%08x %08x %08x s=%02x \n",
396-
st, s->gba_boot_err,
397-
(unsigned)e[0], (unsigned)e[1], (unsigned)e[2],
398-
(unsigned)st3[0]);
402+
// Only surface the boot error when the boot actually failed -- on
403+
// a successful boot or while still uploading, the err code is
404+
// noise. The Kawasedo handshake-echo samples that used to follow
405+
// (e=... e=... e=... s=...) were only useful for first-time
406+
// bring-up debugging and clutter the end-user readout, so they're
407+
// gone too.
408+
if (s->gba_state == 2) {
409+
printf("Boot: %-8s err%+d \n",
410+
st, s->gba_boot_err);
411+
} else {
412+
printf("Boot: %-32s\n", st);
413+
}
399414
} else {
400415
printf("Rumble: %-11s\n",
401416
format_rumble(s->rumble_supported, s->rumble_active));
@@ -692,8 +707,10 @@ int main(int argc, char **argv) {
692707
SetFgColor(2, 2);
693708
printf("Port %d ", i + 1);
694709
SetFgColor(3, 2);
695-
printf("Style: %s Pak: None Rumble: Unavailable\n",
696-
format_style(STYLE_KEYBOARD));
710+
// Keyboard has no Pak slot, no rumble, no analog axes -- drop
711+
// the noise and just label the port. Trailing spaces overwrite
712+
// any leftover text from a previous frame's mode.
713+
printf("Style: %s%-46s\n", format_style(STYLE_KEYBOARD), "");
697714
SetFgColor(7, 2);
698715
const char *k0 = gc_key_label(r[4]);
699716
const char *k1 = gc_key_label(r[5]);

pce/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ Engine mouse.
77

88
## What it tests
99

10+
<p align="center">
11+
<img src="branding/screenshot.png" alt="PC Engine Joypad Tester main screen: yellow 'Joypad Tester - PC Engine' title, white live P1..P5 + Mouse + abs x/y readouts in two columns, cyan 'Press I button or right-click to toggle mouse mode.' footer" width="600">
12+
</p>
13+
1014
Each of the five potential joypad slots (single pad on port 0, or up to
1115
five through a PCE multitap) is shown live as the raw 16-bit joybus
1216
read. The mouse, if present, gets a separate decoded readout with

pce/branding/screenshot.png

42.8 KB
Loading

0 commit comments

Comments
 (0)