/*
input test
*/
+#include "src/lib/16_ca.h"
#include "src/lib/16_mm.h"
+#include "src/lib/modex16.h"
void
main(int argc, char *argv[])
{
+ mminfo_t mm; mminfotype mmi;
+ memptr bigbuffer;
+ __segment segu;
+ char *bakapee;
+ word baka;
+ page_t screen;
+ bakapee = malloc(64);
+// memset(bakapee, 0, 64);
+ mm.mmstarted=0;
+
+ if(argv[1]) bakapee = argv[1];
+ else bakapee = "data/koishi~~.pcx";
+
+ textInit();\r
+
+ /* setup camera and screen~ */\r
+ screen = modexDefaultPage();\r
+ screen.width += (16*2);\r
+ screen.height += (16*2);
+
+ printf("start!\n");
+ MM_Startup(&mm, &mmi);
+ printf("done!\n");
+ printf("&main()=%Fp\n", *argv[0]);
+ if(CA_LoadFile(bakapee, &bigbuffer, &mm, &mmi)) baka=1;
+ else
+ baka=0;
+ //MM_GetPtr(&bigbuffer, mmi.nearheap, &mm, &mmi);
+ //hmm functions in cache system use the buffered stuff
+ printf("size of big buffer~=%u\n", _bmsize(segu, bigbuffer));
+ getch();
+ modexEnter();
+ MM_ShowMemory(&screen, &mm);
+ getch();
+ MM_Report(&screen, &mm, &mmi);
+ modexLeave();
+ printf("stop!\n");
+ MM_FreePtr(&bigbuffer, &mm);
+ MM_Shutdown(&mm);
+ printf("done!\n");
+ free(bakapee);
+ //printf("_bios_memsize=%u\n", _bios_memsize());
+ if(baka) printf("\nyay!\n");
+ else printf("\npoo!\n");
}