diff --git a/utils/gr-sim/dots/dots_6502.c b/utils/gr-sim/dots/dots_6502.c index 715ba277..e1d6c436 100644 --- a/utils/gr-sim/dots/dots_6502.c +++ b/utils/gr-sim/dots/dots_6502.c @@ -12,8 +12,6 @@ #define MAXDOTS 256 -//#define SKIP 2 - static short gravitybottom; static short gravity=0; static short gravityd=16; @@ -26,16 +24,21 @@ static short dot_yadd[MAXDOTS]; static short rotsin=0; static short rotcos=0; + + static void drawdots(void) { int temp32; int transx,transz; unsigned short ball_x,ball_y,shadow_y; unsigned short d,sc,newy; - unsigned short ax,bx,cx,dx; + unsigned short ax; short signed_ax; for(d=0;d>=8; -#if 1 - ax=temp32&0xffff; - dx=(temp32>>16)&0xffff; - bx=ax; - cx=dx; // mov cx,dx - - ax=(ax>>3)|(dx<<13); // shrd ax,dx,3 - - signed_ax=dx; - dx=signed_ax>>3; - - temp32=temp32>>3; - ax=temp32&0xffff; - dx=(temp32>>16)&0xffff; - - temp32=ax+bx; // add ax,bx - ax=ax+bx; - dx=dx+cx; // adc dx,cx - if (temp32&(1<<16)) dx=dx+1; - - temp32=(dx<<16)|(ax&0xffff); -#else temp32=temp32+(temp32>>3); -#endif + ball_x=(temp32/sc)/8; + /* center */ ball_x+=20; - /* if off end of screen, no need for shadow */ if (ball_x>39) continue;