From bc6ccd74b7a9ba960106236d829e5027d8bbfb41 Mon Sep 17 00:00:00 2001 From: Timendus Date: Sat, 31 Dec 2022 15:51:53 +0100 Subject: [PATCH] Release test suite v3 --- bin/chip8-test-suite.8o | 107 +++++++++++++++++++-------------------- bin/chip8-test-suite.ch8 | Bin 3215 -> 3215 bytes docs/index.html | 18 ++++--- pictures/splash.png | Bin 10136 -> 10571 bytes 4 files changed, 64 insertions(+), 61 deletions(-) diff --git a/bin/chip8-test-suite.8o b/bin/chip8-test-suite.8o index 963fadd..470dcf0 100644 --- a/bin/chip8-test-suite.8o +++ b/bin/chip8-test-suite.8o @@ -30,25 +30,24 @@ clear v1 := 1 - show 8 logo-part1 - show 16 logo-part2 - show 24 logo-part3 - show 32 logo-part4 - show 40 logo-part5 - show 48 logo-part6 + show 8 splash-0-0 + show 16 splash-1-0 + show 24 splash-2-0 + show 32 splash-3-0 + show 40 splash-4-0 + show 48 splash-5-0 v1 := 16 - show 8 logo-part7 - show 16 logo-part8 - show 24 logo-part9 - show 32 logo-part10 - show 40 logo-part11 - show 48 logo-part12 + show 8 splash-0-1 + show 16 splash-1-1 + show 24 splash-2-1 + show 32 splash-3-1 + show 40 splash-4-1 + show 48 splash-5-1 jump select-test - # After that, if the user auto-started a test, run it: : select-test @@ -86,7 +85,6 @@ if v0 == 16 then return jump - - # A cute little menu to select a test : menu-after-keypress @@ -201,7 +199,6 @@ : menu-choose-jump 0 0 # jump - # Font rendering code and character data # Kept this very simplistic and fast @@ -236,7 +233,6 @@ return - # Include all available tests: # Disassembly of the famous "IBM logo" program, published here before: @@ -278,7 +274,6 @@ jump menu-after-keypress # Address 552 / 0x228 - # Corax89's chip8-test-rom, published here before: # https://github.com/corax89/chip8-test-rom @@ -690,12 +685,12 @@ # Shift right (with LSB) opcode 0x86 - vF := 7 - vF >>= vF # 3 (0x3), but should be overwritten by flag, so 1 + vF := 27 + vF >>= vF # 13 (0xD), but should be overwritten by flag, so 1 v3 := vF - v2 := 3 - v2 >>= v2 # 1 (0x1) - expect-v2-vf-v3 1 1 1 + v2 := 27 + v2 >>= v2 # 13 (0xD) + expect-v2-vf-v3 13 1 1 # Subtraction in the other direction (with carry) opcode 0x87 @@ -733,7 +728,6 @@ jump menu-after-keypress - # Quirks test # This is a visual adaptation of some of the tests I wrote for Silicon8 @@ -777,32 +771,30 @@ : quirks-run-tests waitKeyRelease - # Determine frames per second + # Determine frames per second for dispQuirk clear - v0 := 120 - delay := v0 i := quirks-values load v4 i := quirks-image + vF := 120 + delay := vF loop - v5 := 32 + v5 := 30 loop - sprite v0 v1 8 + sprite v0 v1 1 v5 -= 1 - if v5 != 0 then again + if v5 != 0 then + again v2 += v4 v3 += vF vE := delay if vE != 0 then again - vE := 128 - v2 >>= v2 - v3 >>= v3 - if vF == 1 then v2 |= vE - + # We expect the inner loop with 30 `sprite`s to have been able to run four + # times in the timespan of 120 interrupts v0 := 1 if v3 != 0 then v0 := 0 - if v2 != 2 then v0 := 0 + if v2 != 4 then v0 := 0 i := scratchpad-plus-1 save v0 @@ -1036,7 +1028,6 @@ jump menu-after-keypress - # Keypad test # A fresh new implementation for this test suite @@ -1138,34 +1129,33 @@ sprite v0 v1 3 jump menu-after-keypress - - - -: logo-part1 +: splash-0-0 0x0f 0x02 0x02 0x02 0x02 0x02 0x00 0x00 0x1f 0x3f 0x71 0xe0 0xe5 0xe0 0xe8 -: logo-part2 +: splash-1-0 0xa0 0x0d 0x2a 0x28 0x28 0x28 0x00 0x00 0x18 0xb8 0xb8 0x38 0x38 0x3f 0xbf -: logo-part3 +: splash-2-0 0x00 0x19 0xa5 0xbd 0xa1 0x9d 0x00 0x00 0x0c 0x1d 0x1d 0x01 0x0d 0x1d 0x9d -: logo-part4 +: splash-3-0 0x01 0xc7 0x29 0x29 0x29 0x27 0x00 0x00 0xf8 0xfc 0xce 0xc6 0xc6 0xc6 0xc6 -: logo-part5 +: splash-4-0 0x00 0x49 0x4a 0x49 0x48 0x3b 0x00 0x00 0x00 0x01 0x03 0x03 0x03 0x01 0xf0 -: logo-part6 +: splash-5-0 0x30 0x90 0x00 0x00 0x80 0x00 0x00 0x00 0xfe 0xc7 0x83 0x83 0x83 0xc6 0xfc -: logo-part7 +: splash-0-1 0xe7 0xe0 0xe0 0xe0 0xe0 0x71 0x3f 0x1f 0x00 0x00 0x07 0x02 0x02 0x02 0x02 -: logo-part8 +: splash-1-1 0x39 0x38 0x38 0x38 0x38 0xb8 0xb8 0x38 0x00 0x00 0x31 0x4a 0x79 0x40 0x3b -: logo-part9 +: splash-2-1 0xdd 0xdd 0xdd 0xdd 0xdd 0xdd 0xdd 0xdd 0x00 0x00 0xa0 0x38 0x20 0xa0 0x18 -: logo-part10 +: splash-3-1 0xce 0xfc 0xf8 0xc0 0xc0 0xca 0xca 0xc4 0x00 0x00 0x30 0x44 0x24 0x14 0x63 -: logo-part11 - 0xf1 0x03 0x07 0xc7 0x27 0x47 0x83 0xe1 0x00 0x00 0x28 0x8e 0xa8 0xa8 0xa6 -: logo-part12 +: splash-4-1 + 0xf1 0x03 0x07 0xc7 0x27 0x47 0x23 0xc1 0x00 0x00 0x28 0x8e 0xa8 0xa8 0xa6 +: splash-5-1 0xce 0x87 0x03 0x03 0x03 0x87 0xfe 0xfc 0x00 0x00 0x60 0x90 0xf0 0x80 0x70 + + : scratchpad 0 : scratchpad-plus-1 @@ -1177,6 +1167,7 @@ : scratchpad-plus-16 0 + : menu-main 10 8 :pointer ibm-logo 10 13 :pointer corax89 @@ -1201,6 +1192,7 @@ 0b11000000 0b11000000 + # Positive and negative images : imageok 0xEA 0xAC 0xAA 0xEA @@ -1372,6 +1364,7 @@ 0b00000000 0b01000000 + : ibm-logo-part1 0xFF 0x00 0xFF 0x00 0x3C 0x00 0x3C 0x00 0x3C 0x00 0x3C 0x00 0xFF 0x00 0xFF : ibm-logo-part2 @@ -1385,6 +1378,7 @@ : ibm-logo-part6 0xE0 0x00 0xE0 0x00 0x80 0x00 0x80 0x00 0x80 0x00 0x80 0x00 0xE0 0x00 0xE0 + : flags-no-carry str "HAPPY" 0 : flags-carry @@ -1392,6 +1386,7 @@ : flags-other str "OTHER" 0 + : quirks-menu 12 13 :pointer quirks-chip8 12 18 :pointer quirks-schip @@ -1427,9 +1422,10 @@ str "ERR" 0 : quirks-values - 28 12 0 0 1 + 32 12 0 0 1 : quirks-image - 0x3C 0x7E 0xFF 0xDB 0xFF 0xDB 0x66 0x3C + 0b10000000 + : keypad-menu 4 13 :pointer keypad-down @@ -1493,6 +1489,7 @@ 0b11111110 0b11111110 + # Jump quirk targets: :org 0xE87 # We jump here when using v0 in the `jump0` quirks test @@ -1501,4 +1498,4 @@ :org 0xE8B # We jump here when using vE in the `jump0` quirks test v5 := 1 - jump quirks-resume \ No newline at end of file + jump quirks-resume diff --git a/bin/chip8-test-suite.ch8 b/bin/chip8-test-suite.ch8 index 67cff6339f90962cf76b2c3117365d0598d68224..57065dc614f5d2b0de4a33716b3b381cc8586336 100644 GIT binary patch delta 1500 zcmZ8hUr1Y57(XX}HENrrOL}w7lIUGU)M=`-3^$5O)KS{upxNjc<;Hsbm*!R&8)EGu zEj2AGIvYlZ4}xXT;W;NTluUdWt}x5S9iN8_UD*%l&=7 z-~GPtd?%Un&H2uvd zSIJr<@YD7+3o4*IeW+H(%5uT+a{6s9Nb}?TyM_J%SVoH+Sye9Ro}$v$Dk^YvPoew> z9<`1+;#g}KYNV~-uhQioR;hHVk@~k*<2HKgfbsVmhON{dKh&1XStBGS;2h2rYPL%3}r#g7@r~3O2i*c@jbHfd(Px~5$ z(n&en%-Nyj#BeY*&?kw6MGyEtf>Hh>?F{@6CHo6TJ@X7^@yW_OB#t<_13V2%P)m@Np# z3hPtuZqU$G7v5T#v|Qci`%fSpG5^Y%`FV_M(>s2~`?0_rg)GOI5BD&aXB6`^cxN!t{U;iGaAjiOqXlxVclO(nRDV5k<4Mte8cB63ZbK?+wWtWrC5rNy zLDe67Hs@8nF;mWc(@<-3ZrhB(6KUOcu40Xg5?IIVQhL)?lgz?lDq$==?!h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