1 /* Project 16 Source Code~
\r
2 * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669
\r
4 * This file is part of Project 16.
\r
6 * Project 16 is free software; you can redistribute it and/or modify
\r
7 * it under the terms of the GNU General Public License as published by
\r
8 * the Free Software Foundation; either version 3 of the License, or
\r
9 * (at your option) any later version.
\r
11 * Project 16 is distributed in the hope that it will be useful,
\r
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
14 * GNU General Public License for more details.
\r
16 * You should have received a copy of the GNU General Public License
\r
17 * along with this program. If not, see <http://www.gnu.org/licenses/>, or
\r
18 * write to the Free Software Foundation, Inc., 51 Franklin Street,
\r
19 * Fifth Floor, Boston, MA 02110-1301 USA.
\r
23 #ifndef _SMALLMODEXRES_H_
\r
24 #define _SMALLMODEXRES_H_
\r
26 #include "src/lib/types.h"
\r
28 /*static const word ModeX_320x240regs[75] =
\r
57 static const word ModeX_192x144regs[] = {
\r
58 0x4f01, /* horizontal display enable end */
\r
59 0x5002, /* Start horizontal blanking */
\r
60 0x5404, /* End horizontal blanking */
\r
61 0x8005, /* End horizontal retrace */
\r
62 0x0d06, /* vertical total */
\r
63 0x3e07, /* overflow (bit 8 of vertical counts) */
\r
64 0x4109, /* cell height (2 to double-scan */
\r
65 0xea10, /* v sync start */
\r
66 0xac11, /* v sync end and protect cr0-cr7 */
\r
67 0xdf12, /* vertical displayed */
\r
68 0x2813, /* offset/logical width */
\r
69 0x0014, /* turn off dword mode */
\r
70 0xe715, /* v blank start */
\r
71 0x0616, /* v blank end */
\r
72 0xe317 /* turn on byte mode */
\r
75 #endif /*_SMALLMODEXRES_H_*/
\r
77 voidtg::mode160x120(){
\r
78 int crtc11; outp(0x3d4, 0x11); // unlock crtc
\r
79 crtc11 = inp(0x3d5) & 0x7f;
\r
81 outp(0x3d5, crtc11);
\r
90 modeName = "160x120";
\r
92 outp(0x3c2, 0xe3); // mor
\r
94 outp(0x3d4, 0x00); // crtc
\r
97 outp(0x3d4, 0x01); // crtc
\r
100 outp(0x3d4, 0x02); // crtc
\r
103 outp(0x3d4, 0x03); // crtc
\r
106 outp(0x3d4, 0x04); // crtc
\r
109 outp(0x3d4, 0x05); // crtc
\r
112 outp(0x3d4, 0x06); // crtc
\r
115 outp(0x3d4, 0x07); // crtc
\r
118 outp(0x3d4, 0x08); // crtc
\r
121 outp(0x3d4, 0x09); // crtc
\r
124 outp(0x3d4, 0x10); // crtc
\r
127 outp(0x3d4, 0x11); // crtc
\r
130 outp(0x3d4, 0x12); // crtc
\r
133 outp(0x3d4, 0x13); // crtc
\r
136 outp(0x3d4, 0x14); // crtc
\r
139 outp(0x3d4, 0x15); // crtc
\r
142 outp(0x3d4, 0x16); // crtc
\r
145 outp(0x3d4, 0x17); // crtc
\r
148 outp(0x3c4, 0x01); // seq
\r
151 outp(0x3c4, 0x03); // seq
\r
154 outp(0x3c4, 0x04); // seq
\r
157 outp(0x3ce, 0x05); // gcr
\r
160 outp(0x3ce, 0x06); // gcr
\r
164 outp(0x3c0, 0x10 | 0x20);
\r
168 outp(0x3c0, 0x11 | 0x20);
\r
172 outp(0x3c0, 0x12 | 0x20);
\r
176 outp(0x3c0, 0x13 | 0x20);
\r
180 outp(0x3c0, 0x14 | 0x20);
\r
183 outp(0x3d4, 0x11); // lock crtc
\r
184 crtc11 = inp(0x3d5) | 0x80;
\r
186 outp(0x3d5, crtc11);
\r