From f331ae15ce749bd302372fd19f77f0ae77db880b Mon Sep 17 00:00:00 2001 From: Artemio Date: Thu, 25 Jul 2024 20:12:23 -0600 Subject: [PATCH] == N64 == - Added PLUGE - Added Gray Ramp - Fixed Scroll help - Text now has different spacing for special characters - Fixed help loading when buffer was not empty --- 240psuite/N64/240pSuite.c | 6 ++ 240psuite/N64/Makefile | 5 + 240psuite/N64/assets/PLUGEBorder.png | Bin 0 -> 245 bytes 240psuite/N64/assets/grayramp.png | Bin 0 -> 695 bytes 240psuite/N64/assets/pluge.png | Bin 0 -> 363 bytes 240psuite/N64/assets/plugePAL.png | Bin 0 -> 340 bytes 240psuite/N64/filesystem/help/dshadow.txt | 21 ++++ 240psuite/N64/filesystem/help/general.txt | 2 +- 240psuite/N64/filesystem/help/gray.txt | 22 +++++ 240psuite/N64/filesystem/help/pluge.txt | 60 ++++++++++++ 240psuite/N64/filesystem/help/scroll.txt | 23 +++++ 240psuite/N64/font.c | 38 +++++++- 240psuite/N64/help.c | 2 +- 240psuite/N64/help.h | 2 +- 240psuite/N64/patterns.c | 114 ++++++++++++++++++++++ 240psuite/N64/patterns.h | 2 + 240psuite/N64/tests.c | 6 +- 17 files changed, 294 insertions(+), 9 deletions(-) create mode 100644 240psuite/N64/assets/PLUGEBorder.png create mode 100644 240psuite/N64/assets/grayramp.png create mode 100644 240psuite/N64/assets/pluge.png create mode 100644 240psuite/N64/assets/plugePAL.png create mode 100644 240psuite/N64/filesystem/help/dshadow.txt create mode 100644 240psuite/N64/filesystem/help/gray.txt create mode 100644 240psuite/N64/filesystem/help/pluge.txt create mode 100644 240psuite/N64/filesystem/help/scroll.txt diff --git a/240psuite/N64/240pSuite.c b/240psuite/N64/240pSuite.c index 966c833b..7085be20 100644 --- a/240psuite/N64/240pSuite.c +++ b/240psuite/N64/240pSuite.c @@ -251,6 +251,12 @@ void drawPatternsColorMenu(void) { freeImage(&sd); switch(sel) { + case 1: + drawPLUGE(); + break; + case 7: + drawGrayramp(); + break; case 11: exit = 1; break; diff --git a/240psuite/N64/Makefile b/240psuite/N64/Makefile index 4b0f56d6..5dee937b 100644 --- a/240psuite/N64/Makefile +++ b/240psuite/N64/Makefile @@ -16,10 +16,15 @@ filesystem/%.sprite: assets/%.png @$(N64_MKSPRITE) $(MKSPRITE_FLAGS) -o filesystem "$<" filesystem/240pSuite-font.sprite: MKSPRITE_FLAGS=--tiles 8,8 +filesystem/240pSuite-font480.sprite: MKSPRITE_FLAGS=--tiles 16,16 filesystem/mainbg.sprite: MKSPRITE_FLAGS=--format CI4 filesystem/sd.sprite: MKSPRITE_FLAGS=--format CI4 filesystem/monoscopeFBX.sprite: MKSPRITE_FLAGS=--format CI4 filesystem/monoscope.sprite: MKSPRITE_FLAGS=--format CI4 +filesystem/pluge.sprite: MKSPRITE_FLAGS=--format CI4 +filesystem/plugePAL.sprite: MKSPRITE_FLAGS=--format CI4 +filesystem/PLUGEBorder.sprite: MKSPRITE_FLAGS=--format CI4 +filesystem/grayramp.sprite: MKSPRITE_FLAGS=--format CI8 filesystem/grid.sprite: MKSPRITE_FLAGS=--format CI4 filesystem/grid-480.sprite: MKSPRITE_FLAGS=--format CI4 filesystem/donna.sprite: MKSPRITE_FLAGS=--format RGBA16 diff --git a/240psuite/N64/assets/PLUGEBorder.png b/240psuite/N64/assets/PLUGEBorder.png new file mode 100644 index 0000000000000000000000000000000000000000..a533b271d6d35a97446535f796d66ccdd18c440f GIT binary patch literal 245 zcmeAS@N?(olHy`uVBq!ia0vp^0zkZwgAGWYOSRt!q}Y|gW!U_%O?XxI14-? ziy0WWg+Z8+Vb&Z8pdfpRr>`sfJvJ^@235~XSEd7nWHUn|N}Tg^b5rw5fLsO!=c3fa zlGGH1^30M91$R&1fE2w{cA$8qr;B4q#=W<<778A4;9+*GRXg$bde*D=ifWA2G0~0Z z&iIJ!^$ZGqetO65=O>N8M&Tvw8FyKG7H#`~gggJKfb6SpPfvlAd%F6$taD0e0stBL BLn;6O literal 0 HcmV?d00001 diff --git a/240psuite/N64/assets/grayramp.png b/240psuite/N64/assets/grayramp.png new file mode 100644 index 0000000000000000000000000000000000000000..e25c827ec38b767ccf2f3d4ef59ba3a424f17a65 GIT binary patch literal 695 zcmeAS@N?(olHy`uVBq!ia0y~yU~~YoKX5PuNw?3wkw7XTz$e5NNdN!;|Jt={`}XZ~ za&nTClq@MJ>FMct{`~pexpTF&w6<>D%E`(3{{8#t=;-9+vP_GpdE}!-tI089jvk* zKn`btM`SSr1Gg{;GcwGYBLNg-FY)wsWxvPDAuK9!nOB$_sOPSyi(^Q|t+$svgANA> zxHwAk%yYMCe*63Wq}b4wa})AcPxw+_#y|Os*K8C2=U*n)U9zrS7P@PBaMY6hCf?h( z_}_myt1NT2-pd)wUQXo8oH_5M_TOctQc?~L42(=H90Cf1n$gD)E&qLL-Lm=b-dDBA zt#*I=v3hCT=5T%Y&QoEhK26(`{363@UEhY}w=1mwt#i4)WcB6JS6!uV83w=4fG#Xx b`N7X^ug!nCGUyI4?ioB?{an^LB{Ts5zc;+* literal 0 HcmV?d00001 diff --git a/240psuite/N64/assets/pluge.png b/240psuite/N64/assets/pluge.png new file mode 100644 index 0000000000000000000000000000000000000000..6535ac4c15d422ade02558776366b7de406c90e9 GIT binary patch literal 363 zcmeAS@N?(olHy`uVBq!ia0y~yU~~YoKd>+Z$!6vS5kQK)#M9T6{RO)egCd6|^U+eE z5NCl$WHAE+*9Q=0bXsFF11M+^;1l8sq&YY^1Ox;mBqW@ioT{s9aC`0as1FN(BlPq p3LE&qa>I_xXL}Co1kq=I}$pU@G;OXk;vd$@?2>>y|aD)H= literal 0 HcmV?d00001 diff --git a/240psuite/N64/assets/plugePAL.png b/240psuite/N64/assets/plugePAL.png new file mode 100644 index 0000000000000000000000000000000000000000..2310596957601c94dc8af21afea032607c96eb56 GIT binary patch literal 340 zcmeAS@N?(olHy`uVBq!ia0y~yU~~YoKd>+Z$!6vS5kQK)#M9T6{RO)egQ8$;M($Ri z5NCl$WHAE+*9Q=0bXsFF11M+^;1l8sq&YY^oSdAhtE-P4JNBOts5`pm7f{c3PZ!6K zid%2b8S)-b5OEDGxDa)KNi2);f7mVqqncR`vkKmQTUH)4NyQU_qHf)lK3}MNi$~@A zb8Z0~;DhmpPBx%xumKD9H5VBeae(hk-X;#%!2x+@Rj3;#`MqZKzQ8a|*3^9`&palette[1] = graphics_make_color(0xff, 0x00, 0x00, 0xff); + data_cache_hit_writeback_invalidate(borderGreen->palette, sizeof(uint16_t)*borderGreen->palSize); + borderRed->palette[1] = graphics_make_color(0x00, 0xff, 0x00, 0xff); + data_cache_hit_writeback_invalidate(borderRed->palette, sizeof(uint16_t)*borderRed->palSize); + + while(!end) { + getDisplay(); + + rdpqStart(); + + if(type) + rdpqDrawImage(back); + else + rdpqDrawImage(pal); + if(showBorder) { + rdpqDrawImageXY(borderRed, 14, 39); + rdpqDrawImageXY(borderRed, 44, 39); + rdpqDrawImageXY(borderGreen, 74, 39); + + rdpqDrawImageXY(borderGreen, 228, 39); + rdpqDrawImageXY(borderRed, 259, 39); + rdpqDrawImageXY(borderRed, 289, 39); + } + rdpqEnd(); + + if(showBorder) { + drawString(10, 205, 0xff, 0x00, 0, type ? "11.5" : "3.5"); + drawString(40, 205, 0xff, 0x00, 0, type ? "7.5" : "2"); + drawString(70, 205, 0xff, 0x00, 0, type ? "3.5" : "1"); + + drawString(224, 205, 0xff, 0x00, 0, type ? "3.5" : "1"); + drawString(255, 205, 0xff, 0x00, 0, type ? "7.5" : "2"); + drawString(285, 205, 0xff, 0x00, 0, type ? "11.5" : "3.5"); + showBorder --; + } + + if(showText) { + drawString(200, 20, 0, 0xff, 0, msg); + showText --; + } + + checkMenu(PLUGEHELP, NULL); + waitVsync(); + + joypad_poll(); + keys = controllerButtonsHeld(); + + checkStart(keys); + if(keys.a) { + type = !type; + sprintf(msg, type ? "NTSC 7.5 IRE" : "RGB Full Range"); + showText = 60; + } + if(keys.c_left) + showBorder = 60; + if(keys.b) + end = 1; + } + + freeImage(&borderGreen); + freeImage(&borderRed); + freeImage(&pal); + freeImage(&back); +} + void drawMonoscope() { int end = 0, pattern = 0; image *back = NULL, *orig = NULL; @@ -116,3 +199,34 @@ void drawGrid() { freeImage(&back); } + + +void drawGrayramp() { + int end = 0; + image *back = NULL; + joypad_buttons_t keys; + + back = loadImage("rom:/grayramp.sprite"); + if(!back) + return; + while(!end) { + getDisplay(); + + rdpqStart(); + + rdpqDrawImage(back); + rdpqEnd(); + + checkMenu(GRAYHELP, NULL); + waitVsync(); + + joypad_poll(); + keys = controllerButtonsHeld(); + + checkStart(keys); + if(keys.b) + end = 1; + } + + freeImage(&back); +} diff --git a/240psuite/N64/patterns.h b/240psuite/N64/patterns.h index b9e6dc8c..ea061c38 100644 --- a/240psuite/N64/patterns.h +++ b/240psuite/N64/patterns.h @@ -1,7 +1,9 @@ #ifndef PATTERNS_H #define PATTERNS_H +void drawPLUGE(); void drawMonoscope(); void drawGrid(); +void drawGrayramp(); #endif \ No newline at end of file diff --git a/240psuite/N64/tests.c b/240psuite/N64/tests.c index ce39bdc6..1000e344 100644 --- a/240psuite/N64/tests.c +++ b/240psuite/N64/tests.c @@ -199,11 +199,11 @@ void drawScroll() { rdpqEnd(); #ifdef DEBUG_BENCHMARK - //printPalette(sonicFall, 20, 20); - //printPalette(sonicWater, 100, 20); + printPalette(sonicFall, 20, 20); + printPalette(sonicWater, 100, 20); #endif - checkMenu(NULL, NULL); + checkMenu(SCROLLHELP, NULL); waitVsync(); joypad_poll();