X-Git-Url: http://4ch.mooo.com/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fmodex16%2F192x144.h;h=69ccc81fed2538ca5dbe097ca22a7f2ac2e206b2;hb=c1d3221afb5fe541d8c886ff66198329c153e48e;hp=7c07a9c6a5d7f8abc0fe042383bfd3728f7cb963;hpb=ba0fe818a8d5b06b78457f0bde868831cde74e3c;p=16.git diff --git a/src/lib/modex16/192x144.h b/src/lib/modex16/192x144.h index 7c07a9c6..69ccc81f 100755 --- a/src/lib/modex16/192x144.h +++ b/src/lib/modex16/192x144.h @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669 + * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 * * This file is part of Project 16. * @@ -20,8 +20,8 @@ * */ -#ifndef _SMALLMODEXRES_H_ -#define _SMALLMODEXRES_H_ +#ifndef _SMALLMODEXRESS_H_ +#define _SMALLMODEXRESS_H_ #include "src/lib/types.h" @@ -55,138 +55,52 @@ };*/ static const word ModeX_192x144regs[] = { - 0x4f01, /* horizontal display enable end */ - 0x5002, /* Start horizontal blanking */ - 0x5404, /* End horizontal blanking */ - 0x8005, /* End horizontal retrace */ + 0x3f00, /* Horizontal total */ + 0x2701, /* horizontal display enable end */ + 0x3002, /* Start horizontal blanking */ + 0x4c03, /* End horizontal blanking */ + 0x3404, /* Start horizontal retrace */ + 0x4a05, /* End horizontal retrace */ 0x0d06, /* vertical total */ 0x3e07, /* overflow (bit 8 of vertical counts) */ 0x4109, /* cell height (2 to double-scan */ 0xea10, /* v sync start */ 0xac11, /* v sync end and protect cr0-cr7 */ - 0xdf12, /* vertical displayed */ - 0x2813, /* offset/logical width */ + 0x1f12, /* vertical displayed */ + 0x1813, /* offset/logical width */ 0x0014, /* turn off dword mode */ 0xe715, /* v blank start */ 0x0616, /* v blank end */ 0xe317 /* turn on byte mode */ -}; - -#endif /*_SMALLMODEXRES_H_*/ -/* -void -tg::mode160x120() -{ - int crtc11; - - outp(0x3d4, 0x11); // unlock crtc - crtc11 = inp(0x3d5) & 0x7f; - outp(0x3d4, 0x11); - outp(0x3d5, crtc11); - - width = 160; - height = 120; - maxx = 159; - maxy = 119; - pages = 13; - lineSize = 40; - pageSize = 19200; - modeName = "160x120"; - - outp(0x3c2, 0xe3); // mor - - outp(0x3d4, 0x00); // crtc - outp(0x3d5, 0x32); - - outp(0x3d4, 0x01); // crtc - outp(0x3d5, 0x27); - - outp(0x3d4, 0x02); // crtc - outp(0x3d5, 0x28); - - outp(0x3d4, 0x03); // crtc - outp(0x3d5, 0x20); - - outp(0x3d4, 0x04); // crtc - outp(0x3d5, 0x2b); - - outp(0x3d4, 0x05); // crtc - outp(0x3d5, 0x70); - - outp(0x3d4, 0x06); // crtc - outp(0x3d5, 0x0d); - - outp(0x3d4, 0x07); // crtc - outp(0x3d5, 0x3e); - - outp(0x3d4, 0x08); // crtc - outp(0x3d5, 0x00); - - outp(0x3d4, 0x09); // crtc - outp(0x3d5, 0x43); - - outp(0x3d4, 0x10); // crtc - outp(0x3d5, 0xea); - - outp(0x3d4, 0x11); // crtc - outp(0x3d5, 0xac); - - outp(0x3d4, 0x12); // crtc - outp(0x3d5, 0xdf); - - outp(0x3d4, 0x13); // crtc - outp(0x3d5, 0x14); - - outp(0x3d4, 0x14); // crtc - outp(0x3d5, 0x00); - - outp(0x3d4, 0x15); // crtc - outp(0x3d5, 0xe7); - - outp(0x3d4, 0x16); // crtc - outp(0x3d5, 0x06); - - outp(0x3d4, 0x17); // crtc - outp(0x3d5, 0xe3); - - outp(0x3c4, 0x01); // seq - outp(0x3c5, 0x01); - - outp(0x3c4, 0x03); // seq - outp(0x3c5, 0x00); - - outp(0x3c4, 0x04); // seq - outp(0x3c5, 0x06); - - outp(0x3ce, 0x05); // gcr - outp(0x3cf, 0x40); - - outp(0x3ce, 0x06); // gcr - outp(0x3cf, 0x05); - - inp(0x3da); // acr - outp(0x3c0, 0x10 | 0x20); - outp(0x3c0, 0x41); - - inp(0x3da); // acr - outp(0x3c0, 0x11 | 0x20); - outp(0x3c0, 0x00); - - inp(0x3da); // acr - outp(0x3c0, 0x12 | 0x20); - outp(0x3c0, 0x0f); - - inp(0x3da); // acr - outp(0x3c0, 0x13 | 0x20); - outp(0x3c0, 0x00); - - inp(0x3da); // acr - outp(0x3c0, 0x14 | 0x20); - outp(0x3c0, 0x00); - - outp(0x3d4, 0x11); // lock crtc - crtc11 = inp(0x3d5) | 0x80; - outp(0x3d4, 0x11); - outp(0x3d5, crtc11); -} -*/ +};//50 => 30 + +#endif /*_SMALLMODEXRESS_H_*/ +/*#include "TwkUser.h" // get Register definition +Register 192x144[] = + { + { 0x3d4, 0x0, 0x3f}, + { 0x3d4, 0x1, 0x2f}, + { 0x3d4, 0x2, 0x30}, + { 0x3d4, 0x3, 0x0}, + { 0x3d4, 0x4, 0x34}, + { 0x3d4, 0x5, 0x48}, + { 0x3d4, 0x6, 0xd}, + { 0x3d4, 0x7, 0x3e}, + { 0x3d4, 0x8, 0x0}, + { 0x3d4, 0x9, 0x41}, + { 0x3d4, 0x10, 0xea}, + { 0x3d4, 0x11, 0xac}, + { 0x3d4, 0x12, 0x1f}, + { 0x3d4, 0x13, 0x18}, + { 0x3d4, 0x14, 0x0}, + { 0x3d4, 0x15, 0xe7}, + { 0x3d4, 0x16, 0x6}, + { 0x3d4, 0x17, 0xe3}, + { 0x3c4, 0x1, 0x1}, + { 0x3c4, 0x4, 0x6}, + { 0x3ce, 0x5, 0x40}, + { 0x3ce, 0x6, 0x5}, + { 0x3c0, 0x10, 0x41}, + { 0x3c0, 0x11, 0xe}, + { 0x3c0, 0x13, 0x0} + };*/