From 83b8353d36b10b94548d56a579ca1e14b9fab014 Mon Sep 17 00:00:00 2001 From: FlightControl Date: Tue, 26 Jan 2021 22:19:27 +0100 Subject: [PATCH] Space.c is uploaded. Compiles in release version, but not in latest kickc version; Assembly fails. --- .../cache/fragment-cache-wdc65c02.asm | 262 ++++++++++++ .../cx16/SpaceDemo/Metal_1/frame_1.png | Bin 0 -> 556 bytes .../cx16/SpaceDemo/Metal_1/frame_2.png | Bin 0 -> 609 bytes .../cx16/SpaceDemo/Metal_1/frame_3.png | Bin 0 -> 574 bytes .../cx16/SpaceDemo/Metal_1/frame_4.png | Bin 0 -> 590 bytes .../cx16/SpaceDemo/Metal_1/metal_1.png | Bin 0 -> 1494 bytes .../cx16/SpaceDemo/Metal_1/metal_2.png | Bin 0 -> 1418 bytes .../cx16/SpaceDemo/Metal_1/metal_3.png | Bin 0 -> 1420 bytes .../cx16/SpaceDemo/Metal_1/metal_4.png | Bin 0 -> 1418 bytes .../cx16/SpaceDemo/Ship_1/ship_1_360_1.png | Bin 0 -> 1142 bytes .../cx16/SpaceDemo/Ship_1/ship_1_360_10.png | Bin 0 -> 502 bytes .../cx16/SpaceDemo/Ship_1/ship_1_360_11.png | Bin 0 -> 831 bytes .../cx16/SpaceDemo/Ship_1/ship_1_360_12.png | Bin 0 -> 1091 bytes .../cx16/SpaceDemo/Ship_1/ship_1_360_2.png | Bin 0 -> 1097 bytes .../cx16/SpaceDemo/Ship_1/ship_1_360_3.png | Bin 0 -> 844 bytes .../cx16/SpaceDemo/Ship_1/ship_1_360_4.png | Bin 0 -> 517 bytes .../cx16/SpaceDemo/Ship_1/ship_1_360_5.png | Bin 0 -> 730 bytes .../cx16/SpaceDemo/Ship_1/ship_1_360_6.png | Bin 0 -> 1144 bytes .../cx16/SpaceDemo/Ship_1/ship_1_360_7.png | Bin 0 -> 1158 bytes .../cx16/SpaceDemo/Ship_1/ship_1_360_8.png | Bin 0 -> 1066 bytes .../cx16/SpaceDemo/Ship_1/ship_1_360_9.png | Bin 0 -> 748 bytes src/test/kc/examples/cx16/SpaceDemo/Space.c | 384 ++++++++++++++++++ src/test/kc/examples/cx16/SpaceDemo/space.ld | 16 + 23 files changed, 662 insertions(+) create mode 100644 src/test/kc/examples/cx16/SpaceDemo/Metal_1/frame_1.png create mode 100644 src/test/kc/examples/cx16/SpaceDemo/Metal_1/frame_2.png create mode 100644 src/test/kc/examples/cx16/SpaceDemo/Metal_1/frame_3.png create mode 100644 src/test/kc/examples/cx16/SpaceDemo/Metal_1/frame_4.png create mode 100644 src/test/kc/examples/cx16/SpaceDemo/Metal_1/metal_1.png create mode 100644 src/test/kc/examples/cx16/SpaceDemo/Metal_1/metal_2.png create mode 100644 src/test/kc/examples/cx16/SpaceDemo/Metal_1/metal_3.png create mode 100644 src/test/kc/examples/cx16/SpaceDemo/Metal_1/metal_4.png create mode 100644 src/test/kc/examples/cx16/SpaceDemo/Ship_1/ship_1_360_1.png create mode 100644 src/test/kc/examples/cx16/SpaceDemo/Ship_1/ship_1_360_10.png create mode 100644 src/test/kc/examples/cx16/SpaceDemo/Ship_1/ship_1_360_11.png create mode 100644 src/test/kc/examples/cx16/SpaceDemo/Ship_1/ship_1_360_12.png create mode 100644 src/test/kc/examples/cx16/SpaceDemo/Ship_1/ship_1_360_2.png create mode 100644 src/test/kc/examples/cx16/SpaceDemo/Ship_1/ship_1_360_3.png create mode 100644 src/test/kc/examples/cx16/SpaceDemo/Ship_1/ship_1_360_4.png create mode 100644 src/test/kc/examples/cx16/SpaceDemo/Ship_1/ship_1_360_5.png create mode 100644 src/test/kc/examples/cx16/SpaceDemo/Ship_1/ship_1_360_6.png create mode 100644 src/test/kc/examples/cx16/SpaceDemo/Ship_1/ship_1_360_7.png create mode 100644 src/test/kc/examples/cx16/SpaceDemo/Ship_1/ship_1_360_8.png create mode 100644 src/test/kc/examples/cx16/SpaceDemo/Ship_1/ship_1_360_9.png create mode 100644 src/test/kc/examples/cx16/SpaceDemo/Space.c create mode 100644 src/test/kc/examples/cx16/SpaceDemo/space.ld diff --git a/src/main/fragment/cache/fragment-cache-wdc65c02.asm b/src/main/fragment/cache/fragment-cache-wdc65c02.asm index b0fdac930..a7c569d69 100644 --- a/src/main/fragment/cache/fragment-cache-wdc65c02.asm +++ b/src/main/fragment/cache/fragment-cache-wdc65c02.asm @@ -3812,3 +3812,265 @@ inc {z1}+2 bne !+ inc {z1}+3 !: +//FRAGMENT isr_rom_sys_cx16_entry + +//FRAGMENT vbuz1=_dec_vbuz1 +dec {z1} +//FRAGMENT vwuz1_lt_vbuc1_then_la1 +lda {z1}+1 +bne !+ +lda {z1} +cmp #{c1} +bcc {la1} +!: +//FRAGMENT 0_eq_vwuz1_then_la1 +lda {z1} +ora {z1}+1 +beq {la1} +//FRAGMENT _deref_(_deref_qbuc1)=vbuz1 +lda {z1} +ldy {c1} +sty $fe +ldy {c1}+1 +sty $ff +ldy #0 +sta ($fe),y +//FRAGMENT isr_rom_sys_cx16_exit +jmp $e034 +//FRAGMENT vwuz1=vwuz2_plus_vbuz3 +lda {z3} +clc +adc {z2} +sta {z1} +lda #0 +adc {z2}+1 +sta {z1}+1 +//FRAGMENT vwuz1=vwuz1_minus_vbuc1 +sec +lda {z1} +sbc #{c1} +sta {z1} +lda {z1}+1 +sbc #0 +sta {z1}+1 +//FRAGMENT _deref_pwuc1=_deref_pwuz1 +ldy #0 +lda ({z1}),y +sta {c1} +iny +lda ({z1}),y +sta {c1}+1 +//FRAGMENT vwuz1=vwuc1_plus_vwuz2 +clc +lda {z2} +adc #<{c1} +sta {z1} +lda {z2}+1 +adc #>{c1} +sta {z1}+1 +//FRAGMENT _deref_pwuc1=vwuz1 +lda {z1} +sta {c1} +lda {z1}+1 +sta {c1}+1 +//FRAGMENT pbuz1=pbuz1_plus_vbuc1 +lda #{c1} +clc +adc {z1} +sta {z1} +bcc !+ +inc {z1}+1 +!: +//FRAGMENT _deref_qprc1=pprc2 +lda #<{c2} +sta {c1} +lda #>{c2} +sta {c1}+1 +//FRAGMENT vbuz1=vbuc1_plus_vbuz2 +lda #{c1} +clc +adc {z2} +sta {z1} +//FRAGMENT vwuz1_lt_vwuc1_then_la1 +lda {z1}+1 +cmp #>{c1} +bcc {la1} +bne !+ +lda {z1} +cmp #<{c1} +bcc {la1} +!: +//FRAGMENT _deref_(_deref_qbuc1)=vbuaa +ldy {c1} +sty $fe +ldy {c1}+1 +sty $ff +ldy #0 +sta ($fe),y +//FRAGMENT _deref_(_deref_qbuc1)=vbuxx +txa +ldy {c1} +sty $fe +ldy {c1}+1 +sty $ff +ldy #0 +sta ($fe),y +//FRAGMENT _deref_(_deref_qbuc1)=vbuyy +tya +ldy {c1} +sty $fe +ldy {c1}+1 +sty $ff +ldy #0 +sta ($fe),y +//FRAGMENT vbuz1=vbuc1_plus_vbuaa +clc +adc #{c1} +sta {z1} +//FRAGMENT vbuz1=vbuc1_plus_vbuxx +txa +clc +adc #{c1} +sta {z1} +//FRAGMENT vbuz1=vbuc1_plus_vbuyy +tya +clc +adc #{c1} +sta {z1} +//FRAGMENT vbuaa=vbuc1_plus_vbuz1 +lda #{c1} +clc +adc {z1} +//FRAGMENT vbuaa=vbuc1_plus_vbuaa +clc +adc #{c1} +//FRAGMENT vbuaa=vbuc1_plus_vbuxx +txa +clc +adc #{c1} +//FRAGMENT vbuaa=vbuc1_plus_vbuyy +tya +clc +adc #{c1} +//FRAGMENT vbuxx=vbuc1_plus_vbuz1 +lda #{c1} +clc +adc {z1} +tax +//FRAGMENT vbuxx=vbuc1_plus_vbuaa +clc +adc #{c1} +tax +//FRAGMENT vbuxx=vbuc1_plus_vbuxx +txa +clc +adc #{c1} +tax +//FRAGMENT vbuxx=vbuc1_plus_vbuyy +tya +clc +adc #{c1} +tax +//FRAGMENT vbuyy=vbuc1_plus_vbuz1 +lda #{c1} +clc +adc {z1} +tay +//FRAGMENT vbuyy=vbuc1_plus_vbuaa +clc +adc #{c1} +tay +//FRAGMENT vbuyy=vbuc1_plus_vbuxx +txa +clc +adc #{c1} +tay +//FRAGMENT vbuyy=vbuc1_plus_vbuyy +tya +clc +adc #{c1} +tay +//FRAGMENT vbuaa=vbuaa_plus_2 +clc +adc #2 +//FRAGMENT vbuz1=vbuz2_plus_vbuaa +clc +adc {z2} +sta {z1} +//FRAGMENT vbuaa=vbuz1_plus_vbuaa +clc +adc {z1} +//FRAGMENT vbuxx=vbuz1_plus_vbuaa +clc +adc {z1} +tax +//FRAGMENT vbuyy=vbuz1_plus_vbuaa +clc +adc {z1} +tay +//FRAGMENT vbuz1=vbuaa_plus_vbuaa +asl +sta {z1} +//FRAGMENT vbuaa=vbuaa_plus_vbuaa +asl +//FRAGMENT vbuxx=vbuaa_plus_vbuaa +asl +tax +//FRAGMENT vbuyy=vbuaa_plus_vbuaa +asl +tay +//FRAGMENT vbuz1=vbuxx_plus_vbuaa +stx $ff +clc +adc $ff +sta {z1} +//FRAGMENT vbuaa=vbuxx_plus_vbuaa +stx $ff +clc +adc $ff +//FRAGMENT vbuxx=vbuxx_plus_vbuaa +stx $ff +clc +adc $ff +tax +//FRAGMENT vbuyy=vbuxx_plus_vbuaa +stx $ff +clc +adc $ff +tay +//FRAGMENT vbuz1=vbuyy_plus_vbuaa +sty $ff +clc +adc $ff +sta {z1} +//FRAGMENT vbuaa=vbuyy_plus_vbuaa +sty $ff +clc +adc $ff +//FRAGMENT vbuxx=vbuyy_plus_vbuaa +sty $ff +clc +adc $ff +tax +//FRAGMENT vbuyy=vbuyy_plus_vbuaa +sty $ff +clc +adc $ff +tay +//FRAGMENT vwuz1=vwuz1_rol_7 +lda {z1}+1 +lsr +lda {z1} +ror +sta {z1}+1 +lda #0 +ror +sta {z1} +//FRAGMENT vwuz1=vwuc1_plus_vwuz1 +clc +lda {z1} +adc #<{c1} +sta {z1} +lda {z1}+1 +adc #>{c1} +sta {z1}+1 diff --git a/src/test/kc/examples/cx16/SpaceDemo/Metal_1/frame_1.png b/src/test/kc/examples/cx16/SpaceDemo/Metal_1/frame_1.png new file mode 100644 index 0000000000000000000000000000000000000000..86a26465f98f7b37b845915a91b15a7a397fb5a8 GIT binary patch literal 556 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE3?yBabR7dyjKx9jP7LeL$-D$|j01c^T!AzT z3yYVF<-L7b)s;y>u~Adzc6<2*MHOaAs3@Ghb#=?3EtU?BXZKC{_Uqf4U2Bf+TcW<+ z31qlnNswPK!+$g&AnLFXXit}?i(`mIZ)tF6*R;taq;O&fxrWNU5E4+Ho3@d{^h~x7H|0DZQ`P(0ijN=fuRN0*>%f! zLeq0>IvQt}PU-$K|M$0^(iM$AYz!^5_AN2kzplx#W>4xv$=GcQf4a*a0k!dQubx+L ze?-LD@b6Xb`;5!>p5*##>c6>2Xv6KL(@&UoY~MLgFQIR)e2C7Q>Yi__bjk$O>vuAh z^C{0WT#zNXW5I`m3%^cvj^29G;Z$8f{n3!uVJBWK-xqcL3x7IS^1X7^?-#!Bc3EYY zl&zO-_4>gT!;`;Cgxuz8uesM$(5IRAroZUIh02sUsqeJ;)-SkvsOz63<2800AFIs) p+ddvkTj5qO@%PhHd&S*#j34Xdqt|`k77C0q22WQ%mvv4FO#p$!1`GfI literal 0 HcmV?d00001 diff --git a/src/test/kc/examples/cx16/SpaceDemo/Metal_1/frame_2.png b/src/test/kc/examples/cx16/SpaceDemo/Metal_1/frame_2.png new file mode 100644 index 0000000000000000000000000000000000000000..2de84d9255762c65757873b3100115926309445e GIT binary patch literal 609 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE3?yBabR7dyjKx9jP7LeL$-D$|j01c^T!AzT z3yYVF<-L7b)s;y>u~Adzc6<2*MHOaAs3@Ghb#=?3EtU?BXZKC{_Uqf4U2Bf+TcW<+ z31qlnNswPK!+$g&AnLFXXwQC67sn8b-rV4aRm_SU)@ubbW^Vspe@iuE_um;`U$1Oo z5m;Z*|LythTh+&=-aKnzx~udB^IDS&Z#Sj=O#B)9R@XONtn{C`(uK(lOBNUAuSh;U z$vZ+qaLR(8>w;fhp7U${-zkq-89(tl$ko5qaB7<*uyD@DXX{O!O*}QC9&WVl*7{y% zEb!ofnkC0dPPr4O19)tl-$_`;K0Khs)>3&OCA4LO|04DWV$6k2*9)26EmCe(G0?fz ztS#5aTzr2K>x<-`2xB{zrFx5mQ!ZRgu5CRxH|`JPZ|_nsmM-T)nbpB%{bwCq%7t8( zw$EC3b=rfSn_O(<7g|mIx@4o|72bQD5ze`RN<41$E&*HsyD+e+Z(lh zR&iac-r1FH>ewBBKE^9W$n5G0mmf0Bc6}_uQ5Q3GMdL2_792fLwTOWy!LTvl`)T92 zJ1bYLVrH!BjMx{iHYMqt;Pa%b246m#O_Q6RVleaV^~2{L2fMEf&=qsd6H_!eex`k^ s?Sbt-&qSw2#Q5m`sTL|{I9tbXc8y$(R?C7{z<6fxboFyt=akR{01Gt`ApigX literal 0 HcmV?d00001 diff --git a/src/test/kc/examples/cx16/SpaceDemo/Metal_1/frame_3.png b/src/test/kc/examples/cx16/SpaceDemo/Metal_1/frame_3.png new file mode 100644 index 0000000000000000000000000000000000000000..6e22143157967cc4df69b5b2cfcf55159cb1be38 GIT binary patch literal 574 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE3?yBabR7dyjKx9jP7LeL$-D$|j01c^T!AzT z3yYVF<-L7b)s;y>u~Adzc6<2*MHOaAs3@Ghb#=?3EtU?BXZKC{_Uqf4U2Bf+TcW<+ z31qlnNswPK!+$g&AnLFXXwMu^7sn8b-qPUcqQ?e2-Xe}Fv0-Qb`tN4QTxuWfoBm{$ zL0pjBL^k7w*~#l1DqNnOTkq2HT=`AqdY`K($xt#*@xtoWI)ThbGf z8qUvoe}YpeR4RU=?!gI80cqYxpOl<@JN0OQv(O=%^=?o21!HzgTnRBYX*Yc&a#hHc ziM2re_>IWky1Naxn{GX;n0WZspc1bS~S+~$~HUBlshP?@QokdsL z2XfraT%YU5FlCXihsSxF4$H%Ts=b-4miwQ%^<%xjzI(eRpL}GS7{~J@LOk@Dov$3r z_g%3izZUVofBa0R-{-D_X?P?LZ^PGLDT1vZ6PV{ODoD|CSKTz{U$uPJjB82P)|L3y zt=>0ziqp2cJ*UJ^>t##;i+F3mTk@1zuoWDai#^T zn{4j9y71IO?cn`K^H(!``t|>4w*tRen}@q5zolg9r^Q@<+2d!(Df#YF(f~#xgQu&X J%Q~loCIJ261epK; literal 0 HcmV?d00001 diff --git a/src/test/kc/examples/cx16/SpaceDemo/Metal_1/frame_4.png b/src/test/kc/examples/cx16/SpaceDemo/Metal_1/frame_4.png new file mode 100644 index 0000000000000000000000000000000000000000..0b142132fbe00c6272ebb716e7b643100d3f1a04 GIT binary patch literal 590 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE3?yBabR7dyjKx9jP7LeL$-D$|j01c^T!AzT z3yYVF<-L7b)s;y>u~Adzc6<2*MHOaAs3@Ghb#=?3EtU?BXZKC{_Uqf4U2Bf+TcW<+ z31qlnNswPK!+$g&AnLFXXwMo?7sn8b-qPTUNi7OI&V50vX8!sgzkA8mx2ccc3FORL z(weRAr;wERTuI61SWH@;%)7ka_2Dh4cXo7S&rsZ!UZKqV`B9UY^rIQc50Xzf)+9?Y z8>i{^RZAXoPm+@L?Jv%o_WSdW+y|#06$)GvHt0WfqwgK_qF8)4bnWTC^o`LTS$B{m672D;HRzK>vc-yZ<%Jtujb32yrU*y5> zUtjh`GdjUw|GdxzbJxgaiQJ7>t2=KI$MExeNA$mw{+~5C{X6g5Dg5Qnl)js~k0E8j z0nyrur@|Y)Y@8zK@NfCX3eH70rvKd{m3yT0b4@$Dzy40ib$(GyNk;L%s+vQ2Hf;(J z`uyq3`OS%pPN}Mg6jv)qpYsn%ULzHvF|)+vWps#0XzgA1zlW-WlON^!ELER;^Ks+u z3kNkfruoHmGVCha_i=+UcN~MH%M#8?hWw(7;nl$}Yb#q7W(=p^^@C1F2frh zk5!v&w0tWhYxb=PYrRst=}oh}+#B7`$2+WUa({TgL43nsTcy)ACcDdhtFj8#`hL&< Y?JIXz=XYigFj5&jUHx3vIVCg!04drHYybcN literal 0 HcmV?d00001 diff --git a/src/test/kc/examples/cx16/SpaceDemo/Metal_1/metal_1.png b/src/test/kc/examples/cx16/SpaceDemo/Metal_1/metal_1.png new file mode 100644 index 0000000000000000000000000000000000000000..7cbec374ef38d617a690fff7b0548da261253e18 GIT binary patch literal 1494 zcmV;{1u6Q8P)Px#Gf+%aMF0Q*5)cravb5gn?kOxOK}bPbT~c#>dyAQztir_!2?@p0)q9DHVrgP? zacT_=43wp;A=fak0000HbW%=J0RR90|NsC0|NsC0|NsC0{}2^Gp#T5{G)Y83R9JoQ&5Uyz508Yi-qy&RKcR6k zb8h!*#=9NIEP%iT!HSl<2`s=Oe60KP`9RD0bp`-~WuoG@=M8B=t-}IN0vi#7UpRAi zV&*ZPc+F{j_6rSP000N+2WN8z&mD7(m@b&S^YEu)mNj?rfBLR9?xXtW^s{ESptZ;q zTRI@x;m4Gpc+N+<9Q@+bb>J3c=VBqaCj1YWXMpEE(+|(517y${X|7BnUxQf7g6A{V z^u&R?I00k_=n^M&FNzjhv;}jYKGHnI^TCw}zeX|EIsnMSxi(Y}z?kw2{OG09CjJSqR`nMB#2+ z7fOKq-HmPm`SU%)0%D2bLiDb~$7Z7&Y;#e#IW5eZe&4&VwhLE7{!Fdn}G zzzgJ{yBiT$*hUv-Xb6$1^OnTa9&_xyX+VlcR>}`hdkph_+FC4Vb zI>4IRX@*>K0l#CvA@L+6kQluj9C?)mg1?LaM<%v&LSEUYDFM_dKev~)&C~>cP{Lq_ zxVM0n$*6P%@@?J@R07sGo zV^*S0Xa_F6H|B7BD|=AvmApS!1y{W}moXq3#@fQc%ie6diT< zi-L|413MJi8$8^st1c>%T$-SA%1vG-t4t&a5^zTA*IqKGeq77F1vX=A&z@ zl+efl&Ko*d+MvYMm^6RiohK-Ge7l{mgH-QeG3azXc7XmGjaUdJP|7x6#`AiuElAhk wdK+Uy`st&?`xay{4hr<#2L2_nnH(zr0SixExrsO=Y5)KL07*qoM6N<$g6}833;+NC literal 0 HcmV?d00001 diff --git a/src/test/kc/examples/cx16/SpaceDemo/Metal_1/metal_2.png b/src/test/kc/examples/cx16/SpaceDemo/Metal_1/metal_2.png new file mode 100644 index 0000000000000000000000000000000000000000..162915e83f80e95c2aa81e451ebdb9a499d11da0 GIT binary patch literal 1418 zcmV;51$Fv~P)Px#Gf+%aMF0Q*5)cravb5gn?kOxOK}bPbT~c#>dyAQztir_!2?@p0)q9DHVrgP? zacT_=43wp;A=fak0000HbW%=J0RR90|NsC0|NsC0|NsC0{}2^Gp#T5`=t)FDR9J2{QuY9nE+~S>+YqyRjCfiOdj~qsB6SH&ZDl$0?qih>O#` z{Q#Eu;aJCgI2Zu%!*`Blu6Fnxmq3vSv_OlLaz$UG;QrnG6MqgA!K(n^Suhm;IFVA; zRq-nm(?#FO5P0M=Dmi%0dp`j@X{inQ_CVl(-~539u;6%d9WeKt0DR!$n7SH5U__!m zIpldh=zisE$|721a_(-7NQ4Vm?0LArrDHiP;9aj2yY5&tSR(yHItSo60qo8N05B0nkdIN)c*+6HV;mWK0{G~{PyrSs z1Io}&h9QblgJiN#fpi?0mA_@mrZLIEev!vYMM{?hf%E9MA=MV26c2e5~gRh!0D@aWM8Yo)7wP4P&k_ z1C_q1%$$!S2G@RdUWu+f68fciD35q5Vxi|QwYnR>hSieMxWS0twD8qy&UB;v3NT$5 z`@~T?P-fA)DkLGoos1_7e47`{-Ht603Al5mKq$?Tx##r4h0DiJ}$3}Vy#muj2UgMw)4s^8l+)EC4OtMQP(l<0AJ#YHvg~&cRl5y=1wEZ*~(YL8@ zfEKFXT_{I3vOB}+oHPktZ|u9$I`iXWn^_zm0805wHVzjmTYb(whs1P< zo=Y`jPxUpF%Sz|b+Ugc8(TNNIZ;*&-H{nuZ^<{z`);m)O8U)fT&KFfg>!FlesQA=xxs?)6Ab*dmba}z&dTx@a>?8bGCtrP^A2ytXaMI|M~g7` YAFdZzwr5$t5dZ)H07*qoM6N<$g2@?>YXATM literal 0 HcmV?d00001 diff --git a/src/test/kc/examples/cx16/SpaceDemo/Metal_1/metal_3.png b/src/test/kc/examples/cx16/SpaceDemo/Metal_1/metal_3.png new file mode 100644 index 0000000000000000000000000000000000000000..6a08b28872fc44e2befa2d873d619447ac8519a7 GIT binary patch literal 1420 zcmV;71#|j|P)Px#Gf+%aMF0Q*5)cravb5gn?kOxOK}bPbT~c#>dyAQztir_!2?@p0)q9DHVrgP? zacT_=43wp;A=fak0000HbW%=J0RR90|NsC0|NsC0|NsC0{}2^Gp#T5`>PbXFR9J8?ItWfx-`T3(c5T4TWe(-wW$hs zs{awIl~F4W#hPfZqi*BIR@Gz;?6;->G1cCBZ)$##E7!-~yC{)KDW$8lRyUm87+X5i ze!t@r|IdlmiZ^b9Iv&ur2CUI~t=d7Q-N>+D-Z9Qw&H!}h+QuL=STSmEwT?b|hmin) z3H1qZ#Q*>sF*6Zw3V_1W1~b=wg1kh^T8K_?XMttT(AUipepQ}CU4g{Q*Aq_-Imu++d00NZ^{82B) z9}Mo?i-Lg%w1g3W7}i+b2gP(calc=fa0hiQH5hD4#p<@zQU}uHM$#+7^BTri23W!Q zQgm825Pk&_Oc{lP!C!#WMBJ=wyZcJFLZx~l!x4}0fo2c@LHipM9AIZu!4SBCxe>CM z@LZ260OaX|{UQ&7LVc7$xSa_RL|*hNY!QVfVO)gkdg8_g@)D6obyj@#D5k0_jMq-| z1uKtMJvnf{)&fIlYyi;KFN)~};7$Z-r~?IUZU^eI(zb;YQ462S`2cVZNM-i2B&VX< z+=*UHpQ|xfJ0tfHK=I8G7W0#c0xy6Sg?B!{3j4rY>*j8>-rXHH*D;%UaKFxjoRCPZ z!TY))EKOWW-3LyA&eaGv%W2{)Oo@1Mg^)lC>m#EJJ#brQ828ImKKKA>pdz;i1RKJJ zC|E?{nFs%7;vbKI%NPP#c+^L$OAmg?gJb3PK#UqvsJahaCVmRza|+Ku%327@0kD54 zXAFD&l5+%rEm8i>gwrHmjR;moWcR-q6rZ_@3plc$?WbEX1gXqX;-5RyB?EQ<34rg# zB=1b<$zZ0P#nDsK+o*Y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{;r_yIyjuYG2lXRxxoFP@|v*%bc2gN=)WUCg-X|fvVpkp+}qFbBvq>0U()|J;V}bsOlxZZ;F3t(6u!0xSfb* zo!^FM(X$#%fR6iw>^%+j4xOgxc@6-;vqx8*DD9#Kt8UFsIp19YxQ$x&!bd;K0+3WM zk%$`#5&{)MS=3T0S4@~3tm&it$Q2T+mT^oUEqE0Dc)$7`;7A(ja)@QCK1*WD<-~a#s literal 0 HcmV?d00001 diff --git a/src/test/kc/examples/cx16/SpaceDemo/Ship_1/ship_1_360_10.png b/src/test/kc/examples/cx16/SpaceDemo/Ship_1/ship_1_360_10.png new file mode 100644 index 0000000000000000000000000000000000000000..d40a2936fc844b41ff2c9e56475b41ebd919d092 GIT binary patch literal 502 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I3?%1nZ+ru!j01c^T!AzvC+Cz(uWFs*tk|q) zr;7K^ZI1F$xVKc`*|n=dp+OQd5w- z?aFs~H~;TBXV{i)%@JsuHk-lamxR<`qbUll7uPc;?O<5O-=t^3YBBR9Lzl1Ob-SZ0 zK57L%d&7P3>hUEE>jH#C8IL(~>h6BNMCrm2hqHAoopLGP7?rZ)8%!CMIE`24hzG7w zXqJO3wz#?@(RIpZs l@yF8#-|X+~{~W(YpQVHANAUVZTELiK@O1TaS?83{1OShE(c=IB literal 0 HcmV?d00001 diff --git a/src/test/kc/examples/cx16/SpaceDemo/Ship_1/ship_1_360_11.png b/src/test/kc/examples/cx16/SpaceDemo/Ship_1/ship_1_360_11.png new file mode 100644 index 0000000000000000000000000000000000000000..62ad7fb17bf1ca18135eed72a061edd90ea5c851 GIT binary patch literal 831 zcmV-F1Hk-=P);WN_#AGYF%pP%5%M)gIY`=-lY)c*40u~QWzWXd+`B#=nNfgEti zFBw;;m!3nuVxADBgeDTHnGBs4fg&(VRY4J0&{1~H5l9ojsX$meAnr*82u}vufD^Fu z%w*H^6QBTpjy%hjB!=7gdAl@*^ zB_&{-6L6I;Kn%oFG;~oE(P-qQ1KO^G3i9ir(GL~;Yt#W^@}=NY5*`2o?dF1p%q~Qn z-d_szGa%z(N1mS4q~{RN3-GZeabTn&5~hJlG4mGm1{nDX9tq%}vlLES%nrEs!72iv z7iH~2VeB=VNze>UEQXq33w#lBskwXlQEQh9sOF>7fTKkX{j3BxiC0-B<{9Y|ZtAMa zjSr?w-Ap`=)CUk4h}x}jaEu;+A#nzPK!Rvx=kp$@-y0w&2mpsK75p_hQA3{rU?m66 zPgjAh+J0)xICJ`uM+#`&m+db593YQ2n1WctdO->Ko~a@TE!~J3AZaOPa?f3suu(ay zkAXlUvJI|Tz?J8s9bv7VbWO!)7CZ^ox5LN`{|m@i_&OFmvZ2%0MF22S*bF%pF!$;0 zOp4i8F*rj4=I^VRrUSE-9wKv1_yWXnV81!c1>-Qe+8@BljznCPmH6o7{{=LoNI(f* zQ-F;W(am`gkhTm3>wtIw+cF^UsFt_HCBO#2vmwIT62KBbxrr7P*wOk;qXSl6IdC<5 zeTt=*o;QH<{4nB?zbIV%7vkTv=+Xie+=-O&mRv!9mKfwm@@zX002ov JPDHLkV1hB%YmEQ^ literal 0 HcmV?d00001 diff --git a/src/test/kc/examples/cx16/SpaceDemo/Ship_1/ship_1_360_12.png b/src/test/kc/examples/cx16/SpaceDemo/Ship_1/ship_1_360_12.png new file mode 100644 index 0000000000000000000000000000000000000000..c58128a1d0397243ff142f164fd12ee3d2317427 GIT binary patch literal 1091 zcmV-J1ibr+P);WN_#AGYF%pP%5%M)gIY`=-lY)c*40u~QWzWKokTC1i{n~KdZ-}NCLSE-7??X;Q|49GmL`*B(ROvlpJ|bqa+ZIP{`4D45T6v zkswzZ=gGmzHtkb|0xsRwi5G&YDl7?rNf+JuQejcm>?{y~r!($e3||Q-@~~tGq_{6J z?tXE0f}VwviZ;PmO^zgh3H_@2XAJKM^6xDQu0}QCch$tA zD~MXVU9=^@zV`Sc&{+mP(slGguZCwdBbrKldLdeLnxHQxEP_ZpW+^5ru0$Qc3o5WS zeKkiRSTFChKsE`|Lrg%_EWQBaG{Zex0uS(>#<05Dx$}iA+fTENqH_u_sbIqKOr1+DB{a$+ z_(_5FYoeHBz{DknYRM3K)FR({=#@dQydgf|kE35@F}MVRK^QT+ z0124+{DjZFhSNP%UCuTPvhbU+RgAlzQg8s9Vfo@-guZ5rFX{K5dA?XBIx9 zW=yeLfZ{#-1b-X~1qG#85q4X6Y-?`zbW50S&BdnHbvxP!MZsD}k^qe`bnFo{D|2$uJ;d^zxu?MX zQm|l@Aw0)ZTOla65@hd|@T?COLBPcMpwTAWc0HhWD~~$_cu+P7D3*c)o5KBon%W_t z*Xw96gyS2*IQQ0VdY%1LHuv?{Pk)oNduadPu9vg@f8YP+`~eBgE2>HL_=5ld002ov JPDHLkV1h~o^R@s0 literal 0 HcmV?d00001 diff --git a/src/test/kc/examples/cx16/SpaceDemo/Ship_1/ship_1_360_2.png b/src/test/kc/examples/cx16/SpaceDemo/Ship_1/ship_1_360_2.png new file mode 100644 index 0000000000000000000000000000000000000000..b690978fb482c79c69ff59e7a48a3266635c6240 GIT binary patch literal 1097 zcmV-P1h)H$P);WN_#AGYF%pP%5%M)gIY`=-lY)c*40u~QWzW+j1*82t@;?1uf_j z|NphKQ9G$~e2e9&c^Fm2c9Ld^%Ld6`U;ptUqJLxV+*%X=Y-?4e-nM<;_#-F6%$THY z8w-6Bh{T1N+|#`i@wykZnW@vj{+?vE3LpW%h+MP+uw@U3VQf{>X#Qu{V~F z0K~|ESO);PwB;B`gl%Ixb^!oU=n?=Hv2B~N3F^qG#abB%dyY!t##`F~;P*qIxgedK z05NW4<$%Ro1W1q682~SU6~JwJ^Og&THz-$nCrM)zvQGd$WBKnb;j#+=y+c4=Iw%0U zou4za%VWYfnpy$0CylIKF9<<809HxJNRj@CK)tJ?>s%V%vMU~SiWnmp-HZ^*1J+D= z>;fTZEbS~8_do;?ua*rb5)mG*kuf4!_|bUk-^j5E_#p^(g9@T^ zEBkCgL5hAvb9gyXfC}OkP)b6HQN_|>bspxap^t|%Vfa=25 zz(CnzmXF7f01Nu&1KU8T&su_JwiQW)5RnJYhG_5yQoKT>obufI>PD2TaVTJ(!>H^T zu0xbK>(C*u&8s0s3fzVG114>TAP5DHu~j->5lT_euk~Y84%oi|*qY|2wjXx|xC7w1 zI2wYt98fg=AQDml43}L~U&P=OAQp2Vn$B&3(7~q%+#VJ1PeN_j(ZCZxRXBJAElm$l zj?3kjp@t3=#i@+jMFf-wU_%kaZB}(0$7_3x)dF-s1?1>0bYjQv1{5ZP{|Z1J0LU}q z(iI5lC-A-n9tM%!x>oR2$T{GqJ#Jf=Bfs0vn*jvh8ciuACQ;NUNFv`nU=t&*gd|n@ zS^k=?_4DrWSb!4$H4`}C3I@P?_LERapvu~mQXTQUa#5pM1`Mig4g`$EnUDoQx!iEb zXOS=tB(>?oQ|%c5`QPi7AUKTb&1G8zgm0Lro~7wI-&Z|QSm=mqig_2-$TXj}o5`mTU87w|w{ zP19R|+;tw#g?JzE)p@`5_sIqC$;#YrpI`jiMfZRu`v-v4wfYU`|GfSIC=x3EF1uhL P00000NkvXXu0mjf@}2SI literal 0 HcmV?d00001 diff --git a/src/test/kc/examples/cx16/SpaceDemo/Ship_1/ship_1_360_3.png b/src/test/kc/examples/cx16/SpaceDemo/Ship_1/ship_1_360_3.png new file mode 100644 index 0000000000000000000000000000000000000000..e324623f20650171dd680a465dc057e167986cb0 GIT binary patch literal 844 zcmV-S1GD^zP);WN_#AGYF%pP%5%M)gIY`=-lY)c*40u~QWzWVh41_INARFN$ zz5mm8gnM(_Re_$CWRXSmdC<>*kK-RNBKn(HlUl3TF5tREYAJ;`MKG%}B(Q7(h?$Md ztl1U;JGfX(#JX&4VgQ)hW7hjVKud|>Jq6-K!j*g91iU#YRrdh&E=3hXxv$3uAp?T1 z5fu3H(=80)BEl}zS0|!1vTlMWi|CNC){M{7vH`oI71_D5t^usxk^sbC36Ocf$U6XM z0!S$3%bSX+ED$4gMvW7IJR0XfOG|*vbTa^B>608VLOZJIT}34(Mw0pqkkb-?KE8y5 zFQw>nfcR4I0;+X4Zbgxgh?oE%E(RcT7)(mdYK5tgX-ss}PXT@o05nLD-r5bZ?m>Sf zeC>dP#umaHS!@y*Cu%c*mms$S5Y;=ulpSM5)`%tmBMGQ}#ox^@*jcTGFpLz9Vg~Rc z#2DL`3wCxPg*qx~kT*AzNVuVU5TO@3u|)3a0^4{08_bsQ`{30}z+!{P~88`FR=@oU5j}FcBQn zDa@HdH>ZO1k`4t~l?4SLJoOw&l-vReVEFkw(}2UC`*d_*M`#L&JRuh14|?uLDZLQt z^8?g;3Wfv^hOMIt*?_odpc_}>QAq&cga8<}!MuD)K~PZ3V+jg4Z%c~+N*f*$94A|v z+gf}&bcEy$X{gu%z{oUb8U&czoY{}GX!wb~tG`vXER;Xt%BsyjweOi9vDmpT{@v$FD)bb>7Z=V`df0O&dYyH`Oq8J#KUpyGj?XGWr z*zpxt4v)|LmA4akZXJ+zllc;8(%0Cqh)K5Lp@b}JL4)vx^oGzK7c&kDNo;fGQ;lX> z;@`oNEO2FkxR;NJ_O=JJxu*tcZJKa2@5Ivpm5797eZ7z+Vp($-<+MMzdz;$)Qa+cg z=6Ud$W=%y~dv^HgBVJX8J9wj1WOTM0d4HcGa)a67S7ee})Pv9@l{uI z5<^N}&6nK5VsrZn>lV>3uXdh~bx@x4|J84n{PjGl*6Xup10#mP)78&qol`;+0E~Im A82|tP literal 0 HcmV?d00001 diff --git a/src/test/kc/examples/cx16/SpaceDemo/Ship_1/ship_1_360_5.png b/src/test/kc/examples/cx16/SpaceDemo/Ship_1/ship_1_360_5.png new file mode 100644 index 0000000000000000000000000000000000000000..9a1920d036048da095bb33c41ed1b193e8fa1958 GIT binary patch literal 730 zcmV<00ww*4P);WN_#AGYF%pP%5%M)gIY`=-lY)c*40u~QWzWV$^ae;@1dx-mb`_Nby!T~*Ux0CC(1h|V09g6t zs2~9LvON7c0CT`2Vw!k-`6A#I8sc3PfN6nS1CTi`Vei7$dY{dV6ClqnA#TeDLCO1x z3~-xN0ALE`jmnv6;!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3Pg- zB!<9g+klGgZlaAW?Wv3#3f3Ce2thBsTSmVC@`o-DFi|%Zpp-8K9eZ}%06>AP5vrF9 zBzpifZ(YwL2AA&`Q9FQvBkuLQ(lrERuaJx%OMml=fxZ-c-O(NU)e8@R&Er1K_j?9^ k67GF%{sOrF#rxl_A0{a<3tXd1h5!Hn07*qoM6N<$f;BSP(*OVf literal 0 HcmV?d00001 diff --git a/src/test/kc/examples/cx16/SpaceDemo/Ship_1/ship_1_360_9.png b/src/test/kc/examples/cx16/SpaceDemo/Ship_1/ship_1_360_9.png new file mode 100644 index 0000000000000000000000000000000000000000..544b19308a4a2882c9cee089184ec253ac2381df GIT binary patch literal 748 zcmV;WN_#AGYF%pP%5%M)gIY`=-lY)c*40u~QWzWbws z{jYY)Bz<*1gGVz+EpE6P)+&|-v{sl)DV%kJMOABM$pS`eLT1*J z0BWtNbTLWBK#c*IYNmMrOD#T6riDkf-2BZO##RV(IbN{sU%QS>Z~vx za%}?$+w%y3qK^^-f#kW_@<7Bzwh7MN76A4=!r1M`Sx$cd+J(jKHGn)qW}fiCZ-8>N z#A^Ur7n_U46vgJK0Wz@xh~V9L0i>cA3`w+YK$uwPYAO(v!S5?c{)C`qUd+ba>oE5% zfCa$ioVA-{7@XW+cN5tIpgE~J*;S(z7vL4)0i4JI0l@5o4Q@@_0{9t?XaFDpcI|f% zFJnL!^aikpBC(?zXlxV$DY%v&Fs%|b!S=c{lYOjO2s~)+@gK5eJ13My-XenmFxVRJ zO*GuK1sLIgoExpY%-tS>)AXpL`5plCFaa1yAOISJu?tv@(E9=)2k%GW8^R3`j};%A zqKIZYRVKH96|BEWls9`+lMIGUn$8G5|* ziS|9f1`nZU*wp<1r;GGkA@_?AfXq59$KMuXw^99>`NYs;TQf^&ddVy%+k=Q)gFEzkr^6>U +#include +#include <6502.h> +#include +#include +#include +#include + +const byte NUM_SPRITES = 12; +const byte NUM_TILES_SMALL = 4; +const byte NUM_TILES_LARGE = 4; + +#pragma data_seg(Palettes) +export char* PALETTES; + +#pragma data_seg(Sprites) +export char SPRITE_PIXELS[] = kickasm(resource "Ship_1/ship_1_360_1.png") {{ + .var pic = LoadPicture("Ship_1/ship_1_360_1.png") + // palette: rgb->idx + .var palette = Hashtable() + // RGB value for each palette index + .var palList = List() + // Next palette index + .var nxt_idx = 0; + // Extract palette while outputting pixels as palete index values + .for (var y=0; y<64; y++) { + .for (var x=0;x<64; x++) { + // Find palette index (add if not known) + .var rgb = pic.getPixel(x,y); + .var idx = palette.get(rgb) + .if(idx==null) { + .eval idx = nxt_idx++; + .eval palette.put(rgb,idx); + .eval palList.add(rgb) + } + } + } + .if(nxt_idx>16) .error "Image has too many colours "+nxt_idx + + .segment Palettes + .for(var i=0;i<16;i++) { + .var rgb = palList.get(i) + .var red = floor(rgb / [256*256]) + .var green = floor(rgb/256) & 255 + .var blue = rgb & 255 + // bits 4-8: green, bits 0-3 blue + .byte green&$f0 | blue/16 + // bits bits 0-3 red + .byte red/16 + } + + .segment Sprites + .for(var p=1;p<=NUM_SPRITES;p++) { + .var pic = LoadPicture("Ship_1/ship_1_360_" + p + ".png") + .for (var y=0; y<64; y++) { + .for (var x=0;x<64; x+=2) { + // Find palette index (add if not known) + .var rgb = pic.getPixel(x,y); + .var idx1 = palette.get(rgb) + .if(idx1==null) { + .printnow "unknown rgb value!" + } + // Find palette index (add if not known) + .eval rgb = pic.getPixel(x+1,y); + .var idx2 = palette.get(rgb) + .if(idx2==null) { + .printnow "unknown rgb value!" + } + .byte idx1*16+idx2; + } + } + } +}}; + +#pragma data_seg(TileS) +export char TILE_PIXELS_SMALL[] = kickasm(resource "Metal_1/frame_1.png") {{ + // palette: rgb->idx + .var palette2 = Hashtable() + // RGB value for each palette index + .var palList2 = List() + // Next palette index + // Extract palette while outputting pixels as palete index values + .var nxt_idx2 = 0; + .for(var p=1;p<=NUM_TILES_SMALL;p++) { + .var pic = LoadPicture("Metal_1/frame_" + p + ".png") + .for (var y=0; y<32; y++) { + .for (var x=0;x<32; x++) { + // Find palette index (add if not known) + .var rgb = pic.getPixel(x,y); + .var idx = palette2.get(rgb) + .if(idx==null) { + .eval idx = nxt_idx2++; + .eval palette2.put(rgb,idx); + .eval palList2.add(rgb) + } + } + } + } + .if(nxt_idx2>16) .error "Image has too many colours "+nxt_idx2 + + .segment Palettes + .for(var i=0;i<16;i++) { + .var rgb = 16*256*256+16*256+16 + .if(iidx + .var palette3 = Hashtable() + // RGB value for each palette index + .var palList3 = List() + // Next palette index + .var nxt_idx3 = 0; + // Extract palette while outputting pixels as palete index values + .for (var y=0; y<64; y++) { + .for (var x=0;x<64; x++) { + // Find palette index (add if not known) + .var rgb = pic3.getPixel(x,y); + .var idx = palette3.get(rgb) + .if(idx==null) { + .eval idx = nxt_idx3++; + .eval palette3.put(rgb,idx); + .eval palList3.add(rgb) + } + } + } + .if(nxt_idx3>16) .error "Image has too many colours "+nxt_idx3 + + .segment Palettes + .for(var i=0;i<16;i++) { + .var rgb = 0 + .if(iVERA_SPRITE_ATTR, vram_sprite_attr, &SPRITE_ATTR, sizeof(SPRITE_ATTR)); + vram_sprite_attr += sizeof(SPRITE_ATTR); + sprite_offset += 64; + } + // Enable sprites + *VERA_CTRL &= ~VERA_DCSEL; + *VERA_DC_VIDEO |= VERA_SPRITES_ENABLE; + // Enable VSYNC IRQ (also set line bit 8 to 0) + SEI(); + *KERNEL_IRQ = &irq_vsync; + *VERA_IEN = VERA_VSYNC; + CLI(); + + while(!fgetc()); +} + +volatile byte i = 0; +volatile byte a = 4; +volatile word vscroll = 0; +volatile word scroll_action = 2; + +// VSYNC Interrupt Routine +__interrupt(rom_sys_cx16) void irq_vsync() { + // Move the sprite around + + a--; + if(a==0) { + a=4; + const char vram_sprite_attr_bank = (char)>VERA_SPRITE_ATTR; + char *vram_sprite_attr = =NUM_SPRITES) { + x-=NUM_SPRITES; + } + SPRITE_ATTR.ADDR = sprites[x]; + SPRITE_ATTR.X = (word)40+((word)(s&03)<<7); + SPRITE_ATTR.Y = (word)100+((word)(s>>2)<<7); + // Copy sprite positions to VRAM (the 4 relevant bytes in VERA_SPRITE_ATTR) + memcpy_to_vram(vram_sprite_attr_bank, vram_sprite_attr, &SPRITE_ATTR, 6); + vram_sprite_attr += sizeof(SPRITE_ATTR); + } + + i++; + if(i>=NUM_SPRITES) i=0; + + } + + if(scroll_action--) { + scroll_action = 2; + vscroll++; + if(vscroll>(32+64)*2-1) vscroll=0; + vera_layer_set_vertical_scroll(0,vscroll); + } + + // Reset the VSYNC interrupt + *VERA_ISR = VERA_VSYNC; +} + + + diff --git a/src/test/kc/examples/cx16/SpaceDemo/space.ld b/src/test/kc/examples/cx16/SpaceDemo/space.ld new file mode 100644 index 000000000..d8d40ddd5 --- /dev/null +++ b/src/test/kc/examples/cx16/SpaceDemo/space.ld @@ -0,0 +1,16 @@ +// Create a D64 disk containing the program and a sprite file +.file [name="%O", type="prg", segments="Program"] +.file [name="SPRITES", type="bin", segments="Sprites"] +.file [name="TILES", type="bin", segments="TileS"] +.file [name="TILEB", type="bin", segments="TileB"] +.file [name="PALETTES", type="bin", segments="Palettes"] +.segmentdef Program [segments="Basic, Code, Data"] +.segmentdef Basic [start=$0801] +.segmentdef Code [start=%P] +.segmentdef Data [startAfter="Code"] +.segment Basic +:BasicUpstart(%E) +.segmentdef Sprites +.segmentdef TileS +.segmentdef TileB +.segmentdef Palettes