| 1 |
/* |
| 2 |
* Copyright (C) 2002-2010 The DOSBox Team |
| 3 |
* |
| 4 |
* This program is free software; you can redistribute it and/or modify |
| 5 |
* it under the terms of the GNU General Public License as published by |
| 6 |
* the Free Software Foundation; either version 2 of the License, or |
| 7 |
* (at your option) any later version. |
| 8 |
* |
| 9 |
* This program is distributed in the hope that it will be useful, |
| 10 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 |
* GNU General Public License for more details. |
| 13 |
* |
| 14 |
* You should have received a copy of the GNU General Public License |
| 15 |
* along with this program; if not, write to the Free Software |
| 16 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
| 17 |
*/ |
| 18 |
|
| 19 |
/* $Id: int10_vptable.cpp,v 1.6 2009-08-01 13:39:48 c2woody Exp $ */ |
| 20 |
|
| 21 |
#include "dosbox.h" |
| 22 |
#include "mem.h" |
| 23 |
#include "inout.h" |
| 24 |
#include "int10.h" |
| 25 |
|
| 26 |
|
| 27 |
const Bit8u vparams[] = { |
| 28 |
// 40x25 mode 0 and 1 crtc registers |
| 29 |
0x38, 0x28, 0x2d, 0x0a, 0x1f, 0x06, 0x19, 0x1c, 0x02, 0x07, 0x06, 0x07, 0,0,0,0, |
| 30 |
// 80x25 mode 2 and 3 crtc registers |
| 31 |
0x71, 0x50, 0x5a, 0x0a, 0x1f, 0x06, 0x19, 0x1c, 0x02, 0x07, 0x06, 0x07, 0,0,0,0, |
| 32 |
// graphics modes 4, 5 and 6 |
| 33 |
0x38, 0x28, 0x2d, 0x0a, 0x7f, 0x06, 0x64, 0x70, 0x02, 0x01, 0x06, 0x07, 0,0,0,0, |
| 34 |
// mode 7 MDA text |
| 35 |
0x61, 0x50, 0x52, 0x0f, 0x19, 0x06, 0x19, 0x19, 0x02, 0x0d, 0x0b, 0x0c, 0,0,0,0, |
| 36 |
// buffer length words 2048, 4096, 16384, 16384 |
| 37 |
0x00, 0x08, 0x00, 0x10, 0x00, 0x40, 0x00, 0x40, |
| 38 |
// columns |
| 39 |
40, 40, 80, 80, 40, 40, 80, 80, |
| 40 |
// CGA mode register |
| 41 |
0x2c, 0x28, 0x2d, 0x29, 0x2a, 0x2e, 0x1e, 0x29 |
| 42 |
}; |
| 43 |
|
| 44 |
const Bit8u vparams_pcjr[] = { |
| 45 |
// 40x25 mode 0 and 1 crtc registers |
| 46 |
0x38, 0x28, 0x2c, 0x06, 0x1f, 0x06, 0x19, 0x1c, 0x02, 0x07, 0x06, 0x07, 0,0,0,0, |
| 47 |
// 80x25 mode 2 and 3 crtc registers |
| 48 |
0x71, 0x50, 0x5a, 0x0c, 0x1f, 0x06, 0x19, 0x1c, 0x02, 0x07, 0x06, 0x07, 0,0,0,0, |
| 49 |
// graphics modes 4, 5, 6, 8 |
| 50 |
0x38, 0x28, 0x2b, 0x06, 0x7f, 0x06, 0x64, 0x70, 0x02, 0x01, 0x26, 0x07, 0,0,0,0, |
| 51 |
// other graphics modes |
| 52 |
0x71, 0x50, 0x56, 0x0c, 0x3f, 0x06, 0x32, 0x38, 0x02, 0x03, 0x26, 0x07, 0,0,0,0, |
| 53 |
// buffer length words 2048, 4096, 16384, 16384 |
| 54 |
0x00, 0x08, 0x00, 0x10, 0x00, 0x40, 0x00, 0x40, |
| 55 |
// columns |
| 56 |
40, 40, 80, 80, 40, 40, 80, 80, |
| 57 |
// CGA mode register |
| 58 |
0x2c, 0x28, 0x2d, 0x29, 0x2a, 0x2e, 0x1e, 0x29 |
| 59 |
}; |
| 60 |
|
| 61 |
const Bit8u vparams_tandy[] = { |
| 62 |
// 40x25 mode 0 and 1 crtc registers |
| 63 |
0x38, 0x28, 0x2c, 0x08, 0x1f, 0x06, 0x19, 0x1c, 0x02, 0x07, 0x06, 0x07, 0,0,0,0, |
| 64 |
// 80x25 mode 2 and 3 crtc registers |
| 65 |
0x71, 0x50, 0x58, 0x10, 0x1f, 0x06, 0x19, 0x1c, 0x02, 0x07, 0x06, 0x07, 0,0,0,0, |
| 66 |
// graphics modes 4, 5 and 6 |
| 67 |
0x38, 0x28, 0x2c, 0x08, 0x7f, 0x06, 0x64, 0x70, 0x02, 0x01, 0x06, 0x07, 0,0,0,0, |
| 68 |
// graphics mode 7 |
| 69 |
0x71, 0x50, 0x58, 0x10, 0x3f, 0x06, 0x32, 0x38, 0x02, 0x03, 0x06, 0x07, 0,0,0,0, |
| 70 |
// buffer length words 2048, 4096, 16384, 16384 |
| 71 |
0x00, 0x08, 0x00, 0x10, 0x00, 0x40, 0x00, 0x40, |
| 72 |
// columns |
| 73 |
40, 40, 80, 80, 40, 40, 80, 80, |
| 74 |
// CGA mode register |
| 75 |
0x2c, 0x28, 0x2d, 0x29, 0x2a, 0x2e, 0x1e, 0x29 |
| 76 |
}; |
| 77 |
|
| 78 |
const Bit8u vparams_tandy_td[] = { |
| 79 |
// 40x25 mode 0 and 1 crtc registers |
| 80 |
0x38, 0x28, 0x2d, 0x0a, 0x1f, 0x06, 0x19, 0x1c, 0x02, 0x07, 0x06, 0x07, 0,0,0,0, |
| 81 |
// 80x25 mode 2 and 3 crtc registers |
| 82 |
0x71, 0x50, 0x5a, 0x0a, 0x1f, 0x06, 0x19, 0x1c, 0x02, 0x07, 0x06, 0x07, 0,0,0,0, |
| 83 |
// graphics modes 4, 5 and 6 |
| 84 |
0x38, 0x28, 0x2d, 0x0a, 0x7f, 0x06, 0x64, 0x70, 0x02, 0x01, 0x06, 0x07, 0,0,0,0, |
| 85 |
// mode 7 MDA text |
| 86 |
0x61, 0x50, 0x52, 0x0f, 0x19, 0x06, 0x19, 0x19, 0x02, 0x0d, 0x0b, 0x0c, 0,0,0,0, |
| 87 |
// ?? mode 2 and 3 crtc registers |
| 88 |
0x71, 0x50, 0x5a, 0x0a, 0x3f, 0x06, 0x32, 0x38, 0x02, 0x03, 0x06, 0x07, 0,0,0,0, |
| 89 |
// buffer length words 2048, 4096, 16384, 16384 |
| 90 |
0x00, 0x08, 0x00, 0x10, 0x00, 0x40, 0x00, 0x40, |
| 91 |
// columns |
| 92 |
40, 40, 80, 80, 40, 40, 80, 80, |
| 93 |
// CGA mode register |
| 94 |
0x2c, 0x28, 0x2d, 0x29, 0x2a, 0x2e, 0x1e, 0x29 |
| 95 |
}; |
| 96 |
|
| 97 |
|
| 98 |
static Bit8u video_parameter_table_vga[0x40*0x1d]={ |
| 99 |
// video parameter table for mode 0 (cga emulation) |
| 100 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 101 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 102 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 103 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 104 |
// video parameter table for mode 1 (cga emulation) |
| 105 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 106 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 107 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 108 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 109 |
// video parameter table for mode 2 (cga emulation) |
| 110 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 111 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 112 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 113 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 114 |
// video parameter table for mode 3 (cga emulation) |
| 115 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 116 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 117 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 118 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 119 |
// video parameter table for mode 4 |
| 120 |
0x28, 0x18, 0x08, 0x00, 0x40, // bios data |
| 121 |
0x09, 0x00, 0x00, 0x02, // sequencer registers |
| 122 |
0x63, // misc output registers |
| 123 |
0x2d, 0x27, 0x28, 0x90, 0x2b, 0x80, 0xbf, 0x1f, // crtc registers 0-7 |
| 124 |
0x00, 0xc1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // crtc registers 8-15 |
| 125 |
0x9c, 0x8e, 0x8f, 0x14, 0x00, 0x96, 0xb9, 0xa2, 0xff, // crtc registers 16-24 |
| 126 |
0x00, 0x13, 0x15, 0x17, 0x02, 0x04, 0x06, 0x07, // attr registers 0-7 |
| 127 |
0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, // attr registers 8-15 |
| 128 |
0x01, 0x00, 0x0f, 0x00, // attr registers 16-19 |
| 129 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x0f, 0x0f, 0xff, // graphics registers 0-8 |
| 130 |
// video parameter table for mode 5 |
| 131 |
0x28, 0x18, 0x08, 0x00, 0x40, // bios data |
| 132 |
0x09, 0x00, 0x00, 0x02, // sequencer registers |
| 133 |
0x63, // misc output registers |
| 134 |
0x2d, 0x27, 0x28, 0x90, 0x2b, 0x80, 0xbf, 0x1f, // crtc registers 0-7 |
| 135 |
0x00, 0xc1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // crtc registers 8-15 |
| 136 |
0x9c, 0x8e, 0x8f, 0x14, 0x00, 0x96, 0xb9, 0xa2, 0xff, // crtc registers 16-24 |
| 137 |
0x00, 0x13, 0x15, 0x17, 0x02, 0x04, 0x06, 0x07, // attr registers 0-7 |
| 138 |
0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, // attr registers 8-15 |
| 139 |
0x01, 0x00, 0x0f, 0x00, // attr registers 16-19 |
| 140 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x0f, 0x0f, 0xff, // graphics registers 0-8 |
| 141 |
// video parameter table for mode 6 |
| 142 |
0x50, 0x18, 0x08, 0x00, 0x40, // bios data |
| 143 |
0x09, 0x0f, 0x00, 0x02, // sequencer registers |
| 144 |
0x63, // misc output registers |
| 145 |
0x5f, 0x4f, 0x50, 0x82, 0x54, 0x80, 0xbf, 0x1f, // crtc registers 0-7 |
| 146 |
0x00, 0xc1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // crtc registers 8-15 |
| 147 |
0x9c, 0x8e, 0x8f, 0x28, 0x00, 0x96, 0xb9, 0xc2, 0xff, // crtc registers 16-24 |
| 148 |
0x00, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, // attr registers 0-7 |
| 149 |
0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, // attr registers 8-15 |
| 150 |
0x01, 0x00, 0x01, 0x00, // attr registers 16-19 |
| 151 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0xff, // graphics registers 0-8 |
| 152 |
// video parameter table for mode 7 |
| 153 |
0x50, 0x18, 0x10, 0x00, 0x10, // bios data |
| 154 |
0x00, 0x0f, 0x00, 0x07, // sequencer registers |
| 155 |
0x66, // misc output registers |
| 156 |
0x5f, 0x4f, 0x50, 0x82, 0x55, 0x81, 0xbf, 0x1f, // crtc registers 0-7 |
| 157 |
0x00, 0x4f, 0x0d, 0x0e, 0x00, 0x00, 0x00, 0x00, // crtc registers 8-15 |
| 158 |
0x9c, 0x8e, 0x8f, 0x28, 0x0f, 0x96, 0xb9, 0xa3, 0xff, // crtc registers 16-24 |
| 159 |
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x14, 0x07, // attr registers 0-7 |
| 160 |
0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, // attr registers 8-15 |
| 161 |
0x0c, 0x00, 0x0f, 0x08, // attr registers 16-19 |
| 162 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x0a, 0x0f, 0xff, // graphics registers 0-8 |
| 163 |
// video parameter table for mode 8 |
| 164 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 165 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 166 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 167 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 168 |
// video parameter table for mode 9 |
| 169 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 170 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 171 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 172 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 173 |
// video parameter table for mode a |
| 174 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 175 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 176 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 177 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 178 |
// video parameter table for mode b |
| 179 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 180 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 181 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 182 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 183 |
// video parameter table for mode c |
| 184 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 185 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 186 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 187 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 188 |
// video parameter table for mode d |
| 189 |
0x28, 0x18, 0x08, 0x00, 0x20, // bios data |
| 190 |
0x09, 0x0f, 0x00, 0x02, // sequencer registers |
| 191 |
0x63, // misc output registers |
| 192 |
0x2d, 0x27, 0x28, 0x90, 0x2b, 0x80, 0xbf, 0x1f, // crtc registers 0-7 |
| 193 |
0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // crtc registers 8-15 |
| 194 |
0x9c, 0x8e, 0x8f, 0x14, 0x00, 0x96, 0xb9, 0xe3, 0xff, // crtc registers 16-24 |
| 195 |
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, // attr registers 0-7 |
| 196 |
0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, // attr registers 8-15 |
| 197 |
0x01, 0x00, 0x0f, 0x00, // attr registers 16-19 |
| 198 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x0f, 0xff, // graphics registers 0-8 |
| 199 |
// video parameter table for mode e |
| 200 |
0x50, 0x18, 0x08, 0x00, 0x40, // bios data |
| 201 |
0x01, 0x0f, 0x00, 0x02, // sequencer registers |
| 202 |
0x63, // misc output registers |
| 203 |
0x5f, 0x4f, 0x50, 0x82, 0x54, 0x80, 0xbf, 0x1f, // crtc registers 0-7 |
| 204 |
0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // crtc registers 8-15 |
| 205 |
0x9c, 0x8e, 0x8f, 0x28, 0x00, 0x96, 0xb9, 0xe3, 0xff, // crtc registers 16-24 |
| 206 |
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, // attr registers 0-7 |
| 207 |
0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, // attr registers 8-15 |
| 208 |
0x01, 0x00, 0x0f, 0x00, // attr registers 16-19 |
| 209 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x0f, 0xff, // graphics registers 0-8 |
| 210 |
// video parameter table for mode f (64k graphics memory) |
| 211 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 212 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 213 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 214 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 215 |
// video parameter table for mode 10 (64k graphics memory) |
| 216 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 217 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 218 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 219 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 220 |
// video parameter table for mode f (>64k graphics memory) |
| 221 |
0x50, 0x18, 0x0e, 0x00, 0x80, // bios data |
| 222 |
0x01, 0x0f, 0x00, 0x02, // sequencer registers |
| 223 |
0xa2, // misc output registers |
| 224 |
0x5f, 0x4f, 0x50, 0x82, 0x54, 0x80, 0xbf, 0x1f, // crtc registers 0-7 |
| 225 |
0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // crtc registers 8-15 |
| 226 |
0x83, 0x85, 0x5d, 0x28, 0x0f, 0x63, 0xba, 0xe3, 0xff, // crtc registers 16-24 |
| 227 |
0x00, 0x08, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, // attr registers 0-7 |
| 228 |
0x00, 0x08, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, // attr registers 8-15 |
| 229 |
0x0b, 0x00, 0x0f, 0x00, // attr registers 16-19 |
| 230 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x0f, 0xff, // graphics registers 0-8 |
| 231 |
// video parameter table for mode 10 (>64k graphics memory) |
| 232 |
0x50, 0x18, 0x0e, 0x00, 0x80, // bios data |
| 233 |
0x01, 0x0f, 0x00, 0x02, // sequencer registers |
| 234 |
0xa3, // misc output registers |
| 235 |
0x5f, 0x4f, 0x50, 0x82, 0x54, 0x80, 0xbf, 0x1f, // crtc registers 0-7 |
| 236 |
0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // crtc registers 8-15 |
| 237 |
0x83, 0x85, 0x5d, 0x28, 0x0f, 0x63, 0xba, 0xe3, 0xff, // crtc registers 16-24 |
| 238 |
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x14, 0x07, // attr registers 0-7 |
| 239 |
0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, // attr registers 8-15 |
| 240 |
0x01, 0x00, 0x0f, 0x00, // attr registers 16-19 |
| 241 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x0f, 0xff, // graphics registers 0-8 |
| 242 |
// video parameter table for mode 0 (350 lines) |
| 243 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 244 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 245 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 246 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 247 |
// video parameter table for mode 1 (350 lines) |
| 248 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 249 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 250 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 251 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 252 |
// video parameter table for mode 2 (350 lines) |
| 253 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 254 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 255 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 256 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 257 |
// video parameter table for mode 3 (350 lines) |
| 258 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 259 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 260 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 261 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 262 |
// video parameter table for mode e |
| 263 |
0x28, 0x18, 0x10, 0x00, 0x08, // bios data |
| 264 |
0x08, 0x0f, 0x00, 0x07, // sequencer registers |
| 265 |
0x67, // misc output registers |
| 266 |
0x2d, 0x27, 0x28, 0x90, 0x2b, 0xa0, 0xbf, 0x1f, // crtc registers 0-7 |
| 267 |
0x00, 0x4f, 0x0d, 0x0e, 0x00, 0x00, 0x00, 0x00, // crtc registers 8-15 |
| 268 |
0x9c, 0x8e, 0x8f, 0x14, 0x1f, 0x96, 0xb9, 0xa3, 0xff, // crtc registers 16-24 |
| 269 |
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x14, 0x07, // attr registers 0-7 |
| 270 |
0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, // attr registers 8-15 |
| 271 |
0x0c, 0x00, 0x0f, 0x08, // attr registers 16-19 |
| 272 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x0e, 0x0f, 0xff, // graphics registers 0-8 |
| 273 |
// video parameter table for mode f |
| 274 |
0x50, 0x18, 0x10, 0x00, 0x10, // bios data |
| 275 |
0x00, 0x0f, 0x00, 0x07, // sequencer registers |
| 276 |
0x67, // misc output registers |
| 277 |
0x5f, 0x4f, 0x50, 0x82, 0x55, 0x81, 0xbf, 0x1f, // crtc registers 0-7 |
| 278 |
0x00, 0x4f, 0x0d, 0x0e, 0x00, 0x00, 0x00, 0x00, // crtc registers 8-15 |
| 279 |
0x9c, 0x8e, 0x8f, 0x28, 0x1f, 0x96, 0xb9, 0xa3, 0xff, // crtc registers 16-24 |
| 280 |
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x14, 0x07, // attr registers 0-7 |
| 281 |
0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, // attr registers 8-15 |
| 282 |
0x0c, 0x00, 0x0f, 0x08, // attr registers 16-19 |
| 283 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x0e, 0x0f, 0xff, // graphics registers 0-8 |
| 284 |
// video parameter table for mode 10 |
| 285 |
0x50, 0x18, 0x10, 0x00, 0x10, // bios data |
| 286 |
0x00, 0x0f, 0x00, 0x07, // sequencer registers |
| 287 |
0x66, // misc output registers |
| 288 |
0x5f, 0x4f, 0x50, 0x82, 0x55, 0x81, 0xbf, 0x1f, // crtc registers 0-7 |
| 289 |
0x00, 0x4f, 0x0d, 0x0e, 0x00, 0x00, 0x00, 0x00, // crtc registers 8-15 |
| 290 |
0x9c, 0x8e, 0x8f, 0x28, 0x0f, 0x96, 0xb9, 0xa3, 0xff, // crtc registers 16-24 |
| 291 |
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x14, 0x07, // attr registers 0-7 |
| 292 |
0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, // attr registers 8-15 |
| 293 |
0x0c, 0x00, 0x0f, 0x08, // attr registers 16-19 |
| 294 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x0a, 0x0f, 0xff, // graphics registers 0-8 |
| 295 |
// video parameter table for mode 11 |
| 296 |
0x50, 0x1d, 0x10, 0x00, 0xa0, // bios data |
| 297 |
0x01, 0x0f, 0x00, 0x02, // sequencer registers |
| 298 |
0xe3, // misc output registers |
| 299 |
0x5f, 0x4f, 0x50, 0x82, 0x54, 0x80, 0x0b, 0x3e, // crtc registers 0-7 |
| 300 |
0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // crtc registers 8-15 |
| 301 |
0xea, 0x8c, 0xdf, 0x28, 0x00, 0xe7, 0x04, 0xc3, 0xff, // crtc registers 16-24 |
| 302 |
0x00, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, // attr registers 0-7 |
| 303 |
0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, // attr registers 8-15 |
| 304 |
0x01, 0x00, 0x0f, 0x00, // attr registers 16-19 |
| 305 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x0f, 0xff, // graphics registers 0-8 |
| 306 |
// video parameter table for mode 12 |
| 307 |
0x50, 0x1d, 0x10, 0x00, 0xa0, // bios data |
| 308 |
0x01, 0x0f, 0x00, 0x02, // sequencer registers |
| 309 |
0xe3, // misc output registers |
| 310 |
0x5f, 0x4f, 0x50, 0x82, 0x54, 0x80, 0x0b, 0x3e, // crtc registers 0-7 |
| 311 |
0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // crtc registers 8-15 |
| 312 |
0xea, 0x8c, 0xdf, 0x28, 0x00, 0xe7, 0x04, 0xe3, 0xff, // crtc registers 16-24 |
| 313 |
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x14, 0x07, // attr registers 0-7 |
| 314 |
0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, // attr registers 8-15 |
| 315 |
0x01, 0x00, 0x0f, 0x00, // attr registers 16-19 |
| 316 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x0f, 0xff, // graphics registers 0-8 |
| 317 |
// video parameter table for mode 13 |
| 318 |
0x28, 0x18, 0x08, 0x00, 0x20, // bios data |
| 319 |
0x01, 0x0f, 0x00, 0x0e, // sequencer registers |
| 320 |
0x63, // misc output registers |
| 321 |
0x5f, 0x4f, 0x50, 0x82, 0x54, 0x80, 0xbf, 0x1f, // crtc registers 0-7 |
| 322 |
0x00, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // crtc registers 8-15 |
| 323 |
0x9c, 0x8e, 0x8f, 0x28, 0x40, 0x96, 0xb9, 0xa3, 0xff, // crtc registers 16-24 |
| 324 |
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, // attr registers 0-7 |
| 325 |
0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, // attr registers 8-15 |
| 326 |
0x41, 0x00, 0x0f, 0x00, // attr registers 16-19 |
| 327 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x05, 0x0f, 0xff // graphics registers 0-8 |
| 328 |
}; |
| 329 |
|
| 330 |
static Bit8u video_parameter_table_ega[0x40*0x17]={ |
| 331 |
// video parameter table for mode 0 (cga emulation) |
| 332 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 333 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 334 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 335 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 336 |
// video parameter table for mode 1 (cga emulation) |
| 337 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 338 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 339 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 340 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 341 |
// video parameter table for mode 2 (cga emulation) |
| 342 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 343 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 344 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 345 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 346 |
// video parameter table for mode 3 (cga emulation) |
| 347 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 348 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 349 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 350 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 351 |
// video parameter table for mode 4 |
| 352 |
0x28, 0x18, 0x08, 0x00, 0x40, // bios data |
| 353 |
0x09, 0x03, 0x00, 0x02, // sequencer registers |
| 354 |
0x63, // misc output registers |
| 355 |
0x37, 0x27, 0x28, 0x9a, 0x2b, 0x8a, 0x04, 0x11, // crtc registers 0-7 |
| 356 |
0x00, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // crtc registers 8-15 |
| 357 |
0xd4, 0x86, 0xc7, 0x14, 0x00, 0xd0, 0xfc, 0xb2, 0xff, // crtc registers 16-24 |
| 358 |
0x00, 0x13, 0x15, 0x17, 0x02, 0x04, 0x06, 0x07, // attr registers 0-7 |
| 359 |
0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, // attr registers 8-15 |
| 360 |
0x01, 0x00, 0x0f, 0x00, // attr registers 16-19 |
| 361 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x0f, 0x0f, 0xff, // graphics registers 0-8 |
| 362 |
// video parameter table for mode 5 |
| 363 |
0x28, 0x18, 0x08, 0x00, 0x40, // bios data |
| 364 |
0x09, 0x03, 0x00, 0x02, // sequencer registers |
| 365 |
0x63, // misc output registers |
| 366 |
0x37, 0x27, 0x28, 0x9a, 0x2b, 0x8a, 0x04, 0x11, // crtc registers 0-7 |
| 367 |
0x00, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // crtc registers 8-15 |
| 368 |
0xd4, 0x86, 0xc7, 0x14, 0x00, 0xd0, 0xfc, 0xb2, 0xff, // crtc registers 16-24 |
| 369 |
0x00, 0x13, 0x15, 0x17, 0x02, 0x04, 0x06, 0x07, // attr registers 0-7 |
| 370 |
0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, // attr registers 8-15 |
| 371 |
0x01, 0x00, 0x0f, 0x00, // attr registers 16-19 |
| 372 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x0f, 0x0f, 0xff, // graphics registers 0-8 |
| 373 |
// video parameter table for mode 6 |
| 374 |
0x50, 0x18, 0x08, 0x00, 0x40, // bios data |
| 375 |
0x01, 0x0f, 0x00, 0x06, // sequencer registers |
| 376 |
0x63, // misc output registers |
| 377 |
0x73, 0x4f, 0x50, 0x96, 0x54, 0x94, 0x04, 0x11, // crtc registers 0-7 |
| 378 |
0x00, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // crtc registers 8-15 |
| 379 |
0xd4, 0x86, 0xc7, 0x28, 0x00, 0xd0, 0xfc, 0xd2, 0xff, // crtc registers 16-24 |
| 380 |
0x00, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, // attr registers 0-7 |
| 381 |
0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, // attr registers 8-15 |
| 382 |
0x01, 0x00, 0x01, 0x00, // attr registers 16-19 |
| 383 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0d, 0x0f, 0xff, // graphics registers 0-8 |
| 384 |
// video parameter table for mode 7 |
| 385 |
0x50, 0x18, 0x0e, 0x00, 0x10, // bios data |
| 386 |
0x00, 0x0f, 0x00, 0x03, // sequencer registers |
| 387 |
0xa2, // misc output registers |
| 388 |
0x73, 0x4f, 0x50, 0x96, 0x55, 0x95, 0xb6, 0x1f, // crtc registers 0-7 |
| 389 |
0x00, 0x4d, 0x0b, 0x0c, 0x00, 0x00, 0x00, 0x00, // crtc registers 8-15 |
| 390 |
0x83, 0x85, 0x5d, 0x28, 0x0f, 0x63, 0xb1, 0xb3, 0xff, // crtc registers 16-24 |
| 391 |
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, // attr registers 0-7 |
| 392 |
0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, // attr registers 8-15 |
| 393 |
0x08, 0x00, 0x0f, 0x00, // attr registers 16-19 |
| 394 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x0e, 0x0f, 0xff, // graphics registers 0-8 |
| 395 |
// video parameter table for mode 8 |
| 396 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 397 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 398 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 399 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 400 |
// video parameter table for mode 9 |
| 401 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 402 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 403 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 404 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 405 |
// video parameter table for mode a |
| 406 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 407 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 408 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 409 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 410 |
// video parameter table for mode b |
| 411 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 412 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 413 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 414 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 415 |
// video parameter table for mode c |
| 416 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 417 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 418 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 419 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 420 |
// video parameter table for mode d |
| 421 |
0x28, 0x18, 0x08, 0x00, 0x20, // bios data |
| 422 |
0x09, 0x0f, 0x00, 0x06, // sequencer registers |
| 423 |
0x63, // misc output registers |
| 424 |
0x37, 0x27, 0x28, 0x9a, 0x2b, 0x8a, 0x04, 0x11, // crtc registers 0-7 |
| 425 |
0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // crtc registers 8-15 |
| 426 |
0xd4, 0x86, 0xc7, 0x14, 0x00, 0xd0, 0xfc, 0xd3, 0xff, // crtc registers 16-24 |
| 427 |
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, // attr registers 0-7 |
| 428 |
0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, // attr registers 8-15 |
| 429 |
0x01, 0x00, 0x0f, 0x00, // attr registers 16-19 |
| 430 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x0f, 0xff, // graphics registers 0-8 |
| 431 |
// video parameter table for mode e |
| 432 |
0x50, 0x18, 0x08, 0x00, 0x40, // bios data |
| 433 |
0x01, 0x0f, 0x00, 0x06, // sequencer registers |
| 434 |
0x63, // misc output registers |
| 435 |
0x73, 0x4f, 0x50, 0x96, 0x54, 0x94, 0x04, 0x11, // crtc registers 0-7 |
| 436 |
0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // crtc registers 8-15 |
| 437 |
0xd4, 0x86, 0xc7, 0x28, 0x00, 0xd0, 0xfc, 0xd3, 0xff, // crtc registers 16-24 |
| 438 |
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, // attr registers 0-7 |
| 439 |
0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, // attr registers 8-15 |
| 440 |
0x01, 0x00, 0x0f, 0x00, // attr registers 16-19 |
| 441 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x0f, 0xff, // graphics registers 0-8 |
| 442 |
// video parameter table for mode f (64k graphics memory) |
| 443 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 444 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 445 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 446 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 447 |
// video parameter table for mode 10 (64k graphics memory) |
| 448 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 449 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 450 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 451 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 452 |
// video parameter table for mode f (>64k graphics memory) |
| 453 |
0x50, 0x18, 0x0e, 0x00, 0x80, // bios data |
| 454 |
0x01, 0x0f, 0x00, 0x06, // sequencer registers |
| 455 |
0xa2, // misc output registers |
| 456 |
0x73, 0x4f, 0x50, 0x96, 0x54, 0x94, 0xb6, 0x1f, // crtc registers 0-7 |
| 457 |
0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // crtc registers 8-15 |
| 458 |
0x83, 0x85, 0x5d, 0x14, 0x0f, 0x63, 0xb1, 0x9b, 0xff, // crtc registers 16-24 |
| 459 |
0x00, 0x08, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, // attr registers 0-7 |
| 460 |
0x00, 0x08, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, // attr registers 8-15 |
| 461 |
0x0b, 0x00, 0x0f, 0x00, // attr registers 16-19 |
| 462 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x0f, 0xff, // graphics registers 0-8 |
| 463 |
// video parameter table for mode 10 (>64k graphics memory) |
| 464 |
0x50, 0x18, 0x0e, 0x00, 0x80, // bios data |
| 465 |
0x01, 0x0f, 0x00, 0x06, // sequencer registers |
| 466 |
0xa3, // misc output registers |
| 467 |
0x5b, 0x4f, 0x50, 0x9e, 0x54, 0x1c, 0x4e, 0x1f, // crtc registers 0-7 |
| 468 |
0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // crtc registers 8-15 |
| 469 |
0x83, 0x85, 0x5d, 0x14, 0x0f, 0x63, 0x49, 0x9b, 0xff, // crtc registers 16-24 |
| 470 |
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, // attr registers 0-7 |
| 471 |
0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, // attr registers 8-15 |
| 472 |
0x01, 0x00, 0x0f, 0x00, // attr registers 16-19 |
| 473 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x0f, 0xff, // graphics registers 0-8 |
| 474 |
// video parameter table for mode 0 (350 lines) |
| 475 |
0x28, 0x18, 0x0e, 0x00, 0x08, // bios data |
| 476 |
0x09, 0x0f, 0x00, 0x03, // sequencer registers |
| 477 |
0xa3, // misc output registers |
| 478 |
0x37, 0x27, 0x28, 0x9a, 0x2b, 0xaa, 0x04, 0x1f, // crtc registers 0-7 |
| 479 |
0x00, 0x4d, 0x0b, 0x0c, 0x00, 0x00, 0x00, 0x00, // crtc registers 8-15 |
| 480 |
0x83, 0x85, 0x5d, 0x14, 0x0f, 0x63, 0xff, 0xb3, 0xff, // crtc registers 16-24 |
| 481 |
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, // attr registers 0-7 |
| 482 |
0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, // attr registers 8-15 |
| 483 |
0x08, 0x00, 0x0f, 0x00, // attr registers 16-19 |
| 484 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x0e, 0x0f, 0xff, // graphics registers 0-8 |
| 485 |
// video parameter table for mode 1 (350 lines) |
| 486 |
0x28, 0x18, 0x0e, 0x00, 0x08, // bios data |
| 487 |
0x09, 0x0f, 0x00, 0x03, // sequencer registers |
| 488 |
0xa3, // misc output registers |
| 489 |
0x37, 0x27, 0x28, 0x9a, 0x2b, 0xaa, 0x04, 0x1f, // crtc registers 0-7 |
| 490 |
0x00, 0x4d, 0x0b, 0x0c, 0x00, 0x00, 0x00, 0x00, // crtc registers 8-15 |
| 491 |
0x83, 0x85, 0x5d, 0x14, 0x0f, 0x63, 0xff, 0xb3, 0xff, // crtc registers 16-24 |
| 492 |
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, // attr registers 0-7 |
| 493 |
0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, // attr registers 8-15 |
| 494 |
0x08, 0x00, 0x0f, 0x00, // attr registers 16-19 |
| 495 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x0e, 0x0f, 0xff, // graphics registers 0-8 |
| 496 |
// video parameter table for mode 2 (350 lines) |
| 497 |
0x50, 0x18, 0x0e, 0x00, 0x10, // bios data |
| 498 |
0x01, 0x0f, 0x00, 0x03, // sequencer registers |
| 499 |
0xa3, // misc output registers |
| 500 |
0x73, 0x4f, 0x50, 0x96, 0x55, 0x95, 0xb6, 0x1f, // crtc registers 0-7 |
| 501 |
0x00, 0x4d, 0x0b, 0x0c, 0x00, 0x00, 0x00, 0x00, // crtc registers 8-15 |
| 502 |
0x83, 0x85, 0x5d, 0x28, 0x0f, 0x63, 0xb1, 0xb3, 0xff, // crtc registers 16-24 |
| 503 |
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, // attr registers 0-7 |
| 504 |
0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, // attr registers 8-15 |
| 505 |
0x08, 0x00, 0x0f, 0x00, // attr registers 16-19 |
| 506 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x0e, 0x0f, 0xff, // graphics registers 0-8 |
| 507 |
// video parameter table for mode 3 (350 lines) |
| 508 |
0x50, 0x18, 0x0e, 0x00, 0x10, // bios data |
| 509 |
0x01, 0x0f, 0x00, 0x03, // sequencer registers |
| 510 |
0xa3, // misc output registers |
| 511 |
0x73, 0x4f, 0x50, 0x96, 0x55, 0x95, 0xb6, 0x1f, // crtc registers 0-7 |
| 512 |
0x00, 0x4d, 0x0b, 0x0c, 0x00, 0x00, 0x00, 0x00, // crtc registers 8-15 |
| 513 |
0x83, 0x85, 0x5d, 0x28, 0x0f, 0x63, 0xb1, 0xb3, 0xff, // crtc registers 16-24 |
| 514 |
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, // attr registers 0-7 |
| 515 |
0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, // attr registers 8-15 |
| 516 |
0x08, 0x00, 0x0f, 0x00, // attr registers 16-19 |
| 517 |
0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x0e, 0x0f, 0xff // graphics registers 0-8 |
| 518 |
}; |
| 519 |
|
| 520 |
|
| 521 |
Bit16u INT10_SetupVideoParameterTable(PhysPt basepos) { |
| 522 |
if (IS_VGA_ARCH) { |
| 523 |
for (Bitu i=0;i<0x40*0x1d;i++) { |
| 524 |
phys_writeb(basepos+i,video_parameter_table_vga[i]); |
| 525 |
} |
| 526 |
return 0x40*0x1d; |
| 527 |
} else { |
| 528 |
for (Bitu i=0;i<0x40*0x17;i++) { |
| 529 |
phys_writeb(basepos+i,video_parameter_table_ega[i]); |
| 530 |
} |
| 531 |
return 0x40*0x17; |
| 532 |
} |
| 533 |
} |
| 534 |
|
| 535 |
void INT10_SetupBasicVideoParameterTable(void) { |
| 536 |
/* video parameter table at F000:F0A4 */ |
| 537 |
RealSetVec(0x1d,RealMake(0xF000, 0xF0A4)); |
| 538 |
switch (machine) { |
| 539 |
case MCH_TANDY: |
| 540 |
for (Bit16u i = 0; i < sizeof(vparams_tandy); i++) { |
| 541 |
phys_writeb(0xFF0A4+i,vparams_tandy[i]); |
| 542 |
} |
| 543 |
break; |
| 544 |
case MCH_PCJR: |
| 545 |
for (Bit16u i = 0; i < sizeof(vparams_pcjr); i++) { |
| 546 |
phys_writeb(0xFF0A4+i,vparams_pcjr[i]); |
| 547 |
} |
| 548 |
break; |
| 549 |
default: |
| 550 |
for (Bit16u i = 0; i < sizeof(vparams); i++) { |
| 551 |
phys_writeb(0xFF0A4+i,vparams[i]); |
| 552 |
} |
| 553 |
break; |
| 554 |
} |
| 555 |
} |
| 556 |
|
| 557 |
#if 0 |
| 558 |
void INT10_GenerateVideoParameterTable(void) { |
| 559 |
if (!IS_VGA_ARCH) E_Exit("Be sure that all graphics registers are readable!"); |
| 560 |
Bitu i; |
| 561 |
for (i=0; i<4; i++) { |
| 562 |
LOG_MSG("// video parameter table for mode %x (cga emulation)",i); |
| 563 |
LOG_MSG(" 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,"); |
| 564 |
LOG_MSG(" 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,"); |
| 565 |
LOG_MSG(" 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,"); |
| 566 |
LOG_MSG(" 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,"); |
| 567 |
} |
| 568 |
for (i=4; i<0x0f; i++) { |
| 569 |
Bitu ct; |
| 570 |
LOG_MSG("// video parameter table for mode %x",i); |
| 571 |
if ((i>=8) && (i<0x0d)) { |
| 572 |
LOG_MSG(" 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,"); |
| 573 |
LOG_MSG(" 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,"); |
| 574 |
LOG_MSG(" 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,"); |
| 575 |
LOG_MSG(" 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,"); |
| 576 |
} else { |
| 577 |
INT10_SetVideoMode(i); |
| 578 |
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)); |
| 579 |
Bitu seq_regs[4]; |
| 580 |
for (ct=0; ct<4; ct++) { |
| 581 |
IO_WriteB(0x3c4,ct+1); |
| 582 |
seq_regs[ct]=IO_ReadB(0x3c5); |
| 583 |
} |
| 584 |
LOG_MSG(" 0x%02x, 0x%02x, 0x%02x, 0x%02x, // sequencer registers",seq_regs[0],seq_regs[1],seq_regs[2],seq_regs[3]); |
| 585 |
LOG_MSG(" 0x%02x, // misc output registers",IO_ReadB(0x3cc)); |
| 586 |
Bitu crtc_regs[0x19]; |
| 587 |
Bit16u crt_addr=real_readw(BIOSMEM_SEG,BIOSMEM_CRTC_ADDRESS); |
| 588 |
for (ct=0; ct<0x19; ct++) { |
| 589 |
IO_WriteB(crt_addr,ct); |
| 590 |
crtc_regs[ct]=IO_ReadB(crt_addr+1); |
| 591 |
} |
| 592 |
LOG_MSG(" 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, // crtc registers 0-7", |
| 593 |
crtc_regs[0x00],crtc_regs[0x01],crtc_regs[0x02],crtc_regs[0x03], |
| 594 |
crtc_regs[0x04],crtc_regs[0x05],crtc_regs[0x06],crtc_regs[0x07]); |
| 595 |
LOG_MSG(" 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, // crtc registers 8-15", |
| 596 |
crtc_regs[0x08],crtc_regs[0x09],crtc_regs[0x0a],crtc_regs[0x0b], |
| 597 |
crtc_regs[0x0c],crtc_regs[0x0d],crtc_regs[0x0e],crtc_regs[0x0f]); |
| 598 |
LOG_MSG(" 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, // crtc registers 16-24", |
| 599 |
crtc_regs[0x10],crtc_regs[0x11],crtc_regs[0x12],crtc_regs[0x13], |
| 600 |
crtc_regs[0x14],crtc_regs[0x15],crtc_regs[0x16],crtc_regs[0x17],crtc_regs[0x18]); |
| 601 |
Bitu attr_regs[0x14]; |
| 602 |
for (ct=0; ct<0x14; ct++) { |
| 603 |
IO_ReadB(crt_addr+6); |
| 604 |
IO_WriteB(0x3c0,ct); |
| 605 |
attr_regs[ct]=IO_ReadB(0x3c1); |
| 606 |
} |
| 607 |
LOG_MSG(" 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, // attr registers 0-7", |
| 608 |
attr_regs[0x00],attr_regs[0x01],attr_regs[0x02],attr_regs[0x03], |
| 609 |
attr_regs[0x04],attr_regs[0x05],attr_regs[0x06],attr_regs[0x07]); |
| 610 |
LOG_MSG(" 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, // attr registers 8-15", |
| 611 |
attr_regs[0x08],attr_regs[0x09],attr_regs[0x0a],attr_regs[0x0b], |
| 612 |
attr_regs[0x0c],attr_regs[0x0d],attr_regs[0x0e],attr_regs[0x0f]); |
| 613 |
LOG_MSG(" 0x%02x, 0x%02x, 0x%02x, 0x%02x, // attr registers 16-19", |
| 614 |
attr_regs[0x10],attr_regs[0x11],attr_regs[0x12],attr_regs[0x13]); |
| 615 |
Bitu gfx_regs[9]; |
| 616 |
for (ct=0; ct<0x09; ct++) { |
| 617 |
IO_WriteB(0x3ce,ct); |
| 618 |
gfx_regs[ct]=IO_ReadB(0x3cf); |
| 619 |
} |
| 620 |
LOG_MSG(" 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, // graphics registers 0-8", |
| 621 |
gfx_regs[0x00],gfx_regs[0x01],gfx_regs[0x02],gfx_regs[0x03], |
| 622 |
gfx_regs[0x04],gfx_regs[0x05],gfx_regs[0x06],gfx_regs[0x07],gfx_regs[0x08]); |
| 623 |
} |
| 624 |
} |
| 625 |
for (i=0x0f; i<0x11; i++) { |
| 626 |
LOG_MSG("// video parameter table for mode %x (64k graphics memory)",i); |
| 627 |
LOG_MSG(" 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,"); |
| 628 |
LOG_MSG(" 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,"); |
| 629 |
LOG_MSG(" 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,"); |
| 630 |
LOG_MSG(" 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,"); |
| 631 |
} |
| 632 |
for (i=0x0f; i<0x11; i++) { |
| 633 |
Bitu ct; |
| 634 |
INT10_SetVideoMode(i); |
| 635 |
LOG_MSG("// video parameter table for mode %x (>64k graphics memory)",i); |
| 636 |
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)); |
| 637 |
Bitu seq_regs[4]; |
| 638 |
for (ct=0; ct<4; ct++) { |
| 639 |
IO_WriteB(0x3c4,ct+1); |
| 640 |
seq_regs[ct]=IO_ReadB(0x3c5); |
| 641 |
} |
| 642 |
LOG_MSG(" 0x%02x, 0x%02x, 0x%02x, 0x%02x, // sequencer registers",seq_regs[0],seq_regs[1],seq_regs[2],seq_regs[3]); |
| 643 |
LOG_MSG(" 0x%02x, // misc output registers",IO_ReadB(0x3cc)); |
| 644 |
Bitu crtc_regs[0x19]; |
| 645 |
Bit16u crt_addr=real_readw(BIOSMEM_SEG,BIOSMEM_CRTC_ADDRESS); |
| 646 |
for (ct=0; ct<0x19; ct++) { |
| 647 |
IO_WriteB(crt_addr,ct); |
| 648 |
crtc_regs[ct]=IO_ReadB(crt_addr+1); |
| 649 |
} |
| 650 |
LOG_MSG(" 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, // crtc registers 0-7", |
| 651 |
crtc_regs[0x00],crtc_regs[0x01],crtc_regs[0x02],crtc_regs[0x03], |
| 652 |
crtc_regs[0x04],crtc_regs[0x05],crtc_regs[0x06],crtc_regs[0x07]); |
| 653 |
LOG_MSG(" 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, // crtc registers 8-15", |
| 654 |
crtc_regs[0x08],crtc_regs[0x09],crtc_regs[0x0a],crtc_regs[0x0b], |
| 655 |
crtc_regs[0x0c],crtc_regs[0x0d],crtc_regs[0x0e],crtc_regs[0x0f]); |
| 656 |
LOG_MSG(" 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, // crtc registers 16-24", |
| 657 |
crtc_regs[0x10],crtc_regs[0x11],crtc_regs[0x12],crtc_regs[0x13], |
| 658 |
crtc_regs[0x14],crtc_regs[0x15],crtc_regs[0x16],crtc_regs[0x17],crtc_regs[0x18]); |
| 659 |
Bitu attr_regs[0x14]; |
| 660 |
for (ct=0; ct<0x14; ct++) { |
| 661 |
IO_ReadB(crt_addr+6); |
| 662 |
IO_WriteB(0x3c0,ct); |
| 663 |
attr_regs[ct]=IO_ReadB(0x3c1); |
| 664 |
} |
| 665 |
LOG_MSG(" 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, // attr registers 0-7", |
| 666 |
attr_regs[0x00],attr_regs[0x01],attr_regs[0x02],attr_regs[0x03], |
| 667 |
attr_regs[0x04],attr_regs[0x05],attr_regs[0x06],attr_regs[0x07]); |
| 668 |
LOG_MSG(" 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, // attr registers 8-15", |
| 669 |
attr_regs[0x08],attr_regs[0x09],attr_regs[0x0a],attr_regs[0x0b], |
| 670 |
attr_regs[0x0c],attr_regs[0x0d],attr_regs[0x0e],attr_regs[0x0f]); |
| 671 |
LOG_MSG(" 0x%02x, 0x%02x, 0x%02x, 0x%02x, // attr registers 16-19", |
| 672 |
attr_regs[0x10],attr_regs[0x11],attr_regs[0x12],attr_regs[0x13]); |
| 673 |
Bitu gfx_regs[9]; |
| 674 |
for (ct=0; ct<0x09; ct++) { |
| 675 |
IO_WriteB(0x3ce,ct); |
| 676 |
gfx_regs[ct]=IO_ReadB(0x3cf); |
| 677 |
} |
| 678 |
LOG_MSG(" 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, // graphics registers 0-8", |
| 679 |
gfx_regs[0x00],gfx_regs[0x01],gfx_regs[0x02],gfx_regs[0x03], |
| 680 |
gfx_regs[0x04],gfx_regs[0x05],gfx_regs[0x06],gfx_regs[0x07],gfx_regs[0x08]); |
| 681 |
} |
| 682 |
for (i=0; i<4; i++) { |
| 683 |
if (IS_VGA_ARCH) { |
| 684 |
LOG_MSG("// video parameter table for mode %x (350 lines)",i); |
| 685 |
LOG_MSG(" 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,"); |
| 686 |
LOG_MSG(" 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,"); |
| 687 |
LOG_MSG(" 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,"); |
| 688 |
LOG_MSG(" 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,"); |
| 689 |
} else { |
| 690 |
Bitu ct; |
| 691 |
INT10_SetVideoMode(i); |
| 692 |
LOG_MSG("// video parameter table for mode %x (350 lines)",i); |
| 693 |
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)); |
| 694 |
Bitu seq_regs[4]; |
| 695 |
for (ct=0; ct<4; ct++) { |
| 696 |
IO_WriteB(0x3c4,ct+1); |
| 697 |
seq_regs[ct]=IO_ReadB(0x3c5); |
| 698 |
} |
| 699 |
LOG_MSG(" 0x%02x, 0x%02x, 0x%02x, 0x%02x, // sequencer registers",seq_regs[0],seq_regs[1],seq_regs[2],seq_regs[3]); |
| 700 |
LOG_MSG(" 0x%02x, // misc output registers",IO_ReadB(0x3cc)); |
| 701 |
Bitu crtc_regs[0x19]; |
| 702 |
Bit16u crt_addr=real_readw(BIOSMEM_SEG,BIOSMEM_CRTC_ADDRESS); |
| 703 |
for (ct=0; ct<0x19; ct++) { |
| 704 |
IO_WriteB(crt_addr,ct); |
| 705 |
crtc_regs[ct]=IO_ReadB(crt_addr+1); |
| 706 |
} |
| 707 |
LOG_MSG(" 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, // crtc registers 0-7", |
| 708 |
crtc_regs[0x00],crtc_regs[0x01],crtc_regs[0x02],crtc_regs[0x03], |
| 709 |
crtc_regs[0x04],crtc_regs[0x05],crtc_regs[0x06],crtc_regs[0x07]); |
| 710 |
LOG_MSG(" 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, // crtc registers 8-15", |
| 711 |
crtc_regs[0x08],crtc_regs[0x09],crtc_regs[0x0a],crtc_regs[0x0b], |
| 712 |
crtc_regs[0x0c],crtc_regs[0x0d],crtc_regs[0x0e],crtc_regs[0x0f]); |
| 713 |
LOG_MSG(" 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, // crtc registers 16-24", |
| 714 |
crtc_regs[0x10],crtc_regs[0x11],crtc_regs[0x12],crtc_regs[0x13], |
| 715 |
crtc_regs[0x14],crtc_regs[0x15],crtc_regs[0x16],crtc_regs[0x17],crtc_regs[0x18]); |
| 716 |
Bitu attr_regs[0x14]; |
| 717 |
for (ct=0; ct<0x14; ct++) { |
| 718 |
IO_ReadB(crt_addr+6); |
| 719 |
IO_WriteB(0x3c0,ct); |
| 720 |
attr_regs[ct]=IO_ReadB(0x3c1); |
| 721 |
} |
| 722 |
LOG_MSG(" 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, // attr registers 0-7", |
| 723 |
attr_regs[0x00],attr_regs[0x01],attr_regs[0x02],attr_regs[0x03], |
| 724 |
attr_regs[0x04],attr_regs[0x05],attr_regs[0x06],attr_regs[0x07]); |
| 725 |
LOG_MSG(" 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, // attr registers 8-15", |
| 726 |
attr_regs[0x08],attr_regs[0x09],attr_regs[0x0a],attr_regs[0x0b], |
| 727 |
attr_regs[0x0c],attr_regs[0x0d],attr_regs[0x0e],attr_regs[0x0f]); |
| 728 |
LOG_MSG(" 0x%02x, 0x%02x, 0x%02x, 0x%02x, // attr registers 16-19", |
| 729 |
attr_regs[0x10],attr_regs[0x11],attr_regs[0x12],attr_regs[0x13]); |
| 730 |
Bitu gfx_regs[9]; |
| 731 |
for (ct=0; ct<0x09; ct++) { |
| 732 |
IO_WriteB(0x3ce,ct); |
| 733 |
gfx_regs[ct]=IO_ReadB(0x3cf); |
| 734 |
} |
| 735 |
LOG_MSG(" 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, // graphics registers 0-8", |
| 736 |
gfx_regs[0x00],gfx_regs[0x01],gfx_regs[0x02],gfx_regs[0x03], |
| 737 |
gfx_regs[0x04],gfx_regs[0x05],gfx_regs[0x06],gfx_regs[0x07],gfx_regs[0x08]); |
| 738 |
} |
| 739 |
} |
| 740 |
if (IS_VGA_ARCH) { |
| 741 |
for (i=0x0e; i<0x14; i++) { |
| 742 |
Bitu ct=i; |
| 743 |
if (i==0x0e) ct=1; |
| 744 |
if (i==0x0f) ct=3; |
| 745 |
if (i==0x010) ct=7; |
| 746 |
INT10_SetVideoMode(ct); |
| 747 |
LOG_MSG("// video parameter table for mode %x",i); |
| 748 |
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)); |
| 749 |
Bitu seq_regs[4]; |
| 750 |
for (ct=0; ct<4; ct++) { |
| 751 |
IO_WriteB(0x3c4,ct+1); |
| 752 |
seq_regs[ct]=IO_ReadB(0x3c5); |
| 753 |
} |
| 754 |
LOG_MSG(" 0x%02x, 0x%02x, 0x%02x, 0x%02x, // sequencer registers",seq_regs[0],seq_regs[1],seq_regs[2],seq_regs[3]); |
| 755 |
LOG_MSG(" 0x%02x, // misc output registers",IO_ReadB(0x3cc)); |
| 756 |
Bitu crtc_regs[0x19]; |
| 757 |
Bit16u crt_addr=real_readw(BIOSMEM_SEG,BIOSMEM_CRTC_ADDRESS); |
| 758 |
for (ct=0; ct<0x19; ct++) { |
| 759 |
IO_WriteB(crt_addr,ct); |
| 760 |
crtc_regs[ct]=IO_ReadB(crt_addr+1); |
| 761 |
} |
| 762 |
LOG_MSG(" 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, // crtc registers 0-7", |
| 763 |
crtc_regs[0x00],crtc_regs[0x01],crtc_regs[0x02],crtc_regs[0x03], |
| 764 |
crtc_regs[0x04],crtc_regs[0x05],crtc_regs[0x06],crtc_regs[0x07]); |
| 765 |
LOG_MSG(" 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, // crtc registers 8-15", |
| 766 |
crtc_regs[0x08],crtc_regs[0x09],crtc_regs[0x0a],crtc_regs[0x0b], |
| 767 |
crtc_regs[0x0c],crtc_regs[0x0d],crtc_regs[0x0e],crtc_regs[0x0f]); |
| 768 |
LOG_MSG(" 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, // crtc registers 16-24", |
| 769 |
crtc_regs[0x10],crtc_regs[0x11],crtc_regs[0x12],crtc_regs[0x13], |
| 770 |
crtc_regs[0x14],crtc_regs[0x15],crtc_regs[0x16],crtc_regs[0x17],crtc_regs[0x18]); |
| 771 |
Bitu attr_regs[0x14]; |
| 772 |
for (ct=0; ct<0x14; ct++) { |
| 773 |
IO_ReadB(crt_addr+6); |
| 774 |
IO_WriteB(0x3c0,ct); |
| 775 |
attr_regs[ct]=IO_ReadB(0x3c1); |
| 776 |
} |
| 777 |
LOG_MSG(" 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, // attr registers 0-7", |
| 778 |
attr_regs[0x00],attr_regs[0x01],attr_regs[0x02],attr_regs[0x03], |
| 779 |
attr_regs[0x04],attr_regs[0x05],attr_regs[0x06],attr_regs[0x07]); |
| 780 |
LOG_MSG(" 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, // attr registers 8-15", |
| 781 |
attr_regs[0x08],attr_regs[0x09],attr_regs[0x0a],attr_regs[0x0b], |
| 782 |
attr_regs[0x0c],attr_regs[0x0d],attr_regs[0x0e],attr_regs[0x0f]); |
| 783 |
LOG_MSG(" 0x%02x, 0x%02x, 0x%02x, 0x%02x, // attr registers 16-19", |
| 784 |
attr_regs[0x10],attr_regs[0x11],attr_regs[0x12],attr_regs[0x13]); |
| 785 |
Bitu gfx_regs[9]; |
| 786 |
for (ct=0; ct<0x09; ct++) { |
| 787 |
IO_WriteB(0x3ce,ct); |
| 788 |
gfx_regs[ct]=IO_ReadB(0x3cf); |
| 789 |
} |
| 790 |
LOG_MSG(" 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, // graphics registers 0-8", |
| 791 |
gfx_regs[0x00],gfx_regs[0x01],gfx_regs[0x02],gfx_regs[0x03], |
| 792 |
gfx_regs[0x04],gfx_regs[0x05],gfx_regs[0x06],gfx_regs[0x07],gfx_regs[0x08]); |
| 793 |
} |
| 794 |
} |
| 795 |
INT10_SetVideoMode(3); |
| 796 |
E_Exit("done!"); |
| 797 |
} |
| 798 |
#endif |