A Documenting of mine Enhanced Enchantment CHIP-8 Game This is my first game for the Octo Jam 7 event. I've improved mine Enchantment game from 2020-06-30 nicely, with great line variety. Follows is a view of the complete game, when loaded into mine MMC: [32m200-201 [31m0512-0513 [34m▀▄▀ ▄ ▀▀ A[4m3[m[34m[4m48[m[34m 41800 [39m I ← from [32m202-203 [31m0514-0515 [34m▀██▀▀█▀█ FF[m[34m65[m[34m 65381 [39m Load V0→VF; I ← I + 16 [32m204-205 [31m0516-0517 [34m▀ █ ▄▄▀ A[4m2[m[34m[4m2C[m[34m 41516 [39m I ← ball [32m206-207 [31m0518-0519 [34m▀█▄█ ▀▀▄ D6[m[34m71[m[34m 54897 [39m Draw 08×01 at V6,V7; VF ← XOR [32m208-209 [31m0520-0521 [34m▀▀ ▄██▄ CC[m[34m1E[m[34m 52254 [39m VC ← ??? AND 030 [32m20A-20B [31m0522-0523 [34m▀▀ ▄██▄▀ CD[m[34m1E[m[34m 52510 [39m VD ← ??? AND 030 [32m20C-20D [31m0524-0525 [34m▀▀▀█ ▄ █ F1[m[34m15[m[34m 61717[33m movement[39m delay ← V1 [32m20E-20F [31m0526-0527 [34m ▀▀ ████ 6F[m[34m0F[m[34m 28431 [39m VF ← 015 [32m210-211 [31m0528-0529 [34m█▀█ ▀▀▀█ EF[m[34mA1[m[34m 61345 [39m Skip next if VF <> key [32m212-213 [31m0530-0531 [34m▀▀▀▀█▀█▀ FF[m[34m0A[m[34m 65290 [39m VF ← key [32m214-215 [31m0532-0533 [34m▀█▄█ ▀▀▄ D6[m[34m71[m[34m 54897 [39m Draw 08×01 at V6,V7; VF ← XOR [32m216-217 [31m0534-0535 [34m█▀█ ▄ E0[m[34mA1[m[34m 57505 [39m Skip next if V0 <> key [32m218-219 [31m0536-0537 [34m ▀▀▀ ▀▀▄ 76[m[34m01[m[34m 30209 [39m V6 ← V6 + 001 [32m21A-21B [31m0538-0539 [34m█▀█ █ E1[m[34mA1[m[34m 57761 [39m Skip next if V1 <> key [32m21C-21D [31m0540-0541 [34m▄███▄██▄ 76[m[34mFF[m[34m 30463 [39m V6 ← V6 + 255 [32m21E-21F [31m0542-0543 [34m█▀█ ▀▄ E2[m[34mA1[m[34m 58017 [39m Skip next if V2 <> key [32m220-221 [31m0544-0545 [34m ▀▀▀ ▀▀█ 77[m[34m01[m[34m 30465 [39m V7 ← V7 + 001 [32m222-223 [31m0546-0547 [34m█▀█ ▀█ E3[m[34mA1[m[34m 58273 [39m Skip next if V3 <> key [32m224-225 [31m0548-0549 [34m▄███▄███ 77[m[34mFF[m[34m 30719 [39m V7 ← V7 + 255 [32m226-227 [31m0550-0551 [34m▀▄ ▀█ 86[m[34m42[m[34m 34370 [39m V6 ← V6 AND V4 [32m228-229 [31m0552-0553 [34m▀▄ ▄ ▀█▀ 87[m[34m52[m[34m 34642 [39m V7 ← V7 AND V5 [32m22A-22B [31m0554-0555 [34m▀█▄█ ▀▀▄ D6[m[34m71[m[34m 54897 [39m Draw 08×01 at V6,V7; VF ← XOR [32m22C-22D [31m0556-0557 [34m█▄ 80[m[34mC0[m[34m 32960[33m+ ball[39m V0 ← VC [32m22E-22F [31m0558-0559 [34m ▀▀ ▀ 62[m[34m00[m[34m 25088 [39m V2 ← 000 [32m230-231 [31m0560-0561 [34m█ ▀▀ 83[m[34m80[m[34m 33664 [39m V3 ← V8 [32m232-233 [31m0562-0563 [34m█ ▄ ▀ 84[m[34m90[m[34m 33936 [39m V4 ← V9 [32m234-235 [31m0564-0565 [34m ▀ ▀▀▀▀ 4F[m[34m00[m[34m 20224 [39m Skip next if VF <> 000 [32m236-237 [31m0566-0567 [34m▀▄▀▀ ▄█ B[4m2[m[34m[4m46[m[34m 45638 [39m Jump to V0 + table [32m238-239 [31m0568-0569 [34m▄▄▄ 00[m[34mE0[m[34m 00224 [39m Clear the screen [32m23A-23B [31m0570-0571 [34m ▀ ▀ 12[m[34m00[m[34m 04608 [39m Jump to 0512 [32m23C-23D [31m0572-0573 [34m█▄ ▄ 80[m[34mD0[m[34m 32976[33m second[39m V0 ← VD [32m23E-23F [31m0574-0575 [34m ▀▀ ▀▄ 62[m[34m01[m[34m 25089 [39m V2 ← 001 [32m240-241 [31m0576-0577 [34m█ ▄ ▀▀ 83[m[34mA0[m[34m 33696 [39m V3 ← VA [32m242-243 [31m0578-0579 [34m█ ▄▄ ▀ 84[m[34mB0[m[34m 33968 [39m V4 ← VB [32m244-245 [31m0580-0581 [34m▀▄▀▀ ▄█ B[4m2[m[34m[4m46[m[34m 45638 [39m Jump to V0 + table [32m246-247 [31m0582-0583 [34m ▄▄▀▄ █ 1[4m2[m[34m[4m6A[m[34m 04714[33m table[39m Jump to up left [32m248-249 [31m0584-0585 [34m ▄▄█ ▀ 1[4m2[m[34m[4m70[m[34m 04720 [39m Jump to up right [32m24A-24B [31m0586-0587 [34m ▄▄█ ▄█ 1[4m2[m[34m[4m76[m[34m 04726 [39m Jump to down left [32m24C-24D [31m0588-0589 [34m ▄▄█▄▄▀ 1[4m2[m[34m[4m7C[m[34m 04732 [39m Jump to down right [32m24E-24F [31m0590-0591 [34m▄ ▀ █ 1[4m2[m[34m[4m82[m[34m 04738 [39m Jump to left up [32m250-251 [31m0592-0593 [34m▄ ▀▄ ▀ 1[4m2[m[34m[4m88[m[34m 04744 [39m Jump to left down [32m252-253 [31m0594-0595 [34m▄ ▀▄▄█ 1[4m2[m[34m[4m8E[m[34m 04750 [39m Jump to right up [32m254-255 [31m0596-0597 [34m▄ █ ▄▀ 1[4m2[m[34m[4m94[m[34m 04756 [39m Jump to right down [32m256-257 [31m0598-0599 [34m▄ █▄ █ 1[4m2[m[34m[4m9A[m[34m 04762 [39m Jump to two up left [32m258-259 [31m0600-0601 [34m▄ ▄▀ █ 1[4m2[m[34m[4mA2[m[34m 04770 [39m Jump to two up right [32m25A-25B [31m0602-0603 [34m▄ ▄▀▄ █ 1[4m2[m[34m[4mAA[m[34m 04778 [39m Jump to two down left [32m25C-25D [31m0604-0605 [34m▄ ▄█ █ 1[4m2[m[34m[4mB2[m[34m 04786 [39m Jump to two down right [32m25E-25F [31m0606-0607 [34m▄ ▄█▄ █ 1[4m2[m[34m[4mBA[m[34m 04794 [39m Jump to two left up [32m260-261 [31m0608-0609 [34m▄▄ ▀ █ 1[4m2[m[34m[4mC2[m[34m 04802 [39m Jump to two right down [32m262-263 [31m0610-0611 [34m▄▄ ▀▄ █ 1[4m2[m[34m[4mCA[m[34m 04810 [39m Jump to left targeting [32m264-265 [31m0612-0613 [34m▄▄ ▀▄▄▀ 1[4m2[m[34m[4mCC[m[34m 04812 [39m Jump to right targeting [32m266-267 [31m0614-0615 [34m▄▄ █▄▄█ 1[4m2[m[34m[4mDE[m[34m 04830 [39m Jump to up [32m268-269 [31m0616-0617 [34m▄▄▄▀ ▀ 1[4m2[m[34m[4mE0[m[34m 04832 [39m Jump to down [32m26A-26B [31m0618-0619 [34m▄███▄▄██ 73[m[34mFF[m[34m 29695[33m up left[39m V3 ← V3 + 255 [32m26C-26D [31m0620-0621 [34m ▀▀▀ ▀ ▄ 74[m[34m01[m[34m 29697 [39m V4 ← V4 + 001 [32m26E-26F [31m0622-0623 [34m▄▄▄▀ █ 1[4m2[m[34m[4mE2[m[34m 04834 [39m Jump to integrate [32m270-271 [31m0624-0625 [34m ▀▀▀ ▀█ 73[m[34m01[m[34m 29441[33m up right[39m V3 ← V3 + 001 [32m272-273 [31m0626-0627 [34m ▀▀▀ ▀ ▄ 74[m[34m01[m[34m 29697 [39m V4 ← V4 + 001 [32m274-275 [31m0628-0629 [34m▄▄▄▀ █ 1[4m2[m[34m[4mE2[m[34m 04834 [39m Jump to integrate [32m276-277 [31m0630-0631 [34m▄███▄▄██ 73[m[34mFF[m[34m 29695[33m down left[39m V3 ← V3 + 255 [32m278-279 [31m0632-0633 [34m▄███▄█▄▄ 74[m[34mFF[m[34m 29951 [39m V4 ← V4 + 255 [32m27A-27B [31m0634-0635 [34m▄▄▄▀ █ 1[4m2[m[34m[4mE2[m[34m 04834 [39m Jump to integrate [32m27C-27D [31m0636-0637 [34m ▀▀▀ ▀█ 73[m[34m01[m[34m 29441[33m down right[39m V3 ← V3 + 001 [32m27E-27F [31m0638-0639 [34m▄███▄█▄▄ 74[m[34mFF[m[34m 29951 [39m V4 ← V4 + 255 [32m280-281 [31m0640-0641 [34m▄▄▄▀ █ 1[4m2[m[34m[4mE2[m[34m 04834 [39m Jump to integrate [32m282-283 [31m0642-0643 [34m ▀▀▀ ▀█ 73[m[34m01[m[34m 29441[33m left up[39m V3 ← V3 + 001 [32m284-285 [31m0644-0645 [34m▄███▄█▄▄ 74[m[34mFF[m[34m 29951 [39m V4 ← V4 + 255 [32m286-287 [31m0646-0647 [34m▄▄▄▀ █ 1[4m2[m[34m[4mE2[m[34m 04834 [39m Jump to integrate [32m288-289 [31m0648-0649 [34m ▀▀▀ ▀█ 73[m[34m01[m[34m 29441[33m left down[39m V3 ← V3 + 001 [32m28A-28B [31m0650-0651 [34m ▀▀▀ ▀ ▄ 74[m[34m01[m[34m 29697 [39m V4 ← V4 + 001 [32m28C-28D [31m0652-0653 [34m▄▄▄▀ █ 1[4m2[m[34m[4mE2[m[34m 04834 [39m Jump to integrate [32m28E-28F [31m0654-0655 [34m▄███▄▄██ 73[m[34mFF[m[34m 29695[33m right up[39m V3 ← V3 + 255 [32m290-291 [31m0656-0657 [34m▄███▄█▄▄ 74[m[34mFF[m[34m 29951 [39m V4 ← V4 + 255 [32m292-293 [31m0658-0659 [34m▄▄▄▀ █ 1[4m2[m[34m[4mE2[m[34m 04834 [39m Jump to integrate [32m294-295 [31m0660-0661 [34m▄███▄▄██ 73[m[34mFF[m[34m 29695[33m right down[39m V3 ← V3 + 255 [32m296-297 [31m0662-0663 [34m ▀▀▀ ▀ ▄ 74[m[34m01[m[34m 29697 [39m V4 ← V4 + 001 [32m298-299 [31m0664-0665 [34m▄▄▄▀ █ 1[4m2[m[34m[4mE2[m[34m 04834 [39m Jump to integrate [32m29A-29B [31m0666-0667 [34m▄███▄▄█▀ 73[m[34mFE[m[34m 29694[33m two up left[39m V3 ← V3 + 254 [32m29C-29D [31m0668-0669 [34m ▀▀▀ ▀ ▄ 74[m[34m01[m[34m 29697 [39m V4 ← V4 + 001 [32m29E-29F [31m0670-0671 [34m▀ █ ▄▄▀▄ A[4m2[m[34m[4m2D[m[34m 41517 [39m I ← two balls [32m2A0-2A1 [31m0672-0673 [34m▄▄▄▀ █ 1[4m2[m[34m[4mE2[m[34m 04834 [39m Jump to integrate [32m2A2-2A3 [31m0674-0675 [34m ▀▀▀ █▀ 73[m[34m02[m[34m 29442[33m two up right[39m V3 ← V3 + 002 [32m2A4-2A5 [31m0676-0677 [34m ▀▀▀ ▀ ▄ 74[m[34m01[m[34m 29697 [39m V4 ← V4 + 001 [32m2A6-2A7 [31m0678-0679 [34m▀ █ ▄▄▀▄ A[4m2[m[34m[4m2D[m[34m 41517 [39m I ← two balls [32m2A8-2A9 [31m0680-0681 [34m▄▄▄▀ █ 1[4m2[m[34m[4mE2[m[34m 04834 [39m Jump to integrate [32m2AA-2AB [31m0682-0683 [34m▄███▄▄█▀ 73[m[34mFE[m[34m 29694[33m two down left[39m V3 ← V3 + 254 [32m2AC-2AD [31m0684-0685 [34m▄███▄█▄▄ 74[m[34mFF[m[34m 29951 [39m V4 ← V4 + 255 [32m2AE-2AF [31m0686-0687 [34m▀ █ ▄▄▀▄ A[4m2[m[34m[4m2D[m[34m 41517 [39m I ← two balls [32m2B0-2B1 [31m0688-0689 [34m▄▄▄▀ █ 1[4m2[m[34m[4mE2[m[34m 04834 [39m Jump to integrate [32m2B2-2B3 [31m0690-0691 [34m ▀▀▀ █▀ 73[m[34m02[m[34m 29442[33m two down right[39m V3 ← V3 + 002 [32m2B4-2B5 [31m0692-0693 [34m▄███▄█▄▄ 74[m[34mFF[m[34m 29951 [39m V4 ← V4 + 255 [32m2B6-2B7 [31m0694-0695 [34m▀ █ ▄▄▀▄ A[4m2[m[34m[4m2D[m[34m 41517 [39m I ← two balls [32m2B8-2B9 [31m0696-0697 [34m▄▄▄▀ █ 1[4m2[m[34m[4mE2[m[34m 04834 [39m Jump to integrate [32m2BA-2BB [31m0698-0699 [34m ▀▀▀ █▀ 73[m[34m02[m[34m 29442[33m two left up[39m V3 ← V3 + 002 [32m2BC-2BD [31m0700-0701 [34m ▀▀▀ ▀ ▄ 74[m[34m01[m[34m 29697 [39m V4 ← V4 + 001 [32m2BE-2BF [31m0702-0703 [34m▀ █ ▄▄▀▄ A[4m2[m[34m[4m2D[m[34m 41517 [39m I ← two balls [32m2C0-2C1 [31m0704-0705 [34m▄▄▄▀ █ 1[4m2[m[34m[4mE2[m[34m 04834 [39m Jump to integrate [32m2C2-2C3 [31m0706-0707 [34m▄███▄▄█▀ 73[m[34mFE[m[34m 29694[33m two right down[39m V3 ← V3 + 254 [32m2C4-2C5 [31m0708-0709 [34m▄███▄█▄▄ 74[m[34mFF[m[34m 29951 [39m V4 ← V4 + 255 [32m2C6-2C7 [31m0710-0711 [34m▀ █ ▄▄▀▄ A[4m2[m[34m[4m2D[m[34m 41517 [39m I ← two balls [32m2C8-2C9 [31m0712-0713 [34m▄▄▄▀ █ 1[4m2[m[34m[4mE2[m[34m 04834 [39m Jump to integrate [32m2CA-2CB [31m0714-0715 [34m▄███▄▄█▀ 73[m[34mFE[m[34m 29694[33m left targeting[39m V3 ← V3 + 254 [32m2CC-2CD [31m0716-0717 [34m ▀▀▀ ▀█ 73[m[34m01[m[34m 29441[33m right targeting[39m V3 ← V3 + 001 [32m2CE-2CF [31m0718-0719 [34m █▄▀ ▀▀ 53[m[34m60[m[34m 21344 [39m Skip next if V3 = V6 [32m2D0-2D1 [31m0720-0721 [34m▄▄▄▀ █ 1[4m2[m[34m[4mE2[m[34m 04834 [39m Jump to integrate [32m2D2-2D3 [31m0722-0723 [34m▀▄ ▀ 81[m[34m40[m[34m 33088 [39m V1 ← V4 [32m2D4-2D5 [31m0724-0725 [34m▀▄▄▄ ▄ █ 81[m[34m75[m[34m 33141 [39m V1 ← V1 − V7; VF ← borrow [32m2D6-2D7 [31m0726-0727 [34m ▀█ 60[m[34m20[m[34m 24608 [39m V0 ← 032 [32m2D8-2D9 [31m0728-0729 [34m ▀ ▀▀▀▀ 4F[m[34m00[m[34m 20224 [39m Skip next if VF <> 000 [32m2DA-2DB [31m0730-0731 [34m ▀█ ▄ 60[m[34m22[m[34m 24610 [39m V0 ← 034 [32m2DC-2DD [31m0732-0733 [34m▄▄▄▀ █ 1[4m2[m[34m[4mE2[m[34m 04834 [39m Jump to integrate [32m2DE-2DF [31m0734-0735 [34m▄███▄█▄ 74[m[34mFE[m[34m 29950[33m up[39m V4 ← V4 + 254 [32m2E0-2E1 [31m0736-0737 [34m ▀▀▀ ▀ ▄ 74[m[34m01[m[34m 29697[33m down[39m V4 ← V4 + 001 [32m2E2-2E3 [31m0738-0739 [34m▀▀▀▀ ▄▄█ F1[m[34m07[m[34m 61703[33m integrate[39m V1 ← delay [32m2E4-2E5 [31m0740-0741 [34m ▀▀ ▀ 31[m[34m00[m[34m 12544 [39m Skip next if V1 = 000 [32m2E6-2E7 [31m0742-0743 [34m▄▄▄▀ █ 1[4m2[m[34m[4mE2[m[34m 04834 [39m Jump to integrate [32m2E8-2E9 [31m0744-0745 [34m▄█▄▄▄▄█▀ 43[m[34mFE[m[34m 17406 [39m Skip next if V3 <> 254 [32m2EA-2EB [31m0746-0747 [34m ▄█ ▄█▀ 1[4m3[m[34m[4m36[m[34m 04918 [39m Jump to new line [32m2EC-2ED [31m0748-0749 [34m▄█▄▄▄█▄ 44[m[34mFE[m[34m 17662 [39m Skip next if V4 <> 254 [32m2EE-2EF [31m0750-0751 [34m ▄█ ▄█▀ 1[4m3[m[34m[4m36[m[34m 04918 [39m Jump to new line [32m2F0-2F1 [31m0752-0753 [34m▄█▄▄▄▄██ 43[m[34mFF[m[34m 17407 [39m Skip next if V3 <> 255 [32m2F2-2F3 [31m0754-0755 [34m ▄█ ▄█▀ 1[4m3[m[34m[4m36[m[34m 04918 [39m Jump to new line [32m2F4-2F5 [31m0756-0757 [34m▄█▄▄▄█▄▄ 44[m[34mFF[m[34m 17663 [39m Skip next if V4 <> 255 [32m2F6-2F7 [31m0758-0759 [34m ▄█ ▄█▀ 1[4m3[m[34m[4m36[m[34m 04918 [39m Jump to new line [32m2F8-2F9 [31m0760-0761 [34m █ ▀█ 43[m[34m41[m[34m 17217 [39m Skip next if V3 <> 065 [32m2FA-2FB [31m0762-0763 [34m ▄█ ▄█▀ 1[4m3[m[34m[4m36[m[34m 04918 [39m Jump to new line [32m2FC-2FD [31m0764-0765 [34m ▀▄ ▀ ▄ 44[m[34m21[m[34m 17441 [39m Skip next if V4 <> 033 [32m2FE-2FF [31m0766-0767 [34m ▄█ ▄█▀ 1[4m3[m[34m[4m36[m[34m 04918 [39m Jump to new line [32m300-301 [31m0768-0769 [34m █ ▀▀ 43[m[34m40[m[34m 17216 [39m Skip next if V3 <> 064 [32m302-303 [31m0770-0771 [34m ▄█ ▄█▀ 1[4m3[m[34m[4m36[m[34m 04918 [39m Jump to new line [32m304-305 [31m0772-0773 [34m ▀▄ ▀ 44[m[34m20[m[34m 17440 [39m Skip next if V4 <> 032 [32m306-307 [31m0774-0775 [34m ▄█ ▄█▀ 1[4m3[m[34m[4m36[m[34m 04918 [39m Jump to new line [32m308-309 [31m0776-0777 [34m▀█ ▀ ▀█ D3[m[34m41[m[34m 54081 [39m Draw 08×01 at V3,V4; VF ← XOR [32m30A-30B [31m0778-0779 [34m ▀ ▀▀ 43[m[34m00[m[34m 17152 [39m Skip next if V3 <> 000 [32m30C-30D [31m0780-0781 [34m ▄█ ▄█▀ 1[4m3[m[34m[4m36[m[34m 04918 [39m Jump to new line [32m30E-30F [31m0782-0783 [34m ▀▄▄▄▄██ 43[m[34m3F[m[34m 17215 [39m Skip next if V3 <> 063 [32m310-311 [31m0784-0785 [34m ▄█ ▄█▀ 1[4m3[m[34m[4m36[m[34m 04918 [39m Jump to new line [32m312-313 [31m0786-0787 [34m ▀ ▀ 44[m[34m00[m[34m 17408 [39m Skip next if V4 <> 000 [32m314-315 [31m0788-0789 [34m ▄█ ▄█▀ 1[4m3[m[34m[4m36[m[34m 04918 [39m Jump to new line [32m316-317 [31m0790-0791 [34m ▀ ▄▄█▄▄ 44[m[34m1F[m[34m 17439 [39m Skip next if V4 <> 031 [32m318-319 [31m0792-0793 [34m ▄█ ▄█▀ 1[4m3[m[34m[4m36[m[34m 04918 [39m Jump to new line [32m31A-31B [31m0794-0795 [34m▀ █ ▄▄▀ A[4m2[m[34m[4m2C[m[34m 41516[33m dispatch[39m I ← ball [32m31C-31D [31m0796-0797 [34m ▀▀ ▀ 32[m[34m00[m[34m 12800 [39m Skip next if V2 = 000 [32m31E-31F [31m0798-0799 [34m ▄▀▄ ▀▀ 1[4m3[m[34m[4m28[m[34m 04904 [39m Jump to next [32m320-321 [31m0800-0801 [34m▀ ▀▀ 8C[m[34m00[m[34m 35840 [39m VC ← V0 [32m322-323 [31m0802-0803 [34m▀ ▄▄▀ 88[m[34m30[m[34m 34864 [39m V8 ← V3 [32m324-325 [31m0804-0805 [34m▀▄ ▀ ▀ 89[m[34m40[m[34m 35136 [39m V9 ← V4 [32m326-327 [31m0806-0807 [34m ▄█▄▄▀ 1[4m2[m[34m[4m3C[m[34m 04668 [39m Jump to second [32m328-329 [31m0808-0809 [34m▀ ▀▀ ▀ 8D[m[34m00[m[34m 36096[33m next[39m VD ← V0 [32m32A-32B [31m0810-0811 [34m▀ ▄▄▀ ▀ 8A[m[34m30[m[34m 35376 [39m VA ← V3 [32m32C-32D [31m0812-0813 [34m▀▄ ▀ ▀▀ 8B[m[34m40[m[34m 35648 [39m VB ← V4 [32m32E-32F [31m0814-0815 [34m▀▄▀ ▄ ▀▀ A[4m3[m[34m[4m48[m[34m 41800 [39m I ← from [32m330-331 [31m0816-0817 [34m▀██▀ █ ▄ F4[m[34m65[m[34m 62565 [39m Load V0→V4; I ← I + 05 [32m332-333 [31m0818-0819 [34m▀ █ ▄▄▀ A[4m2[m[34m[4m2C[m[34m 41516 [39m I ← ball [32m334-335 [31m0820-0821 [34m ▀▄▄▀ 1[4m2[m[34m[4m0C[m[34m 04620 [39m Jump to movement [32m336-337 [31m0822-0823 [34m▀▀ ▄▄▄▄ C0[m[34m1E[m[34m 49182[33m new line[39m V0 ← ??? AND 030 [32m338-339 [31m0824-0825 [34m▀▀ █ C1[m[34m01[m[34m 49409 [39m V1 ← ??? AND 001 [32m33A-33B [31m0826-0827 [34m▀▀▄▄▄▄██ C3[m[34m3F[m[34m 49983 [39m V3 ← ??? AND 063 [32m33C-33D [31m0828-0829 [34m▀▀ ▄▄█▄▄ C4[m[34m1F[m[34m 50207 [39m V4 ← ??? AND 031 [32m33E-33F [31m0830-0831 [34m ▀▀ ▀ 31[m[34m00[m[34m 12544 [39m Skip next if V1 = 000 [32m340-341 [31m0832-0833 [34m ▀▀ ▀▀ 63[m[34m00[m[34m 25344 [39m V3 ← 000 [32m342-343 [31m0834-0835 [34m ▀ ▀ 41[m[34m00[m[34m 16640 [39m Skip next if V1 <> 000 [32m344-345 [31m0836-0837 [34m ▀▀ ▀ 64[m[34m00[m[34m 25600 [39m V4 ← 000 [32m346-347 [31m0838-0839 [34m █▄ █▀ 1[4m3[m[34m[4m1A[m[34m 04890 [39m Jump to dispatch [32m348 [31m0840 [34m ██ 06[m[34m 006[33m from[39m [32m349 [31m0841 [34m █ 04[m[34m 004 [32m34A [31m0842 [34m █ 02[m[34m 002 [32m34B [31m0843 [34m █ 08[m[34m 008 [32m34C [31m0844 [34m ██████ 3F[m[34m 063 [32m34D [31m0845 [34m █████ 1F[m[34m 031 [32m34E [31m0846 [34m █████ 1F[m[34m 031 [32m34F [31m0847 [34m ████ 0F[m[34m 015 [39m The register usage is as follows: V0 Right movement button and holding the identifier code. V1 Left movement button, delay, and miscellaneous storage. V2 Down movement button and first or second line boolean. V3 Up movement button. V4 Horizontal mask. V5 Vertical mask. V6 Horizontal coordinate of player. V7 Vertical coordinate of player. V8 Horizontal coordinate of first line. V9 Vertical coordinate of first line. VA Horizontal coordinate of second line. VB Vertical coordinate of second line. VC Identifier code of first line. VD Identifier code of second line. VE Unused. VF Collision detection and holding a key code. The registers were chosen for the following reasons: V0 Ease of access. V1 Ease of access. V2 Ease of access. V3 Ease of access. V4 Ease of access. V5 It follows V4. V6 It's even. V7 It follows V6. V8 It follows the V6 and V7 pattern. V9 It follows the V6 and V7 pattern. VA It follows the V6 and V7 pattern. VB It follows the V6 and V7 pattern. VC It's even. VD It follows VC. VE Unused. VF Unimportance and necessity. The game begins by initializing the registers and setting I to its primary value. The player sprite is drawn and both line identifier registers are initialized to random values. Note that this chosen mask results in sixteen distinct values which will always be even, perfectly suitable for the table: [32m200-201 [31m0512-0513 [34m▀▄▀ ▄ ▀▀ A[4m3[m[34m[4m48[m[34m 41800 [39m I ← from [32m202-203 [31m0514-0515 [34m▀██▀▀█▀█ FF[m[34m65[m[34m 65381 [39m Load V0→VF; I ← I + 16 [32m204-205 [31m0516-0517 [34m▀ █ ▄▄▀ A[4m2[m[34m[4m2C[m[34m 41516 [39m I ← ball [32m206-207 [31m0518-0519 [34m▀█▄█ ▀▀▄ D6[m[34m71[m[34m 54897 [39m Draw 08×01 at V6,V7; VF ← XOR [32m208-209 [31m0520-0521 [34m▀▀ ▄██▄ CC[m[34m1E[m[34m 52254 [39m VC ← ??? AND 030 [32m20A-20B [31m0522-0523 [34m▀▀ ▄██▄▀ CD[m[34m1E[m[34m 52510 [39m VD ← ??? AND 030 The delay is set and then the player movement is calculated; the fifteenth key works as a pause key, with movement in the cardinal directions being the only other options. The new position is ANDed to maintain bounds. This code results in the player sprite flickering, but such is desirable for this: [32m20C-20D [31m0524-0525 [34m▀▀▀█ ▄ █ F1[m[34m15[m[34m 61717[33m movement[39m delay ← V1 [32m20E-20F [31m0526-0527 [34m ▀▀ ████ 6F[m[34m0F[m[34m 28431 [39m VF ← 015 [32m210-211 [31m0528-0529 [34m█▀█ ▀▀▀█ EF[m[34mA1[m[34m 61345 [39m Skip next if VF <> key [32m212-213 [31m0530-0531 [34m▀▀▀▀█▀█▀ FF[m[34m0A[m[34m 65290 [39m VF ← key [32m214-215 [31m0532-0533 [34m▀█▄█ ▀▀▄ D6[m[34m71[m[34m 54897 [39m Draw 08×01 at V6,V7; VF ← XOR [32m216-217 [31m0534-0535 [34m█▀█ ▄ E0[m[34mA1[m[34m 57505 [39m Skip next if V0 <> key [32m218-219 [31m0536-0537 [34m ▀▀▀ ▀▀▄ 76[m[34m01[m[34m 30209 [39m V6 ← V6 + 001 [32m21A-21B [31m0538-0539 [34m█▀█ █ E1[m[34mA1[m[34m 57761 [39m Skip next if V1 <> key [32m21C-21D [31m0540-0541 [34m▄███▄██▄ 76[m[34mFF[m[34m 30463 [39m V6 ← V6 + 255 [32m21E-21F [31m0542-0543 [34m█▀█ ▀▄ E2[m[34mA1[m[34m 58017 [39m Skip next if V2 <> key [32m220-221 [31m0544-0545 [34m ▀▀▀ ▀▀█ 77[m[34m01[m[34m 30465 [39m V7 ← V7 + 001 [32m222-223 [31m0546-0547 [34m█▀█ ▀█ E3[m[34mA1[m[34m 58273 [39m Skip next if V3 <> key [32m224-225 [31m0548-0549 [34m▄███▄███ 77[m[34mFF[m[34m 30719 [39m V7 ← V7 + 255 [32m226-227 [31m0550-0551 [34m▀▄ ▀█ 86[m[34m42[m[34m 34370 [39m V6 ← V6 AND V4 [32m228-229 [31m0552-0553 [34m▀▄ ▄ ▀█▀ 87[m[34m52[m[34m 34642 [39m V7 ← V7 AND V5 [32m22A-22B [31m0554-0555 [34m▀█▄█ ▀▀▄ D6[m[34m71[m[34m 54897 [39m Draw 08×01 at V6,V7; VF ← XOR Conveniently, the 80C0 instruction functions as the ball and two balls sprites. The first line gets its parameters copied and the game enters the jump table by the line identifier, unless the previous player draw resulted in a collision, in which case the screen is cleared and the game is then reset: [32m22C-22D [31m0556-0557 [34m█▄ 80[m[34mC0[m[34m 32960[33m+ ball[39m V0 ← VC [32m22E-22F [31m0558-0559 [34m ▀▀ ▀ 62[m[34m00[m[34m 25088 [39m V2 ← 000 [32m230-231 [31m0560-0561 [34m█ ▀▀ 83[m[34m80[m[34m 33664 [39m V3 ← V8 [32m232-233 [31m0562-0563 [34m█ ▄ ▀ 84[m[34m90[m[34m 33936 [39m V4 ← V9 [32m234-235 [31m0564-0565 [34m ▀ ▀▀▀▀ 4F[m[34m00[m[34m 20224 [39m Skip next if VF <> 000 [32m236-237 [31m0566-0567 [34m▀▄▀▀ ▄█ B[4m2[m[34m[4m46[m[34m 45638 [39m Jump to V0 + table [32m238-239 [31m0568-0569 [34m▄▄▄ 00[m[34mE0[m[34m 00224 [39m Clear the screen [32m23A-23B [31m0570-0571 [34m ▀ ▀ 12[m[34m00[m[34m 04608 [39m Jump to 0512 This fragment merely does the same for the second line: [32m23C-23D [31m0572-0573 [34m█▄ ▄ 80[m[34mD0[m[34m 32976[33m second[39m V0 ← VD [32m23E-23F [31m0574-0575 [34m ▀▀ ▀▄ 62[m[34m01[m[34m 25089 [39m V2 ← 001 [32m240-241 [31m0576-0577 [34m█ ▄ ▀▀ 83[m[34mA0[m[34m 33696 [39m V3 ← VA [32m242-243 [31m0578-0579 [34m█ ▄▄ ▀ 84[m[34mB0[m[34m 33968 [39m V4 ← VB [32m244-245 [31m0580-0581 [34m▀▄▀▀ ▄█ B[4m2[m[34m[4m46[m[34m 45638 [39m Jump to V0 + table This is the jump table; notice neither up or down won't be selected by the mask, being out of range: [32m246-247 [31m0582-0583 [34m ▄▄▀▄ █ 1[4m2[m[34m[4m6A[m[34m 04714[33m table[39m Jump to up left [32m248-249 [31m0584-0585 [34m ▄▄█ ▀ 1[4m2[m[34m[4m70[m[34m 04720 [39m Jump to up right [32m24A-24B [31m0586-0587 [34m ▄▄█ ▄█ 1[4m2[m[34m[4m76[m[34m 04726 [39m Jump to down left [32m24C-24D [31m0588-0589 [34m ▄▄█▄▄▀ 1[4m2[m[34m[4m7C[m[34m 04732 [39m Jump to down right [32m24E-24F [31m0590-0591 [34m▄ ▀ █ 1[4m2[m[34m[4m82[m[34m 04738 [39m Jump to left up [32m250-251 [31m0592-0593 [34m▄ ▀▄ ▀ 1[4m2[m[34m[4m88[m[34m 04744 [39m Jump to left down [32m252-253 [31m0594-0595 [34m▄ ▀▄▄█ 1[4m2[m[34m[4m8E[m[34m 04750 [39m Jump to right up [32m254-255 [31m0596-0597 [34m▄ █ ▄▀ 1[4m2[m[34m[4m94[m[34m 04756 [39m Jump to right down [32m256-257 [31m0598-0599 [34m▄ █▄ █ 1[4m2[m[34m[4m9A[m[34m 04762 [39m Jump to two up left [32m258-259 [31m0600-0601 [34m▄ ▄▀ █ 1[4m2[m[34m[4mA2[m[34m 04770 [39m Jump to two up right [32m25A-25B [31m0602-0603 [34m▄ ▄▀▄ █ 1[4m2[m[34m[4mAA[m[34m 04778 [39m Jump to two down left [32m25C-25D [31m0604-0605 [34m▄ ▄█ █ 1[4m2[m[34m[4mB2[m[34m 04786 [39m Jump to two down right [32m25E-25F [31m0606-0607 [34m▄ ▄█▄ █ 1[4m2[m[34m[4mBA[m[34m 04794 [39m Jump to two left up [32m260-261 [31m0608-0609 [34m▄▄ ▀ █ 1[4m2[m[34m[4mC2[m[34m 04802 [39m Jump to two right down [32m262-263 [31m0610-0611 [34m▄▄ ▀▄ █ 1[4m2[m[34m[4mCA[m[34m 04810 [39m Jump to left targeting [32m264-265 [31m0612-0613 [34m▄▄ ▀▄▄▀ 1[4m2[m[34m[4mCC[m[34m 04812 [39m Jump to right targeting [32m266-267 [31m0614-0615 [34m▄▄ █▄▄█ 1[4m2[m[34m[4mDE[m[34m 04830 [39m Jump to up [32m268-269 [31m0616-0617 [34m▄▄▄▀ ▀ 1[4m2[m[34m[4mE0[m[34m 04832 [39m Jump to down These line routines implement those which move one-by-one, beginning from the top or bottom: [32m26A-26B [31m0618-0619 [34m▄███▄▄██ 73[m[34mFF[m[34m 29695[33m up left[39m V3 ← V3 + 255 [32m26C-26D [31m0620-0621 [34m ▀▀▀ ▀ ▄ 74[m[34m01[m[34m 29697 [39m V4 ← V4 + 001 [32m26E-26F [31m0622-0623 [34m▄▄▄▀ █ 1[4m2[m[34m[4mE2[m[34m 04834 [39m Jump to integrate [32m270-271 [31m0624-0625 [34m ▀▀▀ ▀█ 73[m[34m01[m[34m 29441[33m up right[39m V3 ← V3 + 001 [32m272-273 [31m0626-0627 [34m ▀▀▀ ▀ ▄ 74[m[34m01[m[34m 29697 [39m V4 ← V4 + 001 [32m274-275 [31m0628-0629 [34m▄▄▄▀ █ 1[4m2[m[34m[4mE2[m[34m 04834 [39m Jump to integrate [32m276-277 [31m0630-0631 [34m▄███▄▄██ 73[m[34mFF[m[34m 29695[33m down left[39m V3 ← V3 + 255 [32m278-279 [31m0632-0633 [34m▄███▄█▄▄ 74[m[34mFF[m[34m 29951 [39m V4 ← V4 + 255 [32m27A-27B [31m0634-0635 [34m▄▄▄▀ █ 1[4m2[m[34m[4mE2[m[34m 04834 [39m Jump to integrate [32m27C-27D [31m0636-0637 [34m ▀▀▀ ▀█ 73[m[34m01[m[34m 29441[33m down right[39m V3 ← V3 + 001 [32m27E-27F [31m0638-0639 [34m▄███▄█▄▄ 74[m[34mFF[m[34m 29951 [39m V4 ← V4 + 255 [32m280-281 [31m0640-0641 [34m▄▄▄▀ █ 1[4m2[m[34m[4mE2[m[34m 04834 [39m Jump to integrate These implement those beginning from the left or right: [32m282-283 [31m0642-0643 [34m ▀▀▀ ▀█ 73[m[34m01[m[34m 29441[33m left up[39m V3 ← V3 + 001 [32m284-285 [31m0644-0645 [34m▄███▄█▄▄ 74[m[34mFF[m[34m 29951 [39m V4 ← V4 + 255 [32m286-287 [31m0646-0647 [34m▄▄▄▀ █ 1[4m2[m[34m[4mE2[m[34m 04834 [39m Jump to integrate [32m288-289 [31m0648-0649 [34m ▀▀▀ ▀█ 73[m[34m01[m[34m 29441[33m left down[39m V3 ← V3 + 001 [32m28A-28B [31m0650-0651 [34m ▀▀▀ ▀ ▄ 74[m[34m01[m[34m 29697 [39m V4 ← V4 + 001 [32m28C-28D [31m0652-0653 [34m▄▄▄▀ █ 1[4m2[m[34m[4mE2[m[34m 04834 [39m Jump to integrate [32m28E-28F [31m0654-0655 [34m▄███▄▄██ 73[m[34mFF[m[34m 29695[33m right up[39m V3 ← V3 + 255 [32m290-291 [31m0656-0657 [34m▄███▄█▄▄ 74[m[34mFF[m[34m 29951 [39m V4 ← V4 + 255 [32m292-293 [31m0658-0659 [34m▄▄▄▀ █ 1[4m2[m[34m[4mE2[m[34m 04834 [39m Jump to integrate [32m294-295 [31m0660-0661 [34m▄███▄▄██ 73[m[34mFF[m[34m 29695[33m right down[39m V3 ← V3 + 255 [32m296-297 [31m0662-0663 [34m ▀▀▀ ▀ ▄ 74[m[34m01[m[34m 29697 [39m V4 ← V4 + 001 [32m298-299 [31m0664-0665 [34m▄▄▄▀ █ 1[4m2[m[34m[4mE2[m[34m 04834 [39m Jump to integrate These are kin to the first four, but move left or right two-at-a-time, changing the sprite for this: [32m29A-29B [31m0666-0667 [34m▄███▄▄█▀ 73[m[34mFE[m[34m 29694[33m two up left[39m V3 ← V3 + 254 [32m29C-29D [31m0668-0669 [34m ▀▀▀ ▀ ▄ 74[m[34m01[m[34m 29697 [39m V4 ← V4 + 001 [32m29E-29F [31m0670-0671 [34m▀ █ ▄▄▀▄ A[4m2[m[34m[4m2D[m[34m 41517 [39m I ← two balls [32m2A0-2A1 [31m0672-0673 [34m▄▄▄▀ █ 1[4m2[m[34m[4mE2[m[34m 04834 [39m Jump to integrate [32m2A2-2A3 [31m0674-0675 [34m ▀▀▀ █▀ 73[m[34m02[m[34m 29442[33m two up right[39m V3 ← V3 + 002 [32m2A4-2A5 [31m0676-0677 [34m ▀▀▀ ▀ ▄ 74[m[34m01[m[34m 29697 [39m V4 ← V4 + 001 [32m2A6-2A7 [31m0678-0679 [34m▀ █ ▄▄▀▄ A[4m2[m[34m[4m2D[m[34m 41517 [39m I ← two balls [32m2A8-2A9 [31m0680-0681 [34m▄▄▄▀ █ 1[4m2[m[34m[4mE2[m[34m 04834 [39m Jump to integrate [32m2AA-2AB [31m0682-0683 [34m▄███▄▄█▀ 73[m[34mFE[m[34m 29694[33m two down left[39m V3 ← V3 + 254 [32m2AC-2AD [31m0684-0685 [34m▄███▄█▄▄ 74[m[34mFF[m[34m 29951 [39m V4 ← V4 + 255 [32m2AE-2AF [31m0686-0687 [34m▀ █ ▄▄▀▄ A[4m2[m[34m[4m2D[m[34m 41517 [39m I ← two balls [32m2B0-2B1 [31m0688-0689 [34m▄▄▄▀ █ 1[4m2[m[34m[4mE2[m[34m 04834 [39m Jump to integrate [32m2B2-2B3 [31m0690-0691 [34m ▀▀▀ █▀ 73[m[34m02[m[34m 29442[33m two down right[39m V3 ← V3 + 002 [32m2B4-2B5 [31m0692-0693 [34m▄███▄█▄▄ 74[m[34mFF[m[34m 29951 [39m V4 ← V4 + 255 [32m2B6-2B7 [31m0694-0695 [34m▀ █ ▄▄▀▄ A[4m2[m[34m[4m2D[m[34m 41517 [39m I ← two balls [32m2B8-2B9 [31m0696-0697 [34m▄▄▄▀ █ 1[4m2[m[34m[4mE2[m[34m 04834 [39m Jump to integrate To fit the targeting lines, the two-at-a-time left or right routines are uneven: [32m2BA-2BB [31m0698-0699 [34m ▀▀▀ █▀ 73[m[34m02[m[34m 29442[33m two left up[39m V3 ← V3 + 002 [32m2BC-2BD [31m0700-0701 [34m ▀▀▀ ▀ ▄ 74[m[34m01[m[34m 29697 [39m V4 ← V4 + 001 [32m2BE-2BF [31m0702-0703 [34m▀ █ ▄▄▀▄ A[4m2[m[34m[4m2D[m[34m 41517 [39m I ← two balls [32m2C0-2C1 [31m0704-0705 [34m▄▄▄▀ █ 1[4m2[m[34m[4mE2[m[34m 04834 [39m Jump to integrate [32m2C2-2C3 [31m0706-0707 [34m▄███▄▄█▀ 73[m[34mFE[m[34m 29694[33m two right down[39m V3 ← V3 + 254 [32m2C4-2C5 [31m0708-0709 [34m▄███▄█▄▄ 74[m[34mFF[m[34m 29951 [39m V4 ← V4 + 255 [32m2C6-2C7 [31m0710-0711 [34m▀ █ ▄▄▀▄ A[4m2[m[34m[4m2D[m[34m 41517 [39m I ← two balls [32m2C8-2C9 [31m0712-0713 [34m▄▄▄▀ █ 1[4m2[m[34m[4mE2[m[34m 04834 [39m Jump to integrate The targeting lines progress from the left or right until they align with the player, which then has them switch their codes to up or down, based on the relative position of the player; originally, I'd duplicated these routines, then combined them with a 5CC0, and finally realized that was unnecessary and that simply offsetting the offset would work to combine them. I realized in testing that it was possible to evade the targeting entirely, but decided to allow it as the behaviour is also more fun: [32m2CA-2CB [31m0714-0715 [34m▄███▄▄█▀ 73[m[34mFE[m[34m 29694[33m left targeting[39m V3 ← V3 + 254 [32m2CC-2CD [31m0716-0717 [34m ▀▀▀ ▀█ 73[m[34m01[m[34m 29441[33m right targeting[39m V3 ← V3 + 001 [32m2CE-2CF [31m0718-0719 [34m █▄▀ ▀▀ 53[m[34m60[m[34m 21344 [39m Skip next if V3 = V6 [32m2D0-2D1 [31m0720-0721 [34m▄▄▄▀ █ 1[4m2[m[34m[4mE2[m[34m 04834 [39m Jump to integrate [32m2D2-2D3 [31m0722-0723 [34m▀▄ ▀ 81[m[34m40[m[34m 33088 [39m V1 ← V4 [32m2D4-2D5 [31m0724-0725 [34m▀▄▄▄ ▄ █ 81[m[34m75[m[34m 33141 [39m V1 ← V1 − V7; VF ← borrow [32m2D6-2D7 [31m0726-0727 [34m ▀█ 60[m[34m20[m[34m 24608 [39m V0 ← 032 [32m2D8-2D9 [31m0728-0729 [34m ▀ ▀▀▀▀ 4F[m[34m00[m[34m 20224 [39m Skip next if VF <> 000 [32m2DA-2DB [31m0730-0731 [34m ▀█ ▄ 60[m[34m22[m[34m 24610 [39m V0 ← 034 [32m2DC-2DD [31m0732-0733 [34m▄▄▄▀ █ 1[4m2[m[34m[4mE2[m[34m 04834 [39m Jump to integrate The up and down routines combine similarly. The delay is exhausted here, as this was easiest: [32m2DE-2DF [31m0734-0735 [34m▄███▄█▄ 74[m[34mFE[m[34m 29950[33m up[39m V4 ← V4 + 254 [32m2E0-2E1 [31m0736-0737 [34m ▀▀▀ ▀ ▄ 74[m[34m01[m[34m 29697[33m down[39m V4 ← V4 + 001 [32m2E2-2E3 [31m0738-0739 [34m▀▀▀▀ ▄▄█ F1[m[34m07[m[34m 61703[33m integrate[39m V1 ← delay [32m2E4-2E5 [31m0740-0741 [34m ▀▀ ▀ 31[m[34m00[m[34m 12544 [39m Skip next if V1 = 000 [32m2E6-2E7 [31m0742-0743 [34m▄▄▄▀ █ 1[4m2[m[34m[4mE2[m[34m 04834 [39m Jump to integrate The out-of-screen bounds are checked before drawing. Having two-at-a-time lines doubled the checks: [32m2E8-2E9 [31m0744-0745 [34m▄█▄▄▄▄█▀ 43[m[34mFE[m[34m 17406 [39m Skip next if V3 <> 254 [32m2EA-2EB [31m0746-0747 [34m ▄█ ▄█▀ 1[4m3[m[34m[4m36[m[34m 04918 [39m Jump to new line [32m2EC-2ED [31m0748-0749 [34m▄█▄▄▄█▄ 44[m[34mFE[m[34m 17662 [39m Skip next if V4 <> 254 [32m2EE-2EF [31m0750-0751 [34m ▄█ ▄█▀ 1[4m3[m[34m[4m36[m[34m 04918 [39m Jump to new line [32m2F0-2F1 [31m0752-0753 [34m▄█▄▄▄▄██ 43[m[34mFF[m[34m 17407 [39m Skip next if V3 <> 255 [32m2F2-2F3 [31m0754-0755 [34m ▄█ ▄█▀ 1[4m3[m[34m[4m36[m[34m 04918 [39m Jump to new line [32m2F4-2F5 [31m0756-0757 [34m▄█▄▄▄█▄▄ 44[m[34mFF[m[34m 17663 [39m Skip next if V4 <> 255 [32m2F6-2F7 [31m0758-0759 [34m ▄█ ▄█▀ 1[4m3[m[34m[4m36[m[34m 04918 [39m Jump to new line [32m2F8-2F9 [31m0760-0761 [34m █ ▀█ 43[m[34m41[m[34m 17217 [39m Skip next if V3 <> 065 [32m2FA-2FB [31m0762-0763 [34m ▄█ ▄█▀ 1[4m3[m[34m[4m36[m[34m 04918 [39m Jump to new line [32m2FC-2FD [31m0764-0765 [34m ▀▄ ▀ ▄ 44[m[34m21[m[34m 17441 [39m Skip next if V4 <> 033 [32m2FE-2FF [31m0766-0767 [34m ▄█ ▄█▀ 1[4m3[m[34m[4m36[m[34m 04918 [39m Jump to new line [32m300-301 [31m0768-0769 [34m █ ▀▀ 43[m[34m40[m[34m 17216 [39m Skip next if V3 <> 064 [32m302-303 [31m0770-0771 [34m ▄█ ▄█▀ 1[4m3[m[34m[4m36[m[34m 04918 [39m Jump to new line [32m304-305 [31m0772-0773 [34m ▀▄ ▀ 44[m[34m20[m[34m 17440 [39m Skip next if V4 <> 032 [32m306-307 [31m0774-0775 [34m ▄█ ▄█▀ 1[4m3[m[34m[4m36[m[34m 04918 [39m Jump to new line That new line segment is drawn, and in-screen bounds are checked. I notice now this is unnecessary: [32m308-309 [31m0776-0777 [34m▀█ ▀ ▀█ D3[m[34m41[m[34m 54081 [39m Draw 08×01 at V3,V4; VF ← XOR [32m30A-30B [31m0778-0779 [34m ▀ ▀▀ 43[m[34m00[m[34m 17152 [39m Skip next if V3 <> 000 [32m30C-30D [31m0780-0781 [34m ▄█ ▄█▀ 1[4m3[m[34m[4m36[m[34m 04918 [39m Jump to new line [32m30E-30F [31m0782-0783 [34m ▀▄▄▄▄██ 43[m[34m3F[m[34m 17215 [39m Skip next if V3 <> 063 [32m310-311 [31m0784-0785 [34m ▄█ ▄█▀ 1[4m3[m[34m[4m36[m[34m 04918 [39m Jump to new line [32m312-313 [31m0786-0787 [34m ▀ ▀ 44[m[34m00[m[34m 17408 [39m Skip next if V4 <> 000 [32m314-315 [31m0788-0789 [34m ▄█ ▄█▀ 1[4m3[m[34m[4m36[m[34m 04918 [39m Jump to new line [32m316-317 [31m0790-0791 [34m ▀ ▄▄█▄▄ 44[m[34m1F[m[34m 17439 [39m Skip next if V4 <> 031 [32m318-319 [31m0792-0793 [34m ▄█ ▄█▀ 1[4m3[m[34m[4m36[m[34m 04918 [39m Jump to new line This dispatch assigns the ball sprite, perhaps wastefully, and perhaps the new first line values: [32m31A-31B [31m0794-0795 [34m▀ █ ▄▄▀ A[4m2[m[34m[4m2C[m[34m 41516[33m dispatch[39m I ← ball [32m31C-31D [31m0796-0797 [34m ▀▀ ▀ 32[m[34m00[m[34m 12800 [39m Skip next if V2 = 000 [32m31E-31F [31m0798-0799 [34m ▄▀▄ ▀▀ 1[4m3[m[34m[4m28[m[34m 04904 [39m Jump to next [32m320-321 [31m0800-0801 [34m▀ ▀▀ 8C[m[34m00[m[34m 35840 [39m VC ← V0 [32m322-323 [31m0802-0803 [34m▀ ▄▄▀ 88[m[34m30[m[34m 34864 [39m V8 ← V3 [32m324-325 [31m0804-0805 [34m▀▄ ▀ ▀ 89[m[34m40[m[34m 35136 [39m V9 ← V4 [32m326-327 [31m0806-0807 [34m ▄█▄▄▀ 1[4m2[m[34m[4m3C[m[34m 04668 [39m Jump to second Otherwise, the second line values are assigned, the earliest registers restored, and the game loops: [32m328-329 [31m0808-0809 [34m▀ ▀▀ ▀ 8D[m[34m00[m[34m 36096[33m next[39m VD ← V0 [32m32A-32B [31m0810-0811 [34m▀ ▄▄▀ ▀ 8A[m[34m30[m[34m 35376 [39m VA ← V3 [32m32C-32D [31m0812-0813 [34m▀▄ ▀ ▀▀ 8B[m[34m40[m[34m 35648 [39m VB ← V4 [32m32E-32F [31m0814-0815 [34m▀▄▀ ▄ ▀▀ A[4m3[m[34m[4m48[m[34m 41800 [39m I ← from [32m330-331 [31m0816-0817 [34m▀██▀ █ ▄ F4[m[34m65[m[34m 62565 [39m Load V0→V4; I ← I + 05 [32m332-333 [31m0818-0819 [34m▀ █ ▄▄▀ A[4m2[m[34m[4m2C[m[34m 41516 [39m I ← ball [32m334-335 [31m0820-0821 [34m ▀▄▄▀ 1[4m2[m[34m[4m0C[m[34m 04620 [39m Jump to movement The new line routine assigns starting positions randomly at the edges of that screen, before jumping to dispatch; a line type may start in a position which immediately kills it, but this is a fine way: [32m336-337 [31m0822-0823 [34m▀▀ ▄▄▄▄ C0[m[34m1E[m[34m 49182[33m new line[39m V0 ← ??? AND 030 [32m338-339 [31m0824-0825 [34m▀▀ █ C1[m[34m01[m[34m 49409 [39m V1 ← ??? AND 001 [32m33A-33B [31m0826-0827 [34m▀▀▄▄▄▄██ C3[m[34m3F[m[34m 49983 [39m V3 ← ??? AND 063 [32m33C-33D [31m0828-0829 [34m▀▀ ▄▄█▄▄ C4[m[34m1F[m[34m 50207 [39m V4 ← ??? AND 031 [32m33E-33F [31m0830-0831 [34m ▀▀ ▀ 31[m[34m00[m[34m 12544 [39m Skip next if V1 = 000 [32m340-341 [31m0832-0833 [34m ▀▀ ▀▀ 63[m[34m00[m[34m 25344 [39m V3 ← 000 [32m342-343 [31m0834-0835 [34m ▀ ▀ 41[m[34m00[m[34m 16640 [39m Skip next if V1 <> 000 [32m344-345 [31m0836-0837 [34m ▀▀ ▀ 64[m[34m00[m[34m 25600 [39m V4 ← 000 [32m346-347 [31m0838-0839 [34m █▄ █▀ 1[4m3[m[34m[4m1A[m[34m 04890 [39m Jump to dispatch The game ends with those initial register values: [32m348 [31m0840 [34m ██ 06[m[34m 006[33m from[39m [32m349 [31m0841 [34m █ 04[m[34m 004 [32m34A [31m0842 [34m █ 02[m[34m 002 [32m34B [31m0843 [34m █ 08[m[34m 008 [32m34C [31m0844 [34m ██████ 3F[m[34m 063 [32m34D [31m0845 [34m █████ 1F[m[34m 031 [32m34E [31m0846 [34m █████ 1F[m[34m 031 [32m34F [31m0847 [34m ████ 0F[m[34m 015 [39m I'm glad to have enhanced mine Enchantment game so thoroughly. It's genuinely fun, in mine eyes. I notice minor flaws, but they're not damning; being able to occasionally evade the targeting lines is fun, and the lines occasionally stopping before drawing the final pixel allows for extra mobilility, when traversing the screen, which will become a chaotic mess anyway. My game could certainly become smaller, but it's more easily modified this way, and it's still small. Ultimately, I'm pleased now.