From: sparky4 <sparky4@cock.li> Date: Sun, 30 Aug 2015 15:06:45 +0000 (-0500) Subject: modified: 16.exe X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=007099230dad9fac10cfd7c3c3b82eedd2df0bae;p=16.git modified: 16.exe modified: 16_CA.BCO modified: 16_HC.BCO modified: 16_HEAD.BCO modified: 16_MM.BCO modified: EXMMBC.BCO deleted: HEAP.16 modified: KITTEN.BCO deleted: MMDUMP.16 deleted: PROFILE.16 modified: bakapi.exe modified: bcexmm.exe modified: bcexmm.prj modified: exmmtest.exe modified: fmemtest.exe modified: fontgfx.exe modified: fonttest.exe modified: inputest.exe modified: maptest.exe modified: palettec.exe modified: pcxtest.exe modified: scroll.exe modified: sountest.exe modified: src/lib/bitmap.c modified: src/lib/modex16.c modified: src/pcxtest.c modified: test.exe modified: test2.exe modified: tsthimem.exe --- diff --git a/16.exe b/16.exe index dcbdab22..966efcb0 100755 Binary files a/16.exe and b/16.exe differ diff --git a/16_CA.BCO b/16_CA.BCO index 7e4aeca7..3c235721 100755 Binary files a/16_CA.BCO and b/16_CA.BCO differ diff --git a/16_HC.BCO b/16_HC.BCO index cbdf386c..03313d4e 100755 Binary files a/16_HC.BCO and b/16_HC.BCO differ diff --git a/16_HEAD.BCO b/16_HEAD.BCO index 0d23b6d1..cc9400b7 100755 Binary files a/16_HEAD.BCO and b/16_HEAD.BCO differ diff --git a/16_MM.BCO b/16_MM.BCO index a68ed6bf..a6fbeff3 100755 Binary files a/16_MM.BCO and b/16_MM.BCO differ diff --git a/EXMMBC.BCO b/EXMMBC.BCO index 508af7e2..48e6be3e 100755 Binary files a/EXMMBC.BCO and b/EXMMBC.BCO differ diff --git a/HEAP.16 b/HEAP.16 deleted file mode 100755 index 0ee8d583..00000000 --- a/HEAP.16 +++ /dev/null @@ -1,45 +0,0 @@ - - == default == - - USED block at 1c840016 of size 66 - FREE block at 1c840058 of size 18 - USED block at 1c84006a of size 136 - USED block at 1c8400f2 of size 20 - FREE block at 1c840106 of size 7926 -OK - end of heap - - == near == - - USED block at c8385b6 of size 12 - USED block at c8385c2 of size 294 - USED block at c8386e8 of size 42 - USED block at c838712 of size 20 - USED block at c838726 of size 20 - USED block at c83873a of size 20 - USED block at c83874e of size 20 - USED block at c838762 of size 20 - USED block at c838776 of size 30854 -OK - end of heap - - == far == - - USED block at 1c840016 of size 66 - USED block at 1c840058 of size 18 - USED block at 1c84006a of size 136 - USED block at 1c8400f2 of size 20 - USED block at 1c840106 of size 7926 -OK - end of heap - -Memory Type Total Used Free ----------------- -------- -------- -------- -Default 8166 222 7944 -Near 31302 448 30854 -Far 8166 222 7944 ----------------- -------- -------- -------- -coreleft = 30852 -farcoreleft = 38600 -GetFreeSize = 7768 -GetNearFreeSize = 30854 -GetFarFreeSize = 7768 -memavl = 30852 -stackavail = 15059 diff --git a/KITTEN.BCO b/KITTEN.BCO index 301fdbd0..6c7fa1a6 100755 Binary files a/KITTEN.BCO and b/KITTEN.BCO differ diff --git a/MMDUMP.16 b/MMDUMP.16 deleted file mode 100755 index 6b186562..00000000 Binary files a/MMDUMP.16 and /dev/null differ diff --git a/PROFILE.16 b/PROFILE.16 deleted file mode 100755 index e69de29b..00000000 diff --git a/bakapi.exe b/bakapi.exe index 1758a97f..0e63e6b8 100755 Binary files a/bakapi.exe and b/bakapi.exe differ diff --git a/bcexmm.exe b/bcexmm.exe index a1df0042..b3446201 100755 Binary files a/bcexmm.exe and b/bcexmm.exe differ diff --git a/bcexmm.prj b/bcexmm.prj index 7d7c7b61..d490131a 100755 Binary files a/bcexmm.prj and b/bcexmm.prj differ diff --git a/exmmtest.exe b/exmmtest.exe index d274f3dd..6662ebe2 100755 Binary files a/exmmtest.exe and b/exmmtest.exe differ diff --git a/fmemtest.exe b/fmemtest.exe index fd8b5774..5e69999c 100755 Binary files a/fmemtest.exe and b/fmemtest.exe differ diff --git a/fontgfx.exe b/fontgfx.exe index e81edb50..b63fb5bd 100755 Binary files a/fontgfx.exe and b/fontgfx.exe differ diff --git a/fonttest.exe b/fonttest.exe index 130f28d5..a2fcbcd3 100755 Binary files a/fonttest.exe and b/fonttest.exe differ diff --git a/inputest.exe b/inputest.exe index 66fd13c9..1552031f 100755 Binary files a/inputest.exe and b/inputest.exe differ diff --git a/maptest.exe b/maptest.exe index 648ec1ef..3c1e32e2 100755 Binary files a/maptest.exe and b/maptest.exe differ diff --git a/palettec.exe b/palettec.exe index 492749c1..adcd3b89 100755 Binary files a/palettec.exe and b/palettec.exe differ diff --git a/pcxtest.exe b/pcxtest.exe index fdd02e25..579a8b32 100755 Binary files a/pcxtest.exe and b/pcxtest.exe differ diff --git a/scroll.exe b/scroll.exe index 291f39e5..5187e055 100755 Binary files a/scroll.exe and b/scroll.exe differ diff --git a/sountest.exe b/sountest.exe index 6ad59991..9194021d 100755 Binary files a/sountest.exe and b/sountest.exe differ diff --git a/src/lib/bitmap.c b/src/lib/bitmap.c index 5e65195e..85f85b1b 100755 --- a/src/lib/bitmap.c +++ b/src/lib/bitmap.c @@ -1,28 +1,28 @@ -/* Project 16 Source Code~ - * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669 - * - * This file is part of Project 16. - * - * Project 16 is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Project 16 is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>, or - * write to the Free Software Foundation, Inc., 51 Franklin Street, - * Fifth Floor, Boston, MA 02110-1301 USA. - * - */ - +/* Project 16 Source Code~ + * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669 + * + * This file is part of Project 16. + * + * Project 16 is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * Project 16 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>, or + * write to the Free Software Foundation, Inc., 51 Franklin Street, + * Fifth Floor, Boston, MA 02110-1301 USA. + * + */ + #include <stdio.h> -#include <stdlib.h> -#include <malloc.h> +#include <stdlib.h> +#include <malloc.h> #include "src/lib/bitmap.h" #include "src/lib/modex16.h" @@ -98,7 +98,7 @@ bitmapLoadPcx(char *filename) { bitmap_t result; dword bufSize; int index; - byte count, val; + byte count, val; /* open the PCX file for reading */ file = fopen(filename, "rb"); @@ -108,23 +108,23 @@ bitmapLoadPcx(char *filename) { } /* load the first part of the pcx file */ - loadPcxStage1(file, &result); + loadPcxStage1(file, &result); - /* allocate the buffer */ + /* allocate the buffer */ //printf("%zu\n", _memmax()); - bufSize = (/*(dword)*/result.width * result.height); - result.data = malloc(bufSize); -// result.data = (byte far *)_fmalloc(bufSize); -// result.data = (byte __huge *)halloc(bufSize, sizeof(byte)); - /*printf("&bufSize=%p\n", &bufSize); - printf("&result.data=%p\n", result.data); - printf("Size of block is %zu bytes\n", _msize(result.data)); - printf("Size of bufSize is %zu bytes\n", bufSize); - printf("Size of result.width is %zu \n", result.width); - printf("Size of result.height is %zu \n", result.height); - printf("Dimensions of result is %lu\n", (dword)result.width*result.height);*/ - //exit(0); - if(!result.data) { + bufSize = (/*(dword)*/result.width * result.height); + result.data = malloc(bufSize); +// result.data = (byte far *)_fmalloc(bufSize); +// result.data = (byte __huge *)halloc(bufSize, sizeof(byte)); + /*printf("&bufSize=%p\n", &bufSize); + printf("&result.data=%p\n", result.data); + printf("Size of block is %zu bytes\n", _msize(result.data)); + printf("Size of bufSize is %zu bytes\n", bufSize); + printf("Size of result.width is %zu \n", result.width); + printf("Size of result.height is %zu \n", result.height); + printf("Dimensions of result is %lu\n", (dword)result.width*result.height);*/ + //exit(0); + if(!result.data) { fprintf(stderr, "Could not allocate memory for bitmap data."); fclose(file); exit(-1); @@ -142,7 +142,7 @@ bitmapLoadPcx(char *filename) { val = count; count = 1; } - + /* write the pixel the specified number of times */ for(; count && index < bufSize; count--,index++) { result.data[index] = val; diff --git a/src/lib/modex16.c b/src/lib/modex16.c index 27ad0677..e3e70397 100755 --- a/src/lib/modex16.c +++ b/src/lib/modex16.c @@ -314,7 +314,7 @@ void modexDrawBmpRegion(page_t *page, int x, int y, int rx, int ry, int rw, int rh, bitmap_t *bmp) { word poffset = (word) page->data + y*(page->width/4) + x/4; - byte *data = bmp->data;//+bmp->offset; + byte far *data = bmp->data;//+bmp->offset; word bmpOffset = (word) data + ry * bmp->width + rx; word width = rw; word height = rh; @@ -325,9 +325,9 @@ modexDrawBmpRegion(page_t *page, int x, int y, word rowCounter; byte planeCounter = 4; - printf("bmp->data=%Fp\n",bmp->data); +/* printf("bmp->data=%Fp\n",bmp->data); printf("*bmp->data=%Fp\n",*(bmp->data)); - printf("&bmp->data=%Fp\n",&(bmp->data)); + printf("&bmp->data=%Fp\n",&(bmp->data));*/ //code is a bit slow here __asm { diff --git a/src/pcxtest.c b/src/pcxtest.c index be51733b..07a4795d 100755 --- a/src/pcxtest.c +++ b/src/pcxtest.c @@ -87,7 +87,7 @@ void main() { start = *clockw; //for(i=0; i<100 ;i++) { //0000 modexDrawBmp(&page, 20, 20, &bmp); - modexDrawBmp(&page, 100, 100, &bmp); + modexDrawBmp(&page, 160, 120, &bmp); //} t1 = (*clockw-start) /18.2; @@ -108,7 +108,7 @@ void main() { start = *clockw; //for(i=0; i<100 ;i++) { //0000 modexDrawSprite(&page, 20, 20, &bmp); - modexDrawSprite(&page, 100, 100, &bmp); + modexDrawSprite(&page, 160, 120, &bmp); //} //_fmemset(MK_FP(0xA000, 0), (int)p->plane, SCREEN_WIDTH*(SCREEN_HEIGHT*2)); //modexDrawBmp(&page, 0, 0, &bmp); @@ -117,15 +117,18 @@ void main() { //DrawPBuf(&page, 0, 0, p, 0); } modexLeave(); - printf("main=%Fp\n", &i); + /*printf("\nmain=%Fp\n\n", &i); + printf("bmp.data=%Fp\n", bmp.data); + printf("*bmp.data=%Fp\n", *(bmp.data)); + printf("&bmp.data=%Fp\n", &(bmp.data)); printf("\n%d\n", sizeof(p->plane)); - printf("%d\n", sizeof(bmp)); + printf("%d\n", sizeof(bmp));*/ /*for(i=0; i<(320*240); i++) { fprintf(stdout, "%d", bmp.data[i]); - if(i%320==0) fprintf(stdout, "\n"); + if(i%bmp.width==0) fprintf(stdout, "\n"); }*/ printf("CPU to VGA: %f\n", t1); printf("VGA to VGA: %f\n", t2); diff --git a/test.exe b/test.exe index ca406739..f4555a72 100755 Binary files a/test.exe and b/test.exe differ diff --git a/test2.exe b/test2.exe index 79e5e10d..d8899cf7 100755 Binary files a/test2.exe and b/test2.exe differ diff --git a/tsthimem.exe b/tsthimem.exe index a427bff2..4287f673 100755 Binary files a/tsthimem.exe and b/tsthimem.exe differ