⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 spr16x16_16.s

📁 著名ARC模拟器源码,包括多个平台
💻 S
📖 第 1 页 / 共 3 页
字号:
#include "asmdefs.inc"CODE_SEG/******************************************************************************//*                                                                            *//*                         RAINE 16x16 TILE DRAWING                           *//*                                                                            *//******************************************************************************//*MappedTransparent MappedDirect-MappedTransparent Direct-Mapped*/FUNC(Draw16x16_Mapped_16)	pushl	%ebp	pushl	%edi	pushl	%esi	pushl	%ebx	movl	20(%esp),%esi			// source	movl	28(%esp),%eax			// y	movl	%esi,%edx	sall	$2,%eax	addl	$16*16,%edx			// tile end	movl	0xDEADBEEF(%eax),%ediblin_00:	movl	%edx,endc_00-4	movl	32(%esp),%ebp			// cmap	addl	24(%esp),%edi			// x	addl	24(%esp),%edi			// x	xorl	%edx,%edx	xorl	%ecx,%ecx	xorl	%ebx,%ebx	xorl	%eax,%eax9:	movb	(%edi),%dl	movb	(%esi),%al	movb	31(%edi),%cl	movb	4(%esi),%bl	movw	(%ebp,%eax,2),%cx	movw	(%ebp,%ebx,2),%dx	movw	%cx,(%edi)	movw	%dx,8(%edi)	movb	1(%esi),%al	movb	5(%esi),%bl	movw	(%ebp,%eax,2),%cx	movw	(%ebp,%ebx,2),%dx	movw	%cx,2(%edi)	movw	%dx,10(%edi)	movb	2(%esi),%al	movb	6(%esi),%bl	movw	(%ebp,%eax,2),%cx	movw	(%ebp,%ebx,2),%dx	movw	%cx,4(%edi)	movw	%dx,12(%edi)	movb	3(%esi),%al	movb	7(%esi),%bl	movw	(%ebp,%eax,2),%cx	movw	(%ebp,%ebx,2),%dx	movw	%cx,6(%edi)	movw	%dx,14(%edi)	movb	8(%esi),%al	movb	8+4(%esi),%bl	movw	(%ebp,%eax,2),%cx	movw	(%ebp,%ebx,2),%dx	movw	%cx,16(%edi)	movw	%dx,24(%edi)	movb	8+1(%esi),%al	movb	8+5(%esi),%bl	movw	(%ebp,%eax,2),%cx	movw	(%ebp,%ebx,2),%dx	movw	%cx,18(%edi)	movw	%dx,26(%edi)	movb	8+2(%esi),%al	movb	8+6(%esi),%bl	movw	(%ebp,%eax,2),%cx	movw	(%ebp,%ebx,2),%dx	movw	%cx,20(%edi)	movw	%dx,28(%edi)	movb	8+3(%esi),%al	movb	8+7(%esi),%bl	movw	(%ebp,%eax,2),%cx	movw	(%ebp,%ebx,2),%dx	movw	%cx,22(%edi)	movw	%dx,30(%edi)	addl	$16,%esi		// Next Tile Line	addl	$0xDEADBEEF,%edi	// Next Screen Linebitw_00:	cmp	$0xDEADBEEF,%esiendc_00:	jne	9b		popl	%ebx	popl	%esi	popl	%edi	popl	%ebp	retFUNC(Draw16x16_Mapped_16_FlipY)	pushl	%ebp	pushl	%edi	pushl	%esi	pushl	%ebx	movl	20(%esp),%esi			// source	movl	28(%esp),%eax			// y	movl	%esi,%edx	sall	$2,%eax	addl	$16*16,%edx			// tile end	movl	0xDEADBEEF(%eax),%ediblin_01:	movl	%edx,endc_01-4	movl	32(%esp),%ebp			// cmap	addl	24(%esp),%edi			// x	addl	24(%esp),%edi			// x	xorl	%edx,%edx	xorl	%ecx,%ecx	xorl	%ebx,%ebx	xorl	%eax,%eax9:	movb	(%esi),%al	movb	4(%esi),%bl	movw	(%ebp,%eax,2),%cx	movw	(%ebp,%ebx,2),%dx	movw	%cx,30(%edi)	movw	%dx,30-8(%edi)	movb	1(%esi),%al	movb	5(%esi),%bl	movw	(%ebp,%eax,2),%cx	movw	(%ebp,%ebx,2),%dx	movw	%cx,30-2(%edi)	movw	%dx,30-10(%edi)	movb	2(%esi),%al	movb	6(%esi),%bl	movw	(%ebp,%eax,2),%cx	movw	(%ebp,%ebx,2),%dx	movw	%cx,30-4(%edi)	movw	%dx,30-12(%edi)	movb	3(%esi),%al	movb	7(%esi),%bl	movw	(%ebp,%eax,2),%cx	movw	(%ebp,%ebx,2),%dx	movw	%cx,30-6(%edi)	movw	%dx,30-14(%edi)	movb	8(%esi),%al	movb	8+4(%esi),%bl	movw	(%ebp,%eax,2),%cx	movw	(%ebp,%ebx,2),%dx	movw	%cx,30-16(%edi)	movw	%dx,30-24(%edi)	movb	8+1(%esi),%al	movb	8+5(%esi),%bl	movw	(%ebp,%eax,2),%cx	movw	(%ebp,%ebx,2),%dx	movw	%cx,30-18(%edi)	movw	%dx,30-26(%edi)	movb	8+2(%esi),%al	movb	8+6(%esi),%bl	movw	(%ebp,%eax,2),%cx	movw	(%ebp,%ebx,2),%dx	movw	%cx,30-20(%edi)	movw	%dx,30-28(%edi)	movb	8+3(%esi),%al	movb	8+7(%esi),%bl	movw	(%ebp,%eax,2),%cx	movw	(%ebp,%ebx,2),%dx	movw	%cx,30-22(%edi)	movw	%dx,30-30(%edi)	addl	$16,%esi		// Next Tile Line	addl	$0xDEADBEEF,%edi	// Next Screen Linebitw_01:	cmp	$0xDEADBEEF,%esiendc_01:	jne	9b		popl	%ebx	popl	%esi	popl	%edi	popl	%ebp	retFUNC(Draw16x16_Mapped_16_FlipX)	pushl	%ebp	pushl	%edi	pushl	%esi	pushl	%ebx	movl	20(%esp),%esi			// source	movl	28(%esp),%eax			// y	movl	%esi,%edx	sall	$2,%eax	addl	$16*16,%edx			// tile end	movl	0xDEADBEEF(%eax),%ediblin_02:	movl	%edx,endc_02-4	movl	32(%esp),%ebp			// cmap	addl	24(%esp),%edi			// x	addl	24(%esp),%edi			// x	xorl	%edx,%edx	xorl	%ecx,%ecx	xorl	%ebx,%ebx	xorl	%eax,%eax9:	movb	(%esi),%al	movb	4(%esi),%bl	movw	(%ebp,%eax,2),%cx	movw	(%ebp,%ebx,2),%dx	movw	%cx,(%edi)	movw	%dx,8(%edi)	movb	1(%esi),%al	movb	5(%esi),%bl	movw	(%ebp,%eax,2),%cx	movw	(%ebp,%ebx,2),%dx	movw	%cx,2(%edi)	movw	%dx,10(%edi)	movb	2(%esi),%al	movb	6(%esi),%bl	movw	(%ebp,%eax,2),%cx	movw	(%ebp,%ebx,2),%dx	movw	%cx,4(%edi)	movw	%dx,12(%edi)	movb	3(%esi),%al	movb	7(%esi),%bl	movw	(%ebp,%eax,2),%cx	movw	(%ebp,%ebx,2),%dx	movw	%cx,6(%edi)	movw	%dx,14(%edi)	movb	8(%esi),%al	movb	8+4(%esi),%bl	movw	(%ebp,%eax,2),%cx	movw	(%ebp,%ebx,2),%dx	movw	%cx,16(%edi)	movw	%dx,24(%edi)	movb	8+1(%esi),%al	movb	8+5(%esi),%bl	movw	(%ebp,%eax,2),%cx	movw	(%ebp,%ebx,2),%dx	movw	%cx,18(%edi)	movw	%dx,26(%edi)	movb	8+2(%esi),%al	movb	8+6(%esi),%bl	movw	(%ebp,%eax,2),%cx	movw	(%ebp,%ebx,2),%dx	movw	%cx,20(%edi)	movw	%dx,28(%edi)	movb	8+3(%esi),%al	movb	8+7(%esi),%bl	movw	(%ebp,%eax,2),%cx	movw	(%ebp,%ebx,2),%dx	movw	%cx,22(%edi)	movw	%dx,30(%edi)	addl	$16,%esi		// Next Tile Line	subl	$0xDEADBEEF,%edi	// Next Screen Linebitw_02:	cmp	$0xDEADBEEF,%esiendc_02:	jne	9b		popl	%ebx	popl	%esi	popl	%edi	popl	%ebp	retFUNC(Draw16x16_Mapped_16_FlipXY)	pushl	%ebp	pushl	%edi	pushl	%esi	pushl	%ebx	movl	20(%esp),%esi			// source	movl	28(%esp),%eax			// y	movl	%esi,%edx	sall	$2,%eax	addl	$16*16,%edx			// tile end	movl	0xDEADBEEF(%eax),%ediblin_03:	movl	%edx,endc_03-4	movl	32(%esp),%ebp			// cmap	addl	24(%esp),%edi			// x	addl	24(%esp),%edi			// x	xorl	%edx,%edx	xorl	%ecx,%ecx	xorl	%ebx,%ebx	xorl	%eax,%eax9:	movb	(%esi),%al	movb	4(%esi),%bl	movw	(%ebp,%eax,2),%cx	movw	(%ebp,%ebx,2),%dx	movw	%cx,30(%edi)	movw	%dx,30-8(%edi)	movb	1(%esi),%al	movb	5(%esi),%bl	movw	(%ebp,%eax,2),%cx	movw	(%ebp,%ebx,2),%dx	movw	%cx,30-2(%edi)	movw	%dx,30-10(%edi)	movb	2(%esi),%al	movb	6(%esi),%bl	movw	(%ebp,%eax,2),%cx	movw	(%ebp,%ebx,2),%dx	movw	%cx,30-4(%edi)	movw	%dx,30-12(%edi)	movb	3(%esi),%al	movb	7(%esi),%bl	movw	(%ebp,%eax,2),%cx	movw	(%ebp,%ebx,2),%dx	movw	%cx,30-6(%edi)	movw	%dx,30-14(%edi)	movb	8(%esi),%al	movb	8+4(%esi),%bl	movw	(%ebp,%eax,2),%cx	movw	(%ebp,%ebx,2),%dx	movw	%cx,30-16(%edi)	movw	%dx,30-24(%edi)	movb	8+1(%esi),%al	movb	8+5(%esi),%bl	movw	(%ebp,%eax,2),%cx	movw	(%ebp,%ebx,2),%dx	movw	%cx,30-18(%edi)	movw	%dx,30-26(%edi)	movb	8+2(%esi),%al	movb	8+6(%esi),%bl	movw	(%ebp,%eax,2),%cx	movw	(%ebp,%ebx,2),%dx	movw	%cx,30-20(%edi)	movw	%dx,30-28(%edi)	movb	8+3(%esi),%al	movb	8+7(%esi),%bl	movw	(%ebp,%eax,2),%cx	movw	(%ebp,%ebx,2),%dx	movw	%cx,30-22(%edi)	movw	%dx,30-30(%edi)	addl	$16,%esi		// Next Tile Line	subl	$0xDEADBEEF,%edi	// Next Screen Linebitw_03:	cmp	$0xDEADBEEF,%esiendc_03:	jne	9b		popl	%ebx	popl	%esi	popl	%edi	popl	%ebp	retFUNC(Draw16x16_Trans_Mapped_16)	pushl	%ebp	pushl	%edi	pushl	%esi	pushl	%ebx	movl	20(%esp),%esi			// source	movl	28(%esp),%eax			// y	movl	%esi,%edx	sall	$2,%eax	addl	$16*16,%edx			// tile end	movl	0xDEADBEEF(%eax),%ediblin_04:	movl	%edx,endc_04-4	movl	32(%esp),%ebp			// cmap	addl	24(%esp),%edi			// x	addl	24(%esp),%edi			// x	xorl	%edx,%edx	xorl	%ecx,%ecx	xorl	%ebx,%ebx	xorl	%eax,%eax9:	movb	(%esi),%al	movb	4(%esi),%bl	testb	%al,%al	jz	7f	movw	(%ebp,%eax,2),%cx	movw	%cx,(%edi)7:	testb	%bl,%bl	jz	7f	movw	(%ebp,%ebx,2),%dx	movw	%dx,8(%edi)7:	movb	1(%esi),%al	movb	5(%esi),%bl	testb	%al,%al	jz	7f	movw	(%ebp,%eax,2),%cx	movw	%cx,2(%edi)7:	testb	%bl,%bl	jz	7f	movw	(%ebp,%ebx,2),%dx	movw	%dx,10(%edi)7:	movb	2(%esi),%al	movb	6(%esi),%bl	testb	%al,%al	jz	7f	movw	(%ebp,%eax,2),%cx	movw	%cx,4(%edi)7:	testb	%bl,%bl	jz	7f	movw	(%ebp,%ebx,2),%dx	movw	%dx,12(%edi)7:	movb	3(%esi),%al	movb	7(%esi),%bl	testb	%al,%al	jz	7f	movw	(%ebp,%eax,2),%cx	movw	%cx,6(%edi)7:	testb	%bl,%bl	jz	7f	movw	(%ebp,%ebx,2),%dx	movw	%dx,14(%edi)7:	movb	8(%esi),%al	movb	8+4(%esi),%bl	testb	%al,%al	jz	7f	movw	(%ebp,%eax,2),%cx	movw	%cx,16(%edi)7:	testb	%bl,%bl	jz	7f	movw	(%ebp,%ebx,2),%dx	movw	%dx,24(%edi)7:	movb	8+1(%esi),%al	movb	8+5(%esi),%bl	testb	%al,%al	jz	7f	movw	(%ebp,%eax,2),%cx	movw	%cx,18(%edi)7:	testb	%bl,%bl	jz	7f	movw	(%ebp,%ebx,2),%dx	movw	%dx,26(%edi)7:	movb	8+2(%esi),%al	movb	8+6(%esi),%bl	testb	%al,%al	jz	7f	movw	(%ebp,%eax,2),%cx	movw	%cx,20(%edi)7:	testb	%bl,%bl	jz	7f	movw	(%ebp,%ebx,2),%dx	movw	%dx,28(%edi)7:	movb	8+3(%esi),%al	movb	8+7(%esi),%bl	testb	%al,%al	jz	7f	movw	(%ebp,%eax,2),%cx	movw	%cx,22(%edi)7:	testb	%bl,%bl	jz	7f	movw	(%ebp,%ebx,2),%dx	movw	%dx,30(%edi)7:	addl	$16,%esi		// Next Tile Line	addl	$0xDEADBEEF,%edi	// Next Screen Linebitw_04:	cmp	$0xDEADBEEF,%esiendc_04:	jne	9b		popl	%ebx	popl	%esi	popl	%edi	popl	%ebp	retFUNC(Draw16x16_Trans_Mapped_16_FlipY)	pushl	%ebp	pushl	%edi	pushl	%esi	pushl	%ebx	movl	20(%esp),%esi			// source	movl	28(%esp),%eax			// y	movl	%esi,%edx	sall	$2,%eax	addl	$16*16,%edx			// tile end	movl	0xDEADBEEF(%eax),%ediblin_05:	movl	%edx,endc_05-4	movl	32(%esp),%ebp			// cmap	addl	24(%esp),%edi			// x	addl	24(%esp),%edi			// x	xorl	%edx,%edx	xorl	%ecx,%ecx	xorl	%ebx,%ebx	xorl	%eax,%eax9:	movb	(%esi),%al	movb	4(%esi),%bl	testb	%al,%al	jz	7f	movw	(%ebp,%eax,2),%cx	movw	%cx,30(%edi)7:	testb	%bl,%bl	jz	7f	movw	(%ebp,%ebx,2),%dx	movw	%dx,30-8(%edi)7:	movb	1(%esi),%al	movb	5(%esi),%bl	testb	%al,%al	jz	7f	movw	(%ebp,%eax,2),%cx	movw	%cx,30-2(%edi)7:	testb	%bl,%bl	jz	7f	movw	(%ebp,%ebx,2),%dx	movw	%dx,30-10(%edi)7:	movb	2(%esi),%al	movb	6(%esi),%bl	testb	%al,%al	jz	7f	movw	(%ebp,%eax,2),%cx	movw	%cx,30-4(%edi)7:	testb	%bl,%bl	jz	7f	movw	(%ebp,%ebx,2),%dx	movw	%dx,30-12(%edi)7:	movb	3(%esi),%al	movb	7(%esi),%bl	testb	%al,%al	jz	7f	movw	(%ebp,%eax,2),%cx	movw	%cx,30-6(%edi)7:	testb	%bl,%bl	jz	7f	movw	(%ebp,%ebx,2),%dx	movw	%dx,30-14(%edi)7:	movb	8(%esi),%al	movb	8+4(%esi),%bl	testb	%al,%al	jz	7f	movw	(%ebp,%eax,2),%cx	movw	%cx,30-16(%edi)7:	testb	%bl,%bl	jz	7f	movw	(%ebp,%ebx,2),%dx	movw	%dx,30-24(%edi)7:	movb	8+1(%esi),%al	movb	8+5(%esi),%bl	testb	%al,%al	jz	7f	movw	(%ebp,%eax,2),%cx	movw	%cx,30-18(%edi)7:	testb	%bl,%bl	jz	7f	movw	(%ebp,%ebx,2),%dx	movw	%dx,30-26(%edi)7:	movb	8+2(%esi),%al	movb	8+6(%esi),%bl	testb	%al,%al	jz	7f	movw	(%ebp,%eax,2),%cx	movw	%cx,30-20(%edi)7:	testb	%bl,%bl	jz	7f	movw	(%ebp,%ebx,2),%dx	movw	%dx,30-28(%edi)7:	movb	8+3(%esi),%al	movb	8+7(%esi),%bl	testb	%al,%al	jz	7f	movw	(%ebp,%eax,2),%cx	movw	%cx,30-22(%edi)7:	testb	%bl,%bl	jz	7f	movw	(%ebp,%ebx,2),%dx	movw	%dx,30-30(%edi)7:	addl	$16,%esi		// Next Tile Line	addl	$0xDEADBEEF,%edi	// Next Screen Linebitw_05:	cmp	$0xDEADBEEF,%esiendc_05:	jne	9b		popl	%ebx	popl	%esi	popl	%edi	popl	%ebp	retFUNC(Draw16x16_Trans_Mapped_16_FlipX)	pushl	%ebp	pushl	%edi	pushl	%esi	pushl	%ebx	movl	20(%esp),%esi			// source	movl	28(%esp),%eax			// y	movl	%esi,%edx	sall	$2,%eax	addl	$16*16,%edx			// tile end	movl	0xDEADBEEF(%eax),%ediblin_06:	movl	%edx,endc_06-4	movl	32(%esp),%ebp			// cmap	addl	24(%esp),%edi			// x	addl	24(%esp),%edi			// x	xorl	%edx,%edx	xorl	%ecx,%ecx	xorl	%ebx,%ebx	xorl	%eax,%eax9:	movb	(%esi),%al	movb	4(%esi),%bl	testb	%al,%al	jz	7f	movw	(%ebp,%eax,2),%cx	movw	%cx,(%edi)7:	testb	%bl,%bl	jz	7f	movw	(%ebp,%ebx,2),%dx	movw	%dx,8(%edi)7:	movb	1(%esi),%al	movb	5(%esi),%bl	testb	%al,%al	jz	7f	movw	(%ebp,%eax,2),%cx	movw	%cx,2(%edi)7:	testb	%bl,%bl	jz	7f	movw	(%ebp,%ebx,2),%dx	movw	%dx,10(%edi)7:	movb	2(%esi),%al	movb	6(%esi),%bl	testb	%al,%al	jz	7f	movw	(%ebp,%eax,2),%cx	movw	%cx,4(%edi)7:	testb	%bl,%bl	jz	7f	movw	(%ebp,%ebx,2),%dx	movw	%dx,12(%edi)7:	movb	3(%esi),%al	movb	7(%esi),%bl	testb	%al,%al	jz	7f	movw	(%ebp,%eax,2),%cx	movw	%cx,6(%edi)7:	testb	%bl,%bl	jz	7f	movw	(%ebp,%ebx,2),%dx	movw	%dx,14(%edi)7:	movb	8(%esi),%al	movb	8+4(%esi),%bl	testb	%al,%al	jz	7f	movw	(%ebp,%eax,2),%cx	movw	%cx,16(%edi)7:	testb	%bl,%bl	jz	7f	movw	(%ebp,%ebx,2),%dx	movw	%dx,24(%edi)7:	movb	8+1(%esi),%al	movb	8+5(%esi),%bl	testb	%al,%al	jz	7f	movw	(%ebp,%eax,2),%cx	movw	%cx,18(%edi)7:	testb	%bl,%bl	jz	7f	movw	(%ebp,%ebx,2),%dx	movw	%dx,26(%edi)7:	movb	8+2(%esi),%al	movb	8+6(%esi),%bl	testb	%al,%al	jz	7f	movw	(%ebp,%eax,2),%cx	movw	%cx,20(%edi)7:	testb	%bl,%bl	jz	7f	movw	(%ebp,%ebx,2),%dx	movw	%dx,28(%edi)7:	movb	8+3(%esi),%al	movb	8+7(%esi),%bl	testb	%al,%al	jz	7f	movw	(%ebp,%eax,2),%cx	movw	%cx,22(%edi)7:	testb	%bl,%bl	jz	7f	movw	(%ebp,%ebx,2),%dx	movw	%dx,30(%edi)7:	addl	$16,%esi		// Next Tile Line	subl	$0xDEADBEEF,%edi	// Next Screen Linebitw_06:	cmp	$0xDEADBEEF,%esiendc_06:	jne	9b		popl	%ebx	popl	%esi	popl	%edi	popl	%ebp	retFUNC(Draw16x16_Trans_Mapped_16_FlipXY)	pushl	%ebp	pushl	%edi	pushl	%esi	pushl	%ebx	movl	20(%esp),%esi			// source	movl	28(%esp),%eax			// y	movl	%esi,%edx	sall	$2,%eax	addl	$16*16,%edx			// tile end

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -