From: sparky4 Date: Fri, 6 Jan 2017 19:47:57 +0000 (-0600) Subject: makefile polished!! it seems everything works reletively ok and i added f6 and f7... X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=0d74366bee7e966aebb95eaaef4f11b088b5d02f;p=16.git makefile polished!! it seems everything works reletively ok and i added f6 and f7 to show the vrs stride issue i am having! --- diff --git a/DEBUG.16W b/DEBUG.16W index b916628d..dbad1a44 100755 --- a/DEBUG.16W +++ b/DEBUG.16W @@ -1,210 +1,210 @@ -Seg:0 Size:9685 Owner:0x0 +Seg:0 Size:9696 Owner:0x0 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++0000 -Seg:26ce Size:44 Owner:0x0 +Seg:26d9 Size:44 Owner:0x0 + -Seg:26fa Size:256 Owner:0x1660 -++++ -Seg:27fa Size:256 Owner:0x1452 -+++++ -Seg:28fa Size:256 Owner:0x1454 +Seg:2705 Size:256 Owner:0x1660 ++++++ +Seg:2805 Size:256 Owner:0x1452 ++++ -Seg:29fa Size:256 Owner:0x1456 +Seg:2905 Size:256 Owner:0x1454 ++++ -Seg:2afa Size:256 Owner:0x1458 +Seg:2a05 Size:256 Owner:0x1456 ++++ -Seg:2bfa Size:256 Owner:0x145a +Seg:2b05 Size:256 Owner:0x1458 ++++ -Seg:2cfa Size:256 Owner:0x145c +Seg:2c05 Size:256 Owner:0x145a +++++ -Seg:2dfa Size:256 Owner:0x145e +Seg:2d05 Size:256 Owner:0x145c ++++ -Seg:2efa Size:256 Owner:0x1460 +Seg:2e05 Size:256 Owner:0x145e ++++ -Seg:2ffa Size:256 Owner:0x1462 +Seg:2f05 Size:256 Owner:0x1460 ++++ -Seg:30fa Size:256 Owner:0x1464 +Seg:3005 Size:256 Owner:0x1462 ++++ -Seg:31fa Size:256 Owner:0x1466 +Seg:3105 Size:256 Owner:0x1464 +++++ -Seg:32fa Size:256 Owner:0x1468 +Seg:3205 Size:256 Owner:0x1466 ++++ -Seg:33fa Size:256 Owner:0x146a +Seg:3305 Size:256 Owner:0x1468 ++++ -Seg:34fa Size:256 Owner:0x146c +Seg:3405 Size:256 Owner:0x146a ++++ -Seg:35fa Size:256 Owner:0x146e +Seg:3505 Size:256 Owner:0x146c ++++ -Seg:36fa Size:256 Owner:0x1470 +Seg:3605 Size:256 Owner:0x146e +++++ -Seg:37fa Size:256 Owner:0x1472 +Seg:3705 Size:256 Owner:0x1470 ++++ -Seg:38fa Size:256 Owner:0x1474 +Seg:3805 Size:256 Owner:0x1472 ++++ -Seg:39fa Size:256 Owner:0x1476 +Seg:3905 Size:256 Owner:0x1474 ++++ -Seg:3afa Size:256 Owner:0x1478 +Seg:3a05 Size:256 Owner:0x1476 ++++ -Seg:3bfa Size:256 Owner:0x147a +Seg:3b05 Size:256 Owner:0x1478 +++++ -Seg:3cfa Size:256 Owner:0x147c +Seg:3c05 Size:256 Owner:0x147a ++++ -Seg:3dfa Size:256 Owner:0x147e +Seg:3d05 Size:256 Owner:0x147c ++++ -Seg:3efa Size:256 Owner:0x1480 +Seg:3e05 Size:256 Owner:0x147e ++++ -Seg:3ffa Size:256 Owner:0x1482 +Seg:3f05 Size:256 Owner:0x1480 ++++ -Seg:40fa Size:256 Owner:0x1484 +Seg:4005 Size:256 Owner:0x1482 +++++ -Seg:41fa Size:256 Owner:0x1486 +Seg:4105 Size:256 Owner:0x1484 ++++ -Seg:42fa Size:256 Owner:0x1488 +Seg:4205 Size:256 Owner:0x1486 ++++ -Seg:43fa Size:256 Owner:0x148a +Seg:4305 Size:256 Owner:0x1488 ++++ -Seg:44fa Size:256 Owner:0x148c +Seg:4405 Size:256 Owner:0x148a ++++ -Seg:45fa Size:256 Owner:0x148e +Seg:4505 Size:256 Owner:0x148c +++++ -Seg:46fa Size:256 Owner:0x1490 +Seg:4605 Size:256 Owner:0x148e ++++ -Seg:47fa Size:256 Owner:0x1492 +Seg:4705 Size:256 Owner:0x1490 ++++ -Seg:48fa Size:256 Owner:0x1494 +Seg:4805 Size:256 Owner:0x1492 ++++ -Seg:49fa Size:256 Owner:0x1496 +Seg:4905 Size:256 Owner:0x1494 ++++ -Seg:4afa Size:256 Owner:0x1498 +Seg:4a05 Size:256 Owner:0x1496 +++++ -Seg:4bfa Size:256 Owner:0x149a +Seg:4b05 Size:256 Owner:0x1498 ++++ -Seg:4cfa Size:256 Owner:0x149c +Seg:4c05 Size:256 Owner:0x149a ++++ -Seg:4dfa Size:256 Owner:0x149e +Seg:4d05 Size:256 Owner:0x149c ++++ -Seg:4efa Size:256 Owner:0x14a0 +Seg:4e05 Size:256 Owner:0x149e ++++ -Seg:4ffa Size:256 Owner:0x14a2 +Seg:4f05 Size:256 Owner:0x14a0 +++++ -Seg:50fa Size:256 Owner:0x14a4 +Seg:5005 Size:256 Owner:0x14a2 ++++ -Seg:51fa Size:256 Owner:0x14a6 +Seg:5105 Size:256 Owner:0x14a4 ++++ -Seg:52fa Size:256 Owner:0x14a8 +Seg:5205 Size:256 Owner:0x14a6 ++++ -Seg:53fa Size:256 Owner:0x14aa +Seg:5305 Size:256 Owner:0x14a8 ++++ -Seg:54fa Size:256 Owner:0x14ac +Seg:5405 Size:256 Owner:0x14aa +++++ -Seg:55fa Size:256 Owner:0x14ae +Seg:5505 Size:256 Owner:0x14ac ++++ -Seg:56fa Size:256 Owner:0x14b0 +Seg:5605 Size:256 Owner:0x14ae ++++ -Seg:57fa Size:256 Owner:0x14b2 +Seg:5705 Size:256 Owner:0x14b0 ++++ -Seg:58fa Size:256 Owner:0x14b4 +Seg:5805 Size:256 Owner:0x14b2 ++++ -Seg:59fa Size:256 Owner:0x14b6 +Seg:5905 Size:256 Owner:0x14b4 +++++ -Seg:5afa Size:256 Owner:0x14b8 +Seg:5a05 Size:256 Owner:0x14b6 ++++ -Seg:5bfa Size:256 Owner:0x14ba +Seg:5b05 Size:256 Owner:0x14b8 ++++ -Seg:5cfa Size:256 Owner:0x14bc +Seg:5c05 Size:256 Owner:0x14ba ++++ -Seg:5dfa Size:256 Owner:0x14be +Seg:5d05 Size:256 Owner:0x14bc ++++ -Seg:5efa Size:256 Owner:0x14c0 +Seg:5e05 Size:256 Owner:0x14be +++++ -Seg:5ffa Size:256 Owner:0x14c2 +Seg:5f05 Size:256 Owner:0x14c0 ++++ -Seg:60fa Size:256 Owner:0x14c4 +Seg:6005 Size:256 Owner:0x14c2 ++++ -Seg:61fa Size:256 Owner:0x14c6 +Seg:6105 Size:256 Owner:0x14c4 ++++ -Seg:62fa Size:256 Owner:0x14c8 +Seg:6205 Size:256 Owner:0x14c6 ++++ -Seg:63fa Size:256 Owner:0x14ca +Seg:6305 Size:256 Owner:0x14c8 +++++ -Seg:64fa Size:256 Owner:0x14cc +Seg:6405 Size:256 Owner:0x14ca ++++ -Seg:65fa Size:256 Owner:0x14ce +Seg:6505 Size:256 Owner:0x14cc ++++ -Seg:66fa Size:256 Owner:0x14d0 +Seg:6605 Size:256 Owner:0x14ce ++++ -Seg:67fa Size:256 Owner:0x14d2 +Seg:6705 Size:256 Owner:0x14d0 ++++ -Seg:68fa Size:256 Owner:0x14d4 +Seg:6805 Size:256 Owner:0x14d2 +++++ -Seg:69fa Size:256 Owner:0x14d6 +Seg:6905 Size:256 Owner:0x14d4 ++++ -Seg:6afa Size:256 Owner:0x14d8 +Seg:6a05 Size:256 Owner:0x14d6 ++++ -Seg:6bfa Size:256 Owner:0x14da +Seg:6b05 Size:256 Owner:0x14d8 ++++ -Seg:6cfa Size:256 Owner:0x14dc +Seg:6c05 Size:256 Owner:0x14da ++++ -Seg:6dfa Size:256 Owner:0x14de +Seg:6d05 Size:256 Owner:0x14dc +++++ -Seg:6efa Size:256 Owner:0x14e0 +Seg:6e05 Size:256 Owner:0x14de ++++ -Seg:6ffa Size:256 Owner:0x14e2 +Seg:6f05 Size:256 Owner:0x14e0 ++++ -Seg:70fa Size:256 Owner:0x14e4 +Seg:7005 Size:256 Owner:0x14e2 ++++ -Seg:71fa Size:256 Owner:0x14e6 +Seg:7105 Size:256 Owner:0x14e4 ++++ -Seg:72fa Size:256 Owner:0x14e8 +Seg:7205 Size:256 Owner:0x14e6 +++++ -Seg:73fa Size:256 Owner:0x14ea +Seg:7305 Size:256 Owner:0x14e8 ++++ -Seg:74fa Size:256 Owner:0x14ec +Seg:7405 Size:256 Owner:0x14ea ++++ -Seg:75fa Size:256 Owner:0x14ee +Seg:7505 Size:256 Owner:0x14ec ++++ -Seg:76fa Size:256 Owner:0x14f0 +Seg:7605 Size:256 Owner:0x14ee ++++ -Seg:77fa Size:256 Owner:0x14f2 +Seg:7705 Size:256 Owner:0x14f0 +++++ -Seg:78fa Size:256 Owner:0x14f4 +Seg:7805 Size:256 Owner:0x14f2 ++++ -Seg:79fa Size:256 Owner:0x14f6 +Seg:7905 Size:256 Owner:0x14f4 ++++ -Seg:7afa Size:256 Owner:0x14f8 +Seg:7a05 Size:256 Owner:0x14f6 ++++ -Seg:7bfa Size:256 Owner:0x14fa +Seg:7b05 Size:256 Owner:0x14f8 ++++ -Seg:7cfa Size:256 Owner:0x14fc +Seg:7c05 Size:256 Owner:0x14fa +++++ -Seg:7dfa Size:256 Owner:0x14fe +Seg:7d05 Size:256 Owner:0x14fc ++++ -Seg:7efa Size:256 Owner:0x1500 +Seg:7e05 Size:256 Owner:0x14fe ++++ -Seg:7ffa Size:256 Owner:0x1502 +Seg:7f05 Size:256 Owner:0x1500 ++++ -Seg:80fa Size:256 Owner:0x1504 +Seg:8005 Size:256 Owner:0x1502 ++++ -Seg:81fa Size:256 Owner:0x1506 +Seg:8105 Size:256 Owner:0x1504 +++++ -Seg:82fa Size:256 Owner:0x1508 +Seg:8205 Size:256 Owner:0x1506 ++++ -Seg:83fa Size:256 Owner:0x150a +Seg:8305 Size:256 Owner:0x1508 ++++ -Seg:84fa Size:256 Owner:0x150c +Seg:8405 Size:256 Owner:0x150a ++++ -Seg:85fa Size:256 Owner:0x150e +Seg:8505 Size:256 Owner:0x150c ++++ -Seg:86fa Size:256 Owner:0x1510 +Seg:8605 Size:256 Owner:0x150e +++++ -Seg:87fa Size:256 Owner:0x1512 +Seg:8705 Size:256 Owner:0x1510 ++++ -Seg:88fa Size:256 Owner:0x1514 +Seg:8805 Size:256 Owner:0x1512 ++++ -Seg:89fa Size:256 Owner:0x1516 +Seg:8905 Size:256 Owner:0x1514 ++++ -Seg:8afa Size:256 Owner:0x1518 +Seg:8a05 Size:256 Owner:0x1516 ++++ -Seg:8bfa Size:401 Owner:0xec1c +Seg:8b05 Size:256 Owner:0x1518 ++++++ +Seg:8c05 Size:401 Owner:0xec1c ++++++ -Seg:b6fa Size:18693 Owner:0x0 +Seg:b705 Size:18682 Owner:0x0 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ \ No newline at end of file diff --git a/HEAP.16W b/HEAP.16W index 37db2a7f..193b9b2d 100755 --- a/HEAP.16W +++ b/HEAP.16W @@ -1,57 +1,57 @@ == default == - USED block at 26f00016 of size 136 - FREE block at 26f0009e of size 68 - USED block at 26f000e2 of size 50 - USED block at 26f00114 of size 50 - USED block at 26f00146 of size 50 - USED block at 26f00178 of size 50 - USED block at 26f001aa of size 50 - USED block at 26f001dc of size 50 - USED block at 26f0020e of size 50 - USED block at 26f00240 of size 50 - USED block at 26f00272 of size 50 - USED block at 26f002a4 of size 50 - USED block at 26f002d6 of size 50 - USED block at 26f00308 of size 50 - FREE block at 26f0033a of size 14 - USED block at 26f00348 of size 20 - FREE block at 26f0035c of size 7328 + USED block at 26fb0016 of size 136 + FREE block at 26fb009e of size 68 + USED block at 26fb00e2 of size 50 + USED block at 26fb0114 of size 50 + USED block at 26fb0146 of size 50 + USED block at 26fb0178 of size 50 + USED block at 26fb01aa of size 50 + USED block at 26fb01dc of size 50 + USED block at 26fb020e of size 50 + USED block at 26fb0240 of size 50 + USED block at 26fb0272 of size 50 + USED block at 26fb02a4 of size 50 + USED block at 26fb02d6 of size 50 + USED block at 26fb0308 of size 50 + FREE block at 26fb033a of size 14 + USED block at 26fb0348 of size 20 + FREE block at 26fb035c of size 7328 OK - end of heap == near == - USED block at 16efec66 of size 12 - USED block at 16efec72 of size 330 - USED block at 16efedbc of size 52 - USED block at 16efedf0 of size 20 - USED block at 16efee04 of size 20 - USED block at 16efee18 of size 20 - USED block at 16efee2c of size 20 - USED block at 16efee40 of size 20 - USED block at 16efee54 of size 4520 + USED block at 16faec66 of size 12 + USED block at 16faec72 of size 330 + USED block at 16faedbc of size 52 + USED block at 16faedf0 of size 20 + USED block at 16faee04 of size 20 + USED block at 16faee18 of size 20 + USED block at 16faee2c of size 20 + USED block at 16faee40 of size 20 + USED block at 16faee54 of size 4520 OK - end of heap == far == - USED block at 26f00016 of size 136 - USED block at 26f0009e of size 68 - USED block at 26f000e2 of size 50 - USED block at 26f00114 of size 50 - USED block at 26f00146 of size 50 - USED block at 26f00178 of size 50 - USED block at 26f001aa of size 50 - USED block at 26f001dc of size 50 - USED block at 26f0020e of size 50 - USED block at 26f00240 of size 50 - USED block at 26f00272 of size 50 - USED block at 26f002a4 of size 50 - USED block at 26f002d6 of size 50 - USED block at 26f00308 of size 50 - USED block at 26f0033a of size 14 - USED block at 26f00348 of size 20 - USED block at 26f0035c of size 7328 + USED block at 26fb0016 of size 136 + USED block at 26fb009e of size 68 + USED block at 26fb00e2 of size 50 + USED block at 26fb0114 of size 50 + USED block at 26fb0146 of size 50 + USED block at 26fb0178 of size 50 + USED block at 26fb01aa of size 50 + USED block at 26fb01dc of size 50 + USED block at 26fb020e of size 50 + USED block at 26fb0240 of size 50 + USED block at 26fb0272 of size 50 + USED block at 26fb02a4 of size 50 + USED block at 26fb02d6 of size 50 + USED block at 26fb0308 of size 50 + USED block at 26fb033a of size 14 + USED block at 26fb0348 of size 20 + USED block at 26fb035c of size 7328 OK - end of heap Memory Type Total Used Free diff --git a/MMDUMP.16W b/MMDUMP.16W index fba9a1a1..e5f1a36f 100755 Binary files a/MMDUMP.16W and b/MMDUMP.16W differ diff --git a/src/lib/16_tail.h b/src/lib/16_tail.h index f268469b..5206da5a 100755 --- a/src/lib/16_tail.h +++ b/src/lib/16_tail.h @@ -30,6 +30,10 @@ #include "src/lib/16_ca.h" #include "src/lib/16_in.h" +#define FUNCTIONKEYFUNCTIONS \ + if(IN_KeyDown(sc_F6)){ modexShowPage(&gvar.video.page[0]); IN_UserInput(1,1); } \ + if(IN_KeyDown(sc_F7)){ modexShowPage_(&gvar.video.page[0]); IN_UserInput(1,1); } + void DebugMemory_(global_game_variables_t *gvar, boolean q); void Shutdown16(global_game_variables_t *gvar); void Startup16(global_game_variables_t *gvar); diff --git a/src/lib/16_vl.c b/src/lib/16_vl.c index 15f8931e..9369ce49 100755 --- a/src/lib/16_vl.c +++ b/src/lib/16_vl.c @@ -306,7 +306,7 @@ void modexHiganbanaPageSetup(video_t *video) void modexShowPage(page_t *page) { word high_address, low_address, offset; -// byte crtcOffset; + byte crtcOffset; /* calculate offset */ offset = (word) page->data; @@ -314,7 +314,7 @@ modexShowPage(page_t *page) { offset += page->dx >> 2; /* calculate crtcOffset according to virtual width */ -// crtcOffset = page->width >> 3; + crtcOffset = page->width >> 3; high_address = HIGH_ADDRESS | (offset & 0xff00); low_address = LOW_ADDRESS | (offset << 8); @@ -323,8 +323,43 @@ modexShowPage(page_t *page) { //+=+= while ((inp(INPUT_STATUS_1) & DISPLAY_ENABLE)); outpw(CRTC_INDEX, high_address); outpw(CRTC_INDEX, low_address); -// outp(CRTC_INDEX, 0x13); -// outp(CRTC_DATA, crtcOffset); + outp(CRTC_INDEX, 0x13); + outp(CRTC_DATA, crtcOffset); + + /* wait for one retrace */ +//+=+= while (!(inp(INPUT_STATUS_1) & VRETRACE)); + + /* do PEL panning here */ + outp(AC_INDEX, 0x33); + outp(AC_INDEX, (page->dx & 0x03) << 1); +} + +// +// testing version of void modexShowPage() +// +void +modexShowPage_(page_t *page) +{ + word high_address, low_address, offset; + byte crtcOffset; + + /* calculate offset */ + offset = (word) page->data; + offset += page->dy * (page->width >> 2 ); + offset += page->dx >> 2; + + /* calculate crtcOffset according to virtual width */ + crtcOffset = page->sw >> 3; + + high_address = HIGH_ADDRESS | (offset & 0xff00); + low_address = LOW_ADDRESS | (offset << 8); + + /* wait for appropriate timing and then program CRTC */ +//+=+= while ((inp(INPUT_STATUS_1) & DISPLAY_ENABLE)); + outpw(CRTC_INDEX, high_address); + outpw(CRTC_INDEX, low_address); + outp(CRTC_INDEX, 0x13); + outp(CRTC_DATA, crtcOffset); /* wait for one retrace */ //+=+= while (!(inp(INPUT_STATUS_1) & VRETRACE)); diff --git a/src/lib/16_vl.h b/src/lib/16_vl.h index d0af774f..2562f211 100755 --- a/src/lib/16_vl.h +++ b/src/lib/16_vl.h @@ -104,6 +104,7 @@ page_t modexNextPageFlexibleSize(page_t *p, word x, word y); void modexCalcVmemRemain(video_t *video); void modexHiganbanaPageSetup(video_t *video); void modexShowPage(page_t *page); +void modexShowPage_(page_t *page); void modexPanPage(page_t *page, int dx, int dy); void modexSelectPlane(byte plane); void modexClearRegion(page_t *page, int x, int y, int w, int h, byte color); diff --git a/src/scroll.c b/src/scroll.c index 22dde47a..18df0c76 100755 --- a/src/scroll.c +++ b/src/scroll.c @@ -257,7 +257,8 @@ void main(int argc, char *argv[]) // modexDrawSprite(mv[0].page, 16, 16, &p); modexDrawSprite(mv[0].page, 32+72, 16, (player[0].data)); } - //TODO fmemtest into page + FUNCTIONKEYFUNCTIONS; + // fmemtest into page /*if(IN_KeyDown(4+1)) //4 { pg=1; diff --git a/src/vgmtest.c b/src/vgmtest.c index 6ca69aa1..b86eaa7b 100755 --- a/src/vgmtest.c +++ b/src/vgmtest.c @@ -57,18 +57,17 @@ main(int argc, char *argv[]) if(argv[1]) bakapee = argv[1]; else bakapee = "data/adlib.vgm"; printf("%x\n", OpenVGMFile(bakapee, &pee[0])); - IN_Startup(); - IN_Default(0,&player,ctrl_Joystick); + //IN_Startup(); IN_Default(0,&player,ctrl_Keyboard1); InitEngine(); PlayMusic(&pee[0]); - while(!IN_KeyDown(sc_Escape)) - //while(!kbhit()) + //while(!IN_KeyDown(sc_Escape)) + while(!kbhit()) { IN_ReadControl(0,&player); UpdateSoundEngine(); } StopMusic(); FreeVGMFile(&pee[0]); - IN_Shutdown(); DeinitEngine(); + //IN_Shutdown(); } diff --git a/src/vrstest.c b/src/vrstest.c index 95f87577..2a09e64c 100755 --- a/src/vrstest.c +++ b/src/vrstest.c @@ -52,7 +52,7 @@ void main() { byte *pal=0; int size=0; word w=0; - dbg_notest=1; + dbg_notest=0; Startup16(&gvar); @@ -108,9 +108,7 @@ void main() { VGAmodeX(1, 1, &gvar); modexHiganbanaPageSetup(&gvar.video); - - /* simulate scroll's zetup */ - modexShowPage(&gvar.video.page[0]); + modexShowPage_(&gvar.video.page[0]); /* non sprite comparison */ start = *clockw; @@ -137,6 +135,7 @@ void main() { w++; break; } +FUNCTIONKEYFUNCTIONS; } VGAmodeX(0, 1, &gvar); MM_ShowMemory(&gvar); diff --git a/src/zcroll.c b/src/zcroll.c index e1b3c557..0dc84d86 100755 --- a/src/zcroll.c +++ b/src/zcroll.c @@ -214,7 +214,8 @@ void main(int argc, char *argv[]) break; } } - //TODO fmemtest into page + FUNCTIONKEYFUNCTIONS; + // fmemtest into page /*if(IN_KeyDown(4+1)) //4 { pg=1;