Rewrite RGBFIX

- Make it work inside pipelines
- Add RGBFIX tests to the suite
- Be more flexible in accepted MBC names
- Add warnings for dangerous or nonsensical input params
- Improve man page
This commit is contained in:
ISSOtm
2021-01-20 21:22:55 +01:00
committed by Eldred Habert
parent f28b4abafc
commit 41d544a4eb
215 changed files with 1450 additions and 541 deletions
+1
View File
@@ -0,0 +1 @@
/padding*_*
+16
View File
@@ -0,0 +1,16 @@
# RGBFIX tests
These tests check that RGBFIX behaves properly.
## Structure of a test
- `test.bin`: The file passed as input to RGBFIX.
- `test.flags`: The command-line flags passed to RGBFIX's invocation.
Actually, only the first line is considered; the rest of the file may contain comments about the test.
- `test.gb`: The expected output.
May not exist, generally when the test expects an error, in which case the comparison is skipped.
- `test.err`: The expected error output.
## Special tests
- `noexist.err` is the expected error output when RGBFIX is given a non-existent input file.
+3
View File
@@ -0,0 +1,3 @@
‡Ýà!H0‡;<ýNË—ñãí=ÌÊÏç^{ KC}b“Q¤&3ð ñ/]¿—¹”dÙZ=ÃÀ¢bÄaËi:öeSŸ>ñ›U@¼Ay<aeš‰¹$vfÅå­ˆ┚ý¬gŒ VC†ò~>•‘¨þ©† ³s_CÓ› Úç&nWFoKÚšíX`'ñêÁ§ë·blƒ{‡›Œ¿
¯­çÎ8îù†<$:VÍ"ã³™Úh™ÑD©¤Ð¶ñ­QcµïØÐ㸺Zû§T†ž©ø½¨ºVÛ¼ÝtÅ’ªÏ4ªÐd T“« ÄI
Ô(/×»ç¿{hÝ:ƒQmÓ$*|␍ íVPéó.^"&é<äŒk!šé`àù2ÝÝêê␍&Bû lÍ7föèšZe¤yf.˜mƒýØ ¯!³ŒóN5„õd†EÁ¦qF×
+3
View File
@@ -0,0 +1,3 @@
warning: Ignoring 'm' in fix spec
warning: Ignoring 'a' in fix spec
warning: Ignoring 'o' in fix spec
+1
View File
@@ -0,0 +1 @@
-f lmao
+2
View File
@@ -0,0 +1,2 @@
╧ы+2l}~Ч╨я╕├Ж}╧Я1xЙаШЩ&)Y├q*▀ОТ═и▓┌г^ H─p@v6}Юг[┬╙&оЧ┘hё▒лBn~пT┘0Ьнuf┬\╗8╫≥÷жуЗ■ВЖц▒ЬW╫╬Ф╥ 5^Bq<░K╫"S%╤ВU!▓╦r,7Нg┘4х╗┴▌╔╖╜А░ЗhL╟жь²У)√÷┘У6U@Ёв█`щ▒TзT├ М╕·Dи╕▓8zс5╡·~AбИ╠╫э°Щ|␍╕>Т]Е/╧K╠▄Ыd~ис"gF* AU╩"W▌7]}≈ы/Ц}<▀─s[lx■э■}п╚[МлО8Ё█≥╛А═␍Ш╒Ыё╧,·ЕБМФУп!d├,!OЫ²Щ [=В∙▓╟┬╢С┘28hЁ∙╬/к0АЁ}╡╬xЩ╦т╢ГБКнП{б}l■"J╨ ═╗■ш÷┐kТОЦ0_8zВрв\≤-ВrЯтF╘ГR vO│hяrмSыHN≤∙]╥uф╫#▒й╪л;ъ╖r╣└6ЗТ≈Lz┤mЧЙ╥5[╨9Ш
.HsвШ·_~zэ5╓␍/хb├и┼S](м6k█ЛPuя9аJ1ККы╣∙␍,(CвН▄%▌k░ОШка4⌠вр=┐Оя╙Пжад╠&O│▐╧Ц␍Ч.И╞"╫ХЬ
View File
+1
View File
@@ -0,0 +1 @@
-C
+2
View File
@@ -0,0 +1,2 @@
╧ы+2l}~Ч╨я╕├Ж}╧Я1xЙаШЩ&)Y├q*▀ОТ═и▓┌г^ H─p@v6}Юг[┬╙&оЧ┘hё▒лBn~пT┘0Ьнuf┬\╗8╫≥÷жуЗ■ВЖц▒ЬW╫╬Ф╥ 5^Bq<░K╫"S%╤ВU!▓╦r,7Нg┘4х╗┴▌╔╖╜А░ЗhL╟жь²У)√÷┘У6U@Ёв█`щ▒TзT├ М╕·Dи╕▓8zс5╡·~AбИ╠╫э°Щ|␍╕>Т]Е/╧K╠▄Ыd~ис"gF* AU╩"W▌7]}≈ы/Ц}<▀─s[lx■э■}п╚[МлО8Ё█≥╛А═␍Ш╒Ыё╧,·ЕБМФУп!d├,!OЫ²Щ [=В∙▓╟┬╢С┘28hЁ∙╬/к0АЁ}╡╬xЩ╦т╢ГБКюП{б}l■"J╨ ═╗■ш÷┐kТОЦ0_8zВрв\≤-ВrЯтF╘ГR vO│hяrмSыHN≤∙]╥uф╫#▒й╪л;ъ╖r╣└6ЗТ≈Lz┤mЧЙ╥5[╨9Ш
.HsвШ·_~zэ5╓␍/хb├и┼S](м6k█ЛPuя9аJ1ККы╣∙␍,(CвН▄%▌k░ОШка4⌠вр=┐Оя╙Пжад╠&O│▐╧Ц␍Ч.И╞"╫ХЬ
Binary file not shown.
View File
+1
View File
@@ -0,0 +1 @@
-c
Binary file not shown.
View File
+2
View File
@@ -0,0 +1,2 @@
FATAL: "<filename>" too short, expected at least 336 ($150) bytes, got only 0
Fixing "<filename>" failed with 1 error
View File
View File
Binary file not shown.
+1
View File
@@ -0,0 +1 @@
warning: 'l' overriding 'L' in fix spec
+1
View File
@@ -0,0 +1 @@
-f Ll
Binary file not shown.
Binary file not shown.
+1
View File
@@ -0,0 +1 @@
warning: Truncating game ID "FOUR!" to 4 chars
+1
View File
@@ -0,0 +1 @@
-i 'FOUR!'
Binary file not shown.
Binary file not shown.
View File
+1
View File
@@ -0,0 +1 @@
-i RGBD
Binary file not shown.
Binary file not shown.
View File
+1
View File
@@ -0,0 +1 @@
-fg
Binary file not shown.
Binary file not shown.
View File
+1
View File
@@ -0,0 +1 @@
-fg
Binary file not shown.
Binary file not shown.
View File
+1
View File
@@ -0,0 +1 @@
-f G
Binary file not shown.
Binary file not shown.
View File
+1
View File
@@ -0,0 +1 @@
-f g
Binary file not shown.
Binary file not shown.
View File
+2
View File
@@ -0,0 +1,2 @@
-Cf h
Checks that the header checksum properly accounts for header modifications
Binary file not shown.
Binary file not shown.
View File
+1
View File
@@ -0,0 +1 @@
-f H
Binary file not shown.
Binary file not shown.
View File
+1
View File
@@ -0,0 +1 @@
-f h
Binary file not shown.
BIN
View File
Binary file not shown.
View File
+1
View File
@@ -0,0 +1 @@
-j
BIN
View File
Binary file not shown.
Binary file not shown.
View File
+1
View File
@@ -0,0 +1 @@
-f L
Binary file not shown.
BIN
View File
Binary file not shown.
View File
+1
View File
@@ -0,0 +1 @@
-f l
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
View File
+1
View File
@@ -0,0 +1 @@
-m 177
BIN
View File
Binary file not shown.
Binary file not shown.
+1
View File
@@ -0,0 +1 @@
warning: MBC "ROM" has no RAM, but RAM size was set to 2
+1
View File
@@ -0,0 +1 @@
-m ROM -r 2
Binary file not shown.
+3
View File
@@ -0,0 +1,3 @@
ÁÓi& š˙ĹyŕĺSĐěäŇaJ¨ň‘'ZDÉyşč§1nź␍¬íŮ9µQńHĽpçąyF›ź”»ŃŐßĐÖ8^ŞŠ]Ŕbł˘ F‰§mĹ“š
ױьM–‡FíîWóŐwţk÷°± O`ŘÚíčUě0ńär©íşĆΙܥâ±7"®”"fęŕďfw:Đ޸ň˝XpéVËÄŞ\-¶`xť˛ř*NđŐy†a4ÄJĹç´ÄëˇăÜŠĽp—„ľ.7öc+ÝQřŐŽ·B÷HezĽ–§1ĘO<n_&KHhŁ´‹v‘Žűx榢Y˘—ČAŮÇćĚ;Cęożlý :ü ®Ą®żĚ’ýÜ©!–ěľ`@¸:‡z‰v‰˝ädéŁZÓ"±a*m*.:?¤ŁďżĎYË›c3”Č >#`çí\_Úw™Ď
w4 ›öĽş"•qĽśyÚ·p$«i!¨¦ ĺz/nuVňC×DuA5,﹥î°3M ÍIOň=Hýň̲™u1ŤöxŤÖľ¤“éz_0¶=Ôi¬˙Qóµ;,t“*ŰŽv;E¸˛Zkăa>)¶‘E uëĐ+f@ţ}oHDqµ°JĘ#’˝dŃ™s«"ŇĆm8­˘‰V;␍ůýů']|›‰x‡
+1
View File
@@ -0,0 +1 @@
warning: Truncating new licensee "HOMEBREW" to 2 chars
+1
View File
@@ -0,0 +1 @@
-k HOMEBREW
+3
View File
@@ -0,0 +1,3 @@
ÁÓi& šÿÅyàåSÐìäÒaJ¨ò‘'ZDÉyºè§1nŸ␍¬íÙ9µQñH¼pç¹yF›Ÿ”»ÑÕߘÐÖ8^ªŠ]Àb³¢ F‰§mÅ“š
ױьM–‡FíîWóÕwþk÷°± O`ØÚíèUì0ñär©íºÆÎ™Ü¥â±7"®”"fêàˆïfw:ÐÞ¸ò½XpéVËĪ\-¶`x²ø*NðÕy†a4ÄJÅç´Äë¡ãÜŠ¼p—„¾.7öc+ÝQøÕŽ·B÷Hez¼–§1ÊO<n_&KHh£´‹v‘Žûx榢Y¢—ÈAÙÇæÌ;Cêo¿lý :ü ®¥®¿Ì’ýÜ©!–ì¾`@¸:‡z‰v‰½ädé£ZÓ"±a*m*.:?¤£ï¿ÏYHOc3”È >#`çí\_Úw™Ï
w4 ›ö¼º"•q¼œyÚ·p$«ƒi!¨¦ åz/nuVòC×DuA5,ï¹¥î°3M ÍIOò=Hýò̲™u1öxÖ¾¤“éz_0¶=Ôi¬ÿQóµ;,t“*ÛŽv;E¸²Zkãa>)¶‘E uëÐ+f@þ}oHDqµ°JÊ#’½dÑ™s«"ÒÆm8­¢‰V;␍ùýù']|›‰x‡
+3
View File
@@ -0,0 +1,3 @@
ÁÓi& š˙ĹyŕĺSĐěäŇaJ¨ň‘'ZDÉyşč§1nź␍¬íŮ9µQńHĽpçąyF›ź”»ŃŐßĐÖ8^ŞŠ]Ŕbł˘ F‰§mĹ“š
ױьM–‡FíîWóŐwţk÷°± O`ŘÚíčUě0ńär©íşĆΙܥâ±7"®”"fęŕďfw:Đ޸ň˝XpéVËÄŞ\-¶`xť˛ř*NđŐy†a4ÄJĹç´ÄëˇăÜŠĽp—„ľ.7öc+ÝQřŐŽ·B÷HezĽ–§1ĘO<n_&KHhŁ´‹v‘Žűx榢Y˘—ČAŮÇćĚ;Cęożlý :ü ®Ą®żĚ’ýÜ©!–ěľ`@¸:‡z‰v‰˝ädéŁZÓ"±a*m*.:?¤ŁďżĎYË›c3”Č >#`çí\_Úw™Ď
w4 ›öĽş"•qĽśyÚ·p$«i!¨¦ ĺz/nuVňC×DuA5,﹥î°3M ÍIOň=Hýň̲™u1ŤöxŤÖľ¤“éz_0¶=Ôi¬˙Qóµ;,t“*ŰŽv;E¸˛Zkăa>)¶‘E uëĐ+f@ţ}oHDqµ°JĘ#’˝dŃ™s«"ŇĆm8­˘‰V;␍ůýů']|›‰x‡
View File
+1
View File
@@ -0,0 +1 @@
-k HB
+3
View File
@@ -0,0 +1,3 @@
ÁÓi& š˙ĹyŕĺSĐěäŇaJ¨ň‘'ZDÉyşč§1nź␍¬íŮ9µQńHĽpçąyF›ź”»ŃŐßĐÖ8^ŞŠ]Ŕbł˘ F‰§mĹ“š
ױьM–‡FíîWóŐwţk÷°± O`ŘÚíčUě0ńär©íşĆΙܥâ±7"®”"fęŕďfw:Đ޸ň˝XpéVËÄŞ\-¶`xť˛ř*NđŐy†a4ÄJĹç´ÄëˇăÜŠĽp—„ľ.7öc+ÝQřŐŽ·B÷HezĽ–§1ĘO<n_&KHhŁ´‹v‘Žűx榢Y˘—ČAŮÇćĚ;Cęożlý :ü ®Ą®żĚ’ýÜ©!–ěľ`@¸:‡z‰v‰˝ädéŁZÓ"±a*m*.:?¤ŁďżĎYHBc3”Č >#`çí\_Úw™Ď
w4 ›öĽş"•qĽśyÚ·p$«i!¨¦ ĺz/nuVňC×DuA5,﹥î°3M ÍIOň=Hýň̲™u1ŤöxŤÖľ¤“éz_0¶=Ôi¬˙Qóµ;,t“*ŰŽv;E¸˛Zkăa>)¶‘E uëĐ+f@ţ}oHDqµ°JĘ#’˝dŃ™s«"ŇĆm8­˘‰V;␍ůýů']|›‰x‡
+2
View File
@@ -0,0 +1,2 @@
FATAL: Failed to open "noexist" for reading+writing: No such file or directory
Fixing "noexist" failed with 1 error
Binary file not shown.
View File
+1
View File
@@ -0,0 +1 @@
-l 0x2a
Binary file not shown.
+2
View File
@@ -0,0 +1,2 @@
EZ/:ÂÔΠøÐ€šÜJ/ŒÝõÊ_<ð&ÑA­¢Ž˜ÃXgAP
`°1@Whõ||ø»e뻬e^"7(*YVÍTõœ‘OY!Þâ Ì”]‚ˆ’ðÈy–V~xæaÛ]á;Ÿúý¡ÀzUm òüz:d@ÖªØb¸ 'vʆqËWŒÚ_ÂæºÓì2)Gv(k¨ª”g,p*@ùÚ!¶Dõ„0kãÿ§áeË%ÇšodÛñÎ$r‰ÚÊ <è:”æcgiŒ"aF'=f䳚ºEcVcL.03"w),æ HQiDŸfÝ3s(-$?a0ó@†¦.O¡B{yÍz‰Ê«½ hØ/\ šSŠ]óoúåm'2D#/grÕW3¸Χ°&UÓÌ÷EgMhÚ-A¾6ƒ…²ÿ…4M|1âq0Oì­*$²Où/n²ú•gžš2R»æQˆXú_½¬“[숔ÔpÒÚ\°)ƧTS±T”aP*'[ïx÷Ò>ß…¤Ub[Ô¦ã9sÎçI‰ÊP␍þªÄ£­dnñú$õ›(¡É”ÌÓýEysºÚˆæÆ‡6ŒvÀüÃH ‚AÀÀƒÍqnKO{Ö»w“k&á †kQùOjCe‡ã@ý5
View File
+1
View File
@@ -0,0 +1 @@
-l 42
+2
View File
@@ -0,0 +1,2 @@
EZ/:ÂÔΠøÐ€šÜJ/ŒÝõÊ_<ð&ÑA­¢Ž˜ÃXgAP
`°1@Whõ||ø»e뻬e^"7(*YVÍTõœ‘OY!Þâ Ì”]‚ˆ’ðÈy–V~xæaÛ]á;Ÿúý¡ÀzUm òüz:d@ÖªØb¸ 'vʆqËWŒÚ_ÂæºÓì2)Gv(k¨ª”g,p*@ùÚ!¶Dõ„0kãÿ§áeË%ÇšodÛñÎ$r‰ÚÊ <è:”æcgiŒ"aF'=f䳚ºEcVcL.03"w),æ HQiDŸfÝ3s(-$?a0ó@†¦.O¡B{yÍz‰Ê«½ hØ/\ šSŠ]óoúåm'2D#/grÕW3¸Χ°&UÓÌ÷EgMhÚ-A¾*6ƒ…²ÿ…4M|1âq0Oì­*$²Où/n²ú•gžš2R»æQˆXú_½¬“[숔ÔpÒÚ\°)ƧTS±T”aP*'[ïx÷Ò>ß…¤Ub[Ô¦ã9sÎçI‰ÊP␍þªÄ£­dnñú$õ›(¡É”ÌÓýEysºÚˆæÆ‡6ŒvÀüÃH ‚AÀÀƒÍqnKO{Ö»w“k&á †kQùOjCe‡ã@ý5
Binary file not shown.
View File
+1
View File
@@ -0,0 +1 @@
-p0xff
Binary file not shown.
Binary file not shown.
View File

Some files were not shown because too many files have changed in this diff Show More