--- /dev/null
+\r
+\r
+ * *\r
+ * * *\r
+ * * *\r
+ ÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜ\r
+ ÛÛÛÛÛÛÜ ßßß ÛÛÜ ÜÛÛ ÛÛÛßßß ÛÛÛÜÛ Û ÜÜÜÛÜÜÜÛ Ü Û ßÛ ÛÛ\r
+ ÛÛÛ ÛÛÛ ÛÛÛ ÛÛÛÛÛÛÛÛ ÛÛÛßß ÛÛÛÛ Û Û Û Û Û Ü ÛÛ\r
+ ÛÛÛ ÛÛÛ ÛÛÛ ÛÛÛÞÝÛÛÛ ÛÛÛ ÛÛÛ Û ÛÛÛÛ Û Û Û Û ÛÛ ÛÛ \r
+ ÛÛÛ ÛÛÛ ÛÛÛ ÛÛÛ ÛÛÛ ÛÛÛ ÛÛÛ Û ÛÛÛÛ Û Û Û Û ÛÛ ÛÛ\r
+ ÛÛÛÛÛÛß ÛÛÛ ÛÛÛ ÛÛÛ ÛÛÛÛÛÛ ÛÛÛ Û Û Û Û Û ÛÛ ÛÛ\r
+ ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß\r
+\r
+\r
+ ? t h e p o w e r s\r
+ ------------------------------------------------------------------------------\r
+\r
+ assassin the druid\r
+ rdos the mage\r
+ ondar he is a bartender\r
+ haberman it might be that. \r
+\r
+\r
+\r
+ I t h e i d e a\r
+ ------------------------------------------------------------------------------\r
+\r
+ we are a couple of friends knowing each other for years, working together on\r
+ software projects nowadays. we all are busy studying yet, so don't expect a \r
+ bunch of new releases every month. our goal is to deliver quality productions\r
+ on both pc-demo / pc-commercial scene time by time. \r
+\r
+\r
+ \ 4 p r o d u c t i o n s \r
+ ------------------------------------------------------------------------------\r
+\r
+ [ important releases in 1995 ]\r
+\r
+ rumb117i.zip* 55kb jun memory manager, gives you upper memory without\r
+ protected mode masters such as qemm / emm386\r
+ \r
+ rumb118i.zip* 60kb sep updated version (more boards as well)\r
+ \r
+ rumb119i.zip* 57kb dec next updated version. man this look so serious.\r
+\r
+\r
+ [ important releases in 1996 ] \r
+\r
+ rumb11dc.zip* 54kb jun a new one with more boards support\r
+\r
+\r
+ [ important releases in 1997 ]\r
+\r
+ rumb11ea.zip 54kb jan another new version, now not only demo!!!\r
+\r
+ * marked product is commercial or shareware - expect only partialy working\r
+ demo-version in this free package.\r
+\r
+\r
+--------------------------------------------------------------------------------\r
+ IMPORTANT NOTE TO ALL DISTRIBUTORS OF OUR PRODUCTS! PLEASE REMOVE EVERY\r
+ OUR SINGLE PRODUCTION NOT MENTIONED IN THIS LIST FROM YOUR BOARD. IT IS \r
+ NO MORE OFFICIAL RELEASE OF US (WE SHAME FOR IT :-). THANK YOU ...\r
+--------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \1e b u l l e t i n b o a r d s \r
+ ------------------------------------------------------------------------------\r
+ get our productions on these sites worldwide.\r
+ ( alphabetical order )\r
+\r
+ a.c.e. +33-1-45887-5484 28k8 france, hq gandalf\r
+ a touch of eternity +46-18-240037 28k8 sweden, hq drain\r
+ count zero +47-5512-2962 28k8 norway yitzhaq, calvin\r
+ digital fuse +32-2-7570-776 28k8 belgium, hq dr.vibe, mmouse \r
+ genesis +32-2-2453-498 28k8 belgium, ehq darkness\r
+ mostly harmless +46-8-6369-011 28k8 sweden thefreak\r
+ shoebox universe #1 +43-1-8928-998 33k6 austria eliot\r
+ shoebox universe #2 +43-1-8924-204 14k4 reebok\r
+ space bar +47-6493-3499 33k6 norway, hq hybris\r
+ surfers dream +46-(0)300-21883 28k8 sweden balrog\r
+ velvet demosite +32-3-38515-94 28k8 belgium sdog\r
+\r
+ please contact us, if you want to become our site and/or hq. send us some bbs\r
+ info and your personalities. you have to include your bbs advertisement, too.\r
+\r
+\r
+\r
+ ð i n t e r n e t\r
+ ------------------------------------------------------------------------------\r
+ every our single release is also available on the net.\r
+ \r
+ ftp://sorry.vse.cz/dimension\r
+ http://sorry.vse.cz/dimension\r
+ \r
+\r
+ tunes released by assassin for tm (three musicians) available on:\r
+\r
+ ftp://fm.org/pub/music/tm\r
+\r
+ \r
+ you may also visit the file section of ircbot _gore on #daskmig\r
+\r
+ directory: /dimension\r
+\r
+\r
+ \ 2 t o u c h u s \r
+ ------------------------------------------------------------------------------\r
+ contact our team using the following ways.\r
+\r
+\r
+ internet email: \r
+\r
+ dv@pf.jcu.cz (general requests, commercials..)\r
+ dv@pf.jcu.cz (assassin)\r
+ roman@sorry.vse.cz (rdos, rdosumb, rdosplay, remus etc.)\r
+ xstao02@sorry.vse.cz (ondar)\r
+ xkovacic@dinf.fst.cvut.cz (haberman fans) \r
+\r
+ snail mail:\r
+\r
+ (assassin) (rdos) (ondar) (haberman)\r
+ david voracek roman dolejsi ondrej stasek jiri kovacicin\r
+ branisovska 50 husova 419 j.dietricha 4 xxxxmovingxxxx\r
+ 370 05 c budejovice 373 82 vcelna 370 08 c budejovice xxxxmovingxxxx\r
+ czech republic czech republic czech republic czech republic\r
+\r
+ internet relay chat:\r
+\r
+ meet us on irc channels #daskmig and #coders, or leave a note for assassin\r
+ on ircbot _gore present on #daskmig.\r
+\r
+ \r
+ \ 3 g r e e t i n g s\r
+ ------------------------------------------------------------------------------\r
+\r
+ \r
+ ÛÛßßÛÜ from assassin\r
+ ÛÛ ÛÛ \r
+ ÛÛÜÜÛß rain, axl, asyntote, balrog, moebius, basehead, necros\r
+ sunday, zodiak, recc, cutnpaste, dune, derpiipo, vic, mellow-d\r
+ spinny, charon, gandalf, pellicus, pit bull, naali, lemming, aap\r
+ fuckeer, reebok, hybris, lizardking, naali, pelusa, nahkamuum\r
+ primon, beatnik, hachazo, distance, thefear, skaven, sleeping dog \r
+ alex dusty, darkness, laser harp, big jim, sikamikanico, wizard \r
+ eliott, tdj, leviathan, desmond, jare, tmk, hoplite, jmag \r
+ mikmak, hachazo, svarvarn, ryan cramer, miss saigon, perex\r
+ zden, thefreak, marwin and _garbage_obvious_rumourspreading_elk.\r
+ ( plus everyone i may forgot to mention... )\r
+\r
+ \r
+ ÜÛßßÛÜ from rdos \r
+ ÛÛßßÛÛ\r
+ ÛÛ ÛÛ lfatip, charon, jetman, fuckeer, tom, jap, perex,\r
+ rum, piitr, desmond, hachazo, deejay, bohunka, ludek, ivo,\r
+ some of his school mates plus contacts and kavon of course\r
+\r
+ \r
+ ÛÛÜÜÛÛ from ondar \r
+ ÛÛÞÝÛÛ\r
+ ÛÛ ÛÛ y sister eva, dolphine, rum, mr.error, piitr\r
+ charon, perex, buusaci, jetman, kavon, desmond, hachazo \r
+ jana, fuckeer, pelusa, filip, alfatip, vasek, honza,\r
+ kaja, and vojta\r
+\r
+ \r
+ ÛÛÜ ÛÛ from haberman \r
+ ÛÛßÛÛÛ\r
+ ÛÛ ÛÛ op\r
+\r
+ \r
+\r
+ t h a n k y o u\r
+ ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ\r
+ f o r b e i n g o u r s f o r a w h i l e . . \r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+ \r
+.10-29-96
\ No newline at end of file
--- /dev/null
+ÕÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͸\r
+³ D I M E N S I O N ³\r
+³ presents ³\r
+³ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄij\r
+³ R A C ³\r
+³ version 0.01a ³\r
+³ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄij\r
+³OPL2/3 music module grabber³\r
+³for your ears. FIRST generic³\r
+³adlib grabber in PC world at³\r
+³all. Coded in pure assembler.³\r
+³ Cooperates with RdosPlay. ³\r
+³ T R Y Y O U R S E L F.. ³\r
+ÔÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ;\r
--- /dev/null
+ ÂÂÄÄ¿ ÂÂÄÄ¿ ÚÂÄÄ¿\r
+ ³³ ³ ³³ ³ ³³\r
+ ³ÃÄÂÙ ³ÃÄÄ´ ³³\r
+ ³³ À¿ ³³ ³ ³³\r
+ ÀÙ À ÀÙ Á ÀÁÄÄÙ\r
+ ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ\r
+\r
+ Written by Roman Dolejsi (RDOS / DIMENSION)\r
+\r
+ December 31, 1996\r
+ Last update: December 31, 1996\r
+\r
+\r
+ This is the documentation belonging to and explaining the use of\r
+\r
+ RAC version 0.01a\r
+ OPL2/OPL3 music module grabber for MS-DOS\r
+\r
+\r
+ TOPICS covered in this document:\r
+\r
+ DISCLAIMER\r
+ APOLOGIZE\r
+ PURPOSE OF RAC\r
+ REQUIREMENTS\r
+ INSTALLATION OF RAC\r
+ RAC IN ACTION\r
+ DIALOG LINE\r
+ FREQUENTLY ASKED QUESTIONS\r
+ COPYRIGHT\r
+ WHERE TO FIND RAC\r
+ THANX\r
+ CONTACTING ME\r
+\r
+\r
+DISCLAIMER:\r
+-----------\r
+ Although RAC has been tested on several systems, I cannot guarantee that it\r
+is bugless. Therefore I do not take responsibility for any damage directly or\r
+indirectly caused by RAC as a result of known/unknown errors in it or errors\r
+caused by its access to your devices.\r
+\r
+\r
+APOLOGIZE:\r
+----------\r
+ Sorry, english is not my native language. However, I wrote this nice docy in\r
+english without any help. I APOLOGIZE for any mistakes in the document. Take it\r
+easy... Nobody is perfect.. :-)\r
+\r
+\r
+PURPOSE OF RAC:\r
+---------------\r
+ Rdos Adlib Catcher is an OPL2/OPL3 music module grabber for IBM PC compatible\r
+computers running MS-DOS operating system. This means that you can use it for\r
+grabbing your favorite melody from some music player / demo or game. I've coded\r
+it because of lack of any such grabber of this type in PC-world.\r
+\r
+\r
+REQUIREMENTS:\r
+-------------\r
+ RAC is coded in protected mode 386-assembler. For grabbing you will need 386\r
+or compatible computer without memory manager installed and adlib card. Grabbed\r
+music can be replayed with RdosPlay (RDOS OPL Player).\r
+\r
+\r
+INSTALLATION OF RAC:\r
+--------------------\r
+- first you have to make some directory on your drive. Then you have to unpack\r
+ there archive file RACxyyz.ZIP.\r
+ (you probably did all this when you read these lines :-)\r
+\r
+- RAC pack should consist of these files:\r
+\r
+ RAC.EXE - Main file - OPL grabber\r
+ RAC.DOC - Documentation for RAC (this file)\r
+ RAC.REV - RAC changes/revision history file\r
+ FILE_ID.DIZ - quick info file\r
+\r
+- now you have RAC successfully installed :-)\r
+\r
+\r
+RAC IN ACTION:\r
+--------------\r
+ RAC can store all acesses to Adlib (OPL2) or some OPL3 card's I/O ports into\r
+special file with RAW extension. That file can be later played with something\r
+capable of playing that (hint: what about RdosPlay?).\r
+ After you start RAC, it initializes internal music buffer. Every access to\r
+desired ports will be stored it that buffer. Therefore you have to run some\r
+game, demo or player which uses adlib. When you later want to save buffer in\r
+file or clear it you have to run RAC again with special parameter.\r
+\r
+\r
+DIALOG LINE:\r
+------------\r
+Dialog line looks as follows:\r
+ RAC.EXE [c] [s]\r
+\r
+ possibilities:\r
+ c - clear music buffer\r
+ s - save music buffer into file RACDATA.RAW in this directory\r
+\r
+\r
+RAW FILE SPECIFICATIONS:\r
+------------------------\r
+RAW is originally founded probably by Future Crew demogroup which used it in\r
+their BBS intro StarPort. RAW file generated by RAC is a derived version\r
+which is also capable of OPL3 extension (ie. full four port access: 388-38Bh).\r
+RAW files can be played with RdosPlay (look at Dimension homepage).\r
+\r
+format: [0]=db 'RAWADATA' ... file identifier\r
+ [8]=dw clock ... clock speed (like c-20)\r
+ [10]=dw data_size dup (data) ... adlib data\r
+ [..]=dw 0ffffh ... end of file\r
+data: parameter, command. command==0: data==n ... wait n times.\r
+ command==2: data==0 ... set speed (next word)\r
+ command==2: data==1 ... set OPL3 port A default\r
+ command==2: data==2 ... set OPL3 port B default\r
+\r
+\r
+FREQUENTLY ASKED QUESTIONS:\r
+---------------------------\r
+* RAC does not want to run with PM driver (EMM386/QEMM/Win) installed.\r
+ - RAC uses clear 32-bit PM manager. It needs completely free environment\r
+ to operate. Therefore other PM managers will NEVER be supported.\r
+ What RAC uses is from the beginning meant as a complete memory manager\r
+ so it's internal functionality is absolutely incompatible with anything\r
+ other (even VCPI's ProtMode level 0).\r
+\r
+* Coprocessor seems not to be installed when RAC is running !! Why !?!\r
+ - I have to agree.. sorry for this.. still don't know why.. Maybe another\r
+ version... really sorry.\r
+\r
+* When I install RAC there is no EMS memory in system. Some of my programs\r
+ don't want to run at all.\r
+ - EMS services are not yet supported, sorry. Maybe another version..\r
+\r
+* My application told me I have no VCPI compatible environment and refused\r
+ to run when I started it under RAC.\r
+* My application refused to run with exit message about impossibility to enter\r
+ DPMI protected mode.\r
+ - VCPI/DPMI are 32-bit Protected mode interfaces allowing your applications\r
+ to run 32-bit code under other 32-bit PM environment installed in memory.\r
+ Although these ifaces are not yet supported, there exist light of hope\r
+ that DPMI will be supported some day.\r
+\r
+* How much system memory takes RAC for its work ?\r
+ - RAC takes about 1k of conventional mem. In fact, everything is in\r
+ Xmemory (above 1MB) and takes there about 550kB. But Xmemory requirements\r
+ probably don't bother anyone.\r
+\r
+* Programs tend to be slower under RAC.\r
+ - Yes, especially Adlib playing routines are slower, because PM exception\r
+ handling eats some of the system resources.\r
+\r
+* Are there any other known problems with RAC ?\r
+ - RAC counts waitstates via timer. When some music does not use timer for\r
+ playing (not such often case), RAC won't insert waitstates in generated\r
+ RAW file - file is not playable :-( Don't know any solution right now.\r
+\r
+\r
+WHERE TO FIND RAC:\r
+------------------\r
+Each time I have a new version of RAC available, I'll upload it to this place:\r
+\r
+ ftp://sorry.vse.cz/dimension (Dimension FTP site in Prague, Czech Republic)\r
+ http://sorry.vse.cz/dimension (Dimension Inet HeadQuarters, Czech Republic)\r
+\r
+RAC will be probably also available at ftp.cdrom.com or ftp.sunet.se\r
+FTP archives.\r
+\r
+ Ask your local Internet or FTP expert on how to reach them.\r
+\r
+Another way is to visit RAC's homepage at address:\r
+\r
+ http://sorry.vse.cz/dimension/rdos/rac (Http site in Prague, CZE)\r
+\r
+\r
+THANX:\r
+------\r
+Although I did all the programming, there is a friend which helped me:\r
+\r
+David Voracek (Assassin/Dimension) - idea, testing, suggestions\r
+\r
+and other friends for their (mostly) betatesting..\r
+\r
+\r
+CONTACTING ME:\r
+--------------\r
+ If you want to contact me, write to address listed below. If you want to send\r
+me suggestions, tips or simply greets, send it freely. Also some money would be\r
+good as a power and motivation for further work :-)\r
+\r
+My address: E-Mail: (non-commercial)\r
+ Roman Dolejsi (RDOS) roman@sorry.vse.cz\r
+ Husova 419, Vcelna roman@romeo.pf.jcu.cz\r
+ 37382 Ceske Budejovice\r
+ Czech Republic\r
+\r
+Please do not send me E-mails longer than 150kB (because of our local smtp\r
+server limit).\r
+\r
+*** end of RAC documentation ***
\ No newline at end of file
--- /dev/null
+RAC version 0.01a - 9th September 1996\r
+- initial revision (RPMMM ver 0.02: 1k ConvMemory, 550k Xmemory)\r
+ - no control keys
\ No newline at end of file
0tesuto.exe &
maptest.exe &
imfplay.exe &
- i0fplay.exe &
vrldbg.exe
#zcroll.exe &
TESTEXEC2 = &
inputest.exe: inputest.$(OBJ) $(16LIB) $(DOSLIB) gfx.lib
sountest.exe: sountest.$(OBJ) $(16LIB) $(DOSLIB) gfx.lib
imfplay.exe: imfplay.$(OBJ) $(16LIB) $(DOSLIB) gfx.lib
-i0fplay.exe: i0fplay.$(OBJ) $(DOSLIB)
vrldbg.exe: vrldbg.$(OBJ) #gfx.lib $(DOSLIB)
pcxtest.exe: pcxtest.$(OBJ) gfx.lib $(DOSLIB) $(16LIB)
vrstest.exe: vrstest.$(OBJ) $(16LIB) gfx.lib $(DOSLIB)
#inntest.$(OBJ):$(SRC)/inntest.c
sountest.$(OBJ): $(SRC)/sountest.c
imfplay.$(OBJ): $(SRC)/imfplay.c
-i0fplay.$(OBJ): $(SRC)/i0fplay.c
vrldbg.$(OBJ): $(SRC)/vrldbg.c
#miditest.$(OBJ): $(SRC)/miditest.c
#testemm.$(OBJ):$(SRC)/testemm.c
+++ /dev/null
-/* midi.c
- *
- * Adlib OPL2/OPL3 FM synthesizer chipset test program.
- * Play MIDI file using the OPLx synthesizer (well, poorly anyway)
- * (C) 2010-2012 Jonathan Campbell.
- * Hackipedia DOS library.
- *
- * This code is licensed under the LGPL.
- * <insert LGPL legal text here>
- *
- * Compiles for intended target environments:
- * - MS-DOS [pure DOS mode, or Windows or OS/2 DOS Box]
- */
-
-#include <stdio.h>
-#include <conio.h> /* this is where Open Watcom hides the outp() etc. functions */
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <malloc.h>
-#include <ctype.h>
-#include <fcntl.h>
-#include <math.h>
-#include <dos.h>
-
-#include <hw/vga/vga.h>
-#include <hw/dos/dos.h>
-#include <hw/8254/8254.h> /* 8254 timer */
-#include <hw/8259/8259.h>
-#include <hw/adlib/adlib.h>
-
-static void (interrupt *old_irq0)();
-static volatile unsigned long irq0_ticks=0;
-static volatile unsigned int irq0_cnt=0,irq0_add=0,irq0_max=0;
-
-#pragma pack(push,1)
-struct imf_entry {
- uint8_t reg,data;
- uint16_t delay;
-};
-#pragma pack(pop)
-
-static struct imf_entry* imf_music=NULL;
-static struct imf_entry* imf_play_ptr=NULL;
-static struct imf_entry* imf_music_end=NULL;
-static uint16_t imf_delay_countdown=0;
-
-void imf_free_music() {
- if (imf_music) free(imf_music);
- imf_music = imf_play_ptr = imf_music_end = NULL;
- imf_delay_countdown = 0;
-}
-
-int imf_load_music(const char *path) {
- unsigned char buf[8];
- unsigned long len;
- int fd;
-
- imf_free_music();
-
- fd = open(path,O_RDONLY|O_BINARY);
- if (fd < 0) return 0;
-
- len = lseek(fd,0,SEEK_END);
- lseek(fd,0,SEEK_SET);
- read(fd,buf,2);
- if (buf[0] != 0 || buf[1] != 0) // type 1 IMF
- len = *((uint16_t*)buf);
- else
- lseek(fd,0,SEEK_SET);
-
- if (len == 0 || len > 65535UL) {
- close(fd);
- return 0;
- }
- len -= len & 3;
-
- imf_music = malloc(len);
- if (imf_music == NULL) {
- close(fd);
- return 0;
- }
- read(fd,imf_music,len);
- close(fd);
-
- imf_play_ptr = imf_music;
- imf_music_end = imf_music + (len >> 2UL);
- return 1;
-}
-
-/* WARNING: subroutine call in interrupt handler. make sure you compile with -zu flag for large/compact memory models */
-void interrupt irq0() {
- irq0_ticks++;
- if ((irq0_cnt += irq0_add) >= irq0_max) {
- irq0_cnt -= irq0_max;
- old_irq0();
- }
- else {
- p8259_OCW2(0,P8259_OCW2_NON_SPECIFIC_EOI);
- }
-}
-
-void imf_tick() {
- if (imf_delay_countdown == 0) {
- do {
- adlib_write(imf_play_ptr->reg,imf_play_ptr->data);
- imf_delay_countdown = imf_play_ptr->delay;
- imf_play_ptr++;
- if (imf_play_ptr == imf_music_end)
- imf_play_ptr = imf_music;
- } while (imf_delay_countdown == 0);
- }
- else {
- imf_delay_countdown--;
- }
-}
-
-void adlib_shut_up() {
- int i;
-
- memset(adlib_fm,0,sizeof(adlib_fm));
- memset(&adlib_reg_bd,0,sizeof(adlib_reg_bd));
- for (i=0;i < adlib_fm_voices;i++) {
- struct adlib_fm_operator *f;
- f = &adlib_fm[i].mod;
- f->ch_a = f->ch_b = f->ch_c = f->ch_d = 1;
- f = &adlib_fm[i].car;
- f->ch_a = f->ch_b = f->ch_c = f->ch_d = 1;
- }
-
- for (i=0;i < adlib_fm_voices;i++) {
- struct adlib_fm_operator *f;
-
- f = &adlib_fm[i].mod;
- f->mod_multiple = 1;
- f->total_level = 63 - 16;
- f->attack_rate = 15;
- f->decay_rate = 4;
- f->sustain_level = 0;
- f->release_rate = 8;
- f->f_number = 400;
- f->sustain = 1;
- f->octave = 4;
- f->key_on = 0;
-
- f = &adlib_fm[i].car;
- f->mod_multiple = 1;
- f->total_level = 63 - 16;
- f->attack_rate = 15;
- f->decay_rate = 4;
- f->sustain_level = 0;
- f->release_rate = 8;
- f->f_number = 0;
- f->sustain = 1;
- f->octave = 0;
- f->key_on = 0;
- }
-
- adlib_apply_all();
-}
-
-int main(int argc,char **argv) {
- unsigned long tickrate = 700;
- unsigned long ptick;
- int c;
-
- printf("ADLIB FM test program IMFPLAY\n");
- if (argc < 2) {
- printf("You must specify an IMF file to play\n");
- return 1;
- }
-
- if (!init_adlib()) {
- printf("Cannot init library\n");
- return 1;
- }
- if (!probe_8254()) { /* we need the timer to keep time with the music */
- printf("8254 timer not found\n");
- return 1;
- }
-
- if (!imf_load_music(argv[1])) {
- printf("Failed to load IMF Music\n");
- return 1;
- }
-
- write_8254_system_timer(T8254_REF_CLOCK_HZ / tickrate);
- irq0_cnt = 0;
- irq0_add = 182;
- irq0_max = 1000; /* about 18.2Hz */
- old_irq0 = _dos_getvect(8);/*IRQ0*/
- _dos_setvect(8,irq0);
-
- adlib_shut_up();
- shutdown_adlib_opl3(); // NTS: Apparently the music won't play otherwise
- _cli();
- irq0_ticks = ptick = 0;
- _sti();
-
- while (1) {
- unsigned long adv;
-
- _cli();
- adv = irq0_ticks - ptick;
- if (adv >= 100UL) adv = 100UL;
- ptick = irq0_ticks;
- _sti();
-
- while (adv != 0) {
- imf_tick();
- adv--;
- }
-
- if (kbhit()) {
- c = getch();
- if (c == 0) c = getch() << 8;
-
- if (c == 27) {
- break;
- }
- }
- }
-
- imf_free_music();
- adlib_shut_up();
- shutdown_adlib();
- _dos_setvect(8,old_irq0);
- write_8254_system_timer(0); /* back to normal 18.2Hz */
- return 0;
-}
-
#include "src/lib/16_dbg.h"
#include "src/lib/16_sd.h"
-// #include <stdio.h>
-// #include <conio.h> /* this is where Open Watcom hides the outp() etc. functions */
-// #include <stdlib.h>
-// #include <string.h>
-// #include <unistd.h>
-// #include <malloc.h>
-// #include <ctype.h>
-// #include <fcntl.h>
-// #include <math.h>
-// #include <dos.h>
-
extern struct glob_game_vars *ggvv;
-static void (interrupt *old_irq0)();
-/*static volatile unsigned long irq0_ticks=0;
-static volatile unsigned int irq0_cnt=0,irq0_add=0,irq0_max=0;
-
-#pragma pack(push,1)
-struct imf_entry {
- uint8_t reg,data;
- uint16_t delay;
-};
-#pragma pack(pop)
-
-static struct imf_entry* imf_music=NULL;
-static struct imf_entry* imf_play_ptr=NULL;
-static struct imf_entry* imf_music_end=NULL;
-static uint16_t imf_delay_countdown=0;
-
-#define PRINTBB {\
- printf("-------------------------------------------------------------------------------\n");\
- printf("buffer:\n");\
- printf("bigbuffer %Fp\t", gvar->ca.audiosegs[0]);\
- printf("&%Fp\n", MEMPTR gvar->ca.audiosegs[0]);\
- printf("imf_music %Fp\t", imf_music);\
- printf("&%Fp\n", imf_music);\
- printf("imf_play_ptr %Fp\t", imf_play_ptr);\
- printf("&%Fp\n", imf_play_ptr);\
- printf("imf_music_end %Fp\t", imf_music_end);\
- printf("&%Fp\n", imf_music_end);\
- printf("-------------------------------------------------------------------------------\n");\
-}
-
-void imf_free_music(global_game_variables_t *gvar) {
- if (gvar->ca.sd.imf_music) free(gvar->ca.sd.imf_music);
- MM_FreePtr(MEMPTRCONV gvar->ca.audiosegs[0], gvar);
- gvar->ca.sd.imf_music = gvar->ca.sd.imf_play_ptr = gvar->ca.sd.imf_music_end = NULL;
- gvar->ca.sd.imf_delay_countdown = 0;
-}
-
-int imf_load_music(const char *path, global_game_variables_t *gvar) {
- unsigned long len;
- unsigned char buf[8];
- int fd;
-
- imf_free_music(gvar);
-
- fd = open(path,O_RDONLY|O_BINARY);
- if (fd < 0) return 0;
-
- len = lseek(fd,0,SEEK_END);
- lseek(fd,0,SEEK_SET);
- read(fd,buf,2);
- if (buf[0] != 0 || buf[1] != 0) // type 1 IMF
- len = *((uint16_t*)buf);
- else
- lseek(fd,0,SEEK_SET);
-
- if (len == 0 || len > 65535UL) {
- close(fd);
- return 0;
- }
- len -= len & 3;
-
-// imf_music = malloc(len);
- MM_GetPtr(MEMPTRCONV gvar->ca.audiosegs[0],len, gvar);
- gvar->ca.sd.imf_music = (struct imf_entry *)gvar->ca.audiosegs[0];
- if (gvar->ca.sd.imf_music == NULL) {
- close(fd);
- return 0;
- }
- read(fd,gvar->ca.sd.imf_music,len);
- close(fd);
-
- gvar->ca.sd.imf_play_ptr = gvar->ca.sd.imf_music;
- gvar->ca.sd.imf_music_end = gvar->ca.sd.imf_music + (len >> 2UL);
-// PRINTBB;
- return 1;
-}*/
-
-// WARNING: subroutine call in interrupt handler. make sure you compile with -zu flag for large/compact memory models
-void interrupt irq0()
-{
- ggvv->ca.sd.irq0_ticks++;
- if ((ggvv->ca.sd.irq0_cnt += ggvv->ca.sd.irq0_add) >= ggvv->ca.sd.irq0_max) {
- ggvv->ca.sd.irq0_cnt -= ggvv->ca.sd.irq0_max;
- old_irq0();
- }
- else {
- p8259_OCW2(0,P8259_OCW2_NON_SPECIFIC_EOI);
- }
-}
-
-/*void imf_tick() {
- if (imf_delay_countdown == 0) {
- do {
- adlib_write(imf_play_ptr->reg,imf_play_ptr->data);
- imf_delay_countdown = imf_play_ptr->delay;
- imf_play_ptr++;
- if (imf_play_ptr == imf_music_end)
- {
- printf("replay\n");
- imf_play_ptr = imf_music;
- }
- } while (imf_delay_countdown == 0);
- }
- else {
- imf_delay_countdown--;
- }
-}
-
-void adlib_shut_up() {
- int i;
-
- memset(adlib_fm,0,sizeof(adlib_fm));
- memset(&adlib_reg_bd,0,sizeof(adlib_reg_bd));
- for (i=0;i < adlib_fm_voices;i++) {
- struct adlib_fm_operator *f;
- f = &adlib_fm[i].mod;
- f->ch_a = f->ch_b = f->ch_c = f->ch_d = 1;
- f = &adlib_fm[i].car;
- f->ch_a = f->ch_b = f->ch_c = f->ch_d = 1;
- }
-
- for (i=0;i < adlib_fm_voices;i++) {
- struct adlib_fm_operator *f;
-
- f = &adlib_fm[i].mod;
- f->mod_multiple = 1;
- f->total_level = 63 - 16;
- f->attack_rate = 15;
- f->decay_rate = 4;
- f->sustain_level = 0;
- f->release_rate = 8;
- f->f_number = 400;
- f->sustain = 1;
- f->octave = 4;
- f->key_on = 0;
-
- f = &adlib_fm[i].car;
- f->mod_multiple = 1;
- f->total_level = 63 - 16;
- f->attack_rate = 15;
- f->decay_rate = 4;
- f->sustain_level = 0;
- f->release_rate = 8;
- f->f_number = 0;
- f->sustain = 1;
- f->octave = 0;
- f->key_on = 0;
- }
-
- adlib_apply_all();
-}*/
-
void main(int argc,char **argv) {
static global_game_variables_t gvar;
- unsigned long ptick, tickrate = 700;
+ unsigned long adv;
int c;
#ifdef __DEBUG_CA__
dbg_debugca=1;
return;
}
- write_8254_system_timer(T8254_REF_CLOCK_HZ / tickrate);
- old_irq0 = _dos_getvect(8); /*IRQ0*/
- _dos_setvect(8,irq0);
-
- _cli();
- gvar.ca.sd.irq0_ticks = ptick = 0;
- _sti();
+ SD_StartupTimer(&gvar);
printf("playing!\n");
while (1) {
- unsigned long adv;
-
_cli();
- adv = gvar.ca.sd.irq0_ticks - ptick;
+ adv = gvar.ca.sd.irq0_ticks - gvar.ca.sd.ptick;
if (adv >= 100UL) adv = 100UL;
- ptick = gvar.ca.sd.irq0_ticks;
+ gvar.ca.sd.ptick = gvar.ca.sd.irq0_ticks;
_sti();
while (adv != 0) {
SD_imf_free_music(&gvar);
SD_adlib_shut_up();
shutdown_adlib();
- _dos_setvect(8,old_irq0);
+ SD_ShutdownTimer();
write_8254_system_timer(0); /* back to normal 18.2Hz */
ShutdownCAMMPM(&gvar);
}
\r
#include "src/lib/16_sd.h"\r
\r
-static void (interrupt *SD_old_irq0)();\r
-//void interrupt (*old_irq0)(void);\r
+static void interrupt (*t0OldService)(void);\r
\r
void opl2out(word reg, word data)\r
{\r
opl2out(opCellNum, ins->Feedback);\r
} /* End of FMSetVoice */\r
\r
+\r
+//newer sd\r
+\r
+\r
+struct glob_game_vars *ggvv;\r
+// WARNING: subroutine call in interrupt handler. make sure you compile with -zu flag for large/compact memory models\r
+void interrupt SDL_irq0()\r
+{\r
+ ggvv->ca.sd.irq0_ticks++;\r
+ if ((ggvv->ca.sd.irq0_cnt += ggvv->ca.sd.irq0_add) >= ggvv->ca.sd.irq0_max) {\r
+ ggvv->ca.sd.irq0_cnt -= ggvv->ca.sd.irq0_max;\r
+ t0OldService();\r
+ }\r
+ else {\r
+ p8259_OCW2(0,P8259_OCW2_NON_SPECIFIC_EOI);\r
+ }\r
+}\r
+\r
void SD_Initimf(global_game_variables_t *gvar)\r
{\r
if (!init_adlib()) {\r
return;\r
}\r
\r
- gvar->ca.sd.irq0_ticks=\r
- //gvar->ca.sd.irq0_cnt=\r
- //gvar->ca.sd.irq0_add=\r
- gvar->ca.sd.imf_delay_countdown=\r
- gvar->ca.sd.irq0_max=0;\r
+ gvar->ca.sd.imf_delay_countdown=0;\r
gvar->ca.sd.imf_music=\r
gvar->ca.sd.imf_play_ptr=\r
gvar->ca.sd.imf_music_end=NULL;\r
- gvar->ca.sd.irq0_cnt = 0;\r
- gvar->ca.sd.irq0_add = 182;\r
- gvar->ca.sd.irq0_max = 1000; /* about 18.2Hz */\r
\r
SD_adlib_shut_up();\r
shutdown_adlib_opl3(); // NTS: Apparently the music won't play otherwise\r
gvar->ca.sd.imf_delay_countdown = 0;\r
}\r
\r
+void SD_StartupTimer(global_game_variables_t *gvar)\r
+{\r
+ gvar->ca.sd.irq0_ticks=\r
+ gvar->ca.sd.irq0_cnt = 0;\r
+ gvar->ca.sd.irq0_add = 182;\r
+ gvar->ca.sd.irq0_max = 1000; /* about 18.2Hz */\r
+ gvar->ca.sd.tickrate = 700;\r
+\r
+ write_8254_system_timer(T8254_REF_CLOCK_HZ / gvar->ca.sd.tickrate);\r
+ t0OldService = _dos_getvect(8); /*IRQ0*/\r
+ _dos_setvect(8,SDL_irq0);\r
+\r
+ _cli();\r
+ gvar->ca.sd.irq0_ticks = gvar->ca.sd.ptick = 0;\r
+ _sti();\r
+}\r
+\r
+void SD_ShutdownTimer()\r
+{\r
+ _dos_setvect(8,t0OldService);\r
+}\r
+\r
void SD_imf_free_music(global_game_variables_t *gvar)\r
{\r
#ifndef SD_USESCAMMPM\r
return 1;\r
}\r
\r
-struct glob_game_vars *ggvv;\r
-// WARNING: subroutine call in interrupt handler. make sure you compile with -zu flag for large/compact memory models\r
-void interrupt SD_irq0()\r
-{\r
- ggvv->ca.sd.irq0_ticks++;\r
- if ((ggvv->ca.sd.irq0_cnt += ggvv->ca.sd.irq0_add) >= ggvv->ca.sd.irq0_max) {\r
- ggvv->ca.sd.irq0_cnt -= ggvv->ca.sd.irq0_max;\r
- SD_old_irq0();\r
- }\r
- else {\r
- p8259_OCW2(0,P8259_OCW2_NON_SPECIFIC_EOI);\r
- }\r
-}\r
-\r
void SD_imf_tick(global_game_variables_t *gvar)\r
{\r
if (gvar->ca.sd.imf_delay_countdown == 0) {\r
\r
void SD_Initimf(global_game_variables_t *gvar);\r
void SD_imf_reset_music(global_game_variables_t *gvar);\r
+void SD_StartupTimer(global_game_variables_t *gvar),\r
+ SD_ShutdownTimer();\r
void SD_imf_free_music(global_game_variables_t *gvar);\r
int SD_imf_load_music(const char *path, global_game_variables_t *gvar);\r
void interrupt SD_irq0(void);\r
imf_entry_t* imf_play_ptr;//=NULL;\r
imf_entry_t* imf_music_end;//=NULL;\r
word imf_delay_countdown;//=0;\r
+ dword ptick,tickrate;\r
} sd_t;\r
\r
//==========================================================================\r
#!/bin/bash
while [ -n "$1" ]
do
- 7z a -v64k -r /var/www/"$1".zip "$1"
- echo 7z a -v64k -r /var/www/"$1".zip "$1"
+ 7z a -v64k /var/www/"$1".zip "$1"
+ echo 7z a -v64k /var/www/"$1".zip "$1"
shift
done