1 /* Project 16 Source Code~
\r
2 * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover
\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 #include "src/lib/modex16.h"
\r
24 #include "src/lib/16_sprit.h"
\r
25 #include "src/lib/16_ca.h"
\r
26 #include "src/lib/16_mm.h"
\r
29 global_game_variables_t gvar;
\r
40 gvar.mm.mmstarted=0;
\r
42 MM_Startup(&gvar.mm, &gvar.mmi);
\r
44 printf("loading\n");
\r
45 if(CA_LoadFile("data/spri/chikyuu.vrs", &bigbuffer, &gvar)) baka=1; else baka=0;
\r
47 // DOSLIB: check our environment
\r
50 // DOSLIB: what CPU are we using?
\r
51 // NTS: I can see from the makefile Sparky4 intends this to run on 8088 by the -0 switch in CFLAGS.
\r
52 // So this code by itself shouldn't care too much what CPU it's running on. Except that other
\r
53 // parts of this project (DOSLIB itself) rely on CPU detection to know what is appropriate for
\r
54 // the CPU to carry out tasks. --J.C.
\r
57 // DOSLIB: check for VGA
\r
59 printf("VGA probe failed\n");
\r
62 // hardware must be VGA or higher!
\r
63 if (!(vga_state.vga_flags & VGA_IS_VGA)) {
\r
64 printf("This program requires VGA or higher graphics hardware\n");
\r
68 VGAmodeX(1, 1, &gvar);
\r
69 modexHiganbanaPageSetup(&gvar.video);
\r
71 /* non sprite comparison */
\r
73 modexCopyPageRegion(&gvar.video.page[0], &gvar.video.page[0], 0, 0, 0, 0, 320, 240);
\r
74 t1 = (*clockw-start) /18.2;
\r
78 t2 = (*clockw-start)/18.2;
\r
85 modexPalUpdate0(pal);
\r
92 VGAmodeX(0, 1, &gvar);
\r
93 MM_ShowMemory(&gvar, &gvar.mm);
\r
94 MM_DumpData(&gvar.mm);
\r
96 MM_FreePtr(&bigbuffer, &gvar.mm);
\r
99 MM_Shutdown(&gvar.mm);
\r
100 //printf("CPU to VGA: %f\n", t1);
\r
101 //printf("VGA to VGA: %f\n", t2);
\r
103 printf("Project 16 vgacamm.exe. This is just a test file!\n");
\r
104 printf("version %s\n", VERSION);
\r
105 printf("t1: %f\n", t1);
\r
106 printf("t2: %f\n", t2);
\r
107 printf("gvar.video.page[0].width: %u\n", gvar.video.page[0].width);
\r
108 printf("gvar.video.page[0].height: %u\n", gvar.video.page[0].height);
\r
109 // printf("Num %d", num_of_vrl);
\r
110 if(baka) printf("\nyay!\n");
\r
111 else printf("\npoo!\n");
\r