Free games for graphing calculators: NumWorks, TI-Nspire CX, Casio fx-CG50 and soon TI-84 Plus CE. Balatro, Celeste, Hollow Knight, Minecraft and more.
C calculatorcalculator-gamescasiochesscrossy-roaddrive-madfx-cg50gamesgeometry-dashgraphing-calculatorndlessnumworksnumworks-appsnumworks-calculatornumworks-gamenumworks-gamestetristi-84-plus-ceti-nspire
Donkey Kong: Kong's side and climb, Pauline carried and the oil drum redrawn, and its emulator test
Mason363e8803220b237
diff --git a/games/donkeykong/src/art.h b/games/donkeykong/src/art.hindex 668e9071..fd888f71 100644--- a/games/donkeykong/src/art.h+++ b/games/donkeykong/src/art.h@@ -49,7 +49,7 @@ static const uint8_t dk_spr[91][64] = {{0x00,0x15,0x55,0x40,0x00,0x55,0x55,0x50,0x00,0x55,0x55,0x50,0x01,0x55,0x55,0x54,0x01,0x59,0x55,0x54,0x05,0x5A,0x55,0x54,0x05,0x56,0xA5,0x54,0x15,0x55,0x6A,0xA0,0x15,0x55,0x55,0x40,0x00,0xA0,0x28,0x00,0x03,0xF0,0x3C,0x00,0x0F,0xF0,0x3F,0x00,0x0F,0x00,0x0F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* 11 */{0x00,0x15,0x55,0x40,0x00,0x55,0x55,0x50,0x00,0x55,0x55,0x54,0x01,0x55,0x55,0x55,0x01,0x65,0x55,0x55,0x05,0x5A,0x55,0x54,0x05,0x55,0xA9,0x50,0x05,0x55,0x5A,0x80,0x01,0x55,0x55,0x00,0x00,0x28,0x28,0x00,0x00,0xFC,0x3C,0x00,0x03,0xFC,0x3F,0x00,0x03,0xC0,0x0F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* 12 */{0x00,0x55,0x55,0x40,0x01,0x55,0x55,0x50,0x01,0x55,0x55,0x50,0x05,0x55,0x55,0x54,0x05,0x65,0x56,0x54,0x15,0x69,0x5A,0x55,0x15,0x5A,0xA9,0x55,0x55,0x55,0x55,0x55,0x15,0x55,0x55,0x54,0x00,0x28,0x28,0x00,0x00,0xFC,0x3F,0x00,0x03,0xFC,0x3F,0xC0,0x03,0xC0,0x03,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* 13 */- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x54,0x00,0x00,0x15,0x55,0x80,0x00,0x15,0x55,0x60,0x00,0x05,0x55,0x5A,0x00,0x01,0x55,0x52,0x80,0x00,0x50,0xA0,0xAC,0x02,0x80,0x28,0x3F,0x0F,0x00,0x0A,0xF0,0x3F,0x00,0x03,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* 14 */+ {0x00,0x05,0x54,0x00,0x00,0x15,0x55,0x00,0x00,0x15,0x55,0x00,0x00,0x55,0x55,0x40,0x01,0x55,0x55,0x50,0x01,0x59,0x56,0x50,0x05,0x5A,0x5A,0x54,0x05,0x55,0xA5,0x54,0x01,0x55,0x55,0x50,0x00,0x28,0x0A,0x00,0x00,0x28,0x02,0x80,0x00,0xFC,0x00,0xF0,0x00,0xF0,0x00,0xFC,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* 14 */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x2A,0xA8,0x00,0x02,0x95,0x56,0x80,0x09,0x55,0x5F,0x60,0x09,0x55,0x77,0x60,0x25,0x55,0xD5,0x58,0x25,0x57,0x55,0x58,0x25,0x5D,0x55,0x58,0x09,0xF5,0x55,0x60,0x09,0xF5,0x55,0x60,0x02,0x95,0x56,0x80,0x00,0x2A,0xA8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* 15 */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0A,0xAA,0xAA,0xA0,0x2F,0xFF,0xFF,0xF8,0x25,0x55,0x55,0x58,0x25,0x55,0x55,0x58,0x2F,0xFF,0xFF,0xF8,0x25,0x55,0x55,0x58,0x25,0x55,0x55,0x58,0x2F,0xFF,0xFF,0xF8,0x0A,0xAA,0xAA,0xA0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* 16 */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0A,0xAA,0xAA,0xA0,0x2F,0xFF,0xFF,0xF8,0x25,0x55,0x55,0x58,0x25,0x65,0x59,0x58,0x2F,0xFF,0xFF,0xF8,0x25,0x59,0x56,0x58,0x25,0x55,0x55,0x58,0x2F,0xFF,0xFF,0xF8,0x0A,0xAA,0xAA,0xA0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* 17 */@@ -71,18 +71,18 @@ static const uint8_t dk_spr[91][64] = {{0x00,0x00,0x54,0x00,0x00,0x05,0x55,0x40,0x00,0x15,0x55,0x50,0x00,0x55,0x55,0x50,0x01,0x55,0x55,0x50,0x01,0x57,0x55,0x40,0x05,0x57,0xD5,0x00,0x05,0x55,0xD4,0x00,0x05,0x55,0x50,0x00,0x05,0x55,0x50,0x00,0x05,0x55,0x40,0x00,0x05,0x55,0x40,0x00,0x0D,0x55,0xC0,0x00,0x2A,0xAA,0x80,0x00,0x2A,0xAA,0xA0,0x00,0x2A,0x28,0xA0,0x00}, /* 29 */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x54,0x00,0x00,0x15,0x55,0x40,0x00,0x55,0x55,0x50,0x00,0x55,0x55,0x54,0x00,0x55,0x55,0x55,0x00,0x15,0x55,0x55,0x40,0x05,0x55,0x55,0x40,0x00,0x55,0x55,0x40,0x00,0x05,0x55,0x40,0x00,0x01,0x55,0x40,0x00,0x01,0x55,0x40,0x00,0x01,0x55,0x00}, /* 2A */{0x00,0x01,0x55,0x00,0x00,0x05,0x54,0x00,0x00,0x15,0x50,0x00,0x00,0xD5,0xC0,0x00,0x0A,0xAA,0x00,0x00,0x2A,0xAA,0x00,0x00,0x2A,0xAA,0x00,0x00,0x0A,0xA8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* 2B */- {0x55,0x55,0x50,0x00,0x55,0x55,0x50,0x00,0x55,0x55,0x54,0x00,0x55,0x55,0x54,0x00,0x55,0x55,0x54,0x00,0x55,0x55,0x54,0x00,0x55,0x55,0x54,0x00,0x55,0x55,0x55,0x00,0x55,0x55,0x55,0x00,0x55,0x55,0x55,0x00,0x55,0x55,0x55,0x00,0x15,0x55,0x57,0x00,0x2A,0xAA,0xAA,0x80,0x2A,0xAA,0xAA,0xA0,0xA8,0xA8,0xA2,0xA0,0x00,0x00,0x00,0x00}, /* 2C */- {0x00,0x00,0x55,0x55,0x00,0x01,0x55,0x55,0x00,0x05,0x55,0x55,0x00,0x15,0x55,0x55,0x00,0x55,0x55,0x51,0x01,0x55,0x55,0x41,0x05,0x55,0x55,0x01,0x15,0x55,0x54,0x01,0x15,0x55,0x50,0x01,0x55,0x55,0x40,0x01,0xD5,0x57,0x00,0x01,0xAA,0xAA,0x00,0x01,0xAA,0xAA,0x80,0x00,0xA2,0xA2,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* 2D */- {0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x54,0x55,0x55,0x55,0x50,0x15,0x55,0x55,0x40,0x05,0x55,0x55,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* 2E */- {0x05,0x55,0x55,0x40,0x15,0x55,0x55,0x54,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55}, /* 2F */- {0x00,0x15,0x54,0x00,0x01,0x55,0x55,0x40,0x05,0x55,0x55,0x50,0x15,0x5A,0xA9,0x54,0x15,0x6A,0xAA,0x54,0x55,0xAF,0xAA,0x95,0x56,0xA7,0xAA,0x95,0xAA,0xAA,0xAA,0x95,0xAA,0xAA,0xAA,0x95,0xAA,0xAA,0xAA,0x55,0x95,0x55,0x5A,0x55,0xAA,0xAA,0xAA,0x55,0x2A,0xAA,0xA9,0x55,0x05,0x55,0x55,0x55,0x01,0x55,0x55,0x55,0x00,0x15,0x55,0x55}, /* 30 */- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x55,0x40,0x00,0x00,0x55,0x54,0x00,0x00,0x15,0x55,0x40,0x00,0x01,0x55,0x50,0x00,0x00,0x15,0x5C,0x00,0x00,0x0A,0xAA,0x00,0x00,0x2A,0xAA,0x80,0x00,0x2A,0xAA,0x80,0x00,0x0A,0xAA,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* 31 */- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x55,0x55,0x00,0x05,0x55,0x55,0x00,0x15,0x55,0x55,0x00,0x55,0x55,0x55,0x00,0x55,0x55,0x55,0x01,0x55,0x55,0x55,0x01,0x55,0x55,0x55,0x01,0x55,0x55,0x55,0x01,0x55,0x55,0x55,0x00,0x55,0x55,0x55,0x00,0x55,0x55,0x55,0x00,0x15,0x55,0x55}, /* 32 */- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x55,0x55,0x00,0x00,0x55,0x55,0x50,0x00,0x55,0x55,0x54,0x00,0x55,0x55,0x55,0x00,0x55,0x55,0x55,0x00,0x55,0x55,0x55,0x40,0x55,0x55,0x55,0x40,0x55,0x55,0x55,0x40,0x55,0x55,0x55,0x40,0x55,0x55,0x55,0x00,0x55,0x55,0x55,0x00,0x55,0x55,0x54,0x00}, /* 33 */- {0x2A,0xA8,0x00,0x00,0x2A,0xAA,0x00,0x00,0x0A,0xAA,0x00,0x00,0x03,0x5C,0x00,0x00,0x01,0x54,0x00,0x00,0x01,0x55,0x00,0x00,0x01,0x55,0x40,0x00,0x00,0x55,0x50,0x00,0x00,0x15,0x54,0x00,0x00,0x05,0x55,0x00,0x00,0x01,0x55,0x40,0x00,0x00,0x55,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* 34 */- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x55,0x00,0x00,0x00,0x55,0x50,0x00,0x00,0x15,0x54,0x00,0x00,0x05,0x55,0x00,0x00,0x01,0x55,0xC0,0x00,0x00,0x5A,0xA0,0x00,0x00,0x2A,0xA8,0x00,0x00,0x2A,0xA8,0x00,0x00,0x0A,0xA0,0x00,0x00,0x00,0x00,0x00}, /* 35 */- {0x00,0x55,0x55,0x55,0x00,0x55,0x55,0x55,0x00,0x15,0x55,0x55,0x00,0x15,0x54,0x55,0x00,0x15,0x54,0x00,0x00,0x15,0x54,0x00,0x00,0x15,0x54,0x00,0x00,0x15,0x54,0x00,0x00,0x15,0x54,0x00,0x00,0x35,0x5C,0x00,0x00,0xAA,0xAA,0x00,0x00,0xAA,0xAA,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* 36 */- {0x55,0x55,0x55,0x00,0x55,0x55,0x55,0x00,0x55,0x55,0x54,0x00,0x55,0x55,0x54,0x00,0x55,0x55,0x50,0x00,0x05,0x55,0x40,0x00,0x0D,0x57,0x00,0x00,0x2A,0xAA,0x80,0x00,0x2A,0xAA,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* 37 */+ {0x55,0x54,0x00,0x00,0x55,0x55,0x50,0x00,0x7F,0xFD,0x55,0x00,0xD5,0x57,0xD5,0x40,0x55,0x55,0x55,0x50,0x55,0x55,0x55,0x50,0x55,0x55,0x55,0x50,0x55,0x55,0x55,0x50,0x55,0x55,0x55,0x50,0x05,0x55,0x55,0x50,0x00,0x55,0x55,0x50,0x00,0x35,0x55,0x70,0x00,0xAA,0xAA,0xA8,0x02,0xAA,0xAA,0xAA,0x0A,0xAA,0xAA,0xAA,0x08,0xA2,0x8A,0x28}, /* 2C */+ {0x00,0x05,0x75,0x55,0x00,0x15,0xD5,0x55,0x00,0x57,0x55,0x55,0x01,0x5D,0x55,0x55,0x05,0x55,0x55,0x55,0x05,0x55,0x51,0x55,0x15,0x55,0x40,0x01,0x35,0x55,0xC0,0x00,0xAA,0xAA,0x80,0x00,0xAA,0xAA,0xA0,0x00,0xAA,0xAA,0xA0,0x00,0xAA,0xAA,0x80,0x00,0x8A,0x28,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* 2D */+ {0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x57,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x15,0x55,0x55,0x55,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* 2E */+ {0x00,0x01,0x55,0x40,0x00,0x55,0x55,0x54,0x05,0x55,0x55,0x55,0x57,0xFF,0xFD,0x55,0x7D,0x55,0x57,0xD5,0xD5,0x55,0x55,0x75,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55}, /* 2F */+ {0x00,0x05,0x54,0x00,0x00,0x55,0x55,0x40,0x01,0x55,0x55,0x50,0x05,0x55,0x55,0x54,0x05,0xF5,0x55,0x55,0x15,0xD5,0x55,0x55,0x2A,0xA9,0x55,0x55,0xAA,0xAA,0x55,0x55,0xAA,0xAA,0x95,0x55,0xAA,0xAA,0x95,0x55,0x95,0x55,0x95,0x55,0xAA,0xAA,0x95,0x55,0x2A,0xAA,0x55,0x55,0x05,0x55,0x55,0x55,0x01,0x55,0x55,0x55,0x00,0x15,0x55,0x55}, /* 30 */+ {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x54,0x00,0x00,0x05,0x55,0x40,0x00,0x05,0x55,0x54,0x00,0x01,0x55,0x55,0x00,0x00,0x55,0x57,0xC0,0x00,0x05,0x5A,0xA0,0x00,0x00,0xAA,0xA8,0x00,0x00,0xAA,0xA8,0x00,0x00,0x2A,0xA0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* 31 */+ {0x00,0x00,0x01,0x55,0x00,0x00,0x15,0x55,0x00,0x00,0x55,0x55,0x00,0x00,0x55,0x55,0x01,0x55,0x55,0x55,0x15,0x55,0x55,0x55,0x55,0x7D,0x55,0x55,0x55,0xD5,0x55,0x55,0x55,0x55,0x55,0x57,0x15,0x55,0x55,0x57,0x05,0x55,0x55,0x57,0x01,0x55,0x55,0x55,0x00,0x55,0x55,0x55,0x00,0x55,0x55,0x55,0x00,0x15,0x55,0x55,0x00,0x05,0x55,0x55}, /* 32 */+ {0x55,0x40,0x00,0x00,0x55,0x54,0x00,0x00,0x55,0x55,0x00,0x00,0x55,0x55,0x00,0x00,0x55,0x55,0x55,0x40,0x55,0x55,0x55,0x54,0x55,0x55,0x7D,0x55,0x55,0x55,0x57,0x55,0xD5,0x55,0x55,0x55,0xD5,0x55,0x55,0x54,0xD5,0x55,0x55,0x50,0x55,0x55,0x55,0x40,0x55,0x55,0x55,0x00,0x55,0x55,0x55,0x00,0x55,0x55,0x54,0x00,0x55,0x55,0x50,0x00}, /* 33 */+ {0x00,0x2A,0xA8,0x00,0x00,0xAA,0xAA,0x00,0x00,0xAA,0xAA,0x00,0x00,0x35,0x5C,0x00,0x00,0x15,0x54,0x00,0x00,0x15,0x54,0x00,0x00,0x15,0x55,0x00,0x00,0x55,0x55,0x00,0x00,0x55,0x55,0x40,0x00,0x55,0x55,0x40,0x00,0x55,0x55,0x00,0x00,0x15,0x54,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* 34 */+ {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x15,0x54,0x00,0x00,0x15,0x55,0x00,0x00,0x55,0x55,0x00,0x00,0x55,0x55,0x00,0x00,0xD5,0x57,0x00,0x02,0xAA,0xA8,0x00,0x02,0xAA,0xA8,0x00,0x00,0xAA,0xA0,0x00,0x00,0x00,0x00,0x00}, /* 35 */+ {0x00,0x15,0x55,0x50,0x00,0x15,0x55,0x50,0x00,0x55,0x55,0x40,0x00,0x55,0x55,0x00,0x00,0x55,0x54,0x00,0x01,0x55,0x50,0x00,0x01,0x55,0x40,0x00,0x01,0x55,0x40,0x00,0x03,0x55,0xC0,0x00,0x0A,0xAA,0xA0,0x00,0x0A,0xAA,0xA8,0x00,0x0A,0x28,0xA0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* 36 */+ {0x05,0x55,0x54,0x00,0x05,0x55,0x55,0x00,0x01,0x55,0x55,0x40,0x00,0x55,0x55,0x40,0x00,0x35,0x55,0xC0,0x00,0xAA,0xAA,0x80,0x00,0xAA,0xAA,0x80,0x00,0x28,0xA2,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* 37 */{0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x80,0x15,0x00,0x02,0xA0,0x04,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0x0C,0x00,0x10,0x00,0x00,0x00,0x10,0x02,0x00,0x01,0x55,0x0A,0x80,0x00,0x10,0x02,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* 39 */{0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55}, /* 3A */{0x00,0x00,0x00,0x00,0x01,0x55,0x55,0x40,0x00,0x55,0x55,0x00,0x00,0x20,0x08,0x00,0x00,0x08,0x20,0x00,0x00,0x02,0x80,0x00,0x00,0x08,0x20,0x00,0x00,0x20,0x08,0x00,0x00,0x08,0x20,0x00,0x00,0x02,0x80,0x00,0x00,0x08,0x20,0x00,0x00,0x20,0x08,0x00,0x00,0x55,0x55,0x00,0x01,0x55,0x55,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* 3B */@@ -96,7 +96,7 @@ static const uint8_t dk_spr[91][64] = {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x55,0x55,0x55,0x55,0xAA,0xAA,0xAA,0xAA,0x03,0xC0,0x03,0xC0,0x0C,0x30,0x0C,0x30,0x30,0x0C,0x30,0x0C,0xC0,0x03,0xC0,0x03,0x55,0x55,0x55,0x55,0xAA,0xAA,0xAA,0xAA,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* 44 */{0x00,0x00,0x00,0x00,0x05,0x55,0x55,0x50,0x15,0x55,0x55,0x54,0x1A,0xAA,0xAA,0xA4,0x1B,0xFF,0xFF,0xE4,0x1B,0xBB,0xBB,0xE4,0x1B,0xFF,0xFF,0xE4,0x1A,0xAA,0xAA,0xA4,0x15,0x55,0x55,0x54,0x01,0x55,0x55,0x40,0x00,0x16,0x94,0x00,0x00,0x06,0x90,0x00,0x00,0x02,0x80,0x00,0x00,0x02,0x80,0x00,0x00,0x02,0x80,0x00,0x00,0x02,0x80,0x00}, /* 45 */{0x01,0x00,0x00,0x40,0x01,0x55,0x55,0x40,0x01,0x00,0x00,0x40,0x01,0x00,0x00,0x40,0x01,0x00,0x00,0x40,0x01,0x55,0x55,0x40,0x01,0x00,0x00,0x40,0x01,0x00,0x00,0x40,0x01,0x00,0x00,0x40,0x01,0x55,0x55,0x40,0x01,0x00,0x00,0x40,0x01,0x00,0x00,0x40,0x01,0x00,0x00,0x40,0x01,0x55,0x55,0x40,0x01,0x00,0x00,0x40,0x01,0x00,0x00,0x40}, /* 46 */- {0x00,0x00,0x00,0x00,0x55,0x55,0x55,0x55,0x75,0x55,0x55,0x55,0x7A,0xAA,0xAA,0xA9,0x75,0x55,0x55,0x55,0x76,0xA6,0x99,0x55,0x76,0x65,0x96,0x55,0x76,0x65,0x96,0x55,0x76,0xA6,0xA6,0xA5,0x75,0x55,0x55,0x55,0x7A,0xAA,0xAA,0xA9,0x75,0x55,0x55,0x55,0x75,0xF7,0xDF,0x7D,0x75,0x55,0x55,0x55,0x75,0x55,0x55,0x55,0x55,0x55,0x55,0x55}, /* 49 */+ {0x00,0x00,0x00,0x00,0x55,0x55,0x55,0x55,0x6A,0xAA,0xAA,0xA9,0x65,0x55,0x55,0x55,0x65,0x55,0x55,0x55,0x6F,0xDF,0xDD,0x55,0x6D,0xD7,0x5D,0x55,0x6D,0xD7,0x5D,0x55,0x6D,0xD7,0x5D,0x55,0x6F,0xDF,0xDF,0xD5,0x65,0x55,0x55,0x55,0x65,0x55,0x55,0x55,0x6A,0xAA,0xAA,0xA9,0x65,0x55,0x55,0x55,0x65,0x55,0x55,0x55,0x55,0x55,0x55,0x55}, /* 49 */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x50,0x00,0x00,0x57,0x55,0x00,0x01,0x75,0x5D,0x40,0x05,0x55,0xD5,0x50,0x17,0x55,0x57,0x54,0x2A,0xAA,0xAA,0xA8,0x0A,0xAA,0xAA,0xA0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* 4B */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x55,0x55,0x00,0x05,0x75,0x5D,0x50,0x15,0x57,0x55,0x54,0x5D,0x55,0x55,0xD5,0xAA,0xAA,0xAA,0xAA,0x2A,0xAA,0xAA,0xA8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* 4C */{0x00,0x02,0x00,0x00,0x00,0x0A,0x00,0x80,0x00,0x0A,0x82,0x80,0x00,0x29,0xAA,0x00,0x00,0xA5,0x56,0x80,0x02,0x95,0x55,0xA0,0x02,0x5F,0x5F,0x60,0x0A,0x5E,0x5E,0x60,0x09,0x55,0x55,0x68,0x09,0x56,0x95,0x58,0x09,0x55,0x55,0x58,0x0A,0x55,0x55,0x68,0x02,0x95,0x55,0xA0,0x02,0x8A,0xA8,0xA0,0x0A,0x02,0x20,0x28,0x08,0x02,0x20,0x08}, /* 4D */@@ -112,7 +112,7 @@ static const uint8_t dk_spr[91][64] = {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x50,0x00,0x00,0x10,0x04,0x00,0x00,0x10,0x04,0x00,0x01,0x55,0x55,0x40,0x05,0xA5,0x55,0x50,0x06,0x55,0x55,0x50,0x05,0x56,0x95,0x50,0x05,0x56,0x95,0x50,0x05,0x55,0x55,0x50,0x01,0x55,0x55,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* 74 */{0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x16,0x50,0x00,0x01,0x69,0x69,0x40,0x05,0xA5,0x5A,0x50,0x16,0x95,0x56,0x94,0x25,0x96,0x59,0x68,0x20,0x82,0x08,0x08,0x00,0x02,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x02,0x08,0x00,0x00,0x00,0xA0,0x00,0x00,0x00,0x00,0x00}, /* 75 */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0xF0,0x0F,0xF0,0x3E,0xBC,0x3F,0xFC,0xFA,0xFF,0xFF,0xFF,0xFB,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x3F,0xFF,0xFF,0xFC,0x0F,0xFF,0xFF,0xF0,0x03,0xFF,0xFF,0xC0,0x00,0xFF,0xFF,0x00,0x00,0x3F,0xFC,0x00,0x00,0x0F,0xF0,0x00,0x00,0x03,0xC0,0x00,0x00,0x00,0x00,0x00}, /* 76 */- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0xFC,0x3F,0xC0,0x0F,0xAF,0xFF,0xF0,0x3E,0xBF,0xFF,0xFC,0x3E,0xFF,0xFF,0xFC,0x3F,0xFF,0xFF,0xFC,0x3F,0xFF,0xFF,0xFC,0x0F,0xFF,0xFF,0xF0,0x03,0xFF,0xFF,0xC0,0x00,0xFF,0xFF,0x00,0x00,0x3F,0xFC,0x00,0x00,0x0F,0xF0,0x00,0x00,0x03,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* 77 */+ {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0xC0,0x03,0xFC,0xFA,0xF0,0x0F,0xFF,0xEB,0xF0,0x3F,0xFF,0xEF,0xC0,0xFF,0xFF,0xFF,0xF0,0x3F,0xFF,0xFF,0xFC,0x0F,0xFF,0xFF,0xFF,0x03,0xFF,0x3F,0xFC,0x0F,0xFC,0x0F,0xF0,0x3F,0xF0,0x03,0xF0,0x3F,0xC0,0x00,0xFC,0x0F,0x00,0x00,0x3C,0x0C,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x00,0x00}, /* 77 */{0x0A,0xA0,0xAA,0x00,0x01,0x50,0x54,0x00,0x0D,0x55,0x57,0x00,0x3F,0x55,0x5F,0xC0,0x3E,0x75,0xDB,0xC0,0x2A,0x95,0x6A,0x80,0x0A,0x9A,0x6A,0x00,0x00,0x2A,0x68,0x00,0x03,0xFF,0xF0,0x00,0x0A,0xAF,0xFA,0x00,0x3F,0xBF,0xAE,0x00,0x0F,0xEF,0xEE,0x00,0x00,0xEF,0xA8,0x00,0x05,0x55,0x54,0x00,0x00,0x15,0x50,0x00,0x00,0x00,0x00,0x00}, /* 78 */{0x00,0x00,0x00,0x00,0x03,0xE0,0x0C,0x00,0x8F,0xE8,0x2F,0x10,0x97,0xA8,0xEF,0x10,0x95,0x68,0xEB,0xD0,0x95,0xD6,0xEE,0x94,0x05,0x5A,0xFF,0xD4,0x05,0x5A,0xFF,0xD4,0x95,0xD5,0xFB,0x94,0x95,0x6A,0xFA,0x94,0x97,0xAA,0x2F,0x90,0x8F,0xE8,0x2A,0x00,0x03,0xE0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* 79 */{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0xF0,0x00,0x00,0x3F,0xFC,0x00,0x00,0x3F,0xFC,0x00,0x00,0x0F,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x58,0xA0,0x00,0x05,0x5A,0xA5,0x6A,0x2F,0xDA,0xA5,0x5A,0x2F,0xFA,0x55,0x5A,0x0F,0xC3,0xC5,0x40}, /* 7A */@@ -180,7 +180,7 @@ static const uint8_t dk_font[50][8] = {{0x0C,0x18,0x30,0x60,0x30,0x18,0x0C,0x00},{0x60,0x30,0x18,0x0C,0x18,0x30,0x60,0x00},{0x00,0x06,0x0C,0x18,0x30,0x60,0x00,0x00},- {0x00,0x00,0x7C,0x7E,0x7E,0x7E,0x7E,0x00},+ {0x00,0x00,0x6C,0x7E,0x5A,0x5A,0x5A,0x00},{0x0C,0x18,0x30,0x30,0x30,0x18,0x0C,0x00},{0x30,0x18,0x0C,0x0C,0x0C,0x18,0x30,0x00},};diff --git a/games/donkeykong/tests/play.c b/games/donkeykong/tests/play.cindex d35f9198..e75e5a5f 100644--- a/games/donkeykong/tests/play.c+++ b/games/donkeykong/tests/play.c@@ -627,8 +627,16 @@ static void picture(const dk_state *s, const char *dir, const char *name) {/* the bot's game, a picture of each board a while into it */static const char *shots_dir;-static int shot_marks, board_frames, last_board;+static int shot_marks, board_frames, last_board, scene_frames;static void shot_each(const dk_state *s) {+ if (dk_mode(s) == DK_MODE_CLEAR) { /* the scenes after 25m and 100m */+ scene_frames++;+ if (game_boards == 1 && scene_frames == 150 && !(shot_marks & 64)) picture(s, shots_dir, "clear25"), shot_marks |= 64;+ if (game_boards == 2 && M(s, 0x6388) == 5 && M(s, 0x62AF) == 0xB0 && !(shot_marks & 128))+ picture(s, shots_dir, "clear100"), shot_marks |= 128;+ } else {+ scene_frames = 0;+ }static const struct { int board, frames; const char *name; } when[] = {{1, 420, "25m"}, {2, 600, "100m"}, {4, 300, "75m"}, {7, 420, "50m"}, {6, 700, "shot"}};if (game_boards != last_board) last_board = game_boards, board_frames = 0;@@ -659,6 +667,13 @@ static void shots(const char *dir) {picture(&s, dir, "howhigh");shots_dir = dir, shot_marks = 0, last_board = -1;bot_game(&s, 4242, 9, shot_each);+ play_on(&s, 9, 1, 1); /* a barrel, and Mario's death */+ for (int f = 0; f < 3000 && dk_mode(&s) != DK_MODE_DEAD; f++) dk_tick(&s, 0);+ for (int f = 0; f < 0x40 + 8 * 5; f++) dk_tick(&s, 0);+ picture(&s, dir, "death");+ for (int f = 0; f < 20000 && !s.over; f++) dk_tick(&s, 0); /* the other lives, and GAME OVER */+ view.screen = DK_SCREEN_OVER, view.sel = 0, view.new_best = 0;+ picture(&s, dir, "over");view.screen = DK_SCREEN_PAUSE, view.sel = 0;picture(&s, dir, "pause");}diff --git a/games/donkeykong/tools/art.py b/games/donkeykong/tools/art.pyindex 9de3855e..20e07dac 100644--- a/games/donkeykong/tools/art.py+++ b/games/donkeykong/tools/art.py@@ -389,18 +389,20 @@ S[0x13] = ("paul_low", grid(["...BBBB..BBBB...","...BB......BB...",], P_LOW))-S[0x14] = ("paul_low", grid([- "................",- "................",- "..PPPPP.........",- ".PPPPPPPW.......",- ".PPPPPPPPW......",- "..PPPPPPPPWW....",- "...PPPPPPP.WW...",- "....PP..WW..WWB.",- "...WW....WW..BBB",- "..BB......WWBB..",- ".BBB.......BB...",+S[0x14] = ("paul_low", grid([ # carried under Kong's arm+ "......PPPPP.....",+ ".....PPPPPPP....",+ ".....PPPPPPP....",+ "....PPPPPPPPP...",+ "...PPPPPPPPPPP..",+ "...PPPWPPPPWPP..",+ "..PPPPWWPPWWPPP.",+ "..PPPPPPWWPPPPP.",+ "...PPPPPPPPPPP..",+ ".....WW...WW....",+ ".....WW....WW...",+ "....BBB.....BB..",+ "....BB......BBB.",], P_LOW))# barrels: rolling (turned a quarter at a time by flips), falling down a ladder (seen from the side),@@ -616,19 +618,19 @@ DR = "LCW"S[0x49] = ("blue", grid(["................","LLLLLLLLLLLLLLLL",- "LWLLLLLLLLLLLLLL",- "LWCCCCCCCCCCCCCL",- "LWLLLLLLLLLLLLLL",- "LWLCCCLCCLCLLLLL",- "LWLCLCLLCLLCLLLL",- "LWLCLCLLCLLCLLLL",- "LWLCCCLCCCLCCCLL",- "LWLLLLLLLLLLLLLL",- "LWCCCCCCCCCCCCCL",- "LWLLLLLLLLLLLLLL",- "LWLLWWLWWLWWLWWL",- "LWLLLLLLLLLLLLLL",- "LWLLLLLLLLLLLLLL",+ "LCCCCCCCCCCCCCCL",+ "LCLLLLLLLLLLLLLL",+ "LCLLLLLLLLLLLLLL",+ "LCWWWLWWWLWLLLLL",+ "LCWLWLLWLLWLLLLL",+ "LCWLWLLWLLWLLLLL",+ "LCWLWLLWLLWLLLLL",+ "LCWWWLWWWLWWWLLL",+ "LCLLLLLLLLLLLLLL",+ "LCLLLLLLLLLLLLLL",+ "LCCCCCCCCCCCCCCL",+ "LCLLLLLLLLLLLLLL",+ "LCLLLLLLLLLLLLLL","LLLLLLLLLLLLLLLL",], DR))FL = "RYW"@@ -971,17 +973,16 @@ heart = [".......PP.......",]S[0x76] = ("heart", grid(heart, HE))-broken = [list(r) for r in grid(heart, HE)]-for y in range(16): # a crack down the middle, the halves apart+broken = [[0] * 16 for _ in range(16)]+whole = grid(heart, HE)+crack = [7, 7, 8, 8, 7, 6, 7, 8, 9, 8, 7, 7, 8, 8, 7, 7] # a jagged line down the middle+for y in range(16):for x in range(16):- if x in (7, 8):- broken[y][x] = 0- for x in range(7, 0, -1):- broken[y][x] = broken[y][x - 1]- broken[y][0] = 0- for x in range(8, 15):- broken[y][x] = broken[y][x + 1]- broken[y][15] = 0+ if not whole[y][x] or x == crack[y]:+ continue+ nx = x - 1 if x < crack[y] else x + 1 # the two halves apart+ if 0 <= nx < 16:+ broken[y][nx] = whole[y][x]S[0x77] = ("heart", broken)# the points: 100, 200, 300, 500, 800 (in Kong's face colours, white digits)@@ -1187,128 +1188,88 @@ KONG_PARTS = {"................",], K),}-# side view, facing left, taking a barrel from the pile (0x3982): a 3x2 block of parts-SIDE_ROWS = [- ".....BBBBBB..... ..BBBBBBBBBBB... ................",- "...BBBBBBBBBB... .BBBBBBBBBBBBBB. ................",- "..BBBBBBBBBBBB.. BBBBBBBBBBBBBBBB B...............",- ".BBBBBPPPPPBBBB. BBBBBBBBBBBBBBBB BB..............",- ".BBBBPPPPPPPBBB. BBBBBBBBBBBBBBBB BBB.............",- "BBBBPPWWPPPPPBBB BBBBBBBBBBBBBBBB BBBB............",- "BBBPPPBWPPPPPBBB BBBBBBBBBBBBBBBB BBBBB...........",- "PPPPPPPPPPPPPBBB BBBBBBBBBBBBBBBB BBBBB...........",- "PPPPPPPPPPPPPBBB BBBBBBBBBBBBBBBB BBBBBB..........",- "PPPPPPPPPPPPBBBB BBBBBBBBBBBBBBBB BBBBBB..........",- "PBBBBBBBBBPPBBBB BBBBBBBBBBBBBBBB BBBBBBB.........",- "PPPPPPPPPPPPBBBB BBBBBBBBBBBBBBBB BBBBBBB.........",- ".PPPPPPPPPPBBBBB BBBBBBBBBBBBBBBB BBBBBBBB........",- "..BBBBBBBBBBBBBB BBBBBBBBBBBBBBBB BBBBBBBB........",- "...BBBBBBBBBBBBB BBBBBBBBBBBBBBBB BBBBBBBBB.......",- ".....BBBBBBBBBBB BBBBBBBBBBBBBBBB BBBBBBBBB.......",- "........BBBBBBBB BBBBBBBBBBBBBBBB BBBBBBBBBB......",- ".......BBBBBBBBB BBBBBBBBBBBBBBBB BBBBBBBBBB......",- "......BBBBBBBBBB BBBBBBBBBBBBBBBB BBBBBBBBBBB.....",- ".....BBBBBBBBBBB BBBBBBBBBBBBBBBB BBBBBBBBBBB.....",- "....BBBBBBBBBB.B BBBBBBBBBBBBBBBB BBBBBBBBBBB.....",- "...BBBBBBBBBB..B BBBBBBBBBBBBBBBB BBBBBBBBBBB.....",- "..BBBBBBBBBB...B BBBBBBBBBBBBBBBB BBBBBBBBBBB.....",- ".BBBBBBBBBB....B BBBBBBBBBBBBBBBB BBBBBBBBBBBB....",- ".BBBBBBBBB.....B BBBBBBBBBBBBBBBB BBBBBBBBBBBB....",- "BBBBBBBBB......B BBBBBBBBBBBBBBBB BBBBBBBBBBBB....",- "OBBBBBBO.......B BBBBBBBBBBBBBBB. BBBBBBBBBBBB....",- "PPPPPPPP.......B BBBBBBBBBBBBBB.. .BBBBBBBBBBO....",- "PPPPPPPPP....... .BBBBBBBBBBBB... .PPPPPPPPPPPP...",- "PP.PPP.PP....... ..BBBBBBBBBB.... .PPPPPPPPPPPPP..",- "................ ................ PPP.PPP.PP.PPP..",- "................ ................ ................",-]-side = [r.split(" ") for r in SIDE_ROWS]+# side view, facing left, taking a barrel from the pile (0x3982): a 3x2 block of parts, cut from one picture+def side_kong():+ g = [["."] * 48 for _ in range(32)]+ def run(y, x0, x1, ch="B"):+ for x in range(x0, x1 + 1):+ g[y][x] = ch+ head = {0: (6, 10), 1: (4, 12), 2: (3, 13), 3: (2, 14), 4: (2, 14), 5: (1, 14), 6: (1, 14), 7: (0, 14), 8: (0, 14),+ 9: (0, 14), 10: (0, 14), 11: (0, 14), 12: (1, 14), 13: (2, 14), 14: (3, 14), 15: (5, 14)}+ back = {0: (23, 28), 1: (20, 30), 2: (18, 31), 3: (16, 31), 22: (15, 30), 23: (17, 29)}+ for y in range(4, 16):+ back[y] = (14, 31)+ for y in range(16, 22):+ back[y] = (11, 31)+ rump = {16: (28, 38), 17: (27, 41), 18: (27, 43), 19: (27, 44), 20: (27, 45), 21: (28, 45), 22: (29, 45),+ 23: (30, 45), 24: (32, 45), 25: (34, 45), 26: (36, 45), 27: (37, 45)}+ arm = {13: (9, 16), 14: (8, 16), 15: (7, 15), 16: (6, 14), 17: (5, 13), 18: (4, 12), 19: (3, 11), 20: (2, 10),+ 21: (2, 9), 22: (1, 8), 23: (1, 8)}+ for part in (back, rump, arm, head):+ for y, (x0, x1) in part.items():+ run(y, x0, x1)+ for y, (x0, x1) in {6: (1, 6), 7: (0, 7), 8: (0, 8), 9: (0, 8), 10: (0, 8), 11: (0, 8), 12: (1, 7)}.items():+ run(y, x0, x1, "P") # his muzzle+ run(10, 1, 7) # the mouth+ g[4][4] = g[4][5] = g[5][4] = "W"+ for y, (x0, x1) in {24: (0, 8), 25: (0, 9), 26: (0, 9), 27: (0, 8)}.items():+ run(y, x0, x1, "P") # his hand on the barrel+ for x in (0, 2, 3, 5, 6):+ g[28][x] = "P"+ g[23][1] = g[23][8] = "O"+ for y, (x0, x1) in {28: (36, 46), 29: (35, 47), 30: (34, 47)}.items():+ run(y, x0, x1, "P") # his foot+ for x in (34, 36, 37, 39, 40, 42, 43, 45, 46):+ g[31][x] = "P"+ g[27][37] = g[27][45] = "O"+ for (y, x0, x1) in ((3, 19, 26), (4, 17, 18), (4, 27, 28), (5, 16, 16), (5, 29, 29), (18, 33, 38), (19, 31, 32),+ (19, 39, 40), (16, 9, 9), (17, 8, 8), (18, 7, 7), (19, 6, 6)):+ run(y, x0, x1, "O") # his fur catching the light+ return ["".join(r) for r in g]+++SIDE_ROWS = side_kong()+side = [[r[0:16], r[16:32], r[32:48]] for r in SIDE_ROWS]SIDE_CODES = {0x30: (0, 0, "kface"), 0x2F: (1, 0, "kong"), 0x2D: (0, 1, "kong"), 0x2E: (1, 1, "kong"),0x2C: (2, 1, "kong")}-# climbing his ladders, seen from behind (0x388C)+# climbing his ladders, seen from behind (0x388C): both halves of his back, an arm up and one down (mirrored in+# turn by the game), his feet, and his right arm round Pauline+BACK = [+ "...........BBBBBBBBBB...........",+ ".........BBBBBBBBBBBBBB.........",+ "........BBBBBBBBBBBBBBBB........",+ "........BBBBBBBBBBBBBBBB........",+ "...BBBBBBBBBBBBBBBBBBBBBBBBBB...",+ ".BBBBBBBBBBBBBBBBBBBBBBBBBBBBBB.",+ "BBBBBOOBBBBBBBBBBBBBBBBBBOOBBBBB",+ "BBBBOBBBBBBBBBBBBBBBBBBBBBBOBBBB",+ "BBBBBBBBBBBBBBBOOBBBBBBBBBBBBBBB",+ ".BBBBBBBBBBBBBBOOBBBBBBBBBBBBBB.",+ "..BBBBBBBBBBBBBOOBBBBBBBBBBBBB..",+ "...BBBBBBBBBBBBBBBBBBBBBBBBBB...",+ "....BBBBBBBBBBBBBBBBBBBBBBBB....",+ "....BBBBBBBBBBBBBBBBBBBBBBBB....",+ ".....BBBBBBBBBBBBBBBBBBBBBB.....",+ "......BBBBBBBBBBBBBBBBBBBB......",+]CLIMB = {- 0x32: [ # his back, left- "................",- "................",- "................",- "................",- "........BBBBBBBB",- "......BBBBBBBBBB",- ".....BBBBBBBBBBB",- "....BBBBBBBBBBBB",- "....BBBBBBBBBBBB",- "...BBBBBBBBBBBBB",- "...BBBBBBBBBBBBB",- "...BBBBBBBBBBBBB",- "...BBBBBBBBBBBBB",- "....BBBBBBBBBBBB",- "....BBBBBBBBBBBB",- ".....BBBBBBBBBBB",- ],- 0x34: [ # left arm up, reaching for a rung- ".PPPPPP.........",- ".PPPPPPP........",- "..PPPPPP........",- "...OBBO.........",- "...BBBB.........",- "...BBBBB........",- "...BBBBBB.......",- "....BBBBBB......",- ".....BBBBBB.....",- "......BBBBBB....",- ".......BBBBBB...",- "........BBBBB...",- "................",- "................",- "................",- "................",- ],- 0x35: [ # right arm down, holding on- "................",- "................",- "................",- "................",- "................",- "................",- "BBBB............",- "BBBBBB..........",- ".BBBBBB.........",- "..BBBBBB........",- "...BBBBBO.......",- "....BBPPPP......",+ 0x32: [r[:16] for r in BACK],+ 0x33: [r[16:] for r in BACK],+ 0x34: [ # left arm up, on a rung".....PPPPPP.....",- ".....PPPPPP.....",- "......PPPP......",- "................",- ],- 0x36: [ # left foot, on a rung- "....BBBBBBBBBBBB",- "....BBBBBBBBBBBB",- ".....BBBBBBBBBBB",- ".....BBBBBB.BBBB",- ".....BBBBBB.....",- ".....BBBBBB.....",+ "....PPPPPPPP....",+ "....PPPPPPPP....",+ ".....OBBBBO.....",".....BBBBBB.....",".....BBBBBB.....",+ ".....BBBBBBB....",+ "....BBBBBBBB....",+ "....BBBBBBBBB...",+ "....BBBBBBBBB...",+ "....BBBBBBBB....",".....BBBBBB.....",- ".....OBBBBO.....",- "....PPPPPPPP....",- "....PPPPPPPP....",- "................",- "................",- "................",- "................",],- 0x37: [ # right foot, stepping up- "BBBBBBBBBBBB....",- "BBBBBBBBBBBB....",- "BBBBBBBBBBB.....",- "BBBBBBBBBBB.....",- "BBBBBBBBBB......",- "..BBBBBBB.......",- "..OBBBBO........",- ".PPPPPPPP.......",- ".PPPPPPPP.......",+ 0x35: [ # right arm down, on a lower rung"................","................","................",@@ -1316,24 +1277,52 @@ CLIMB = {"................","................","................",+ ".....BBBBBB.....",+ ".....BBBBBBB....",+ "....BBBBBBBB....",+ "....BBBBBBBB....",+ "....OBBBBBBO....",+ "...PPPPPPPP.....",+ "...PPPPPPPP.....",+ "....PPPPPP......",],- 0x31: [ # his right arm round Pauline- "................",- "................",- "................",- "BBBBB...........",- "BBBBBBB.........",- ".BBBBBBBB.......",+ 0x36: [ # left foot, down on a rung+ ".....BBBBBBBBB..",+ ".....BBBBBBBBB..",+ "....BBBBBBBBB...",+ "....BBBBBBBB....",+ "....BBBBBBB.....","...BBBBBBB......",- ".....BBBBBO.....",- "......PPPPPP....",- ".....PPPPPPPP...",- ".....PPPPPPPP...",- "......PPPPPP....",- "................",+ "...BBBBBB.......",+ "...BBBBBB.......",+ "...OBBBBO.......",+ "..PPPPPPPP......",+ "..PPPPPPPPP.....",+ "..PP.PP.PP......",+ ],+ 0x37: [ # right foot, up on the next rung+ "..BBBBBBBBB.....",+ "..BBBBBBBBBB....",+ "...BBBBBBBBBB...",+ "....BBBBBBBBB...",+ ".....OBBBBBBO...",+ "....PPPPPPPPP...",+ "....PPPPPPPPP...",+ ".....PP.PP.PP...",+ ],+ 0x31: [ # his right arm round Pauline"................","................","................",+ "..BBBBB.........",+ "..BBBBBBB.......",+ "..BBBBBBBBB.....",+ "...BBBBBBBBB....",+ "....BBBBBBBOO...",+ "......BBBBPPPP..",+ "........PPPPPPP.",+ "........PPPPPPP.",+ ".........PPPPP..",],}for code, (pal, rows, keys) in {c: (v[0], v[1], v[2]) for c, v in KONG_PARTS.items()}.items():@@ -1343,7 +1332,6 @@ for code, (cx, cy, pal) in SIDE_CODES.items():S[code] = (pal, grid(rows, KF if pal == "kface" else K))for code, rows in CLIMB.items():S[code] = ("kong", grid(rows, K))-S[0x33] = ("kong", mirror(grid(CLIMB[0x32], K)))# dizzy faces after his fall (shown upside down by the game)for i, code in enumerate((0x20, 0x21, 0x22)):face = [list(r) for r in grid(KONG_PARTS[0x24][1], KF)]@@ -1461,6 +1449,8 @@ def glyph(ch):def bold_rows(ch):"""8 rows of 8 bits: the 5x7 glyph, each column doubled to the right (6 wide), one pixel in."""+ if ch == "m": # (metres: too thin to double)+ return [0, 0, 0b01101100, 0b01111110, 0b01011010, 0b01011010, 0b01011010, 0]cols = glyph(ch)rows = []for y in range(8):diff --git a/tests/test_games.py b/tests/test_games.pyindex 929c7ba5..fe7f9760 100644--- a/tests/test_games.py+++ b/tests/test_games.py@@ -217,6 +217,10 @@ GAMES = {# copy, it opens paused: Back, another second, paused again, quit with On/Off"jetpackjoyride": ("JetpackJoyride.nwa", "jetpackjoyride.sav", presses((1500, "ok"), (2500, "ok"), (3600, "back")), 5000,presses((1500, "back"), (2700, "back")), 4000),+ # the title, how to play, then the game: a second of Kong's climb, paused (that saves it); Home keeps it. Next+ # time, from the copy, it opens paused: Back, a second more, paused again, quit with On/Off+ "donkeykong": ("DonkeyKong.nwa", "donkeykong.sav", presses((1500, "ok"), (2500, "ok"), (3600, "back")), 5000,+ presses((1500, "back"), (2700, "back")), 4000),# a level, its message, then play; then back to the level select"portal": ("PortalReturns.nwa", "portal.sav",presses((1500, "ok"), (2500, "ok"), (3500, "ok")) + every(4000, 7000, 400, "right", 300), 8000,@@ -249,7 +253,24 @@ COPIES = {"championisland": "champion_saves.py", "numblocks": "numblocks_saves.p"fnaf": "fnaf_saves.py", "doom": "doom_saves.py", "isaac": "isaac_saves.py","hillclimb": "hillclimb_saves.py", "pvz": "pvz_saves.py", "sonic": "sonic_saves.py","cookieclicker": "cookieclicker_saves.py", "leveldevil": "leveldevil_saves.py",- "jetpackjoyride": "jetpackjoyride_saves.py"}+ "jetpackjoyride": "jetpackjoyride_saves.py", "donkeykong": "donkeykong_saves.py"}+++def dk_frames(v):+ """Donkey Kong's save: the frames since the game began (the arcade's difficulty clock, in the packed RAM)."""+ raw, i = bytearray(), 24+ while i < len(v) - 4 and len(raw) <= 0x384:+ c = v[i]+ i += 1+ if c < 128:+ raw += v[i:i + c + 1]+ i += c + 1+ else:+ raw += bytes([v[i]]) * (c - 126)+ i += 1+ return raw[0x381] * 256 + raw[0x384] if len(raw) > 0x384 else -1++CHECKS = {# the island remembers where Lucky was; after the reinstall, from the copy"championisland": (lambda v: v[:3] == b"CI1" and b"PLAYER_LOC" in v,) * 2,@@ -356,6 +377,9 @@ CHECKS = {# a run kept ("JJR1", has_run at 23, its frames at 60); after the reinstall, from the copy, it goes on"jetpackjoyride": (lambda v: len(v) == 728 and v[:4] == b"JJR1" and v[23] == 1 and struct.unpack_from("<I", v, 60)[0] >= 30,lambda v: v[:4] == b"JJR1" and v[23] == 1 and struct.unpack_from("<I", v, 60)[0] >= 90),+ # a game kept ("DKG1", the game at 23, one game played) a second in; after the reinstall, from the copy, it goes on+ "donkeykong": (lambda v: v[:4] == b"DKG1" and v[23] == 1 and v[12] == 1 and dk_frames(v) >= 30,+ lambda v: v[:4] == b"DKG1" and v[23] == 1 and v[12] == 1 and dk_frames(v) >= 90),"breakout": (lambda v: len(v) == 12 and v[:2] == b"B\2" and v[4] == 1 and struct.unpack_from("<I", v, 8)[0] >= 10,lambda v: v[4] == 0 and struct.unpack_from("<I", v, 8)[0] >= 1), # best kept, shake off# Air Hockey and the easy computer chosen; then the normal computer and Tanks, the tallies kept