mirror of
https://github.com/retro100/dosbox-wii.git
synced 2024-11-16 15:19:15 +01:00
211 lines
11 KiB
C++
211 lines
11 KiB
C++
/*
|
|
* Copyright (C) 2002-2019 The DOSBox Team
|
|
*
|
|
* 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.,
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
*/
|
|
|
|
#include "cpu.h"
|
|
|
|
|
|
Bit8u * lookupRMregb[]=
|
|
{
|
|
®_al,®_al,®_al,®_al,®_al,®_al,®_al,®_al,
|
|
®_cl,®_cl,®_cl,®_cl,®_cl,®_cl,®_cl,®_cl,
|
|
®_dl,®_dl,®_dl,®_dl,®_dl,®_dl,®_dl,®_dl,
|
|
®_bl,®_bl,®_bl,®_bl,®_bl,®_bl,®_bl,®_bl,
|
|
®_ah,®_ah,®_ah,®_ah,®_ah,®_ah,®_ah,®_ah,
|
|
®_ch,®_ch,®_ch,®_ch,®_ch,®_ch,®_ch,®_ch,
|
|
®_dh,®_dh,®_dh,®_dh,®_dh,®_dh,®_dh,®_dh,
|
|
®_bh,®_bh,®_bh,®_bh,®_bh,®_bh,®_bh,®_bh,
|
|
|
|
®_al,®_al,®_al,®_al,®_al,®_al,®_al,®_al,
|
|
®_cl,®_cl,®_cl,®_cl,®_cl,®_cl,®_cl,®_cl,
|
|
®_dl,®_dl,®_dl,®_dl,®_dl,®_dl,®_dl,®_dl,
|
|
®_bl,®_bl,®_bl,®_bl,®_bl,®_bl,®_bl,®_bl,
|
|
®_ah,®_ah,®_ah,®_ah,®_ah,®_ah,®_ah,®_ah,
|
|
®_ch,®_ch,®_ch,®_ch,®_ch,®_ch,®_ch,®_ch,
|
|
®_dh,®_dh,®_dh,®_dh,®_dh,®_dh,®_dh,®_dh,
|
|
®_bh,®_bh,®_bh,®_bh,®_bh,®_bh,®_bh,®_bh,
|
|
|
|
®_al,®_al,®_al,®_al,®_al,®_al,®_al,®_al,
|
|
®_cl,®_cl,®_cl,®_cl,®_cl,®_cl,®_cl,®_cl,
|
|
®_dl,®_dl,®_dl,®_dl,®_dl,®_dl,®_dl,®_dl,
|
|
®_bl,®_bl,®_bl,®_bl,®_bl,®_bl,®_bl,®_bl,
|
|
®_ah,®_ah,®_ah,®_ah,®_ah,®_ah,®_ah,®_ah,
|
|
®_ch,®_ch,®_ch,®_ch,®_ch,®_ch,®_ch,®_ch,
|
|
®_dh,®_dh,®_dh,®_dh,®_dh,®_dh,®_dh,®_dh,
|
|
®_bh,®_bh,®_bh,®_bh,®_bh,®_bh,®_bh,®_bh,
|
|
|
|
®_al,®_al,®_al,®_al,®_al,®_al,®_al,®_al,
|
|
®_cl,®_cl,®_cl,®_cl,®_cl,®_cl,®_cl,®_cl,
|
|
®_dl,®_dl,®_dl,®_dl,®_dl,®_dl,®_dl,®_dl,
|
|
®_bl,®_bl,®_bl,®_bl,®_bl,®_bl,®_bl,®_bl,
|
|
®_ah,®_ah,®_ah,®_ah,®_ah,®_ah,®_ah,®_ah,
|
|
®_ch,®_ch,®_ch,®_ch,®_ch,®_ch,®_ch,®_ch,
|
|
®_dh,®_dh,®_dh,®_dh,®_dh,®_dh,®_dh,®_dh,
|
|
®_bh,®_bh,®_bh,®_bh,®_bh,®_bh,®_bh,®_bh
|
|
};
|
|
|
|
Bit16u * lookupRMregw[]={
|
|
®_ax,®_ax,®_ax,®_ax,®_ax,®_ax,®_ax,®_ax,
|
|
®_cx,®_cx,®_cx,®_cx,®_cx,®_cx,®_cx,®_cx,
|
|
®_dx,®_dx,®_dx,®_dx,®_dx,®_dx,®_dx,®_dx,
|
|
®_bx,®_bx,®_bx,®_bx,®_bx,®_bx,®_bx,®_bx,
|
|
®_sp,®_sp,®_sp,®_sp,®_sp,®_sp,®_sp,®_sp,
|
|
®_bp,®_bp,®_bp,®_bp,®_bp,®_bp,®_bp,®_bp,
|
|
®_si,®_si,®_si,®_si,®_si,®_si,®_si,®_si,
|
|
®_di,®_di,®_di,®_di,®_di,®_di,®_di,®_di,
|
|
|
|
®_ax,®_ax,®_ax,®_ax,®_ax,®_ax,®_ax,®_ax,
|
|
®_cx,®_cx,®_cx,®_cx,®_cx,®_cx,®_cx,®_cx,
|
|
®_dx,®_dx,®_dx,®_dx,®_dx,®_dx,®_dx,®_dx,
|
|
®_bx,®_bx,®_bx,®_bx,®_bx,®_bx,®_bx,®_bx,
|
|
®_sp,®_sp,®_sp,®_sp,®_sp,®_sp,®_sp,®_sp,
|
|
®_bp,®_bp,®_bp,®_bp,®_bp,®_bp,®_bp,®_bp,
|
|
®_si,®_si,®_si,®_si,®_si,®_si,®_si,®_si,
|
|
®_di,®_di,®_di,®_di,®_di,®_di,®_di,®_di,
|
|
|
|
®_ax,®_ax,®_ax,®_ax,®_ax,®_ax,®_ax,®_ax,
|
|
®_cx,®_cx,®_cx,®_cx,®_cx,®_cx,®_cx,®_cx,
|
|
®_dx,®_dx,®_dx,®_dx,®_dx,®_dx,®_dx,®_dx,
|
|
®_bx,®_bx,®_bx,®_bx,®_bx,®_bx,®_bx,®_bx,
|
|
®_sp,®_sp,®_sp,®_sp,®_sp,®_sp,®_sp,®_sp,
|
|
®_bp,®_bp,®_bp,®_bp,®_bp,®_bp,®_bp,®_bp,
|
|
®_si,®_si,®_si,®_si,®_si,®_si,®_si,®_si,
|
|
®_di,®_di,®_di,®_di,®_di,®_di,®_di,®_di,
|
|
|
|
®_ax,®_ax,®_ax,®_ax,®_ax,®_ax,®_ax,®_ax,
|
|
®_cx,®_cx,®_cx,®_cx,®_cx,®_cx,®_cx,®_cx,
|
|
®_dx,®_dx,®_dx,®_dx,®_dx,®_dx,®_dx,®_dx,
|
|
®_bx,®_bx,®_bx,®_bx,®_bx,®_bx,®_bx,®_bx,
|
|
®_sp,®_sp,®_sp,®_sp,®_sp,®_sp,®_sp,®_sp,
|
|
®_bp,®_bp,®_bp,®_bp,®_bp,®_bp,®_bp,®_bp,
|
|
®_si,®_si,®_si,®_si,®_si,®_si,®_si,®_si,
|
|
®_di,®_di,®_di,®_di,®_di,®_di,®_di,®_di
|
|
};
|
|
|
|
Bit32u * lookupRMregd[256]={
|
|
®_eax,®_eax,®_eax,®_eax,®_eax,®_eax,®_eax,®_eax,
|
|
®_ecx,®_ecx,®_ecx,®_ecx,®_ecx,®_ecx,®_ecx,®_ecx,
|
|
®_edx,®_edx,®_edx,®_edx,®_edx,®_edx,®_edx,®_edx,
|
|
®_ebx,®_ebx,®_ebx,®_ebx,®_ebx,®_ebx,®_ebx,®_ebx,
|
|
®_esp,®_esp,®_esp,®_esp,®_esp,®_esp,®_esp,®_esp,
|
|
®_ebp,®_ebp,®_ebp,®_ebp,®_ebp,®_ebp,®_ebp,®_ebp,
|
|
®_esi,®_esi,®_esi,®_esi,®_esi,®_esi,®_esi,®_esi,
|
|
®_edi,®_edi,®_edi,®_edi,®_edi,®_edi,®_edi,®_edi,
|
|
|
|
®_eax,®_eax,®_eax,®_eax,®_eax,®_eax,®_eax,®_eax,
|
|
®_ecx,®_ecx,®_ecx,®_ecx,®_ecx,®_ecx,®_ecx,®_ecx,
|
|
®_edx,®_edx,®_edx,®_edx,®_edx,®_edx,®_edx,®_edx,
|
|
®_ebx,®_ebx,®_ebx,®_ebx,®_ebx,®_ebx,®_ebx,®_ebx,
|
|
®_esp,®_esp,®_esp,®_esp,®_esp,®_esp,®_esp,®_esp,
|
|
®_ebp,®_ebp,®_ebp,®_ebp,®_ebp,®_ebp,®_ebp,®_ebp,
|
|
®_esi,®_esi,®_esi,®_esi,®_esi,®_esi,®_esi,®_esi,
|
|
®_edi,®_edi,®_edi,®_edi,®_edi,®_edi,®_edi,®_edi,
|
|
|
|
®_eax,®_eax,®_eax,®_eax,®_eax,®_eax,®_eax,®_eax,
|
|
®_ecx,®_ecx,®_ecx,®_ecx,®_ecx,®_ecx,®_ecx,®_ecx,
|
|
®_edx,®_edx,®_edx,®_edx,®_edx,®_edx,®_edx,®_edx,
|
|
®_ebx,®_ebx,®_ebx,®_ebx,®_ebx,®_ebx,®_ebx,®_ebx,
|
|
®_esp,®_esp,®_esp,®_esp,®_esp,®_esp,®_esp,®_esp,
|
|
®_ebp,®_ebp,®_ebp,®_ebp,®_ebp,®_ebp,®_ebp,®_ebp,
|
|
®_esi,®_esi,®_esi,®_esi,®_esi,®_esi,®_esi,®_esi,
|
|
®_edi,®_edi,®_edi,®_edi,®_edi,®_edi,®_edi,®_edi,
|
|
|
|
®_eax,®_eax,®_eax,®_eax,®_eax,®_eax,®_eax,®_eax,
|
|
®_ecx,®_ecx,®_ecx,®_ecx,®_ecx,®_ecx,®_ecx,®_ecx,
|
|
®_edx,®_edx,®_edx,®_edx,®_edx,®_edx,®_edx,®_edx,
|
|
®_ebx,®_ebx,®_ebx,®_ebx,®_ebx,®_ebx,®_ebx,®_ebx,
|
|
®_esp,®_esp,®_esp,®_esp,®_esp,®_esp,®_esp,®_esp,
|
|
®_ebp,®_ebp,®_ebp,®_ebp,®_ebp,®_ebp,®_ebp,®_ebp,
|
|
®_esi,®_esi,®_esi,®_esi,®_esi,®_esi,®_esi,®_esi,
|
|
®_edi,®_edi,®_edi,®_edi,®_edi,®_edi,®_edi,®_edi
|
|
};
|
|
|
|
|
|
Bit8u * lookupRMEAregb[256]={
|
|
/* 12 lines of 16*0 should give nice errors when used */
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
®_al,®_cl,®_dl,®_bl,®_ah,®_ch,®_dh,®_bh,
|
|
®_al,®_cl,®_dl,®_bl,®_ah,®_ch,®_dh,®_bh,
|
|
®_al,®_cl,®_dl,®_bl,®_ah,®_ch,®_dh,®_bh,
|
|
®_al,®_cl,®_dl,®_bl,®_ah,®_ch,®_dh,®_bh,
|
|
®_al,®_cl,®_dl,®_bl,®_ah,®_ch,®_dh,®_bh,
|
|
®_al,®_cl,®_dl,®_bl,®_ah,®_ch,®_dh,®_bh,
|
|
®_al,®_cl,®_dl,®_bl,®_ah,®_ch,®_dh,®_bh,
|
|
®_al,®_cl,®_dl,®_bl,®_ah,®_ch,®_dh,®_bh
|
|
};
|
|
|
|
Bit16u * lookupRMEAregw[256]={
|
|
/* 12 lines of 16*0 should give nice errors when used */
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
®_ax,®_cx,®_dx,®_bx,®_sp,®_bp,®_si,®_di,
|
|
®_ax,®_cx,®_dx,®_bx,®_sp,®_bp,®_si,®_di,
|
|
®_ax,®_cx,®_dx,®_bx,®_sp,®_bp,®_si,®_di,
|
|
®_ax,®_cx,®_dx,®_bx,®_sp,®_bp,®_si,®_di,
|
|
®_ax,®_cx,®_dx,®_bx,®_sp,®_bp,®_si,®_di,
|
|
®_ax,®_cx,®_dx,®_bx,®_sp,®_bp,®_si,®_di,
|
|
®_ax,®_cx,®_dx,®_bx,®_sp,®_bp,®_si,®_di,
|
|
®_ax,®_cx,®_dx,®_bx,®_sp,®_bp,®_si,®_di
|
|
};
|
|
|
|
Bit32u * lookupRMEAregd[256]={
|
|
/* 12 lines of 16*0 should give nice errors when used */
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
®_eax,®_ecx,®_edx,®_ebx,®_esp,®_ebp,®_esi,®_edi,
|
|
®_eax,®_ecx,®_edx,®_ebx,®_esp,®_ebp,®_esi,®_edi,
|
|
®_eax,®_ecx,®_edx,®_ebx,®_esp,®_ebp,®_esi,®_edi,
|
|
®_eax,®_ecx,®_edx,®_ebx,®_esp,®_ebp,®_esi,®_edi,
|
|
®_eax,®_ecx,®_edx,®_ebx,®_esp,®_ebp,®_esi,®_edi,
|
|
®_eax,®_ecx,®_edx,®_ebx,®_esp,®_ebp,®_esi,®_edi,
|
|
®_eax,®_ecx,®_edx,®_ebx,®_esp,®_ebp,®_esi,®_edi,
|
|
®_eax,®_ecx,®_edx,®_ebx,®_esp,®_ebp,®_esi,®_edi
|
|
};
|
|
|
|
|