DOSBox-X
|
00001 /* 00002 * Copyright (C) 2002-2020 The DOSBox Team 00003 * 00004 * This program is free software; you can redistribute it and/or modify 00005 * it under the terms of the GNU General Public License as published by 00006 * the Free Software Foundation; either version 2 of the License, or 00007 * (at your option) any later version. 00008 * 00009 * This program is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 * GNU General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU General Public License along 00015 * with this program; if not, write to the Free Software Foundation, Inc., 00016 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 00017 */ 00018 00019 00020 #include "dosbox.h" 00021 #include "mem.h" 00022 #include "bios.h" 00023 #include "inout.h" 00024 #include "int10.h" 00025 00026 bool rom_bios_vptable_enable = true; 00027 00028 const Bit8u vparams[] = { 00029 // 40x25 mode 0 and 1 crtc registers 00030 0x38, 0x28, 0x2d, 0x0a, 0x1f, 0x06, 0x19, 0x1c, 0x02, 0x07, 0x06, 0x07, 0,0,0,0, 00031 // 80x25 mode 2 and 3 crtc registers 00032 0x71, 0x50, 0x5a, 0x0a, 0x1f, 0x06, 0x19, 0x1c, 0x02, 0x07, 0x06, 0x07, 0,0,0,0, 00033 // graphics modes 4, 5 and 6 00034 0x38, 0x28, 0x2d, 0x0a, 0x7f, 0x06, 0x64, 0x70, 0x02, 0x01, 0x06, 0x07, 0,0,0,0, 00035 // mode 7 MDA text 00036 0x61, 0x50, 0x52, 0x0f, 0x19, 0x06, 0x19, 0x19, 0x02, 0x0d, 0x0b, 0x0c, 0,0,0,0, 00037 // buffer length words 2048, 4096, 16384, 16384 00038 0x00, 0x08, 0x00, 0x10, 0x00, 0x40, 0x00, 0x40, 00039 // columns 00040 40, 40, 80, 80, 40, 40, 80, 80, 00041 // CGA mode register 00042 0x2c, 0x28, 0x2d, 0x29, 0x2a, 0x2e, 0x1e, 0x29 00043 }; 00044 00045 const Bit8u vparams_pcjr[] = { 00046 // 40x25 mode 0 and 1 crtc registers 00047 0x38, 0x28, 0x2c, 0x06, 0x1f, 0x06, 0x19, 0x1c, 0x02, 0x07, 0x06, 0x07, 0,0,0,0, 00048 // 80x25 mode 2 and 3 crtc registers 00049 0x71, 0x50, 0x5a, 0x0c, 0x1f, 0x06, 0x19, 0x1c, 0x02, 0x07, 0x06, 0x07, 0,0,0,0, 00050 // graphics modes 4, 5, 6, 8 00051 0x38, 0x28, 0x2b, 0x06, 0x7f, 0x06, 0x64, 0x70, 0x02, 0x01, 0x26, 0x07, 0,0,0,0, 00052 // other graphics modes 00053 0x71, 0x50, 0x56, 0x0c, 0x3f, 0x06, 0x32, 0x38, 0x02, 0x03, 0x26, 0x07, 0,0,0,0, 00054 // buffer length words 2048, 4096, 16384, 16384 00055 0x00, 0x08, 0x00, 0x10, 0x00, 0x40, 0x00, 0x40, 00056 // columns 00057 40, 40, 80, 80, 40, 40, 80, 80, 00058 // CGA mode register 00059 0x2c, 0x28, 0x2d, 0x29, 0x2a, 0x2e, 0x1e, 0x29 00060 }; 00061 00062 const Bit8u vparams_tandy[] = { 00063 // 40x25 mode 0 and 1 crtc registers 00064 0x38, 0x28, 0x2c, 0x08, 0x1f, 0x06, 0x19, 0x1c, 0x02, 0x07, 0x06, 0x07, 0,0,0,0, 00065 // 80x25 mode 2 and 3 crtc registers 00066 0x71, 0x50, 0x58, 0x10, 0x1f, 0x06, 0x19, 0x1c, 0x02, 0x07, 0x06, 0x07, 0,0,0,0, 00067 // graphics modes 4, 5 and 6 00068 0x38, 0x28, 0x2c, 0x08, 0x7f, 0x06, 0x64, 0x70, 0x02, 0x01, 0x06, 0x07, 0,0,0,0, 00069 // graphics mode 7 00070 0x71, 0x50, 0x58, 0x10, 0x3f, 0x06, 0x32, 0x38, 0x02, 0x03, 0x06, 0x07, 0,0,0,0, 00071 // buffer length words 2048, 4096, 16384, 16384 00072 0x00, 0x08, 0x00, 0x10, 0x00, 0x40, 0x00, 0x40, 00073 // columns 00074 40, 40, 80, 80, 40, 40, 80, 80, 00075 // CGA mode register 00076 0x2c, 0x28, 0x2d, 0x29, 0x2a, 0x2e, 0x1e, 0x29 00077 }; 00078 00079 #if 0//unused 00080 const Bit8u vparams_tandy_td[] = { 00081 // 40x25 mode 0 and 1 crtc registers 00082 0x38, 0x28, 0x2d, 0x0a, 0x1f, 0x06, 0x19, 0x1c, 0x02, 0x07, 0x06, 0x07, 0,0,0,0, 00083 // 80x25 mode 2 and 3 crtc registers 00084 0x71, 0x50, 0x5a, 0x0a, 0x1f, 0x06, 0x19, 0x1c, 0x02, 0x07, 0x06, 0x07, 0,0,0,0, 00085 // graphics modes 4, 5 and 6 00086 0x38, 0x28, 0x2d, 0x0a, 0x7f, 0x06, 0x64, 0x70, 0x02, 0x01, 0x06, 0x07, 0,0,0,0, 00087 // mode 7 MDA text 00088 0x61, 0x50, 0x52, 0x0f, 0x19, 0x06, 0x19, 0x19, 0x02, 0x0d, 0x0b, 0x0c, 0,0,0,0, 00089 // ?? mode 2 and 3 crtc registers 00090 0x71, 0x50, 0x5a, 0x0a, 0x3f, 0x06, 0x32, 0x38, 0x02, 0x03, 0x06, 0x07, 0,0,0,0, 00091 // buffer length words 2048, 4096, 16384, 16384 00092 0x00, 0x08, 0x00, 0x10, 0x00, 0x40, 0x00, 0x40, 00093 // columns 00094 40, 40, 80, 80, 40, 40, 80, 80, 00095 // CGA mode register 00096 0x2c, 0x28, 0x2d, 0x29, 0x2a, 0x2e, 0x1e, 0x29 00097 }; 00098 #endif 00099 00100 00101 static Bit8u video_parameter_table_vga[0x40*0x1d]={ 00102 // video parameter table for mode 0 (cga emulation) 00103 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00104 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00105 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00106 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00107 // video parameter table for mode 1 (cga emulation) 00108 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00109 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00110 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00111 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00112 // video parameter table for mode 2 (cga emulation) 00113 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00114 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00115 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00116 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00117 // video parameter table for mode 3 (cga emulation) 00118 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00119 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00120 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00121 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00122 // video parameter table for mode 4 00123 0x28, 0x18, 0x08, 0x00, 0x40, // bios data 00124 0x09, 0x00, 0x00, 0x02, // sequencer registers 00125 0x63, // misc output registers 00126 0x2d, 0x27, 0x28, 0x90, 0x2b, 0x80, 0xbf, 0x1f, // crtc registers 0-7 00127 0x00, 0xc1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // crtc registers 8-15 00128 0x9c, 0x8e, 0x8f, 0x14, 0x00, 0x96, 0xb9, 0xa2, 0xff, // crtc registers 16-24 00129 0x00, 0x13, 0x15, 0x17, 0x02, 0x04, 0x06, 0x07, // attr registers 0-7 00130 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, // attr registers 8-15 00131 0x01, 0x00, 0x0f, 0x00, // attr registers 16-19 00132 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x0f, 0x0f, 0xff, // graphics registers 0-8 00133 // video parameter table for mode 5 00134 0x28, 0x18, 0x08, 0x00, 0x40, // bios data 00135 0x09, 0x00, 0x00, 0x02, // sequencer registers 00136 0x63, // misc output registers 00137 0x2d, 0x27, 0x28, 0x90, 0x2b, 0x80, 0xbf, 0x1f, // crtc registers 0-7 00138 0x00, 0xc1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // crtc registers 8-15 00139 0x9c, 0x8e, 0x8f, 0x14, 0x00, 0x96, 0xb9, 0xa2, 0xff, // crtc registers 16-24 00140 0x00, 0x13, 0x15, 0x17, 0x02, 0x04, 0x06, 0x07, // attr registers 0-7 00141 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, // attr registers 8-15 00142 0x01, 0x00, 0x0f, 0x00, // attr registers 16-19 00143 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x0f, 0x0f, 0xff, // graphics registers 0-8 00144 // video parameter table for mode 6 00145 0x50, 0x18, 0x08, 0x00, 0x40, // bios data 00146 0x09, 0x0f, 0x00, 0x02, // sequencer registers 00147 0x63, // misc output registers 00148 0x5f, 0x4f, 0x50, 0x82, 0x54, 0x80, 0xbf, 0x1f, // crtc registers 0-7 00149 0x00, 0xc1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // crtc registers 8-15 00150 0x9c, 0x8e, 0x8f, 0x28, 0x00, 0x96, 0xb9, 0xc2, 0xff, // crtc registers 16-24 00151 0x00, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, // attr registers 0-7 00152 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, // attr registers 8-15 00153 0x01, 0x00, 0x01, 0x00, // attr registers 16-19 00154 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0xff, // graphics registers 0-8 00155 // video parameter table for mode 7 00156 0x50, 0x18, 0x10, 0x00, 0x10, // bios data 00157 0x00, 0x0f, 0x00, 0x07, // sequencer registers 00158 0x66, // misc output registers 00159 0x5f, 0x4f, 0x50, 0x82, 0x55, 0x81, 0xbf, 0x1f, // crtc registers 0-7 00160 0x00, 0x4f, 0x0d, 0x0e, 0x00, 0x00, 0x00, 0x00, // crtc registers 8-15 00161 0x9c, 0x8e, 0x8f, 0x28, 0x0f, 0x96, 0xb9, 0xa3, 0xff, // crtc registers 16-24 00162 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x14, 0x07, // attr registers 0-7 00163 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, // attr registers 8-15 00164 0x0c, 0x00, 0x0f, 0x08, // attr registers 16-19 00165 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x0a, 0x0f, 0xff, // graphics registers 0-8 00166 // video parameter table for mode 8 00167 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00168 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00169 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00170 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00171 // video parameter table for mode 9 00172 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00173 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00174 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00175 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00176 // video parameter table for mode a 00177 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00178 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00179 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00180 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00181 // video parameter table for mode b 00182 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00183 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00184 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00185 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00186 // video parameter table for mode c 00187 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00188 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00189 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00190 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00191 // video parameter table for mode d 00192 0x28, 0x18, 0x08, 0x00, 0x20, // bios data 00193 0x09, 0x0f, 0x00, 0x02, // sequencer registers 00194 0x63, // misc output registers 00195 0x2d, 0x27, 0x28, 0x90, 0x2b, 0x80, 0xbf, 0x1f, // crtc registers 0-7 00196 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // crtc registers 8-15 00197 0x9c, 0x8e, 0x8f, 0x14, 0x00, 0x96, 0xb9, 0xe3, 0xff, // crtc registers 16-24 00198 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, // attr registers 0-7 00199 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, // attr registers 8-15 00200 0x01, 0x00, 0x0f, 0x00, // attr registers 16-19 00201 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x0f, 0xff, // graphics registers 0-8 00202 // video parameter table for mode e 00203 0x50, 0x18, 0x08, 0x00, 0x40, // bios data 00204 0x01, 0x0f, 0x00, 0x02, // sequencer registers 00205 0x63, // misc output registers 00206 0x5f, 0x4f, 0x50, 0x82, 0x54, 0x80, 0xbf, 0x1f, // crtc registers 0-7 00207 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // crtc registers 8-15 00208 0x9c, 0x8e, 0x8f, 0x28, 0x00, 0x96, 0xb9, 0xe3, 0xff, // crtc registers 16-24 00209 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, // attr registers 0-7 00210 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, // attr registers 8-15 00211 0x01, 0x00, 0x0f, 0x00, // attr registers 16-19 00212 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x0f, 0xff, // graphics registers 0-8 00213 // video parameter table for mode f (64k graphics memory) 00214 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00215 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00216 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00217 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00218 // video parameter table for mode 10 (64k graphics memory) 00219 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00220 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00221 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00222 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00223 // video parameter table for mode f (>64k graphics memory) 00224 0x50, 0x18, 0x0e, 0x00, 0x80, // bios data 00225 0x01, 0x0f, 0x00, 0x02, // sequencer registers 00226 0xa2, // misc output registers 00227 0x5f, 0x4f, 0x50, 0x82, 0x54, 0x80, 0xbf, 0x1f, // crtc registers 0-7 00228 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // crtc registers 8-15 00229 0x83, 0x85, 0x5d, 0x28, 0x0f, 0x63, 0xba, 0xe3, 0xff, // crtc registers 16-24 00230 0x00, 0x08, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, // attr registers 0-7 00231 0x00, 0x08, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, // attr registers 8-15 00232 0x0b, 0x00, 0x0f, 0x00, // attr registers 16-19 00233 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x0f, 0xff, // graphics registers 0-8 00234 // video parameter table for mode 10 (>64k graphics memory) 00235 0x50, 0x18, 0x0e, 0x00, 0x80, // bios data 00236 0x01, 0x0f, 0x00, 0x02, // sequencer registers 00237 0xa3, // misc output registers 00238 0x5f, 0x4f, 0x50, 0x82, 0x54, 0x80, 0xbf, 0x1f, // crtc registers 0-7 00239 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // crtc registers 8-15 00240 0x83, 0x85, 0x5d, 0x28, 0x0f, 0x63, 0xba, 0xe3, 0xff, // crtc registers 16-24 00241 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x14, 0x07, // attr registers 0-7 00242 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, // attr registers 8-15 00243 0x01, 0x00, 0x0f, 0x00, // attr registers 16-19 00244 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x0f, 0xff, // graphics registers 0-8 00245 // video parameter table for mode 0 (350 lines) 00246 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00247 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00248 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00249 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00250 // video parameter table for mode 1 (350 lines) 00251 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00252 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00253 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00254 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00255 // video parameter table for mode 2 (350 lines) 00256 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00257 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00258 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00259 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00260 // video parameter table for mode 3 (350 lines) 00261 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00262 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00263 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00264 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00265 // video parameter table for mode e 00266 0x28, 0x18, 0x10, 0x00, 0x08, // bios data 00267 0x08, 0x0f, 0x00, 0x07, // sequencer registers 00268 0x67, // misc output registers 00269 0x2d, 0x27, 0x28, 0x90, 0x2b, 0xa0, 0xbf, 0x1f, // crtc registers 0-7 00270 0x00, 0x4f, 0x0d, 0x0e, 0x00, 0x00, 0x00, 0x00, // crtc registers 8-15 00271 0x9c, 0x8e, 0x8f, 0x14, 0x1f, 0x96, 0xb9, 0xa3, 0xff, // crtc registers 16-24 00272 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x14, 0x07, // attr registers 0-7 00273 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, // attr registers 8-15 00274 0x0c, 0x00, 0x0f, 0x08, // attr registers 16-19 00275 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x0e, 0x0f, 0xff, // graphics registers 0-8 00276 // video parameter table for mode f 00277 0x50, 0x18, 0x10, 0x00, 0x10, // bios data 00278 0x00, 0x0f, 0x00, 0x07, // sequencer registers 00279 0x67, // misc output registers 00280 0x5f, 0x4f, 0x50, 0x82, 0x55, 0x81, 0xbf, 0x1f, // crtc registers 0-7 00281 0x00, 0x4f, 0x0d, 0x0e, 0x00, 0x00, 0x00, 0x00, // crtc registers 8-15 00282 0x9c, 0x8e, 0x8f, 0x28, 0x1f, 0x96, 0xb9, 0xa3, 0xff, // crtc registers 16-24 00283 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x14, 0x07, // attr registers 0-7 00284 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, // attr registers 8-15 00285 0x0c, 0x00, 0x0f, 0x08, // attr registers 16-19 00286 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x0e, 0x0f, 0xff, // graphics registers 0-8 00287 // video parameter table for mode 10 00288 0x50, 0x18, 0x10, 0x00, 0x10, // bios data 00289 0x00, 0x0f, 0x00, 0x07, // sequencer registers 00290 0x66, // misc output registers 00291 0x5f, 0x4f, 0x50, 0x82, 0x55, 0x81, 0xbf, 0x1f, // crtc registers 0-7 00292 0x00, 0x4f, 0x0d, 0x0e, 0x00, 0x00, 0x00, 0x00, // crtc registers 8-15 00293 0x9c, 0x8e, 0x8f, 0x28, 0x0f, 0x96, 0xb9, 0xa3, 0xff, // crtc registers 16-24 00294 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x14, 0x07, // attr registers 0-7 00295 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, // attr registers 8-15 00296 0x0c, 0x00, 0x0f, 0x08, // attr registers 16-19 00297 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x0a, 0x0f, 0xff, // graphics registers 0-8 00298 // video parameter table for mode 11 00299 0x50, 0x1d, 0x10, 0x00, 0xa0, // bios data 00300 0x01, 0x0f, 0x00, 0x02, // sequencer registers 00301 0xe3, // misc output registers 00302 0x5f, 0x4f, 0x50, 0x82, 0x54, 0x80, 0x0b, 0x3e, // crtc registers 0-7 00303 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // crtc registers 8-15 00304 0xea, 0x8c, 0xdf, 0x28, 0x00, 0xe7, 0x04, 0xc3, 0xff, // crtc registers 16-24 00305 0x00, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, // attr registers 0-7 00306 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, // attr registers 8-15 00307 0x01, 0x00, 0x0f, 0x00, // attr registers 16-19 00308 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x0f, 0xff, // graphics registers 0-8 00309 // video parameter table for mode 12 00310 0x50, 0x1d, 0x10, 0x00, 0xa0, // bios data 00311 0x01, 0x0f, 0x00, 0x02, // sequencer registers 00312 0xe3, // misc output registers 00313 0x5f, 0x4f, 0x50, 0x82, 0x54, 0x80, 0x0b, 0x3e, // crtc registers 0-7 00314 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // crtc registers 8-15 00315 0xea, 0x8c, 0xdf, 0x28, 0x00, 0xe7, 0x04, 0xe3, 0xff, // crtc registers 16-24 00316 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x14, 0x07, // attr registers 0-7 00317 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, // attr registers 8-15 00318 0x01, 0x00, 0x0f, 0x00, // attr registers 16-19 00319 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x0f, 0xff, // graphics registers 0-8 00320 // video parameter table for mode 13 00321 0x28, 0x18, 0x08, 0x00, 0x20, // bios data 00322 0x01, 0x0f, 0x00, 0x0e, // sequencer registers 00323 0x63, // misc output registers 00324 0x5f, 0x4f, 0x50, 0x82, 0x54, 0x80, 0xbf, 0x1f, // crtc registers 0-7 00325 0x00, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // crtc registers 8-15 00326 0x9c, 0x8e, 0x8f, 0x28, 0x40, 0x96, 0xb9, 0xa3, 0xff, // crtc registers 16-24 00327 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, // attr registers 0-7 00328 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, // attr registers 8-15 00329 0x41, 0x00, 0x0f, 0x00, // attr registers 16-19 00330 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x05, 0x0f, 0xff // graphics registers 0-8 00331 }; 00332 00333 static Bit8u video_parameter_table_ega[0x40*0x17]={ 00334 // video parameter table for mode 0 (cga emulation) 00335 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00336 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00337 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00338 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00339 // video parameter table for mode 1 (cga emulation) 00340 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00341 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00342 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00343 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00344 // video parameter table for mode 2 (cga emulation) 00345 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00346 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00347 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00348 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00349 // video parameter table for mode 3 (cga emulation) 00350 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00351 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00352 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00353 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00354 // video parameter table for mode 4 00355 0x28, 0x18, 0x08, 0x00, 0x40, // bios data 00356 0x09, 0x03, 0x00, 0x02, // sequencer registers 00357 0x63, // misc output registers 00358 0x37, 0x27, 0x28, 0x9a, 0x2b, 0x8a, 0x04, 0x11, // crtc registers 0-7 00359 0x00, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // crtc registers 8-15 00360 0xd4, 0x86, 0xc7, 0x14, 0x00, 0xd0, 0xfc, 0xb2, 0xff, // crtc registers 16-24 00361 0x00, 0x13, 0x15, 0x17, 0x02, 0x04, 0x06, 0x07, // attr registers 0-7 00362 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, // attr registers 8-15 00363 0x01, 0x00, 0x0f, 0x00, // attr registers 16-19 00364 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x0f, 0x0f, 0xff, // graphics registers 0-8 00365 // video parameter table for mode 5 00366 0x28, 0x18, 0x08, 0x00, 0x40, // bios data 00367 0x09, 0x03, 0x00, 0x02, // sequencer registers 00368 0x63, // misc output registers 00369 0x37, 0x27, 0x28, 0x9a, 0x2b, 0x8a, 0x04, 0x11, // crtc registers 0-7 00370 0x00, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // crtc registers 8-15 00371 0xd4, 0x86, 0xc7, 0x14, 0x00, 0xd0, 0xfc, 0xb2, 0xff, // crtc registers 16-24 00372 0x00, 0x13, 0x15, 0x17, 0x02, 0x04, 0x06, 0x07, // attr registers 0-7 00373 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, // attr registers 8-15 00374 0x01, 0x00, 0x0f, 0x00, // attr registers 16-19 00375 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x0f, 0x0f, 0xff, // graphics registers 0-8 00376 // video parameter table for mode 6 00377 0x50, 0x18, 0x08, 0x00, 0x40, // bios data 00378 0x01, 0x0f, 0x00, 0x06, // sequencer registers 00379 0x63, // misc output registers 00380 0x73, 0x4f, 0x50, 0x96, 0x54, 0x94, 0x04, 0x11, // crtc registers 0-7 00381 0x00, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // crtc registers 8-15 00382 0xd4, 0x86, 0xc7, 0x28, 0x00, 0xd0, 0xfc, 0xd2, 0xff, // crtc registers 16-24 00383 0x00, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, // attr registers 0-7 00384 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, // attr registers 8-15 00385 0x01, 0x00, 0x01, 0x00, // attr registers 16-19 00386 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0d, 0x0f, 0xff, // graphics registers 0-8 00387 // video parameter table for mode 7 00388 0x50, 0x18, 0x0e, 0x00, 0x10, // bios data 00389 0x00, 0x0f, 0x00, 0x03, // sequencer registers 00390 0xa2, // misc output registers 00391 0x73, 0x4f, 0x50, 0x96, 0x55, 0x95, 0xb6, 0x1f, // crtc registers 0-7 00392 0x00, 0x4d, 0x0b, 0x0c, 0x00, 0x00, 0x00, 0x00, // crtc registers 8-15 00393 0x83, 0x85, 0x5d, 0x28, 0x0f, 0x63, 0xb1, 0xb3, 0xff, // crtc registers 16-24 00394 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, // attr registers 0-7 00395 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, // attr registers 8-15 00396 0x08, 0x00, 0x0f, 0x00, // attr registers 16-19 00397 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x0e, 0x0f, 0xff, // graphics registers 0-8 00398 // video parameter table for mode 8 00399 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00400 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00401 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00402 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00403 // video parameter table for mode 9 00404 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00405 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00406 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00407 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00408 // video parameter table for mode a 00409 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00410 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00411 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00412 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00413 // video parameter table for mode b 00414 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00415 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00416 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00417 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00418 // video parameter table for mode c 00419 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00420 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00421 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00422 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00423 // video parameter table for mode d 00424 0x28, 0x18, 0x08, 0x00, 0x20, // bios data 00425 0x09, 0x0f, 0x00, 0x06, // sequencer registers 00426 0x63, // misc output registers 00427 0x37, 0x27, 0x28, 0x9a, 0x2b, 0x8a, 0x04, 0x11, // crtc registers 0-7 00428 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // crtc registers 8-15 00429 0xd4, 0x86, 0xc7, 0x14, 0x00, 0xd0, 0xfc, 0xd3, 0xff, // crtc registers 16-24 00430 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, // attr registers 0-7 00431 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, // attr registers 8-15 00432 0x01, 0x00, 0x0f, 0x00, // attr registers 16-19 00433 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x0f, 0xff, // graphics registers 0-8 00434 // video parameter table for mode e 00435 0x50, 0x18, 0x08, 0x00, 0x40, // bios data 00436 0x01, 0x0f, 0x00, 0x06, // sequencer registers 00437 0x63, // misc output registers 00438 0x73, 0x4f, 0x50, 0x96, 0x54, 0x94, 0x04, 0x11, // crtc registers 0-7 00439 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // crtc registers 8-15 00440 0xd4, 0x86, 0xc7, 0x28, 0x00, 0xd0, 0xfc, 0xd3, 0xff, // crtc registers 16-24 00441 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, // attr registers 0-7 00442 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, // attr registers 8-15 00443 0x01, 0x00, 0x0f, 0x00, // attr registers 16-19 00444 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x0f, 0xff, // graphics registers 0-8 00445 // video parameter table for mode f (64k graphics memory) 00446 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00447 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00448 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00449 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00450 // video parameter table for mode 10 (64k graphics memory) 00451 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00452 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00453 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00454 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 00455 // video parameter table for mode f (>64k graphics memory) 00456 0x50, 0x18, 0x0e, 0x00, 0x80, // bios data 00457 0x01, 0x0f, 0x00, 0x06, // sequencer registers 00458 0xa2, // misc output registers 00459 0x73, 0x4f, 0x50, 0x96, 0x54, 0x94, 0xb6, 0x1f, // crtc registers 0-7 00460 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // crtc registers 8-15 00461 0x83, 0x85, 0x5d, 0x14, 0x0f, 0x63, 0xb1, 0x9b, 0xff, // crtc registers 16-24 00462 0x00, 0x08, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, // attr registers 0-7 00463 0x00, 0x08, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, // attr registers 8-15 00464 0x0b, 0x00, 0x0f, 0x00, // attr registers 16-19 00465 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x0f, 0xff, // graphics registers 0-8 00466 // video parameter table for mode 10 (>64k graphics memory) 00467 0x50, 0x18, 0x0e, 0x00, 0x80, // bios data 00468 0x01, 0x0f, 0x00, 0x06, // sequencer registers 00469 0xa3, // misc output registers 00470 0x5b, 0x4f, 0x50, 0x9e, 0x54, 0x1c, 0x4e, 0x1f, // crtc registers 0-7 00471 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // crtc registers 8-15 00472 0x83, 0x85, 0x5d, 0x14, 0x0f, 0x63, 0x49, 0x9b, 0xff, // crtc registers 16-24 00473 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, // attr registers 0-7 00474 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, // attr registers 8-15 00475 0x01, 0x00, 0x0f, 0x00, // attr registers 16-19 00476 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x0f, 0xff, // graphics registers 0-8 00477 // video parameter table for mode 0 (350 lines) 00478 0x28, 0x18, 0x0e, 0x00, 0x08, // bios data 00479 0x09, 0x0f, 0x00, 0x03, // sequencer registers 00480 0xa3, // misc output registers 00481 0x37, 0x27, 0x28, 0x9a, 0x2b, 0xaa, 0x04, 0x1f, // crtc registers 0-7 00482 0x00, 0x4d, 0x0b, 0x0c, 0x00, 0x00, 0x00, 0x00, // crtc registers 8-15 00483 0x83, 0x85, 0x5d, 0x14, 0x0f, 0x63, 0xff, 0xb3, 0xff, // crtc registers 16-24 00484 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, // attr registers 0-7 00485 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, // attr registers 8-15 00486 0x08, 0x00, 0x0f, 0x00, // attr registers 16-19 00487 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x0e, 0x0f, 0xff, // graphics registers 0-8 00488 // video parameter table for mode 1 (350 lines) 00489 0x28, 0x18, 0x0e, 0x00, 0x08, // bios data 00490 0x09, 0x0f, 0x00, 0x03, // sequencer registers 00491 0xa3, // misc output registers 00492 0x37, 0x27, 0x28, 0x9a, 0x2b, 0xaa, 0x04, 0x1f, // crtc registers 0-7 00493 0x00, 0x4d, 0x0b, 0x0c, 0x00, 0x00, 0x00, 0x00, // crtc registers 8-15 00494 0x83, 0x85, 0x5d, 0x14, 0x0f, 0x63, 0xff, 0xb3, 0xff, // crtc registers 16-24 00495 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, // attr registers 0-7 00496 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, // attr registers 8-15 00497 0x08, 0x00, 0x0f, 0x00, // attr registers 16-19 00498 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x0e, 0x0f, 0xff, // graphics registers 0-8 00499 // video parameter table for mode 2 (350 lines) 00500 0x50, 0x18, 0x0e, 0x00, 0x10, // bios data 00501 0x01, 0x0f, 0x00, 0x03, // sequencer registers 00502 0xa3, // misc output registers 00503 0x73, 0x4f, 0x50, 0x96, 0x55, 0x95, 0xb6, 0x1f, // crtc registers 0-7 00504 0x00, 0x4d, 0x0b, 0x0c, 0x00, 0x00, 0x00, 0x00, // crtc registers 8-15 00505 0x83, 0x85, 0x5d, 0x28, 0x0f, 0x63, 0xb1, 0xb3, 0xff, // crtc registers 16-24 00506 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, // attr registers 0-7 00507 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, // attr registers 8-15 00508 0x08, 0x00, 0x0f, 0x00, // attr registers 16-19 00509 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x0e, 0x0f, 0xff, // graphics registers 0-8 00510 // video parameter table for mode 3 (350 lines) 00511 0x50, 0x18, 0x0e, 0x00, 0x10, // bios data 00512 0x01, 0x0f, 0x00, 0x03, // sequencer registers 00513 0xa3, // misc output registers 00514 0x73, 0x4f, 0x50, 0x96, 0x55, 0x95, 0xb6, 0x1f, // crtc registers 0-7 00515 0x00, 0x4d, 0x0b, 0x0c, 0x00, 0x00, 0x00, 0x00, // crtc registers 8-15 00516 0x83, 0x85, 0x5d, 0x28, 0x0f, 0x63, 0xb1, 0xb3, 0xff, // crtc registers 16-24 00517 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, // attr registers 0-7 00518 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, // attr registers 8-15 00519 0x08, 0x00, 0x0f, 0x00, // attr registers 16-19 00520 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x0e, 0x0f, 0xff // graphics registers 0-8 00521 }; 00522 00523 // TODO: Apparent MCGA video parameter table 00524 // 00525 // +0x0000-0x002F = ?? 00526 // +0x0030-0x006F = Video mode 0/1 params 00527 // +0x0070-0x00AF = Video mode 2/3 params 00528 // +0x00B0-0x00EF = Video mode 4/5 params 00529 // +0x00F0-0x012F = Video mode 6 params 00530 // +0x0130-0x014F = Video mode 17 (0x11) params 00531 // +0x0150-0x016F = Video mode 19 (0x13) params 00532 // 00533 // BIOS code: 00534 // 00535 // ES:BX = [40:A8] READ TABLE LOCATION FROM 40:A8 00536 // ES:BX = [ES:BX] READ FROM FIRST POINTER IN TABLE 00537 // BX += 0x30 TABLE ENTRIES OFFSET BY 0x30 BYTES (?) 00538 // IF AH <= 6 THEN 00539 // CX = VIDEO MODE 00540 // IF CX != 0 THEN 00541 // DO 00542 // IF (CX & 1) == 0 THEN 00543 // BX += 0x40 00544 // ENDIF 00545 // CX-- 00546 // WHILE CX != 0 00547 // ENDIF 00548 // GOTO END 00549 // ENDIF 00550 // IF AH != 0x11 00551 // IF AH != 0x13 00552 // GOTO END 00553 // ENDIF 00554 // BX += 0x120 AH = 0x13 HERE 00555 // GOTO END 00556 // ENDIF 00557 // BX += 0x100 AH = 0x11 HERE 00558 // GOTO END 00559 // END: 00560 // (RETURN) 00561 // 00562 // TODO: Copy 0x170 bytes of video parameter table from MCGA BIOS. 00563 // Refer to NOTES, which has a snapshot of the MCGA BIOS within it. 00564 00565 Bit16u INT10_SetupVideoParameterTable(PhysPt basepos) { 00566 if (IS_VGA_ARCH) { 00567 for (Bit16u i=0;i<0x40*0x1d;i++) { 00568 phys_writeb(basepos+i,video_parameter_table_vga[i]); 00569 } 00570 return 0x40*0x1d; 00571 } else { 00572 for (Bit16u i=0;i<0x40*0x17;i++) { 00573 phys_writeb(basepos+i,video_parameter_table_ega[i]); 00574 } 00575 return 0x40*0x17; 00576 } 00577 // TODO: MCGA 00578 } 00579 00580 Bitu RealToPhys(Bitu x) { 00581 return PhysMake((Bit16u)(x>>16),x&0xFFFF); 00582 } 00583 00584 void INT10_SetupBasicVideoParameterTable(void) { 00585 const unsigned char *copy = NULL; 00586 size_t copy_sz = 0; 00587 Bitu ofs; 00588 00589 switch (machine) { 00590 case MCH_TANDY: 00591 copy = vparams_tandy; 00592 copy_sz = sizeof(vparams_tandy); 00593 break; 00594 case MCH_PCJR: 00595 copy = vparams_pcjr; 00596 copy_sz = sizeof(vparams_pcjr); 00597 break; 00598 default: 00599 copy = vparams; 00600 copy_sz = sizeof(vparams); 00601 break; 00602 } 00603 00604 if (BIOS_VIDEO_TABLE_LOCATION == ~(0U) || BIOS_VIDEO_TABLE_SIZE != (Bitu)copy_sz) { 00605 if (rom_bios_vptable_enable) { 00606 /* TODO: Free previous block */ 00607 00608 BIOS_VIDEO_TABLE_SIZE = (Bitu)copy_sz; 00609 BIOS_VIDEO_TABLE_LOCATION = (Bitu)PhysToReal416((PhysPt)ROMBIOS_GetMemory((Bitu)copy_sz,"BIOS video table (INT 1Dh)")); /* TODO: make option */ 00610 00611 /* NTS: Failure to allocate means BIOS_VIDEO_TABLE_LOCATION == 0 */ 00612 } 00613 else { 00614 BIOS_VIDEO_TABLE_LOCATION = 0; 00615 } 00616 } 00617 00618 RealSetVec(0x1d,(RealPt)BIOS_VIDEO_TABLE_LOCATION); 00619 ofs = RealToPhys(BIOS_VIDEO_TABLE_LOCATION); 00620 if (ofs != 0) { 00621 if (copy && copy_sz <= BIOS_VIDEO_TABLE_SIZE) { 00622 for (size_t i=0;i < copy_sz;i++) 00623 phys_writeb((PhysPt)(ofs+(PhysPt)i),copy[i]); 00624 } 00625 else { 00626 E_Exit("Somehow, INT 10 video param table too large"); 00627 } 00628 } 00629 } 00630 00631 #if 0 00632 void INT10_GenerateVideoParameterTable(void) { 00633 if (!IS_VGA_ARCH) E_Exit("Be sure that all graphics registers are readable!"); 00634 Bitu i; 00635 for (i=0; i<4; i++) { 00636 LOG_MSG("// video parameter table for mode %x (cga emulation)",i); 00637 LOG_MSG(" 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,"); 00638 LOG_MSG(" 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,"); 00639 LOG_MSG(" 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,"); 00640 LOG_MSG(" 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,"); 00641 } 00642 for (i=4; i<0x0f; i++) { 00643 Bitu ct; 00644 LOG_MSG("// video parameter table for mode %x",i); 00645 if ((i>=8) && (i<0x0d)) { 00646 LOG_MSG(" 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,"); 00647 LOG_MSG(" 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,"); 00648 LOG_MSG(" 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,"); 00649 LOG_MSG(" 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,"); 00650 } else { 00651 INT10_SetVideoMode(i); 00652 LOG_MSG(" 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, // bios data",real_readb(0x40,0x4a),real_readb(0x40,0x84),real_readb(0x40,0x85),real_readb(0x40,0x4c),real_readb(0x40,0x4d)); 00653 Bitu seq_regs[4]; 00654 for (ct=0; ct<4; ct++) { 00655 IO_WriteB(0x3c4,ct+1); 00656 seq_regs[ct]=IO_ReadB(0x3c5); 00657 } 00658 LOG_MSG(" 0x%02x, 0x%02x, 0x%02x, 0x%02x, // sequencer registers",seq_regs[0],seq_regs[1],seq_regs[2],seq_regs[3]); 00659 LOG_MSG(" 0x%02x, // misc output registers",IO_ReadB(0x3cc)); 00660 Bitu crtc_regs[0x19]; 00661 Bit16u crt_addr=real_readw(BIOSMEM_SEG,BIOSMEM_CRTC_ADDRESS); 00662 for (ct=0; ct<0x19; ct++) { 00663 IO_WriteB(crt_addr,ct); 00664 crtc_regs[ct]=IO_ReadB(crt_addr+1); 00665 } 00666 LOG_MSG(" 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, // crtc registers 0-7", 00667 crtc_regs[0x00],crtc_regs[0x01],crtc_regs[0x02],crtc_regs[0x03], 00668 crtc_regs[0x04],crtc_regs[0x05],crtc_regs[0x06],crtc_regs[0x07]); 00669 LOG_MSG(" 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, // crtc registers 8-15", 00670 crtc_regs[0x08],crtc_regs[0x09],crtc_regs[0x0a],crtc_regs[0x0b], 00671 crtc_regs[0x0c],crtc_regs[0x0d],crtc_regs[0x0e],crtc_regs[0x0f]); 00672 LOG_MSG(" 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, // crtc registers 16-24", 00673 crtc_regs[0x10],crtc_regs[0x11],crtc_regs[0x12],crtc_regs[0x13], 00674 crtc_regs[0x14],crtc_regs[0x15],crtc_regs[0x16],crtc_regs[0x17],crtc_regs[0x18]); 00675 Bitu attr_regs[0x14]; 00676 for (ct=0; ct<0x14; ct++) { 00677 IO_ReadB(crt_addr+6); 00678 IO_WriteB(0x3c0,ct); 00679 attr_regs[ct]=IO_ReadB(0x3c1); 00680 } 00681 LOG_MSG(" 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, // attr registers 0-7", 00682 attr_regs[0x00],attr_regs[0x01],attr_regs[0x02],attr_regs[0x03], 00683 attr_regs[0x04],attr_regs[0x05],attr_regs[0x06],attr_regs[0x07]); 00684 LOG_MSG(" 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, // attr registers 8-15", 00685 attr_regs[0x08],attr_regs[0x09],attr_regs[0x0a],attr_regs[0x0b], 00686 attr_regs[0x0c],attr_regs[0x0d],attr_regs[0x0e],attr_regs[0x0f]); 00687 LOG_MSG(" 0x%02x, 0x%02x, 0x%02x, 0x%02x, // attr registers 16-19", 00688 attr_regs[0x10],attr_regs[0x11],attr_regs[0x12],attr_regs[0x13]); 00689 Bitu gfx_regs[9]; 00690 for (ct=0; ct<0x09; ct++) { 00691 IO_WriteB(0x3ce,ct); 00692 gfx_regs[ct]=IO_ReadB(0x3cf); 00693 } 00694 LOG_MSG(" 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, // graphics registers 0-8", 00695 gfx_regs[0x00],gfx_regs[0x01],gfx_regs[0x02],gfx_regs[0x03], 00696 gfx_regs[0x04],gfx_regs[0x05],gfx_regs[0x06],gfx_regs[0x07],gfx_regs[0x08]); 00697 } 00698 } 00699 for (i=0x0f; i<0x11; i++) { 00700 LOG_MSG("// video parameter table for mode %x (64k graphics memory)",i); 00701 LOG_MSG(" 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,"); 00702 LOG_MSG(" 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,"); 00703 LOG_MSG(" 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,"); 00704 LOG_MSG(" 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,"); 00705 } 00706 for (i=0x0f; i<0x11; i++) { 00707 Bitu ct; 00708 INT10_SetVideoMode(i); 00709 LOG_MSG("// video parameter table for mode %x (>64k graphics memory)",i); 00710 LOG_MSG(" 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, // bios data",real_readb(0x40,0x4a),real_readb(0x40,0x84),real_readb(0x40,0x85),real_readb(0x40,0x4c),real_readb(0x40,0x4d)); 00711 Bitu seq_regs[4]; 00712 for (ct=0; ct<4; ct++) { 00713 IO_WriteB(0x3c4,ct+1); 00714 seq_regs[ct]=IO_ReadB(0x3c5); 00715 } 00716 LOG_MSG(" 0x%02x, 0x%02x, 0x%02x, 0x%02x, // sequencer registers",seq_regs[0],seq_regs[1],seq_regs[2],seq_regs[3]); 00717 LOG_MSG(" 0x%02x, // misc output registers",IO_ReadB(0x3cc)); 00718 Bitu crtc_regs[0x19]; 00719 Bit16u crt_addr=real_readw(BIOSMEM_SEG,BIOSMEM_CRTC_ADDRESS); 00720 for (ct=0; ct<0x19; ct++) { 00721 IO_WriteB(crt_addr,ct); 00722 crtc_regs[ct]=IO_ReadB(crt_addr+1); 00723 } 00724 LOG_MSG(" 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, // crtc registers 0-7", 00725 crtc_regs[0x00],crtc_regs[0x01],crtc_regs[0x02],crtc_regs[0x03], 00726 crtc_regs[0x04],crtc_regs[0x05],crtc_regs[0x06],crtc_regs[0x07]); 00727 LOG_MSG(" 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, // crtc registers 8-15", 00728 crtc_regs[0x08],crtc_regs[0x09],crtc_regs[0x0a],crtc_regs[0x0b], 00729 crtc_regs[0x0c],crtc_regs[0x0d],crtc_regs[0x0e],crtc_regs[0x0f]); 00730 LOG_MSG(" 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, // crtc registers 16-24", 00731 crtc_regs[0x10],crtc_regs[0x11],crtc_regs[0x12],crtc_regs[0x13], 00732 crtc_regs[0x14],crtc_regs[0x15],crtc_regs[0x16],crtc_regs[0x17],crtc_regs[0x18]); 00733 Bitu attr_regs[0x14]; 00734 for (ct=0; ct<0x14; ct++) { 00735 IO_ReadB(crt_addr+6); 00736 IO_WriteB(0x3c0,ct); 00737 attr_regs[ct]=IO_ReadB(0x3c1); 00738 } 00739 LOG_MSG(" 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, // attr registers 0-7", 00740 attr_regs[0x00],attr_regs[0x01],attr_regs[0x02],attr_regs[0x03], 00741 attr_regs[0x04],attr_regs[0x05],attr_regs[0x06],attr_regs[0x07]); 00742 LOG_MSG(" 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, // attr registers 8-15", 00743 attr_regs[0x08],attr_regs[0x09],attr_regs[0x0a],attr_regs[0x0b], 00744 attr_regs[0x0c],attr_regs[0x0d],attr_regs[0x0e],attr_regs[0x0f]); 00745 LOG_MSG(" 0x%02x, 0x%02x, 0x%02x, 0x%02x, // attr registers 16-19", 00746 attr_regs[0x10],attr_regs[0x11],attr_regs[0x12],attr_regs[0x13]); 00747 Bitu gfx_regs[9]; 00748 for (ct=0; ct<0x09; ct++) { 00749 IO_WriteB(0x3ce,ct); 00750 gfx_regs[ct]=IO_ReadB(0x3cf); 00751 } 00752 LOG_MSG(" 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, // graphics registers 0-8", 00753 gfx_regs[0x00],gfx_regs[0x01],gfx_regs[0x02],gfx_regs[0x03], 00754 gfx_regs[0x04],gfx_regs[0x05],gfx_regs[0x06],gfx_regs[0x07],gfx_regs[0x08]); 00755 } 00756 for (i=0; i<4; i++) { 00757 if (IS_VGA_ARCH) { 00758 LOG_MSG("// video parameter table for mode %x (350 lines)",i); 00759 LOG_MSG(" 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,"); 00760 LOG_MSG(" 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,"); 00761 LOG_MSG(" 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,"); 00762 LOG_MSG(" 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,"); 00763 } else { 00764 Bitu ct; 00765 INT10_SetVideoMode(i); 00766 LOG_MSG("// video parameter table for mode %x (350 lines)",i); 00767 LOG_MSG(" 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, // bios data",real_readb(0x40,0x4a),real_readb(0x40,0x84),real_readb(0x40,0x85),real_readb(0x40,0x4c),real_readb(0x40,0x4d)); 00768 Bitu seq_regs[4]; 00769 for (ct=0; ct<4; ct++) { 00770 IO_WriteB(0x3c4,ct+1); 00771 seq_regs[ct]=IO_ReadB(0x3c5); 00772 } 00773 LOG_MSG(" 0x%02x, 0x%02x, 0x%02x, 0x%02x, // sequencer registers",seq_regs[0],seq_regs[1],seq_regs[2],seq_regs[3]); 00774 LOG_MSG(" 0x%02x, // misc output registers",IO_ReadB(0x3cc)); 00775 Bitu crtc_regs[0x19]; 00776 Bit16u crt_addr=real_readw(BIOSMEM_SEG,BIOSMEM_CRTC_ADDRESS); 00777 for (ct=0; ct<0x19; ct++) { 00778 IO_WriteB(crt_addr,ct); 00779 crtc_regs[ct]=IO_ReadB(crt_addr+1); 00780 } 00781 LOG_MSG(" 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, // crtc registers 0-7", 00782 crtc_regs[0x00],crtc_regs[0x01],crtc_regs[0x02],crtc_regs[0x03], 00783 crtc_regs[0x04],crtc_regs[0x05],crtc_regs[0x06],crtc_regs[0x07]); 00784 LOG_MSG(" 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, // crtc registers 8-15", 00785 crtc_regs[0x08],crtc_regs[0x09],crtc_regs[0x0a],crtc_regs[0x0b], 00786 crtc_regs[0x0c],crtc_regs[0x0d],crtc_regs[0x0e],crtc_regs[0x0f]); 00787 LOG_MSG(" 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, // crtc registers 16-24", 00788 crtc_regs[0x10],crtc_regs[0x11],crtc_regs[0x12],crtc_regs[0x13], 00789 crtc_regs[0x14],crtc_regs[0x15],crtc_regs[0x16],crtc_regs[0x17],crtc_regs[0x18]); 00790 Bitu attr_regs[0x14]; 00791 for (ct=0; ct<0x14; ct++) { 00792 IO_ReadB(crt_addr+6); 00793 IO_WriteB(0x3c0,ct); 00794 attr_regs[ct]=IO_ReadB(0x3c1); 00795 } 00796 LOG_MSG(" 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, // attr registers 0-7", 00797 attr_regs[0x00],attr_regs[0x01],attr_regs[0x02],attr_regs[0x03], 00798 attr_regs[0x04],attr_regs[0x05],attr_regs[0x06],attr_regs[0x07]); 00799 LOG_MSG(" 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, // attr registers 8-15", 00800 attr_regs[0x08],attr_regs[0x09],attr_regs[0x0a],attr_regs[0x0b], 00801 attr_regs[0x0c],attr_regs[0x0d],attr_regs[0x0e],attr_regs[0x0f]); 00802 LOG_MSG(" 0x%02x, 0x%02x, 0x%02x, 0x%02x, // attr registers 16-19", 00803 attr_regs[0x10],attr_regs[0x11],attr_regs[0x12],attr_regs[0x13]); 00804 Bitu gfx_regs[9]; 00805 for (ct=0; ct<0x09; ct++) { 00806 IO_WriteB(0x3ce,ct); 00807 gfx_regs[ct]=IO_ReadB(0x3cf); 00808 } 00809 LOG_MSG(" 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, // graphics registers 0-8", 00810 gfx_regs[0x00],gfx_regs[0x01],gfx_regs[0x02],gfx_regs[0x03], 00811 gfx_regs[0x04],gfx_regs[0x05],gfx_regs[0x06],gfx_regs[0x07],gfx_regs[0x08]); 00812 } 00813 } 00814 if (IS_VGA_ARCH) { 00815 for (i=0x0e; i<0x14; i++) { 00816 Bitu ct=i; 00817 if (i==0x0e) ct=1; 00818 if (i==0x0f) ct=3; 00819 if (i==0x010) ct=7; 00820 INT10_SetVideoMode(ct); 00821 LOG_MSG("// video parameter table for mode %x",i); 00822 LOG_MSG(" 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, // bios data",real_readb(0x40,0x4a),real_readb(0x40,0x84),real_readb(0x40,0x85),real_readb(0x40,0x4c),real_readb(0x40,0x4d)); 00823 Bitu seq_regs[4]; 00824 for (ct=0; ct<4; ct++) { 00825 IO_WriteB(0x3c4,ct+1); 00826 seq_regs[ct]=IO_ReadB(0x3c5); 00827 } 00828 LOG_MSG(" 0x%02x, 0x%02x, 0x%02x, 0x%02x, // sequencer registers",seq_regs[0],seq_regs[1],seq_regs[2],seq_regs[3]); 00829 LOG_MSG(" 0x%02x, // misc output registers",IO_ReadB(0x3cc)); 00830 Bitu crtc_regs[0x19]; 00831 Bit16u crt_addr=real_readw(BIOSMEM_SEG,BIOSMEM_CRTC_ADDRESS); 00832 for (ct=0; ct<0x19; ct++) { 00833 IO_WriteB(crt_addr,ct); 00834 crtc_regs[ct]=IO_ReadB(crt_addr+1); 00835 } 00836 LOG_MSG(" 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, // crtc registers 0-7", 00837 crtc_regs[0x00],crtc_regs[0x01],crtc_regs[0x02],crtc_regs[0x03], 00838 crtc_regs[0x04],crtc_regs[0x05],crtc_regs[0x06],crtc_regs[0x07]); 00839 LOG_MSG(" 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, // crtc registers 8-15", 00840 crtc_regs[0x08],crtc_regs[0x09],crtc_regs[0x0a],crtc_regs[0x0b], 00841 crtc_regs[0x0c],crtc_regs[0x0d],crtc_regs[0x0e],crtc_regs[0x0f]); 00842 LOG_MSG(" 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, // crtc registers 16-24", 00843 crtc_regs[0x10],crtc_regs[0x11],crtc_regs[0x12],crtc_regs[0x13], 00844 crtc_regs[0x14],crtc_regs[0x15],crtc_regs[0x16],crtc_regs[0x17],crtc_regs[0x18]); 00845 Bitu attr_regs[0x14]; 00846 for (ct=0; ct<0x14; ct++) { 00847 IO_ReadB(crt_addr+6); 00848 IO_WriteB(0x3c0,ct); 00849 attr_regs[ct]=IO_ReadB(0x3c1); 00850 } 00851 LOG_MSG(" 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, // attr registers 0-7", 00852 attr_regs[0x00],attr_regs[0x01],attr_regs[0x02],attr_regs[0x03], 00853 attr_regs[0x04],attr_regs[0x05],attr_regs[0x06],attr_regs[0x07]); 00854 LOG_MSG(" 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, // attr registers 8-15", 00855 attr_regs[0x08],attr_regs[0x09],attr_regs[0x0a],attr_regs[0x0b], 00856 attr_regs[0x0c],attr_regs[0x0d],attr_regs[0x0e],attr_regs[0x0f]); 00857 LOG_MSG(" 0x%02x, 0x%02x, 0x%02x, 0x%02x, // attr registers 16-19", 00858 attr_regs[0x10],attr_regs[0x11],attr_regs[0x12],attr_regs[0x13]); 00859 Bitu gfx_regs[9]; 00860 for (ct=0; ct<0x09; ct++) { 00861 IO_WriteB(0x3ce,ct); 00862 gfx_regs[ct]=IO_ReadB(0x3cf); 00863 } 00864 LOG_MSG(" 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, // graphics registers 0-8", 00865 gfx_regs[0x00],gfx_regs[0x01],gfx_regs[0x02],gfx_regs[0x03], 00866 gfx_regs[0x04],gfx_regs[0x05],gfx_regs[0x06],gfx_regs[0x07],gfx_regs[0x08]); 00867 } 00868 } 00869 INT10_SetVideoMode(3); 00870 E_Exit("done!"); 00871 } 00872 #endif