From d0c386e4ad6165607a73dcbb6557d76a290edb1c Mon Sep 17 00:00:00 2001 From: n-a-c-h <> Date: Sun, 8 Jun 2003 03:56:30 +0000 Subject: [PATCH] Improved C4 Op 13 even more (thanks TRAC) --- zsnes/src/cpu/memory.asm | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/zsnes/src/cpu/memory.asm b/zsnes/src/cpu/memory.asm index 2460263e..6504037f 100644 --- a/zsnes/src/cpu/memory.asm +++ b/zsnes/src/cpu/memory.asm @@ -2194,29 +2194,27 @@ C4activate: popad ret .polarcord2 - pushad +pushad mov esi,[C4Ram] - xor eax,eax xor ecx,ecx mov cx,[esi+1F80h] and ecx,1FFh + movsx eax,word[esi+1F83h] + add eax,eax movsx ebx,word[CosTable+ecx*2] - mov ax,[esi+1F83h] - add ebx,ebx - imul eax,ebx - sar eax,8 - mov [esi+1F86h],ax - sar eax,16 - mov [esi+1F88h],al - xor eax,eax + imul ebx,eax + sar ebx,8 + adc ebx,0 + mov [esi+1F86h],bx + sar ebx,16 + mov [esi+1F88h],bl movsx ebx,word[SinTable+ecx*2] - mov ax,[esi+1F83h] - add ebx,ebx - imul eax,ebx - sar eax,8 - mov [esi+1F89h],ax - sar eax,16 - mov [esi+1F8Bh],al + imul ebx,eax + sar ebx,8 + adc ebx,0 + mov [esi+1F89h],bx + sar ebx,16 + mov [esi+1F8Bh],bl popad ret .dosprites