Removed superfluous ^Z at the end of files

This commit is contained in:
teuf
2001-04-05 13:27:14 +00:00
parent dffb25d0ef
commit 5cbbb9d4da
143 changed files with 184758 additions and 184882 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,409 +1,408 @@
;Copyright (C) 1997-2001 ZSNES Team ( zsknight@zsnes.com / _demo_@zsnes.com )
;
;This program is free software; you can redistribute it and/or
;modify it under the terms of the GNU General Public License
;as published by the Free Software Foundation; either
;version 2 of the License, or (at your option) any later
;version.
;
;This program is distributed in the hope that it will be useful,
;but WITHOUT ANY WARRANTY; without even the implied warranty of
;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;GNU General Public License for more details.
;
;You should have received a copy of the GNU General Public License
;along with this program; if not, write to the Free Software
;Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
;*******************************************************
; Address Modes
;*******************************************************
; 1. Immediate Addressing -- # - DONE IN PROGRAM
%macro addr_I_8brni 0
mov al,[esi]
%endmacro
%macro addr_I_16brni 0
mov ax,[esi]
%endmacro
; 2. Absolute -- a (TESTED)
%macro addr_a_8brni 0
mov cx,[esi]
mov bl,[xdb]
call dword near [memtabler8+ebx*4]
%endmacro
%macro addr_a_16brni 0
mov cx,[esi]
mov bl,[xdb]
call dword near [memtabler16+ebx*4]
%endmacro
; 3. Absolute Long -- al
%macro addr_al_8brni 0
mov cx,[esi]
mov bl,[esi+2]
call dword near [memtabler8+ebx*4]
%endmacro
%macro addr_al_16brni 0
mov cx,[esi]
mov bl,[esi+2]
call dword near [memtabler16+ebx*4]
%endmacro
; 4. Direct -- d (TESTED)
%macro addr_d_8brni 0
mov bl,[esi]
mov ecx,[xd]
call dword near [DPageR8]
%endmacro
%macro addr_d_16brni 0
mov bl,[esi]
mov ecx,[xd]
call dword near [DPageR16]
%endmacro
; 5. Accumulator -- A
%macro addr_A_8brni 0
mov al,[xa]
%endmacro
%macro addr_A_16brni 0
mov ax,[xa]
%endmacro
; 7. Direct Indirect Indexed -- (d),y
%macro addr_BdBCy_8brni 0
mov bl,[esi]
mov ecx,[xd]
call dword near [DPageR16]
mov cx,ax
mov bl,[xdb]
add cx,[xy]
jnc .npb
inc bl
.npb
call dword near [memtabler8+ebx*4]
%endmacro
%macro addr_BdBCy_16brni 0
mov bl,[esi]
mov ecx,[xd]
call dword near [DPageR16]
mov cx,ax
mov bl,[xdb]
add cx,[xy]
jnc .npb
inc bl
.npb
call dword near [memtabler16+ebx*4]
%endmacro
; 8. Direct Indirect Indexed Long -- [d],y
%macro addr_LdLCy_8brni 0
mov ecx,[xd]
mov bl,[esi]
add cx,bx
push cx
call membank0r16
pop cx
add cx,2
push ax
call membank0r8
mov bl,al
pop ax
mov cx,ax
add cx,[xy]
jnc .npb
inc bl
.npb
call dword near [memtabler8+ebx*4]
%endmacro
%macro addr_LdLCy_16brni 0
mov ecx,[xd]
mov bl,[esi]
add cx,bx
push cx
call membank0r16
pop cx
add cx,2
push ax
call membank0r8
mov bl,al
pop ax
mov cx,ax
add cx,[xy]
jnc .npb
inc bl
.npb
call dword near [memtabler16+ebx*4]
%endmacro
; 9. Direct Indexed Indirect -- (d,x)
%macro addr_BdCxB_8brni 0
mov ecx,[xd]
mov bl,[esi]
add cx,bx
add cx,[xx]
call membank0r16
mov cx,ax
mov bl,[xdb]
call dword near [memtabler8+ebx*4]
%endmacro
%macro addr_BdCxB_16brni 0
mov ecx,[xd]
mov bl,[esi]
add cx,bx
add cx,[xx]
call membank0r16
mov cx,ax
mov bl,[xdb]
call dword near [memtabler16+ebx*4]
%endmacro
; 10. Direct Indexed With X -- d,x
%macro addr_dCx_8brni 0
mov ecx,[xd]
mov bl,[esi]
add cx,bx
add cx,[xx]
call membank0r8
%endmacro
%macro addr_dCx_16brni 0
mov ecx,[xd]
mov bl,[esi]
add cx,bx
add cx,[xx]
call membank0r16
%endmacro
; 11. Direct Indexed With Y -- d,y
%macro addr_dCy_8brni 0
mov ecx,[xd]
mov bl,[esi]
add cx,bx
add cx,[xy]
call membank0r8
%endmacro
%macro addr_dCy_16brni 0
mov ecx,[xd]
mov bl,[esi]
add cx,bx
add cx,[xy]
call membank0r16
%endmacro
; 12. Absolute Indexed With X -- a,x
%macro addr_aCx_8brni 0
mov cx,[esi]
mov bl,[xdb]
add cx,[xx]
jnc .npb
inc bl
.npb
call dword near [memtabler8+ebx*4]
%endmacro
%macro addr_aCx_16brni 0
mov cx,[esi]
mov bl,[xdb]
add cx,[xx]
jnc .npb
inc bl
.npb
call dword near [memtabler16+ebx*4]
%endmacro
; 13. Absolute Indexed With Y -- a,y
%macro addr_aCy_8brni 0
mov cx,[esi]
mov bl,[xdb]
add cx,[xy]
jnc .npb
inc bl
.npb
call dword near [memtabler8+ebx*4]
%endmacro
%macro addr_aCy_16brni 0
mov cx,[esi]
mov bl,[xdb]
add cx,[xy]
jnc .npb
inc bl
.npb
call dword near [memtabler16+ebx*4]
%endmacro
; 14. Absolute Long Indexed With X -- al,x
%macro addr_alCx_8brni 0
mov cx,[esi]
mov bl,[esi+2]
add cx,[xx]
jnc .npb
inc bl
.npb
call dword near [memtabler8+ebx*4]
%endmacro
%macro addr_alCx_16brni 0
mov cx,[esi]
mov bl,[esi+2]
add cx,[xx]
jnc .npb
inc bl
.npb
call dword near [memtabler16+ebx*4]
%endmacro
; 18. Direct Indirect -- (d)
; ___________________
; Instruction: | opcode | offset |
; ~~~~~~~~~~~~~~~~~~~
; | Direct Register |
; + | offset |
; ---------------------
; | 00 | direct address |
; then:
; | 00 | (direct address) |
; + | DB |
; -------------------------------
; Address: | effective address |
%macro addr_BdB_8brni 0
mov bl,[esi]
mov ecx,[xd]
call dword near [DPageR16]
mov cx,ax
mov bl,[xdb]
call dword near [memtabler8+ebx*4]
%endmacro
%macro addr_BdB_16brni 0
mov bl,[esi]
mov ecx,[xd]
call dword near [DPageR16]
mov cx,ax
mov bl,[xdb]
call dword near [memtabler16+ebx*4]
%endmacro
; 19. Direct Indirect Long -- [d]
; ___________________
; Instruction: | opcode | offset |
; ~~~~~~~~~~~~~~~~~~~
; | Direct Register |
; + | offset |
; ---------------------
; | 00 | direct address |
; then:
; -------------------------------
; Address: | (direct address) |
%macro addr_LdL_8brni 0
mov bl,[esi]
mov ecx,[xd]
add cx,bx
push cx
call membank0r16
pop cx
add cx,2
push ax
call membank0r8
mov bl,al
pop ax
mov cx,ax
call dword near [memtabler8+ebx*4]
%endmacro
%macro addr_LdL_16brni 0
mov bl,[esi]
mov ecx,[xd]
add cx,bx
push cx
call membank0r16
pop cx
add cx,2
push ax
call membank0r8
mov bl,al
pop ax
mov cx,ax
call dword near [memtabler16+ebx*4]
%endmacro
; 22. Stack Relative -- d,s
%macro addr_dCs_8brni 0
mov bl,[esi]
mov cx,[xs]
add cx,bx
call membank0r8
%endmacro
%macro addr_dCs_16brni 0
mov bl,[esi]
mov cx,[xs]
add cx,bx
call membank0r16
%endmacro
; 23. Stack Relative Indirect Indexed -- (d,s),y (TESTED)
%macro addr_BdCsBCy_8brni 0
mov bl,[esi]
mov cx,[xs]
add cx,bx
call membank0r16
mov cx,ax
mov bl,[xdb]
add cx,[xy]
jnc .npb
inc bl
.npb
call dword near [memtabler8+ebx*4]
%endmacro
%macro addr_BdCsBCy_16brni 0
mov bl,[esi]
mov cx,[xs]
add cx,bx
call membank0r16
mov cx,ax
mov bl,[xdb]
add cx,[xy]
jnc .npb
inc bl
.npb
call dword near [memtabler16+ebx*4]
%endmacro

;Copyright (C) 1997-2001 ZSNES Team ( zsknight@zsnes.com / _demo_@zsnes.com )
;
;This program is free software; you can redistribute it and/or
;modify it under the terms of the GNU General Public License
;as published by the Free Software Foundation; either
;version 2 of the License, or (at your option) any later
;version.
;
;This program is distributed in the hope that it will be useful,
;but WITHOUT ANY WARRANTY; without even the implied warranty of
;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;GNU General Public License for more details.
;
;You should have received a copy of the GNU General Public License
;along with this program; if not, write to the Free Software
;Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
;*******************************************************
; Address Modes
;*******************************************************
; 1. Immediate Addressing -- # - DONE IN PROGRAM
%macro addr_I_8brni 0
mov al,[esi]
%endmacro
%macro addr_I_16brni 0
mov ax,[esi]
%endmacro
; 2. Absolute -- a (TESTED)
%macro addr_a_8brni 0
mov cx,[esi]
mov bl,[xdb]
call dword near [memtabler8+ebx*4]
%endmacro
%macro addr_a_16brni 0
mov cx,[esi]
mov bl,[xdb]
call dword near [memtabler16+ebx*4]
%endmacro
; 3. Absolute Long -- al
%macro addr_al_8brni 0
mov cx,[esi]
mov bl,[esi+2]
call dword near [memtabler8+ebx*4]
%endmacro
%macro addr_al_16brni 0
mov cx,[esi]
mov bl,[esi+2]
call dword near [memtabler16+ebx*4]
%endmacro
; 4. Direct -- d (TESTED)
%macro addr_d_8brni 0
mov bl,[esi]
mov ecx,[xd]
call dword near [DPageR8]
%endmacro
%macro addr_d_16brni 0
mov bl,[esi]
mov ecx,[xd]
call dword near [DPageR16]
%endmacro
; 5. Accumulator -- A
%macro addr_A_8brni 0
mov al,[xa]
%endmacro
%macro addr_A_16brni 0
mov ax,[xa]
%endmacro
; 7. Direct Indirect Indexed -- (d),y
%macro addr_BdBCy_8brni 0
mov bl,[esi]
mov ecx,[xd]
call dword near [DPageR16]
mov cx,ax
mov bl,[xdb]
add cx,[xy]
jnc .npb
inc bl
.npb
call dword near [memtabler8+ebx*4]
%endmacro
%macro addr_BdBCy_16brni 0
mov bl,[esi]
mov ecx,[xd]
call dword near [DPageR16]
mov cx,ax
mov bl,[xdb]
add cx,[xy]
jnc .npb
inc bl
.npb
call dword near [memtabler16+ebx*4]
%endmacro
; 8. Direct Indirect Indexed Long -- [d],y
%macro addr_LdLCy_8brni 0
mov ecx,[xd]
mov bl,[esi]
add cx,bx
push cx
call membank0r16
pop cx
add cx,2
push ax
call membank0r8
mov bl,al
pop ax
mov cx,ax
add cx,[xy]
jnc .npb
inc bl
.npb
call dword near [memtabler8+ebx*4]
%endmacro
%macro addr_LdLCy_16brni 0
mov ecx,[xd]
mov bl,[esi]
add cx,bx
push cx
call membank0r16
pop cx
add cx,2
push ax
call membank0r8
mov bl,al
pop ax
mov cx,ax
add cx,[xy]
jnc .npb
inc bl
.npb
call dword near [memtabler16+ebx*4]
%endmacro
; 9. Direct Indexed Indirect -- (d,x)
%macro addr_BdCxB_8brni 0
mov ecx,[xd]
mov bl,[esi]
add cx,bx
add cx,[xx]
call membank0r16
mov cx,ax
mov bl,[xdb]
call dword near [memtabler8+ebx*4]
%endmacro
%macro addr_BdCxB_16brni 0
mov ecx,[xd]
mov bl,[esi]
add cx,bx
add cx,[xx]
call membank0r16
mov cx,ax
mov bl,[xdb]
call dword near [memtabler16+ebx*4]
%endmacro
; 10. Direct Indexed With X -- d,x
%macro addr_dCx_8brni 0
mov ecx,[xd]
mov bl,[esi]
add cx,bx
add cx,[xx]
call membank0r8
%endmacro
%macro addr_dCx_16brni 0
mov ecx,[xd]
mov bl,[esi]
add cx,bx
add cx,[xx]
call membank0r16
%endmacro
; 11. Direct Indexed With Y -- d,y
%macro addr_dCy_8brni 0
mov ecx,[xd]
mov bl,[esi]
add cx,bx
add cx,[xy]
call membank0r8
%endmacro
%macro addr_dCy_16brni 0
mov ecx,[xd]
mov bl,[esi]
add cx,bx
add cx,[xy]
call membank0r16
%endmacro
; 12. Absolute Indexed With X -- a,x
%macro addr_aCx_8brni 0
mov cx,[esi]
mov bl,[xdb]
add cx,[xx]
jnc .npb
inc bl
.npb
call dword near [memtabler8+ebx*4]
%endmacro
%macro addr_aCx_16brni 0
mov cx,[esi]
mov bl,[xdb]
add cx,[xx]
jnc .npb
inc bl
.npb
call dword near [memtabler16+ebx*4]
%endmacro
; 13. Absolute Indexed With Y -- a,y
%macro addr_aCy_8brni 0
mov cx,[esi]
mov bl,[xdb]
add cx,[xy]
jnc .npb
inc bl
.npb
call dword near [memtabler8+ebx*4]
%endmacro
%macro addr_aCy_16brni 0
mov cx,[esi]
mov bl,[xdb]
add cx,[xy]
jnc .npb
inc bl
.npb
call dword near [memtabler16+ebx*4]
%endmacro
; 14. Absolute Long Indexed With X -- al,x
%macro addr_alCx_8brni 0
mov cx,[esi]
mov bl,[esi+2]
add cx,[xx]
jnc .npb
inc bl
.npb
call dword near [memtabler8+ebx*4]
%endmacro
%macro addr_alCx_16brni 0
mov cx,[esi]
mov bl,[esi+2]
add cx,[xx]
jnc .npb
inc bl
.npb
call dword near [memtabler16+ebx*4]
%endmacro
; 18. Direct Indirect -- (d)
; ___________________
; Instruction: | opcode | offset |
; ~~~~~~~~~~~~~~~~~~~
; | Direct Register |
; + | offset |
; ---------------------
; | 00 | direct address |
; then:
; | 00 | (direct address) |
; + | DB |
; -------------------------------
; Address: | effective address |
%macro addr_BdB_8brni 0
mov bl,[esi]
mov ecx,[xd]
call dword near [DPageR16]
mov cx,ax
mov bl,[xdb]
call dword near [memtabler8+ebx*4]
%endmacro
%macro addr_BdB_16brni 0
mov bl,[esi]
mov ecx,[xd]
call dword near [DPageR16]
mov cx,ax
mov bl,[xdb]
call dword near [memtabler16+ebx*4]
%endmacro
; 19. Direct Indirect Long -- [d]
; ___________________
; Instruction: | opcode | offset |
; ~~~~~~~~~~~~~~~~~~~
; | Direct Register |
; + | offset |
; ---------------------
; | 00 | direct address |
; then:
; -------------------------------
; Address: | (direct address) |
%macro addr_LdL_8brni 0
mov bl,[esi]
mov ecx,[xd]
add cx,bx
push cx
call membank0r16
pop cx
add cx,2
push ax
call membank0r8
mov bl,al
pop ax
mov cx,ax
call dword near [memtabler8+ebx*4]
%endmacro
%macro addr_LdL_16brni 0
mov bl,[esi]
mov ecx,[xd]
add cx,bx
push cx
call membank0r16
pop cx
add cx,2
push ax
call membank0r8
mov bl,al
pop ax
mov cx,ax
call dword near [memtabler16+ebx*4]
%endmacro
; 22. Stack Relative -- d,s
%macro addr_dCs_8brni 0
mov bl,[esi]
mov cx,[xs]
add cx,bx
call membank0r8
%endmacro
%macro addr_dCs_16brni 0
mov bl,[esi]
mov cx,[xs]
add cx,bx
call membank0r16
%endmacro
; 23. Stack Relative Indirect Indexed -- (d,s),y (TESTED)
%macro addr_BdCsBCy_8brni 0
mov bl,[esi]
mov cx,[xs]
add cx,bx
call membank0r16
mov cx,ax
mov bl,[xdb]
add cx,[xy]
jnc .npb
inc bl
.npb
call dword near [memtabler8+ebx*4]
%endmacro
%macro addr_BdCsBCy_16brni 0
mov bl,[esi]
mov cx,[xs]
add cx,bx
call membank0r16
mov cx,ax
mov bl,[xdb]
add cx,[xy]
jnc .npb
inc bl
.npb
call dword near [memtabler16+ebx*4]
%endmacro

View File

@@ -1,405 +1,404 @@
;Copyright (C) 1997-2001 ZSNES Team ( zsknight@zsnes.com / _demo_@zsnes.com )
;
;This program is free software; you can redistribute it and/or
;modify it under the terms of the GNU General Public License
;as published by the Free Software Foundation; either
;version 2 of the License, or (at your option) any later
;version.
;
;This program is distributed in the hope that it will be useful,
;but WITHOUT ANY WARRANTY; without even the implied warranty of
;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;GNU General Public License for more details.
;
;You should have received a copy of the GNU General Public License
;along with this program; if not, write to the Free Software
;Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
;*******************************************************
; Address Modes
;*******************************************************
; 1. Immediate Addressing -- # - DONE IN PROGRAM
%macro addr_I_8brni 0
mov al,[esi]
%endmacro
%macro addr_I_16brni 0
mov ax,[esi]
%endmacro
; 2. Absolute -- a (TESTED)
%macro addr_a_8brni 0
mov cx,[esi]
mov bl,[xdb]
call dword near [memtabler8+ebx*4]
%endmacro
%macro addr_a_16brni 0
mov cx,[esi]
mov bl,[xdb]
call dword near [memtabler16+ebx*4]
%endmacro
; 3. Absolute Long -- al
%macro addr_al_8brni 0
mov cx,[esi]
mov bl,[esi+2]
call dword near [memtabler8+ebx*4]
%endmacro
%macro addr_al_16brni 0
mov cx,[esi]
mov bl,[esi+2]
call dword near [memtabler16+ebx*4]
%endmacro
; 4. Direct -- d (TESTED)
%macro addr_d_8brni 0
mov bl,[esi]
mov ecx,[xd]
call dword near [DPageR8]
%endmacro
%macro addr_d_16brni 0
mov bl,[esi]
mov ecx,[xd]
call dword near [DPageR16]
%endmacro
; 5. Accumulator -- A
%macro addr_A_8brni 0
mov al,[xa]
%endmacro
%macro addr_A_16brni 0
mov ax,[xa]
%endmacro
; 7. Direct Indirect Indexed -- (d),y
%macro addr_BdBCy_8brni 0
mov bl,[esi]
mov ecx,[xd]
call dword near [DPageR16]
mov cx,ax
mov bl,[xdb]
add cx,[xy]
jnc .npb
inc bl
.npb
call dword near [memtabler8+ebx*4]
%endmacro
%macro addr_BdBCy_16brni 0
mov bl,[esi]
mov ecx,[xd]
call dword near [DPageR16]
mov cx,ax
mov bl,[xdb]
add cx,[xy]
jnc .npb
inc bl
.npb
call dword near [memtabler16+ebx*4]
%endmacro
; 8. Direct Indirect Indexed Long -- [d],y
%macro addr_LdLCy_8brni 0
mov ecx,[xd]
mov bl,[esi]
add cx,bx
push cx
call membank0r16
pop cx
add cx,2
push ax
call membank0r8
mov bl,al
pop ax
mov cx,ax
add cx,[xy]
jnc .npb
inc bl
.npb
call dword near [memtabler8+ebx*4]
%endmacro
%macro addr_LdLCy_16brni 0
mov ecx,[xd]
mov bl,[esi]
add cx,bx
push cx
call membank0r16
pop cx
add cx,2
push ax
call membank0r8
mov bl,al
pop ax
mov cx,ax
add cx,[xy]
jnc .npb
inc bl
.npb
call dword near [memtabler16+ebx*4]
%endmacro
; 9. Direct Indexed Indirect -- (d,x)
%macro addr_BdCxB_8brni 0
mov ecx,[xd]
mov bl,[esi]
add cx,bx
add cx,[xx]
call membank0r16
mov cx,ax
mov bl,[xdb]
call dword near [memtabler8+ebx*4]
%endmacro
%macro addr_BdCxB_16brni 0
mov ecx,[xd]
mov bl,[esi]
add cx,bx
add cx,[xx]
call membank0r16
mov cx,ax
mov bl,[xdb]
call dword near [memtabler16+ebx*4]
%endmacro
; 10. Direct Indexed With X -- d,x
%macro addr_dCx_8brni 0
mov ecx,[xd]
mov bl,[esi]
add cx,bx
add cx,[xx]
call membank0r8
%endmacro
%macro addr_dCx_16brni 0
mov ecx,[xd]
mov bl,[esi]
add cx,bx
add cx,[xx]
call membank0r16
%endmacro
; 11. Direct Indexed With Y -- d,y
%macro addr_dCy_8brni 0
mov ecx,[xd]
mov bl,[esi]
add cx,bx
add cx,[xy]
call membank0r8
%endmacro
%macro addr_dCy_16brni 0
mov ecx,[xd]
mov bl,[esi]
add cx,bx
add cx,[xy]
call membank0r16
%endmacro
; 12. Absolute Indexed With X -- a,x
%macro addr_aCx_8brni 0
mov cx,[esi]
mov bl,[xdb]
add cx,[xx]
jnc .npb
inc bl
.npb
call dword near [memtabler8+ebx*4]
%endmacro
%macro addr_aCx_16brni 0
mov cx,[esi]
mov bl,[xdb]
add cx,[xx]
jnc .npb
inc bl
.npb
call dword near [memtabler16+ebx*4]
%endmacro
; 13. Absolute Indexed With Y -- a,y
%macro addr_aCy_8brni 0
mov cx,[esi]
mov bl,[xdb]
add cx,[xy]
jnc .npb
inc bl
.npb
call dword near [memtabler8+ebx*4]
%endmacro
%macro addr_aCy_16brni 0
mov cx,[esi]
mov bl,[xdb]
add cx,[xy]
jnc .npb
inc bl
.npb
call dword near [memtabler16+ebx*4]
%endmacro
; 14. Absolute Long Indexed With X -- al,x
%macro addr_alCx_8brni 0
mov cx,[esi]
mov bl,[esi+2]
add cx,[xx]
jnc .npb
inc bl
.npb
call dword near [memtabler8+ebx*4]
%endmacro
%macro addr_alCx_16brni 0
mov cx,[esi]
mov bl,[esi+2]
add cx,[xx]
jnc .npb
inc bl
.npb
call dword near [memtabler16+ebx*4]
%endmacro
; 18. Direct Indirect -- (d)
; ___________________
; Instruction: | opcode | offset |
; ~~~~~~~~~~~~~~~~~~~
; | Direct Register |
; + | offset |
; ---------------------
; | 00 | direct address |
; then:
; | 00 | (direct address) |
; + | DB |
; -------------------------------
; Address: | effective address |
%macro addr_BdB_8brni 0
mov bl,[esi]
mov ecx,[xd]
call dword near [DPageR16]
mov cx,ax
mov bl,[xdb]
call dword near [memtabler8+ebx*4]
%endmacro
%macro addr_BdB_16brni 0
mov bl,[esi]
mov ecx,[xd]
call dword near [DPageR16]
mov cx,ax
mov bl,[xdb]
call dword near [memtabler16+ebx*4]
%endmacro
; 19. Direct Indirect Long -- [d]
; ___________________
; Instruction: | opcode | offset |
; ~~~~~~~~~~~~~~~~~~~
; | Direct Register |
; + | offset |
; ---------------------
; | 00 | direct address |
; then:
; -------------------------------
; Address: | (direct address) |
%macro addr_LdL_8brni 0
mov bl,[esi]
mov ecx,[xd]
add cx,bx
push cx
call membank0r16
pop cx
add cx,2
push ax
call membank0r8
mov bl,al
pop ax
mov cx,ax
call dword near [memtabler8+ebx*4]
%endmacro
%macro addr_LdL_16brni 0
mov bl,[esi]
mov ecx,[xd]
add cx,bx
push cx
call membank0r16
pop cx
add cx,2
push ax
call membank0r8
mov bl,al
pop ax
mov cx,ax
call dword near [memtabler16+ebx*4]
%endmacro
; 22. Stack Relative -- d,s
%macro addr_dCs_8brni 0
mov bl,[esi]
mov cx,[xs]
add cx,bx
call membank0r8
%endmacro
%macro addr_dCs_16brni 0
mov bl,[esi]
mov cx,[xs]
add cx,bx
call membank0r16
%endmacro
; 23. Stack Relative Indirect Indexed -- (d,s),y (TESTED)
%macro addr_BdCsBCy_8brni 0
mov bl,[esi]
mov cx,[xs]
add cx,bx
call membank0r16
mov cx,ax
mov bl,[xdb]
add cx,[xy]
jnc .npb
inc bl
.npb
call dword near [memtabler8+ebx*4]
%endmacro
%macro addr_BdCsBCy_16brni 0
mov bl,[esi]
mov cx,[xs]
add cx,bx
call membank0r16
mov cx,ax
mov bl,[xdb]
add cx,[xy]
jnc .npb
inc bl
.npb
call dword near [memtabler16+ebx*4]
%endmacro

;Copyright (C) 1997-2001 ZSNES Team ( zsknight@zsnes.com / _demo_@zsnes.com )
;
;This program is free software; you can redistribute it and/or
;modify it under the terms of the GNU General Public License
;as published by the Free Software Foundation; either
;version 2 of the License, or (at your option) any later
;version.
;
;This program is distributed in the hope that it will be useful,
;but WITHOUT ANY WARRANTY; without even the implied warranty of
;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;GNU General Public License for more details.
;
;You should have received a copy of the GNU General Public License
;along with this program; if not, write to the Free Software
;Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
;*******************************************************
; Address Modes
;*******************************************************
; 1. Immediate Addressing -- # - DONE IN PROGRAM
%macro addr_I_8brni 0
mov al,[esi]
%endmacro
%macro addr_I_16brni 0
mov ax,[esi]
%endmacro
; 2. Absolute -- a (TESTED)
%macro addr_a_8brni 0
mov cx,[esi]
mov bl,[xdb]
call dword near [memtabler8+ebx*4]
%endmacro
%macro addr_a_16brni 0
mov cx,[esi]
mov bl,[xdb]
call dword near [memtabler16+ebx*4]
%endmacro
; 3. Absolute Long -- al
%macro addr_al_8brni 0
mov cx,[esi]
mov bl,[esi+2]
call dword near [memtabler8+ebx*4]
%endmacro
%macro addr_al_16brni 0
mov cx,[esi]
mov bl,[esi+2]
call dword near [memtabler16+ebx*4]
%endmacro
; 4. Direct -- d (TESTED)
%macro addr_d_8brni 0
mov bl,[esi]
mov ecx,[xd]
call dword near [DPageR8]
%endmacro
%macro addr_d_16brni 0
mov bl,[esi]
mov ecx,[xd]
call dword near [DPageR16]
%endmacro
; 5. Accumulator -- A
%macro addr_A_8brni 0
mov al,[xa]
%endmacro
%macro addr_A_16brni 0
mov ax,[xa]
%endmacro
; 7. Direct Indirect Indexed -- (d),y
%macro addr_BdBCy_8brni 0
mov bl,[esi]
mov ecx,[xd]
call dword near [DPageR16]
mov cx,ax
mov bl,[xdb]
add cx,[xy]
jnc .npb
inc bl
.npb
call dword near [memtabler8+ebx*4]
%endmacro
%macro addr_BdBCy_16brni 0
mov bl,[esi]
mov ecx,[xd]
call dword near [DPageR16]
mov cx,ax
mov bl,[xdb]
add cx,[xy]
jnc .npb
inc bl
.npb
call dword near [memtabler16+ebx*4]
%endmacro
; 8. Direct Indirect Indexed Long -- [d],y
%macro addr_LdLCy_8brni 0
mov ecx,[xd]
mov bl,[esi]
add cx,bx
push cx
call membank0r16
pop cx
add cx,2
push ax
call membank0r8
mov bl,al
pop ax
mov cx,ax
add cx,[xy]
jnc .npb
inc bl
.npb
call dword near [memtabler8+ebx*4]
%endmacro
%macro addr_LdLCy_16brni 0
mov ecx,[xd]
mov bl,[esi]
add cx,bx
push cx
call membank0r16
pop cx
add cx,2
push ax
call membank0r8
mov bl,al
pop ax
mov cx,ax
add cx,[xy]
jnc .npb
inc bl
.npb
call dword near [memtabler16+ebx*4]
%endmacro
; 9. Direct Indexed Indirect -- (d,x)
%macro addr_BdCxB_8brni 0
mov ecx,[xd]
mov bl,[esi]
add cx,bx
add cx,[xx]
call membank0r16
mov cx,ax
mov bl,[xdb]
call dword near [memtabler8+ebx*4]
%endmacro
%macro addr_BdCxB_16brni 0
mov ecx,[xd]
mov bl,[esi]
add cx,bx
add cx,[xx]
call membank0r16
mov cx,ax
mov bl,[xdb]
call dword near [memtabler16+ebx*4]
%endmacro
; 10. Direct Indexed With X -- d,x
%macro addr_dCx_8brni 0
mov ecx,[xd]
mov bl,[esi]
add cx,bx
add cx,[xx]
call membank0r8
%endmacro
%macro addr_dCx_16brni 0
mov ecx,[xd]
mov bl,[esi]
add cx,bx
add cx,[xx]
call membank0r16
%endmacro
; 11. Direct Indexed With Y -- d,y
%macro addr_dCy_8brni 0
mov ecx,[xd]
mov bl,[esi]
add cx,bx
add cx,[xy]
call membank0r8
%endmacro
%macro addr_dCy_16brni 0
mov ecx,[xd]
mov bl,[esi]
add cx,bx
add cx,[xy]
call membank0r16
%endmacro
; 12. Absolute Indexed With X -- a,x
%macro addr_aCx_8brni 0
mov cx,[esi]
mov bl,[xdb]
add cx,[xx]
jnc .npb
inc bl
.npb
call dword near [memtabler8+ebx*4]
%endmacro
%macro addr_aCx_16brni 0
mov cx,[esi]
mov bl,[xdb]
add cx,[xx]
jnc .npb
inc bl
.npb
call dword near [memtabler16+ebx*4]
%endmacro
; 13. Absolute Indexed With Y -- a,y
%macro addr_aCy_8brni 0
mov cx,[esi]
mov bl,[xdb]
add cx,[xy]
jnc .npb
inc bl
.npb
call dword near [memtabler8+ebx*4]
%endmacro
%macro addr_aCy_16brni 0
mov cx,[esi]
mov bl,[xdb]
add cx,[xy]
jnc .npb
inc bl
.npb
call dword near [memtabler16+ebx*4]
%endmacro
; 14. Absolute Long Indexed With X -- al,x
%macro addr_alCx_8brni 0
mov cx,[esi]
mov bl,[esi+2]
add cx,[xx]
jnc .npb
inc bl
.npb
call dword near [memtabler8+ebx*4]
%endmacro
%macro addr_alCx_16brni 0
mov cx,[esi]
mov bl,[esi+2]
add cx,[xx]
jnc .npb
inc bl
.npb
call dword near [memtabler16+ebx*4]
%endmacro
; 18. Direct Indirect -- (d)
; ___________________
; Instruction: | opcode | offset |
; ~~~~~~~~~~~~~~~~~~~
; | Direct Register |
; + | offset |
; ---------------------
; | 00 | direct address |
; then:
; | 00 | (direct address) |
; + | DB |
; -------------------------------
; Address: | effective address |
%macro addr_BdB_8brni 0
mov bl,[esi]
mov ecx,[xd]
call dword near [DPageR16]
mov cx,ax
mov bl,[xdb]
call dword near [memtabler8+ebx*4]
%endmacro
%macro addr_BdB_16brni 0
mov bl,[esi]
mov ecx,[xd]
call dword near [DPageR16]
mov cx,ax
mov bl,[xdb]
call dword near [memtabler16+ebx*4]
%endmacro
; 19. Direct Indirect Long -- [d]
; ___________________
; Instruction: | opcode | offset |
; ~~~~~~~~~~~~~~~~~~~
; | Direct Register |
; + | offset |
; ---------------------
; | 00 | direct address |
; then:
; -------------------------------
; Address: | (direct address) |
%macro addr_LdL_8brni 0
mov bl,[esi]
mov ecx,[xd]
add cx,bx
push cx
call membank0r16
pop cx
add cx,2
push ax
call membank0r8
mov bl,al
pop ax
mov cx,ax
call dword near [memtabler8+ebx*4]
%endmacro
%macro addr_LdL_16brni 0
mov bl,[esi]
mov ecx,[xd]
add cx,bx
push cx
call membank0r16
pop cx
add cx,2
push ax
call membank0r8
mov bl,al
pop ax
mov cx,ax
call dword near [memtabler16+ebx*4]
%endmacro
; 22. Stack Relative -- d,s
%macro addr_dCs_8brni 0
mov bl,[esi]
mov cx,[xs]
add cx,bx
call membank0r8
%endmacro
%macro addr_dCs_16brni 0
mov bl,[esi]
mov cx,[xs]
add cx,bx
call membank0r16
%endmacro
; 23. Stack Relative Indirect Indexed -- (d,s),y (TESTED)
%macro addr_BdCsBCy_8brni 0
mov bl,[esi]
mov cx,[xs]
add cx,bx
call membank0r16
mov cx,ax
mov bl,[xdb]
add cx,[xy]
jnc .npb
inc bl
.npb
call dword near [memtabler8+ebx*4]
%endmacro
%macro addr_BdCsBCy_16brni 0
mov bl,[esi]
mov cx,[xs]
add cx,bx
call membank0r16
mov cx,ax
mov bl,[xdb]
add cx,[xy]
jnc .npb
inc bl
.npb
call dword near [memtabler16+ebx*4]
%endmacro

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,101 +1,100 @@
;Copyright (C) 1997-2001 ZSNES Team ( zsknight@zsnes.com / _demo_@zsnes.com )
;
;This program is free software; you can redistribute it and/or
;modify it under the terms of the GNU General Public License
;as published by the Free Software Foundation; either
;version 2 of the License, or (at your option) any later
;version.
;
;This program is distributed in the hope that it will be useful,
;but WITHOUT ANY WARRANTY; without even the implied warranty of
;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;GNU General Public License for more details.
;
;You should have received a copy of the GNU General Public License
;along with this program; if not, write to the Free Software
;Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
;*******************************************************
; InitReg Initializes Registers
;*******************************************************
%macro setreg 2
mov edi,%1
add edi,[regptr]
mov eax,%2
mov [edi],eax
%endmacro
;*******************************************************
; Registers Note : Remember to restore AH, ECX, & DX
;*******************************************************
%macro checkmultchange 0
; execute multiplication
cmp byte[multchange],0
je .nomult
push edx
push eax
xor bh,bh
mov bl,[mode7B+1]
mov ax,[mode7A]
test bl,80h
jz .noneg
mov bh,0FFh
.noneg
imul bx
mov [compmult],ax
mov [compmult+2],dl
pop eax
pop edx
mov byte[multchange],0
.nomult
%endmacro
%macro mouse4016doxA 2
cmp byte[JoyAPos],%1
jne .nx7
mov bx,[mousexpos]
shr bx,%2
and bx,1
mov al,bl
.nx7
%endmacro
%macro mouse4016doyA 2
cmp byte[JoyAPos],%1
jne .ny7
mov bx,[mouseypos]
shr bx,%2
and bx,1
mov al,bl
.ny7
%endmacro
%macro mouse4017dox 2
cmp byte[JoyBPos],%1
jne .nx7
mov bx,[mousexpos]
shr bx,%2
and bx,1
mov al,bl
.nx7
%endmacro
%macro mouse4017doy 2
cmp byte[JoyBPos],%1
jne .ny7
mov bx,[mouseypos]
shr bx,%2
and bx,1
mov al,bl
.ny7
%endmacro

;Copyright (C) 1997-2001 ZSNES Team ( zsknight@zsnes.com / _demo_@zsnes.com )
;
;This program is free software; you can redistribute it and/or
;modify it under the terms of the GNU General Public License
;as published by the Free Software Foundation; either
;version 2 of the License, or (at your option) any later
;version.
;
;This program is distributed in the hope that it will be useful,
;but WITHOUT ANY WARRANTY; without even the implied warranty of
;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;GNU General Public License for more details.
;
;You should have received a copy of the GNU General Public License
;along with this program; if not, write to the Free Software
;Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
;*******************************************************
; InitReg Initializes Registers
;*******************************************************
%macro setreg 2
mov edi,%1
add edi,[regptr]
mov eax,%2
mov [edi],eax
%endmacro
;*******************************************************
; Registers Note : Remember to restore AH, ECX, & DX
;*******************************************************
%macro checkmultchange 0
; execute multiplication
cmp byte[multchange],0
je .nomult
push edx
push eax
xor bh,bh
mov bl,[mode7B+1]
mov ax,[mode7A]
test bl,80h
jz .noneg
mov bh,0FFh
.noneg
imul bx
mov [compmult],ax
mov [compmult+2],dl
pop eax
pop edx
mov byte[multchange],0
.nomult
%endmacro
%macro mouse4016doxA 2
cmp byte[JoyAPos],%1
jne .nx7
mov bx,[mousexpos]
shr bx,%2
and bx,1
mov al,bl
.nx7
%endmacro
%macro mouse4016doyA 2
cmp byte[JoyAPos],%1
jne .ny7
mov bx,[mouseypos]
shr bx,%2
and bx,1
mov al,bl
.ny7
%endmacro
%macro mouse4017dox 2
cmp byte[JoyBPos],%1
jne .nx7
mov bx,[mousexpos]
shr bx,%2
and bx,1
mov al,bl
.nx7
%endmacro
%macro mouse4017doy 2
cmp byte[JoyBPos],%1
jne .ny7
mov bx,[mouseypos]
shr bx,%2
and bx,1
mov al,bl
.ny7
%endmacro

File diff suppressed because it is too large Load Diff

View File

@@ -1,52 +1,51 @@
;Copyright (C) 1997-2001 ZSNES Team ( zsknight@zsnes.com / _demo_@zsnes.com )
;
;This program is free software; you can redistribute it and/or
;modify it under the terms of the GNU General Public License
;as published by the Free Software Foundation; either
;version 2 of the License, or (at your option) any later
;version.
;
;This program is distributed in the hope that it will be useful,
;but WITHOUT ANY WARRANTY; without even the implied warranty of
;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;GNU General Public License for more details.
;
;You should have received a copy of the GNU General Public License
;along with this program; if not, write to the Free Software
;Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
EXTSYM tableadc
;*******************************************************
; InitRegW Initializes Write Registers
;*******************************************************
%macro reenablespc 0
cmp dword[cycpbl],1000000h
jb %%enspc
mov dword[cycpbl],0
test byte[curexecstate],02h
jnz %%enspc
or byte[curexecstate],02h
push ebx
xor ebx,ebx
mov bl,dl
mov edi,[tableadc+ebx*4]
pop ebx
%%enspc
%endmacro
%macro setregw 2
mov edi,%1
add edi,[regptw]
mov eax,%2
mov [edi],eax
%endmacro

;Copyright (C) 1997-2001 ZSNES Team ( zsknight@zsnes.com / _demo_@zsnes.com )
;
;This program is free software; you can redistribute it and/or
;modify it under the terms of the GNU General Public License
;as published by the Free Software Foundation; either
;version 2 of the License, or (at your option) any later
;version.
;
;This program is distributed in the hope that it will be useful,
;but WITHOUT ANY WARRANTY; without even the implied warranty of
;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;GNU General Public License for more details.
;
;You should have received a copy of the GNU General Public License
;along with this program; if not, write to the Free Software
;Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
EXTSYM tableadc
;*******************************************************
; InitRegW Initializes Write Registers
;*******************************************************
%macro reenablespc 0
cmp dword[cycpbl],1000000h
jb %%enspc
mov dword[cycpbl],0
test byte[curexecstate],02h
jnz %%enspc
or byte[curexecstate],02h
push ebx
xor ebx,ebx
mov bl,dl
mov edi,[tableadc+ebx*4]
pop ebx
%%enspc
%endmacro
%macro setregw 2
mov edi,%1
add edi,[regptw]
mov eax,%2
mov [edi],eax
%endmacro

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,404 +1,403 @@
;Copyright (C) 1997-2001 ZSNES Team ( zsknight@zsnes.com / _demo_@zsnes.com )
;
;This program is free software; you can redistribute it and/or
;modify it under the terms of the GNU General Public License
;as published by the Free Software Foundation; either
;version 2 of the License, or (at your option) any later
;version.
;
;This program is distributed in the hope that it will be useful,
;but WITHOUT ANY WARRANTY; without even the implied warranty of
;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;GNU General Public License for more details.
;
;You should have received a copy of the GNU General Public License
;along with this program; if not, write to the Free Software
;Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
;*******************************************************
; Address Modes
;*******************************************************
; 1. Immediate Addressing -- # - DONE IN PROGRAM
%macro addr_I_8brni 0
mov al,[esi]
%endmacro
%macro addr_I_16brni 0
mov ax,[esi]
%endmacro
; 2. Absolute -- a (TESTED)
%macro addr_a_8brni 0
mov cx,[esi]
mov bl,[SA1xdb]
call dword near [memtabler8+ebx*4]
%endmacro
%macro addr_a_16brni 0
mov cx,[esi]
mov bl,[SA1xdb]
call dword near [memtabler16+ebx*4]
%endmacro
; 3. Absolute Long -- al
%macro addr_al_8brni 0
mov cx,[esi]
mov bl,[esi+2]
call dword near [memtabler8+ebx*4]
%endmacro
%macro addr_al_16brni 0
mov cx,[esi]
mov bl,[esi+2]
call dword near [memtabler16+ebx*4]
%endmacro
; 4. Direct -- d (TESTED)
%macro addr_d_8brni 0
mov bl,[esi]
mov ecx,[SA1xd]
call dword near [SA1DPageR8]
%endmacro
%macro addr_d_16brni 0
mov bl,[esi]
mov ecx,[SA1xd]
call dword near [SA1DPageR16]
%endmacro
; 5. Accumulator -- A
%macro addr_A_8brni 0
mov al,[SA1xa]
%endmacro
%macro addr_A_16brni 0
mov ax,[SA1xa]
%endmacro
; 7. Direct Indirect Indexed -- (d),y
%macro addr_BdBCy_8brni 0
mov bl,[esi]
mov ecx,[SA1xd]
call dword near [SA1DPageR16]
mov cx,ax
mov bl,[SA1xdb]
add cx,[SA1xy]
jnc .npb
inc bl
.npb
call dword near [memtabler8+ebx*4]
%endmacro
%macro addr_BdBCy_16brni 0
mov bl,[esi]
mov ecx,[SA1xd]
call dword near [SA1DPageR16]
mov cx,ax
mov bl,[SA1xdb]
add cx,[SA1xy]
jnc .npb
inc bl
.npb
call dword near [memtabler16+ebx*4]
%endmacro
; 8. Direct Indirect Indexed Long -- [d],y
%macro addr_LdLCy_8brni 0
mov ecx,[SA1xd]
mov bl,[esi]
add cx,bx
push cx
call membank0r16
pop cx
add cx,2
push ax
call membank0r8
mov bl,al
pop ax
mov cx,ax
add cx,[SA1xy]
jnc .npb
inc bl
.npb
call dword near [memtabler8+ebx*4]
%endmacro
%macro addr_LdLCy_16brni 0
mov ecx,[SA1xd]
mov bl,[esi]
add cx,bx
push cx
call membank0r16
pop cx
add cx,2
push ax
call membank0r8
mov bl,al
pop ax
mov cx,ax
add cx,[SA1xy]
jnc .npb
inc bl
.npb
call dword near [memtabler16+ebx*4]
%endmacro
; 9. Direct Indexed Indirect -- (d,x)
%macro addr_BdCxB_8brni 0
mov ecx,[SA1xd]
mov bl,[esi]
add cx,bx
add cx,[SA1xx]
call membank0r16
mov cx,ax
mov bl,[SA1xdb]
call dword near [memtabler8+ebx*4]
%endmacro
%macro addr_BdCxB_16brni 0
mov ecx,[SA1xd]
mov bl,[esi]
add cx,bx
add cx,[SA1xx]
call membank0r16
mov cx,ax
mov bl,[SA1xdb]
call dword near [memtabler16+ebx*4]
%endmacro
; 10. Direct Indexed With X -- d,x
%macro addr_dCx_8brni 0
mov ecx,[SA1xd]
mov bl,[esi]
add cx,bx
add cx,[SA1xx]
call membank0r8
%endmacro
%macro addr_dCx_16brni 0
mov ecx,[SA1xd]
mov bl,[esi]
add cx,bx
add cx,[SA1xx]
call membank0r16
%endmacro
; 11. Direct Indexed With Y -- d,y
%macro addr_dCy_8brni 0
mov ecx,[SA1xd]
mov bl,[esi]
add cx,bx
add cx,[SA1xy]
call membank0r8
%endmacro
%macro addr_dCy_16brni 0
mov ecx,[SA1xd]
mov bl,[esi]
add cx,bx
add cx,[SA1xy]
call membank0r16
%endmacro
; 12. Absolute Indexed With X -- a,x
%macro addr_aCx_8brni 0
mov cx,[esi]
mov bl,[SA1xdb]
add cx,[SA1xx]
jnc .npb
inc bl
.npb
call dword near [memtabler8+ebx*4]
%endmacro
%macro addr_aCx_16brni 0
mov cx,[esi]
mov bl,[SA1xdb]
add cx,[SA1xx]
jnc .npb
inc bl
.npb
call dword near [memtabler16+ebx*4]
%endmacro
; 13. Absolute Indexed With Y -- a,y
%macro addr_aCy_8brni 0
mov cx,[esi]
mov bl,[SA1xdb]
add cx,[SA1xy]
jnc .npb
inc bl
.npb
call dword near [memtabler8+ebx*4]
%endmacro
%macro addr_aCy_16brni 0
mov cx,[esi]
mov bl,[SA1xdb]
add cx,[SA1xy]
jnc .npb
inc bl
.npb
call dword near [memtabler16+ebx*4]
%endmacro
; 14. Absolute Long Indexed With X -- al,x
%macro addr_alCx_8brni 0
mov cx,[esi]
mov bl,[esi+2]
add cx,[SA1xx]
jnc .npb
inc bl
.npb
call dword near [memtabler8+ebx*4]
%endmacro
%macro addr_alCx_16brni 0
mov cx,[esi]
mov bl,[esi+2]
add cx,[SA1xx]
jnc .npb
inc bl
.npb
call dword near [memtabler16+ebx*4]
%endmacro
; 18. Direct Indirect -- (d)
; ___________________
; Instruction: | opcode | offset |
; ~~~~~~~~~~~~~~~~~~~
; | Direct Register |
; + | offset |
; ---------------------
; | 00 | direct address |
; then:
; | 00 | (direct address) |
; + | DB |
; -------------------------------
; Address: | effective address |
%macro addr_BdB_8brni 0
mov bl,[esi]
mov ecx,[SA1xd]
call dword near [SA1DPageR16]
mov cx,ax
mov bl,[SA1xdb]
call dword near [memtabler8+ebx*4]
%endmacro
%macro addr_BdB_16brni 0
mov bl,[esi]
mov ecx,[SA1xd]
call dword near [SA1DPageR16]
mov cx,ax
mov bl,[SA1xdb]
call dword near [memtabler16+ebx*4]
%endmacro
; 19. Direct Indirect Long -- [d]
; ___________________
; Instruction: | opcode | offset |
; ~~~~~~~~~~~~~~~~~~~
; | Direct Register |
; + | offset |
; ---------------------
; | 00 | direct address |
; then:
; -------------------------------
; Address: | (direct address) |
%macro addr_LdL_8brni 0
mov bl,[esi]
mov ecx,[SA1xd]
add cx,bx
push cx
call membank0r16
pop cx
add cx,2
push ax
call membank0r8
mov bl,al
pop ax
mov cx,ax
call dword near [memtabler8+ebx*4]
%endmacro
%macro addr_LdL_16brni 0
mov bl,[esi]
mov ecx,[SA1xd]
add cx,bx
push cx
call membank0r16
pop cx
add cx,2
push ax
call membank0r8
mov bl,al
pop ax
mov cx,ax
call dword near [memtabler16+ebx*4]
%endmacro
; 22. Stack Relative -- d,s
%macro addr_dCs_8brni 0
mov bl,[esi]
mov cx,[SA1xs]
add cx,bx
call membank0r8
%endmacro
%macro addr_dCs_16brni 0
mov bl,[esi]
mov cx,[SA1xs]
add cx,bx
call membank0r16
%endmacro
; 23. Stack Relative Indirect Indexed -- (d,s),y (TESTED)
%macro addr_BdCsBCy_8brni 0
mov bl,[esi]
mov cx,[SA1xs]
add cx,bx
call membank0r16
mov cx,ax
mov bl,[SA1xdb]
add cx,[SA1xy]
jnc .npb
inc bl
.npb
call dword near [memtabler8+ebx*4]
%endmacro
%macro addr_BdCsBCy_16brni 0
mov bl,[esi]
mov cx,[SA1xs]
add cx,bx
call membank0r16
mov cx,ax
mov bl,[SA1xdb]
add cx,[SA1xy]
jnc .npb
inc bl
.npb
call dword near [memtabler16+ebx*4]
%endmacro

;Copyright (C) 1997-2001 ZSNES Team ( zsknight@zsnes.com / _demo_@zsnes.com )
;
;This program is free software; you can redistribute it and/or
;modify it under the terms of the GNU General Public License
;as published by the Free Software Foundation; either
;version 2 of the License, or (at your option) any later
;version.
;
;This program is distributed in the hope that it will be useful,
;but WITHOUT ANY WARRANTY; without even the implied warranty of
;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;GNU General Public License for more details.
;
;You should have received a copy of the GNU General Public License
;along with this program; if not, write to the Free Software
;Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
;*******************************************************
; Address Modes
;*******************************************************
; 1. Immediate Addressing -- # - DONE IN PROGRAM
%macro addr_I_8brni 0
mov al,[esi]
%endmacro
%macro addr_I_16brni 0
mov ax,[esi]
%endmacro
; 2. Absolute -- a (TESTED)
%macro addr_a_8brni 0
mov cx,[esi]
mov bl,[SA1xdb]
call dword near [memtabler8+ebx*4]
%endmacro
%macro addr_a_16brni 0
mov cx,[esi]
mov bl,[SA1xdb]
call dword near [memtabler16+ebx*4]
%endmacro
; 3. Absolute Long -- al
%macro addr_al_8brni 0
mov cx,[esi]
mov bl,[esi+2]
call dword near [memtabler8+ebx*4]
%endmacro
%macro addr_al_16brni 0
mov cx,[esi]
mov bl,[esi+2]
call dword near [memtabler16+ebx*4]
%endmacro
; 4. Direct -- d (TESTED)
%macro addr_d_8brni 0
mov bl,[esi]
mov ecx,[SA1xd]
call dword near [SA1DPageR8]
%endmacro
%macro addr_d_16brni 0
mov bl,[esi]
mov ecx,[SA1xd]
call dword near [SA1DPageR16]
%endmacro
; 5. Accumulator -- A
%macro addr_A_8brni 0
mov al,[SA1xa]
%endmacro
%macro addr_A_16brni 0
mov ax,[SA1xa]
%endmacro
; 7. Direct Indirect Indexed -- (d),y
%macro addr_BdBCy_8brni 0
mov bl,[esi]
mov ecx,[SA1xd]
call dword near [SA1DPageR16]
mov cx,ax
mov bl,[SA1xdb]
add cx,[SA1xy]
jnc .npb
inc bl
.npb
call dword near [memtabler8+ebx*4]
%endmacro
%macro addr_BdBCy_16brni 0
mov bl,[esi]
mov ecx,[SA1xd]
call dword near [SA1DPageR16]
mov cx,ax
mov bl,[SA1xdb]
add cx,[SA1xy]
jnc .npb
inc bl
.npb
call dword near [memtabler16+ebx*4]
%endmacro
; 8. Direct Indirect Indexed Long -- [d],y
%macro addr_LdLCy_8brni 0
mov ecx,[SA1xd]
mov bl,[esi]
add cx,bx
push cx
call membank0r16
pop cx
add cx,2
push ax
call membank0r8
mov bl,al
pop ax
mov cx,ax
add cx,[SA1xy]
jnc .npb
inc bl
.npb
call dword near [memtabler8+ebx*4]
%endmacro
%macro addr_LdLCy_16brni 0
mov ecx,[SA1xd]
mov bl,[esi]
add cx,bx
push cx
call membank0r16
pop cx
add cx,2
push ax
call membank0r8
mov bl,al
pop ax
mov cx,ax
add cx,[SA1xy]
jnc .npb
inc bl
.npb
call dword near [memtabler16+ebx*4]
%endmacro
; 9. Direct Indexed Indirect -- (d,x)
%macro addr_BdCxB_8brni 0
mov ecx,[SA1xd]
mov bl,[esi]
add cx,bx
add cx,[SA1xx]
call membank0r16
mov cx,ax
mov bl,[SA1xdb]
call dword near [memtabler8+ebx*4]
%endmacro
%macro addr_BdCxB_16brni 0
mov ecx,[SA1xd]
mov bl,[esi]
add cx,bx
add cx,[SA1xx]
call membank0r16
mov cx,ax
mov bl,[SA1xdb]
call dword near [memtabler16+ebx*4]
%endmacro
; 10. Direct Indexed With X -- d,x
%macro addr_dCx_8brni 0
mov ecx,[SA1xd]
mov bl,[esi]
add cx,bx
add cx,[SA1xx]
call membank0r8
%endmacro
%macro addr_dCx_16brni 0
mov ecx,[SA1xd]
mov bl,[esi]
add cx,bx
add cx,[SA1xx]
call membank0r16
%endmacro
; 11. Direct Indexed With Y -- d,y
%macro addr_dCy_8brni 0
mov ecx,[SA1xd]
mov bl,[esi]
add cx,bx
add cx,[SA1xy]
call membank0r8
%endmacro
%macro addr_dCy_16brni 0
mov ecx,[SA1xd]
mov bl,[esi]
add cx,bx
add cx,[SA1xy]
call membank0r16
%endmacro
; 12. Absolute Indexed With X -- a,x
%macro addr_aCx_8brni 0
mov cx,[esi]
mov bl,[SA1xdb]
add cx,[SA1xx]
jnc .npb
inc bl
.npb
call dword near [memtabler8+ebx*4]
%endmacro
%macro addr_aCx_16brni 0
mov cx,[esi]
mov bl,[SA1xdb]
add cx,[SA1xx]
jnc .npb
inc bl
.npb
call dword near [memtabler16+ebx*4]
%endmacro
; 13. Absolute Indexed With Y -- a,y
%macro addr_aCy_8brni 0
mov cx,[esi]
mov bl,[SA1xdb]
add cx,[SA1xy]
jnc .npb
inc bl
.npb
call dword near [memtabler8+ebx*4]
%endmacro
%macro addr_aCy_16brni 0
mov cx,[esi]
mov bl,[SA1xdb]
add cx,[SA1xy]
jnc .npb
inc bl
.npb
call dword near [memtabler16+ebx*4]
%endmacro
; 14. Absolute Long Indexed With X -- al,x
%macro addr_alCx_8brni 0
mov cx,[esi]
mov bl,[esi+2]
add cx,[SA1xx]
jnc .npb
inc bl
.npb
call dword near [memtabler8+ebx*4]
%endmacro
%macro addr_alCx_16brni 0
mov cx,[esi]
mov bl,[esi+2]
add cx,[SA1xx]
jnc .npb
inc bl
.npb
call dword near [memtabler16+ebx*4]
%endmacro
; 18. Direct Indirect -- (d)
; ___________________
; Instruction: | opcode | offset |
; ~~~~~~~~~~~~~~~~~~~
; | Direct Register |
; + | offset |
; ---------------------
; | 00 | direct address |
; then:
; | 00 | (direct address) |
; + | DB |
; -------------------------------
; Address: | effective address |
%macro addr_BdB_8brni 0
mov bl,[esi]
mov ecx,[SA1xd]
call dword near [SA1DPageR16]
mov cx,ax
mov bl,[SA1xdb]
call dword near [memtabler8+ebx*4]
%endmacro
%macro addr_BdB_16brni 0
mov bl,[esi]
mov ecx,[SA1xd]
call dword near [SA1DPageR16]
mov cx,ax
mov bl,[SA1xdb]
call dword near [memtabler16+ebx*4]
%endmacro
; 19. Direct Indirect Long -- [d]
; ___________________
; Instruction: | opcode | offset |
; ~~~~~~~~~~~~~~~~~~~
; | Direct Register |
; + | offset |
; ---------------------
; | 00 | direct address |
; then:
; -------------------------------
; Address: | (direct address) |
%macro addr_LdL_8brni 0
mov bl,[esi]
mov ecx,[SA1xd]
add cx,bx
push cx
call membank0r16
pop cx
add cx,2
push ax
call membank0r8
mov bl,al
pop ax
mov cx,ax
call dword near [memtabler8+ebx*4]
%endmacro
%macro addr_LdL_16brni 0
mov bl,[esi]
mov ecx,[SA1xd]
add cx,bx
push cx
call membank0r16
pop cx
add cx,2
push ax
call membank0r8
mov bl,al
pop ax
mov cx,ax
call dword near [memtabler16+ebx*4]
%endmacro
; 22. Stack Relative -- d,s
%macro addr_dCs_8brni 0
mov bl,[esi]
mov cx,[SA1xs]
add cx,bx
call membank0r8
%endmacro
%macro addr_dCs_16brni 0
mov bl,[esi]
mov cx,[SA1xs]
add cx,bx
call membank0r16
%endmacro
; 23. Stack Relative Indirect Indexed -- (d,s),y (TESTED)
%macro addr_BdCsBCy_8brni 0
mov bl,[esi]
mov cx,[SA1xs]
add cx,bx
call membank0r16
mov cx,ax
mov bl,[SA1xdb]
add cx,[SA1xy]
jnc .npb
inc bl
.npb
call dword near [memtabler8+ebx*4]
%endmacro
%macro addr_BdCsBCy_16brni 0
mov bl,[esi]
mov cx,[SA1xs]
add cx,bx
call membank0r16
mov cx,ax
mov bl,[SA1xdb]
add cx,[SA1xy]
jnc .npb
inc bl
.npb
call dword near [memtabler16+ebx*4]
%endmacro

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,97 +1,96 @@
;Copyright (C) 1997-2001 ZSNES Team ( zsknight@zsnes.com / _demo_@zsnes.com )
;
;This program is free software; you can redistribute it and/or
;modify it under the terms of the GNU General Public License
;as published by the Free Software Foundation; either
;version 2 of the License, or (at your option) any later
;version.
;
;This program is distributed in the hope that it will be useful,
;but WITHOUT ANY WARRANTY; without even the implied warranty of
;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;GNU General Public License for more details.
;
;You should have received a copy of the GNU General Public License
;along with this program; if not, write to the Free Software
;Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
; A,DP addressing mode
%macro SPCaddr_DP 0
mov bl,[ebp]
add ebx,[spcRamDP]
inc ebp
ReadByte
%endmacro
%macro SPCaddr_DP_X 0
mov bl,[ebp]
add bl,[spcX]
add ebx,[spcRamDP]
inc ebp
ReadByte
%endmacro
%macro SPCaddr_LABS 0
mov bx,[ebp]
add ebx,spcRam
ReadByte
add ebp,2
%endmacro
%macro SPCaddr_LABS_X 0
mov bl,[spcX]
add bx,[ebp]
add ebp,2
add ebx,spcRam
ReadByte
%endmacro
; A,(X)
%macro SPCaddr__X_ 0
mov bl,[spcX]
add ebx,[spcRamDP]
ReadByte
%endmacro
; A,labs+Y
%macro SPCaddr_LABS_Y 0
mov bl,[spcY]
add bx,[ebp]
add ebp,2
add ebx,spcRam
ReadByte
%endmacro
; A,(DP,X)
%macro SPCaddr_bDP_Xb 0
mov bl,[ebp]
add bl,[spcX]
xor eax,eax
add ebx,[spcRamDP]
inc ebp
mov ax, word [ebx]
mov ebx,eax
add ebx,spcRam
ReadByte
%endmacro
%macro SPCaddr_bDPb_Y 0
mov bl,[ebp]
xor eax,eax
add ebx,[spcRamDP]
inc ebp
mov ax,[ebx]
add ax,[spcY]
mov ebx,eax
add ebx,spcRam
ReadByte
%endmacro

;Copyright (C) 1997-2001 ZSNES Team ( zsknight@zsnes.com / _demo_@zsnes.com )
;
;This program is free software; you can redistribute it and/or
;modify it under the terms of the GNU General Public License
;as published by the Free Software Foundation; either
;version 2 of the License, or (at your option) any later
;version.
;
;This program is distributed in the hope that it will be useful,
;but WITHOUT ANY WARRANTY; without even the implied warranty of
;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;GNU General Public License for more details.
;
;You should have received a copy of the GNU General Public License
;along with this program; if not, write to the Free Software
;Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
; A,DP addressing mode
%macro SPCaddr_DP 0
mov bl,[ebp]
add ebx,[spcRamDP]
inc ebp
ReadByte
%endmacro
%macro SPCaddr_DP_X 0
mov bl,[ebp]
add bl,[spcX]
add ebx,[spcRamDP]
inc ebp
ReadByte
%endmacro
%macro SPCaddr_LABS 0
mov bx,[ebp]
add ebx,spcRam
ReadByte
add ebp,2
%endmacro
%macro SPCaddr_LABS_X 0
mov bl,[spcX]
add bx,[ebp]
add ebp,2
add ebx,spcRam
ReadByte
%endmacro
; A,(X)
%macro SPCaddr__X_ 0
mov bl,[spcX]
add ebx,[spcRamDP]
ReadByte
%endmacro
; A,labs+Y
%macro SPCaddr_LABS_Y 0
mov bl,[spcY]
add bx,[ebp]
add ebp,2
add ebx,spcRam
ReadByte
%endmacro
; A,(DP,X)
%macro SPCaddr_bDP_Xb 0
mov bl,[ebp]
add bl,[spcX]
xor eax,eax
add ebx,[spcRamDP]
inc ebp
mov ax, word [ebx]
mov ebx,eax
add ebx,spcRam
ReadByte
%endmacro
%macro SPCaddr_bDPb_Y 0
mov bl,[ebp]
xor eax,eax
add ebx,[spcRamDP]
inc ebp
mov ax,[ebx]
add ax,[spcY]
mov ebx,eax
add ebx,spcRam
ReadByte
%endmacro

View File

@@ -1,168 +1,167 @@
;Copyright (C) 1997-2001 ZSNES Team ( zsknight@zsnes.com / _demo_@zsnes.com )
;
;This program is free software; you can redistribute it and/or
;modify it under the terms of the GNU General Public License
;as published by the Free Software Foundation; either
;version 2 of the License, or (at your option) any later
;version.
;
;This program is distributed in the hope that it will be useful,
;but WITHOUT ANY WARRANTY; without even the implied warranty of
;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;GNU General Public License for more details.
;
;You should have received a copy of the GNU General Public License
;along with this program; if not, write to the Free Software
;Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
; move al at address ebx
; branch instructions
%macro spcbrancher 0
inc ebp
ret
.branch
movsx ebx,byte [ebp]
inc ebp
add ebp,ebx
ret
%endmacro
; tcall instruction
%macro spctcall 1
mov ebx,ebp
sub ebx,spcRam
mov eax,[spcS]
mov [spcRam+eax],bh
dec byte [spcS]
mov eax,[spcS]
mov [spcRam+eax],bl
dec byte [spcS]
mov bx,[spcextraram+%1]
test byte[spcRam+0F1h],80h
jnz %%finished
mov bx,[spcRam+0FFC0h+%1]
%%finished
add ebx,spcRam
mov ebp,ebx
ret
%endmacro
; SET1 instruction
%macro set1 1
mov bl,[ebp]
add ebx,[spcRamDP]
inc ebp
push ebx
ReadByte
pop ebx
or al,%1
WriteByte
ret
%endmacro
; CLR1 instruction
%macro clr1 1
mov bl,[ebp]
add ebx,[spcRamDP]
inc ebp
push ebx
ReadByte
pop ebx
and al,%1
WriteByte
ret
%endmacro
; BBS instruction
%macro bbs 1
mov bl,[ebp]
add ebx,[spcRamDP]
ReadByte
test al,%1
jnz .dp0jump
add ebp,2
ret
.dp0jump
movsx ebx,byte [ebp+1]
add ebp,ebx
add ebp,2
ret
%endmacro
; BBC instruction
%macro bbc 1
mov bl,[ebp]
add ebx,[spcRamDP]
ReadByte
test al,%1
jz .dp0jump
add ebp,2
ret
.dp0jump
movsx ebx,byte [ebp+1]
add ebp,ebx
add ebp,2
ret
%endmacro
; OR A, instruction
%macro SPC_OR_A 0
or byte [spcA], al
mov al,[spcA]
mov [spcNZ],al
ret
%endmacro
; AND A, instruction
%macro SPC_AND_A 0
and byte [spcA], al
mov al,[spcA]
mov [spcNZ],al
ret
%endmacro
; EOR A, instruction
%macro SPC_EOR_A 0
xor byte [spcA], al
mov al,[spcA]
mov [spcNZ],al
ret
%endmacro
; CMP A, instruction
%macro SPC_CMP_A 0
cmp byte [spcA], al
cmc
SPCSetFlagnzc
%endmacro
%macro SPC_ADC_A 0
mov cl,[spcP]
shr cl,1
adc byte [spcA], al
SPCSetFlagnvhzc
%endmacro
%macro SPC_SBC_A 0
mov cl,[spcP]
xor cl,1
shr cl,1
sbb byte [spcA], al
cmc
SPCSetFlagnvhzc
%endmacro
%macro SPC_MOV_A 0
mov byte [spcA], al
mov [spcNZ],al
ret
%endmacro

;Copyright (C) 1997-2001 ZSNES Team ( zsknight@zsnes.com / _demo_@zsnes.com )
;
;This program is free software; you can redistribute it and/or
;modify it under the terms of the GNU General Public License
;as published by the Free Software Foundation; either
;version 2 of the License, or (at your option) any later
;version.
;
;This program is distributed in the hope that it will be useful,
;but WITHOUT ANY WARRANTY; without even the implied warranty of
;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;GNU General Public License for more details.
;
;You should have received a copy of the GNU General Public License
;along with this program; if not, write to the Free Software
;Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
; move al at address ebx
; branch instructions
%macro spcbrancher 0
inc ebp
ret
.branch
movsx ebx,byte [ebp]
inc ebp
add ebp,ebx
ret
%endmacro
; tcall instruction
%macro spctcall 1
mov ebx,ebp
sub ebx,spcRam
mov eax,[spcS]
mov [spcRam+eax],bh
dec byte [spcS]
mov eax,[spcS]
mov [spcRam+eax],bl
dec byte [spcS]
mov bx,[spcextraram+%1]
test byte[spcRam+0F1h],80h
jnz %%finished
mov bx,[spcRam+0FFC0h+%1]
%%finished
add ebx,spcRam
mov ebp,ebx
ret
%endmacro
; SET1 instruction
%macro set1 1
mov bl,[ebp]
add ebx,[spcRamDP]
inc ebp
push ebx
ReadByte
pop ebx
or al,%1
WriteByte
ret
%endmacro
; CLR1 instruction
%macro clr1 1
mov bl,[ebp]
add ebx,[spcRamDP]
inc ebp
push ebx
ReadByte
pop ebx
and al,%1
WriteByte
ret
%endmacro
; BBS instruction
%macro bbs 1
mov bl,[ebp]
add ebx,[spcRamDP]
ReadByte
test al,%1
jnz .dp0jump
add ebp,2
ret
.dp0jump
movsx ebx,byte [ebp+1]
add ebp,ebx
add ebp,2
ret
%endmacro
; BBC instruction
%macro bbc 1
mov bl,[ebp]
add ebx,[spcRamDP]
ReadByte
test al,%1
jz .dp0jump
add ebp,2
ret
.dp0jump
movsx ebx,byte [ebp+1]
add ebp,ebx
add ebp,2
ret
%endmacro
; OR A, instruction
%macro SPC_OR_A 0
or byte [spcA], al
mov al,[spcA]
mov [spcNZ],al
ret
%endmacro
; AND A, instruction
%macro SPC_AND_A 0
and byte [spcA], al
mov al,[spcA]
mov [spcNZ],al
ret
%endmacro
; EOR A, instruction
%macro SPC_EOR_A 0
xor byte [spcA], al
mov al,[spcA]
mov [spcNZ],al
ret
%endmacro
; CMP A, instruction
%macro SPC_CMP_A 0
cmp byte [spcA], al
cmc
SPCSetFlagnzc
%endmacro
%macro SPC_ADC_A 0
mov cl,[spcP]
shr cl,1
adc byte [spcA], al
SPCSetFlagnvhzc
%endmacro
%macro SPC_SBC_A 0
mov cl,[spcP]
xor cl,1
shr cl,1
sbb byte [spcA], al
cmc
SPCSetFlagnvhzc
%endmacro
%macro SPC_MOV_A 0
mov byte [spcA], al
mov [spcNZ],al
ret
%endmacro

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff