From 96f803a7c7a126aab9cf9094ada47d3d9b2e23db Mon Sep 17 00:00:00 2001 From: Pragyansh Chaturvedi Date: Wed, 11 Oct 2023 16:58:10 +0530 Subject: [PATCH] janitorial --- src/dmg_boot.gb | Bin 256 -> 0 bytes tests/cpu_instrs/cpu_instrs.gb | Bin 65536 -> 0 bytes tests/cpu_instrs/individual/01-special.gb | Bin 32768 -> 0 bytes tests/cpu_instrs/individual/02-interrupts.gb | Bin 32768 -> 0 bytes tests/cpu_instrs/individual/03-op sp,hl.gb | Bin 32768 -> 0 bytes tests/cpu_instrs/individual/04-op r,imm.gb | Bin 32768 -> 0 bytes tests/cpu_instrs/individual/05-op rp.gb | Bin 32768 -> 0 bytes tests/cpu_instrs/individual/06-ld r,r.gb | Bin 32768 -> 0 bytes .../individual/07-jr,jp,call,ret,rst.gb | Bin 32768 -> 0 bytes tests/cpu_instrs/individual/08-misc instrs.gb | Bin 32768 -> 0 bytes tests/cpu_instrs/individual/09-op r,r.gb | Bin 32768 -> 0 bytes tests/cpu_instrs/individual/10-bit ops.gb | Bin 32768 -> 0 bytes tests/cpu_instrs/individual/11-op a,(hl).gb | Bin 32768 -> 0 bytes tests/cpu_instrs/readme.txt | 119 ------- tests/cpu_instrs/source/01-special.s | 78 ----- tests/cpu_instrs/source/02-interrupts.s | 73 ---- tests/cpu_instrs/source/03-op sp,hl.s | 102 ------ tests/cpu_instrs/source/04-op r,imm.s | 88 ----- tests/cpu_instrs/source/05-op rp.s | 98 ------ tests/cpu_instrs/source/06-ld r,r.s | 115 ------- .../cpu_instrs/source/07-jr,jp,call,ret,rst.s | 127 ------- tests/cpu_instrs/source/08-misc instrs.s | 110 ------ tests/cpu_instrs/source/09-op r,r.s | 269 --------------- tests/cpu_instrs/source/10-bit ops.s | 315 ------------------ tests/cpu_instrs/source/11-op a,(hl).s | 162 --------- tests/cpu_instrs/source/common/apu.s | 215 ------------ tests/cpu_instrs/source/common/build_gbs.s | 121 ------- tests/cpu_instrs/source/common/build_rom.s | 80 ----- tests/cpu_instrs/source/common/checksums.s | 98 ------ tests/cpu_instrs/source/common/console.bin | Bin 768 -> 0 bytes tests/cpu_instrs/source/common/console.s | 291 ---------------- tests/cpu_instrs/source/common/cpu_speed.s | 64 ---- tests/cpu_instrs/source/common/crc.s | 78 ----- tests/cpu_instrs/source/common/crc_fast.s | 88 ----- tests/cpu_instrs/source/common/delay.s | 220 ------------ tests/cpu_instrs/source/common/gb.inc | 64 ---- tests/cpu_instrs/source/common/instr_test.s | 105 ------ tests/cpu_instrs/source/common/macros.inc | 73 ---- tests/cpu_instrs/source/common/multi_custom.s | 38 --- tests/cpu_instrs/source/common/numbers.s | 177 ---------- tests/cpu_instrs/source/common/printing.s | 98 ------ tests/cpu_instrs/source/common/runtime.s | 142 -------- tests/cpu_instrs/source/common/testing.s | 176 ---------- tests/cpu_instrs/source/linkfile | 2 - tests/cpu_instrs/source/shell.inc | 21 -- tests/halt_bug.gb | Bin 32768 -> 0 bytes 46 files changed, 3807 deletions(-) delete mode 100644 src/dmg_boot.gb delete mode 100644 tests/cpu_instrs/cpu_instrs.gb delete mode 100644 tests/cpu_instrs/individual/01-special.gb delete mode 100644 tests/cpu_instrs/individual/02-interrupts.gb delete mode 100644 tests/cpu_instrs/individual/03-op sp,hl.gb delete mode 100644 tests/cpu_instrs/individual/04-op r,imm.gb delete mode 100644 tests/cpu_instrs/individual/05-op rp.gb delete mode 100644 tests/cpu_instrs/individual/06-ld r,r.gb delete mode 100644 tests/cpu_instrs/individual/07-jr,jp,call,ret,rst.gb delete mode 100644 tests/cpu_instrs/individual/08-misc instrs.gb delete mode 100644 tests/cpu_instrs/individual/09-op r,r.gb delete mode 100644 tests/cpu_instrs/individual/10-bit ops.gb delete mode 100644 tests/cpu_instrs/individual/11-op a,(hl).gb delete mode 100644 tests/cpu_instrs/readme.txt delete mode 100644 tests/cpu_instrs/source/01-special.s delete mode 100644 tests/cpu_instrs/source/02-interrupts.s delete mode 100644 tests/cpu_instrs/source/03-op sp,hl.s delete mode 100644 tests/cpu_instrs/source/04-op r,imm.s delete mode 100644 tests/cpu_instrs/source/05-op rp.s delete mode 100644 tests/cpu_instrs/source/06-ld r,r.s delete mode 100644 tests/cpu_instrs/source/07-jr,jp,call,ret,rst.s delete mode 100644 tests/cpu_instrs/source/08-misc instrs.s delete mode 100644 tests/cpu_instrs/source/09-op r,r.s delete mode 100644 tests/cpu_instrs/source/10-bit ops.s delete mode 100644 tests/cpu_instrs/source/11-op a,(hl).s delete mode 100644 tests/cpu_instrs/source/common/apu.s delete mode 100644 tests/cpu_instrs/source/common/build_gbs.s delete mode 100644 tests/cpu_instrs/source/common/build_rom.s delete mode 100644 tests/cpu_instrs/source/common/checksums.s delete mode 100644 tests/cpu_instrs/source/common/console.bin delete mode 100644 tests/cpu_instrs/source/common/console.s delete mode 100644 tests/cpu_instrs/source/common/cpu_speed.s delete mode 100644 tests/cpu_instrs/source/common/crc.s delete mode 100644 tests/cpu_instrs/source/common/crc_fast.s delete mode 100644 tests/cpu_instrs/source/common/delay.s delete mode 100644 tests/cpu_instrs/source/common/gb.inc delete mode 100644 tests/cpu_instrs/source/common/instr_test.s delete mode 100644 tests/cpu_instrs/source/common/macros.inc delete mode 100644 tests/cpu_instrs/source/common/multi_custom.s delete mode 100644 tests/cpu_instrs/source/common/numbers.s delete mode 100644 tests/cpu_instrs/source/common/printing.s delete mode 100644 tests/cpu_instrs/source/common/runtime.s delete mode 100644 tests/cpu_instrs/source/common/testing.s delete mode 100644 tests/cpu_instrs/source/linkfile delete mode 100644 tests/cpu_instrs/source/shell.inc delete mode 100644 tests/halt_bug.gb diff --git a/src/dmg_boot.gb b/src/dmg_boot.gb deleted file mode 100644 index afa0ee4792c2ba80afb6b0c1962e249e195e6fc0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 256 zcmV+b0ssCn{{OEb|DQ6;d?5QFCjSl*K7caf3_kPXGCp^AKK$TE5d;At5P%xZl>p6_ z026!uG$8X4*Z>9y8WSQT1t9r88R`(3AupK@3_U0aG7TX4E)N*o0-PxJD zyJur=4(!a`+?k)dxidaILb;{6r9wO*1OXAK02&j%ApRqL{xl%<1{rvUBLyJ)h9Lev G0pL*XS7L7f diff --git a/tests/cpu_instrs/cpu_instrs.gb b/tests/cpu_instrs/cpu_instrs.gb deleted file mode 100644 index 7b06221b23dcd84644e7910bb8ba91a957c9ba04..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 65536 zcmeHQ30xCL-+q!nKtxWDC>}u&5f9K(#Tw(S^~9>6^#U(cL{Sh8a){DuYqj3>YCWp0 zSJkRjR6G(Q!7#2$U!{0KK=H`y0csRMlW%rGtMAu(e12blpY7}~JF~O%pX=G#%|5g9 z|BpfsVN?7c`Q^F)KX$dPq^E9&g`KQ|%93a#!yZ*&>s;@PFX3?MX$Gy{lzy(zU2Eyuv`^FEraQfCNdT!yYSr^|3Q^s;-7WUcfxsDek_X1! zkvEWE^|I8DYBHtCrD`P?wEp4PRH`&Ha`M0E6+(a2Xq8)sE&m96l$ZtHzT=E%o& zj+`{+S&VgdWT`ZJY+{OcC7P0gKwTQ1p{=c~+AV*izu(-FXGFFV1{=CN(%nLLFJ%(l zErtfl=>|{tg_XIDV(x1R7h9PN5u20}&R47y`VGhT6t0a_Xba8B#LclP*8W)8#MgMY zxY#Vpkvs4W>pEh5#F)``$fuAz3&}kwE(3&1$QP-9u}nQZQ&XulR9D&>YADr)nnhmM z#PU+T(%IldPr1;#xhj(lRq1IFJ)KU)YdQG&6xfp~-j6lD|01D|saFHP@SqrMc`*PKoi^|m=9vwMD=bHB)9+GViN zOXz2SQe^1ugkpn5pU$1Iq6Jr_fH@1m(PPotrxF3U$4U^DT%^$GwSHFm=EJk4aDa-m zBkdGM$W^4(HNS`L2i8R`vo>v(G@W}OEkS~DIPKga*&`=tAs$#doc7X??6Hq$Xt<|R zD{V(9f8{g9v1Z6+zxQ_eh=>UJ)G^UhqmeJG`$88$ek|<*{E71DX0%Jt4E9@bsaC>;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GZXx!J*vSCBRO1EjnnuD0*TH*Yy z4-69v)`;Tp19W)FTnCQ>a7>kNDq@ye<;q_>vnn+`= zw4Rbgtm=A7v`>p>ih}J8v5T`NMdKo`*l(T{5Lpx^=8EZY$KRr7B@eC_^FQ0GYrt@T zv|&KXFvO16bzR4ClL^Bx5=qRjr*s|X6`Xa@biEf-0@h+T15`16rh+6k?1z2&u`e!F zY-z~Nl`iFSIWPv(Y3wNGi<=tc!v;Y-n7Aj1F{Q|_ig6H8Y$6YCK|VuO8Q@r#N^>}# zp^B-CdNGBH3+7uDbXx@-V)arOl0lq=`gkID>plRKOkKGds*;A|2fVm`5YoC>j~3*` z*hpjCsHBix^ug>A`q7 zpooPB#^S-l`zQor7>hLGzru)a;szr?N<6CpK;=5l2XAul{KObjM86DisA72iicAJRtiVPC5ef0$kIf%WY58UCBiFHDI~ zGb`PCbAn;$KmsH{0wh2JBtQZrKmsH{0wh2JBtQZrKmsH{0wh2JBtQZrKmsH{0wh2J tBtQZrKmsH{0wh2JBtQZrKmsH{0wh2JBtQZrKmsH{0wh2JB=Bz&_#K5wPf-8> diff --git a/tests/cpu_instrs/individual/02-interrupts.gb b/tests/cpu_instrs/individual/02-interrupts.gb deleted file mode 100644 index 20895940ad31ca0229cb4ff8bb7c7ef79ca8db10..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 32768 zcmeI4Uu+ab7{KSQcS|Y9wS_*6aD^>@YH4V?Lc~j4HWe#q6zc=ggh*UsyNI0E+Cn+t zI9r++{PQ63MP4-epz%e+3s893?cQBk%QO;!EC~&Ffj031%^hR`p}F&$y+Q)v5ffs* z$dD z^aj#q67MsgIVOk%kN^@u0!RP}AOR$R1dsp{Kmter2_OL^fCP{L5Q&5~$F`heRdTD&JT|1Dh_hprJ7(Fa z{c-Vrz}URCTc`>`l)}OQy$mQZ(SC zU}9ddbNKu=BUr_@8EFZUfl7o{-w|nMupuZUtU}CPBlmo^+~i;1bd^@~wf634*Mk+m-F;86cO*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M<3XeN|kdWiC&jh%2szHV7h0P!em!@OWWgSXSd;z8L@MA%%g24q~bbQB@Tejw_0S zej{O3Rl^aCuS69E*JZZ~Fhv={kbtvjrb0+8UkZUs6tqK|5wyirMTtRrwsIw%PJ?&lW?de@g(swyH1uiTtZ_RI&Y`Lm>+uD2t7U&ruNY zqAbFQzhM$);sGOosMxDEfa*A|2OqM%f4q_u6n1uam#^+?eK_vU}Vjc;d=3l#55di+;E!A{rAsX^5+>ol;K;lc#;EB<^IvJ{m_jF5CI}U z1c(3;AOb{y2oM1xKm>>Y5g-CYfCvx)B0vO)01+SpM1Tko0U|&IhyW2F0z`la5CI}U h1c(3;AOb{y2oM1xKm>>Y5g-CYfCvx)BJkfJ@Hea1Aw&QG diff --git a/tests/cpu_instrs/individual/04-op r,imm.gb b/tests/cpu_instrs/individual/04-op r,imm.gb deleted file mode 100644 index 58ca7b8ac3c2b16efc9c8e401e790671c00022a2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 32768 zcmeI4ZEO?g9l-x~k|Pbqu|w1yAuneVtPr4hD}zWgk1{}@y`p91iI-s1C}m)=&Ci}PS^)m|6_7tDiNZ`%vs1o!oe z{kL!2xc1Vyb332yci*{q~E)78){-D{jD zeGra=>Vuv*I6wB8Q-VZ*2oM1xKm>>Y5g-CYfCvx)B0vO)01+SpM1Tko0U|&IhyW2F z0z`la5CI}U1c(3;AOb{y2oM1xKm>>Y5g-CYfCvx)B0vO)01+SpM1Tko0U|&IhyW2F z0z`la5P|t3>m;#d?jCJ;y z(NpT*EU`-esoHf)x?9lnDOH~z(_3PCdrUv8YL>nv_Rt1z3kfTxm(`eNg~hCOK+ISN z#T(Wk@tPG8-?WCrD^?1k^xKxD-l*yzZjSq=?kNHK+9yU_V%t^wK0^d!2$)W zC96Ld6P;zq=)J0jxn}io^-Is}-MeEuWEjMs8!uKH!OogBoj1jLKDU0Lf5*d_8e^a+ z7(1hG%Jj_o)`E(%V#KuN$4O6#bXy?OM>2rSBUr#FwTmp7AScq2w?mH!p0%GrK}Nw%0)h zkvx>7cI2|&euXTWYc*Ih*JfzAs*0^xdYiG+J6sl^>G-cVwl^OteOR31&o=GqtPeOXaO2HrJ}~XrpNYEHs`Z3v(ffb)Do!P z+_fG^n0+B z5|)BxFz2h%{Rg@U+jqG#k@o{&g|{*V?UW?oZv3NIRXH*&=H{Lau8qe>PJ04Q^gX@R zU)#nvetKcR^RN4UTbS?sYkNEPbnNcfzf5`~-m4DehkrHTzm^|4-eC^sNAWt6AH(Zt z6i*cWujBfb^ZKjfm2Cr%@!d;w<)$aQa(A&8C$o51+?!-uax;^-Snf~aYSfn|^^@bB z3o0fK$P}k1^_yxbEeXZD{4O(8S}L85l#9$_8(ElkdIBLL52QCyMV)>fbq^iM0=vqSBu;_VBs}j(Shq;o*Gw z@Zp+M-x&S=YewCKwf@_yyY6kMDgJiFvDoHKU4Obf)p$0ycGVk4JAV=A{mHY*l}~-S z_D9V>aDQ%k@6{uz>&dF$uk$4wt@oEBRy6qNu722&r(+5wdJ4g-;aBZTj|*pCX83~lE@ZY zjASj=z$9OjAvAufMw(#@vAPWI=!!CGOuS&OEogXTwip9`|B@x%g+@!$qC*&CI&br zlwdii;FKsv(P5Li#x2(j$dNKZ2`(*|q zI*2L?L==Vp@VP9@=r~cUaTKDX_?o>Y5g-CYfCvx)B0vO)01+SpM1Tko0U|&IhyW2F0{;a9e+RrWAo2hJ diff --git a/tests/cpu_instrs/individual/05-op rp.gb b/tests/cpu_instrs/individual/05-op rp.gb deleted file mode 100644 index 1c19d922f728bd11dcd8b289813fd0409f438157..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 32768 zcmeI4Uu;v?8Nfd~$t48iI3#12{2@0ucp<>J9fC!gIm##kRUOS<)=E`rZ#B5I!%6~Z zV2I;7$;7&8539O|@lu8+wVJfSkhbwpo33MQb7w9pT|pPENv{WHnnfeK)m?)L_P%o+ z*w$`&m^7){z9XM|&UeoD=X}3=&bfIC!2f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h-1I1`IflwQhcn~39mp5Dpj!)d=(Tc^Wwjo)lP2y z>F+*wZtaQJQ+ zn+6Z#QR7y|?KCbJpXeo-D|MKuddz`IU9G0j@})XyjHQFkg)StwDu>hz_Ev3K3Q1KO9#S1^tFYs;Y*<7+;Af3a-m(6<~@oh#>)I z(M*LPU%nUwffuwxn_;xYRC$R)YNmW6l}dqnC>ljWzFsUrCmt#|@}baXN5+smevtb? zh`jJPSe$rjFen20x>24%e`=5~ozL?nRJmZhm5$j;=;zrBZU{Sa7<_%9)T8$RP}UTA zUJMEh{X2Luf8eAQo)2^4qO3+yZkHp7o!j6z6Oakw!uTTeVFY}SNFU2E!VB^I`y4Td z`gb`1Y^(a*AJ4xkM-;~&I^;6vfimBC_#Qa{FUmX&|F=urjK5$65aD~(0Z<*s_25f( z_K#N-Wp3w$M=ryn=)q;7p7P-v)vb$t0OM+k|Ft1+T0b-_9T;xle}34Oi;Y=so7MmQ zTb4MMHl9x#8#8!}17i8nxpAD(g9s1-B0vO)01+SpM1Tko0U|&IhyW2F0z`la5CI}U z1c(3;AOb{y2oM1xKm>>Y5g-CYfCvx)B0vO)01+SpM1Tko0U|&IhyW2F0z`la5CJ0a HUn1}~7IqB+ diff --git a/tests/cpu_instrs/individual/06-ld r,r.gb b/tests/cpu_instrs/individual/06-ld r,r.gb deleted file mode 100644 index d497bfd1275361bc847fa94dc87b43729f180b5d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 32768 zcmeH}dvFuS8NfgJaX5~UEyJ{jANY)o#&)5o2_>FJY@LKh8)BTM2{aVS5kLf@+6Dp$ zEGsrnLrSIvntz%;fXsB#X4=N3kMPP&PZkos+UE&vLXRexQ^2& z=`hp&m1)17+uQqgzsG*R+ub{W|ML=_lrwnQ>m8T~x94t#Zm`2dC~#Ij`%Q4XJMCk*6 z7?dh#3`5Sxe&#emB0vO)01+SpM1Tko0U|&IhyW2F0z`la5CI}U1c(3;AOb{y2oM1x zKm>>Y5g-CYfCvx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U|&IhyW2F0z`la5CI}U1c(3;AOb{y2oM1xKm>>Y5g-CY ffCvx)B0vO)01+SpM1Tko0U|&IhyW4z4+#7nJ{)}* diff --git a/tests/cpu_instrs/individual/07-jr,jp,call,ret,rst.gb b/tests/cpu_instrs/individual/07-jr,jp,call,ret,rst.gb deleted file mode 100644 index 5c8d20bb3a1a0458f29afe40b8d3ca125b13a391..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 32768 zcmeI4Z){W76~K?3#H7JEf3-bALS7(vAxefRTZy#StF%K!)0(C02P#!X7!@8ZwUQ7J zIK=jxWa_$U8m%_9>pqlK>)0P{FeYsjvJZ9~+j%pOkq+1ck>t4$P%WC-pf?f&_Rf6{ ztm~$Hm^2Ah=jq*h-?{hvx##!pz0aR4DPUgG|EVo_e~9Zywe`%$vV3|OEG^m#!(fMH zP+HmW+IPWm`E>WS$;pdvkBsbkvDpE*sC2oM1xKm>>Y5g-CYfCvx)B0vO)01+SpM1Tko z0U|&IhyW2F0z`la5CI}U1c(3;AOb{y2oM1xKm>>Y5g-CYfCvx)B0vO)01+SpM1Tko z0U|&IhyW2F0z`la5CJ0a*&+}TM=zAP?l!pKjOFY&C@01ZHmw$gGLMV@FonEY6=LTK zJsHLDsTCnVmlpmn;FB~I0a#uS>Vx`_KCBqg^D~XZ`KQ{x(YB@SsIxTDo>-o!ZE#g= z^Ui*}xqtTku7k6~&kf9qYs9P0{HngzJ*~aTiEu{or>vSURip{UOcAUslCo%ukt-W} zKBQVSoB|UU+A_0Es`1cAhESybBGht1oX;rgY)GvRtMy@Zbyz(WQVex%_`VH3W}-$| z&4=EBKfCbo6OZ@BIbc6m|kSCTWv z>eVf&V$Gi_!31rX%Z&O;Sg__Hsdk1Goa>A_8hU2?-n~0_K$1b^mCknMDrtPi4d?x^_=AlH#E}0bw+v+%Mg~~bv*G0uk(1#T%yy~wxOiK+wLU+c0*!&b1WP%VJQgPlV#(`k z*a5w%@lZnjVMq;x)$WAa6*5?n+7M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Cvx)B0vO)01+SpM1Tko0U|&Ih`?u;z&`;#5pP@o diff --git a/tests/cpu_instrs/individual/08-misc instrs.gb b/tests/cpu_instrs/individual/08-misc instrs.gb deleted file mode 100644 index 4da139be35c0f82db12136c2b65b2571122a026b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 32768 zcmeI4Uu+b|8Ng@H_Hr@D*=M`WVr;y|=432fjs{X!Jw{H7f~wSYRjD9F&@2ipg%dXINMc{<|Q~$l+srDqezLWHc%c~{`Fzk=R13KEP^(mMZ)%8z*IdE>khPyeZXzM z*#p{=$`5^tns2o`GvCbjXTIOg%-+)x@)f`0)voiO$?~}+WN}F!873aGgt&bTul|B~ zub%6^F*$kV=-IQoUg-ATJU4mu=(}f6KS3WM76X}c`edp0k+CnmxXDKpZ)Iy$op`5a ziTHUqPLxK{5ht!M{mgNKNB{{S0VIF~kN^@u0!RP}AOR$R1dsp{Kmter2_OL^fCP{L z5Ghhl-ykD0) zby^=+{%#2+`bSFZNpU`>>9dMnt?Kov-lXbh6wT6CsSj+RnM+uzZY!#0g@qZbUr1XA zg-Pp>aK(xUm#hKdqLm1PTE8lcTZyNi6>eFHjh(_x{W---eM^5r&E2Rdl()N*i;{sj zXIKfrV8Ej?p3HMM3+je$%VB*;T9 zGy03F;Ic_t?^HCH>x@3C{BV0;-_9K*O-cO4(R`^9Y$@B&a!sgUV;g(AcRm;?GkWs8 zu`7DAUE)Jg%Ki6)rwWl-0pu}7RPX#q$Z%Tht(W9!q zIi+_g7A?^m6zZ%Sovjr8_hU{j;K|bWkLKd9q%1b$_my0MGej>-?3wMmLpyhrlQbZC zAc;-DWux;7X)3eapvg>wp~0%kFNf3{j9tE%&6C<=f7sMicc}1l(Ha1y2^!)A@+C$A+yz1ACO z{nV4%+cK|e$4&nR({HXcn`sV$zHHWf0iTxW;@x0Y31NM74%|s8U%*A*1N~Q+KF4-w zH6smLRTlj|YnF+IswKPuCr}=mT|CM9-*2g~Xa&loXE)i+Y)7g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QFDM0+ zU5LJdL&~IabhSPss?s*2C|FlsK7M>oL9i%)>`IE!AL_ZZ?Ui_egxcEL#7?+2R!avU zDGs~YEx}nU*&OXZK;h)V>N@8XWMt4gii)L>>BQow1C+nqEZNgi@IRBSc} zbvzd(z~MlWIfEQdgWb905vS7*iQ7valKFrKo(w6&OxH6C?X@0?<#D*pT(&zLZm#d) zYBn3`JNdy|#hg*i|B@P7=Iq*20a66s+pz98Y zgZ#Q`ola-1i{d-n4hPLE(K?_w97`x9Xq3#Hu=D9lc9?k~JF;0ywv;L_9<-m09c^!K zhw~AShYb0Asn`?oNFgCVQad>zQ%D})&ixQXUU(cTiFi)CT>|+!8aqq=oOV8SKF+5w z#D(IGNtlhnG@iXV39f|fLUwg+`=$E;#JmpMMbU0n$bSMabx{sWIg=8Lv|Er9f@f%D4+3q{}=q9B}PcoFWzwQA2tzFs+UE1PqdXCGb*rf+2 z;YFMT0YN|z5CjAPK|l}?1Ox#=KoAfF1OY)n5D)|e0YN|z5CjAPK|l}?1Ox#=KoAfF r1OY)n5D)|e0YN|z5CjAPK|l}?1Ox#=KoAfF1OY)n5D*0ZO#*)bMsZX? diff --git a/tests/cpu_instrs/individual/10-bit ops.gb b/tests/cpu_instrs/individual/10-bit ops.gb deleted file mode 100644 index 8988458ea0eff185d7f3bd78ff85bb7717edccfa..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 32768 zcmeI4dvp_38oi~z4V`7uv(jXK=+9GPz|xr1ELesUV0gf$D8JyZD~1HQ(r%0 z>KxFJP~yPgDOtxSn`lru^G zR}QiOQb?^-m#I~1wXC_nYE7>WjUGI9@DqbS$cn~1?2Achrua$rwhIM|+jbQ#X{&y+ zv`ri!p2-Sj%o{X!P>J`5Ga#4y^qw+bghz;!WI->vd^(S;1!MM2a40$tr67sd`Gk<5>&2e_WqZUP{;J(# zw7+_n7~v{%C?2P4w=;*T?QZ{2yd<~Z9Xja)j|A#%)Z(axsAWl&)I#b2X_1+ro;=ew z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DJ`W2|Gq_uEt1YxMCT<6LjH`LJ zKyQd8hxuT(&RJ-+nn7UpLIufeq5>*ng;)bUk4-V#DkxTkrOd!&v&B-z^edQ}$wc~A z_F=tbh|Obh+2?w10v5$2uv{rTeQ3-qyW&v26o1wniv$8WsIXe0%xYyHdTy~;$gkaI zwOVaZvn|-nL{CgX35M7W|qES1_Qguj%-TEmP%z;1vIt=k2W?of^}g< z1sSq@=`x4okwRErX!~hcrjRVYnfW1z>|$}~3dggW%>t0Gqro=vXEn3b**r_3iwni; z7dGn$`K)?_9_(S+4)J-m#+&Z}An34|u8U@aME=8gseWLjEvz0X9G7Hk1<5I@i-maso^$YjQYWVZ0= zJu(7Dl35t`zuA}>d%*;tjIGr$fUf715545@`Y{TEiP?q26PFS}h^4eh&vJ2n*V3gi zfYN@D{Yi4SY4DVp3&i4*`7!LT6iwAh%T&E4MgQ%{>v|8BYE&j1qK%v-1aIz~up55k z1ULasfD_;ZH~~(86W|0m0ZxDu-~>1UPJk2O1ULasfD_;ZH~~(86W|0m0ZxDu-~>1U lPJk2O1ULasfD_;ZH~~(86W|0m0ZxDu-~>1UPT)T!@K+QR9VGw& diff --git a/tests/cpu_instrs/individual/11-op a,(hl).gb b/tests/cpu_instrs/individual/11-op a,(hl).gb deleted file mode 100644 index 0634b7fdd19bd62c16860ab1bad05760d6ac5965..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 32768 zcmeI4Yj6|S6@ZUqdl5zm2|RQ$eyp%jga?B1qE0Ke4rQP%C2prp$k5PirbHw}wN021 z5oE=WlsuZrW12}zen4p&Ql_a1&4lNKkt`&@XEER?9sk3_LUcxyCCXtHchV)E>=wy zJ`Keo>V}p$SikZ!rwI}PB0vO)01+SpM1Tko0U|&IhyW2F0z`la5CI}U1c(3;AOb{y z2oM1xKm>>Y5g-CYfCvx)B0vO)01+SpM1Tko0U|&IhyW2F0z`la5CI}U1c(3;AOb{y z2oM1xKm`7`2*ic{6BWLRdLJCOygdN&{sB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B0vO)01+SpM1Tko0U|&IhyW2F0z`la5CJ0a HpAz^7^EI)n diff --git a/tests/cpu_instrs/readme.txt b/tests/cpu_instrs/readme.txt deleted file mode 100644 index 6f94955..0000000 --- a/tests/cpu_instrs/readme.txt +++ /dev/null @@ -1,119 +0,0 @@ -Game Boy CPU Instruction Behavior Test --------------------------------------- -This ROM tests the behavior of all CPU instructions except STOP and the -11 illegal opcodes. The tests are fairly thorough, running instructions -with boundary data and verifying both the result and that other -registers are not modified. Instructions which perform the same -operation on different registers are each tested just as thoroughly, in -case an emulator implements each independently. Some sub-tests take half -minute to complete. - -Failed instructions are listed as - - [CB] opcode - -Some errors cannot of course be diagnosed properly, since the test -framework itself relies on basic instruction behavior being correct. - - -Internal operation ------------------- -The main tests use a framework that runs each instruction in a loop, -varying the register values on input and examining them on output. -Rather than keep a table of correct values, it simply calculates a -CRC-32 checksum of all the output, then compares this with the correct -value. Instructions are divided into several groups, each with a -different set of input values suited for their behavior; for example, -the bit test instructions are fed $01, $02, $04 ... $40, $80, to ensure -each bit is handled properly, while the arithmetic instructions are fed -$01, $0F, $10, $7F, $FF, to exercise carry and half-carry. A few -instructions require a custom test due to their uniqueness. - - -Multi-ROM ---------- -In the main directory is a single ROM which runs all the tests. It -prints a test's number, runs the test, then "ok" if it passes, otherwise -a failure code. Once all tests have completed it either reports that all -tests passed, or prints the number of failed tests. Finally, it makes -several beeps. If a test fails, it can be run on its own by finding the -corresponding ROM in individual/. - -Ths compact format on screen is to avoid having the results scroll off -the top, so the test can be started and allowed to run without having to -constantly monitor the display. - -Currently there is no well-defined way for an emulator test rig to -programatically find the result of the test; contact me if you're trying -to do completely automated testing of your emulator. One simple approach -is to take a screenshot after all tests have run, or even just a -checksum of one, and compare this with a previous run. - - -Failure codes -------------- -Failed tests may print a failure code, and also short description of the -problem. For more information about a failure code, look in the -corresponding source file in source/; the point in the code where -"set_test n" occurs is where that failure code will be generated. -Failure code 1 is a general failure of the test; any further information -will be printed. - -Note that once a sub-test fails, no further tests for that file are run. - - -Console output --------------- -Information is printed on screen in a way that needs only minimum LCD -support, and won't hang if LCD output isn't supported at all. -Specifically, while polling LY to wait for vblank, it will time out if -it takes too long, so LY always reading back as the same value won't -hang the test. It's also OK if scrolling isn't supported; in this case, -text will appear starting at the top of the screen. - -Everything printed on screen is also sent to the game link port by -writing the character to SB, then writing $81 to SC. This is useful for -tests which print lots of information that scrolls off screen. - - -Source code ------------ -Source code is included for all tests, in source/. It can be used to -build the individual test ROMs. Code for the multi test isn't included -due to the complexity of putting everything together. - -Code is written for the wla-dx assembler. To assemble a particular test, -execute - - wla -o "source_filename.s" test.o - wlalink linkfile test.gb - -Test code uses a common shell framework contained in common/. - - -Internal framework operation ----------------------------- -Tests use a common framework for setting things up, reporting results, -and ending. All files first include "shell.inc", which sets up the ROM -header and shell code, and includes other commonly-used modules. - -One oddity is that test code is first copied to internal RAM at $D000, -then executed there. This allows self-modification, and ensures the code -is executed the same way it is on my devcart, which doesn't have a -rewritable ROM as most do. - -Some macros are used to simplify common tasks: - - Macro Behavior - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - wreg addr,data Writes data to addr using LDH - lda addr Loads byte from addr into A using LDH - sta addr Stores A at addr using LDH - delay n Delays n cycles, where NOP = 1 cycle - delay_msec n Delays n milliseconds - set_test n,"Cause" Sets failure code and optional string - -Routines and macros are documented where they are defined. - --- -Shay Green diff --git a/tests/cpu_instrs/source/01-special.s b/tests/cpu_instrs/source/01-special.s deleted file mode 100644 index 776d685..0000000 --- a/tests/cpu_instrs/source/01-special.s +++ /dev/null @@ -1,78 +0,0 @@ -; Tests instructions that don't fit template - -.include "shell.inc" - -main: - set_test 2,"JR negative" - ld a,0 - jp jr_neg - inc a -- inc a - inc a - cp 2 - jp nz,test_failed - jp + -jr_neg: - jr - -+ - - set_test 3,"JR positive" - ld a,0 - jr + - inc a -+ inc a - inc a - cp 2 - jp nz,test_failed - - - set_test 4,"LD PC,HL" - ld hl,+ - ld a,0 - ld pc,hl - inc a -+ inc a - inc a - cp 2 - jp nz,test_failed - - - set_test 5,"POP AF" - ld bc,$1200 -- push bc - pop af - push af - pop de - ld a,c - and $F0 - cp e - jp nz,test_failed - inc b - inc c - jr nz,- - - - set_test 6,"DAA" - ; Test all combinations of A and flags (256*16 total) - ld de,0 -- push de - pop af - daa - - push af - call update_crc - pop hl - ld a,l - call update_crc - - inc d - jr nz,- - - ld a,e - add $10 - ld e,a - jr nz,- - - check_crc $6A9F8D8A - - jp tests_passed diff --git a/tests/cpu_instrs/source/02-interrupts.s b/tests/cpu_instrs/source/02-interrupts.s deleted file mode 100644 index de18b34..0000000 --- a/tests/cpu_instrs/source/02-interrupts.s +++ /dev/null @@ -1,73 +0,0 @@ -; Tests DI, EI, and HALT (STOP proved untestable) - -.include "shell.inc" - -main: - wreg IE,$04 - - set_test 2,"EI" - ei - ld bc,0 - push bc - pop bc - inc b - wreg IF,$04 -interrupt_addr: - dec b - jp nz,test_failed - ld hl,sp-2 - ldi a,(hl) - cp interrupt_addr - jp nz,test_failed - lda IF - and $04 - jp nz,test_failed - - set_test 3,"DI" - di - ld bc,0 - push bc - pop bc - wreg IF,$04 - ld hl,sp-2 - ldi a,(hl) - or (hl) - jp nz,test_failed - lda IF - and $04 - jp z,test_failed - - set_test 4,"Timer doesn't work" - wreg TAC,$05 - wreg TIMA,0 - wreg IF,0 - delay 500 - lda IF - delay 500 - and $04 - jp nz,test_failed - delay 500 - lda IF - and $04 - jp z,test_failed - pop af - - set_test 5,"HALT" - wreg TAC,$05 - wreg TIMA,0 - wreg IF,0 - halt ; timer interrupt will exit halt - nop ; avoids DMG bug - lda IF - and $04 - jp z,test_failed - - jp tests_passed - -.bank 0 slot 0 -.org $50 - inc a - ret diff --git a/tests/cpu_instrs/source/03-op sp,hl.s b/tests/cpu_instrs/source/03-op sp,hl.s deleted file mode 100644 index 9531d51..0000000 --- a/tests/cpu_instrs/source/03-op sp,hl.s +++ /dev/null @@ -1,102 +0,0 @@ -; Tests SP/HL instructions - -;.define PRINT_CHECKSUMS 1 -.include "shell.inc" -.include "instr_test.s" - -instrs: - .byte $33,0,0 ; INC SP - .byte $3B,0,0 ; DEC SP - .byte $39,0,0 ; ADD HL,SP - .byte $F9,0,0 ; LD SP,HL - .byte $E8,$01,0 ; ADD SP,1 - .byte $E8,$FF,0 ; ADD SP,-1 - .byte $F8,$01,0 ; LD HL,SP+1 - .byte $F8,$FF,0 ; LD HL,SP-1 -instrs_end: - -test_instr: - ; C = flags register - ld c,$00 - call test - ld c,$F0 - call test - ret - -test: - ; Go through each value for HL - ld hl,values -hl_loop: - ld e,(hl) - inc hl - ld d,(hl) - inc hl - push hl - - ; Go through each value for SP - ld hl,values -values_loop: - push bc - push de - push hl - - push bc - pop af - - ; Switch stack - ld (temp),sp - ld a,(hl+) - ld h,(hl) - ld l,a -; call print_regs - ld sp,hl - - ; Set registers - ld h,d - ld l,e - ld a,$12 - ld bc,$5691 - ld de,$9ABC - - jp instr -instr_done: - ; Save new SP and switch to yet another stack - ld (temp+2),sp - ld sp,$DF70 - - call checksum_af_bc_de_hl - - ; Checksum SP - ld a,(temp+2) - call update_crc_fast - ld a,(temp+3) - call update_crc_fast - - ldsp temp - - pop hl - pop de - pop bc - inc hl - inc hl - ld a,l - cp taken ; JP NZ,taken - .byte $C3,taken ; JP taken - .byte $CA,taken ; JP Z,taken - .byte $D2,taken ; JP NC,taken - .byte $DA,taken ; JP C,taken - - .byte $C4,taken ; CALL NZ,taken - .byte $CC,taken ; CALL Z,taken - .byte $CD,taken ; CALL taken - .byte $D4,taken ; CALL NC,taken - .byte $DC,taken ; CALL C,taken - - ; RET cond - ; INC A - .byte $C0,$3C,0 ; RET NZ - .byte $C8,$3C,0 ; RET Z - .byte $C9,$3C,0 ; RET - .byte $D0,$3C,0 ; RET NC - .byte $D8,$3C,0 ; RET C - .byte $D9,$3C,0 ; RETI - - ; RST - ; can only easily test this one on devcart - .byte $C7,0,0 ; RST $00 -.ifndef BUILD_DEVCART - .byte $CF,0,0 ; RST $08 - .byte $D7,0,0 ; RST $10 - .byte $DF,0,0 ; RST $18 - .byte $E7,0,0 ; RST $20 - .byte $EF,0,0 ; RST $28 - .byte $F7,0,0 ; RST $30 - .byte $FF,0,0 ; RST $38 -.endif - -instrs_end: - -test_instr: - wreg IE,0 ; disable interrupts, since RETI does EI - - ; Go through all 16 combinations of flags - ld bc,$1200 -- - ; Fill 4 bytes of new stack - ld a,$12 - ld ($DF80-2),a - ld a,$34 - ld ($DF80-3),a - ld a,$56 - ld ($DF80-4),a - ld a,$78 - ld ($DF80-5),a - - ; Set AF - push bc - pop af - - ; Switch to new stack - ld (temp),sp - ld sp,$DF80 - - ; Set return address - ld de,instr+3 - push de - - jp instr -instr_done: - inc a -taken: - di ; RETI enables interrupts - - ; Save new SP and switch to yet another stack - ld (temp+2),sp - ld sp,$DF70 - - ; Checksum A and SP - call update_crc_fast - ld a,(temp+2) - call update_crc_fast - ld a,(temp+3) - call update_crc_fast - - ; Checksum 4 bytes of stack - ld a,($DF80-2) - call update_crc_fast - ld a,($DF80-3) - call update_crc_fast - ld a,($DF80-4) - call update_crc_fast - ld a,($DF80-5) - call update_crc_fast - - ldsp temp - - ld a,c - add $10 - ld c,a - jr nz,- - - ret - -checksums: - .byte $EC,$A4,$94,$79,$C4,$00,$96,$2C,$C4,$64,$90,$33,$77,$C7,$0A,$D4 - .byte $77,$A3,$0C,$CB,$79,$E7,$7E,$AE,$DA,$DC,$03,$F7,$4F,$9F,$E9,$20 - .byte $72,$12,$DA,$01,$44,$6A,$4D,$8F,$D1,$79,$30,$4C,$AA,$37,$F2,$6A - .byte $97,$EA,$56,$5F,$32,$28,$C7,$D1,$49,$66,$05,$F7,$80,$0F,$BA,$8E - .byte $41,$E2,$A4,$9A,$2D,$2D,$8C,$72,$A5,$13,$76,$A8,$64,$FE,$68,$BC - .byte $2D,$2D,$8C,$72,$50,$96,$24,$27,$50,$96,$24,$27,$50,$96,$24,$27 - .byte $50,$96,$24,$27,$50,$96,$24,$27,$50,$96,$24,$27,$50,$96,$24,$27 - .byte $50,$96,$24,$27 - -.include "multi_custom.s" diff --git a/tests/cpu_instrs/source/08-misc instrs.s b/tests/cpu_instrs/source/08-misc instrs.s deleted file mode 100644 index 5c11c8e..0000000 --- a/tests/cpu_instrs/source/08-misc instrs.s +++ /dev/null @@ -1,110 +0,0 @@ -; Tests miscellaneous instructions - -;.define PRINT_CHECKSUMS 1 -.include "shell.inc" -.include "instr_test.s" - -instrs: - .byte $F0,$91,0 ; LDH A,($91) - .byte $E0,$91,0 ; LDH ($91),A - .byte $F2,$00,0 ; LDH A,(C) - .byte $E2,$00,0 ; LDH (C),A - .byte $FA,$91,$FF ; LD A,($FF91) - .byte $EA,$91,$FF ; LD ($FF91),A - .byte $08,$91,$FF ; LD ($FF91),SP - .byte $01,$23,$01 ; LD BC,$0123 - .byte $11,$23,$01 ; LD DE,$0123 - .byte $21,$23,$01 ; LD HL,$0123 - .byte $31,$23,$01 ; LD SP,$0123 - .byte $F5,0,0 ; PUSH AF - .byte $C5,0,0 ; PUSH BC - .byte $D5,0,0 ; PUSH DE - .byte $E5,0,0 ; PUSH HL - .byte $F1,0,0 ; POP AF - .byte $C1,0,0 ; POP BC - .byte $D1,0,0 ; POP DE - .byte $E1,0,0 ; POP HL -instrs_end: - -test_instr: - ; C = flags register - ld c,$00 - call test - ld c,$10 - call test - ld c,$E0 - call test - ld c,$F0 - call test - ret - -test: - ; Fill RAM - ld a,$FE - ld ($FF90),a - ld a,$DC - ld ($FF91),a - ld a,$BA - ld ($FF92),a - - ; Fill stack - ld a,$13 - ld ($DF80),a - ld a,$57 - ld ($DF80-1),a - ld a,$9B - ld ($DF80-2),a - ld a,$DF - ld ($DF80-3),a - - ; Set registers - ld b,$12 - push bc - ld bc,$5691 - ld de,$9ABC - ld hl,$DEF0 - pop af - - ; Switch stack - ld (temp),sp - ld sp,$DF80-2 - - jp instr -instr_done: - ; Save new SP and switch to another stack - ld (temp+2),sp - ld sp,$DF70 - - call checksum_af_bc_de_hl - - ; Checksum SP - ld a,(temp+2) - call update_crc_fast - ld a,(temp+3) - call update_crc_fast - - ; Checksum RAM - ld a,($FF90) - call update_crc_fast - ld a,($FF91) - call update_crc_fast - ld a,($FF92) - call update_crc_fast - - ; Checksum stack - ld a,($DF80) - call update_crc_fast - ld a,($DF80-1) - call update_crc_fast - ld a,($DF80-2) - call update_crc_fast - ld a,($DF80-3) - call update_crc_fast - - ; Restore SP - ldsp temp - - ret - -checksums: - .byte $4D,$FF,$15,$97,$6D,$A7,$35,$65,$4D,$FF,$15,$97,$6D,$A7,$35,$65,$4D,$FF,$15,$97,$6D,$A7,$35,$65,$AD,$FA,$5E,$41,$D0,$78,$79,$C1,$AF,$66,$99,$34,$0D,$E1,$97,$99,$6F,$D0,$6F,$5D,$C3,$1F,$A3,$8A,$C2,$F1,$9C,$F3,$C1,$C3,$DC,$78,$C0,$2D,$E3,$01,$8F,$C4,$0F,$44,$95,$22,$6A,$39,$61,$C5,$AB,$55,$FB,$DF,$2C,$52, diff --git a/tests/cpu_instrs/source/09-op r,r.s b/tests/cpu_instrs/source/09-op r,r.s deleted file mode 100644 index 432c4e7..0000000 --- a/tests/cpu_instrs/source/09-op r,r.s +++ /dev/null @@ -1,269 +0,0 @@ -; Tests most register instructions. -; Takes 10 seconds. - -;.define PRINT_CHECKSUMS 1 -.include "shell.inc" -.include "instr_test.s" - -instrs: - .byte $00,0,0 ; NOP - .byte $2F,0,0 ; CPL - .byte $37,0,0 ; SCF - .byte $3F,0,0 ; CCF - - .byte $B0,0,0 ; OR B - .byte $B1,0,0 ; OR C - .byte $B2,0,0 ; OR D - .byte $B3,0,0 ; OR E - .byte $B4,0,0 ; OR H - .byte $B5,0,0 ; OR L - .byte $B7,0,0 ; OR A - - .byte $B8,0,0 ; CP B - .byte $B9,0,0 ; CP C - .byte $BA,0,0 ; CP D - .byte $BB,0,0 ; CP E - .byte $BC,0,0 ; CP H - .byte $BD,0,0 ; CP L - .byte $BF,0,0 ; CP A - - .byte $80,0,0 ; ADD B - .byte $81,0,0 ; ADD C - .byte $82,0,0 ; ADD D - .byte $83,0,0 ; ADD E - .byte $84,0,0 ; ADD H - .byte $85,0,0 ; ADD L - .byte $87,0,0 ; ADD A - - .byte $88,0,0 ; ADC B - .byte $89,0,0 ; ADC C - .byte $8A,0,0 ; ADC D - .byte $8B,0,0 ; ADC E - .byte $8C,0,0 ; ADC H - .byte $8D,0,0 ; ADC L - .byte $8F,0,0 ; ADC A - - .byte $90,0,0 ; SUB B - .byte $91,0,0 ; SUB C - .byte $92,0,0 ; SUB D - .byte $93,0,0 ; SUB E - .byte $94,0,0 ; SUB H - .byte $95,0,0 ; SUB L - .byte $97,0,0 ; SUB A - - .byte $98,0,0 ; SBC B - .byte $99,0,0 ; SBC C - .byte $9A,0,0 ; SBC D - .byte $9B,0,0 ; SBC E - .byte $9C,0,0 ; SBC H - .byte $9D,0,0 ; SBC L - .byte $9F,0,0 ; SBC A - - .byte $A0,0,0 ; AND B - .byte $A1,0,0 ; AND C - .byte $A2,0,0 ; AND D - .byte $A3,0,0 ; AND E - .byte $A4,0,0 ; AND H - .byte $A5,0,0 ; AND L - .byte $A7,0,0 ; AND A - - .byte $A8,0,0 ; XOR B - .byte $A9,0,0 ; XOR C - .byte $AA,0,0 ; XOR D - .byte $AB,0,0 ; XOR E - .byte $AC,0,0 ; XOR H - .byte $AD,0,0 ; XOR L - .byte $AF,0,0 ; XOR A - - .byte $05,0,0 ; DEC B - .byte $0D,0,0 ; DEC C - .byte $15,0,0 ; DEC D - .byte $1D,0,0 ; DEC E - .byte $25,0,0 ; DEC H - .byte $2D,0,0 ; DEC L - .byte $3D,0,0 ; DEC A - - .byte $04,0,0 ; INC B - .byte $0C,0,0 ; INC C - .byte $14,0,0 ; INC D - .byte $1C,0,0 ; INC E - .byte $24,0,0 ; INC H - .byte $2C,0,0 ; INC L - .byte $3C,0,0 ; INC A - - .byte $07,0,0 ; RLCA - .byte $17,0,0 ; RLA - .byte $0F,0,0 ; RRCA - .byte $1F,0,0 ; RRA - - .byte $CB,$00,0 ; RLC B - .byte $CB,$01,0 ; RLC C - .byte $CB,$02,0 ; RLC D - .byte $CB,$03,0 ; RLC E - .byte $CB,$04,0 ; RLC H - .byte $CB,$05,0 ; RLC L - .byte $CB,$07,0 ; RLC A - - .byte $CB,$08,0 ; RRC B - .byte $CB,$09,0 ; RRC C - .byte $CB,$0A,0 ; RRC D - .byte $CB,$0B,0 ; RRC E - .byte $CB,$0C,0 ; RRC H - .byte $CB,$0D,0 ; RRC L - .byte $CB,$0F,0 ; RRC A - - .byte $CB,$10,0 ; RL B - .byte $CB,$11,0 ; RL C - .byte $CB,$12,0 ; RL D - .byte $CB,$13,0 ; RL E - .byte $CB,$14,0 ; RL H - .byte $CB,$15,0 ; RL L - .byte $CB,$17,0 ; RL A - - .byte $CB,$18,0 ; RR B - .byte $CB,$19,0 ; RR C - .byte $CB,$1A,0 ; RR D - .byte $CB,$1B,0 ; RR E - .byte $CB,$1C,0 ; RR H - .byte $CB,$1D,0 ; RR L - .byte $CB,$1F,0 ; RR A - - .byte $CB,$20,0 ; SLA B - .byte $CB,$21,0 ; SLA C - .byte $CB,$22,0 ; SLA D - .byte $CB,$23,0 ; SLA E - .byte $CB,$24,0 ; SLA H - .byte $CB,$25,0 ; SLA L - .byte $CB,$27,0 ; SLA A - - .byte $CB,$28,0 ; SRA B - .byte $CB,$29,0 ; SRA C - .byte $CB,$2A,0 ; SRA D - .byte $CB,$2B,0 ; SRA E - .byte $CB,$2C,0 ; SRA H - .byte $CB,$2D,0 ; SRA L - .byte $CB,$2F,0 ; SRA A - - .byte $CB,$30,0 ; SWAP B - .byte $CB,$31,0 ; SWAP C - .byte $CB,$32,0 ; SWAP D - .byte $CB,$33,0 ; SWAP E - .byte $CB,$34,0 ; SWAP H - .byte $CB,$35,0 ; SWAP L - .byte $CB,$37,0 ; SWAP A - - .byte $CB,$38,0 ; SRL B - .byte $CB,$39,0 ; SRL C - .byte $CB,$3A,0 ; SRL D - .byte $CB,$3B,0 ; SRL E - .byte $CB,$3C,0 ; SRL H - .byte $CB,$3D,0 ; SRL L - .byte $CB,$3F,0 ; SRL A -instrs_end: - -test_instr: - ld c,$00 - call test - ld c,$F0 - call test - ret - -test: - ; Go through each value for A - ld hl,values -a_loop: - ld b,(hl) - push hl - - ; Go through each value for other registers - ld hl,values -values_loop: - push bc - push hl - - push bc - - ; BC - ld a,(hl+) - ld b,a - ld a,(hl+) - ld c,a - - ; HL - ld a,(hl+) - ld d,a - ld a,(hl+) - ld e,a - push de - - ; DE - ld a,(hl+) - ld d,a - ld a,(hl+) - ld e,a - - pop hl - pop af - -; call print_regs - jp instr -instr_done: - - ; Checksum registers - call checksum_af_bc_de_hl - - pop hl - pop bc - inc hl - ld a,l - cp checksums - ld (next_checksum+1),a - ret - -; Compares current checksum with next checksum in -; list. Z if they match, NZ if not. -; Preserved: BC, DE, HL -checksums_compare: -.ifdef PRINT_CHECKSUMS - lda checksum+3 - push af - lda checksum+2 - push af - lda checksum+1 - push af - lda checksum+0 - push af - - ld a,(next_checksum) - inc a - ld (next_checksum),a - sub ?@1~S_Jk8EuOnO>t1U_)GPUYcV}PSJ688I zDZyK&1&Z3Yf=R|a=4{O6sIrFR>wY_q1954MiRzbDIv)c%zSNhFNh$uKIuubR9$M#% zQVgthyMM7>6t%8xc-*ZoU#;c~Eo^b8>ieF1Te%=ANe|UbtGOeuN<>ma4(yn>d z&PyDPc+NXzR}RnDiJDL@@*5U1@Exf>ZKHTq^DiA1#(zox`Vp^snt$Nkdp#BumLA0V yczj1Ga3U7XIy~nG6}avCt6hL`&VKmF{r{ZIvhq4Tb=k}k+hUx5zmKoWJ@6mAT&*eq diff --git a/tests/cpu_instrs/source/common/console.s b/tests/cpu_instrs/source/common/console.s deleted file mode 100644 index 5307f6b..0000000 --- a/tests/cpu_instrs/source/common/console.s +++ /dev/null @@ -1,291 +0,0 @@ -; Scrolling text console - -; Console is 20x18 characters. Buffers lines, so -; output doesn't appear until a newline or flush. -; If scrolling isn't supported (i.e. SCY is treated -; as if always zero), the first 18 lines will -; still print properly). Also works properly if -; LY isn't supported (always reads back as the same -; value). - -.define console_width 20 - -.define console_buf bss+0 -.define console_pos bss+console_width -.define console_mode bss+console_width+1 -.define console_scroll bss+console_width+2 -.redefine bss bss+console_width+3 - - -; Waits for start of LCD blanking period -; Preserved: BC, DE, HL -console_wait_vbl: - push bc - - ; Wait for start of vblank, with - ; timeout in case LY doesn't work - ; or LCD is disabled. - ld bc,-1250 -- inc bc - ld a,b - or c - jr z,@timeout - lda LY - cp 144 - jr nz,- -@timeout: - - pop bc - ret - - -; Initializes text console -console_init: - call console_hide - - ; CGB-specific inits - ld a,(gb_id) - and gb_id_cgb - call nz,@init_cgb - - ; Clear nametable - ld a,' ' - call @fill_nametable - - ; Load tiles - ld hl,TILES+$200 - ld c,0 - call @load_tiles - ld hl,TILES+$A00 - ld c,$FF - call @load_tiles - - ; Init state - ld a,console_width - ld (console_pos),a - ld a,0 - ld (console_mode),a - ld a,-8 - ld (console_scroll),a - call console_scroll_up_ - jr console_show - -@fill_nametable: - ld hl,BGMAP0 - ld b,4 -- ld (hl),a - inc l - jr nz,- - inc h - dec b - jr nz,- - ret - -@init_cgb: - ; Clear palette - wreg $FF68,$80 - ld b,16 -- wreg $FF69,$FF - wreg $FF69,$7F - wreg $FF69,$00 - wreg $FF69,$00 - wreg $FF69,$00 - wreg $FF69,$00 - wreg $FF69,$00 - wreg $FF69,$00 - dec b - jr nz,- - - ; Clear attributes - ld a,1 - ld (VBK),a - ld a,0 - call @fill_nametable - - ld a,0 - ld (VBK),a - ret - -@load_tiles: - ld de,ASCII - ld b,96 --- push bc - ld b,8 -- ld a,(de) - inc de - xor c - ldi (hl),a - ldi (hl),a - dec b - jr nz,- - pop bc - dec b - jr nz,-- - ret - - -; Shows console display -; Preserved: AF, BC, DE, HL -console_show: - push af - - ; Enable LCD - call console_wait_vbl - wreg LCDC,$91 - wreg SCX,0 - wreg BGP,$E4 - - jp console_apply_scroll_ - - -; Hides console display by turning LCD off -; Preserved: AF, BC, DE, HL -console_hide: - push af - - ; LCD off - call console_wait_vbl - wreg LCDC,$11 - - pop af - ret - - -; Changes to normal text mode -; Preserved: BC, DE, HL -console_normal: - xor a - jr console_set_mode - -; Changes to inverse text mode -; Preserved: BC, DE, HL -console_inverse: - ld a,$80 - -; Changes console mode to A. -; 0: Normal, $80: Inverse -; Preserved: BC, DE, HL -console_set_mode: - and $80 - ld (console_mode),a - ret - - -; Prints char A to console. Will not appear until -; a newline or flush occurs. -; Preserved: AF, BC, DE, HL -console_print: - push af - - cp 10 - jr z,console_newline_ - - push hl - push af - ld hl,console_pos - ldi a,(hl) - cp BGMAP0) >> 2 - add hl,hl - add hl,hl - - ; Copy line - ld de,console_buf + console_width -- dec e - ld a,(de) - ldi (hl),a - ld a,e - cp checksum - ldi (hl),a - ld (hl),d - inc l - ld (hl),c - inc l - ld (hl),b - - pop hl - pop de - pop bc - pop af - ret diff --git a/tests/cpu_instrs/source/common/crc_fast.s b/tests/cpu_instrs/source/common/crc_fast.s deleted file mode 100644 index d1088b0..0000000 --- a/tests/cpu_instrs/source/common/crc_fast.s +++ /dev/null @@ -1,88 +0,0 @@ -; Fast table-based CRC-32 - -.define crc_tables (bss+$FF)&$FF00 ; 256-byte aligned -.redefine bss crc_tables+$400 - - -; Initializes fast CRC tables and resets checksum. -; Time: 47 msec -init_crc_fast: - ld l,0 -@next: - xor a - ld c,a - ld d,a - ld e,l - - ld h,8 -- rra - rr c - rr d - rr e - jr nc,+ - xor $ED - ld b,a - ld a,c - xor $B8 - ld c,a - ld a,d - xor $83 - ld d,a - ld a,e - xor $20 - ld e,a - ld a,b - -+ dec h - jr nz,- - - ld h,>crc_tables - ld (hl),e - inc h - ld (hl),d - inc h - ld (hl),c - inc h - ld (hl),a - - inc l - jr nz,@next - - jp init_crc - - -; Faster version of update_crc -; Preserved: BC, DE -; Time: 50 cycles (including CALL) -update_crc_fast: - -; Fastest inline macro version of update_crc_fast -; Time: 40 cycles -; Size: 28 bytes -.macro update_crc_fast - ld l,a ; 1 - lda checksum ; 3 - xor l ; 1 - ld l,a ; 1 - ld h,>crc_tables ; 2 - - lda checksum+1 ; 3 - xor (hl) ; 2 - inc h ; 1 - sta checksum ; 3 - - lda checksum+2 ; 3 - xor (hl) ; 2 - inc h ; 1 - sta checksum+1 ; 3 - - lda checksum+3 ; 3 - xor (hl) ; 2 - inc h ; 1 - sta checksum+2 ; 3 - - ld a,(hl) ; 2 - sta checksum+3 ; 3 -.endm - update_crc_fast - ret diff --git a/tests/cpu_instrs/source/common/delay.s b/tests/cpu_instrs/source/common/delay.s deleted file mode 100644 index 65eb9c0..0000000 --- a/tests/cpu_instrs/source/common/delay.s +++ /dev/null @@ -1,220 +0,0 @@ -; Delays in cycles, milliseconds, etc. - -; All routines are re-entrant (no global data). Routines never -; touch BC, DE, or HL registers. These ASSUME CPU is at normal -; speed. If running at double speed, msec/usec delays are half advertised. - -; Delays n cycles, from 0 to 16777215 -; Preserved: AF, BC, DE, HL -.macro delay ARGS n - .if n < 0 - .printt "Delay must be >= 0" - .fail - .endif - .if n > 16777215 - .printt "Delay must be < 16777216" - .fail - .endif - delay_ n&$FFFF, n>>16 -.endm - -; Delays n clocks, from 0 to 16777216*4. Must be multiple of 4. -; Preserved: AF, BC, DE, HL -.macro delay_clocks ARGS n - .if n # 4 != 0 - .printt "Delay must be a multiple of 4" - .fail - .endif - delay_ (n/4)&$FFFF,(n/4)>>16 -.endm - -; Delays n microseconds (1/1000000 second) -; n can range from 0 to 4000 usec. -; Preserved: AF, BC, DE, HL -.macro delay_usec ARGS n - .if n < 0 - .printt "Delay must be >= 0" - .fail - .endif - .if n > 4000 - .printt "Delay must be <= 4000 usec" - .fail - .endif - delay_ ((n * 1048576 + 500000) / 1000000)&$FFFF,((n * 1048576 + 500000) / 1000000)>>16 -.endm - -; Delays n milliseconds (1/1000 second) -; n can range from 0 to 10000 msec. -; Preserved: AF, BC, DE, HL -.macro delay_msec ARGS n - .if n < 0 - .printt "Delay must be >= 0" - .fail - .endif - .if n > 10000 - .printt "Delay must be <= 10000 msec" - .fail - .endif - delay_ ((n * 1048576 + 500) / 1000)&$FFFF, ((n * 1048576 + 500) / 1000)>>16 -.endm - - ; All the low/high quantities are to deal wla-dx's asinine - ; restriction full expressions must evaluate to a 16-bit - ; value. If the author ever rectifies this, all "high" - ; arguments can be treated as zero and removed. Better yet, - ; I'll just find an assembler that didn't crawl out of - ; the sewer (this is one of too many bugs I've wasted - ; hours working around). - - .define max_short_delay 28 - - .macro delay_long_ ARGS n, high - ; 0+ to avoid assembler treating as memory read - ld a,0+(((high<<16)+n) - 11) >> 16 - call delay_65536a_9_cycles_ - delay_nosave_ (((high<<16)+n) - 11)&$FFFF, 0 - .endm - - ; Doesn't save AF, allowing minimization of AF save/restore - .macro delay_nosave_ ARGS n, high - ; 65536+11 = maximum delay using delay_256a_9_cycles_ - ; 255+22 = maximum delay using delay_a_20_cycles - ; 22 = minimum delay using delay_a_20_cycles - .if high > 1 - delay_long_ n, high - .else - .if high*n > 11 - delay_long_ n, high - .else - .if (high*(255+22+1))|n > 255+22 - ld a,>(((high<<16)+n) - 11) - call delay_256a_9_cycles_ - delay_nosave_ <(((high<<16)+n) - 11), 0 - .else - .if n >= 22 - ld a,n - 22 - call delay_a_20_cycles - .else - delay_short_ n - .endif - .endif - .endif - .endif - .endm - - .macro delay_ ARGS low, high - .if (high*(max_short_delay+1))|low > max_short_delay - push af - delay_nosave_ ((high<<16)+low - 7)&$FFFF, ((high<<16)+low - 7)>>16 - pop af - .else - delay_short_ low - .endif - .endm - - -; Delays A cycles + overhead -; Preserved: BC, DE, HL -; Time: A+20 cycles (including CALL) -delay_a_20_cycles: -- sub 5 ; 2 - jr nc,- ;3/2 do multiples of 5 - rra ; 1 - jr nc,+ ;3/2 bit 0 -+ adc 1 ; 2 - ret nc ;5/2 -1: 0 cycles - ret z ;5/2 0: 2 cycles - nop ; 1 1: 4 cycles - ret ; 4 (thanks to dclxvi for original algorithm) - -; Delays A*256 cycles + overhead -; Preserved: BC, DE, HL -; Time: A*256+12 cycles (including CALL) -delay_256a_12_cycles: - or a ; 1 - ret z ; 5/2 -delay_256a_9_cycles_: -- delay 256-4 - dec a ; 1 - jr nz,- ;3/2 - ret ; 4 - -; Delays A*65536 cycles + overhead -; Preserved: BC, DE, HL -; Time: A*65536+12 cycles (including CALL) -delay_65536a_12_cycles: - or a ; 1 - ret z ;5/2 -delay_65536a_9_cycles_: -- delay 65536-4 - dec a ; 1 - jr nz,- ;3/2 - ret ; 4 - -; Delays H*256+L cycles + overhead -; Preserved: AF, BC, DE, HL -; Time: H*256+L+51 cycles -delay_hl_51_cycles: - push af - ld a,h - call delay_256a_12_cycles - ld a,l - call delay_a_20_cycles - pop af - ret - - ; delay_short_ macro calls into these - .ds max_short_delay-10,$00 ; NOP repeated several times -delay_unrolled_: - ret - -.macro delay_short_ ARGS n - .if n < 0 - .fail - .endif - .if n > max_short_delay - .fail - .endif - - .if n == 1 - nop - .endif - .if n == 2 - nop - nop - .endif - .if n == 3 - .byte $18,$00 ; JR +0 - .endif - .if n == 4 - .byte $18,$00 ; JR +0 - nop - .endif - .if n == 5 - .byte $18,$00 ; JR +0 - nop - nop - .endif - .if n == 6 - .byte $18,$00 ; JR +0 - .byte $18,$00 ; JR +0 - .endif - .if n == 7 - push af - pop af - .endif - .if n == 8 - push af - pop af - nop - .endif - .if n == 9 - push af - pop af - nop - nop - .endif - .if n >= 10 - call delay_unrolled_ + 10 - n - .endif -.endm diff --git a/tests/cpu_instrs/source/common/gb.inc b/tests/cpu_instrs/source/common/gb.inc deleted file mode 100644 index 31bbf14..0000000 --- a/tests/cpu_instrs/source/common/gb.inc +++ /dev/null @@ -1,64 +0,0 @@ -; Game Boy hardware addresses - -; Memory -.define VRAM $8000 ; video memory -.define TILES $8000 ; tile images -.define BGMAP0 $9800 ; first 32x32 tilemap -.define BGMAP1 $9C00 ; second 32x32 tilemap -.define WRAM $C000 ; internal memory -.define OAM $FE00 ; sprite memory -.define HRAM $FF80 ; fast memory for LDH - -.define P1 $FF00 - -; Game link I/O -.define SB $FF01 -.define SC $FF02 - -; Interrupts -.define DIV $FF04 -.define TIMA $FF05 -.define TMA $FF06 -.define TAC $FF07 -.define IF $FF0F -.define IE $FFFF - -; LCD registers -.define LCDC $FF40 ; control -.define STAT $FF41 ; status -.define SCY $FF42 ; scroll Y -.define SCX $FF43 ; scroll X -.define LY $FF44 ; current Y being rendered -.define BGP $FF47 - -.define KEY1 $FF4D ; for changing CPU speed -.define VBK $FF4F - -; Sound registers -.define NR10 $FF10 -.define NR11 $FF11 -.define NR12 $FF12 -.define NR13 $FF13 -.define NR14 $FF14 - -.define NR21 $FF16 -.define NR22 $FF17 -.define NR23 $FF18 -.define NR24 $FF19 - -.define NR30 $FF1A -.define NR31 $FF1B -.define NR32 $FF1C -.define NR33 $FF1D -.define NR34 $FF1E - -.define NR41 $FF20 -.define NR42 $FF21 -.define NR43 $FF22 -.define NR44 $FF23 - -.define NR50 $FF24 -.define NR51 $FF25 -.define NR52 $FF26 - -.define WAVE $FF30 diff --git a/tests/cpu_instrs/source/common/instr_test.s b/tests/cpu_instrs/source/common/instr_test.s deleted file mode 100644 index 5ed6e2c..0000000 --- a/tests/cpu_instrs/source/common/instr_test.s +++ /dev/null @@ -1,105 +0,0 @@ -; Framework for CPU instruction tests - -; Calls test_instr with each instruction copied -; to instr, with a JP instr_done after it. -; Verifies checksum after testing instruction and -; prints opcode if it's wrong. - -.include "checksums.s" -.include "cpu_speed.s" -.include "apu.s" -.include "crc_fast.s" - -.define instr $DEF8 -.define rp_temp (instr-4) - -.define temp bss - -; Sets SP to word at addr -; Preserved: BC, DE -.macro ldsp ; addr - ld a,(\1) - ld l,a - ld a,((\1)+1) - ld h,a - ld sp,hl -.endm - -main: - call cpu_fast - call init_crc_fast - call checksums_init - set_test 0 - - ld hl,instrs -- ; Copy instruction - ld a,(hl+) - ld (instr),a - ld a,(hl+) - ld (instr+1),a - ld a,(hl+) - ld (instr+2),a - push hl - - ; Put JP instr_done after it - ld a,$C3 - ld (instr+3),a - ld a,instr_done - ld (instr+5),a - - call reset_crc - call test_instr - - call checksums_compare - jr z,passed - - set_test 1 - ld a,(instr) - call print_a - cp $CB - jr nz,+ - ld a,(instr+1) - call print_a -+ - -passed: - ; Next instruction - pop hl - ld a,l - cp instrs_end - jr nz,- - - jp tests_done - - -; Updates checksum with AF, BC, DE, and HL -checksum_af_bc_de_hl: - push hl - - push af - update_crc_fast - pop hl - ld a,l - update_crc_fast - - ld a,b - update_crc_fast - ld a,c - update_crc_fast - - ld a,d - update_crc_fast - ld a,e - update_crc_fast - - pop de - ld a,d - update_crc_fast - ld a,e - update_crc_fast - ret diff --git a/tests/cpu_instrs/source/common/macros.inc b/tests/cpu_instrs/source/common/macros.inc deleted file mode 100644 index c413bd5..0000000 --- a/tests/cpu_instrs/source/common/macros.inc +++ /dev/null @@ -1,73 +0,0 @@ -; General macros - -; Reads A from addr, from $FF00 to $FFFF -; Preserved: F, BC, DE, HL -; Time: 3 cycles -.macro lda ARGS addr - ldh a,(addr - $FF00) -.endm - -; Writes A to addr, from $FF00 to $FFFF -; Preserved: AF, BC, DE, HL -; Time: 3 cycles -.macro sta ARGS addr - ldh (addr - $FF00),a -.endm - -; Writes immediate data to addr, from $FF00 to $FFFF -; Preserved: F, BC, DE, HL -; Time: 5 cycles -.macro wreg ARGS addr, data - ld a,data - sta addr -.endm - -; Calls routine multiple times, with A having the -; value 'start' the first time, 'start+step' the -; second time, up to 'end' for the last time. -; Preserved: BC, DE, HL -.macro for_loop ; routine,start,end,step - ld a,\2 - -for_loop\@: - push af - call \1 - pop af - - add \4 - cp <(\3 + \4) - jr nz,for_loop\@ -.endm - -; Calls routine n times. The value of A in the routine -; counts from 0 to n-1. -; Preserved: BC, DE, HL -.macro loop_n_times ; routine,n - for_loop \1,0,\2 - 1,+1 -.endm - -; Same as for_loop, but counts with 16-bit value in BC. -; Preserved: DE, HL -.macro for_loop16 ; routine,start,end,step - ld bc,\2 - -for_loop16\@: - push bc - call \1 - pop bc - - ld a,c - add <\4 - ld c,a - - ld a,b - adc >\4 - ld b,a - - cp >(\3+\4) - jr nz,for_loop16\@ - - ld a,c - cp <(\3+\4) - jr nz,for_loop16\@ -.endm diff --git a/tests/cpu_instrs/source/common/multi_custom.s b/tests/cpu_instrs/source/common/multi_custom.s deleted file mode 100644 index 4dbae9d..0000000 --- a/tests/cpu_instrs/source/common/multi_custom.s +++ /dev/null @@ -1,38 +0,0 @@ -; RST handlers -.bank 0 slot 0 -.org 0 - inc a - ret - .ds 6,0 - inc a - ret - .ds 6,0 - inc a - ret - .ds 6,0 - inc a - ret - .ds 6,0 - inc a - ret - .ds 6,0 - inc a - ret - .ds 6,0 - inc a - ret - .ds 6,0 - inc a - ret - .ds 6,0 - inc a - ret - .ds 6,0 - inc a - ret - .ds 6,0 - inc a - ret - .ds 6,0 - inc a - ret diff --git a/tests/cpu_instrs/source/common/numbers.s b/tests/cpu_instrs/source/common/numbers.s deleted file mode 100644 index 6d6faf8..0000000 --- a/tests/cpu_instrs/source/common/numbers.s +++ /dev/null @@ -1,177 +0,0 @@ -; Printing of numeric values - -; Prints value of indicated register/pair -; as 2/4 hex digits, followed by a space. -; Updates checksum with printed values. -; Preserved: AF, BC, DE, HL - -print_regs: - call print_af - call print_bc - call print_de - call print_hl - call print_newline - ret - -print_a: - push af -print_a_: - call print_hex - ld a,' ' - call print_char_nocrc - pop af - ret - -print_af: - push af - call print_hex - pop af -print_f: - push bc - push af - pop bc - call print_c - pop bc - ret - -print_b: - push af - ld a,b - jr print_a_ - -print_c: - push af - ld a,c - jr print_a_ - -print_d: - push af - ld a,d - jr print_a_ - -print_e: - push af - ld a,e - jr print_a_ - -print_h: - push af - ld a,h - jr print_a_ - -print_l: - push af - ld a,l - jr print_a_ - -print_bc: - push af - push bc -print_bc_: - ld a,b - call print_hex - ld a,c - pop bc - jr print_a_ - -print_de: - push af - push bc - ld b,d - ld c,e - jr print_bc_ - -print_hl: - push af - push bc - ld b,h - ld c,l - jr print_bc_ - - -; Prints A as two hex chars and updates checksum -; Preserved: BC, DE, HL -print_hex: - call update_crc -print_hex_nocrc: - push af - swap a - call + - pop af - -+ and $0F - cp 10 - jr c,+ - add 7 -+ add '0' - jp print_char_nocrc - - -; Prints char_nz if Z flag is clear, -; char_z if Z flag is set. -; Preserved: AF, BC, DE, HL -.macro print_nz ARGS char_nz, char_z - push af - ld a,char_nz - jr nz,print_nz\@ - ld a,char_z -print_nz\@: - call print_char - pop af -.endm - - -; Prints char_nc if C flag is clear, -; char_c if C flag is set. -; Preserved: AF, BC, DE, HL -.macro print_nc ARGS char_nc, char_c - push af - ld a,char_nc - jr nz,print_nc\@ - ld a,char_c -print_nc\@: - call print_char - pop af -.endm - - -; Prints A as 2 decimal digits -; Preserved: AF, BC, DE, HL -print_dec2: - push af - push bc - jr + - - -; Prints A as 1-3 digit decimal value -; Preserved: AF, BC, DE, HL -print_dec: - push af - push bc - - cp 10 - jr c,++ - ld c,100 - cp c - call nc,@digit -+ ld c,10 - call @digit -++ add '0' - call print_char - - pop bc - pop af - ret - -@digit: - ld b,'0'-1 -- inc b - sub c - jr nc,- - add c - - ld c,a - ld a,b - call print_char - ld a,c - ret diff --git a/tests/cpu_instrs/source/common/printing.s b/tests/cpu_instrs/source/common/printing.s deleted file mode 100644 index ad9d811..0000000 --- a/tests/cpu_instrs/source/common/printing.s +++ /dev/null @@ -1,98 +0,0 @@ -; Main printing routine that checksums and -; prints to output device - -; Character that does equivalent of print_newline -.define newline 10 - -; Prints char without updating checksum -; Preserved: BC, DE, HL -.define print_char_nocrc bss -.redefine bss bss+3 - - -; Initializes printing. HL = print routine -init_printing: - ld a,l - ld (print_char_nocrc+1),a - ld a,h - ld (print_char_nocrc+2),a - jr show_printing - - -; Hides/shows further printing -; Preserved: BC, DE, HL -hide_printing: - ld a,$C9 ; RET - jr + -show_printing: - ld a,$C3 ; JP (nn) -+ ld (print_char_nocrc),a - ret - - -; Prints character and updates checksum UNLESS -; it's a newline. -; Preserved: AF, BC, DE, HL -print_char: - push af - cp newline - call nz,update_crc - call print_char_nocrc - pop af - ret - - -; Prints space. Does NOT update checksum. -; Preserved: AF, BC, DE, HL -print_space: - push af - ld a,' ' - call print_char_nocrc - pop af - ret - - -; Advances to next line. Does NOT update checksum. -; Preserved: AF, BC, DE, HL -print_newline: - push af - ld a,newline - call print_char_nocrc - pop af - ret - - -; Prints immediate string -; Preserved: AF, BC, DE, HL -.macro print_str ; string,string2 - push hl - call print_str_ - .byte \1 - .if NARGS > 1 - .byte \2 - .endif - .if NARGS > 2 - .byte \3 - .endif - .byte 0 - pop hl -.endm - -print_str_: - pop hl - call print_str_hl - jp hl - - -; Prints zero-terminated string pointed to by HL. -; On return, HL points to byte AFTER zero terminator. -; Preserved: AF, BC, DE -print_str_hl: - push af - jr + -- call print_char -+ ldi a,(hl) - or a - jr nz,- - pop af - ret diff --git a/tests/cpu_instrs/source/common/runtime.s b/tests/cpu_instrs/source/common/runtime.s deleted file mode 100644 index 90cd24f..0000000 --- a/tests/cpu_instrs/source/common/runtime.s +++ /dev/null @@ -1,142 +0,0 @@ -; Common routines and runtime - -; Must be defined by target-specific runtime: -; -; init_runtime: ; target-specific inits -; std_print: ; default routine to print char A -; post_exit: ; called at end of std_exit -; report_byte: ; report A to user - -.define RUNTIME_INCLUDED 1 - -.ifndef bss - ; address of next normal variable - .define bss $D800 -.endif - -.ifndef dp - ; address of next direct-page ($FFxx) variable - .define dp $FF80 -.endif - -; DMG/CGB hardware identifier -.define gb_id_cgb $10 ; mask for testing CGB bit -.define gb_id_devcart $04 ; mask for testing "on devcart" bit - -.define gb_id bss -.redefine bss bss+1 - -; Stack is normally here -.define std_stack $DFFF - -; Copies $1000 bytes from HL to $C000, then jumps to it. -; A is preserved for jumped-to code. -copy_to_wram_then_run: - ld b,a - - ld de,$C000 - ld c,$10 -- ldi a,(hl) - ld (de),a - inc e - jr nz,- - inc d - dec c - jr nz,- - - ld a,b - jp $C000 - -.ifndef CUSTOM_RESET - reset: - ; Run code from $C000, as is done on devcart. This - ; ensures minimal difference in how it behaves. - ld hl,$4000 - jp copy_to_wram_then_run - - .bank 1 slot 1 - .org $0 ; otherwise wla pads with lots of zeroes - jp std_reset -.endif - -; Common routines -.include "gb.inc" -.include "macros.inc" -.include "delay.s" -.include "crc.s" -.include "printing.s" -.include "numbers.s" -.include "testing.s" - -; Sets up hardware and runs main -std_reset: - - ; Init hardware - di - ld sp,std_stack - - ; Save DMG/CGB id - ld (gb_id),a - - ; Init hardware - .ifndef BUILD_GBS - wreg TAC,$00 - wreg IF,$00 - wreg IE,$00 - .endif - - wreg NR52,0 ; sound off - wreg NR52,$80 ; sound on - wreg NR51,$FF ; mono - wreg NR50,$77 ; volume - - ; TODO: clear all memory? - - ld hl,std_print - call init_printing - call init_testing - call init_runtime - call reset_crc ; in case init_runtime prints anything - - delay_msec 250 - - ; Run user code - call main - - ; Default is to successful exit - ld a,0 - jp exit - - -; Exits code and reports value of A -exit: - ld sp,std_stack - push af - call + - pop af - jp post_exit - -+ push af - call print_newline - call show_printing - pop af - - ; Report exit status - cp 1 - - ; 0: "" - ret c - - ; 1: "Failed" - jr nz,+ - print_str "Failed",newline - ret - - ; n: "Failed #n" -+ print_str "Failed #" - call print_dec - call print_newline - ret - -; returnOrg puts this code AFTER user code. -.section "runtime" returnOrg diff --git a/tests/cpu_instrs/source/common/testing.s b/tests/cpu_instrs/source/common/testing.s deleted file mode 100644 index c102f78..0000000 --- a/tests/cpu_instrs/source/common/testing.s +++ /dev/null @@ -1,176 +0,0 @@ -; Diagnostic and testing utilities - -.define result bss+0 -.define test_name bss+1 -.redefine bss bss+3 - - -; Sets test code and optional error text -; Preserved: AF, BC, DE, HL -.macro set_test ; code[,text[,text2]] - push hl - call set_test_ - jr @set_test\@ - .byte \1 - .if NARGS > 1 - .byte \2 - .endif - .if NARGS > 2 - .byte \3 - .endif - .byte 0 -@set_test\@: - pop hl -.endm - -set_test_: - pop hl - push hl - push af - inc hl - inc hl - ldi a,(hl) - ld (result),a - ld a,l - ld (test_name),a - ld a,h - ld (test_name+1),a - pop af - ret - - -; Initializes testing module -init_testing: - set_test $FF - call init_crc - ret - - -; Reports "Passed", then exits with code 0 -tests_passed: - call print_newline - print_str "Passed" - ld a,0 - jp exit - - -; Reports "Done" if set_test has never been used, -; "Passed" if set_test 0 was last used, or -; failure if set_test n was last used. -tests_done: - ld a,(result) - inc a - jr z,+ - dec a - jr z,tests_passed - jr test_failed -+ print_str "Done" - ld a,0 - jp exit - - -; Reports current error text and exits with result code -test_failed: - ld a,(test_name) - ld l,a - ld a,(test_name+1) - ld h,a - ld a,(hl) - or a - jr z,+ - call print_newline - call print_str_hl - call print_newline -+ - ld a,(result) - cp 1 ; if a = 0 then a = 1 - adc 0 - jp exit - - -; Prints checksum as 8-character hex value -; Preserved: AF, BC, DE, HL -print_crc: - push af - - ; Must read checksum entirely before printing, - ; since printing updates it. - lda checksum - cpl - push af - - lda checksum+1 - cpl - push af - - lda checksum+2 - cpl - push af - - lda checksum+3 - cpl - - call print_hex - pop af - call print_hex - pop af - call print_hex - pop af - call print_a - - pop af - ret - - -; If checksum doesn't match expected, reports failed test. -; Passing 0 just prints checksum. Clears checksum afterwards. -.macro check_crc ARGS crc - .if crc == 0 - call show_printing - call print_newline - call print_crc - .else - ld bc,(crc >> 16) ~ $FFFF - ld de,(crc & $FFFF) ~ $FFFF - call check_crc_ - .endif -.endm - -check_crc_: - lda checksum+0 - cp e - jr nz,+ - - lda checksum+1 - cp d - jr nz,+ - - lda checksum+2 - cp c - jr nz,+ - - lda checksum+3 - cp b - jr nz,+ - - jp reset_crc - -+ call print_crc - jp test_failed - - -; Updates checksum with bytes from addr to addr+size-1 -.macro checksum_mem ARGS addr,size - ld hl,addr - ld bc,size - call checksum_mem_ -.endm - -checksum_mem_: -- ldi a,(hl) - call update_crc - dec bc - ld a,b - or c - jr nz,- - ret diff --git a/tests/cpu_instrs/source/linkfile b/tests/cpu_instrs/source/linkfile deleted file mode 100644 index 02a5a2e..0000000 --- a/tests/cpu_instrs/source/linkfile +++ /dev/null @@ -1,2 +0,0 @@ -[objects] -test.o diff --git a/tests/cpu_instrs/source/shell.inc b/tests/cpu_instrs/source/shell.inc deleted file mode 100644 index 277a9b7..0000000 --- a/tests/cpu_instrs/source/shell.inc +++ /dev/null @@ -1,21 +0,0 @@ -.incdir "common" - -; GBS music file -.ifdef BUILD_GBS - .include "build_gbs.s" -.endif - -; Devcart -.ifdef BUILD_DEVCART - .include "build_devcart.s" -.endif - -; Sub-test in a multi-test ROM -.ifdef BUILD_MULTI - .include "build_multi.s" -.endif - -; GB ROM (default) -.ifndef RUNTIME_INCLUDED - .include "build_rom.s" -.endif diff --git a/tests/halt_bug.gb b/tests/halt_bug.gb deleted file mode 100644 index 38e36625d805e68cb3b8cbf562d6dff500060bdd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 32768 zcmeI)O>7&-6#(Ez{j3$4qD0qdCaz*HrC3o^8)pAp0^Ll7)Uja{snZ@>G>3ZCTB{@= zC`C?XDxw)mN{zI=G{~V*4K%t20h$JA>o^Juu9jrAkjIDt+t>hBLZYF85{^K|*u<6v zvTugA4{6T@jK0PGz1f+0GvChgNPz$I%^8WD|HQJ+b-~uw<1i0F=z@;$u9trep)2PS zSJ&1)SXf#b`$Zyj?cCaxh1ZwPeuIBOEQ4{2DjPku`wPz~Bmoj20TLhq5+DH*AOR8} z0TLhq5+DH*AOR8}0TLhq5+DH*AOR8}0TLhq61WEi4uv5*w5?aawY^LKJn2C8dIW|; z+npyP_uyn`$Rt1lBtQZrKmsH{0wh2JBtQZrKmsH{0wh2JBtQZrKmsH{0wh2JBtQc9 zjDYj*a&`Fr_p1l$ztcC|06nDIv;39faG)n364?N#bD()2 zmL)yv99Cy+fF(tBE~)eQ6XBn}E?!-B`j^G4w)nk$od=2y4#n;%NERF6Z*H3|b^}a> z+k)WpfLP7)1@ZSR9}{n7Yt?QsV~fAqI11O9bS}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