From d3938806a2b49df44ac55ea4b2a43c6a3f15011d Mon Sep 17 00:00:00 2001 From: Joshua Wise Date: Sun, 30 Mar 2008 06:33:25 -0400 Subject: [PATCH] NOP, and bug fixes --- FPGABoy.ise | Bin 209632 -> 209616 bytes GBZ80Core.v | 16 +++++++++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/FPGABoy.ise b/FPGABoy.ise index 8922cdfc55d202b1b3e0997549c4790a93fcbe22..2e6073ab007a9ad8a92f0e44de70220c85cd813c 100644 GIT binary patch delta 7352 zcma)AdstLe*FWpbK4%7S!ds353hHr0Q8^%T(Gl@JaZ!+qps1617ZlA8$=3?a$`Xxq zX(!Xdv_vy+S?^?4mRUkx5Ft@fQBhG*F*V5hcbH)v?CJaCo9CJH?6dY-zx7*d?Y;J% zIe)p?vCGYN9&KxUV14JqlSetO;TwXxOdau2+i2qzp|ioxIX|a2V4_)u5?pMy23du* zhAA%jllFX;VWMk1D2J68rn<&wD}_#ETakpdW;?uwab70y#Hn5qtj1jRIRSU5k_bHL zCBsmx_p-q;jPy1Iy}_nyI8Wh;A;X0kfa1r7S*~&668&i!*ZJcT?{p)wFtVyF!KdDd zmT-NArqk8n*Ej|k$P~j%P8{IRVRk#o+*j~7yy!ySk<2w0OI_n%_v7w%R*N{ACXN2XAoVjE57}vpOOlE@`D+pXG+}J_I7tRsp>4AEI@^)$))^w09 z0h~K||8^yNNy|W~xSBKz6^!g?wR|glPdN8yaK9R6yE5t4OT15-<%co9qX~|qqoV}h zU`0ncB23&)v%ho9-7v>xb)uAe*^urUOM1!`KRd#uqNj;$n{rK{jel8P+BMppR`#PI}u{}$#*o%ou^ zxKSGBRdh%Eg90p05)Tr|+ecB?S%$$F+*txQOzE7h7QMK$Ro!kL7As6fo5c=17FcXB zA8RcVe2uNTNXDZqtq}oO01oaVn>z?Vm}OaPn6^B!Ft>{Yp}3=q34XzY>i9I)bg@A& z2K(8KZwuEbj%zWP@7KobdL5rn9U*G4xRyv4=3=p*HE52gXc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$Wpi3LNPs!Ls}gX3$X4OceA!>1IIcy6c?m{6ZEG5esB ztg~gkE{Mw`VY3GDbGEW@)JrBm2RTjBm3@h-NpRvz1dpt7e4PlX zZtUdkiZmI%Y%_Vgvu=jP`xvG*qx(~xfv%i+%sgUrcNm84sWct}uPIL^LllH551T_% z|0MOQ!vX0@?VFafM zmb`F$KMR7uebQsq55tHyPe*kM%;Pn|&{SpKTzFb<@uTwYJUCrHKj0Xe3OVkYLBvg^ zAIV07d^XJgW!X?eJU=YuI|hPRF(l5aUrVcmFDV(iV z#%zPu{|~?UJ3y+(`ArcsVP-u{nUaIlL0N6Oxrznf|U^+X-{(nf{=}?Sk%MbWYx$pd0ZD zo=289Q}U`rJxl+^T{*Q2Vw8O%a7tz}80+!(D}i6bwEFp~S1WRMv(jMq%N057SiBo9 zHhQV+MjeJR^<7(_96Jo7wfWGw4!PORDJSXc!= zzsC9d2lY@w+}I4Ae?WJo#Eo6$620lp&UcL}-PyUW(Nqt1hHG@igZ-*@6re2jWY;)H gjz$LdKP(r}JuqO!=7y|eb3> 4 == 1) ? 1'b1 : 1'b0, /* C */ (({1'b0,registers[`REG_A]} + {1'b0,tmp}) >> 8 == 1) ? 1'b1 : 1'b0, registers[`REG_F][3:0] @@ -519,7 +524,7 @@ module GBZ80Core( registers[`REG_A] + tmp + {7'b0,registers[`REG_F][4]}; registers[`REG_F] <= { /* Z */ ((registers[`REG_A] + tmp + {7'b0,registers[`REG_F][4]}) == 0) ? 1'b1 : 1'b0, - /* N */ 0, + /* N */ 1'b0, /* H */ (({1'b0,registers[`REG_A][3:0]} + {1'b0,tmp[3:0]} + {4'b0,registers[`REG_F][4]}) >> 4 == 1) ? 1'b1 : 1'b0, /* C */ (({1'b0,registers[`REG_A]} + {1'b0,tmp} + {8'b0,registers[`REG_F][4]}) >> 8 == 1) ? 1'b1 : 1'b0, registers[`REG_F][3:0] @@ -530,7 +535,7 @@ module GBZ80Core( registers[`REG_A] & tmp; registers[`REG_F] <= { /* Z */ ((registers[`REG_A] & tmp) == 0) ? 1'b1 : 1'b0, - 0,1,0, + 3'b010, registers[`REG_F][3:0] }; end @@ -539,7 +544,7 @@ module GBZ80Core( registers[`REG_A] | tmp; registers[`REG_F] <= { /* Z */ ((registers[`REG_A] | tmp) == 0) ? 1'b1 : 1'b0, - 0,0,0, + 3'b000, registers[`REG_F][3:0] }; end @@ -548,7 +553,7 @@ module GBZ80Core( registers[`REG_A] ^ tmp; registers[`REG_F] <= { /* Z */ ((registers[`REG_A] ^ tmp) == 0) ? 1'b1 : 1'b0, - 0,0,0, + 3'b000, registers[`REG_F][3:0] }; end @@ -557,6 +562,7 @@ module GBZ80Core( endcase end end + `INSN_NOP: begin /* NOP! */ end endcase state <= `STATE_FETCH; end -- 2.43.0