X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=pcsx_rearmed.git;a=blobdiff_plain;f=frontend%2Fplugin_lib.c;h=8d5605ffda3f0d548294da4e2c32cbb6461c6f73;hp=58c67d27a850790001fbdbe0a8a329b90d78d10f;hb=90f1d26c2e771993c1a563f4c0ea81432bd9fc5e;hpb=78c60846942cad7d41d6d23a7c3d2b905ee4b822 diff --git a/frontend/plugin_lib.c b/frontend/plugin_lib.c index 58c67d27..8d5605ff 100644 --- a/frontend/plugin_lib.c +++ b/frontend/plugin_lib.c @@ -74,6 +74,35 @@ static void print_cpu_usage(void) pl_text_out16(pl_fbdev_w - 28, pl_fbdev_h - 10, "%3d", tick_per_sec); } +// draw 192x8 status of 24 sound channels +static __attribute__((noinline)) void draw_active_chans(void) +{ + extern void spu_get_debug_info(int *chans_out, int *fmod_chans_out, int *noise_chans_out); // hack + int live_chans, fmod_chans, noise_chans; + + static const unsigned short colors[2] = { 0x1fe3, 0x0700 }; + unsigned short *dest = (unsigned short *)pl_fbdev_buf + + pl_fbdev_w * (pl_fbdev_h - 10) + pl_fbdev_w / 2 - 192/2; + unsigned short *d, p; + int c, x, y; + + if (pl_fbdev_bpp != 16) + return; + + spu_get_debug_info(&live_chans, &fmod_chans, &noise_chans); + + for (c = 0; c < 24; c++) { + d = dest + c * 8; + p = !(live_chans & (1<