GhostDog wrote:A temporary fix for the Street Fighter freaks: It was mentioned here that if you don't press any buttons during the score count SF will not freeze.Well,that is not enough.IF you beat an opponent with a perfect score(full energy bar)the score loop bug occurs.So,to play SF without freezing,you mustn't press the keys during the score count,you mustn't win with a perfect score(give your opponents a free shot once in a while ) and you mustn't finish the bonus stages(the car and the barrels).
or i could just fix ABCD and SBCD of course 😊
I think one the flags isn't getting set when the 99 wraps round, or the 00 wraps round to 99 - Rolling Thunder and SOV do it as well...
This is the offending ABCD/SBCD opcode, anyone who knows how to program can you see anything wrong with the flag calculation?
<pre><tt>
// --------------------- Opcodes 0x8100+ ---------------------
// 1t00ddd1 0000asss - sbcd/abcd Ds,Dd or -(As),-(Ad)
int OpAbcd(int op)
{
int use=0;
int type=0,sea=0,addr=0,dea=0;
type=(op>>14)&1;
dea =(op>> 9)&7;
addr=(op>> 3)&1;
sea = op &7;
if (addr) { sea|=0x20; dea|=0x20; }
use=op&~0x0e07; // Use same opcode for all registers
if (op!=use) { OpUse(op,use); return 0; } // Use existing handler
OpStart(op); Cycles=6;
EaCalc( 0,0x0007, sea,0);
EaRead( 0, 10, sea,0,1);
EaCalc(11,0x0e00, dea,0);
EaRead(11, 1, dea,0,1);
ot(" ldrb r2,[r7,#0x45] ;@ Get X bit\n"😉;
ot(" tst r2,#2\n"😉;
ot(" addne r10,r10,#0x01000000 ;@ Add carry bit\n"😉;
if (type)
{
ot(";@ Add units into r2:\n"😉;
ot(" and r2,r1, #0x0f000000\n"😉;
ot(" and r0,r10,#0x0f000000\n"😉;
ot(" add r2,r2,r0\n"😉;
ot(" cmp r2,#0x0a000000\n"😉;
ot(" addpl r1,r1,#0x06000000 ;@ Decimal adjust units\n"😉;
ot(" add r1,r1,r10 ;@ Add BCD\n"😉;
ot(" mov r0,r1,lsr #24\n"😉;
ot(" cmp r0,#0xa0\n"😉;
ot(" addpl r1,r1,#0x60000000 ;@ Decimal adjust tens\n"😉;
OpGetFlags(0,1);
}
else
{
ot(";@ Sub units into r2:\n"😉;
ot(" and r2,r1, #0x0f000000\n"😉;
ot(" and r0,r10,#0x0f000000\n"😉;
ot(" subs r2,r2,r0\n"😉;
ot(" submi r1,r1,#0x06000000 ;@ Decimal adjust units\n"😉;
ot(" subs r1,r1,r10 ;@ Subtract BCD\n"😉;
ot(" submi r1,r1,#0x60000000 ;@ Decimal adjust tens\n"😉;
OpGetFlags(1,1);
}
ot("\n"😉;
EaWrite(11, 1, dea,0,1);
OpEnd();
return 0;
}
</tt></pre>