]> 4ch.mooo.com Git - 16.git/commitdiff
the midi stuff is broke!! ><
authorsparky4 <sparky4@cock.li>
Thu, 16 Jul 2015 22:38:00 +0000 (17:38 -0500)
committersparky4 <sparky4@cock.li>
Thu, 16 Jul 2015 22:38:00 +0000 (17:38 -0500)
modified:   16.exe
modified:   exmmtest.exe
modified:   fmemtest.exe
modified:   fontgfx.exe
modified:   fonttes0.exe
modified:   fonttest.exe
modified:   inputest.exe
modified:   makefile
modified:   maptest.exe
modified:   miditest.exe
modified:   palettec.exe
modified:   pcxtest.exe
modified:   sountest.exe
modified:   src/lib/midi.c
modified:   src/lib/midi.h
modified:   src/miditest.c
modified:   test.exe
modified:   test2.exe
modified:   testemm.exe
modified:   tsthimem.exe

20 files changed:
16.exe
exmmtest.exe
fmemtest.exe
fontgfx.exe
fonttes0.exe
fonttest.exe
inputest.exe
makefile
maptest.exe
miditest.exe
palettec.exe
pcxtest.exe
sountest.exe
src/lib/midi.c
src/lib/midi.h
src/miditest.c
test.exe
test2.exe
testemm.exe
tsthimem.exe

diff --git a/16.exe b/16.exe
index 4f7763a7f9da62d03411639554e2922ee8f1bb86..01c5a5dbf118c7917a5328ff5f67c694e95b444c 100644 (file)
Binary files a/16.exe and b/16.exe differ
index 3099ebc42460b6488fb1d6affe1199703ad346d6..81f8adca85b40e0894d44e4a5d220f48fb205f49 100644 (file)
Binary files a/exmmtest.exe and b/exmmtest.exe differ
index f74dc944a130bb5cb4235dc1bbcfc31b405efef1..4df97337e480d185d293fe5a3ebd031b86c0dc0e 100644 (file)
Binary files a/fmemtest.exe and b/fmemtest.exe differ
index 0582b4833eebde94dd38d75d99902efe2d445271..467876eb56bdcbf0feebc4daf45dd7e086893e33 100644 (file)
Binary files a/fontgfx.exe and b/fontgfx.exe differ
index 01bc01ddcf025d57ac1f5a540ff93276e4a4b51a..a344db5487ed9e49e52b87ccb3c06c9773040569 100644 (file)
Binary files a/fonttes0.exe and b/fonttes0.exe differ
index 2cc9c1d75c120bf84c842769edbe8ab4f869bcd0..723156c1233ad2c81b5ac288a829f3b47c5a9a7e 100644 (file)
Binary files a/fonttest.exe and b/fonttest.exe differ
index c6a2851f8d860496cf0d154673ca19813a128dbd..f83dba5fd0ed90f1a3cbc3ea0af941136da0d141 100644 (file)
Binary files a/inputest.exe and b/inputest.exe differ
index 1bdf12634620bfa1f8a15e5c1a3e6567146dcb8d..c055a3fd01c650e5e5542e0f22bea4c3ec79cab4 100644 (file)
--- a/makefile
+++ b/makefile
@@ -13,7 +13,7 @@ TARGET_OS = dos
 #-zkl = current codepage
 
 DFLAGS=-DTARGET_MSDOS=16 -DMSDOS=1# -zm
-CFLAGS=-zk0 -wo -x -mc# -zdp# -zp16 -zq
+CFLAGS=-zk0 -wo -x -mc -zu# -zdp# -zp16 -zq
 OFLAGS=-ot -ox -ob -oh -or# -om -ol -ol+
 FLAGS=-0 -d2 -lr $(OFLAGS) $(CFLAGS) $(DFLAGS)
 SRC=src$(DIRSEP)
index cb6dd8c306500fc3cb5f00d6912fb562f95cfe2b..a80241dcd3f8c66258bdfac9bab2016a5a908342 100644 (file)
Binary files a/maptest.exe and b/maptest.exe differ
index f9206c6030784b4b85e35be0549de0c2fd44ad5b..f595dbe1ac176c67db125ac2da6dacb12e0017f2 100644 (file)
Binary files a/miditest.exe and b/miditest.exe differ
index 533a71d0d715a209b2feb9f58f62f7c67afeb4ab..218d24ce8a9ddad62d80e4f25ccf20cb94892aad 100644 (file)
Binary files a/palettec.exe and b/palettec.exe differ
index 2e3f94de165cc8185b3f2742f418d7f265ed8c33..11c81339b8a167364c648ba9059ca1401e6aa7d9 100644 (file)
Binary files a/pcxtest.exe and b/pcxtest.exe differ
index f17ef13fff5ab3539f0b99a4d66e9635aa177d5e..ac0c4bdecf0cb33fff3873e04db9f8f2f639582f 100644 (file)
Binary files a/sountest.exe and b/sountest.exe differ
index fe8aa5e20c868ef4822aeb7d89f8153230039d7d..760906c87681b9c38a28b379a066f7ca6be47c97 100644 (file)
@@ -423,7 +423,9 @@ void midi_tick_track(unsigned int i) {
                                        if (b == 0xFF) {
                                                if (c == 0x7F) { /* c=type d=len */
                                                        unsigned long len = midi_trk_read_delta(t);
-//                                                     fprintf(stderr,"Type 0x7F len=%lu %p/%p/%p\n",len,t->raw,t->read,t->fence);
+//====
+                                                       fprintf(stderr,"Type 0x7F len=%lu %p/%p/%p\n",len,t->raw,t->read,t->fence);
+//====
                                                        if (len < 512UL) {
                                                                /* unknown */
                                                                midi_trk_skip(t,len);
@@ -452,7 +454,9 @@ void midi_tick_track(unsigned int i) {
                                                                }
                                                        }
                                                        else {
-//                                                             fprintf(stderr,"Type 0x%02x len=%lu %p/%p/%p\n",c,d,t->raw,t->read,t->fence);
+//====
+                                                               fprintf(stderr,"Type 0x%02x len=%lu %p/%p/%p\n",c,d,t->raw,t->read,t->fence);
+//====
                                                        }
 
                                                        midi_trk_skip(t,d);
@@ -463,7 +467,9 @@ void midi_tick_track(unsigned int i) {
                                        }
                                        else {
                                                unsigned long len = midi_trk_read_delta(t);
-//                                             fprintf(stderr,"Sysex len=%lu %p/%p/%p\n",len,t->raw,t->read,t->fence);
+//====
+                                               fprintf(stderr,"Sysex len=%lu %p/%p/%p\n",len,t->raw,t->read,t->fence);
+//====
                                                midi_trk_skip(t,len);
                                        }
                                        } break;
@@ -484,7 +490,7 @@ void midi_tick_track(unsigned int i) {
        }
 }
 
-void adlib_shut_up();
+//void adlib_shut_up();
 void midi_reset_tracks();
 void midi_reset_channels();
 
index b98f0590ac7de0d1365f1a3a13e1026e41bb5f89..ac740c809d5ce036a09a24bf994adc19a0232add 100644 (file)
@@ -27,7 +27,7 @@
 #include <dos.h>
 
 //#include "src/lib/doslib/vga.h"
-//#include "src/lib/doslib/dos.h"
+#include "src/lib/doslib/dos.h"
 #include "src/lib/16_head.h"
 #include "src/lib/doslib/8254.h"               /* 8254 timer */
 #include "src/lib/doslib/8259.h"
index 012301662a294366dce88c777f37189e114731d0..73b47057b54dd2825819ef00369366164407a64b 100644 (file)
@@ -32,7 +32,7 @@ int main(int argc,char **argv) {
                printf("Cannot init library\n");
                return 1;
        }
-       if (!probe_8254()) { // we need the timer to keep time with the music
+       if (!probe_8254()) { /* we need the timer to keep time with the music */
                printf("8254 timer not found\n");
                return 1;
        }
@@ -48,14 +48,14 @@ int main(int argc,char **argv) {
                return 1;
        }
 
-       write_8254_system_timer(T8254_REF_CLOCK_HZ / 100); // tick faster at 100Hz please
+       write_8254_system_timer(T8254_REF_CLOCK_HZ / 100); /* tick faster at 100Hz please */
        irq0_cnt = 0;
        irq0_add = 182;
-       irq0_max = 1000; // about 18.2Hz
-       old_irq0 = _dos_getvect(8);//IRQ0
+       irq0_max = 1000; /* about 18.2Hz */
+       old_irq0 = _dos_getvect(8);/*IRQ0*/
        _dos_setvect(8,irq0);
 
-       adlib_shut_up();
+       //adlib_shut_up();
        midi_reset_channels();
        midi_reset_tracks();
        _cli();
@@ -68,8 +68,10 @@ int main(int argc,char **argv) {
 
                _cli();
                adv = irq0_ticks - ptick;
+               //adv = ptick;
                if (adv >= 100UL) adv = 100UL;
                ptick = irq0_ticks;
+               //ptick++;
                _sti();
 
                while (adv != 0) {
@@ -88,15 +90,15 @@ int main(int argc,char **argv) {
        }
 
        midi_playing = 0;
-       adlib_shut_up();
+       //adlib_shut_up();
        shutdown_adlib();
        _dos_setvect(8,old_irq0);
-       write_8254_system_timer(0); // back to normal 18.2Hz
+       write_8254_system_timer(0); /* back to normal 18.2Hz */
 
        for (i=0;i < MIDI_MAX_TRACKS;i++) {
                if (midi_trk[i].raw) {
 #if TARGET_MSDOS == 16 && (defined(__LARGE__) || defined(__COMPACT__))
-                       _dos_freemem(FP_SEG(midi_trk[i].raw)); // NTS: Because we allocated with _dos_allocmem
+                       _dos_freemem(FP_SEG(midi_trk[i].raw)); /* NTS: Because we allocated with _dos_allocmem */
 #else
                        free(midi_trk[i].raw);
 #endif
index 6553fc9eb70a05f20f2027acda036dcc7888cbd2..3121770bd7322c8a71dce548b9e6409a9fe5bedc 100644 (file)
Binary files a/test.exe and b/test.exe differ
index f33345c9692797e8e218dd9a8e66cad08ea02af6..dd3b21a184ee8d8364b3efad7440f46bd644f838 100644 (file)
Binary files a/test2.exe and b/test2.exe differ
index 34a1fb24db39090fd4361d620f35c98ccd87bed6..3db9514b1512353e36850df5a393d1b1cd90c63b 100644 (file)
Binary files a/testemm.exe and b/testemm.exe differ
index dd7409881e1cc42474d71b487f78174908267c2d..f14444b0b06473f6aff35fb974c7ea62344ca3fd 100644 (file)
Binary files a/tsthimem.exe and b/tsthimem.exe differ