p->optcount[5] = 0;
}
p->gfx_framerate = 1;
+ p->gfx_autoframerate = 50;
p->gfx_width_fs = 800;
p->gfx_height_fs = 600;
p->gfx_width_win = 720;
static unsigned int ciabprb, ciabdra, ciabdrb, ciabsdr, ciabsdr_cnt;
static int div10;
static int kbstate, kback, ciaasdr_unread;
+static unsigned int sleepyhead = 0;
+
#ifdef TOD_HACK
static int tod_hack, tod_hack_delay;
#endif
void CIA_hsync_handler (void)
{
- static unsigned int keytime = 0, sleepyhead = 0;
-
if (ciabtodon) {
ciabtod++;
ciabtod &= 0xFFFFFF;
ciab_checkalarm ();
}
- if (keys_available() && kback && (ciaacra & 0x40) == 0 && (++keytime & 15) == 0) {
+ if (keys_available() && kback && (ciaacra & 0x40) == 0 && (hsync_counter & 15) == 0) {
/*
* This hack lets one possible ciaaicr cycle go by without any key
* being read, for every cycle in which a key is pulled out of the
}
}
+void CIA_inprec_prepare(void)
+{
+ sleepyhead = 0;
+}
+
void CIA_reset (void)
{
#ifdef TOD_HACK
timeframes++;
if ((timeframes & 31) == 0) {
double idle = 1000 - (idletime == 0 ? 0.0 : (double)idletime * 1000.0 / (vsynctime * 32.0));
- int fps = frametime2 == 0 ? 0 : syncbase * 32 / (frametime2 / 10);
+ int fps = frametime2 == 0 ? 0 : (syncbase * 32) / (frametime2 / 10);
if (fps > 9999)
fps = 9999;
if (idle < 0)
cop_state.hpos = 0;
cop_state.last_write = 0;
compute_spcflag_copper ();
- inputdevice_hsync ();
serial_hsynchandler ();
#ifdef CUSTOM_SIMPLE
do_sprites (0);
#endif
+
+ while (input_recording < 0 && inprec_pstart(INPREC_KEY)) {
+ record_key_direct (inprec_pu8());
+ inprec_pend();
+ }
+ while (input_recording < 0 && inprec_pstart(INPREC_DISKREMOVE)) {
+ disk_eject (inprec_pu8());
+ inprec_pend();
+ }
+ while (input_recording < 0 && inprec_pstart(INPREC_DISKINSERT)) {
+ int drv = inprec_pu8();
+ inprec_pstr (currprefs.df[drv]);
+ strcpy (changed_prefs.df[drv], currprefs.df[drv]);
+ disk_insert_force (drv, currprefs.df[drv]);
+ inprec_pend();
+ }
+ inputdevice_hsync ();
+
+ hsync_counter++;
//copper_check (2);
}
int zero = 0;
write_log ("reset at %x\n", m68k_getpc());
+ hsync_counter = 0;
if (! savestate_state) {
currprefs.chipset_mask = changed_prefs.chipset_mask;
if ((currprefs.chipset_mask & CSMASK_AGA) == 0) {
}
}
+/* mousehack is now in "filesys boot rom" */
+static uae_u32 mousehack_helper_old (void)
+{
+ return 0;
+}
+
void custom_init (void)
{
pos = here ();
org (RTAREA_BASE+0xFF70);
- calltrap (deftrap (mousehack_helper));
+ calltrap (deftrap (mousehack_helper_old));
dw (RTS);
org (RTAREA_BASE+0xFFA0);
return 0;
}
-/* cheat-search by Holger Jakob */
+#define MAX_CHEAT_VIEW 100
+/* cheat-search by Toni Wilen (originally by Holger Jakob) */
static void cheatsearch (char **c)
{
- uae_u8 *p = get_real_address (0);
- static uae_u32 *vlist = NULL;
- uae_u32 ptr;
- uae_u32 val = 0;
- uae_u32 type = 0; /* not yet */
- uae_u32 count = 0;
- uae_u32 fcount = 0;
- uae_u32 full = 0;
+ static uae_u8 *vlist;
+ static int listsize;
+ static int first = 1;
+ static int size = 1;
+ uae_u32 p, val, memcnt, prevmemcnt;
+ int i, count, vcnt, memsize;
+
+ memsize = allocated_chipmem + allocated_bogomem + allocated_fastmem;
ignore_ws (c);
+ if (!more_params(c)) {
+ first = 1;
+ console_out("search reset\n");
+ xfree (vlist);
+ listsize = memsize;
+ vlist = xcalloc (listsize >> 3, 1);
+ return;
+ }
val = readhex (c);
+ if (first) {
+ ignore_ws (c);
+ if (val > 255)
+ size = 2;
+ if (val > 65535)
+ size = 3;
+ if (val > 16777215)
+ size = 4;
+ if (more_params(c))
+ size = readint(c);
+ }
+ if (size > 4)
+ size = 4;
+ if (size < 1)
+ size = 1;
+
if (vlist == NULL) {
- vlist = malloc (256*4);
- if (vlist != 0) {
- for (count = 0; count<255; count++)
- vlist[count] = 0;
- count = 0;
- for (ptr = 0; ptr < allocated_chipmem - 40; ptr += 2, p += 2) {
- if (ptr >= 0x438 && p[3] == (val & 0xff)
- && p[2] == (val >> 8 & 0xff)
- && p[1] == (val >> 16 & 0xff)
- && p[0] == (val >> 24 & 0xff))
- {
- if (count < 255) {
- vlist[count++]=ptr;
- console_out ("%08x: %x%x%x%x\n",ptr,p[0],p[1],p[2],p[3]);
- } else
- full = 1;
+ listsize = memsize;
+ vlist = xcalloc (listsize >> 3, 1);
+ }
+
+ count = 0;
+ vcnt = 0;
+
+ for (prevmemcnt = memcnt = 0; memcnt < memsize - size && memcnt < listsize; memcnt++) {
+ p = memcnt;
+ if (memcnt >= allocated_chipmem + allocated_bogomem && memcnt < allocated_chipmem + allocated_bogomem + allocated_fastmem)
+ p = 0x200000 + memcnt - (allocated_chipmem + allocated_bogomem);
+ if (memcnt >= allocated_chipmem && memcnt < allocated_chipmem + allocated_bogomem)
+ p = 0xc00000 + memcnt - (allocated_chipmem);
+
+ for (i = 0; i < size; i++) {
+ if (get_byte(p + i) != val >> ((size - i - 1) << 8))
+ break;
+ }
+ if (i == size) {
+ int voffset = memcnt >> 3;
+ int vmask = 1 << (memcnt & 7);
+ if (!first) {
+ while (prevmemcnt < memcnt) {
+ vlist[prevmemcnt >> 3] &= ~(1 << (prevmemcnt & 7));
+ prevmemcnt++;
+ }
+ if (vlist[voffset] & vmask) {
+ count++;
+ if (vcnt < MAX_CHEAT_VIEW) {
+ console_out ("%08x ", p);
+ vcnt++;
+ if (!(vcnt % 8))
+ console_out("\n");
+ }
+ } else {
+ vlist[voffset] &= ~vmask;
}
+ prevmemcnt = memcnt + 1;
+ } else {
+ vlist[voffset] |= vmask;
+ count++;
}
- console_out ("Found %d possible addresses with %d\n",count,val);
- console_out ("Now continue with 'g' and use 'C' with a different value\n");
}
- } else {
- for (count = 0; count<255; count++) {
- if (p[vlist[count]+3] == (val & 0xff)
- && p[vlist[count]+2] == (val>>8 & 0xff)
- && p[vlist[count]+1] == (val>>16 & 0xff)
- && p[vlist[count]] == (val>>24 & 0xff))
- {
- fcount++;
- console_out ("%08x: %x%x%x%x\n", vlist[count], p[vlist[count]],
- p[vlist[count]+1], p[vlist[count]+2], p[vlist[count]+3]);
- }
+ }
+ if (!first) {
+ while (prevmemcnt < memcnt) {
+ vlist[prevmemcnt >> 3] &= ~(1 << (prevmemcnt & 7));
+ prevmemcnt++;
}
- console_out ("%d hits of %d found\n",fcount,val);
- free (vlist);
- vlist = NULL;
}
+ if (!first && (vcnt % 8))
+ console_out ("\n");
+ console_out ("Found %d possible addresses with 0x%x (%u) (%d bytes)\n", count, val, val, size);
+ console_out ("Now continue with 'g' and use 'C' with a different value\n");
+ first = 0;
}
#define BREAKPOINT_TOTAL 8
static void deinitialize_memwatch (void)
{
- int i;
+ int i, as;
addrbank *a1, *a2;
if (!memwatch_enabled)
return;
- for (i = 0; i < 256; i++) {
+ as = currprefs.address_space_24 ? 256 : 65536;
+ for (i = 0; i < as; i++) {
a1 = debug_mem_banks[i];
a2 = mem_banks[i];
memcpy (a2, a1, sizeof (addrbank));
- free (a1);
+ xfree (a1);
}
- free (debug_mem_banks);
+ xfree (debug_mem_banks);
debug_mem_banks = 0;
memwatch_enabled = 0;
- free (illgdebug);
+ xfree (illgdebug);
illgdebug = 0;
}
static int initialize_memwatch (void)
{
- int i;
+ int i, as;
addrbank *a1, *a2;
- if (!currprefs.address_space_24)
- return 0;
- debug_mem_banks = xmalloc (sizeof (addrbank*) * 256);
- for (i = 0; i < 256; i++) {
+ as = currprefs.address_space_24 ? 256 : 65536;
+ debug_mem_banks = xmalloc (sizeof (addrbank*) * as);
+ for (i = 0; i < as; i++) {
a1 = debug_mem_banks[i] = xmalloc (sizeof (addrbank));
a2 = mem_banks[i];
memcpy (a1, a2, sizeof (addrbank));
}
- for (i = 0; i < 256; i++) {
+ for (i = 0; i < as; i++) {
a2 = mem_banks[i];
a2->bget = debug_bget;
a2->wget = debug_wget;
disk_debug_track);
}
+static uae_u32 memory_counter(int reset)
+{
+ static uae_u32 p;
+ if (reset) {
+ p = 0xffffffff;
+ return 0;
+ }
+ p++;
+ if (p == allocated_chipmem)
+ p = 0x200000;
+ if (p == allocated_fastmem + 0x200000)
+ p = 0xc00000;
+ if (p == allocated_bogomem + 0xc00000)
+ p = 0xffffffff;
+ return p;
+}
+
+static void find_ea (char **inptr)
+{
+ uae_u32 ea, sea, dea, start, end;
+ int i;
+
+ start = 0;
+ end = allocated_chipmem;
+ ea = readhex (inptr);
+ if (more_params(inptr))
+ start = readhex (inptr);
+ if (more_params(inptr))
+ end = readhex (inptr);
+ memory_counter(1);
+ while ((i = memory_counter(0)) != 0xffffffff) {
+ sea = 0xffffffff;
+ dea = 0xffffffff;
+ m68k_disasm_ea (NULL, i, NULL, 1, &sea, &dea);
+ if (ea == sea || ea == dea)
+ m68k_disasm (stdout, i, NULL, 1);
+ }
+}
+
static void m68k_modify (char **inptr)
{
uae_u32 v;
return;
case 'f':
- if (instruction_breakpoint (&inptr))
- return;
+ if (inptr[0] == 'a') {
+ next_char(&inptr);
+ find_ea (&inptr);
+ } else {
+ if (instruction_breakpoint (&inptr))
+ return;
+ }
break;
case 'q': uae_quit();
pc, get_word(pc), get_word(pc+2), get_word(pc+4));
return txt;
}
-*/
\ No newline at end of file
+*/
+
+struct snooperdata {
+ uae_u32 flags;
+ uae_u32 addr;
+ uae_u32 len;
+ uae_u32 p_addr;
+};
+
+static struct snooperdata *snoop;
+static uae_u32 snooper_callback;
+
+#define SNOOPER_READ (1 << 0)
+#define SNOOPER_WRITE (1 << 1)
+
+void snooper_trigger(uaecptr trapaddr)
+{
+ uae_u32 currpc = m68k_getpc ();
+ int sv = regs.s, i;
+ struct snooperdata *sd = snoop;
+
+ while (sd->flags != 0xffffffff) {
+ if (trapaddr >= sd->addr && trapaddr < sd->addr + sd->len)
+ break;
+ }
+ if (sd->flags == 0xffffffff)
+ return;
+
+ MakeSR();
+ if (!regs.s) {
+ regs.usp = m68k_areg(regs, 7);
+ if (currprefs.cpu_level >= 2)
+ m68k_areg(regs, 7) = regs.m ? regs.msp : regs.isp;
+ else
+ m68k_areg(regs, 7) = regs.isp;
+ regs.s = 1;
+ }
+
+ m68k_areg(regs, 7) -= 4;
+ put_word (m68k_areg(regs, 7), 0);
+ for (i = 0 ; i < 8; i++) {
+ m68k_areg(regs, 7) -= 4;
+ put_long (m68k_areg(regs, 7), m68k_dreg(regs, i));
+ }
+ for (i = 0 ; i < 8; i++) {
+ m68k_areg(regs, 7) -= 4;
+ put_long (m68k_areg(regs, 7), m68k_areg(regs, i));
+ }
+
+ m68k_areg(regs, 7) -= 4;
+ put_long (m68k_areg(regs, 7), sd->p_addr);
+ m68k_areg(regs, 7) -= 2;
+ put_word (m68k_areg(regs, 7), 0);
+ m68k_areg(regs, 7) -= 2;
+ put_word (m68k_areg(regs, 7), 0);
+ m68k_areg(regs, 7) -= 2;
+ put_word (m68k_areg(regs, 7), 0);
+ m68k_areg(regs, 7) -= 2;
+ put_word (m68k_areg(regs, 7), 0x0140 | (sv ? 6 : 2)); /* SSW */
+ m68k_areg(regs, 7) -= 4;
+ put_long (m68k_areg(regs, 7), trapaddr);
+ m68k_areg(regs, 7) -= 2;
+ put_word (m68k_areg(regs, 7), 0x7008);
+
+ m68k_areg(regs, 7) -= 4;
+ put_long (m68k_areg(regs, 7), currpc);
+ m68k_areg(regs, 7) -= 2;
+ put_word (m68k_areg(regs, 7), regs.sr);
+ m68k_setpc(snooper_callback);
+
+ set_special(SPCFLAG_END_COMPILE);
+ fill_prefetch_slow ();
+}
+
+int snooper(uaecptr p)
+{
+ uaecptr p2;
+ int size;
+ struct snooperdata *snptr;
+
+ if (!p) {
+ xfree (snoop);
+ snoop = 0;
+ return 1;
+ }
+ if (!initialize_memwatch())
+ return 0;
+ snooper_callback = get_long (p);
+ p += 4;
+
+ size = 1;
+ p2 = p;
+ while (get_long (p2) != 0xffffffff) {
+ p2 += 12;
+ size++;
+ }
+ snoop = xmalloc (sizeof (struct snooperdata) * size);
+ snptr = snoop;
+ for (;;) {
+ snptr->flags = get_long (p);
+ if (snptr->flags == 0xffffffff)
+ break;
+ snptr->addr = get_long (p + 4);
+ snptr->len = get_long (p + 8);
+ snptr->p_addr = p;
+ p += 12;
+ }
+ return 1;
+}
#include "caps/caps_win32.h"
#endif
#include "crc32.h"
+#include "inputdevice.h"
/* support HD floppies */
#define FLOPPY_DRIVE_HD
drive_settype_id(drv); /* Back to 35 DD */
if (disk_debug_logging > 0)
write_log ("eject drive %d\n", drv - &floppy[0]);
+ if (input_recording > 0) {
+ inprec_rstart (INPREC_DISKREMOVE, 1);
+ inprec_ru8 (drv - floppy);
+ inprec_rend ();
+ }
}
/* We use this function if we have no Kickstart ROM.
/* type: 0=regular, 1=ext2adf */
/* adftype: 0=DD,1=HD,2=525SD */
-void disk_creatediskfile (char *name, int type, drive_type adftype)
+void disk_creatediskfile (char *name, int type, drive_type adftype, char *disk_name)
{
struct zfile *f;
int i, l, file_size, tracks, track_len;
char *chunk = NULL;
uae_u8 tmp[3*4];
- char *disk_name = "empty";
+
+ if (disk_name == NULL || strlen(disk_name) == 0)
+ disk_name = "empty";
if (type == 1)
tracks = 2 * 83;
name2 = DISK_get_saveimagepath (name);
if (needwritefile && zf2 == 0)
- disk_creatediskfile (name2, 1, drvtype);
+ disk_creatediskfile (name2, 1, drvtype, NULL);
zfile_fclose (zf2);
if (protect && iswritefileempty (name)) {
for (i = 0; i < MAX_FLOPPY_DRIVES; i++) {
return dfxhistory[idx];
}
-void disk_insert (int num, const char *name)
+static void disk_insert_2 (int num, const char *name, int forced)
{
drive *drv = floppy + num;
+ if (forced) {
+ drive_insert (drv, &currprefs, num, name);
+ return;
+ }
if (!strcmp (currprefs.df[num], name))
return;
strcpy (drv->newname, name);
}
}
+void disk_insert (int num, const char *name)
+{
+ disk_insert_2 (num, name, 0);
+}
+void disk_insert_force (int num, const char *name)
+{
+ disk_insert_2 (num, name, 1);
+}
+
void DISK_check_change (void)
{
int i;
} else if (led == 8) {
int idle = (gui_data.idle + 5) / 10;
pos = 0;
- on_rgb = 0x000;
+ on = framecnt;
+ on_rgb = 0xc00;
off_rgb = 0x000;
num1 = idle / 100;
num2 = (idle - num1 * 100) / 10;
#include "sounddep/sound.h"
#include "zfile.h"
#include "events.h"
-
#include "driveclick.h"
static struct drvsample drvs[4][DS_END];
static int drv_starting[4], drv_spinning[4], drv_has_spun[4], drv_has_disk[4];
-static int click_initialized;
+static int click_initialized, wave_initialized;
#define DS_SHIFT 10
static int sample_step;
int v, vv, i, j;
char tmp[MAX_DPATH];
+ driveclick_fdrawcmd_detect();
driveclick_free ();
vv = 0;
for (i = 0; i < 4; i++) {
if (currprefs.dfxclick[i]) {
if (currprefs.dfxclick[i] > 0) {
v = 0;
- if (driveclick_loadresource (drvs[i], currprefs.dfxclick[i]))
- v = 3;
- for (j = 0; j < CLICK_TRACKS; j++)
- drvs[i][DS_CLICK].lengths[j] = drvs[i][DS_CLICK].len;
+ switch(currprefs.dfxclick[i])
+ {
+ case 1:
+ if (driveclick_loadresource (drvs[i], currprefs.dfxclick[i]))
+ v = 3;
+ for (j = 0; j < CLICK_TRACKS; j++)
+ drvs[i][DS_CLICK].lengths[j] = drvs[i][DS_CLICK].len;
+ wave_initialized = 1;
+ break;
+ default:
+ if (driveclick_fdrawcmd_open(currprefs.dfxclick[i] - 2))
+ v = 1;
+ break;
+ }
} else if (currprefs.dfxclick[i] == -1) {
+ wave_initialized = 1;
for (j = 0; j < CLICK_TRACKS; j++)
drvs[i][DS_CLICK].lengths[j] = drvs[i][DS_CLICK].len;
sprintf (tmp, "%suae_data%cdrive_click_%s",
void driveclick_reset (void)
{
xfree (clickbuffer);
+ if (!wave_initialized)
+ return;
clickbuffer = xmalloc (sndbufsize);
sample_step = (freq << DS_SHIFT) / currprefs.sound_freq;
}
{
int i, j;
+ driveclick_fdrawcmd_close(0);
+ driveclick_fdrawcmd_close(1);
for (i = 0; i < 4; i++) {
for (j = 0; j < DS_END; j++)
freesample (&drvs[i][j]);
xfree (clickbuffer);
clickbuffer = 0;
click_initialized = 0;
+ wave_initialized = 0;
}
STATIC_INLINE uae_s16 getsample(void)
{
int i;
- if (!click_initialized)
+ if (!wave_initialized)
return;
mix();
clickcnt = 0;
void driveclick_click (int drive, int cyl)
{
static int prevcyl[4];
+
if (!click_initialized)
return;
if (!currprefs.dfxclick[drive])
if (prevcyl[drive] == 0 && cyl == 0) // "noclick" check
return;
prevcyl[drive] = cyl;
+ if (!wave_initialized) {
+ driveclick_fdrawcmd_seek (currprefs.dfxclick[drive] - 2, cyl);
+ return;
+ }
mix();
drvs[drive][DS_CLICK].pos = drvs[drive][DS_CLICK].indexes[cyl] << DS_SHIFT;
drvs[drive][DS_CLICK].len = (drvs[drive][DS_CLICK].indexes[cyl] + (drvs[drive][DS_CLICK].lengths[cyl] / 2)) << DS_SHIFT;
{
if (!click_initialized)
return;
+ if (!wave_initialized)
+ return;
if (!currprefs.dfxclick[drive])
return;
+ if (!wave_initialized) {
+ driveclick_fdrawcmd_motor (currprefs.dfxclick[drive] - 2, running);
+ return;
+ }
mix();
if (running == 0) {
drv_starting[drive] = 0;
{
if (!click_initialized)
return;
+ if (!wave_initialized)
+ return;
if (!currprefs.dfxclick[drive])
return;
if (eject)
; Removed absolute RT_AREA references
; 2002.08.06 RDB automount/autoboot support (Toni Wilen)
; 2002.09.11 KS1.3 RDB support (TW)
+; 200?.??.?? Picasso96 vblank hack (TW)
+; 2006.03.04 Mousehack code integrated (TW)
AllocMem = -198
FreeMem = -210
dc.l setup_exter-start
dc.l p96vsyncfix1-start
+ dc.l mousehack_x-start
bootcode:
lea.l doslibname(pc),a1
move.l a4,a1
jsr -414(a6) ; CloseLibrary
+; move.w #$FF80,d0
+; bsr.w getrtbase
+; jsr (a0)
+; jsr -$0078(a6) ; Disable
+; lea 322(a6),a0 ; MemHeader
+;FSIN_scanchip:
+; move.l (a0),a0 ; first MemList
+; tst.l (a0)
+; beq.s FSIN_scandone
+; move.w 14(a0),d1 ; attributes
+; and #2,d1 ; MEMF_CHIP?
+; beq.s FSIN_scanchip
+; sub.l 24(a0),d0 ; did KS detect all chip?
+; bmi.s FSIN_scandone
+; beq.s FSIN_scandone
+; ; add the missing piece
+; add.l d0,24(a0) ; mh_Upper
+; add.l d0,28(a0) ; mh_Free
+; add.l d0,62(a6) ; MaxLocMem
+; ; we still need to update last node's free space
+; move.l 16(a0),a0 ; mh_First
+;FSIN_chiploop2
+; tst.l (a0)
+; beq.s FSIN_chiploop
+; move.l (a0),a0
+; bra.s FSIN_chiploop2
+;FSIN_chiploop:
+; add.l d0,4(a0)
+;FSIN_scandone:
+; jsr -$007e(a6) ; Enable
+
; add >2MB chip RAM to memory list
move.w #$FF80,d0
bsr.w getrtbase
beq.b FSIN_chip_done
moveq.l #0,d4
move.l d4,a1
- jsr -618(a6)
+ jsr -618(a6) ; AddMemList
FSIN_chip_done
movem.l (sp)+,d0-d7/a0-a6
; 8: second thread's lock chain
; 12: dummy message
; 32: the volume (80+44+1 bytes)
- move.l #80+44+1+20+12,d0
+ ; 157: mousehack started-flag
+ move.l #80+44+1+20+12+1,d0
move.l #$10001,d1 ; MEMF_PUBLIC | MEMF_CLEAR
jsr AllocMem(a6)
move.l d0,a3
bsr.w getrtbase
moveq.l #0,d0
jsr (a0)
+
+ bsr.w mousehack_init
bra.w FSML_Reply
; We abuse some of the fields of the message we get. Offset 0 is
; processing by now, so it's safe to reply to it.
FSML_loop:
+ bsr.w mousehack_init
move.l a5,a0
jsr -384(a6) ; WaitPort
move.l a5,a0
add.l d0,a0
rts
+ ;p96 stuff
+
p96flag dc.w 0
p96vsyncfix1
cmp.l #34,8(sp) ; picasso_WaitVerticalSync?
jsr -$12c(a6) ; SetTaskPri
lea p96flag(pc),a0
move.w (a0),d1
-p962 cmp.w (a0),d1
+p962 cmp.w (a0),d1
beq.s p962
move.l a2,a1
jsr -$12c(a6) ; SetTaskPri
moveq #1,d1
movem.l (sp)+,d0-d1/a0-a2/a6
addq.l #4,sp ; return directly to caller
-p961 rts
+p961 rts
+
+
+; mouse hack
+
+newlist:
+ move.l a0,(a0)
+ addq.l #4,(a0)
+ clr.l 4(a0)
+ move.l a0,8(a0)
+ rts
+
+createport:
+ movem.l d2/a2/a6,-(sp)
+ move.l 4,a6
+ moveq #-1,d0
+ jsr -$014a(a6) ;AllocSignal
+ sub.l a0,a0
+ move.l d0,d2
+ bmi.s .f
+ moveq #34,d0
+ move.l #65536+1,d1
+ jsr AllocMem(a6)
+ sub.l a0,a0
+ move.l d0,a2
+ tst.l d0
+ beq.s .f
+ move.b #4,8(a2) ;NT_MSGPORT
+ move.b d2,15(a2)
+ sub.l a1,a1
+ jsr -$0126(a6) ;FindTask
+ move.l d0,16(a2)
+ lea 20(a2),a0
+ bsr.w newlist
+ move.l a2,a0
+.f move.l a0,d0
+ movem.l (sp)+,d2/a2/a6
+ rts
+
+createio:
+ movem.l d2/a2/a6,-(sp)
+ move.l 4,a6
+ tst.l d0
+ beq.s .f
+ move.l d0,a2
+ moveq #48,d2
+ move.l d2,d0
+ move.l #65536+1,d1
+ jsr AllocMem(a6)
+ move.l d0,a0
+ move.b #10,8(a0) ;NT_MESSAGE
+ move.l d2,18(a0)
+ move.l a2,14(a0)
+.f movem.l (sp)+,d2/a2/a6
+ rts
+
+createtask:
+ movem.l d2/d3/a2/a3/a6,-(sp)
+ move.l 4,a6
+ move.l a0,d2
+ move.l a1,d3
+ move.l #92+2048,d0
+ move.l #65536+1,d1
+ jsr AllocMem(a6)
+ tst.l d0
+ beq .f
+ move.l d0,a2
+ move.b #1,8(a2) ;NT_TASK
+ move.l d2,10(a2)
+ lea 92(a2),a3
+ move.l a3,58(a2)
+ lea 2048(a3),a3
+ move.l a3,62(a2)
+ move.l a3,54(a2)
+ move.l a2,a1
+ move.l d3,a2
+ sub.l a3,a3
+ jsr -$011a(a6) ;AddTask
+.f movem.l (sp)+,d2/d3/a2/a3/a6
+ rts
+
+mousehack_e: dc.w 0
+mousehack_x: dc.w 0
+mousehack_y: dc.w 0
+
+MH_INT = 0
+MH_FOO = (MH_INT+22)
+MH_IEV = (MH_FOO+16)
+MH_IO = (MH_IEV+22)
+MH_TM = (MH_IO+4)
+MH_END = (MH_TM+4)
+
+mousehack_init:
+ move.l a0,-(sp)
+ tst.b 157(a3)
+ bne.s .no
+ lea mousehack_e(pc),a0
+ tst.w (a0)
+ beq.s .no
+ lea mhname(pc),a0
+ lea mousehack_task(pc),a1
+ bsr createtask
+ st 157(a3)
+.no move.l (sp)+,a0
+ rts
+
+mousehack_task:
+ move.l 4,a6
+
+ moveq #-1,d0
+ jsr -$014a(a6) ;AllocSignal
+ moveq #0,d2
+ bset d0,d2
+ sub.l a1,a1
+ jsr -$0126(a6) ;FindTask
+ move.l d0,a4
+
+ moveq #20,d0
+ move.l a2,a1
+ jsr -$012c(a6) ;SetTaskPri
+
+ moveq #0,d0
+ lea intlibname(pc),a1
+ jsr -$0228(a6)
+ move.l d0,d7
+
+ moveq #0,d0
+ move.w #MH_END,d0
+ move.l #65536+1,d1
+ jsr AllocMem(a6)
+ move.l d0,a5
+
+ bsr.w createport
+ bsr.w createio
+ move.l d0,MH_IO(a5)
+ beq .f
+ move.l d0,a1
+ lea inp_dev(pc),a0
+ moveq #0,d0
+ moveq #0,d1
+ jsr -$01bc(a6) ;OpenDevice
+ tst.l d0
+ bne .f
+
+ bsr.w createport
+ bsr.w createio
+ move.l d0,MH_TM(a5)
+ beq .f
+ move.l d0,a1
+ lea tim_dev(pc),a0
+ moveq #0,d0
+ moveq #0,d1
+ jsr -$01bc(a6) ;OpenDevice
+ tst.l d0
+ bne .f
+
+ lea MH_FOO(a5),a3
+ move.l a4,12(a3);task
+ move.l d2,8(a3) ;sigmask
+ moveq #-1,d0
+ move.l d0,(a3) ;mx
+ move.l d0,4(a3) ;my
+
+ lea MH_INT(a5),a1
+ move.b #2,8(a1) ;NT_INTERRUPT
+ move.b #5,9(a1) ;priority
+ lea mhname(pc),a0
+ move.l a0,10(a1)
+ lea mousehackint(pc),a0
+ move.l a0,18(a1)
+ move.l a3,14(a1)
+ moveq #5,d0 ;INTB_VERTB
+ jsr -$00a8(a6)
+ bra.s mhloop
+.f rts
+
+mhloop
+ move.l d2,d0
+ jsr -$013e(a6) ;Wait
+
+ move.l MH_IO(a5),a1
+ lea MH_IEV(a5),a2
+ move.w #11,28(a1) ;IND_WRITEEVENT
+ move.l #22,36(a1) ;sizeof(struct InputEvent)
+ move.l a2,40(a1)
+ move.b #1,30(a1) ;IOF_QUICK
+
+ move.b #4,4(a2) ;IECLASS_POINTERPOS
+ clr.b 5(a2) ;ie_SubClass
+ clr.w 6(a2) ;ie_Code
+ clr.w 8(a2) ;ie_Qualifier
+
+ move.l d7,a0 ;intbase
+
+ move.l MH_FOO+0(a5),d0
+ move.w 34+14(a0),d1
+ add.w d1,d1
+ sub.w d1,d0
+ move.w d0,10(a2)
+
+ move.l MH_FOO+4(a5),d0
+ move.w 34+12(a0),d1
+ add.w d1,d1
+ sub.w d1,d0
+ ext.l d0
+ move.w d0,12(a2)
+
+ move.l MH_TM(a5),a1
+ move.w #10,28(a1) ;TR_GETSYSTIME
+ move.b #1,30(a1) ;IOF_QUICK
+ jsr -$01c8(a6) ;DoIO
+ move.l MH_TM(a5),a1
+ move.l 32(a1),14(a2)
+ move.l 36(a1),18(a2)
+
+ move.l MH_IO(a5),a1
+ jsr -$01c8(a6) ;DoIO
+
+ bra.w mhloop
+
+mousehackint:
+ move.w mousehack_x(pc),d0
+ ext.l d0
+ move.w mousehack_y(pc),d1
+ ext.l d1
+ cmp.l (a1),d0
+ bne .l1
+ cmp.l 4(a1),d1
+ beq .l2
+.l1 move.l d1,4(a1)
+ move.l d0,(a1)
+ move.l 8(a1),d0
+ move.l 12(a1),a1
+ move.l 4.w,a6
+ jsr -$0144(a6) ; Signal
+.l2 lea $dff000,a0
+ moveq #0,d0
+ rts
+inp_dev: dc.b 'input.device',0
+tim_dev: dc.b 'timer.device',0
+mhname: dc.b 'UAE mouse hack',0
exter_name: dc.b 'UAE filesystem',0
doslibname: dc.b 'dos.library',0
+intlibname: dc.b 'intuition.library',0
explibname: dc.b 'expansion.library',0
fsresname: dc.b 'FileSystem.resource',0
END
align(4);
/* The last offset comes from the code itself, look for it near the top. */
- EXPANSION_bootcode = here () + 8 + 0x18 + 4;
+ EXPANSION_bootcode = here () + 8 + 0x1c + 4;
/* Ouch. Make sure this is _always_ a multiple of two bytes. */
- filesys_initcode = here() + 8 + 0x2c + 4;
-
- /* see filesys.asm for source */
-
- db(0x00); db(0x00); db(0x00); db(0x10); db(0x00); db(0x00); db(0x00); db(0x00);
- db(0x60); db(0x00); db(0x04); db(0xf0); db(0x00); db(0x00); db(0x03); db(0xac);
- db(0x00); db(0x00); db(0x00); db(0x30); db(0x00); db(0x00); db(0x00); db(0xd0);
- db(0x00); db(0x00); db(0x00); db(0x1c); db(0x00); db(0x00); db(0x01); db(0x8a);
- db(0x00); db(0x00); db(0x06); db(0xa8); db(0x43); db(0xfa); db(0x06); db(0xd5);
- db(0x4e); db(0xae); db(0xff); db(0xa0); db(0x20); db(0x40); db(0x20); db(0x28);
- db(0x00); db(0x16); db(0x20); db(0x40); db(0x4e); db(0x90); db(0x4e); db(0x75);
- db(0x48); db(0xe7); db(0xff); db(0xfe); db(0x2c); db(0x78); db(0x00); db(0x04);
- db(0x30); db(0x3c); db(0xff); db(0xfc); db(0x61); db(0x00); db(0x06); db(0x5a);
- db(0x2a); db(0x50); db(0x43); db(0xfa); db(0x06); db(0xbb); db(0x70); db(0x24);
- db(0x7a); db(0x00); db(0x4e); db(0xae); db(0xfd); db(0xd8); db(0x4a); db(0x80);
- db(0x66); db(0x0c); db(0x43); db(0xfa); db(0x06); db(0xab); db(0x70); db(0x00);
- db(0x7a); db(0x01); db(0x4e); db(0xae); db(0xfd); db(0xd8); db(0x28); db(0x40);
- db(0x20); db(0x3c); db(0x00); db(0x00); db(0x02); db(0x2c); db(0x72); db(0x01);
- db(0x4e); db(0xae); db(0xff); db(0x3a); db(0x26); db(0x40); db(0x27); db(0x4c);
- db(0x01); db(0x9c); db(0x7c); db(0x00); db(0xbc); db(0xad); db(0x01); db(0x0c);
- db(0x64); db(0x24); db(0x2f); db(0x06); db(0x7e); db(0x01); db(0x2f); db(0x0b);
- db(0x20); db(0x4b); db(0x61); db(0x00); db(0x03); db(0x28); db(0x26); db(0x5f);
- db(0x0c); db(0x80); db(0xff); db(0xff); db(0xff); db(0xfe); db(0x67); db(0x08);
- db(0x48); db(0x46); db(0x52); db(0x46); db(0x48); db(0x46); db(0x60); db(0xe4);
- db(0x2c); db(0x1f); db(0x52); db(0x46); db(0x60); db(0xd6); db(0x2c); db(0x78);
- db(0x00); db(0x04); db(0x22); db(0x4c); db(0x4e); db(0xae); db(0xfe); db(0x62);
- db(0x30); db(0x3c); db(0xff); db(0x80); db(0x61); db(0x00); db(0x05); db(0xea);
- db(0x4e); db(0x90); db(0x72); db(0x03); db(0x74); db(0xf6); db(0x20); db(0x7c);
- db(0x00); db(0x20); db(0x00); db(0x00); db(0x90); db(0x88); db(0x65); db(0x0a);
- db(0x67); db(0x08); db(0x78); db(0x00); db(0x22); db(0x44); db(0x4e); db(0xae);
- db(0xfd); db(0x96); db(0x4c); db(0xdf); db(0x7f); db(0xff); db(0x4e); db(0x75);
- db(0x48); db(0xe7); db(0x00); db(0x20); db(0x30); db(0x3c); db(0xff); db(0x50);
- db(0x61); db(0x00); db(0x05); db(0xbe); db(0x70); db(0x00); db(0x4e); db(0x90);
- db(0x4a); db(0x80); db(0x67); db(0x00); db(0x00); db(0xa0); db(0x2c); db(0x78);
- db(0x00); db(0x04); db(0x30); db(0x3c); db(0xff); db(0x50); db(0x61); db(0x00);
- db(0x05); db(0xa8); db(0x70); db(0x02); db(0x4e); db(0x90); db(0x0c); db(0x40);
- db(0x00); db(0x01); db(0x6d); db(0x7a); db(0x6e); db(0x06); db(0x4e); db(0xae);
- db(0xfe); db(0x92); db(0x60); db(0xe6); db(0x0c); db(0x40); db(0x00); db(0x02);
- db(0x6e); db(0x08); db(0x20); db(0x01); db(0x4e); db(0xae); db(0xfe); db(0xbc);
- db(0x60); db(0xd8); db(0x0c); db(0x40); db(0x00); db(0x03); db(0x6e); db(0x06);
- db(0x4e); db(0xae); db(0xfe); db(0x86); db(0x60); db(0xcc); db(0x0c); db(0x40);
- db(0x00); db(0x04); db(0x6e); db(0x06); db(0x4e); db(0xae); db(0xff); db(0x4c);
- db(0x60); db(0xc0); db(0x0c); db(0x40); db(0x00); db(0x05); db(0x6e); db(0x46);
- db(0x48); db(0xe7); db(0x00); db(0xc0); db(0x70); db(0x26); db(0x22); db(0x3c);
- db(0x00); db(0x01); db(0x00); db(0x01); db(0x4e); db(0xae); db(0xff); db(0x3a);
- db(0x4c); db(0xdf); db(0x03); db(0x00); db(0x24); db(0x40); db(0x15); db(0x7c);
- db(0x00); db(0x08); db(0x00); db(0x08); db(0x25); db(0x48); db(0x00); db(0x0e);
- db(0x35); db(0x7c); db(0x00); db(0x26); db(0x00); db(0x12); db(0x25); db(0x7c);
- db(0x40); db(0x00); db(0x00); db(0x00); db(0x00); db(0x14); db(0x35); db(0x7c);
- db(0x12); db(0x34); db(0x00); db(0x18); db(0x25); db(0x49); db(0x00); db(0x1a);
- db(0x20); db(0x69); db(0x00); db(0x10); db(0x22); db(0x4a); db(0x4e); db(0xae);
- db(0xfe); db(0x92); db(0x60); db(0x00); db(0xff); db(0x76); db(0x30); db(0x3c);
- db(0xff); db(0x50); db(0x61); db(0x00); db(0x05); db(0x1c); db(0x70); db(0x04);
- db(0x4e); db(0x90); db(0x70); db(0x01); db(0x4c); db(0xdf); db(0x04); db(0x00);
- db(0x4e); db(0x75); db(0x48); db(0xe7); db(0xc0); db(0xc0); db(0x70); db(0x1a);
- db(0x22); db(0x3c); db(0x00); db(0x01); db(0x00); db(0x01); db(0x4e); db(0xae);
- db(0xff); db(0x3a); db(0x22); db(0x40); db(0x41); db(0xfa); db(0x05); db(0x46);
- db(0x23); db(0x48); db(0x00); db(0x0a); db(0x41); db(0xfa); db(0xff); db(0x2a);
- db(0x23); db(0x48); db(0x00); db(0x0e); db(0x41); db(0xfa); db(0xff); db(0x22);
- db(0x23); db(0x48); db(0x00); db(0x12); db(0x33); db(0x7c); db(0x02); db(0x14);
- db(0x00); db(0x08); db(0x70); db(0x03); db(0x4e); db(0xae); db(0xff); db(0x58);
- db(0x4c); db(0xdf); db(0x03); db(0x03); db(0x4e); db(0x75); db(0x48); db(0xe7);
- db(0xc0); db(0xf2); db(0x2c); db(0x78); db(0x00); db(0x04); db(0x24); db(0x48);
- db(0x26); db(0x49); db(0x20); db(0x3c); db(0x00); db(0x00); db(0x00); db(0xbe);
- db(0x22); db(0x3c); db(0x00); db(0x01); db(0x00); db(0x01); db(0x4e); db(0xae);
- db(0xff); db(0x3a); db(0x20); db(0x40); db(0x70); db(0x00); db(0x43); db(0xeb);
- db(0x01); db(0xa0); db(0x11); db(0xb1); db(0x00); db(0x00); db(0x00); db(0x0e);
- db(0x52); db(0x40); db(0x0c); db(0x40); db(0x00); db(0x8c); db(0x66); db(0xf2);
- db(0x20); db(0x0a); db(0xe4); db(0x88); db(0x21); db(0x40); db(0x00); db(0x36);
- db(0x22); db(0x48); db(0x41); db(0xfa); db(0x04); db(0xe0); db(0x23); db(0x48);
- db(0x00); db(0x0a); db(0x20); db(0x6b); db(0x01); db(0x98); db(0x41); db(0xe8);
- db(0x00); db(0x12); db(0x4e); db(0xae); db(0xff); db(0x10); db(0x4c); db(0xdf);
- db(0x4f); db(0x03); db(0x4e); db(0x75); db(0x48); db(0xe7); db(0x7f); db(0x7e);
- db(0x2c); db(0x78); db(0x00); db(0x04); db(0x24); db(0x48); db(0x0c); db(0x9a);
- db(0x00); db(0x00); db(0x03); db(0xf3); db(0x66); db(0x00); db(0x00); db(0xec);
- db(0x50); db(0x8a); db(0x2e); db(0x2a); db(0x00); db(0x04); db(0x9e); db(0x92);
- db(0x50); db(0x8a); db(0x52); db(0x87); db(0x26); db(0x4a); db(0x20); db(0x07);
- db(0xd0); db(0x80); db(0xd0); db(0x80); db(0xd7); db(0xc0); db(0x28); db(0x4a);
- db(0x9b); db(0xcd); db(0x7c); db(0x00); db(0x24); db(0x12); db(0xe5); db(0x8a);
- db(0x72); db(0x01); db(0x08); db(0x03); db(0x00); db(0x1e); db(0x67); db(0x04);
- db(0x08); db(0xc1); db(0x00); db(0x01); db(0x08); db(0xc1); db(0x00); db(0x10);
- db(0x08); db(0x83); db(0x00); db(0x1f); db(0x08); db(0x83); db(0x00); db(0x1e);
- db(0x20); db(0x02); db(0x66); db(0x04); db(0x42); db(0x9a); db(0x60); db(0x1e);
- db(0x50); db(0x80); db(0x4e); db(0xae); db(0xff); db(0x3a); db(0x4a); db(0x80);
- db(0x67); db(0x00); db(0x00); db(0xa0); db(0x20); db(0x40); db(0x20); db(0xc2);
- db(0x24); db(0xc8); db(0x22); db(0x0d); db(0x67); db(0x06); db(0x20); db(0x08);
- db(0xe4); db(0x88); db(0x2a); db(0x80); db(0x2a); db(0x48); db(0x52); db(0x86);
- db(0xbe); db(0x86); db(0x66); db(0xb8); db(0x7c); db(0x00); db(0x22); db(0x06);
- db(0xd2); db(0x81); db(0xd2); db(0x81); db(0x20); db(0x74); db(0x18); db(0x00);
- db(0x58); db(0x88); db(0x26); db(0x1b); db(0x28); db(0x1b); db(0xe5); db(0x8c);
- db(0x0c); db(0x83); db(0x00); db(0x00); db(0x03); db(0xe9); db(0x67); db(0x08);
- db(0x0c); db(0x83); db(0x00); db(0x00); db(0x03); db(0xea); db(0x66); db(0x0c);
- db(0x20); db(0x04); db(0x4a); db(0x80); db(0x67); db(0x0e); db(0x10); db(0xdb);
- db(0x53); db(0x80); db(0x60); db(0xf6); db(0x0c); db(0x83); db(0x00); db(0x00);
- db(0x03); db(0xeb); db(0x66); db(0x4e); db(0x26); db(0x1b); db(0x0c); db(0x83);
- db(0x00); db(0x00); db(0x03); db(0xec); db(0x66); db(0x28); db(0x22); db(0x06);
- db(0xd2); db(0x81); db(0xd2); db(0x81); db(0x20); db(0x74); db(0x18); db(0x00);
- db(0x58); db(0x88); db(0x20); db(0x1b); db(0x67); db(0xe6); db(0x22); db(0x1b);
- db(0xd2); db(0x81); db(0xd2); db(0x81); db(0x26); db(0x34); db(0x18); db(0x00);
- db(0x58); db(0x83); db(0x24); db(0x1b); db(0xd7); db(0xb0); db(0x28); db(0x00);
- db(0x53); db(0x80); db(0x66); db(0xf6); db(0x60); db(0xe4); db(0x0c); db(0x83);
- db(0x00); db(0x00); db(0x03); db(0xf2); db(0x66); db(0x14); db(0x52); db(0x86);
- db(0xbe); db(0x86); db(0x66); db(0x00); db(0xff); db(0x8a); db(0x7e); db(0x01);
- db(0x20); db(0x54); db(0x20); db(0x07); db(0x4c); db(0xdf); db(0x7e); db(0xfe);
- db(0x4e); db(0x75); db(0x30); db(0x3c); db(0x75); db(0x30); db(0x33); db(0xfc);
- db(0x0f); db(0x00); db(0x00); db(0xdf); db(0xf1); db(0x80); db(0x33); db(0xfc);
- db(0x00); db(0x0f); db(0x00); db(0xdf); db(0xf1); db(0x80); db(0x33); db(0xfc);
- db(0x00); db(0xf0); db(0x00); db(0xdf); db(0xf1); db(0x80); db(0x51); db(0xc8);
- db(0xff); db(0xe6); db(0x7e); db(0x00); db(0x60); db(0xd4); db(0x48); db(0xe7);
- db(0x40); db(0xe2); db(0x2c); db(0x78); db(0x00); db(0x04); db(0x41); db(0xee);
- db(0x01); db(0x50); db(0x4a); db(0x90); db(0x67); db(0x1a); db(0x22); db(0x68);
- db(0x00); db(0x0a); db(0x45); db(0xfa); db(0x03); db(0xbd); db(0x10); db(0x19);
- db(0x12); db(0x1a); db(0xb0); db(0x01); db(0x66); db(0x06); db(0x4a); db(0x00);
- db(0x67); db(0x42); db(0x60); db(0xf2); db(0x20); db(0x50); db(0x60); db(0xe2);
- db(0x70); db(0x20); db(0x22); db(0x3c); db(0x00); db(0x01); db(0x00); db(0x01);
- db(0x4e); db(0xae); db(0xff); db(0x3a); db(0x24); db(0x40); db(0x15); db(0x7c);
- db(0x00); db(0x08); db(0x00); db(0x08); db(0x41); db(0xfa); db(0x03); db(0x93);
- db(0x25); db(0x48); db(0x00); db(0x0a); db(0x41); db(0xfa); db(0x03); db(0x5e);
- db(0x25); db(0x48); db(0x00); db(0x0e); db(0x41); db(0xea); db(0x00); db(0x12);
- db(0x20); db(0x88); db(0x58); db(0x90); db(0x21); db(0x48); db(0x00); db(0x08);
- db(0x41); db(0xee); db(0x01); db(0x50); db(0x22); db(0x4a); db(0x4e); db(0xae);
- db(0xff); db(0x0a); db(0x20); db(0x4a); db(0x20); db(0x08); db(0x4c); db(0xdf);
- db(0x47); db(0x02); db(0x4e); db(0x75); db(0x61); db(0x00); db(0xff); db(0x90);
- db(0x21); db(0x40); db(0x01); db(0x98); db(0x2f); db(0x08); db(0x30); db(0x3c);
- db(0xff); db(0xfc); db(0x61); db(0x00); db(0x02); db(0xdc); db(0x2a); db(0x50);
- db(0x30); db(0x3c); db(0xff); db(0x28); db(0x61); db(0x00); db(0x02); db(0xd2);
- db(0x22); db(0x48); db(0x20); db(0x5f); db(0x42); db(0xa8); db(0x01); db(0x90);
- db(0x42); db(0xa8); db(0x01); db(0x94); db(0x4e); db(0x91); db(0x26); db(0x00);
- db(0x0c); db(0x83); db(0xff); db(0xff); db(0xff); db(0xfe); db(0x67); db(0x00);
- db(0xfc); db(0xee); db(0x0c); db(0x83); db(0x00); db(0x00); db(0x00); db(0x02);
- db(0x67); db(0x0c); db(0xc0); db(0x85); db(0x67); db(0x08); db(0x4a); db(0xa8);
- db(0x01); db(0x90); db(0x67); db(0x00); db(0xfc); db(0xda); db(0x20); db(0x28);
- db(0x01); db(0x90); db(0x67); db(0x12); db(0x2f); db(0x08); db(0x72); db(0x01);
- db(0x2c); db(0x78); db(0x00); db(0x04); db(0x4e); db(0xae); db(0xff); db(0x3a);
- db(0x20); db(0x5f); db(0x21); db(0x40); db(0x01); db(0x94); db(0x4a); db(0x83);
- db(0x6a); db(0x10); db(0x22); db(0x48); db(0x30); db(0x3c); db(0xff); db(0x20);
- db(0x61); db(0x00); db(0x02); db(0x7e); db(0x4e); db(0x90); db(0x60); db(0x00);
- db(0x00); db(0x28); db(0x2c); db(0x4c); db(0x2f); db(0x08); db(0x4e); db(0xae);
- db(0xff); db(0x70); db(0x20); db(0x5f); db(0x22); db(0x48); db(0x26); db(0x40);
- db(0x30); db(0x3c); db(0xff); db(0x20); db(0x61); db(0x00); db(0x02); db(0x62);
- db(0x4e); db(0x90); db(0x70); db(0x00); db(0x27); db(0x40); db(0x00); db(0x08);
- db(0x27); db(0x40); db(0x00); db(0x10); db(0x27); db(0x40); db(0x00); db(0x20);
- db(0x4a); db(0xa9); db(0x01); db(0x94); db(0x67); db(0x28); db(0x20); db(0x69);
- db(0x01); db(0x94); db(0x61); db(0x00); db(0xfd); db(0xc8); db(0x48); db(0xe7);
- db(0x80); db(0xc0); db(0x20); db(0x29); db(0x01); db(0x90); db(0x22); db(0x69);
- db(0x01); db(0x94); db(0x2c); db(0x78); db(0x00); db(0x04); db(0x4e); db(0xae);
- db(0xff); db(0x2e); db(0x4c); db(0xdf); db(0x03); db(0x01); db(0x4a); db(0x80);
- db(0x67); db(0x04); db(0x61); db(0x00); db(0xfd); db(0x52); db(0x4a); db(0x83);
- db(0x6b); db(0x00); db(0xfc); db(0x54); db(0x30); db(0x3c); db(0xff); db(0x18);
- db(0x61); db(0x00); db(0x02); db(0x16); db(0x4e); db(0x90); db(0x20); db(0x03);
- db(0x16); db(0x29); db(0x00); db(0x4f); db(0x4a); db(0x80); db(0x66); db(0x1a);
- db(0x27); db(0x7c); db(0x00); db(0x00); db(0x0f); db(0xa0); db(0x00); db(0x14);
- db(0x43); db(0xfa); db(0xfb); db(0x62); db(0x20); db(0x09); db(0xe4); db(0x88);
- db(0x27); db(0x40); db(0x00); db(0x20); db(0x70); db(0xff); db(0x27); db(0x40);
- db(0x00); db(0x24); db(0x4a); db(0x87); db(0x67); db(0x36); db(0x2c); db(0x78);
- db(0x00); db(0x04); db(0x70); db(0x14); db(0x72); db(0x00); db(0x4e); db(0xae);
- db(0xff); db(0x3a); db(0x22); db(0x40); db(0x70); db(0x00); db(0x22); db(0x80);
- db(0x23); db(0x40); db(0x00); db(0x04); db(0x33); db(0x40); db(0x00); db(0x0e);
- db(0x30); db(0x3c); db(0x10); db(0x00); db(0x80); db(0x03); db(0x33); db(0x40);
- db(0x00); db(0x08); db(0x23); db(0x6d); db(0x01); db(0x04); db(0x00); db(0x0a);
- db(0x23); db(0x4b); db(0x00); db(0x10); db(0x41); db(0xec); db(0x00); db(0x4a);
- db(0x4e); db(0xee); db(0xfe); db(0xf2); db(0x20); db(0x4b); db(0x72); db(0x00);
- db(0x22); db(0x41); db(0x70); db(0xff); db(0x2c); db(0x4c); db(0x4e); db(0xee);
- db(0xff); db(0x6a); db(0x2c); db(0x78); db(0x00); db(0x04); db(0x70); db(0x00);
- db(0x22); db(0x40); db(0x4e); db(0xae); db(0xfe); db(0xda); db(0x20); db(0x40);
- db(0x4b); db(0xe8); db(0x00); db(0x5c); db(0x43); db(0xfa); db(0x01); db(0xed);
- db(0x70); db(0x00); db(0x4e); db(0xae); db(0xfd); db(0xd8); db(0x24); db(0x40);
- db(0x20); db(0x3c); db(0x00); db(0x00); db(0x00); db(0x9d); db(0x22); db(0x3c);
- db(0x00); db(0x01); db(0x00); db(0x01); db(0x4e); db(0xae); db(0xff); db(0x3a);
- db(0x26); db(0x40); db(0x7c); db(0x00); db(0x26); db(0x86); db(0x27); db(0x46);
- db(0x00); db(0x04); db(0x27); db(0x46); db(0x00); db(0x08); db(0x7a); db(0x00);
- db(0x20); db(0x4d); db(0x4e); db(0xae); db(0xfe); db(0x80); db(0x20); db(0x4d);
- db(0x4e); db(0xae); db(0xfe); db(0x8c); db(0x28); db(0x40); db(0x26); db(0x2c);
- db(0x00); db(0x0a); db(0x30); db(0x3c); db(0xff); db(0x40); db(0x61); db(0x00);
- db(0x01); db(0x50); db(0x70); db(0x00); db(0x4e); db(0x90); db(0x60); db(0x00);
- db(0x00); db(0xd4); db(0x20); db(0x4d); db(0x4e); db(0xae); db(0xfe); db(0x80);
- db(0x20); db(0x4d); db(0x4e); db(0xae); db(0xfe); db(0x8c); db(0x28); db(0x40);
- db(0x0c); db(0x6c); db(0x00); db(0x26); db(0x00); db(0x12); db(0x66); db(0x4a);
- db(0x0c); db(0xac); db(0x40); db(0x00); db(0x00); db(0x00); db(0x00); db(0x14);
- db(0x66); db(0x40); db(0x0c); db(0x6c); db(0x12); db(0x34); db(0x00); db(0x18);
- db(0x66); db(0x38); db(0x20); db(0x6c); db(0x00); db(0x1a); db(0x20); db(0x28);
- db(0x00); db(0x0c); db(0x02); db(0x80); db(0x80); db(0x00); db(0x00); db(0x08);
- db(0x0c); db(0x80); db(0x80); db(0x00); db(0x00); db(0x08); db(0x66); db(0x18);
- db(0x02); db(0xa8); db(0x7f); db(0xff); db(0xff); db(0xff); db(0x00); db(0x0c);
- db(0x20); db(0x68); db(0x00); db(0x10); db(0x22); db(0x4c); db(0x12); db(0xbc);
- db(0x00); db(0x08); db(0x4e); db(0xae); db(0xfe); db(0x92); db(0x60); db(0xaa);
- db(0x22); db(0x4c); db(0x70); db(0x26); db(0x4e); db(0xae); db(0xff); db(0x2e);
- db(0x60); db(0xa0); db(0x26); db(0x2c); db(0x00); db(0x0a); db(0x66); db(0x3c);
- db(0x30); db(0x3c); db(0xff); db(0x50); db(0x61); db(0x00); db(0x00); db(0xda);
- db(0x70); db(0x01); db(0x4e); db(0x90); db(0x45); db(0xeb); db(0x00); db(0x04);
- db(0x20); db(0x52); db(0x20); db(0x08); db(0x67); db(0x84); db(0x22); db(0x50);
- db(0x20); db(0x40); db(0x20); db(0x28); db(0x00); db(0x04); db(0x6a); db(0x16);
- db(0x48); db(0xe7); db(0x00); db(0xc0); db(0x28); db(0x68); db(0x00); db(0x0a);
- db(0x61); db(0x4a); db(0x53); db(0x85); db(0x4c); db(0xdf); db(0x03); db(0x00);
- db(0x24); db(0x89); db(0x20); db(0x49); db(0x60); db(0xdc); db(0x24); db(0x48);
- db(0x20); db(0x49); db(0x60); db(0xd6); db(0x0c); db(0x85); db(0x00); db(0x00);
- db(0x00); db(0x14); db(0x65); db(0x00); db(0x00); db(0x0a); db(0x70); db(0x01);
- db(0x29); db(0x40); db(0x00); db(0x04); db(0x60); db(0x12); db(0x61); db(0x32);
- db(0x30); db(0x3c); db(0xff); db(0x30); db(0x61); db(0x00); db(0x00); db(0x8a);
- db(0x4e); db(0x90); db(0x4a); db(0x80); db(0x67); db(0x0e); db(0x52); db(0x85);
- db(0x28); db(0xab); db(0x00); db(0x04); db(0x27); db(0x4c); db(0x00); db(0x04);
- db(0x60); db(0x00); db(0xff); db(0x30); db(0x28); db(0x43); db(0x61); db(0x04);
- db(0x60); db(0x00); db(0xff); db(0x28); db(0x22); db(0x54); db(0x20); db(0x6c);
- db(0x00); db(0x04); db(0x29); db(0x4d); db(0x00); db(0x04); db(0x4e); db(0xee);
- db(0xfe); db(0x92); db(0x2f); db(0x05); db(0x7a); db(0xfc); db(0x24); db(0x53);
- db(0x2e); db(0x0a); db(0x22); db(0x0a); db(0x67); db(0x00); db(0x00); db(0x0c);
- db(0x52); db(0x85); db(0x67); db(0x1e); db(0x22); db(0x4a); db(0x24); db(0x52);
- db(0x60); db(0xf0); db(0x52); db(0x85); db(0x67); db(0x3c); db(0x24); db(0x47);
- db(0x70); db(0x18); db(0x72); db(0x01); db(0x4e); db(0xae); db(0xff); db(0x3a);
- db(0x52); db(0x46); db(0x24); db(0x40); db(0x24); db(0x87); db(0x2e); db(0x0a);
- db(0x60); db(0xe8); db(0x20); db(0x12); db(0x67); db(0x24); db(0x20); db(0x40);
- db(0x20); db(0x10); db(0x67); db(0x1e); db(0x20); db(0x40); db(0x20); db(0x10);
- db(0x67); db(0x18); db(0x70); db(0x00); db(0x22); db(0x80); db(0x22); db(0x4a);
- db(0x24); db(0x51); db(0x70); db(0x18); db(0x4e); db(0xae); db(0xff); db(0x2e);
- db(0x06); db(0x86); db(0x00); db(0x01); db(0x00); db(0x00); db(0x20); db(0x0a);
- db(0x66); db(0xec); db(0x26); db(0x87); db(0x2a); db(0x1f); db(0x4e); db(0x75);
- db(0x41); db(0xfa); db(0xf9); db(0x5a); db(0x02); db(0x80); db(0x00); db(0x00);
- db(0xff); db(0xff); db(0xd1); db(0xc0); db(0x4e); db(0x75); db(0x00); db(0x00);
- db(0x0c); db(0xaf); db(0x00); db(0x00); db(0x00); db(0x22); db(0x00); db(0x08);
- db(0x66); db(0x30); db(0x48); db(0xe7); db(0xc0); db(0xe2); db(0x2c); db(0x78);
- db(0x00); db(0x04); db(0x93); db(0xc9); db(0x4e); db(0xae); db(0xfe); db(0xda);
- db(0x24); db(0x40); db(0x22); db(0x4a); db(0x70); db(0xec); db(0x4e); db(0xae);
- db(0xfe); db(0xd4); db(0x41); db(0xfa); db(0xff); db(0xda); db(0x32); db(0x10);
- db(0xb2); db(0x50); db(0x67); db(0xfc); db(0x22); db(0x4a); db(0x4e); db(0xae);
- db(0xfe); db(0xd4); db(0x72); db(0x01); db(0x4c); db(0xdf); db(0x47); db(0x03);
- db(0x58); db(0x8f); db(0x4e); db(0x75); db(0x55); db(0x41); db(0x45); db(0x20);
- db(0x66); db(0x69); db(0x6c); db(0x65); db(0x73); db(0x79); db(0x73); db(0x74);
- db(0x65); db(0x6d); db(0x00); db(0x64); db(0x6f); db(0x73); db(0x2e); db(0x6c);
- db(0x69); db(0x62); db(0x72); db(0x61); db(0x72); db(0x79); db(0x00); db(0x65);
- db(0x78); db(0x70); db(0x61); db(0x6e); db(0x73); db(0x69); db(0x6f); db(0x6e);
- db(0x2e); db(0x6c); db(0x69); db(0x62); db(0x72); db(0x61); db(0x72); db(0x79);
- db(0x00); db(0x46); db(0x69); db(0x6c); db(0x65); db(0x53); db(0x79); db(0x73);
- db(0x74); db(0x65); db(0x6d); db(0x2e); db(0x72); db(0x65); db(0x73); db(0x6f);
- db(0x75); db(0x72); db(0x63); db(0x65); db(0x00); db(0x00); db(0x00); db(0x00);
- db(0x00); db(0x00); db(0x03); db(0xf2);
+ filesys_initcode = here() + 8 + 0x30 + 4;
+ #include "filesys_bootrom.c"
}
-
#include "od-win32/win32_filesys.c"
static uae_u8 *restore_filesys_virtual (UnitInfo *ui, uae_u8 *src)
--- /dev/null
+ db(0x00); db(0x00); db(0x00); db(0x10); db(0x00); db(0x00); db(0x00); db(0x00);
+ db(0x60); db(0x00); db(0x04); db(0xf4); db(0x00); db(0x00); db(0x03); db(0xb0);
+ db(0x00); db(0x00); db(0x00); db(0x34); db(0x00); db(0x00); db(0x00); db(0xd4);
+ db(0x00); db(0x00); db(0x00); db(0x20); db(0x00); db(0x00); db(0x01); db(0x8e);
+ db(0x00); db(0x00); db(0x06); db(0xb4); db(0x00); db(0x00); db(0x07); db(0xd8);
+ db(0x43); db(0xfa); db(0x09); db(0xa4); db(0x4e); db(0xae); db(0xff); db(0xa0);
+ db(0x20); db(0x40); db(0x20); db(0x28); db(0x00); db(0x16); db(0x20); db(0x40);
+ db(0x4e); db(0x90); db(0x4e); db(0x75); db(0x48); db(0xe7); db(0xff); db(0xfe);
+ db(0x2c); db(0x78); db(0x00); db(0x04); db(0x30); db(0x3c); db(0xff); db(0xfc);
+ db(0x61); db(0x00); db(0x06); db(0x62); db(0x2a); db(0x50); db(0x43); db(0xfa);
+ db(0x09); db(0x9c); db(0x70); db(0x24); db(0x7a); db(0x00); db(0x4e); db(0xae);
+ db(0xfd); db(0xd8); db(0x4a); db(0x80); db(0x66); db(0x0c); db(0x43); db(0xfa);
+ db(0x09); db(0x8c); db(0x70); db(0x00); db(0x7a); db(0x01); db(0x4e); db(0xae);
+ db(0xfd); db(0xd8); db(0x28); db(0x40); db(0x20); db(0x3c); db(0x00); db(0x00);
+ db(0x02); db(0x2c); db(0x72); db(0x01); db(0x4e); db(0xae); db(0xff); db(0x3a);
+ db(0x26); db(0x40); db(0x27); db(0x4c); db(0x01); db(0x9c); db(0x7c); db(0x00);
+ db(0xbc); db(0xad); db(0x01); db(0x0c); db(0x64); db(0x24); db(0x2f); db(0x06);
+ db(0x7e); db(0x01); db(0x2f); db(0x0b); db(0x20); db(0x4b); db(0x61); db(0x00);
+ db(0x03); db(0x28); db(0x26); db(0x5f); db(0x0c); db(0x80); db(0xff); db(0xff);
+ db(0xff); db(0xfe); db(0x67); db(0x08); db(0x48); db(0x46); db(0x52); db(0x46);
+ db(0x48); db(0x46); db(0x60); db(0xe4); db(0x2c); db(0x1f); db(0x52); db(0x46);
+ db(0x60); db(0xd6); db(0x2c); db(0x78); db(0x00); db(0x04); db(0x22); db(0x4c);
+ db(0x4e); db(0xae); db(0xfe); db(0x62); db(0x30); db(0x3c); db(0xff); db(0x80);
+ db(0x61); db(0x00); db(0x05); db(0xf2); db(0x4e); db(0x90); db(0x72); db(0x03);
+ db(0x74); db(0xf6); db(0x20); db(0x7c); db(0x00); db(0x20); db(0x00); db(0x00);
+ db(0x90); db(0x88); db(0x65); db(0x0a); db(0x67); db(0x08); db(0x78); db(0x00);
+ db(0x22); db(0x44); db(0x4e); db(0xae); db(0xfd); db(0x96); db(0x4c); db(0xdf);
+ db(0x7f); db(0xff); db(0x4e); db(0x75); db(0x48); db(0xe7); db(0x00); db(0x20);
+ db(0x30); db(0x3c); db(0xff); db(0x50); db(0x61); db(0x00); db(0x05); db(0xc6);
+ db(0x70); db(0x00); db(0x4e); db(0x90); db(0x4a); db(0x80); db(0x67); db(0x00);
+ db(0x00); db(0xa0); db(0x2c); db(0x78); db(0x00); db(0x04); db(0x30); db(0x3c);
+ db(0xff); db(0x50); db(0x61); db(0x00); db(0x05); db(0xb0); db(0x70); db(0x02);
+ db(0x4e); db(0x90); db(0x0c); db(0x40); db(0x00); db(0x01); db(0x6d); db(0x7a);
+ db(0x6e); db(0x06); db(0x4e); db(0xae); db(0xfe); db(0x92); db(0x60); db(0xe6);
+ db(0x0c); db(0x40); db(0x00); db(0x02); db(0x6e); db(0x08); db(0x20); db(0x01);
+ db(0x4e); db(0xae); db(0xfe); db(0xbc); db(0x60); db(0xd8); db(0x0c); db(0x40);
+ db(0x00); db(0x03); db(0x6e); db(0x06); db(0x4e); db(0xae); db(0xfe); db(0x86);
+ db(0x60); db(0xcc); db(0x0c); db(0x40); db(0x00); db(0x04); db(0x6e); db(0x06);
+ db(0x4e); db(0xae); db(0xff); db(0x4c); db(0x60); db(0xc0); db(0x0c); db(0x40);
+ db(0x00); db(0x05); db(0x6e); db(0x46); db(0x48); db(0xe7); db(0x00); db(0xc0);
+ db(0x70); db(0x26); db(0x22); db(0x3c); db(0x00); db(0x01); db(0x00); db(0x01);
+ db(0x4e); db(0xae); db(0xff); db(0x3a); db(0x4c); db(0xdf); db(0x03); db(0x00);
+ db(0x24); db(0x40); db(0x15); db(0x7c); db(0x00); db(0x08); db(0x00); db(0x08);
+ db(0x25); db(0x48); db(0x00); db(0x0e); db(0x35); db(0x7c); db(0x00); db(0x26);
+ db(0x00); db(0x12); db(0x25); db(0x7c); db(0x40); db(0x00); db(0x00); db(0x00);
+ db(0x00); db(0x14); db(0x35); db(0x7c); db(0x12); db(0x34); db(0x00); db(0x18);
+ db(0x25); db(0x49); db(0x00); db(0x1a); db(0x20); db(0x69); db(0x00); db(0x10);
+ db(0x22); db(0x4a); db(0x4e); db(0xae); db(0xfe); db(0x92); db(0x60); db(0x00);
+ db(0xff); db(0x76); db(0x30); db(0x3c); db(0xff); db(0x50); db(0x61); db(0x00);
+ db(0x05); db(0x24); db(0x70); db(0x04); db(0x4e); db(0x90); db(0x70); db(0x01);
+ db(0x4c); db(0xdf); db(0x04); db(0x00); db(0x4e); db(0x75); db(0x48); db(0xe7);
+ db(0xc0); db(0xc0); db(0x70); db(0x1a); db(0x22); db(0x3c); db(0x00); db(0x01);
+ db(0x00); db(0x01); db(0x4e); db(0xae); db(0xff); db(0x3a); db(0x22); db(0x40);
+ db(0x41); db(0xfa); db(0x08); db(0x15); db(0x23); db(0x48); db(0x00); db(0x0a);
+ db(0x41); db(0xfa); db(0xff); db(0x2a); db(0x23); db(0x48); db(0x00); db(0x0e);
+ db(0x41); db(0xfa); db(0xff); db(0x22); db(0x23); db(0x48); db(0x00); db(0x12);
+ db(0x33); db(0x7c); db(0x02); db(0x14); db(0x00); db(0x08); db(0x70); db(0x03);
+ db(0x4e); db(0xae); db(0xff); db(0x58); db(0x4c); db(0xdf); db(0x03); db(0x03);
+ db(0x4e); db(0x75); db(0x48); db(0xe7); db(0xc0); db(0xf2); db(0x2c); db(0x78);
+ db(0x00); db(0x04); db(0x24); db(0x48); db(0x26); db(0x49); db(0x20); db(0x3c);
+ db(0x00); db(0x00); db(0x00); db(0xbe); db(0x22); db(0x3c); db(0x00); db(0x01);
+ db(0x00); db(0x01); db(0x4e); db(0xae); db(0xff); db(0x3a); db(0x20); db(0x40);
+ db(0x70); db(0x00); db(0x43); db(0xeb); db(0x01); db(0xa0); db(0x11); db(0xb1);
+ db(0x00); db(0x00); db(0x00); db(0x0e); db(0x52); db(0x40); db(0x0c); db(0x40);
+ db(0x00); db(0x8c); db(0x66); db(0xf2); db(0x20); db(0x0a); db(0xe4); db(0x88);
+ db(0x21); db(0x40); db(0x00); db(0x36); db(0x22); db(0x48); db(0x41); db(0xfa);
+ db(0x07); db(0xaf); db(0x23); db(0x48); db(0x00); db(0x0a); db(0x20); db(0x6b);
+ db(0x01); db(0x98); db(0x41); db(0xe8); db(0x00); db(0x12); db(0x4e); db(0xae);
+ db(0xff); db(0x10); db(0x4c); db(0xdf); db(0x4f); db(0x03); db(0x4e); db(0x75);
+ db(0x48); db(0xe7); db(0x7f); db(0x7e); db(0x2c); db(0x78); db(0x00); db(0x04);
+ db(0x24); db(0x48); db(0x0c); db(0x9a); db(0x00); db(0x00); db(0x03); db(0xf3);
+ db(0x66); db(0x00); db(0x00); db(0xec); db(0x50); db(0x8a); db(0x2e); db(0x2a);
+ db(0x00); db(0x04); db(0x9e); db(0x92); db(0x50); db(0x8a); db(0x52); db(0x87);
+ db(0x26); db(0x4a); db(0x20); db(0x07); db(0xd0); db(0x80); db(0xd0); db(0x80);
+ db(0xd7); db(0xc0); db(0x28); db(0x4a); db(0x9b); db(0xcd); db(0x7c); db(0x00);
+ db(0x24); db(0x12); db(0xe5); db(0x8a); db(0x72); db(0x01); db(0x08); db(0x03);
+ db(0x00); db(0x1e); db(0x67); db(0x04); db(0x08); db(0xc1); db(0x00); db(0x01);
+ db(0x08); db(0xc1); db(0x00); db(0x10); db(0x08); db(0x83); db(0x00); db(0x1f);
+ db(0x08); db(0x83); db(0x00); db(0x1e); db(0x20); db(0x02); db(0x66); db(0x04);
+ db(0x42); db(0x9a); db(0x60); db(0x1e); db(0x50); db(0x80); db(0x4e); db(0xae);
+ db(0xff); db(0x3a); db(0x4a); db(0x80); db(0x67); db(0x00); db(0x00); db(0xa0);
+ db(0x20); db(0x40); db(0x20); db(0xc2); db(0x24); db(0xc8); db(0x22); db(0x0d);
+ db(0x67); db(0x06); db(0x20); db(0x08); db(0xe4); db(0x88); db(0x2a); db(0x80);
+ db(0x2a); db(0x48); db(0x52); db(0x86); db(0xbe); db(0x86); db(0x66); db(0xb8);
+ db(0x7c); db(0x00); db(0x22); db(0x06); db(0xd2); db(0x81); db(0xd2); db(0x81);
+ db(0x20); db(0x74); db(0x18); db(0x00); db(0x58); db(0x88); db(0x26); db(0x1b);
+ db(0x28); db(0x1b); db(0xe5); db(0x8c); db(0x0c); db(0x83); db(0x00); db(0x00);
+ db(0x03); db(0xe9); db(0x67); db(0x08); db(0x0c); db(0x83); db(0x00); db(0x00);
+ db(0x03); db(0xea); db(0x66); db(0x0c); db(0x20); db(0x04); db(0x4a); db(0x80);
+ db(0x67); db(0x0e); db(0x10); db(0xdb); db(0x53); db(0x80); db(0x60); db(0xf6);
+ db(0x0c); db(0x83); db(0x00); db(0x00); db(0x03); db(0xeb); db(0x66); db(0x4e);
+ db(0x26); db(0x1b); db(0x0c); db(0x83); db(0x00); db(0x00); db(0x03); db(0xec);
+ db(0x66); db(0x28); db(0x22); db(0x06); db(0xd2); db(0x81); db(0xd2); db(0x81);
+ db(0x20); db(0x74); db(0x18); db(0x00); db(0x58); db(0x88); db(0x20); db(0x1b);
+ db(0x67); db(0xe6); db(0x22); db(0x1b); db(0xd2); db(0x81); db(0xd2); db(0x81);
+ db(0x26); db(0x34); db(0x18); db(0x00); db(0x58); db(0x83); db(0x24); db(0x1b);
+ db(0xd7); db(0xb0); db(0x28); db(0x00); db(0x53); db(0x80); db(0x66); db(0xf6);
+ db(0x60); db(0xe4); db(0x0c); db(0x83); db(0x00); db(0x00); db(0x03); db(0xf2);
+ db(0x66); db(0x14); db(0x52); db(0x86); db(0xbe); db(0x86); db(0x66); db(0x00);
+ db(0xff); db(0x8a); db(0x7e); db(0x01); db(0x20); db(0x54); db(0x20); db(0x07);
+ db(0x4c); db(0xdf); db(0x7e); db(0xfe); db(0x4e); db(0x75); db(0x30); db(0x3c);
+ db(0x75); db(0x30); db(0x33); db(0xfc); db(0x0f); db(0x00); db(0x00); db(0xdf);
+ db(0xf1); db(0x80); db(0x33); db(0xfc); db(0x00); db(0x0f); db(0x00); db(0xdf);
+ db(0xf1); db(0x80); db(0x33); db(0xfc); db(0x00); db(0xf0); db(0x00); db(0xdf);
+ db(0xf1); db(0x80); db(0x51); db(0xc8); db(0xff); db(0xe6); db(0x7e); db(0x00);
+ db(0x60); db(0xd4); db(0x48); db(0xe7); db(0x40); db(0xe2); db(0x2c); db(0x78);
+ db(0x00); db(0x04); db(0x41); db(0xee); db(0x01); db(0x50); db(0x4a); db(0x90);
+ db(0x67); db(0x1a); db(0x22); db(0x68); db(0x00); db(0x0a); db(0x45); db(0xfa);
+ db(0x06); db(0x9e); db(0x10); db(0x19); db(0x12); db(0x1a); db(0xb0); db(0x01);
+ db(0x66); db(0x06); db(0x4a); db(0x00); db(0x67); db(0x42); db(0x60); db(0xf2);
+ db(0x20); db(0x50); db(0x60); db(0xe2); db(0x70); db(0x20); db(0x22); db(0x3c);
+ db(0x00); db(0x01); db(0x00); db(0x01); db(0x4e); db(0xae); db(0xff); db(0x3a);
+ db(0x24); db(0x40); db(0x15); db(0x7c); db(0x00); db(0x08); db(0x00); db(0x08);
+ db(0x41); db(0xfa); db(0x06); db(0x74); db(0x25); db(0x48); db(0x00); db(0x0a);
+ db(0x41); db(0xfa); db(0x06); db(0x2d); db(0x25); db(0x48); db(0x00); db(0x0e);
+ db(0x41); db(0xea); db(0x00); db(0x12); db(0x20); db(0x88); db(0x58); db(0x90);
+ db(0x21); db(0x48); db(0x00); db(0x08); db(0x41); db(0xee); db(0x01); db(0x50);
+ db(0x22); db(0x4a); db(0x4e); db(0xae); db(0xff); db(0x0a); db(0x20); db(0x4a);
+ db(0x20); db(0x08); db(0x4c); db(0xdf); db(0x47); db(0x02); db(0x4e); db(0x75);
+ db(0x61); db(0x00); db(0xff); db(0x90); db(0x21); db(0x40); db(0x01); db(0x98);
+ db(0x2f); db(0x08); db(0x30); db(0x3c); db(0xff); db(0xfc); db(0x61); db(0x00);
+ db(0x02); db(0xe4); db(0x2a); db(0x50); db(0x30); db(0x3c); db(0xff); db(0x28);
+ db(0x61); db(0x00); db(0x02); db(0xda); db(0x22); db(0x48); db(0x20); db(0x5f);
+ db(0x42); db(0xa8); db(0x01); db(0x90); db(0x42); db(0xa8); db(0x01); db(0x94);
+ db(0x4e); db(0x91); db(0x26); db(0x00); db(0x0c); db(0x83); db(0xff); db(0xff);
+ db(0xff); db(0xfe); db(0x67); db(0x00); db(0xfc); db(0xee); db(0x0c); db(0x83);
+ db(0x00); db(0x00); db(0x00); db(0x02); db(0x67); db(0x0c); db(0xc0); db(0x85);
+ db(0x67); db(0x08); db(0x4a); db(0xa8); db(0x01); db(0x90); db(0x67); db(0x00);
+ db(0xfc); db(0xda); db(0x20); db(0x28); db(0x01); db(0x90); db(0x67); db(0x12);
+ db(0x2f); db(0x08); db(0x72); db(0x01); db(0x2c); db(0x78); db(0x00); db(0x04);
+ db(0x4e); db(0xae); db(0xff); db(0x3a); db(0x20); db(0x5f); db(0x21); db(0x40);
+ db(0x01); db(0x94); db(0x4a); db(0x83); db(0x6a); db(0x10); db(0x22); db(0x48);
+ db(0x30); db(0x3c); db(0xff); db(0x20); db(0x61); db(0x00); db(0x02); db(0x86);
+ db(0x4e); db(0x90); db(0x60); db(0x00); db(0x00); db(0x28); db(0x2c); db(0x4c);
+ db(0x2f); db(0x08); db(0x4e); db(0xae); db(0xff); db(0x70); db(0x20); db(0x5f);
+ db(0x22); db(0x48); db(0x26); db(0x40); db(0x30); db(0x3c); db(0xff); db(0x20);
+ db(0x61); db(0x00); db(0x02); db(0x6a); db(0x4e); db(0x90); db(0x70); db(0x00);
+ db(0x27); db(0x40); db(0x00); db(0x08); db(0x27); db(0x40); db(0x00); db(0x10);
+ db(0x27); db(0x40); db(0x00); db(0x20); db(0x4a); db(0xa9); db(0x01); db(0x94);
+ db(0x67); db(0x28); db(0x20); db(0x69); db(0x01); db(0x94); db(0x61); db(0x00);
+ db(0xfd); db(0xc8); db(0x48); db(0xe7); db(0x80); db(0xc0); db(0x20); db(0x29);
+ db(0x01); db(0x90); db(0x22); db(0x69); db(0x01); db(0x94); db(0x2c); db(0x78);
+ db(0x00); db(0x04); db(0x4e); db(0xae); db(0xff); db(0x2e); db(0x4c); db(0xdf);
+ db(0x03); db(0x01); db(0x4a); db(0x80); db(0x67); db(0x04); db(0x61); db(0x00);
+ db(0xfd); db(0x52); db(0x4a); db(0x83); db(0x6b); db(0x00); db(0xfc); db(0x54);
+ db(0x30); db(0x3c); db(0xff); db(0x18); db(0x61); db(0x00); db(0x02); db(0x1e);
+ db(0x4e); db(0x90); db(0x20); db(0x03); db(0x16); db(0x29); db(0x00); db(0x4f);
+ db(0x4a); db(0x80); db(0x66); db(0x1a); db(0x27); db(0x7c); db(0x00); db(0x00);
+ db(0x0f); db(0xa0); db(0x00); db(0x14); db(0x43); db(0xfa); db(0xfb); db(0x5e);
+ db(0x20); db(0x09); db(0xe4); db(0x88); db(0x27); db(0x40); db(0x00); db(0x20);
+ db(0x70); db(0xff); db(0x27); db(0x40); db(0x00); db(0x24); db(0x4a); db(0x87);
+ db(0x67); db(0x36); db(0x2c); db(0x78); db(0x00); db(0x04); db(0x70); db(0x14);
+ db(0x72); db(0x00); db(0x4e); db(0xae); db(0xff); db(0x3a); db(0x22); db(0x40);
+ db(0x70); db(0x00); db(0x22); db(0x80); db(0x23); db(0x40); db(0x00); db(0x04);
+ db(0x33); db(0x40); db(0x00); db(0x0e); db(0x30); db(0x3c); db(0x10); db(0x00);
+ db(0x80); db(0x03); db(0x33); db(0x40); db(0x00); db(0x08); db(0x23); db(0x6d);
+ db(0x01); db(0x04); db(0x00); db(0x0a); db(0x23); db(0x4b); db(0x00); db(0x10);
+ db(0x41); db(0xec); db(0x00); db(0x4a); db(0x4e); db(0xee); db(0xfe); db(0xf2);
+ db(0x20); db(0x4b); db(0x72); db(0x00); db(0x22); db(0x41); db(0x70); db(0xff);
+ db(0x2c); db(0x4c); db(0x4e); db(0xee); db(0xff); db(0x6a); db(0x2c); db(0x78);
+ db(0x00); db(0x04); db(0x70); db(0x00); db(0x22); db(0x40); db(0x4e); db(0xae);
+ db(0xfe); db(0xda); db(0x20); db(0x40); db(0x4b); db(0xe8); db(0x00); db(0x5c);
+ db(0x43); db(0xfa); db(0x04); db(0xbc); db(0x70); db(0x00); db(0x4e); db(0xae);
+ db(0xfd); db(0xd8); db(0x24); db(0x40); db(0x20); db(0x3c); db(0x00); db(0x00);
+ db(0x00); db(0x9e); db(0x22); db(0x3c); db(0x00); db(0x01); db(0x00); db(0x01);
+ db(0x4e); db(0xae); db(0xff); db(0x3a); db(0x26); db(0x40); db(0x7c); db(0x00);
+ db(0x26); db(0x86); db(0x27); db(0x46); db(0x00); db(0x04); db(0x27); db(0x46);
+ db(0x00); db(0x08); db(0x7a); db(0x00); db(0x20); db(0x4d); db(0x4e); db(0xae);
+ db(0xfe); db(0x80); db(0x20); db(0x4d); db(0x4e); db(0xae); db(0xfe); db(0x8c);
+ db(0x28); db(0x40); db(0x26); db(0x2c); db(0x00); db(0x0a); db(0x30); db(0x3c);
+ db(0xff); db(0x40); db(0x61); db(0x00); db(0x01); db(0x58); db(0x70); db(0x00);
+ db(0x4e); db(0x90); db(0x61); db(0x00); db(0x02); db(0x88); db(0x60); db(0x00);
+ db(0x00); db(0xd8); db(0x61); db(0x00); db(0x02); db(0x80); db(0x20); db(0x4d);
+ db(0x4e); db(0xae); db(0xfe); db(0x80); db(0x20); db(0x4d); db(0x4e); db(0xae);
+ db(0xfe); db(0x8c); db(0x28); db(0x40); db(0x0c); db(0x6c); db(0x00); db(0x26);
+ db(0x00); db(0x12); db(0x66); db(0x4a); db(0x0c); db(0xac); db(0x40); db(0x00);
+ db(0x00); db(0x00); db(0x00); db(0x14); db(0x66); db(0x40); db(0x0c); db(0x6c);
+ db(0x12); db(0x34); db(0x00); db(0x18); db(0x66); db(0x38); db(0x20); db(0x6c);
+ db(0x00); db(0x1a); db(0x20); db(0x28); db(0x00); db(0x0c); db(0x02); db(0x80);
+ db(0x80); db(0x00); db(0x00); db(0x08); db(0x0c); db(0x80); db(0x80); db(0x00);
+ db(0x00); db(0x08); db(0x66); db(0x18); db(0x02); db(0xa8); db(0x7f); db(0xff);
+ db(0xff); db(0xff); db(0x00); db(0x0c); db(0x20); db(0x68); db(0x00); db(0x10);
+ db(0x22); db(0x4c); db(0x12); db(0xbc); db(0x00); db(0x08); db(0x4e); db(0xae);
+ db(0xfe); db(0x92); db(0x60); db(0xa6); db(0x22); db(0x4c); db(0x70); db(0x26);
+ db(0x4e); db(0xae); db(0xff); db(0x2e); db(0x60); db(0x9c); db(0x26); db(0x2c);
+ db(0x00); db(0x0a); db(0x66); db(0x3c); db(0x30); db(0x3c); db(0xff); db(0x50);
+ db(0x61); db(0x00); db(0x00); db(0xda); db(0x70); db(0x01); db(0x4e); db(0x90);
+ db(0x45); db(0xeb); db(0x00); db(0x04); db(0x20); db(0x52); db(0x20); db(0x08);
+ db(0x67); db(0x80); db(0x22); db(0x50); db(0x20); db(0x40); db(0x20); db(0x28);
+ db(0x00); db(0x04); db(0x6a); db(0x16); db(0x48); db(0xe7); db(0x00); db(0xc0);
+ db(0x28); db(0x68); db(0x00); db(0x0a); db(0x61); db(0x4a); db(0x53); db(0x85);
+ db(0x4c); db(0xdf); db(0x03); db(0x00); db(0x24); db(0x89); db(0x20); db(0x49);
+ db(0x60); db(0xdc); db(0x24); db(0x48); db(0x20); db(0x49); db(0x60); db(0xd6);
+ db(0x0c); db(0x85); db(0x00); db(0x00); db(0x00); db(0x14); db(0x65); db(0x00);
+ db(0x00); db(0x0a); db(0x70); db(0x01); db(0x29); db(0x40); db(0x00); db(0x04);
+ db(0x60); db(0x12); db(0x61); db(0x32); db(0x30); db(0x3c); db(0xff); db(0x30);
+ db(0x61); db(0x00); db(0x00); db(0x8a); db(0x4e); db(0x90); db(0x4a); db(0x80);
+ db(0x67); db(0x0e); db(0x52); db(0x85); db(0x28); db(0xab); db(0x00); db(0x04);
+ db(0x27); db(0x4c); db(0x00); db(0x04); db(0x60); db(0x00); db(0xff); db(0x2c);
+ db(0x28); db(0x43); db(0x61); db(0x04); db(0x60); db(0x00); db(0xff); db(0x24);
+ db(0x22); db(0x54); db(0x20); db(0x6c); db(0x00); db(0x04); db(0x29); db(0x4d);
+ db(0x00); db(0x04); db(0x4e); db(0xee); db(0xfe); db(0x92); db(0x2f); db(0x05);
+ db(0x7a); db(0xfc); db(0x24); db(0x53); db(0x2e); db(0x0a); db(0x22); db(0x0a);
+ db(0x67); db(0x00); db(0x00); db(0x0c); db(0x52); db(0x85); db(0x67); db(0x1e);
+ db(0x22); db(0x4a); db(0x24); db(0x52); db(0x60); db(0xf0); db(0x52); db(0x85);
+ db(0x67); db(0x3c); db(0x24); db(0x47); db(0x70); db(0x18); db(0x72); db(0x01);
+ db(0x4e); db(0xae); db(0xff); db(0x3a); db(0x52); db(0x46); db(0x24); db(0x40);
+ db(0x24); db(0x87); db(0x2e); db(0x0a); db(0x60); db(0xe8); db(0x20); db(0x12);
+ db(0x67); db(0x24); db(0x20); db(0x40); db(0x20); db(0x10); db(0x67); db(0x1e);
+ db(0x20); db(0x40); db(0x20); db(0x10); db(0x67); db(0x18); db(0x70); db(0x00);
+ db(0x22); db(0x80); db(0x22); db(0x4a); db(0x24); db(0x51); db(0x70); db(0x18);
+ db(0x4e); db(0xae); db(0xff); db(0x2e); db(0x06); db(0x86); db(0x00); db(0x01);
+ db(0x00); db(0x00); db(0x20); db(0x0a); db(0x66); db(0xec); db(0x26); db(0x87);
+ db(0x2a); db(0x1f); db(0x4e); db(0x75); db(0x41); db(0xfa); db(0xf9); db(0x4e);
+ db(0x02); db(0x80); db(0x00); db(0x00); db(0xff); db(0xff); db(0xd1); db(0xc0);
+ db(0x4e); db(0x75); db(0x00); db(0x00); db(0x0c); db(0xaf); db(0x00); db(0x00);
+ db(0x00); db(0x22); db(0x00); db(0x08); db(0x66); db(0x30); db(0x48); db(0xe7);
+ db(0xc0); db(0xe2); db(0x2c); db(0x78); db(0x00); db(0x04); db(0x93); db(0xc9);
+ db(0x4e); db(0xae); db(0xfe); db(0xda); db(0x24); db(0x40); db(0x22); db(0x4a);
+ db(0x70); db(0xec); db(0x4e); db(0xae); db(0xfe); db(0xd4); db(0x41); db(0xfa);
+ db(0xff); db(0xda); db(0x32); db(0x10); db(0xb2); db(0x50); db(0x67); db(0xfc);
+ db(0x22); db(0x4a); db(0x4e); db(0xae); db(0xfe); db(0xd4); db(0x72); db(0x01);
+ db(0x4c); db(0xdf); db(0x47); db(0x03); db(0x58); db(0x8f); db(0x4e); db(0x75);
+ db(0x20); db(0x88); db(0x58); db(0x90); db(0x42); db(0xa8); db(0x00); db(0x04);
+ db(0x21); db(0x48); db(0x00); db(0x08); db(0x4e); db(0x75); db(0x48); db(0xe7);
+ db(0x20); db(0x22); db(0x2c); db(0x79); db(0x00); db(0x00); db(0x00); db(0x04);
+ db(0x70); db(0xff); db(0x4e); db(0xae); db(0xfe); db(0xb6); db(0x91); db(0xc8);
+ db(0x24); db(0x00); db(0x6b); db(0x32); db(0x70); db(0x22); db(0x22); db(0x3c);
+ db(0x00); db(0x01); db(0x00); db(0x01); db(0x4e); db(0xae); db(0xff); db(0x3a);
+ db(0x91); db(0xc8); db(0x24); db(0x40); db(0x4a); db(0x80); db(0x67); db(0x1e);
+ db(0x15); db(0x7c); db(0x00); db(0x04); db(0x00); db(0x08); db(0x15); db(0x42);
+ db(0x00); db(0x0f); db(0x93); db(0xc9); db(0x4e); db(0xae); db(0xfe); db(0xda);
+ db(0x25); db(0x40); db(0x00); db(0x10); db(0x41); db(0xea); db(0x00); db(0x14);
+ db(0x61); db(0x00); db(0xff); db(0xae); db(0x20); db(0x4a); db(0x20); db(0x08);
+ db(0x4c); db(0xdf); db(0x44); db(0x04); db(0x4e); db(0x75); db(0x48); db(0xe7);
+ db(0x20); db(0x22); db(0x2c); db(0x79); db(0x00); db(0x00); db(0x00); db(0x04);
+ db(0x4a); db(0x80); db(0x67); db(0x20); db(0x24); db(0x40); db(0x74); db(0x30);
+ db(0x20); db(0x02); db(0x22); db(0x3c); db(0x00); db(0x01); db(0x00); db(0x01);
+ db(0x4e); db(0xae); db(0xff); db(0x3a); db(0x20); db(0x40); db(0x11); db(0x7c);
+ db(0x00); db(0x0a); db(0x00); db(0x08); db(0x21); db(0x42); db(0x00); db(0x12);
+ db(0x21); db(0x4a); db(0x00); db(0x0e); db(0x4c); db(0xdf); db(0x44); db(0x04);
+ db(0x4e); db(0x75); db(0x48); db(0xe7); db(0x30); db(0x32); db(0x2c); db(0x79);
+ db(0x00); db(0x00); db(0x00); db(0x04); db(0x24); db(0x08); db(0x26); db(0x09);
+ db(0x20); db(0x3c); db(0x00); db(0x00); db(0x08); db(0x5c); db(0x22); db(0x3c);
+ db(0x00); db(0x01); db(0x00); db(0x01); db(0x4e); db(0xae); db(0xff); db(0x3a);
+ db(0x4a); db(0x80); db(0x67); db(0x00); db(0x00); db(0x2c); db(0x24); db(0x40);
+ db(0x15); db(0x7c); db(0x00); db(0x01); db(0x00); db(0x08); db(0x25); db(0x42);
+ db(0x00); db(0x0a); db(0x47); db(0xea); db(0x00); db(0x5c); db(0x25); db(0x4b);
+ db(0x00); db(0x3a); db(0x47); db(0xeb); db(0x08); db(0x00); db(0x25); db(0x4b);
+ db(0x00); db(0x3e); db(0x25); db(0x4b); db(0x00); db(0x36); db(0x22); db(0x4a);
+ db(0x24); db(0x43); db(0x97); db(0xcb); db(0x4e); db(0xae); db(0xfe); db(0xe6);
+ db(0x4c); db(0xdf); db(0x4c); db(0x0c); db(0x4e); db(0x75); db(0x00); db(0x00);
+ db(0x00); db(0x00); db(0x00); db(0x00); db(0x2f); db(0x08); db(0x4a); db(0x2b);
+ db(0x00); db(0x9d); db(0x66); db(0x18); db(0x41); db(0xfa); db(0xff); db(0xf0);
+ db(0x4a); db(0x50); db(0x67); db(0x10); db(0x41); db(0xfa); db(0x01); db(0xba);
+ db(0x43); db(0xfa); db(0x00); db(0x0e); db(0x61); db(0x00); db(0xff); db(0x8c);
+ db(0x50); db(0xeb); db(0x00); db(0x9d); db(0x20); db(0x5f); db(0x4e); db(0x75);
+ db(0x2c); db(0x79); db(0x00); db(0x00); db(0x00); db(0x04); db(0x70); db(0xff);
+ db(0x4e); db(0xae); db(0xfe); db(0xb6); db(0x74); db(0x00); db(0x01); db(0xc2);
+ db(0x93); db(0xc9); db(0x4e); db(0xae); db(0xfe); db(0xda); db(0x28); db(0x40);
+ db(0x70); db(0x14); db(0x22); db(0x4a); db(0x4e); db(0xae); db(0xfe); db(0xd4);
+ db(0x70); db(0x00); db(0x43); db(0xfa); db(0x01); db(0xae); db(0x4e); db(0xae);
+ db(0xfd); db(0xd8); db(0x2e); db(0x00); db(0x70); db(0x00); db(0x30); db(0x3c);
+ db(0x00); db(0x44); db(0x22); db(0x3c); db(0x00); db(0x01); db(0x00); db(0x01);
+ db(0x4e); db(0xae); db(0xff); db(0x3a); db(0x2a); db(0x40); db(0x61); db(0x00);
+ db(0xfe); db(0xbe); db(0x61); db(0x00); db(0xff); db(0x0a); db(0x2b); db(0x40);
+ db(0x00); db(0x3c); db(0x67); db(0x00); db(0x00); db(0x7a); db(0x22); db(0x40);
+ db(0x41); db(0xfa); db(0x01); db(0x3c); db(0x70); db(0x00); db(0x72); db(0x00);
+ db(0x4e); db(0xae); db(0xfe); db(0x44); db(0x4a); db(0x80); db(0x66); db(0x00);
+ db(0x00); db(0x66); db(0x61); db(0x00); db(0xfe); db(0x9a); db(0x61); db(0x00);
+ db(0xfe); db(0xe6); db(0x2b); db(0x40); db(0x00); db(0x40); db(0x67); db(0x00);
+ db(0x00); db(0x56); db(0x22); db(0x40); db(0x41); db(0xfa); db(0x01); db(0x25);
+ db(0x70); db(0x00); db(0x72); db(0x00); db(0x4e); db(0xae); db(0xfe); db(0x44);
+ db(0x4a); db(0x80); db(0x66); db(0x00); db(0x00); db(0x42); db(0x47); db(0xed);
+ db(0x00); db(0x16); db(0x27); db(0x4c); db(0x00); db(0x0c); db(0x27); db(0x42);
+ db(0x00); db(0x08); db(0x70); db(0xff); db(0x26); db(0x80); db(0x27); db(0x40);
+ db(0x00); db(0x04); db(0x43); db(0xed); db(0x00); db(0x00); db(0x13); db(0x7c);
+ db(0x00); db(0x02); db(0x00); db(0x08); db(0x13); db(0x7c); db(0x00); db(0x05);
+ db(0x00); db(0x09); db(0x41); db(0xfa); db(0x00); db(0xfc); db(0x23); db(0x48);
+ db(0x00); db(0x0a); db(0x41); db(0xfa); db(0x00); db(0xa0); db(0x23); db(0x48);
+ db(0x00); db(0x12); db(0x23); db(0x4b); db(0x00); db(0x0e); db(0x70); db(0x05);
+ db(0x4e); db(0xae); db(0xff); db(0x58); db(0x60); db(0x02); db(0x4e); db(0x75);
+ db(0x20); db(0x02); db(0x4e); db(0xae); db(0xfe); db(0xc2); db(0x22); db(0x6d);
+ db(0x00); db(0x3c); db(0x45); db(0xed); db(0x00); db(0x26); db(0x33); db(0x7c);
+ db(0x00); db(0x0b); db(0x00); db(0x1c); db(0x23); db(0x7c); db(0x00); db(0x00);
+ db(0x00); db(0x16); db(0x00); db(0x24); db(0x23); db(0x4a); db(0x00); db(0x28);
+ db(0x13); db(0x7c); db(0x00); db(0x01); db(0x00); db(0x1e); db(0x15); db(0x7c);
+ db(0x00); db(0x04); db(0x00); db(0x04); db(0x42); db(0x2a); db(0x00); db(0x05);
+ db(0x42); db(0x6a); db(0x00); db(0x06); db(0x42); db(0x6a); db(0x00); db(0x08);
+ db(0x20); db(0x47); db(0x20); db(0x2d); db(0x00); db(0x16); db(0x32); db(0x28);
+ db(0x00); db(0x30); db(0xd2); db(0x41); db(0x90); db(0x41); db(0x35); db(0x40);
+ db(0x00); db(0x0a); db(0x20); db(0x2d); db(0x00); db(0x1a); db(0x32); db(0x28);
+ db(0x00); db(0x2e); db(0xd2); db(0x41); db(0x90); db(0x41); db(0x48); db(0xc0);
+ db(0x35); db(0x40); db(0x00); db(0x0c); db(0x22); db(0x6d); db(0x00); db(0x40);
+ db(0x33); db(0x7c); db(0x00); db(0x0a); db(0x00); db(0x1c); db(0x13); db(0x7c);
+ db(0x00); db(0x01); db(0x00); db(0x1e); db(0x4e); db(0xae); db(0xfe); db(0x38);
+ db(0x22); db(0x6d); db(0x00); db(0x40); db(0x25); db(0x69); db(0x00); db(0x20);
+ db(0x00); db(0x0e); db(0x25); db(0x69); db(0x00); db(0x24); db(0x00); db(0x12);
+ db(0x22); db(0x6d); db(0x00); db(0x3c); db(0x4e); db(0xae); db(0xfe); db(0x38);
+ db(0x60); db(0x00); db(0xff); db(0x76); db(0x30); db(0x3a); db(0xfe); db(0x82);
+ db(0x48); db(0xc0); db(0x32); db(0x3a); db(0xfe); db(0x7e); db(0x48); db(0xc1);
+ db(0xb0); db(0x91); db(0x66); db(0x00); db(0x00); db(0x0a); db(0xb2); db(0xa9);
+ db(0x00); db(0x04); db(0x67); db(0x00); db(0x00); db(0x18); db(0x23); db(0x41);
+ db(0x00); db(0x04); db(0x22); db(0x80); db(0x20); db(0x29); db(0x00); db(0x08);
+ db(0x22); db(0x69); db(0x00); db(0x0c); db(0x2c); db(0x78); db(0x00); db(0x04);
+ db(0x4e); db(0xae); db(0xfe); db(0xbc); db(0x41); db(0xf9); db(0x00); db(0xdf);
+ db(0xf0); db(0x00); db(0x70); db(0x00); db(0x4e); db(0x75); db(0x69); db(0x6e);
+ db(0x70); db(0x75); db(0x74); db(0x2e); db(0x64); db(0x65); db(0x76); db(0x69);
+ db(0x63); db(0x65); db(0x00); db(0x74); db(0x69); db(0x6d); db(0x65); db(0x72);
+ db(0x2e); db(0x64); db(0x65); db(0x76); db(0x69); db(0x63); db(0x65); db(0x00);
+ db(0x55); db(0x41); db(0x45); db(0x20); db(0x6d); db(0x6f); db(0x75); db(0x73);
+ db(0x65); db(0x20); db(0x68); db(0x61); db(0x63); db(0x6b); db(0x00); db(0x55);
+ db(0x41); db(0x45); db(0x20); db(0x66); db(0x69); db(0x6c); db(0x65); db(0x73);
+ db(0x79); db(0x73); db(0x74); db(0x65); db(0x6d); db(0x00); db(0x64); db(0x6f);
+ db(0x73); db(0x2e); db(0x6c); db(0x69); db(0x62); db(0x72); db(0x61); db(0x72);
+ db(0x79); db(0x00); db(0x69); db(0x6e); db(0x74); db(0x75); db(0x69); db(0x74);
+ db(0x69); db(0x6f); db(0x6e); db(0x2e); db(0x6c); db(0x69); db(0x62); db(0x72);
+ db(0x61); db(0x72); db(0x79); db(0x00); db(0x65); db(0x78); db(0x70); db(0x61);
+ db(0x6e); db(0x73); db(0x69); db(0x6f); db(0x6e); db(0x2e); db(0x6c); db(0x69);
+ db(0x62); db(0x72); db(0x61); db(0x72); db(0x79); db(0x00); db(0x46); db(0x69);
+ db(0x6c); db(0x65); db(0x53); db(0x79); db(0x73); db(0x74); db(0x65); db(0x6d);
+ db(0x2e); db(0x72); db(0x65); db(0x73); db(0x6f); db(0x75); db(0x72); db(0x63);
+ db(0x65); db(0x00); db(0x00); db(0x00); db(0x00); db(0x00); db(0x03); db(0xf2);
+
extern int parallel_direct_write_status (uae_u8, uae_u8);
extern int parallel_direct_read_status (uae_u8*);
+extern void CIA_inprec_prepare(void);
/* Set to 1 to leave out the current frame in average frame time calculation.
* Useful if the debugger was active. */
extern int bogusframe;
+extern unsigned long int hsync_counter;
extern uae_u16 dmacon;
extern uae_u16 intena,intreq;
extern const char *debuginfo(int);
extern void record_copper (uaecptr addr, int hpos, int vpos);
extern void record_copper_reset(void);
+extern int snooper(uaecptr);
#else
extern void disk_eject (int num);
extern int disk_empty (int num);
extern void disk_insert (int num, const char *name);
+extern void disk_insert_force (int num, const char *name);
extern void DISK_check_change (void);
extern struct zfile *DISK_validate_filename (const char *, int, int *, uae_u32 *);
extern void DISK_handler (void);
extern void DISK_reset (void);
extern int disk_getwriteprotect (const char *name);
extern int disk_setwriteprotect (int num, const char *name, int protect);
-extern void disk_creatediskfile (char *name, int type, drive_type adftype);
+extern void disk_creatediskfile (char *name, int type, drive_type adftype, char *disk_name);
extern void dumpdisk (void);
extern void DISK_history_add (const char *name, int idx);
extern char *DISK_history_get (int idx);
#define DS_NAME_START "drive_start_"
#define DS_NAME_SNATCH "drive_snatch_"
+extern int driveclick_fdrawcmd_open(int);
+extern void driveclick_fdrawcmd_close(int);
+extern void driveclick_fdrawcmd_detect(void);
+extern void driveclick_fdrawcmd_seek(int, int);
+extern void driveclick_fdrawcmd_motor(int, int);
+extern int driveclick_pcdrivemask, driveclick_pcdrivenum;
\ No newline at end of file
extern void mousehack_set (enum mousestate);
extern int mousehack_get (void);
-extern uae_u32 mousehack_helper (void);
extern void mousehack_handle (int sprctl, int sprpos);
-extern int needmousehack (void);
extern void togglemouse (void);
extern int mousehack_alive (void);
extern int mousehack_allowed (void);
#define JSEM_ISXARCADE2(port,p) (jsem_iskbdjoy(port,p) == JSEM_KBDLAYOUT + 4)
#define JSEM_LASTKBD 5
#define JSEM_ISANYKBD(port,p) (jsem_iskbdjoy(port,p) >= JSEM_KBDLAYOUT && jsem_iskbdjoy(port,p) < JSEM_KBDLAYOUT + JSEM_LASTKBD)
-extern int compatibility_device[2];
extern int jsem_isjoy (int port, struct uae_prefs *p);
extern int jsem_ismouse (int port, struct uae_prefs *p);
extern int jsem_iskbdjoy (int port, struct uae_prefs *p);
+extern void do_fake_joystick(int nr, int *fake);
extern int inputdevice_uaelib (char*, char*);
+
+#define INPREC_JOYPORT 1
+#define INPREC_JOYBUTTON 2
+#define INPREC_KEY 3
+#define INPREC_DISKINSERT 4
+#define INPREC_DISKREMOVE 5
+#define INPREC_END 0xff
+
+extern int input_recording;
+extern void inprec_close(void);
+extern int inprec_open(char*, int);
+extern void inprec_rend(void);
+extern void inprec_rstart(uae_u8, uae_u8);
+extern void inprec_ru8(uae_u8);
+extern void inprec_ru16(uae_u16);
+extern void inprec_ru32(uae_u32);
+extern void inprec_rstr(char*);
+extern int inprec_pstart(uae_u8);
+extern void inprec_pend(void);
+extern uae_u8 inprec_pu8(void);
+extern uae_u16 inprec_pu16(void);
+extern uae_u32 inprec_pu32(void);
+extern int inprec_pstr(char*);
extern int get_next_key (void);
extern int keys_available (void);
extern void record_key (int);
+extern void record_key_direct (int);
extern void keybuf_init (void);
extern void joystick_setting_changed (void);
extern int getcapslockstate (void);
extern uae_u32 get_disp_ea_020 (uae_u32 base, uae_u32 dp);
extern uae_u32 get_disp_ea_000 (uae_u32 base, uae_u32 dp);
-extern uae_s32 ShowEA (void *, uae_u16 opcode, int reg, amodes mode, wordsizes size, char *buf);
-
extern void MakeSR (void);
extern void MakeFromSR (void);
extern void Exception (int, uaecptr);
extern void m68k_go (int);
extern void m68k_dumpstate (void *, uaecptr *);
extern void m68k_disasm (void *, uaecptr, uaecptr *, int);
+extern void m68k_disasm_ea (void *, uaecptr, uaecptr *, int, uaecptr *, uaecptr *);
extern void sm68k_disasm(char *, char *, uaecptr addr, uaecptr *nextpc);
extern void m68k_reset (void);
extern int getDivu68kCycles(uae_u32 dividend, uae_u16 divisor);
*/
#define UAEMAJOR 1
-#define UAEMINOR 2
+#define UAEMINOR 3
#define UAESUBREV 0
typedef enum { KBD_LANG_US, KBD_LANG_DK, KBD_LANG_DE, KBD_LANG_SE, KBD_LANG_FR, KBD_LANG_IT, KBD_LANG_ES } KbdLang;
uae_u32 override_dga_address;
int gfx_display;
- int gfx_framerate;
+ int gfx_framerate, gfx_autoframerate;
int gfx_width_win, gfx_height_win;
int gfx_width_fs, gfx_height_fs;
int gfx_width, gfx_height;
#include "sound.h"
#include "savestate.h"
#include "arcadia.h"
+#include "zfile.h"
+#include "cia.h"
+#include "autoconf.h"
int inputdevice_logging = 0;
static int potgo_logging = 0;
static uae_u8 mouse_settings_reset[MAX_INPUT_SETTINGS][MAX_INPUT_DEVICES];
static uae_u8 joystick_settings_reset[MAX_INPUT_SETTINGS][MAX_INPUT_DEVICES];
+static uae_u8 *inprec_buffer, *inprec_p;
+static struct zfile *inprec_zf;
+static int inprec_size;
+int input_recording = 0;
+static uae_u8 *inprec_plast, *inprec_plastptr;
+
+static uae_u32 oldbuttons[4];
+static uae_u16 oldjoy[2];
+
+int inprec_open(char *fname, int record)
+{
+ uae_u32 t = (uae_u32)time(0);
+
+ inprec_close();
+ inprec_zf = zfile_fopen(fname, record > 0 ? "wb" : "rb");
+ if (inprec_zf == NULL)
+ return 0;
+ inprec_size = 10000;
+ if (record < 0) {
+ uae_u32 id;
+ zfile_fseek (inprec_zf, 0, SEEK_END);
+ inprec_size = zfile_ftell (inprec_zf);
+ zfile_fseek (inprec_zf, 0, SEEK_SET);
+ inprec_buffer = inprec_p = xmalloc (inprec_size);
+ zfile_fread (inprec_buffer, inprec_size, 1, inprec_zf);
+ inprec_plastptr = inprec_buffer;
+ id = inprec_pu32();
+ if (id != 'UAE\0') {
+ inprec_close();
+ return 0;
+ }
+ inprec_pu32();
+ srand(inprec_pu32());
+ inprec_pu32();
+ inprec_p = inprec_plastptr;
+ oldbuttons[0] = oldbuttons[1] = oldbuttons[2] = oldbuttons[3] = 0;
+ oldjoy[0] = oldjoy[1] = 0;
+ } else if (record > 0) {
+ inprec_buffer = inprec_p = xmalloc (inprec_size);
+ inprec_ru32('UAE\0');
+ inprec_ru8(1);
+ inprec_ru8(UAEMAJOR);
+ inprec_ru8(UAEMINOR);
+ inprec_ru8(UAESUBREV);
+ inprec_ru32(t);
+ inprec_ru32(0);
+ } else {
+ return 0;
+ }
+ input_recording = record;
+ CIA_inprec_prepare();
+ write_log ("inprec initialized '%s', mode=%d\n", fname, input_recording);
+ return 1;
+}
+
+void inprec_close(void)
+{
+ if (!inprec_zf)
+ return;
+ if (inprec_buffer && input_recording > 0) {
+ hsync_counter++;
+ inprec_rstart(INPREC_END, 0);
+ hsync_counter--;
+ zfile_fwrite (inprec_buffer, inprec_p - inprec_buffer, 1, inprec_zf);
+ inprec_p = inprec_buffer;
+ }
+ zfile_fclose (inprec_zf);
+ inprec_zf = NULL;
+ xfree (inprec_buffer);
+ inprec_buffer = NULL;
+ input_recording = 0;
+ write_log("inprec finished\n");
+}
+
+void inprec_ru8(uae_u8 v)
+{
+ if (inprec_p >= inprec_buffer + inprec_size) {
+ zfile_fwrite (inprec_buffer, inprec_size, 1, inprec_zf);
+ inprec_p = inprec_buffer;
+ }
+ *inprec_p++= v;
+}
+void inprec_ru16(uae_u16 v)
+{
+ inprec_ru8((uae_u8)(v >> 8));
+ inprec_ru8((uae_u8)v);
+}
+void inprec_ru32(uae_u32 v)
+{
+ inprec_ru16((uae_u16)(v >> 16));
+ inprec_ru16((uae_u16)v);
+}
+void inprec_rstr(char *s)
+{
+ while(*s) {
+ inprec_ru8(*s);
+ s++;
+ }
+ inprec_ru8(0);
+}
+void inprec_rstart(uae_u8 type, uae_u8 size)
+{
+ write_log("INPREC: %08.8X: %d (%d)\n", hsync_counter, type, size);
+ inprec_ru32(hsync_counter);
+ inprec_ru8(0);
+ inprec_ru8(size);
+ inprec_ru8(type);
+}
+void inprec_rend(void)
+{
+}
+
+int inprec_pstart(uae_u8 type)
+{
+ uae_u8 *p = inprec_p;
+ uae_u32 hc = hsync_counter;
+
+ if (savestate_state)
+ return 0;
+ if (p[5 + 1] == INPREC_END) {
+ inprec_close();
+ return 0;
+ }
+ if (input_recording < -1) {
+ hc /= maxvpos;
+ hc *= maxvpos;
+ }
+ for (;;) {
+ uae_u32 hc2 = (p[0] << 24) | (p[1] << 16) | (p[2] << 8) | p[3];
+ if (input_recording < -1) {
+ hc2 /= maxvpos;
+ hc2 *= maxvpos;
+ }
+ if (hc2 != hc)
+ break;
+ if (p[5 + 1] == type) {
+ write_log("INPREC: %08.8x: %d (%d)\n", hc, type, p[5]);
+ inprec_plast = p;
+ inprec_plastptr = p + 5 + 2;
+ return 1;
+ }
+ p += 5 + 2 + p[5];
+ }
+ inprec_plast = NULL;
+ return 0;
+}
+void inprec_pend(void)
+{
+ uae_u8 *p = inprec_p;
+ uae_u32 hc = hsync_counter;
+
+ if (!inprec_plast)
+ return;
+ inprec_plast[5 + 1] = 0;
+ inprec_plast = NULL;
+ inprec_plastptr = NULL;
+ if (input_recording < -1) {
+ hc /= maxvpos;
+ hc *= maxvpos;
+ }
+ for (;;) {
+ uae_u32 hc2 = (p[0] << 24) | (p[1] << 16) | (p[2] << 8) | p[3];
+ if (input_recording < -1) {
+ hc2 /= maxvpos;
+ hc2 *= maxvpos;
+ }
+ if (hc2 != hc)
+ break;
+ if (p[5 + 1] != 0)
+ return;
+ p += 5 + 2 + p[5];
+ }
+ inprec_p = p;
+ if (p[5 + 1] == INPREC_END)
+ inprec_close();
+}
+
+uae_u8 inprec_pu8(void)
+{
+ return *inprec_plastptr++;
+}
+uae_u16 inprec_pu16(void)
+{
+ uae_u16 v = inprec_pu8() << 8;
+ v |= inprec_pu8();
+ return v;
+}
+uae_u32 inprec_pu32(void)
+{
+ uae_u32 v = inprec_pu16() << 16;
+ v |= inprec_pu16();
+ return v;
+}
+int inprec_pstr(char *s)
+{
+ int len = 0;
+ for(;;) {
+ uae_u8 v = inprec_pu8();
+ *s++ = v;
+ if (!v)
+ break;
+ len++;
+ }
+ return len;
+}
+
static int isdevice (struct uae_input_device *id)
{
int i, j;
return ievent_alive > 0;
}
-uae_u32 mousehack_helper (void)
+static void mousehack_enable (void)
+{
+ if (!mousehack_allowed())
+ return;
+ if (rtarea[get_long (RTAREA_BASE + 40) + 12 - 1])
+ return;
+ rtarea[get_long (RTAREA_BASE + 40) + 12 - 1] = 1;
+}
+
+static void mousehack_helper (void)
{
int mousexpos, mouseypos;
+ uae_u8 *p;
+ if (!mousehack_allowed())
+ return;
#ifdef PICASSO96
if (picasso_on) {
mousexpos = lastmx - picasso96_state.XOffset;
} else
#endif
{
- if (mouse_y[0] >= gfxvidinfo.height)
- mouse_y[0] = gfxvidinfo.height - 1;
mouseypos = coord_native_to_amiga_y (lastmy) << 1;
mousexpos = coord_native_to_amiga_x (lastmx);
}
-
- switch (m68k_dreg (regs, 0)) {
- case 0:
- return ievent_alive ? -1 : needmousehack ();
- case 1:
- ievent_alive = 10;
- if (!mousehack_allowed ())
- return 0;
- return mousexpos;
- case 2:
- if (!mousehack_allowed ())
- return 0;
- return mouseypos;
- }
- return 0;
+ if (!mousehack_allowed())
+ mousexpos = mouseypos = 0;
+ p = rtarea + get_long (RTAREA_BASE + 40) + 12;
+ p[0] = mousexpos >> 8;
+ p[1] = mousexpos;
+ p[2] = mouseypos >> 8;
+ p[3] = mouseypos;
}
STATIC_INLINE int adjust (int val)
int getbuttonstate (int joy, int button)
{
- return joybutton[joy] & (1 << button);
+ int v;
+
+ v = (joybutton[joy] & (1 << button)) ? 1 : 0;
+ if (input_recording > 0 && ((joybutton[joy] ^ oldbuttons[joy]) & (1 << button))) {
+ oldbuttons[joy] = joybutton[joy];
+ inprec_rstart(INPREC_JOYBUTTON, 3);
+ inprec_ru8(joy);
+ inprec_ru8(button);
+ inprec_ru8(v);
+ inprec_rend();
+ } else if (input_recording < 0) {
+ while(inprec_pstart (INPREC_JOYBUTTON)) {
+ uae_u8 j = inprec_pu8();
+ uae_u8 but = inprec_pu8();
+ uae_u8 vv = inprec_pu8();
+ inprec_pend();
+ oldbuttons[j] &= ~(1 << but);
+ if (vv)
+ oldbuttons[j] |= 1 << but;
+ }
+ v = (oldbuttons[joy] & (1 << button)) ? 1 : 0;
+ }
+ return v;
}
static void mouseupdate (int pct)
if (notinrom ())
write_log ("JOY%dDAT %04.4X %s\n", joy, v, debuginfo (0));
#endif
+ if (input_recording > 0 && oldjoy[joy] != v) {
+ oldjoy[joy] = v;
+ inprec_rstart(INPREC_JOYPORT, 2);
+ inprec_ru16(v);
+ inprec_rend();
+ } else if (input_recording < 0) {
+ v = oldjoy[joy];
+ if (inprec_pstart (INPREC_JOYPORT)) {
+ v = inprec_pu16();
+ inprec_pend();
+ }
+ oldjoy[joy] = v;
+ }
return v;
}
ievent_alive = 0;
}
+static int switchdevice(struct uae_input_device *id, int num)
+{
+#if 0
+ struct inputevent *ie, *ie2;
+ int i, j, k, event, unit;
+#endif
+
+ if (num >= 4)
+ return 0;
+ return 0;
+ write_log ("switchdev %d\n", num);
+ if (!currprefs.input_selected_setting)
+ return 0;
+
+#if 0
+ id->enabled = 1;
+ for (i = 0; i < MAX_INPUT_DEVICE_EVENTS; i++) {
+ for (j = 0; j < MAX_INPUT_SUB_EVENT; j++) {
+ event = id->eventid[i][j];
+ if (event <= 0)
+ continue;
+ ie = &events[event];
+ if (ie->unit <= 0)
+ continue;
+ unit = ie->unit;
+ k = 1;
+ while (events[k].confname) {
+ ie2 = &events[k];
+ if (ie2->type == ie->type && ie2->data == ie->data && ie2->allow_mask == ie->allow_mask) {
+ id->eventid[i][j] = k;
+ break;
+ }
+ k++;
+ }
+ }
+ }
+#endif
+ return 0;
+}
+
static void setbuttonstateall (struct uae_input_device *id, struct uae_input_device2 *id2, int button, int state)
{
int event, autofire, i;
uae_u32 nmask = (state ? 1 : 0) << button;
char *custom;
+ if (!id->enabled) {
+ if (state)
+ switchdevice(id, button);
+ return;
+ }
if (button >= ID_BUTTON_TOTAL)
return;
for (i = 0; i < MAX_INPUT_SUB_EVENT; i++) {
if (currprefs.input_selected_setting == 0 && cd32_enabled)
cd32_pad_enabled[1] = 1;
#endif
+
+ mousehack_enable();
}
static void set_kbr_default (struct uae_prefs *p, int index, int num)
idev[IDTYPE_JOYSTICK].close ();
idev[IDTYPE_MOUSE].close ();
idev[IDTYPE_KEYBOARD].close ();
+ inprec_close ();
}
static struct uae_input_device *get_uid (struct inputdevice_functions *id, int devnum)
idev[IDTYPE_KEYBOARD].unacquire (i);
}
+static int ignoreoldinput(int joy)
+{
+ if (currprefs.input_selected_setting == 0) {
+ if (jsem_isjoy (0, &currprefs) != joy && jsem_isjoy (1, &currprefs) != joy)
+ return 1;
+ }
+ return 0;
+}
+
+void do_fake_joystick(int nr, int *fake)
+{
+ struct uae_input_device *id1;
+ struct uae_input_device2 *id2;
+ int state, i, axis;
+
+ nr = compatibility_device[nr];
+ id1 = &joysticks[nr];
+ id2 = &joysticks2[nr];
+
+ axis = 0;
+ state = fake[1] ? -100 : (fake[2] ? 100 : 0);
+ for (i = 0; i < MAX_INPUT_SUB_EVENT; i++)
+ handle_input_event (id1->eventid[ID_AXIS_OFFSET + axis][i], state, 100,
+ id1->flags[ID_AXIS_OFFSET + axis][i]);
+ id2->states[axis] = state;
+
+ axis = 1;
+ state = fake[0] ? -100 : (fake[3] ? 100 : 0);
+ for (i = 0; i < MAX_INPUT_SUB_EVENT; i++)
+ handle_input_event (id1->eventid[ID_AXIS_OFFSET + axis][i], state, 100,
+ id1->flags[ID_AXIS_OFFSET + axis][i]);
+ id2->states[axis] = state;
+
+ setbuttonstateall (id1, id2, 0, fake[4] ? 1 : 0);
+ setbuttonstateall (id1, id2, 1, fake[5] ? 1 : 0);
+ setbuttonstateall (id1, id2, 2, fake[6] ? 1 : 0);
+}
+
/* Call this function when host machine's joystick/joypad/etc button state changes
* This function translates button events to Amiga joybutton/joyaxis/keyboard events
*/
void setjoybuttonstate (int joy, int button, int state)
{
- if (!joysticks[joy].enabled)
+ if (ignoreoldinput(joy)) {
+ if (state)
+ switchdevice(&joysticks[joy], button);
return;
+ }
setbuttonstateall (&joysticks[joy], &joysticks2[joy], button, state ? 1 : 0);
}
{
int i;
- if (!joysticks[joy].enabled)
+ if (ignoreoldinput(joy))
return;
for (i = 0; i < ID_BUTTON_TOTAL; i++) {
if (buttonmask & (1 << i))
{
int i;
- if (!mice[mouse].enabled)
- return;
for (i = 0; i < ID_BUTTON_TOTAL; i++) {
if (buttonmask & (1 << i))
setbuttonstateall (&mice[mouse], &mice2[mouse], i, (buttonbits & (1 << i)) ? 1 : 0);
void setmousebuttonstate (int mouse, int button, int state)
{
- if (!mice[mouse].enabled)
- return;
setbuttonstateall (&mice[mouse], &mice2[mouse], button, state);
}
int deadzone = currprefs.input_joymouse_deadzone * max / 100;
int i, v1, v2;
- if (!joysticks[joy].enabled)
- return;
v1 = state;
v2 = id2->states[axis];
if (v1 < deadzone && v1 > -deadzone)
v2 = 0;
if (v1 == v2)
return;
+ if (!joysticks[joy].enabled || ignoreoldinput(joy)) {
+ if (v1)
+ switchdevice(&joysticks[joy], axis * 2 + (v1 < 0 ? 0 : 1));
+ return;
+ }
for (i = 0; i < MAX_INPUT_SUB_EVENT; i++)
handle_input_event (id->eventid[ID_AXIS_OFFSET + axis][i], state, max,
- id->flags[ID_AXIS_OFFSET + axis][i]);
+ id->flags[ID_AXIS_OFFSET + axis][i]);
id2->states[axis] = state;
}
}
for (i = 0; i < MAX_INPUT_SUB_EVENT; i++)
handle_input_event (id->eventid[ID_AXIS_OFFSET + axis][i], v, 0, 0);
+ mousehack_helper();
}
void warpmode (int mode)
static void do_fake (int nr)
{
int *fake = fakestate[nr];
-
- nr = compatibility_device[nr];
- setjoystickstate (nr, 0, fake[1] ? -100 : (fake[2] ? 100 : 0), 100);
- setjoystickstate (nr, 1, fake[0] ? -100 : (fake[3] ? 100 : 0), 100);
- setjoybuttonstate (nr, 0, fake[4]);
- setjoybuttonstate (nr, 1, fake[5]);
- setjoybuttonstate (nr, 2, fake[6]);
+ do_fake_joystick(nr, fake);
}
void record_key (int kc)
+{
+ if (input_recording < 0)
+ return;
+ record_key_direct (kc);
+}
+
+void record_key_direct (int kc)
{
int fs = 0;
int kpb_next = kpb_first + 1;
}
}
+ if (input_recording > 0) {
+ inprec_rstart(INPREC_KEY, 1);
+ inprec_ru8(kc);
+ inprec_rend();
+ }
+
keybuf[kpb_first] = kc;
kpb_first = kpb_next;
}
|| p->chipmem_size < 0x40000
|| p->chipmem_size > 0x800000)
{
+ write_log ("Unsupported chipmem size %x!\n", p->chipmem_size);
p->chipmem_size = 0x200000;
- write_log ("Unsupported chipmem size!\n");
err = 1;
}
if (p->chipmem_size > 0x80000)
if ((p->fastmem_size & (p->fastmem_size - 1)) != 0
|| (p->fastmem_size != 0 && (p->fastmem_size < 0x100000 || p->fastmem_size > 0x800000)))
{
- p->fastmem_size = 0;
- write_log ("Unsupported fastmem size!\n");
+ write_log ("Unsupported fastmem size %x!\n", p->fastmem_size);
err = 1;
}
if ((p->gfxmem_size & (p->gfxmem_size - 1)) != 0
|| (p->gfxmem_size != 0 && (p->gfxmem_size < 0x100000 || p->gfxmem_size > 0x8000000)))
{
- write_log ("Unsupported graphics card memory size %lx!\n", p->gfxmem_size);
+ write_log ("Unsupported graphics card memory size %x!\n", p->gfxmem_size);
p->gfxmem_size = 0;
err = 1;
}
#define get_iword_1(o) get_word(regs.pc + (regs.pc_p - regs.pc_oldp) + (o))
#define get_ilong_1(o) get_long(regs.pc + (regs.pc_p - regs.pc_oldp) + (o))
-uae_s32 ShowEA (void *f, uae_u16 opcode, int reg, amodes mode, wordsizes size, char *buf)
+static uae_s32 ShowEA (void *f, uae_u16 opcode, int reg, amodes mode, wordsizes size, char *buf, uae_u32 *eaddr, int safemode)
{
uae_u16 dp;
uae_s8 disp8;
uae_s16 disp16;
int r;
uae_u32 dispreg;
- uaecptr addr;
+ uaecptr addr = 0;
uae_s32 offset = 0;
char buffer[80];
break;
case Aind:
sprintf (buffer,"(A%d)", reg);
+ addr = regs.regs[reg + 8];
break;
case Aipi:
sprintf (buffer,"(A%d)+", reg);
+ addr = regs.regs[reg + 8];
break;
case Apdi:
sprintf (buffer,"-(A%d)", reg);
+ addr = regs.regs[reg + 8];
break;
case Ad16:
{
if ((dp & 0x3) == 0x3) { outer = get_ilong_1 (m68kpc_offset); m68kpc_offset += 4; }
if (!(dp & 4)) base += dispreg;
- if (dp & 3) base = get_long (base);
+ if ((dp & 3) && !safemode) base = get_long (base);
if (dp & 4) base += dispreg;
addr = base + outer;
if ((dp & 0x3) == 0x3) { outer = get_ilong_1 (m68kpc_offset); m68kpc_offset += 4; }
if (!(dp & 4)) base += dispreg;
- if (dp & 3) base = get_long (base);
+ if ((dp & 3) && !safemode) base = get_long (base);
if (dp & 4) base += dispreg;
addr = base + outer;
}
break;
case absw:
- sprintf (buffer,"$%08lx", (unsigned long)(uae_s32)(uae_s16)get_iword_1 (m68kpc_offset));
+ addr = (uae_s32)(uae_s16)get_iword_1 (m68kpc_offset);
+ sprintf (buffer,"$%08lx", (unsigned long)addr);
m68kpc_offset += 2;
break;
case absl:
- sprintf (buffer,"$%08lx", (unsigned long)get_ilong_1 (m68kpc_offset));
+ addr = get_ilong_1 (m68kpc_offset);
+ sprintf (buffer,"$%08lx", (unsigned long)addr);
m68kpc_offset += 4;
break;
case imm:
f_out (f, "%s", buffer);
else
strcat (buf, buffer);
+ if (eaddr)
+ *eaddr = addr;
return offset;
}
}
}
-void m68k_disasm (void *f, uaecptr addr, uaecptr *nextpc, int cnt)
+void m68k_disasm_2 (void *f, uaecptr addr, uaecptr *nextpc, int cnt, uae_u32 *seaddr, uae_u32 *deaddr, int safemode)
{
uaecptr newpc = 0;
m68kpc_offset = addr - m68k_getpc ();
+
while (cnt-- > 0) {
- char instrname[100],*ccpt;
+ char instrname[100], *ccpt;
int i;
uae_u32 opcode;
struct mnemolookup *lookup;
if (dp->suse) {
newpc = m68k_getpc () + m68kpc_offset;
- newpc += ShowEA (0, opcode, dp->sreg, dp->smode, dp->size, instrname);
+ newpc += ShowEA (0, opcode, dp->sreg, dp->smode, dp->size, instrname, seaddr, safemode);
}
if (dp->suse && dp->duse)
strcat (instrname, ",");
if (dp->duse) {
newpc = m68k_getpc () + m68kpc_offset;
- newpc += ShowEA (0, opcode, dp->dreg, dp->dmode, dp->size, instrname);
+ newpc += ShowEA (0, opcode, dp->dreg, dp->dmode, dp->size, instrname, deaddr, safemode);
}
-
for (i = 0; i < (m68kpc_offset - oldpc) / 2; i++) {
f_out (f, "%04x ", get_iword_1 (oldpc + i * 2));
}
- while (i++ < 5) f_out (f, " ");
+ while (i++ < 5)
+ f_out (f, " ");
f_out (f, instrname);
if (ccpt != 0) {
+ if (deaddr)
+ *deaddr = newpc;
if (cctrue(dp->cc))
f_out (f, " == %08lx (TRUE)", newpc);
else
f_out (f, " == %08lx (FALSE)", newpc);
- } else if ((opcode & 0xff00) == 0x6100) /* BSR */
+ } else if ((opcode & 0xff00) == 0x6100) { /* BSR */
+ if (deaddr)
+ *deaddr = newpc;
f_out (f, " == %08lx", newpc);
+ }
f_out (f, "\n");
}
if (nextpc)
*nextpc = m68k_getpc () + m68kpc_offset;
}
+void m68k_disasm_ea (void *f, uaecptr addr, uaecptr *nextpc, int cnt, uae_u32 *seaddr, uae_u32 *deaddr)
+{
+ m68k_disasm_2 (f, addr, nextpc, cnt, seaddr, deaddr, 1);
+}
+void m68k_disasm (void *f, uaecptr addr, uaecptr *nextpc, int cnt)
+{
+ m68k_disasm_2 (f, addr, nextpc, cnt, NULL, NULL, 0);
+}
+
/*************************************************************
Disasm the m68kcode at the given address into instrname
and instrcode
if (dp->suse) {
newpc = m68k_getpc () + m68kpc_offset;
- newpc += ShowEA (0, opcode, dp->sreg, dp->smode, dp->size, instrname);
+ newpc += ShowEA (0, opcode, dp->sreg, dp->smode, dp->size, instrname, NULL, 0);
}
if (dp->suse && dp->duse)
strcat (instrname, ",");
if (dp->duse) {
newpc = m68k_getpc () + m68kpc_offset;
- newpc += ShowEA (0, opcode, dp->dreg, dp->dmode, dp->size, instrname);
+ newpc += ShowEA (0, opcode, dp->dreg, dp->dmode, dp->size, instrname, NULL, 0);
}
if (instrcode)
!define PRODUCT_NAME "WinUAE"
-!define PRODUCT_VERSION "1.1.1"
+!define PRODUCT_VERSION "1.2.0"
!define PRODUCT_PUBLISHER "Toni Wilen"
!define PRODUCT_WEB_SITE "http://www.winuae.net/"
!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\winuae.exe"
OutputDirectory=".\Release"
IntermediateDirectory=".\Release"
ConfigurationType="1"
- InheritedPropertySheets="..\..\..\..\..\msvs8\VC\VCProjectDefaults\UpgradeFromVC71.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
OutputDirectory=".\Debug"
IntermediateDirectory=".\Debug"
ConfigurationType="1"
- InheritedPropertySheets="..\..\..\..\..\msvs8\VC\VCProjectDefaults\UpgradeFromVC71.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
OutputDirectory="$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="1"
- InheritedPropertySheets="..\..\..\..\..\msvs8\VC\VCProjectDefaults\UpgradeFromVC71.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
num_mouse++;
name = (i == 0) ? "Windows mouse" : "Mousehack mouse";
did->connection = DIDC_WIN;
- did->name = my_strdup (i ? "Mousehack mouse" : "Windows mouse");
+ did->name = my_strdup (i ? "Mousehack mouse (Required for tablets)" : "Windows mouse");
did->sortname = my_strdup (i ? "Windowsmouse2" : "Windowsmouse1");
did->buttons = GetSystemMetrics (SM_CMOUSEBUTTONS);
if (did->buttons < 3)
for (i = 0; i < MAX_INPUT_DEVICES; i++) {
struct didata *did = &di_joystick[i];
- if (currprefs.input_selected_setting == 0) {
- if (jsem_isjoy (0, &currprefs) != i && jsem_isjoy (1, &currprefs) != i)
- continue;
- }
if (!did->acquired)
continue;
if (did->connection == DIDC_CAT) {
}
IDirectInputDevice8_Poll (lpdi);
}
-#if 0
- {
- static uae_u8 odir, obut;
- uae_u8 dir, dir2, but;
- if (catweasel_read_joystick (&dir, &but)) {
- if ((but & 0x80) != (obut & 0x80))
- handle_input_event (INPUTEVENT_JOY1_FIRE_BUTTON, !(but & 0x80), 1, 0);
- if ((but & 0x40) != (obut & 0x40))
- handle_input_event (INPUTEVENT_JOY2_FIRE_BUTTON, !(but & 0x40), 1, 0);
- dir2 = odir;
- odir = dir;
- obut = but;
- if ((dir & 15) != (dir2 & 15)) {
- handle_input_event (INPUTEVENT_JOY2_HORIZ, !(dir & 1) ? 1 : !(dir & 2) ? -1 : 0, 1, 0);
- handle_input_event (INPUTEVENT_JOY2_VERT, !(dir & 4) ? 1 : !(dir & 8) ? -1 : 0, 1, 0);
- }
- dir >>= 4;
- dir2 >>= 4;
- if ((dir & 15) != (dir2 & 15)) {
- handle_input_event (INPUTEVENT_JOY1_HORIZ, !(dir & 1) ? 1 : !(dir & 2) ? -1 : 0, 1, 0);
- handle_input_event (INPUTEVENT_JOY1_VERT, !(dir & 4) ? 1 : !(dir & 8) ? -1 : 0, 1, 0);
- }
- }
- }
-#endif
}
static int init_joystick (void)
--- /dev/null
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <ctype.h>
+
+#include "diskutil.h"
+
+#define LONGEST_TRACK 16000
+#define LONG_TRACK 12800
+#define MAX_CYLINDERS 83
+#define MAX_TRACKS 2*MAX_CYLINDERS
+
+typedef enum { TRACK_AMIGADOS, TRACK_RAW } image_tracktype;
+typedef enum { ADF_NORMAL, ADF_EXT1, ADF_EXT2 } drive_filetype;
+
+static UWORD amigamfmbuffer[LONGEST_TRACK];
+static UBYTE tmpmfmbuffer[LONGEST_TRACK];
+static UBYTE conversiontable[MAX_TRACKS];
+static int amigatracklength;
+
+struct trackid {
+ int trackbytes;
+ int trackbits;
+ image_tracktype type;
+};
+static drive_filetype imagetype;
+static struct trackid tracks[MAX_TRACKS];
+
+#if 0
+static int bitshiftcompare(UBYTE *src,int bit,int len,UBYTE *comp)
+{
+ UBYTE b;
+ int ones,zeros,len2;
+
+ ones=zeros=0;
+ len2=len;
+ while(len--) {
+ b = (comp[0] << bit) | (comp[1] >> (8 - bit));
+ if(b != *src) return 1;
+ if(b==0x00) zeros++;
+ if(b==0xff) ones++;
+ src++;
+ comp++;
+ }
+ if(ones==len2||zeros==len2) return 1;
+ return 0;
+}
+
+static UBYTE *mergepieces(UBYTE *start,int len,int bits,UBYTE *sync)
+{
+ UBYTE *dst=tmpmfmbuffer;
+ UBYTE b;
+ int size;
+ int shift;
+
+ size=len-(sync-start);
+ memcpy(dst,sync,size);
+ dst+=size;
+ b=start[len];
+ b&=~(255>>bits);
+ b|=start[0]>>bits;
+ *dst++=b;
+ shift=8-bits;
+ while(start<=sync+2000) {
+ *dst++=(start[0]<<shift)|(start[1]>>(8-shift));
+ start++;
+ }
+ return tmpmfmbuffer;
+}
+
+#define SCANOFFSET 1 /* scanning range in bytes, -SCANOFFSET to SCANOFFSET */
+#define SCANOFFSET2 20
+#define SCANLENGHT 200 /* scanning length in bytes */
+
+static UBYTE* scantrack(UBYTE *sync1,UBYTE *sync2,int *trackbytes,int *trackbits)
+{
+ int i,bits,bytes,matched;
+ UBYTE *sync2bak=sync2;
+
+ sync1+=SCANOFFSET2;
+ sync2+=SCANOFFSET2;
+ while(sync1 < sync2bak - 2*SCANOFFSET - SCANOFFSET2 - SCANLENGHT) {
+ matched=0x7fff;
+ for(i=0;i<2*SCANOFFSET*8;i++) {
+ bits=i&7;
+ bytes=-SCANOFFSET+(i>>3);
+ if(!bitshiftcompare(sync1,bits,SCANLENGHT,sync2+bytes)) {
+ if(matched==0x7fff) {
+ matched=i;
+ } else {
+ break;
+ }
+ }
+ }
+ if(matched!=0x7fff && i>=2*SCANOFFSET*8) {
+ bits=matched&7;
+ bytes=-SCANOFFSET+(matched>>3);
+ *trackbytes=sync2+bytes-sync1;
+ *trackbits=bits;
+ return mergepieces(sync1,*trackbytes,*trackbits,sync2bak);
+ }
+ sync1++;
+ sync2++;
+ }
+ return 0;
+}
+#endif
+
+#define MFMMASK 0x55555555
+static ULONG getmfmlong (UWORD * mbuf)
+{
+ return (ULONG)(((*mbuf << 16) | *(mbuf + 1)) & MFMMASK);
+}
+
+#define FLOPPY_WRITE_LEN 6250
+
+static int drive_write_adf_amigados (UWORD *mbuf, UWORD *mend, UBYTE *writebuffer, UBYTE *writebuffer_ok, int track)
+{
+ int i, secwritten = 0;
+ ULONG odd, even, chksum, id, dlong;
+ UBYTE *secdata;
+ UBYTE secbuf[544];
+ char sectable[11];
+
+ memset (sectable, 0, sizeof (sectable));
+ mend -= (4 + 16 + 8 + 512);
+ while (secwritten < 11) {
+ int trackoffs;
+
+ do {
+ while (*mbuf++ != 0x4489) {
+ if (mbuf >= mend) {
+ printf("* unexpected end of data, sectors left %d\n", 11 - secwritten);
+ return 1;
+ }
+ }
+ } while (*mbuf++ != 0x4489);
+
+ odd = getmfmlong (mbuf);
+ even = getmfmlong (mbuf + 2);
+ mbuf += 4;
+ id = (odd << 1) | even;
+
+ trackoffs = (id & 0xff00) >> 8;
+ if (trackoffs > 10) {
+ printf("* corrupt sector number %d, sectors complete %d\n", trackoffs, secwritten);
+ goto next;
+ }
+ chksum = odd ^ even;
+ for (i = 0; i < 4; i++) {
+ odd = getmfmlong (mbuf);
+ even = getmfmlong (mbuf + 8);
+ mbuf += 2;
+
+ dlong = (odd << 1) | even;
+ if (dlong) {
+ printf("* sector %d header crc error, sectors complete %d\n", trackoffs, secwritten);
+ goto next;
+ }
+ chksum ^= odd ^ even;
+ } /* could check here if the label is nonstandard */
+ mbuf += 8;
+ odd = getmfmlong (mbuf);
+ even = getmfmlong (mbuf + 2);
+ mbuf += 4;
+ if (((odd << 1) | even) != chksum || ((id & 0x00ff0000) >> 16) != track) return 3;
+ odd = getmfmlong (mbuf);
+ even = getmfmlong (mbuf + 2);
+ mbuf += 4;
+ chksum = (odd << 1) | even;
+ secdata = secbuf + 32;
+ for (i = 0; i < 128; i++) {
+ odd = getmfmlong (mbuf);
+ even = getmfmlong (mbuf + 256);
+ mbuf += 2;
+ dlong = (odd << 1) | even;
+ *secdata++ = (UBYTE)(dlong >> 24);
+ *secdata++ = (UBYTE)(dlong >> 16);
+ *secdata++ = (UBYTE)(dlong >> 8);
+ *secdata++ = (UBYTE)dlong;
+ chksum ^= odd ^ even;
+ }
+ mbuf += 256;
+ if (chksum) {
+ printf("* sector %d data crc error, sectors complete %d\n", trackoffs, secwritten);
+ goto next;
+ }
+ sectable[trackoffs] = 1;
+ secwritten++;
+ memcpy (writebuffer + trackoffs * 512, secbuf + 32, 512);
+ writebuffer_ok[trackoffs] = 1;
+ continue;
+next:
+ mbuf += 8;
+ }
+ if (secwritten == 0 || secwritten < 0) return 5;
+ return 0;
+}
+
+/* search and align to 0x4489 WORDSYNC markers */
+int isamigatrack(UBYTE *mfmdata, int len, UBYTE *writebuffer, UBYTE *writebuffer_ok, int track)
+{
+ UWORD *dst = amigamfmbuffer;
+ int shift, syncshift, sync;
+ ULONG l;
+ UWORD w;
+
+ len *= 8;
+ sync = syncshift = shift = 0;
+ while (len--) {
+ l = (mfmdata[0] << 16) | (mfmdata[1] << 8) | (mfmdata[2] << 0);
+ w = (UWORD)(l >> (8 - shift));
+ if (w == 0x4489) {
+ sync = 1;
+ syncshift = 0;
+ }
+ if (sync) {
+ if (syncshift == 0) *dst++ = w;
+ syncshift++;
+ if (syncshift == 16) syncshift = 0;
+ }
+ shift++;
+ if (shift == 8) {
+ mfmdata++;
+ shift = 0;
+ }
+ }
+ if (sync)
+ return drive_write_adf_amigados (amigamfmbuffer, dst, writebuffer, writebuffer_ok, track);
+ return -1;
+}
+
+#if 0
+/* read and examine one raw track, do MFM decoding if track
+ * is AmigaDOS formatted and track conversion is not disabled
+ */
+static int dotrack(int track,UBYTE *buf,FILE *f)
+{
+ int retries,trackbytes,trackbits,type;
+ int out = 0;
+ UBYTE *syncpos[10]={0},*trackbuffer,*amigatrack;
+
+ trackbuffer=0;
+ for(retries=0;retries<3;retries++) {
+ if(!rawread(buf,syncpos,f,track)) return 0;
+ trackbytes=trackbits=0;
+ trackbuffer=scantrack(syncpos[1],syncpos[2],&trackbytes,&trackbits);
+ if(trackbuffer) break;
+ }
+ if(!trackbuffer) {
+ trackbuffer=tmpmfmbuffer;
+ memset(trackbuffer,0,LONGEST_TRACK);
+ }
+ if(!trackbytes) {
+ printf("empty track?");
+ trackbytes=trackbits=0;
+ } else {
+ printf("length %d/%d",trackbytes,trackbits);
+ }
+
+ type=TRACK_RAW;
+ amigatrack=0;
+
+ if(!conversiontable[track]&&trackbytes) {
+ amigatrack=isamigatrack(trackbuffer, track);
+ if(amigatrack) {
+ if(trackbytes<LONG_TRACK) {
+ trackbuffer=amigatrack;
+ trackbytes=11*512;
+ trackbits=0;
+ type=TRACK_AMIGADOS;
+ printf(" (AmigaDOS)");
+ out=1;
+ } else {
+ printf(" (long AmigaDOS)");
+ out=1;
+ }
+ }
+ }
+ if(!out) printf (" (raw)");
+
+ tracks[track].trackbits=trackbytes*8+trackbits;
+ /* clear unneeded bits from last byte */
+ trackbuffer[trackbytes]&=~(255>>(8-trackbits));
+ trackbuffer[trackbytes+1]=0;
+ if(trackbits) trackbytes++;
+ /* track length must be word aligned */
+ trackbytes=(trackbytes+1)&~1;
+ tracks[track].trackbytes=trackbytes;
+ if(trackbytes) fwrite(trackbuffer,tracks[track].trackbytes,1,f);
+ tracks[track].type=type;
+ return 1;
+}
+
+/* create normal (non-raw) ADF file */
+static int doamigatrack(int track,UBYTE *buf,FILE *f)
+{
+ read(track,buf);
+ fwrite(buf,amigatracklength,1,f);
+ return 1;
+}
+
+static void writeword(FILE *f,int w)
+{
+ UBYTE b;
+
+ b=w>>8;
+ fwrite(&b,1,1,f);
+ b=w;
+ fwrite(&b,1,1,f);
+}
+
+static void writelong(FILE *f,int l)
+{
+ writeword(f,l>>16);
+ writeword(f,l);
+}
+
+/* update ADF_EXT2 header */
+static void fiximage(FILE *f,int numtracks)
+{
+ int i;
+
+ if(imagetype!=ADF_EXT2) return;
+ fseek(f,8+4,SEEK_SET);
+ for(i=0;i<numtracks;i++) {
+ writelong(f,tracks[i].type);
+ writelong(f,tracks[i].trackbytes);
+ writelong(f,tracks[i].trackbits);
+ }
+}
+
+/* create empty ADF_EXT2 */
+static void initimage(FILE *f,int numtracks)
+{
+ if(imagetype!=ADF_EXT2) return;
+ fwrite("UAE-1ADF",8,1,f);
+ writelong(f,numtracks);
+ while(numtracks--) {
+ writelong(f,0);
+ writelong(f,0);
+ writelong(f,0);
+ tracks[numtracks].type=TRACK_RAW;
+ }
+}
+#endif
--- /dev/null
+
+typedef unsigned char UBYTE;
+typedef unsigned short UWORD;
+typedef unsigned long ULONG;
+
+extern int isamigatrack(UBYTE *mfmdata, int len, UBYTE *writebuffer, UBYTE *writebuffer_ok, int track);
+
--- /dev/null
+ /*
+ * UAE - The Un*x Amiga Emulator
+ *
+ * PC drive Drive Click Emulation Support
+ *
+ * Copyright 2006 Toni Wilen
+ */
+
+#include "sysconfig.h"
+#include "sysdeps.h"
+
+#ifdef DRIVESOUND
+
+#include "uae.h"
+#include "config.h"
+#include "options.h"
+#include "driveclick.h"
+#include "threaddep/thread.h"
+
+#include <windows.h>
+#include "fdrawcmd.h"
+
+int driveclick_pcdrivenum, driveclick_pcdrivemask;
+
+#define DC_PIPE_SIZE 100
+static smp_comm_pipe dc_pipe[DC_PIPE_SIZE];
+static HANDLE h[2] = { INVALID_HANDLE_VALUE, INVALID_HANDLE_VALUE };
+
+static int CmdSeek (HANDLE h_, BYTE cyl_)
+{
+ DWORD dwRet;
+ FD_SEEK_PARAMS sp = { cyl_, 0 };
+ if (h == INVALID_HANDLE_VALUE)
+ return 0;
+ return !!DeviceIoControl(h_, IOCTL_FDCMD_SEEK, &sp, sizeof(sp), NULL, 0, &dwRet, NULL);
+}
+
+static int CmdSpecify (HANDLE h_, BYTE srt_, BYTE hut_, BYTE hlt_, BYTE nd_)
+{
+ DWORD dwRet;
+ FD_SPECIFY_PARAMS sp = { (srt_ << 4) | (hut_ & 0x0f), (hlt_ << 1) | (nd_ & 1) };
+ if (h == INVALID_HANDLE_VALUE)
+ return 0;
+ return !!DeviceIoControl(h_, IOCTL_FDCMD_SPECIFY, &sp, sizeof(sp), NULL, 0, &dwRet, NULL);
+}
+
+static int SetDataRate (HANDLE h_, BYTE bDataRate_)
+{
+ DWORD dwRet;
+ if (h == INVALID_HANDLE_VALUE)
+ return 0;
+ return !!DeviceIoControl(h_, IOCTL_FD_SET_DATA_RATE, &bDataRate_, sizeof(bDataRate_), NULL, 0, &dwRet, NULL);
+}
+
+void driveclick_fdrawcmd_seek(int drive, int cyl)
+{
+ write_comm_pipe_int (dc_pipe, (drive << 8) | cyl, 1);
+}
+
+static void *driveclick_thread (void *v)
+{
+ for (;;) {
+ int drive, cyl;
+ int v = read_comm_pipe_int_blocking (dc_pipe);
+ if (v < 0)
+ break;
+ drive = v >> 8;
+ cyl = v & 255;
+ CmdSeek(h[drive], cyl);
+ }
+ return NULL;
+}
+
+static int driveclick_fdrawcmd_init(int drive)
+{
+ uae_thread_id tid;
+ static int thread_ok;
+
+ if (h[drive] == INVALID_HANDLE_VALUE)
+ return 0;
+ SetDataRate(h[drive], 3);
+ CmdSpecify(h[drive], 0xd, 0xf, 0x1, 0);
+ if (thread_ok)
+ return 1;
+ thread_ok = 1;
+ init_comm_pipe (dc_pipe, DC_PIPE_SIZE, 3);
+ uae_start_thread(driveclick_thread, NULL, &tid);
+ return 1;
+}
+
+void driveclick_fdrawcmd_motor (int drive, int running)
+{
+}
+
+void driveclick_fdrawcmd_close(int drive)
+{
+ if (h[drive] != INVALID_HANDLE_VALUE)
+ CloseHandle(h[drive]);
+ h[drive] = INVALID_HANDLE_VALUE;
+}
+
+int driveclick_fdrawcmd_open(int drive)
+{
+ char s[32];
+
+ driveclick_fdrawcmd_close(drive);
+ sprintf (s, "\\\\.\\fdraw%d", drive);
+ h[drive] = CreateFile(s, GENERIC_READ|GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL);
+ if (h[drive] == INVALID_HANDLE_VALUE)
+ return 0;
+ driveclick_fdrawcmd_init(drive);
+ return 1;
+}
+
+void driveclick_fdrawcmd_detect(void)
+{
+ static int detected;
+ if (detected)
+ return;
+ detected = 1;
+ if (driveclick_fdrawcmd_open(0)) {
+ driveclick_pcdrivemask |= 1;
+ driveclick_pcdrivenum++;
+ }
+ driveclick_fdrawcmd_close(0);
+ if (driveclick_fdrawcmd_open(1)) {
+ driveclick_pcdrivemask |= 2;
+ driveclick_pcdrivenum++;
+ }
+ driveclick_fdrawcmd_close(1);
+}
+
+#endif
--- /dev/null
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <ctype.h>
+#include <time.h>
+
+#include <windows.h>
+#include "fdrawcmd.h"
+#include "diskutil.h"
+
+#define TRACK_SIZE 16384
+static int longread = 1;
+#define MAX_RETRIES 10
+
+static UBYTE writebuffer[11 * 512];
+static UBYTE writebuffer_ok[11];
+
+static BYTE *trackbuffer;
+static HANDLE h = INVALID_HANDLE_VALUE;
+static FILE *fout;
+
+static int checkversion(void)
+{
+ DWORD version = 0;
+ DWORD ret;
+
+ h = CreateFile("\\\\.\\fdrawcmd", GENERIC_READ|GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL);
+ if (h == INVALID_HANDLE_VALUE)
+ return 0;
+ DeviceIoControl(h, IOCTL_FDRAWCMD_GET_VERSION, NULL, 0, &version, sizeof version, &ret, NULL);
+ CloseHandle(h);
+ if (!version) {
+ printf("fdrawcmd.sys is not installed, see: http://simonowen.com/fdrawcmd/\n");
+ return 0;
+ }
+ if (HIWORD(version) != HIWORD(FDRAWCMD_VERSION)) {
+ printf("fdrawcmd.sys major version mismatch %d <> %d\n",
+ HIWORD(version), HIWORD(FDRAWCMD_VERSION));
+ return 0;
+ }
+ return version;
+}
+
+static void closedevice(void)
+{
+ if (h == INVALID_HANDLE_VALUE)
+ return;
+ CloseHandle(h);
+}
+
+static int opendevice(void)
+{
+ HANDLE h;
+ DWORD ret;
+ BYTE b;
+
+ h = CreateFile("\\\\.\\fdraw0", GENERIC_READ|GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL);
+ if (h == INVALID_HANDLE_VALUE)
+ return 0;
+ b = 0; // 500Kbps
+ if (!DeviceIoControl(h, IOCTL_FD_SET_DATA_RATE, &b, sizeof b, NULL, 0, &ret, NULL)) {
+ printf("IOCTL_FD_SET_DATA_RATE=%d failed err=%d\n", b, GetLastError());
+ closedevice();
+ return 0;
+ }
+ return 1;
+}
+
+#if 1
+static int readraw(int cyl, int head)
+{
+ FD_RAW_READ_PARAMS rrp;
+ FD_SEEK_PARAMS sp;
+ DWORD ret;
+
+ sp.cyl = cyl;
+ sp.head = head;
+ if (!DeviceIoControl(h, IOCTL_FDCMD_SEEK, &sp, sizeof sp, NULL, 0, &ret, NULL)) {
+ printf("IOCTL_FDCMD_SEEK failed cyl=%d, err=%d\n", sp.cyl, GetLastError());
+ return 0;
+ }
+
+ rrp.flags = FD_OPTION_MFM;
+ rrp.size = longread == 1 ? 7 : 8;
+ rrp.head = head;
+ memset (trackbuffer, 0, TRACK_SIZE * longread);
+ if (!DeviceIoControl(h, IOCTL_FD_RAW_READ_TRACK * longread, &rrp, sizeof rrp,
+ trackbuffer, TRACK_SIZE * longread, &ret, NULL)) {
+ printf("IOCTL_FD_RAW_READ_TRACK failed, err=%d\n", GetLastError());
+ return 0;
+ }
+
+ return 1;
+}
+#else
+static int readraw(int cyl, int head)
+{
+ FILE *f;
+
+ if (fopen_s(&f, "f:\\amiga\\amiga.dat", "rb"))
+ return 0;
+ fseek(f, (cyl * 2 + head) * 16384, SEEK_SET);
+ fread(trackbuffer, TRACK_SIZE, 1, f);
+ fclose(f);
+ return 1;
+}
+#endif
+
+static void readloop(char *fname)
+{
+ int trk, i, j, sec;
+ int errsec, oktrk, retr;
+ time_t t = time(0);
+
+ if (fopen_s(&fout, fname, "wb")) {
+ printf("Failed to open '%s'\n", fname);
+ return;
+ }
+ errsec = oktrk = retr = 0;
+ for (trk = 0; trk < 2 * 80; trk++) {
+ printf ("Track %d: processing started..\n", trk);
+ memset (writebuffer_ok, 0, sizeof writebuffer_ok);
+ memset (writebuffer, 0, sizeof writebuffer);
+ for (j = 0; j < MAX_RETRIES; j++) {
+ if (j > 0)
+ printf("Retrying.. (%d/%d)\n", j, MAX_RETRIES - 1);
+ if (!readraw(trk / 2, trk % 2)) {
+ printf("Raw read error, possible reasons:\nMissing second drive or your hardware only supports single drive.\nOperation aborted.\n");
+ return;
+ }
+ isamigatrack(trackbuffer, TRACK_SIZE * longread, writebuffer, writebuffer_ok, trk);
+ sec = 0;
+ for (i = 0; i < 11; i++) {
+ if (writebuffer_ok[i])
+ sec++;
+ }
+ if (sec == 11)
+ break;
+ retr++;
+ }
+ errsec += 11 - sec;
+ if (j == MAX_RETRIES) {
+ printf("Track %d: read error or non-AmigaDOS formatted track (%d/11 sectors ok)\n", trk, sec);
+ } else {
+ oktrk++;
+ printf("Track %d: all sectors ok (%d retries)\n", trk, j);
+ }
+ fwrite(writebuffer, 11 * 512, 1, fout);
+ }
+ fclose(fout);
+ t = time(0) - t;
+ printf ("Completed. %02.2dm%02.2ds, %d/160 tracks read without errors, %d retries, %d faulty sectors\n",
+ t / 60, t % 60, oktrk, retr, errsec);
+}
+
+int main(int argc, char *argv[])
+{
+ DWORD ver;
+ char *fname = NULL;
+ int i;
+
+ for (i = 1; i < argc; i++) {
+ if (!_stricmp(argv[i], "-l")) {
+ longread = 2;
+ continue;
+ }
+ break;
+ }
+ if (argc < 2 || i >= argc) {
+ printf("adiskutil.exe [-l] <name of new disk image>\n");
+ return 0;
+ }
+ fname = argv[i];
+ ver = checkversion();
+ if (!ver)
+ return 0;
+ printf ("fdrawcmd.sys %x detected. Read size %d\n", ver, TRACK_SIZE * longread);
+ trackbuffer = VirtualAlloc(NULL, TRACK_SIZE * 4, MEM_COMMIT, PAGE_READWRITE);
+ if (opendevice()) {
+ readloop(fname);
+ }
+ closedevice();
+ VirtualFree(trackbuffer, 0, MEM_RELEASE);
+ return 0;
+}
num += 10;
if (ctrlpressed ()) {
swapperdrive = num;
- if (num > 3)
+ if (swapperdrive > 3)
swapperdrive = 0;
} else {
int i;
#define IDS_DEFAULT_AF 190
#define IDS_DEFAULT_WINUAE 191
#define IDI_ROOT 192
+#define IDS_INP 192
+#define IDS_RESTOREINP 193
#define IDI_ICON2 194
#define IDI_MEMORY 194
+#define IDS_SAVEINP 194
#define IDS_SOUND_MONO 200
#define IDS_SOUND_MIXED 201
#define IDI_QUICKSTART 201
#define IDB_LCD160X43 252
#define IDS_SOUND_FILTER_ON_AGA 252
#define IDS_SOUND_FILTER_ON 253
+#define IDS_DRIVESOUND_PC_FLOPPY 254
#define IDS_NUMSG_NEEDEXT2 300
#define IDS_NUMSG_NOROMKEY 301
#define IDS_NUMSG_KSROMCRCERROR 302
#define IDC_CS_CPU_TEXT2 1219
#define IDC_CPUIDLE 1220
#define IDC_GENLOCK 1220
+#define IDC_COMPATIBLE_FPU 1221
#define IDC_SOUNDSETTINGS 1229
#define IDC_8BIT 1230
#define IDC_16BIT 1231
#define IDC_AVIOUTPUT_BORDER_TRIM 1617
#define IDC_OPENGLVZ 1617
#define IDC_FILTERVZ 1617
+#define IDC_INPREC_RECORD 1617
#define IDC_AVIOUTPUT_AUDIO_STATIC 1618
#define IDC_OPENGLHO 1618
#define IDC_FILTERHO 1618
#define IDC_FILTERVO 1619
#define IDC_AVIOUTPUT_8BIT 1620
#define IDC_OPENGLHZV 1620
+#define IDC_INPREC_PLAY 1620
#define IDC_AVIOUTPUT_24BIT 1621
#define IDC_OPENGLVZV 1621
#define IDC_AVIOUTPUT_WIDTH 1622
#define IDC_MINIMIZED_PRIORITY 1645
#define IDC_AVIOUTPUT_FRAMELIMITER 1645
#define IDC_STATE_RATE 1646
+#define IDC_INPREC_PLAYMODE 1646
#define IDC_STATE_BUFFERSIZE 1647
#define IDC_SOUNDDRIVESELECT 1647
#define IDC_PANELTREE 1647
#define IDC_PROGRESSBAR_TEXT 1706
#define IDC_SCSIMODE2 1706
#define IDC_LANGUAGE 1706
+#define IDC_CREATE_NAME 1707
#define ID__FLOPPYDRIVES 40004
#define ID_FLOPPYDRIVES_DF0 40005
#define ID_ST_CONFIGURATION 40010
#define _APS_3D_CONTROLS 1
#define _APS_NEXT_RESOURCE_VALUE 253
#define _APS_NEXT_COMMAND_VALUE 40021
-#define _APS_NEXT_CONTROL_VALUE 1707
+#define _APS_NEXT_CONTROL_VALUE 1708
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif
CONTROL "68020 + FPU",IDC_CPU5,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,10,93,64,10
CONTROL "68040",IDC_CPU6,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,10,108,66,10
CONTROL "More compatible [] Emulate 68000's prefetch registers. More compatible but slower.",IDC_COMPATIBLE,
- "Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,10,130,70,10
+ "Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,9,126,73,10
CONTROL "JIT [] Enable just-in-time CPU emulator. Significantly increases the speed of the CPU emulation. Requires 68020 or 68040 CPU.",IDC_JITENABLE,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,145,64,10
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,9,149,73,10
GROUPBOX "CPU Emulation Speed",IDC_STATIC,90,5,205,86
CONTROL "Fastest possible, but maintain chipset timing",IDC_CS_HOST,
"Button",BS_AUTORADIOBUTTON | BS_LEFT | WS_GROUP | WS_TABSTOP,95,18,195,10
CONTROL "Direct",IDC_TRUST0,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,230,128,34,10
CONTROL "Indirect",IDC_TRUST1,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,230,142,45,10
CONTROL "After RTG",IDC_TRUST2,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,230,155,64,10
+ CONTROL "More accurate FPU [] More compatible but slower FPU emulation.",IDC_COMPATIBLE_FPU,
+ "Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,9,137,73,10
END
-IDD_FLOPPY DIALOGEX 0, 0, 300, 224
+IDD_FLOPPY DIALOGEX 0, 0, 300, 240
STYLE DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD
FONT 8, "MS Sans Serif", 0, 0, 0x0
BEGIN
CONTROL "",IDC_DF3WP,"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,238,111,9,15
PUSHBUTTON "Eject",IDC_EJECT3,253,110,30,15
PUSHBUTTON "...",IDC_DF3,287,109,10,15
- GROUPBOX "New Floppy Disk Image",IDC_SETTINGSTEXT,5,183,289,35
+ GROUPBOX "New Floppy Disk Image",IDC_SETTINGSTEXT,5,183,289,49
COMBOBOX IDC_FLOPPYTYPE,16,196,51,50,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "Create Standard Disk [] Creates a standard 880 KB ADF disk image.",IDC_CREATE,76,196,97,15
PUSHBUTTON "Create Custom Disk [] Creates a low level (MFM) ADF disk image (about 2MB). Useful for programs that use non-standard disk formats (for example some save disks or DOS-formatted floppies)",IDC_CREATE_RAW,183,196,101,15
PUSHBUTTON "Delete save image",IDC_SAVEIMAGE1,43,40,70,15,NOT WS_VISIBLE
PUSHBUTTON "Delete save image",IDC_SAVEIMAGE2,43,75,70,15,NOT WS_VISIBLE
PUSHBUTTON "Delete save image",IDC_SAVEIMAGE3,43,110,70,15,NOT WS_VISIBLE
+ EDITTEXT IDC_CREATE_NAME,75,215,98,13,ES_AUTOHSCROLL
+ RTEXT "Disk name:",IDC_STATIC,14,216,52,10,SS_CENTERIMAGE
END
IDD_HARDDISK DIALOGEX 0, 0, 300, 231
"Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,174,56,100,10
END
-IDD_AVIOUTPUT DIALOGEX 0, 0, 197, 233
+IDD_AVIOUTPUT DIALOGEX 0, 0, 288, 193
STYLE DS_SETFONT | DS_CONTROL | WS_CHILD
FONT 8, "MS Sans Serif", 0, 0, 0x1
BEGIN
- GROUPBOX "Output Properties",IDC_STATIC,5,8,184,96
- EDITTEXT IDC_AVIOUTPUT_FILETEXT,26,21,120,12,ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER,WS_EX_CLIENTEDGE
- PUSHBUTTON "...",IDC_AVIOUTPUT_FILE,148,21,19,12
- CONTROL "Audio",IDC_AVIOUTPUT_AUDIO,"Button",BS_AUTOCHECKBOX | BS_PUSHLIKE | BS_FLAT | WS_TABSTOP,26,36,32,11
- CONTROL "",IDC_AVIOUTPUT_AUDIO_STATIC,"Static",SS_LEFTNOWORDWRAP | SS_CENTERIMAGE | SS_SUNKEN | WS_GROUP,60,36,107,11
- CONTROL "Video",IDC_AVIOUTPUT_VIDEO,"Button",BS_AUTOCHECKBOX | BS_PUSHLIKE | BS_FLAT | WS_TABSTOP,26,50,32,11
- CONTROL "",IDC_AVIOUTPUT_VIDEO_STATIC,"Static",SS_LEFTNOWORDWRAP | SS_CENTERIMAGE | SS_SUNKEN | WS_GROUP,60,50,107,11
+ GROUPBOX "Output Properties",IDC_STATIC,5,8,274,97
+ EDITTEXT IDC_AVIOUTPUT_FILETEXT,15,21,226,12,ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER,WS_EX_CLIENTEDGE
+ PUSHBUTTON "...",IDC_AVIOUTPUT_FILE,249,20,19,12
+ CONTROL "Audio",IDC_AVIOUTPUT_AUDIO,"Button",BS_AUTOCHECKBOX | BS_PUSHLIKE | BS_FLAT | WS_TABSTOP,15,36,32,11
+ CONTROL "",IDC_AVIOUTPUT_AUDIO_STATIC,"Static",SS_LEFTNOWORDWRAP | SS_CENTERIMAGE | SS_SUNKEN | WS_GROUP,59,36,209,11
+ CONTROL "Video",IDC_AVIOUTPUT_VIDEO,"Button",BS_AUTOCHECKBOX | BS_PUSHLIKE | BS_FLAT | WS_TABSTOP,15,50,32,11
+ CONTROL "",IDC_AVIOUTPUT_VIDEO_STATIC,"Static",SS_LEFTNOWORDWRAP | SS_CENTERIMAGE | SS_SUNKEN | WS_GROUP,59,50,209,11
CONTROL "Disable frame rate limit while recording",IDC_AVIOUTPUT_FRAMELIMITER,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,28,68,142,10
- CONTROL "AVI output enabled",IDC_AVIOUTPUT_ACTIVATED,"Button",BS_AUTORADIOBUTTON | BS_PUSHLIKE | BS_FLAT,26,83,142,14
- GROUPBOX "Playback Rate",IDC_STATIC,5,107,184,50
- CONTROL "PAL",IDC_AVIOUTPUT_PAL,"Button",BS_AUTORADIOBUTTON | BS_PUSHLIKE | BS_FLAT,24,121,66,12
- CONTROL "NTSC",IDC_AVIOUTPUT_NTSC,"Button",BS_AUTORADIOBUTTON | BS_PUSHLIKE | BS_FLAT,102,121,66,12
- CONTROL "Slider1",IDC_AVIOUTPUT_FPS,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | TBS_ENABLESELRANGE | WS_TABSTOP,21,137,120,11
- LTEXT "fps",IDC_AVIOUTPUT_FPS_STATIC,148,138,23,8
- PUSHBUTTON "Save screenshot",IDC_SCREENSHOT,15,176,85,14
- GROUPBOX "Ripper",IDC_STATIC,5,160,184,63
- PUSHBUTTON "Pro Wizard",IDC_PROWIZARD,112,176,69,14,WS_DISABLED
- CONTROL "Sample ripper",IDC_SAMPLERIPPER_ACTIVATED,"Button",BS_AUTORADIOBUTTON | BS_PUSHLIKE | BS_FLAT,15,198,84,14
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,68,136,10
+ CONTROL "AVI output enabled",IDC_AVIOUTPUT_ACTIVATED,"Button",BS_AUTORADIOBUTTON | BS_PUSHLIKE | BS_FLAT,15,83,108,14
+ CONTROL "PAL",IDC_AVIOUTPUT_PAL,"Button",BS_AUTORADIOBUTTON | BS_PUSHLIKE | BS_FLAT,133,83,66,12
+ CONTROL "NTSC",IDC_AVIOUTPUT_NTSC,"Button",BS_AUTORADIOBUTTON | BS_PUSHLIKE | BS_FLAT,204,83,66,12
+ CONTROL "Slider1",IDC_AVIOUTPUT_FPS,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | TBS_ENABLESELRANGE | WS_TABSTOP,156,68,97,11
+ LTEXT "fps",IDC_AVIOUTPUT_FPS_STATIC,255,68,19,8
+ PUSHBUTTON "Save screenshot",IDC_SCREENSHOT,16,124,76,14
+ GROUPBOX "Ripper",IDC_STATIC,5,110,275,38
+ PUSHBUTTON "Pro Wizard",IDC_PROWIZARD,100,123,76,14,WS_DISABLED
+ CONTROL "Sample ripper",IDC_SAMPLERIPPER_ACTIVATED,"Button",BS_AUTORADIOBUTTON | BS_PUSHLIKE | BS_FLAT,192,123,77,14
+ GROUPBOX "Input Recorder",IDC_STATIC,5,152,275,33
+ CONTROL "Record",IDC_INPREC_RECORD,"Button",BS_AUTORADIOBUTTON | BS_PUSHLIKE | BS_FLAT,191,164,77,14
+ CONTROL "Playback",IDC_INPREC_PLAY,"Button",BS_AUTORADIOBUTTON | BS_PUSHLIKE | BS_FLAT,16,165,77,14
+ CONTROL "Alt. playback mode",IDC_INPREC_PLAYMODE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,103,167,78,10
END
IDD_INPUT DIALOGEX 0, 0, 300, 242
STRINGTABLE
BEGIN
+ IDS_INP "WinUAE Input Recording"
+ IDS_RESTOREINP "Playback a WinUAE input recording"
+ IDS_SAVEINP "Record a WinUAE input recording"
IDS_SOUND_MONO "Mono"
IDS_SOUND_MIXED "Mixed"
IDS_SOUND_STEREO "Stereo"
IDS_SOUND_SWAP_BOTH "Both"
IDS_SOUND_FILTER_ON_AGA "Always on (AGA)"
IDS_SOUND_FILTER_ON "Always on"
+ IDS_DRIVESOUND_PC_FLOPPY "PC floppy drive %c"
END
STRINGTABLE
-cd e:\projects\winuae_bak
+cd d:\projects\winuae_bak
rm -rf bak
mkdir bak
-copy /s e:\projects\winuae\src\*.* e:\projects\winuae_bak\bak\
+copy /s d:\projects\winuae\src\*.* d:\projects\winuae_bak\bak\
cd bak
del *.obj *.ilk *.exe *.pdb *.pch *.idb /s
rm -rf _UpgradeReport_Files
cd ..
-cd miniuae
-rm -f winuae_msvc.plg
-rm -f winuae_msvc.ncb
-rm -rf debug
-rm -rf release
-cd ..
-
-cd winuae_nogui
-rm -rf debug
-rm -rf release
-cd ..
-
cd soundcheck
rm -rf debug
rm -rf release
zip -9 -r winuaesrc *
-copy winuaesrc.zip d:\amiga\winuaepackets\winuaesrc%1.zip
-move winuaesrc.zip d:\amiga
-cd e:\projects\winuae\src\od-win32
+copy winuaesrc.zip f:\amiga\winuaepackets\winuaesrc%1.zip
+move winuaesrc.zip f:\amiga
+cd d:\projects\winuae\src\od-win32
zip -9 winuaedebug%1 winuae_msvc\release\winuae.pdb
-move winuaedebug%1.zip d:\amiga\winuaepackets\
+move winuaedebug%1.zip f:\amiga\winuaepackets\
return 0;
}
-int needmousehack (void)
-{
- return 1;
-}
int mousehack_allowed (void)
{
return dinput_winmouse () > 0 && dinput_winmousemode ();
strcat (tmp, "Savestates");
if (!strcmp (name, "SaveimagePath"))
strcat (tmp, "SaveImages");
+ if (!strcmp (name, "InputPath"))
+ strcat (tmp, "Inputrecordings");
} else {
strcpy (tmp, path);
}
initpath ("StatefilePath", start_path_data);
initpath ("SaveimagePath", start_path_data);
initpath ("VideoPath", start_path_data);
+ initpath ("InputPath", start_path_data);
if (disposition == REG_CREATED_NEW_KEY)
{
/* Create and initialize all our sub-keys to the default values */
CreateDirectory (path, NULL);
fetch_path ("StatefilePath", path, sizeof (path));
CreateDirectory (path, NULL);
+ fetch_path ("InputPath", path, sizeof (path));
+ CreateDirectory (path, NULL);
strcat (path, "default.uss");
strcpy (savestate_fname, path);
fkey = read_disk_history ();
extern int manual_palette_refresh_needed;
extern int mouseactive, focus;
extern int ignore_messages_all;
-#define WINUAEBETA 0
-#define WINUAEBETASTR " "
+#define WINUAEBETA 1
+#define WINUAEBETASTR " Beta 1"
extern char start_path_exe[MAX_DPATH];
extern char start_path_data[MAX_DPATH];
fs_warning = IDS_UNSUPPORTEDSCREENMODE_3;
#ifdef PICASSO96
} else if (screen_is_picasso && !currprefs.gfx_pfullscreen &&
- ( picasso_vidinfo.selected_rgbformat != RGBFB_CHUNKY ) &&
- ( picasso_vidinfo.selected_rgbformat != colortype ) &&
+ (picasso_vidinfo.selected_rgbformat != RGBFB_CHUNKY) &&
+ (picasso_vidinfo.selected_rgbformat != colortype) &&
!(currentmode->flags & DM_OVERLAY) )
{
fs_warning = IDS_UNSUPPORTEDSCREENMODE_4;
}
if (fs_warning >= 0 && !isfullscreen ()) {
char szMessage[MAX_DPATH], szMessage2[MAX_DPATH];
- WIN32GUI_LoadUIString( IDS_UNSUPPORTEDSCREENMODE, szMessage, MAX_DPATH );
- WIN32GUI_LoadUIString( fs_warning, szMessage2, MAX_DPATH );
+ WIN32GUI_LoadUIString(IDS_UNSUPPORTEDSCREENMODE, szMessage, MAX_DPATH);
+ WIN32GUI_LoadUIString(fs_warning, szMessage2, MAX_DPATH);
// Temporarily drop the DirectDraw stuff
DirectDraw_Release();
sprintf (tmpstr, szMessage, szMessage2);
#define USS_FORMAT_STRING_RESTORE "(*.uss;*.gz;*.zip)\0*.uss;*.gz;*.zip\0"
#define USS_FORMAT_STRING_SAVE "(*.uss)\0*.uss\0"
#define HDF_FORMAT_STRING "(*.hdf;*.rdf;*.hdz;*.rdz)\0*.hdf;*.rdf;*.hdz;*.rdz\0"
+#define INP_FORMAT_STRING "(*.inp)\0*.inp\0"
#define CONFIG_HOST "Host"
#define CONFIG_HARDWARE "Hardware"
// flag = 12 for loading anything
// flag = 13 for selecting path
// flag = 14 for loading filesystem
+// flag = 15 for loading input
+// flag = 16 for recording input
int DiskSelection_2 (HWND hDlg, WPARAM wParam, int flag, struct uae_prefs *prefs, char *path_out, int *multi)
{
static int statefile_previousfilter;
case 10:
fetch_path ("StatefilePath", init_path, sizeof (init_path));
break;
+ case 15:
+ case 16:
+ fetch_path ("InputPath", init_path, sizeof (init_path));
+ break;
}
openFileName.lpstrDefExt = "KEY";
openFileName.lpstrFilter = szFilter;
break;
+ case 15:
+ case 16:
+ WIN32GUI_LoadUIString(flag == 15 ? IDS_RESTOREINP : IDS_SAVEINP, szTitle, MAX_DPATH);
+ WIN32GUI_LoadUIString(IDS_INP, szFormat, MAX_DPATH);
+ sprintf( szFilter, "%s ", szFormat );
+ memcpy( szFilter + strlen( szFilter ), INP_FORMAT_STRING, sizeof (INP_FORMAT_STRING) + 1);
+
+ openFileName.lpstrTitle = szTitle;
+ openFileName.lpstrDefExt = "INP";
+ openFileName.lpstrFilter = szFilter;
+ break;
case 9:
case 10:
WIN32GUI_LoadUIString(flag == 10 ? IDS_RESTOREUSS : IDS_SAVEUSS, szTitle, MAX_DPATH);
openFileName.lCustData = 0;
if (multi)
openFileName.Flags |= OFN_ALLOWMULTISELECT;
- if (flag == 1 || flag == 3 || flag == 5 || flag == 9 || flag == 11) {
+ if (flag == 1 || flag == 3 || flag == 5 || flag == 9 || flag == 11 || flag == 16) {
if (!(result = GetSaveFileName (&openFileName)))
write_log ("GetSaveFileName() failed.\n");
} else {
savestate_initsave (full_path, openFileName.nFilterIndex);
break;
case IDC_CREATE:
- disk_creatediskfile(full_path, 0, SendDlgItemMessage(hDlg, IDC_FLOPPYTYPE, CB_GETCURSEL, 0, 0L));
+ {
+ char disk_name[32];
+ disk_name[0] = 0; disk_name[31] = 0;
+ GetDlgItemText(hDlg, IDC_CREATE_NAME, disk_name, 30);
+ disk_creatediskfile(full_path, 0, SendDlgItemMessage(hDlg, IDC_FLOPPYTYPE, CB_GETCURSEL, 0, 0L), disk_name);
+ }
break;
case IDC_CREATE_RAW:
- disk_creatediskfile(full_path, 1, SendDlgItemMessage(hDlg, IDC_FLOPPYTYPE, CB_GETCURSEL, 0, 0L));
+ disk_creatediskfile(full_path, 1, SendDlgItemMessage(hDlg, IDC_FLOPPYTYPE, CB_GETCURSEL, 0, 0L), NULL);
break;
case IDC_LOAD:
if (target_cfgfile_load(&workprefs, full_path, 0, 0) == 0) {
case IDC_CARTFILE:
strcpy (workprefs.cartfile, full_path);
break;
+ case IDC_INPREC_PLAY:
+ inprec_open(full_path, IsDlgButtonChecked(hDlg, IDC_AVIOUTPUT_AUDIO) == BST_CHECKED ? -2 : -1);
+ break;
+ case IDC_INPREC_RECORD:
+ inprec_open(full_path, 1);
+ break;
}
if (flag == 0 || flag == 1) {
amiga_path = strstr (openFileName.lpstrFile, openFileName.lpstrFileTitle);
EnableWindow (GetDlgItem (hDlg, IDC_FORCE), enable);
EnableWindow (GetDlgItem (hDlg, IDC_JITENABLE), cpu_based_enable);
EnableWindow (GetDlgItem (hDlg, IDC_COMPATIBLE), !workprefs.cpu_cycle_exact && !workprefs.cachesize);
+ EnableWindow (GetDlgItem (hDlg, IDC_COMPATIBLE_FPU), workprefs.cpu_level >= 3);
#ifdef JIT
if( enable )
SendDlgItemMessage (hDlg, IDC_SPEED, TBM_SETPOS, TRUE, workprefs.m68k_speed <= 0 ? 1 : workprefs.m68k_speed / CYCLE_UNIT );
SetDlgItemInt( hDlg, IDC_CPUTEXT, workprefs.m68k_speed <= 0 ? 1 : workprefs.m68k_speed / CYCLE_UNIT, FALSE );
CheckDlgButton (hDlg, IDC_COMPATIBLE, workprefs.cpu_compatible);
+ CheckDlgButton (hDlg, IDC_COMPATIBLE_FPU, workprefs.fpu_strict);
SendDlgItemMessage (hDlg, IDC_CPUIDLE, TBM_SETPOS, TRUE, workprefs.cpu_idle == 0 ? 0 : 12 - workprefs.cpu_idle / 15);
CheckRadioButton (hDlg, IDC_CPU0, IDC_CPU6, cpu_ids[workprefs.cpu_level * 2 + !workprefs.address_space_24]);
static int cachesize_prev;
workprefs.cpu_compatible = workprefs.cpu_cycle_exact | (IsDlgButtonChecked (hDlg, IDC_COMPATIBLE) ? 1 : 0);
+ workprefs.fpu_strict = IsDlgButtonChecked (hDlg, IDC_COMPATIBLE_FPU) ? 1 : 0;
workprefs.m68k_speed = IsDlgButtonChecked (hDlg, IDC_CS_HOST) ? -1
: IsDlgButtonChecked (hDlg, IDC_CS_68000) ? 0
: SendMessage (GetDlgItem (hDlg, IDC_SPEED), TBM_GETPOS, 0, 0) * CYCLE_UNIT;
int sound_freq = workprefs.sound_freq;
int produce_sound = workprefs.produce_sound;
int stereo = workprefs.sound_stereo;
- char txt[100], *p;
+ char txt[100], txt2[100], *p;
int i, selected;
LRESULT idx;
SendDlgItemMessage(hDlg, IDC_SOUNDDRIVESELECT, CB_ADDSTRING, 0, (LPARAM)txt);
WIN32GUI_LoadUIString (IDS_DRIVESOUND_DEFAULT_A500, txt, sizeof (txt));
SendDlgItemMessage(hDlg, IDC_SOUNDDRIVESELECT, CB_ADDSTRING, 0, (LPARAM)txt);
+ driveclick_fdrawcmd_detect();
+ if (driveclick_pcdrivemask) {
+ for (i = 0; i < 2; i++) {
+ WIN32GUI_LoadUIString (IDS_DRIVESOUND_PC_FLOPPY, txt, sizeof (txt));
+ sprintf (txt2, txt, 'A' + i);
+ SendDlgItemMessage(hDlg, IDC_SOUNDDRIVESELECT, CB_ADDSTRING, 0, (LPARAM)txt2);
+ }
+ }
SendDlgItemMessage (hDlg, IDC_SOUNDDRIVESELECT, CB_SETCURSEL, 0, 0);
p = drivesounds;
if (p) {
}
if (workprefs.dfxclick[idx] < 0) {
p = drivesounds;
- i = DS_BUILD_IN_SOUNDS + 1;
+ i = DS_BUILD_IN_SOUNDS + driveclick_pcdrivenum + 1;
while (p && p[0]) {
if (!strcmpi (p, workprefs.dfxclickexternal[idx])) {
SendDlgItemMessage (hDlg, IDC_SOUNDDRIVESELECT, CB_SETCURSEL, i, 0);
if (idx >= 0) {
LRESULT res = SendDlgItemMessage (hDlg, IDC_SOUNDDRIVESELECT, CB_GETCURSEL, 0, 0);
if (res >= 0) {
- if (res > DS_BUILD_IN_SOUNDS) {
- int j = res - (DS_BUILD_IN_SOUNDS + 1);
+ if (res > DS_BUILD_IN_SOUNDS + driveclick_pcdrivenum) {
+ int j = res - (DS_BUILD_IN_SOUNDS + driveclick_pcdrivenum + 1);
char *p = drivesounds;
while (j-- > 0)
p += strlen (p) + 1;
{
static int recursive = 0;
int i;
+ static char diskname[40] = { "empty" };
+
switch (msg)
{
case WM_INITDIALOG:
SetDlgItemText (hDlg, IDC_DF3TEXT, workprefs.df[3]);
SetDlgItemText (hDlg, IDC_DF0TEXTQ, workprefs.df[0]);
SetDlgItemText (hDlg, IDC_DF1TEXTQ, workprefs.df[1]);
+ SetDlgItemText (hDlg, IDC_CREATE_NAME, diskname);
SendDlgItemMessage (hDlg, IDC_FLOPPYSPD, TBM_SETPOS, TRUE,
workprefs.floppy_speed ? exact_log2 ((workprefs.floppy_speed) / 100) + 1 : 0);
out_floppyspeed (hDlg);
deletesaveimage (hDlg, 3);
break;
case IDC_CREATE:
- DiskSelection (hDlg, wParam, 1, &workprefs, 0);
+ DiskSelection(hDlg, wParam, 1, &workprefs, 0);
break;
case IDC_CREATE_RAW:
DiskSelection(hDlg, wParam, 1, &workprefs, 0);
if (joy1previous < 0)
joy1previous = JSEM_LASTKBD + 1;
for (i = 0; i < 2; i++) {
- int total = 1;
+ int total = 2;
int idx = i == 0 ? joy0previous : joy1previous;
int id = i == 0 ? IDC_PORT0_JOYS : IDC_PORT1_JOYS;
int v = i == 0 ? workprefs.jport0 : workprefs.jport1;
#endif
}
- workprefs.win32_midioutdev = (int)SendDlgItemMessage( hDlg, IDC_MIDIOUTLIST, CB_GETCURSEL, 0, 0 );
+ workprefs.win32_midioutdev = SendDlgItemMessage(hDlg, IDC_MIDIOUTLIST, CB_GETCURSEL, 0, 0);
workprefs.win32_midioutdev -= 2;
if( bNoMidiIn )
}
else
{
- workprefs.win32_midiindev = (int)SendDlgItemMessage( hDlg, IDC_MIDIINLIST, CB_GETCURSEL, 0, 0 );
+ workprefs.win32_midiindev = SendDlgItemMessage(hDlg, IDC_MIDIINLIST, CB_GETCURSEL, 0, 0);
}
- EnableWindow( GetDlgItem( hDlg, IDC_MIDIINLIST ), workprefs.win32_midioutdev < -1 ? FALSE : TRUE);
+ EnableWindow(GetDlgItem( hDlg, IDC_MIDIINLIST ), workprefs.win32_midioutdev < -1 ? FALSE : TRUE);
item = SendDlgItemMessage (hDlg, IDC_SERIAL, CB_GETCURSEL, 0, 0L);
switch( item )
default:
workprefs.use_serial = 0;
- strcpy( workprefs.sername, "none" );
+ strcpy(workprefs.sername, "none");
break;
}
workprefs.serial_demand = 0;
workprefs.parallel_postscript_detection = IsDlgButtonChecked (hDlg, IDC_PSPRINTERDETECT) ? 1 : 0;
if (!workprefs.parallel_postscript_detection)
CheckDlgButton (hDlg, IDC_PSPRINTER, 0);
- } else {
+ } else {
values_from_portsdlg (hDlg);
- updatejoyport (hDlg);
+ if (HIWORD (wParam) == CBN_SELCHANGE || HIWORD (wParam) == CBN_KILLFOCUS)
+ updatejoyport (hDlg);
}
inputdevice_updateconfig (&workprefs);
inputdevice_config_change ();
static void values_to_inputdlg (HWND hDlg)
{
- SendDlgItemMessage( hDlg, IDC_INPUTTYPE, CB_SETCURSEL, workprefs.input_selected_setting, 0 );
- SendDlgItemMessage( hDlg, IDC_INPUTDEVICE, CB_SETCURSEL, input_selected_device, 0 );
- SetDlgItemInt( hDlg, IDC_INPUTDEADZONE, workprefs.input_joystick_deadzone, FALSE );
- SetDlgItemInt( hDlg, IDC_INPUTAUTOFIRERATE, workprefs.input_autofire_framecnt, FALSE );
- SetDlgItemInt( hDlg, IDC_INPUTSPEEDD, workprefs.input_joymouse_speed, FALSE );
- SetDlgItemInt( hDlg, IDC_INPUTSPEEDA, workprefs.input_joymouse_multiplier, FALSE );
- SetDlgItemInt( hDlg, IDC_INPUTSPEEDM, workprefs.input_mouse_speed, FALSE );
- CheckDlgButton ( hDlg, IDC_INPUTDEVICEDISABLE, (!input_total_devices || inputdevice_get_device_status (input_selected_device)) ? BST_CHECKED : BST_UNCHECKED);
+ SendDlgItemMessage(hDlg, IDC_INPUTTYPE, CB_SETCURSEL, workprefs.input_selected_setting, 0);
+ SendDlgItemMessage(hDlg, IDC_INPUTDEVICE, CB_SETCURSEL, input_selected_device, 0);
+ SetDlgItemInt(hDlg, IDC_INPUTDEADZONE, workprefs.input_joystick_deadzone, FALSE);
+ SetDlgItemInt(hDlg, IDC_INPUTAUTOFIRERATE, workprefs.input_autofire_framecnt, FALSE);
+ SetDlgItemInt(hDlg, IDC_INPUTSPEEDD, workprefs.input_joymouse_speed, FALSE);
+ SetDlgItemInt(hDlg, IDC_INPUTSPEEDA, workprefs.input_joymouse_multiplier, FALSE);
+ SetDlgItemInt(hDlg, IDC_INPUTSPEEDM, workprefs.input_mouse_speed, FALSE);
+ CheckDlgButton (hDlg, IDC_INPUTDEVICEDISABLE, (!input_total_devices || inputdevice_get_device_status (input_selected_device)) ? BST_CHECKED : BST_UNCHECKED);
}
static void init_inputdlg_2( HWND hDlg )
static void enable_for_avioutputdlg(HWND hDlg)
{
#if defined (PROWIZARD)
- EnableWindow( GetDlgItem( hDlg, IDC_PROWIZARD ), TRUE );
- if (full_property_sheet)
- EnableWindow( GetDlgItem( hDlg, IDC_PROWIZARD ), FALSE );
+ EnableWindow( GetDlgItem( hDlg, IDC_PROWIZARD ), TRUE );
+ if (full_property_sheet)
+ EnableWindow( GetDlgItem( hDlg, IDC_PROWIZARD ), FALSE );
#endif
- EnableWindow(GetDlgItem(hDlg, IDC_SCREENSHOT), full_property_sheet ? FALSE : TRUE);
+ EnableWindow(GetDlgItem(hDlg, IDC_SCREENSHOT), full_property_sheet ? FALSE : TRUE);
- EnableWindow(GetDlgItem(hDlg, IDC_AVIOUTPUT_PAL), TRUE);
- EnableWindow(GetDlgItem(hDlg, IDC_AVIOUTPUT_NTSC), TRUE);
- EnableWindow(GetDlgItem(hDlg, IDC_AVIOUTPUT_FPS), TRUE);
- EnableWindow(GetDlgItem(hDlg, IDC_AVIOUTPUT_FILE), TRUE);
- CheckDlgButton (hDlg, IDC_AVIOUTPUT_FRAMELIMITER, avioutput_framelimiter ? FALSE : TRUE);
+ EnableWindow(GetDlgItem(hDlg, IDC_AVIOUTPUT_PAL), TRUE);
+ EnableWindow(GetDlgItem(hDlg, IDC_AVIOUTPUT_NTSC), TRUE);
+ EnableWindow(GetDlgItem(hDlg, IDC_AVIOUTPUT_FPS), TRUE);
+ EnableWindow(GetDlgItem(hDlg, IDC_AVIOUTPUT_FILE), TRUE);
+ CheckDlgButton (hDlg, IDC_AVIOUTPUT_FRAMELIMITER, avioutput_framelimiter ? FALSE : TRUE);
- if(workprefs.produce_sound < 2)
- {
- EnableWindow(GetDlgItem(hDlg, IDC_AVIOUTPUT_AUDIO), FALSE);
- EnableWindow(GetDlgItem(hDlg, IDC_AVIOUTPUT_AUDIO_STATIC), FALSE);
- avioutput_audio = 0;
- }
- else
- {
- EnableWindow(GetDlgItem(hDlg, IDC_AVIOUTPUT_AUDIO), TRUE);
- EnableWindow(GetDlgItem(hDlg, IDC_AVIOUTPUT_AUDIO_STATIC), TRUE);
-
- }
+ if(workprefs.produce_sound < 2) {
+ EnableWindow(GetDlgItem(hDlg, IDC_AVIOUTPUT_AUDIO), FALSE);
+ EnableWindow(GetDlgItem(hDlg, IDC_AVIOUTPUT_AUDIO_STATIC), FALSE);
+ avioutput_audio = 0;
+ } else {
+ EnableWindow(GetDlgItem(hDlg, IDC_AVIOUTPUT_AUDIO), TRUE);
+ EnableWindow(GetDlgItem(hDlg, IDC_AVIOUTPUT_AUDIO_STATIC), TRUE);
+ }
- if(!avioutput_audio)
- {
- CheckDlgButton(hDlg, IDC_AVIOUTPUT_AUDIO, BST_UNCHECKED);
- WIN32GUI_LoadUIString (IDS_AVIOUTPUT_NOCODEC, aviout_audioc, sizeof (aviout_audioc));
- }
- SetWindowText(GetDlgItem(hDlg, IDC_AVIOUTPUT_AUDIO_STATIC), aviout_audioc);
+ if(!avioutput_audio) {
+ CheckDlgButton(hDlg, IDC_AVIOUTPUT_AUDIO, BST_UNCHECKED);
+ WIN32GUI_LoadUIString (IDS_AVIOUTPUT_NOCODEC, aviout_audioc, sizeof (aviout_audioc));
+ }
+ SetWindowText(GetDlgItem(hDlg, IDC_AVIOUTPUT_AUDIO_STATIC), aviout_audioc);
- if(!avioutput_video)
- {
- CheckDlgButton(hDlg, IDC_AVIOUTPUT_VIDEO, BST_UNCHECKED);
- WIN32GUI_LoadUIString (IDS_AVIOUTPUT_NOCODEC, aviout_videoc, sizeof (aviout_videoc));
- }
- SetWindowText(GetDlgItem(hDlg, IDC_AVIOUTPUT_VIDEO_STATIC), aviout_videoc);
- EnableWindow(GetDlgItem(hDlg, IDC_AVIOUTPUT_ACTIVATED), (!avioutput_audio && !avioutput_video) ? FALSE : TRUE);
+ if(!avioutput_video) {
+ CheckDlgButton(hDlg, IDC_AVIOUTPUT_VIDEO, BST_UNCHECKED);
+ WIN32GUI_LoadUIString (IDS_AVIOUTPUT_NOCODEC, aviout_videoc, sizeof (aviout_videoc));
+ }
+ SetWindowText(GetDlgItem(hDlg, IDC_AVIOUTPUT_VIDEO_STATIC), aviout_videoc);
+ EnableWindow(GetDlgItem(hDlg, IDC_AVIOUTPUT_ACTIVATED), (!avioutput_audio && !avioutput_video) ? FALSE : TRUE);
+
+ EnableWindow(GetDlgItem(hDlg, IDC_INPREC_RECORD), input_recording >= 0);
+ CheckDlgButton(hDlg, IDC_INPREC_RECORD, input_recording > 0 ? BST_CHECKED : BST_UNCHECKED);
+ EnableWindow(GetDlgItem(hDlg, IDC_INPREC_PLAY), input_recording <= 0);
+ CheckDlgButton(hDlg, IDC_INPREC_PLAY, input_recording < 0 ? BST_CHECKED : BST_UNCHECKED);
+ EnableWindow(GetDlgItem(hDlg, IDC_INPREC_PLAYMODE), input_recording == 0);
}
static INT_PTR CALLBACK AVIOutputDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
switch(wParam)
{
+
+ case IDC_INPREC_PLAYMODE:
+ break;
+ case IDC_INPREC_RECORD:
+ if (input_recording)
+ inprec_close ();
+ else
+ DiskSelection(hDlg, wParam, 16, &workprefs, NULL);
+ break;
+ case IDC_INPREC_PLAY:
+ if (input_recording)
+ inprec_close ();
+ else
+ DiskSelection(hDlg, wParam, 15, &workprefs, NULL);
+ break;
+
#ifdef PROWIZARD
case IDC_PROWIZARD:
moduleripper ();
OutputDirectory=".\Debug"
IntermediateDirectory=".\Debug"
ConfigurationType="1"
- InheritedPropertySheets="..\..\..\..\..\msvs8\VC\VCProjectDefaults\UpgradeFromVC71.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
AdditionalOptions="/MACHINE:I386"
AdditionalDependencies="opengl32.lib glu32.lib ws2_32.lib ddraw.lib dxguid.lib winmm.lib comctl32.lib version.lib vfw32.lib msacm32.lib dsound.lib dinput8.lib d3d9.lib d3dx9.lib winio.lib setupapi.lib wininet.lib capsimg.lib dxerr8.lib shlwapi.lib zlibstat.lib libpng.lib lglcd.lib"
ShowProgress="0"
- OutputFile="d:\amiga\winuae.exe"
+ OutputFile="f:\amiga\winuae.exe"
LinkIncremental="2"
SuppressStartupBanner="true"
GenerateManifest="false"
OutputDirectory="x64\$(ConfigurationName)"
IntermediateDirectory="x64\$(ConfigurationName)"
ConfigurationType="1"
- InheritedPropertySheets="..\..\..\..\..\msvs8\VC\VCProjectDefaults\UpgradeFromVC71.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
</Configuration>
<Configuration
Name="Release|Win32"
- OutputDirectory="d:\amiga"
+ OutputDirectory="f:\amiga"
IntermediateDirectory=".\Release"
ConfigurationType="1"
- InheritedPropertySheets="..\..\..\..\..\msvs8\VC\VCProjectDefaults\UpgradeFromVC71.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
<Tool
Name="VCLinkerTool"
AdditionalDependencies="opengl32.lib glu32.lib ws2_32.lib ddraw.lib dxguid.lib winmm.lib comctl32.lib version.lib vfw32.lib msacm32.lib dsound.lib dinput8.lib d3d9.lib d3dx9.lib winio.lib setupapi.lib wininet.lib dxerr8.lib shlwapi.lib zlibstat.lib libpng.lib lglcd.lib"
- OutputFile="d:\amiga\winuae.exe"
+ OutputFile="f:\amiga\winuae.exe"
LinkIncremental="1"
SuppressStartupBanner="true"
AdditionalLibraryDirectories=""
OutputDirectory="$(SolutionDir)x64\$(ConfigurationName)"
IntermediateDirectory="x64\$(ConfigurationName)"
ConfigurationType="1"
- InheritedPropertySheets="..\..\..\..\..\msvs8\VC\VCProjectDefaults\UpgradeFromVC71.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
OutputDirectory="$(SolutionDir)x64\$(ConfigurationName)"
IntermediateDirectory="x64\$(ConfigurationName)"
ConfigurationType="1"
- InheritedPropertySheets="..\..\..\..\..\msvs8\VC\VCProjectDefaults\UpgradeFromVC71.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
OutputDirectory="$(SolutionDir)x64\$(ConfigurationName)"
IntermediateDirectory="x64\$(ConfigurationName)"
ConfigurationType="1"
- InheritedPropertySheets="..\..\..\..\..\msvs8\VC\VCProjectDefaults\UpgradeFromVC71.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
OutputDirectory="$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="1"
- InheritedPropertySheets="..\..\..\..\..\msvs8\VC\VCProjectDefaults\UpgradeFromVC71.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
OutputDirectory="$(SolutionDir)x64\$(ConfigurationName)"
IntermediateDirectory="x64\$(ConfigurationName)"
ConfigurationType="1"
- InheritedPropertySheets="..\..\..\..\..\msvs8\VC\VCProjectDefaults\UpgradeFromVC71.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
RelativePath="..\direct3d.c"
>
</File>
+ <File
+ RelativePath="..\driveclick_win32.c"
+ >
+ </File>
<File
RelativePath="..\dxwrap.c"
>
int count;
DWORD numwritten;
char buffer[ WRITE_LOG_BUF_SIZE ];
-
va_list parms;
va_start (parms, format);
+
+ if (f == NULL)
+ return;
count = _vsnprintf( buffer, WRITE_LOG_BUF_SIZE-1, format, parms );
- if (f == 0) {
- write_log (buffer);
- } else {
- openconsole();
- WriteConsole(stdoutput,buffer,strlen(buffer),&numwritten,0);
- va_end (parms);
- }
+ openconsole();
+ WriteConsole(stdoutput,buffer,strlen(buffer),&numwritten,0);
+ va_end (parms);
}
+++ /dev/null
-Installation
-------------
-
-This program does not need any special installation process.
-
-Pro-Wizard-1 (unix) uses DMalloc. You can dl FreeBSD version here :
-http://prdownloads.sourceforge.net/dmalloc/
-For Linux, try http://dmalloc.com
-
-Prowiz.exe (dos) should be compiled with Cygwin32 GCC compiler.
-It'll require the file CYGWIN1.DLL. It should be put somewhere in the PATH
-(if not present already).
-latest version can be found at:
-ftp://ftp.uni-erlangen.de/pub/pc/gnuwin32/cygwin/mirrors/cygnus/latest/cygwin/
-or on their Web site
-http://www.cygwin.com
-
-Pro-Wizard-1 (amiga) binary is for 68020 chipsets. Compiling the amiga
-version requires at least 8Mb Chip, GCC 2.97.3, ixemul lib and a hell
-of a lot of time :). It was compiled under UAE on FreeBSD.
\ No newline at end of file
+++ /dev/null
-Prowiz4PC: ProWizard for PC
----------------------------
-
-
-Description
------------
-
-Pro-Wizard-1 (for Peecee) is a multi-ripper for music files. (find the
-list in the known formats below). Also, it extracts various data/exe files
-like S404 data files. Most of the music formats are 100% Protracker compatible.
-The ripped formats are ALL amiga formats ! .. for this version of Pro-Wizard
-anyway :).
-
-Note
-----
-
-USE THIS PROGRAM ONLY AT YOUR OWN RISK !
-If this program destroys your data I'm interested in finding the bug,
-but I'm not responsible for the damages.
-
-Legal issues
-------------
-
-The copyright is GNU GPL. See COPYING file.
-
-Requirements
-------------
-
-prowiz (cmdline tool):
- At this stage, only Linux/FreeBSD are supported.
- No MS-DOS/WIN* binary in this package anymore.
- Grab the other packages for other archies.
-
-Behaviour
----------
-
-Output, upon finding a known data file, will be 0.extension, 1.extension, etc. .
-These extensions are editable in the file "_types_" (default name). Read the
-header of this file for specific instructions on how to edit.
-At this stage, I still cant guarantee the program wont crash in certain cases.
-I fixed anything I've found so far, but .. . If you encounter such a case,
-please, send over the data file !.
-
-Motivation
-----------
-
-"I wanted to do it myself" is the main motivation :).
-
-Credits
--------
-
-ProWizard for PC:
-Amiga port:
- Sylvain "Asle" Chipaux
- asle@free.fr
-
-Port under *nix:
- Michael Doering
- mldoering@gmx.net
-
-And various bug reports:
- look in CREDITS file
-
-
-Contact me for any reason. If you think you can help this project to be
-more compatible with different platforms, don't hesitate to contact.
-Bug reports, EXE/Music amiga formats are also welcome !.
+++ /dev/null
-###############################################################################
-# #
-# _types_ : should be part of Pro-Wizard 1 (for PC/Unix/Amiga). #
-# #
-# #
-# #
-# 1997-2003 (c) Sylvain "asle" Chipaux #
-# #
-###############################################################################
-#
-# Edit the extensions of the known formats
-#
-# BEWARE: Leave the order the way it is !!. It's fastly coded and I didn't
-# want to spend all night on this small thing !.
-# Beside the lines with the extensions, there should NOT be any empty
-# lines !. Add as many lines as you want, as long as you begin them
-# with '#'.
-# And last, an extension can be from 2 to 32 chars long.
-#
-# NOTE: at now, there should be 116 extensions.
-#
-###############################################################################
-#
-# list starts now ...
-#
-###############################################################################
-##01 : AC1D packer (AC1D_packer)
-ac1d
-#
-##02 : Sound monitor v2 / v3 (SoundMonitor)
-bp
-#
-##03 : FC-M packer (FC_M_packer)
-fc-m
-#
-##04 : Hornet packer (Hornet_packer)
-hrt
-#
-##05 : KRIS tracker (KRIS_tracker)
-kris
-#
-##06 : OPTIMOD's power music (Power_Music)
-PowerMusic
-#
-##07 : Promizer 1.0c (Promizer_10c)
-Promizer10c
-#
-##08 : Promizer 1.8a (Promizer_18a)
-Promizer18a
-#
-##09 : Promizer 2.0 (Promizer_20)
-Promizer20
-#
-##10 : ProRunner v1 (ProRunner_v1)
-ProRunner1
-#
-##11 : ProRunner v2 (ProRunner_v2)
-ProRunner2
-#
-##12 : SKYT packer (SKYT_packer)
-skyt
-#
-##13 : Wanton packer (Wanton_packer)
-WantonPacker
-#
-##14 : XANN packer (XANN_packer)
-xann
-#
-##15 : Module Protector (Module_protector)
-ModuleProtector
-#
-##16 : Digital Illusion (Digital_illusion)
-DigitalIllusion
-#
-##17 : Pha Packer (Pha_packer)
-PhaPacker
-#
-##18 : Promizer 0.1 (Promizer_01)
-Promizer01
-#
-##19 : ProPacker 2.1 (Propacker_21)
-ProPacker21
-#
-##20 : ProPacker 3.0 (Propacker_30)
-ProPacker30
-#
-##21 : Eureka packer (Eureka_packer)
-Eureka
-#
-##22 : StarTrekker pack (Star_pack)
-StarTrekkerPack
-#
-##23 : Protracker (Protracker)
-mod
-#
-##24 : UNIC tracker v1 (UNIC_v1)
-unic1
-#
-##25 : UNIC tracker v2 (UNIC_v2)
-unic2
-#
-##26 : Fuzzac packer (Fuzzac)
-Fuzzac
-#
-##27 : Game music creator (GMC)
-gmc
-#
-##28 : Heatseeker (Heatseeker)
-crb
-#
-##29 : Kefrens sound machine (KSM)
-ksm
-#
-##30 : Noiserunner (Noiserunner)
-Noiserunner
-#
-##31 : NoisePacker v1 (Noisepacker1)
-NoisePacker1
-#
-##32 : NoisePacker v2 (Noisepacker2)
-NoisePacker2
-#
-##33 : NoisePacker v3 (Noisepacker3)
-NoisePacker3
-#
-##34 : The player 4.0A (P40A)
-P40A
-#
-##35 : The player 4.0B (P40B)
-P40B
-#
-##36 : The player 4.1A (P41A)
-P41A
-#
-##37 : Promizer 4.0 (PM40)
-Promizer4
-#
-##38 : Propacker 1.0 (PP10)
-ProPacker1
-#
-##39 : Tracker packer 1.0 (TP1)
-TrackerPacker1
-#
-##40 : Tracker packer 2.0 (TP2)
-TrackerPacker2
-#
-##41 : Tracker packer 3.0 (TP3)
-TrackerPacker3
-#
-##42 : Zen packer (ZEN)
-ZenPacker
-#
-##43 : The player 5.0A (P50A)
-P50A
-#
-##44 : The player 6.0A (P60A)
-P60A
-#
-##45 : StarTrekker (StarTrekker)
-mod
-#
-##46 : StoneCracker 4.04 Data (S404) (also S401,S403,S310 and S300)
-StoneCrackerData
-#
-##47 : StoneCracker 2.70 (exe)
-StoneCracker270
-#
-##48 : The Player 6.1A (P61A)
-P61A
-#
-##49 : STIM_Slamtilt (STIM)
-stim
-#
-##50 : SoundTracker
-mod
-#
-##51 : Tetrapack 2.2 (TPACK22)
-TetraPack22
-#
-##52 : Crunchmania / Normal (CRM2/CRM!) / Address
-CrunchmaniaData
-#
-##53 : Defjam Cruncher 3.2 / 3.2 pro (Defjam_32)
-DefjamCruncher
-#
-##54 : Tetrapack 2.1 (TPACK21)
-Tetrapack21
-#
-##55 : IAM Packer 1.0 data
-ice
-#
-##56 : Byte Killer 1.3 / 2.0 / 3.0 and Pro 1.0
-ByteKiller
-#
-##57 : XPK file
-xpk
-#
-##58 : Imploder (data)
-Imploder
-#
-##59 : Propack (RNC) data
-rnc
-#
-##60 : Double Action 1.0 (exe) (Double_Action)
-DoubleAction
-#
-##61 : Powerpacker 3.0 (exe) (Powerpacker3)
-PowerPacker3
-#
-##62 : Powerpacker 4.0 (exe) (Powerpacker4 & PP4 library)
-PowerPacker4
-#
-##63 : Powerpacker 2.3 (exe) (Powerpacker23)
-PowerPacker23
-#
-##64 : Spike Cruncher (exe) (SpikeCruncher)
-SpikeCruncher
-#
-##65 : Tetrapack 1.02 (exe) (TPACK102)
-Tetrapack102
-#
-##66 : Time Cruncher 1.7 (exe) (TimeCruncher)
-TimeCruncher17
-#
-##67 : MasterCruncher
-MasterCruncher
-#
-##68 : Master Cruncher 3.0 address (MasterCruncher)
-## Mega Cruncher 1.0 / 1.2
-MegaCruncher
-#
-##69 : JamCracker / Pro (JamCracker)
-jam
-#
-##70 : BSI Future Composer (BSIFC)
-BSI-FC
-#
-##71 : DigiBooster 1.7 (DigiBooster)
-digi
-#
-##72 : Quadra Composer (QuadraComposer)
-qc
-#
-##73 : The Dark Demon (TDD)
-TheDarkDemon
-#
-##74 : Fuchs Tracker (FuchsTracker)
-FuchsTracker
-#
-##75 : Syncro Packer 4.6
-SynchroPacker46
-#
-##76 : TNM Cruncher 1.1 (TNMCruncher)
-TNMCruncher11
-#
-##77 : Super Cuncher 2.7 (SuperCruncher)
-SuperCruncher27
-#
-##78 : PPbk (AMOS PowerPacker Bank) (PP20 inside)
-PPbk
-#
-##79 : Relok It 1.0 (RelokIt)
-RelokIt1
-#
-##80 : StoneCracker 2.92 data
-StoneCracker292data
-#
-##81 : FIRE (RNC clone) Cruncher (data) (FIRE)
-fire
-#
-##82 : Max Packer 1.2 (MaxPacker)
-MaxPacker12
-#
-##83 : SoundFX 1.3 (SoundFX)
-SoundFX13
-#
-##84 : arcD Data Cruncher (arcD)
-arcD
-#
-##85 : PARA Data Cruncher (PARA)
-para
-#
-##86 : CRND Data Cruncher (CRND)
-crnd
-#
-##87 : =SB= Data Cruncher (SB_DataCruncher)
--sb-
-#
-##88 : SF Data Cruncher (SF)
-sf
-#
-##89 : RLE Data Cruncher (RLE)
-RLE
-#
-##90 : Virtual Dreams (VDCO) Data Cruncher (VDCO)
-VDC0
-#
-##91 : SQ Data Cruncher (SQ)
-sq
-#
-##92 : SP Data Cruncher (SP)
-sp
-#
-##93 : SoundTracker 2.6 (ST2)
-ST2
-#
-##94 : IceTracker 1.0 (IT1)
-IT1
-#
-##95 : HQC Cruncher 2.0 (HQC)
-HQC
-#
-##96 : Try-It Cruncher 1.01 (TIC)
-TIC
-#
-##97 : Future Composer 1.0 - 1.3 (FC3)
-FC3
-#
-##98 : Future Composer 1.4 (FC4)
-FC4
-#
-##99 : Amnesty Design (1AM) Data Cruncher
-1AM
-#
-##100 : Amnesty Design (2AM) Data Cruncher
-2AM
-#
-##101 : MED / OctaMED (MMD0/MMD1/MMD2/MMD3)
-med
-#
-##102 : Ace? (Cruncher Data)
-AceCruncherData
-#
-##103 : Newtron packer (real name ?)
-Newtron
-#
-##104 : GPMO (Crunch player ?)
-GPMO
-#
-##105 : Polka Packer
-PolkaPacker
-#
-##106 : GnuPlayer
-GnuPlayer
-#
-##107 : -CJ- Data Cruncher
-CJ_DataCruncher
-#
-##108 : AmBk
-AmBk
-#
-##109 : Master Cruncher 3.0 data
-MasterCruncher3data
-#
-##110 : fasttracker 2
-xm
-#
-##111 : Megacruncher obj
-MegaCruncherObj
-#
-##112 : Turbo Squeezer 6.1
-TurboSqueezer61
-#
-##113 : Stonecracker 2.99d
-StoneCracker299d
-#
-##114 : StoneCracker 3.10
-StoneCracker310
-#
-##115 : StoneCracker 2.99b
-StoneCracker299b
-#
-##116 : StoneCracker 2.99
-StoneCracker299
-#
-##117 : StoneCracker 3.00
-StoneCracker300
-#
-##118 : The Player 3.0a
-ThePlayer30a
-#
-##119 : The Player 2.2a
-ThePlayer22a
-#
-##120 : Noise from Heaven
-NoiseFromHeaven
-#
-###############################################################################
-###############################################################################
\ No newline at end of file
+++ /dev/null
-/*
- * ac1d.c 1996-1997 (c) Asle / ReDoX
- *
- * Converts AC1D packed MODs back to PTK MODs
- * thanks to Gryzor and his ProWizard tool ! ... without it, this prog
- * would not exist !!!
- *
- * Last update: 30/11/99
- * - removed open() (and other fread()s and the like)
- * - general Speed & Size Optmizings
-*/
-
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Depack_AC1D ( void )
-{
- Uchar NO_NOTE=0xff;
- Uchar c1,c2,c3,c4;
- Uchar *Whatever;
- Uchar Nbr_Pat;
- Uchar poss[37][2];
- Uchar Note,Smp,Fx,FxVal;
- long Sample_Data_Address;
- long WholeSampleSize=0;
- long Pattern_Addresses[128];
- long Pattern_Sizes[128];
- long siztrack1,siztrack2,siztrack3;
- long i,j,k;
- long Where = PW_Start_Address;
- FILE *out;
-
- if ( Save_Status == BAD )
- return;
-
- memset (Pattern_Addresses , 0 , 128*4);
- BZERO (Pattern_Sizes , 128*4);
-
-
-#ifdef DOS
- #include "..\include\ptktable.h"
-#endif
-#ifdef UNIX
- #include "../include/ptktable.h"
-#endif
-
-
- sprintf ( Depacked_OutName , "%ld.mod" , Cpt_Filename-1 );
- out = mr_fopen ( Depacked_OutName , "w+b" );
- if (!out)
- return;
-
- /* bypass ID */
- Where += 4;
-
- Sample_Data_Address = (in_data[Where]*256*256*256)+
- (in_data[Where+1]*256*256)+
- (in_data[Where+2]*256)+
- in_data[Where+3];
- Where += 4;
- /*printf ( "adress of sample datas : %ld\n" , Sample_Data_Address );*/
-
- /* write title */
- Whatever = (Uchar *) malloc (1024);
- BZERO ( Whatever , 1024 );
- fwrite ( Whatever , 20 , 1 , out );
-
- for ( i=0 ; i<31 ; i++ )
- {
- fwrite ( Whatever , 22 , 1 , out );
- WholeSampleSize += (((in_data[Where]*256)+in_data[Where+1])*2);
- fwrite ( &in_data[Where] , 8 , 1 , out );
- Where += 8;
- }
- /*printf ( "Whole sample size : %ld\n" , WholeSampleSize );*/
-
- /* pattern addresses */
- for ( Nbr_Pat=0 ; Nbr_Pat<128 ; Nbr_Pat++ )
- {
- Pattern_Addresses[Nbr_Pat] = (in_data[Where]*256*256*256)+
- (in_data[Where+1]*256*256)+
- (in_data[Where+2]*256)+
- in_data[Where+3];
- Where += 4;
- if ( Pattern_Addresses[Nbr_Pat] == 0 )
- break;
- }
- Nbr_Pat -= 1;
- /*printf ( "Number of pattern saved : %d\n" , Nbr_Pat );*/
-
- for ( i=0 ; i<(Nbr_Pat-1) ; i++ )
- {
- Pattern_Sizes[i] = Pattern_Addresses[i+1]-Pattern_Addresses[i];
- }
-
-
- /* write number of pattern pos */
- /* write "noisetracker" byte */
- fwrite ( &in_data[PW_Start_Address] , 2 , 1 , out );
-
- /* go to pattern table .. */
- Where = PW_Start_Address + 0x300;
-
- /* pattern table */
- fwrite ( &in_data[Where] , 128 , 1, out );
- Where += 128;
-
- /* write ID */
- Whatever[0] = 'M';
- Whatever[1] = '.';
- Whatever[2] = 'K';
- Whatever[3] = '.';
- fwrite ( Whatever , 4 , 1 , out );
-
-
- /* pattern data */
- for ( i=0 ; i<Nbr_Pat ; i++ )
- {
- Where = PW_Start_Address + Pattern_Addresses[i];
- siztrack1 = (in_data[Where]*256*256*256)+
- (in_data[Where+1]*256*256)+
- (in_data[Where+2]*256)+
- in_data[Where+3];
- Where += 4;
- siztrack2 = (in_data[Where]*256*256*256)+
- (in_data[Where+1]*256*256)+
- (in_data[Where+2]*256)+
- in_data[Where+3];
- Where += 4;
- siztrack3 = (in_data[Where]*256*256*256)+
- (in_data[Where+1]*256*256)+
- (in_data[Where+2]*256)+
- in_data[Where+3];
- Where += 4;
- BZERO ( Whatever , 1024 );
- for ( k=0 ; k<4 ; k++ )
- {
- for ( j=0 ; j<64 ; j++ )
- {
- Note = Smp = Fx = FxVal = 0x00;
- c1 = in_data[Where++];
- if ( ( c1 & 0x80 ) == 0x80 )
- {
- c4 = c1 & 0x7f;
- j += (c4 - 1);
- continue;
- }
- c2 = in_data[Where++];
- Smp = ( (c1&0xc0) >> 2 );
- Smp |= (( c2 >> 4 ) & 0x0f);
- Note = c1 & 0x3f;
- if ( Note == 0x3f )
- Note = NO_NOTE;
- else if ( Note != 0x00 )
- Note -= 0x0b;
- if ( Note == 0x00 )
- Note += 0x01;
- Whatever[j*16+k*4] = Smp&0xf0;
- if ( Note != NO_NOTE )
- {
- Whatever[j*16+k*4] |= poss[Note][0];
- Whatever[j*16+k*4+1] = poss[Note][1];
- }
- if ( (c2 & 0x0f) == 0x07 )
- {
- Fx = 0x00;
- FxVal = 0x00;
- Whatever[j*16+k*4+2] = (Smp << 4)&0xf0;
- continue;
- }
- c3 = in_data[Where++];
- Fx = c2 & 0x0f;
- FxVal = c3;
- Whatever[j*16+k*4+2] = ((Smp<<4)&0xf0);
- Whatever[j*16+k*4+2] |= Fx;
- Whatever[j*16+k*4+3] = FxVal;
- }
- }
- fwrite ( Whatever , 1024 , 1 , out );
- /*printf ( "+" );*/
- }
- free ( Whatever );
- /*printf ( "\n" );*/
-
- /* sample data */
- Where = PW_Start_Address + Sample_Data_Address;
- fwrite ( &in_data[Where] , WholeSampleSize , 1 , out );
-
- /* crap ... */
- Crap ( " AC1D Packer " , BAD , BAD , out );
-
- fflush ( out );
- fclose ( out );
-
- printf ( "done\n" );
- return; /* useless ... but */
-}
+++ /dev/null
-/*
- * ambk.c mar 2003 (c) Asle / ReDoX
- *
- * based in Kyz description ... thx !.
- *
-*/
-
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Depack_AmBk ( void )
-{
- /*Uchar c1,c2,c3,c4;*/
- Uchar *Whatever,*address;
- Uchar poss[37][2];
- /*Uchar Note,Smp,Fx,FxVal;*/
- long i,j,k;
- long Where = PW_Start_Address;
- long INST_HDATA_ADDY,SONGS_DATA_ADDY,PAT_DATA_ADDY;/*,INST_DATA_ADDY;*/
- long BANK_LEN;
- long smps_addys[31],smp_sizes[31];
- FILE *out;
-
- if ( Save_Status == BAD )
- return;
-
-
-#ifdef DOS
- #include "..\include\ptktable.h"
-#endif
-#ifdef UNIX
- #include "../include/ptktable.h"
-#endif
-
-
- sprintf ( Depacked_OutName , "%ld.mod" , Cpt_Filename-1 );
- out = mr_fopen ( Depacked_OutName , "w+b" );
- if (!out)
- return;
-
- Whatever = (Uchar *) malloc (1024);
- BZERO (Whatever,1024);
-
- BANK_LEN = ((in_data[Where + 0x09]*256*256)+
- (in_data[Where + 0x0a]*256)+
- in_data[Where + 0x0b]) + 0x0c;
-
- INST_HDATA_ADDY = ((in_data[Where + 0x14]*256*256*256)+
- (in_data[Where + 0x15]*256*256)+
- (in_data[Where + 0x16]*256)+
- in_data[Where + 0x17]) + 0x14;
- SONGS_DATA_ADDY = ((in_data[Where + 0x18]*256*256*256)+
- (in_data[Where + 0x19]*256*256)+
- (in_data[Where + 0x1A]*256)+
- in_data[Where + 0x1B]) + 0x14;
- PAT_DATA_ADDY = ((in_data[Where + 0x1C]*256*256*256)+
- (in_data[Where + 0x1D]*256*256)+
- (in_data[Where + 0x1E]*256)+
- in_data[Where + 0x1F]) +0x14;
-
- /* title stuff */
- Where = PW_Start_Address + SONGS_DATA_ADDY;
- j = in_data[Where]*256 + in_data[Where+1]; /* number of songs */
- if ( j > 1 )
- {
- printf ( "\n!!! unsupported feature in depack_AmBk() - send this file to asle@free.fr !\n" );
- return;
- }
- j = ((in_data[Where+2]*256*256*256)+(in_data[Where+3]*256*256)+(in_data[Where+4]*256)+in_data[Where+5]);
- fwrite ( &in_data[Where + j + 0x0c], 16, 1, out );
- fwrite ( Whatever, 4, 1, out );
-
- Where = PW_Start_Address + INST_HDATA_ADDY;
- /*printf ( "\naddy of instrument headers : %ld\n", Where );*/
-
- /* samples header + data */
- j = (in_data[Where]*256) + in_data[Where+1]; /* nbr of samples */
- /*printf ( "nbr of samples : %ld\n", j );*/
- Where += 2;
- for ( i=0 ; i<j ; i++ )
- {
- smps_addys[i] = ((in_data[Where]*256*256*256)+(in_data[Where+1]*256*256)+(in_data[Where+2]*256)+in_data[Where+3]);
- /* printf ( "sample[%ld] : %ld\n", i,smps_addys[i]);*/
- /* sample name */
- fwrite ( &in_data[Where+16], 16, 1, out );
- fwrite ( Whatever, 6, 1, out ); /* pad */
- /* size */
- k = 0x0e;
- if ( (in_data[Where+ 0x0e] == 0x00) && (in_data[Where + 0x0f] == 0x00))
- k = 0x08;
- if ( (((in_data[Where+k]*256) + in_data[Where+k+1]) == 2 )||
- (((in_data[Where+k]*256) + in_data[Where+k+1]) == 4 ))
- fwrite (&Whatever[0], 2, 1, out );
- else
- {
- fwrite (&in_data[Where+k], 2, 1, out );
- smp_sizes[i] = (in_data[Where+k]*256) + in_data[Where+k];
- }
- /* fine + vol */
- fwrite ( &in_data[Where + 0x0c], 2, 1, out );
- /* loop */
- k = (in_data[Where+ 0x05]*256*256) + (in_data[Where + 0x06]*256) + in_data[Where + 0x07];
- if ( k < smps_addys[0] )
- fwrite (&Whatever[0], 2, 1, out );
- else
- {
- k -= smps_addys[i]; k/=2;
- /* PC only code !!! */
- address = (Uchar *) &k;
- Whatever[32] = *(address+1);
- Whatever[33] = *address;
- fwrite ( &Whatever[32], 2, 1, out );
- }
-
- /* loop size */
- if ( (in_data[Where + 0x0a] == 0x00) && (in_data[Where + 0x0b] <= 0x02) )
- {
- Whatever[29] = 0x01;
- fwrite ( &Whatever[28], 2, 1, out );
- }
- else
- fwrite ( &in_data[Where + 0x0a], 2, 1, out );
-
- Where += 32;
- /*printf ( "where out : %x\n", ftell (out ));*/
- }
- /* padding to 31 samples */
- while (i++ < 31)
- fwrite ( Whatever, 30, 1, out );
- /* end of sample header */
-
-
-
- /* crap ... */
- /* Crap ( " AmBk " , BAD , BAD , out );*/
-
- fflush ( out );
- fclose ( out );
-
- printf ( "done\n" );
- return; /* useless ... but */
-}
+++ /dev/null
-/*
- * Digital_Illusion.c 1997 (c) Asle / ReDoX
- *
- * Converts DI packed MODs back to PTK MODs
- * thanks to Gryzor and his ProWizard tool ! ... without it, this prog
- * would not exist !!!
- *
- * Last update: 30/11/99
- * - removed open() (and other fread()s and the like)
- * - general Speed & Size Optmizings
-*/
-
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-
-void Depack_DI ( void )
-{
- Uchar Note,Smp,Fx,FxVal;
- Uchar poss[37][2];
- Uchar *Whatever;
- long i=0,k=0;
- Ushort Pattern_Addresses_Table[128];
- long Add_Pattern_Table=0;
- long Add_Pattern_Data=0;
- long Add_Sample_Data=0;
- long Total_Sample_Size=0;
- long Where = PW_Start_Address;
- FILE *out;
-
- if ( Save_Status == BAD )
- return;
-
-#ifdef DOS
- #include "..\include\ptktable.h"
-#endif
-
-#ifdef UNIX
- #include "../include/ptktable.h"
-#endif
-
- BZERO ( Pattern_Addresses_Table , 128*2 );
-
- sprintf ( Depacked_OutName , "%ld.mod" , Cpt_Filename-1 );
- out = mr_fopen ( Depacked_OutName , "w+b" );
- if (!out)
- return;
-
- /* title */
- Whatever = (Uchar *) malloc (1024);
- BZERO ( Whatever , 1024 );
- fwrite ( Whatever , 20 , 1 , out );
-
- k = (in_data[Where]*256)+in_data[Where+1];
- Where += 2;
- /*printf ( "Number of sample : %d\n" , k );*/
-
- Add_Pattern_Table = (in_data[Where+1]*256*256)+
- (in_data[Where+2]*256)+
- in_data[Where+3];
- Where += 4;
- /*printf ( "Pattern table address : %ld\n" , Add_Pattern_Table );*/
-
- Add_Pattern_Data = (in_data[Where+1]*256*256)+
- (in_data[Where+2]*256)+
- in_data[Where+3];
- Where += 4;
- /*printf ( "Pattern data address : %ld\n" , Add_Pattern_Data );*/
-
- Add_Sample_Data = (in_data[Where+1]*256*256)+
- (in_data[Where+2]*256)+
- in_data[Where+3];
- Where += 4;
- /*printf ( "Sample data address : %ld\n" , Add_Sample_Data );*/
-
-
- for ( i=0 ; i<k ; i++ )
- {
- fwrite ( Whatever , 22 , 1 , out );
-
- Total_Sample_Size += (((in_data[Where]*256)+in_data[Where+1])*2);
- fwrite ( &in_data[Where] , 8 , 1 , out );
- Where += 8;
- }
- /*printf ( "Whole sample size : %ld\n" , Total_Sample_Size );*/
-
- Whatever[29] = 0x01;
- for ( i=k ; i<31 ; i++ )
- fwrite ( Whatever , 30 , 1 , out );
-
- k = Where;
-
- Where = PW_Start_Address + Add_Pattern_Table;
- i=0;
- do
- {
- Whatever[200] = in_data[Where++];
- Whatever[i]=Whatever[200];
- i+=1;
- }while ( Whatever[200] != 0xff );
- Whatever[i-1] = 0x00;
- Whatever[257] = i-1;
- fwrite ( &Whatever[257] , 1 , 1 , out );
-
- Whatever[256] = 0x7f;
- fwrite ( &Whatever[256] , 1 , 1 , out );
-
- Whatever[256] = 0;
- for ( i=0 ; i<128 ; i++ )
- {
- if ( Whatever[i] > Whatever[256] )
- Whatever[256] = Whatever[i];
- }
- fwrite ( Whatever , 128 , 1 , out );
-
- /*printf ( "Number of pattern : %d\n" , Whatever[257] );*/
- /*printf ( "Highest pattern number : %d\n" , Whatever[256] );*/
-
- Whatever[0] = 'M';
- Whatever[1] = '.';
- Whatever[2] = 'K';
- Whatever[3] = '.';
- fwrite ( Whatever , 4 , 1 , out );
-
-
- Where = k;
- for ( i=0 ; i<=Whatever[256] ; i++ )
- {
- Pattern_Addresses_Table[i] = (in_data[Where]*256)+in_data[Where+1];
- Where += 2;
- }
-
- for ( i=0 ; i<=Whatever[256] ; i++ )
- {
- Where = PW_Start_Address + Pattern_Addresses_Table[i];
- for ( k=0 ; k<256 ; k++ ) /* 256 = 4(voices) * 64(rows) */
- {
- Whatever[0] = Whatever[1] = Whatever[2] = Whatever[3] = 0x00;
- Whatever[10] = in_data[Where++];
- if ( (Whatever[10] & 0x80) == 0 )
- {
- Whatever[11] = in_data[Where++];
- Note = ( ((Whatever[10] << 4) & 0x30) | ( ( Whatever[11]>>4 ) & 0x0f ) );
- Whatever[0] = poss[Note][0];
- Whatever[1] = poss[Note][1];
- Smp = (Whatever[10] >> 2) & 0x1f;
- Whatever[0] |= (Smp & 0xf0);
- Whatever[2] = (Smp << 4) & 0xf0;
- Fx = Whatever[11] & 0x0f;
- Whatever[2] |= Fx;
- FxVal = 0x00;
- Whatever[3] = FxVal;
- fwrite ( Whatever , 4 , 1 , out );
- continue;
- }
- if ( Whatever[10] == 0xff )
- {
- Whatever[0] = Whatever[1] = Whatever[2] = Whatever[3] = 0x00;
- fwrite ( Whatever , 4 , 1 , out );
- continue;
- }
- Whatever[11] = in_data[Where++];
- Whatever[12] = in_data[Where++];
- Note = ( ((Whatever[10] << 4) & 0x30) | ( (Whatever[11] >> 4) & 0x0f ) );
- Whatever[0] = poss[Note][0];
- Whatever[1] = poss[Note][1];
- Smp = (Whatever[10] >> 2) & 0x1f;
- Whatever[0] |= (Smp & 0xf0);
- Whatever[2] = (Smp << 4) & 0xf0;
- Fx = Whatever[11] & 0x0f;
- Whatever[2] |= Fx;
- FxVal = Whatever[12];
- Whatever[3] = FxVal;
- fwrite ( Whatever , 4 , 1 , out );
- }
- }
- free ( Whatever );
-
-
- Where = PW_Start_Address + Add_Sample_Data;
- fwrite ( &in_data[Where] , Total_Sample_Size , 1 , out );
-
- Crap ( " Digital Illusion " , BAD , BAD , out );
-
- fflush ( out );
- fclose ( out );
-
- printf ( "done\n" );
- return; /* useless ... but */
-
-}
+++ /dev/null
-/*
- * EurekaPacker.c 1997 (c) Asle / ReDoX
- *
- * Converts MODs packed with Eureka packer back to ptk
- *
- * Last update: 30/11/99
- * - removed open() (and other fread()s and the like)
- * - general Speed & Size Optmizings
-*/
-
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Depack_EUREKA ( void )
-{
- Uchar *Whatever;
- Uchar c1=0x00;
- Uchar Pat_Max=0x00;
- long Sample_Start_Address=0;
- long WholeSampleSize=0;
- long Track_Address[128][4];
- long i=0,j=0,k;
- long Where = PW_Start_Address;
- FILE *out;
-
- if ( Save_Status == BAD )
- return;
-
- sprintf ( Depacked_OutName , "%ld.mod" , Cpt_Filename-1 );
- out = mr_fopen ( Depacked_OutName , "w+b" );
- if (!out)
- return;
-
- /* read header ... same as ptk */
- fwrite ( &in_data[Where] , 1080 , 1 , out );
-
- /* now, let's sort out that a bit :) */
- /* first, the whole sample size */
- for ( i=0 ; i<31 ; i++ )
- WholeSampleSize += (((in_data[Where+i*30+42]*256)+in_data[Where+i*30+43])*2);
- /*printf ( "Whole sample size : %ld\n" , WholeSampleSize );*/
-
- /* next, the size of the pattern list */
- /*printf ( "Size of pattern list : %d\n" , in_data[Where+950] );*/
-
- /* now, the pattern list .. and the max */
- Pat_Max = 0x00;
- for ( i=0 ; i<128 ; i++ )
- {
- if ( in_data[Where+952+i] > Pat_Max )
- Pat_Max = in_data[Where+952+i];
- }
- Pat_Max += 1;
- /*printf ( "Number of patterns : %d\n" , Pat_Max );*/
-
- /* write ptk's ID */
- Whatever = (Uchar *) malloc (1024);
- BZERO ( Whatever , 1024 );
- Whatever[0] = 'M';
- Whatever[1] = '.';
- Whatever[2] = 'K';
- Whatever[3] = '.';
- fwrite ( Whatever , 4 , 1 , out );
-
-
- /* read sample data address */
- Where = PW_Start_Address+1080;
- Sample_Start_Address = (in_data[Where]*256*256*256)+
- (in_data[Where+1]*256*256)+
- (in_data[Where+2]*256)+
- in_data[Where+3];
- Where += 4;
- /*printf ( "Address of sample data : %ld\n" , Sample_Start_Address );*/
-
- /* read tracks addresses */
- for ( i=0 ; i<Pat_Max ; i++ )
- {
- for ( j=0 ; j<4 ; j++ )
- {
- Track_Address[i][j] = (in_data[Where]*256)+in_data[Where+1];
- Where += 2;
- }
- }
-
- /* the track data now ... */
- for ( i=0 ; i<Pat_Max ; i++ )
- {
- BZERO ( Whatever , 1024 );
- for ( j=0 ; j<4 ; j++ )
- {
- Where = PW_Start_Address + Track_Address[i][j];
- for ( k=0 ; k<64 ; k++ )
- {
- c1 = in_data[Where++];
- if ( ( c1 & 0xc0 ) == 0x00 )
- {
- Whatever[k*16+j*4] = c1;
- Whatever[k*16+j*4+1] = in_data[Where++];
- Whatever[k*16+j*4+2] = in_data[Where++];
- Whatever[k*16+j*4+3] = in_data[Where++];
- continue;
- }
- if ( ( c1 & 0xc0 ) == 0xc0 )
- {
- k += (c1&0x3f);
- continue;
- }
- if ( ( c1 & 0xc0 ) == 0x40 )
- {
- Whatever[k*16+j*4+2] = c1&0x0f;
- Whatever[k*16+j*4+3] = in_data[Where++];
- continue;
- }
- if ( ( c1 & 0xc0 ) == 0x80 )
- {
- Whatever[k*16+j*4] = in_data[Where++];
- Whatever[k*16+j*4+1] = in_data[Where++];
- Whatever[k*16+j*4+2] = (c1<<4)&0xf0;
- continue;
- }
- }
- }
- fwrite ( Whatever , 1024 , 1 , out );
- /*printf ( "+" );*/
- }
- free ( Whatever );
-
- /* go to sample data addy */
- Where = PW_Start_Address + Sample_Start_Address;
-
- /* read sample data */
- fwrite ( &in_data[Where] , WholeSampleSize , 1 , out );
-
- /* crap .. */
- Crap ( " EUREKA Packer " , BAD , BAD , out );
-
- fflush ( out );
- fclose ( out );
-
- printf ( "done\n" );
- return; /* useless ... but */
-}
-
+++ /dev/null
-/*
- * FC-M_Packer.c 1997 (c) Asle / ReDoX
- *
- * Converts back to ptk FC-M packed MODs
- *
- * Last update: 28/11/99
- * - removed open() (and other fread()s and the like)
- * - general Speed & Size Optmizings
-*/
-
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Depack_FC_M ( void )
-{
- Uchar *Whatever;
- long i=0;
- long WholeSampleSize=0;
- long Where = PW_Start_Address;
- FILE *out;
-
- if ( Save_Status == BAD )
- return;
-
- sprintf ( Depacked_OutName , "%ld.mod" , Cpt_Filename-1 );
- out = mr_fopen ( Depacked_OutName , "w+b" );
- if (!out)
- return;
-
- /* bypass "FC-M" ID */
- /* bypass what looks like the version number .. */
- /* bypass "NAME" chunk */
- /*Where += 10;*/
-
- /* read and write title */
- fwrite ( &in_data[Where+10] , 20 , 1 , out );
- /* bypass "INST" chunk */
- Where += 34;
-
- /* read and write sample descriptions */
- Whatever = (Uchar *)malloc(256);
- BZERO ( Whatever , 256 );
- for ( i=0 ; i<31 ; i++ )
- {
- /*sample name*/
- fwrite ( Whatever , 22 , 1 , out );
-
- WholeSampleSize += (((in_data[Where]*256)+in_data[Where+1])*2);
- fwrite ( &in_data[Where] , 6 , 1 , out );
- Whatever[32] = in_data[Where+7];
- if ( (in_data[Where+6] == 0x00) && (in_data[Where+7] == 0x00) )
- Whatever[32] = 0x01;
- fwrite ( &in_data[Where+6] , 1 , 1 , out );
- fwrite ( &Whatever[32] , 1 , 1 , out );
- Where += 8;
- }
- /*printf ( "Whole sample size : %ld\n" , WholeSampleSize );*/
-
- /* bypass "LONG" chunk */
- Where += 4;
-
- /* read and write pattern table lenght */
- Whatever[128] = in_data[Where++];
- fwrite ( &Whatever[128] , 1 , 1 , out );
- /*printf ( "Size of pattern list : %d\n" , Whatever[128] );*/
-
- /* read and write NoiseTracker byte */
- fwrite ( &in_data[Where] , 1 , 1 , out );
-
- /* bypass "PATT" chunk */
- Where += 5;
-
- /* read and write pattern list and get highest patt number */
- for ( i=0 ; i<Whatever[128] ; i++ )
- {
- Whatever[i] = in_data[Where];
- if ( in_data[Where] > Whatever[129] )
- Whatever[129] = in_data[Where];
- Where += 1;
- }
- fwrite ( Whatever , 128 , 1 , out );
- /*printf ( "Number of pattern : %d\n" , Whatever[129] + 1 );*/
-
- /* write ptk's ID */
- Whatever[0] = 'M';
- Whatever[1] = '.';
- Whatever[2] = 'K';
- Whatever[3] = '.';
- fwrite ( Whatever , 4 , 1 , out );
-
- /* bypass "SONG" chunk */
- Where += 4;
-
- /* pattern data */
- for ( i=0 ; i<=Whatever[129] ; i++ )
- {
- fwrite ( &in_data[Where] , 1024 , 1 , out );
- Where += 1024;
- /*printf ( "+" );*/
- }
- free ( Whatever );
- /*printf ( "\n" );*/
-
-
- /* bypass "SAMP" chunk */
- Where += 4;
-
- /* sample data */
- fwrite ( &in_data[Where] , WholeSampleSize , 1 , out );
-
- /* crap */
- Crap ( " FC-M packer " , BAD , BAD , out );
-
- fflush ( out );
- fclose ( out );
-
- printf ( "done\n" );
- return; /* useless ... but */
-}
+++ /dev/null
-/*
- * FuchsTracker.c 1999 (c) Sylvain "Asle" Chipaux
- *
- * Depacks Fucks Tracker modules
- *
- * Last update: 30/11/99
- * - removed open() (and other fread()s and the like)
- * - general Speed & Size Optmizings
- * - small bug correction with loops (thx to Thomas Neumann
- * for pointing this out !)
- * Another update : 23 nov 2003
- * - used htonl() so that use of addy is now portable on 68k archs
-*/
-
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Depack_FuchsTracker ( void )
-{
- Uchar *Whatever;
- Uchar c1=0x00;
- long WholeSampleSize=0;
- long SampleSizes[16];
- long LoopStart[16];
- unsigned long i=0,j=0,k;
- long Where = PW_Start_Address;
- FILE *out;
-
- if ( Save_Status == BAD )
- return;
-
- BZERO ( SampleSizes , 16*4 );
- BZERO ( LoopStart , 16*4 );
-
- sprintf ( Depacked_OutName , "%ld.mod" , Cpt_Filename-1 );
- out = mr_fopen ( Depacked_OutName , "w+b" );
- if (!out)
- return;
-
- /* write empty ptk header */
- Whatever = (Uchar *) malloc ( 1080 );
- BZERO ( Whatever , 1080 );
- fwrite ( Whatever , 1080 , 1 , out );
-
- /* write title */
- fseek ( out , 0 , 0 );
- fwrite ( &in_data[Where] , 10 , 1 , out );
- Where += 10;
-
- /* read all sample data size */
- WholeSampleSize = ((in_data[Where]*256*256*256)+
- (in_data[Where+1]*256*256)+
- (in_data[Where+2]*256)+
- in_data[Where+3] );
- Where += 4;
-/* printf ( "Whole Sample Size : %ld\n" , WholeSampleSize );*/
-
-
- /* read/write sample sizes */
- /* have to halve these :( */
- for ( i=0 ; i<16 ; i++ )
- {
- fseek ( out , 42+i*30 , 0 );
- Whatever[0] = in_data[Where];
- Whatever[1] = in_data[Where+1];
- SampleSizes[i] = (Whatever[0]*256)+Whatever[1];
- Whatever[1] /= 2;
- if ( (Whatever[0]/2)*2 != Whatever[0] )
- {
- if ( Whatever[1] < 0x80 )
- Whatever[1] += 0x80;
- else
- {
- Whatever[1] -= 0x80;
- Whatever[0] += 0x01;
- }
- }
- Whatever[0] /= 2;
- fwrite ( Whatever , 2 , 1 , out );
- Where += 2;
- }
-
- /* read/write volumes */
- for ( i=0 ; i<16 ; i++ )
- {
- fseek ( out , 45+i*30 , 0 );
- Where += 1;
- fwrite ( &in_data[Where++] , 1 , 1 , out );
- }
-
- /* read/write loop start */
- /* have to halve these :( */
- for ( i=0 ; i<16 ; i++ )
- {
- fseek ( out , 46+i*30 , 0 );
- Whatever[0] = in_data[Where];
- Whatever[1] = in_data[Where+1];
- LoopStart[i] = (Whatever[0]*256)+Whatever[1];
- Whatever[1] /= 2;
- if ( (Whatever[0]/2)*2 != Whatever[0] )
- {
- if ( Whatever[1] < 0x80 )
- Whatever[1] += 0x80;
- else
- {
- Whatever[1] -= 0x80;
- Whatever[0] += 0x01;
- }
- }
- Whatever[0] /= 2;
- fwrite ( Whatever , 2 , 1 , out );
- Where += 2;
- }
-
- /* write replen */
- /* have to halve these :( */
- Whatever[128] = 0x01;
- for ( i=0 ; i<16 ; i++ )
- {
- fseek ( out , 48+i*30 , 0 );
- j = SampleSizes[i] - LoopStart[i];
- if ( (j == 0) || (LoopStart[i] == 0) )
- {
- fwrite ( &Whatever[127] , 2 , 1 , out );
- continue;
- }
-
- j /= 2;
- /* use of htonl() suggested by Xigh !.*/
- k = htonl(j);
- Whatever[0] = *((Uchar *)&k+2);
- Whatever[1] = *((Uchar *)&k+3);
- fwrite ( Whatever , 2 , 1 , out );
- }
-
-
- /* fill replens up to 31st sample wiz $0001 */
- Whatever[49] = 0x01;
- for ( i=16 ; i<31 ; i++ )
- {
- fseek ( out , 48+i*30 , 0 );
- fwrite ( &Whatever[48] , 2 , 1 , out );
- }
-
- /* that's it for the samples ! */
- /* now, the pattern list */
-
- /* read number of pattern to play */
- fseek ( out , 950 , 0 );
- /* bypass empty byte (saved wiz a WORD ..) */
- Where += 1;
- fwrite ( &in_data[Where++] , 1 , 1 , out );
-
- /* write ntk byte */
- Whatever[0] = 0x7f;
- fwrite ( Whatever , 1 , 1 , out );
-
- /* read/write pattern list */
- for ( i=0 ; i<40 ; i++ )
- {
- Where += 1;
- fwrite ( &in_data[Where++] , 1 , 1 , out );
- }
-
-
- /* write ptk's ID */
- fseek ( out , 0 , 2 );
- Whatever[0] = 'M';
- Whatever[1] = '.';
- Whatever[2] = 'K';
- Whatever[3] = '.';
- fwrite ( Whatever , 4 , 1 , out );
-
-
-
- /* now, the pattern data */
-
- /* bypass the "SONG" ID */
- Where += 4;
-
- /* read pattern data size */
- j = ((in_data[Where]*256*256*256)+
- (in_data[Where+1]*256*256)+
- (in_data[Where+2]*256)+
- in_data[Where+3] );
- Where += 4;
-
- /* read pattern data */
- free ( Whatever );
- Whatever = (Uchar *) malloc ( j );
-
- /* convert shits */
- for ( i=0 ; i<j ; i+=4 )
- {
- Whatever[i] = in_data[Where++];
- Whatever[i+1] = in_data[Where++];
- Whatever[i+2] = in_data[Where++];
- Whatever[i+3] = in_data[Where++];
- /* convert fx C arg back to hex value */
- if ( (Whatever[i+2]&0x0f) == 0x0c )
- {
- c1 = Whatever[i+3];
- if ( c1 <= 9 ) { Whatever[i+3] = c1; continue; }
- if ( (c1 >= 16) && (c1 <= 25) ) { Whatever[i+3] = (c1-6); continue; }
- if ( (c1 >= 32) && (c1 <= 41) ) { Whatever[i+3] = (c1-12); continue; }
- if ( (c1 >= 48) && (c1 <= 57) ) { Whatever[i+3] = (c1-18); continue; }
- if ( (c1 >= 64) && (c1 <= 73) ) { Whatever[i+3] = (c1-24); continue; }
- if ( (c1 >= 80) && (c1 <= 89) ) { Whatever[i+3] = (c1-30); continue; }
- if ( (c1 >= 96) && (c1 <= 100)) { Whatever[i+3] = (c1-36); continue; }
-/* printf ( "error:vol arg:%x (at:%ld)\n" , c1 , i+200 );*/
- }
- }
-
- /* write pattern data */
- fwrite ( Whatever , j , 1 , out );
- free ( Whatever );
-
- /* read/write sample data */
- Where += 4;
- for ( i=0 ; i<16 ; i++ )
- {
- if ( SampleSizes[i] != 0 )
- {
- fwrite ( &in_data[Where] , SampleSizes[i] , 1 , out );
- Where += SampleSizes[i];
- }
- }
-
-
- /* crap */
- Crap ( " Fuchs Tracker " , BAD , BAD , out );
-
- fflush ( out );
- fclose ( out );
-
- printf ( "done\n" );
- return; /* useless ... but */
-}
+++ /dev/null
-/*
- * fuzzac.c 1997 (c) Asle / ReDoX
- *
- * Converts Fuzzac packed MODs back to PTK MODs
- * thanks to Gryzor and his ProWizard tool ! ... without it, this prog
- * would not exist !!!
- *
- * Note: A most worked-up prog ... took some time to finish this !.
- * there's what lot of my other depacker are missing : the correct
- * pattern order (most of the time the list is generated badly ..).
- * Dont know why I did it for this depacker because I've but one
- * exemple file ! :).
- *
- * Last update: 30/11/99
- * - removed open() (and other fread()s and the like)
- * - general Speed & Size Optmizings
- * - memory leak bug corrected (thx to Thomas Neumann)
- * - SEnd ID bypassed REALLY now :) (Thomas Neumann again !)
-*/
-
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-#define ON 1
-#define OFF 2
-
-
-void Depack_Fuzzac ( void )
-{
- Uchar c5;
- Uchar PatPos;
- Uchar *Whatever;
- Uchar NbrTracks;
- Uchar Track_Numbers[128][16];
- Uchar Track_Numbers_Real[128][4];
- Uchar Track_Datas[4][256];
- Uchar Status=ON;
- long WholeSampleSize=0;
- long i,j,k,l;
- long Where = PW_Start_Address;
- FILE *out;
-
- if ( Save_Status == BAD )
- return;
-
- BZERO ( Track_Numbers , 128*16 );
- BZERO ( Track_Numbers_Real , 128*4 );
-
- sprintf ( Depacked_OutName , "%ld.mod" , Cpt_Filename-1 );
- out = mr_fopen ( Depacked_OutName , "w+b" );
- if (!out)
- return;
-
- /* bypass ID */
- /* bypass 2 unknown bytes */
- Where += 6;
-
- /* write title */
- Whatever = (Uchar *) malloc (1024);
- BZERO ( Whatever , 1024 );
- fwrite ( Whatever , 20 , 1 , out );
-
- /*printf ( "Converting header ... " );*/
- /*fflush ( stdout );*/
- for ( i=0 ; i<31 ; i++ )
- {
- /*sample name*/
- fwrite ( &in_data[Where] , 22 , 1 , out );
-
- WholeSampleSize += (((in_data[Where+60]*256)+in_data[Where+61])*2);
- fwrite ( &in_data[Where+60] , 2 , 1 , out );
- fwrite ( &in_data[Where+66] , 2 , 1 , out );
- fwrite ( &in_data[Where+62] , 2 , 1 , out );
-
- Whatever[0] = in_data[Where+65];
- if ( (in_data[Where+64]==0x00) && (in_data[Where+65]==0x00) )
- Whatever[0] = 0x01;
- fwrite ( &in_data[Where+64] , 1 , 1 , out );
- fwrite ( Whatever , 1 , 1 , out );
- Where += 68;
- }
- /*printf ( "ok\n" );*/
- /*printf ( " - Whole sample size : %ld\n" , WholeSampleSize );*/
-
- /* read & write size of pattern list */
- PatPos = in_data[Where++];
- fwrite ( &PatPos , 1 , 1 , out );
- /*printf ( " - size of pattern list : %d\n" , PatPos );*/
-
- /* read the number of tracks */
- NbrTracks = in_data[Where++];
-
- /* write noisetracker byte */
- Whatever[0] = 0x7f;
- fwrite ( Whatever , 1 , 1 , out );
-
-
- /* place file pointer at track number list address */
- Where = PW_Start_Address + 2118;
-
- /* read tracks numbers */
- for ( i=0 ; i<4 ; i++ )
- {
- for ( j=0 ; j<PatPos ; j++ )
- {
- Track_Numbers[j][i*4] = in_data[Where++];
- Track_Numbers[j][i*4+1] = in_data[Where++];
- Track_Numbers[j][i*4+2] = in_data[Where++];
- Track_Numbers[j][i*4+3] = in_data[Where++];
- }
- }
-
- /* sort tracks numbers */
- c5 = 0x00;
- for ( i=0 ; i<PatPos ; i++ )
- {
- if ( i == 0 )
- {
- Whatever[0] = c5;
- c5 += 0x01;
- continue;
- }
- for ( j=0 ; j<i ; j++ )
- {
- Status = ON;
- for ( k=0 ; k<4 ; k++ )
- {
- if ( Track_Numbers[j][k*4] != Track_Numbers[i][k*4] )
- {
- Status=OFF;
- break;
- }
- }
- if ( Status == ON )
- {
- Whatever[i] = Whatever[j];
- break;
- }
- }
- if ( Status == OFF )
- {
- Whatever[i] = c5;
- c5 += 0x01;
- }
- Status = ON;
- }
- /* c5 is the Max pattern number */
-
-
- /* create a real list of tracks numbers for the really existing patterns */
- Whatever[129] = 0x00;
- for ( i=0 ; i<PatPos ; i++ )
- {
- if ( i==0 )
- {
- Track_Numbers_Real[Whatever[129]][0] = Track_Numbers[i][0];
- Track_Numbers_Real[Whatever[129]][1] = Track_Numbers[i][4];
- Track_Numbers_Real[Whatever[129]][2] = Track_Numbers[i][8];
- Track_Numbers_Real[Whatever[129]][3] = Track_Numbers[i][12];
- Whatever[129] += 0x01;
- continue;
- }
- for ( j=0 ; j<i ; j++ )
- {
- Status = ON;
- if ( Whatever[i] == Whatever[j] )
- {
- Status = OFF;
- break;
- }
- }
- if ( Status == OFF )
- continue;
- Track_Numbers_Real[Whatever[129]][0] = Track_Numbers[i][0];
- Track_Numbers_Real[Whatever[129]][1] = Track_Numbers[i][4];
- Track_Numbers_Real[Whatever[129]][2] = Track_Numbers[i][8];
- Track_Numbers_Real[Whatever[129]][3] = Track_Numbers[i][12];
- Whatever[129] += 0x01;
- Status = ON;
- }
-
- /* write pattern list */
- fwrite ( Whatever , 128 , 1 , out );
-
- /* write ID */
- Whatever[0] = 'M';
- Whatever[1] = '.';
- Whatever[2] = 'K';
- Whatever[3] = '.';
- fwrite ( Whatever , 4 , 1 , out );
-
-
- /* pattern data */
- /*printf ( "Processing the pattern datas ... " );*/
- /*fflush ( stdout );*/
- l = PW_Start_Address + 2118 + (PatPos * 16);
- for ( i=0 ; i<c5 ; i++ )
- {
- BZERO ( Whatever , 1024 );
- BZERO ( Track_Datas , 4*256 );
- Where = l + (Track_Numbers_Real[i][0]*256);
- for ( j=0 ; j<256 ; j++ ) Track_Datas[0][j] = in_data[Where+j];
- Where = l + (Track_Numbers_Real[i][1]*256);
- for ( j=0 ; j<256 ; j++ ) Track_Datas[1][j] = in_data[Where+j];
- Where = l + (Track_Numbers_Real[i][2]*256);
- for ( j=0 ; j<256 ; j++ ) Track_Datas[2][j] = in_data[Where+j];
- Where = l + (Track_Numbers_Real[i][3]*256);
- for ( j=0 ; j<256 ; j++ ) Track_Datas[3][j] = in_data[Where+j];
-
- for ( j=0 ; j<64 ; j++ )
- {
- Whatever[j*16] = Track_Datas[0][j*4];
- Whatever[j*16+1] = Track_Datas[0][j*4+1];
- Whatever[j*16+2] = Track_Datas[0][j*4+2];
- Whatever[j*16+3] = Track_Datas[0][j*4+3];
- Whatever[j*16+4] = Track_Datas[1][j*4];
- Whatever[j*16+5] = Track_Datas[1][j*4+1];
- Whatever[j*16+6] = Track_Datas[1][j*4+2];
- Whatever[j*16+7] = Track_Datas[1][j*4+3];
- Whatever[j*16+8] = Track_Datas[2][j*4];
- Whatever[j*16+9] = Track_Datas[2][j*4+1];
- Whatever[j*16+10] = Track_Datas[2][j*4+2];
- Whatever[j*16+11] = Track_Datas[2][j*4+3];
- Whatever[j*16+12] = Track_Datas[3][j*4];
- Whatever[j*16+13] = Track_Datas[3][j*4+1];
- Whatever[j*16+14] = Track_Datas[3][j*4+2];
- Whatever[j*16+15] = Track_Datas[3][j*4+3];
- }
-
- fwrite ( Whatever , 1024 , 1 , out );
- /*printf ( "+" );*/
- /*fflush ( stdout );*/
- }
- free ( Whatever );
- /*printf ( "ok\n" );*/
-
- /* sample data */
- /*printf ( "Saving sample data ... " );*/
- /*fflush ( stdout );*/
- Where = l + 4 + NbrTracks*256;
- /* l : 2118 + NumberOfPattern*16+PW_Start_Address */
- /* 4 : to bypass the "SEnd" unidentified ID */
- fwrite ( &in_data[Where] , WholeSampleSize , 1 , out );
- /*printf ( "ok\n" );*/
-
-
- /* crap ... */
- Crap ( " FUZZAC Packer " , BAD , BAD , out );
-
- fflush ( out );
- fclose ( out );
-
- printf ( "done\n" );
- return; /* useless ... but */
-}
+++ /dev/null
-/*
- * Game_Music_Creator.c 1997 (c) Sylvain "Asle" Chipaux
- *
- * Depacks musics in the Game Music Creator format and saves in ptk.
- *
- * Last update: 30/11/99
- * - removed open() (and other fread()s and the like)
- * - general Speed & Size Optmizings
-*/
-
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Depack_GMC ( void )
-{
- Uchar *Whatever;
- Uchar Max=0x00;
- long WholeSampleSize=0;
- long i=0,j=0;
- long Where = PW_Start_Address;
- FILE *out;
-
- if ( Save_Status == BAD )
- return;
-
- sprintf ( Depacked_OutName , "%ld.mod" , Cpt_Filename-1 );
- out = mr_fopen ( Depacked_OutName , "w+b" );
- if (!out)
- return;
-
- /* title */
- Whatever = (Uchar *) malloc ( 1024 );
- BZERO ( Whatever , 1024 );
- fwrite ( Whatever , 20 , 1 , out );
-
- /* read and write whole header */
- /*printf ( "Converting sample headers ... " );*/
- for ( i=0 ; i<15 ; i++ )
- {
- /* write name */
- fwrite ( Whatever , 22 , 1 , out );
-
- /* size */
- fwrite ( &in_data[Where+4] , 2 , 1 , out );
- WholeSampleSize += (((in_data[Where+4]*256)+in_data[Where+5])*2);
-
- /* finetune */
- fwrite ( Whatever , 1 , 1 , out );
-
- /* volume */
- fwrite ( &in_data[Where+7] , 1 , 1 , out );
-
- /* loop size */
- Whatever[32] = in_data[Where+12];
- Whatever[33] = in_data[Where+13];
-
- /* loop start */
- Whatever[34] = in_data[Where+14];
- Whatever[35] = in_data[Where+15];
- Whatever[35] /= 2;
- if ( (Whatever[34]/2)*2 != Whatever[34] )
- {
- if ( Whatever[35] < 0x80 )
- Whatever[35] += 0x80;
- else
- {
- Whatever[35] -= 0x80;
- Whatever[34] += 0x01;
- }
- }
- Whatever[34] /= 2;
- fwrite ( &Whatever[34] , 1 , 1 , out );
- fwrite ( &Whatever[35] , 1 , 1 , out );
- Whatever[33] /= 2;
- if ( (Whatever[32]/2)*2 != Whatever[32] )
- {
- if ( Whatever[33] < 0x80 )
- Whatever[33] += 0x80;
- else
- {
- Whatever[33] -= 0x80;
- Whatever[32] += 0x01;
- }
- }
- Whatever[32] /= 2;
- if ( (Whatever[32]==0x00) && (Whatever[33]==0x00) )
- Whatever[33] = 0x01;
- fwrite ( &Whatever[32] , 1 , 1 , out );
- fwrite ( &Whatever[33] , 1 , 1 , out );
-
- Where += 16;
- }
- Whatever[129] = 0x01;
- for ( i=0 ; i<16 ; i++ )
- fwrite ( &Whatever[100] , 30 , 1 , out );
- /*printf ( "ok\n" );*/
-
- /* pattern list size */
- Where = PW_Start_Address + 0xF3;
- fwrite ( &in_data[Where++] , 1 , 1 , out );
-
- /* ntk byte */
- Whatever[0] = 0x7f;
- fwrite ( Whatever , 1 , 1 , out );
-
- /* read and write size of pattern list */
- /*printf ( "Creating the pattern table ... " );*/
- BZERO (Whatever , 1024);
- for ( i=0 ; i<100 ; i++ )
- {
- Whatever[i] = ((in_data[Where]*256)+in_data[Where+1])/1024;
- Where += 2;
- }
- fwrite ( Whatever , 128 , 1 , out );
-
- /* get number of pattern */
- Max = 0x00;
- for ( i=0 ; i<128 ; i++ )
- {
- if ( Whatever[i] > Max )
- Max = Whatever[i];
- }
- /*printf ( "ok\n" );*/
-
-
- /* write ID */
- Whatever[0] = 'M';
- Whatever[1] = '.';
- Whatever[2] = 'K';
- Whatever[3] = '.';
- fwrite ( Whatever , 4 , 1 , out );
-
-
- /* pattern data */
- /*printf ( "Converting pattern datas " );*/
- Where = PW_Start_Address + 444;
- for ( i=0 ; i<=Max ; i++ )
- {
- BZERO ( Whatever , 1024 );
- for ( j=0 ; j<1024 ; j++ ) Whatever[j] = in_data[Where++];
- for ( j=0 ; j<256 ; j++ )
- {
- switch ( Whatever[(j*4)+2]&0x0f )
- {
- case 3: /* replace by C */
- Whatever[(j*4)+2] += 0x09;
- break;
- case 4: /* replace by D */
- Whatever[(j*4)+2] += 0x09;
- break;
- case 5: /* replace by B */
- Whatever[(j*4)+2] += 0x06;
- break;
- case 6: /* replace by E0 */
- Whatever[(j*4)+2] += 0x08;
- break;
- case 7: /* replace by E0 */
- Whatever[(j*4)+2] += 0x07;
- break;
- case 8: /* replace by F */
- Whatever[(j*4)+2] += 0x07;
- break;
- default:
- break;
- }
- }
- fwrite ( Whatever , 1024 , 1 , out );
- /*printf ( "." );*/
- /*fflush ( stdout );*/
- }
- free ( Whatever );
- /*printf ( " ok\n" );*/
- /*fflush ( stdout );*/
-
- /* sample data */
- /*printf ( "Saving sample data ... " );*/
- fwrite ( &in_data[Where] , WholeSampleSize , 1 , out );
- /*printf ( "ok\n" );*/
- /*fflush ( stdout );*/
-
- /* crap */
- Crap ( "Game Music Creator" , BAD , BAD , out );
-
- fflush ( out );
- fclose ( out );
-
- printf ( "done\n" );
- return; /* useless ... but */
-}
+++ /dev/null
-/*
- * GnuPlayer.c 2003 (c) Asle@free.fr
- *
-*/
-
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-#define MAXI(a,b) (a>b?a:b)
-
-void Depack_GnuPlayer ( void )
-{
- Uchar *Whatever;
- long i=0,j=0,k=0,l=0;
- long Where = PW_Start_Address;
- Uchar * Pattern;
- Uchar poss[37][2];
- FILE *out;/*,*info;*/
- long SizOfTrack,len1,len2;
- long SmpSizes[31];
- long NbrSmp = 0;
- short SfxNbr=0;
-
- if ( Save_Status == BAD )
- return;
-
-
-#ifdef DOS
- #include "..\include\ptktable.h"
-#endif
-
-#ifdef UNIX
- #include "../include/ptktable.h"
-#endif
-
- sprintf ( Depacked_OutName , "%ld.mod" , Cpt_Filename-1 );
- out = mr_fopen ( Depacked_OutName , "w+b" );
- if (!out)
- return;
- /*info = fopen ( "info", "w+b" );*/
-
- /* read and write title */
- fwrite ( &in_data[Where] , 20 , 1 , out );
-
- /* get global sample rate */
- /*
- for ( SmpRate=0x00 ; i<37 ; SmpRate+=0x01 )
- if ( (poss[SmpRate][0] == in_data[Where + 0x90]) && (poss[SmpRate][1] == in_data[Where + 0x91]))
- break;
- */
-
- /*take care of pattern right now*/
- Pattern = (Uchar *) malloc (65536);
- BZERO (Pattern, 65536);
- Where = PW_Start_Address + 0x96;
- /* track 1 & 2 */
- SizOfTrack = (in_data[Where]*256) + in_data[Where+1]; /* size of track 1 */
- /*fprintf ( info, "Size of track 1 : %ld (%x)\n", SizOfTrack,SizOfTrack );*/
- Where += 2; len1=0;l=0;
- for ( i=0 ; i<SizOfTrack ; i+=2 )
- {
- switch (in_data[Where+i])
- {
- case 0: /* track end */
- /*fprintf ( info, "[%3ld][%4ld] <-- end of track\n\n", i,l );*/
- i = SizOfTrack;
- break;
- case 1: /* set volume */
- SfxNbr += 1;
- /*fprintf ( info, "[%3ld][%4ld] C fx (arg:%2d) [sfx %d]\n",i,l,in_data[Where+1+i],SfxNbr);*/
- Pattern[l+2] |= 0x0C;
- Pattern[l+3] = in_data[Where+1+i];
- Pattern[l+6] |= 0x0C;
- Pattern[l+7] = in_data[Where+1+i];
- break;
- case 2: /* same a A */
- SfxNbr += 1;
- /*fprintf ( info, "[%3ld][%4ld] A fx (arg:%2d) [sfx %d]\n",i,l,in_data[Where+1+i],SfxNbr);*/
- Pattern[l+2] += 0x0A;
- Pattern[l+3] = in_data[Where+1+i];
- Pattern[l+6] += 0x0A;
- Pattern[l+7] = in_data[Where+1+i];
- break;
- case 3: /* set speed */
- SfxNbr += 1;
- /*fprintf ( info, "[%3ld][%4ld] F fx (arg:%2d) [sfx %d]\n",i,l,in_data[Where+1+i],SfxNbr);*/
- if ( SfxNbr == 1 )
- {
- Pattern[l+2] |= 0x0f;
- Pattern[l+3] = in_data[Where+1+i];
- }
- else /* if SfxNbr == 3, I'm in trouble :( */
- {
- Pattern[l+6] |= 0x0f;
- Pattern[l+7] = in_data[Where+1+i];
- }
- break;
- case 4: /* bypass rows */
- /*fprintf ( info, "[%3ld][%4ld] bypass rows : %d\n",i,l,in_data[Where+1+i]);*/
- l += (in_data[Where+i+1] * 16);
- SfxNbr = 0;
- break;
- case 5: /* set note */
- /*fprintf ( info, "[%3ld][%4ld] set note with smp nbr %d\n",i,l,in_data[Where+1+i]);*/
- Pattern[l] = (in_data[Where+1+i]&0xf0);
- Pattern[l] |= in_data[PW_Start_Address + 0x90];
- Pattern[l+1] = in_data[PW_Start_Address + 0x91];
- Pattern[l+4] = (in_data[Where+1+i]&0xf0);
- Pattern[l+4] |= in_data[PW_Start_Address + 0x90];
- Pattern[l+5] = in_data[PW_Start_Address + 0x91];
- Pattern[l+2] |= (in_data[Where+1+i]<<4);
- Pattern[l+6] |= (in_data[Where+1+i]<<4);
- break;
- default :
- printf ( "\nunsupported case in Depack_GnuPlayer(). Please send this file to \"asle@free.fr\" :)\n" );
- break;
- }
- }
- len1 = l/1024;
-
- /* track 3 & 4 */
- Where += (SizOfTrack - 2);
- SizOfTrack = (in_data[Where]*256) + in_data[Where+1]; /* size of track 2 */
- /*fprintf ( info, "Size of track 2 : %ld (%x)\n", SizOfTrack,SizOfTrack );*/
- Where += 2; len2=0;l=0;
- for ( i=0 ; i<SizOfTrack ; i+=2 )
- {
- switch (in_data[Where+i])
- {
- case 0: /* track end */
- /*fprintf ( info, "[%3ld][%4ld] <-- end of track\n\n", i,l );*/
- i = SizOfTrack;
- break;
- case 1: /* set volume */
- SfxNbr += 1;
- /*fprintf ( info, "[%3ld][%4ld] C fx (arg:%d) [Sfx %d]\n",i,l,in_data[Where+1+i],SfxNbr);*/
- Pattern[l+10] |= 0x0C;
- Pattern[l+11] = in_data[Where+1+i];
- Pattern[l+14] |= 0x0C;
- Pattern[l+15] = in_data[Where+1+i];
- break;
- case 2: /* same a A */
- SfxNbr += 1;
- /*fprintf ( info, "[%3ld][%4ld] A fx (arg:%2d) [Sfx %d]\n",i,l,in_data[Where+1+i],SfxNbr);*/
- Pattern[l+10] |= 0x0A;
- Pattern[l+11] = in_data[Where+1+i];
- Pattern[l+14] |= 0x0A;
- Pattern[l+15] = in_data[Where+1+i];
- break;
- case 3: /* set speed */
- SfxNbr += 1;
- /*fprintf ( info, "[%3ld][%4ld] F fx (arg:%2d) [Sfx %d]\n",i,l,in_data[Where+1+i],SfxNbr);*/
- if ( SfxNbr == 1 )
- {
- Pattern[l+10] |= 0x0f;
- Pattern[l+11] = in_data[Where+1+i];
- }
- else
- {
- Pattern[l+14] |= 0x0f;
- Pattern[l+15] = in_data[Where+1+i];
- }
- break;
- case 4: /* bypass rows */
- /*fprintf ( info, "[%3ld][%4ld] bypass rows : %d\n",i,l,in_data[Where+1+i]);*/
- l += (in_data[Where+i+1] * 16);
- SfxNbr = 0;
- break;
- case 5: /* set note */
- /*fprintf ( info, "[%3ld][%4ld] set note with smp nbr %d\n",i,l,in_data[Where+1+i]);*/
- Pattern[l+8] = (in_data[Where+1+i]&0xf0);
- Pattern[l+8] |= in_data[PW_Start_Address + 0x90];
- Pattern[l+9] = in_data[PW_Start_Address + 0x91];
- Pattern[l+12] = (in_data[Where+1+i]&0xf0);
- Pattern[l+12] |= in_data[PW_Start_Address + 0x90];
- Pattern[l+13] = in_data[PW_Start_Address + 0x91];
- Pattern[l+10] |= (in_data[Where+1+i]<<4);
- Pattern[l+14] |= (in_data[Where+1+i]<<4);
- break;
- default :
- printf ( "\nunsupported case in Depack_GnuPlayer(). Please send this file to \"asle@free.fr\" :)\n" );
- break;
- }
- }
- len2 = l/1024;
- Where += (SizOfTrack - 2);
- /*fprintf ( info, "\nWhere before first sample : %ld (%x)\n", Where,Where );*/
-
- /* sample header stuff */
- Whatever = (Uchar *) malloc ( 2048 );
- BZERO (Whatever, 2048);
- /*get nbr of non-null samples */
- for ( i=0 ; i< 31 ; i++)
- {
- k = (in_data[PW_Start_Address + 20 + (i*4)]*256) + in_data[PW_Start_Address + 21 + (i*4)];
- if ( k != 0 )
- NbrSmp += 1;
- SmpSizes[i] = k;
-
- Whatever[22+(i*30)] = in_data[PW_Start_Address + 20 + (i*4)];
- Whatever[23+(i*30)] = in_data[PW_Start_Address + 21 + (i*4)];
- Whatever[25+(i*30)] = 0x40;
- Whatever[26+(i*30)] = in_data[PW_Start_Address + 22 + (i*4)];
- Whatever[27+(i*30)] = in_data[PW_Start_Address + 23 + (i*4)];
- Whatever[29+(i*30)] = 0x01;
- }
- k = MAXI(len1,len2);
- Whatever[930] = k;
- Whatever[931] = 0x7f;
- for ( i=0; i<k ;i++ )
- Whatever[i+932] = (Uchar) i;
- Whatever[1060] = 'M';
- Whatever[1061] = '.';
- Whatever[1062] = 'K';
- Whatever[1063] = '.';
- fwrite ( Whatever, 1064, 1, out );
-
- /* write patterns */
- /* k being the max of both lengths of tracks */
- fwrite ( Pattern, k*1024 , 1 , out );
- free ( Pattern );
-
- /* sample stuff */
- free ( Whatever );
- Whatever = (Uchar *) malloc (65436);
- for ( i=0 ; i<NbrSmp ; i++ )
- {
- long out_end;
- char samp;
- k = 0;
- BZERO (Whatever,65536);
- j = (in_data[Where]*256) + in_data[Where+1];
- Where += 2;
- out_end = (j*2);
- /*fprintf ( info, "sample %ld : siz:%ld where:%ld\n" , i,out_end,Where);*/
- /*fflush ( info );*/
- Whatever[k++] = in_data[Where++];
- while ( k < out_end )
- {
- samp = (in_data[Where]>>4)&0x0f;
- if ( samp & 0x08 ) samp -= 0x10;
- Whatever[k++] = Whatever[k-1] + samp;
- samp = in_data[Where] & 0x0f;
- if ( samp & 0x08 ) samp -= 0x10;
- Whatever[k++] = Whatever[k-1] + samp;
- Where += 1;
- }
- Where -= 1;
- fwrite ( &Whatever[0], out_end, 1, out );
- }
- free ( Whatever );
-
- /* crap */
- Crap ( " GnuPlayer " , BAD , BAD , out );
-
- fflush ( out );
- fclose ( out );
- /*fclose ( info );*/
-
- printf ( "done\n" );
- return; /* useless ... but */
-}
+++ /dev/null
-/*
- * gpmo.c 2003 (c) Asle / ReDoX
- *
- * Converts GPMO MODs back to PTK
- *
-*/
-
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Depack_GPMO ( void )
-{
- Uchar *Whatever;
- Uchar Max=0x00;
- long WholeSampleSize=0;
- long i=0;
- long Where=PW_Start_Address;
- FILE *out;
-
- if ( Save_Status == BAD )
- return;
-
- sprintf ( Depacked_OutName , "%ld.mod" , Cpt_Filename-1 );
- out = mr_fopen ( Depacked_OutName , "w+b" );
- if (!out)
- return;
-
- /* get whole sample size and patch vols (/2)*/
- for ( i=0 ; i<31 ; i++ )
- {
- WholeSampleSize += (((in_data[Where+42+i*30]*256)+in_data[Where+43+i*30])*2);
- in_data[Where+45+i*30] = in_data[Where+45+i*30]/2;
- }
- /*printf ( "Whole sanple size : %ld\n" , WholeSampleSize );*/
-
- /* read and write whole header */
- fwrite ( &in_data[Where] , 1080 , 1 , out );
-
- Where += 952;
-
- /* write ID */
- Whatever = (Uchar *) malloc (4);
- Whatever[0] = 'M';
- Whatever[1] = '.';
- Whatever[2] = 'K';
- Whatever[3] = '.';
- fwrite ( Whatever , 4 , 1 , out );
- free ( Whatever );
-
- /* get number of pattern */
- Max = 0x00;
- for ( i=0 ; i<128 ; i++ )
- {
- if ( in_data[Where+i] > Max )
- Max = in_data[Where+i];
- }
- /*printf ( "Number of pattern : %d\n" , Max );*/
-
- /* pattern data */
- Where = PW_Start_Address + 1084;
- fwrite ( &in_data[Where], (Max+1)*1024, 1, out);
- Where += ((Max+1)*1024);
-
- /* sample data */
- fwrite ( &in_data[Where] , WholeSampleSize , 1 , out );
-
- /* crap */
- Crap ( " GPMO " , BAD , BAD , out );
-
- fflush ( out );
- fclose ( out );
-
- printf ( "done\n" );
- return; /* useless ... but */
-}
-
+++ /dev/null
-/*
- * Heatseeker_mc1.0.c 1997 (c) Asle / ReDoX
- *
- * Converts back to ptk Heatseeker packed MODs
- *
- * Note: There's a good job ! .. gosh !.
- *
- * Last update: 30/11/99
- * - removed open() (and other fread()s and the like)
- * - general Speed & Size Optmizings
-*/
-
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Depack_HEATSEEKER ( void )
-{
- Uchar c1=0x00,c2=0x00,c3=0x00,c4=0x00;
- Uchar Pat_Max=0x00;
- Uchar *Whatever;
- long Track_Addresses[512];
- long i=0,j=0,k=0,l=0,m;
- long WholeSampleSize=0;
- long Where = PW_Start_Address;
- FILE *out;
-
- if ( Save_Status == BAD )
- return;
-
- BZERO ( Track_Addresses , 512*4 );
-
- sprintf ( Depacked_OutName , "%ld.mod" , Cpt_Filename-1 );
- out = mr_fopen ( Depacked_OutName , "w+b" );
- if (!out)
- return;
-
- /* write title */
- Whatever = (Uchar *) malloc (1024);
- BZERO ( Whatever , 1024 );
- fwrite ( Whatever , 20 , 1 , out );
-
- /* read and write sample descriptions */
- for ( i=0 ; i<31 ; i++ )
- {
- /*sample name*/
- fwrite ( Whatever , 22 , 1 , out );
-
- WholeSampleSize += (((in_data[Where]*256)+in_data[Where+1])*2);
- fwrite ( &in_data[Where] , 6 , 1 , out );
- Whatever[32] = in_data[Where+6];
- Whatever[33] = in_data[Where+7];
- if ( (Whatever[32] == 0x00) && (Whatever[33] == 0x00) )
- Whatever[33] = 0x01;
- fwrite ( &Whatever[32] , 2 , 1 , out );
- Where += 8;
- }
- /*printf ( "Whole sample size : %ld\n" , WholeSampleSize );*/
-
- /* read and write pattern table lenght */
- /* read and write NoiseTracker byte */
- fwrite ( &in_data[Where] , 2 , 1 , out );
- Where += 2;
-
- /* read and write pattern list and get highest patt number */
- for ( i=0 ; i<128 ; i++ )
- {
- Whatever[i] = in_data[Where++];
- if ( Whatever[i] > Pat_Max )
- Pat_Max = Whatever[i];
- }
- fwrite ( Whatever , 128 , 1 , out );
- Pat_Max += 1;
- /*printf ( "Number of pattern : %d\n" , Pat_Max );*/
-
- /* write ptk's ID */
- Whatever[0] = 'M';
- Whatever[1] = '.';
- Whatever[2] = 'K';
- Whatever[3] = '.';
- fwrite ( Whatever , 4 , 1 , out );
-
- /* pattern data */
- for ( i=0 ; i<Pat_Max ; i++ )
- {
-/*fprintf ( info , "\n\n\nPattern %ld :\n" , i );*/
- BZERO ( Whatever , 1024 );
- for ( j=0 ; j<4 ; j++ )
- {
- Track_Addresses[i*4+j] = Where;
-/*fprintf ( info , "Voice %ld (at:%ld):\n" , j , Track_Addresses[i*4+j]);*/
- for ( k=0 ; k<64 ; k++ )
- {
- c1 = in_data[Where++];
-/*fprintf ( info , "%2ld: %2x , " , k , c1 );*/
- if ( c1 == 0x80 )
- {
- c2 = in_data[Where++];
- c3 = in_data[Where++];
- c4 = in_data[Where++];
-/*fprintf ( info , "%2x , %2x , %2x !!! (%ld)\n" , c2 , c3 , c4 ,Where );*/
- k += c4;
- continue;
- }
- if ( c1 == 0xc0 )
- {
- c2 = in_data[Where++];
- c3 = in_data[Where++];
- c4 = in_data[Where++];
- l = Where;
- Where = Track_Addresses[((c3*256)+c4)/4];
-/*fprintf ( info , "now at %ld (voice : %d)\n" , ftell ( in ) , ((c3*256)+c4)/4 );*/
- for ( m=0 ; m<64 ; m++ )
- {
- c1 = in_data[Where++];
-/*fprintf ( info , "%2ld: %2x , " , k , c1 );*/
- if ( c1 == 0x80 )
- {
- c2 = in_data[Where++];
- c3 = in_data[Where++];
- c4 = in_data[Where++];
-/*fprintf ( info , "%2x , %2x , %2x !!! (%ld)\n" , c2 , c3 , c4 ,Where);*/
- m += c4;
- continue;
- }
- c2 = in_data[Where++];
- c3 = in_data[Where++];
- c4 = in_data[Where++];
-/*fprintf ( info , "%2x , %2x , %2x (%ld)\n" , c2 , c3 , c4 ,ftell (in));*/
- Whatever[m*16+j*4] = c1;
- Whatever[m*16+j*4+1] = c2;
- Whatever[m*16+j*4+2] = c3;
- Whatever[m*16+j*4+3] = c4;
- }
-/*fprintf ( info , "%2x , %2x , %2x ??? (%ld)\n" , c2 , c3 , c4 ,ftell (in ));*/
- Where = l;
- k += 100;
- continue;
- }
- c2 = in_data[Where++];
- c3 = in_data[Where++];
- c4 = in_data[Where++];
-/*fprintf ( info , "%2x , %2x , %2x (%ld)\n" , c2 , c3 , c4 ,ftell (in));*/
- Whatever[k*16+j*4] = c1;
- Whatever[k*16+j*4+1] = c2;
- Whatever[k*16+j*4+2] = c3;
- Whatever[k*16+j*4+3] = c4;
- }
- }
- fwrite ( Whatever , 1024 , 1 , out );
- /*printf ( "+" );*/
- /*fflush ( stdout );*/
- }
- free ( Whatever );
- /*printf ( "\n" );*/
-
- /* sample data */
-/*printf ( "where : %ld (wholesamplesize : %ld)\n" , ftell ( in ) , WholeSampleSize );*/
- fwrite ( &in_data[Where] , WholeSampleSize , 1 , out );
-
- /* crap */
- Crap ( " Heatseeker mc1.0 " , BAD , BAD , out );
-
- fflush ( out );
- fclose ( out );
-
- printf ( "done\n" );
- return; /* useless ... but */
-}
+++ /dev/null
-/*
- * Hornet_Packer.c 1997 (c) Asle / ReDoX
- *
- * Converts MODs converted with Hornet packer
- * GCC Hornet_Packer.c -o Hornet_Packer -Wall -O3
- *
- * Last update: 30/11/99
- * - removed open() (and other fread()s and the like)
- * - general Speed & Size Optmizings
-*/
-
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Depack_HRT ( void )
-{
- Uchar *Whatever;
- Uchar poss[37][2];
- Uchar Max=0x00;
- long WholeSampleSize=0;
- long i=0,j=0;
- long Where = PW_Start_Address;
- FILE *out;
-
- if ( Save_Status == BAD )
- return;
-
-#ifdef DOS
- #include "..\include\ptktable.h"
-#endif
-
-#ifdef UNIX
- #include "../include/ptktable.h"
-#endif
-
- sprintf ( Depacked_OutName , "%ld.mod" , Cpt_Filename-1 );
- out = mr_fopen ( Depacked_OutName , "w+b" );
- if (!out)
- return;
-
- /* read header */
- Whatever = (Uchar *) malloc (1024);
- BZERO ( Whatever , 1024 );
- for ( i=0 ; i<950 ; i++ )
- Whatever[i] = in_data[Where++];
-
-
- /* empty-ing those adresse values ... */
- for ( i=0 ; i<31 ; i++ )
- {
- Whatever[38+(30*i)] = 0x00;
- Whatever[38+(30*i)+1] = 0x00;
- Whatever[38+(30*i)+2] = 0x00;
- Whatever[38+(30*i)+3] = 0x00;
- }
-
- /* write header */
- fwrite ( Whatever , 950 , 1 , out );
-
- /* get whole sample size */
- for ( i=0 ; i<31 ; i++ )
- {
- WholeSampleSize += (((Whatever[42+(30*i)]*256)+Whatever[43+30*i])*2);
- }
- /*printf ( "Whole sample size : %ld\n" , WholeSampleSize );*/
-
- /* number of pattern */
- fwrite ( &in_data[Where++] , 1 , 1 , out );
-
- /* read noisetracker byte and pattern list */
- Where += 1;
- Whatever[256] = 0x7f;
- fwrite ( &in_data[256] , 1 , 1 , out );
- fwrite ( &in_data[Where] , 128 , 1 , out );
-
- /* get number of pattern */
- Max = 0x00;
- for ( i=0 ; i<128 ; i++ )
- {
- if ( in_data[Where+i] > Max )
- Max = in_data[Where+i];
- }
- /*printf ( "Number of pattern : %d\n" , Max );*/
-
- /* write ptk's ID */
- Whatever[0] = 'M';
- Whatever[1] = '.';
- Whatever[2] = 'K';
- Whatever[3] = '.';
- fwrite ( Whatever , 4 , 1 , out );
-
- /* pattern data */
- Where = PW_Start_Address + 1084;
- for ( i=0 ; i<=Max ; i++ )
- {
- for ( j=0 ; j<256 ; j++ )
- {
- Whatever[0] = in_data[Where];
- Whatever[1] = in_data[Where+1];
- Whatever[2] = in_data[Where+2];
- Whatever[3] = in_data[Where+3];
- Whatever[0] /= 2;
- Whatever[16] = Whatever[0] & 0xf0;
- if ( Whatever[1] == 0x00 )
- Whatever[17] = 0x00;
- else
- {
- Whatever[16] |= poss[(Whatever[1]/2)][0];
- Whatever[17] = poss[(Whatever[1]/2)][1];
- }
- Whatever[18] = (Whatever[0]<<4)&0xf0;
- Whatever[18] |= Whatever[2];
- Whatever[19] = Whatever[3];
-
- fwrite ( &Whatever[16] , 4 , 1 , out );
- Where += 4;
- }
- }
- free ( Whatever );
-
- /* sample data */
- fwrite ( &in_data[Where] , WholeSampleSize , 1 , out );
-
- /* crap */
- Crap ( " Hornet Packer " , BAD , BAD , out );
-
- fclose ( out );
-
- printf ( "done\n" );
- return; /* useless ... but */
-}
-
+++ /dev/null
-/*
- * Kris_packer.c 1997-2000 (c) Asle / ReDoX
- *
- * Kris Tracker to Protracker.
- *
- * Update: 28/11/1999
- * - removed fopen()
- * - Overall Speed and Size optimizings.
- * Update: 03/04/2000
- * - no more sample beginning with $01 :) (Thomas Neumann again ... thx)
- * Update: 20/12/2000
- * - major debugging around the patterntable ...
-*/
-
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Depack_KRIS ( void )
-{
- Uchar *Whatever;
- Uchar c1=0x00,c2=0x00;
- Uchar poss[37][2];
- Uchar Max=0x00;
- Uchar Note,Smp,Fx,FxVal;
- Uchar TrackData[512][256];
- Uchar PatternTableSize=0x00;
- Uchar PatternTable[128];
- short TrackAddressTable[128][4];
- long i=0,j=0,k=0;
- long WholeSampleSize=0;
- long Where = PW_Start_Address;
- short MaxTrackAddress=0;
- FILE *out; /*,*debug;*/
-
- if ( Save_Status == BAD )
- return;
-
-#ifdef DOS
- #include "..\include\ptktable.h"
-#endif
-
-#ifdef DOS
- #include "../include/ptktable.h"
-#endif
-
- BZERO ( TrackAddressTable , 128*4*2 );
- BZERO ( TrackData , 512*256 );
- BZERO ( PatternTable , 128 );
-
- sprintf ( Depacked_OutName , "%ld.mod" , Cpt_Filename-1 );
- out = mr_fopen ( Depacked_OutName , "w+b" );
- if (!out)
- return;
-/* debug = fopen ( "debug" , "w+b" );*/
-
- /* title */
- fwrite ( &in_data[Where] , 20 , 1 , out );
- Where += 22; /* 20 + 2 */
-
- /* 31 samples */
- Whatever = (Uchar *) malloc (1024);
- BZERO (Whatever , 1024);
- for ( i=0 ; i<31 ; i++ )
- {
- /* sample name,siz,fine,vol */
- if ( in_data[Where] == 0x01 )
- {
- fwrite ( Whatever , 20 , 1 , out );
- fwrite ( &in_data[Where+20] , 6 , 1 , out );
- }
- else
- fwrite ( &in_data[Where] , 26 , 1 , out );
-
- /* size */
- WholeSampleSize += (((in_data[Where+22]*256)+in_data[Where+23])*2);
-
- /* loop start */
- c1 = in_data[Where+26]/2;
- c2 = in_data[Where+27]/2;
- if ( (c1*2) != in_data[Where+26] )
- c2 += 1;
- fwrite ( &c1 , 1 , 1 , out );
- fwrite ( &c2 , 1 , 1 , out );
-
- /* loop size */
- fwrite ( &in_data[Where+28] , 2 , 1 , out );
-
- Where += 30;
- }
- /*printf ( "Whole sample size : %ld\n" , WholeSampleSize );*/
-
- /* bypass ID "KRIS" */
- Where += 4;
-
- /* number of pattern in pattern list */
- /* Noisetracker restart byte */
- PatternTableSize = in_data[Where];
- fwrite ( &in_data[Where] , 2 , 1 , out );
- Where += 2;
-
- /* pattern table (read,count and write) */
- c1 = 0x00;
- k=0;
- for ( i=0 ; i<128 ; i++ , k++ )
- {
-/*fprintf ( debug , "%-2ld" , i );*/
- for ( j=0 ; j<4 ; j++ )
- {
- TrackAddressTable[k][j]= (in_data[Where]*256)+in_data[Where+1];
- if ( TrackAddressTable[k][j] > MaxTrackAddress )
- MaxTrackAddress = TrackAddressTable[k][j];
- Where += 2;
-/*fprintf ( debug , "- %4d" , TrackAddressTable[k][j] );*/
- }
-/*fprintf ( debug , "\n" );*/
- for ( j=0 ; j<k ; j++ )
- {
-/*fprintf ( debug , "- %2ld - %4d - %4d - %4d - %4d"
- , j
- , TrackAddressTable[j][0]
- , TrackAddressTable[j][1]
- , TrackAddressTable[j][2]
- , TrackAddressTable[j][3] );*/
- if ( (TrackAddressTable[j][0] == TrackAddressTable[k][0]) &&
- (TrackAddressTable[j][1] == TrackAddressTable[k][1]) &&
- (TrackAddressTable[j][2] == TrackAddressTable[k][2]) &&
- (TrackAddressTable[j][3] == TrackAddressTable[k][3]) )
- {
-/*fprintf ( debug , " --- ok\n" );*/
- PatternTable[i] = j;
-/*fprintf ( debug , "---> patterntable[%ld] : %ld\n" , i , PatternTable[i] );*/
- k-=1;
- j = 9999l; /* hum ... sure now ! */
- break;
- }
-/*fprintf ( debug , "\n" );*/
- }
- if ( k == j )
- {
- PatternTable[i] = c1;
- c1 += 0x01;
-/*fprintf ( debug , "---> patterntable[%ld] : %d\n" , i , PatternTable[i] );*/
- }
- fwrite ( &PatternTable[i] , 1 , 1 , out );
- }
-
- Max = c1;
- /*printf ( "Number of patterns : %d\n" , Max );*/
-
- /* ptk ID */
- Whatever[0] = 'M';
- Whatever[1] = '.';
- Whatever[2] = 'K';
- Whatever[3] = '.';
- fwrite ( Whatever , 4 , 1 , out );
-
- /* bypass two unknown bytes */
- Where += 2;
-
- /* Track data ... */
- for ( i=0 ; i<=(MaxTrackAddress/256) ; i+=1 )
- {
- BZERO ( Whatever , 1024 );
- for ( j=0 ; j<256 ; j++ )
- Whatever[j] = in_data[Where+j];
- Where += 256;
-
- for ( j=0 ; j<64 ; j++ )
- {
- Note = Whatever[j*4];
- Smp = Whatever[j*4+1];
- Fx = Whatever[j*4+2] & 0x0f;
- FxVal = Whatever[j*4+3];
-
- TrackData[i][j*4] = (Smp & 0xf0);
- /*if ( (Note < 0x46) || (Note > 0xa8) )*/
- /*printf ( "!! Note value : %x (beside ptk 3 octaves limit)\n" , Note );*/
-
- if ( Note != 0xa8 )
- {
- TrackData[i][j*4] |= poss[(Note/2)-35][0];
- TrackData[i][j*4+1] |= poss[(Note/2)-35][1];
- }
- TrackData[i][j*4+2] = (Smp<<4)&0xf0;
- TrackData[i][j*4+2] |= (Fx & 0x0f);
- TrackData[i][j*4+3] = FxVal;
- }
- }
-
- for ( i=0 ; i<Max ; i++ )
- {
- BZERO ( Whatever , 1024 );
- for ( j=0 ; j<64 ; j++ )
- {
- Whatever[j*16] = TrackData[TrackAddressTable[i][0]/256][j*4];
- Whatever[j*16+1] = TrackData[TrackAddressTable[i][0]/256][j*4+1];
- Whatever[j*16+2] = TrackData[TrackAddressTable[i][0]/256][j*4+2];
- Whatever[j*16+3] = TrackData[TrackAddressTable[i][0]/256][j*4+3];
-
- Whatever[j*16+4] = TrackData[TrackAddressTable[i][1]/256][j*4];
- Whatever[j*16+5] = TrackData[TrackAddressTable[i][1]/256][j*4+1];
- Whatever[j*16+6] = TrackData[TrackAddressTable[i][1]/256][j*4+2];
- Whatever[j*16+7] = TrackData[TrackAddressTable[i][1]/256][j*4+3];
-
- Whatever[j*16+8] = TrackData[TrackAddressTable[i][2]/256][j*4];
- Whatever[j*16+9] = TrackData[TrackAddressTable[i][2]/256][j*4+1];
- Whatever[j*16+10]= TrackData[TrackAddressTable[i][2]/256][j*4+2];
- Whatever[j*16+11]= TrackData[TrackAddressTable[i][2]/256][j*4+3];
-
- Whatever[j*16+12]= TrackData[TrackAddressTable[i][3]/256][j*4];
- Whatever[j*16+13]= TrackData[TrackAddressTable[i][3]/256][j*4+1];
- Whatever[j*16+14]= TrackData[TrackAddressTable[i][3]/256][j*4+2];
- Whatever[j*16+15]= TrackData[TrackAddressTable[i][3]/256][j*4+3];
-
- }
- fwrite ( Whatever , 1024 , 1 , out );
- }
- free ( Whatever );
-
- /* sample data */
- fwrite ( &in_data[Where] , WholeSampleSize , 1 , out );
-
-
- Crap ( " Kris tracker " , BAD , BAD , out );
-
- fflush ( out );
- fclose ( out );
-/* fclose ( debug );*/
-
- printf ( "done\n" );
- return; /* useless ... but */
-}
-
+++ /dev/null
-/*
- * Kefrens_Sound_Machine.c 1997 (c) Sylvain "Asle" Chipaux
- *
- * Depacks musics in the Kefrens Sound Machine format and saves in ptk.
- *
- * Last revision : 26/11/1999
- * - reduced to only one FREAD.
- * - Speed-up, Clean-up and Binary smaller.
- * Another Update : 28/11/1999
- * - removed fopen() speed up and SIZE !.
- * Another Update : 05 may 2001
- * - added transciption for sample names
- * Another Update : 26 nov 2003
- * - used htonl() so that use of addy is now portable on 68k archs
-*/
-
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-#define ON 1
-#define OFF 2
-
-void Depack_KSM ( void )
-{
- Uchar *Whatever;
- Uchar c1=0x00,c2=0x00,c5;
- Uchar Track_Numbers[128][4];
- Uchar Track_Numbers_Real[128][4];
- Uchar Track_Datas[4][192];
- Uchar Max=0x00;
- Uchar poss[37][2];
- Uchar PatPos;
- Uchar Status=ON;
- Uchar transco[]={'a','b','c','d','e','f','g','h','i','j'
- ,'k','l','m','n','o','p','q','r','s','t'
- ,'u','v','w','x','y','z'
- ,'-',':','!','~','1','2','3','4','5','6'
- ,'7','8','9','0',' ',';'};
- long Where=PW_Start_Address;
- long WholeSampleSize=0;
- unsigned long i=0,j=0,k=0,l;
- FILE *out;
-
- if ( Save_Status == BAD )
- return;
-
- BZERO ( Track_Numbers , 128*4 );
- BZERO ( Track_Numbers_Real , 128*4 );
-
-#ifdef DOS
- #include "..\include\ptktable.h"
-#endif
-
-#ifdef UNIX
- #include "../include/ptktable.h"
-#endif
-
- sprintf ( Depacked_OutName , "%ld.mod" , Cpt_Filename-1 );
- if (!out)
- return;
- out = mr_fopen ( Depacked_OutName , "w+b" );
-
- /* title */
- Whatever = (Uchar *) malloc ( 1024 );
- BZERO ( Whatever , 1024 );
- fwrite ( &in_data[Where+2] , 13 , 1 , out );
- fwrite ( Whatever , 7 , 1 , out ); /* fill-up there */
-
- /* read and write whole header */
- /*printf ( "Converting sample headers ... " );*/
- Where += 32;
- for ( i=0 ; i<15 ; i++ )
- {
- /* write name */
- for ( k=0 ; k<15 ; k++ )
- Whatever[230+k] = transco[in_data[Where+k]];
- fwrite ( &Whatever[230] , 22 , 1 , out );
- /* size */
- c1 = in_data[Where+20];
- c2 = in_data[Where+21];
- k = (in_data[Where+20] * 256) + in_data[Where+21];
- WholeSampleSize += k;
- c2 /= 2;
- if ( (c1/2)*2 != c1 )
- {
- if ( c2 < 0x80 )
- c2 += 0x80;
- else
- {
- c2 -= 0x80;
- c1 += 0x01;
- }
- }
- c1 /= 2;
- fwrite ( &c1 , 1 , 1 , out );
- fwrite ( &c2 , 1 , 1 , out );
- /* finetune */
- fwrite ( Whatever , 1 , 1 , out );
- /* volume */
- fwrite ( &in_data[Where+22] , 1 , 1 , out);
- /* loop start */
- c1 = in_data[Where+24];
- c2 = in_data[Where+25];
- j = k - ((c1*256)+c2);
- c2 /= 2;
- if ( (c1/2)*2 != c1 )
- {
- if ( c2 < 0x80 )
- c2 += 0x80;
- else
- {
- c2 -= 0x80;
- c1 += 0x01;
- }
- }
- c1 /= 2;
- fwrite ( &c1 , 1 , 1 , out );
- fwrite ( &c2 , 1 , 1 , out );
-
- if ( j != k )
- {
- /* write loop size */
- /* use of htonl() suggested by Xigh !.*/
- j/=2;
- l = htonl(j);
- c1 = *((Uchar *)&l+2);
- c2 = *((Uchar *)&l+3);
- fwrite ( &c1 , 1 , 1 , out );
- fwrite ( &c2 , 1 , 1 , out );
- }
- else
- {
- Whatever[1] = 0x01;
- fwrite ( Whatever , 2 , 1 , out );
- }
- Where += 32;
- }
- Whatever[129] = 0x01;
- for ( i=0 ; i<16 ; i++ )
- fwrite ( &Whatever[100] , 30 , 1 , out );
- /*printf ( "ok\n" );*/
-
- /* pattern list */
- /*printf ( "creating the pattern list ... " );*/
- Where = PW_Start_Address+512;
- for ( PatPos=0x00 ; PatPos<128 ; PatPos++ )
- {
- Track_Numbers[PatPos][0] = in_data[Where+PatPos*4];
- Track_Numbers[PatPos][1] = in_data[Where+PatPos*4+1];
- Track_Numbers[PatPos][2] = in_data[Where+PatPos*4+2];
- Track_Numbers[PatPos][3] = in_data[Where+PatPos*4+3];
- if ( Track_Numbers[PatPos][0] == 0xFF )
- break;
- if ( Track_Numbers[PatPos][0] > Max )
- Max = Track_Numbers[PatPos][0];
- if ( Track_Numbers[PatPos][1] > Max )
- Max = Track_Numbers[PatPos][1];
- if ( Track_Numbers[PatPos][2] > Max )
- Max = Track_Numbers[PatPos][2];
- if ( Track_Numbers[PatPos][3] > Max )
- Max = Track_Numbers[PatPos][3];
- }
-
- /* write patpos */
- fwrite ( &PatPos , 1 , 1 , out );
-
- /* ntk byte */
- c1 = 0x7f;
- fwrite ( &c1 , 1 , 1 , out );
-
- /* sort tracks numbers */
- c5 = 0x00;
- for ( i=0 ; i<PatPos ; i++ )
- {
- if ( i == 0 )
- {
- Whatever[0] = c5;
- c5 += 0x01;
- continue;
- }
- for ( j=0 ; j<i ; j++ )
- {
- Status = ON;
- for ( k=0 ; k<4 ; k++ )
- {
- if ( Track_Numbers[j][k] != Track_Numbers[i][k] )
- {
- Status=OFF;
- break;
- }
- }
- if ( Status == ON )
- {
- Whatever[i] = Whatever[j];
- break;
- }
- }
- if ( Status == OFF )
- {
- Whatever[i] = c5;
- c5 += 0x01;
- }
- Status = ON;
- }
- /* c5 is the Max pattern number */
-
- /* create a real list of tracks numbers for the really existing patterns */
- c1 = 0x00;
- for ( i=0 ; i<PatPos ; i++ )
- {
- if ( i==0 )
- {
- Track_Numbers_Real[c1][0] = Track_Numbers[i][0];
- Track_Numbers_Real[c1][1] = Track_Numbers[i][1];
- Track_Numbers_Real[c1][2] = Track_Numbers[i][2];
- Track_Numbers_Real[c1][3] = Track_Numbers[i][3];
- c1 += 0x01;
- continue;
- }
- for ( j=0 ; j<i ; j++ )
- {
- Status = ON;
- if ( Whatever[i] == Whatever[j] )
- {
- Status = OFF;
- break;
- }
- }
- if ( Status == OFF )
- continue;
- Track_Numbers_Real[c1][0] = Track_Numbers[i][0];
- Track_Numbers_Real[c1][1] = Track_Numbers[i][1];
- Track_Numbers_Real[c1][2] = Track_Numbers[i][2];
- Track_Numbers_Real[c1][3] = Track_Numbers[i][3];
- c1 += 0x01;
- Status = ON;
- }
-
- /* write pattern list */
- fwrite ( Whatever , 128 , 1 , out );
- /*printf ( "ok\n" );*/
-
-
- /* write ID */
- Whatever[0] = 'M';
- Whatever[1] = '.';
- Whatever[2] = 'K';
- Whatever[3] = '.';
- fwrite ( Whatever , 4 , 1 , out );
-
- /* pattern data */
- /*printf ( "Converting pattern datas " );*/
- for ( i=0 ; i<c5 ; i++ )
- {
- BZERO ( Whatever , 1024 );
- BZERO ( Track_Datas , 192*4 );
- for ( k=0 ; k<4 ; k++ )
- for ( j=0 ; j<192 ; j++ )
- Track_Datas[k][j] = in_data[PW_Start_Address+1536+192*Track_Numbers_Real[i][k]+j];
-
- for ( j=0 ; j<64 ; j++ )
- {
- Whatever[j*16] = poss[Track_Datas[0][j*3]][0];
- Whatever[j*16+1] = poss[Track_Datas[0][j*3]][1];
- if ( (Track_Datas[0][j*3+1] & 0x0f) == 0x0D )
- Track_Datas[0][j*3+1] -= 0x03;
- Whatever[j*16+2] = Track_Datas[0][j*3+1];
- Whatever[j*16+3] = Track_Datas[0][j*3+2];
-
- Whatever[j*16+4] = poss[Track_Datas[1][j*3]][0];
- Whatever[j*16+5] = poss[Track_Datas[1][j*3]][1];
- if ( (Track_Datas[1][j*3+1] & 0x0f) == 0x0D )
- Track_Datas[1][j*3+1] -= 0x03;
- Whatever[j*16+6] = Track_Datas[1][j*3+1];
- Whatever[j*16+7] = Track_Datas[1][j*3+2];
-
- Whatever[j*16+8] = poss[Track_Datas[2][j*3]][0];
- Whatever[j*16+9] = poss[Track_Datas[2][j*3]][1];
- if ( (Track_Datas[2][j*3+1] & 0x0f) == 0x0D )
- Track_Datas[2][j*3+1] -= 0x03;
- Whatever[j*16+10] = Track_Datas[2][j*3+1];
- Whatever[j*16+11] = Track_Datas[2][j*3+2];
-
- Whatever[j*16+12] = poss[Track_Datas[3][j*3]][0];
- Whatever[j*16+13] = poss[Track_Datas[3][j*3]][1];
- if ( (Track_Datas[3][j*3+1] & 0x0f) == 0x0D )
- Track_Datas[3][j*3+1] -= 0x03;
- Whatever[j*16+14] = Track_Datas[3][j*3+1];
- Whatever[j*16+15] = Track_Datas[3][j*3+2];
- }
-
-
- fwrite ( Whatever , 1024 , 1 , out );
- /*printf ( "." );*/
- /*fflush ( stdout );*/
- }
- free ( Whatever );
- /*printf ( " ok\n" );*/
- /*fflush ( stdout );*/
-
-
- /* sample data */
- /*printf ( "Saving sample data ... " );*/
- fwrite ( &in_data[PW_Start_Address+1536+(192*(Max+1))] , WholeSampleSize , 1 , out );
-
-
- /* crap */
- Crap ( "Kefrens SndMachine" , BAD , BAD , out );
-
- fflush ( out );
- fclose ( out );
-
- printf ( "done\n" );
- return; /* useless ... but */
-}
+++ /dev/null
-/*
- * Module_Protector.c 1997 (c) Asle / ReDoX
- *
- * Converts MP packed MODs back to PTK MODs
- * thanks to Gryzor and his ProWizard tool ! ... without it, this prog
- * would not exist !!!
- *
- * NOTE : It takes care of both MP packed files with or without ID !
- *
- * Last update: 28/11/99
- * - removed open() (and other fread()s and the like)
- * - general Speed & Size Optmizings
-*/
-
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Depack_MP ( void )
-{
- Uchar *Whatever;
- long i=0;
- long Total_Sample_Size=0;
- long Where = PW_Start_Address;
- FILE *out;
-
- if ( Save_Status == BAD )
- return;
-
- Whatever = (Uchar *) malloc (64);
- BZERO ( Whatever , 64 );
-
- sprintf ( Depacked_OutName , "%ld.mod" , Cpt_Filename-1 );
- if (!out)
- return;
- out = mr_fopen ( Depacked_OutName , "w+b" );
-
- /* title */
- fwrite ( Whatever , 20 , 1 , out );
-
- if ( (in_data[Where] == 'T') && (in_data[Where+1] == 'R') && (in_data[Where+2] == 'K') && (in_data[Where+3] == '1') )
- Where += 4;
-
- for ( i=0 ; i<31 ; i++ )
- {
- /*sample name*/
- fwrite ( Whatever , 22 , 1 , out );
-
- Total_Sample_Size += (((in_data[Where]*256)+in_data[Where+1])*2);
- fwrite ( &in_data[Where] , 8 , 1 , out );
- Where += 8;
- }
- /*printf ( "Whole sample size : %ld\n" , Total_Sample_Size );*/
-
- /* pattern table lenght & Ntk byte */
- fwrite ( &in_data[Where] , 2 , 1 , out );
- Where += 2;
-
- Whatever[32] = 0x00;
- for ( i=0 ; i<128 ; i++ )
- {
- if ( in_data[Where+i] > Whatever[32] )
- Whatever[32] = in_data[Where+i];
- }
- fwrite ( &in_data[Where] , 128 , 1 , out );
- Where += 128;
- /*printf ( "Number of pattern : %d\n" , Max+1 );*/
-
- Whatever[0] = 'M';
- Whatever[1] = '.';
- Whatever[2] = 'K';
- Whatever[3] = '.';
- fwrite ( Whatever , 4 , 1 , out );
-
- /* bypass 4 unknown empty bytes */
- if ( (in_data[Where]==0x00)&&(in_data[Where+1]==0x00)&&(in_data[Where+2]==0x00)&&(in_data[Where+3]==0x00) )
- Where += 4;
- /*else*/
- /*printf ( "! four empty bytes bypassed at the beginning of the pattern data\n" );*/
-
- /* pattern data */
- i = (Whatever[32]+1)*1024;
- fwrite ( &in_data[Where] , i , 1 , out );
- Where += i;
- free ( Whatever );
-
- /* sample data */
- fwrite ( &in_data[Where] , Total_Sample_Size , 1 , out );
-
- Crap ( " Module Protector " , BAD , BAD , out );
-
- fflush ( out );
- fclose ( out );
-
- printf ( "done\n" );
- return; /* useless ... but */
-}
+++ /dev/null
-/*
- * newtron.c 2003 (c) Asle / ReDoX
- *
- * Converts Newtron packed MODs back to PTK MODs
- *
- * Last update: 09 mar 2003
-*/
-
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Depack_Newtron ( void )
-{
- Uchar *Whatever;
- long i=0;
- long Total_Sample_Size=0;
- long Where = PW_Start_Address;
- FILE *out;
-
- if ( Save_Status == BAD )
- return;
-
- Whatever = (Uchar *) malloc (64);
- BZERO ( Whatever , 64 );
-
- sprintf ( Depacked_OutName , "%ld.mod" , Cpt_Filename-1 );
- if (!out)
- return;
- out = mr_fopen ( Depacked_OutName , "w+b" );
-
- /* title */
- fwrite ( Whatever , 20 , 1 , out );
-
- Where = 4;
-
- for ( i=0 ; i<31 ; i++ )
- {
- /*sample name*/
- fwrite ( Whatever , 22 , 1 , out );
-
- Total_Sample_Size += (((in_data[Where]*256)+in_data[Where+1])*2);
- fwrite ( &in_data[Where] , 8 , 1 , out );
- Where += 8;
- }
- /*printf ( "Whole sample size : %ld\n" , Total_Sample_Size );*/
-
- /* pattern table lenght & Ntk byte */
- fwrite ( &in_data[0] , 1 , 1 , out );
- Whatever[0] = 0x7f;
- fwrite ( &Whatever[0] , 1 , 1 , out );
-
- Whatever[32] = 0x00;
- for ( i=0 ; i<128 ; i++ )
- {
- if ( in_data[Where+i] > Whatever[32] )
- Whatever[32] = in_data[Where+i];
- }
- fwrite ( &in_data[Where] , 128 , 1 , out );
- Where += 128;
- /*printf ( "Number of pattern : %d\n" , Max+1 );*/
-
- Whatever[0] = 'M';
- Whatever[1] = '.';
- Whatever[2] = 'K';
- Whatever[3] = '.';
- fwrite ( Whatever , 4 , 1 , out );
-
- /* pattern data */
- i = (Whatever[32]+1)*1024;
- fwrite ( &in_data[Where] , i , 1 , out );
- Where += i;
- free ( Whatever );
-
- /* sample data */
- fwrite ( &in_data[Where] , Total_Sample_Size , 1 , out );
-
- Crap ( " Newtron " , BAD , BAD , out );
-
- fflush ( out );
- fclose ( out );
-
- printf ( "done\n" );
- return; /* useless ... but */
-}
+++ /dev/null
-/*
- * nfh.c 2003 (c) Asle / ReDoX
- *
- * converts ziks from Noise From Heaven chiptune diskmag by Iris'01
- *
-*/
-
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Depack_NFH ( void )
-{
- Uchar *Whatever;
- Uchar poss[37][2];
- Uchar Max=0x00;
- long WholeSampleSize=0;
- long i=0,j=0;
- long Where=PW_Start_Address;
- FILE *out;
-
-#ifdef DOS
- #include "..\include\ptktable.h"
-#endif
-
-#ifdef UNIX
- #include "../include/ptktable.h"
-#endif
-
-
- if ( Save_Status == BAD )
- return;
-
- sprintf ( Depacked_OutName , "%ld.mod" , Cpt_Filename-1 );
- out = mr_fopen ( Depacked_OutName , "w+b" );
- if (!out)
- return;
-
- /* read and write whole header */
- fwrite ( &in_data[Where] , 1080 , 1 , out );
-
- /* get whole sample size */
- for ( i=0 ; i<31 ; i++ )
- {
- WholeSampleSize += (((in_data[Where+42+i*30]*256)+in_data[Where+43+i*30])*2);
- }
- /*printf ( "Whole sanple size : %ld\n" , WholeSampleSize );*/
-
- Where += 952 /* after size of pattern list .. before pattern list itself */;
-
- /* write ID */
- Whatever = (Uchar *) malloc (4);
- Whatever[0] = 'M';
- Whatever[1] = '.';
- Whatever[2] = 'K';
- Whatever[3] = '.';
- fwrite ( Whatever , 4 , 1 , out );
-
- /* get number of pattern */
- Max = 0x00;
- for ( i=0 ; i<128 ; i++ )
- {
- if ( in_data[Where+i] > Max )
- Max = in_data[Where+i];
- }
- /*printf ( "Number of pattern : %d\n" , Max );*/
-
- /* pattern data */
- Where = PW_Start_Address + 1084;
- for ( i=0 ; i<=Max ; i++ )
- {
- for ( j=0 ; j<256 ; j++ )
- {
- Whatever[0] = in_data[Where] & 0xf0;
- Whatever[2] = (in_data[Where] & 0x0f)<<4;
- Whatever[2] |= (in_data[Where+2]/2);
- Whatever[3] = in_data[Where+3];
- Whatever[0] |= poss[(in_data[Where+1]/2)][0];
- Whatever[1] = poss[(in_data[Where+1]/2)][1];
- fwrite ( Whatever , 4 , 1 , out );
- Where += 4;
- }
- }
- free ( Whatever );
-
-
- /* sample data */
- fwrite ( &in_data[Where] , WholeSampleSize , 1 , out );
-
-
- /* crap */
- Crap ( "Noise From Heaven2" , BAD , BAD , out );
-
- fflush ( out );
- fclose ( out );
-
- printf ( "done\n" );
- return; /* useless ... but */
-}
-
+++ /dev/null
-/*
- * NoiseRunner.c 1997 (c) Asle / ReDoX
- *
- * NoiseRunner to Protracker.
- *
- * Last revision : 26/11/1999 by Sylvain "Asle" Chipaux
- * reduced to only one FREAD.
- * Speed-up, Clean-up and Binary smaller.
- * update: 01/12/99
- * - removed fopen() and attached funcs
- * Another Update : 26 nov 2003
- * - used htonl() so that use of addy is now portable on 68k archs
-*/
-
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-#define PAT_DATA_ADDRESS 0x43C
-
-void Depack_Noiserunner ( void )
-{
- Uchar poss[37][2];
- Uchar Max=0x00;
- Uchar Note,Smp,Fx,FxVal;
- Uchar *Whatever;
- long Where=PW_Start_Address;
- long i=0,j=0,l=0,k;
- long WholeSampleSize=0;
- FILE *out;
-
- if ( Save_Status == BAD )
- return;
-
-#ifdef DOS
- #include "..\include\ptktable.h"
-#endif
-
-#ifdef UNIX
- #include "../include/ptktable.h"
-#endif
-
- Whatever = (Uchar *) malloc (1024);
- BZERO ( Whatever , 1024 );
-
- sprintf ( Depacked_OutName , "%ld.mod" , Cpt_Filename-1 );
- out = mr_fopen ( Depacked_OutName , "w+b" );
- if (!out)
- return;
-
- /* title */
- fwrite ( Whatever , 20 , 1 , out );
-
- /* 31 samples */
- /*printf ( "Converting sample headers ... " );*/
- for ( i=0 ; i<31 ; i++ )
- {
- /* sample name */
- fwrite ( Whatever , 22 , 1 , out );
-
- /* read sample address */
- j = ((in_data[Where+2]*256*256*256)+
- (in_data[Where+3]*256*256)+
- (in_data[Where+4]*256)+
- in_data[Where+5]);
-
- /* read and write sample size */
- fwrite ( &in_data[Where+6] , 2 , 1 , out );
- WholeSampleSize += (((in_data[Where+6]*256)+in_data[Where+7])*2);
-
- /* read loop start address */
- l = ((in_data[Where+8]*256*256*256)+
- (in_data[Where+9]*256*256)+
- (in_data[Where+10]*256)+
- in_data[Where+11]);
-
- /* calculate loop start value */
- j = l-j;
-
- /* read finetune ?!? */
- Whatever[32] = in_data[Where+14];
- Whatever[33] = in_data[Where+15];
- if ( Whatever[32] > 0xf0 )
- {
- if ( (Whatever[32] == 0xFB) && (Whatever[33] == 0xC8) )
- Whatever[32] = 0x0f;
- if ( (Whatever[32] == 0xFC) && (Whatever[33] == 0x10) )
- Whatever[32] = 0x0E;
- if ( (Whatever[32] == 0xFC) && (Whatever[33] == 0x58) )
- Whatever[32] = 0x0D;
- if ( (Whatever[32] == 0xFC) && (Whatever[33] == 0xA0) )
- Whatever[32] = 0x0C;
- if ( (Whatever[32] == 0xFC) && (Whatever[33] == 0xE8) )
- Whatever[32] = 0x0B;
- if ( (Whatever[32] == 0xFD) && (Whatever[33] == 0x30) )
- Whatever[32] = 0x0A;
- if ( (Whatever[32] == 0xFD) && (Whatever[33] == 0x78) )
- Whatever[32] = 0x09;
- if ( (Whatever[32] == 0xFD) && (Whatever[33] == 0xC0) )
- Whatever[32] = 0x08;
- if ( (Whatever[32] == 0xFE) && (Whatever[33] == 0x08) )
- Whatever[32] = 0x07;
- if ( (Whatever[32] == 0xFE) && (Whatever[33] == 0x50) )
- Whatever[32] = 0x06;
- if ( (Whatever[32] == 0xFE) && (Whatever[33] == 0x98) )
- Whatever[32] = 0x05;
- if ( (Whatever[32] == 0xFE) && (Whatever[33] == 0xE0) )
- Whatever[32] = 0x04;
- if ( (Whatever[32] == 0xFF) && (Whatever[33] == 0x28) )
- Whatever[32] = 0x03;
- if ( (Whatever[32] == 0xFF) && (Whatever[33] == 0x70) )
- Whatever[32] = 0x02;
- if ( (Whatever[32] == 0xFF) && (Whatever[33] == 0xB8) )
- Whatever[32] = 0x01;
- }
- else
- Whatever[32] = 0x00;
-
- /* write fine */
- fwrite ( &Whatever[32] , 1 , 1 , out );
-
- /* write vol */
- fwrite ( &in_data[Where+1] , 1 , 1 , out );
-
- /* write loop start */
- /* use of htonl() suggested by Xigh !.*/
- j/=2;
- k = htonl(j);
- Whatever[32] = *((Uchar *)&k+2);
- Whatever[33] = *((Uchar *)&l+3);
- fwrite ( &Whatever[32] , 2 , 1 , out );
-
- /* write loop size */
- fwrite ( &in_data[Where+12] , 2 , 1 , out );
- Where += 16;
- }
- /*printf ( "ok\n" );*/
- /*printf ( "Whole sample size : %ld\n" , WholeSampleSize );*/
-
- /* pattablesiz & Ntk Byte & pattern table */
- Where = PW_Start_Address + 950;
- fwrite ( &in_data[Where] , 130 , 1 , out );
- Where += 2;
-
- Max = 0x00;
- for ( i=0 ; i<128 ; i++ )
- {
- if ( in_data[Where] > Max )
- Max = in_data[Where];
- Where += 1;
- }
- Max += 1; /* starts at $00 */
- /*printf ( "number of pattern : %d\n" , Max );*/
-
- /* write Protracker's ID */
- Whatever[0] = 'M';
- Whatever[1] = '.';
- Whatever[2] = 'K';
- Whatever[3] = '.';
- fwrite ( Whatever , 4 , 1 , out );
-
- /* pattern data */
- Where = PW_Start_Address + PAT_DATA_ADDRESS;
- for ( i=0 ; i<Max ; i++ )
- {
- BZERO ( Whatever , 1024 );
- for ( j=0 ; j<256 ; j++ )
- {
- Smp = (in_data[Where+j*4+3]>>3)&0x1f;
- Note = in_data[Where+j*4+2];
- Fx = in_data[Where+j*4];
- FxVal= in_data[Where+j*4+1];
- switch ( Fx )
- {
- case 0x00: /* tone portamento */
- Fx = 0x03;
- break;
-
- case 0x04: /* slide up */
- Fx = 0x01;
- break;
-
- case 0x08: /* slide down */
- Fx = 0x02;
- break;
-
- case 0x0C: /* no Fx */
- Fx = 0x00;
- break;
-
- case 0x10: /* set vibrato */
- Fx = 0x04;
- break;
-
- case 0x14: /* portamento + volume slide */
- Fx = 0x05;
- break;
-
- case 0x18: /* vibrato + volume slide */
- Fx = 0x06;
- break;
-
- case 0x20: /* set panning ?!?!? not PTK ! Heh, Gryzor ... */
- Fx = 0x08;
- break;
-
- case 0x24: /* sample offset */
- Fx = 0x09;
- break;
-
- case 0x28: /* volume slide */
- Fx = 0x0A;
- break;
-
- case 0x30: /* set volume */
- Fx = 0x0C;
- break;
-
- case 0x34: /* pattern break */
- Fx = 0x0D;
- break;
-
- case 0x38: /* extended command */
- Fx = 0x0E;
- break;
-
- case 0x3C: /* set speed */
- Fx = 0x0F;
- break;
-
- default:
- /*printf ( "%x : at %x\n" , Fx , i*1024 + j*4 + 1084 );*/
- Fx = 0x00;
- break;
- }
- Whatever[j*4] = (Smp & 0xf0);
- Whatever[j*4] |= poss[(Note/2)][0];
- Whatever[j*4+1] = poss[(Note/2)][1];
- Whatever[j*4+2] = ((Smp<<4)&0xf0);
- Whatever[j*4+2] |= Fx;
- Whatever[j*4+3] = FxVal;
- }
- Where += 1024;
- fwrite ( Whatever , 1024 , 1 , out );
- /*printf ( "pattern %ld written\n" , i );*/
- }
- free ( Whatever );
-
- /* sample data */
- fwrite ( &in_data[Where] , WholeSampleSize , 1 , out );
-
-
- Crap ( " Noiserunner " , BAD , BAD , out );
-
- fclose ( out );
-
- printf ( "done\n" );
- return; /* useless ... but */
-}
-
+++ /dev/null
-/*
- * NoisePacker_v1.c 1997 (c) Asle / ReDoX
- *
- * Converts NoisePacked MODs back to ptk
- * Last revision : 26/11/1999 by Sylvain "Asle" Chipaux
- * reduced to only one FREAD.
- * Speed-up and Binary smaller.
- * Update:30/11/99
- * - removed fopen() and attached funcs.
-*/
-
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Depack_Noisepacker1 ( void )
-{
- Uchar *Whatever;
- Uchar c1=0x00,c2=0x00,c3=0x00,c4=0x00;
- Uchar Nbr_Pos;
- Uchar poss[37][2];
- Uchar Pat_Max=0x00;
- long Max_Add=0;
- long WholeSampleSize=0;
- long TrackDataSize;
- long Track_Addresses[128][4];
- long Unknown1;
- long i=0,j=0,k;
- long Track_Data_Start_Address;
- long Where = PW_Start_Address;
- FILE *out;
-
- if ( Save_Status == BAD )
- return;
-
-#ifdef DOS
- #include "..\include\ptktable.h"
-#endif
-
-#ifdef UNIX
- #include "../include/ptktable.h"
-#endif
-
- BZERO ( Track_Addresses , 128*4*4 );
-
- sprintf ( Depacked_OutName , "%ld.mod" , Cpt_Filename-1 );
- out = mr_fopen ( Depacked_OutName , "w+b" );
- if (!out)
- return;
-
- /* read number of sample */
- Whatever = (Uchar *) malloc ( 1024 );
- BZERO ( Whatever , 1024 );
- Whatever[128] = ((in_data[Where]<<4)&0xf0) | ((in_data[Where+1]>>4)&0x0f);
- Where += 3;
- /*printf ( "Number of sample : %d (%x)\n" , Whatever[128] , Whatever[128] );*/
-
- /* write title */
- fwrite ( Whatever , 20 , 1 , out );
-
- /* read size of pattern list */
- Nbr_Pos = in_data[Where++]/2;
- /*printf ( "Size of pattern list : %d\n" , Nbr_Pos );*/
-
- /* read 2 unknown bytes which size seem to be of some use ... */
- Unknown1 = (in_data[Where]*256)+in_data[Where+1];
- Where += 2;
-
- /* read track data size */
- TrackDataSize = (in_data[Where]*256)+in_data[Where+1];
- Where += 2;
- /*printf ( "TrackDataSize : %ld\n" , TrackDataSize );*/
-
- /* read sample descriptions */
- for ( i=0 ; i<Whatever[128] ; i++ )
- {
- /* sample name */
- fwrite ( Whatever , 22 , 1 , out );
- WholeSampleSize += (((in_data[Where+4]*256)+in_data[Where+5])*2);
- /* size,fine,vol */
- fwrite ( &in_data[Where+4] , 4 , 1 , out );
-
- /* read loop start -- coz it's NOT /2 !*/
- Whatever[32] = in_data[Where+14];
- Whatever[33] = in_data[Where+15];
- /* write loop start */
- Whatever[33] /= 2;
- if ( (Whatever[32]/2)*2 != Whatever[32] )
- {
- if ( Whatever[33] < 0x80 )
- Whatever[33] += 0x80;
- else
- {
- Whatever[33] -= 0x80;
- Whatever[32] += 0x01;
- }
- }
- Whatever[32] /= 2;
- fwrite ( &Whatever[32] , 2 , 1 , out );
- /* write loop size */
- fwrite ( &in_data[Where+12] , 2 , 1 , out );
- Where += 16;
- }
- /*printf ( "Whole sample size : %ld\n" , WholeSampleSize );*/
-
- /* fill up to 31 samples */
- Whatever[29] = 0x01;
- while ( i != 31 )
- {
- fwrite ( Whatever , 30 , 1 , out );
- i += 1;
- }
-
- /* write size of pattern list */
- fwrite ( &Nbr_Pos , 1 , 1 , out );
-
- /* write noisetracker byte */
- Whatever[0] = 0x7f;
- fwrite ( Whatever , 1 , 1 , out );
-
- /* bypass 2 bytes ... seems always the same as in $02 */
- /* & bypass 2 other bytes which meaning is beside me */
- Where += 4;
-
- /* read pattern table */
- Pat_Max = 0x00;
- for ( i=0 ; i<Nbr_Pos ; i++ )
- {
- Whatever[i] = ((in_data[Where+(i*2)]*256)+in_data[Where+(i*2)+1])/8;
- if ( Whatever[i] > Pat_Max )
- Pat_Max = Whatever[i];
- }
- Pat_Max += 1;
- Where += Nbr_Pos*2;
- /*printf ( "Number of pattern : %d\n" , Pat_Max );*/
-
- /* write pattern table */
- fwrite ( Whatever , 128 , 1 , out );
-
- /* write ptk's ID */
- Whatever[0] = 'M';
- Whatever[1] = '.';
- Whatever[2] = 'K';
- Whatever[3] = '.';
- fwrite ( Whatever , 4 , 1 , out );
-
- /* read tracks addresses per pattern */
- for ( i=0 ; i<Pat_Max ; i++ )
- {
- Track_Addresses[i][0] = (in_data[Where+(i*8)]*256)+in_data[Where+(i*8)+1];
- if ( Track_Addresses[i][0] > Max_Add )
- Max_Add = Track_Addresses[i][0];
- Track_Addresses[i][1] = (in_data[Where+(i*8)+2]*256)+in_data[Where+(i*8)+3];
- if ( Track_Addresses[i][1] > Max_Add )
- Max_Add = Track_Addresses[i][1];
- Track_Addresses[i][2] = (in_data[Where+(i*8)+4]*256)+in_data[Where+(i*8)+5];
- if ( Track_Addresses[i][2] > Max_Add )
- Max_Add = Track_Addresses[i][2];
- Track_Addresses[i][3] = (in_data[Where+(i*8)+6]*256)+in_data[Where+(i*8)+7];
- if ( Track_Addresses[i][3] > Max_Add )
- Max_Add = Track_Addresses[i][3];
- }
- Track_Data_Start_Address = (Where + (Pat_Max*8));
-
- /* the track data now ... */
- for ( i=0 ; i<Pat_Max ; i++ )
- {
- BZERO ( Whatever , 1024 );
- for ( j=0 ; j<4 ; j++ )
- {
- Where = Track_Data_Start_Address + Track_Addresses[i][3-j];
- for ( k=0 ; k<64 ; k++ )
- {
- c1 = in_data[Where];
- Where += 1;
- c2 = in_data[Where];
- Where += 1;
- c3 = in_data[Where];
- Where += 1;
- Whatever[k*16+j*4] = (c1<<4)&0x10;
- c4 = (c1 & 0xFE)/2;
- Whatever[k*16+j*4] |= poss[c4][0];
- Whatever[k*16+j*4+1] = poss[c4][1];
- if ( (c2&0x0f) == 0x08 )
- c2 &= 0xf0;
- if ( (c2&0x0f) == 0x07 )
- {
- c2 = (c2&0xf0)+0x0A;
- if ( c3 > 0x80 )
- c3 = 0x100-c3;
- else
- c3 = (c3<<4)&0xf0;
- }
- if ( (c2&0x0f) == 0x06 )
- {
- if ( c3 > 0x80 )
- c3 = 0x100-c3;
- else
- c3 = (c3<<4)&0xf0;
- }
- if ( (c2&0x0f) == 0x05 )
- {
- if ( c3 > 0x80 )
- c3 = 0x100-c3;
- else
- c3 = (c3<<4)&0xf0;
- }
- if ( (c2&0x0f) == 0x0B )
- {
- c3 += 0x04;
- c3 /= 2;
- }
- Whatever[k*16+j*4+2] = c2;
- Whatever[k*16+j*4+3] = c3;
- }
- }
- fwrite ( Whatever , 1024 , 1 , out );
- }
- free ( Whatever );
-
- /* sample data */
- Where = Max_Add+192+Track_Data_Start_Address;
- fwrite ( &in_data[Where] , WholeSampleSize , 1 , out );
-
- Crap ( " NoisePacker v1 " , BAD , BAD , out );
-
- fclose ( out );
-
- printf ( "done\n" );
- return; /* useless ... but */
-}
+++ /dev/null
-/*
- * NoisePacker_v2.c 1997 (c) Asle / ReDoX
- *
- * Converts NoisePacked MODs back to ptk
- * Last revision : 26/11/1999 by Sylvain "Asle" Chipaux
- * reduced to only one FREAD.
- * Speed-up and Binary smaller.
- * update : 01/12/99
- * - removed fopen() and attached funcs.
-*/
-
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Depack_Noisepacker2 ( void )
-{
- Uchar *Whatever;
- Uchar c1=0x00,c2=0x00,c3=0x00,c4=0x00;
- Uchar Nbr_Pos;
- Uchar Nbr_Smp;
- Uchar poss[37][2];
- Uchar Pat_Max=0x00;
- long Where=PW_Start_Address;
- long Max_Add=0;
- long WholeSampleSize=0;
- long TrackDataSize;
- long Track_Addresses[128][4];
- long Unknown1;
- long i=0,j=0,k;
- long Track_Data_Start_Address;
- FILE *out;
-
- if ( Save_Status == BAD )
- return;
-
-#ifdef DOS
- #include "..\include\ptktable.h"
-#endif
-
-#ifdef UNIX
- #include "../include/ptktable.h"
-#endif
-
- BZERO ( Track_Addresses , 128*4*4 );
-
- sprintf ( Depacked_OutName , "%ld.mod" , Cpt_Filename-1 );
- out = mr_fopen ( Depacked_OutName , "w+b" );
- if (!out)
- return;
-
- /* read number of sample */
- Nbr_Smp = ((in_data[Where]<<4)&0xf0) | ((in_data[Where+1]>>4)&0x0f);
- /*printf ( "Number of sample : %d (%x)\n" , Nbr_Smp , Nbr_Smp );*/
-
- /* write title */
- Whatever = (Uchar *) malloc ( 1024 );
- BZERO ( Whatever , 1024 );
- fwrite ( Whatever , 20 , 1 , out );
-
- /* read size of pattern list */
- Nbr_Pos = in_data[Where+3]/2;
- /*printf ( "Size of pattern list : %d\n" , Nbr_Pos );*/
-
- /* read 2 unknown bytes which size seem to be of some use ... */
- Unknown1 = (in_data[Where+4]*256)+in_data[Where+5];
-
- /* read track data size */
- TrackDataSize = (in_data[Where+6]*256)+in_data[Where+7];
- /*printf ( "TrackDataSize : %ld\n" , TrackDataSize );*/
-
- /* read sample descriptions */
- Where += 8;
- for ( i=0 ; i<Nbr_Smp ; i++ )
- {
- /* sample name */
- fwrite ( Whatever , 22 , 1 , out );
- /* size,fine,vol*/
- fwrite ( &in_data[Where+4] , 4 , 1 , out );
- WholeSampleSize += (((in_data[Where+4]*256)+in_data[Where+5])*2);
- /* write loop start */
- fwrite ( &in_data[Where+14] , 2 , 1 , out );
- /* write loop size */
- fwrite ( &in_data[Where+12] , 2 , 1 , out );
- Where += 16;
- }
- /*printf ( "Whole sample size : %ld\n" , WholeSampleSize );*/
-
- /* fill up to 31 samples */
- Whatever[29] = 0x01;
- while ( i != 31 )
- {
- fwrite ( Whatever , 30 , 1 , out );
- i += 1;
- }
-
- /* write size of pattern list */
- fwrite ( &Nbr_Pos , 1 , 1 , out );
-
- /* write noisetracker byte */
- Whatever[256] = 0x7f;
- fwrite ( &Whatever[256] , 1 , 1 , out );
-
- /* bypass 2 bytes ... seems always the same as in $02 */
- /* & bypass 2 other bytes which meaning is beside me */
- Where += 4;
-
- /* read pattern table */
- Pat_Max = 0x00;
- for ( i=0 ; i<Nbr_Pos ; i++ )
- {
- Whatever[i] = ((in_data[Where+(i*2)]*256)+in_data[Where+(i*2)+1])/8;
- if ( Whatever[i] > Pat_Max )
- Pat_Max = Whatever[i];
- }
- Pat_Max += 1;
- Where += Nbr_Pos*2;
- /*printf ( "Number of pattern : %d\n" , Pat_Max );*/
-
- /* write pattern table */
- fwrite ( Whatever , 128 , 1 , out );
-
- /* write ptk's ID */
- Whatever[0] = 'M';
- Whatever[1] = '.';
- Whatever[2] = 'K';
- Whatever[3] = '.';
- fwrite ( Whatever , 4 , 1 , out );
-
- /* read tracks addresses per pattern */
- for ( i=0 ; i<Pat_Max ; i++ )
- {
- Track_Addresses[i][0] = (in_data[Where+(i*8)]*256)+in_data[Where+(i*8)+1];
- if ( Track_Addresses[i][0] > Max_Add )
- Max_Add = Track_Addresses[i][0];
- Track_Addresses[i][1] = (in_data[Where+(i*8)+2]*256)+in_data[Where+(i*8)+3];
- if ( Track_Addresses[i][1] > Max_Add )
- Max_Add = Track_Addresses[i][1];
- Track_Addresses[i][2] = (in_data[Where+(i*8)+4]*256)+in_data[Where+(i*8)+5];
- if ( Track_Addresses[i][2] > Max_Add )
- Max_Add = Track_Addresses[i][2];
- Track_Addresses[i][3] = (in_data[Where+(i*8)+6]*256)+in_data[Where+(i*8)+7];
- if ( Track_Addresses[i][3] > Max_Add )
- Max_Add = Track_Addresses[i][3];
- }
- Track_Data_Start_Address = (Where + (Pat_Max*8));
-
- /* the track data now ... */
- for ( i=0 ; i<Pat_Max ; i++ )
- {
- BZERO ( Whatever , 1024 );
- for ( j=0 ; j<4 ; j++ )
- {
- Where = Track_Data_Start_Address + Track_Addresses[i][3-j];
- for ( k=0 ; k<64 ; k++ )
- {
- c1 = in_data[Where];
- Where += 1;
- c2 = in_data[Where];
- Where += 1;
- c3 = in_data[Where];
- Where += 1;
- Whatever[k*16+j*4] = (c1<<4)&0x10;
- c4 = (c1 & 0xFE)/2;
- Whatever[k*16+j*4] |= poss[c4][0];
- Whatever[k*16+j*4+1] = poss[c4][1];
- if ( (c2&0x0f) == 0x08 )
- c2 &= 0xf0;
- if ( (c2&0x0f) == 0x07 )
- {
- c2 = (c2&0xf0)+0x0A;
- if ( c3 > 0x80 )
- c3 = 0x100-c3;
- else
- c3 = (c3<<4)&0xf0;
- }
- if ( (c2&0x0f) == 0x06 )
- {
- if ( c3 > 0x80 )
- c3 = 0x100-c3;
- else
- c3 = (c3<<4)&0xf0;
- }
- if ( (c2&0x0f) == 0x05 )
- {
- if ( c3 > 0x80 )
- c3 = 0x100-c3;
- else
- c3 = (c3<<4)&0xf0;
- }
- if ( (c2&0x0f) == 0x0E )
- {
- c3 -= 0x01;
- }
- if ( (c2&0x0f) == 0x0B )
- {
- c3 += 0x04;
- c3 /= 2;
- }
- Whatever[k*16+j*4+2] = c2;
- Whatever[k*16+j*4+3] = c3;
- }
- }
- fwrite ( Whatever , 1024 , 1 , out );
- }
- free ( Whatever );
-
- /* sample data */
- Where = Max_Add+192+Track_Data_Start_Address;
- fwrite ( &in_data[Where] , WholeSampleSize , 1 , out );
-
- Crap ( " NoisePacker v2 " , BAD , BAD , out );
-
- fclose ( out );
-
- printf ( "done\n" );
- return; /* useless ... but */
-}
+++ /dev/null
-/*
- * NoisePacker_v3.c 1998 (c) Asle / ReDoX
- *
- * Converts NoisePacked MODs back to ptk
- * Last revision : 26/11/1999 by Sylvain "Asle" Chipaux
- * reduced to only one FREAD.
- * Speed-up and Binary smaller.
- * update : 01/12/99
- * - removed fopen() and attached funcs.
-*/
-
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Depack_Noisepacker3 ( void )
-{
- Uchar *Whatever;
- Uchar c1=0x00,c2=0x00,c3=0x00,c4=0x00;
- Uchar Nbr_Pos;
- Uchar Nbr_Smp;
- Uchar poss[36][2];
- Uchar Pat_Max=0x00;
- long Where=PW_Start_Address;
- long WholeSampleSize=0;
- long TrackDataSize;
- long Track_Addresses[128][4];
- long Unknown1;
- long i=0,j=0,k;
- long Track_Data_Start_Address;
- long SampleDataAddress=0;
- FILE *out;
-
- if ( Save_Status == BAD )
- return;
-
-#ifdef DOS
- #include "..\include\ptktable.h"
-#endif
-
-#ifdef UNIX
- #include "../include/ptktable.h"
-#endif
-
- BZERO ( Track_Addresses , 128*4*4 );
-
- sprintf ( Depacked_OutName , "%ld.mod" , Cpt_Filename-1 );
- out = mr_fopen ( Depacked_OutName , "w+b" );
- if (!out)
- return;
-
- /* read number of sample */
- Nbr_Smp = ((in_data[Where]<<4)&0xf0) | ((in_data[Where+1]>>4)&0x0f);
- /*printf ( "\nNumber of sample : %d (%x)\n" , Nbr_Smp , Nbr_Smp );*/
-
- /* write title */
- Whatever = (Uchar *) malloc ( 1024 );
- BZERO ( Whatever , 1024 );
- fwrite ( Whatever , 20 , 1 , out );
-
- /* read size of pattern list */
- Nbr_Pos = in_data[Where+3]/2;
- /*printf ( "Size of pattern list : %d\n" , Nbr_Pos );*/
-
- /* read 2 unknown bytes which size seem to be of some use ... */
- Unknown1 = (in_data[Where+4]*256)+in_data[Where+5];
-
- /* read track data size */
- TrackDataSize = (in_data[Where+6]*256)+in_data[Where+7];
- /*printf ( "TrackDataSize : %ld\n" , TrackDataSize );*/
-
- /* read sample descriptions */
- Where += 8;
- for ( i=0 ; i<Nbr_Smp ; i++ )
- {
- /* sample name */
- fwrite ( Whatever , 22 , 1 , out );
- /* size */
- fwrite ( &in_data[Where+6] , 2 , 1 , out );
- WholeSampleSize += (((in_data[Where+6]*256)+in_data[Where+7])*2);
- /* write finetune,vol */
- fwrite ( &in_data[Where] , 2 , 1 , out );
- /* write loop start */
- fwrite ( &in_data[Where+14] , 2 , 1 , out );
- /* write loop size */
- fwrite ( &in_data[Where+12] , 2 , 1 , out );
- Where += 16;
- }
- /*printf ( "Whole sample size : %ld\n" , WholeSampleSize );*/
-
- /* fill up to 31 samples */
- Whatever[29] = 0x01;
- while ( i != 31 )
- {
- fwrite ( Whatever , 30 , 1 , out );
- i += 1;
- }
-
- /* write size of pattern list */
- fwrite ( &Nbr_Pos , 1 , 1 , out );
-
- /* write noisetracker byte */
- c1 = 0x7f;
- fwrite ( &c1 , 1 , 1 , out );
-
- /* bypass 2 bytes ... seems always the same as in $02 */
- /* & bypass 2 other bytes which meaning is beside me */
- Where += 4;
-
- /* read pattern table */
- Pat_Max = 0x00;
- for ( i=0 ; i<Nbr_Pos ; i++ )
- {
- Whatever[i] = ((in_data[Where+(i*2)]*256)+in_data[Where+(i*2)+1])/8;
- /*printf ( "%d," , Whatever[i] );*/
- if ( Whatever[i] > Pat_Max )
- Pat_Max = Whatever[i];
- }
- Where += Nbr_Pos*2;
- Pat_Max += 1;
- /*printf ( "Number of pattern : %d\n" , Pat_Max );*/
-
- /* write pattern table */
- fwrite ( Whatever , 128 , 1 , out );
-
- /* write ptk's ID */
- Whatever[0] = 'M';
- Whatever[1] = '.';
- Whatever[2] = 'K';
- Whatever[3] = '.';
- fwrite ( Whatever , 4 , 1 , out );
-
- /* read tracks addresses per pattern */
- /*printf ( "\nWhere : %ld\n" , Where );*/
- for ( i=0 ; i<Pat_Max ; i++ )
- {
- Track_Addresses[i][0] = (in_data[Where+(i*8)]*256)+in_data[Where+(i*8)+1];
- Track_Addresses[i][1] = (in_data[Where+(i*8)+2]*256)+in_data[Where+(i*8)+3];
- Track_Addresses[i][2] = (in_data[Where+(i*8)+4]*256)+in_data[Where+(i*8)+5];
- Track_Addresses[i][3] = (in_data[Where+(i*8)+6]*256)+in_data[Where+(i*8)+7];
- }
- Track_Data_Start_Address = (Where + (Pat_Max*8));
- /*printf ( "Track_Data_Start_Address : %ld\n" , Track_Data_Start_Address );*/
-
- /* the track data now ... */
- for ( i=0 ; i<Pat_Max ; i++ )
- {
- BZERO ( Whatever , 1024 );
- for ( j=0 ; j<4 ; j++ )
- {
- Where = Track_Data_Start_Address + Track_Addresses[i][3-j];
- for ( k=0 ; k<64 ; k++ )
- {
- c1 = in_data[Where];
- Where += 1;
- if ( c1 >= 0x80 )
- {
- k += ((0x100-c1)-1);
- continue;
- }
- c2 = in_data[Where];
- Where += 1;
- c3 = in_data[Where];
- Where += 1;
-
- Whatever[k*16+j*4] = (c1<<4)&0x10;
- c4 = (c1 & 0xFE)/2;
- Whatever[k*16+j*4] |= poss[c4][0];
- Whatever[k*16+j*4+1] = poss[c4][1];
- if ( (c2&0x0f) == 0x08 )
- c2 &= 0xf0;
- if ( (c2&0x0f) == 0x07 )
- {
- c2 = (c2&0xf0)+0x0A;
- if ( c3 > 0x80 )
- c3 = 0x100-c3;
- else
- c3 = (c3<<4)&0xf0;
- }
- if ( (c2&0x0f) == 0x06 )
- {
- if ( c3 > 0x80 )
- c3 = 0x100-c3;
- else
- c3 = (c3<<4)&0xf0;
- }
- if ( (c2&0x0f) == 0x05 )
- {
- if ( c3 > 0x80 )
- c3 = 0x100-c3;
- else
- c3 = (c3<<4)&0xf0;
- }
- if ( (c2&0x0f) == 0x0E )
- {
- c3 = 0x01;
- }
- if ( (c2&0x0f) == 0x0B )
- {
- c3 += 0x04;
- c3 /= 2;
- }
- Whatever[k*16+j*4+2] = c2;
- Whatever[k*16+j*4+3] = c3;
- if ( (c2&0x0f) == 0x0D )
- k = 100; /* to leave the loop */
- }
- if ( Where > SampleDataAddress )
- SampleDataAddress = Where;
- }
- fwrite ( Whatever , 1024 , 1 , out );
- }
- free ( Whatever );
-
- /* sample data */
- if ( (((SampleDataAddress-PW_Start_Address)/2)*2) != SampleDataAddress )
- SampleDataAddress += 1;
- Where = SampleDataAddress;
- /*printf ( "Starting address of sample data : %x\n" , ftell ( in ) );*/
- fwrite ( &in_data[SampleDataAddress] , WholeSampleSize , 1 , out );
-
- Crap ( " NoisePacker v3 " , BAD , BAD , out );
-
- fclose ( out );
-
- printf ( "done\n" );
- return; /* useless ... but */
-}
+++ /dev/null
-/*
- * The_Player_2.2.c 2003 (c) Asle / ReDoX
- *
- * The Player 2.2a to Protracker.
- *
- * Update : 26 nov 2003
- * - used htonl() so that use of addy is now portable on 68k archs
-*/
-
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-
-void Depack_P22 ( void )
-{
- Uchar c1,c2,c3,c4;
- Uchar *Whatever;
- Uchar PatPos = 0x00;
- Uchar Nbr_Sample = 0x00;
- Uchar poss[37][2];
- Uchar sample,note,Note[2];
- Uchar Pattern_Data[128][1024];
- short Pattern_Addresses[128];
- long Track_Data_Address = 0;
- long Track_Table_Address = 0;
- long Sample_Data_Address = 0;
- long WholeSampleSize = 0;
- long SampleAddress[31];
- long SampleSize[31];
- long i=0,j,k,l;
- long voice[4];
- long Where = PW_Start_Address;
- FILE *out;/*,*debug;*/
-
- if ( Save_Status == BAD )
- return;
-
- BZERO ( Pattern_Addresses , 128*2 );
- BZERO ( Pattern_Data , 128*1024 );
- BZERO ( SampleAddress , 31*4 );
- BZERO ( SampleSize , 31*4 );
-
-#ifdef DOS
- #include "..\include\ptktable.h"
-#endif
-
-#ifdef UNIX
- #include "../include/ptktable.h"
-#endif
-
- sprintf ( Depacked_OutName , "%ld.mod" , Cpt_Filename-1 );
- out = mr_fopen ( Depacked_OutName , "w+b" );
- if (!out)
- return;
- /*debug = fopen ( "debug", "w+b" );*/
-
- /* read check ID */
- Where += 4;
-
- /* bypass Real number of pattern */
- Where += 1;
-
- /* read number of pattern in pattern list */
- PatPos = (in_data[Where++]/2) - 1;
-
- /* read number of samples */
- Nbr_Sample = in_data[Where++];
-
- /* bypass empty byte */
- Where += 1;
-
-
-/**********/
-
- /* read track data address */
- Track_Data_Address = (in_data[Where]*256*256*256)+
- (in_data[Where+1]*256*256)+
- (in_data[Where+2]*256)+
- in_data[Where+3];
- Where += 4;
-
- /* read track table address */
- Track_Table_Address = (in_data[Where]*256*256*256)+
- (in_data[Where+1]*256*256)+
- (in_data[Where+2]*256)+
- in_data[Where+3];
- Where += 4;
-
- /* read sample data address */
- Sample_Data_Address = (in_data[Where]*256*256*256)+
- (in_data[Where+1]*256*256)+
- (in_data[Where+2]*256)+
- in_data[Where+3];
- Where += 4;
-
-
- /* write title */
- Whatever = (Uchar *) malloc ( 1024 );
- BZERO ( Whatever , 1024 );
- fwrite ( Whatever , 20 , 1 , out );
-
- /* sample headers stuff */
- for ( i=0 ; i<Nbr_Sample ; i++ )
- {
- /* read sample data address */
- j = (in_data[Where]*256*256*256)+
- (in_data[Where+1]*256*256)+
- (in_data[Where+2]*256)+
- in_data[Where+3];
- SampleAddress[i] = j;
-
- /* write sample name */
- fwrite ( Whatever , 22 , 1 , out );
-
- /* read sample size */
- SampleSize[i] = ((in_data[Where+4]*256)+in_data[Where+5])*2;
- WholeSampleSize += SampleSize[i];
-
- /* loop start */
- k = (in_data[Where+6]*256*256*256)+
- (in_data[Where+7]*256*256)+
- (in_data[Where+8]*256)+
- in_data[Where+9];
-
- /* writing now */
- fwrite ( &in_data[Where+4] , 2 , 1 , out );
- c1 = ((in_data[Where+12]*256)+in_data[Where+13])/74;
- fwrite ( &c1 , 1 , 1 , out );
- fwrite ( &in_data[Where+15] , 1 , 1 , out );
- k -= j;
- k /= 2;
- /* use of htonl() suggested by Xigh !.*/
- l = htonl(k);
- c1 = *((Uchar *)&l+2);
- c2 = *((Uchar *)&l+3);
- fwrite ( &c1 , 1 , 1 , out );
- fwrite ( &c2 , 1 , 1 , out );
- fwrite ( &in_data[Where+10] , 2 , 1 , out );
-
- Where += 16;
- }
-
- /* go up to 31 samples */
- Whatever[29] = 0x01;
- while ( i != 31 )
- {
- fwrite ( Whatever , 30 , 1 , out );
- i += 1;
- }
-
- /* write size of pattern list */
- fwrite ( &PatPos , 1 , 1 , out );
-
- /* write noisetracker byte */
- c1 = 0x7f;
- fwrite ( &c1 , 1 , 1 , out );
-
- /* place file pointer at the pattern list address ... should be */
- /* useless, but then ... */
- Where = PW_Start_Address + Track_Table_Address + 4;
-
- /* create and write pattern list .. no optimization ! */
- /* I'll optimize when I'll feel in the mood */
- for ( c1=0x00 ; c1<PatPos ; c1++ )
- {
- fwrite ( &c1 , 1 , 1 , out );
- }
- c2 = 0x00;
- while ( c1<128 )
- {
- fwrite ( &c2 , 1 , 1 , out );
- c1 += 0x01;
- }
-
- /* write ptk's ID */
- Whatever[0] = 'M';
- Whatever[1] = '.';
- Whatever[2] = 'K';
- Whatever[3] = '.';
- fwrite ( Whatever , 4 , 1 , out );
-
- /* reading all the track addresses .. which seem to be pattern addys ... */
- for ( i=0 ; i<PatPos ; i++ )
- {
- Pattern_Addresses[i] = (in_data[Where]*256) + in_data[Where+1] + Track_Data_Address+4;
- Where += 2;
- }
-
-
- /* rewrite the track data */
- /*printf ( "sorting and depacking tracks data ... " );*/
- for ( i=0 ; i<PatPos ; i++ )
- {
- /*fprintf (debug,"---------------------\nPattern %ld\n",i);*/
- Where = PW_Start_Address + Pattern_Addresses[i];
- voice[0] = voice[1] = voice[2] = voice[3] = 0;
- for ( k=0 ; k<64 ; k++ )
- {
- for ( j=0; j<4 ; j++ )
- {
- if ( voice[j] > k )
- continue;
-
- c1 = in_data[Where++];
- c2 = in_data[Where++];
- c3 = in_data[Where++];
- c4 = in_data[Where++];
-
- /*fprintf (debug,"[%2ld][%2d][%4x] - %2x,%2x,%2x,%2x -> ",j,voice[j],Where-4,c1,c2,c3,c4);*/
-
- sample = ((c1<<4)&0x10) | ((c2>>4)&0x0f);
- BZERO ( Note , 2 );
- note = c1 & 0x7f;
- Note[0] = poss[(note/2)][0];
- Note[1] = poss[(note/2)][1];
- switch ( c2&0x0f )
- {
- case 0x08:
- c2 -= 0x08;
- break;
- case 0x05:
- case 0x06:
- case 0x0A:
- c3 = (c3 > 0x7f) ? ((0x100-c3)<<4) : c3;
- break;
- default:
- break;
- }
- Pattern_Data[i][voice[j]*16+j*4] = (sample&0xf0) | (Note[0]&0x0f);
- Pattern_Data[i][voice[j]*16+j*4+1] = Note[1];
- Pattern_Data[i][voice[j]*16+j*4+2] = c2;
- Pattern_Data[i][voice[j]*16+j*4+3] = c3;
-
- /*fprintf ( debug, "%2x,%2x,%2x,%2x",Pattern_Data[i][voice[j]*16+j*4],Pattern_Data[i][voice[j]*16+j*4+1],Pattern_Data[i][voice[j]*16+j*4+2],Pattern_Data[i][voice[j]*16+j*4+3]);*/
-
- if ( (c4 > 0x00) && (c4 <0x80) )
- {
- voice[j] += c4;
- /*fprintf ( debug, " <-- %d empty lines",c4 );*/
- }
- /*fprintf ( debug, "\n" );*/
- voice[j] += 1;
- } /* end of case 0x80 for first byte */
- }
- }
- /* printf ( "ok\n" );*/
-
-
-
- /* write pattern data */
- /*printf ( "writing pattern data ... " );*/
- /*fflush ( stdout );*/
- for ( i=0 ; i<PatPos ; i++ )
- {
- fwrite ( Pattern_Data[i] , 1024 , 1 , out );
- }
- free ( Whatever );
- /*printf ( "ok\n" );*/
-
-
- /* read and write sample data */
- /*printf ( "writing sample data ... " );*/
- for ( i=0 ; i<Nbr_Sample ; i++ )
- {
- Where = PW_Start_Address + SampleAddress[i]+Sample_Data_Address;
- fwrite ( &in_data[Where] , SampleSize[i] , 1 , out );
- }
- /*printf ( "ok\n" );*/
-
- Crap ( " The Player 2.2A " , BAD , BAD , out );
-
- fflush ( out );
- fclose ( out );
- /* fclose ( debug );*/
-
- printf ( "done\n" );
- return; /* useless ... but */
-}
+++ /dev/null
-/*
- * The_Player_3.0.c 2003 (c) Asle / ReDoX
- *
- * The Player 3.0a to Protracker.
- * ** BETA **
- *
- * Update : 26 nov 2003
- * - used htonl() so that use of addy is now portable on 68k archs
-*/
-
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-
-void Depack_P30 ( void )
-{
- Uchar c1,c2,c3,c4,c5;
- Uchar *Whatever;
- Uchar PatPos = 0x00;
- Uchar Nbr_Sample = 0x00;
- Uchar poss[37][2];
- Uchar sample,note,Note[2];
- Uchar Pattern_Data[128][1024];
- short Pattern_Addresses[128];
- long Track_Data_Address = 0;
- long Track_Table_Address = 0;
- long Sample_Data_Address = 0;
- long WholeSampleSize = 0;
- long SampleAddress[31];
- long SampleSize[31];
- long i=0,j,k,a,c,z;/*l*/
- long voice[4];
- long Where = PW_Start_Address;
- FILE *out,*debug;
-
- if ( Save_Status == BAD )
- return;
-
- BZERO ( Pattern_Addresses , 128*2 );
- BZERO ( Pattern_Data , 128*1024 );
- BZERO ( SampleAddress , 31*4 );
- BZERO ( SampleSize , 31*4 );
-
-#ifdef DOS
- #include "..\include\ptktable.h"
-#endif
-
-#ifdef UNIX
- #include "../include/ptktable.h"
-#endif
-
- sprintf ( Depacked_OutName , "%ld.mod" , Cpt_Filename-1 );
- out = mr_fopen ( Depacked_OutName , "w+b" );
- if (!out)
- return;
- debug = fopen ( "debug", "w+b" );
-
- /* read check ID */
- Where += 4;
-
- /* bypass Real number of pattern */
- Where += 1;
-
- /* read number of pattern in pattern list */
- PatPos = (in_data[Where++]/2) - 1;
-
- /* read number of samples */
- Nbr_Sample = in_data[Where++];
-
- /* bypass empty byte */
- Where += 1;
-
-
-/**********/
-
- /* read track data address */
- Track_Data_Address = (in_data[Where]*256*256*256)+
- (in_data[Where+1]*256*256)+
- (in_data[Where+2]*256)+
- in_data[Where+3];
- Where += 4;
-
- /* read track table address */
- Track_Table_Address = (in_data[Where]*256*256*256)+
- (in_data[Where+1]*256*256)+
- (in_data[Where+2]*256)+
- in_data[Where+3];
- Where += 4;
-
- /* read sample data address */
- Sample_Data_Address = (in_data[Where]*256*256*256)+
- (in_data[Where+1]*256*256)+
- (in_data[Where+2]*256)+
- in_data[Where+3];
- Where += 4;
-
-
- /* write title */
- Whatever = (Uchar *) malloc ( 1024 );
- BZERO ( Whatever , 1024 );
- fwrite ( Whatever , 20 , 1 , out );
-
- /* sample headers stuff */
- for ( i=0 ; i<Nbr_Sample ; i++ )
- {
- /* read sample data address */
- j = (in_data[Where]*256*256*256)+
- (in_data[Where+1]*256*256)+
- (in_data[Where+2]*256)+
- in_data[Where+3];
- SampleAddress[i] = j;
-
- /* write sample name */
- fwrite ( Whatever , 22 , 1 , out );
-
- /* read sample size */
- SampleSize[i] = ((in_data[Where+4]*256)+in_data[Where+5])*2;
- WholeSampleSize += SampleSize[i];
-
- /* loop start */
- k = (in_data[Where+6]*256*256*256)+
- (in_data[Where+7]*256*256)+
- (in_data[Where+8]*256)+
- in_data[Where+9];
-
- /* writing now */
- fwrite ( &in_data[Where+4] , 2 , 1 , out );
- c1 = ((in_data[Where+12]*256)+in_data[Where+13])/74;
- fwrite ( &c1 , 1 , 1 , out );
- fwrite ( &in_data[Where+15] , 1 , 1 , out );
- k -= j;
- k /= 2;
- /* use of htonl() suggested by Xigh !.*/
- z = htonl(k);
- c1 = *((Uchar *)&z+2);
- c2 = *((Uchar *)&z+3);
- fwrite ( &c1 , 1 , 1 , out );
- fwrite ( &c2 , 1 , 1 , out );
- fwrite ( &in_data[Where+10] , 2 , 1 , out );
-
- Where += 16;
- }
-
- /* go up to 31 samples */
- Whatever[29] = 0x01;
- while ( i != 31 )
- {
- fwrite ( Whatever , 30 , 1 , out );
- i += 1;
- }
-
- /* write size of pattern list */
- fwrite ( &PatPos , 1 , 1 , out );
-
- /* write noisetracker byte */
- c1 = 0x7f;
- fwrite ( &c1 , 1 , 1 , out );
-
- /* place file pointer at the pattern list address ... should be */
- /* useless, but then ... */
- Where = PW_Start_Address + Track_Table_Address + 4;
-
- /* create and write pattern list .. no optimization ! */
- /* I'll optimize when I'll feel in the mood */
- for ( c1=0x00 ; c1<PatPos ; c1++ )
- {
- fwrite ( &c1 , 1 , 1 , out );
- }
- c2 = 0x00;
- while ( c1<128 )
- {
- fwrite ( &c2 , 1 , 1 , out );
- c1 += 0x01;
- }
-
- /* write ptk's ID */
- Whatever[0] = 'M';
- Whatever[1] = '.';
- Whatever[2] = 'K';
- Whatever[3] = '.';
- fwrite ( Whatever , 4 , 1 , out );
-
- /* reading all the track addresses .. which seem to be pattern addys ... */
- for ( i=0 ; i<PatPos ; i++ )
- {
- Pattern_Addresses[i] = (in_data[Where]*256) + in_data[Where+1] + Track_Data_Address+4;
- Where += 2;
- }
-
-
- /* rewrite the track data */
- /*printf ( "sorting and depacking tracks data ... " );*/
- for ( i=0 ; i<PatPos ; i++ )
- {
-fprintf (debug,"---------------------\nPattern %ld\n",i);fflush(debug);
- Where = PW_Start_Address + Pattern_Addresses[i];
- voice[0] = voice[1] = voice[2] = voice[3] = 0;
- for ( k=0 ; k<64 ; k++ )
- {
- for ( j=0; j<4 ; j++ )
- {
- if ( voice[j] > k )
- continue;
-
- c1 = in_data[Where++];
- c2 = in_data[Where++];
- c3 = in_data[Where++];
- c4 = in_data[Where++];
-
-fprintf (debug,"[%2ld][%2ld][%4lx] - %2x,%2x,%2x,%2x -> ",j,voice[j],Where-4,c1,c2,c3,c4);fflush(debug);
-
- if ( c1 != 0x80 )
- {
- sample = ((c1<<4)&0x10) | ((c2>>4)&0x0f);
- BZERO ( Note , 2 );
- note = c1 & 0x7f;
- Note[0] = poss[(note/2)][0];
- Note[1] = poss[(note/2)][1];
- switch ( c2&0x0f )
- {
- case 0x08:
- c2 -= 0x08;
- break;
- case 0x05:
- case 0x06:
- case 0x0A:
- c3 = (c3 > 0x7f) ? ((c3<<4)&0xf0) : c3;
- break;
- default:
- break;
- }
- Pattern_Data[i][voice[j]*16+j*4] = (sample&0xf0) | (Note[0]&0x0f);
- Pattern_Data[i][voice[j]*16+j*4+1] = Note[1];
- Pattern_Data[i][voice[j]*16+j*4+2] = c2;
- Pattern_Data[i][voice[j]*16+j*4+3] = c3;
-
-fprintf ( debug, "%2x,%2x,%2x,%2x",Pattern_Data[i][voice[j]*16+j*4],Pattern_Data[i][voice[j]*16+j*4+1],Pattern_Data[i][voice[j]*16+j*4+2],Pattern_Data[i][voice[j]*16+j*4+3]);fflush(debug);
-
- if ( (c4 > 0x00) && (c4 <0x80) )
- {
- voice[j] += c4;
-fprintf ( debug, " <-- %d empty lines",c4 );fflush(debug);
- }
-fprintf ( debug, "\n" );fflush(debug);
- voice[j] += 1;
- } /* end of case 0x80 for first byte */
-
- else /* repeat some lines */
- {
- a = Where;
-
- c5 = c2;
- Where -= (((c3&0x7f)*256)+ (c4*4));
-fprintf ( debug , "\n![%2ld] - go back %d bytes and read %d notes (at %lx)\n" , i , (((c3&0x7f)*256)+ (c4*4)),c5 , a-4 );fflush(debug);
- for ( c=0 ; c<=c5 ; c++ )
- {
- /*fprintf ( debug , "%ld," , k );*/
- c1 = in_data[Where++];
- c2 = in_data[Where++];
- c3 = in_data[Where++];
- c4 = in_data[Where++];
-fprintf (debug,"[%2ld][%2ld][%4lx] - %2x,%2x,%2x,%2x -> ",j,voice[j],Where-4,c1,c2,c3,c4);fflush(debug);
-
- sample = ((c1<<4)&0x10) | ((c2>>4)&0x0f);
- BZERO ( Note , 2 );
- note = c1 & 0x7f;
- Note[0] = poss[(note/2)][0];
- Note[1] = poss[(note/2)][1];
- switch ( c2&0x0f )
- {
- case 0x08:
- c2 -= 0x08;
- break;
- case 0x05:
- case 0x06:
- case 0x0A:
- c3 = (c3 > 0x7f) ? ((c3<<4)&0xf0) : c3;
- break;
- default:
- break;
- }
- Pattern_Data[i][voice[j]*16+j*4] = (sample&0xf0) | (Note[0]&0x0f);
- Pattern_Data[i][voice[j]*16+j*4+1] = Note[1];
- Pattern_Data[i][voice[j]*16+j*4+2] = c2;
- Pattern_Data[i][voice[j]*16+j*4+3] = c3;
-
-fprintf ( debug, "%2x,%2x,%2x,%2x",Pattern_Data[i][voice[j]*16+j*4],Pattern_Data[i][voice[j]*16+j*4+1],Pattern_Data[i][voice[j]*16+j*4+2],Pattern_Data[i][voice[j]*16+j*4+3]);fflush(debug);
- if ( (c4 > 0x00) && (c4 <0x80) )
- {
- voice[j] += c4;
- c += c4; /* empty lines are counted ! */
-fprintf ( debug, " <-- %d empty lines",c4 );fflush(debug);
- }
- voice[j] += 1;
-fprintf ( debug, "\n" );fflush(debug);
- }
-
- voice[j] -= 1;
- Where = a;
-fprintf ( debug , "\n!## back to %lx\n" , a );fflush(debug);
- }
- }
- }
- }
- /* printf ( "ok\n" );*/
-
-
-
- /* write pattern data */
- /*printf ( "writing pattern data ... " );*/
- /*fflush ( stdout );*/
- for ( i=0 ; i<PatPos ; i++ )
- {
- fwrite ( Pattern_Data[i] , 1024 , 1 , out );
- }
- free ( Whatever );
- /*printf ( "ok\n" );*/
-
-
- /* read and write sample data */
- /*printf ( "writing sample data ... " );*/
- for ( i=0 ; i<Nbr_Sample ; i++ )
- {
- Where = PW_Start_Address + SampleAddress[i]+Sample_Data_Address;
- fwrite ( &in_data[Where] , SampleSize[i] , 1 , out );
- }
- /*printf ( "ok\n" );*/
-
- Crap ( " The Player 3.0A " , BAD , BAD , out );
-
- fflush ( out );
- fclose ( out );
- fclose ( debug );
-
- printf ( "done\n" );
- return; /* useless ... but */
-}
+++ /dev/null
-/*
- * The_Player_4.0.c 1997 (c) Asle / ReDoX
- *
- * The Player 4.0a and 4.0b to Protracker.
- *
- * Note: It's a REAL mess !. It's VERY badly coded, I know. Just dont forget
- * it was mainly done to test the description I made of P40* format. I
- * certainly wont dare to beat Gryzor on the ground :). His Prowiz IS
- * the converter to use !!!.
- *
- * Update: 28/11/99
- * - removed fopen() and all attached functions.
- * - overall speed and size optimizings.
- * Update : 26 nov 2003
- * - used htonl() so that use of addy is now portable on 68k archs
-*/
-
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-
-void Depack_P40 ( void )
-{
- Uchar c1,c2,c3,c4,c5;
- Uchar *Whatever;
- Uchar PatPos = 0x00;
- Uchar Nbr_Sample = 0x00;
- Uchar poss[37][2];
- Uchar sample,note,Note[2];
- Uchar Track_Data[512][256];
- short Track_Addresses[128][4];
- long Track_Data_Address = 0;
- long Track_Table_Address = 0;
- long Sample_Data_Address = 0;
- long WholeSampleSize = 0;
- long SampleAddress[31];
- long SampleSize[31];
- long i=0,j,k,l,a,c,z;
- long Where = PW_Start_Address;
- FILE *out;
-
- if ( Save_Status == BAD )
- return;
-
- BZERO ( Track_Addresses , 128*4*2 );
- BZERO ( Track_Data , 512*256 );
- BZERO ( SampleAddress , 31*4 );
- BZERO ( SampleSize , 31*4 );
-
-#ifdef DOS
- #include "..\include\ptktable.h"
-#endif
-
-#ifdef UNIX
- #include "../include/ptktable.h"
-#endif
-
- sprintf ( Depacked_OutName , "%ld.mod" , Cpt_Filename-1 );
- out = mr_fopen ( Depacked_OutName , "w+b" );
- if (!out)
- return;
-
- /* read check ID */
- Where += 4;
-
- /* bypass Real number of pattern */
- Where += 1;
-
- /* read number of pattern in pattern list */
- PatPos = in_data[Where++];
-
- /* read number of samples */
- Nbr_Sample = in_data[Where++];
-
- /* bypass empty byte */
- Where += 1;
-
-
-/**********/
-
- /* read track data address */
- Track_Data_Address = (in_data[Where]*256*256*256)+
- (in_data[Where+1]*256*256)+
- (in_data[Where+2]*256)+
- in_data[Where+3];
- Where += 4;
-
- /* read track table address */
- Track_Table_Address = (in_data[Where]*256*256*256)+
- (in_data[Where+1]*256*256)+
- (in_data[Where+2]*256)+
- in_data[Where+3];
- Where += 4;
-
- /* read sample data address */
- Sample_Data_Address = (in_data[Where]*256*256*256)+
- (in_data[Where+1]*256*256)+
- (in_data[Where+2]*256)+
- in_data[Where+3];
- Where += 4;
-
-
- /* write title */
- Whatever = (Uchar *) malloc ( 1024 );
- BZERO ( Whatever , 1024 );
- fwrite ( Whatever , 20 , 1 , out );
-
- /* sample headers stuff */
- for ( i=0 ; i<Nbr_Sample ; i++ )
- {
- /* read sample data address */
- j = (in_data[Where]*256*256*256)+
- (in_data[Where+1]*256*256)+
- (in_data[Where+2]*256)+
- in_data[Where+3];
- SampleAddress[i] = j;
-
- /* write sample name */
- fwrite ( Whatever , 22 , 1 , out );
-
- /* read sample size */
- SampleSize[i] = ((in_data[Where+4]*256)+in_data[Where+5])*2;
- WholeSampleSize += SampleSize[i];
-
- /* loop start */
- k = (in_data[Where+6]*256*256*256)+
- (in_data[Where+7]*256*256)+
- (in_data[Where+8]*256)+
- in_data[Where+9];
-
- /* writing now */
- fwrite ( &in_data[Where+4] , 2 , 1 , out );
- c1 = ((in_data[Where+12]*256)+in_data[Where+13])/74;
- fwrite ( &c1 , 1 , 1 , out );
- fwrite ( &in_data[Where+15] , 1 , 1 , out );
- k -= j;
- k /= 2;
- /* use of htonl() suggested by Xigh !.*/
- z = htonl(k);
- c1 = *((Uchar *)&z+2);
- c2 = *((Uchar *)&z+3);
- fwrite ( &c1 , 1 , 1 , out );
- fwrite ( &c2 , 1 , 1 , out );
- fwrite ( &in_data[Where+10] , 2 , 1 , out );
-
- Where += 16;
- }
-
- /* go up to 31 samples */
- Whatever[29] = 0x01;
- while ( i != 31 )
- {
- fwrite ( Whatever , 30 , 1 , out );
- i += 1;
- }
-
- /* write size of pattern list */
- fwrite ( &PatPos , 1 , 1 , out );
-
- /* write noisetracker byte */
- c1 = 0x7f;
- fwrite ( &c1 , 1 , 1 , out );
-
- /* place file pointer at the pattern list address ... should be */
- /* useless, but then ... */
- Where = PW_Start_Address + Track_Table_Address + 4;
-
- /* create and write pattern list .. no optimization ! */
- /* I'll optimize when I'll feel in the mood */
- for ( c1=0x00 ; c1<PatPos ; c1++ )
- {
- fwrite ( &c1 , 1 , 1 , out );
- }
- c2 = 0x00;
- while ( c1<128 )
- {
- fwrite ( &c2 , 1 , 1 , out );
- c1 += 0x01;
- }
-
- /* write ptk's ID */
- Whatever[0] = 'M';
- Whatever[1] = '.';
- Whatever[2] = 'K';
- Whatever[3] = '.';
- fwrite ( Whatever , 4 , 1 , out );
-
- /* reading all the track addresses */
- for ( i=0 ; i<PatPos ; i++ )
- {
- for ( j=0 ; j<4 ; j++ )
- {
- Track_Addresses[i][j] = (in_data[Where]*256)+
- in_data[Where+1]+
- Track_Data_Address+4;
- Where += 2;
- }
- }
-
-
- /* rewrite the track data */
- /*printf ( "sorting and depacking tracks data ... " );*/
- for ( i=0 ; i<PatPos ; i++ )
- {
- for ( j=0 ; j<4 ; j++ )
- {
- Where = PW_Start_Address + Track_Addresses[i][j];
- for ( k=0 ; k<64 ; k++ )
- {
- c1 = in_data[Where++];
- c2 = in_data[Where++];
- c3 = in_data[Where++];
- c4 = in_data[Where++];
-
- if ( c1 != 0x80 )
- {
-
- sample = ((c1<<4)&0x10) | ((c2>>4)&0x0f);
- BZERO ( Note , 2 );
- note = c1 & 0x7f;
- Note[0] = poss[(note/2)][0];
- Note[1] = poss[(note/2)][1];
- switch ( c2&0x0f )
- {
- case 0x08:
- c2 -= 0x08;
- break;
- case 0x05:
- case 0x06:
- case 0x0A:
- c3 = (c3 > 0x7f) ? ((0x100-c3)<<4) : c3;
-// if ( c3 >= 0x80 )
-// c3 = (c3<<4)&0xf0;
- break;
- default:
- break;
- }
- Track_Data[i*4+j][k*4] = (sample&0xf0) | (Note[0]&0x0f);
- Track_Data[i*4+j][k*4+1] = Note[1];
- Track_Data[i*4+j][k*4+2] = c2;
- Track_Data[i*4+j][k*4+3] = c3;
-
- if ( (c4 > 0x00) && (c4 <0x80) )
- k += c4;
- if ( (c4 > 0x7f) && (c4 <=0xff) )
- {
- k+=1;
- for ( l=256 ; l>c4 ; l-- )
- {
- Track_Data[i*4+j][k*4] = (sample&0xf0) | (Note[0]&0x0f);
- Track_Data[i*4+j][k*4+1] = Note[1];
- Track_Data[i*4+j][k*4+2] = c2;
- Track_Data[i*4+j][k*4+3] = c3;
- k+=1;
- }
- k -= 1;
- }
- }
-
- else
- {
- a = Where;
-
- c5 = c2;
- Where = PW_Start_Address + (c3 * 256) + c4 + Track_Data_Address + 4;
-/*fprintf ( debug , "%2d (pattern %ld)(at %x)\n" , c2 , i , a-4 );*/
- for ( c=0 ; c<=c5 ; c++ )
- {
-/*fprintf ( debug , "%ld," , k );*/
- c1 = in_data[Where++];
- c2 = in_data[Where++];
- c3 = in_data[Where++];
- c4 = in_data[Where++];
-
- sample = ((c1<<4)&0x10) | ((c2>>4)&0x0f);
- BZERO ( Note , 2 );
- note = c1 & 0x7f;
- Note[0] = poss[(note/2)][0];
- Note[1] = poss[(note/2)][1];
- switch ( c2&0x0f )
- {
- case 0x08:
- c2 -= 0x08;
- break;
- case 0x05:
- case 0x06:
- case 0x0A:
- c3 = (c3 > 0x7f) ? ((0x100-c3)<<4) : c3;
-// if ( c3 >= 0x80 )
-// c3 = (c3<<4)&0xf0;
- break;
- default:
- break;
- }
- Track_Data[i*4+j][k*4] = (sample&0xf0) | (Note[0]&0x0f);
- Track_Data[i*4+j][k*4+1] = Note[1];
- Track_Data[i*4+j][k*4+2] = c2;
- Track_Data[i*4+j][k*4+3] = c3;
-
- if ( (c4 > 0x00) && (c4 <0x80) )
- k += c4;
- if ( (c4 > 0x7f) && (c4 <=0xff) )
- {
- k+=1;
- for ( l=256 ; l>c4 ; l-- )
- {
- Track_Data[i*4+j][k*4] = (sample&0xf0) | (Note[0]&0x0f);
- Track_Data[i*4+j][k*4+1] = Note[1];
- Track_Data[i*4+j][k*4+2] = c2;
- Track_Data[i*4+j][k*4+3] = c3;
- k+=1;
- }
- k -= 1;
- }
- k += 1;
- }
-
- k -= 1;
- Where = a;
-/*fprintf ( debug , "\n## back to %x\n" , a );*/
- }
- }
- }
- }
- /*printf ( "ok\n" );*/
-
-/*
-for ( i=0 ; i<PatPos*4 ; i++ )
-{
- fprintf ( debug , "\n\ntrack #%ld----------------\n" , i );
- for ( j=0 ; j<64 ; j++ )
- {
- fprintf ( debug , "%2x %2x %2x %2x\n"
- , Track_Data[i][j*4]
- , Track_Data[i][j*4+1]
- , Track_Data[i][j*4+2]
- , Track_Data[i][j*4+3] );
- }
-}
-*/
-
- /* write pattern data */
- /*printf ( "writing pattern data ... " );*/
- /*fflush ( stdout );*/
- for ( i=0 ; i<PatPos ; i++ )
- {
- BZERO ( Whatever , 1024 );
- for ( j=0 ; j<64 ; j++ )
- {
- for ( k=0 ; k<4 ; k++ )
- {
- Whatever[j*16+k*4] = Track_Data[k+i*4][j*4];
- Whatever[j*16+k*4+1] = Track_Data[k+i*4][j*4+1];
- Whatever[j*16+k*4+2] = Track_Data[k+i*4][j*4+2];
- Whatever[j*16+k*4+3] = Track_Data[k+i*4][j*4+3];
- }
- }
- fwrite ( Whatever , 1024 , 1 , out );
- }
- free ( Whatever );
- /*printf ( "ok\n" );*/
-
-
- /* read and write sample data */
- /*printf ( "writing sample data ... " );*/
- for ( i=0 ; i<Nbr_Sample ; i++ )
- {
- Where = PW_Start_Address + SampleAddress[i]+Sample_Data_Address;
- fwrite ( &in_data[Where] , SampleSize[i] , 1 , out );
- }
- /*printf ( "ok\n" );*/
-
- if ( in_data[PW_Start_Address+3] == 'A' )
- {
- Crap ( " The Player 4.0A " , BAD , BAD , out );
- }
- if ( in_data[PW_Start_Address+3] == 'B' )
- {
- Crap ( " The Player 4.0B " , BAD , BAD , out );
- }
-
- fflush ( out );
- fclose ( out );
-
- printf ( "done\n" );
- return; /* useless ... but */
-}
+++ /dev/null
-/*
- * The_Player_4.1a.c 1997 (c) Asle / ReDoX
- *
- * The Player 4.1a to Protracker.
- *
- * Note: It's a REAL mess !. It's VERY badly coded, I know. Just dont forget
- * it was mainly done to test the description I made of P41a format. I
- * certainly wont dare to beat Gryzor on the ground :). His Prowiz IS
- * the converter to use !!!.
- *
- * Update: 28/11/99
- * - removed fopen() and all attached functions.
- * - overall speed and size optimizings.
- * Update : 26 nov 2003
- * - used htonl() so that use of addy is now portable on 68k archs
-*/
-
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Depack_P41A ( void )
-{
- Uchar c1,c2,c3,c4,c5;
- Uchar *Whatever;
- Uchar PatPos = 0x00;
- Uchar Nbr_Sample = 0x00;
- Uchar poss[37][2];
- Uchar sample,note,Note[2];
- Uchar Track_Data[512][256];
- short Track_Addresses[128][4];
- long Track_Data_Address = 0;
- long Track_Table_Address = 0;
- long Sample_Data_Address = 0;
- long WholeSampleSize = 0;
- long SampleAddress[31];
- long SampleSize[31];
- long i=0,j,k,l,a,c,z;
- long Where = PW_Start_Address;
- FILE *out;
-
- if ( Save_Status == BAD )
- return;
-
- BZERO ( Track_Addresses , 128*4*2 );
- BZERO ( Track_Data , 512*256 );
- BZERO ( SampleAddress , 31*4 );
- BZERO ( SampleSize , 31*4 );
-
-#ifdef DOS
- #include "..\include\ptktable.h"
-#endif
-
-#ifdef UNIX
- #include "../include/ptktable.h"
-#endif
-
- sprintf ( Depacked_OutName , "%ld.mod" , Cpt_Filename-1 );
- out = mr_fopen ( Depacked_OutName , "w+b" );
- if (!out)
- return;
-
- /* read check ID */
- Where += 4;
-
- /* bypass Real number of pattern */
- Where += 1;
-
- /* read number of pattern in pattern list */
- PatPos = in_data[Where++];
-
- /* read number of samples */
- Nbr_Sample = in_data[Where++];
-
- /* bypass empty byte */
- Where += 1;
-
-
-/**********/
-
- /* read track data address */
- Track_Data_Address = (in_data[Where]*256*256*256)+
- (in_data[Where+1]*256*256)+
- (in_data[Where+2]*256)+
- in_data[Where+3];
- Where += 4;
-
- /* read track table address */
- Track_Table_Address = (in_data[Where]*256*256*256)+
- (in_data[Where+1]*256*256)+
- (in_data[Where+2]*256)+
- in_data[Where+3];
- Where += 4;
-
- /* read sample data address */
- Sample_Data_Address = (in_data[Where]*256*256*256)+
- (in_data[Where+1]*256*256)+
- (in_data[Where+2]*256)+
- in_data[Where+3];
- Where += 4;
-
-
- /* write title */
- Whatever = (Uchar *) malloc ( 1024 );
- BZERO ( Whatever , 1024 );
- fwrite ( Whatever , 20 , 1 , out );
-
- /* sample headers stuff */
- for ( i=0 ; i<Nbr_Sample ; i++ )
- {
- /* read sample data address */
- j = (in_data[Where]*256*256*256)+
- (in_data[Where+1]*256*256)+
- (in_data[Where+2]*256)+
- in_data[Where+3];
- SampleAddress[i] = j;
-
- /* write sample name */
- fwrite ( Whatever , 22 , 1 , out );
-
- /* read sample size */
- SampleSize[i] = ((in_data[Where+4]*256)+in_data[Where+5])*2;
- WholeSampleSize += SampleSize[i];
-
- /* loop start */
- k = (in_data[Where+6]*256*256*256)+
- (in_data[Where+7]*256*256)+
- (in_data[Where+8]*256)+
- in_data[Where+9];
-
- /* writing now */
- fwrite ( &in_data[Where+4] , 2 , 1 , out );
- c1 = ((in_data[Where+14]*256)+in_data[Where+15])/74;
- fwrite ( &c1 , 1 , 1 , out );
- fwrite ( &in_data[Where+13] , 1 , 1 , out );
- k -= j;
- k /= 2;
- /* use of htonl() suggested by Xigh !.*/
- z = htonl(k);
- c1 = *((Uchar *)&z+2);
- c2 = *((Uchar *)&z+3);
- fwrite ( &c1 , 1 , 1 , out );
- fwrite ( &c2 , 1 , 1 , out );
- fwrite ( &in_data[Where+10] , 2 , 1 , out );
-
- Where += 16;
- }
-
- /* go up to 31 samples */
- Whatever[29] = 0x01;
- while ( i != 31 )
- {
- fwrite ( Whatever , 30 , 1 , out );
- i += 1;
- }
-
- /* write size of pattern list */
- fwrite ( &PatPos , 1 , 1 , out );
-
- /* write noisetracker byte */
- c1 = 0x7f;
- fwrite ( &c1 , 1 , 1 , out );
-
- /* place file pointer at the pattern list address ... should be */
- /* useless, but then ... */
- Where = PW_Start_Address + Track_Table_Address + 4;
-
- /* create and write pattern list .. no optimization ! */
- /* I'll optimize when I'll feel in the mood */
- for ( c1=0x00 ; c1<PatPos ; c1++ )
- {
- fwrite ( &c1 , 1 , 1 , out );
- }
- c2 = 0x00;
- while ( c1<128 )
- {
- fwrite ( &c2 , 1 , 1 , out );
- c1 += 0x01;
- }
-
- /* write ptk's ID */
- Whatever[0] = 'M';
- Whatever[1] = '.';
- Whatever[2] = 'K';
- Whatever[3] = '.';
- fwrite ( Whatever , 4 , 1 , out );
-
- /* reading all the track addresses */
- for ( i=0 ; i<PatPos ; i++ )
- {
- for ( j=0 ; j<4 ; j++ )
- {
- Track_Addresses[i][j] = (in_data[Where]*256)+
- in_data[Where+1]+
- Track_Data_Address+4;
- Where += 2;
- }
- }
-
-
- /* rewrite the track data */
- /*printf ( "sorting and depacking tracks data ... " );*/
- for ( i=0 ; i<PatPos ; i++ )
- {
- for ( j=0 ; j<4 ; j++ )
- {
- Where = PW_Start_Address + Track_Addresses[i][j];
- for ( k=0 ; k<64 ; k++ )
- {
- c1 = in_data[Where++];
- c2 = in_data[Where++];
- c3 = in_data[Where++];
- c4 = in_data[Where++];
-
- if ( c1 != 0x80 )
- {
-
- sample = ((c1<<4)&0x10) | ((c2>>4)&0x0f);
- BZERO ( Note , 2 );
- note = c1 & 0x7f;
- Note[0] = poss[(note/2)][0];
- Note[1] = poss[(note/2)][1];
- switch ( c2&0x0f )
- {
- case 0x08:
- c2 -= 0x08;
- break;
- case 0x05:
- case 0x06:
- case 0x0A:
- c3 = (c3 > 0x7f) ? ((0x100-c3)<<4) : c3;
-// if ( c3 >= 0x80 )
-// c3 = (c3<<4)&0xf0;
- break;
- default:
- break;
- }
- Track_Data[i*4+j][k*4] = (sample&0xf0) | (Note[0]&0x0f);
- Track_Data[i*4+j][k*4+1] = Note[1];
- Track_Data[i*4+j][k*4+2] = c2;
- Track_Data[i*4+j][k*4+3] = c3;
-
- if ( (c4 > 0x00) && (c4 <0x80) )
- k += c4;
- if ( (c4 > 0x7f) && (c4 <=0xff) )
- {
- k+=1;
- for ( l=256 ; l>c4 ; l-- )
- {
- Track_Data[i*4+j][k*4] = (sample&0xf0) | (Note[0]&0x0f);
- Track_Data[i*4+j][k*4+1] = Note[1];
- Track_Data[i*4+j][k*4+2] = c2;
- Track_Data[i*4+j][k*4+3] = c3;
- k+=1;
- }
- k -= 1;
- }
- }
-
- else
- {
- a = Where;
-
- c5 = c2;
- Where = PW_Start_Address + (c3 * 256) + c4 + Track_Data_Address + 4;
-/*fprintf ( debug , "%2d (pattern %ld)(at %x)\n" , c2 , i , a-4 );*/
- for ( c=0 ; c<=c5 ; c++ )
- {
-/*fprintf ( debug , "%ld," , k );*/
- c1 = in_data[Where++];
- c2 = in_data[Where++];
- c3 = in_data[Where++];
- c4 = in_data[Where++];
-
- sample = ((c1<<4)&0x10) | ((c2>>4)&0x0f);
- BZERO ( Note , 2 );
- note = c1 & 0x7f;
- Note[0] = poss[(note/2)][0];
- Note[1] = poss[(note/2)][1];
- switch ( c2&0x0f )
- {
- case 0x08:
- c2 -= 0x08;
- break;
- case 0x05:
- case 0x06:
- case 0x0A:
- c3 = (c3 > 0x7f) ? ((0x100-c3)<<4) : c3;
-// if ( c3 >= 0x80 )
-// c3 = (c3<<4)&0xf0;
- break;
- default:
- break;
- }
- Track_Data[i*4+j][k*4] = (sample&0xf0) | (Note[0]&0x0f);
- Track_Data[i*4+j][k*4+1] = Note[1];
- Track_Data[i*4+j][k*4+2] = c2;
- Track_Data[i*4+j][k*4+3] = c3;
-
- if ( (c4 > 0x00) && (c4 <0x80) )
- k += c4;
- if ( (c4 > 0x7f) && (c4 <=0xff) )
- {
- k+=1;
- for ( l=256 ; l>c4 ; l-- )
- {
- Track_Data[i*4+j][k*4] = (sample&0xf0) | (Note[0]&0x0f);
- Track_Data[i*4+j][k*4+1] = Note[1];
- Track_Data[i*4+j][k*4+2] = c2;
- Track_Data[i*4+j][k*4+3] = c3;
- k+=1;
- }
- k -= 1;
- }
- k += 1;
- }
-
- k -= 1;
- Where = a;
-/*fprintf ( debug , "\n## back to %x\n" , a );*/
- }
- }
- }
- }
- /*printf ( "ok\n" );*/
-
-/*
-for ( i=0 ; i<PatPos*4 ; i++ )
-{
- fprintf ( debug , "\n\ntrack #%ld----------------\n" , i );
- for ( j=0 ; j<64 ; j++ )
- {
- fprintf ( debug , "%2x %2x %2x %2x\n"
- , Track_Data[i][j*4]
- , Track_Data[i][j*4+1]
- , Track_Data[i][j*4+2]
- , Track_Data[i][j*4+3] );
- }
-}
-*/
-
- /* write pattern data */
- /*printf ( "writing pattern data ... " );*/
- /*fflush ( stdout );*/
- for ( i=0 ; i<PatPos ; i++ )
- {
- BZERO ( Whatever , 1024 );
- for ( j=0 ; j<64 ; j++ )
- {
- for ( k=0 ; k<4 ; k++ )
- {
- Whatever[j*16+k*4] = Track_Data[k+i*4][j*4];
- Whatever[j*16+k*4+1] = Track_Data[k+i*4][j*4+1];
- Whatever[j*16+k*4+2] = Track_Data[k+i*4][j*4+2];
- Whatever[j*16+k*4+3] = Track_Data[k+i*4][j*4+3];
- }
- }
- fwrite ( Whatever , 1024 , 1 , out );
- }
- free ( Whatever );
- /*printf ( "ok\n" );*/
-
-
- /* read and write sample data */
- /*printf ( "writing sample data ... " );*/
- for ( i=0 ; i<Nbr_Sample ; i++ )
- {
- Where = PW_Start_Address + SampleAddress[i]+Sample_Data_Address;
- fwrite ( &in_data[Where] , SampleSize[i] , 1 , out );
- }
- /*printf ( "ok\n" );*/
-
- Crap ( " The Player 4.1A " , BAD , BAD , out );
-
- fflush ( out );
- fclose ( out );
-
- printf ( "done\n" );
- return; /* useless ... but */
-}
+++ /dev/null
-/*
- * The_Player_5.0a.c 1998 (c) Asle / ReDoX
- *
- * The Player 5.0a to Protracker.
- *
- * Note: It's a REAL mess !. It's VERY badly coded, I know. Just dont forget
- * it was mainly done to test the description I made of P50a format. I
- * certainly wont dare to beat Gryzor on the ground :). His Prowiz IS
- * the converter to use !!!. Though, using the official depacker could
- * be a good idea too :).
- *
- * update:28/11/99
- * - removed fopen() and all similar functions
- * - Speed and Size (?) optimizings
- * Update : 26 nov 2003
- * - used htonl() so that use of addy is now portable on 68k archs
-*/
-
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-#define ON 1
-#define OFF 2
-
-void Depack_P50A ( void )
-{
- Uchar c1,c2,c3,c4,c5,c6;
- long Max;
- Uchar *Whatever;
- signed char *SmpDataWork;
- Uchar PatPos = 0x00;
- Uchar PatMax = 0x00;
- Uchar Nbr_Sample = 0x00;
- Uchar poss[37][2];
- Uchar Track_Data[512][256];
- Uchar SmpSizes[31][2];
- Uchar GLOBAL_DELTA=OFF;
- long Track_Address[128][4];
- long Track_Data_Address = 0;
- long Sample_Data_Address = 0;
- long WholeSampleSize = 0;
- long i=0,j,k,l,a,b,z;
- long SampleSizes[31];
- long SampleAddresses[32];
- long Where = PW_Start_Address;
- FILE *out;
-
- if ( Save_Status == BAD )
- return;
-
- BZERO ( Track_Address , 128*4*4 );
- BZERO ( Track_Data , 512*256 );
- BZERO ( SampleSizes , 31*4 );
- BZERO ( SampleAddresses , 32*4 );
- BZERO ( SmpSizes , 31*2 );
-
-#ifdef DOS
- #include "..\include\ptktable.h"
-#endif
-
-#ifdef UNIX
- #include "../include/ptktable.h"
-#endif
-
- sprintf ( Depacked_OutName , "%ld.mod" , Cpt_Filename-1 );
- out = mr_fopen ( Depacked_OutName , "w+b" );
- if (!out)
- return;
-
- /* read sample data address */
- Sample_Data_Address = (in_data[Where]*256)+in_data[Where+1];
-
- /* read Real number of pattern */
- PatMax = in_data[Where+2];
- Where += 3;
-
- /* read number of samples */
- Nbr_Sample = in_data[Where];
- Where += 1;
- if ( (Nbr_Sample&0x80) == 0x80 )
- {
- /*printf ( "Samples are saved as delta values !\n" );*/
- GLOBAL_DELTA = ON;
- }
- Nbr_Sample &= 0x3F;
-
- /* write title */
- Whatever = (Uchar *) malloc ( 1024 );
- BZERO ( Whatever , 1024 );
- fwrite ( Whatever , 20 , 1 , out );
-
- /* sample headers stuff */
- for ( i=0 ; i<Nbr_Sample ; i++ )
- {
- /* write sample name */
- fwrite ( Whatever , 22 , 1 , out );
-
- /* sample size */
- SmpSizes[i][0] = in_data[Where];
- SmpSizes[i][1] = in_data[Where+1];
- j = (SmpSizes[i][0]*256)+SmpSizes[i][1];
- if ( j > 0xFF00 )
- {
- SampleSizes[i] = SampleSizes[0xFFFF-j];
- SmpSizes[i][0] = SmpSizes[0xFFFF-j][0];
- SmpSizes[i][1] = SmpSizes[0xFFFF-j][1];
-/*fprintf ( debug , "!%2ld!" , 0xFFFF-j );*/
- SampleAddresses[i+1] = SampleAddresses[0xFFFF-j+1];/* - SampleSizes[i]+SampleSizes[0xFFFF-j];*/
- }
- else
- {
- SampleAddresses[i+1] = SampleAddresses[i]+SampleSizes[i-1];
- SampleSizes[i] = j*2;
- WholeSampleSize += SampleSizes[i];
- }
- j = SampleSizes[i]/2;
- fwrite ( &SmpSizes[i][0] , 1 , 1 , out );
- fwrite ( &SmpSizes[i][1] , 1 , 1 , out );
-
- /* finetune,vol */
- fwrite ( &in_data[Where+2] , 2 , 1 , out );
-
- /* loop start */
-/*fprintf ( debug , "loop start : %2x, %2x " , c1,c2 );*/
- if ( (in_data[Where+4]==0xFF) && (in_data[Where+5]==0xFF) )
- {
- Whatever[53]=0x01;
- fwrite ( &Whatever[50] , 4 , 1 , out );
-/*fprintf ( debug , " <--- no loop! (%2x,%2x)\n" ,c3,c4);*/
- Where += 6;
- continue;
- }
- fwrite ( &in_data[Where+4] , 2 , 1 , out );
- l = j - ((in_data[Where+4]*256)+in_data[Where+5]);
-/*fprintf ( debug , " -> size:%6ld lstart:%5d -> lsize:%ld\n" , j,c1*256+c2,l );*/
-
- /* use of htonl() suggested by Xigh !.*/
- z = htonl(l);
- c1 = *((Uchar *)&z+2);
- c2 = *((Uchar *)&z+3);
- fwrite ( &c1 , 1 , 1 , out );
- fwrite ( &c2 , 1 , 1 , out );
-
- Where += 6;
- }
-
- /* go up to 31 samples */
- Whatever[129] = 0x01;
- while ( i != 31 )
- {
- fwrite ( &Whatever[100] , 30 , 1 , out );
- i += 1;
- }
- /*printf ( "Whole sample size : %ld\n" , WholeSampleSize );*/
-
-/*fprintf ( debug , "Where after sample headers : %x\n" , ftell ( in ) );*/
-
- /* read tracks addresses per pattern */
- for ( i=0 ; i<PatMax ; i++ )
- {
-/*fprintf ( debug , "\npattern %ld : " , i );*/
- for ( j=0 ; j<4 ; j++ )
- {
- Track_Address[i][j] = (in_data[Where]*256)+in_data[Where+1];
- Where += 2;
-/*fprintf ( debug , "%6ld, " , Track_Address[i][j] );*/
- }
- }
-/*fprintf ( debug , "\n\nwhere after the track addresses : %x\n\n" , ftell ( in ));*/
-
-
- /* pattern table */
-/*fprintf ( debug , "\nPattern table :\n" );*/
- BZERO ( Whatever , 1024 );
- for ( PatPos=0 ; PatPos<128 ; PatPos++ )
- {
- c1 = in_data[Where++];
- if ( c1 == 0xFF )
- break;
- Whatever[PatPos] = c1/2;
-/*fprintf ( debug , "%2x, " , Whatever[PatPos] );*/
- }
-
- /* write size of pattern list */
- fwrite ( &PatPos , 1 , 1 , out );
-/*fprintf ( debug , "\nsize of the pattern table : %d\n\n" , PatPos );*/
-
- /* write noisetracker byte */
- c1 = 0x7f;
- fwrite ( &c1 , 1 , 1 , out );
-
- /* write pattern table */
- fwrite ( Whatever , 128 , 1 , out );
-
- /* write ptk's ID */
- Whatever[0] = 'M';
- Whatever[1] = '.';
- Whatever[2] = 'K';
- Whatever[3] = '.';
- fwrite ( Whatever , 4 , 1 , out );
-
-/*fprintf ( debug , "\n\nbefore reading track data : %x\n" , Where );*/
- Track_Data_Address = Where;
-
- /* rewrite the track data */
-
- /*printf ( "sorting and depacking tracks data ... " );*/
- /*fflush ( stdout );*/
- for ( i=0 ; i<PatMax ; i++ )
- {
-/*fprintf ( debug , "\n\npattern %ld\n" , i );*/
- Max = 63;
- for ( j=0 ; j<4 ; j++ )
- {
- Where = Track_Address[i][j]+Track_Data_Address;
-/*fprintf ( debug , "track %ld (at:%ld)\n" , j,ftell ( in ) );*/
- for ( k=0 ; k<=Max ; k++ )
- {
- c1 = in_data[Where++];
- c2 = in_data[Where++];
- c3 = in_data[Where++];
-/*fprintf ( debug , "%2ld: %2x, %2x, %2x, " , k , c1,c2,c3 );*/
- if ( ((c1&0x80) == 0x80) && (c1!=0x80) )
- {
- c4 = in_data[Where++];
- c1 = 0xFF-c1;
- Track_Data[i*4+j][k*4] = ((c1<<4)&0x10) | (poss[c1/2][0]);
- Track_Data[i*4+j][k*4+1] = poss[c1/2][1];
- c6 = c2&0x0f;
- if ( c6 == 0x08 )
- c2 -= 0x08;
- Track_Data[i*4+j][k*4+2] = c2;
- if ( (c6==0x05) || (c6==0x06) || (c6==0x0a) )
- c3 = (c3 > 0x7f) ? ((0x100-c3)<<4) : c3;
- Track_Data[i*4+j][k*4+3] = c3;
- if ( c6 == 0x0D )
- {
-/*fprintf ( debug , " <-- PATTERN BREAK !, track ends\n" );*/
- Max = k;
- k = 9999l;
- continue;
- }
- if ( c6 == 0x0B )
- {
-/*fprintf ( debug , " <-- PATTERN JUMP !, track ends\n" );*/
- Max = k;
- k = 9999l;
- continue;
- }
-
- if ( c4 < 0x80 )
- {
-/*fprintf ( debug , "%2x <--- bypass %d rows !\n" , c4 , c4 );*/
- k += c4;
- continue;
- }
-/*fprintf ( debug , "%2x <--- repeat current row %d times\n" , c4 , 0x100-c4 );*/
- c4=0x100-c4;
- for ( l=0 ; l<c4 ; l++ )
- {
- k += 1;
-/*fprintf ( debug , "*%2ld: %2x, %2x, %2x\n" , k , c1,c2,c3 );*/
- Track_Data[i*4+j][k*4] = ((c1<<4)&0x10) | (poss[c1/2][0]);
- Track_Data[i*4+j][k*4+1] = poss[c1/2][1];
- c6 = c2&0x0f;
- if ( c6 == 0x08 )
- c2 -= 0x08;
- Track_Data[i*4+j][k*4+2] = c2;
- if ( (c6==0x05) || (c6==0x06) || (c6==0x0a) )
- c3 = (c3 > 0x7f) ? ((0x100-c3)<<4) : c3;
- Track_Data[i*4+j][k*4+3] = c3;
- }
- continue;
- }
- if ( c1 == 0x80 )
- {
- c4 = in_data[Where++];
-/*fprintf ( debug , "%2x <--- repeat %2d lines some %2d bytes before\n" , c4,c2+1,(c3*256)+c4);*/
- a = Where;
- c5 = c2;
- Where -= ((c3*256)+c4);
- for ( l=0 ; l<=c5 ; l++,k++ )
- {
- c1 = in_data[Where++];
- c2 = in_data[Where++];
- c3 = in_data[Where++];
-/*fprintf ( debug , "#%2ld: %2x, %2x, %2x, " , k , c1,c2,c3 );*/
- if ( ((c1&0x80) == 0x80) && (c1!=0x80) )
- {
- c4 = in_data[Where++];
- c1 = 0xFF-c1;
- Track_Data[i*4+j][k*4] = ((c1<<4)&0x10) | (poss[c1/2][0]);
- Track_Data[i*4+j][k*4+1] = poss[c1/2][1];
- c6 = c2&0x0f;
- if ( c6 == 0x08 )
- c2 -= 0x08;
- Track_Data[i*4+j][k*4+2] = c2;
- if ( (c6==0x05) || (c6==0x06) || (c6==0x0a) )
- c3 = (c3 > 0x7f) ? ((0x100-c3)<<4) : c3;
- Track_Data[i*4+j][k*4+3] = c3;
- if ( c6 == 0x0D )
- {
- Max = k;
- k = l = 9999l;
-/*fprintf ( debug , " <-- PATTERN BREAK !, track ends\n" );*/
- continue;
- }
- if ( c6 == 0x0B )
- {
- Max = k;
- k = l = 9999l;
-/*fprintf ( debug , " <-- PATTERN JUMP !, track ends\n" );*/
- continue;
- }
-
- if ( c4 < 0x80 )
- {
-/*fprintf ( debug , "%2x <--- bypass %d rows !\n" , c4 , c4 );*/
- /*l += c4;*/
- k += c4;
- continue;
- }
-/*fprintf ( debug , "%2x <--- repeat current row %d times\n" , c4 , 0x100-c4 );*/
- c4=0x100-c4;
- /*l += (c4-1);*/
- for ( b=0 ; b<c4 ; b++ )
- {
- k += 1;
-/*fprintf ( debug , "*%2ld: %2x, %2x, %2x\n" , k , c1,c2,c3 );*/
- Track_Data[i*4+j][k*4] = ((c1<<4)&0x10) | (poss[c1/2][0]);
- Track_Data[i*4+j][k*4+1] = poss[c1/2][1];
- c6 = c2&0x0f;
- if ( c6 == 0x08 )
- c2 -= 0x08;
- Track_Data[i*4+j][k*4+2] = c2;
- if ( (c6==0x05) || (c6==0x06) || (c6==0x0a) )
- c3 = (c3 > 0x7f) ? ((0x100-c3)<<4) : c3;
- Track_Data[i*4+j][k*4+3] = c3;
- }
- }
- Track_Data[i*4+j][k*4] = ((c1<<4)&0x10) | (poss[c1/2][0]);
- Track_Data[i*4+j][k*4+1] = poss[c1/2][1];
- c6 = c2&0x0f;
- if ( c6 == 0x08 )
- c2 -= 0x08;
- Track_Data[i*4+j][k*4+2] = c2;
- if ( (c6==0x05) || (c6==0x06) || (c6==0x0a) )
- c3 = (c3 > 0x7f) ? ((0x100-c3)<<4) : c3;
- Track_Data[i*4+j][k*4+3] = c3;
-/*fprintf ( debug , "\n" );*/
- }
- Where = a;
-/*fprintf ( debug , "\n" );*/
- k -= 1;
- continue;
- }
-
- Track_Data[i*4+j][k*4] = ((c1<<4)&0x10) | (poss[c1/2][0]);
- Track_Data[i*4+j][k*4+1] = poss[c1/2][1];
- c6 = c2&0x0f;
- if ( c6 == 0x08 )
- c2 -= 0x08;
- Track_Data[i*4+j][k*4+2] = c2;
- if ( (c6==0x05) || (c6==0x06) || (c6==0x0a) )
- c3 = (c3 > 0x7f) ? ((0x100-c3)<<4) : c3;
- Track_Data[i*4+j][k*4+3] = c3;
- if ( c6 == 0x0D )
- {
-/*fprintf ( debug , " <-- PATTERN BREAK !, track ends\n" );*/
- Max = k;
- k = 9999l;
- continue;
- }
- if ( c6 == 0x0B )
- {
-/*fprintf ( debug , " <-- PATTERN JUMP !, track ends\n" );*/
- Max = k;
- k = 9999l;
- continue;
- }
-
-/*fprintf ( debug , "\n" );*/
- }
- }
- }
- /*printf ( "ok\n" );*/
-
- /* write pattern data */
-
- /*printf ( "writing pattern data ... " );*/
- /*fflush ( stdout );*/
- for ( i=0 ; i<PatMax ; i++ )
- {
- BZERO ( Whatever , 1024 );
- for ( j=0 ; j<64 ; j++ )
- {
- for ( k=0 ; k<4 ; k++ )
- {
- Whatever[j*16+k*4] = Track_Data[k+i*4][j*4];
- Whatever[j*16+k*4+1] = Track_Data[k+i*4][j*4+1];
- Whatever[j*16+k*4+2] = Track_Data[k+i*4][j*4+2];
- Whatever[j*16+k*4+3] = Track_Data[k+i*4][j*4+3];
- }
- }
- fwrite ( Whatever , 1024 , 1 , out );
- }
- free ( Whatever );
- /*printf ( "ok\n" );*/
-
-
- /* read and write sample data */
-
- /*printf ( "writing sample data ... " );*/
- /*fflush ( stdout );*/
-/*fprintf ( debug , "\n\nSample shit:\n" );*/
- for ( i=0 ; i<Nbr_Sample ; i++ )
- {
- Where = PW_Start_Address + Sample_Data_Address + SampleAddresses[i+1];
-/*fprintf ( debug , "%2ld: read %-6ld at %ld\n" , i , SampleSizes[i] , ftell ( in ));*/
- SmpDataWork = (signed char *) malloc ( SampleSizes[i] );
- BZERO ( SmpDataWork , SampleSizes[i] );
- for ( j=0 ; j<SampleSizes[i] ; j++ )
- SmpDataWork[j] = in_data[Where+j];
- if ( GLOBAL_DELTA == ON )
- {
- c1=SmpDataWork[0];
- for ( j=1 ; j<SampleSizes[i] ; j++ )
- {
- c2 = SmpDataWork[j];
- c3 = c1 - c2;
- SmpDataWork[j] = c3;
- c1 = c3;
- }
- }
- fwrite ( SmpDataWork , SampleSizes[i] , 1 , out );
- free ( SmpDataWork );
- }
- if ( GLOBAL_DELTA == ON )
- {
- Crap ( " The Player 5.0A " , GOOD , BAD , out );
- /*fseek ( out , 770 , SEEK_SET );*/
- /*fprintf ( out , "[! Delta samples ]" );*/
- }
- else
- Crap ( " The Player 5.0A " , BAD , BAD , out );
-
- /*printf ( "ok\n" );*/
-
- fflush ( out );
- fclose ( out );
-
- printf ( "done\n" );
- return; /* useless ... but */
-}
-
+++ /dev/null
-/*
- * The_Player_6.0a.c 1998 (c) Asle / ReDoX
- *
- * The Player 6.0a to Protracker.
- *
- * Note: It's a REAL mess !. It's VERY badly coded, I know. Just dont forget
- * it was mainly done to test the description I made of P60a format. I
- * certainly wont dare to beat Gryzor on the ground :). His Prowiz IS
- * the converter to use !!!. Though, using the official depacker could
- * be a good idea too :).
- *
- * Update : 28/11/99
- * - removed fopen() and all similar functions
- * - Speed and Size (?) optimizings
- * Update : 26 nov 2003
- * - used htonl() so that use of addy is now portable on 68k archs
-*/
-
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-#define ON 1
-#define OFF 2
-
-void Depack_P60A ( void )
-{
- Uchar c1,c2,c3,c4,c5,c6;
- long Max;
- Uchar *Whatever;
- signed char *SmpDataWork;
- Uchar PatPos = 0x00;
- Uchar PatMax = 0x00;
- Uchar Nbr_Sample = 0x00;
- Uchar poss[37][2];
- Uchar Track_Data[512][256];
- Uchar SmpSizes[31][2];
- Uchar PACK[31];
-/* Uchar DELTA[31];*/
- Uchar GLOBAL_DELTA=OFF;
- Uchar GLOBAL_PACK=OFF;
- long Track_Address[128][4];
- long Track_Data_Address = 0;
- long Sample_Data_Address = 0;
- long WholeSampleSize = 0;
- long i=0,j,k,l,a,b,z;
- long SampleSizes[31];
- long SampleAddresses[32];
- long Where = PW_Start_Address;
- FILE *out;
-
- if ( Save_Status == BAD )
- return;
-
- BZERO ( Track_Address , 128*4*4 );
- BZERO ( Track_Data , 512*256 );
- BZERO ( SampleSizes , 31*4 );
- BZERO ( SampleAddresses , 32*4 );
- BZERO ( SmpSizes , 31*2 );
- for ( i=0 ; i<31 ; i++ )
- {
- PACK[i] = OFF;
-/* DELTA[i] = OFF;*/
- }
-
-#ifdef DOS
- #include "..\include\ptktable.h"
-#endif
-
-#ifdef UNIX
- #include "../include/ptktable.h"
-#endif
-
- sprintf ( Depacked_OutName , "%ld.mod" , Cpt_Filename-1 );
- out = mr_fopen ( Depacked_OutName , "w+b" );
- if (!out)
- return;
-
- /* read sample data address */
- Sample_Data_Address = (in_data[Where]*256)+in_data[Where+1];
-
- /* read Real number of pattern */
- PatMax = in_data[Where+2];
- Where += 3;
-
- /* read number of samples */
- Nbr_Sample = in_data[Where];
- Where += 1;
- if ( (Nbr_Sample&0x80) == 0x80 )
- {
- /*printf ( "Samples are saved as delta values !\n" );*/
- GLOBAL_DELTA = ON;
- }
- if ( (Nbr_Sample&0x40) == 0x40 )
- {
- /*printf ( "some samples are packed !\n" );*/
- /*printf ( "\n! Since I could not understand the packing method of the\n"*/
- /* "! samples, neither could I do a depacker .. . mission ends here :)\n" );*/
- GLOBAL_PACK = ON;
- return;
- }
- Nbr_Sample &= 0x3F;
-
- /* write title */
- Whatever = (Uchar *) malloc ( 1024 );
- BZERO ( Whatever , 1024 );
- fwrite ( Whatever , 20 , 1 , out );
-
- /* sample headers stuff */
- for ( i=0 ; i<Nbr_Sample ; i++ )
- {
- /* write sample name */
- fwrite ( Whatever , 22 , 1 , out );
-
- /* sample size */
- SmpSizes[i][0] = in_data[Where];
- SmpSizes[i][1] = in_data[Where+1];
- j = (SmpSizes[i][0]*256)+SmpSizes[i][1];
- if ( j > 0xFF00 )
- {
- SampleSizes[i] = SampleSizes[0xFFFF-j];
- SmpSizes[i][0] = SmpSizes[0xFFFF-j][0];
- SmpSizes[i][1] = SmpSizes[0xFFFF-j][1];
-/*fprintf ( debug , "!%2ld!" , 0xFFFF-j );*/
- SampleAddresses[i+1] = SampleAddresses[0xFFFF-j+1];/* - SampleSizes[i]+SampleSizes[0xFFFF-j];*/
- }
- else
- {
- SampleAddresses[i+1] = SampleAddresses[i]+SampleSizes[i-1];
- SampleSizes[i] = j*2;
- WholeSampleSize += SampleSizes[i];
- }
- j = SampleSizes[i]/2;
- fwrite ( &SmpSizes[i][0] , 1 , 1 , out );
- fwrite ( &SmpSizes[i][1] , 1 , 1 , out );
-
- /* finetune */
- c1 = in_data[Where+2];
- if ( (c1&0x40) == 0x40 )
- PACK[i]=ON;
- c1 &= 0x3F;
- fwrite ( &c1 , 1 , 1 , out );
-
- /* vol */
- fwrite ( &in_data[Where+3] , 1 , 1 , out );
-
- /* loop start */
-/*fprintf ( debug , "loop start : %2x, %2x " , c1,c2 );*/
- if ( (in_data[Where+4]==0xFF) && (in_data[Where+5]==0xFF) )
- {
- Whatever[53]=0x01;
- fwrite ( &Whatever[50] , 4 , 1 , out );
-/*fprintf ( debug , " <--- no loop! (%2x,%2x)\n" ,c3,c4);*/
- Where += 6;
- continue;
- }
- fwrite ( &in_data[Where+4] , 2 , 1 , out );
- l = j - ((in_data[Where+4]*256)+in_data[Where+5]);
-/*fprintf ( debug , " -> size:%6ld lstart:%5d -> lsize:%ld\n" , j,c1*256+c2,l );*/
-
- /* use of htonl() suggested by Xigh !.*/
- z = htonl (l);
- c1 = *((Uchar *)&z+2);
- c2 = *((Uchar *)&z+3);
- fwrite ( &c1 , 1 , 1 , out );
- fwrite ( &c2 , 1 , 1 , out );
-
- Where += 6;
- }
-
- /* go up to 31 samples */
- Whatever[129] = 0x01;
- while ( i != 31 )
- {
- fwrite ( &Whatever[100] , 30 , 1 , out );
- i += 1;
- }
- /*printf ( "Whole sample size : %ld\n" , WholeSampleSize );*/
-
-/*fprintf ( debug , "Where after sample headers : %x\n" , ftell ( in ) );*/
-
- /* read tracks addresses per pattern */
- for ( i=0 ; i<PatMax ; i++ )
- {
-/*fprintf ( debug , "\npattern %ld : " , i );*/
- for ( j=0 ; j<4 ; j++ )
- {
- Track_Address[i][j] = (in_data[Where]*256)+in_data[Where+1];
- Where += 2;
-/*fprintf ( debug , "%6ld, " , Track_Address[i][j] );*/
- }
- }
-/*fprintf ( debug , "\n\nwhere after the track addresses : %x\n\n" , ftell ( in ));*/
-
-
- /* pattern table */
-/*fprintf ( debug , "\nPattern table :\n" );*/
- BZERO ( Whatever , 1024 );
- for ( PatPos=0 ; PatPos<128 ; PatPos++ )
- {
- c1 = in_data[Where++];
- if ( c1 == 0xFF )
- break;
- Whatever[PatPos] = c1;
-/*fprintf ( debug , "%2x, " , Whatever[PatPos] );*/
- }
-
- /* write size of pattern list */
- fwrite ( &PatPos , 1 , 1 , out );
-/*fprintf ( debug , "\nsize of the pattern table : %d\n\n" , PatPos );*/
-
- /* write noisetracker byte */
- c1 = 0x7f;
- fwrite ( &c1 , 1 , 1 , out );
-
- /* write pattern table */
- fwrite ( Whatever , 128 , 1 , out );
-
- /* write ptk's ID */
- Whatever[0] = 'M';
- Whatever[1] = '.';
- Whatever[2] = 'K';
- Whatever[3] = '.';
- fwrite ( Whatever , 4 , 1 , out );
-
-/*fprintf ( debug , "\n\nbefore reading track data : %x\n" , Where );*/
- Track_Data_Address = Where;
-
- /* rewrite the track data */
-
- /*printf ( "sorting and depacking tracks data ... " );*/
- /*fflush ( stdout );*/
- for ( i=0 ; i<PatMax ; i++ )
- {
-/*fprintf ( debug , "\n\npattern %ld\n" , i );*/
- Max = 63;
- for ( j=0 ; j<4 ; j++ )
- {
- Where = Track_Address[i][j]+Track_Data_Address;
-/*fprintf ( debug , "track %ld (at:%ld)\n" , j,ftell ( in ) );*/
- for ( k=0 ; k<=Max ; k++ )
- {
- c1 = in_data[Where++];
- c2 = in_data[Where++];
- c3 = in_data[Where++];
-/*fprintf ( debug , "%2ld: %2x, %2x, %2x, " , k , c1,c2,c3 );*/
- if ( ((c1&0x80) == 0x80) && (c1!=0x80) )
- {
- c4 = in_data[Where++];
- c1 = 0xFF-c1;
- Track_Data[i*4+j][k*4] = ((c1<<4)&0x10) | (poss[c1/2][0]);
- Track_Data[i*4+j][k*4+1] = poss[c1/2][1];
- c6 = c2&0x0f;
- if ( c6 == 0x08 )
- c2 -= 0x08;
- Track_Data[i*4+j][k*4+2] = c2;
- if ( (c6==0x05) || (c6==0x06) || (c6==0x0a) )
- c3 = (c3 > 0x7f) ? ((0x100-c3)<<4) : c3;
- Track_Data[i*4+j][k*4+3] = c3;
- if ( c6 == 0x0D )
- {
-/*fprintf ( debug , " <-- PATTERN BREAK !, track ends\n" );*/
- Max = k;
- k = 9999l;
- continue;
- }
- if ( c6 == 0x0B )
- {
-/*fprintf ( debug , " <-- PATTERN JUMP !, track ends\n" );*/
- Max = k;
- k = 9999l;
- continue;
- }
-
- if ( c4 < 0x80 )
- {
-/*fprintf ( debug , "%2x <--- bypass %d rows !\n" , c4 , c4 );*/
- k += c4;
- continue;
- }
-/*fprintf ( debug , "%2x <--- repeat current row %d times\n" , c4 , 0x100-c4 );*/
- c4=0x100-c4;
- for ( l=0 ; l<c4 ; l++ )
- {
- k += 1;
-/*fprintf ( debug , "*%2ld: %2x, %2x, %2x\n" , k , c1,c2,c3 );*/
- Track_Data[i*4+j][k*4] = ((c1<<4)&0x10) | (poss[c1/2][0]);
- Track_Data[i*4+j][k*4+1] = poss[c1/2][1];
- c6 = c2&0x0f;
- if ( c6 == 0x08 )
- c2 -= 0x08;
- Track_Data[i*4+j][k*4+2] = c2;
- if ( (c6==0x05) || (c6==0x06) || (c6==0x0a) )
- c3 = (c3 > 0x7f) ? ((0x100-c3)<<4) : c3;
- Track_Data[i*4+j][k*4+3] = c3;
- }
- continue;
- }
- if ( c1 == 0x80 )
- {
- c4 = in_data[Where++];
-/*fprintf ( debug , "%2x <--- repeat %2d lines some %2d bytes before\n" , c4,c2+1,(c3*256)+c4);*/
- a = Where;
- c5 = c2;
- Where -= ((c3*256)+c4);
- for ( l=0 ; l<=c5 ; l++,k++ )
- {
- c1 = in_data[Where++];
- c2 = in_data[Where++];
- c3 = in_data[Where++];
-/*fprintf ( debug , "#%2ld: %2x, %2x, %2x, " , k , c1,c2,c3 );*/
- if ( ((c1&0x80) == 0x80) && (c1!=0x80) )
- {
- c4 = in_data[Where++];
- c1 = 0xFF-c1;
- Track_Data[i*4+j][k*4] = ((c1<<4)&0x10) | (poss[c1/2][0]);
- Track_Data[i*4+j][k*4+1] = poss[c1/2][1];
- c6 = c2&0x0f;
- if ( c6 == 0x08 )
- c2 -= 0x08;
- Track_Data[i*4+j][k*4+2] = c2;
- if ( (c6==0x05) || (c6==0x06) || (c6==0x0a) )
- c3 = (c3 > 0x7f) ? ((0x100-c3)<<4) : c3;
- Track_Data[i*4+j][k*4+3] = c3;
- if ( c6 == 0x0D )
- {
- Max = k;
- k = l = 9999l;
-/*fprintf ( debug , " <-- PATTERN BREAK !, track ends\n" );*/
- continue;
- }
- if ( c6 == 0x0B )
- {
- Max = k;
- k = l = 9999l;
-/*fprintf ( debug , " <-- PATTERN JUMP !, track ends\n" );*/
- continue;
- }
-
- if ( c4 < 0x80 )
- {
-/*fprintf ( debug , "%2x <--- bypass %d rows !\n" , c4 , c4 );*/
- /*l += c4;*/
- k += c4;
- continue;
- }
-/*fprintf ( debug , "%2x <--- repeat current row %d times\n" , c4 , 0x100-c4 );*/
- c4=0x100-c4;
- /*l += (c4-1);*/
- for ( b=0 ; b<c4 ; b++ )
- {
- k += 1;
-/*fprintf ( debug , "*%2ld: %2x, %2x, %2x\n" , k , c1,c2,c3 );*/
- Track_Data[i*4+j][k*4] = ((c1<<4)&0x10) | (poss[c1/2][0]);
- Track_Data[i*4+j][k*4+1] = poss[c1/2][1];
- c6 = c2&0x0f;
- if ( c6 == 0x08 )
- c2 -= 0x08;
- Track_Data[i*4+j][k*4+2] = c2;
- if ( (c6==0x05) || (c6==0x06) || (c6==0x0a) )
- c3 = (c3 > 0x7f) ? ((0x100-c3)<<4) : c3;
- Track_Data[i*4+j][k*4+3] = c3;
- }
- }
- Track_Data[i*4+j][k*4] = ((c1<<4)&0x10) | (poss[c1/2][0]);
- Track_Data[i*4+j][k*4+1] = poss[c1/2][1];
- c6 = c2&0x0f;
- if ( c6 == 0x08 )
- c2 -= 0x08;
- Track_Data[i*4+j][k*4+2] = c2;
- if ( (c6==0x05) || (c6==0x06) || (c6==0x0a) )
- c3 = (c3 > 0x7f) ? ((0x100-c3)<<4) : c3;
- Track_Data[i*4+j][k*4+3] = c3;
-/*fprintf ( debug , "\n" );*/
- }
- Where = a;
-/*fprintf ( debug , "\n" );*/
- k -= 1;
- continue;
- }
-
- Track_Data[i*4+j][k*4] = ((c1<<4)&0x10) | (poss[c1/2][0]);
- Track_Data[i*4+j][k*4+1] = poss[c1/2][1];
- c6 = c2&0x0f;
- if ( c6 == 0x08 )
- c2 -= 0x08;
- Track_Data[i*4+j][k*4+2] = c2;
- if ( (c6==0x05) || (c6==0x06) || (c6==0x0a) )
- c3 = (c3 > 0x7f) ? ((0x100-c3)<<4) : c3;
- Track_Data[i*4+j][k*4+3] = c3;
- if ( c6 == 0x0D )
- {
-/*fprintf ( debug , " <-- PATTERN BREAK !, track ends\n" );*/
- Max = k;
- k = 9999l;
- continue;
- }
- if ( c6 == 0x0B )
- {
-/*fprintf ( debug , " <-- PATTERN JUMP !, track ends\n" );*/
- Max = k;
- k = 9999l;
- continue;
- }
-
-/*fprintf ( debug , "\n" );*/
- }
- }
- }
- /*printf ( "ok\n" );*/
-
- /* write pattern data */
-
- /*printf ( "writing pattern data ... " );*/
- /*fflush ( stdout );*/
- for ( i=0 ; i<PatMax ; i++ )
- {
- BZERO ( Whatever , 1024 );
- for ( j=0 ; j<64 ; j++ )
- {
- for ( k=0 ; k<4 ; k++ )
- {
- Whatever[j*16+k*4] = Track_Data[k+i*4][j*4];
- Whatever[j*16+k*4+1] = Track_Data[k+i*4][j*4+1];
- Whatever[j*16+k*4+2] = Track_Data[k+i*4][j*4+2];
- Whatever[j*16+k*4+3] = Track_Data[k+i*4][j*4+3];
- }
- }
- fwrite ( Whatever , 1024 , 1 , out );
- }
- free ( Whatever );
- /*printf ( "ok\n" );*/
-
-
- /* read and write sample data */
-
- /*printf ( "writing sample data ... " );*/
- /*fflush ( stdout );*/
-/*fprintf ( debug , "\n\nSample shit:\n" );*/
- for ( i=0 ; i<Nbr_Sample ; i++ )
- {
- Where = PW_Start_Address + Sample_Data_Address + SampleAddresses[i+1];
-/*fprintf ( debug , "%2ld: read %-6ld at %ld\n" , i , SampleSizes[i] , ftell ( in ));*/
- SmpDataWork = (signed char *) malloc ( SampleSizes[i] );
- BZERO ( SmpDataWork , SampleSizes[i] );
- for ( j=0 ; j<SampleSizes[i] ; j++ )
- SmpDataWork[j] = in_data[Where+j];
- if ( GLOBAL_DELTA == ON )
- {
- c1=SmpDataWork[0];
- for ( j=1 ; j<SampleSizes[i] ; j++ )
- {
- c2 = SmpDataWork[j];
- c3 = c1 - c2;
- SmpDataWork[j] = c3;
- c1 = c3;
- }
- }
- fwrite ( SmpDataWork , SampleSizes[i] , 1 , out );
- free ( SmpDataWork );
- }
- if ( GLOBAL_DELTA == ON )
- {
- Crap ( " The Player 6.0A " , GOOD , BAD , out );
- /*fseek ( out , 770 , SEEK_SET );*/
- /*fprintf ( out , "[! Delta samples ]" );*/
- }
- else
- Crap ( " The Player 6.0A " , BAD , BAD , out );
-
- /*printf ( "ok\n" );*/
-
- fflush ( out );
- fclose ( out );
-
- printf ( "done\n" );
- return; /* useless ... but */
-}
+++ /dev/null
-/*
- * The_Player_6.1a.c 1998 (c) Asle / ReDoX
- *
- * The Player 6.1a to Protracker.
- *
- * Note: As for version 5.0A and 6.0A, it's a REAL mess !.
- * It's VERY badly coded, I know. Just dont forget it was mainly done
- * to test the description I made of P61a format.
- * I certainly wont dare to beat Gryzor on the ground :). His Prowiz IS
- * the converter to use !!!. Though, using the official depacker could
- * be a good idea too :).
- *
- * update:28/11/99
- * - removed fopen() and all similar functions
- * - Speed and Size (?) optimizings
- *
- * update:03/04/00
- * - some code went away ????. reput it back :)
- * pointed out by Thomas Neumann .. thx
- * update:26 nov 2003
- * - used htonl() so that use of addy is now portable on 68k archs
-*/
-
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-#define ON 1
-#define OFF 2
-
-void Depack_P61A ( void )
-{
- Uchar c1,c2,c3,c4,c5,c6;
- long Max;
- Uchar *Whatever;
- signed char *SmpDataWork;
- Uchar PatPos = 0x00;
- Uchar PatMax = 0x00;
- Uchar Nbr_Sample = 0x00;
- Uchar poss[37][2];
- Uchar Track_Data[512][256];
- Uchar SmpSizes[31][2];
- Uchar PACK[31];
-/* Uchar DELTA[31];*/
- Uchar GLOBAL_DELTA=OFF;
- Uchar GLOBAL_PACK=OFF;
- long Track_Address[128][4];
- long Track_Data_Address = 0;
- long Sample_Data_Address = 0;
- long WholeSampleSize = 0;
- long i=0,j,k,l,a,b,z,w;
- long SampleSizes[31];
- long SampleAddresses[32];
- long Unpacked_Sample_Data_Size;
- long Where=PW_Start_Address;
- FILE *out;
-
- if ( Save_Status == BAD )
- return;
-
- BZERO ( Track_Address , 128*4*4 );
- BZERO ( Track_Data , 512*256 );
- BZERO ( SampleSizes , 31*4 );
- BZERO ( SampleAddresses , 32*4 );
- BZERO ( SmpSizes , 31*2 );
- for ( i=0 ; i<31 ; i++ )
- {
- PACK[i] = OFF;
-/* DELTA[i] = OFF;*/
- }
-
-#ifdef DOS
- #include "..\include\ptktable.h"
-#endif
-
-#ifdef UNIX
- #include "../include/ptktable.h"
-#endif
-
- sprintf ( Depacked_OutName , "%ld.mod" , Cpt_Filename-1 );
- if (!out)
- return;
- out = mr_fopen ( Depacked_OutName , "w+b" );
-
- /* read sample data address */
- Sample_Data_Address = (in_data[Where]*256)+in_data[Where+1];
- Where+=2;
-
- /* read Real number of pattern */
- PatMax = in_data[Where++];
-
- /* read number of samples */
- Nbr_Sample = in_data[Where++];
- if ( (Nbr_Sample&0x80) == 0x80 )
- {
- /*printf ( "Samples are saved as delta values !\n" );*/
- GLOBAL_DELTA = ON;
- }
- if ( (Nbr_Sample&0x40) == 0x40 )
- {
- /*printf ( "some samples are packed !\n" );*/
- /*printf ( "\n! Since I could not understand the packing method of the\n"*/
- /* "! samples, neither could I do a depacker .. . mission ends here :)\n" );*/
- GLOBAL_PACK = ON;
- return;
- }
- Nbr_Sample &= 0x3F;
-
- /* read unpacked sample data size */
- if ( GLOBAL_PACK == ON )
- {
- Unpacked_Sample_Data_Size = (in_data[Where]*256*256*256)+
- (in_data[Where]*256*256)+
- (in_data[Where]*256)+
- in_data[Where];
- }
-
- /* write title */
- Whatever = (Uchar *) malloc ( 1024 );
- BZERO ( Whatever , 1024 );
- fwrite ( Whatever , 20 , 1 , out );
-
- /* sample headers stuff */
- for ( i=0 ; i<Nbr_Sample ; i++ )
- {
- /* write sample name */
- fwrite ( Whatever , 22 , 1 , out );
-
- /* sample size */
- SmpSizes[i][0] = in_data[Where];
- SmpSizes[i][1] = in_data[Where+1];
- j = (SmpSizes[i][0]*256)+SmpSizes[i][1];
- if ( j > 0xFF00 )
- {
- SampleSizes[i] = SampleSizes[0xFFFF-j];
- SmpSizes[i][0] = SmpSizes[0xFFFF-j][0];
- SmpSizes[i][1] = SmpSizes[0xFFFF-j][1];
-/*fprintf ( debug , "!%2ld!" , 0xFFFF-j );*/
- SampleAddresses[i+1] = SampleAddresses[0xFFFF-j+1];/* - SampleSizes[i]+SampleSizes[0xFFFF-j];*/
- }
- else
- {
- SampleAddresses[i+1] = SampleAddresses[i]+SampleSizes[i-1];
- SampleSizes[i] = j*2;
- WholeSampleSize += SampleSizes[i];
- }
- j = SampleSizes[i]/2;
- fwrite ( &SmpSizes[i][0] , 1 , 1 , out );
- fwrite ( &SmpSizes[i][1] , 1 , 1 , out );
-
- /* finetune */
- c1 = in_data[Where+2];
- if ( (c1&0x40) == 0x40 )
- PACK[i]=ON;
- c1 &= 0x3F;
- fwrite ( &c1 , 1 , 1 , out );
-
- /* vol */
- fwrite ( &in_data[Where+3] , 1 , 1 , out );
-
- /* loop start */
-/*fprintf ( debug , "loop start : %2x, %2x " , c1,c2 );*/
- if ( (in_data[Where+4]==0xFF) && (in_data[Where+5]==0xFF) )
- {
- Whatever[53]=0x01;
- fwrite ( &Whatever[50] , 4 , 1 , out );
-/*fprintf ( debug , " <--- no loop! (%2x,%2x)\n" ,c3,c4);*/
- Where += 6;
- continue;
- }
- fwrite ( &in_data[Where+4] , 2 , 1 , out );
- l = j - ((in_data[Where+4]*256)+in_data[Where+5]);
-/*fprintf ( debug , " -> size:%6ld lstart:%5d -> lsize:%ld\n" , j,c1*256+c2,l );*/
-
- /* use of htonl() suggested by Xigh !.*/
- w = htonl(l);
- c1 = *((Uchar *)&w+2);
- c2 = *((Uchar *)&w+3);
- fwrite ( &c1 , 1 , 1 , out );
- fwrite ( &c2 , 1 , 1 , out );
-
- Where += 6;
- }
-
- /* go up to 31 samples */
- Whatever[129] = 0x01;
- while ( i != 31 )
- {
- fwrite ( &Whatever[100] , 30 , 1 , out );
- i += 1;
- }
- /*printf ( "Whole sample size : %ld\n" , WholeSampleSize );*/
-
-/*fprintf ( debug , "Where after sample headers : %x\n" , ftell ( in ) );*/
-
- /* read tracks addresses per pattern */
- for ( i=0 ; i<PatMax ; i++ )
- {
-/*fprintf ( debug , "\npattern %ld : " , i );*/
- for ( j=0 ; j<4 ; j++ )
- {
- Track_Address[i][j] = (in_data[Where]*256)+in_data[Where+1];
- Where += 2;
-/*fprintf ( debug , "%6ld, " , Track_Address[i][j] );*/
- }
- }
-/*fprintf ( debug , "\n\nwhere after the track addresses : %x\n\n" , ftell ( in ));*/
-
-
- /* pattern table */
-/*fprintf ( debug , "\nPattern table :\n" );*/
- BZERO ( Whatever , 1024 );
- for ( PatPos=0 ; PatPos<128 ; PatPos++ )
- {
- c1 = in_data[Where++];
- if ( c1 == 0xFF )
- break;
- Whatever[PatPos] = c1;
-/*fprintf ( debug , "%2x, " , Whatever[PatPos] );*/
- }
-
- /* write size of pattern list */
- fwrite ( &PatPos , 1 , 1 , out );
-/*fprintf ( debug , "\nsize of the pattern table : %d\n\n" , PatPos );*/
-
- /* write noisetracker byte */
- c1 = 0x7f;
- fwrite ( &c1 , 1 , 1 , out );
-
- /* write pattern table */
- fwrite ( Whatever , 128 , 1 , out );
-
- /* write ptk's ID */
- Whatever[0] = 'M';
- Whatever[1] = '.';
- Whatever[2] = 'K';
- Whatever[3] = '.';
- fwrite ( Whatever , 4 , 1 , out );
-
-/*fprintf ( debug , "\n\nbefore reading track data : %x\n" , ftell ( in ) );*/
- Track_Data_Address = Where;
-
- /* rewrite the track data */
-
- /*printf ( "sorting and depacking tracks data ... " );*/
- for ( i=0 ; i<PatMax ; i++ )
- {
-/*fprintf ( debug , "\n\npattern %ld\n" , i );*/
- Max = 63;
- for ( j=0 ; j<4 ; j++ )
- {
- Where = Track_Address[i][j]+Track_Data_Address;
-/*fprintf ( debug , "track %ld (at:%ld)\n" , j,ftell ( in ) );*/
- for ( k=0 ; k<=Max ; k++ )
- {
- c1 = in_data[Where++];
-/*fprintf ( debug , "%2ld: %2x, " , k , c1 );*/
-
- /* case no Fx nor FxArg (3 bytes) */
- if ( ((c1&0x70) == 0x70) && (c1 != 0xFF) && (c1!=0x7F) )
- {
- c2 = in_data[Where++];
-/*fprintf ( debug , "%2x, " , c2 );*/
- c6 = ((c1<<4)&0xf0)|((c2>>4)&0x0e);
- Track_Data[i*4+j][k*4] = (c2&0x10) | (poss[c6/2][0]);
- Track_Data[i*4+j][k*4+1] = poss[c6/2][1];
- Track_Data[i*4+j][k*4+2] = ((c2<<4)&0xf0);
-
- if ( (c1 & 0x80) == 0x80 )
- {
- c3 = in_data[Where++];
- if ( c3 < 0x80 )
- {
-/*fprintf ( debug , "%2x <--- bypass %d rows !\n" , c3 , c3 );*/
- k += c3;
- continue;
- }
-/*fprintf ( debug , "%2x <--- repeat current row %d times\n" , c3 , c3-0x80 );*/
- c4=c3-0x80;
- for ( l=0 ; l<c4 ; l++ )
- {
- k += 1;
-/*fprintf ( debug , "*%2ld: %2x, %2x\n" , k , c1,c2 );*/
- Track_Data[i*4+j][k*4] = (c2&0x10) | (poss[c6/2][0]);
- Track_Data[i*4+j][k*4+1] = poss[c6/2][1];
- Track_Data[i*4+j][k*4+2] = ((c2<<4)&0xf0);
- }
- }
-/*fprintf ( debug , "\n" );*/
- continue;
- }
- /* end of case no Fx nor FxArg */
-
- /* case no Sample number nor Relative not number */
- if ( ((c1&0x70) == 0x60) && (c1 != 0xFF) )
- {
- c2 = in_data[Where++];
-/*fprintf ( debug , "%2x, " , c2 );*/
-
- c6 = c1&0x0f;
- if ( c6 == 0x08 )
- c1 -= 0x08;
- Track_Data[i*4+j][k*4+2] = (c1&0x0f);
- if ( (c6==0x05) || (c6==0x06) || (c6==0x0a) )
- c2 = (c2 > 0x7f) ? ((0x100-c2)<<4) : c2;
- Track_Data[i*4+j][k*4+3] = c2;
-
- if ( c6 == 0x0D )
- {
-/*fprintf ( debug , " <-- PATTERN BREAK !, track ends\n" );*/
- Max = k;
- k = 9999l;
- continue;
- }
- if ( c6 == 0x0B )
- {
-/*fprintf ( debug , " <-- PATTERN JUMP !, track ends\n" );*/
- Max = k;
- k = 9999l;
- continue;
- }
- if ( (c1 & 0x80) == 0x80 )
- {
- c3 = in_data[Where++];
- if ( c3 < 0x80 )
- {
-/*fprintf ( debug , "%2x <--- bypass %d rows !\n" , c3 , c3 );*/
- k += c3;
- continue;
- }
-/*fprintf ( debug , "%2x <--- repeat current row %d times\n" , c3 , c3-0x80 );*/
- c4=c3-0x80;
- for ( l=0 ; l<c4 ; l++ )
- {
- k += 1;
-/*fprintf ( debug , "*%2ld: %2x, %2x\n" , k , c1,c2 );*/
- Track_Data[i*4+j][k*4+2] = (c1&0x0f);
- Track_Data[i*4+j][k*4+3] = c2;
- }
- }
-/*fprintf ( debug , "\n" );*/
- continue;
- }
- /* end of case no Sample number nor Relative not number */
-
- if ( ((c1&0x80) == 0x80) && (c1!=0xFF) )
- {
- c2 = in_data[Where++];
- c3 = in_data[Where++];
- c4 = in_data[Where++];
-/*fprintf ( debug , "%2x, %2x, " , c2,c3);*/
- c1 = c1&0x7F;
- Track_Data[i*4+j][k*4] = ((c1<<4)&0x10) | (poss[c1/2][0]);
- Track_Data[i*4+j][k*4+1] = poss[c1/2][1];
- c6 = c2&0x0f;
- if ( c6 == 0x08 )
- c2 -= 0x08;
- Track_Data[i*4+j][k*4+2] = c2;
- if ( (c6==0x05) || (c6==0x06) || (c6==0x0a) )
- c3 = (c3 > 0x7f) ? ((0x100-c3)<<4) : c3;
- Track_Data[i*4+j][k*4+3] = c3;
- if ( c6 == 0x0D )
- {
-/*fprintf ( debug , " <-- PATTERN BREAK !, track ends\n" );*/
- Max = k;
- k = 9999l;
- continue;
- }
- if ( c6 == 0x0B )
- {
-/*fprintf ( debug , " <-- PATTERN JUMP !, track ends\n" );*/
- Max = k;
- k = 9999l;
- continue;
- }
-
- if ( c4 < 0x80 )
- {
-/*fprintf ( debug , "%2x <--- bypass %d rows !\n" , c4 , c4 );*/
- k += c4;
- continue;
- }
-/*fprintf ( debug , "%2x <--- repeat current row %d times\n" , c4 , c4-0x80 );*/
- c4=c4-0x80;
- for ( l=0 ; l<c4 ; l++ )
- {
- k += 1;
-/*fprintf ( debug , "*%2ld: %2x, %2x, %2x\n" , k , c1,c2,c3 );*/
- Track_Data[i*4+j][k*4] = ((c1<<4)&0x10) | (poss[c1/2][0]);
- Track_Data[i*4+j][k*4+1] = poss[c1/2][1];
- c6 = c2&0x0f;
- if ( c6 == 0x08 )
- c2 -= 0x08;
- Track_Data[i*4+j][k*4+2] = c2;
- if ( (c6==0x05) || (c6==0x06) || (c6==0x0a) )
- c3 = (c3 > 0x7f) ? ((0x100-c3)<<4) : c3;
- Track_Data[i*4+j][k*4+3] = c3;
- }
- continue;
- }
-
-
- if ( (c1&0x7F) == 0x7F )
- {
- if ( (c1&0x80) == 0x00 )
- {
-/*fprintf ( debug , " <--- bypass 1 row !\n" );*/
- /*k += 1;*/
- continue;
- }
- c2 = in_data[Where++];
- if ( c2 < 0x40 )
- {
-/*fprintf ( debug , "%2x <--- bypass %d rows !\n" , c2 , c2 );*/
- k += c2;
- continue;
- }
-/*fprintf ( debug , "%2x, " , c2 );*/
- c2 -= 0x40;
- c3 = in_data[Where++];
-/*fprintf ( debug , "%2x, " , c3 );*/
- z = c3;
- if ( c2 >= 0x80 )
- {
- c2 -= 0x80;
- c4 = in_data[Where++];
-/*fprintf ( debug , "%2x, " , c4 );*/
- z = (c3*256)+c4;
- }
-/*fprintf ( debug , " <--- repeat %2d lines some %ld bytes before\n" , c2,z );*/
- a = Where;
- c5 = c2;
- Where -= z;
- for ( l=0 ; (l<=c5)&&(k<=Max) ; l++,k++ )
- {
- c1 = in_data[Where++];
-/*fprintf ( debug , "#%2ld: %2x, " , l , c1 );*/
-
- /* case no Fx nor FxArg (3 bytes) */
- if ( ((c1&0x70) == 0x70) && (c1 != 0xFF) && (c1!=0x7F))
- {
- c2 = in_data[Where++];
-/*fprintf ( debug , "%2x, " , c2 );*/
- c6 = ((c1<<4)&0xf0)|((c2>>4)&0x0e);
- Track_Data[i*4+j][k*4] = (c2&0x10) | (poss[c6/2][0]);
- Track_Data[i*4+j][k*4+1] = poss[c6/2][1];
- Track_Data[i*4+j][k*4+2] = ((c2<<4)&0xf0);
-
- if ( (c1 & 0x80) == 0x80 )
- {
- c3 = in_data[Where++];
- if ( c3 < 0x80 )
- {
-/*fprintf ( debug , "%2x <--- bypass %d rows !\n" , c3 , c3 );*/
- k += c3;
- continue;
- }
-/*fprintf ( debug , "%2x <--- repeat current row %d times\n" , c3 , c3-0x80 );*/
- c4=c3-0x80;
- for ( b=0 ; b<c4 ; b++ )
- {
- k += 1;
-/*fprintf ( debug , "*%2ld: %2x, %2x\n" , k , c1,c2 );*/
- Track_Data[i*4+j][k*4] = (c2&0x10) | (poss[c6/2][0]);
- Track_Data[i*4+j][k*4+1] = poss[c6/2][1];
- Track_Data[i*4+j][k*4+2] = ((c2<<4)&0xf0);
- }
- }
-/*fprintf ( debug , "\n" );*/
- continue;
- }
- /* end of case no Fx nor FxArg */
-
- /* case no Sample number nor Relative not number */
- if ( ((c1&0x60) == 0x60) && (c1 != 0xFF) && (c1!=0x7F) )
- {
- c2 = in_data[Where++];
-/*fprintf ( debug , "%2x, " , c2 );*/
- c6 = c1&0x0f;
- if ( c6 == 0x08 )
- c1 -= 0x08;
- Track_Data[i*4+j][k*4+2] = (c1&0x0f);
- if ( (c6==0x05) || (c6==0x06) || (c6==0x0a) )
- c2 = (c2 > 0x7f) ? ((0x100-c2)<<4) : c2;
- Track_Data[i*4+j][k*4+3] = c2;
-
- if ( c6 == 0x0D )
- {
-/*fprintf ( debug , " <-- PATTERN BREAK !, track ends\n" );*/
- Max = k;
- k = 9999l;
- continue;
- }
- if ( c6 == 0x0B )
- {
-/*fprintf ( debug , " <-- PATTERN JUMP !, track ends\n" );*/
- Max = k;
- k = 9999l;
- continue;
- }
-
- if ( (c1 & 0x80) == 0x80 )
- {
- c3 = in_data[Where++];
- if ( c3 < 0x80 )
- {
-/*fprintf ( debug , "%2x <--- bypass %d rows !\n" , c3 , c3 );*/
- k += c3;
- continue;
- }
-/*fprintf ( debug , "%2x <--- repeat current row %d times\n" , c3 , c3-0x80 );*/
- c4=c3-0x80;
- for ( b=0 ; b<c4 ; b++ )
- {
- k += 1;
-/*fprintf ( debug , "*%2ld: %2x, %2x\n" , k , c1,c2 );*/
- Track_Data[i*4+j][k*4+2] = (c1&0x0f);
- Track_Data[i*4+j][k*4+3] = c2;
- }
- }
-/*fprintf ( debug , "\n" );*/
- continue;
- }
- /* end of case no Sample number nor Relative not number */
-
- if ( ((c1&0x80) == 0x80) && (c1!=0xFF) && (c1 != 0x7F))
- {
- c2 = in_data[Where++];
- c3 = in_data[Where++];
- c4 = in_data[Where++];
-/*fprintf ( debug , "%2x, %2x, " , c2,c3);*/
- c1 = c1&0x7f;
- Track_Data[i*4+j][k*4] = ((c1<<4)&0x10) | (poss[c1/2][0]);
- Track_Data[i*4+j][k*4+1] = poss[c1/2][1];
- c6 = c2&0x0f;
- if ( c6 == 0x08 )
- c2 -= 0x08;
- Track_Data[i*4+j][k*4+2] = c2;
- if ( (c6==0x05) || (c6==0x06) || (c6==0x0a) )
- c3 = (c3 > 0x7f) ? ((0x100-c3)<<4) : c3;
- Track_Data[i*4+j][k*4+3] = c3;
- if ( c6 == 0x0D )
- {
- Max = k;
- k = l = 9999l;
-/*fprintf ( debug , " <-- PATTERN BREAK !, track ends\n" );*/
- continue;
- }
- if ( c6 == 0x0B )
- {
- Max = k;
- k = l = 9999l;
-/*fprintf ( debug , " <-- PATTERN JUMP !, track ends\n" );*/
- continue;
- }
-
- if ( c4 < 0x80 )
- {
-/*fprintf ( debug , "%2x <--- bypass %d rows !\n" , c4 , c4 );*/
- /*l += c4;*/
- k += c4;
- continue;
- }
-/*fprintf ( debug , "%2x <--- repeat current row %d times\n" , c4 , c4-0x80 );*/
- c4=c4-0x80;
- /*l += (c4-1);*/
- for ( b=0 ; b<c4 ; b++ )
- {
- k += 1;
-/*fprintf ( debug , "*%2ld: %2x, %2x, %2x\n" , k , c1,c2,c3 );*/
- Track_Data[i*4+j][k*4] = ((c1<<4)&0x10) | (poss[c1/2][0]);
- Track_Data[i*4+j][k*4+1] = poss[c1/2][1];
- c6 = c2&0x0f;
- if ( c6 == 0x08 )
- c2 -= 0x08;
- Track_Data[i*4+j][k*4+2] = c2;
- if ( (c6==0x05) || (c6==0x06) || (c6==0x0a) )
- c3 = (c3 > 0x7f) ? ((0x100-c3)<<4) : c3;
- Track_Data[i*4+j][k*4+3] = c3;
- }
- continue;
- }
- if ( (c1&0x7F) == 0x7F )
- {
- if ( (c1&0x80) == 0x00 )
- {
-/*fprintf ( debug , " <--- bypass 1 row !\n" );*/
- /*k += 1;*/
- continue;
- }
- c2 = in_data[Where++];
- if ( c2 < 0x40 )
- {
-/*fprintf ( debug , "%2x <--- bypass %d rows !\n" , c2 , c2 );*/
- k += c2;
- continue;
- }
- continue;
- }
-
- c2 = in_data[Where++];
- c3 = in_data[Where++];
-/*fprintf ( debug , "%2x, %2x" , c2,c3 );*/
- Track_Data[i*4+j][k*4] = ((c1<<4)&0x10) | (poss[c1/2][0]);
- Track_Data[i*4+j][k*4+1] = poss[c1/2][1];
- c6 = c2&0x0f;
- if ( c6 == 0x08 )
- c2 -= 0x08;
- Track_Data[i*4+j][k*4+2] = c2;
- if ( (c6==0x05) || (c6==0x06) || (c6==0x0a) )
- c3 = (c3 > 0x7f) ? ((0x100-c3)<<4) : c3;
- Track_Data[i*4+j][k*4+3] = c3;
-/*fprintf ( debug , "\n" );*/
- }
- Where = a;
-/*fprintf ( debug , "\n" );*/
- k -= 1;
- continue;
- }
-
- c2 = in_data[Where++];
- c3 = in_data[Where++];
-/*fprintf ( debug , "%2x, %2x" , c2,c3 );*/
- Track_Data[i*4+j][k*4] = ((c1<<4)&0x10) | (poss[c1/2][0]);
- Track_Data[i*4+j][k*4+1] = poss[c1/2][1];
- c6 = c2&0x0f;
- if ( c6 == 0x08 )
- c2 -= 0x08;
- Track_Data[i*4+j][k*4+2] = c2;
- if ( (c6==0x05) || (c6==0x06) || (c6==0x0a) )
- c3 = (c3 > 0x7f) ? ((0x100-c3)<<4) : c3;
- Track_Data[i*4+j][k*4+3] = c3;
- if ( c6 == 0x0D )
- {
-/*fprintf ( debug , " <-- PATTERN BREAK !, track ends\n" );*/
- Max = k;
- k = 9999l;
- continue;
- }
- if ( c6 == 0x0B )
- {
-/*fprintf ( debug , " <-- PATTERN JUMP !, track ends\n" );*/
- Max = k;
- k = 9999l;
- continue;
- }
-
-/*fprintf ( debug , "\n" );*/
- }
- }
- }
- /*printf ( "ok\n" );*/
-
- /* write pattern data */
-
- /*printf ( "writing pattern data ... " );*/
- for ( i=0 ; i<PatMax ; i++ )
- {
- BZERO ( Whatever , 1024 );
- for ( j=0 ; j<64 ; j++ )
- {
- for ( k=0 ; k<4 ; k++ )
- {
- Whatever[j*16+k*4] = Track_Data[k+i*4][j*4];
- Whatever[j*16+k*4+1] = Track_Data[k+i*4][j*4+1];
- Whatever[j*16+k*4+2] = Track_Data[k+i*4][j*4+2];
- Whatever[j*16+k*4+3] = Track_Data[k+i*4][j*4+3];
- }
- }
- fwrite ( Whatever , 1024 , 1 , out );
- }
- free ( Whatever );
- /*printf ( "ok\n" );*/
-
-
- /* read and write sample data */
-
- /*printf ( "writing sample data ... " );*/
-/*fprintf ( debug , "\n\nSample shit:\n" );*/
- for ( i=0 ; i<Nbr_Sample ; i++ )
- {
- Where = PW_Start_Address + Sample_Data_Address + SampleAddresses[i+1];
-/*fprintf ( debug , "%2ld: read %-6ld at %ld\n" , i , SampleSizes[i] , ftell ( in ));*/
- SmpDataWork = (signed char *) malloc ( SampleSizes[i] );
- BZERO ( SmpDataWork , SampleSizes[i] );
- for ( j=0 ; j<SampleSizes[i] ; j++ ) SmpDataWork[j] = in_data[Where++];
- if ( GLOBAL_DELTA == ON )
- {
- c1=0x00;
- for ( j=1 ; j<SampleSizes[i] ; j++ )
- {
- c2 = SmpDataWork[j];
- c2 = 0x100-c2;
- c3 = c2 + c1;
- SmpDataWork[j] = c3;
- c1 = c3;
- }
- }
- fwrite ( SmpDataWork , SampleSizes[i] , 1 , out );
- free ( SmpDataWork );
- }
- /*printf ( "ok\n" );*/
-
- if ( GLOBAL_DELTA == ON )
- {
- Crap ( " The Player 6.1A " , GOOD , BAD , out );
- /*
- fseek ( out , 770 , SEEK_SET );
- fprintf ( out , "[! Delta samples ]" );
- */
- }
-
- Crap ( " The Player 6.1A " , BAD , BAD , out );
-
- fclose ( out );
-
- printf ( "done\n" );
- return; /* useless ... but */
-}
+++ /dev/null
-/*
- * PhaPacker.c 1996-2003 (c) Asle / ReDoX
- *
- * Converts PHA packed MODs back to PTK MODs
- * nth revision :(.
- *
- * update (15 mar 2003)
- * - numerous bugs corrected ... seems to work now ... hum ?
-*/
-
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-
-void Depack_PHA ( void )
-{
- Uchar c1=0x00,c2=0x00,c3=0x00,c4=0x00;
- Uchar poss[37][2];
- Uchar *Whole_Pattern_Data;
- Uchar *Pattern;
- Uchar *Sample_Data;
- Uchar *Whatever;
- Uchar Old_Note_Value[4][4];
- Uchar Note,Smp,Fx,FxVal;
- Uchar PatMax=0x00;
- long MyPatList[128];
- long Pats_Address[128];
- long i=0,j=0,k=0;
- long Start_Pat_Address=9999999l;
- long Whole_Pattern_Data_Size;
- long Whole_Sample_Size=0;
- long Sample_Data_Address;
- short Old_cpt[4];
- FILE *in,*out;/*,*info;*/
-
- if ( Save_Status == BAD )
- return;
-
-#ifdef DOS
- #include "..\include\ptktable.h"
-#endif
-#ifdef UNIX
- #include "../include/ptktable.h"
-#endif
-
- BZERO ( Pats_Address , 128*4 );
- BZERO ( Old_Note_Value , 4*4 );
- BZERO ( Old_cpt , 4*2 );
- BZERO ( MyPatList, 128*sizeof(long));
-
- in = fopen ( (char *)OutName_final , "r+b" ); /* +b is safe bcoz OutName's just been saved */
- if (!in)
- return;
- sprintf ( Depacked_OutName , "%ld.mod" , Cpt_Filename-1 );
- out = mr_fopen ( Depacked_OutName , "w+b" );
- if (!out)
- return;
- /* info = fopen ( "info", "w+b");*/
-
- for ( i=0 ; i<20 ; i++ ) /* title */
- fwrite ( &c1 , 1 , 1 , out );
-
- Whatever = (Uchar *) malloc (64);
- for ( i=0 ; i<31 ; i++ )
- {
- BZERO ( Whatever, 64 );
- fread ( &Whatever[0], 14, 1, in );
-
- /*sample name*/
- fwrite ( &Whatever[32] , 22 , 1 , out );
-
- /* size */
- fwrite ( &Whatever[0] , 2 , 1 , out );
- Whole_Sample_Size += (((Whatever[0]*256)+Whatever[1])*2);
-
- /* finetune */
- c1 = ( Uchar ) (((Whatever[12]*256)+Whatever[13])/0x48);
- fwrite ( &c1 , 1 , 1 , out );
-
- /* volume */
- fwrite ( &Whatever[3] , 1 , 1 , out );
-
- /* loop start */
- fwrite ( &Whatever[4] , 2 , 1 , out );
-
- /* loop size */
- fwrite ( &Whatever[6] , 2 , 1 , out );
- }
- /*printf ( "Whole sample size : %ld\n" , Whole_Sample_Size );*/
-
- /* bypass those unknown 14 bytes */
- fseek ( in , 14 , 1 ); /* SEEK_CUR */
-
- for ( i=0 ; i<128 ; i++ )
- {
- fread ( &c1 , 1 , 1 , in );
- fread ( &c2 , 1 , 1 , in );
- fread ( &c3 , 1 , 1 , in );
- fread ( &c4 , 1 , 1 , in );
- Pats_Address[i] = (c1*256*256*256)+(c2*256*256)+(c3*256)+c4;
- /*fprintf ( info, "%3ld: %ld\n" , i,Pats_Address[i] );*/
- if ( Pats_Address[i] < Start_Pat_Address )Start_Pat_Address = Pats_Address[i];
- }
-
- Sample_Data_Address = ftell ( in );
- /* printf ( "Sample data address : %ld\n", Sample_Data_Address);*/
- /*printf ( "address of the first pattern : %ld\n" , Start_Pat_Address );*/
-
- /* pattern datas */
- /* read ALL pattern data */
- fseek ( in , 0 , 2 ); /* SEEK_END */
- Whole_Pattern_Data_Size = ftell (in) - Start_Pat_Address;
- Whole_Pattern_Data = (Uchar *) malloc ( Whole_Pattern_Data_Size );
- fseek ( in , Start_Pat_Address , 0 ); /* SEEK_SET */
- fread ( Whole_Pattern_Data , Whole_Pattern_Data_Size , 1 , in );
- /* printf ( "Whole pattern data size : %ld\n" , Whole_Pattern_Data_Size );*/
- Pattern = (Uchar *) malloc ( 65536 );
- BZERO ( Pattern , 65536 );
-
-
- j=0;k=0;c1=0x00;
- for ( i=0 ; i<Whole_Pattern_Data_Size ; i++ )
- {
- if ((k%256)==0)
- {
- MyPatList[c1] = Start_Pat_Address+i;
- /* fprintf (info, "-> new patter [addy:%ld] [nbr:%d]\n", MyPatList[c1], c1);*/
- c1 += 0x01;
- }
- if ( Whole_Pattern_Data[i] == 0xff )
- {
- i += 1;
- /* Old_cpt[(k+3)%4] = 0xff - Whole_Pattern_Data[i];*/
- Old_cpt[(k-1)%4] = 0xff - Whole_Pattern_Data[i];
- /* fprintf (info, "-> count set to [%d] for voice [%ld]\n",Old_cpt[(k-1)%4],(k-1)%4 );*/
- /*k += 1;*/
- continue;
- }
- if ( Old_cpt[k%4] != 0 )
- {
- Smp = Old_Note_Value[k%4][0];
- Note = Old_Note_Value[k%4][1];
- Fx = Old_Note_Value[k%4][2];
- FxVal = Old_Note_Value[k%4][3];
- /* fprintf ( info, "[%5ld]-[%ld] %2x %2x %2x %2x [%ld] [%6ld] (count : %d)\n",i,k%4,Smp,Note,Fx,FxVal,j,MyPatList[c1-1],Old_cpt[k%4] );*/
- Old_cpt[k%4] -= 1;
-
- Pattern[j] = Smp&0xf0;
- Pattern[j] |= poss[(Note/2)][0];
- Pattern[j+1] = poss[(Note/2)][1];
- Pattern[j+2] = (Smp<<4)&0xf0;
- Pattern[j+2] |= Fx;
- Pattern[j+3] = FxVal;
- k+=1;
- j+=4;
- i-=1;
- continue;
- }
- Smp = Whole_Pattern_Data[i];
- Note = Whole_Pattern_Data[i+1];
- Fx = Whole_Pattern_Data[i+2];
- FxVal = Whole_Pattern_Data[i+3];
- Old_Note_Value[k%4][0] = Smp;
- Old_Note_Value[k%4][1] = Note;
- Old_Note_Value[k%4][2] = Fx;
- Old_Note_Value[k%4][3] = FxVal;
- /* fprintf ( info, "[%5ld]-[%ld] %2x %2x %2x %2x [%ld] [%6ld]\n",i,k%4,Smp,Note,Fx,FxVal,j, MyPatList[c1-1]);*/
- /* fflush (info);*/
- i += 3;
- Pattern[j] = Smp&0xf0;
- Pattern[j] |= poss[(Note/2)][0];
- Pattern[j+1] = poss[(Note/2)][1];
- Pattern[j+2] = (Smp<<4)&0xf0;
- Pattern[j+2] |= Fx;
- Pattern[j+3] = FxVal;
- k+=1;
- j+=4;
- }
- PatMax = c1;
-
- /*
-fprintf ( info , "pats address pats address tmp\n" );
-for ( i=0 ; i<128 ; i++ )
-{
- fprintf ( info , "%3ld: %6ld %ld [%ld]\n" , i , Pats_Address[i] , Pats_Address_tmp[i],MyPatList[i] );
-}
-fflush ( info );*/
-
- /* try to get the number of pattern in pattern list */
- for ( c1=128 ; c1>0x00 ; c1-=0x01 )
- if ( Pats_Address[c1] != Pats_Address[127] )
- break;
-
- /* write this value */
- c1 += 1;
- fwrite ( &c1 , 1 , 1 , out );
-
- /* ntk restart byte */
- c2 = 0x7f;
- fwrite ( &c2 , 1 , 1 , out );
-
- /* write pattern list */
- for ( i=0 ; i<128 ; i++ )
- {
- for (c1=0x00; Pats_Address[i]!=MyPatList[c1];c1+=0x01);
- fwrite ( &c1 , 1 , 1 , out );
- }
-
-
- /* ID string */
- c1 = 'M';
- c2 = '.';
- c3 = 'K';
- fwrite ( &c1 , 1 , 1 , out );
- fwrite ( &c2 , 1 , 1 , out );
- fwrite ( &c3 , 1 , 1 , out );
- fwrite ( &c2 , 1 , 1 , out );
-
-
- fwrite ( Pattern , PatMax*1024 , 1 , out );
- free ( Whole_Pattern_Data );
- free ( Pattern );
-
- /* Sample data */
- fseek ( in , Sample_Data_Address , 0 ); /* SEEK_SET */
- Sample_Data = (Uchar *) malloc ( Whole_Sample_Size );
- fread ( Sample_Data , Whole_Sample_Size , 1 , in );
- fwrite ( Sample_Data , Whole_Sample_Size , 1 , out );
- free ( Sample_Data );
-
- Crap ( " PhaPacker " , BAD , BAD , out );
- /*
- fseek ( out , 830 , SEEK_SET );
- fprintf ( out , " -[Converted with]- " );
- fseek ( out , 860 , SEEK_SET );
- fprintf ( out , " -[PhaPacker to]- " );
- fseek ( out , 890 , SEEK_SET );
- fprintf ( out , " -[Protracker]- " );
- fseek ( out , 920 , SEEK_SET );
- fprintf ( out , " -[by Asle /ReDoX]- " );
- */
- fflush ( in );
- fflush ( out );
- fclose ( in );
- fclose ( out );
-
- printf ( "done\n" );
- return; /* useless ... but */
-}
+++ /dev/null
-/*
- * PowerMusic.c 1996 (c) Asle / ReDoX
- *
- * Converts back to ptk Optimod's power music files
- *
- * Last revision : 26/11/1999 by Sylvain "Asle" Chipaux
- * reduced to only one FREAD.
- * Speed-up and Binary smaller.
- * update: 01/12/99
- * - removed fopen() and attached funcs
-*/
-
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Depack_PM ( void )
-{
- signed char *Smp_Data;
- Uchar c1=0x00,c2=0x00;
- Uchar Max=0x00;
- long WholeSampleSize=0;
- long i=0,j;
- long Where = PW_Start_Address;
- FILE *out;
-
- if ( Save_Status == BAD )
- return;
-
- sprintf ( Depacked_OutName , "%ld.mod" , Cpt_Filename-1 );
- out = mr_fopen ( Depacked_OutName , "w+b" );
- if (!out)
- return;
-
- /* write whole header */
- fwrite ( &in_data[Where] , 950 , 1 , out );
-
- /* get whole sample size */
- for ( i=0 ; i<31 ; i++ )
- WholeSampleSize += (((in_data[Where+42+i*30]*256)+in_data[Where+43+i*30])*2);
- /*printf ( "Whole sanple size : %ld\n" , WholeSampleSize );*/
-
- /* read and write size of pattern list */
- fwrite ( &in_data[Where+950] , 1 , 1 , out );
-
- /* read and write ntk byte and pattern list */
- c1 = 0x7f;
- fwrite ( &c1 , 1 , 1 , out );
- fwrite ( &in_data[Where+952] , 128 , 1 , out );
-
- /* write ID */
- c1 = 'M';
- c2 = '.';
- fwrite ( &c1 , 1 , 1 , out );
- fwrite ( &c2 , 1 , 1 , out );
- c1 = 'K';
- fwrite ( &c1 , 1 , 1 , out );
- fwrite ( &c2 , 1 , 1 , out );
-
- /* get number of pattern */
- Max = 0x00;
- for ( i=0 ; i<128 ; i++ )
- {
- if ( in_data[Where+i+952] > Max )
- Max = in_data[Where+i+952];
- }
- j = Max += 1;
- /*printf ( "\nNumber of pattern : %ld\n" , j );*/
- /* pattern data */
- j *= 1024;
- fwrite ( &in_data[Where+1084] , j , 1 , out );
- j += 1084;
-
- /* sample data */
- Smp_Data = (signed char *) malloc ( WholeSampleSize );
- BZERO ( Smp_Data , WholeSampleSize );
- Smp_Data[0] = in_data[Where+j];
- for ( i=1 ; i<WholeSampleSize-1 ; i++ )
- {
- Smp_Data[i] = Smp_Data[i-1] + (signed char)in_data[Where+j+i];
- }
- fwrite ( Smp_Data , WholeSampleSize , 1 , out );
- free ( Smp_Data );
-
-
- /* crap */
- Crap ( " Power Music " , BAD , BAD , out );
- /*
- fseek ( out , 830 , SEEK_SET );
- fprintf ( out , " -[Converted with]- " );
- fseek ( out , 860 , SEEK_SET );
- fprintf ( out , " -[Power Music to]- " );
- fseek ( out , 890 , SEEK_SET );
- fprintf ( out , " -[Protracker]- " );
- fseek ( out , 920 , SEEK_SET );
- fprintf ( out , " -[by Asle /ReDoX]- " );
- */
-
- fclose ( out );
-
- printf ( "done\n" );
- return; /* useless ... but */
-}
+++ /dev/null
-/*
- * Promizer_0.1_Packer.c 1997 (c) Asle / ReDoX
- *
- * Converts back to ptk Promizer 0.1 packed MODs
- *
- * ---updates : 2000, the 19th of april
- * - Small bug correction (pointed out by Thoman Neumann)
-*/
-
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Depack_PM01 ( void )
-{
- Uchar c1=0x00,c2=0x00,c3=0x00;
- Uchar Pat_Pos;
- Uchar poss[37][2];
- Uchar *Whatever;
- Uchar *PatternData;
- Uchar Smp_Fine_Table[31];
- Uchar Old_Smp_Nbr[4];
- long i=0,j=0,k=0,l=0;
- long WholeSampleSize=0;
- long Pattern_Address[128];
- long Where = PW_Start_Address;
- FILE *out;
-
-#ifdef DOS
- #include "..\include\tuning.h"
- #include "..\include\ptktable.h"
-#endif
-
-#ifdef UNIX
- #include "../include/tuning.h"
- #include "../include/ptktable.h"
-#endif
-
- if ( Save_Status == BAD )
- return;
-
- BZERO ( Pattern_Address , 128*4 );
- BZERO ( Smp_Fine_Table , 31 );
- BZERO ( Old_Smp_Nbr , 4 );
-
- sprintf ( Depacked_OutName , "%ld.mod" , Cpt_Filename-1 );
- out = mr_fopen ( Depacked_OutName , "w+b" );
- if (!out)
- return;
-
- /* write title */
- Whatever = (Uchar *) malloc (1024);
- BZERO ( Whatever , 1024 );
- /* title */
- fwrite ( Whatever , 20 , 1 , out );
-
- /* read and write sample descriptions */
- for ( i=0 ; i<31 ; i++ )
- {
- /*sample name*/
- fwrite ( Whatever , 22 , 1 , out );
-
- WholeSampleSize += (((in_data[Where]*256)+in_data[Where+1])*2);
- fwrite ( &in_data[Where] , 2 , 1 , out );
- c1 = in_data[Where+2]; /* finetune */
- Smp_Fine_Table[i] = c1;
- fwrite ( &c1 , 1 , 1 , out );
-
- fwrite ( &in_data[Where+3] , 3 , 1 , out );
- Whatever[32] = in_data[Where+7];
- if ( (in_data[Where+6] == 0x00) && (Whatever[32] == 0x00) )
- Whatever[32] = 0x01;
- fwrite ( &in_data[Where+6] , 1 , 1 , out );
- fwrite ( &Whatever[32] , 1 , 1 , out );
- Where += 8;
- }
- /*printf ( "Whole sample size : %ld\n" , WholeSampleSize );*/
-
- /* pattern table lenght */
- Pat_Pos = ((in_data[Where]*256)+in_data[Where+1])/4;
- Where += 2;
- fwrite ( &Pat_Pos , 1 , 1 , out );
- /*printf ( "Size of pattern list : %d\n" , Pat_Pos );*/
-
- /* write NoiseTracker byte */
- Whatever[0] = 0x7F;
- fwrite ( Whatever , 1 , 1 , out );
-
- /* read pattern address list */
- for ( i=0 ; i<128 ; i++ )
- {
- Pattern_Address[i] = (in_data[Where]*256*256*256)+
- (in_data[Where+1]*256*256)+
- (in_data[Where+2]*256)+
- in_data[Where+3];
- Where += 4;
- }
-
- /* deduce pattern list and write it */
- for ( i=0 ; i<128 ; i++ )
- {
- Whatever[i] = Pattern_Address[i]/1024;
- }
- fwrite ( Whatever , 128 , 1 , out );
-
- /* write ptk's ID */
- Whatever[0] = 'M';
- Whatever[1] = '.';
- Whatever[2] = 'K';
- Whatever[3] = '.';
- fwrite ( Whatever , 4 , 1 , out );
-
- /* get pattern data size */
- j = (in_data[Where]*256*256*256)+
- (in_data[Where+1]*256*256)+
- (in_data[Where+2]*256)+
- in_data[Where+3];
- Where += 4;
- /*printf ( "Size of the pattern data : %ld\n" , j );*/
-
- /* read and XOR pattern data */
- free ( Whatever );
- Whatever = (Uchar *) malloc ( j );
- PatternData = (Uchar *) malloc ( j );
- for ( k=0 ; k<j ; k++ )
- {
- if ( k%4 == 3 )
- {
- PatternData[k] = ((240 - (in_data[Where+k]&0xf0))+(in_data[Where+k]&0x0f));
- continue;
- }
- PatternData[k] = 255 - in_data[Where+k];
- }
-
- /* all right, now, let's take care of these 'finetuned' value ... pfff */
- Old_Smp_Nbr[0]=Old_Smp_Nbr[1]=Old_Smp_Nbr[2]=Old_Smp_Nbr[3]=0x1f;
- BZERO ( Whatever , j );
- for ( i=0 ; i<j/4 ; i++ )
- {
- c1 = PatternData[i*4]&0x0f;
- c2 = PatternData[i*4+1];
- k = (c1*256)+c2;
- c3 = (PatternData[i*4]&0xf0) | ((PatternData[i*4+2]>>4)&0x0f);
- if ( c3 == 0 )
- c3 = Old_Smp_Nbr[i%4];
- else
- Old_Smp_Nbr[i%4] = c3;
- if ( (k != 0) && (Smp_Fine_Table[c3-1] != 0x00) )
- {
-/*fprintf ( info , "! (at %ld)(smp:%x)(pitch:%ld)\n" , (i*4)+382 , c3 , k );*/
- for ( l=0 ; l<36 ; l++ )
- {
- if ( k == Tuning[Smp_Fine_Table[c3-1]][l] )
- {
- Whatever[i*4] = poss[l+1][0];
- Whatever[i*4+1] = poss[l+1][1];
- }
- }
- }
- else
- {
- Whatever[i*4] = PatternData[i*4]&0x0f;
- Whatever[i*4+1] = PatternData[i*4+1];
- }
- Whatever[i*4] |= (PatternData[i*4]&0xf0);
- Whatever[i*4+2] = PatternData[i*4+2];
- Whatever[i*4+3] = PatternData[i*4+3];
- }
- fwrite ( Whatever , j , 1 , out );
- free ( Whatever );
- free ( PatternData );
-
- /* sample data */
- Where += j;
- fwrite ( &in_data[Where] , WholeSampleSize , 1 , out );
-
- /* crap */
- Crap ( " Promizer 0.1 " , BAD , BAD , out );
-
- fclose ( out );
-
- printf ( "done\n" );
- return; /* useless ... but */
-}
+++ /dev/null
-/*
- * Promizer_10c.c 1997 (c) Asle / ReDoX
- *
- * Converts PM10c packed MODs back to PTK MODs
- *
- * update 20 mar 2003 (it's war time again .. brrrr)
- * - removed all open() funcs.
- * - optimized more than quite a bit (src is 5kb shorter !)
-*/
-
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-#define ON 0
-#define OFF 1
-
-#define PATTERN_DATA_ADDY 5222
-
-void Depack_PM10c ( void )
-{
- Uchar c1=0x00,c2=0x00;
- short Ref_Max=0;
- long Pats_Address[128];
- long Read_Pats_Address[128];
- Uchar NOP=0x00; /* number of pattern */
- Uchar *ReferenceTable;
- Uchar *Pattern;
- long i=0,j=0,k=0,l=0,m=0;
- long Total_Sample_Size=0;
- long PatDataSize=0l;
- long SDAV=0l;
- Uchar FLAG=OFF;
- Uchar Smp_Fine_Table[31];
- Uchar poss[37][2];
- Uchar OldSmpValue[4];
- Uchar *Whatever;
- Uchar *WholePatternData;
- long Where = PW_Start_Address;
- short Period;
- FILE *out;/*,*info;*/
-
-#ifdef DOS
- #include "..\include\tuning.h"
- #include "..\include\ptktable.h"
-#endif
-
-#ifdef UNIX
- #include "../include/tuning.h"
- #include "../include/ptktable.h"
-#endif
-
-
- if ( Save_Status == BAD )
- return;
-
- BZERO ( Smp_Fine_Table , 31 );
- BZERO ( OldSmpValue , 4 );
- BZERO ( Pats_Address , 128*4 );
-
- sprintf ( Depacked_OutName , "%ld.mod" , Cpt_Filename-1 );
- out = mr_fopen ( Depacked_OutName , "w+b" );
- if (!out)
- return;
- /*info = fopen ( "info", "w+b");*/
-
- Whatever = (Uchar *) malloc (128);
- BZERO (Whatever,128);
-
- /* title */
- fwrite ( &Whatever[32] , 20 , 1 , out );
-
- /* bypass replaycode routine */
- Where = PW_Start_Address + 4460;
-
- for ( i=0 ; i<31 ; i++ )
- {
- /*sample name*/
- fwrite ( &Whatever[32] ,22 , 1 , out );
-
- fwrite ( &in_data[Where], 8, 1, out );
- /* whole sample size */
- Total_Sample_Size += (((in_data[Where]*256)+in_data[Where+1])*2);
- /* finetune */
- Smp_Fine_Table[i] = in_data[Where+2];
- Where += 8;
- }
-
- /* read patterns addys */
- Where = PW_Start_Address + 4710;
- for ( i=0 ; i<128 ; i++ )
- {
- Pats_Address[i] = (in_data[Where]*256*256*256)+(in_data[Where+1]*256*256)+(in_data[Where+2]*256)+in_data[Where+3];
- /*fprintf ( info, "Pat[%3ld]: %ld\n",i,Pats_Address[i]);*/
- Where += 4;
- }
-
- /* --------------------- */
- /* a little pre-calc code ... no other way to deal with these unknown pattern data sizes ! :( */
- Where = PW_Start_Address + 4456;
- PatDataSize = (in_data[Where]*256*256*256)+(in_data[Where+1]*256*256)+(in_data[Where+2]*256)+in_data[Where+3];
- /*fprintf ( info, "PatDataSize : %ld\n" , PatDataSize );*/
-
- /* go back to pattern data starting address */
- Where = PW_Start_Address + PATTERN_DATA_ADDY;
-
- /* now, reading all pattern data to get the max value of note */
- WholePatternData = (Uchar *) malloc (PatDataSize+1);
- BZERO (WholePatternData, PatDataSize+1);
- for ( j=0 ; j<PatDataSize ; j+=2 )
- {
- WholePatternData[j] = in_data[Where+j];
- WholePatternData[j+1] = in_data[Where+j+1];
- if ( ((WholePatternData[j]*256)+WholePatternData[j+1]) > Ref_Max )
- Ref_Max = ((WholePatternData[j]*256)+WholePatternData[j+1]);
- }
- Where += PatDataSize;
-
- /*fprintf ( info, "highest ref number (Ref_Max) = %d\n" , Ref_Max );*/
-
- /* read "reference Table" */
- Ref_Max += 1; /* coz 1st value is 0 ! */
- i = Ref_Max * 4; /* coz each block is 4 bytes long */
- ReferenceTable = (Uchar *) malloc ( i+1 );
- BZERO ( ReferenceTable, i+1 );
- for ( j=0 ; j<i ; j++) ReferenceTable[j] = in_data[Where+j];
-
- /*fprintf ( info, "REFERENCE TABLE SIZE ((Ref_Max+1)*4) : %ld\n" , i );*/
-
- c1=0; /* will count patterns */
- k=0; /* current note number */
- Pattern = (Uchar *) malloc (65536);
- BZERO (Pattern, 65536);
- i=0;
- for ( j=0 ; j<PatDataSize ; j+=2 )
- {
- if ( (i%1024) == 0 )
- {
- Read_Pats_Address[c1] = j;
- c1 += 0x01;
- /*fprintf ( info, " -> new pattern %2d (addy :%ld)\n", c1, j+5222 );*/
- }
-
- m = ((WholePatternData[j]*256)+WholePatternData[j+1])*4;
- Pattern[i] = ReferenceTable[m];
- Pattern[i+1] = ReferenceTable[m+1];
- Pattern[i+2] = ReferenceTable[m+2];
- Pattern[i+3] = ReferenceTable[m+3];
-
- /*fprintf ( info, "[%4x][%3ld][%ld]: %2x %2x %2x %2x", j,i,k%4,Pattern[i],Pattern[i+1],Pattern[i+2],Pattern[i+3]);*/
-
- c2 = ((Pattern[i+2]>>4)&0x0f) | (Pattern[i]&0xf0);
- if ( c2 != 0x00 )
- {
- OldSmpValue[k%4] = c2;
- }
- Period = ((Pattern[i]&0x0f)*256)+Pattern[i+1];
- if ( (Period != 0) && (Smp_Fine_Table[OldSmpValue[k%4]-1] != 0x00) )
- {
- for ( l=0 ; l<36 ; l++ )
- if ( Tuning[Smp_Fine_Table[OldSmpValue[k%4]-1]][l] == Period )
- {
- Pattern[i] &= 0xf0;
- Pattern[i] |= poss[l+1][0];
- Pattern[i+1] = poss[l+1][1];
- break;
- }
- }
-
- if ( ( (Pattern[i+2] & 0x0f) == 0x0d ) ||
- ( (Pattern[i+2] & 0x0f) == 0x0b ) )
- {
- /*fprintf ( info, " <-- B or D detected" );*/
- FLAG = ON;
- }
- if ( (FLAG == ON) && ((k%4) == 3) )
- {
- /*fprintf ( info, "\n -> bypassing end of pattern" );*/
- FLAG=OFF;
- while ( (i%1024) != 0)
- i ++;
- i -= 4;
- }
- k += 1;
- i += 4;
- /*fprintf ( info, "\n" );*/
- }
- free ( ReferenceTable );
- free ( WholePatternData );
-
- /* pattern table lenght */
- Where = PW_Start_Address + 4708;
- NOP = ((in_data[Where]*256)+in_data[Where+1])/4;
- fwrite ( &NOP , 1 , 1 , out );
-
- Whatever[0] = 0x7f;
- fwrite ( &Whatever[0], 1, 1, out );
-
- /* write pattern table */
- BZERO ( Whatever, 128 );
- for ( c2=0; c2<128 ; c2+=0x01 )
- for ( i=0 ; i<NOP ; i++ )
- if ( Pats_Address[c2] == Read_Pats_Address[i])
- Whatever[c2] = (Uchar) i;
- while ( i<128 )
- Whatever[i++] = 0x00;
- fwrite ( &Whatever[0], 128, 1, out );
-
- /* write tag */
- Whatever[0] = 'M';
- Whatever[1] = '.';
- Whatever[2] = 'K';
-
- fwrite ( &Whatever[0] , 1 , 1 , out );
- fwrite ( &Whatever[1] , 1 , 1 , out );
- fwrite ( &Whatever[2] , 1 , 1 , out );
- fwrite ( &Whatever[1] , 1 , 1 , out );
-
- free ( Whatever );
-
- /* write pattern data */
- /* c1 is still the number of patterns stored */
- fwrite ( Pattern, c1*1024, 1, out );
-
- free (Pattern);
-
- Where = PW_Start_Address + 4452;
- SDAV = (in_data[Where]*256*256*256)+(in_data[Where+1]*256*256)+(in_data[Where+2]*256)+in_data[Where+3];
- Where = PW_Start_Address + 4456 + SDAV;
-
-
- /* sample data */
- /*printf ( "Total sample size : %ld\n" , Total_Sample_Size );*/
- fwrite ( &in_data[Where] , Total_Sample_Size , 1 , out );
-
-
- Crap ( " Promizer v1.0c " , BAD , BAD , out );
- /*
- fseek ( out , 860 , SEEK_SET );
- fprintf ( out , " -[Converted with]- " );
- fseek ( out , 890 , SEEK_SET );
- fprintf ( out , " -[PM10c to Ptk]- " );
- fseek ( out , 920 , SEEK_SET );
- fprintf ( out , " -[by Asle /ReDoX]- " );
- */
- fflush ( out );
- fclose ( out );
- /*fclose ( info );*/
-
- printf ( "done\n" );
- return; /* useless ... but */
-}
+++ /dev/null
-/*
- * Promizer_18a.c 1997 (c) Asle / ReDoX
- *
- * Converts PM18a packed MODs back to PTK MODs
- * thanks to Gryzor and his ProWizard tool ! ... without it, this prog
- * would not exist !!!
- *
- * update 20 mar 2003 (it's war time again .. brrrr)
- * - removed all open() funcs.
- * - optimized more than quite a bit (src is 5kb shorter !)
-*/
-
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-#define ON 0
-#define OFF 1
-
-void Depack_PM18a ( void )
-{
- Uchar c1=0x00,c2=0x00;
- short Ref_Max=0;
- long Pats_Address[128];
- long Read_Pats_Address[128];
- Uchar NOP=0x00; /* number of pattern */
- Uchar *ReferenceTable;
- Uchar *Pattern;
- long i=0,j=0,k=0,l=0,m=0;
- long Total_Sample_Size=0;
- long PatDataSize=0l;
- long SDAV=0l;
- Uchar FLAG=OFF;
- Uchar Smp_Fine_Table[31];
- Uchar poss[37][2];
- Uchar OldSmpValue[4];
- short Period;
- Uchar *Whatever;
- long Where = PW_Start_Address;
- Uchar *WholePatternData;
- FILE *out;
-
-#ifdef DOS
- #include "..\include\tuning.h"
- #include "..\include\ptktable.h"
-#endif
-
-#ifdef UNIX
- #include "../include/tuning.h"
- #include "../include/ptktable.h"
-#endif
-
- if ( Save_Status == BAD )
- return;
-
- /*in = fopen ( OutName_final , "r+b" );*/ /* +b is safe bcoz OutName's just been saved */
- sprintf ( Depacked_OutName , "%ld.mod" , Cpt_Filename-1 );
- out = mr_fopen ( Depacked_OutName , "w+b" );
- if (!out)
- return;
-
- BZERO ( Smp_Fine_Table , 31 );
- BZERO ( OldSmpValue , 4 );
- BZERO ( Pats_Address , 128*4 );
-
- Whatever = (Uchar *) malloc (128);
- BZERO (Whatever, 128);
- /* title */
- fwrite ( &Whatever[0] , 20 , 1 , out );
-
- /* bypass replaycode routine */
- /*fseek ( in , 4464 , 0 );*/ /* SEEK_SET */
- Where = PW_Start_Address + 4464;
-
- for ( i=0 ; i<31 ; i++ )
- {
-
- /*sample name*/
- fwrite ( &Whatever[32] , 22 , 1 , out );
- fwrite ( &in_data[Where], 8, 1, out );
-
- Total_Sample_Size += (((in_data[Where]*256)+in_data[Where+1])*2);
- Smp_Fine_Table[i] = in_data[Where+2];
- Where += 8;
- }
-
- /* pattern table lenght */
- NOP = ((in_data[Where]*256)+in_data[Where+1])/4;
- fwrite ( &NOP , 1 , 1 , out );
- Where += 2;
-
- /*printf ( "Number of patterns : %d\n" , NOP );*/
-
- /* NoiseTracker restart byte */
- Whatever[0] = 0x7f;
- fwrite ( &Whatever[0] , 1 , 1 , out );
-
- for ( i=0 ; i<128 ; i++ )
- {
- Pats_Address[i] = (in_data[Where]*256*256*256)+(in_data[Where+1]*256*256)+(in_data[Where+2]*256)+in_data[Where+3];
- Where += 4;
- }
-
-
- /* a little pre-calc code ... no other way to deal with these unknown pattern data sizes ! :( */
- Where = PW_Start_Address + 4460;
- PatDataSize = (in_data[Where]*256*256*256)+(in_data[Where+1]*256*256)+(in_data[Where+2]*256)+in_data[Where+3];
- /* go back to pattern data starting address */
- Where = PW_Start_Address + 5226;
- /* now, reading all pattern data to get the max value of note */
- WholePatternData = (Uchar *) malloc (PatDataSize+1);
- BZERO (WholePatternData, PatDataSize+1);
- for ( j=0 ; j<PatDataSize ; j+=2 )
- {
- WholePatternData[j] = in_data[Where+j];
- WholePatternData[j+1] = in_data[Where+j+1];
- if ( ((WholePatternData[j]*256)+WholePatternData[j+1]) > Ref_Max )
- Ref_Max = ((WholePatternData[j]*256)+WholePatternData[j+1]);
- }
- Where += PatDataSize;
-
- /* read "reference Table" */
- Ref_Max += 1; /* coz 1st value is 0 ! */
- i = Ref_Max * 4; /* coz each block is 4 bytes long */
- ReferenceTable = (Uchar *) malloc ( i );
- BZERO ( ReferenceTable, i+1 );
- for ( j=0 ; j<i ; j++) ReferenceTable[j] = in_data[Where+j];
-
-
- c1=0; /* will count patterns */
- k=0; /* current note number */
- Pattern = (Uchar *) malloc (65536);
- BZERO (Pattern, 65536);
- i=0;
- for ( j=0 ; j<PatDataSize ; j+=2 )
- {
- if ( (i%1024) == 0 )
- {
- Read_Pats_Address[c1] = j;
- c1 += 0x01;
- /*fprintf ( info, " -> new pattern %2d (addy :%ld)\n", c1, j+5226 );*/
- }
-
- m = ((WholePatternData[j]*256)+WholePatternData[j+1])*4;
- Pattern[i] = ReferenceTable[m];
- Pattern[i+1] = ReferenceTable[m+1];
- Pattern[i+2] = ReferenceTable[m+2];
- Pattern[i+3] = ReferenceTable[m+3];
-
- /*fprintf ( info, "[%4x][%3ld][%ld]: %2x %2x %2x %2x", j,i,k%4,Pattern[i],Pattern[i+1],Pattern[i+2],Pattern[i+3]);*/
-
- c2 = ((Pattern[i+2]>>4)&0x0f) | (Pattern[i]&0xf0);
- if ( c2 != 0x00 )
- {
- OldSmpValue[k%4] = c2;
- }
- Period = ((Pattern[i]&0x0f)*256)+Pattern[i+1];
- if ( (Period != 0) && (Smp_Fine_Table[OldSmpValue[k%4]-1] != 0x00) )
- {
- for ( l=0 ; l<36 ; l++ )
- if ( Tuning[Smp_Fine_Table[OldSmpValue[k%4]-1]][l] == Period )
- {
- Pattern[i] &= 0xf0;
- Pattern[i] |= poss[l+1][0];
- Pattern[i+1] = poss[l+1][1];
- break;
- }
- }
-
- if ( ( (Pattern[i+2] & 0x0f) == 0x0d ) ||
- ( (Pattern[i+2] & 0x0f) == 0x0b ) )
- {
- /*fprintf ( info, " <-- B or D detected" );*/
- FLAG = ON;
- }
- if ( (FLAG == ON) && ((k%4) == 3) )
- {
- /*fprintf ( info, "\n -> bypassing end of pattern" );*/
- FLAG=OFF;
- while ( (i%1024) != 0)
- i ++;
- i -= 4;
- }
- k += 1;
- i += 4;
- /*fprintf ( info, "\n" );*/
- }
- free ( ReferenceTable );
- free ( WholePatternData );
-
- /* write pattern table */
- BZERO ( Whatever, 128 );
- for ( c2=0; c2<128 ; c2+=0x01 )
- for ( i=0 ; i<NOP ; i++ )
- if ( Pats_Address[c2] == Read_Pats_Address[i])
- Whatever[c2] = (Uchar) i;
- while ( i<128 )
- Whatever[i++] = 0x00;
- fwrite ( &Whatever[0], 128, 1, out );
-
- /* write tag */
- Whatever[0] = 'M';
- Whatever[1] = '.';
- Whatever[2] = 'K';
-
- fwrite ( &Whatever[0] , 1 , 1 , out );
- fwrite ( &Whatever[1] , 1 , 1 , out );
- fwrite ( &Whatever[2] , 1 , 1 , out );
- fwrite ( &Whatever[1] , 1 , 1 , out );
-
- free ( Whatever );
-
- /* write pattern data */
- /* c1 is still the number of patterns stored */
- fwrite ( Pattern, c1*1024, 1, out );
-
- free (Pattern);
-
- Where = PW_Start_Address + 4456;
- SDAV = (in_data[Where]*256*256*256)+(in_data[Where+1]*256*256)+(in_data[Where+2]*256)+in_data[Where+3];
- Where = PW_Start_Address + 4460 + SDAV;
-
-
- /* smp data */
-
- /*printf ( "Total sample size : %ld\n" , Total_Sample_Size );*/
- fwrite ( &in_data[Where] , Total_Sample_Size , 1 , out );
-
- Crap ( " Promizer v1.8a " , BAD , BAD , out );
- /*
- fseek ( out , 860 , SEEK_SET );
- fprintf ( out , " -[Converted with]- " );
- fseek ( out , 890 , SEEK_SET );
- fprintf ( out , " -[PM18a to Ptk]- " );
- fseek ( out , 920 , SEEK_SET );
- fprintf ( out , " -[by Asle /ReDoX]- " );
- */
- fflush ( out );
- fclose ( out );
-
- printf ( "done\n" );
- return; /* useless ... but */
-}
+++ /dev/null
-/*
- * Promizer_20.c 1997 (c) Asle / ReDoX
- *
- * Converts PM20 packed MODs back to PTK MODs
- *
- * update 20 mar 2003 (it's war time again .. brrrr)
- * - removed all open() funcs.
- * - optimized more than quite a bit (src 4kb shorter !)
-*/
-
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-#define ON 0
-#define OFF 1
-#define AFTER_REPLAY_CODE 5198
-#define SAMPLE_DESC 5458
-#define ADDRESS_SAMPLE_DATA 5706
-#define ADDRESS_REF_TABLE 5710
-#define PATTERN_DATA 5714
-
-void Depack_PM20 ( void )
-{
- Uchar c1=0x00,c2=0x00;
- short Ref_Max=0;
- long Pats_Address[128];
- long Read_Pats_Address[128];
- Uchar NOP=0x00; /* number of pattern */
- Uchar *ReferenceTable;
- Uchar *Pattern;
- long i=0,j=0,k=0,m=0;
- long Total_Sample_Size=0;
- long PatDataSize=0l;
- long SDAV=0l;
- Uchar FLAG=OFF;
- Uchar poss[37][2];
- Uchar Note,Smp;
- Uchar *Whatever;
- Uchar *WholePatternData;
- long Where = PW_Start_Address;
- FILE *out;/*,*info;*/
-
- if ( Save_Status == BAD )
- return;
-
-#ifdef DOS
- #include "..\include\ptktable.h"
-#endif
-
-#ifdef UNIX
- #include "../include/ptktable.h"
-#endif
-
-
- /*in = fopen ( OutName_final , "r+b" );*/ /* +b is safe bcoz OutName's just been saved */
- sprintf ( Depacked_OutName , "%ld.mod" , Cpt_Filename-1 );
- out = mr_fopen ( Depacked_OutName , "w+b" );
- if (!out)
- return;
- /*info = fopen ( "info", "w+b");*/
-
- BZERO ( Pats_Address , 128*4 );
-
- Whatever = (Uchar *) malloc (128);
- BZERO (Whatever, 128);
- /* title */
- fwrite ( &Whatever[0] , 20 , 1 , out );
-
- /* bypass replaycode routine */
- Where += SAMPLE_DESC; /* SEEK_SET */
-
- for ( i=0 ; i<31 ; i++ )
- {
- /*sample name*/
- fwrite ( &Whatever[32] , 22 , 1 , out );
-
- in_data[Where+2] /= 2;
- if ( (in_data[Where+6] == 0x00) && (in_data[Where+7] == 0x00) )in_data[Where+7] = 0x01;
- fwrite ( &in_data[Where], 8, 1, out );
-
- Total_Sample_Size += (((in_data[Where]*256)+in_data[Where+1])*2);
- Where += 8;
- }
-
- /*printf ( "REAL Number of patterns : %d\n" , NOP );*/
-
- /* read "used" size of pattern table */
- Where = PW_Start_Address + AFTER_REPLAY_CODE + 2;
- NOP = ((in_data[Where]*256)+in_data[Where+1])/2;
- Where += 2;
- /*fprintf ( info, "Number of pattern in pattern list : %d\n" , NOP );*/
-
- /* write size of pattern list */
- fwrite ( &NOP , 1 , 1 , out );
-
- /* NoiseTracker restart byte */
- c1 = 0x7f;
- fwrite ( &c1 , 1 , 1 , out );
-
- /* read pattern addys */
- for ( i=0 ; i<128 ; i++ )
- {
- Pats_Address[i] = (in_data[Where]*256)+in_data[Where+1];
- Where += 2;
- /*fprintf ( info, "[%3ld] : %ld\n", i, Pats_Address[i] );*/
- }
-
-
- /* a little pre-calc code ... no other way to deal with these unknown pattern data sizes ! :( */
- /* so, first, we get the pattern data size .. */
- Where = PW_Start_Address + ADDRESS_REF_TABLE;
- j = (in_data[Where]*256*256*256)+(in_data[Where+1]*256*256)+(in_data[Where+2]*256)+in_data[Where+3];
- PatDataSize = (AFTER_REPLAY_CODE + j) - PATTERN_DATA;
- /*fprintf ( info, "Pattern data size : %ld\n" , PatDataSize );*/
-
- /* go back to pattern data starting address */
- Where = PW_Start_Address + PATTERN_DATA;
-
- /* now, reading all pattern data to get the max value of note */
- WholePatternData = (Uchar *) malloc (PatDataSize+1);
- BZERO (WholePatternData, PatDataSize+1);
- for ( j=0 ; j<PatDataSize ; j+=2 )
- {
- WholePatternData[j] = in_data[Where+j];
- WholePatternData[j+1] = in_data[Where+j+1];
- if ( ((WholePatternData[j]*256)+WholePatternData[j+1]) > Ref_Max )
- Ref_Max = ((WholePatternData[j]*256)+WholePatternData[j+1]);
- }
-
- /* read "reference Table" */
- Where = PW_Start_Address + ADDRESS_REF_TABLE;
- j = (in_data[Where]*256*256*256)+(in_data[Where+1]*256*256)+(in_data[Where+2]*256)+in_data[Where+3];
- Where = PW_Start_Address + AFTER_REPLAY_CODE + j;
-
- Ref_Max += 1; /* coz 1st value is 0 ! */
- i = Ref_Max * 4; /* coz each block is 4 bytes long */
- ReferenceTable = (Uchar *) malloc ( i );
- BZERO ( ReferenceTable, i );
- for ( j=0 ; j<i ; j++) ReferenceTable[j] = in_data[Where+j];
-
- /* go back to pattern data starting address */
- Where = PW_Start_Address + PATTERN_DATA;
-
-
- c1=0; /* will count patterns */
- k=0; /* current note number */
- Pattern = (Uchar *) malloc (65536);
- BZERO (Pattern, 65536);
- i=0;
- for ( j=0 ; j<PatDataSize ; j+=2 )
- {
- if ( (i%1024) == 0 )
- {
- Read_Pats_Address[c1] = j;
- c1 += 0x01;
- /* fprintf ( info, " -> new pattern %2d (addy :%ld)\n", c1, j );*/
- }
-
- m = ((WholePatternData[j]*256)+WholePatternData[j+1])*4;
-
- Smp = ReferenceTable[m];
- Smp = Smp >> 2;
- Note = ReferenceTable[m+1];
-
- Pattern[i] = (Smp&0xf0);
- Pattern[i] |= poss[(Note/2)][0];
- Pattern[i+1] = poss[(Note/2)][1];
- Pattern[i+2] = ReferenceTable[m+2];
- Pattern[i+2] |= ((Smp<<4)&0xf0);
- Pattern[i+3] = ReferenceTable[m+3];
- /*fprintf ( info, "[%4ld][%ld][%ld] %2x %2x %2x %2x",i,k%4,j,Pattern[i],Pattern[i+1],Pattern[i+2],Pattern[i+3] );*/
-
- if ( ( (Pattern[i+2] & 0x0f) == 0x0d ) ||
- ( (Pattern[i+2] & 0x0f) == 0x0b ) )
- {
- /*fprintf ( info, " <- D or B detected" );*/
- FLAG = ON;
- }
- if ( (FLAG == ON) && ((k%4) == 3) )
- {
- /*fprintf ( info, "\n -> bypassing end of pattern" );*/
- FLAG=OFF;
- while ( (i%1024) != 0)
- i ++;
- i -= 4;
- }
-
- k += 1;
- i += 4;
- /*fprintf ( info, "\n" );*/
- }
-
- free ( ReferenceTable );
- free ( WholePatternData );
-
- /* write pattern table */
- BZERO ( Whatever, 128 );
- for ( c2=0; c2<128 ; c2+=0x01 )
- for ( i=0 ; i<NOP ; i++ )
- if ( Pats_Address[c2] == Read_Pats_Address[i])
- Whatever[c2] = (Uchar) i;
- while ( i<128 )
- Whatever[i++] = 0x00;
- fwrite ( &Whatever[0], 128, 1, out );
-
- /* write tag */
- Whatever[0] = 'M';
- Whatever[1] = '.';
- Whatever[2] = 'K';
-
- fwrite ( &Whatever[0] , 1 , 1 , out );
- fwrite ( &Whatever[1] , 1 , 1 , out );
- fwrite ( &Whatever[2] , 1 , 1 , out );
- fwrite ( &Whatever[1] , 1 , 1 , out );
-
- free ( Whatever );
-
- /* write pattern data */
- /* c1 is still the number of patterns stored */
- fwrite ( Pattern, c1*1024, 1, out );
-
- /* get address of sample data .. and go there */
- Where = PW_Start_Address + ADDRESS_SAMPLE_DATA;
- SDAV = (in_data[Where]*256*256*256)+(in_data[Where+1]*256*256)+(in_data[Where+2]*256)+in_data[Where+3];
- Where = PW_Start_Address + AFTER_REPLAY_CODE + SDAV;
-
-
- /* read and save sample data */
- /*fprintf ( info, "Total sample size : %ld\n" , Total_Sample_Size );*/
- fwrite ( &in_data[Where] , Total_Sample_Size , 1 , out );
-
- Crap ( " Promizer 2.0 " , BAD , BAD , out );
- /*
- fseek ( out , 830 , SEEK_SET );
- fprintf ( out , " -[Converted with]- " );
- fseek ( out , 860 , SEEK_SET );
- fprintf ( out , " -[Promizer 2.0]- " );
- fseek ( out , 890 , SEEK_SET );
- fprintf ( out , " -[2 Protracker]- " );
- fseek ( out , 920 , SEEK_SET );
- fprintf ( out , " -[by Asle /ReDoX]- " );
- */
- fflush ( out );
- fclose ( out );
- /*fclose (info );*/
-
- printf ( "done\n" );
- return; /* useless ... but */
-}
+++ /dev/null
-/*
- * Promizer_40.c 1997 (c) Asle / ReDoX
- *
- * Converts PM40 packed MODs back to PTK MODs
- *
-*/
-
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-#define ON 0
-#define OFF 1
-#define SAMPLE_DESC 264
-#define ADDRESS_SAMPLE_DATA 512
-#define ADDRESS_REF_TABLE 516
-#define PATTERN_DATA 520
-
-void Depack_PM40 ( void )
-{
- Uchar c1=0x00,c2=0x00,c3=0x00,c4=0x00;
- Uchar PatPos=0x00;
- short Pat_Max=0;
- long tmp_ptr,tmp1,tmp2;
- short Ref_Max=0;
- Uchar Pats_Numbers[128];
- Uchar Pats_Numbers_tmp[128];
- long Pats_Address[128];
- long Pats_Address_tmp[128];
- long Pats_Address_tmp2[128];
- short Pats_PrePointers[64][256];
- Uchar *ReferenceTable;
- Uchar *SampleData;
- Uchar Pattern[128][1024];
- long i=0,j=0,k=0;
- long Total_Sample_Size=0;
- long PatDataSize=0l;
- long SDAV=0l;
- Uchar FLAG=OFF;
- Uchar poss[37][2];
- Uchar Note,Smp;
- /*long Where = PW_Start_Address;*/
- FILE *in,*out;
-
- if ( Save_Status == BAD )
- return;
-
-#ifdef DOS
- #include "..\include\ptktable.h"
-#endif
-
-#ifdef UNIX
- #include "../include/ptktable.h"
-#endif
-
- in = fopen ( (char *)OutName_final , "r+b" ); /* +b is safe bcoz OutName's just been saved */
- if (!in)
- return;
- sprintf ( Depacked_OutName , "%ld.mod" , Cpt_Filename-1 );
- out = mr_fopen ( Depacked_OutName , "w+b" );
- if (!out)
- return;
-
- BZERO ( Pats_Numbers , 128 );
- BZERO ( Pats_Numbers_tmp , 128 );
- BZERO ( Pats_PrePointers , 64*256 );
- BZERO ( Pattern , 128*1024 );
- BZERO ( Pats_Address , 128*4 );
- BZERO ( Pats_Address_tmp , 128*4 );
- for ( i=0 ; i<128 ; i++ )
- Pats_Address_tmp2[i] = 9999l;
-
- /* write title */
- for ( i=0 ; i<20 ; i++ ) /* title */
- fwrite ( &c1 , 1 , 1 , out );
-
- /* read and write sample headers */
- /*printf ( "Converting sample headers ... " );*/
- fseek ( in , SAMPLE_DESC , 0 );
- for ( i=0 ; i<31 ; i++ )
- {
- c1 = 0x00;
- for ( j=0 ; j<22 ; j++ ) /*sample name*/
- fwrite ( &c1 , 1 , 1 , out );
-
- fread ( &c1 , 1 , 1 , in ); /* size */
- fread ( &c2 , 1 , 1 , in );
- Total_Sample_Size += (((c1*256)+c2)*2);
- fwrite ( &c1 , 1 , 1 , out );
- fwrite ( &c2 , 1 , 1 , out );
- fread ( &c1 , 1 , 1 , in ); /* finetune */
- fwrite ( &c1 , 1 , 1 , out );
- fread ( &c1 , 1 , 1 , in ); /* volume */
- fwrite ( &c1 , 1 , 1 , out );
- fread ( &c1 , 1 , 1 , in ); /* loop start */
- fread ( &c2 , 1 , 1 , in );
- fwrite ( &c1 , 1 , 1 , out );
- fwrite ( &c2 , 1 , 1 , out );
- fread ( &c1 , 1 , 1 , in ); /* loop size */
- fread ( &c2 , 1 , 1 , in );
- fwrite ( &c1 , 1 , 1 , out );
- fwrite ( &c2 , 1 , 1 , out );
- }
- /*printf ( "ok\n" );*/
-
- /* read and write the size of the pattern list */
- fseek ( in , 7 , 0 ); /* SEEK_SET */
- fread ( &PatPos , 1 , 1 , in );
- fwrite ( &PatPos , 1 , 1 , out );
-
- /* NoiseTracker restart byte */
- c1 = 0x7f;
- fwrite ( &c1 , 1 , 1 , out );
-
-
- /* pattern addresses */
- fseek ( in , 8 , 0 ); /* SEEK_SET */
- for ( i=0 ; i<128 ; i++ )
- {
- fread ( &c1 , 1 , 1 , in );
- fread ( &c2 , 1 , 1 , in );
- Pats_Address[i] = (c1*256)+c2;
- }
-
- /* ordering of patterns addresses */
- /* PatPos contains the size of the pattern list .. */
- /*printf ( "Creating pattern list ... " );*/
- tmp_ptr = 0;
- for ( i=0 ; i<PatPos ; i++ )
- {
- if ( i==0 )
- {
- Pats_Numbers[0] = 0x00;
- tmp_ptr++;
- continue;
- }
-
- for ( j=0 ; j<i ; j++ )
- {
- if ( Pats_Address[i] == Pats_Address[j] )
- {
- Pats_Numbers[i] = Pats_Numbers[j];
- break;
- }
- }
- if ( j == i )
- Pats_Numbers[i] = tmp_ptr++;
- }
-
- Pat_Max = tmp_ptr-1;
-
- /* correct re-order */
- /********************/
- for ( i=0 ; i<c4 ; i++ )
- Pats_Address_tmp[i] = Pats_Address[i];
-
-restart:
- for ( i=0 ; i<c4 ; i++ )
- {
- for ( j=0 ; j<i ; j++ )
- {
- if ( Pats_Address_tmp[i] < Pats_Address_tmp[j] )
- {
- tmp2 = Pats_Numbers[j];
- Pats_Numbers[j] = Pats_Numbers[i];
- Pats_Numbers[i] = tmp2;
- tmp1 = Pats_Address_tmp[j];
- Pats_Address_tmp[j] = Pats_Address_tmp[i];
- Pats_Address_tmp[i] = tmp1;
- goto restart;
- }
- }
- }
-
- j=0;
- for ( i=0 ; i<c4 ; i++ )
- {
- if ( i==0 )
- {
- Pats_Address_tmp2[j] = Pats_Address_tmp[i];
- continue;
- }
-
- if ( Pats_Address_tmp[i] == Pats_Address_tmp2[j] )
- continue;
- Pats_Address_tmp2[++j] = Pats_Address_tmp[i];
- }
-
- for ( c1=0x00 ; c1<c4 ; c1++ )
- {
- for ( c2=0x00 ; c2<c4 ; c2++ )
- if ( Pats_Address[c1] == Pats_Address_tmp2[c2] )
- {
- Pats_Numbers_tmp[c1] = c2;
- }
- }
-
- for ( i=0 ; i<c4 ; i++ )
- Pats_Numbers[i] = Pats_Numbers_tmp[i];
-
- /* write pattern table */
- for ( c1=0x00 ; c1<128 ; c1++ )
- {
- fwrite ( &Pats_Numbers[c1] , 1 , 1 , out );
- }
- /*printf ( "ok\n" );*/
-
- c1 = 'M';
- c2 = '.';
- c3 = 'K';
-
- fwrite ( &c1 , 1 , 1 , out );
- fwrite ( &c2 , 1 , 1 , out );
- fwrite ( &c3 , 1 , 1 , out );
- fwrite ( &c2 , 1 , 1 , out );
-
-
- /* a little pre-calc code ... no other way to deal with these unknown
- pattern data sizes ! :( */
- /* so, first, we get the pattern data size .. */
- fseek ( in , ADDRESS_REF_TABLE , 0 ); /* SEEK_SET */
- fread ( &c1 , 1 , 1 , in );
- fread ( &c2 , 1 , 1 , in );
- fread ( &c3 , 1 , 1 , in );
- fread ( &c4 , 1 , 1 , in );
- j = (c1*256*256*256)+(c2*256*256)+(c3*256)+c4;
- PatDataSize = (8 + j) - PATTERN_DATA;
-/* printf ( "Pattern data size : %ld\n" , PatDataSize );*/
-
- /* go back to pattern data starting address */
- fseek ( in , PATTERN_DATA , 0 ); /* SEEK_SET */
- /* now, reading all pattern data to get the max value of note */
- for ( j=0 ; j<PatDataSize ; j+=2 )
- {
- fread ( &c1 , 1 , 1 , in );
- fread ( &c2 , 1 , 1 , in );
- if ( ((c1*256)+c2) > Ref_Max )
- Ref_Max = (c1*256)+c2;
- }
-/*
- printf ( "* Ref_Max = %d\n" , Ref_Max );
- printf ( "* where : %ld\n" , ftell ( in ) );
-*/
- /* read "reference Table" */
- fseek ( in , ADDRESS_REF_TABLE , 0 ); /* SEEK_SET */
- fread ( &c1 , 1 , 1 , in );
- fread ( &c2 , 1 , 1 , in );
- fread ( &c3 , 1 , 1 , in );
- fread ( &c4 , 1 , 1 , in );
- j = (c1*256*256*256)+(c2*256*256)+(c3*256)+c4;
- fseek ( in , 8+j , 0 ); /* SEEK_SET */
-/* printf ( "address of 'reference table' : %ld\n" , ftell (in ) );*/
- Ref_Max += 1; /* coz 1st value is 0 and will be empty in this table */
- i = Ref_Max * 4; /* coz each block is 4 bytes long */
- ReferenceTable = (Uchar *) malloc ( i );
- BZERO ( ReferenceTable , i );
- fread ( &ReferenceTable[4] , i , 1 , in );
-
- /* go back to pattern data starting address */
- fseek ( in , PATTERN_DATA , 0 ); /* SEEK_SET */
-/* printf ( "Highest pattern number : %d\n" , Pat_Max );*/
-
- /*printf ( "Computing the pattern datas " );*/
- k=0;
- for ( j=0 ; j<=Pat_Max ; j++ )
- {
- for ( i=0 ; i<64 ; i++ )
- {
- /* VOICE #1 */
-
- fread ( &c1 , 1 , 1 , in );
- k += 1;
- fread ( &c2 , 1 , 1 , in );
- k += 1;
- Smp = ReferenceTable[((c1*256)+c2)*4];
- Note = ReferenceTable[((c1*256)+c2)*4+1];
-
- Pattern[j][i*16] = (Smp&0xf0);
- Pattern[j][i*16] |= poss[Note][0];
- Pattern[j][i*16+1] = poss[Note][1];
- Pattern[j][i*16+2] = ReferenceTable[((c1*256)+c2)*4+2];
- Pattern[j][i*16+2] |= ((Smp<<4)&0xf0);
- Pattern[j][i*16+3] = ReferenceTable[((c1*256)+c2)*4+3];
-
- if ( ( (Pattern[j][i*16+2] & 0x0f) == 0x0d ) ||
- ( (Pattern[j][i*16+2] & 0x0f) == 0x0b ) )
- {
- FLAG = ON;
- }
-
- /* VOICE #2 */
-
- fread ( &c1 , 1 , 1 , in );
- k += 1;
- fread ( &c2 , 1 , 1 , in );
- k += 1;
- Smp = ReferenceTable[((c1*256)+c2)*4];
- Note = ReferenceTable[((c1*256)+c2)*4+1];
-
- Pattern[j][i*16+4] = (Smp&0xf0);
- Pattern[j][i*16+4] |= poss[Note][0];
- Pattern[j][i*16+5] = poss[Note][1];
- Pattern[j][i*16+6] = ReferenceTable[((c1*256)+c2)*4+2];
- Pattern[j][i*16+6] |= ((Smp<<4)&0xf0);
- Pattern[j][i*16+7] = ReferenceTable[((c1*256)+c2)*4+3];
-
- if ( ( ( Pattern[j][i*16+6] & 0x0f) == 0x0d ) ||
- ( (Pattern[j][i*16+6] & 0x0f) == 0x0b ) )
- {
- FLAG = ON;
- }
-
- /* VOICE #3 */
-
- fread ( &c1 , 1 , 1 , in );
- k += 1;
- fread ( &c2 , 1 , 1 , in );
- k += 1;
- Smp = ReferenceTable[((c1*256)+c2)*4];
- Note = ReferenceTable[((c1*256)+c2)*4+1];
-
- Pattern[j][i*16+8] = (Smp&0xf0);
- Pattern[j][i*16+8] |= poss[Note][0];
- Pattern[j][i*16+9] = poss[Note][1];
- Pattern[j][i*16+10] = ReferenceTable[((c1*256)+c2)*4+2];
- Pattern[j][i*16+10] |= ((Smp<<4)&0xf0);
- Pattern[j][i*16+11]= ReferenceTable[((c1*256)+c2)*4+3];
-
- if ( ( (Pattern[j][i*16+10] & 0x0f) == 0x0d ) ||
- ( (Pattern[j][i*16+10] & 0x0f) == 0x0b ) )
- {
- FLAG = ON;
- }
-
- /* VOICE #4 */
-
- fread ( &c1 , 1 , 1 , in );
- k += 1;
- fread ( &c2 , 1 , 1 , in );
- k += 1;
- Smp = ReferenceTable[((c1*256)+c2)*4];
- Note = ReferenceTable[((c1*256)+c2)*4+1];
-
- Pattern[j][i*16+12] = (Smp&0xf0);
- Pattern[j][i*16+12] |= poss[Note][0];
- Pattern[j][i*16+13] = poss[Note][1];
- Pattern[j][i*16+14] = ReferenceTable[((c1*256)+c2)*4+2];
- Pattern[j][i*16+14] |= ((Smp<<4)&0xf0);
- Pattern[j][i*16+15]= ReferenceTable[((c1*256)+c2)*4+3];
-
- if ( ( (Pattern[j][i*16+14] & 0x0f) == 0x0d ) ||
- ( (Pattern[j][i*16+14] & 0x0f) == 0x0b ) )
- {
- FLAG = ON;
- }
-
- if ( FLAG == ON )
- {
- FLAG=OFF;
- break;
- }
- }
- fwrite ( Pattern[j] , 1024 , 1 , out );
- /*printf ( "." );*/
- }
- free ( ReferenceTable );
- /*printf ( " ok\n" );*/
-
-
- /* get address of sample data .. and go there */
- /*printf ( "Saving sample datas ... " );*/
- fseek ( in , ADDRESS_SAMPLE_DATA , 0 ); /* SEEK_SET */
- fread ( &c1 , 1 , 1 , in );
- fread ( &c2 , 1 , 1 , in );
- fread ( &c3 , 1 , 1 , in );
- fread ( &c4 , 1 , 1 , in );
- SDAV = (c1*256*256*256)+(c2*256*256)+(c3*256)+c4;
- fseek ( in , 4 + SDAV , 0 ); /* SEEK_SET */
-
-
- /* read and save sample data */
-/* printf ( "out: where before saving sample data : %ld\n" , ftell ( out ) );*/
-/* printf ( "Whole sample size : %ld\n" , Total_Sample_Size );*/
- SampleData = (Uchar *) malloc ( Total_Sample_Size );
- fread ( SampleData , Total_Sample_Size , 1 , in );
- fwrite ( SampleData , Total_Sample_Size , 1 , out );
- free ( SampleData );
- /*printf ( " ok\n" );*/
-
- Crap ( " Promizer 4.0 " , BAD , BAD , out );
- /*
- fseek ( out , 830 , SEEK_SET );
- fprintf ( out , "-[ Converted with ]-" );
- fseek ( out , 860 , SEEK_SET );
- fprintf ( out , "-[ Promizer 4.0 ]-" );
- fseek ( out , 890 , SEEK_SET );
- fprintf ( out , "-[ to Protracker ]-" );
- fseek ( out , 920 , SEEK_SET );
- fprintf ( out , "-[ by Asle /ReDoX ]-" );
- */
- fflush ( in );
- fflush ( out );
- fclose ( in );
- fclose ( out );
-
- printf ( "done\n" );
- return; /* useless ... but */
-}
+++ /dev/null
-/*
- * Polka.c 2003 (c) Asle
- *
-*/
-
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Depack_Polka ( void )
-{
- Uchar poss[37][2];
- Uchar c1=0x00,c2=0x00;
- Uchar Max=0x00;
- long WholeSampleSize=0;
- long i=0,j;
- long Where = PW_Start_Address;
- FILE *out;
- unsigned char Whatever[4];
-
- if ( Save_Status == BAD )
- return;
-
-#ifdef DOS
- #include "..\include\ptktable.h"
-#endif
-
-#ifdef UNIX
- #include "../include/ptktable.h"
-#endif
-
- sprintf ( Depacked_OutName , "%ld.mod" , Cpt_Filename-1 );
- out = mr_fopen ( Depacked_OutName , "w+b" );
- if (!out)
- return;
-
- /* takes care of header */
- fwrite ( &in_data[Where], 20, 1, out );
- for ( i=0 ; i<31 ; i++ )
- {
- fwrite ( &in_data[Where+20+i*30], 18, 1, out );
- c1=0x00;
- fwrite ( &c1, 1, 1, out );fwrite ( &c1, 1, 1, out );
- fwrite ( &c1, 1, 1, out );fwrite ( &c1, 1, 1, out );
- fwrite ( &in_data[Where+42+i*30], 8, 1, out );
- WholeSampleSize += (((in_data[Where+42+i*30]*256)+in_data[Where+43+i*30])*2);
- }
- /*printf ( "Whole sanple size : %ld\n" , WholeSampleSize );*/
-
- /* read and write size of pattern list+ntk byte + pattern list */
- fwrite ( &in_data[Where+0x3b6] , 130 , 1 , out );
-
- /* write ID */
- c1 = 'M';
- c2 = '.';
- fwrite ( &c1 , 1 , 1 , out );
- fwrite ( &c2 , 1 , 1 , out );
- c1 = 'K';
- fwrite ( &c1 , 1 , 1 , out );
- fwrite ( &c2 , 1 , 1 , out );
-
- /* get number of pattern */
- Max = 0x00;
- for ( i=0 ; i<128 ; i++ )
- {
- if ( in_data[Where+i+0x3b8] > Max )
- Max = in_data[Where+i+0x3b8];
- }
- Max += 1;
- /*printf ( "\nNumber of pattern : %ld\n" , j );*/
-
- /* pattern data */
- Where = PW_Start_Address + 0x43c;
- for ( i=0 ; i<Max ; i++ )
- {
- for ( j=0 ; j<256 ; j++ )
- {
- Whatever[0] = in_data[Where+1] & 0xf0;
- Whatever[2] = (in_data[Where+1] & 0x0f)<<4;
- Whatever[2] |= in_data[Where+2];
- Whatever[3] = in_data[Where+3];
- Whatever[0] |= poss[(in_data[Where])/2][0];
- Whatever[1] = poss[(in_data[Where]/2)][1];
- fwrite ( Whatever , 4 , 1 , out );
- Where += 4;
- }
- }
-
- /* sample data */
- fwrite ( &in_data[Where] , WholeSampleSize , 1 , out );
-
-
- /* crap */
- Crap ( " Polka Packer " , BAD , BAD , out );
- /*
- fseek ( out , 830 , SEEK_SET );
- fprintf ( out , " -[Converted with]- " );
- fseek ( out , 860 , SEEK_SET );
- fprintf ( out , " -[Power Music to]- " );
- fseek ( out , 890 , SEEK_SET );
- fprintf ( out , " -[Protracker]- " );
- fseek ( out , 920 , SEEK_SET );
- fprintf ( out , " -[by Asle /ReDoX]- " );
- */
-
- fclose ( out );
-
- printf ( "done\n" );
- return; /* useless ... but */
-}
+++ /dev/null
-/*
- * ProPacker_v1.0 1997 (c) Asle / ReDoX
- *
- * Converts back to ptk ProPacker v1 MODs
- *
- * Update: 28/11/99
- * - removed fopen() and all attached functions.
- * - overall speed and size optimizings.
- * Update: 19/04/00 (all pointed out by Thomas Neumann)
- * - replen bug correction
-*/
-
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Depack_PP10 ( void )
-{
- Uchar Tracks_Numbers[4][128];
- Uchar Pat_Pos;
- Uchar *Whatever;
- short Max;
- long i=0,j=0,k=0;
- long WholeSampleSize=0;
- long Where=PW_Start_Address;
- FILE *out;
-
- if ( Save_Status == BAD )
- return;
-
- BZERO ( Tracks_Numbers , 128*4 );
-
- sprintf ( Depacked_OutName , "%ld.mod" , Cpt_Filename-1 );
- out = mr_fopen ( Depacked_OutName , "w+b" );
- if (!out)
- return;
-
- /* write title */
- Whatever = (Uchar *) malloc (1024);
- BZERO ( Whatever , 1024 );
- fwrite ( Whatever , 20 , 1 , out );
-
- /* read and write sample descriptions */
- for ( i=0 ; i<31 ; i++ )
- {
- /*sample name*/
- fwrite ( Whatever , 22 , 1 , out );
-
- WholeSampleSize += (((in_data[Where]*256)+in_data[Where+1])*2);
- fwrite ( &in_data[Where] , 6 , 1 , out );
-
- Whatever[32] = in_data[Where+6];
- Whatever[33] = in_data[Where+7];
- if ( (in_data[Where+6] == 0x00) && (in_data[Where+7] == 0x00) )
- Whatever[33] = 0x01;
- fwrite ( &Whatever[32] , 2 , 1 , out );
- Where += 8;
- }
- /*printf ( "Whole sample size : %ld\n" , WholeSampleSize );*/
-
- /* read and write pattern table lenght */
- Pat_Pos = in_data[Where++];
- fwrite ( &Pat_Pos , 1 , 1 , out );
- /*printf ( "Size of pattern list : %d\n" , Pat_Pos );*/
-
- /* read and write NoiseTracker byte */
- fwrite ( &in_data[Where++] , 1 , 1 , out );
-
- /* read track list and get highest track number */
- Max = 0;
- for ( j=0 ; j<4 ; j++ )
- {
- for ( i=0 ; i<128 ; i++ )
- {
- Tracks_Numbers[j][i] = in_data[Where++];
- if ( Tracks_Numbers[j][i] > Max )
- Max = Tracks_Numbers[j][i];
- }
- }
- /*printf ( "highest track number : %d\n" , Max+1 );*/
-
- /* write pattern table "as is" ... */
- for (Whatever[0]=0 ; Whatever[0]<Pat_Pos ; Whatever[0]+=0x01 )
- fwrite ( &Whatever[0] , 1 , 1 , out );
- fwrite ( &Whatever[256] , (128-Pat_Pos) , 1 , out );
- /* Where is reassigned later */
-
- /* write ptk's ID */
- Whatever[0] = 'M';
- Whatever[1] = '.';
- Whatever[2] = 'K';
- Whatever[3] = '.';
- fwrite ( Whatever , 4 , 1 , out );
-
- /* track/pattern data */
-
- for ( i=0 ; i<Pat_Pos ; i++ )
- {
-/*fprintf ( info , "\n\n\nPattern %ld :\n" , i );*/
- BZERO ( Whatever , 1024 );
- for ( j=0 ; j<4 ; j++ )
- {
- Where = PW_Start_Address + 762+(Tracks_Numbers[j][i]*256);
-/*fprintf ( info , "Voice %ld :\n" , j );*/
- for ( k=0 ; k<64 ; k++ )
- {
- Whatever[k*16+j*4] = in_data[Where++];
- Whatever[k*16+j*4+1] = in_data[Where++];
- Whatever[k*16+j*4+2] = in_data[Where++];
- Whatever[k*16+j*4+3] = in_data[Where++];
- }
- }
- fwrite ( Whatever , 1024 , 1 , out );
- /*printf ( "+" );*/
- }
- free ( Whatever );
- /*printf ( "\n" );*/
-
-
- /* now, lets put file pointer at the beginning of the sample datas */
- Where = PW_Start_Address + 762 + ((Max+1)*256);
-
- /* sample data */
- fwrite ( &in_data[Where] , WholeSampleSize , 1 , out );
-
- /* crap */
- Crap ( " ProPacker v1.0 " , BAD , BAD , out );
-
- fflush ( out );
- fclose ( out );
-
- printf ( "done\n" );
- return; /* useless ... but */
-}
+++ /dev/null
-/*
- * ProPacker_21.c 1997 (c) Asle / ReDoX
- *
- * Converts PP21 packed MODs back to PTK MODs
- * thanks to Gryzor and his ProWizard tool ! ... without it, this prog
- * would not exist !!!
- *
- * Last revision : 26/11/1999 by Sylvain "Asle" Chipaux
- * reduced to only one FREAD.
- * Speed-up and Binary smaller.
-*/
-
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Depack_PP21 ( void )
-{
- Uchar c1=0x00,c2=0x00;
- short Max=0;
- Uchar Tracks_Numbers[4][128];
- short Tracks_PrePointers[512][64];
- Uchar NOP=0x00; /* number of pattern */
- Uchar *ReferenceTable;
- Uchar *WholeFile;
- Uchar *Whatever;
- long OverallCpt = 0;
- long i=0,j=0;
- long Total_Sample_Size=0;
- FILE *in,*out;
-
- if ( Save_Status == BAD )
- return;
-
- BZERO ( Tracks_Numbers , 4*128 );
- BZERO ( Tracks_PrePointers , 512*128 );
-
- in = fopen ( (char *)OutName_final , "r+b" ); /* +b is safe bcoz OutName's just been saved */
- if (!in)
- return;
- sprintf ( Depacked_OutName , "%ld.mod" , Cpt_Filename-1 );
- out = mr_fopen ( Depacked_OutName , "w+b" );
- if (!out)
- return;
-
- /* get input file size */
- fseek ( in , 0 , 2 );
- i = ftell ( in );
- fseek ( in , 0 , 0 );
-
- /* read but once input file */
- WholeFile = (Uchar *) malloc (i);
- BZERO ( WholeFile , i );
- fread ( WholeFile , i , 1 , in );
- fclose ( in );
-
- Whatever = (Uchar *) malloc (1024);
- BZERO ( Whatever , 1024 );
- /* title */
- fwrite ( Whatever , 20 , 1 , out );
-
- for ( i=0 ; i<31 ; i++ )
- {
- /*sample name*/
- fwrite ( Whatever , 22 , 1 , out );
- /* sample siz */
- Total_Sample_Size += (((WholeFile[OverallCpt]*256)+WholeFile[OverallCpt+1])*2);
- /* siz,fine,vol,lstart,lsize */
- fwrite ( &WholeFile[OverallCpt+0] , 8 , 1 , out );
- OverallCpt += 8;
- }
-
- /* pattern table lenght */
- NOP = WholeFile[OverallCpt];
- fwrite ( &NOP , 1 , 1 , out );
- OverallCpt += 1;
-
- /*printf ( "Number of patterns : %d\n" , NOP );*/
-
- /* NoiseTracker restart byte */
- fwrite ( &WholeFile[OverallCpt] , 1 , 1 , out );
- OverallCpt += 1;
-
- Max = 0;
- for ( j=0 ; j<4 ; j++ )
- {
- for ( i=0 ; i<128 ; i++ )
- {
- Tracks_Numbers[j][i] = WholeFile[OverallCpt];
- OverallCpt += 1;
- if ( Tracks_Numbers[j][i] > Max )
- Max = Tracks_Numbers[j][i];
- }
- }
- /*printf ( "Number of tracks : %d\n" , Max+1 );*/
-
- /* write pattern table without any optimizing ! */
- for ( c1=0x00 ; c1<NOP ; c1++ )
- fwrite ( &c1 , 1 , 1 , out );
- c2 = 0x00;
- for ( ; c1<128 ; c1++ )
- fwrite ( &c2 , 1 , 1 , out );
-
- Whatever[0] = 'M';
- Whatever[1] = '.';
- Whatever[2] = 'K';
- Whatever[3] = '.';
- fwrite ( Whatever , 4 , 1 , out );
-
-
- /* PATTERN DATA code starts here */
-
- /*printf ( "Highest track number : %d\n" , Max );*/
- for ( j=0 ; j<=Max ; j++ )
- {
- for ( i=0 ; i<64 ; i++ )
- {
- Tracks_PrePointers[j][i] = (WholeFile[OverallCpt]*256)+WholeFile[OverallCpt+1];
- OverallCpt += 2;
- }
- }
-
- /* read "reference table" size */
- j = ((WholeFile[OverallCpt]*256*256*256)+
- (WholeFile[OverallCpt+1]*256*256)+
- (WholeFile[OverallCpt+2]*256)+
- WholeFile[OverallCpt+3]);
- OverallCpt += 4;
-
-
- /* read "reference Table" */
- /*printf ( "Reference table location : %ld\n" , OverallCpt );*/
- ReferenceTable = (Uchar *) malloc ( j );
- for ( i=0 ; i<j ; i++,OverallCpt+=1 )
- ReferenceTable[i] = WholeFile[OverallCpt];
-
- /* NOW, the real shit takes place :) */
- for ( i=0 ; i<NOP ; i++ )
- {
- BZERO ( Whatever , 1024 );
- for ( j=0 ; j<64 ; j++ )
- {
-
- Whatever[j*16] = ReferenceTable[Tracks_PrePointers [Tracks_Numbers [0][i]] [j]*4];
- Whatever[j*16+1] = ReferenceTable[Tracks_PrePointers [Tracks_Numbers [0][i]] [j]*4+1];
- Whatever[j*16+2] = ReferenceTable[Tracks_PrePointers [Tracks_Numbers [0][i]] [j]*4+2];
- Whatever[j*16+3] = ReferenceTable[Tracks_PrePointers [Tracks_Numbers [0][i]] [j]*4+3];
-
- Whatever[j*16+4] = ReferenceTable[Tracks_PrePointers [Tracks_Numbers [1][i]] [j]*4];
- Whatever[j*16+5] = ReferenceTable[Tracks_PrePointers [Tracks_Numbers [1][i]] [j]*4+1];
- Whatever[j*16+6] = ReferenceTable[Tracks_PrePointers [Tracks_Numbers [1][i]] [j]*4+2];
- Whatever[j*16+7] = ReferenceTable[Tracks_PrePointers [Tracks_Numbers [1][i]] [j]*4+3];
-
- Whatever[j*16+8] = ReferenceTable[Tracks_PrePointers [Tracks_Numbers [2][i]] [j]*4];
- Whatever[j*16+9] = ReferenceTable[Tracks_PrePointers [Tracks_Numbers [2][i]] [j]*4+1];
- Whatever[j*16+10]= ReferenceTable[Tracks_PrePointers [Tracks_Numbers [2][i]] [j]*4+2];
- Whatever[j*16+11]= ReferenceTable[Tracks_PrePointers [Tracks_Numbers [2][i]] [j]*4+3];
-
- Whatever[j*16+12]= ReferenceTable[Tracks_PrePointers [Tracks_Numbers [3][i]] [j]*4];
- Whatever[j*16+13]= ReferenceTable[Tracks_PrePointers [Tracks_Numbers [3][i]] [j]*4+1];
- Whatever[j*16+14]= ReferenceTable[Tracks_PrePointers [Tracks_Numbers [3][i]] [j]*4+2];
- Whatever[j*16+15]= ReferenceTable[Tracks_PrePointers [Tracks_Numbers [3][i]] [j]*4+3];
-
-
- }
- fwrite ( Whatever , 1024 , 1 , out );
- }
-
- free ( ReferenceTable );
- free ( Whatever );
-
- /* sample data */
- /*printf ( "Total sample size : %ld\n" , Total_Sample_Size );*/
- fwrite ( &WholeFile[OverallCpt] , Total_Sample_Size , 1 , out );
-
- Crap ( " ProPacker v2.1 " , BAD , BAD , out );
- /*
- fseek ( out , 860 , SEEK_SET );
- fprintf ( out , " -[Converted with]- " );
- fseek ( out , 890 , SEEK_SET );
- fprintf ( out , " -[PP21 2 Ptk]- " );
- fseek ( out , 920 , SEEK_SET );
- fprintf ( out , " -[by Asle /ReDoX]- " );
- */
- free ( WholeFile );
- fflush ( out );
- fclose ( out );
-
- printf ( "done\n" );
- return; /* useless ... but */
-}
+++ /dev/null
-/*
- * ProPacker_30.c 1997 (c) Asle / ReDoX
- *
- * Converts PP30 packed MODs back to PTK MODs
- * thanks to Gryzor and his ProWizard tool ! ... without it, this prog
- * would not exist !!!
- *
- * Last revision : 26/11/1999 by Sylvain "Asle" Chipaux
- * reduced to only one FREAD.
- * Speed-up and Binary smaller.
-*/
-
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Depack_PP30 ( void )
-{
- Uchar c1=0x00,c2=0x00;
- short Max=0;
- Uchar Tracks_Numbers[4][128];
- short Tracks_PrePointers[512][64];
- Uchar NOP=0x00; /* number of pattern */
- Uchar *ReferenceTable;
- Uchar *WholeFile;
- Uchar *Whatever;
- long i=0,j=0;
- long Total_Sample_Size=0;
- long OverallCpt=0;
- FILE *in,*out;
-
- if ( Save_Status == BAD )
- return;
-
- BZERO ( Tracks_Numbers , 4*128 );
- BZERO ( Tracks_PrePointers , 512*64 );
-
- in = fopen ( (char *)OutName_final , "r+b" ); /* +b is safe bcoz OutName's just been saved */
- if (!in)
- return;
- sprintf ( Depacked_OutName , "%ld.mod" , Cpt_Filename-1 );
- out = mr_fopen ( Depacked_OutName , "w+b" );
- if (!out)
- return;
-
- /* get input file size */
- fseek ( in , 0 , 2 );
- i = ftell ( in );
- fseek ( in , 0 , 0 );
-
- /* read but once input file */
- WholeFile = (Uchar *) malloc (i);
- BZERO ( WholeFile , i );
- fread ( WholeFile , i , 1 , in );
- fclose ( in );
-
- /* title */
- Whatever = (Uchar *) malloc (1024);
- BZERO ( Whatever , 1024 );
- fwrite ( Whatever , 20 , 1 , out );
-
- for ( i=0 ; i<31 ; i++ )
- {
- /*sample name*/
- fwrite ( Whatever , 22 , 1 , out );
- /* sample siz */
- Total_Sample_Size += (((WholeFile[OverallCpt]*256)+WholeFile[OverallCpt+1])*2);
- /* size,fine,vol,lstart,lsize */
- fwrite ( &WholeFile[OverallCpt+0] , 8 , 1 , out );
- OverallCpt += 8;
- }
-
- /* pattern table lenght */
- NOP = WholeFile[OverallCpt];
- fwrite ( &NOP , 1 , 1 , out );
- OverallCpt += 1;
- /*printf ( "Number of patterns : %d\n" , NOP );*/
-
- /* NoiseTracker restart byte */
- fwrite ( &WholeFile[OverallCpt] , 1 , 1 , out );
- OverallCpt += 1;
-
- Max = 0;
- for ( j=0 ; j<4 ; j++ )
- {
- for ( i=0 ; i<128 ; i++ )
- {
- Tracks_Numbers[j][i] = WholeFile[OverallCpt];
- OverallCpt += 1;
- if ( Tracks_Numbers[j][i] > Max )
- Max = Tracks_Numbers[j][i];
- }
- }
-
- /* write pattern table without any optimizing ! */
- for ( c1=0x00 ; c1<NOP ; c1++ )
- fwrite ( &c1 , 1 , 1 , out );
- c2 = 0x00;
- for ( ; c1<128 ; c1++ )
- fwrite ( &c2 , 1 , 1 , out );
-
- Whatever[0] = 'M';
- Whatever[1] = '.';
- Whatever[2] = 'K';
- Whatever[3] = '.';
- fwrite ( Whatever , 4 , 1 , out );
-
-
- /* PATTERN DATA code starts here */
-
- /*printf ( "Highest track number : %d\n" , Max );*/
- for ( j=0 ; j<=Max ; j++ )
- {
- for ( i=0 ; i<64 ; i++ )
- {
- Tracks_PrePointers[j][i] = ((WholeFile[OverallCpt]*256)+
- WholeFile[OverallCpt+1])/4;
- OverallCpt += 2;
- }
- }
-
- /* read "reference table" size */
- j = ((WholeFile[OverallCpt]*256*256*256)+
- (WholeFile[OverallCpt+1]*256*256)+
- (WholeFile[OverallCpt+2]*256)+
- WholeFile[OverallCpt+3]);
- OverallCpt += 4;
-
-
- /* read "reference Table" */
- ReferenceTable = (Uchar *) malloc ( j );
- for ( i=0 ; i<j ; i++,OverallCpt+=1 )
- ReferenceTable[i] = WholeFile[OverallCpt];
-
- /* NOW, the real shit takes place :) */
- for ( i=0 ; i<NOP ; i++ )
- {
- BZERO ( Whatever , 1024 );
- for ( j=0 ; j<64 ; j++ )
- {
-
- Whatever[j*16] = ReferenceTable[Tracks_PrePointers [Tracks_Numbers [0][i]] [j]*4];
- Whatever[j*16+1] = ReferenceTable[Tracks_PrePointers [Tracks_Numbers [0][i]] [j]*4+1];
- Whatever[j*16+2] = ReferenceTable[Tracks_PrePointers [Tracks_Numbers [0][i]] [j]*4+2];
- Whatever[j*16+3] = ReferenceTable[Tracks_PrePointers [Tracks_Numbers [0][i]] [j]*4+3];
-
- Whatever[j*16+4] = ReferenceTable[Tracks_PrePointers [Tracks_Numbers [1][i]] [j]*4];
- Whatever[j*16+5] = ReferenceTable[Tracks_PrePointers [Tracks_Numbers [1][i]] [j]*4+1];
- Whatever[j*16+6] = ReferenceTable[Tracks_PrePointers [Tracks_Numbers [1][i]] [j]*4+2];
- Whatever[j*16+7] = ReferenceTable[Tracks_PrePointers [Tracks_Numbers [1][i]] [j]*4+3];
-
- Whatever[j*16+8] = ReferenceTable[Tracks_PrePointers [Tracks_Numbers [2][i]] [j]*4];
- Whatever[j*16+9] = ReferenceTable[Tracks_PrePointers [Tracks_Numbers [2][i]] [j]*4+1];
- Whatever[j*16+10]= ReferenceTable[Tracks_PrePointers [Tracks_Numbers [2][i]] [j]*4+2];
- Whatever[j*16+11]= ReferenceTable[Tracks_PrePointers [Tracks_Numbers [2][i]] [j]*4+3];
-
- Whatever[j*16+12]= ReferenceTable[Tracks_PrePointers [Tracks_Numbers [3][i]] [j]*4];
- Whatever[j*16+13]= ReferenceTable[Tracks_PrePointers [Tracks_Numbers [3][i]] [j]*4+1];
- Whatever[j*16+14]= ReferenceTable[Tracks_PrePointers [Tracks_Numbers [3][i]] [j]*4+2];
- Whatever[j*16+15]= ReferenceTable[Tracks_PrePointers [Tracks_Numbers [3][i]] [j]*4+3];
-
-
- }
- fwrite ( Whatever , 1024 , 1 , out );
- }
- free ( ReferenceTable );
- free ( Whatever );
-
-
- /* sample data */
- /*printf ( "Total sample size : %ld\n" , Total_Sample_Size );*/
- fwrite ( &WholeFile[OverallCpt] , Total_Sample_Size , 1 , out );
-
- Crap ( " ProPacker v3.0 " , BAD , BAD , out );
- /*
- fseek ( out , 860 , SEEK_SET );
- fprintf ( out , " -[Converted with]- " );
- fseek ( out , 890 , SEEK_SET );
- fprintf ( out , " -[PP30 2 Ptk]- " );
- fseek ( out , 920 , SEEK_SET );
- fprintf ( out , " -[by Asle /ReDoX]- " );
- */
- free ( WholeFile );
- fflush ( out );
- fclose ( out );
-
- printf ( "done\n" );
- return; /* useless ... but */
-}
+++ /dev/null
-/*
- * ProRunner1.c 1996 (c) Asle / ReDoX
- *
- * Converts MODs converted with Prorunner packer v1.0
- *
- * update:28/11/99
- * - removed fopen() and all similar functions
- * - Speed and Size (1/4) optimizings
-*/
-
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Depack_PRUN1 ( void )
-{
- Uchar *Whatever;
- Uchar poss[37][2];
- Uchar Max=0x00;
- long WholeSampleSize=0;
- long i=0,j=0;
- long Where=PW_Start_Address;
- FILE *out;
-
-#ifdef DOS
- #include "..\include\ptktable.h"
-#endif
-
-#ifdef UNIX
- #include "../include/ptktable.h"
-#endif
-
-
- if ( Save_Status == BAD )
- return;
-
- sprintf ( Depacked_OutName , "%ld.mod" , Cpt_Filename-1 );
- out = mr_fopen ( Depacked_OutName , "w+b" );
- if (!out)
- return;
-
- /* read and write whole header */
- fwrite ( &in_data[Where] , 950 , 1 , out );
-
- /* get whole sample size */
- for ( i=0 ; i<31 ; i++ )
- {
- WholeSampleSize += (((in_data[Where+42+i*30]*256)+in_data[Where+43+i*30])*2);
- }
- /*printf ( "Whole sanple size : %ld\n" , WholeSampleSize );*/
-
- /* read and write size of pattern list */
- /* read and write ntk byte and pattern list */
- fwrite ( &in_data[Where+950] , 130 , 1 , out );
- Where += 952;
-
- /* write ID */
- Whatever = (Uchar *) malloc (4);
- Whatever[0] = 'M';
- Whatever[1] = '.';
- Whatever[2] = 'K';
- Whatever[3] = '.';
- fwrite ( Whatever , 4 , 1 , out );
-
- /* get number of pattern */
- Max = 0x00;
- for ( i=0 ; i<128 ; i++ )
- {
- if ( in_data[Where+i] > Max )
- Max = in_data[Where+i];
- }
- /*printf ( "Number of pattern : %d\n" , Max );*/
-
- /* pattern data */
- Where = PW_Start_Address + 1084;
- for ( i=0 ; i<=Max ; i++ )
- {
- for ( j=0 ; j<256 ; j++ )
- {
- Whatever[0] = in_data[Where] & 0xf0;
- Whatever[2] = (in_data[Where] & 0x0f)<<4;
- Whatever[2] |= in_data[Where+2];
- Whatever[3] = in_data[Where+3];
- Whatever[0] |= poss[in_data[Where+1]][0];
- Whatever[1] = poss[in_data[Where+1]][1];
- fwrite ( Whatever , 4 , 1 , out );
- Where += 4;
- }
- }
- free ( Whatever );
-
-
- /* sample data */
- fwrite ( &in_data[Where] , WholeSampleSize , 1 , out );
-
-
- /* crap */
- Crap ( " ProRunner v1 " , BAD , BAD , out );
-
- fflush ( out );
- fclose ( out );
-
- printf ( "done\n" );
- return; /* useless ... but */
-}
-
+++ /dev/null
-/*
- * ProRunner2.c 1996-1999 (c) Asle / ReDoX
- *
- * Converts ProRunner v2 packed MODs back to Protracker
- ********************************************************
- * 12 april 1999 : Update
- * - no more open() of input file ... so no more fread() !.
- * It speeds-up the process quite a bit :).
- *
- * 28 Nov 1999 : Update
- * - optimized code for size and speed (again :)
- * Heh, 1/5 shorter now !.
- *
- * 23 aug 2001 : debug
- * - "repeat last note used bug" pointed out by Markus Jaegermeister !.
- * thanks !.
-*/
-
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-
-void Depack_PRUN2 ( void )
-{
- Uchar poss[37][2];
- Uchar Voices[4][4];
- Uchar *Whatever;
- long WholeSampleSize=0;
- long i=0,j=0;
- long Where=PW_Start_Address; /* main pointer to prevent fread() */
- FILE *out;
-
-#ifdef DOS
- #include "..\include\ptktable.h"
-#endif
-
-#ifdef UNIX
- #include "../include/ptktable.h"
-#endif
-
- if ( Save_Status == BAD )
- return;
-
- sprintf ( Depacked_OutName , "%ld.mod" , Cpt_Filename-1 );
- out = mr_fopen ( Depacked_OutName , "w+b" );
- if (!out)
- return;
-
- Whatever = (Uchar *) malloc (1024);
- BZERO (Whatever , 1024);
- /* title */
- fwrite ( Whatever , 20 , 1 , out );
-
- Where += 8;
-
- for ( i=0 ; i<31 ; i++ )
- {
- /*sample name*/
- fwrite ( Whatever , 22 , 1 , out );
- /* size */
- WholeSampleSize += (((in_data[Where]*256)+in_data[Where+1])*2);
- fwrite ( &in_data[Where] , 8 , 1 , out );
- Where += 8;
- }
- /*printf ( "Whole sample size : %ld\n" , WholeSampleSize );*/
-
- fwrite ( &in_data[Where] , 1 , 1 , out );
- Where += 1;
-
- /* noisetracker byte */
- fwrite ( &in_data[Where] , 1 , 1 , out );
- Where += 1;
-
- Whatever[256] = 0x00;
- for ( i=0 ; i<128 ; i++ )
- {
- fwrite ( &in_data[Where] , 1 , 1 , out );
- Whatever[256] = ( in_data[Where] > Whatever[256] ) ? in_data[Where] : Whatever[256];
- Where += 1;
- }
- /*printf ( "Number of pattern : %d\n" , Whatever[256] );*/
-
- Whatever[0] = 'M';
- Whatever[1] = '.';
- Whatever[2] = 'K';
- Whatever[3] = '.';
- fwrite ( Whatever , 4 , 1 , out );
-
- /* pattern data stuff */
- Where = PW_Start_Address + 770;
- for ( i=0 ; i<=Whatever[256] ; i++ )
- {
- for ( j=0 ; j<256 ; j++ )
- {
- Whatever[0] = in_data[Where++];
- Whatever[100]=Whatever[101]=Whatever[102]=Whatever[103]=0x00;
- if ( Whatever[0] == 0x80 )
- {
- fwrite ( &Whatever[100] , 4 , 1 , out );
- }
- else if ( Whatever[0] == 0xC0 )
- {
- fwrite ( Voices[j%4] , 4 , 1 , out );
- }
- else if ( Whatever[0] != 0xC0 )
- {
- Whatever[1] = in_data[Where++];
- Whatever[2] = in_data[Where++];
-
- Whatever[100] = (Whatever[1]&0x80)>>3;
- Whatever[100] |= poss[(Whatever[0]>>1)][0];
- Whatever[101] = poss[(Whatever[0]>>1)][1];
- Whatever[102] = (Whatever[1]&0x70) << 1;
- Whatever[102] |= (Whatever[0]&0x01)<<4;
- Whatever[102] |= (Whatever[1]&0x0f);
- Whatever[103] = Whatever[2];
-
- fwrite ( &Whatever[100] , 4 , 1 , out );
-
- /* rol previous values */
- Voices[j%4][0] = Whatever[100];
- Voices[j%4][1] = Whatever[101];
- Voices[j%4][2] = Whatever[102];
- Voices[j%4][3] = Whatever[103];
- }
- }
- }
- free ( Whatever );
-
-
- /* sample data */
- fwrite ( &in_data[Where] , WholeSampleSize , 1 , out );
-
-
- /* crap */
- Crap ( " ProRunner v2 " , BAD , BAD , out );
- /*
- fseek ( out , 830 , SEEK_SET );
- fprintf ( out , " -[Converted with]- " );
- fseek ( out , 860 , SEEK_SET );
- fprintf ( out , " -[Prorunner2 to ]- " );
- fseek ( out , 890 , SEEK_SET );
- fprintf ( out , " -[ProTracker]- " );
- fseek ( out , 920 , SEEK_SET );
- fprintf ( out , " -[by Asle /ReDoX]- " );
- */
- fflush ( out );
- fclose ( out );
-
- printf ( "done\n" );
- return; /* useless ... but */
-}
-
+++ /dev/null
-/*
- * QuadraComposer.c 1999 (c) Asle / ReDoX
- *
- * Converts QC MODs back to PTK MODs
- *
-*/
-
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Depack_QuadraComposer ( void )
-{
- Uchar c1=0x00,c2=0x00,c3=0x00,c4=0x00,c5=0x00;
- Uchar Pat_Pos;
- Uchar Pat_Max=0x00;
- Uchar Real_Pat_Max=0x00;
- Uchar *Whatever;
- /*Uchar Row[16];*/
- Uchar Pattern[1024];
- Uchar NbrSample=0x00;
- Uchar RealNbrSample=0x00;
- Uchar NbrRow[128];
- Uchar poss[37][2]; /* <------ Ptk's pitch table */
- long SmpAddresses[32];
- long SmpSizes[32];
- long PatAddresses[128];
- long i=0,j=0,k=0;
- long Where = PW_Start_Address;
- FILE *out;
-
- if ( Save_Status == BAD )
- return;
-
-#ifdef DOS
- #include "..\include\ptktable.h"
-#endif
-
-#ifdef UNIX
- #include "../include/ptktable.h"
-#endif
-
- sprintf ( Depacked_OutName , "%ld.mod" , Cpt_Filename-1 );
- out = mr_fopen ( Depacked_OutName , "w+b" );
- if (!out)
- return;
-
-
- BZERO ( SmpAddresses , 32*4 );
- BZERO ( SmpSizes , 32*4 );
- BZERO ( PatAddresses , 128*4 );
- BZERO ( NbrRow , 128 );
-
- /* bypass ID's and chunk sizes */
- Where += 22;
- /*fseek ( in , 22 , 0 );*/
-
- /* read and write title */
- fwrite ( &in_data[Where], 20, 1, out );
- /*for ( i=0 ; i<20 ; i++ )
- {
- fread ( &c1 , 1 , 1 , in );
- fwrite ( &c1 , 1 , 1 , out );
- }*/
-
- /* bypass composer and tempo */
- Where += 41; /* + title */
- /*fseek ( in , 21 , 1 );*/
-
- /* read number of samples */
- NbrSample = in_data[Where];
- Where += 1;
- /*fread ( &NbrSample , 1 , 1 , in );*/
-
- /* write empty 930 sample header */
- Whatever = (Uchar *) malloc ( 1024 );
- BZERO ( Whatever , 1024 );
- Whatever[29] = 0x01;
- for ( i=0 ; i<31 ; i++ )
- fwrite ( &Whatever[0],30,1,out);
-
- /* read and write sample descriptions */
-/*printf ( "sample number:" );*/
- for ( i=0 ; i<NbrSample ; i++ )
- {
- fseek ( out ,20+(in_data[Where]-1)*30 , 0 );
- /* read sample number byte */
- if ( in_data[Where] > RealNbrSample )
- RealNbrSample = in_data[Where];
-
- /* read/write sample name */
- fwrite ( &in_data[Where+4],20,1,out );
- fwrite ( Whatever,2,1,out ); /* filling */
-
- /* write size */
- fwrite ( &in_data[Where+2] , 2 , 1 , out );
- /* store size */
- SmpSizes[in_data[Where]] = (((in_data[Where+2]*256)+in_data[Where+3])*2);
-
- /* finetune */
- fwrite ( &in_data[Where+25], 1, 1, out );
-
- /* write volume */
- fwrite ( &in_data[Where+1] , 1 , 1 , out );
-
- /* loops (start & len) */
- fwrite ( &in_data[Where+26],2,1,out);
- if ( (in_data[Where+28] != 0x00) || (in_data[Where+29] != 0x00) )
- fwrite ( &in_data[Where+28],2,1,out);
- else
- fwrite ( &Whatever[28],2,1,out);
-
- /* read address of this sample in the file */
- SmpAddresses[in_data[Where]] =( (in_data[Where+30]*256*256*256) +
- (in_data[Where+31]*256*256) +
- (in_data[Where+32]*256) +
- (in_data[Where+33]) );
- Where += 34;
- }
-/*printf ( "\n" );*/
- fseek ( out , 0 , 2 );
-
-
- /* patterns now */
- /* bypass "pad" ?!? */
- /*fread ( &c1 , 1 , 1 , in );*/
- if ( in_data[Where] == 0x00 )
- /*fseek ( in , -1 , 1 );*/
- Where += 1;
-
- /* read number of pattern */
- Pat_Max = in_data[Where++];
- /*fread ( &Pat_Max , 1 , 1 , in );*/
-/* printf ( "\nPat_Max : %d (at %x)\n" , Pat_Max , ftell ( in ) );*/
-
- /* read patterns info */
-/*printf ( "pattern numbers:" );*/
- for ( i=0 ; i<Pat_Max ; i++ )
- {
- /* read pattern number */
- c5 = in_data[Where++];
- /*fread ( &c5 , 1 , 1 , in );*/
-/*printf ("%d," , c5);*/
- /* read number of rows for each pattern */
- NbrRow[c5] = in_data[Where++];
- /*fread ( &NbrRow[c5] , 1 , 1 , in );*/
-
- /* bypass pattern name */
- Where += 20;
- /*fseek ( in , 20 , 1 );*/
-
- /* read pattern address */
- /*fread ( &c1 , 1 , 1 , in );
- fread ( &c2 , 1 , 1 , in );
- fread ( &c3 , 1 , 1 , in );
- fread ( &c4 , 1 , 1 , in );*/
- PatAddresses[c5] = ( (in_data[Where]*256*256*256) +
- (in_data[Where+1]*256*256) +
- (in_data[Where+2]*256) +
- (in_data[Where+3]) );
- Where += 4;
- }
-/*printf ("\n");*/
-
-
- /* pattern list */
- /* bypass "pad" ?!? */
- /*fread ( &c1 , 1 , 1 , in );*/
- if ( in_data[Where] == 0x00 )
- /*fseek ( in , -1 , 1 );*/
- Where += 1;
-
- /* read/write number of position */
- Pat_Pos = in_data[Where++];
- /*fread ( &Pat_Pos , 1 , 1 , in );*/
- fwrite ( &Pat_Pos , 1 , 1 , out );
-
- /* write noisetracker byte */
- c1 = 0x7f;
- fwrite ( &c1 , 1 , 1 , out );
-
- /* read/write pattern list */
- for ( i=0 ; i<Pat_Pos ; i++ )
- {
- /*fread ( &c1 , 1 , 1 , in );
- fwrite ( &c1 , 1 , 1 , out );*/
- fwrite ( &in_data[Where],1,1,out);
- if ( in_data[Where] > Real_Pat_Max )
- Real_Pat_Max = in_data[Where];
- Where += 1;
- }
-/*printf ( "Real_Pat_Max : %d\n" , Real_Pat_Max );*/
- /* fill up to 128 */
- BZERO (Whatever,930);
- fwrite ( Whatever , 128 , 1 , out );
-
- /* write ptk's ID */
- c1 = 'M';
- c2 = '.';
- c3 = 'K';
- fwrite ( &c1 , 1 , 1 , out );
- fwrite ( &c2 , 1 , 1 , out );
- fwrite ( &c3 , 1 , 1 , out );
- fwrite ( &c2 , 1 , 1 , out );
-
-
- /* pattern data */
-/*printf ( "patterns('-'=empty):" );*/
- for ( i=0 ; i<=Real_Pat_Max ; i++ )
- {
- BZERO ( Pattern , 1024 );
- if ( PatAddresses[i] == 0l )
- {
-/*printf ( "-(%d)" , NbrRow[i] );*/
- fwrite ( Pattern , 1024 , 1 , out );
- /* printf ( "-" );*/
- continue;
- }
-/*printf ( "#" );*/
- Where = PW_Start_Address + PatAddresses[i];
- /*fseek ( in , PatAddresses[i] , 0 );*/
- for ( j=0 ; j<=NbrRow[i] ; j++ )
- {
- /*BZERO ( Row , 16 );*/
- /*fread ( Row , 16 , 1 , in );*/
- for ( k=0 ; k<4 ; k++ )
- {
- /* Fx */
- /*Pattern[j*16+k*4+2] = Row[k*4+2];*/
- Pattern[j*16+k*4+2] = in_data[Where+k*4+2];
-
- /* Fx args */
- switch ( Pattern[j*16+k*4+2] )
- {
- case 0x09:
- /*printf ( "#" );*/
- /*Pattern[j*16+k*4+3] = (Row[k*4+3]*2);*/
- Pattern[j*16+k*4+3] = (in_data[Where+k*4+3]*2);
- break;
- case 0x0b:
- /*printf ( "!" );*/
- /*c4 = Row[k*4+3]%10;
- c3 = Row[k*4+3]/10;*/
- c4 = in_data[Where+k*4+3]%10;
- c3 = in_data[Where+k*4+3]/10;
- Pattern[j*16+k*4+3] = 16;
- Pattern[j*16+k*4+3] *= c3;
- Pattern[j*16+k*4+3] += c4;
- break;
- case 0x0E:
- /*if ( (Row[k*4+3]&0xf0) == 0xf0 )*/
- if ( (in_data[Where+k*4+3]&0xf0) == 0xf0 )
- /*Pattern[j*16+k*4+3] = (Row[k*4+3]-0x10);*/
- Pattern[j*16+k*4+3] = (in_data[Where+k*4+3]-0x10);
- break;
- default:
- /*Pattern[j*16+k*4+3] = Row[k*4+3];*/
- Pattern[j*16+k*4+3] = in_data[Where+k*4+3];
- }
-
- /* smp nbr (4 lower bits) */
- /*Pattern[j*16+k*4+2] |= ((Row[k*4]<<4)&0xf0);*/
- Pattern[j*16+k*4+2] |= ((in_data[Where+k*4]<<4)&0xf0);
- /* notes */
- /*c1 = Row[k*4+1];*/
- c1 = in_data[Where+k*4+1];
- if ( c1 != 0xff )
- {
- Pattern[j*16+k*4] = poss[c1][0];
- Pattern[j*16+k*4+1] = poss[c1][1];
- }
- /* smp nbr (4 higher bits) */
- /*Pattern[j*16+k*4] |= (Row[k*4]&0xf0);*/
- Pattern[j*16+k*4] |= (in_data[Where+k*4]&0xf0);
- }
- Where += 16;
- }
- fwrite ( Pattern , 1024 , 1 , out );
- }
-
- /* sample data */
-/*printf ( "\nsamples('-'=empty):" );*/
- for ( i=1 ; i<=RealNbrSample ; i++ )
- {
- if ( SmpSizes[i] == 0 )
- {
-/*printf ( "-(%ld)" , SmpSizes[i] );*/
- continue;
- }
-/*printf ( "#" );*/
- Where = PW_Start_Address + SmpAddresses[i];
- /*fseek ( in , SmpAddresses[i] , 0 );*/
- /*Whatever = (Uchar *) malloc ( SmpSizes[i] );*/
- /*fread ( Whatever , SmpSizes[i] , 1 , in );*/
- /*fwrite ( Whatever , SmpSizes[i] , 1 , out );*/
- fwrite ( &in_data[Where] , SmpSizes[i] , 1 , out );
- /* free ( Whatever );*/
- }
-/*printf ( "\n" );*/
-
-
-/* printf ( "\nwhere: %ld\n" , ftell ( in ) );*/
-
-
- /* crap */
- Crap ( " Quadra Composer " , BAD , BAD , out );
-
-
- fflush ( out );
- fclose ( out );
-
- printf ( "done\n" );
- return; /* useless ... but */
-}
+++ /dev/null
-/*
- * Skyt_Packer.c 1997 (c) Asle / ReDoX
- *
- * Converts back to ptk SKYT packed MODs
- ********************************************************
- * 13 april 1999 : Update
- * - no more open() of input file ... so no more fread() !.
- * It speeds-up the process quite a bit :).
- * 28 Nov 1999 : Update
- * - Speed & Size optimizings
- * 19 Apr 2000 : Update
- * - address of samples data bug correction
- * (thx to Thomas Neumann)
- * 29 Nov 2003 : Update
- * - another bug removed :(.
-*/
-
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Depack_SKYT ( void )
-{
- Uchar Pat_Pos;
- Uchar *Whatever;
- Uchar poss[37][2];
- long i=0,j=0,k=0;
- long Total_Sample_Size=0;
- long Track_Values[128][4];
- long Track_Address;
- long Where=PW_Start_Address; /* main pointer to prevent fread() */
- long Highest_Track = 0;
- FILE *out;
-
-#ifdef DOS
- #include "..\include\ptktable.h"
-#endif
-
-#ifdef UNIX
- #include "../include/ptktable.h"
-#endif
-
- if ( Save_Status == BAD )
- return;
-
- BZERO ( Track_Values , 128*16 );
-
- sprintf ( Depacked_OutName , "%ld.mod" , Cpt_Filename-1 );
- out = mr_fopen ( Depacked_OutName , "w+b" );
- if (!out)
- return;
-
- /* write title */
- Whatever = (Uchar *) malloc (1024);
- BZERO ( Whatever , 1024 );
- /* title */
- fwrite ( Whatever , 20 , 1 , out );
-
- /* read and write sample descriptions */
- for ( i=0 ; i<31 ; i++ )
- {
- /*sample name*/
- fwrite ( Whatever , 22 , 1 , out );
- Total_Sample_Size += (((in_data[Where]*256)+in_data[Where+1])*2);
- /* write Size,Fine,Vol & Loop start */
- fwrite ( &in_data[Where] , 6 , 1 , out );
- /* loop size */
- Whatever[32] = in_data[Where+7];
- if ( (in_data[Where+6] == 0x00) && (in_data[Where+7] == 0x00) )
- Whatever[32] = 0x01;
- fwrite ( &in_data[Where+6] , 1 , 1 , out );
- fwrite ( &Whatever[32] , 1 , 1 , out );
- Where += 8;
- }
- /*printf ( "Whole sample size : %ld\n" , Total_Sample_Size );*/
-
- /* bypass 8 empty bytes and bypass "SKYT" ID*/
- Where = PW_Start_Address + 260;
-
- /* pattern table lenght */
- Pat_Pos = in_data[Where]+1;
- Where += 1;
- fwrite ( &Pat_Pos , 1 , 1 , out );
- /*printf ( "Size of pattern list : %d\n" , Pat_Pos );*/
-
- /* write NoiseTracker byte */
- Whatever[32] = 0x7f;
- fwrite ( &Whatever[32] , 1 , 1 , out );
-
- /* read track numbers ... and deduce pattern list */
- for ( i=0 ; i<Pat_Pos ; i++ )
- {
- for ( j=0 ; j<4 ; j++ )
- {
- Track_Values[i][j] = in_data[Where+1];
- if ( Track_Values[i][j] > Highest_Track )
- Highest_Track = Track_Values[i][j];
- Where += 2;
- }
- }
- /*printf ( "\nHighest track : %ld\n", Highest_Track );*/
-
- /* write pseudo pattern list */
- for ( Whatever[0]=0x00 ; Whatever[0]<Pat_Pos ; Whatever[0]+=0x01 )
- {
- fwrite ( &Whatever[0] , 1 , 1 , out );
- }
- Whatever[1] = 0x00;
- while ( Whatever[0] != 128 )
- {
- fwrite ( &Whatever[1] , 1 , 1 , out );
- Whatever[0] += 0x01;
- }
-
- /* write ptk's ID */
- Whatever[0] = 'M';
- Whatever[1] = '.';
- Whatever[2] = 'K';
- Whatever[3] = '.';
- fwrite ( Whatever , 4 , 1 , out );
-
- /* bypass $00 unknown byte */
- /*Where += 1;*/
-
- /* get track address */
- Where = PW_Start_Address + 261 + (Pat_Pos*8) + 1;
- Track_Address = Where;
- /*printf ("Track_Address : %ld\n",Track_Address);*/
-
-
- /* track data */
- for ( i=0 ; i<Pat_Pos ; i++ )
- {
- BZERO ( Whatever , 1024 );
- for ( j=0 ; j<4 ; j++ )
- {
- /*Where = PW_Start_Address + Track_Address + (Track_Values[i][j]-1)*256;*/
- Where = Track_Address + (Track_Values[i][j]-1)*256;
- for ( k=0 ; k<64 ; k++ )
- {
- Whatever[k*16+j*4] = in_data[Where+1]&0xf0;
- Whatever[k*16+j*4] |= poss[in_data[Where]][0];
- Whatever[k*16+j*4+1] = poss[in_data[Where]][1];
- Whatever[k*16+j*4+2] = (in_data[Where+1]<<4)&0xf0;
- Whatever[k*16+j*4+2] |= in_data[Where+2];
- Whatever[k*16+j*4+3] = in_data[Where+3];
- Where += 4;
- }
- }
- fwrite ( Whatever , 1024 , 1 , out );
- /*printf ( "+" );*/
- }
- free ( Whatever );
- /*printf ( "\n" );*/
-
- /* sample data */
- Where = Track_Address + Highest_Track*256;
- fwrite ( &in_data[Where] , Total_Sample_Size , 1 , out );
-
- /* crap */
- Crap ( " SKYT Packer " , BAD , BAD , out );
-
- fflush ( out );
- fclose ( out );
-
- printf ( "done\n" );
- return; /* useless ... but */
-}
+++ /dev/null
-/*
- * SoundFX.c 1999 (c) Sylvain "Asle" Chipaux
- *
- * Depacks musics in the SoundFX format and saves in ptk.
- *
-*/
-
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-
-void Depack_SoundFX13 ( void )
-{
- Uchar *Whatever;
- Uchar c0=0x00,c1=0x00,c2=0x00,c3=0x00;
- Uchar Max=0x00;
- Uchar PatPos;
- long WholeSampleSize=0;
- long i=0,j=0;
- FILE *in,*out;
-
- if ( Save_Status == BAD )
- return;
-
- in = fopen ( (char *)OutName_final , "r+b" ); /* +b is safe bcoz OutName's just been saved */
- if (!in)
- return;
- sprintf ( Depacked_OutName , "%ld.mod" , Cpt_Filename-1 );
- out = mr_fopen ( Depacked_OutName , "w+b" );
- if (!out)
- return;
-
- /* title */
- Whatever = (Uchar *) malloc ( 20 );
- BZERO ( Whatever , 20 );
- fwrite ( Whatever , 20 , 1 , out );
- free ( Whatever );
-
- /* read and write whole header */
- for ( i=0 ; i<15 ; i++ )
- {
- fseek ( in , 0x50 + i*30 , 0 );
- /* write name */
- for ( j=0 ; j<22 ; j++ )
- {
- fread ( &c1 , 1 , 1 , in );
- fwrite ( &c1 , 1 , 1 , out );
- }
- /* size */
- fseek ( in , i*4 + 1 , 0 );
- fread ( &c0 , 1 , 1 , in );
- fread ( &c1 , 1 , 1 , in );
- fread ( &c2 , 1 , 1 , in );
- c2 /= 2;
- c3 = c1/2;
- if ( (c3*2) != c1 )
- c2 += 0x80;
- if (c0 != 0x00)
- c3 += 0x80;
- fseek ( in , 0x50 + i*30 + 24 , 0 );
- fwrite ( &c3 , 1 , 1 , out );
- fwrite ( &c2 , 1 , 1 , out );
- WholeSampleSize += (((c3*256)+c2)*2);
- /* finetune */
- fread ( &c1 , 1 , 1 , in );
- fwrite ( &c1 , 1 , 1 , out );
- /* volume */
- fread ( &c1 , 1 , 1 , in );
- fwrite ( &c1 , 1 , 1 , out );
- /* loop start */
- fread ( &c1 , 1 , 1 , in );
- fread ( &c2 , 1 , 1 , in );
- c2 /= 2;
- c3 = c1/2;
- if ( (c3*2) != c1 )
- c2 += 0x80;
- fwrite ( &c3 , 1 , 1 , out );
- fwrite ( &c2 , 1 , 1 , out );
- /* loop size */
- fread ( &c1 , 1 , 1 , in );
- fread ( &c2 , 1 , 1 , in );
- fwrite ( &c1 , 1 , 1 , out );
- fwrite ( &c2 , 1 , 1 , out );
- }
- free ( Whatever );
- Whatever = (Uchar *) malloc ( 30 );
- BZERO ( Whatever , 30 );
- Whatever[29] = 0x01;
- for ( i=0 ; i<16 ; i++ )
- fwrite ( Whatever , 30 , 1 , out );
- free ( Whatever );
-
- /* pattern list size */
- fread ( &PatPos , 1 , 1 , in );
- fwrite ( &PatPos , 1 , 1 , out );
-
- /* ntk byte */
- fseek ( in , 1 , 1 );
- c1 = 0x7f;
- fwrite ( &c1 , 1 , 1 , out );
-
- /* read and write pattern list */
- Max = 0x00;
- for ( i=0 ; i<PatPos ; i++ )
- {
- fread ( &c1 , 1 , 1 , in );
- fwrite ( &c1 , 1 , 1 , out );
- if ( c1 > Max )
- Max = c1;
- }
- c1 = 0x00;
- while ( i != 128 )
- {
- fwrite ( &c1 , 1 , 1 , out );
- i+=1;
- }
-
- /* write ID */
- c1 = 'M';
- c2 = '.';
- c3 = 'K';
- fwrite ( &c1 , 1 , 1 , out );
- fwrite ( &c2 , 1 , 1 , out );
- fwrite ( &c3 , 1 , 1 , out );
- fwrite ( &c2 , 1 , 1 , out );
-
-
- /* pattern data */
- fseek ( in , 0x294 , 0 );
- Whatever = (Uchar *) malloc ( 1024 );
- for ( i=0 ; i<=Max ; i++ )
- {
- BZERO ( Whatever , 1024 );
- fread ( Whatever , 1024 , 1 , in );
- for ( j=0 ; j<256 ; j++ )
- {
- if ( Whatever[(j*4)] == 0xff )
- {
- if ( Whatever[(j*4)+1] != 0xfe )
- printf ( "Volume unknown : (at:%ld) (fx:%x,%x,%x,%x)\n" , ftell (in)
- , Whatever[(j*4)]
- , Whatever[(j*4)+1]
- , Whatever[(j*4)+2]
- , Whatever[(j*4)+3] );
- Whatever[(j*4)] = 0x00;
- Whatever[(j*4)+1] = 0x00;
- Whatever[(j*4)+2] = 0x0C;
- Whatever[(j*4)+3] = 0x00;
- continue;
- }
- switch ( Whatever[(j*4)+2]&0x0f )
- {
- case 1: /* arpeggio */
- Whatever[(j*4)+2] &= 0xF0;
- break;
- case 7: /* slide up */
- case 8: /* slide down */
- Whatever[(j*4)+2] -= 0x06;
- break;
- case 3: /* empty ... same as followings ... but far too much to "printf" it */
- case 6: /* and Noiseconverter puts 00 instead ... */
- Whatever[(j*4)+2] &= 0xF0;
- Whatever[(j*4)+3] = 0x00;
- break;
- case 2:
- case 4:
- case 5:
- case 9:
- case 0x0a:
- case 0x0b:
- case 0x0c:
- case 0x0d:
- case 0x0e:
- case 0x0f:
- printf ( "unsupported effect : (at:%ld) (fx:%d)\n" , ftell (in) , Whatever[(j*4)+2]&0x0f );
- Whatever[(j*4)+2] &= 0xF0;
- Whatever[(j*4)+3] = 0x00;
- break;
- default:
- break;
- }
- }
- fwrite ( Whatever , 1024 , 1 , out );
- fflush ( stdout );
- }
- free ( Whatever );
- fflush ( stdout );
-
-
- /* sample data */
- Whatever = (Uchar *) malloc ( WholeSampleSize );
- BZERO ( Whatever , WholeSampleSize );
- fread ( Whatever , WholeSampleSize , 1 , in );
- fwrite ( Whatever , WholeSampleSize , 1 , out );
- free ( Whatever );
- fflush ( stdout );
-
-
- /* crap */
- Crap ( " Sound FX " , BAD , BAD , out );
-
- fflush ( in );
- fflush ( out );
- fclose ( in );
- fclose ( out );
-
- printf ( "done\n"
- " WARNING: This is only an under development converter !\n"
- " output could sound strange...\n" );
- return; /* useless ... but */
-
-}
+++ /dev/null
-/*
- * StarTrekker _Packer.c 1997 (c) Asle / ReDoX
- *
- * Converts back to ptk StarTrekker packed MODs
- *
-*/
-
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-
-void Depack_STARPACK ( void )
-{
- Uchar c1=0x00,c2=0x00;
- Uchar Pat_Pos;
- Uchar *Whatever;
- Uchar *Pattern;
- long i=0,j=0,k=0;
- long Total_Sample_Size=0;
- long Pats_Address[128];
- long Read_Pats_Address[128];
- long SampleDataAddress=0;
- long Where = PW_Start_Address;
- long MaxPatAddy=0;
- FILE /**in,*/*out;
-
- if ( Save_Status == BAD )
- return;
-
- BZERO ( Pats_Address , 128*4 );
-
- /*in = fopen ( OutName_final , "r+b" );*/ /* +b is safe bcoz OutName's just been saved */
- sprintf ( Depacked_OutName , "%ld.mod" , Cpt_Filename-1 );
- out = mr_fopen ( Depacked_OutName , "w+b" );
- if (!out)
- return;
-
-
- Whatever = (Uchar *) malloc (1024);
- BZERO (Whatever, 1024);
-
- /* read and write title */
- fwrite (&in_data[Where], 20, 1, out );
- Where += 20;
-
- /* read and write sample descriptions */
- for ( i=0 ; i<31 ; i++ )
- {
- fwrite ( &Whatever[0], 22, 1, out );
- /*sample name*/
-
- Total_Sample_Size += (((in_data[Where+i*8]*256)+in_data[Where+1+i*8])*2);
- fwrite ( &in_data[Where+i*8], 8, 1, out );
- }
- /*printf ( "Whole sample size : %ld\n" , Total_Sample_Size );*/
- Where = PW_Start_Address + 268;
-
- /* read size of pattern table */
- Pat_Pos = ((in_data[Where]*256)+in_data[Where+1])/4;
- Where += 4;
- fwrite ( &Pat_Pos, 1, 1, out );
- /*printf ( "Size of pattern table : %d\n" , Pat_Pos );*/
- /* bypass $0000 unknown bytes */
-
-/***********/
-
- for ( i=0 ; i<128 ; i++ )
- {
- Pats_Address[i] = (in_data[Where]*256*256*256)+(in_data[Where+1]*256*256)+(in_data[Where+2]*256)+in_data[Where+3];
- Where+=4;
- if ( Pats_Address[i] > MaxPatAddy )
- MaxPatAddy = Pats_Address[i];
- }
-
-
- /* write noisetracker byte */
- c1 = 0x7f;
- fwrite ( &c1 , 1 , 1 , out );
-
-/***********/
-
-
- /* read sample data address */
- Where = PW_Start_Address + 0x310;
- SampleDataAddress = (in_data[Where]*256*256*256)+(in_data[Where+1]*256*256)+(in_data[Where+2]*256)+in_data[Where+3]+0x314;
-
- /* pattern data */
- Where += 4;
- /*PatMax += 1;*/
-
- c1=0; /* will count patterns */
- k=0; /* current note number */
- Pattern = (Uchar *) malloc (65536);
- BZERO (Pattern, 65536);
- i=0;
- for ( j=0 ; j<(MaxPatAddy+0x400) ; j+=4 )
- {
- if ( (i%1024) == 0 )
- {
- if ( j>MaxPatAddy )
- break;
- Read_Pats_Address[c1] = j;
- c1 += 0x01;
- }
- if (in_data[Where+j] == 0x80 )
- {
- j -= 3;
- i += 4;
- continue;
- }
-
- c2 = ((in_data[Where+j]) | ((in_data[Where+j+2]>>4)&0x0f)) / 4;
-
- Pattern[i] = in_data[Where+j] & 0x0f;
- Pattern[i] |= (c2&0xf0);
- Pattern[i+1] = in_data[Where+j+1];
- Pattern[i+2] = in_data[Where+j+2] & 0x0f;
- Pattern[i+2]|= ((c2<<4)&0xf0);
- Pattern[i+3] = in_data[Where+j+3];
-
- i += 4;
- }
- /* Where should be now on the sample data addy */
-
- /* write pattern list */
- /* write pattern table */
- BZERO ( Whatever, 128 );
- for ( c2=0; c2<128 ; c2+=0x01 )
- for ( i=0 ; i<128 ; i++ )
- if ( Pats_Address[c2] == Read_Pats_Address[i])
- {
- Whatever[c2] = (Uchar) i;
- break;
- }
- fwrite ( &Whatever[0], 128, 1, out );
-
- /* write ptk's ID */
- Whatever[0] = 'M';Whatever[1] = '.';Whatever[2] = 'K';
- fwrite ( &Whatever[0] , 1 , 1 , out );
- fwrite ( &Whatever[1] , 1 , 1 , out );
- fwrite ( &Whatever[2] , 1 , 1 , out );
- fwrite ( &Whatever[1] , 1 , 1 , out );
- free (Whatever);
-
- /* write pattern data */
- /* c1 is still the number of patterns stored */
- fwrite ( Pattern, c1*1024, 1, out );
-
- /* sample data */
- Where = PW_Start_Address + SampleDataAddress;
-
- fwrite ( &in_data[Where] , Total_Sample_Size , 1 , out );
-
-
- Crap ( " StarTrekker Pack " , BAD , BAD , out );
- /*
- fseek ( out , 830 , SEEK_SET );
- fprintf ( out , " -[Converted with]- " );
- fseek ( out , 860 , SEEK_SET );
- fprintf ( out , "-[StarTrekker pack]-" );
- fseek ( out , 890 , SEEK_SET );
- fprintf ( out , " -[2 Protracker]- " );
- fseek ( out , 920 , SEEK_SET );
- fprintf ( out , " -[by Asle /ReDoX]- " );
- */
- fflush ( out );
- fclose ( out );
-
- printf ( "done\n" );
- return; /* useless ... but */
-}
+++ /dev/null
-/*
- * STIM_Packer.c 1998 (c) Sylvain "Asle" Chipaux
- *
- * STIM Packer to Protracker.
- ********************************************************
- * 13 april 1999 : Update
- * - no more open() of input file ... so no more fread() !.
- * It speeds-up the process quite a bit :).
- * 28 Nov 1999 : Update
- * - Speed & Size optimizings
-*/
-
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Depack_STIM ( void )
-{
- Uchar *Whatever;
- Uchar c1=0x00,c2=0x00,c3=0x00,c4=0x00;
- Uchar poss[36][2];
- Uchar Max=0x00;
- Uchar Note,Smp,Fx,FxVal;
- short TracksAdd[4];
- long i=0,j=0,k=0;
- long WholeSampleSize=0;
- long SmpDescAdd=0;
- long PatAdds[64];
- long SmpDataAdds[31];
- long SmpSizes[31];
- long Where=PW_Start_Address; /* main pointer to prevent fread() */
- FILE *out;
-
- if ( Save_Status == BAD )
- return;
-
-#ifdef DOS
- #include "..\include\ptktable.h"
-#endif
-
-#ifdef UNIX
- #include "../include/ptktable.h"
-#endif
-
- BZERO ( PatAdds , 64*4 );
- BZERO ( SmpDataAdds , 31*4 );
- BZERO ( SmpSizes , 31*4 );
-
- sprintf ( Depacked_OutName , "%ld.mod" , Cpt_Filename-1 );
- out = mr_fopen ( Depacked_OutName , "w+b" );
- if (!out)
- return;
-
- /* write title */
- Whatever = (Uchar *) malloc (1024);
- BZERO ( Whatever , 1024 );
- fwrite ( Whatever , 20 , 1 , out );
-
- /* bypass ID */
- Where += 4;
-
- /* read $ of sample description */
- SmpDescAdd = (in_data[Where]*256*256*256)+
- (in_data[Where+1]*256*256)+
- (in_data[Where+2]*256)+
- in_data[Where+3];
- /* "Where" isn't "+=4" coz it's assigned below */
- /*printf ( "SmpDescAdd : %ld\n" , SmpDescAdd );*/
-
- /* convert and write header */
- for ( i=0 ; i<31 ; i++ )
- {
- Where = PW_Start_Address + SmpDescAdd + i*4;
- SmpDataAdds[i]=(in_data[Where]*256*256*256)+
- (in_data[Where+1]*256*256)+
- (in_data[Where+2]*256)+
- in_data[Where+3];
- SmpDataAdds[i] += SmpDescAdd;
- Where = PW_Start_Address + SmpDataAdds[i];
- SmpDataAdds[i] += 8;
-
- /* write sample name */
- fwrite ( Whatever , 22 , 1 , out );
-
- /* sample size */
- SmpSizes[i] = (((in_data[Where]*256)+in_data[Where+1])*2);
- WholeSampleSize += (((in_data[Where]*256)+in_data[Where+1])*2);
- /* size,fine,vol,loops */
- fwrite ( &in_data[Where] , 8 , 1 , out );
-
- /* no "Where += 8" coz it's reassigned inside and after loop */
- }
-
- /* size of the pattern list */
- Where = PW_Start_Address + 19;
- fwrite ( &in_data[Where++] , 1 , 1 , out );
- Whatever[0] = 0x7f;
- fwrite ( Whatever , 1 , 1 , out );
-
- /* pattern table */
- Where += 1;
- Max = in_data[Where++];
- fwrite ( &in_data[Where] , 128 , 1 , out );
- Where += 128;
-
- /*printf ( "number of pattern : %d\n" , Max );*/
-
- /* write Protracker's ID */
- Whatever[0] = 'M';
- Whatever[1] = '.';
- Whatever[2] = 'K';
- Whatever[3] = '.';
- fwrite ( Whatever , 4 , 1 , out );
-
- /* read pattern addresses */
- for ( i=0 ; i<64 ; i++ )
- {
- PatAdds[i] = (in_data[Where]*256*256*256)+
- (in_data[Where+1]*256*256)+
- (in_data[Where+2]*256)+
- in_data[Where+3];
- PatAdds[i] += 0x0c;
- Where += 4;
- }
-
- /* pattern data */
- for ( i=0 ; i<Max ; i++ )
- {
- Where = PW_Start_Address + PatAdds[i];
- for ( k=0 ; k<4 ; k++ )
- {
- TracksAdd[k] = (in_data[Where]*256)+in_data[Where+1];
- Where += 2;
- }
-
- BZERO ( Whatever , 1024 );
- for ( k=0 ; k<4 ; k++ )
- {
- Where = PW_Start_Address + PatAdds[i]+TracksAdd[k];
- for ( j=0 ; j<64 ; j++ )
- {
- c1 = in_data[Where++];
- if ( (c1&0x80) == 0x80 )
- {
- j += (c1&0x7F);
- continue;
- }
- c2 = in_data[Where++];
- c3 = in_data[Where++];
-
- Smp = c1&0x1F;
- Note = c2&0x3F;
- Fx = ((c1>>5)&0x03);
- c4 = ((c2>>4)&0x0C);
- Fx |= c4;
- FxVal = c3;
-
- Whatever[j*16+k*4] = (Smp & 0xf0);
-
- if ( Note != 0 )
- {
- Whatever[j*16+k*4] |= poss[Note-1][0];
- Whatever[j*16+k*4+1] = poss[Note-1][1];
- }
-
- Whatever[j*16+k*4+2] = ((Smp<<4)&0xf0);
- Whatever[j*16+k*4+2] |= Fx;
- Whatever[j*16+k*4+3] = FxVal;
- }
- }
- fwrite ( Whatever , 1024 , 1 , out );
-/* printf ( "pattern %ld written\n" , i );*/
- }
- free ( Whatever );
-
- /* sample data */
- for ( i=0 ; i<31 ; i++ )
- {
- Where = PW_Start_Address + SmpDataAdds[i];
- fwrite ( &in_data[Where] , SmpSizes[i] , 1 , out );
- }
-
-
- Crap ( " STIM (Slamtilt) " , BAD , BAD , out );
- /*
- fseek ( out , 830 , SEEK_SET );
- fprintf ( out , " -[Converted with]- " );
- fseek ( out , 860 , SEEK_SET );
- fprintf ( out , " -[STIM packer to]- " );
- fseek ( out , 890 , SEEK_SET );
- fprintf ( out , " -[ProTracker]- " );
- fseek ( out , 920 , SEEK_SET );
- fprintf ( out , " -[by Asle /ReDoX]- " );
- */
-
- fflush ( out );
- fclose ( out );
-
- printf ( "done\n" );
- return; /* useless ... but */
-}
+++ /dev/null
-/*
- * STK26.c 1999 (c) Asle / ReDoX
- *
- *
- * handles Soundtracker 2.6 and IceTracker 1.0 file
- * convert them back to PTK
- *
- * Update: 19/04/00
- * - forced 7F value to NTK byte
- * Update: 29/05/02
- * - above update was bugged ... great.
-*/
-
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Depack_STK26 ( void )
-{
- Uchar *Whatever;
- long WholeSampleSize=0;
- long Where=PW_Start_Address;
- long i=0,j,k;
- FILE *out;
-
- if ( Save_Status == BAD )
- return;
-
- sprintf ( Depacked_OutName , "%ld.mod" , Cpt_Filename-1 );
- out = mr_fopen ( Depacked_OutName , "w+b" );
- if (!out)
- return;
-
-
- /* read and write whole header */
- fwrite ( &in_data[Where] , 952 , 1 , out );
-
- /* get whole sample size */
- for ( i=0 ; i<31 ; i++ )
- WholeSampleSize += (((in_data[Where+42+i*30]*256)+in_data[Where+43+i*30])*2);
- /* printf ( "Whole sanple size : %ld\n" , WholeSampleSize );*/
-
- /* generate patlist */
- Whatever = (Uchar *) malloc (1536);
- BZERO ( Whatever , 1536 );
- Whatever[1024] = in_data[Where+950];
- for ( i=0 ; i<Whatever[1024] ; i++,Whatever[256] += 0x01 )
- Whatever[i] = Whatever[256];
- fwrite ( Whatever , 128 , 1 , out );
-
- Whatever[0] = 'M';
- Whatever[1] = '.';
- Whatever[2] = 'K';
- Whatever[3] = '.';
- fwrite ( Whatever , 4 , 1 , out );
-
- /* NTK byte */
- Whatever[0] = 0x7f;
- fseek ( out , 951 , 0 );
- fwrite ( &Whatever[0] , 1 , 1 , out );
- fseek ( out , 0 , 2 );
-
- /* I dont care highest track number and go on blindly to convert shit ! */
- Where += 952;
- for ( i=0 ; i<Whatever[1024] ; i++ )
- {
- for ( j=0 ; j<4 ; j++ )
- {
- for ( k=0 ; k<64 ; k++ )
- {
- Whatever[k*16+j*4] = in_data[Where+(in_data[Where+i*4+j])*256+k*4+516];
- Whatever[k*16+j*4+1] = in_data[Where+(in_data[Where+i*4+j])*256+k*4+517];
- Whatever[k*16+j*4+2] = in_data[Where+(in_data[Where+i*4+j])*256+k*4+518];
- Whatever[k*16+j*4+3] = in_data[Where+(in_data[Where+i*4+j])*256+k*4+519];
- }
- }
- fwrite ( Whatever , 1024 , 1 , out );
- }
- free ( Whatever );
-
- /* sample data */
- /*Where = PW_Start_Address + 516 + 952 + Max*256;*/
- Where = 1468 + in_data[951]*256;
- fwrite ( &in_data[Where] , WholeSampleSize , 1 , out );
-
-
- /* crap */
-
- if ( in_data[PW_Start_Address+1464] == 'M' )
- Crap ( " SoundTracker 2.6 " , BAD , BAD , out );
- else
- Crap ( " IceTracker 1.0 " , BAD , BAD , out );
-
- fclose ( out );
-
- /* printf ( "done\n" );*/
- return; /* useless ... but */
-}
-
+++ /dev/null
-/*
- * TDD.c 1999 (c) Asle / ReDoX
- *
- * Converts TDD packed MODs back to PTK MODs
- *
- * Update : 6 apr 2003
- * - removed fopen() func ... .
- * Update : 26 nov 2003
- * - used htonl() so that use of addy is now portable on 68k archs
- *
-*/
-
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Depack_TheDarkDemon ( void )
-{
- Uchar c1=0x00,c2=0x00,c3=0x00;
- Uchar poss[37][2];
- Uchar *Whatever;
- Uchar Pattern[1024];
- Uchar PatMax=0x00;
- long i=0,j=0,k=0,z;
- long Whole_Sample_Size=0;
- long SampleAddresses[31];
- long SampleSizes[31];
- long Where = PW_Start_Address;
- FILE *out;
-
- if ( Save_Status == BAD )
- return;
-
-#ifdef DOS
- #include "..\include\ptktable.h"
-#endif
-
-#ifdef UNIX
- #include "../include/ptktable.h"
-#endif
-
- BZERO ( SampleAddresses , 31*4 );
- BZERO ( SampleSizes , 31*4 );
-
- sprintf ( Depacked_OutName , "%ld.mod" , Cpt_Filename-1 );
- out = mr_fopen ( Depacked_OutName , "w+b" );
- if (!out)
- return;
-
- /* write ptk header */
- Whatever = (Uchar *) malloc ( 1080 );
- BZERO (Whatever , 1080);
- fwrite ( Whatever , 1080 , 1 , out );
-
- /* read/write pattern list + size and ntk byte */
- fseek ( out , 950 , 0 );
- fwrite ( &in_data[Where] , 130 , 1 , out );
- PatMax = 0x00;
- for ( i=0 ; i<128 ; i++ )
- if ( in_data[Where+i+2] > PatMax )
- PatMax = in_data[Where+i+2];
- Where += 130;
-/* printf ( "highest pattern number : %x\n" , PatMax );*/
-
-
- /* sample descriptions */
-/* printf ( "sample sizes/addresses:" );*/
- for ( i=0 ; i<31 ; i++ )
- {
- fseek ( out , 42+(i*30) , 0 );
- /* sample address */
- SampleAddresses[i] = ((in_data[Where]*256*256*256)+
- (in_data[Where+1]*256*256)+
- (in_data[Where+2]*256)+
- in_data[Where+3]);
- Where += 4;
- /* read/write size */
- Whole_Sample_Size += (((in_data[Where]*256)+in_data[Where+1])*2);
- SampleSizes[i] = (((in_data[Where]*256)+in_data[Where+1])*2);
- fwrite ( &in_data[Where],2,1,out);
- Where += 2;
-/* printf ( "%5ld ,%ld" , SampleSizes[i] , SampleAddresses[i]);*/
-
- /* read/write finetune */
- /* read/write volume */
- fwrite ( &in_data[Where] , 2 , 1 , out );
- Where += 2;
-
- /* read loop start address */
- j = ((in_data[Where]*256*256*256)+
- (in_data[Where+1]*256*256)+
- (in_data[Where+2]*256)+
- in_data[Where+3]);
- Where += 4;
- j -= SampleAddresses[i];
- j /= 2;
- /* use of htonl() suggested by Xigh !.*/
- z = htonl(j);
- c1 = *((Uchar *)&z+2);
- c2 = *((Uchar *)&z+3);
-
- /* write loop start */
- fwrite ( &c1 , 1 , 1 , out );
- fwrite ( &c2 , 1 , 1 , out );
-
- /* read/write replen */
- fwrite ( &in_data[Where],2,1,out);
- Where += 2;
- }
-/* printf ( "\nWhole sample size : %ld\n" , Whole_Sample_Size );*/
-
-
- /* bypass Samples datas */
- Where += Whole_Sample_Size;
-/* printf ( "address of the pattern data : %ld (%x)\n" , ftell ( in ) , ftell ( in ) );*/
-
- /* write ptk's ID string */
- fseek ( out , 0 , 2 );
- c1 = 'M';
- c2 = '.';
- c3 = 'K';
- fwrite ( &c1 , 1 , 1 , out );
- fwrite ( &c2 , 1 , 1 , out );
- fwrite ( &c3 , 1 , 1 , out );
- fwrite ( &c2 , 1 , 1 , out );
-
-
- /* read/write pattern data */
- for ( i=0 ; i<=PatMax ; i++ )
- {
- BZERO ( Pattern , 1024 );
- for ( j=0 ; j<64 ; j++ )
- {
-/*fprintf ( info , "at : %ld\n" , (ftell ( in )-1024+j*16) );*/
- for ( k=0 ; k<4 ; k++ )
- {
- /* fx arg */
- Pattern[j*16+k*4+3] = in_data[Where+j*16+k*4+3];
-
- /* fx */
- Pattern[j*16+k*4+2] = in_data[Where+j*16+k*4+2]&0x0f;
-
- /* smp */
- Pattern[j*16+k*4] = in_data[Where+j*16+k*4]&0xf0;
- Pattern[j*16+k*4+2] |= (in_data[Where+j*16+k*4]<<4)&0xf0;
-
- /* note */
- Pattern[j*16+k*4] |= poss[in_data[Where+j*16+k*4+1]/2][0];
-/*fprintf ( info , "(P[0]:%x)" , Pattern[j*16+k*4] );*/
- Pattern[j*16+k*4+1] = poss[in_data[Where+j*16+k*4+1]/2][1];
-/*fprintf ( info , "%2x ,%2x ,%2x ,%2x |\n"
- , Whatever[j*16+k*4]
- , Whatever[j*16+k*4+1]
- , Whatever[j*16+k*4+2]
- , Whatever[j*16+k*4+3] );
-*/
- }
- }
- fwrite ( Pattern , 1024 , 1 , out );
- Where += 1024;
- }
-
-
- /* Sample data */
-/* printf ( "samples:" );*/
- for ( i=0 ; i<31 ; i++ )
- {
- if ( SampleSizes[i] == 0l )
- {
-/* printf ( "-" );*/
- continue;
- }
- Where = PW_Start_Address + SampleAddresses[i];
- fwrite ( &in_data[Where] , SampleSizes[i] , 1 , out );
-/* printf ( "+" );*/
- }
-
-
- Crap ( " The Dark Demon " , BAD , BAD , out );
-
- fflush ( out );
- fclose ( out );
-
- printf ( "done\n" );
- return; /* useless ... but */
-}
+++ /dev/null
-/*
- * TrackerPacker_v1.c 1998 (c) Asle / ReDoX
- *
- * Converts TP1 packed MODs back to PTK MODs
- * thanks to Gryzor and his ProWizard tool ! ... without it, this prog
- * would not exist !!!
- *
- * Update : 1 may 2003
- * - changed way to locate pattern datas. Correct pattern list saved now.
- *
-*/
-
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Depack_TP1 ( void )
-{
- Uchar c1=0x00,c2=0x00,c3=0x00;
- Uchar poss[37][2];
- Uchar *Whatever;
- Uchar Note,Smp,Fx,FxVal;
- Uchar Patternlist[128];
- Uchar PatPos;
- long Pats_Address[128];
- long i=0,j=0,k;
- long Pats_Address_read[128];
- long Start_Pat_Address;
- long Whole_Sample_Size=0;
- long Sample_Data_Address;
- long Where=PW_Start_Address;
- FILE *out;
-
-#ifdef DOS
- #include "..\include\ptktable.h"
-#endif
-
-#ifdef UNIX
- #include "../include/ptktable.h"
-#endif
-
- if ( Save_Status == BAD )
- return;
-
- BZERO ( Pats_Address , 128*4 );
-
- sprintf ( Depacked_OutName , "%ld.mod" , Cpt_Filename-1 );
- out = mr_fopen ( Depacked_OutName , "w+b" );
- if (!out)
- return;
-
- /* title */
- Whatever = (Uchar *) malloc (65536);
- BZERO ( Whatever , 65536 );
- fwrite ( &in_data[Where+8] , 20 , 1 , out );
-
- /* setting the first pattern address as the whole file size */
- Start_Pat_Address = 0xFFFFFF;
-
- Where += 28;
- /* sample data address */
- Sample_Data_Address = (in_data[Where]*256*256*256)+
- (in_data[Where+1]*256*256)+
- (in_data[Where+2]*256)+
- in_data[Where+3];
- Where += 4;
-/*printf ( "sample data address : %ld\n" , Sample_Data_Address );*/
-
- for ( i=0 ; i<31 ; i++ )
- {
- /*sample name*/
- fwrite ( Whatever , 22 , 1 , out );
-
- /* size */
- Whole_Sample_Size += (((in_data[Where+2]*256)+in_data[Where+3])*2);
- fwrite ( &in_data[Where+2] , 2 , 1 , out );
-
- /* write finetune,vol */
- fwrite ( &in_data[Where] , 2 , 1 , out );
-
- /* loops */
- fwrite ( &in_data[Where+4] , 4 , 1 , out );
-
- Where += 8;
- }
- /*printf ( "Whole sample size : %ld\n" , Whole_Sample_Size );*/
-
- /* read size of pattern table */
- Where = PW_Start_Address + 281;
- PatPos = in_data[Where]+0x01;
- fwrite ( &PatPos , 1 , 1 , out );
- Where += 1;
-
- /* ntk byte */
- c1 = 0x7f;
- fwrite ( &c1 , 1 , 1 , out );
-
- for ( i=0 ; i<PatPos ; i++ )
- {
- Pats_Address[i] = (in_data[Where]*256*256*256)+(in_data[Where+1]*256*256)+(in_data[Where+2]*256)+in_data[Where+3];
- Where += 4;
- if ( Start_Pat_Address > Pats_Address[i] )
- Start_Pat_Address = Pats_Address[i];
- /*printf ( "[at:%ld]%3ld: %ld\n" , Where-4,i,Pats_Address[i] );*/
- }
-
- /*printf ( "Start_Pat_Address : %ld\n",Start_Pat_Address);*/
-
- /* setting real addresses */
- for ( i=0 ; i<PatPos ; i++ )
- {
- Pats_Address[i] -= (Start_Pat_Address - 794);
- /*printf ( "pats_Address[i] : %ld\n",Pats_Address[i] );*/
- }
-
-
- /*printf ( "address of the first pattern : %ld\n" , Start_Pat_Address );*/
-
- /* pattern datas */
-
- j=0;k=0;
- /*printf ( "converting pattern data " );*/
- for ( i=(PW_Start_Address+794) ; i<=(Sample_Data_Address+PW_Start_Address+1) ; i+=1,j+=4 )
- {
- if ( (j%1024) == 0 )
- {
- Pats_Address_read[k++] = i - PW_Start_Address;
- /*printf ( "addy[%2ld] : %x\n",k-1,Pats_Address_read[k-1]);*/
- }
- c1 = in_data[i];
- if ( c1 == 0xC0 )
- {
- continue;
- }
-
- if ( (c1&0xC0) == 0x80 )
- {
- c2 = in_data[i+1];
- Fx = (c1>>2)&0x0f;
- FxVal = c2;
- Whatever[j+2] = Fx;
- Whatever[j+3] = FxVal;
- i += 1;
- continue;
- }
- c2 = in_data[i+1];
- c3 = in_data[i+2];
-
- Smp = ((c2>>4)&0x0f) | ((c1<<4)&0x10);
- Note = c1&0xFE;
- Fx = c2&0x0F;
- FxVal = c3;
-
- Whatever[j] = Smp&0xf0;
- Whatever[j] |= poss[(Note/2)][0];
- Whatever[j+1] = poss[(Note/2)][1];
- Whatever[j+2] = (Smp<<4)&0xf0;
- Whatever[j+2] |= Fx;
- Whatever[j+3] = FxVal;
- i += 2;
- }
- k -= 1;
- Pats_Address_read[k] = 0;
- BZERO (Patternlist,128);
- for ( i=0 ; i<PatPos ; i++ )
- for ( j=0 ; j<k ; j++ )
- if ( Pats_Address[i] == Pats_Address_read[j] )
- {
- Patternlist[i] = (Uchar)j;
- }
-
- /* write pattern list */
- fwrite ( Patternlist , 128 , 1 , out );
-
- /* ID string */
- Patternlist[0] = 'M';
- Patternlist[1] = '.';
- Patternlist[2] = 'K';
- Patternlist[3] = '.';
- fwrite ( Patternlist , 4 , 1 , out );
-
- /* pattern data */
- fwrite ( Whatever, 1024*k, 1, out );
- free (Whatever);
-
- /* Sample data */
- Where = PW_Start_Address + Sample_Data_Address;
- /*printf ( "Where : %x\n",Where);*/
- fwrite ( &in_data[Where] , Whole_Sample_Size , 1 , out );
-
- Crap ( " Tracker Packer 1 " , BAD , BAD , out );
-
- fflush ( out );
- fclose ( out );
-
- printf ( "done\n" );
- return; /* useless ... but */
-}
+++ /dev/null
-/*
- * TrackerPacker_v2.c 1998 (c) Asle / ReDoX
- *
- * Converts TP2 packed MODs back to PTK MODs
- ********************************************************
- * 13 april 1999 : Update
- * - no more open() of input file ... so no more fread() !.
- * It speeds-up the process quite a bit :).
- *
- * 28 Nov 1999 : Update
- * - Speed and Size Optmizings.
-*/
-
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Depack_TP2 ( void )
-{
- Uchar c1=0x00,c2=0x00,c3=0x00;
- Uchar poss[37][2];
- Uchar Pats_Numbers[128];
- Uchar *Whatever;
- Uchar Note,Smp,Fx,FxVal;
- Uchar PatMax=0x00;
- Uchar PatPos;
- long Track_Address[128][4];
- long i=0,j=0,k;
- long Start_Pat_Address=999999l;
- long Whole_Sample_Size=0;
- long Max_Track_Address=0;
- long Where=PW_Start_Address; /* main pointer to prevent fread() */
- FILE *out;/*,*info;*/
-
-#ifdef DOS
- #include "..\include\ptktable.h"
-#endif
-
-#ifdef UNIX
- #include "../include/ptktable.h"
-#endif
-
- if ( Save_Status == BAD )
- return;
-
- BZERO ( Track_Address , 128*4*4 );
- BZERO ( Pats_Numbers , 128 );
-
- sprintf ( Depacked_OutName , "%ld.mod" , Cpt_Filename-1 );
- out = mr_fopen ( Depacked_OutName , "w+b" );
- if (!out)
- return;
- /*info = fopen ( "info", "w+b");*/
-
- /* title */
- Where += 8;
- fwrite ( &in_data[Where] , 20 , 1 , out );
- Where += 20;
-
- /* number of sample */
- j = ((in_data[Where]*256)+in_data[Where+1])/8;
- Where += 2;
- /*printf ( "number of sample : %ld\n" , j );*/
-
- Whatever = (Uchar *) malloc (1024);
- BZERO ( Whatever , 1024 );
- for ( i=0 ; i<j ; i++ )
- {
- /*sample name*/
- fwrite ( Whatever , 22 , 1 , out );
-
- /* size */
- Whole_Sample_Size += (((in_data[Where+2]*256)+in_data[Where+3])*2);
- fwrite ( &in_data[Where+2] , 2 , 1 , out );
-
- /* write finetune & Volume */
- fwrite ( &in_data[Where] , 2 , 1 , out );
-
- /* loop start & Loop size */
- fwrite ( &in_data[Where+4] , 4 , 1 , out );
-
- Where += 8;
- }
- Whatever[29] = 0x01;
- while ( i!=31 )
- {
- fwrite ( Whatever , 30 , 1 , out );
- i++;
- }
- /*printf ( "Whole sample size : %ld\n" , Whole_Sample_Size );*/
-
- /* read size of pattern table */
- PatPos = in_data[Where+1];
- Where += 2;
- fwrite ( &PatPos , 1 , 1 , out );
-
- /* ntk byte */
- c1 = 0x7f;
- fwrite ( &c1 , 1 , 1 , out );
-
- for ( i=0 ; i<PatPos ; i++ )
- {
- Pats_Numbers[i] = ((in_data[Where]*256)+in_data[Where+1])/8;
- Where += 2;
- if ( Pats_Numbers[i] > PatMax )
- PatMax = Pats_Numbers[i];
- /*fprintf ( info , "%3ld: %d\n" , i,Pats_Numbers[i] );*/
- }
-
- /* read tracks addresses */
- /* bypass 4 bytes or not ?!? */
- /* Here, I choose not :) */
- /*fprintf ( info , "track addresses :\n" );*/
- for ( i=0 ; i<=PatMax ; i++ )
- {
- for ( j=0 ; j<4 ; j++ )
- {
- Track_Address[i][j] = (in_data[Where]*256)+in_data[Where+1];
- Where += 2;
- if ( Track_Address[i][j] > Max_Track_Address )
- Max_Track_Address = Track_Address[i][j];
- /*fprintf ( info , "%6ld, " , Track_Address[i][j] );*/
- }
- }
- /*fprintf ( info , " (%x)\n" , Max_Track_Address );fflush(info);*/
- /*printf ( "Highest pattern number : %d\n" , PatMax );*/
-
- /* write pattern list */
- fwrite ( Pats_Numbers , 128 , 1 , out );
-
-
- /* ID string */
- Whatever[0] = 'M';
- Whatever[1] = '.';
- Whatever[2] = 'K';
- Whatever[3] = '.';
- fwrite ( Whatever , 4 , 1 , out );
-
- Start_Pat_Address = Where + 2;
- /*printf ( "address of the first pattern : %ld\n" , Start_Pat_Address );*/
- /*fprintf ( info , "address of the first pattern : %x\n" , Start_Pat_Address );*/
-
- /* pattern datas */
- /*printf ( "converting pattern data " );*/
- for ( i=0 ; i<=PatMax ; i++ )
- {
- /*fprintf ( info , "\npattern %ld:\n\n" , i );*/
- BZERO ( Whatever , 1024 );
- for ( j=0 ; j<4 ; j++ )
- {
-/*fprintf ( info , "track %ld: (at %ld)\n" , j , Track_Address[i][j]+Start_Pat_Address );*/
- Where = Track_Address[i][j]+Start_Pat_Address;
- for ( k=0 ; k<64 ; k++ )
- {
- c1 = in_data[Where++];
-/*fprintf ( info , "%ld: %2x," , k , c1 );*/
- if ( (c1&0xC0) == 0xC0 )
- {
-/*fprintf ( info , " <--- %d empty lines\n" , (0x100-c1) );*/
- k += (0x100-c1);
- k -= 1;
- continue;
- }
- if ( (c1&0xC0) == 0x80 )
- {
- c2 = in_data[Where++];
-/*fprintf ( info , "%2x ,\n" , c2 );*/
- Fx = (c1>>2)&0x0f;
- FxVal = c2;
- if ( (Fx==0x05) || (Fx==0x06) || (Fx==0x0A) )
- {
- if ( FxVal > 0x80 )
- FxVal = 0x100-FxVal;
- else if ( FxVal <= 0x80 )
- FxVal = (FxVal<<4)&0xf0;
- }
- if ( Fx == 0x08 )
- Fx = 0x00;
- Whatever[k*16+j*4+2] = Fx;
- Whatever[k*16+j*4+3] = FxVal;
- continue;
- }
-
- c2 = in_data[Where++];
-/*fprintf ( info , "%2x, " , c2 );*/
- Smp = ((c2>>4)&0x0f) | ((c1<<4)&0x10);
- Note = c1&0xFE;
- Fx = c2&0x0F;
- if ( Fx == 0x00 )
- {
-/*fprintf ( info , " <--- No FX !!\n" );*/
- Whatever[k*16+j*4] = Smp&0xf0;
- Whatever[k*16+j*4] |= poss[(Note/2)][0];
- Whatever[k*16+j*4+1] = poss[(Note/2)][1];
- Whatever[k*16+j*4+2] = (Smp<<4)&0xf0;
- Whatever[k*16+j*4+2] |= Fx;
- continue;
- }
- c3 = in_data[Where++];
-/*fprintf ( info , "%2x\n" , c3 );*/
- if ( Fx == 0x08 )
- Fx = 0x00;
- FxVal = c3;
- if ( (Fx==0x05) || (Fx==0x06) || (Fx==0x0A) )
- {
- if ( FxVal > 0x80 )
- FxVal = 0x100-FxVal;
- else if ( FxVal <= 0x80 )
- FxVal = (FxVal<<4)&0xf0;
- }
-
- Whatever[k*16+j*4] = Smp&0xf0;
- Whatever[k*16+j*4] |= poss[(Note/2)][0];
- Whatever[k*16+j*4+1] = poss[(Note/2)][1];
- Whatever[k*16+j*4+2] = (Smp<<4)&0xf0;
- Whatever[k*16+j*4+2] |= Fx;
- Whatever[k*16+j*4+3] = FxVal;
- }
- if ( Where > Max_Track_Address )
- Max_Track_Address = Where;
- /*printf ( "%6ld, " , Max_Track_Address );*/
- }
- fwrite ( Whatever , 1024 , 1 , out );
- /*printf ( "." );*/
- }
- free ( Whatever );
- /*printf ( " ok\n" );*/
-
- /*printf ( "sample data address : %ld\n" , Max_Track_Address );*/
-
- /* Sample data */
- fwrite ( &in_data[Max_Track_Address] , Whole_Sample_Size , 1 , out );
-
-
- Crap ( " Tracker Packer 2 " , BAD , BAD , out );
-
-
- fflush ( out );
- fclose ( out );
- /*fclose ( info );*/
-
- printf ( "done\n" );
- return; /* useless ... but */
-}
+++ /dev/null
-/*
- * TrackerPacker_v3.c 1998 (c) Asle / ReDoX
- *
- * Converts TP3 packed MODs back to PTK MODs
- ********************************************************
- * 13 april 1999 : Update
- * - no more open() of input file ... so no more fread() !.
- * It speeds-up the process quite a bit :).
- *
- * 28 November 1999 : Update
- * - Some Optimizing for Speed and for Size.
-*/
-
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Depack_TP3 ( void )
-{
- Uchar c1=0x00,c2=0x00,c3=0x00;
- Uchar poss[37][2];
- Uchar *Whatever;
- Uchar Note,Smp,Fx,FxVal;
- Uchar PatMax=0x00;
- long Track_Address[128][4];
- long i=0,j=0,k;
- long Start_Pat_Address=999999l;
- long Whole_Sample_Size=0;
- long Max_Track_Address=0;
- long Where=PW_Start_Address; /* main pointer to prevent fread() */
- FILE *out;
-
-#ifdef DOS
- #include "..\include\ptktable.h"
-#endif
-
-#ifdef UNIX
- #include "../include/ptktable.h"
-#endif
-
- if ( Save_Status == BAD )
- return;
-
- BZERO ( Track_Address , 128*4*4 );
-
- sprintf ( Depacked_OutName , "%ld.mod" , Cpt_Filename-1 );
- out = mr_fopen ( Depacked_OutName , "w+b" );
- if (!out)
- return;
-
- /* title */
- Where += 8;
- fwrite ( &in_data[Where] , 20 , 1 , out );
- Where += 20;
-
- /* number of sample */
- j = (in_data[Where]*256)+in_data[Where+1];
- Where += 2;
- j /= 8;
- /*printf ( "number of sample : %ld\n" , j );*/
-
- Whatever = (Uchar *) malloc ( 1024 );
- BZERO ( Whatever , 1024 );
- for ( i=0 ; i<j ; i++ )
- {
- /*sample name*/
- fwrite ( Whatever , 22 , 1 , out );
-
- /* size */
- Whole_Sample_Size += (((in_data[Where+2]*256)+in_data[Where+3])*2);
- fwrite ( &in_data[Where+2] , 2 , 1 , out );
-
- /* write finetune & Volume */
- fwrite ( &in_data[Where] , 2 , 1 , out );
-
- /* loop start & Loop size */
- fwrite ( &in_data[Where+4] , 4 , 1 , out );
-
- Where += 8;
- }
- Whatever[29] = 0x01;
- while ( i!=31 )
- {
- fwrite ( Whatever , 30 , 1 , out );
- i++;
- }
- /*printf ( "Whole sample size : %ld\n" , Whole_Sample_Size );*/
-
- /* read size of pattern table */
- Where += 1;
- Whatever[256] = in_data[Where++]; /* PatPos*/
- fwrite ( &Whatever[256] , 1 , 1 , out );
-
- /* ntk byte */
- Whatever[0] = 0x7f;
- fwrite ( &Whatever[0] , 1 , 1 , out );
-
- for ( i=0 ; i<Whatever[256] ; i++ )
- {
- Whatever[i] = ((in_data[Where]*256)+in_data[Where+1])/8;
- Where += 2;
- if ( Whatever[i] > PatMax )
- PatMax = Whatever[i];
-/*fprintf ( info , "%3ld: %ld\n" , i,Pats_Address[i] );*/
- }
-
- /* read tracks addresses */
- /* bypass 4 bytes or not ?!? */
- /* Here, I choose not :) */
-/*fprintf ( info , "track addresses :\n" );*/
- for ( i=0 ; i<=PatMax ; i++ )
- {
- for ( j=0 ; j<4 ; j++ )
- {
- Track_Address[i][j] = (in_data[Where]*256)+in_data[Where+1];
- Where += 2;
- if ( Track_Address[i][j] > Max_Track_Address )
- Max_Track_Address = Track_Address[i][j];
-/*fprintf ( info , "%6ld, " , Track_Address[i][j] );*/
- }
-/*fprintf ( info , " (%x)\n" , Max_Track_Address );*/
- }
-
- /*printf ( "Highest pattern number : %d\n" , PatMax );*/
-
- /* write pattern list */
- fwrite ( Whatever , 128 , 1 , out );
-
-
- /* ID string */
- Whatever[0] = 'M';
- Whatever[1] = '.';
- Whatever[2] = 'K';
- Whatever[3] = '.';
- fwrite ( Whatever , 4 , 1 , out );
-
- Start_Pat_Address = Where + 2;
- /*printf ( "address of the first pattern : %ld\n" , Start_Pat_Address );*/
-/*fprintf ( info , "address of the first pattern : %x\n" , Start_Pat_Address );*/
-
- /* pattern datas */
- /*printf ( "converting pattern data " );*/
- for ( i=0 ; i<=PatMax ; i++ )
- {
-/*fprintf ( info , "\npattern %ld:\n\n" , i );*/
- BZERO ( Whatever , 1024 );
- for ( j=0 ; j<4 ; j++ )
- {
-/*fprintf ( info , "track %ld: (at %ld)\n" , j , Track_Address[i][j]+Start_Pat_Address );*/
- Where = Track_Address[i][j]+Start_Pat_Address;
- for ( k=0 ; k<64 ; k++ )
- {
- c1 = in_data[Where++];
-/*fprintf ( info , "%ld: %2x," , k , c1 );*/
- if ( (c1&0xC0) == 0xC0 )
- {
-/*fprintf ( info , " <--- %d empty lines\n" , (0x100-c1) );*/
- k += (0x100-c1);
- k -= 1;
- continue;
- }
- if ( (c1&0xC0) == 0x80 )
- {
- c2 = in_data[Where++];
-/*fprintf ( info , "%2x ,\n" , c2 );*/
- Fx = (c1>>1)&0x0f;
- FxVal = c2;
- if ( (Fx==0x05) || (Fx==0x06) || (Fx==0x0A) )
- {
- if ( FxVal > 0x80 )
- FxVal = 0x100-FxVal;
- else if ( FxVal <= 0x80 )
- FxVal = (FxVal<<4)&0xf0;
- }
- if ( Fx == 0x08 )
- Fx = 0x00;
- Whatever[k*16+j*4+2] = Fx;
- Whatever[k*16+j*4+3] = FxVal;
- continue;
- }
-
- c2 = in_data[Where++];
-/*fprintf ( info , "%2x, " , c2 );*/
- Smp = ((c2>>4)&0x0f) | ((c1>>2)&0x10);
- if ( (c1&0x40) == 0x40 )
- Note = 0x7f-c1;
- else
- Note = c1&0x3F;
- Fx = c2&0x0F;
- if ( Fx == 0x00 )
- {
-/*fprintf ( info , " <--- No FX !!\n" );*/
- Whatever[k*16+j*4] = Smp&0xf0;
- Whatever[k*16+j*4] |= poss[Note][0];
- Whatever[k*16+j*4+1] = poss[Note][1];
- Whatever[k*16+j*4+2] = (Smp<<4)&0xf0;
- Whatever[k*16+j*4+2] |= Fx;
- continue;
- }
- c3 = in_data[Where++];
-/*fprintf ( info , "%2x\n" , c3 );*/
- if ( Fx == 0x08 )
- Fx = 0x00;
- FxVal = c3;
- if ( (Fx==0x05) || (Fx==0x06) || (Fx==0x0A) )
- {
- if ( FxVal > 0x80 )
- FxVal = 0x100-FxVal;
- else if ( FxVal <= 0x80 )
- FxVal = (FxVal<<4)&0xf0;
- }
-
- Whatever[k*16+j*4] = Smp&0xf0;
- Whatever[k*16+j*4] |= poss[Note][0];
- Whatever[k*16+j*4+1] = poss[Note][1];
- Whatever[k*16+j*4+2] = (Smp<<4)&0xf0;
- Whatever[k*16+j*4+2] |= Fx;
- Whatever[k*16+j*4+3] = FxVal;
- }
- if ( Where > Max_Track_Address )
- Max_Track_Address = Where;
-/*fprintf ( info , "%6ld, " , Max_Track_Address );*/
- }
- fwrite ( Whatever , 1024 , 1 , out );
- /*printf ( "." );*/
- }
- free ( Whatever );
- /*printf ( " ok\n" );*/
-
- /*printf ( "sample data address : %ld\n" , Max_Track_Address );*/
-
- /* Sample data */
- if ( ((Max_Track_Address/2)*2) != Max_Track_Address )
- Max_Track_Address += 1;
- fwrite ( &in_data[Max_Track_Address] , Whole_Sample_Size , 1 , out );
-
- Crap ( " Tracker Packer 3 " , BAD , BAD , out );
- /*
- fseek ( out , 830 , SEEK_SET );
- fprintf ( out , "[Converted with ]" );
- fseek ( out , 860 , SEEK_SET );
- fprintf ( out , "[TrackerPacker v3 ]" );
- fseek ( out , 890 , SEEK_SET );
- fprintf ( out , "[to Protracker ]" );
- fseek ( out , 920 , SEEK_SET );
- fprintf ( out , "[by Asle /ReDoX ]" );
- */
- fflush ( out );
- fclose ( out );
-
- printf ( "done\n" );
- return; /* useless ... but */
-}
+++ /dev/null
-/*
- * Unic_Tracker.c 1997 (c) Asle / ReDoX
- *
- *
- * Unic tracked MODs to Protracker
- * both with or without ID Unic files will be converted
- ********************************************************
- * 13 april 1999 : Update
- * - no more open() of input file ... so no more fread() !.
- * It speeds-up the process quite a bit :).
- *
-*/
-
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-#define ON 1
-#define OFF 2
-
-void Depack_UNIC ( void )
-{
- Uchar c1=0x00,c2=0x00,c3=0x00,c4=0x00;
- Uchar NumberOfPattern=0x00;
- Uchar poss[37][2];
- Uchar Max=0x00;
- Uchar Smp,Note,Fx,FxVal;
- Uchar fine=0x00;
- Uchar Pattern[1025];
- Uchar LOOP_START_STATUS=OFF; /* standard /2 */
- long i=0,j=0,k=0,l=0;
- long WholeSampleSize=0;
- long Where=PW_Start_Address; /* main pointer to prevent fread() */
- FILE *out;
-
-#ifdef DOS
- #include "..\include\ptktable.h"
-#endif
-
-#ifdef UNIX
- #include "../include/ptktable.h"
-#endif
-
- if ( Save_Status == BAD )
- return;
-
- sprintf ( Depacked_OutName , "%ld.mod" , Cpt_Filename-1 );
- out = mr_fopen ( Depacked_OutName , "w+b" );
- if (!out)
- return;
-
- /* title */
- fwrite ( &in_data[Where] , 20 , 1 , out );
- Where += 20;
-
-
- for ( i=0 ; i<31 ; i++ )
- {
- /* sample name */
- fwrite ( &in_data[Where] , 20 , 1 , out );
- c1 = 0x00;
- fwrite ( &c1 , 1 , 1 , out );
- fwrite ( &c1 , 1 , 1 , out );
- Where += 20;
-
- /* fine on ? */
- c1 = in_data[Where++];
- c2 = in_data[Where++];
- j = (c1*256)+c2;
- if ( j != 0 )
- {
- if ( j < 256 )
- fine = 0x10-c2;
- else
- fine = 0x100-c2;
- }
- else
- fine = 0x00;
-
- /* smp size */
- c1 = in_data[Where++];
- c2 = in_data[Where++];
- fwrite ( &c1 , 1 , 1 , out );
- fwrite ( &c2 , 1 , 1 , out );
- l = ((c1*256)+c2)*2;
- WholeSampleSize += l;
-
- /* fine */
- Where += 1;
- fwrite ( &fine , 1 , 1 , out );
-
- /* vol */
- fwrite ( &in_data[Where++] , 1 , 1 , out );
-
- /* loop start */
- c1 = in_data[Where++];
- c2 = in_data[Where++];
-
- /* loop size */
- c3 = in_data[Where++];
- c4 = in_data[Where++];
-
- j=((c1*256)+c2)*2;
- k=((c3*256)+c4)*2;
- if ( (((j*2) + k) <= l) && (j!=0) )
- {
- LOOP_START_STATUS = ON;
- c1 *= 2;
- j = c2*2;
- if ( j>256 )
- c1 += 1;
- c2 *= 2;
- }
-
- fwrite ( &c1 , 1 , 1 , out );
- fwrite ( &c2 , 1 , 1 , out );
-
- fwrite ( &c3 , 1 , 1 , out );
- fwrite ( &c4 , 1 , 1 , out );
- }
-
-
-/* printf ( "whole sample size : %ld\n" , WholeSampleSize );*/
-/*
- if ( LOOP_START_STATUS == ON )
- printf ( "!! Loop start value was /4 !\n" );
-*/
- /* number of pattern */
- NumberOfPattern = in_data[Where++];
- fwrite ( &NumberOfPattern , 1 , 1 , out );
-
- /* noisetracker byte */
- c1 = 0x7f;
- fwrite ( &c1 , 1 , 1 , out );
- Where += 1;
-
- /* Pattern table */
- fwrite ( &in_data[Where] , 128 , 1 , out );
- Where += 128;
-
- /* get highest pattern number */
- for ( i=0 ; i<128 ; i++ )
- {
- if ( in_data[PW_Start_Address+952+i] > Max )
- Max = in_data[PW_Start_Address+952+i];
- }
- Max += 1; /* coz first is $00 */
-
- c1 = 'M';
- c2 = '.';
- c3 = 'K';
- fwrite ( &c1 , 1 , 1 , out );
- fwrite ( &c2 , 1 , 1 , out );
- fwrite ( &c3 , 1 , 1 , out );
- fwrite ( &c2 , 1 , 1 , out );
-
- /* verify UNIC ID */
- Where = PW_Start_Address + 1080;
- if ( (strncmp ( (char *)&in_data[Where] , "M.K." , 4 ) == 0) ||
- (strncmp ( (char *)&in_data[Where] , "UNIC" , 4 ) == 0) ||
- ((in_data[Where]==0x00)&&(in_data[Where+1]==0x00)&&(in_data[Where+2]==0x00)&&(in_data[Where+3]==0x00)))
- Where = PW_Start_Address + 1084l;
- else
- Where = PW_Start_Address + 1080l;
-
-
- /* pattern data */
- for ( i=0 ; i<Max ; i++ )
- {
- for ( j=0 ; j<256 ; j++ )
- {
- Smp = ((in_data[Where+j*3]>>2) & 0x10) | ((in_data[Where+j*3+1]>>4)&0x0f);
- Note = in_data[Where+j*3]&0x3f;
- Fx = in_data[Where+j*3+1]&0x0f;
- FxVal = in_data[Where+j*3+2];
-
- if ( Fx == 0x0d ) /* pattern break */
- {
-/* printf ( "!! [%x] -> " , FxVal );*/
- c4 = FxVal%10;
- c3 = FxVal/10;
- FxVal = 16;
- FxVal *= c3;
- FxVal += c4;
-/* printf ( "[%x]\n" , FxVal );*/
- }
-
- Pattern[j*4] = (Smp&0xf0);
- Pattern[j*4] |= poss[Note][0];
- Pattern[j*4+1] = poss[Note][1];
- Pattern[j*4+2] = ((Smp<<4)&0xf0)|Fx;
- Pattern[j*4+3] = FxVal;
- }
- fwrite ( Pattern , 1024 , 1 , out );
- Where += 768;
- }
-
-
-
- /* sample data */
- fwrite ( &in_data[Where] , WholeSampleSize , 1 , out );
-
-
-
- Crap ( " UNIC Tracker " , BAD , BAD , out );
- /*
- fseek ( out , 830 , SEEK_SET );
- fprintf ( out , " -[Converted with]- " );
- fseek ( out , 860 , SEEK_SET );
- fprintf ( out , " -[UNIC Tracker]- " );
- fseek ( out , 890 , SEEK_SET );
- fprintf ( out , " -[2 ProTracker]- " );
- fseek ( out , 920 , SEEK_SET );
- fprintf ( out , " -[by Asle /ReDoX]- " );
- */
- fflush ( out );
- fclose ( out );
-
- printf ( "done\n" );
- return; /* useless ... but */
-}
-
+++ /dev/null
-/*
- * Unic_Tracker_2.c 1997 (c) Asle / ReDoX
- *
- *
- * Unic tracked 2 MODs to Protracker
- ********************************************************
- * 13 april 1999 : Update
- * - no more open() of input file ... so no more fread() !.
- * It speeds-up the process quite a bit :).
- * 28 nov 1999 :
- * - Overall Speed and Size optimizings.
-*/
-
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-/*#define ON 1
-#define OFF 2*/
-
-void Depack_UNIC2 ( void )
-{
- Uchar poss[37][2];
- Uchar Smp,Note,Fx,FxVal;
- Uchar *Whatever;
-/* Uchar LOOP_START_STATUS=OFF;*/ /* standard /2 */
- long i=0,j=0,k=0,l=0;
- long WholeSampleSize=0;
- long Where=PW_Start_Address; /* main pointer to prevent fread() */
- FILE *out;
-
-#ifdef DOS
- #include "..\include\ptktable.h"
-#endif
-
-#ifdef UNIX
- #include "../include/ptktable.h"
-#endif
-
- if ( Save_Status == BAD )
- return;
-
- sprintf ( Depacked_OutName , "%ld.mod" , Cpt_Filename-1 );
- out = mr_fopen ( Depacked_OutName , "w+b" );
- if (!out)
- return;
-
- /* title */
- Whatever = (Uchar *) malloc (1028);
- BZERO ( Whatever , 1028 );
- fwrite ( Whatever , 20 , 1 , out );
-
- for ( i=0 ; i<31 ; i++ )
- {
- /* sample name */
- fwrite ( &in_data[Where] , 20 , 1 , out );
- fwrite ( &Whatever[32] , 2 , 1 , out );
-
- /* fine on ? */
- j = (in_data[Where+20]*256)+in_data[Where+21];
- if ( j != 0 )
- {
- if ( j < 256 )
- Whatever[48] = 0x10-in_data[Where+21];
- else
- Whatever[48] = 0x100-in_data[Where+21];
- }
-
- /* smp size */
- fwrite ( &in_data[Where+22] , 2 , 1 , out );
- l = ((in_data[Where+22]*256)+in_data[Where+23])*2;
- WholeSampleSize += l;
-
- /* fine */
- fwrite ( &Whatever[48] , 1 , 1 , out );
-
- /* vol */
- fwrite ( &in_data[Where+25] , 1 , 1 , out );
-
- /* loop start */
- Whatever[64] = in_data[Where+26];
- Whatever[65] = in_data[Where+27];
-
- /* loop size */
- j=((Whatever[64]*256)+Whatever[65])*2;
- k=((in_data[Where+28]*256)+in_data[Where+29])*2;
- if ( (((j*2) + k) <= l) && (j!=0) )
- {
-/* LOOP_START_STATUS = ON;*/
- Whatever[64] *= 2;
- j = Whatever[65]*2;
- if ( j>256 )
- Whatever[64] += 1;
- Whatever[65] *= 2;
- }
-
- fwrite ( &Whatever[64] , 2 , 1 , out );
-
- fwrite ( &in_data[Where+28] , 2 , 1 , out );
-
- Where += 30;
- }
-
-
- /*printf ( "whole sample size : %ld\n" , WholeSampleSize );*/
-/*
- if ( LOOP_START_STATUS == ON )
- printf ( "!! Loop start value was /4 !\n" );
-*/
- /* number of pattern */
- fwrite ( &in_data[Where++] , 1 , 1 , out );
-
- /* noisetracker byte */
- Whatever[32] = 0x7f;
- fwrite ( &Whatever[32] , 1 , 1 , out );
- Where += 1;
-
- /* Pattern table */
- fwrite ( &in_data[Where] , 128 , 1 , out );
- Where += 128;
-
- /* get highest pattern number */
- for ( i=0 ; i<128 ; i++ )
- {
- if ( in_data[PW_Start_Address+932+i] > Whatever[1026] )
- Whatever[1026] = in_data[PW_Start_Address+932+i];
- }
- /*printf ( "Number of Pattern : %d\n" , Whatever[1026]+1 );*/
-
- Whatever[0] = 'M';
- Whatever[1] = '.';
- Whatever[2] = 'K';
- Whatever[3] = '.';
- fwrite ( Whatever , 4 , 1 , out );
-
-
- /* pattern data */
- for ( i=0 ; i<=Whatever[1026] ; i++ )
- {
- for ( j=0 ; j<256 ; j++ )
- {
- Smp = ((in_data[Where+j*3]>>2) & 0x10) | ((in_data[Where+j*3+1]>>4)&0x0f);
- Note = in_data[Where+j*3]&0x3f;
- Fx = in_data[Where+j*3+1]&0x0f;
- FxVal = in_data[Where+j*3+2];
- if ( Fx == 0x0d ) /* pattern break */
- {
-/* printf ( "!! [%x] -> " , FxVal );*/
- Whatever[1024] = FxVal%10;
- Whatever[1025] = FxVal/10;
- FxVal = 16;
- FxVal *= Whatever[1025];
- FxVal += Whatever[1024];
-/* printf ( "[%x]\n" , FxVal );*/
- }
-
- Whatever[j*4] = (Smp&0xf0);
- Whatever[j*4] |= poss[Note][0];
- Whatever[j*4+1] = poss[Note][1];
- Whatever[j*4+2] = ((Smp<<4)&0xf0)|Fx;
- Whatever[j*4+3] = FxVal;
- }
- fwrite ( Whatever , 1024 , 1 , out );
- Where += 768;
- }
- free ( Whatever );
-
-
- /* sample data */
- fwrite ( &in_data[Where] , WholeSampleSize , 1 , out );
-
- Crap ( " UNIC Tracker 2 " , BAD , BAD , out );
- /*
- fseek ( out , 830 , SEEK_SET );
- fprintf ( out , " -[Converted with]- " );
- fseek ( out , 860 , SEEK_SET );
- fprintf ( out , " -[UNIC Tracker 2]- " );
- fseek ( out , 890 , SEEK_SET );
- fprintf ( out , " -[2 ProTracker]- " );
- fseek ( out , 920 , SEEK_SET );
- fprintf ( out , " -[by Asle /ReDoX]- " );
- */
- fflush ( out );
- fclose ( out );
-
- printf ( "done\n" );
- return; /* useless ... but */
-}
-
+++ /dev/null
-/*
- * Wanton_Packer.c 1997 (c) Asle / ReDoX
- *
- * Converts MODs converted with Wanton packer
- ********************************************************
- * 13 april 1999 : Update
- * - no more open() of input file ... so no more fread() !.
- * It speeds-up the process quite a bit :).
- * 28 nov 1999 : Update
- * - small size optimizing.
-*/
-
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Depack_WN ( void )
-{
- Uchar poss[37][2];
- Uchar *Whatever;
- long WholeSampleSize=0;
- long i=0,j=0;
- long Where=PW_Start_Address; /* main pointer to prevent fread() */
- FILE *out;
-
-#ifdef DOS
- #include "..\include\ptktable.h"
-#endif
-
-#ifdef UNIX
- #include "../include/ptktable.h"
-#endif
-
- if ( Save_Status == BAD )
- return;
-
- sprintf ( Depacked_OutName , "%ld.mod" , Cpt_Filename-1 );
- out = mr_fopen ( Depacked_OutName , "w+b" );
- if (!out)
- return;
-
- /* read header */
- fwrite ( &in_data[Where] , 950 , 1 , out );
-
- /* get whole sample size */
- for ( i=0 ; i<31 ; i++ )
- WholeSampleSize += (((in_data[Where+42+i*30]*256)+in_data[Where+43+i*30])*2);
-/* printf ( "Whole sample size : %ld\n" , WholeSampleSize );*/
-
- /* read size of pattern list */
- Where += 950;
- fwrite ( &in_data[Where] , 1 , 1 , out );
- Where += 1;
-
- i = Where;
- fwrite ( &in_data[Where] , 129 , 1 , out );
- Where += 129;
-
- /* write ptk's ID */
- Whatever = (Uchar *) malloc (5);
- Whatever[0] = 'M';
- Whatever[1] = '.';
- Whatever[2] = 'K';
- Whatever[3] = '.';
- fwrite ( Whatever , 4 , 1 , out );
-
- /* get highest pattern number */
- Whatever[4] = 0x00;
- for ( i=0 ; i<128 ; i++ )
- {
- if ( in_data[PW_Start_Address + 952 + i] > Whatever[4] )
- Whatever[4] = in_data[PW_Start_Address + 952 + i];
- }
-/* printf ( "Max : %d\n" , Whatever[4] );*/
-
- /* pattern data */
- Where = PW_Start_Address + 1084;
- for ( i=0 ; i<=Whatever[4] ; i++ )
- {
- for ( j=0 ; j<256 ; j++ )
- {
- Whatever[0] = in_data[Where+1] & 0xf0;
- Whatever[0] |= poss[(in_data[Where]/2)][0];
- Whatever[1] = poss[(in_data[Where]/2)][1];
- Whatever[2] = (in_data[Where+1]<<4)&0xf0;
- Whatever[2] |= in_data[Where+2];
- Whatever[3] = in_data[Where+3];
-
- fwrite ( Whatever , 4 , 1 , out );
- Where += 4;
- }
-/* printf ( "+" );*/
- }
-/* printf ( "\n" );*/
- free ( Whatever );
-
- /* sample data */
- fwrite ( &in_data[Where] , WholeSampleSize , 1 , out );
-
- /* crap */
- Crap ( " Wanton Packer " , BAD , BAD , out );
- /*
- fseek ( out , 830 , SEEK_SET );
- fprintf ( out , " -[Converted with]- " );
- fseek ( out , 860 , SEEK_SET );
- fprintf ( out , "-[Wanton Packer to]-" );
- fseek ( out , 890 , SEEK_SET );
- fprintf ( out , " -[ProTracker]- " );
- fseek ( out , 920 , SEEK_SET );
- fprintf ( out , " -[by Asle /ReDoX]- " );
- */
- fflush ( out );
- fclose ( out );
-
- printf ( "done\n" );
- return; /* useless ... but */
-}
+++ /dev/null
-/*
- * XANN_Packer.c 1997 (c) Asle / ReDoX
- *
- * XANN Packer to Protracker.
- *
- *
- * 13 april 1999 : Update
- * - no more open() of input file ... so no more fread() !.
- * It speeds-up the process quite a bit :).
- * 28 Nov 1999 : Update
- * - Speed & Size optimizings
- * Another Update : 26 nov 2003
- * - used htonl() so that use of addy is now portable on 68k archs
-*/
-
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-#define SMP_DESC_ADDRESS 0x206
-#define PAT_DATA_ADDRESS 0x43C
-
-void Depack_XANN ( void )
-{
- Uchar c1=0x00,c2=0x00;
- Uchar poss[37][2];
- Uchar Max=0x00;
- Uchar Note,Smp,Fx,FxVal;
- Uchar *Whatever;
- long i=0,j=0,l=0,z;
- long WholeSampleSize=0;
- long Where=PW_Start_Address; /* main pointer to prevent fread() */
- FILE *out;
-
-#ifdef DOS
- #include "..\include\ptktable.h"
-#endif
-
-#ifdef UNIX
- #include "../include/ptktable.h"
-#endif
-
- if ( Save_Status == BAD )
- return;
-
- sprintf ( Depacked_OutName , "%ld.mod" , Cpt_Filename-1 );
- out = mr_fopen ( Depacked_OutName , "w+b" );
- if (!out)
- return;
-
- /* title */
- Whatever = (Uchar *) malloc (1024);
- BZERO ( Whatever , 1024 );
- fwrite ( Whatever , 20 , 1 , out );
-
- /* 31 samples */
- Where = PW_Start_Address + SMP_DESC_ADDRESS;
- for ( i=0 ; i<31 ; i++ )
- {
- /* sample name */
- fwrite ( &Whatever[2] , 22 , 1 , out );
-
- /* read loop start address */
- j=(in_data[Where+2]*256*256*256)+
- (in_data[Where+3]*256*256)+
- (in_data[Where+4]*256)+
- in_data[Where+5];
-
- /* read sample address */
- l=(in_data[Where+8]*256*256*256)+
- (in_data[Where+9]*256*256)+
- (in_data[Where+10]*256)+
- in_data[Where+11];
-
- /* read & write sample size */
- fwrite ( &in_data[Where+12] , 2 , 1 , out );
- WholeSampleSize += (((in_data[Where+12]*256)+in_data[Where+13])*2);
-
- /* calculate loop start value */
- j = j-l;
-
- /* write fine & vol */
- fwrite ( &in_data[Where] , 2 , 1 , out );
-
- /* write loop start */
- /* use of htonl() suggested by Xigh !.*/
- j/=2;
- z = htonl(j);
- Whatever[0] = *((Uchar *)&z+2);
- Whatever[1] = *((Uchar *)&z+3);
- fwrite ( Whatever , 2 , 1 , out );
-
- /* write loop size */
- fwrite ( &in_data[Where+6] , 2 , 1 , out );
-
- Where += 16;
- }
- /*printf ( "Whole sample size : %ld\n" , WholeSampleSize );*/
-
- /* pattern table */
- Max = 0x00;
- Where = PW_Start_Address;
- for ( c1=0 ; c1<128 ; c1++ )
- {
- l=(in_data[Where]*256*256*256)+
- (in_data[Where+1]*256*256)+
- (in_data[Where+2]*256)+
- in_data[Where+3];
- Where += 4;
- if ( l == 0 )
- break;
- Whatever[c1] = ((l-0x3c)/1024)-1;
- if ( Whatever[c1] > Max )
- Max = Whatever[c1];
- }
- Max += 1; /* starts at $00 */
- /*printf ( "number of pattern : %d\n" , Max );*/
-
- /* write number of pattern */
- fwrite ( &c1 , 1 , 1 , out );
-
- /* write noisetracker byte */
- c1 = 0x7f;
- fwrite ( &c1 , 1 , 1 , out );
-
- /* write pattern list */
- fwrite ( Whatever , 128 , 1 , out );
-
- /* write Protracker's ID */
- Whatever[0] = 'M';
- Whatever[1] = '.';
- Whatever[2] = 'K';
- Whatever[3] = '.';
- fwrite ( Whatever , 4 , 1 , out );
-
- /* pattern data */
- Where = PW_Start_Address + PAT_DATA_ADDRESS;
- for ( i=0 ; i<Max ; i++ )
- {
- BZERO ( Whatever , 1024 );
- for ( j=0 ; j<256 ; j++ )
- {
- Smp = (in_data[Where+j*4]>>3)&0x1f;
- Note = in_data[Where+j*4+1];
- Fx = in_data[Where+j*4+2];
- FxVal = in_data[Where+j*4+3];
- switch ( Fx )
- {
- case 0x00: /* no Fx */
- Fx = 0x00;
- break;
-
- case 0x04: /* arpeggio */
- Fx = 0x00;
- break;
-
- case 0x08: /* portamento up */
- Fx = 0x01;
- break;
-
- case 0x0C: /* portamento down */
- Fx = 0x02;
- break;
-
- case 0x10: /* tone portamento with no FxVal */
- Fx = 0x03;
- break;
-
- case 0x14: /* tone portamento */
- Fx = 0x03;
- break;
-
- case 0x18: /* vibrato with no FxVal */
- Fx = 0x04;
- break;
-
- case 0x1C: /* vibrato */
- Fx = 0x04;
- break;
-
- case 0x24: /* tone portamento + vol slide DOWN */
- Fx = 0x05;
- break;
-
- case 0x28: /* vibrato + volume slide UP */
- Fx = 0x06;
- c1 = (FxVal << 4)&0xf0;
- c2 = (FxVal >> 4)&0x0f;
- FxVal = c1|c2;
- break;
-
- case 0x2C: /* vibrato + volume slide DOWN */
- Fx = 0x06;
- break;
-
- case 0x38: /* sample offset */
- Fx = 0x09;
- break;
-
- case 0x3C: /* volume slide up */
- Fx = 0x0A;
- c1 = (FxVal << 4)&0xf0;
- c2 = (FxVal >> 4)&0x0f;
- FxVal = c1|c2;
- break;
-
- case 0x40: /* volume slide down */
- Fx = 0x0A;
- break;
-
- case 0x44: /* position jump */
- Fx = 0x0B;
- break;
-
- case 0x48: /* set volume */
- Fx = 0x0C;
- break;
-
- case 0x4C: /* pattern break */
- Fx = 0x0D;
- break;
-
- case 0x50: /* set speed */
- Fx = 0x0F;
- break;
-
- case 0x58: /* set filter */
- Fx = 0x0E;
- FxVal = 0x01;
- break;
-
- case 0x5C: /* fine slide up */
- Fx = 0x0E;
- FxVal |= 0x10;
- break;
-
- case 0x60: /* fine slide down */
- Fx = 0x0E;
- FxVal |= 0x20;
- break;
-
- case 0x74: /* set loop start */
- case 0x78: /* set loop value */
- Fx = 0x0E;
- FxVal |= 0x60;
- break;
-
- case 0x84: /* retriger */
- Fx = 0x0E;
- FxVal |= 0x90;
- break;
-
- case 0x88: /* fine volume slide up */
- Fx = 0x0E;
- FxVal |= 0xa0;
- break;
-
- case 0x8C: /* fine volume slide down */
- Fx = 0x0E;
- FxVal |= 0xb0;
- break;
-
- case 0x94: /* note delay */
- Fx = 0x0E;
- FxVal |= 0xd0;
- break;
-
- case 0x98: /* pattern delay */
- Fx = 0x0E;
- FxVal |= 0xe0;
- break;
-
- default:
- printf ( "%x : at %ld (out:%ld)\n" , Fx , Where+(j*4),ftell(out) );
- Fx = 0x00;
- break;
- }
- Whatever[j*4] = (Smp & 0xf0);
- Whatever[j*4] |= poss[(Note/2)][0];
- Whatever[j*4+1] = poss[(Note/2)][1];
- Whatever[j*4+2] = ((Smp<<4)&0xf0);
- Whatever[j*4+2] |= Fx;
- Whatever[j*4+3] = FxVal;
- }
- Where += 1024;
- fwrite ( Whatever , 1024 , 1 , out );
-/* printf ( "pattern %ld written\n" , i );*/
- }
- free ( Whatever );
-
- /* sample data */
- fwrite ( &in_data[Where] , WholeSampleSize , 1 , out );
-
- Crap ( " XANN Packer " , BAD , BAD , out );
- /*
- fseek ( out , 830 , SEEK_SET );
- fprintf ( out , " -[Converted with]- " );
- fseek ( out , 860 , SEEK_SET );
- fprintf ( out , " -[XANN packer to]- " );
- fseek ( out , 890 , SEEK_SET );
- fprintf ( out , " -[ProTracker]- " );
- fseek ( out , 920 , SEEK_SET );
- fprintf ( out , " -[by Asle /ReDoX]- " );
- */
- fflush ( out );
- fclose ( out );
-
- printf ( "done\n" );
- return; /* useless ... but */
-}
-
+++ /dev/null
-/*
- * Zen_Packer.c 1998 (c) Asle / ReDoX
- *
- * Converts ZEN packed MODs back to PTK MODs
- ********************************************************
- * 13 april 1999 : Update
- * - no more open() of input file ... so no more fread() !.
- * It speeds-up the process quite a bit :).
- * 28 Nov 1999 : Update
- * - Speed an size optimizings.
- * 03 april 2000 : Update
- * - small bug correction (harmless)
- * again pointed out by Thomas Neumann
- * Another Update : 26 nov 2003
- * - used htonl() so that use of addy is now portable on 68k archs
-*/
-
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Depack_ZEN ( void )
-{
- Uchar PatPos;
- Uchar *Whatever;
- Uchar PatMax;
- Uchar poss[37][2];
- Uchar Note,Smp,Fx,FxVal;
- long WholeSampleSize=0;
- long Pattern_Address[128];
- long Pattern_Address_Real[128];
- long Pattern_Table_Address;
- long Sample_Data_Address=999999l;
- long i,j,k,z;
- long Where=PW_Start_Address; /* main pointer to prevent fread() */
- FILE *out;
-
-#ifdef DOS
- #include "..\include\ptktable.h"
-#endif
-
-#ifdef UNIX
- #include "../include/ptktable.h"
-#endif
-
- if ( Save_Status == BAD )
- return;
-
- BZERO ( Pattern_Address , 128*4);
- BZERO ( Pattern_Address_Real , 128*4);
- sprintf ( Depacked_OutName , "%ld.mod" , Cpt_Filename-1 );
- out = mr_fopen ( Depacked_OutName , "w+b" );
- if (!out)
- return;
-
- /* read pattern table address */
- Pattern_Table_Address = (in_data[Where]*256*256*256)+
- (in_data[Where+1]*256*256)+
- (in_data[Where+2]*256)+
- in_data[Where+3];
- Where += 4;
-
- /* read patmax */
- PatMax = in_data[Where++];
-
- /* read size of pattern table */
- PatPos = in_data[Where++];
- /*printf ( "Size of pattern list : %d\n" , PatPos );*/
-
- /* write title */
- Whatever = (Uchar *) malloc (1024);
- BZERO ( Whatever , 1024 );
- fwrite ( Whatever , 20 , 1 , out );
-
- for ( i=0 ; i<31 ; i++ )
- {
- fwrite ( Whatever , 22 , 1 , out );
-
- /* read sample size */
- WholeSampleSize += (((in_data[Where+4]*256)+in_data[Where+5])*2);
- fwrite ( &in_data[Where+4] , 2 , 1 , out );
-
- /* write fine */
- Whatever[32] = ((in_data[Where]*256)+in_data[Where+1])/0x48;
- fwrite ( &Whatever[32] , 1 , 1 , out );
-
- /* write volume */
- fwrite ( &in_data[Where+3] , 1 , 1 , out );
-
- /* read sample start address */
- k = (in_data[Where+8]*256*256*256)+
- (in_data[Where+9]*256*256)+
- (in_data[Where+10]*256)+
- in_data[Where+11];
-
- if ( k<Sample_Data_Address )
- Sample_Data_Address = k;
-
- /* read loop start address */
- j = (in_data[Where+12]*256*256*256)+
- (in_data[Where+13]*256*256)+
- (in_data[Where+14]*256)+
- in_data[Where+15];
- j -= k;
- j /= 2;
-
- /* write loop start */
- /* use of htonl() suggested by Xigh !.*/
- z = htonl(j);
- Whatever[48] = *((Uchar *)&z+2);
- Whatever[49] = *((Uchar *)&z+3);
- fwrite ( &Whatever[48] , 2 , 1 , out );
-
- /* write loop size */
- fwrite ( &in_data[Where+6] , 2 , 1 , out );
-
- Where += 16;
- }
- /*printf ( "Whole sample size : %ld\n" , WholeSampleSize );*/
-
- /* write size of pattern list */
- fwrite ( &PatPos , 1 , 1 , out );
-
- /* write ntk byte */
- Whatever[0] = 0x7f;
- fwrite ( Whatever , 1 , 1 , out );
-
- /* read pattern table .. */
- Where = PW_Start_Address + Pattern_Table_Address;
- for ( i=0 ; i<PatPos ; i++ )
- {
- Pattern_Address[i] = (in_data[Where]*256*256*256)+
- (in_data[Where+1]*256*256)+
- (in_data[Where+2]*256)+
- in_data[Where+3];
- Where += 4;
- }
-
- /* deduce pattern list */
- Whatever[256] = 0x00;
- for ( i=0 ; i<PatPos ; i++ )
- {
- if ( i == 0 )
- {
- Whatever[0] = 0x00;
- Pattern_Address_Real[0] = Pattern_Address[0];
- Whatever[256] += 0x01;
- continue;
- }
- for ( j=0 ; j<i ; j++ )
- {
- if ( Pattern_Address[i] == Pattern_Address[j] )
- {
- Whatever[i] = Whatever[j];
- break;
- }
- }
- if ( j == i )
- {
- Pattern_Address_Real[Whatever[256]] = Pattern_Address[i];
- Whatever[i] = Whatever[256];
- Whatever[256] += 0x01;
- }
- }
- /*printf ( "Number of pattern : %d\n" , PatMax );*/
-
- /* write pattern table */
- fwrite ( Whatever , 128 , 1 , out );
-
- /* write ptk's ID */
- Whatever[0] = 'M';
- Whatever[1] = '.';
- Whatever[2] = 'K';
- Whatever[3] = '.';
- fwrite ( Whatever , 4 , 1 , out );
-
- /* pattern data */
- /*printf ( "converting pattern datas " );*/
- for ( i=0 ; i<=PatMax ; i++ )
- {
- BZERO ( Whatever , 1024 );
- Where = PW_Start_Address + Pattern_Address_Real[i];
-/*fprintf ( info , "\n\nPattern %ld:\n" , i );*/
- for ( j=0 ; j<256 ; j++ )
- {
-
- Note = (in_data[Where+1]&0x7f)/2;
- FxVal = in_data[Where+3];
- Smp = ((in_data[Where+1]<<4)&0x10)|((in_data[Where+2]>>4)&0x0f);
- Fx = in_data[Where+2]&0x0f;
-
-/*fprintf ( info , "<-- note:%-2x smp:%-2x fx:%-2x fxval:%-2x\n"
- , Note,Smp,Fx,FxVal );*/
-
- k=in_data[Where];
- Whatever[k*4] = Smp&0xf0;
- Whatever[k*4] |= poss[Note][0];
- Whatever[k*4+1] = poss[Note][1];
- Whatever[k*4+2] = Fx | ((Smp<<4)&0xf0);
- Whatever[k*4+3] = FxVal;
- j = in_data[Where];
- Where += 4;
- }
- fwrite ( Whatever , 1024 , 1 , out );
- /*printf ( "." );*/
- }
- free ( Whatever );
- /*printf ( " ok\n" );*/
-
-
- /* sample data */
- fwrite ( &in_data[PW_Start_Address+Sample_Data_Address] , WholeSampleSize , 1 , out );
-
- /* crap ... */
- Crap ( " ZEN Packer " , BAD , BAD , out );
- /*
- fseek ( out , 830 , SEEK_SET );
- fprintf ( out , "[ Converted with ]" );
- fseek ( out , 860 , SEEK_SET );
- fprintf ( out , "[ Zen Packer ]" );
- fseek ( out , 890 , SEEK_SET );
- fprintf ( out , "[ to Protraker ]" );
- fseek ( out , 920 , SEEK_SET );
- fprintf ( out , "[ by Asle /ReDoX ]" );
- */
- fflush ( out );
- fclose ( out );
-
- printf ( "done\n" );
- return; /* useless ... but */
-}
+++ /dev/null
- GNU GENERAL PUBLIC LICENSE
- Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users. This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it. (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.) You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
- To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have. You must make sure that they, too, receive or can get the
-source code. And you must show them these terms so they know their
-rights.
-
- We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
- Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software. If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary. To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-\f
- GNU GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License. The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language. (Hereinafter, translation is included without limitation in
-the term "modification".) Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
- 1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
- 2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) You must cause the modified files to carry prominent notices
- stating that you changed the files and the date of any change.
-
- b) You must cause any work that you distribute or publish, that in
- whole or in part contains or is derived from the Program or any
- part thereof, to be licensed as a whole at no charge to all third
- parties under the terms of this License.
-
- c) If the modified program normally reads commands interactively
- when run, you must cause it, when started running for such
- interactive use in the most ordinary way, to print or display an
- announcement including an appropriate copyright notice and a
- notice that there is no warranty (or else, saying that you provide
- a warranty) and that users may redistribute the program under
- these conditions, and telling the user how to view a copy of this
- License. (Exception: if the Program itself is interactive but
- does not normally print such an announcement, your work based on
- the Program is not required to print an announcement.)
-\f
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
- a) Accompany it with the complete corresponding machine-readable
- source code, which must be distributed under the terms of Sections
- 1 and 2 above on a medium customarily used for software interchange; or,
-
- b) Accompany it with a written offer, valid for at least three
- years, to give any third party, for a charge no more than your
- cost of physically performing source distribution, a complete
- machine-readable copy of the corresponding source code, to be
- distributed under the terms of Sections 1 and 2 above on a medium
- customarily used for software interchange; or,
-
- c) Accompany it with the information you received as to the offer
- to distribute corresponding source code. (This alternative is
- allowed only for noncommercial distribution and only if you
- received the program in object code or executable form with such
- an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it. For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable. However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-\f
- 4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License. Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
- 5. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Program or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
- 6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
- 7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all. For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-\f
- 8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded. In such case, this License incorporates
-the limitation as if written in the body of this License.
-
- 9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation. If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
- 10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission. For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this. Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
- NO WARRANTY
-
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
- END OF TERMS AND CONDITIONS
-\f
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
- <one line to give the program's name and a brief idea of what it does.>
- Copyright (C) 19yy <name of author>
-
- This program 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 2 of the License, or
- (at your option) any later version.
-
- This program 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, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
- Gnomovision version 69, Copyright (C) 19yy name of author
- Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the program
- `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
- <signature of Ty Coon>, 1 April 1989
- Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs. If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library. If this is what you want to do, use the GNU Library General
-Public License instead of this License.
+++ /dev/null
-Thanks to:
- Nicolas Franck (Gryzor) for his marvellous Pro-Wizard 2
- and numerous packed files !.
-
- Mickael Doering for the *nix port and the constructives comments !.
-
- Thomas Neumann for pointing out a lot of bugs !.
- your help was valuable !.
-
- Markus Jaegermeister for pointing out bugs too, and for providing
- invaluable information regarding "exotic formats" !.
-
- Laurent Clévy for numerous synth descriptions !.
-
- Xigh for the Mingwin32 port/compiling, and for a couple of tips
- with the source code.
-
- all the people who pointed out bugs (recontact me for I've lost
- your names with the uncountable crash I've had lately..)
+++ /dev/null
-Known formats
--------------
-
- Note: The order is alphabetically arranged with the extensions.
-
- Note: the string between "()" is the default extension used by
- Pro-Wizard (for PeeCee) when a music is ripped.
-
- Note: "CPU" is the computer on which the format can be found
-
- Note: "DETECTION" and "SIZE CALC" describe how easy it is to detect the
- format and to calcutate its size. From the easiest to the hardest :
- "child's play","easy","some job","good job","hard job".
- Heh, that's MY point of view ... others might say otherwise for
- some formats ... .
-
-| EXT | NAME OF THE FORMAT | CPU | DETECTION | SIZE CALC |
-|=======|====================================|=====|===========|============|
-| (40A) |The Player 4.0A |Amiga| easy | some job |
-|-------|------------------------------------|-----|-----------|------------|
-| (40B) |The Player 4.0B |Amiga| easy | some job |
-|-------|------------------------------------|-----|-----------|------------|
-| (41A) |The Player 4.1A |Amiga| easy | some job |
-|-------|------------------------------------|-----|-----------|------------|
-| (50A) |The Player 5.0A |Amiga| good job! | easy |
-|-------|------------------------------------|-----|-----------|------------|
-| (60A) |The Player 6.0A (no sample pack) |Amiga| good job! | easy |
-|-------|------------------------------------|-----|-----------|------------|
-| (61A) |The Player 6.1A (no sample pack) |Amiga| good job! | easy |
-|-------|------------------------------------|-----|-----------|------------|
-| (AC1) |AC1D packer |Amiga| easy |child's play|
-|-------|------------------------------------|-----|-----------|------------|
-| (CRB) |Heatseeker mc1.0 |Amiga| some job | hard job ! |
-|-------|------------------------------------|-----|-----------|------------|
-| (DI) |Digital Illusion |Amiga| good job! |child's play|
-|-------|------------------------------------|-----|-----------|------------|
-| (EU) |Eureka packer |Amiga| good job! |child's play|
-|-------|------------------------------------|-----|-----------|------------|
-| (FCM) |FC-M packer |Amiga| easy | easy |
-|-------|------------------------------------|-----|-----------|------------|
-| (FT ) |Fuchs Tracker |Amiga| easy | easy |
-|-------|------------------------------------|-----|-----------|------------|
-| (FUZ) |Fuzzac packer |Amiga| easy | easy |
-|-------|------------------------------------|-----|-----------|------------|
-| (GMC) |Game Music Creator |Amiga| some job | easy |
-|-------|------------------------------------|-----|-----------|------------|
-| (GNU) |GnuPlayer |Amiga| easy | some job |
-|-------|------------------------------------|-----|-----------|------------|
-| (GPM) |GPMO (Crunch Player) |Amiga| easy | easy |
-|-------|------------------------------------|-----|-----------|------------|
-| (HRT) |Hornet packer |Amiga| easy | easy |
-|-------|------------------------------------|-----|-----------|------------|
-| (KRS) |Kris Tracker (Chip Tracker) |Amiga| easy | easy |
-|-------|------------------------------------|-----|-----------|------------|
-| (KSM) |Kefrens Sound Machine |Amiga| easy | easy |
-|-------|------------------------------------|-----|-----------|------------|
-| (MED) |MED - MMD0/MMD1 |Amiga| easy |child's play|
-|-------|------------------------------------|-----|-----------|------------|
-| (MOD) |Protracker |Amiga| easy | easy |
-|-------|------------------------------------|-----|-----------|------------|
-| (MOD) |SoundTracker |Amiga| easy | easy |
-|-------|------------------------------------|-----|-----------|------------|
-| (MOD) |StarTrekker |Amiga| easy | easy |
-|-------|------------------------------------|-----|-----------|------------|
-| (MP ) |Module protector |Amiga| good job! | easy |
-|-------|------------------------------------|-----|-----------|------------|
-| (NEW) |Newtron packer |Amiga| easy |child's play|
-|-------|------------------------------------|-----|-----------|------------|
-| (NRU) |Noiserunner |Amiga| easy | easy |
-|-------|------------------------------------|-----|-----------|------------|
-| (NP1) |NoisePacker v1 |Amiga| some job | easy |
-|-------|------------------------------------|-----|-----------|------------|
-| (NP2) |NoisePacker v2 |Amiga| some job | easy |
-|-------|------------------------------------|-----|-----------|------------|
-| (NP3) |NoisePacker v3 |Amiga| some job | easy |
-|-------|------------------------------------|-----|-----------|------------|
-| (P10) |ProPacker v1.0 |Amiga| some job | easy |
-|-------|------------------------------------|-----|-----------|------------|
-| (P21) |ProPacker v2.1 |Amiga| good job! | some job |
-|-------|------------------------------------|-----|-----------|------------|
-| (P30) |ProPacker v3.0 |Amiga| good job! | some job |
-|-------|------------------------------------|-----|-----------|------------|
-| (PHA) |PHA Packer |Amiga| some job | hard job ! |
-|-------|------------------------------------|-----|-----------|------------|
-| (PM) |Optimod's Power Music |Amiga| easy | easy |
-|-------|------------------------------------|-----|-----------|------------|
-| (PM0) |Promizer 0.1 |Amiga| good job! |child's play|
-|-------|------------------------------------|-----|-----------|------------|
-| (PM1) |Promizer 1.0c |Amiga| easy |child's play|
-|-------|------------------------------------|-----|-----------|------------|
-| (PMZ) |Promizer 1.8a |Amiga| easy |child's play|
-|-------|------------------------------------|-----|-----------|------------|
-| (PM2) |Promizer 2.0 |Amiga| easy |child's play|
-|-------|------------------------------------|-----|-----------|------------|
-| (PM4) |Promizer 4.0 |Amiga| easy | easy |
-|-------|------------------------------------|-----|-----------|------------|
-| (POL) |Polka packer |Amiga| easy | easy |
-|-------|------------------------------------|-----|-----------|------------|
-| (PR1) |ProRunner v1 |Amiga| easy | easy |
-|-------|------------------------------------|-----|-----------|------------|
-| (PR2) |ProRunner v2 |Amiga| easy | easy |
-|-------|------------------------------------|-----|-----------|------------|
-| (QC ) |Quadra Composer |Amiga| easy |Child's play|
-|-------|------------------------------------|-----|-----------|------------|
-| (SFX) |Sound FX 1.3 |Amiga| easy | easy |
-|-------|------------------------------------|-----|-----------|------------|
-| (SKT) |SKYT packer |Amiga| easy | easy |
-|-------|------------------------------------|-----|-----------|------------|
-| (STI) |STIM (Slamtilt) |Amiga| easy | some job |
-|-------|------------------------------------|-----|-----------|------------|
-| (STP) |StarTrekker pack |Amiga| good job! |child's play|
-|-------|------------------------------------|-----|-----------|------------|
-| (TDD) |The Dark Demon |Amiga| some job | easy |
-|-------|------------------------------------|-----|-----------|------------|
-| (TP1) |Tracker Packer v1 |Amiga| easy |child's play|
-|-------|------------------------------------|-----|-----------|------------|
-| (TP2) |Tracker Packer v2 |Amiga| easy | hard job ! |
-|-------|------------------------------------|-----|-----------|------------|
-| (TP3) |Tracker Packer v3 |Amiga| easy | hard job ! |
-|-------|------------------------------------|-----|-----------|------------|
-| (UN1) |UNIC Tracker v1 |Amiga| hard job! | easy |
-|-------|------------------------------------|-----|-----------|------------|
-| (UN2) |UNIC Tracker v2 |Amiga| hard job! | easy |
-|-------|------------------------------------|-----|-----------|------------|
-| (WN) |Wanton Packer |Amiga| easy |child's play|
-|-------|------------------------------------|-----|-----------|------------|
-| (XAN) |Xann Packer |Amiga| some job | some job |
-|-------|------------------------------------|-----|-----------|------------|
-| (ZEN) |Zen Packer |Amiga| some job |child's play|
-|-------|------------------------------------|-----|-----------|------------|
-
- * that's 58 formats now :)
-
-
- there, now some Synthetic ...
-
-| EXT | NAME OF THE FORMAT | CPU | DETECTION | SIZE CALC |
-|=======|====================================|=====|===========|============|
-| (BP*) |Sound Monitor v2/v3 |Amiga| easy | some job |
-|-------|------------------------------------|-----|-----------|------------|
-| (BFC) |BSI Future Composer |Amiga| easy | easy |
-|-------|------------------------------------|-----|-----------|------------|
-| (FC3) |Future Composer 1.3 |Amiga| easy | easy |
-|-------|------------------------------------|-----|-----------|------------|
-| (FC4) |Future Composer 1.4 |Amiga| easy | some job |
-|-------|------------------------------------|-----|-----------|------------|
-| (JAM) |JamCracker / Pro |Amiga| easy | some job |
-|-------|------------------------------------|-----|-----------|------------|
-| (SFX) |Sound FX 1.3/1.8 |Amiga| easy | some job |
-|-------|------------------------------------|-----|-----------|------------|
-
- * only 7 ... I'm working on that.
-
-
- Also, the data/exe files :
-
-| EXT | NAME OF THE FORMAT | CPU | DETECTION | SIZE CALC |
-|=======|=======================================|=====|===========|============|
-| (1AM) |Amnesty Design Data Packer (data) |Amiga| easy |Child's play|
-|-------|---------------------------------------|-----|-----------|------------|
-| (2AM) |Amnesty Design Data Packer (data) |Amiga| easy |Child's play|
-|-------|---------------------------------------|-----|-----------|------------|
-| (89A) |$08090A08 Data Cruncher (data) |Amiga| easy |Child's play|
-|-------|---------------------------------------|-----|-----------|------------|
-| (ARC) |arcD Data Cruncher (data) |Amiga| easy |Child's play|
-|-------|---------------------------------------|-----|-----------|------------|
-| (BK ) |ByteKiller 1.3/2.0/3.0/Pro 1.0 (exe) |Amiga| easy |Child's play|
-|-------|---------------------------------------|-----|-----------|------------|
-| (CRM) |Crunchmania / Normal (data) |Amiga| easy |Child's play|
-|-------|---------------------------------------|-----|-----------|------------|
-| (CRM) |Crunchmania Adress (exe) |Amiga| easy |Child's play|
-|-------|---------------------------------------|-----|-----------|------------|
-| (CRN) |CRND Data Cruncher (data) |Amiga| easy | easy |
-|-------|---------------------------------------|-----|-----------|------------|
-| (DBL) |Double Action 1.0 (exe) |Amiga| easy |Child's play|
-|-------|---------------------------------------|-----|-----------|------------|
-| (DJM) |Defjam Cruncher 3.2 / 3.2 pro (exe) |Amiga| easy |Child's play|
-|-------|---------------------------------------|-----|-----------|------------|
-| (FIR) |FIRE (RNC clone) Cruncher (data) |Amiga| easy |Child's play|
-|-------|---------------------------------------|-----|-----------|------------|
-| (HQC) |HQC Cruncher 2.0 (exe) |Amiga| easy |Child's play|
-|-------|---------------------------------------|-----|-----------|------------|
-| (ICE) |Ice! Cruncher (data) |Amiga| easy |Child's play|
-|-------|---------------------------------------|-----|-----------|------------|
-| (IMP) |Imploder (data) (ATN!-IMP!-CHFI) |Amiga| easy |Child's play|
-|-------|---------------------------------------|-----|-----------|------------|
-| (MAX) |Max Packer 1.2 (exe) |Amiga| easy | some job |
-|-------|---------------------------------------|-----|-----------|------------|
-| (MC ) |Master Cruncher 3.0 address (exe) |Amiga| easy |Child's play|
-|-------|---------------------------------------|-----|-----------|------------|
-| (MC ) |Mega Cruncher 1.0/1.2/Obj (exe) |Amiga| easy |Child's play|
-|-------|---------------------------------------|-----|-----------|------------|
-| (PAR )|PARA Data Cruncher (data) |Amiga| easy |Child's play|
-|-------|---------------------------------------|-----|-----------|------------|
-| (PP*) |Powerpacker 2.3/3.0/4.0/4.0 lib (exe) |Amiga| easy |Child's play|
-|-------|---------------------------------------|-----|-----------|------------|
-| (PP ) |AMOS Powerpacker Bank "PPbk" (data) |Amiga| easy |Child's play|
-|-------|---------------------------------------|-----|-----------|------------|
-| (RNC) |Propack (Rob Northern Cruncher) (data) |Amiga| easy |Child's play|
-|-------|---------------------------------------|-----|-----------|------------|
-| (RI ) |RelokIt 1.0 (exe) |Amiga| easy | some job |
-|-------|---------------------------------------|-----|-----------|------------|
-| (SB ) |=SB= Data Cruncher (data) |Amiga| easy |child's play|
-|-------|---------------------------------------|-----|-----------|------------|
-| (SF ) |SF Data Cruncher (data) |Amiga| easy |child's play|
-|-------|---------------------------------------|-----|-----------|------------|
-| (SPK) |Spike Cruncher (exe) |Amiga| easy |Child's play|
-|-------|---------------------------------------|-----|-----------|------------|
-| (STC) |StoneCracker 2.70 (exe) |Amiga| easy |Child's play|
-|-------|---------------------------------------|-----|-----------|------------|
-| (STC) |StoneCracker 4.04/4.01/4.03/3.10 (data)|Amiga| easy |Child's play|
-| |StoneCracker 3.00 (data) | | | |
-|-------|---------------------------------------|-----|-----------|------------|
-| (STC) |StoneCracker 2.99d/2.99b/3.10 (exe) |Amiga| easy |Child's play|
-|-------|---------------------------------------|-----|-----------|------------|
-| (SP ) |Syncro Packer 4.6 (exe) |Amiga| easy |Child's play|
-|-------|---------------------------------------|-----|-----------|------------|
-| (SC ) |Super Cruncher 2.7 (exe) |Amiga| easy |Child's play|
-|-------|---------------------------------------|-----|-----------|------------|
-| (T**) |Tetrapack 1.02/2.2/2.1 (exe) |Amiga| easy |Child's play|
-|-------|---------------------------------------|-----|-----------|------------|
-| (TIC) |Try-It Cruncher 1.01 (exe) |Amiga| easy | easy |
-|-------|---------------------------------------|-----|-----------|------------|
-| (TC ) |Time Cruncher 1.7 (exe) |Amiga| easy |Child's play|
-|-------|---------------------------------------|-----|-----------|------------|
-| (TNM) |TNM Cruncher 1.1 (exe) |Amiga| easy |Child's play|
-|-------|---------------------------------------|-----|-----------|------------|
-| (TIC) |TurboCruncher 6.1 (exe) |Amiga| easy | easy |
-|-------|---------------------------------------|-----|-----------|------------|
-| (VDC) |Virtual Dreams (VDCO) data cruncher |Amiga| easy |Child's play|
-|-------|---------------------------------------|-----|-----------|------------|
-| (XPK) |XPK-ed (data) |Amiga| easy |Child's play|
-|-------|---------------------------------------|-----|-----------|------------|
-
- * didn't want to do that in the first place ... but there it is and that's
- about 57 formats recognized now !.
-
-
+++ /dev/null
-Hot thanks
-----------
- - Nicolas Franck (Gryzor) for his marvellous (c) Pro-Wizard-2 :).
-
- - Mickael Doering for the *nix port and the constructives comments !.
-
- - Philippe Anel (Xigh) for compiling the WIN32 version
-
- - Slight for believeing in this wild project !. Wassup bro ?.
-
- - Thomas Neumann for pointing out a lot of bugs !.
-
- - Michael Trier, XtC and many others who sent me stuff to work with :).
-
- - Laurent Clevy for the numerous Synth Formats descriptions !.
-
- - Everyone who'll write to me about this program :).
-
-
-
-Some words
-----------
- So, yet here is another version with still some debugging done !. Seems I'll
-never see the end of it :). Anyway, Since I've some spare time these days,
-I come back on this prog. Though, I put my efforts onto the 'synth' part.
-Also, I'm a-working on some rather old/never used EXE packers.
-
- here are some things one ought to know about possible 'failure' of
-Pro-Wizard-1 (for PeeCee) ... meaning this prog might overlook or mistake
-some formats. The "sensibles" formats are :
- - Noisepacker v1 and v2
- (these two formats are VERY similars ... a NP1 can be recognised as a NP2.
- Rather harmless I should says, but ..)
- - Unic tracker v1 and v2
- (These two formats can be recognised as the other ... or even as a ptk but
- this very case has 0.01% chance to happen :). The first case, however, is
- most probable ... . The difference isn't that important, mind .. a title !)
- - The Player 6.0A and 6.1A with packed samples are on hold. Jarno *did*
- answer my old email (thx man !) and sent me a torough description on
- how to depack samples. Sadly, I've no time at all to do that these days.
-
- Most of the depackers included are still real gibberish code. I've rewritten
-quite a few yet, but I've found it's very expensive in time to rewritte
-lame old code :(. Not sure I'll finnish this ... .
-
- I've depacked NoiseTracker pack a long time ago ... but I wont include this
-format in ProWiz bcoz my depacker isn't 100% reliable :(. The fact is that
-if there are Arpeggii in the music, I cant find any single way to detect it.
-contact me for more infos :), I'll send you the description I've made ..
-reliable this one !.
-
- One word about StoneCracker v4.04 data files ... . I've included this format
-and several others because I'm fed-up doing it handly with Hex-ed !.
-The ripped files are STILL packed !, and you'll need to depack them with tools
-like XfdDecrunch. If you know how to depack these, you're welcome to send
-me some source code (68k or not).
- Also, I've expanded this to other fairly well used packers. Yet, I still
-dont know how to depack this by myself. Extracting that way saves hours of
-Hex-work .. at least for me :).
-
- One word about JamCracker. Xag version (JamCracker Pro 1.0A) saves a 19 bytes
-title at the end of the module. Prowiz for PC doesn't rip it since it's NOT
-in the original format. That's the only difference in the two versions (even
-if Xag's doc says there's no diff ...). So, if you want the title, just check
-the 19 bytes after the module.
-
- About Sound FX format, v1.3 and v1.8 are the same. Note that I attempted a
-conversion to ptk ... but most of the effects are not supported ... simply
-because I dont know what they do .. (doc please !). So, the conversion is
-only at a beta stage ... the rip is ok though :).
-
-
-
-
-Hellos and Messages
--------------------
- Slight : Les nouvelles se font (toujours) rares :(.
-
- Gryzor : hum ... ca fait une paye !.
-
- Xann : Contacte moi SVP !!!!!. J'ai, encore une fois, perdu ton addresse !.
- J'ai retrouve une intro de Silents codee par toi (91 ou 92 je crois)
- mais le format de la zik est zarb ... ca ressemble a ton "celebre"
- XANN player, mais ca colle pas vraiment. Tu as fais plusieurs
- version ? ou est-ce ce "fameux" Xann packer (le vrai) ???.
-
- Buzz : Keep up the GOOOD work on Exotica.
-
- Xigh : et ce tracker, bordel !?!?!?.
-
-
-
-Contact the author
-------------------
- Several ways to contact me ..
-
- - Snail mail (new !!)
- Chipaux "asle" Sylvain
- 55 rue des grands champs
- 75020 Paris
- France
-
- - E-Mail
- asle@free.fr
- (can get attached binary files).
- or catch me on Exotica Forum !.
-
-
- - WWW
- http://asle.free.fr/prowiz/
- there's always the latest src version on there
-
-
- - Tel
- none at now
-
-
-
-Last word
----------
- I'll welcome ANY comment that might arise from this program. Also, new
-formats or bug reports (with Pro-Wizard (for PeeCee) version number !).
-
-
-
- Sylvain "asle" Chipaux.
+++ /dev/null
-Things to do
-------------
- - Adding the other formats I've depacked so far :).
- -> Channel Player 1,2,3 (wont be easy ..)
-
- - Adding the whole lot of other ptk-compatible formats I still dont have
- decrunched yet :(.
- -> Pygmy packer
- -> AMOS music bank (what a mess !)
- -> an alien XANN packer ? (found in an old Silents intro :)
-
- - Adding some PC music format (S3M ...)
-
- - adding various synth formats since I got loads of tracker ! :).
-
-
-
+++ /dev/null
-CHANGE LOG
-----------
-
-Date format is DDMMYYYY. (from lattest to first)
-
-
-24112003 Version 1.50.b3
-
- More Double Action v1.0 to be found
- _types_ files complete now
- SKYT debugged (forgot to remove some code)
-
-23112003 Version 1.50.b2
-
- Fixed TP1 patternlist handling. Should work with any TP1 now.
- New supported (PTK clones) format :
- - Noise From Heaven #2 musicdisk (Iris'2001)
- - The Player 2.2a (thx to Exotica forum teams)
- - The Player 3.0a (not really working in fact)
- New supported (exe/data)format :
- - StoneCracker 2.99/3.00 - with rebuilding
-
-23042003 Version 1.50.b1
-
- Some bugs correction of previous release :(
- A lot less fake Module Protector/P50a/PP10 should be found
- Overall PhaPacker (Propacker 1.0) debugging. Should be ok now.
- FC13/FC14 false test fixed .. all examples should be detected ok now.
- Various optimizings
- All RelokIt 1.0 will be ripped.
- Found a solution for those 00h. Takes nearly no time now :)
- New supported (PTK clones) formats :
- - Newtron
- - GPMO
- - Polka Packer (Thx Michael Trier for the example !)
- - GnuPlayer (Thx Kyz for the great description !)
- - AmBk - Amos Bank (no converting back to Ptk yet)
- New supported format :
- - XM
- New supported (exe/data)formats :
- - Mega Cruncher Obj EXE packer (old old old :) - with rebuilding
- - TurboSqueezer 6.1 (1989 !) - no rebuilding !.
- - StoneCracker 2.99d/2.99b/3.10 - with rebuilding
-
-09062002 Version 1.49.4 (released on the 7th, mar 2003)
-
- Some other issues corrected (mem violations ...)
- Removed the remaining bzero() ... forgot them :(.
- Amiga port (Crown/Crb's request).
- New supported (exe/data)formats :
- - (Ace?) DataCruncher
-
-04052002 Version 1.49.3
-
- Removed all printf() from rip/*.c to group that in misc/misc.c.
- Broke the 3 chars limit for extensions of saved files. (thx xigh !)
-
-28122001 Version 1.49.2 (not released)
-
- Compiling on FreeBSD now, meaning all "hasardous" file reading
- crashed the prog !. A lot have been corrected (all ?).
- Removed the counter during search. Couldn't find an "easy"
- solution :(.
-
-05052001 Version 1.49.1
-
- More or less standard look-alike doc
- Replaced bzero() with memset()
- The Player 4.1a corrected (A cmd signed -> unsigned conversion)
- Numerous bugfix (mostly to prevent readings outside of file)
- in ProPacker 2.1, Noisepacker 3, Promizer 0.1.
- added transco table for sample names in Kefrens Sound Machine modules.
- New supported (exe/data)formats :
- - Powerpacker 4.0 Library EXE packer (rare)
-
-20122000 Version 1.49.0
-
- KRIS depacker/ripper debugged
- Some useless code removed
- New supported (synth) formats :
- - MED (MMD0/MMD1) by Teijo Kinnunen (19??)
- New supported (exe/data)formats :
- - Crunchmania Address EXE packer (rather frequent)
-
-01072000 Version 1.48
-
- New supported (exe/data)formats :
- - Amnesty Design (1AM) data packer (very rare)
- - Amnesty Design (2AM) data packer (very rare)
-
-23062000 Version 1.47
-
- Two new effects added in XANN Packer format.
- Added another UNIC tracker case ("UNIC" string ..)
- New supported (exe/data)formats :
- - BytekillerPro 1.0 - and rebuilding of header (very rare)
- - HQC Cruncher 2.0 - no rebuild yet (very rare)
- - Try-It Cruncher 1.01 - with rebuild (very rare)
- (too few exemple to stick on this ripper ...)
- New supported (synth) formats :
- - Future Composer 1.3 (by Supersero / The Superions - 1990 ?)
- - Future Composer 1.4 (by Supersero / The Superions - 1990)
-
-03042000 Version 1.46
-
- mainly some small debugging in various tests.
- all those corrected bugs where pointed out by Thomas Neumann
- some other are not yet corrected though. I made all the quickies
- before that hard stuff :).
-
-30111999 Version 1.45.c3
-
- Finally editable extension are working ... even the last one. I'm
- working on long extensions now, not only 3 chars.
- New supported (exe/data)formats :
- - CRND Data Cruncher (very rare)
- - =SB= Data Cruncher (very rare)
- - SF Data Cruncher (rare)
- - Virtual Dreams (VDCO) Data Cruncher (very rare)
- - SQ/SP Data Cruncher (missing SA/SC ..)
- New supported (PTK Clone) formats :
- - IceTracker 1.0 (IcePic)
- - Soundtracker 2.6 (Mnemotron / Spreadpoint)
- More optimizings by removing fopen() funcs. There's but a few
- formats left to do.
- Enhanced rebuilding of Time Crunched Binaries (24 last bytes)
- Debugged Module Protector depacker
- some internal rewritting ... mostly to speed-up and to
- shorten more than quite a bit binaries.
-
-06061999 Version 1.44.005
-
- Major rewritting ... a dozen or so files removed !.
- Overall bugs corrections (mainly around sizes calculations)
- A bug in UNIC2 ripper ... some unallocated value :(.
- Aome debugging in Pha-ripper (still some job)
- Aome bugs in UNIC1 tester ... stupid bugs, as usual :(.
- Rrewrote some parts (restructured source code ... less lines)
- Added another IAM packer (data) case ("ATM5")
- Added some code to rewrite the header of EXE files with empty and/
- or no header. Usefull with oldish megademos :). That goes for
- every supported EXE format. Get the list below.
- Optimized PTK-depackers by removing the open() and read()
- functions ... very high speed while depacking now :). done for
- the following formats (Heh it takes time !!) :
- - ProRunner v2.0 - SKYT packer - STIM (Slamtilt) packer
- - Zen packer - Xann packer - Wanton packer
- - Unic tracker v1/v2 - Tracker packer v3/v2
- Enhanced detection for the following formats :
- - Digital Illusion detection (fake DI found)
- - Startrekker pack (bugged)
- - Zen packer (crashed the prog sometime)
- - KRIS tracker (fake KRIS found)
- - Pha Packer (bugged)
- - SoundTracker (bugged)
- - Tracker Packer 3 (bugged)
- New supported (PTK Clone) formats :
- - Quadra Composer
- - The Dark Demon (group name)
- - Fuchs Tracker (Andreas Fuchs - 1990)
- New supported (synth) formats :
- - SoundMonitor v3 (Brian Postma - 1993)
- - JamCracker / Pro (M. Gemmel - 1989 / Xag of Betrayal - 1990)
- - BSI Future Composer (Tony Bybell aka Slates of BSI - 1990-1996)
- - Sound FX 1.3 (Battle Isle) by Christian Haller & Christian A. Weber
- in 1988. V1.8 is samely copyrighted in 1989.
- New supported (exe/data)formats :
- - FIRE (RNC clone) Cruncher (rare)
- - Max Packer 1.2 (exe rare)
- - Ice! Cruncher (data ... rare)
- - arcD Data Cruncher (very rare)
- - PARA Data Cruncher (very rare)
- - Propack (RNC) data (Rob Northern Cruncher ... Antic cruncher :)
- found in a LOT of 88-93 games !.
- - Double Action 1.0 (exe files) (in some rather old demos !)
- - Powerpacker 2.3 / 3.0 / 4.0 (exe files)
- - ByteKiller 2.0 / 3.0 (exe files)
- - Tetrapack 1.02 (exe files)
- - Master Cruncher 3.0 addr (exe files)
- - Mega Cruncher 1.0/1.2 (exe files ... extremly old :)
- - Spike Cruncher (exe files ... rare)
- - StoneCracker 2.70 (exe files ... rare)
- - StoneCracker 3.00 (data)
- - Syncro Packer 4.6 (exe files ... rare)
- - TNM Cruncher 1.1 (exe files ... rare)
- - Super Cruncher 2.7 (exe files ... extremly rare)
- - AMOS PowerPacker Bank "PPbk" (data)
- - RelokIt 1.0 (exe files ... rare)
- Following formats wont be supported :
- - TPWM Cruncher (Battle Isle - Blue Byte) - Unrippable
- - Powerpacker 2.0 (PP20) data - Unrippable
- - StoneCracker 4.04/3.10 (exe file) bcoz it contains a S404 data
- - Propack RNC (exe files) (RNC data inside)
- - IAM packer 1.0 too (exe files) (ICE! or ATM5 data inside)
-
-26021999 Version 1.43 (not released)
-
- Module Protector and Heatseeker detections enhanced
- (very look alike formats ..)
- Fake ProPacker 3.0 were found ... corrected.
- Fake UNIC tracker were found ... corrected.
- Bad PP20 localisation corrected
- Removed "converting to ptk" msg when ripping S404 files :)
- Bug in Phapacker depacker corrected (still some job in there !)
- Rewrote 20% of Promizer 1.8a depacker ... some problems with
- the pattern list.
- Many fake soundtracker were found ... removed a lot !.
- Fake "damaged _TYPES_ file" error message corrected.
- New filename when saving. alphabetical letters proved to be not
- enough for some productions ... so, now, it's numbers !. (max:99999999)
- good job to code that coz my sources were a bit shitty :)
- New supported (EXE) format :
- - Tetrapack 2.2/2.1 (Exe-files, not music file)
- - Crunchmania / Crunchmania Normal (packed data files)
- - Defjam Cruncher 3.2 / 3.2 pro (Exe-files)
- - Stonecracker 4.01 / 4.03 / 3.10 (data)
- - Byte Killer 1.3 (Exe-files)
- - XPK-ed files (any format since it's all the same to get the size :)
- - Imploder (data)
-
-13061998 Version 1.42 (not released)
-
- Protracker detection bug corrected
- New supported format :
- - SoundTracker (15 samples)
-
-20051998 Version 1.41 (20/05/98)
- Save names not incrementing first letter when
- ripping "not to be converted files" bug corrected
- (e.g. PTK,BP,STC,StarTK)
- New supported format :
- - STIM (Slamtilt)
-
-22021998 Version 1.40
-
- SIGSEGV error corrected (bad compiler option).
- Digital Illusion detection bug corrected.
- Game Music Creator detection bug corrected.
- NoisePacker v1 detection bug corrected.
- ProPacker v1 detection bug corrected.
- UNIC tracker 2 detection bug corrected.
- XANN packer detection bug corrected (Grrrr).
- New depackers added (all in fact :) :
- - AC1D packer
- - Digital Illusion
- - Eureka packer
- - FC-M packer
- - Fuzzac packer
- - Game Music Creator
- - Heatseeker mc1.0
- - Hornet packer
- - Kris tracker (chip tracker)
- - Kefrens Sound Machine
- - Module Protector
- - Noiserunner
- - NoisePacker v1,v2 & v3
- - The Player 4.0A,4.0B,4.1A,5.0A,6.0A & 6.1A
- - PhaPacker
- - Promizer 0.1,1.0c,1.8a,2.0,4.0
- - Power Music
- - ProPacker 1.0,2.1,3.0
- - ProRunner v1,v2
- - SKYT packer
- - StarTrekker pack
- - Tracker packer v1,v2,v3
- - UNIC tracker v1,v2
- - Wanton packer
- - XANN packer
- - ZEN packer
-
-15021998 Version 1.31 (not released)
-
- Enhanced tests for GMC modules.
- Enhanced tests for Digital Illusion modules.
- Enhanced tests for Eureka Packer modules.
- Enhanced tests for UNIC 1/2 tracker modules.
- P50A samples can be delta !!!. Argh (corrected).
- P60A with packed samples cant be ripped for I dont know
- how to calculate the packed sample sizes.
- some P50A and P60A where not found bcoz of a lame test.
- New supported formats :
- - StarTrekker
- - StoneCracker v4.04 Data (not a music file !!!)
- - The Player 6.1A (yep !)
-
-21011998 Version 1.3 (not released)
-
- Complete rewrite of the package.
- Enhanced tests for the XANN packer ... again (*SIGH*)
- Added some sort of counter to display where we are in the file.
- Somehow, it's useless but it tells the user the prog did not hang :),
- the bad news is that it slows down a bit the prog :( ... and it's
- ugly !. I'll try to do better sometime later.
- New supported formats :
- - Fuzzac packer
- - Game Music Creator
- - Heatseeker mc1.0
- - Kefrens Sound Machine
- - Noiserunner
- - NoisePacker v1
- - NoisePacker v2
- - NoisePacker v3
- - Promizer 4.0
- - ProPacker v1.0
- - The Player v4.0A
- - The Player v4.0B
- - The Player v4.1A
- - The Player v5.0A
- - The Player v6.0A
- - Tracker Packer v1
- - Tracker Packer v2
- - Tracker Packer v3
- - Zen Packer
-
-12111997 Version 1.2 (not released)
-
- New supported formats :
- - UNIC tracker v1
- - UNIC tracker v2
- - Protracker (forgot it :).
-
-11111997 Version 1.1 (not released)
-
- SoundMon size calculation bug corrected (synth smp ..)
- Enhanced tests for the XANN packer.
- Added the possibility to edit the default extensions.
- New supported formats :
- - AC1D packer
- - Digital Illusion
- - Eureka packer
- - Module protector
- - Pha packer
- - Promizer v0.1
- - ProPacker v2.1
- - ProPacker v3.0
- - StarTrekker pack
-
-09111997 Version 1.0 (09/11/97)
- First version (not released).
+++ /dev/null
-/*
- * extern.h
- *
- * part of Pro-Wizard-1 package
- * (c) Sylvain "Asle" Chipaux
-*/
-
-/* tests */
-extern short testAmBk ( void );
-extern short testAC1D ( void );
-extern short testArcDDataCruncher ( void );
-extern short testSoundFX13 ( void );
-extern short testBP ( void );
-extern short testBSIFutureComposer ( void );
-extern short testByteKiller_13 ( void );
-extern short testByteKiller_20 ( void );
-extern short testByteKiller30 ( void );
-extern short testbytekillerpro10 ( void );
-extern short testcrunchmaniaAddr ( void );
-extern short testCRND ( void );
-extern short testDefjam32 ( void );
-extern short testDefjam32pro ( void );
-extern short testDI ( void );
-extern short testDigiBooster17 ( void );
-extern short testDoubleAction10 ( void );
-extern short testEUREKA ( void );
-extern short testFC_M ( void );
-extern short testFC13 ( void );
-extern short testFC14 ( void );
-extern short testFuchsTracker ( void );
-extern short testFUZZAC ( void );
-extern short testGnuPlayer ( void );
-extern short testGMC ( void );
-extern short testGPMO ( void );
-extern short testHEATSEEKER ( void );
-extern short testHQCCruncher2 ( void );
-extern short testHRT ( void );
-extern short testJamCracker ( void );
-extern short testKRIS ( void );
-extern short testKSM ( void );
-extern short testMasterCruncher30addr ( void );
-extern short testMaxPacker12 ( void );
-extern short testMegaCruncher10 ( void );
-extern short testMegaCruncher12 ( void );
-extern short testMegaCruncherObj ( void );
-extern short testMMD0 ( void );
-extern short testNewtron ( void );
-extern short testNFH ( void );
-extern short testNoiserunner ( void );
-extern short testNoisepacker1 ( void );
-extern short testNoisepacker2 ( void );
-extern short testNoisepacker3 ( void );
-extern short testMP_noID ( void );
-extern short testMP_withID ( void );
-extern short testP40A ( void );
-extern short testP41A ( void );
-extern short testP50A ( void );
-extern short testP60A_nopack ( void );
-extern short testP60A_pack ( void );
-extern short testP61A_nopack ( void );
-extern short testP61A_pack ( void );
-extern short testPHA ( void );
-extern short testPM ( void );
-extern short testPM01 ( void );
-extern short testPM10c ( void );
-extern short testPM2 ( void );
-extern short testPM40 ( void );
-extern short testPMZ ( void );
-extern short testPolka ( void );
-extern short testPowerpacker23 ( void );
-extern short testPowerpacker30 ( void );
-extern short testPowerpacker40 ( void );
-extern short testPowerpacker4lib ( void );
-extern short testPP10 ( void );
-extern short testPP21 ( void );
-extern short testPP30 ( void );
-extern short testPPbk ( void );
-extern short testPRUN1 ( void );
-extern short testPRUN2 ( void );
-extern short testPTK ( void );
-extern short testQuadraComposer ( void );
-extern short testRelokIt10 ( void );
-extern short testSKYT ( void );
-extern short testSoundTracker ( void );
-extern short testSpikeCruncher ( void );
-extern short testSTARPACK ( void );
-extern short testSTC299 ( void );
-extern short testSTC299b ( void );
-extern short testSTC299d ( void );
-extern short testSTC300 ( void );
-extern short testSTC310 ( void );
-extern short testSTK26 ( void );
-extern short testSTIM ( void );
-extern short testStoneCracker270 ( void );
-extern short testSuperCruncher27 ( void );
-extern short testSyncroPacker ( void );
-extern short testTetrapack102 ( void );
-extern short testTetrapack_2_1 ( void );
-extern short testTetrapack_2_2 ( void );
-extern short testTheDarkDemon ( void );
-extern short testTimeCruncher17 ( void );
-extern short testTNMCruncher11 ( void );
-extern short testTP1 ( void );
-extern short testTP2 ( void );
-extern short testTP3 ( void );
-extern short testTryIt101 ( void );
-extern short testTurboSqueezer61 ( void );
-extern short testUNIC_noID ( void );
-extern short testUNIC_withID ( void );
-extern short testUNIC_withemptyID ( void );
-extern short testUNIC2 ( void );
-extern short testWN ( void );
-extern short testXANN ( void );
-extern short testXM ( void );
-extern short testZEN ( void );
-
-/* rips */
-
-extern void Rip_AmBk ( void );
-extern void Rip_AC1D ( void );
-extern void Rip_SoundFX13 ( void );
-extern void Rip_BP ( void );
-extern void Rip_BSIFutureComposer ( void );
-extern void Rip_ByteKiller ( void );
-extern void Rip_ByteKiller30 ( void );
-extern void Rip_bytekillerpro10 ( void );
-extern void Rip_CrunchmaniaAddr ( void );
-extern void Rip_Defjam32 ( void );
-extern void Rip_DI ( void );
-extern void Rip_DigiBooster17 ( void );
-extern void Rip_DoubleAction10 ( void );
-extern void Rip_EUREKA ( void );
-extern void Rip_FC_M ( void );
-extern void Rip_FC13 ( void );
-extern void Rip_FC14 ( void );
-extern void Rip_FuchsTracker ( void );
-extern void Rip_Fuzzac ( void );
-extern void Rip_GnuPlayer ( void );
-extern void Rip_GMC ( void );
-extern void Rip_GPMO ( void );
-extern void Rip_HEATSEEKER ( void );
-extern void Rip_HQCCruncher2 ( void );
-extern void Rip_HRT ( void );
-extern void Rip_JamCracker ( void );
-extern void Rip_KRIS ( void );
-extern void Rip_KSM ( void );
-extern void Rip_MP_noID ( void );
-extern void Rip_MP_withID ( void );
-extern void Rip_Newtron ( void );
-extern void Rip_NFH ( void );
-extern void Rip_Noisepacker1 ( void );
-extern void Rip_Noisepacker2 ( void );
-extern void Rip_Noisepacker3 ( void );
-extern void Rip_Noiserunner ( void );
-extern void Rip_MasterCruncher30addr ( void );
-extern void Rip_MaxPacker12 ( void );
-extern void Rip_MegaCruncher ( void );
-extern void Rip_MegaCruncherObj ( void );
-extern void Rip_MMD0 ( void );
-extern void Rip_P22A ( void );
-extern void Rip_P30A ( void );
-extern void Rip_P40A ( void );
-extern void Rip_P40B ( void );
-extern void Rip_P41A ( void );
-extern void Rip_P50A ( void );
-extern void Rip_P60A ( void );
-extern void Rip_P61A ( void );
-extern void Rip_PHA ( void );
-extern void Rip_PM ( void );
-extern void Rip_PM01 ( void );
-extern void Rip_PM10c ( void );
-extern void Rip_PM18a ( void );
-extern void Rip_PM20 ( void );
-extern void Rip_PM40 ( void );
-extern void Rip_Polka ( void );
-extern void Rip_Powerpacker23 ( void );
-extern void Rip_Powerpacker30 ( void );
-extern void Rip_Powerpacker40 ( void );
-extern void Rip_Powerpacker4lib ( void );
-extern void Rip_PP10 ( void );
-extern void Rip_PP21 ( void );
-extern void Rip_PP30 ( void );
-extern void Rip_PPbk ( void );
-extern void Rip_PTK ( void );
-extern void Rip_QuadraComposer ( void );
-extern void Rip_RelokIt10 ( void );
-extern void Rip_SKYT ( void );
-extern void Rip_SpikeCruncher ( void );
-extern void Rip_SoundTracker ( void );
-extern void Rip_STARPACK ( void );
-extern void Rip_StarTrekker ( void );
-extern void Rip_STC299 ( void );
-extern void Rip_STC299b ( void );
-extern void Rip_STC299d ( void );
-extern void Rip_STC300 ( void );
-extern void Rip_STC310 ( void );
-extern void Rip_STK26 ( void );
-extern void Rip_STIM ( void );
-extern void Rip_StoneCracker270 ( void );
-extern void Rip_SuperCruncher27 ( void );
-extern void Rip_SyncroPacker ( void );
-extern void Rip_Tetrapack102 ( void );
-extern void Rip_Tetrapack_2_1 ( void );
-extern void Rip_Tetrapack_2_2 ( void );
-extern void Rip_TheDarkDemon ( void );
-extern void Rip_TimeCruncher17 ( void );
-extern void Rip_TNMCruncher11 ( void );
-extern void Rip_TP1 ( void );
-extern void Rip_TP2 ( void );
-extern void Rip_TP3 ( void );
-extern void Rip_TryIt101 ( void );
-extern void Rip_TurboSqueezer61 ( void );
-extern void Rip_PRUN2 ( void );
-extern void Rip_PRUN1 ( void );
-extern void Rip_UNIC_withID ( void );
-extern void Rip_UNIC_noID ( void );
-extern void Rip_UNIC2 ( void );
-extern void Rip_WN ( void );
-extern void Rip_XANN ( void );
-extern void Rip_XM ( void );
-extern void Rip_ZEN ( void );
-
-/* depack */
-
-extern void Depack_AmBk ( void );
-extern void Depack_AC1D ( void );
-extern void Depack_SoundFX13 ( void );
-extern void Depack_DI ( void );
-extern void Depack_EUREKA ( void );
-extern void Depack_FC_M ( void );
-extern void Depack_FuchsTracker ( void );
-extern void Depack_Fuzzac ( void );
-extern void Depack_GnuPlayer ( void );
-extern void Depack_GMC ( void );
-extern void Depack_GPMO ( void );
-extern void Depack_HEATSEEKER ( void );
-extern void Depack_HRT ( void );
-extern void Depack_KRIS ( void );
-extern void Depack_KSM ( void );
-extern void Depack_MP ( void );
-extern void Depack_Newtron ( void );
-extern void Depack_NFH ( void );
-extern void Depack_Noiserunner ( void );
-extern void Depack_Noisepacker1 ( void );
-extern void Depack_Noisepacker2 ( void );
-extern void Depack_Noisepacker3 ( void );
-extern void Depack_P22 ( void );
-extern void Depack_P30 ( void );
-extern void Depack_P40 ( void );
-extern void Depack_P41A ( void );
-extern void Depack_P50A ( void );
-extern void Depack_P60A ( void );
-extern void Depack_P61A ( void );
-extern void Depack_PHA ( void );
-extern void Depack_PM01 ( void );
-extern void Depack_PM10c ( void );
-extern void Depack_PM18a ( void );
-extern void Depack_PM20 ( void );
-extern void Depack_PM40 ( void );
-extern void Depack_PM ( void );
-extern void Depack_Polka ( void );
-extern void Depack_PP10 ( void );
-extern void Depack_PP21 ( void );
-extern void Depack_PP30 ( void );
-extern void Depack_PRUN1 ( void );
-extern void Depack_PRUN2 ( void );
-extern void Depack_QuadraComposer ( void );
-extern void Depack_SKYT ( void );
-extern void Depack_STARPACK ( void );
-extern void Depack_STK26 ( void );
-extern void Depack_STIM ( void );
-extern void Depack_TheDarkDemon ( void );
-extern void Depack_TP1 ( void );
-extern void Depack_TP2 ( void );
-extern void Depack_TP3 ( void );
-extern void Depack_UNIC ( void );
-extern void Depack_UNIC2 ( void );
-extern void Depack_WN ( void );
-extern void Depack_XANN ( void );
-extern void Depack_ZEN ( void );
-
-/* misc */
-
-extern void Support_Types ( void );
-extern void Support_Types_FileDefault ( void );
-extern void Save_Rip ( char *, int );
-extern void Save_Rip_Special ( char *, int, Uchar * , Ulong );
-extern void Crap ( char *, Uchar, Uchar, FILE *);
-extern short testSpecialCruncherData ( long , long );
-extern void Rip_SpecialCruncherData ( char * , int , int );
-extern short test_1_start ( Ulong );
-extern short test_smps ( long, long, long, Uchar, Uchar );
-extern long GetFileSizeX ( char * );
-
-/* globals */
-/* Some say it's badly coding when using Globals ... sure it is, now what's the solution ? */
-
-extern FILE *PW_in,*PW_out;
-extern long PW_Start_Address;
-extern Ulong OutputSize;
-extern long PW_in_size;
-extern long Cpt_Filename;
-extern Ulong PW_i;
-extern Ulong PW_j,PW_k,PW_l,PW_m,PW_n,PW_o;
-extern Uchar *in_data;
-/*extern Uchar OutName[5];*/
-extern char OutName_final[33];
-extern char Depacked_OutName[33];
-extern Uchar Save_Status;
-extern Ulong PW_WholeSampleSize;
-extern char Extensions[_KNOWN_FORMATS+1][33];
-extern Uchar CONVERT;
-extern Uchar Amiga_EXE_Header;
+++ /dev/null
-/*
- * ProWizard PC include file
-*/
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#ifndef _WIN32
-#include <sys/param.h">
-#endif
-/*#include <gtk/gtk.h>*/
-#ifdef DOS
-#include <winsock.h>
-#endif
-
-typedef unsigned char Uchar;
-typedef unsigned long Ulong;
-typedef unsigned short Ushort;
-
-/* modifications by TW */
-
-#include "moduleripper.h"
-#ifdef _WIN32
-__inline Ulong htonl (Ulong v)
-{
- return (v >> 24) | ((v >> 8) & 0xff00) | (v << 24) | ((v << 8) & 0xff0000);
-}
-#endif
-
-extern void write_log (const char *,...);
-#define printf write_log
-#define mr_fopen moduleripper_fopen
-#define mr2_fopen moduleripper2_fopen
-
-/* modifications end */
-
-#define _KNOWN_FORMATS 120
-#define _TYPES_FILENAME "_types_"
-#define _TYPES_LINE_LENGHT 256
-#define MINIMAL_FILE_LENGHT 64
-#define GOOD 0
-#define BAD 1
-#define BZERO(a,b) memset(a,0,b)
-
-enum
-{
- AC1D_packer = 0,
-/* version 2 / 3 */
- SoundMonitor,
- FC_M_packer,
- Hornet_packer,
- KRIS_tracker,
- Power_Music,
- Promizer_10c,
- Promizer_18a,
- Promizer_20,
- ProRunner_v1,
- ProRunner_v2,
- SKYT_packer,
- Wanton_packer,
- XANN_packer,
- Module_protector,
- Digital_illusion,
- Pha_packer,
- Promizer_01,
- Propacker_21,
- Propacker_30,
- Eureka_packer,
- Star_pack,
- Protracker,
- UNIC_v1,
- UNIC_v2,
- Fuzzac,
- GMC,
- Heatseeker,
- KSM,
- Noiserunner,
- Noisepacker1,
- Noisepacker2,
- Noisepacker3,
- P40A,
- P40B,
- P41A,
- PM40,
- PP10,
- TP1,
- TP2,
- TP3,
- ZEN,
- P50A,
- P60A,
- StarTrekker,
- /* stands for S404(data/exe),S401(data),S403(data) and S310,S300(data) */
- S404,
- StoneCracker270,
- P61A,
- STIM,
- SoundTracker,
- TPACK22,
-/* stands for CrM! & CrM2 and Crunchmania Address*/
- CRM1,
-/* stands for both Defjam 3.2 & 3.2 pro */
- Defjam_32,
- TPACK21,
- ICE,
-/* stands for version 1.3 , 2.0 , 3.0 and Pro 1.0*/
- ByteKiller,
- XPK,
- IMP,
- RNC,
- Double_Action,
- Powerpacker3,
- Powerpacker4,
- Powerpacker23,
- SpikeCruncher,
- TPACK102,
- TimeCruncher,
- MasterCruncher,
-/* stands also for Mega Cruncher 1.0/1.2 */
- MegaCruncher,
- JamCracker,
- BSIFC,
- DigiBooster,
- QuadraComposer,
- TDD,
- FuchsTracker,
- SyncroPacker,
- TNMCruncher,
- SuperCruncher,
-/* not for PP20 themselves :) ... only PP20 subfiles inside PPbk */
- PP20,
- RelokIt,
- STC292data,
- FIRE,
- MaxPacker,
- SoundFX,
- arcD,
- PARA,
- CRND,
- SB_DataCruncher,
- SF,
- RLE,
- VDCO,
- SQ,
- SP,
- STK26,
- IceTracker,
- HQC,
- TryIt,
- FC13,
- FC14,
- AmnestyDesign1,
- AmnestyDesign2,
- MED,
- ACECruncherData,
- Newtron,
- GPMO,
- PolkaPacker,
- GnuPlayer,
- CJ_DataCruncher,
- AmBk,
- MasterCruncher3data,
- XM,
- MegaCruncherObj,
- TurboSqueezer61,
- STC299d,
- STC310,
- STC299b,
- STC299,
- STC300,
- ThePlayer30a,
- ThePlayer22a,
- NoiseFromHeaven,
-};
+++ /dev/null
-/*
- * ptk.pitchs
- *
- * part of Pro-Wizard-1 package
- * (c) Sylvain "Asle" Chipaux
- *
-*/
-
- poss[0][0]=0x00, poss[0][1]=0x00;
-
- poss[1][0]=0x03, poss[1][1]=0x58;
- poss[2][0]=0x03, poss[2][1]=0x28;
- poss[3][0]=0x02, poss[3][1]=0xfa;
- poss[4][0]=0x02, poss[4][1]=0xd0;
- poss[5][0]=0x02, poss[5][1]=0xa6;
- poss[6][0]=0x02, poss[6][1]=0x80; /* 1 */
- poss[7][0]=0x02, poss[7][1]=0x5c;
- poss[8][0]=0x02, poss[8][1]=0x3a;
- poss[9][0]=0x02, poss[9][1]=0x1a;
- poss[10][0]=0x01, poss[10][1]=0xfc;
- poss[11][0]=0x01, poss[11][1]=0xe0;
- poss[12][0]=0x01, poss[12][1]=0xc5;
-
- poss[13][0]=0x01, poss[13][1]=0xac;
- poss[14][0]=0x01, poss[14][1]=0x94;
- poss[15][0]=0x01, poss[15][1]=0x7d;
- poss[16][0]=0x01, poss[16][1]=0x68;
- poss[17][0]=0x01, poss[17][1]=0x53;
- poss[18][0]=0x01, poss[18][1]=0x40; /* 2 */
- poss[19][0]=0x01, poss[19][1]=0x2e;
- poss[20][0]=0x01, poss[20][1]=0x1d;
- poss[21][0]=0x01, poss[21][1]=0x0d;
- poss[22][0]=0x00, poss[22][1]=0xfe;
- poss[23][0]=0x00, poss[23][1]=0xf0;
- poss[24][0]=0x00, poss[24][1]=0xe2;
-
- poss[25][0]=0x00, poss[25][1]=0xd6;
- poss[26][0]=0x00, poss[26][1]=0xca;
- poss[27][0]=0x00, poss[27][1]=0xbe;
- poss[28][0]=0x00, poss[28][1]=0xb4;
- poss[29][0]=0x00, poss[29][1]=0xaa;
- poss[30][0]=0x00, poss[30][1]=0xa0; /* 3 */
- poss[31][0]=0x00, poss[31][1]=0x97;
- poss[32][0]=0x00, poss[32][1]=0x8f;
- poss[33][0]=0x00, poss[33][1]=0x87;
- poss[34][0]=0x00, poss[34][1]=0x7f;
- poss[35][0]=0x00, poss[35][1]=0x78;
- poss[36][0]=0x00, poss[36][1]=0x71;
-
+++ /dev/null
-/* period tables for each tuning
- *
- * part of Pro-Wizard package
- * (c) Asle
-*/
-
-
-short Tuning[16][36] = {
- { 856,808,762,720,678,640,604,570,538,508,480,453,
- 428,404,381,360,339,320,302,285,269,254,240,226,
- 214,202,190,180,170,160,151,143,135,127,120,113 },
- { 850,802,757,715,674,637,601,567,535,505,477,450,
- 425,401,379,357,337,318,300,284,268,253,239,225,
- 213,201,189,179,169,159,150,142,134,126,119,113 },
- { 844,796,752,709,670,632,597,563,532,502,474,447,
- 422,398,376,355,335,316,298,282,266,251,237,224,
- 211,199,188,177,167,158,149,141,133,125,118,112 },
- { 838,791,746,704,665,628,592,559,528,498,470,444,
- 419,395,373,352,332,314,296,280,264,249,235,222,
- 209,198,187,176,166,157,148,140,132,125,118,111 },
- { 832,785,741,699,660,623,588,555,524,495,467,441,
- 416,392,370,350,330,312,294,278,262,247,233,220,
- 208,196,185,175,165,156,147,139,131,124,117,110 },
- { 826,779,736,694,655,619,584,551,520,491,463,437,
- 413,390,368,347,328,309,292,276,260,245,232,219,
- 206,195,184,174,164,155,146,138,130,123,116,109 },
- { 820,774,730,689,651,614,580,547,516,487,460,434,
- 410,387,365,345,325,307,290,274,258,244,230,217,
- 205,193,183,172,163,154,145,137,129,122,115,109 },
- { 814,768,725,684,646,610,575,543,513,484,457,431,
- 407,384,363,342,323,305,288,272,256,242,228,216,
- 204,192,181,171,161,152,144,136,128,121,114,108 },
- { 907,856,808,762,720,678,640,604,570,538,508,480,
- 453,428,404,381,360,339,320,302,285,269,254,240,
- 226,214,202,190,180,170,160,151,143,135,127,120 },
- { 900,850,802,757,715,675,636,601,567,535,505,477,
- 450,425,401,379,357,337,318,300,284,268,253,238,
- 225,212,200,189,179,169,159,150,142,134,126,119 },
- { 894,844,796,752,709,670,632,597,563,532,502,474,
- 447,422,398,376,355,335,316,298,282,266,251,237,
- 223,211,199,188,177,167,158,149,141,133,125,118 },
- { 887,838,791,746,704,665,628,592,559,528,498,470,
- 444,419,395,373,352,332,314,296,280,264,249,235,
- 222,209,198,187,176,166,157,148,140,132,125,118 },
- { 881,832,785,741,699,660,623,588,555,524,494,467,
- 441,416,392,370,350,330,312,294,278,262,247,233,
- 220,208,196,185,175,165,156,147,139,131,123,117 },
- { 875,826,779,736,694,655,619,584,551,520,491,463,
- 437,413,390,368,347,328,309,292,276,260,245,232,
- 219,206,195,184,174,164,155,146,138,130,123,116 },
- { 868,820,774,730,689,651,614,580,547,516,487,460,
- 434,410,387,365,345,325,307,290,274,258,244,230,
- 217,205,193,183,172,163,154,145,137,129,122,115 },
- { 862,814,768,725,684,646,610,575,543,513,484,457,
- 431,407,384,363,342,323,305,288,272,256,242,228,
- 216,203,192,181,171,161,152,144,136,128,121,114 }
- };
-
+++ /dev/null
-/*
- * "vars.h"
- *
- * Part of Pro-Wizard-1 Package
- * (c) Sylvain "Asle" Chipaux
-*/
-
-
-FILE *PW_in,*PW_out;
-long PW_Start_Address=0;
-Ulong OutputSize=0;
-long PW_in_size;
-long Cpt_Filename=0l;
-Ulong PW_i;
-Ulong PW_j,PW_k,PW_l,PW_m,PW_n,PW_o;
-Uchar *in_data;
-/*Uchar OutName[5]={'.','-','-','-',0x00};*/
-char OutName_final[33];
-char Depacked_OutName[33];
-Uchar Save_Status = GOOD;
-Ulong PW_WholeSampleSize=0;
-char Extensions[_KNOWN_FORMATS+1][33];
-Uchar CONVERT = BAD;
-Uchar Amiga_EXE_Header = GOOD;
+++ /dev/null
-# here things for the dumb interface like dos or unix console
-# will go in
-#
+++ /dev/null
-# gtk interface. Yet to be done
-#
+++ /dev/null
-# Makefile for Pro-Wizard 1 (for PeeCee)
-# copyright 1997-2003 Sylvain "asle" Chipaux
-
-CFLAGS = -O6 -Wall -mpentiumpro -g2 -I/usr/local/include -DDMALLOC \
- -Wtraditional -Wshadow -Wcast-align -Wstrict-prototypes \
- -Wmissing-prototypes -Wredundant-decls -Wnested-externs \
- -save-temps
-CC = gcc
-
-#
-
-OFILES = prowiz.o \
- tests/ac1d.o tests/bp.o tests/di.o tests/eureka.o \
- tests/fc_m.o tests/fuzzac.o tests/gmc.o tests/heatseek.o \
- tests/hrt.o tests/kris.o tests/ksm.o tests/mp.o \
- tests/noiserun.o tests/npd1.o tests/npd2.o tests/npd3.o \
- tests/p40a.o tests/p41a.o tests/p50a.o tests/p60a.o tests/p61a.o \
- tests/pha.o tests/pm.o tests/pm01.o tests/pm10c.o \
- tests/pm20.o tests/pm40.o tests/pmz.o tests/pp10.o \
- tests/pp21.o tests/pp30.o \
- tests/prun1.o tests/prun2.o tests/ptk.o tests/skyt.o \
- tests/soundtk.o tests/starpack.o tests/stim.o \
- tests/tp1.o tests/tp2.o tests/tp3.o \
- tests/unic.o tests/unic2.o tests/wn.o \
- tests/xann.o tests/zen.o \
- tests/defjam32.o tests/tpack22.o tests/tpack21.o tests/defja32p.o \
- tests/bytek13.o tests/dblatn.o tests/powerp30.o tests/powerp40.o \
- tests/powerp23.o tests/bytek20.o tests/spike.o tests/tpack102.o \
- tests/time17.o tests/mc30addr.o tests/jamcrack.o tests/bsifc.o \
- tests/digibst.o tests/mcrun10.o tests/mcrun12.o tests/qc.o \
- tests/tdd.o tests/fuchs.o tests/bytek30.o tests/syncro.o \
- tests/stc270.o tests/tnmc11.o tests/superc27.o tests/ppbk.o \
- tests/relokit.o tests/maxpac12.o tests/soundfx.o tests/arcd.o \
- tests/crnd.o tests/stk26.o tests/bytekp10.o tests/hqc2.o \
- tests/tryit101.o tests/fc13.o tests/fc14.o tests/crmaddr.o tests/mmd0.o \
- tests/powerp4l.o tests/newtron.o tests/gpmo.o tests/polka.o \
- tests/gnpl.o tests/ambk.o tests/xm.o tests/mcobj.o tests/turbosqueezer61.o \
- tests/stc299d.o tests/stc310.o tests/stc299b.o tests/stc299.o tests/stc300.o \
- tests/nfh.o \
- rips/ac1d.o rips/bp.o rips/di.o rips/eureka.o rips/fc_m.o \
- rips/fuzzac.o rips/hrt.o rips/kris.o rips/mp.o rips/pha.o \
- rips/pm.o rips/pm01.o rips/pm10c.o rips/pm20.o rips/pm18a.o \
- rips/pp21.o rips/pp30.o rips/prun1.o rips/prun2.o rips/ptk.o \
- rips/skyt.o rips/starpack.o rips/unic.o rips/unic2.o rips/wn.o \
- rips/xann.o rips/gmc.o rips/heatseek.o rips/ksm.o \
- rips/noiserun.o rips/npd1.o rips/npd2.o rips/npd3.o \
- rips/p40a.o rips/p40b.o rips/p41a.o rips/pm40.o rips/pp10.o \
- rips/tp1.o rips/tp2.o rips/tp3.o rips/zen.o rips/p50a.o \
- rips/p60a.o rips/startrek.o rips/p61a.o rips/stim.o \
- rips/soundtk.o rips/defjam32.o rips/tpack22.o rips/tpack21.o \
- rips/mcrun.o rips/bytekil.o rips/dblatn.o rips/powerp30.o \
- rips/powerp40.o rips/powerp23.o rips/spike.o rips/tpack102.o \
- rips/digibst.o rips/time17.o rips/mc30addr.o rips/jamcrack.o \
- rips/bsifc.o rips/qc.o rips/tdd.o rips/fuchs.o rips/bytek30.o \
- rips/syncro.o rips/stc270.o rips/tnmc11.o rips/superc27.o \
- rips/ppbk.o rips/relokit.o rips/maxpac12.o rips/soundfx.o \
- rips/stk26.o rips/bytekp10.o rips/hqc2.o rips/tryit101.o \
- rips/fc13.o rips/fc14.o rips/crmaddr.o rips/med.o rips/powerp4l.o \
- rips/newtron.o rips/gpmo.o rips/polka.o rips/gnpl.o rips/ambk.o \
- rips/xm.o rips/mcobj.o rips/turbosqueezer61.o rips/stc299d.o \
- rips/stc310.o rips/stc299b.o rips/stc299.o rips/stc300.o rips/p22a.o \
- rips/p30a.o rips/nfh.o \
- depack/ac1d.o depack/di.o depack/eureka.o depack/fc-m.o \
- depack/fuzzac.o depack/gmc.o depack/heatseek.o depack/hrt.o \
- depack/kris.o depack/ksm.o depack/mp.o depack/noiserun.o \
- depack/np1.o depack/np2.o depack/np3.o depack/p40.o depack/p41a.o \
- depack/p50a.o depack/p60a.o depack/p61a.o depack/pha.o \
- depack/pm01.o depack/pm10c.o depack/pm18a.o depack/pm20.o \
- depack/pm40.o depack/pm.o depack/pp10.o depack/pp21.o \
- depack/pp30.o depack/prun1.o depack/prun2.o depack/skyt.o \
- depack/starpack.o depack/tp1.o depack/tp2.o depack/tp3.o \
- depack/unic.o depack/unic2.o depack/wn.o depack/xann.o \
- depack/zen.o depack/stim.o depack/qc.o depack/tdd.o \
- depack/fuchs.o depack/soundfx.o depack/stk26.o depack/newtron.o \
- depack/gpmo.o depack/polka.o depack/gnpl.o depack/ambk.o \
- depack/p30a.o depack/p22a.o depack/nfh.o \
- misc/misc.o misc/testbag.o
-
-EXEFILE = prowiz.exe
-
-.c.o:
- $(CC) -DUNIX $(CFLAGS) -c $< -o $@
-
-prowiz: $(OFILES)
- $(CC) -o $(EXEFILE) -L/usr/local/lib -ldmalloc $(OFILES)
-
-#
-clean: clear
- rm -f *.o
- rm -f tests/*.o
- rm -f rips/*.o
- rm -f depack/*.o
- rm -f misc/*.o
- rm -f core *.core
-
-#
-clear:
- rm -f *~ *.*~ tests/*~ tests/*.*~ rips/*~ rips/*.*~ misc/*~ misc/*.*~ include/*~ include/*.*~ depack/*~ depack/*.*~ *.i *.s
+++ /dev/null
-# Makefile for Pro-Wizard 1 (for PeeCee)
-# copyright 1997-2002 Sylvain "asle" Chipaux
-# Amiga port (05/2002)
-
-CFLAGS = -Wall -m68020 -IGNU:include
-CC = gcc
-
-#
-
-OFILES = prowiz.o tests/ac1d.o tests/bp.o tests/di.o tests/eureka.o \
- tests/fc_m.o tests/fuzzac.o tests/hrt.o tests/kris.o \
- tests/mp.o tests/pha.o tests/pm.o tests/pm01.o tests/pm10c.o \
- tests/pm20.o tests/pmz.o tests/pp21.o tests/pp30.o \
- tests/prun1.o tests/prun2.o tests/ptk.o tests/skyt.o \
- tests/starpack.o tests/unic.o tests/unic2.o tests/wn.o \
- tests/xann.o tests/gmc.o tests/heatseek.o tests/ksm.o \
- tests/noiserun.o tests/npd1.o tests/npd2.o tests/npd3.o \
- tests/p40a.o tests/p41a.o tests/pm40.o tests/pp10.o \
- tests/tp1.o tests/tp2.o tests/tp3.o tests/zen.o tests/p50a.o \
- tests/p60a.o tests/p61a.o tests/stim.o tests/soundtk.o \
- tests/defjam32.o tests/tpack22.o tests/tpack21.o tests/defja32p.o \
- tests/bytek13.o tests/dblatn.o tests/powerp30.o tests/powerp40.o \
- tests/powerp23.o tests/bytek20.o tests/spike.o tests/tpack102.o \
- tests/time17.o tests/mc30addr.o tests/jamcrack.o tests/bsifc.o \
- tests/digibst.o tests/mcrun10.o tests/mcrun12.o tests/qc.o \
- tests/tdd.o tests/fuchs.o tests/bytek30.o tests/syncro.o \
- tests/stc270.o tests/tnmc11.o tests/superc27.o tests/ppbk.o \
- tests/relokit.o tests/maxpac12.o tests/soundfx.o tests/arcd.o \
- tests/crnd.o tests/stk26.o tests/bytekp10.o tests/hqc2.o \
- tests/tryit101.o tests/fc13.o tests/fc14.o tests/crmaddr.o tests/mmd0.o \
- tests/powerp4l.o tests/newtron.o tests/gpmo.o tests/polka.o \
- tests/gnpl.o tests/ambk.o tests/xm.o tests/mcobj.o tests/turbosqueezer61.o \
- tests/stc299d.o tests/stc310.o tests/stc299b.o tests/stc299.o tests/stc300.o \
- tests/nfh.o \
- rips/ac1d.o rips/bp.o rips/di.o rips/eureka.o rips/fc_m.o \
- rips/fuzzac.o rips/hrt.o rips/kris.o rips/mp.o rips/pha.o \
- rips/pm.o rips/pm01.o rips/pm10c.o rips/pm20.o rips/pm18a.o \
- rips/pp21.o rips/pp30.o rips/prun1.o rips/prun2.o rips/ptk.o \
- rips/skyt.o rips/starpack.o rips/unic.o rips/unic2.o rips/wn.o \
- rips/xann.o rips/gmc.o rips/heatseek.o rips/ksm.o \
- rips/noiserun.o rips/npd1.o rips/npd2.o rips/npd3.o \
- rips/p40a.o rips/p40b.o rips/p41a.o rips/pm40.o rips/pp10.o \
- rips/tp1.o rips/tp2.o rips/tp3.o rips/zen.o rips/p50a.o \
- rips/p60a.o rips/startrek.o rips/p61a.o rips/stim.o \
- rips/soundtk.o rips/defjam32.o rips/tpack22.o rips/tpack21.o \
- rips/mcrun.o rips/bytekil.o rips/dblatn.o rips/powerp30.o \
- rips/powerp40.o rips/powerp23.o rips/spike.o rips/tpack102.o \
- rips/digibst.o rips/time17.o rips/mc30addr.o rips/jamcrack.o \
- rips/bsifc.o rips/qc.o rips/tdd.o rips/fuchs.o rips/bytek30.o \
- rips/syncro.o rips/stc270.o rips/tnmc11.o rips/superc27.o \
- rips/ppbk.o rips/relokit.o rips/maxpac12.o rips/soundfx.o \
- rips/stk26.o rips/bytekp10.o rips/hqc2.o rips/tryit101.o \
- rips/fc13.o rips/fc14.o rips/crmaddr.o rips/med.o rips/powerp4l.o \
- rips/newtron.o rips/gpmo.o rips/polka.o rips/gnpl.o rips/ambk.o \
- rips/xm.o rips/mcobj.o rips/turbosqueezer61.o rips/stc299d.o \
- rips/stc310.o rips/stc299b.o rips/stc299.o rips/stc300.o rips/p22a.o \
- rips/p30a.o rips/nfh.o \
- depack/ac1d.o depack/di.o depack/eureka.o depack/fc-m.o \
- depack/fuzzac.o depack/gmc.o depack/heatseek.o depack/hrt.o \
- depack/kris.o depack/ksm.o depack/mp.o depack/noiserun.o \
- depack/np1.o depack/np2.o depack/np3.o depack/p40.o depack/p41a.o \
- depack/p50a.o depack/p60a.o depack/p61a.o depack/pha.o \
- depack/pm01.o depack/pm10c.o depack/pm18a.o depack/pm20.o \
- depack/pm40.o depack/pm.o depack/pp10.o depack/pp21.o \
- depack/pp30.o depack/prun1.o depack/prun2.o depack/skyt.o \
- depack/starpack.o depack/tp1.o depack/tp2.o depack/tp3.o \
- depack/unic.o depack/unic2.o depack/wn.o depack/xann.o \
- depack/zen.o depack/stim.o depack/qc.o depack/tdd.o \
- depack/fuchs.o depack/soundfx.o depack/stk26.o depack/newtron.o \
- depack/gpmo.o depack/polka.o depack/gnpl.o depack/ambk.o \
- depack/p30a.o depack/p22a.o depack/nfh.o \
- misc/misc.o misc/testbag.o
-
-EXEFILE = prowiz.exe
-
-.c.o:
- $(CC) -DUNIX $(CFLAGS) -c $< -o zob:pr/$@
-
-prowiz: $(OFILES)
- $(CC) -o $(EXEFILE) $(OFILES)
-
-#
-clean: clear
- rm -f *.o
- rm -f tests/*.o
- rm -f rips/*.o
- rm -f depack/*.o
- rm -f misc/*.o
- rm -f core *.core
-
-#
-clear:
- rm -f *~ *.*~ tests/*~ tests/*.*~ rips/*~ rips/*.*~ misc/*~ misc/*.*~ include/*~ include/*.*~ depack/*~ depack/*.*~
+++ /dev/null
-# Makefile for Pro-Wizard 1 (for PeeCee)
-# copyright 1997-2001 Sylvain "asle" Chipaux
-
-CFLAGS = -O6 -m486 -Wall -mpentiumpro
-CC = gcc
-
-#
-
-CFILES = prowiz.o tests/ac1d.o tests/bp.o tests/di.o tests/eureka.o \
- tests/fc_m.o tests/fuzzac.o tests/hrt.o tests/kris.o \
- tests/mp.o tests/pha.o tests/pm.o tests/pm01.o tests/pm10c.o \
- tests/pm20.o tests/pmz.o tests/pp21.o tests/pp30.o \
- tests/prun1.o tests/prun2.o tests/ptk.o tests/skyt.o \
- tests/starpack.o tests/unic.o tests/unic2.o tests/wn.o \
- tests/xann.o tests/gmc.o tests/heatseek.o tests/ksm.o \
- tests/noiserun.o tests/npd1.o tests/npd2.o tests/npd3.o \
- tests/p40a.o tests/p41a.o tests/pm40.o tests/pp10.o \
- tests/tp1.o tests/tp2.o tests/tp3.o tests/zen.o tests/p50a.o \
- tests/p60a.o tests/p61a.o tests/stim.o tests/soundtk.o \
- tests/defjam32.o tests/tpack22.o tests/tpack21.o tests/defja32p.o \
- tests/bytek13.o tests/dblatn.o tests/powerp30.o tests/powerp40.o \
- tests/powerp23.o tests/bytek20.o tests/spike.o tests/tpack102.o \
- tests/time17.o tests/mc30addr.o tests/jamcrack.o tests/bsifc.o \
- tests/digibst.o tests/mcrun10.o tests/mcrun12.o tests/qc.o \
- tests/tdd.o tests/fuchs.o tests/bytek30.o tests/syncro.o \
- tests/stc270.o tests/tnmc11.o tests/superc27.o tests/ppbk.o \
- tests/relokit.o tests/maxpac12.o tests/soundfx.o tests/arcd.o \
- tests/crnd.o tests/stk26.o tests/bytekp10.o tests/hqc2.o \
- tests/tryit101.o tests/fc13.o tests/fc14.o tests/crmaddr.o tests/mmd0.o \
- tests/powerp4l.o tests/newtron.o tests/gpmo.o tests/polka.o \
- tests/gnpl.o tests/ambk.o tests/xm.o tests/mcobj.o tests/turbosqueezer61.o \
- tests/stc299d.o \
- rips/ac1d.o rips/bp.o rips/di.o rips/eureka.o rips/fc_m.o \
- rips/fuzzac.o rips/hrt.o rips/kris.o rips/mp.o rips/pha.o \
- rips/pm.o rips/pm01.o rips/pm10c.o rips/pm20.o rips/pm18a.o \
- rips/pp21.o rips/pp30.o rips/prun1.o rips/prun2.o rips/ptk.o \
- rips/skyt.o rips/starpack.o rips/unic.o rips/unic2.o rips/wn.o \
- rips/xann.o rips/gmc.o rips/heatseek.o rips/ksm.o \
- rips/noiserun.o rips/npd1.o rips/npd2.o rips/npd3.o \
- rips/p40a.o rips/p40b.o rips/p41a.o rips/pm40.o rips/pp10.o \
- rips/tp1.o rips/tp2.o rips/tp3.o rips/zen.o rips/p50a.o \
- rips/p60a.o rips/startrek.o rips/p61a.o rips/stim.o \
- rips/soundtk.o rips/defjam32.o rips/tpack22.o rips/tpack21.o \
- rips/mcrun.o rips/bytekil.o rips/dblatn.o rips/powerp30.o \
- rips/powerp40.o rips/powerp23.o rips/spike.o rips/tpack102.o \
- rips/digibst.o rips/time17.o rips/mc30addr.o rips/jamcrack.o \
- rips/bsifc.o rips/qc.o rips/tdd.o rips/fuchs.o rips/bytek30.o \
- rips/syncro.o rips/stc270.o rips/tnmc11.o rips/superc27.o \
- rips/ppbk.o rips/relokit.o rips/maxpac12.o rips/soundfx.o \
- rips/stk26.o rips/bytekp10.o rips/hqc2.o rips/tryit101.o \
- rips/fc13.o rips/fc14.o rips/crmaddr.o rips/med.o rips/powerp4l.o \
- rips/newtron.o rips/gpmo.o rips/polka.o rips/gnpl.o rips/ambk.o \
- rips/xm.o rips/mcobj.o rips/turbosqueezer61.o rips/stc299d.o \
- depack/ac1d.o depack/di.o depack/eureka.o depack/fc-m.o \
- depack/fuzzac.o depack/gmc.o depack/heatseek.o depack/hrt.o \
- depack/kris.o depack/ksm.o depack/mp.o depack/noiserun.o \
- depack/np1.o depack/np2.o depack/np3.o depack/p40.o depack/p41a.o \
- depack/p50a.o depack/p60a.o depack/p61a.o depack/pha.o \
- depack/pm01.o depack/pm10c.o depack/pm18a.o depack/pm20.o \
- depack/pm40.o depack/pm.o depack/pp10.o depack/pp21.o \
- depack/pp30.o depack/prun1.o depack/prun2.o depack/skyt.o \
- depack/starpack.o depack/tp1.o depack/tp2.o depack/tp3.o \
- depack/unic.o depack/unic2.o depack/wn.o depack/xann.o \
- depack/zen.o depack/stim.o depack/qc.o depack/tdd.o \
- depack/fuchs.o depack/soundfx.o depack/stk26.o depack/newtron.o \
- depack/gpmo.o depack/polka.o depack/gnpl.o depack/ambk.o \
- misc/misc.o misc/testbag.o
-
-OFILES = prowiz.o tests/ac1d.o tests/bp.o tests/di.o tests/eureka.o \
- tests/fc_m.o tests/fuzzac.o tests/hrt.o tests/kris.o \
- tests/mp.o tests/pha.o tests/pm.o tests/pm01.o tests/pm10c.o \
- tests/pm20.o tests/pmz.o tests/pp21.o tests/pp30.o \
- tests/prun1.o tests/prun2.o tests/ptk.o tests/skyt.o \
- tests/starpack.o tests/unic.o tests/unic2.o tests/wn.o \
- tests/xann.o tests/gmc.o tests/heatseek.o tests/ksm.o \
- tests/noiserun.o tests/npd1.o tests/npd2.o tests/npd3.o \
- tests/p40a.o tests/p41a.o tests/pm40.o tests/pp10.o \
- tests/tp1.o tests/tp2.o tests/tp3.o tests/zen.o tests/p50a.o \
- tests/p60a.o tests/p61a.o tests/stim.o tests/soundtk.o \
- tests/defjam32.o tests/tpack22.o tests/tpack21.o tests/defja32p.o \
- tests/bytek13.o tests/dblatn.o tests/powerp30.o tests/powerp40.o \
- tests/powerp23.o tests/bytek20.o tests/spike.o tests/tpack102.o \
- tests/time17.o tests/mc30addr.o tests/jamcrack.o tests/bsifc.o \
- tests/digibst.o tests/mcrun10.o tests/mcrun12.o tests/qc.o \
- tests/tdd.o tests/fuchs.o tests/bytek30.o tests/syncro.o \
- tests/stc270.o tests/tnmc11.o tests/superc27.o tests/ppbk.o \
- tests/relokit.o tests/maxpac12.o tests/soundfx.o tests/arcd.o \
- tests/crnd.o tests/stk26.o tests/bytekp10.o tests/hqc2.o \
- tests/tryit101.o tests/fc13.o tests/fc14.o tests/crmaddr.o tests/mmd0.o \
- tests/powerp4l.o tests/newtron.o tests/gpmo.o \
- rips/ac1d.o rips/bp.o rips/di.o rips/eureka.o rips/fc_m.o \
- rips/fuzzac.o rips/hrt.o rips/kris.o rips/mp.o rips/pha.o \
- rips/pm.o rips/pm01.o rips/pm10c.o rips/pm20.o rips/pm18a.o \
- rips/pp21.o rips/pp30.o rips/prun1.o rips/prun2.o rips/ptk.o \
- rips/skyt.o rips/starpack.o rips/unic.o rips/unic2.o rips/wn.o \
- rips/xann.o rips/gmc.o rips/heatseek.o rips/ksm.o \
- rips/noiserun.o rips/npd1.o rips/npd2.o rips/npd3.o \
- rips/p40a.o rips/p40b.o rips/p41a.o rips/pm40.o rips/pp10.o \
- rips/tp1.o rips/tp2.o rips/tp3.o rips/zen.o rips/p50a.o \
- rips/p60a.o rips/startrek.o rips/p61a.o rips/stim.o \
- rips/soundtk.o rips/defjam32.o rips/tpack22.o rips/tpack21.o \
- rips/mcrun.o rips/bytekil.o rips/dblatn.o rips/powerp30.o \
- rips/powerp40.o rips/powerp23.o rips/spike.o rips/tpack102.o \
- rips/digibst.o rips/time17.o rips/mc30addr.o rips/jamcrack.o \
- rips/bsifc.o rips/qc.o rips/tdd.o rips/fuchs.o rips/bytek30.o \
- rips/syncro.o rips/stc270.o rips/tnmc11.o rips/superc27.o \
- rips/ppbk.o rips/relokit.o rips/maxpac12.o rips/soundfx.o \
- rips/stk26.o rips/bytekp10.o rips/hqc2.o rips/tryit101.o \
- rips/fc13.o rips/fc14.o rips/crmaddr.o rips/med.o rips/powerp4l.o \
- rips/newtron.o rips/gpmo.o \
- depack/ac1d.o depack/di.o depack/eureka.o depack/fc-m.o \
- depack/fuzzac.o depack/gmc.o depack/heatseek.o depack/hrt.o \
- depack/kris.o depack/ksm.o depack/mp.o depack/noiserun.o \
- depack/np1.o depack/np2.o depack/np3.o depack/p40.o depack/p41a.o \
- depack/p50a.o depack/p60a.o depack/p61a.o depack/pha.o \
- depack/pm01.o depack/pm10c.o depack/pm18a.o depack/pm20.o \
- depack/pm40.o depack/pm.o depack/pp10.o depack/pp21.o \
- depack/pp30.o depack/prun1.o depack/prun2.o depack/skyt.o \
- depack/starpack.o depack/tp1.o depack/tp2.o depack/tp3.o \
- depack/unic.o depack/unic2.o depack/wn.o depack/xann.o \
- depack/zen.o depack/stim.o depack/qc.o depack/tdd.o \
- depack/fuchs.o depack/soundfx.o depack/stk26.o depack/newtron.o \
- depack/gpmo.o \
- misc/misc.o misc/testbag.o
-
-EXEFILE = prowiz.exe
-
-.c.o:
- $(CC) -DDOS $(CFLAGS) -c $< -o $@
-
-prowiz: $(OFILES)
- $(CC) -o $(EXEFILE) $(OFILES)
-
-#
-clean: clear
- rm -f *.o
- rm -f tests/*.o
- rm -f rips/*.o
- rm -f depack/*.o
- rm -f misc/*.o
- rm -f core
-
-#
-clear:
- rm -f *~ *.*~ tests/*~ tests/*.*~ rips/*~ rips/*.*~ misc/*~ misc/*.*~ include/*~ include/*.*~ depack/*~ depack/*.*~
+++ /dev/null
-# Makefile for Pro-Wizard 1 (for PeeCee)
-# copyright 1997-2003 Sylvain "asle" Chipaux
-# Fixed for MinGWin32 by Xigh !... Thx
-
-CFLAGS = -O6 -Wall -march=pentiumpro
-CC = gcc
-
-#
-
-
-OFILES = prowiz.o tests/ac1d.o tests/bp.o tests/di.o tests/eureka.o \
- tests/fc_m.o tests/fuzzac.o tests/hrt.o tests/kris.o \
- tests/mp.o tests/pha.o tests/pm.o tests/pm01.o tests/pm10c.o \
- tests/pm20.o tests/pmz.o tests/pp21.o tests/pp30.o \
- tests/prun1.o tests/prun2.o tests/ptk.o tests/skyt.o \
- tests/starpack.o tests/unic.o tests/unic2.o tests/wn.o \
- tests/xann.o tests/gmc.o tests/heatseek.o tests/ksm.o \
- tests/noiserun.o tests/npd1.o tests/npd2.o tests/npd3.o \
- tests/p40a.o tests/p41a.o tests/pm40.o tests/pp10.o \
- tests/tp1.o tests/tp2.o tests/tp3.o tests/zen.o tests/p50a.o \
- tests/p60a.o tests/p61a.o tests/stim.o tests/soundtk.o \
- tests/defjam32.o tests/tpack22.o tests/tpack21.o tests/defja32p.o \
- tests/bytek13.o tests/dblatn.o tests/powerp30.o tests/powerp40.o \
- tests/powerp23.o tests/bytek20.o tests/spike.o tests/tpack102.o \
- tests/time17.o tests/mc30addr.o tests/jamcrack.o tests/bsifc.o \
- tests/digibst.o tests/mcrun10.o tests/mcrun12.o tests/qc.o \
- tests/tdd.o tests/fuchs.o tests/bytek30.o tests/syncro.o \
- tests/stc270.o tests/tnmc11.o tests/superc27.o tests/ppbk.o \
- tests/relokit.o tests/maxpac12.o tests/soundfx.o tests/arcd.o \
- tests/crnd.o tests/stk26.o tests/bytekp10.o tests/hqc2.o \
- tests/tryit101.o tests/fc13.o tests/fc14.o tests/crmaddr.o tests/mmd0.o \
- tests/powerp4l.o tests/newtron.o tests/gpmo.o tests/polka.o \
- tests/gnpl.o tests/ambk.o tests/xm.o tests/mcobj.o tests/turbosqueezer61.o \
- tests/stc299d.o tests/stc310.o tests/stc299b.o tests/nfh.o \
- rips/ac1d.o rips/bp.o rips/di.o rips/eureka.o rips/fc_m.o \
- rips/fuzzac.o rips/hrt.o rips/kris.o rips/mp.o rips/pha.o \
- rips/pm.o rips/pm01.o rips/pm10c.o rips/pm20.o rips/pm18a.o \
- rips/pp21.o rips/pp30.o rips/prun1.o rips/prun2.o rips/ptk.o \
- rips/skyt.o rips/starpack.o rips/unic.o rips/unic2.o rips/wn.o \
- rips/xann.o rips/gmc.o rips/heatseek.o rips/ksm.o \
- rips/noiserun.o rips/npd1.o rips/npd2.o rips/npd3.o \
- rips/p40a.o rips/p40b.o rips/p41a.o rips/pm40.o rips/pp10.o \
- rips/tp1.o rips/tp2.o rips/tp3.o rips/zen.o rips/p50a.o \
- rips/p60a.o rips/startrek.o rips/p61a.o rips/stim.o \
- rips/soundtk.o rips/defjam32.o rips/tpack22.o rips/tpack21.o \
- rips/mcrun.o rips/bytekil.o rips/dblatn.o rips/powerp30.o \
- rips/powerp40.o rips/powerp23.o rips/spike.o rips/tpack102.o \
- rips/digibst.o rips/time17.o rips/mc30addr.o rips/jamcrack.o \
- rips/bsifc.o rips/qc.o rips/tdd.o rips/fuchs.o rips/bytek30.o \
- rips/syncro.o rips/stc270.o rips/tnmc11.o rips/superc27.o \
- rips/ppbk.o rips/relokit.o rips/maxpac12.o rips/soundfx.o \
- rips/stk26.o rips/bytekp10.o rips/hqc2.o rips/tryit101.o \
- rips/fc13.o rips/fc14.o rips/crmaddr.o rips/med.o rips/powerp4l.o \
- rips/newtron.o rips/gpmo.o rips/polka.o rips/gnpl.o rips/ambk.o \
- rips/xm.o rips/mcobj.o rips/turbosqueezer61.o rips/stc299d.o \
- rips/stc310.o rips/stc299b.o rips/nfh.o \
- depack/ac1d.o depack/di.o depack/eureka.o depack/fc-m.o \
- depack/fuzzac.o depack/gmc.o depack/heatseek.o depack/hrt.o \
- depack/kris.o depack/ksm.o depack/mp.o depack/noiserun.o \
- depack/np1.o depack/np2.o depack/np3.o depack/p40.o depack/p41a.o \
- depack/p50a.o depack/p60a.o depack/p61a.o depack/pha.o \
- depack/pm01.o depack/pm10c.o depack/pm18a.o depack/pm20.o \
- depack/pm40.o depack/pm.o depack/pp10.o depack/pp21.o \
- depack/pp30.o depack/prun1.o depack/prun2.o depack/skyt.o \
- depack/starpack.o depack/tp1.o depack/tp2.o depack/tp3.o \
- depack/unic.o depack/unic2.o depack/wn.o depack/xann.o \
- depack/zen.o depack/stim.o depack/qc.o depack/tdd.o \
- depack/fuchs.o depack/soundfx.o depack/stk26.o depack/newtron.o \
- depack/gpmo.o depack/polka.o depack/gnpl.o depack/ambk.o \
- depack/nfh.o \
- misc/misc.o misc/testbag.o
-
-EXEFILE = prowiz.exe
-
-.c.o:
- $(CC) -DDOS $(CFLAGS) -c $< -o $@
-
-prowiz: $(OFILES)
- $(CC) -o $(EXEFILE) $(OFILES)
-
-#
-clean: clear
- -CMD /c "DEL /F /Q *.o"
- -CMD /c "DEL /F /Q tests\*.o"
- -CMD /c "DEL /F /Q rips\*.o"
- -CMD /c "DEL /F /Q depack\*.o"
- -CMD /c "DEL /F /Q misc\*.o"
- -CMD /c "DEL /F /Q core"
-
-#
-clear:
- -CMD /c "DEL /F /Q *.*~"
- -CMD /c "DEL /F /Q tests\*~"
- -CMD /c "DEL /F /Q tests\*.*~"
- -CMD /c "DEL /F /Q rips\*~"
- -CMD /c "DEL /F /Q rips\*.*~"
- -CMD /c "DEL /F /Q misc\*~"
- -CMD /c "DEL /F /Q misc\*.*~"
- -CMD /c "DEL /F /Q include\*~"
- -CMD /c "DEL /F /Q include\*.*~"
- -CMD /c "DEL /F /Q depack\*~"
- -CMD /c "DEL /F /Q depack\*.*~"
+++ /dev/null
-# Makefile for Pro-Wizard 1 (for PeeCee)
-# copyright 1997-2001 Sylvain "asle" Chipaux
-
-CFLAGS = -O6 -Wall -mpentiumpro -g2 -I/usr/local/include -DDMALLOC
-CC = gcc
-
-#
-
-OFILES = prowiz.o tests/ac1d.o tests/bp.o tests/di.o tests/eureka.o \
- tests/fc_m.o tests/fuzzac.o tests/hrt.o tests/kris.o \
- tests/mp.o tests/pha.o tests/pm.o tests/pm01.o tests/pm10c.o \
- tests/pm20.o tests/pmz.o tests/pp21.o tests/pp30.o \
- tests/prun1.o tests/prun2.o tests/ptk.o tests/skyt.o \
- tests/starpack.o tests/unic.o tests/unic2.o tests/wn.o \
- tests/xann.o tests/gmc.o tests/heatseek.o tests/ksm.o \
- tests/noiserun.o tests/npd1.o tests/npd2.o tests/npd3.o \
- tests/p40a.o tests/p41a.o tests/pm40.o tests/pp10.o \
- tests/tp1.o tests/tp2.o tests/tp3.o tests/zen.o tests/p50a.o \
- tests/p60a.o tests/p61a.o tests/stim.o tests/soundtk.o \
- tests/defjam32.o tests/tpack22.o tests/tpack21.o tests/defja32p.o \
- tests/bytek13.o tests/dblatn.o tests/powerp30.o tests/powerp40.o \
- tests/powerp23.o tests/bytek20.o tests/spike.o tests/tpack102.o \
- tests/time17.o tests/mc30addr.o tests/jamcrack.o tests/bsifc.o \
- tests/digibst.o tests/mcrun10.o tests/mcrun12.o tests/qc.o \
- tests/tdd.o tests/fuchs.o tests/bytek30.o tests/syncro.o \
- tests/stc270.o tests/tnmc11.o tests/superc27.o tests/ppbk.o \
- tests/relokit.o tests/maxpac12.o tests/soundfx.o tests/arcd.o \
- tests/crnd.o tests/stk26.o tests/bytekp10.o tests/hqc2.o \
- tests/tryit101.o tests/fc13.o tests/fc14.o tests/crmaddr.o tests/mmd0.o \
- tests/powerp4l.o tests/newtron.o tests/gpmo.o tests/polka.o \
- tests/gnpl.o tests/ambk.o tests/xm.o tests/mcobj.o tests/turbosqueezer61.o \
- tests/stc299d.o tests/stc310.o tests/stc299b.o tests/stc299.o tests/stc300.o \
- tests/nfh.o \
- rips/ac1d.o rips/bp.o rips/di.o rips/eureka.o rips/fc_m.o \
- rips/fuzzac.o rips/hrt.o rips/kris.o rips/mp.o rips/pha.o \
- rips/pm.o rips/pm01.o rips/pm10c.o rips/pm20.o rips/pm18a.o \
- rips/pp21.o rips/pp30.o rips/prun1.o rips/prun2.o rips/ptk.o \
- rips/skyt.o rips/starpack.o rips/unic.o rips/unic2.o rips/wn.o \
- rips/xann.o rips/gmc.o rips/heatseek.o rips/ksm.o \
- rips/noiserun.o rips/npd1.o rips/npd2.o rips/npd3.o \
- rips/p40a.o rips/p40b.o rips/p41a.o rips/pm40.o rips/pp10.o \
- rips/tp1.o rips/tp2.o rips/tp3.o rips/zen.o rips/p50a.o \
- rips/p60a.o rips/startrek.o rips/p61a.o rips/stim.o \
- rips/soundtk.o rips/defjam32.o rips/tpack22.o rips/tpack21.o \
- rips/mcrun.o rips/bytekil.o rips/dblatn.o rips/powerp30.o \
- rips/powerp40.o rips/powerp23.o rips/spike.o rips/tpack102.o \
- rips/digibst.o rips/time17.o rips/mc30addr.o rips/jamcrack.o \
- rips/bsifc.o rips/qc.o rips/tdd.o rips/fuchs.o rips/bytek30.o \
- rips/syncro.o rips/stc270.o rips/tnmc11.o rips/superc27.o \
- rips/ppbk.o rips/relokit.o rips/maxpac12.o rips/soundfx.o \
- rips/stk26.o rips/bytekp10.o rips/hqc2.o rips/tryit101.o \
- rips/fc13.o rips/fc14.o rips/crmaddr.o rips/med.o rips/powerp4l.o \
- rips/newtron.o rips/gpmo.o rips/polka.o rips/gnpl.o rips/ambk.o \
- rips/xm.o rips/mcobj.o rips/turbosqueezer61.o rips/stc299d.o \
- rips/stc310.o rips/stc299b.o rips/stc299.o rips/stc300.o \
- rips/nfh.o \
- depack/ac1d.o depack/di.o depack/eureka.o depack/fc-m.o \
- depack/fuzzac.o depack/gmc.o depack/heatseek.o depack/hrt.o \
- depack/kris.o depack/ksm.o depack/mp.o depack/noiserun.o \
- depack/np1.o depack/np2.o depack/np3.o depack/p40.o depack/p41a.o \
- depack/p50a.o depack/p60a.o depack/p61a.o depack/pha.o \
- depack/pm01.o depack/pm10c.o depack/pm18a.o depack/pm20.o \
- depack/pm40.o depack/pm.o depack/pp10.o depack/pp21.o \
- depack/pp30.o depack/prun1.o depack/prun2.o depack/skyt.o \
- depack/starpack.o depack/tp1.o depack/tp2.o depack/tp3.o \
- depack/unic.o depack/unic2.o depack/wn.o depack/xann.o \
- depack/zen.o depack/stim.o depack/qc.o depack/tdd.o \
- depack/fuchs.o depack/soundfx.o depack/stk26.o depack/newtron.o \
- depack/gpmo.o depack/polka.o depack/gnpl.o depack/ambk.o \
- depack/nfh.o \
- misc/misc.o misc/testbag.o
-
-EXEFILE = prowiz.exe
-
-.c.o:
- $(CC) -DUNIX $(CFLAGS) -c $< -o $@
-
-prowiz: $(OFILES)
- $(CC) -o $(EXEFILE) -L/usr/local/lib -ldmalloc $(OFILES)
-
-#
-clean: clear
- rm -f *.o
- rm -f tests/*.o
- rm -f rips/*.o
- rm -f depack/*.o
- rm -f misc/*.o
- rm -f core *.core
-
-#
-clear:
- rm -f *~ *.*~ tests/*~ tests/*.*~ rips/*~ rips/*.*~ misc/*~ misc/*.*~ include/*~ include/*.*~ depack/*~ depack/*.*~
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-/*
- * at now, when this fonction is called, no global var has been used ...
- * and can be here :). (save for the input file pointer ...)
-*/
-void Support_Types ( void )
-{
- long types_file_size, cpt;
- char read_line[_TYPES_LINE_LENGHT];
- FILE *types_file;
-
- /* fill with $00 ... "Extension" is global */
- memset ( Extensions, 0, sizeof Extensions );
-
- types_file = fopen ( _TYPES_FILENAME , "rb" );
- if ( types_file == NULL )
- {
- printf ( "!!! couldn't find \"%s\" file !. Default extension used.\n"
- , _TYPES_FILENAME );
- Support_Types_FileDefault ();
- return;
- }
-
- /* get "_TYPES_" size */
- types_file_size = GetFileSizeX ( _TYPES_FILENAME );
- fseek ( types_file , 0 , 0 ); /* just to be sure. put the fp back at the beginning */
-
- PW_i = 0; /* will inc up to _KNOWN_FORMATS */
- while ( ftell ( types_file )+1 < types_file_size )
- {
- memset ( read_line, 0, _TYPES_LINE_LENGHT );
- fgets ( read_line , _TYPES_LINE_LENGHT , types_file );
- if ( read_line[0] == '#' )
- continue;
- if ( sizeof ( read_line ) < 2 )
- {
- printf ( "!!! Damaged \"%s\" file at non-commented line %ld\n"
- , _TYPES_FILENAME , PW_i+1 );
- PW_i = 99999l;
- break;
- }
- cpt = 0;
- while ( read_line[cpt] != 0x00 && read_line[cpt] != 0x0a && read_line[cpt] != 0x0d )
- {
- Extensions[PW_i][cpt] = read_line[cpt];
- cpt += 1;
- }
- /*printf ( "[%ld]%ld:%s," , PW_i,ftell (types_file),read_line );*/
- PW_i += 1;
- if ( PW_i == _KNOWN_FORMATS )
- break;
- }
-
- if ( PW_i != _KNOWN_FORMATS )
- {
- printf ( "!!! Damaged \"%s\" file. Missing up %ld extensions definitions\n"
- , _TYPES_FILENAME , _KNOWN_FORMATS-(PW_i+1));
- Support_Types_FileDefault ();
- return;
- }
-
- fclose ( types_file );
-}
-
-/*Uchar *XighExtensions[_KNOWN_FORMATS+1];*/
-
-/*
- * fill the global "Extension" with default extensions if a pb happened
- * while reading "_TYPES_" editable extensions file
-*/
-void Support_Types_FileDefault ( void )
-{
- /* xigh examples */
- /* strdup( Extensions[0], "AC1" );
- strdup( Extensions[12], "MegaBixExtension" );*/
-
- /* note: "_TYPES_" file first entry is 1 ! */
- strcpy ( Extensions[0] , "ac1d" );
- strcpy ( Extensions[1] , "bp" );
- strcpy ( Extensions[2] , "fc-m" );
- strcpy ( Extensions[3] , "hrt" );
- strcpy ( Extensions[4] , "kris" );
- strcpy ( Extensions[5] , "PowerMusic" );
- strcpy ( Extensions[6] , "Promizer10c" );
- strcpy ( Extensions[7] , "Promizer18a" );
- strcpy ( Extensions[8] , "Promizer20" );
- strcpy ( Extensions[9] , "ProRunner1" );
- strcpy ( Extensions[10] , "ProRunner2" );
- strcpy ( Extensions[11] , "skyt" );
- strcpy ( Extensions[12] , "WantonPacker" );
- strcpy ( Extensions[13] , "xann" );
- strcpy ( Extensions[14] , "ModuleProtector" );
- strcpy ( Extensions[15] , "DigitalIllusion" );
- strcpy ( Extensions[16] , "PhaPacker" );
- strcpy ( Extensions[17] , "Promizer01" );
- strcpy ( Extensions[18] , "ProPacker21" );
- strcpy ( Extensions[19] , "ProPacker30" );
- strcpy ( Extensions[20] , "Eureka" );
- strcpy ( Extensions[21] , "StarTrekkerPack" );
- strcpy ( Extensions[22] , "mod" );
- strcpy ( Extensions[23] , "unic1" );
- strcpy ( Extensions[24] , "unic2" );
- strcpy ( Extensions[25] , "Fuzzac" );
- strcpy ( Extensions[26] , "gmc" );
- strcpy ( Extensions[27] , "crb" );
- strcpy ( Extensions[28] , "ksm" );
- strcpy ( Extensions[29] , "Noiserunner" );
- strcpy ( Extensions[30] , "NoisePacker1" );
- strcpy ( Extensions[31] , "NoisePacker2" );
- strcpy ( Extensions[32] , "NoisePacker3" );
- strcpy ( Extensions[33] , "P40A" );
- strcpy ( Extensions[34] , "P40B" );
- strcpy ( Extensions[35] , "P41A" );
- strcpy ( Extensions[36] , "Promizer4" );
- strcpy ( Extensions[37] , "ProPacker1" );
- strcpy ( Extensions[38] , "TrackerPacker1" );
- strcpy ( Extensions[39] , "TrackerPacker2" );
- strcpy ( Extensions[40] , "TrackerPacker3" );
- strcpy ( Extensions[41] , "ZenPacker" );
- strcpy ( Extensions[42] , "P50A" );
- strcpy ( Extensions[43] , "P60A" );
- strcpy ( Extensions[44] , "mod" );
- strcpy ( Extensions[45] , "StoneCrackerData" );
- strcpy ( Extensions[46] , "StoneCracker270 " );
- strcpy ( Extensions[47] , "P61A" );
- strcpy ( Extensions[48] , "stim" );
- strcpy ( Extensions[49] , "mod" );
- strcpy ( Extensions[50] , "TetraPack22" );
- strcpy ( Extensions[51] , "CrunchmaniaData" );
- strcpy ( Extensions[52] , "DefjamCruncher" );
- strcpy ( Extensions[53] , "Tetrapack21" );
- strcpy ( Extensions[54] , "ice" );
- strcpy ( Extensions[55] , "ByteKiller" );
- strcpy ( Extensions[56] , "xpk" );
- strcpy ( Extensions[57] , "Imploder" );
- strcpy ( Extensions[58] , "rnc" );
- strcpy ( Extensions[59] , "DoubleAction" );
- strcpy ( Extensions[60] , "PowerPacker3" );
- strcpy ( Extensions[61] , "PowerPacker4" );
- strcpy ( Extensions[62] , "PowerPacker23" );
- strcpy ( Extensions[63] , "SpikeCruncher" );
- strcpy ( Extensions[64] , "Tetrapack102" );
- strcpy ( Extensions[65] , "TimeCruncher17" );
- strcpy ( Extensions[66] , "MasterCruncher" );
- strcpy ( Extensions[67] , "MegaCruncher" );
- strcpy ( Extensions[68] , "jam" );
- strcpy ( Extensions[69] , "BSI-FC" );
- strcpy ( Extensions[70] , "digi" );
- strcpy ( Extensions[71] , "qc" );
- strcpy ( Extensions[72] , "TheDarkDemon" );
- strcpy ( Extensions[73] , "FuchsTracker" );
- strcpy ( Extensions[74] , "SynchroPacker46" );
- strcpy ( Extensions[75] , "TNMCruncher11" );
- strcpy ( Extensions[76] , "SuperCruncher27" );
- strcpy ( Extensions[77] , "PPbk" );
- strcpy ( Extensions[78] , "RelokIt1" );
- strcpy ( Extensions[79] , "StoneCracker292data" );
- strcpy ( Extensions[80] , "fire" );
- strcpy ( Extensions[81] , "MacPacker12" );
- strcpy ( Extensions[82] , "SoundFX13" );
- strcpy ( Extensions[83] , "arcD" );
- strcpy ( Extensions[84] , "para" );
- strcpy ( Extensions[85] , "crnd" );
- strcpy ( Extensions[86] , "-sb-" );
- strcpy ( Extensions[87] , "sf" );
- strcpy ( Extensions[88] , "RLE" );
- strcpy ( Extensions[89] , "VDC0" );
- strcpy ( Extensions[90] , "sq" );
- strcpy ( Extensions[91] , "sp" );
- strcpy ( Extensions[92] , "ST26" );
- strcpy ( Extensions[93] , "IT10" );
- strcpy ( Extensions[94] , "HQCCruncher2" );
- strcpy ( Extensions[95] , "TtyItCruncher101" );
- strcpy ( Extensions[96] , "FC13" );
- strcpy ( Extensions[97] , "FC14" );
- strcpy ( Extensions[98] , "1AM" );
- strcpy ( Extensions[99] , "2AM" );
- strcpy ( Extensions[100], "med" );
- strcpy ( Extensions[101], "AceCruncherData" );
- strcpy ( Extensions[102], "Newtron" );
- strcpy ( Extensions[103], "GPMO" );
- strcpy ( Extensions[104], "PolkaPacker" );
- strcpy ( Extensions[105], "GnuPlayer" );
- strcpy ( Extensions[106], "CJ_DataCruncher" );
- strcpy ( Extensions[107], "AmBk" );
- strcpy ( Extensions[108], "MasterCruncher3data" );
- strcpy ( Extensions[109], "xm" );
- strcpy ( Extensions[110], "MegaCruncherObj" );
- strcpy ( Extensions[111], "TurboSqueezer61" );
- strcpy ( Extensions[112], "StoneCracker299d" );
- strcpy ( Extensions[113], "StoneCracker310" );
- strcpy ( Extensions[114], "StoneCracker299b" );
- strcpy ( Extensions[115], "StoneCracker299" );
- strcpy ( Extensions[116], "StoneCracker300" );
- strcpy ( Extensions[117], "ThePlayer30a" );
- strcpy ( Extensions[118], "ThePlayer22a" );
- strcpy ( Extensions[119], "NoiseFromHeaven" );
- strcpy ( Extensions[120], "---" );
-}
-
-
-
-
-/*
- * saving what's found. Mainly music file here.
- * PW_Start_Address & OutputSize are global .. not everybody likes
- * that :(. I just cant seem to manage it otherwise.
-*/
-void Save_Rip ( char * format_to_save, int FMT_EXT )
-{
- Save_Status = BAD;
- printf ( "%s found at %ld !. its size is : %ld\n", format_to_save , PW_Start_Address , OutputSize );
- if ( (PW_Start_Address + (long)OutputSize) > PW_in_size )
- {
- printf ( "!!! Truncated, missing (%ld byte(s) !)\n"
- , (PW_Start_Address+OutputSize)-PW_in_size );
- PW_i += 2 ;
- return;
- }
- BZERO ( OutName_final, sizeof OutName_final);
- sprintf ( OutName_final , "%ld.%s" , Cpt_Filename , Extensions[FMT_EXT] );
- printf ( " saving in file \"%s\" ... " , OutName_final );
- Cpt_Filename += 1;
- PW_out = mr2_fopen ( OutName_final , "w+b", format_to_save);
- if (!PW_out)
- return;
- fwrite ( &in_data[PW_Start_Address] , OutputSize , 1 , PW_out );
- fclose ( PW_out );
- printf ( "done\n" );
- if ( CONVERT == GOOD )
- {
- printf ( " converting to Protracker ... " );
- }
- fflush ( stdout );
- Save_Status = GOOD;
-}
-
-/*
- * Special cases for files with header to rebuild ...
- *
-*/
-void Save_Rip_Special ( char * format_to_save, int FMT_EXT, Uchar * Header_Block , Ulong Block_Size )
-{
- Save_Status = BAD;
- printf ( "%s found at %ld !. its size is : %ld\n", format_to_save , PW_Start_Address , OutputSize );
- if ( (PW_Start_Address + (long)OutputSize) > PW_in_size )
- {
- printf ( "!!! Truncated, missing (%ld byte(s) !)\n"
- , (PW_Start_Address+OutputSize)-PW_in_size );
- PW_i += 2 ;
- return;
- }
- BZERO (OutName_final, sizeof OutName_final);
- sprintf ( OutName_final , "%ld.%s" , Cpt_Filename , Extensions[FMT_EXT] );
- printf ( " saving in file \"%s\" ... " , OutName_final );
- Cpt_Filename += 1;
- PW_out = mr2_fopen ( OutName_final , "w+b", format_to_save );
- if (!PW_out)
- return;
- fwrite ( Header_Block , Block_Size , 1 , PW_out );
- fwrite ( &in_data[PW_Start_Address] , OutputSize , 1 , PW_out );
- fclose ( PW_out );
- printf ( "done\n" );
- if ( CONVERT == GOOD )
- {
- printf ( " converting to Protracker ... " );
- }
- printf ( " Header of this file was missing and has been rebuilt !\n" );
- fflush ( stdout );
- Amiga_EXE_Header = GOOD;
- Save_Status = GOOD;
-}
-
-
-
-/* writing craps in converted MODs */
-void Crap ( char *Format , Uchar Delta , Uchar Pack , FILE *out )
-{
- fseek ( out , 560 , SEEK_SET );
- fprintf ( out , "[ Converted with ]" );
- fseek ( out , 590 , SEEK_SET );
- fprintf ( out , "[ ProWizard for PC ]" );
- fseek ( out , 620 , SEEK_SET );
- fprintf ( out , "[ written by Asle! ]" );
-
- fseek ( out , 680 , SEEK_SET );
- fprintf ( out , "[ Original Format: ]" );
- fseek ( out , 710 , SEEK_SET );
- fprintf ( out , "[%s]" , Format );
-
- if ( Delta == GOOD )
- {
- fseek ( out , 770 , SEEK_SET );
- fprintf ( out , "[! smp were DELTA ]" );
- }
- if ( Pack == GOOD )
- {
- fseek ( out , 800 , SEEK_SET );
- fprintf ( out , "[! smp were PACKED ]" );
- }
-}
-
-
-/*
- * Special version of Test() for cruncher data (Ice! etc...)
- * only one file and not hundreds ...
-*/
-short testSpecialCruncherData ( long Pack_addy , long Unpack_addy )
-{
- PW_Start_Address = PW_i;
-
- /* a small test preventing hangover :) ... */
- /* e.g. addressing of unassigned data */
- if ( ( (long)PW_i + Pack_addy ) > PW_in_size )
- {
-/*printf ( "#0\n" );*/
- return BAD;
- }
-
- /* packed size */
- /* first byte is sometime used ... "SQ is an ex" */
- PW_l = ( (in_data[PW_Start_Address+Pack_addy+1]*256*256) +
- (in_data[PW_Start_Address+Pack_addy+2]*256) +
- in_data[PW_Start_Address+Pack_addy+3] );
- /* unpacked size */
- PW_k = ( (in_data[PW_Start_Address+Unpack_addy]*256*256*256) +
- (in_data[PW_Start_Address+Unpack_addy+1]*256*256) +
- (in_data[PW_Start_Address+Unpack_addy+2]*256) +
- in_data[PW_Start_Address+Unpack_addy+3] );
-
- if ( (PW_k <= 2) || (PW_l <= 2) )
- {
-/*printf ( "#1\n" );*/
- return BAD;
- }
-
- if ( PW_l > 0x989680 ) /* 10 mb */
- {
-/*printf ( "#2\n" );*/
- return BAD;
- }
-
- if ( PW_k <= PW_l )
- {
-/*printf ( "#3\n" );*/
- return BAD;
- }
-
- if ( PW_k > 0x989689 ) /* 10 Megs ! */
- {
-/*printf ( "#4\n" );*/
- return BAD;
- }
-
- return GOOD;
-}
-
-/*
- * Special version of Rip() for cruncher data (Ice! etc...)
- * only one file and not hundreds ...
-*/
-void Rip_SpecialCruncherData ( char *Packer_Name , int Header_Size , int Packer_Extension_Define )
-{
- /* PW_l IS the whole size -Header_Size */
- /* various Data crunchers need a little calculation beside the "+" or "-" */
- switch (Header_Size)
- {
- case 999991: /* SQ data cruncher */
- PW_l *= 4;
- PW_l += 10;
- OutputSize = PW_l;
- break;
- default:
- OutputSize = PW_l + Header_Size;
- }
-
- /* printf ( "\b\b\b\b\b\b\b\b%s file found at %ld !. its size is : %ld\n" , Packer_Name , PW_Start_Address , OutputSize );*/
- /* OutName[1] = Extensions[Packer_Extension_Define][0];
- OutName[2] = Extensions[Packer_Extension_Define][1];
- OutName[3] = Extensions[Packer_Extension_Define][2];*/
-
- CONVERT = BAD;
- Save_Rip ( Packer_Name, Packer_Extension_Define );
-
- if ( Save_Status == GOOD )
-// PW_i += (OutputSize - 2); /* 0 should do but call it "just to be sure" :) */
- PW_i += (Header_Size + 1); /* test to overcome fake datas */
- PW_WholeSampleSize = 0;
-
-}
-
-/* yet again on Xigh's suggestion. How to handle 'correctly' a file size */
-long GetFileSizeX (char *infile)
-{
- long i;
- struct stat *Stat;
- Stat = (struct stat *) malloc ( sizeof (struct stat));
- stat ( infile, Stat );
- i = (long)Stat->st_size;
- free ( Stat );
- return i;
-}
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-/*
- * group of tests funcs that are common to most of test\*.c files
-*/
-
-/* start : if mod can possibly fit from the beginning of the file */
-/* e.g. M.K. before 1080th byte */
-short test_1_start ( Ulong LIMIT )
-{
- return ( PW_i < LIMIT) ? BAD : GOOD;
-}
-
-short test_smps ( long smpsiz, long lstart, long lsiz, Uchar vol, Uchar fine )
-{
- if ( lstart > smpsiz )
- return BAD;
- if ( lsiz > (smpsiz + 2) )
- return BAD;
- if ( (lstart + lsiz) > smpsiz+2 )
- return BAD;
- if ( (lstart != 0) && ( lsiz <= 2 ) )
- return BAD;
- if ( ((lstart != 0) || (lsiz > 2)) && (smpsiz = 0) )
- return BAD;
- if ( (vol > 0x40) || (fine > 0x0f) )
- return BAD;
- return GOOD;
-}
+++ /dev/null
-/*
- * Pro-Wizard_1.c
- *
- * 1997-2003 (c) Sylvain "Asle" Chipaux
- *
-*/
-
-#ifdef DOS
-#include "include\globals.h"
-#include "include\extern.h"
-#include "include\vars.h"
-#endif
-
-
-#ifdef UNIX
-#include "include/globals.h"
-#include "include/extern.h"
-#include "include/vars.h"
-#endif
-
-#ifdef DMALLOC
-#include "dmalloc.h"
-#endif
-
-int prowizard_search (Uchar *in_data_p, int PW_in_size_p)
-{
- Support_Types ();
- in_data = in_data_p;
- PW_in_size = PW_in_size_p;
- /********************************************************************/
- /************************** SEARCH ******************************/
- /********************************************************************/
- for ( (long)PW_i=0 ; (long)PW_i<(PW_in_size-MINIMAL_FILE_LENGHT) ; (long)PW_i+=1 )
- {
- /* display where we are every 10 Kbytes */
- /* if ( (PW_i%10240) == 0 )*/
- /* {*/
- /* ... and rewrites on itself. */
- /* printf ( "\r%ld", PW_i );*/
- /* force printing on stdout (i.e. the screen) */
- /* fflush ( stdout );*/
- /* }*/
-
- /*******************************************************************/
- /* ok, now the real job starts here. So, we look for ID or Volume */
- /* values. A simple switch case follows .. based on Hex values of, */
- /* as foretold, ID or volume (not all file have ID ... few in fact */
- /* do ..). */
- /*******************************************************************/
-
- if ( in_data[PW_i] <= 0x40 )
- {
- /* try to get rid of those 00 hanging all the time everywhere :(
- */
- if ( in_data[PW_i] == 0x00 )
- {
- for ( PW_j = 0 ; PW_j<MINIMAL_FILE_LENGHT ; PW_j++)
- {
- if ( in_data[PW_j+PW_i] != 0x00 )
- break;
- }
- if ( PW_j == MINIMAL_FILE_LENGHT )
- {
- PW_i += (MINIMAL_FILE_LENGHT-2);
- continue;
- }
- }
-
- /* first, let's take care of the formats with 'ID' value < 0x40 */
- /* "!PM!" : ID of Power Music */
- if ( (in_data[PW_i] == '!') &&
- (in_data[PW_i+1] == 'P') &&
- (in_data[PW_i+2] == 'M') &&
- (in_data[PW_i+3] == '!') )
- {
- if ( testPM() != BAD )
- {
- Rip_PM ();
- Depack_PM ();
- continue;
- }
- }
- /* StoneCracker 2.92 data (ex-$08090A08 data cruncher) */
- if ( (in_data[PW_i] == 0x08) &&
- (in_data[PW_i+1] == 0x09) &&
- (in_data[PW_i+2] == 0x0A) &&
- (in_data[PW_i+3] == 0x08) )
- {
- if ( testSpecialCruncherData ( 8, 4 ) != BAD )
- {
- Rip_SpecialCruncherData ( "StoneCracker 2.92 Data Cruncher" , 12 , STC292data );
- continue;
- }
- }
- /* "1AM" data cruncher */
- if ( (in_data[PW_i] == '1') &&
- (in_data[PW_i+1] == 'A') &&
- (in_data[PW_i+2] == 'M') )
- {
- if ( testSpecialCruncherData( 12, 8 ) != BAD )
- {
- Rip_SpecialCruncherData ( "Amnesty Design (1AM) Data Cruncher" , 16 , AmnestyDesign1 );
- continue;
- }
- }
- /* "2AM" data cruncher */
- if ( (in_data[PW_i] == '2') &&
- (in_data[PW_i+1] == 'A') &&
- (in_data[PW_i+2] == 'M') )
- {
- if ( testSpecialCruncherData ( 8, 4 ) != BAD )
- {
- Rip_SpecialCruncherData ( "Amnesty Design (2AM) Data Cruncher" , 12 , AmnestyDesign2 );
- continue;
- }
- }
- /* =SB= data cruncher */
- if ( (in_data[PW_i] == 0x3D) &&
- (in_data[PW_i+1] == 'S') &&
- (in_data[PW_i+2] == 'B') &&
- (in_data[PW_i+3] == 0x3D) )
- {
- if ( testSpecialCruncherData ( 8, 4 ) != BAD )
- {
- Rip_SpecialCruncherData ( "=SB= Data Cruncher" , 12 , SB_DataCruncher );
- continue;
- }
- }
-
- /* -CJ- data cruncher (CrackerJack/Mirage)*/
- if ( (in_data[PW_i] == 0x2D) &&
- (in_data[PW_i+1] == 'C') &&
- (in_data[PW_i+2] == 'J') &&
- (in_data[PW_i+3] == 0x2D) )
- {
- if ( testSpecialCruncherData ( 4, 8 ) != BAD )
- {
- Rip_SpecialCruncherData ( "-CJ- Data Cruncher" , 0 , CJ_DataCruncher );
- continue;
- }
- }
-
- /* Max Packer 1.2 */
- if ((in_data[PW_i] == 0x28) &&
- (in_data[PW_i+1] == 0x3C) &&
- (in_data[PW_i+6] == 0x26) &&
- (in_data[PW_i+7] == 0x7A) &&
- (in_data[PW_i+8] == 0x01) &&
- (in_data[PW_i+9] == 0x6C) &&
- (in_data[PW_i+10] == 0x41) &&
- (in_data[PW_i+11] == 0xFA) &&
- (in_data[PW_i+12] == 0x01) &&
- (in_data[PW_i+13] == 0x7C) &&
- (in_data[PW_i+14] == 0xD1) &&
- (in_data[PW_i+15] == 0xFA) )
- {
- if ( testMaxPacker12() == BAD )
- break;
- Rip_MaxPacker12 ();
- continue;
- }
-
- /* XANN packer */
- if ( in_data[PW_i] == 0x3c )
- {
- if ( testXANN() != BAD )
- {
- Rip_XANN ();
- Depack_XANN ();
- continue;
- }
- }
-
- /* hum ... that's where things become interresting :) */
- /* Module Protector without ID */
- /* LEAVE IT THERE !!! ... at least before Heatseeker format since they are VERY similare ! */
- if ( testMP_noID() != BAD )
- {
- Rip_MP_noID ();
- Depack_MP ();
- continue;
- }
-
- /* Digital Illusion */
- if ( testDI() != BAD )
- {
- Rip_DI ();
- Depack_DI ();
- continue;
- }
-
- /* eureka packer */
- if ( testEUREKA() != BAD )
- {
- Rip_EUREKA ();
- Depack_EUREKA ();
- continue;
- }
-
- /* The player 5.0a ? */
- if ( testP50A() != BAD )
- {
- Rip_P50A ();
- Depack_P50A ();
- continue;
- }
-
- /* The player 6.0a ? */
- if ( testP60A_nopack() != BAD )
- {
- Rip_P60A ();
- Depack_P60A ();
- continue;
- }
-
- /* The player 6.0a (packed samples)? */
- if ( testP60A_pack() != BAD )
- {
- printf ( "\b\b\b\b\b\b\b\bThe Player 6.0A with PACKED samples found at %ld ... cant rip it!\n" , PW_Start_Address );
- /*Rip_P60A ();*/
- /*Depack_P60A ();*/
- continue;
- }
-
- /* The player 6.1a ? */
- if ( testP61A_nopack() != BAD )
- {
- Rip_P61A ();
- Depack_P61A ();
- continue;
- }
-
- /* The player 6.1a (packed samples)? */
- if ( testP61A_pack() != BAD )
- {
- printf ( "\b\b\b\b\b\b\b\bThe Player 6.1A with PACKED samples found at %ld ... cant rip it!\n" , PW_Start_Address );
- /*Rip_P61A ();*/
- /*Depack_P61A ();*/
- continue;
- }
-
- /* Propacker 1.0 */
- if ( testPP10() != BAD )
- {
- Rip_PP10 ();
- Depack_PP10 ();
- continue;
- }
-
- /* Noise Packer v2 */
- /* LEAVE VERSION 2 BEFORE VERSION 1 !!!!! */
- if ( testNoisepacker2() != BAD )
- {
- Rip_Noisepacker2 ();
- Depack_Noisepacker2 ();
- continue;
- }
-
- /* Noise Packer v1 */
- if ( testNoisepacker1() != BAD )
- {
- Rip_Noisepacker1 ();
- Depack_Noisepacker1 ();
- continue;
- }
-
- /* Noise Packer v3 */
- if ( testNoisepacker3() != BAD )
- {
- Rip_Noisepacker3 ();
- Depack_Noisepacker3 ();
- continue;
- }
-
- /* Promizer 0.1 */
- if ( testPM01() != BAD )
- {
- Rip_PM01 ();
- Depack_PM01 ();
- continue;
- }
-
- /* ProPacker 2.1 */
- if ( testPP21() != BAD )
- {
- Rip_PP21 ();
- Depack_PP21 ();
- continue;
- }
-
- /* ProPacker 3.0 */
- if ( testPP30() != BAD )
- {
- Rip_PP30 ();
- Depack_PP30 ();
- continue;
- }
-
- /* StartTrekker pack */
- if ( testSTARPACK() != BAD )
- {
- Rip_STARPACK ();
- Depack_STARPACK ();
- continue;
- }
-
- /* Zen packer */
- if ( testZEN() != BAD )
- {
- Rip_ZEN ();
- Depack_ZEN ();
- continue;
- }
-
- /* Unic tracker v1 ? */
- if ( testUNIC_withemptyID() != BAD )
- {
- Rip_UNIC_withID ();
- Depack_UNIC ();
- continue;
- }
-
- /* Unic tracker v1 ? */
- if ( testUNIC_noID() != BAD )
- {
- Rip_UNIC_noID ();
- Depack_UNIC ();
- continue;
- }
-
- /* Unic trecker v2 ? */
- if ( testUNIC2() != BAD )
- {
- Rip_UNIC2 ();
- Depack_UNIC2 ();
- continue;
- }
-
- /* Game Music Creator ? */
- if ( testGMC() != BAD )
- {
- Rip_GMC ();
- Depack_GMC ();
- continue;
- }
-
- /* Heatseeker ? */
- if ( testHEATSEEKER() != BAD )
- {
- Rip_HEATSEEKER ();
- Depack_HEATSEEKER ();
- continue;
- }
-
- /* SoundTracker (15 smp) */
- if ( testSoundTracker() != BAD )
- {
- Rip_SoundTracker ();
- continue;
- }
-
- /* The Dark Demon (group name) format */
- if ( testTheDarkDemon() != BAD )
- {
- Rip_TheDarkDemon ();
- Depack_TheDarkDemon ();
- continue;
- }
-
- /* Newtron */
- if ( testNewtron() != BAD )
- {
- Rip_Newtron ();
- Depack_Newtron ();
- continue;
- }
- }
-
-
- /**********************************/
- /* ok, now, the files with ID ... */
- /**********************************/
- switch ( in_data[PW_i] )
- {
- case 'A': /* ATN! another Imploder case */
- if ( (in_data[PW_i+1] == 'T') &&
- (in_data[PW_i+2] == 'N') &&
- (in_data[PW_i+3] == '!') )
- {
- if ( testSpecialCruncherData ( 8, 4 ) == BAD )
- break;
- Rip_SpecialCruncherData ( "Imploder data" , 50 , IMP );
- break;
- }
- /* AMOS Music bank "AmBk" */
- if ( (in_data[PW_i+1] == 'm') &&
- (in_data[PW_i+2] == 'B') &&
- (in_data[PW_i+3] == 'k') )
- {
- if ( testAmBk() == BAD )
- break;
- Rip_AmBk();
- Depack_AmBk();
- break;
- }
- /* Time Cruncher 1.7 */
- if ( (in_data[PW_i+1] == 0xFA) &&
- (in_data[PW_i+2] == 0x01) &&
- (in_data[PW_i+3] == 0x34) &&
- (in_data[PW_i+4] == 0xD1) &&
- (in_data[PW_i+5] == 0xFC) &&
- (in_data[PW_i+10] == 0x43) &&
- (in_data[PW_i+11] == 0xF9) &&
- (in_data[PW_i+16] == 0x24) &&
- (in_data[PW_i+17] == 0x60) &&
- (in_data[PW_i+18] == 0xD5) &&
- (in_data[PW_i+19] == 0xC9) &&
- (in_data[PW_i+20] == 0x20) &&
- (in_data[PW_i+21] == 0x20) )
- {
- if ( testTimeCruncher17() == BAD )
- break;
- Rip_TimeCruncher17 ();
- break;
- }
- /* IAM Cruncher 1.0 (another case (aka ICE)) */
- if ( (in_data[PW_i+1] == 'T') &&
- (in_data[PW_i+2] == 'M') &&
- (in_data[PW_i+3] == '5') )
- {
- if ( testSpecialCruncherData ( 8, 4 ) == BAD )
- break;
- Rip_SpecialCruncherData ( "IAM Packer 1.0 (ATM5) data" , 12 , ICE );
- break;
- }
- /* Syncro Packer 4.6 */
- if ( (in_data[PW_i+1] == 0xFA ) &&
- (in_data[PW_i+2] == 0x01 ) &&
- (in_data[PW_i+3] == 0x66 ) &&
- (in_data[PW_i+4] == 0x22 ) &&
- (in_data[PW_i+5] == 0x58 ) &&
- (in_data[PW_i+6] == 0x20 ) &&
- (in_data[PW_i+7] == 0x18 ) &&
- (in_data[PW_i+8] == 0x26 ) &&
- (in_data[PW_i+9] == 0x48 ) &&
- (in_data[PW_i+10] == 0xD1 ) &&
- (in_data[PW_i+11] == 0xC0 ) &&
- (in_data[PW_i+12] == 0x1E ) &&
- (in_data[PW_i+13] == 0x20 ) &&
- (in_data[PW_i+14] == 0x1C ) &&
- (in_data[PW_i+15] == 0x20 ) )
- {
- if ( testSyncroPacker() != BAD )
- {
- Rip_SyncroPacker ();
- break;
- }
- break;
- }
- /* Tetrapack 1.02 */
- if ( (in_data[PW_i+1] == 0xFA ) &&
- (in_data[PW_i+2] == 0x00 ) &&
- (in_data[PW_i+3] == 0xE6 ) &&
- (in_data[PW_i+4] == 0xD1 ) &&
- (in_data[PW_i+5] == 0xFC ) &&
- (in_data[PW_i+10] == 0x22 ) &&
- (in_data[PW_i+11] == 0x7C ) &&
- (in_data[PW_i+16] == 0x24 ) &&
- (in_data[PW_i+17] == 0x60 ) &&
- (in_data[PW_i+18] == 0xD5 ) &&
- (in_data[PW_i+19] == 0xC9 ) )
- {
- if ( testTetrapack102() == BAD )
- break;
- Rip_Tetrapack102 ();
- }
- /* "ArcD" data cruncher */
- if ( (in_data[PW_i+1] == 'r') &&
- (in_data[PW_i+2] == 'c') &&
- (in_data[PW_i+3] == 'D'))
- {
- if ( testArcDDataCruncher() == BAD )
- break;
- Rip_SpecialCruncherData ( "ArcD data Cruncher" , 0 , arcD );
- break;
- }
- /* HQC Cruncher 2.0 */
- if ( (in_data[PW_i+1] == 0xFA ) &&
- (in_data[PW_i+2] == 0x06 ) &&
- (in_data[PW_i+3] == 0x76 ) &&
- (in_data[PW_i+4] == 0x20 ) &&
- (in_data[PW_i+5] == 0x80 ) &&
- (in_data[PW_i+6] == 0x41 ) &&
- (in_data[PW_i+7] == 0xFA ) &&
- (in_data[PW_i+8] == 0x06 ) &&
- (in_data[PW_i+9] == 0x64 ) &&
- (in_data[PW_i+10] == 0x43 ) &&
- (in_data[PW_i+11] == 0xFA ) &&
- (in_data[PW_i+12] == 0x05 ) &&
- (in_data[PW_i+13] == 0x10 ) &&
- (in_data[PW_i+14] == 0x20 ) &&
- (in_data[PW_i+15] == 0x89 ) )
- {
- if ( testHQCCruncher2() != BAD )
- {
- Rip_HQCCruncher2 ();
- break;
- }
- break;
- }
- /* ByteKillerPro 1.0 */
- if ( (in_data[PW_i+1] == 0xFA) &&
- (in_data[PW_i+2] == 0x00) &&
- (in_data[PW_i+3] == 0xDC) &&
- (in_data[PW_i+4] == 0x2C) &&
- (in_data[PW_i+5] == 0x78) &&
- (in_data[PW_i+6] == 0x00) &&
- (in_data[PW_i+7] == 0x04) &&
- (in_data[PW_i+12] == 0x43) &&
- (in_data[PW_i+13] == 0xF9) &&
- (in_data[PW_i+18] == 0x20) &&
- (in_data[PW_i+19] == 0x10) &&
- (in_data[PW_i+20] == 0x22) &&
- (in_data[PW_i+21] == 0x28) )
- {
- if ( testbytekillerpro10() == BAD )
- break;
- Rip_bytekillerpro10 ();
- break;
- }
- /* Ace? (data cruncher) */
- if ( (in_data[PW_i+1] == 'c') &&
- (in_data[PW_i+2] == 'e') &&
- (in_data[PW_i+3] == '?') )
- {
- if ( testSpecialCruncherData ( 4, 8 ) == BAD )
- break;
- Rip_SpecialCruncherData ( "(Ace?) Data Cruncher" , 0 , ACECruncherData );
- break;
- }
- break;
-
- case 'B': /* BTB6 */
- /* ByteKiller 1.3 (exepack) */
- if ( (in_data[PW_i+1] == 'T') &&
- (in_data[PW_i+2] == 'B') &&
- (in_data[PW_i+3] == '6') )
- {
- if ( testByteKiller_13() != BAD )
- {
- Rip_ByteKiller ();
- break;
- }
- testByteKiller_20 ();
- if ( testByteKiller_20() != BAD )
- {
- Rip_ByteKiller ();
- break;
- }
- break;
- }
- /* "BeEp" Jam Cracker */
- if ( (in_data[PW_i+1] == 'e') &&
- (in_data[PW_i+2] == 'E') &&
- (in_data[PW_i+3] == 'p') )
- {
- if ( testJamCracker() == BAD )
- break;
- Rip_JamCracker ();
- break;
- }
- break;
-
- case 'C': /* 0x43 */
- /* CPLX_TP3 ?!? */
- if ( (in_data[PW_i+1] == 'P') &&
- (in_data[PW_i+2] == 'L') &&
- (in_data[PW_i+3] == 'X') &&
- (in_data[PW_i+4] == '_') &&
- (in_data[PW_i+5] == 'T') &&
- (in_data[PW_i+6] == 'P') &&
- (in_data[PW_i+7] == '3') )
- {
- if ( testTP3() == BAD )
- break;
- Rip_TP3 ();
- Depack_TP3 ();
- break;
- }
- /* CrM2 | Crm2 | CrM! */
- if ( ((in_data[PW_i+1] == 'r') &&
- (in_data[PW_i+2] == 'M') &&
- (in_data[PW_i+3] == '2'))||
- ((in_data[PW_i+1] == 'r') &&
- (in_data[PW_i+2] == 'm') &&
- (in_data[PW_i+3] == '2'))||
- ((in_data[PW_i+1] == 'r') &&
- (in_data[PW_i+2] == 'M') &&
- (in_data[PW_i+3] == '!')) )
- {
- if ( testSpecialCruncherData ( 10, 6 ) == BAD )
- break;
- Rip_SpecialCruncherData ( "Crunchmania / Normal data" , 14 , CRM1 );
- break;
- }
- /* "CHFI" another imploder case */
- if ( (in_data[PW_i+1] == 'H') &&
- (in_data[PW_i+2] == 'F') &&
- (in_data[PW_i+3] == 'I') )
- {
- if ( testSpecialCruncherData ( 8, 4 ) == BAD )
- break;
- Rip_SpecialCruncherData ( "Imploder data" , 50 , IMP );
- break;
- }
- /* "CRND" data cruncher */
- if ( (in_data[PW_i+1] == 'R') &&
- (in_data[PW_i+2] == 'N') &&
- (in_data[PW_i+3] == 'D') )
- {
- if ( testCRND() == BAD )
- break;
- Rip_SpecialCruncherData ( "CRND data cruncher" , 20 , CRND );
- break;
- }
- /* Defjam Cruncher 3.2 */
- if ( (in_data[PW_i+1] == 0xFA) &&
- (in_data[PW_i+2] == 0x02) &&
- (in_data[PW_i+3] == 0x8C) &&
- (in_data[PW_i+4] == 0x4B) &&
- (in_data[PW_i+5] == 0xF9) &&
- (in_data[PW_i+6] == 0x00) &&
- ((in_data[PW_i+7] == 0xDF)||(in_data[PW_i+7] == 0x03)) )
- {
- if ( testDefjam32() == BAD )
- break;
- Rip_Defjam32 ();
- break;
- }
- break;
- break;
-
- case 'D': /* 0x44 */
- /* Digibooster 1.7 */
- if ( (in_data[PW_i+1] == 'I') &&
- (in_data[PW_i+2] == 'G') &&
- (in_data[PW_i+3] == 'I') )
- {
- if ( testDigiBooster17() == BAD )
- break;
- Rip_DigiBooster17 ();
- break;
- }
- break;
-
- case 'E': /* 0x45 */
- /* "EMOD" : ID of Quadra Composer */
- if ( (in_data[PW_i+1] == 'M') &&
- (in_data[PW_i+2] == 'O') &&
- (in_data[PW_i+3] == 'D') )
- {
- if ( testQuadraComposer() == BAD )
- break;
- Rip_QuadraComposer ();
- Depack_QuadraComposer ();
- break;
- }
- /* "Extended Module" : ID of Quadra Composer */
- if ( (in_data[PW_i+1] == 'x') &&
- (in_data[PW_i+2] == 't') &&
- (in_data[PW_i+3] == 'e') &&
- (in_data[PW_i+4] == 'n') &&
- (in_data[PW_i+5] == 'd') &&
- (in_data[PW_i+6] == 'e') &&
- (in_data[PW_i+7] == 'd') &&
- (in_data[PW_i+8] == ' ') &&
- (in_data[PW_i+9] == 'M') &&
- (in_data[PW_i+10]== 'o') )
- {
- if ( testXM() == BAD )
- break;
- Rip_XM ();
- break;
- }
- break;
-
- case 'F': /* 0x46 */
- /* "FC-M" : ID of FC-M packer */
- if ( (in_data[PW_i+1] == 'C') &&
- (in_data[PW_i+2] == '-') &&
- (in_data[PW_i+3] == 'M') )
- {
- if ( testFC_M() == BAD )
- break;
- Rip_FC_M ();
- Depack_FC_M ();
- break;
- }
- /* "FLT4" : ID of StarTrekker */
- if ( (in_data[PW_i+1] == 'L') &&
- (in_data[PW_i+2] == 'T') &&
- (in_data[PW_i+3] == '4') )
- {
- if ( testPTK() == BAD )
- break;
- Rip_StarTrekker ();
- break;
- }
- /* "FC14" : Future Composer 1.4 */
- if ( (in_data[PW_i+1] == 'C') &&
- (in_data[PW_i+2] == '1') &&
- (in_data[PW_i+3] == '4') )
- {
- if ( testFC14() == BAD )
- break;
- Rip_FC14 ();
- break;
- }
- /* "FUCO" : ID of BSI Future Composer */
- if ( (in_data[PW_i+1] == 'U') &&
- (in_data[PW_i+2] == 'C') &&
- (in_data[PW_i+3] == 'O') )
- {
- if ( testBSIFutureComposer() == BAD )
- break;
- Rip_BSIFutureComposer ();
- break;
- }
- /* "Fuck" : ID of Noise From Heaven #2 chiptunes */
- if ( (in_data[PW_i+1] == 'u') &&
- (in_data[PW_i+2] == 'c') &&
- (in_data[PW_i+3] == 'k') )
- {
- if ( testNFH() == BAD )
- break;
- Rip_NFH ();
- Depack_NFH ();
- break;
- }
- /* FIRE (RNC clone) Cruncher */
- if ( (in_data[PW_i+1] == 'I') &&
- (in_data[PW_i+2] == 'R') &&
- (in_data[PW_i+3] == 'E') )
- {
- if ( testSpecialCruncherData ( 4, 8 ) == BAD )
- break;
- Rip_SpecialCruncherData ( "FIRE (RNC Clone) data Cruncher" , 0 , FIRE );
- break;
- }
- break;
-
- case 'G': /* 0x47 */
- /* Mega Cruncher 1.0 */
- if ( (in_data[PW_i+1] == 0xFA ) &&
- (in_data[PW_i+2] == 0x01 ) &&
- (in_data[PW_i+3] == 0x2E ) &&
- (in_data[PW_i+4] == 0x20 ) &&
- (in_data[PW_i+5] == 0x0B ) &&
- (in_data[PW_i+6] == 0x22 ) &&
- (in_data[PW_i+7] == 0x2B ) &&
- (in_data[PW_i+8] == 0x00 ) &&
- (in_data[PW_i+9] == 0x08 ) &&
- (in_data[PW_i+10] == 0x41 ) &&
- (in_data[PW_i+11] == 0xFA ) &&
- (in_data[PW_i+12] == 0x01 ) &&
- (in_data[PW_i+13] == 0x30 ) &&
- (in_data[PW_i+14] == 0xD1 ) &&
- (in_data[PW_i+15] == 0xC1 ) )
- {
- if ( testMegaCruncher10() != BAD )
- {
- Rip_MegaCruncher ();
- break;
- }
- break;
- }
-
- /* Mega Cruncher 1.2 */
- if ( (in_data[PW_i+1] == 0xFA ) &&
- (in_data[PW_i+2] == 0x01 ) &&
- (in_data[PW_i+3] == 0x32 ) &&
- (in_data[PW_i+4] == 0x20 ) &&
- (in_data[PW_i+5] == 0x0B ) &&
- (in_data[PW_i+6] == 0x22 ) &&
- (in_data[PW_i+7] == 0x2B ) &&
- (in_data[PW_i+8] == 0x00 ) &&
- (in_data[PW_i+9] == 0x08 ) &&
- (in_data[PW_i+10] == 0x41 ) &&
- (in_data[PW_i+11] == 0xFA ) &&
- (in_data[PW_i+12] == 0x01 ) &&
- (in_data[PW_i+13] == 0x34 ) &&
- (in_data[PW_i+14] == 0xD1 ) &&
- (in_data[PW_i+15] == 0xC1 ) )
- {
- if ( testMegaCruncher12() != BAD )
- {
- Rip_MegaCruncher ();
- break;
- }
- break;
- }
-
- /* GPMO (crunch player ?)*/
- if ( (in_data[PW_i+1] == 'P') &&
- (in_data[PW_i+2] == 'M') &&
- (in_data[PW_i+3] == 'O') )
- {
- if ( testGPMO() == BAD )
- break;
- Rip_GPMO ();
- Depack_GPMO ();
- break;
- }
-
- /* Gnu player */
- if ( (in_data[PW_i+1] == 'n') &&
- (in_data[PW_i+2] == 'P') &&
- (in_data[PW_i+3] == 'l') )
- {
- if ( testGnuPlayer() == BAD )
- break;
- Rip_GnuPlayer ();
- Depack_GnuPlayer ();
- break;
- }
-
- break;
-
- case 'H': /* 0x48 */
- /* "HRT!" : ID of Hornet packer */
- if ( (in_data[PW_i+1] == 'R') &&
- (in_data[PW_i+2] == 'T') &&
- (in_data[PW_i+3] == '!') )
- {
- if ( testHRT() == BAD )
- break;
- Rip_HRT ();
- Depack_HRT ();
- break;
- }
-
- /* Master Cruncher 3.0 Address */
- if ( (in_data[PW_i+1] == 0xE7) &&
- (in_data[PW_i+2] == 0xFF) &&
- (in_data[PW_i+3] == 0xFE) &&
- (in_data[PW_i+4] == 0x4B) &&
- (in_data[PW_i+5] == 0xFA) &&
- (in_data[PW_i+6] == 0x01) &&
- (in_data[PW_i+7] == 0x80) &&
- (in_data[PW_i+8] == 0x41) &&
- (in_data[PW_i+9] == 0xFA) &&
- (in_data[PW_i+10] == 0xFF) &&
- (in_data[PW_i+11] == 0xF2) &&
- (in_data[PW_i+12] == 0x22) &&
- (in_data[PW_i+13] == 0x50) &&
- (in_data[PW_i+14] == 0xD3) &&
- (in_data[PW_i+15] == 0xC9) )
- {
- if ( testMasterCruncher30addr() == BAD )
- break;
- Rip_MasterCruncher30addr ();
- break;
- }
-
- /* Powerpacker 4.0 library */
- if ( (in_data[PW_i+1] == 0x7A) &&
- (in_data[PW_i+2] == 0x00) &&
- (in_data[PW_i+3] == 0x58) &&
- (in_data[PW_i+4] == 0x48) &&
- (in_data[PW_i+5] == 0xE7) &&
- (in_data[PW_i+6] == 0xFF) &&
- (in_data[PW_i+7] == 0xFE) &&
- (in_data[PW_i+8] == 0x70) &&
- (in_data[PW_i+9] == 0x23) &&
- (in_data[PW_i+10] == 0x43) &&
- (in_data[PW_i+11] == 0xFA) &&
- (in_data[PW_i+12] == 0x00) &&
- (in_data[PW_i+13] == 0x50) &&
- (in_data[PW_i+14] == 0x2C) &&
- (in_data[PW_i+15] == 0x78) )
- {
- if ( testPowerpacker4lib() == BAD )
- break;
- Rip_Powerpacker4lib ();
- break;
- }
- /* StoneCracker 2.70 */
- if ( (in_data[PW_i+1] == 0xE7) &&
- (in_data[PW_i+2] == 0xFF) &&
- (in_data[PW_i+3] == 0xFE) &&
- (in_data[PW_i+4] == 0x4D) &&
- (in_data[PW_i+5] == 0xF9) &&
- (in_data[PW_i+6] == 0x00) &&
- (in_data[PW_i+7] == 0xDF) &&
- (in_data[PW_i+8] == 0xF0) &&
- (in_data[PW_i+9] == 0x06) &&
- (in_data[PW_i+10] == 0x7E) &&
- (in_data[PW_i+11] == 0x00) &&
- (in_data[PW_i+12] == 0x7C) &&
- (in_data[PW_i+13] == 0x00) &&
- (in_data[PW_i+14] == 0x7A) &&
- (in_data[PW_i+15] == 0x00) )
- {
- if ( testStoneCracker270() == BAD )
- break;
- Rip_StoneCracker270 ();
- break;
- }
-
- /* ByteKiller 3.0 */
- if ( (in_data[PW_i+1] == 0xE7) &&
- (in_data[PW_i+2] == 0xFF) &&
- (in_data[PW_i+3] == 0xFE) &&
- (in_data[PW_i+4] == 0x41) &&
- (in_data[PW_i+5] == 0xFA) &&
- (in_data[PW_i+6] == 0x00) &&
- (in_data[PW_i+7] == 0xB6) &&
- (in_data[PW_i+8] == 0x43) &&
- (in_data[PW_i+9] == 0xF9) &&
- (in_data[PW_i+14] == 0x4D) &&
- (in_data[PW_i+15] == 0xF9) )
- {
- if ( testByteKiller30() == BAD )
- break;
- Rip_ByteKiller30 ();
- break;
- }
-
- /* Powerpacker 2.3 */
- if ( (in_data[PW_i+1] == 0xE7) &&
- (in_data[PW_i+2] == 0xFF) &&
- (in_data[PW_i+3] == 0xFE) &&
- (in_data[PW_i+4] == 0x41) &&
- (in_data[PW_i+5] == 0xFA) &&
- (in_data[PW_i+6] == 0xFF) &&
- (in_data[PW_i+7] == 0xF6) &&
- (in_data[PW_i+8] == 0x20) &&
- (in_data[PW_i+9] == 0x50) &&
- (in_data[PW_i+10] == 0xD1) &&
- (in_data[PW_i+11] == 0xC8) &&
- (in_data[PW_i+12] == 0xD1) &&
- (in_data[PW_i+13] == 0xC8) &&
- (in_data[PW_i+14] == 0x4A) &&
- (in_data[PW_i+15] == 0x98) )
- {
- if ( testPowerpacker23() == BAD )
- break;
- Rip_Powerpacker23 ();
- break;
- }
-
- /* Powerpacker 3.0 */
- if ( (in_data[PW_i+1] == 0x7A) &&
- (in_data[PW_i+2] == 0x01) &&
- (in_data[PW_i+3] == 0x78) &&
- (in_data[PW_i+4] == 0x48) &&
- (in_data[PW_i+5] == 0xE7) &&
- (in_data[PW_i+6] == 0xFF) &&
- (in_data[PW_i+7] == 0xFE) &&
- (in_data[PW_i+8] == 0x49) &&
- (in_data[PW_i+9] == 0xFA) &&
- (in_data[PW_i+10] == 0xFF) &&
- (in_data[PW_i+11] == 0xF2) &&
- (in_data[PW_i+12] == 0x20) &&
- (in_data[PW_i+13] == 0x54) &&
- (in_data[PW_i+14] == 0xD1) &&
- (in_data[PW_i+15] == 0xC8) )
- {
- if ( testPowerpacker30() == BAD )
- break;
- Rip_Powerpacker30 ();
- break;
- }
-
- /* Powerpacker 4.0 */
- if ( (in_data[PW_i+1] == 0x7A) &&
- (in_data[PW_i+2] == 0x01) &&
- (in_data[PW_i+3] == 0xC8) &&
- (in_data[PW_i+4] == 0x48) &&
- (in_data[PW_i+5] == 0xE7) &&
- (in_data[PW_i+6] == 0xFF) &&
- (in_data[PW_i+7] == 0xFE) &&
- (in_data[PW_i+8] == 0x49) &&
- (in_data[PW_i+9] == 0xFA) &&
- (in_data[PW_i+10] == 0xFF) &&
- (in_data[PW_i+11] == 0xF2) &&
- (in_data[PW_i+12] == 0x20) &&
- (in_data[PW_i+13] == 0x54) &&
- (in_data[PW_i+14] == 0xD1) &&
- (in_data[PW_i+15] == 0xC8) )
- {
- if ( testPowerpacker40() == BAD )
- break;
- Rip_Powerpacker40 ();
- break;
- }
-
- /* Super Cruncher 2.7 */
- if ( (in_data[PW_i+1] == 0xE7) &&
- (in_data[PW_i+2] == 0xFF) &&
- (in_data[PW_i+3] == 0xFE) &&
- (in_data[PW_i+4] == 0x2C) &&
- (in_data[PW_i+5] == 0x79) &&
- (in_data[PW_i+10] == 0x4E) &&
- (in_data[PW_i+11] == 0xAE) &&
- (in_data[PW_i+12] == 0xFF) &&
- (in_data[PW_i+13] == 0x7C) &&
- (in_data[PW_i+14] == 0x41) &&
- (in_data[PW_i+15] == 0xFA) )
- {
- if ( testSuperCruncher27() == BAD )
- break;
- Rip_SuperCruncher27 ();
- break;
- }
-
- /* Crunchmania Address */
- if ((in_data[PW_i+1] == 0xe7) &&
- (in_data[PW_i+14] == 0x22) &&
- (in_data[PW_i+15] == 0x1A) &&
- (in_data[PW_i+16] == 0x24) &&
- (in_data[PW_i+17] == 0x1A) &&
- (in_data[PW_i+18] == 0x47) &&
- (in_data[PW_i+19] == 0xEA) &&
- (in_data[PW_i+24] == 0x6F) &&
- (in_data[PW_i+25] == 0x1C) &&
- (in_data[PW_i+26] == 0x26) &&
- (in_data[PW_i+27] == 0x49) &&
- (in_data[PW_i+28] == 0xD7) &&
- (in_data[PW_i+29] == 0xC1) &&
- (in_data[PW_i+30] == 0xB7) &&
- (in_data[PW_i+31] == 0xCA) )
- {
- if ( testcrunchmaniaAddr() == BAD )
- break;
- Rip_CrunchmaniaAddr ();
- continue;
- }
-
- /* RelokIt 1.0 */
- if ( (in_data[PW_i+1] == 0xE7) &&
- (in_data[PW_i+2] == 0xFF) &&
- (in_data[PW_i+3] == 0xFE) &&
- (in_data[PW_i+4] == 0x41) &&
- (in_data[PW_i+5] == 0xFA) &&
- (in_data[PW_i+6] == 0x02) &&
- (in_data[PW_i+7] == 0xC6) &&
- (in_data[PW_i+8] == 0x70) &&
- (in_data[PW_i+9] == 0x00) &&
- (in_data[PW_i+10] == 0x30) &&
- (in_data[PW_i+11] == 0x28) &&
- (in_data[PW_i+12] == 0x00) &&
- (in_data[PW_i+13] == 0x04) &&
- (in_data[PW_i+14] == 0x23) &&
- (in_data[PW_i+15] == 0xC0) )
- {
- if ( testRelokIt10() == BAD )
- break;
- Rip_RelokIt10 ();
- break;
- }
-
- /* Mega Cruncher Obj */
- if ( (in_data[PW_i+1] == 0xE7) &&
- (in_data[PW_i+2] == 0xFF) &&
- (in_data[PW_i+3] == 0xFE) &&
- (in_data[PW_i+4] == 0x2C) &&
- (in_data[PW_i+5] == 0x78) &&
- (in_data[PW_i+6] == 0x00) &&
- (in_data[PW_i+7] == 0x04) &&
- (in_data[PW_i+8] == 0x4B) &&
- (in_data[PW_i+9] == 0xFA) &&
- (in_data[PW_i+10] == 0x01) &&
- (in_data[PW_i+11] == 0xC0) )
- {
- if ( testMegaCruncherObj() == BAD )
- break;
- Rip_MegaCruncherObj ();
- break;
- }
-
- /* Turbo Squeezer 6.1 */
- if ( (in_data[PW_i+1] == 0xE7) &&
- (in_data[PW_i+2] == 0xFF) &&
- (in_data[PW_i+3] == 0xFE) &&
- (in_data[PW_i+4] == 0x2C) &&
- (in_data[PW_i+5] == 0x79) &&
- (in_data[PW_i+6] == 0x00) &&
- (in_data[PW_i+7] == 0x00) &&
- (in_data[PW_i+8] == 0x00) &&
- (in_data[PW_i+9] == 0x04) &&
- (in_data[PW_i+10] == 0x20) &&
- (in_data[PW_i+11] == 0x7A) )
- {
- if ( testTurboSqueezer61() == BAD )
- break;
- Rip_TurboSqueezer61 ();
- break;
- }
- break;
-
- case 'I': /* 0x48 */
- /* "ICE!" : ID of IAM packer 1.0 */
- if ( (in_data[PW_i+1] == 'C') &&
- (in_data[PW_i+2] == 'E') &&
- (in_data[PW_i+3] == '!') )
- {
- if ( testSpecialCruncherData ( 4, 8 ) == BAD )
- break;
- Rip_SpecialCruncherData ( "IAM Packer 1.0 (ICE!) data" , 0 , ICE );
- break;
- }
- /* "Ice!" : ID of Ice! Cruncher */
- if ( (in_data[PW_i+1] == 'c') &&
- (in_data[PW_i+2] == 'e') &&
- (in_data[PW_i+3] == '!') )
- {
- if ( testSpecialCruncherData ( 4, 8 ) == BAD )
- break;
- Rip_SpecialCruncherData ( "Ice! Cruncher (data)" , 0 , ICE );
- break;
- }
- /* "IMP!" */
- if ( (in_data[PW_i+1] == 'M') &&
- (in_data[PW_i+2] == 'P') &&
- (in_data[PW_i+3] == '!') )
- {
- if ( testSpecialCruncherData ( 8, 4 ) == BAD )
- break;
- Rip_SpecialCruncherData ( "Imploder data" , 50 , IMP );
- break;
- }
-
- if ( (in_data[PW_i+1] == 'T') &&
- (in_data[PW_i+2] == '1') &&
- (in_data[PW_i+3] == '0') )
- {
- /* Ice Tracker 1.0 */
- if ( testSTK26() == BAD )
- break;
- Rip_STK26 ();
- Depack_STK26 ();
- break;
- }
- break;
-
- case 'K': /* 0x4B */
- /* "KRIS" : ID of Chip Tracker */
- if ( (in_data[PW_i+1] == 'R') &&
- (in_data[PW_i+2] == 'I') &&
- (in_data[PW_i+3] == 'S') )
- {
- if ( testKRIS() == BAD )
- break;
- Rip_KRIS ();
- Depack_KRIS ();
- break;
- }
- /* Try-It Cruncher 1.01 */
- if ( (in_data[PW_i+1] == 0xFA) &&
- (in_data[PW_i+2] == 0x01) &&
- (in_data[PW_i+3] == 0x54) &&
- (in_data[PW_i+4] == 0x24) &&
- (in_data[PW_i+5] == 0x6D) &&
- (in_data[PW_i+6] == 0x00) &&
- (in_data[PW_i+7] == 0x18) &&
- (in_data[PW_i+8] == 0xB3) &&
- (in_data[PW_i+9] == 0xED) &&
- (in_data[PW_i+10] == 0x00) &&
- (in_data[PW_i+11] == 0x18) &&
- (in_data[PW_i+12] == 0x6F) &&
- (in_data[PW_i+13] == 0x0E) &&
- (in_data[PW_i+14] == 0x20) &&
- (in_data[PW_i+15] == 0x4A) )
- {
- if ( testTryIt101() == BAD )
- break;
- Rip_TryIt101 ();
- break;
- }
- break;
-
- case 'M': /* 0x4D */
- if ( (in_data[PW_i+1] == '.') &&
- (in_data[PW_i+2] == 'K') &&
- (in_data[PW_i+3] == '.') )
- {
- /* protracker ? */
- if ( testPTK() != BAD )
- {
- Rip_PTK ();
- break;
- }
-
- /* Unic tracker v1 ? */
- if ( testUNIC_withID() != BAD )
- {
- Rip_UNIC_withID ();
- Depack_UNIC ();
- break;
- }
-
- /* Noiserunner ? */
- if ( testNoiserunner() != BAD )
- {
- Rip_Noiserunner ();
- Depack_Noiserunner ();
- break;
- }
- }
-
- if ( (in_data[PW_i+1] == '1') &&
- (in_data[PW_i+2] == '.') &&
- (in_data[PW_i+3] == '0') )
- {
- /* Fuzzac packer */
- if ( testFUZZAC() != BAD )
- {
- Rip_Fuzzac ();
- Depack_Fuzzac ();
- break;
- }
- }
-
- if ( (in_data[PW_i+1] == 'E') &&
- (in_data[PW_i+2] == 'X') &&
- (in_data[PW_i+3] == 'X') )
- {
- /* tracker packer v2 */
- if ( testTP2() != BAD )
- {
- Rip_TP2 ();
- Depack_TP2 ();
- break;
- }
- /* tracker packer v1 */
- if ( testTP1() != BAD )
- {
- Rip_TP1 ();
- Depack_TP1 ();
- break;
- }
- }
-
- if ( in_data[PW_i+1] == '.' )
- {
- /* Kefrens sound machine ? */
- if ( testKSM() != BAD )
- {
- Rip_KSM ();
- Depack_KSM ();
- break;
- }
- }
-
- if ( (in_data[PW_i+1] == 'T') &&
- (in_data[PW_i+2] == 'N') &&
- (in_data[PW_i+3] == 0x00) )
- {
- /* SoundTracker 2.6 */
- if ( testSTK26() != BAD )
- {
- Rip_STK26 ();
- Depack_STK26 ();
- break;
- }
- }
-
- if ( (in_data[PW_i+1] == 'M') &&
- (in_data[PW_i+2] == 'D') &&
- ((in_data[PW_i+3] == '0') ||
- (in_data[PW_i+3] == '1') ||
- (in_data[PW_i+3] == '2') ||
- (in_data[PW_i+3] == '3')) )
- {
- /* MED (MMD0) */
- if ( testMMD0() == BAD )
- break;
- Rip_MMD0 ();
- }
-
- /* Defjam Cruncher 3.2 pro */
- if ( (in_data[PW_i+1] == 0xF9 ) &&
- (in_data[PW_i+2] == 0x00 ) &&
- (in_data[PW_i+3] == 0xDF ) &&
- (in_data[PW_i+4] == 0xF0 ) &&
- (in_data[PW_i+5] == 0x00 ) &&
- (in_data[PW_i+6] == 0x7E ) &&
- (in_data[PW_i+7] == 0x00 ) &&
- (in_data[PW_i+8] == 0x30 ) &&
- (in_data[PW_i+9] == 0x3C ) &&
- (in_data[PW_i+10] == 0x7F ) &&
- (in_data[PW_i+11] == 0xFF ) &&
- (in_data[PW_i+12] == 0x3D ) &&
- (in_data[PW_i+13] == 0x40 ) &&
- (in_data[PW_i+14] == 0x00 ) &&
- (in_data[PW_i+15] == 0x96 ) )
- {
- if ( testDefjam32pro() != BAD )
- {
- Rip_Defjam32 ();
- break;
- }
- }
-
- /* StoneCracker 2.99d */
- if ( (in_data[PW_i+1] == 0xF9 ) &&
- (in_data[PW_i+2] == 0x00 ) &&
- (in_data[PW_i+3] == 0xDF ) &&
- (in_data[PW_i+4] == 0xF0 ) &&
- (in_data[PW_i+5] == 0x00 ) &&
- (in_data[PW_i+6] == 0x4B ) &&
- (in_data[PW_i+7] == 0xfa ) &&
- (in_data[PW_i+8] == 0x01 ) &&
- (in_data[PW_i+9] == 0x54 ) &&
- (in_data[PW_i+10] == 0x49 ) &&
- (in_data[PW_i+11] == 0xf9 ) &&
- (in_data[PW_i+12] == 0x00 ) &&
- (in_data[PW_i+13] == 0xbf ) &&
- (in_data[PW_i+14] == 0xd1 ) &&
- (in_data[PW_i+15] == 0x00 ) )
- {
- if ( testSTC299d() != BAD )
- {
- Rip_STC299d ();
- break;
- }
- }
-
- /* StoneCracker 2.99b */
- if ( (in_data[PW_i+1] == 0xF9 ) &&
- (in_data[PW_i+2] == 0x00 ) &&
- (in_data[PW_i+3] == 0xDF ) &&
- (in_data[PW_i+4] == 0xF0 ) &&
- (in_data[PW_i+5] == 0x00 ) &&
- (in_data[PW_i+6] == 0x4B ) &&
- (in_data[PW_i+7] == 0xfa ) &&
- (in_data[PW_i+8] == 0x01 ) &&
- (in_data[PW_i+9] == 0x58 ) &&
- (in_data[PW_i+10] == 0x49 ) &&
- (in_data[PW_i+11] == 0xf9 ) &&
- (in_data[PW_i+12] == 0x00 ) &&
- (in_data[PW_i+13] == 0xbf ) &&
- (in_data[PW_i+14] == 0xd1 ) &&
- (in_data[PW_i+15] == 0x00 ) )
- {
- if ( testSTC299b() != BAD )
- {
- Rip_STC299b ();
- break;
- }
- }
-
-
- /* StoneCracker 2.99 */
- if ( (in_data[PW_i+1] == 0xF9 ) &&
- (in_data[PW_i+2] == 0x00 ) &&
- (in_data[PW_i+3] == 0xDF ) &&
- (in_data[PW_i+4] == 0xF0 ) &&
- (in_data[PW_i+5] == 0x00 ) &&
- (in_data[PW_i+6] == 0x4B ) &&
- (in_data[PW_i+7] == 0xfa ) &&
- (in_data[PW_i+8] == 0x01 ) &&
- (in_data[PW_i+9] == 0x5c ) &&
- (in_data[PW_i+10] == 0x49 ) &&
- (in_data[PW_i+11] == 0xf9 ) &&
- (in_data[PW_i+12] == 0x00 ) &&
- (in_data[PW_i+13] == 0xbf ) &&
- (in_data[PW_i+14] == 0xd1 ) &&
- (in_data[PW_i+15] == 0x00 ) )
- {
- if ( testSTC299() != BAD )
- {
- Rip_STC299 ();
- break;
- }
- }
-
- /* StoneCracker 3.00 */
- if ( (in_data[PW_i+1] == 0xF9 ) &&
- (in_data[PW_i+2] == 0x00 ) &&
- (in_data[PW_i+3] == 0xDF ) &&
- (in_data[PW_i+4] == 0xF0 ) &&
- (in_data[PW_i+5] == 0x96 ) &&
- (in_data[PW_i+6] == 0x4b ) &&
- (in_data[PW_i+7] == 0xfa ) &&
- (in_data[PW_i+8] == 0x01 ) &&
- (in_data[PW_i+9] == 0x5c ) &&
- (in_data[PW_i+10] == 0x49 ) &&
- (in_data[PW_i+11] == 0xf9 ) &&
- (in_data[PW_i+12] == 0x00 ) &&
- (in_data[PW_i+13] == 0xbf ) &&
- (in_data[PW_i+14] == 0xd1 ) &&
- (in_data[PW_i+15] == 0x00 ) )
- {
- if ( testSTC300() != BAD )
- {
- Rip_STC300 ();
- break;
- }
- }
-
- /* StoneCracker 3.10 */
- if ( (in_data[PW_i+1] == 0xF9 ) &&
- (in_data[PW_i+2] == 0x00 ) &&
- (in_data[PW_i+3] == 0xDF ) &&
- (in_data[PW_i+4] == 0xF1 ) &&
- (in_data[PW_i+5] == 0x80 ) &&
- (in_data[PW_i+6] == 0x47 ) &&
- (in_data[PW_i+7] == 0xf9 ) &&
- (in_data[PW_i+8] == 0x00 ) &&
- (in_data[PW_i+9] == 0xbf ) &&
- (in_data[PW_i+10] == 0xd1 ) &&
- (in_data[PW_i+11] == 0x00 ) &&
- (in_data[PW_i+12] == 0x41 ) &&
- (in_data[PW_i+13] == 0xfa ) &&
- (in_data[PW_i+14] == 0x00 ) &&
- (in_data[PW_i+15] == 0x62 ) )
- {
- if ( testSTC310() != BAD )
- {
- Rip_STC310 ();
- break;
- }
- }
- break;
-
- case 'P': /* 0x50 */
- /* "PP20" : ID of PowerPacker */
- if ( (in_data[PW_i+1] == 'P') &&
- (in_data[PW_i+2] == '2') &&
- (in_data[PW_i+3] == '0') )
- {
- printf ( "PowerPacker ID (PP20) found at %ld ... cant rip it!\n" , PW_i );
- break;
- }
-
- /* "P30A" : ID of The Player */
- if ( (in_data[PW_i+1] == '3') &&
- (in_data[PW_i+2] == '0') &&
- (in_data[PW_i+3] == 'A') )
- {
- if ( testP40A() == BAD ) /* yep same tests apply */
- break;
- Rip_P30A ();
- Depack_P30 ();
- }
-
-
- /* "P22A" : ID of The Player */
- if ( (in_data[PW_i+1] == '2') &&
- (in_data[PW_i+2] == '2') &&
- (in_data[PW_i+3] == 'A') )
- {
- if ( testP40A() == BAD ) /* yep, same tests apply */
- break;
- Rip_P22A ();
- Depack_P22 ();
- }
-
- /* "P40A" : ID of The Player */
- if ( (in_data[PW_i+1] == '4') &&
- (in_data[PW_i+2] == '0') &&
- (in_data[PW_i+3] == 'A') )
- {
- if ( testP40A() == BAD )
- break;
- Rip_P40A ();
- Depack_P40 ();
- }
-
- /* "P40B" : ID of The Player */
- if ( (in_data[PW_i+1] == '4') &&
- (in_data[PW_i+2] == '0') &&
- (in_data[PW_i+3] == 'B') )
- {
- if ( testP40A() == BAD )
- break;
- Rip_P40B ();
- Depack_P40 ();
- }
-
- /* "P41A" : ID of The Player */
- if ( (in_data[PW_i+1] == '4') &&
- (in_data[PW_i+2] == '1') &&
- (in_data[PW_i+3] == 'A') )
- {
- if ( testP41A() == BAD )
- break;
- Rip_P41A ();
- Depack_P41A ();
- break;
- }
-
- /* "PM40" : ID of Promizer 4 */
- if ( (in_data[PW_i+1] == 'M') &&
- (in_data[PW_i+2] == '4') &&
- (in_data[PW_i+3] == '0') )
- {
- if ( testPM40() == BAD )
- break;
- Rip_PM40 ();
- Depack_PM40 ();
- break;
- }
-
- /* "PPbk" : ID of AMOS PowerPacker Bank */
- if ( (in_data[PW_i+1] == 'P') &&
- (in_data[PW_i+2] == 'b') &&
- (in_data[PW_i+3] == 'k') )
- {
- if ( testPPbk() == BAD )
- break;
- Rip_PPbk ();
- break;
- }
-
- /* PARA data Cruncher */
- if ( (in_data[PW_i+1] == 'A') &&
- (in_data[PW_i+2] == 'R') &&
- (in_data[PW_i+3] == 'A') )
- {
- if ( testSpecialCruncherData ( 8, 4 ) == BAD )
- break;
- Rip_SpecialCruncherData ( "PARA Data Cruncher" , 46 , PARA );
- break;
- }
-
- /* Master cruncher 3.0 data */
- if ( (in_data[PW_i+1] == 'A') &&
- (in_data[PW_i+2] == 'C') &&
- (in_data[PW_i+3] == 'K') &&
- (in_data[PW_i+4] == 'V') &&
- (in_data[PW_i+5] == '1') &&
- (in_data[PW_i+6] == '.') &&
- (in_data[PW_i+7] == '2') )
- {
- if ( testSpecialCruncherData ( 12, 8 ) == BAD )
- break;
- Rip_SpecialCruncherData ( "Master Cruncher 3.0 data" , 8 , MasterCruncher3data );
- break;
- }
-
- /* POLKA Packer */
- if ( ((in_data[PW_i+1] == 'W') &&
- (in_data[PW_i+2] == 'R') &&
- (in_data[PW_i+3] == '.')) ||
- ((in_data[PW_i+1] == 'S') &&
- (in_data[PW_i+2] == 'U') &&
- (in_data[PW_i+3] == 'X')))
- {
- if ( testPolka() == BAD )
- break;
- Rip_Polka ();
- Depack_Polka ();
- break;
- }
- break;
-
- case 'R': /* RNC */
- if ( (in_data[PW_i+1] == 'N') &&
- (in_data[PW_i+2] == 'C') )
- {
- /* RNC */
- if ( testSpecialCruncherData ( 8, 4 ) == BAD )
- break;
- Rip_SpecialCruncherData ( "Propack (RNC) data" , 18 , RNC );
- break;
- }
- /* RLE Data Cruncher */
- if ( (in_data[PW_i+1] == 'L') &&
- (in_data[PW_i+2] == 'E') )
- {
- if ( testSpecialCruncherData ( 8, 4 ) == BAD )
- break;
- Rip_SpecialCruncherData ( "RLE Data Cruncher" , 11 , RLE );
- break;
- }
- break;
-
- case 'S': /* 0x53 */
- /* "SNT!" ProRunner 2 */
- if ( (in_data[PW_i+1] == 'N') &&
- (in_data[PW_i+2] == 'T') &&
- (in_data[PW_i+3] == '!') )
- {
- if ( testPRUN2() == BAD )
- break;
- Rip_PRUN2 ();
- Depack_PRUN2 ();
- break;
- }
- /* "SNT." ProRunner 1 */
- if ( (in_data[PW_i+1] == 'N') &&
- (in_data[PW_i+2] == 'T') &&
- (in_data[PW_i+3] == '.') )
- {
- if ( testPRUN1() == BAD )
- break;
- Rip_PRUN1 ();
- Depack_PRUN1 ();
- break;
- }
-
- /* SKYT packer */
- if ( (in_data[PW_i+1] == 'K') &&
- (in_data[PW_i+2] == 'Y') &&
- (in_data[PW_i+3] == 'T') )
- {
- if ( testSKYT() == BAD )
- break;
- Rip_SKYT ();
- Depack_SKYT ();
- break;
- }
-
- /* SMOD Future Composer 1.0 - 1.3 */
- if ( (in_data[PW_i+1] == 'M') &&
- (in_data[PW_i+2] == 'O') &&
- (in_data[PW_i+3] == 'D') )
- {
- if ( testFC13() == BAD )
- break;
- Rip_FC13 ();
- break;
- }
-
- /* S404 StoneCracker 4.04 data */
- if ( (in_data[PW_i+1] == '4') &&
- (in_data[PW_i+2] == '0') &&
- (in_data[PW_i+3] == '4') )
- {
- if ( testSpecialCruncherData ( 12, 8 ) == BAD )
- break;
- Rip_SpecialCruncherData ( "StoneCracker 4.04 data" , 18 , S404 );
- break;
- }
-
- /* S403 StoneCracker 4.03 data */
- if ( (in_data[PW_i+1] == '4') &&
- (in_data[PW_i+2] == '0') &&
- (in_data[PW_i+3] == '3') )
- {
- if ( testSpecialCruncherData ( 12, 8 ) == BAD )
- break;
- Rip_SpecialCruncherData ( "StoneCracker 4.03 data" , 20 , S404 );
- break;
- }
-
- /* S401 StoneCracker 4.01 data */
- if ( (in_data[PW_i+1] == '4') &&
- (in_data[PW_i+2] == '0') &&
- (in_data[PW_i+3] == '1') )
- {
- if ( testSpecialCruncherData ( 8, 4 ) == BAD )
- break;
- Rip_SpecialCruncherData ( "StoneCracker 4.01 data" , 12 , S404 );
- break;
- }
-
- /* S310 StoneCracker 3.10 data */
- if ( (in_data[PW_i+1] == '3') &&
- (in_data[PW_i+2] == '1') &&
- (in_data[PW_i+3] == '0') )
- {
- if ( testSpecialCruncherData ( 8, 4 ) == BAD )
- break;
- Rip_SpecialCruncherData ( "StoneCracker 3.10 data" , 16 , S404 );
- break;
- }
-
- /* S300 StoneCracker 3.00 data */
- if ( (in_data[PW_i+1] == '3') &&
- (in_data[PW_i+2] == '0') &&
- (in_data[PW_i+3] == '0') )
- {
- if ( testSpecialCruncherData ( 12, 8 ) == BAD )
- break;
- Rip_SpecialCruncherData ( "StoneCracker 3.00 data" , 16 , S404 );
- break;
- }
-
- /* SF data cruncher */
- if ( (in_data[PW_i+1] == 'F') )
- {
- if ( testSpecialCruncherData ( 6, 2 ) == BAD )
- break;
- Rip_SpecialCruncherData ( "SF Data Cruncher" , 11 , SF );
- break;
- }
-
- /* SQ data cruncher */
- if ( (in_data[PW_i+1] == 'Q') )
- {
- if ( testSpecialCruncherData ( 6, 2 ) == BAD )
- break;
- Rip_SpecialCruncherData ( "SQ Data Cruncher" , 999991 , SQ );
- break;
- }
-
- /* SP data cruncher */
- if ( (in_data[PW_i+1] == 'P') )
- {
- if ( testSpecialCruncherData ( 8, 4 ) == BAD )
- break;
- Rip_SpecialCruncherData ( "SP Data Cruncher" , 12 , SP );
- break;
- }
-
- /* STIM Slamtilt */
- if ( (in_data[PW_i+1] == 'T') &&
- (in_data[PW_i+2] == 'I') &&
- (in_data[PW_i+3] == 'M') )
- {
- if ( testSTIM() != BAD )
- {
- Rip_STIM ();
- Depack_STIM ();
- break;
- }
- }
-
- /* SONG Fuchs Tracker */
- if ( (in_data[PW_i+1] == 'O') &&
- (in_data[PW_i+2] == 'N') &&
- (in_data[PW_i+3] == 'G') )
- {
- if ( testFuchsTracker() != BAD )
- {
- Rip_FuchsTracker ();
- Depack_FuchsTracker ();
- break;
- }
- /* Sound FX */
- if ( testSoundFX13() != BAD )
- {
- Rip_SoundFX13 ();
-#ifndef UNIX
- Depack_SoundFX13 ();
-#endif
- break;
- }
- }
- break;
-
- case 'U': /* "UNIC" */
- if ( ( in_data[PW_i+1] == 'N' ) &&
- ( in_data[PW_i+2] == 'I' ) &&
- ( in_data[PW_i+3] == 'C' ) )
- {
- /* Unic tracker v1 ? */
- if ( testUNIC_withID() != BAD )
- {
- Rip_UNIC_withID ();
- Depack_UNIC ();
- break;
- }
- }
- break;
-
- case 'V': /* "V.2" */
- if ( (( in_data[PW_i+1] == '.' ) &&
- ( in_data[PW_i+2] == '2' )) ||
- (( in_data[PW_i+1] == '.' ) &&
- ( in_data[PW_i+2] == '3' )) )
- {
- /* Sound Monitor v2/v3 */
- if ( testBP() == BAD )
- break;
- Rip_BP ();
- break;
- }
- /* Virtual Dreams VDCO data cruncher */
- if ( (in_data[PW_i+1] == 'D') &&
- (in_data[PW_i+2] == 'C') &&
- (in_data[PW_i+3] == 'O') )
- {
- if ( testSpecialCruncherData ( 12, 8 ) == BAD )
- break;
- Rip_SpecialCruncherData ( "Virtual Dreams (VDCO) data cruncher" , 13 , VDCO );
- break;
- }
- break;
-
- case 'T':
- /* "TRK1" Module Protector */
- if ( ( in_data[PW_i+1] == 'R' ) &&
- ( in_data[PW_i+2] == 'K' ) &&
- ( in_data[PW_i+3] == '1' ) )
- {
- /* Module Protector */
- if ( testMP_withID() == BAD )
- break;
- Rip_MP_withID ();
- Depack_MP ();
- break;
- }
- break;
-
- case 'W': /* 0x57 */
- /* "WN" Wanton Packer */
- if ( (in_data[PW_i+1] == 'N') &&
- (in_data[PW_i+2] == 0x00 ) )
- {
- if ( testWN() == BAD )
- break;
- Rip_WN ();
- Depack_WN ();
- break;
- }
- break;
-
- case 'X': /* XPKF */
- /* xpk'ed file */
- if ( (in_data[PW_i+1] == 'P') &&
- (in_data[PW_i+2] == 'K') &&
- (in_data[PW_i+3] == 'F') )
- {
- if ( testSpecialCruncherData ( 4, 12 ) == BAD )
- break;
- Rip_SpecialCruncherData ( "XPK" , 8 , XPK );
- break;
- }
- break;
-
- case 0x60:
- /* promizer 1.8a ? */
- if ( (in_data[PW_i+1] == 0x38) &&
- (in_data[PW_i+2] == 0x60) &&
- (in_data[PW_i+3] == 0x00) &&
- (in_data[PW_i+4] == 0x00) &&
- (in_data[PW_i+5] == 0xa0) &&
- (in_data[PW_i+6] == 0x60) &&
- (in_data[PW_i+7] == 0x00) &&
- (in_data[PW_i+8] == 0x01) &&
- (in_data[PW_i+9] == 0x3e) &&
- (in_data[PW_i+10]== 0x60) &&
- (in_data[PW_i+11]== 0x00) &&
- (in_data[PW_i+12]== 0x01) &&
- (in_data[PW_i+13]== 0x0c) &&
- (in_data[PW_i+14]== 0x48) &&
- (in_data[PW_i+15]== 0xe7) ) /* gosh !, should be enough :) */
- {
- if ( testPMZ() != BAD )
- {
- Rip_PM18a ();
- Depack_PM18a ();
- break;
- }
-
- /* Promizer 1.0c */
- if ( testPM10c() != BAD )
- {
- Rip_PM10c ();
- Depack_PM10c ();
- break;
- }
- break;
- }
-
- /* promizer 2.0 ? */
- if ( (in_data[PW_i+1] == 0x00) &&
- (in_data[PW_i+2] == 0x00) &&
- (in_data[PW_i+3] == 0x16) &&
- (in_data[PW_i+4] == 0x60) &&
- (in_data[PW_i+5] == 0x00) &&
- (in_data[PW_i+6] == 0x01) &&
- (in_data[PW_i+7] == 0x40) &&
- (in_data[PW_i+8] == 0x60) &&
- (in_data[PW_i+9] == 0x00) &&
- (in_data[PW_i+10]== 0x00) &&
- (in_data[PW_i+11]== 0xf0) &&
- (in_data[PW_i+12]== 0x3f) &&
- (in_data[PW_i+13]== 0x00) &&
- (in_data[PW_i+14]== 0x10) &&
- (in_data[PW_i+15]== 0x3a) ) /* gosh !, should be enough :) */
- {
- if ( testPM2() == BAD )
- break;
- Rip_PM20 ();
- Depack_PM20 ();
- break;
- }
-
- /* Spike Cruncher */
- if ( (in_data[PW_i+1] == 0x16) &&
- (in_data[PW_i+24] == 0x48) &&
- (in_data[PW_i+25] == 0xE7) &&
- (in_data[PW_i+26] == 0xFF) &&
- (in_data[PW_i+27] == 0xFE) &&
- (in_data[PW_i+28] == 0x26) &&
- (in_data[PW_i+29] == 0x7A) &&
- (in_data[PW_i+30] == 0xFF) &&
- (in_data[PW_i+31] == 0xDE) &&
- (in_data[PW_i+32] == 0xD7) &&
- (in_data[PW_i+33] == 0xCB) &&
- (in_data[PW_i+34] == 0xD7) &&
- (in_data[PW_i+35] == 0xCB) &&
- (in_data[PW_i+36] == 0x58) &&
- (in_data[PW_i+37] == 0x8B) )
- {
- if ( testSpikeCruncher() == BAD )
- break;
- Rip_SpikeCruncher ();
- break;
- }
- break;
-
- case 0x61: /* "a" */
- /* TNM Cruncher 1.1 */
- if ( (in_data[PW_i+1] == 0x06) &&
- (in_data[PW_i+2] == 0x4E) &&
- (in_data[PW_i+3] == 0xF9) &&
- (in_data[PW_i+4] == 0x00) &&
- (in_data[PW_i+5] == 0x00) &&
- (in_data[PW_i+6] == 0x00) &&
- (in_data[PW_i+7] == 0x00) &&
- (in_data[PW_i+8] == 0x48) &&
- (in_data[PW_i+9] == 0xE7) &&
- (in_data[PW_i+10] == 0xFF) &&
- (in_data[PW_i+11] == 0xFE) &&
- (in_data[PW_i+12] == 0x2C) &&
- (in_data[PW_i+13] == 0x78) &&
- (in_data[PW_i+14] == 0x00) &&
- (in_data[PW_i+15] == 0x04) )
- {
- if ( testTNMCruncher11() == BAD )
- break;
- Rip_TNMCruncher11 ();
- break;
- }
-
- /* "arcD" data cruncher */
- if ( (in_data[PW_i+1] == 'r') &&
- (in_data[PW_i+2] == 'c') &&
- (in_data[PW_i+3] == 'D'))
- {
- if ( testArcDDataCruncher() == BAD )
- break;
- Rip_SpecialCruncherData ( "arcD data Cruncher" , 0 , arcD );
- break;
- }
-
- /* Tetrapack 2.1 */
- if ( (in_data[PW_i+1] == 0x00) &&
- (in_data[PW_i+2] == 0x41) &&
- (in_data[PW_i+3] == 0xFA) &&
- (in_data[PW_i+4] == 0x00) &&
- (in_data[PW_i+5] == 0xE4) &&
- (in_data[PW_i+6] == 0x4B) &&
- (in_data[PW_i+7] == 0xF9) &&
- (in_data[PW_i+8] == 0x00) &&
- (in_data[PW_i+9] == 0xDF) &&
- (in_data[PW_i+10] == 0xF1) &&
- (in_data[PW_i+12] == 0xD1) &&
- (in_data[PW_i+13] == 0xFC) )
- {
- if ( testTetrapack_2_1() == BAD )
- break;
- Rip_Tetrapack_2_1 ();
- break;
- }
-
- /* Tetrapack 2.2 */
- if ( (in_data[PW_i+1] == 0x00) &&
- (in_data[PW_i+2] == 0x43) &&
- (in_data[PW_i+3] == 0xFA) &&
- (in_data[PW_i+4] == 0x00) &&
- (in_data[PW_i+5] == 0xFC) &&
- (in_data[PW_i+12] == 0x28) &&
- (in_data[PW_i+13] == 0x7A) )
- {
- if ( testTetrapack_2_2() == GOOD )
- Rip_Tetrapack_2_2 ();
- break;
- }
- break;
-
- case 0x7E:
- /* Tetrapack 2.2 case #2 */
- if ( (in_data[PW_i+1] == 0x00) &&
- (in_data[PW_i+2] == 0x43) &&
- (in_data[PW_i+3] == 0xFA) &&
- (in_data[PW_i+4] == 0x00) &&
- (in_data[PW_i+5] == 0xFC) &&
- (in_data[PW_i+12] == 0x28) &&
- (in_data[PW_i+13] == 0x7A) )
- {
- if ( testTetrapack_2_2() == GOOD )
- Rip_Tetrapack_2_2 ();
- break;
- }
-
- /* Tetrapack 2.1 */
- if ( (in_data[PW_i+1] == 0x00) &&
- (in_data[PW_i+2] == 0x41) &&
- (in_data[PW_i+3] == 0xFA) &&
- (in_data[PW_i+4] == 0x00) &&
- (in_data[PW_i+5] == 0xE4) &&
- (in_data[PW_i+6] == 0x4B) &&
- (in_data[PW_i+7] == 0xF9) &&
- (in_data[PW_i+8] == 0x00) &&
- (in_data[PW_i+9] == 0xDF) &&
- (in_data[PW_i+10] == 0xF1))
- {
- if ( testTetrapack_2_1() == BAD )
- break;
- Rip_Tetrapack_2_1 ();
- break;
- }
-
- break;
-
- case 0xA9:
- /* Double Action v1.0 */
- if ( (in_data[PW_i+1] == ' ') &&
- (in_data[PW_i+2] == 'B') )
- {
- if ( testDoubleAction10() == BAD )
- break;
- Rip_DoubleAction10 ();
- break;
- }
- break;
-
- case 0xAC:
- /* AC1D packer ?!? */
- if ( in_data[PW_i+1] == 0x1D )
- {
- if ( testAC1D() != BAD )
- {
- Rip_AC1D ();
- Depack_AC1D ();
- break;
- }
- }
- break;
-
- case 0xC0:
- /* Pha Packer */
- if ( (PW_i >= 1) && (in_data[PW_i-1] == 0x03) )
- {
- if ( testPHA() != BAD )
- {
- Rip_PHA ();
- Depack_PHA ();
- break;
- }
- }
- break;
-
-
- default: /* do nothing ... save continuing :) */
- break;
-
- } /* end of switch */
- }
- return 0;
-}
-
-#if 0
-int main ( int ac , char **av )
-{
-
-#ifdef DOS
- printf ( "\n\n-<([ Pro-Wizard v1.50.b3 (DOS) ])>-\n\n" );
-#endif
-
-#ifdef UNIX
-#ifdef AMIGA
- printf ( "\n\n-<([ Pro-Wizard v1.50.b3 (Amiga) ])>-\n\n" );
-#else
- printf ( "\n\n-<([ Pro-Wizard v1.50.b3 (Unix) ])>-\n\n" );
-#endif
-#endif
-
-
- if ( ac != 2 )
- {
- printf ( "%s <data file>\n" , av[0] );
- printf ( "Check for the documentation for more info !\n" );
- exit ( 0 );
- }
-
- PW_in = fopen ( av[1] , "rb" );
- if ( PW_in == NULL )
- {
- printf ( "cant find \"%s\" !\n" , av[1] );
- exit ( 0 );
- }
-
- /* take care of the editable extensions */
- /*printf ( "%x,%x,%x\n" , Extensions[70][0], Extensions[70][1], Extensions[70][2] );*/
-
- /* get input file size */
- fseek ( PW_in , 0 , 2 ); /* SEEK_END */
- PW_in_size = ftell ( PW_in );
- fseek ( PW_in , 0 , 0 );
- printf ( "input file size : %ld\n" , PW_in_size );
- if ( PW_in_size < MINIMAL_FILE_LENGHT )
- {
- printf ( "! input file size is too small ...\n" );
- fclose ( PW_in );
- exit ( 1 );
- }
-
- /* alloc mem */
- in_data = (Uchar *) malloc ( PW_in_size );
- if ( in_data == NULL )
- {
- perror ( "Couldn't allocate memory" );
- exit ( 0 );
- }
- fread ( in_data , PW_in_size , 1 , PW_in );
- fclose ( PW_in );
-
- prowizard_search (in_data, PW_in_size);
-
- free ( in_data );
- printf ( "\n" );
- printf ( " 1997-2003 (c) Sylvain \"Asle\" Chipaux (asle@free.fr)\n\n");
- exit ( 0 );
-}
-#endif
\ No newline at end of file
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-
-void Rip_AC1D ( void )
-{
- PW_WholeSampleSize = 0;
- for ( PW_j=0 ; PW_j<31 ; PW_j++ )
- PW_WholeSampleSize += (((in_data[PW_Start_Address+8+PW_j*8]*256)+in_data[PW_Start_Address+9+PW_j*8])*2);
- PW_k = (in_data[PW_Start_Address+4]*256*256*256)+
- (in_data[PW_Start_Address+5]*256*256)+
- (in_data[PW_Start_Address+6]*256)+
- in_data[PW_Start_Address+7];
-
- OutputSize = PW_WholeSampleSize + PW_k;
- /* printf ( "\b\b\b\b\b\b\b\bAC1D Packed module found at %ld !. its size is : %ld\n" , PW_Start_Address , OutputSize );*/
- /* OutName[1] = Extensions[AC1D_packer][0];
- OutName[2] = Extensions[AC1D_packer][1];
- OutName[3] = Extensions[AC1D_packer][2];*/
-
- CONVERT = GOOD;
- Save_Rip ( "AC1D Packed module", AC1D_packer );
-
- if ( Save_Status == GOOD )
- PW_i += (OutputSize - 4); /* 3 should do but call it "just to be sure" :) */
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-
-void Rip_AmBk ( void )
-{
- /* PW_k is already the whole file size */
-
- OutputSize = PW_k;
-
- CONVERT = GOOD;
- Save_Rip ( "AMOS Bank (AmBk)", AmBk );
-
- if ( Save_Status == GOOD )
- PW_i += 4;
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Rip_BP ( void )
-{
- OutputSize += ((PW_j*48) + (PW_l*16) + 512);
- /* printf ( "\b\b\b\b\b\b\b\bSound Monitor v2 / v3 module found at %ld !. its size is : %ld\n" , PW_Start_Address , OutputSize );*/
- /* OutName[1] = Extensions[SoundMonitor][0];
- OutName[2] = Extensions[SoundMonitor][1];
- OutName[3] = Extensions[SoundMonitor][2];*/
-
- CONVERT = BAD;
- Save_Rip ( "Sound Monitor v2 / v3 module", SoundMonitor );
-
- if ( Save_Status == GOOD )
- PW_i += (OutputSize - 27); /* 26 should do but call it "just to be sure" :) */
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Rip_BSIFutureComposer ( void )
-{
- /* get whole sample size */
- PW_WholeSampleSize = 0;
- for ( PW_j=0 ; PW_j<63 ; PW_j++ )
- {
- PW_o =((in_data[PW_Start_Address+17420+(PW_j*16)]*256*256*256)+
- (in_data[PW_Start_Address+17421+(PW_j*16)]*256*256)+
- (in_data[PW_Start_Address+17422+(PW_j*16)]*256)+
- in_data[PW_Start_Address+17423+(PW_j*16)] );
- PW_WholeSampleSize += PW_o;
- }
-
- OutputSize = PW_WholeSampleSize + 18428;
-
- /* printf ( "\b\b\b\b\b\b\b\bBSI Future Composer module found at %ld !. its size is : %ld\n" , PW_Start_Address , OutputSize );*/
- /* OutName[1] = Extensions[BSIFC][0];
- OutName[2] = Extensions[BSIFC][1];
- OutName[3] = Extensions[BSIFC][2];*/
-
- CONVERT = BAD;
- Save_Rip ( "BSI Future Composer module", BSIFC );
-
- if ( Save_Status == GOOD )
- PW_i += (OutputSize - 2); /* 0 should do but call it "just to be sure" :) */
-}
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Rip_ByteKiller30 ( void )
-{
- /* PW_l is still the whole size */
-
- Uchar * Amiga_EXE_Header_Block;
- Uchar * Whatever;
-
- OutputSize = PW_l;
-
- /* printf ( "\b\b\b\b\b\b\b\bByteKiller 3.0 Exe-file found at %ld !. its size is : %ld\n" , PW_Start_Address , OutputSize );*/
- /* OutName[1] = Extensions[ByteKiller][0];
- OutName[2] = Extensions[ByteKiller][1];
- OutName[3] = Extensions[ByteKiller][2];*/
-
- CONVERT = BAD;
-
- if ( Amiga_EXE_Header == BAD )
- {
- OutputSize -= 32;
- Amiga_EXE_Header_Block = (Uchar *) malloc ( 32 );
- BZERO ( Amiga_EXE_Header_Block , 32 );
- Amiga_EXE_Header_Block[2] = Amiga_EXE_Header_Block[26] = 0x03;
- Amiga_EXE_Header_Block[3] = 0xF3;
- Amiga_EXE_Header_Block[11] = 0x01;
- Amiga_EXE_Header_Block[27] = 0xE9;
-
- /* WARNING !!! WORKS ONLY ON PC !!! */
- /* 68k machines code : c1 = *(Whatever+2); */
- /* 68k machines code : c2 = *(Whatever+3); */
- PW_j = PW_l - 36;
- PW_j /= 4;
- Whatever = (Uchar *) &PW_j;
- Amiga_EXE_Header_Block[20] = Amiga_EXE_Header_Block[28] = *(Whatever+3);
- Amiga_EXE_Header_Block[21] = Amiga_EXE_Header_Block[29] = *(Whatever+2);
- Amiga_EXE_Header_Block[22] = Amiga_EXE_Header_Block[30] = *(Whatever+1);
- Amiga_EXE_Header_Block[23] = Amiga_EXE_Header_Block[31] = *Whatever;
- Save_Rip_Special ( "ByteKiller 3.0 Exe-file", ByteKiller, Amiga_EXE_Header_Block , 32 );
- free ( Amiga_EXE_Header_Block );
- }
- else
- {
- PW_Start_Address -= 32;
- Save_Rip ( "ByteKiller 3.0 Exe-file", ByteKiller );
- }
-
- if ( Save_Status == GOOD )
- PW_i += (OutputSize - 36); /* 32 should do but call it "just to be sure" :) */
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Rip_ByteKiller ( void )
-{
- /* PW_l is still the whole size */
-
- Uchar * Amiga_EXE_Header_Block;
- Uchar * Whatever;
-
- OutputSize = PW_l;
-
- /* printf ( "\b\b\b\b\b\b\b\bByteKiller 1.3/2.0 Exe-file found at %ld !. its size is : %ld\n" , PW_Start_Address , OutputSize );*/
- /* OutName[1] = Extensions[ByteKiller][0];
- OutName[2] = Extensions[ByteKiller][1];
- OutName[3] = Extensions[ByteKiller][2];*/
-
- CONVERT = BAD;
-
- if ( Amiga_EXE_Header == BAD )
- {
- OutputSize -= 36;
- Amiga_EXE_Header_Block = (Uchar *) malloc ( 36 );
- BZERO ( Amiga_EXE_Header_Block , 36 );
- Amiga_EXE_Header_Block[2] = Amiga_EXE_Header_Block[30] = 0x03;
- Amiga_EXE_Header_Block[3] = 0xF3;
- Amiga_EXE_Header_Block[11] = 0x02;
- Amiga_EXE_Header_Block[19] = 0x01;
- Amiga_EXE_Header_Block[27] = 0x01;
- Amiga_EXE_Header_Block[31] = 0xE9;
-
- /* WARNING !!! WORKS ONLY ON PC !!! */
- /* 68k machines code : c1 = *(Whatever+2); */
- /* 68k machines code : c2 = *(Whatever+3); */
- PW_j = PW_l - 60;
- PW_j /= 4;
- Whatever = (Uchar *) &PW_j;
- Amiga_EXE_Header_Block[20] = Amiga_EXE_Header_Block[32] = *(Whatever+3);
- Amiga_EXE_Header_Block[21] = Amiga_EXE_Header_Block[33] = *(Whatever+2);
- Amiga_EXE_Header_Block[22] = Amiga_EXE_Header_Block[34] = *(Whatever+1);
- Amiga_EXE_Header_Block[23] = Amiga_EXE_Header_Block[35] = *Whatever;
-
- /* also the last 24 bytes are 'removed' frequently ... Here they are */
- in_data[PW_Start_Address+OutputSize-24] = 0x00;
- in_data[PW_Start_Address+OutputSize-23] = 0x00;
- in_data[PW_Start_Address+OutputSize-22] = 0x03;
- in_data[PW_Start_Address+OutputSize-21] = 0xEC;
-
- in_data[PW_Start_Address+OutputSize-20] = 0x00;
- in_data[PW_Start_Address+OutputSize-19] = 0x00;
- in_data[PW_Start_Address+OutputSize-18] = 0x00;
- in_data[PW_Start_Address+OutputSize-17] = 0x00;
-
- in_data[PW_Start_Address+OutputSize-16] = 0x00;
- in_data[PW_Start_Address+OutputSize-15] = 0x00;
- in_data[PW_Start_Address+OutputSize-14] = 0x03;
- in_data[PW_Start_Address+OutputSize-13] = 0xF2;
-
- in_data[PW_Start_Address+OutputSize-12] = 0x00;
- in_data[PW_Start_Address+OutputSize-11] = 0x00;
- in_data[PW_Start_Address+OutputSize-10] = 0x03;
- in_data[PW_Start_Address+OutputSize-9] = 0xEB;
-
- in_data[PW_Start_Address+OutputSize-8] = 0x00;
- in_data[PW_Start_Address+OutputSize-7] = 0x00;
- in_data[PW_Start_Address+OutputSize-6] = 0x00;
- in_data[PW_Start_Address+OutputSize-5] = 0x01;
-
- in_data[PW_Start_Address+OutputSize-4] = 0x00;
- in_data[PW_Start_Address+OutputSize-3] = 0x00;
- in_data[PW_Start_Address+OutputSize-2] = 0x03;
- in_data[PW_Start_Address+OutputSize-1] = 0xF2;
-
- Save_Rip_Special ( "ByteKiller 1.3/2.0 Exe-file", ByteKiller, Amiga_EXE_Header_Block , 36 );
- free ( Amiga_EXE_Header_Block );
- }
- else
- {
- PW_Start_Address -= 36;
- Save_Rip ( "ByteKiller 1.3/2.0 Exe-file", ByteKiller );
- }
-
- if ( Save_Status == GOOD )
- PW_i += (OutputSize - 173); /* 171 should do but call it "just to be sure" :) */
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Rip_bytekillerpro10 ( void )
-{
- /* PW_l is still the whole size */
-
- Uchar * Amiga_EXE_Header_Block;
- Uchar * Whatever;
-
- OutputSize = PW_l;
-
- /* printf ( "\b\b\b\b\b\b\b\bByteKillerPro 1.0 Exe-file found at %ld !. its size is : %ld\n" , PW_Start_Address , OutputSize );*/
- /* OutName[1] = Extensions[ByteKiller][0];
- OutName[2] = Extensions[ByteKiller][1];
- OutName[3] = Extensions[ByteKiller][2];*/
-
- CONVERT = BAD;
-
- if ( Amiga_EXE_Header == BAD )
- {
- OutputSize -= 50;
- Amiga_EXE_Header_Block = (Uchar *) malloc ( 36 );
- BZERO ( Amiga_EXE_Header_Block , 36 );
- Amiga_EXE_Header_Block[2] = Amiga_EXE_Header_Block[30] = 0x03;
- Amiga_EXE_Header_Block[3] = 0xF3;
- Amiga_EXE_Header_Block[11] = 0x02;
- Amiga_EXE_Header_Block[19] = 0x01;
- Amiga_EXE_Header_Block[27] = 0x01;
- Amiga_EXE_Header_Block[31] = 0xE9;
-
- /* WARNING !!! WORKS ONLY ON PC !!! */
- /* 68k machines code : c1 = *(Whatever+2); */
- /* 68k machines code : c2 = *(Whatever+3); */
- PW_j = PW_l - 60;
- PW_j /= 4;
- Whatever = (Uchar *) &PW_j;
- Amiga_EXE_Header_Block[20] = Amiga_EXE_Header_Block[32] = *(Whatever+3);
- Amiga_EXE_Header_Block[21] = Amiga_EXE_Header_Block[33] = *(Whatever+2);
- Amiga_EXE_Header_Block[22] = Amiga_EXE_Header_Block[34] = *(Whatever+1);
- Amiga_EXE_Header_Block[23] = Amiga_EXE_Header_Block[35] = *Whatever;
-
- /* also the last 24 bytes are 'removed' frequently ... Here they are */
- in_data[PW_Start_Address+OutputSize-24] = 0x00;
- in_data[PW_Start_Address+OutputSize-23] = 0x00;
- in_data[PW_Start_Address+OutputSize-22] = 0x03;
- in_data[PW_Start_Address+OutputSize-21] = 0xEC;
-
- in_data[PW_Start_Address+OutputSize-20] = 0x00;
- in_data[PW_Start_Address+OutputSize-19] = 0x00;
- in_data[PW_Start_Address+OutputSize-18] = 0x00;
- in_data[PW_Start_Address+OutputSize-17] = 0x00;
-
- in_data[PW_Start_Address+OutputSize-16] = 0x00;
- in_data[PW_Start_Address+OutputSize-15] = 0x00;
- in_data[PW_Start_Address+OutputSize-14] = 0x03;
- in_data[PW_Start_Address+OutputSize-13] = 0xF2;
-
- in_data[PW_Start_Address+OutputSize-12] = 0x00;
- in_data[PW_Start_Address+OutputSize-11] = 0x00;
- in_data[PW_Start_Address+OutputSize-10] = 0x03;
- in_data[PW_Start_Address+OutputSize-9] = 0xEB;
-
- in_data[PW_Start_Address+OutputSize-8] = 0x00;
- in_data[PW_Start_Address+OutputSize-7] = 0x00;
- in_data[PW_Start_Address+OutputSize-6] = 0x00;
- in_data[PW_Start_Address+OutputSize-5] = 0x01;
-
- in_data[PW_Start_Address+OutputSize-4] = 0x00;
- in_data[PW_Start_Address+OutputSize-3] = 0x00;
- in_data[PW_Start_Address+OutputSize-2] = 0x03;
- in_data[PW_Start_Address+OutputSize-1] = 0xF2;
-
- Save_Rip_Special ( "ByteKillerPro 1.0 Exe-file", ByteKiller, Amiga_EXE_Header_Block , 50 );
- free ( Amiga_EXE_Header_Block );
- }
- else
- {
- PW_Start_Address -= 50;
- Save_Rip ( "ByteKillerPro 1.0 Exe-file", ByteKiller );
- }
-
- if ( Save_Status == GOOD )
- PW_i += (OutputSize - 54); /* 51 should do but call it "just to be sure" :) */
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Rip_CrunchmaniaAddr ( void )
-{
- /* PW_l is still the whole size */
-
- Uchar * Amiga_EXE_Header_Block;
- Uchar * Whatever;
-
- OutputSize = PW_l;
-
- /* printf ( "\b\b\b\b\b\b\b\bCrunchmania Address Exe-file found at %ld !. its size is : %ld\n" , PW_Start_Address , OutputSize );*/
- /* OutName[1] = Extensions[CRM1][0];
- OutName[2] = Extensions[CRM1][1];
- OutName[3] = Extensions[CRM1][2];*/
-
- CONVERT = BAD;
-
- if ( Amiga_EXE_Header == BAD )
- {
- OutputSize -= 32;
- Amiga_EXE_Header_Block = (Uchar *) malloc ( 32 );
- BZERO ( Amiga_EXE_Header_Block , 32 );
- Amiga_EXE_Header_Block[2] = Amiga_EXE_Header_Block[26] = 0x03;
- Amiga_EXE_Header_Block[3] = 0xF3;
- Amiga_EXE_Header_Block[11] = 0x01;
- Amiga_EXE_Header_Block[27] = 0xE9;
-
- /* WARNING !!! WORKS ONLY ON PC !!! */
- /* 68k machines code : c1 = *(Whatever+2); */
- /* 68k machines code : c2 = *(Whatever+3); */
- PW_j = PW_l - 36;
- PW_j /= 4;
- Whatever = (Uchar *) &PW_j;
- Amiga_EXE_Header_Block[20] = Amiga_EXE_Header_Block[28] = *(Whatever+3);
- Amiga_EXE_Header_Block[21] = Amiga_EXE_Header_Block[29] = *(Whatever+2);
- Amiga_EXE_Header_Block[22] = Amiga_EXE_Header_Block[30] = *(Whatever+1);
- Amiga_EXE_Header_Block[23] = Amiga_EXE_Header_Block[31] = *Whatever;
- PW_Start_Address += 4;
- Save_Rip_Special ( "Crunchmania Address Exe-file", CRM1, Amiga_EXE_Header_Block , 32 );
- free ( Amiga_EXE_Header_Block );
- }
- else
- {
- PW_Start_Address -= 28;
- Save_Rip ( "Crunchmania Address Exe-file", CRM1 );
- }
-
- if ( Save_Status == GOOD )
- PW_i += (OutputSize - 16);
-}
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Rip_DoubleAction10 ( void )
-{
- /* PW_l is still the whole size */
-
- Uchar * Amiga_EXE_Header_Block;
-
- OutputSize = PW_l;
-
- /* printf ( "\b\b\b\b\b\b\b\bDouble Action 1.0 Exe-file found at %ld !. its size is : %ld\n" , PW_Start_Address , OutputSize );*/
- /* OutName[1] = Extensions[Double_Action][0];
- OutName[2] = Extensions[Double_Action][1];
- OutName[3] = Extensions[Double_Action][2];*/
-
- CONVERT = BAD;
- if ( Amiga_EXE_Header == BAD )
- {
- OutputSize -= 24;
- Amiga_EXE_Header_Block = (Uchar *) malloc ( 24 );
- BZERO ( Amiga_EXE_Header_Block , 24 );
- Amiga_EXE_Header_Block[2] = 0x03;
- Amiga_EXE_Header_Block[3] = 0xF3;
- Amiga_EXE_Header_Block[11] = 0x01;
- Amiga_EXE_Header_Block[20] = in_data[PW_Start_Address+4];
- Amiga_EXE_Header_Block[21] = in_data[PW_Start_Address+5];
- Amiga_EXE_Header_Block[22] = in_data[PW_Start_Address+6];
- Amiga_EXE_Header_Block[23] = in_data[PW_Start_Address+7];
-
- Save_Rip_Special ( "Double Action 1.0 Exe-file", Double_Action, Amiga_EXE_Header_Block , 24 );
- free ( Amiga_EXE_Header_Block );
- }
- else
- {
- PW_Start_Address -= 24;
- Save_Rip ( "Double Action 1.0 Exe-file", Double_Action );
- }
-
- if ( Save_Status == GOOD )
- PW_i += (OutputSize - 149); /* 147 should do but call it "just to be sure" :) */
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Rip_Defjam32 ( void )
-{
- /* PW_l is still the whole size */
-
- Uchar * Amiga_EXE_Header_Block;
- Uchar * Whatever;
-
- OutputSize = PW_l;
-
- /* printf ( "\b\b\b\b\b\b\b\bDefjam Cruncher 3.2 / pro Exe-file found at %ld !. its size is : %ld\n" , PW_Start_Address , OutputSize );*/
- /* OutName[1] = Extensions[Defjam_32][0];
- OutName[2] = Extensions[Defjam_32][1];
- OutName[3] = Extensions[Defjam_32][2];*/
-
- CONVERT = BAD;
-
- if ( Amiga_EXE_Header == BAD )
- {
- OutputSize -= 32;
- Amiga_EXE_Header_Block = (Uchar *) malloc ( 32 );
- BZERO ( Amiga_EXE_Header_Block , 32 );
- Amiga_EXE_Header_Block[2] = Amiga_EXE_Header_Block[26] = 0x03;
- Amiga_EXE_Header_Block[3] = 0xF3;
- Amiga_EXE_Header_Block[11] = 0x01;
- Amiga_EXE_Header_Block[27] = 0xE9;
-
- /* WARNING !!! WORKS ONLY ON PC !!! */
- /* 68k machines code : c1 = *(Whatever+2); */
- /* 68k machines code : c2 = *(Whatever+3); */
- PW_j = PW_l - 36;
- PW_j /= 4;
- Whatever = (Uchar *) &PW_j;
- Amiga_EXE_Header_Block[20] = Amiga_EXE_Header_Block[28] = *(Whatever+3);
- Amiga_EXE_Header_Block[21] = Amiga_EXE_Header_Block[29] = *(Whatever+2);
- Amiga_EXE_Header_Block[22] = Amiga_EXE_Header_Block[30] = *(Whatever+1);
- Amiga_EXE_Header_Block[23] = Amiga_EXE_Header_Block[31] = *Whatever;
-
- /* also the last 4 bytes are 'removed' frequently ... Here they are */
- in_data[PW_Start_Address+OutputSize-4] = 0x00;
- in_data[PW_Start_Address+OutputSize-3] = 0x00;
- in_data[PW_Start_Address+OutputSize-2] = 0x03;
- in_data[PW_Start_Address+OutputSize-1] = 0xF2;
-
- Save_Rip_Special ( "Defjam Cruncher 3.2 / pro Exe-file", Defjam_32, Amiga_EXE_Header_Block , 32 );
- free ( Amiga_EXE_Header_Block );
- }
- else
- {
- PW_Start_Address -= 32;
- Save_Rip ( "Defjam Cruncher 3.2 / pro Exe-file", Defjam_32 );
- }
-
- if ( Save_Status == GOOD )
- PW_i += 36;
-}
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Rip_DI ( void )
-{
- /*PW_WholeSampleSize is already the whole sample size */
-
- PW_j = (in_data[PW_Start_Address+10]*256*256*256)
- +(in_data[PW_Start_Address+11]*256*256)
- +(in_data[PW_Start_Address+12]*256)
- +in_data[PW_Start_Address+13];
-
- OutputSize = PW_WholeSampleSize + PW_j;
-
- CONVERT = GOOD;
- Save_Rip ( "Digital Illusion Packed music", Digital_illusion );
-
- if ( Save_Status == GOOD )
- PW_i += (OutputSize - 15); /* 14 should do but call it "just to be sure" :) */
-}
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Rip_DigiBooster17 ( void )
-{
- /* PW_m is the number of pattern saved -1 */
- /* PW_WholeSampleSize is the whole sample size :) */
- /* PW_k is the module size saves the samples data */
-
- OutputSize = PW_WholeSampleSize + PW_k;
-
- /* printf ( "\b\b\b\b\b\b\b\bDigiBooster 1.7 module found at %ld !. its size is : %ld\n" , PW_Start_Address , OutputSize );*/
- /* OutName[1] = Extensions[DigiBooster][0];
- OutName[2] = Extensions[DigiBooster][1];
- OutName[3] = Extensions[DigiBooster][2];*/
-
- CONVERT = BAD;
- Save_Rip ( "DigiBooster 1.7 module", DigiBooster );
-
- if ( Save_Status == GOOD )
- PW_i += (OutputSize - 2); /* 0 should do but call it "just to be sure" :) */
-}
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Rip_EUREKA ( void )
-{
- /* PW_l is still the sample data address */
-
- /*PW_WholeSampleSize is already the whole sample size */
- /*for ( PW_j=0 ; PW_j<31 ; PW_j++ )
- PW_WholeSampleSize += (((in_data[PW_Start_Address+42+PW_j*30]*256)+in_data[PW_Start_Address+43+PW_j*30])*2);*/
-
- OutputSize = PW_WholeSampleSize + PW_l;
-
- /* printf ( "\b\b\b\b\b\b\b\bEureka Packed module file found at %ld !. its size is : %ld\n" , PW_Start_Address , OutputSize );*/
- /* OutName[1] = Extensions[Eureka_packer][0];
- OutName[2] = Extensions[Eureka_packer][1];
- OutName[3] = Extensions[Eureka_packer][2];*/
-
- CONVERT = GOOD;
- Save_Rip ( "Eureka Packed module", Eureka_packer );
-
- if ( Save_Status == GOOD )
- PW_i += (OutputSize - 46); /* 45 should do but call it "just to be sure" :) */
-}
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Rip_FC13 ( void )
-{
- /* PW_m is the addy of the 1st sample */
-
- /* whole sample size */
- PW_WholeSampleSize =((in_data[PW_Start_Address+36]*256*256*256)+
- (in_data[PW_Start_Address+37]*256*256)+
- (in_data[PW_Start_Address+38]*256)+
- in_data[PW_Start_Address+39] );
-
- OutputSize = PW_WholeSampleSize + PW_m;
-
- CONVERT = BAD;
- Save_Rip ( "Future Composer 1.3 module", FC13 );
-
- if ( Save_Status == GOOD )
- PW_i += 4; /* after SMOD tag */
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Rip_FC14 ( void )
-{
- /* PW_l is already the 1st waveform addy */
-
- /* get Waveforms len */
- PW_k = 0;
- for ( PW_j=100 ; PW_j<180 ; PW_j++ )
- {
- PW_k += in_data[PW_Start_Address+PW_j];
- }
-
- OutputSize = PW_l + (PW_k*2);
-
- CONVERT = BAD;
- Save_Rip ( "Future Composer 1.4 module", FC14 );
-
- if ( Save_Status == GOOD )
- PW_i += 4; /* after FC14 tag */
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Rip_FC_M ( void )
-{
- /* OutName[1] = Extensions[FC_M_packer][0];
- OutName[2] = Extensions[FC_M_packer][1];
- OutName[3] = Extensions[FC_M_packer][2];*/
-
- PW_WholeSampleSize = 0;
- for ( PW_k=0 ; PW_k<31 ; PW_k++ )
- PW_WholeSampleSize += (((in_data[PW_Start_Address+34+PW_k*8]*256)+in_data[PW_Start_Address+35+PW_k*8])*2);
- PW_j = in_data[PW_Start_Address+286];
- PW_l = 0;
- for ( PW_k=0 ; PW_k<PW_j ; PW_k++ )
- {
- if ( in_data[PW_Start_Address+292+PW_k] > PW_l )
- PW_l = in_data[PW_Start_Address+292+PW_k];
- }
- PW_l += 1;
- OutputSize = (PW_l*1024) + PW_WholeSampleSize + 292 + PW_j + 8;
- /* printf ( "\b\b\b\b\b\b\b\bFC-M packed module found at %ld !. its size is : %ld\n" , PW_Start_Address , OutputSize );*/
-
- CONVERT = GOOD;
- Save_Rip ( "FC-M packed module", FC_M_packer );
-
- if ( Save_Status == GOOD )
- PW_i += (OutputSize - 1); /* 0 should do but call it "just to be sure" :) */
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Rip_FuchsTracker ( void )
-{
- /* PW_m is the size of all samples (in descriptions) */
- /* PW_k is the pattern data size */
-
- /* 204 = 200 (header) + 4 ("INST" id) */
-/*printf ( "sample size : %ld\n" , PW_m );*/
-/*printf ( "patt data size : %ld\n" , PW_k );*/
- OutputSize = PW_m + PW_k + 204;
-
- /* printf ( "\b\b\b\b\b\b\b\bFuchs Tracker module found at %ld !. its size is : %ld\n" , PW_Start_Address , OutputSize );*/
- /* OutName[1] = Extensions[FuchsTracker][0];
- OutName[2] = Extensions[FuchsTracker][1];
- OutName[3] = Extensions[FuchsTracker][2];*/
-
- CONVERT = GOOD;
- Save_Rip ( "Fuchs Tracker module", FuchsTracker );
-
- if ( Save_Status == GOOD )
- PW_i += (OutputSize - 195); /* 192 should do but call it "just to be sure" :) */
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Rip_Fuzzac ( void )
-{
- /* PW_WholeSampleSize IS still the whole sample size */
-
- PW_j = in_data[PW_Start_Address+2114];
- PW_k = in_data[PW_Start_Address+2115];
- OutputSize = PW_WholeSampleSize + (PW_j*16) + (PW_k*256) + 2118 + 4;
- /* printf ( "\b\b\b\b\b\b\b\bFuzzac packer module found at %ld !. its size is : %ld\n" , PW_Start_Address , OutputSize );*/
- /* OutName[1] = Extensions[Fuzzac][0];
- OutName[2] = Extensions[Fuzzac][1];
- OutName[3] = Extensions[Fuzzac][2];*/
-
- CONVERT = GOOD;
- Save_Rip ( "Fuzzac packer module", Fuzzac );
-
- if ( Save_Status == GOOD )
- PW_i += (OutputSize - 2); /* -1 should do but call it "just to be sure" :) */
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Rip_GMC ( void )
-{
- /* PW_l is still the number of pattern to play */
- /* PW_WholeSampleSize is already the whole sample size */
-
- OutputSize = PW_WholeSampleSize + (PW_l*1024) + 444;
-
- CONVERT = GOOD;
- Save_Rip ( "Game Music Creator module", GMC );
-
- if ( Save_Status == GOOD )
- PW_i += 444; /* after header */
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-
-void Rip_GnuPlayer ( void )
-{
- /*PW_WholeSampleSize is the whole sample size */
- /*but it seems to be a fake sample values */
-
- /* size of 1st track + header */
- PW_k = (in_data[PW_Start_Address + 0x96]*256)+in_data[PW_Start_Address + 0x97] + 0x96;
- /* size of 2nd track */
- PW_j = (in_data[PW_k]*256) + in_data[PW_k+1] + PW_k;
- /* PW_j points now to the first sample size */
- /*printf ( "\nWhere before 1st sample : %ld\n" , PW_j);*/
-
- /* real sample sizes */
- PW_m = 0;
- while ( PW_m < PW_o )
- {
- PW_k = (in_data[PW_Start_Address+PW_j]*256) + in_data[PW_Start_Address+PW_j+1];
- PW_j += (PW_k + 2);
- PW_m += 1;
- /*printf ( "sample %ld : siz:%ld where:%ld\n", PW_m,PW_k,PW_j );
- fflush (stdout);*/
- }
-
- OutputSize = PW_j;
-
- CONVERT = GOOD;
- Save_Rip ( "GnuPlayer module", GnuPlayer );
-
- if ( Save_Status == GOOD )
- PW_i += 0x96;
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Rip_GPMO ( void )
-{
- /* PW_k is still the nbr of pattern */
-
- PW_WholeSampleSize = 0;
- for ( PW_j=0 ; PW_j<31 ; PW_j++ )
- PW_WholeSampleSize += (((in_data[PW_Start_Address+42+PW_j*30]*256)+in_data[PW_Start_Address+43+PW_j*30])*2);
-
- OutputSize = PW_WholeSampleSize + (PW_k*1024) + 1084;
-
- /* printf ( "\b\b\b\b\b\b\b\bProtracker mocule found at %ld !. its size is : %ld\n" , PW_Start_Address , OutputSize );*/
- /* OutName[1] = Extensions[Protracker][0];
- OutName[2] = Extensions[Protracker][1];
- OutName[3] = Extensions[Protracker][2];*/
-
- CONVERT = BAD;
- Save_Rip ( "GPMO (Crunch Player) module", GPMO );
-
- if ( Save_Status == GOOD )
- PW_i += (OutputSize - 1081); /* 1080 should do but call it "just to be sure" :) */
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Rip_HEATSEEKER ( void )
-{
- /* OutName[1] = Extensions[Heatseeker][0];
- OutName[2] = Extensions[Heatseeker][1];
- OutName[3] = Extensions[Heatseeker][2];*/
-
- OutputSize = PW_k + PW_WholeSampleSize + 378;
- /* printf ( "\b\b\b\b\b\b\b\bHeatseeker module found at %ld !. its size is : %ld\n" , PW_Start_Address , OutputSize );*/
-
- CONVERT = GOOD;
- Save_Rip ( "Heatseeker module", Heatseeker );
-
- if ( Save_Status == GOOD )
- PW_i += (OutputSize - 4); /* 3 should do but call it "just to be sure" :) */
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Rip_HQCCruncher2 ( void )
-{
- /* PW_l is still the whole size */
-
- Uchar * Amiga_EXE_Header_Block;
- Uchar * Whatever;
-
- OutputSize = PW_l;
-
- /* printf ( "\b\b\b\b\b\b\b\bHQC Cruncher 2.0 Exe-file found at %ld !. its size is : %ld\n" , PW_Start_Address , OutputSize );*/
- /* OutName[1] = Extensions[HQC][0];
- OutName[2] = Extensions[HQC][1];
- OutName[3] = Extensions[HQC][2];*/
-
- CONVERT = BAD;
-
- /*---------------------------------------------------*/
- /* not used yet coz I still dont know hoz to rebuild */
- /* 3 chunks EXE cases ... */
- /* so, the code below IS useless AND wrong !!!!! */
- /*---------------------------------------------------*/
- if ( Amiga_EXE_Header == BAD )
- {
- OutputSize -= 50;
- Amiga_EXE_Header_Block = (Uchar *) malloc ( 36 );
- BZERO ( Amiga_EXE_Header_Block , 36 );
- Amiga_EXE_Header_Block[2] = Amiga_EXE_Header_Block[30] = 0x03;
- Amiga_EXE_Header_Block[3] = 0xF3;
- Amiga_EXE_Header_Block[11] = 0x02;
- Amiga_EXE_Header_Block[19] = 0x01;
- Amiga_EXE_Header_Block[27] = 0x01;
- Amiga_EXE_Header_Block[31] = 0xE9;
-
- /* WARNING !!! WORKS ONLY ON PC !!! */
- /* 68k machines code : c1 = *(Whatever+2); */
- /* 68k machines code : c2 = *(Whatever+3); */
- PW_j = PW_l - 60;
- PW_j /= 4;
- Whatever = (Uchar *) &PW_j;
- Amiga_EXE_Header_Block[20] = Amiga_EXE_Header_Block[32] = *(Whatever+3);
- Amiga_EXE_Header_Block[21] = Amiga_EXE_Header_Block[33] = *(Whatever+2);
- Amiga_EXE_Header_Block[22] = Amiga_EXE_Header_Block[34] = *(Whatever+1);
- Amiga_EXE_Header_Block[23] = Amiga_EXE_Header_Block[35] = *Whatever;
-
- /* also the last 24 bytes are 'removed' frequently ... Here they are */
- in_data[PW_Start_Address+OutputSize-24] = 0x00;
- in_data[PW_Start_Address+OutputSize-23] = 0x00;
- in_data[PW_Start_Address+OutputSize-22] = 0x03;
- in_data[PW_Start_Address+OutputSize-21] = 0xEC;
-
- in_data[PW_Start_Address+OutputSize-20] = 0x00;
- in_data[PW_Start_Address+OutputSize-19] = 0x00;
- in_data[PW_Start_Address+OutputSize-18] = 0x00;
- in_data[PW_Start_Address+OutputSize-17] = 0x00;
-
- in_data[PW_Start_Address+OutputSize-16] = 0x00;
- in_data[PW_Start_Address+OutputSize-15] = 0x00;
- in_data[PW_Start_Address+OutputSize-14] = 0x03;
- in_data[PW_Start_Address+OutputSize-13] = 0xF2;
-
- in_data[PW_Start_Address+OutputSize-12] = 0x00;
- in_data[PW_Start_Address+OutputSize-11] = 0x00;
- in_data[PW_Start_Address+OutputSize-10] = 0x03;
- in_data[PW_Start_Address+OutputSize-9] = 0xEB;
-
- in_data[PW_Start_Address+OutputSize-8] = 0x00;
- in_data[PW_Start_Address+OutputSize-7] = 0x00;
- in_data[PW_Start_Address+OutputSize-6] = 0x00;
- in_data[PW_Start_Address+OutputSize-5] = 0x01;
-
- in_data[PW_Start_Address+OutputSize-4] = 0x00;
- in_data[PW_Start_Address+OutputSize-3] = 0x00;
- in_data[PW_Start_Address+OutputSize-2] = 0x03;
- in_data[PW_Start_Address+OutputSize-1] = 0xF2;
-
- Save_Rip_Special ( "HQC Cruncher 2.0 Exe-file", HQC, Amiga_EXE_Header_Block , 50 );
- free ( Amiga_EXE_Header_Block );
- }
- else
- {
- Save_Rip ( "HQC Cruncher 2.0 Exe-file", HQC );
- }
-
- if ( Save_Status == GOOD )
- PW_i += (OutputSize - 65); /* 64 should do but call it "just to be sure" :) */
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Rip_HRT ( void )
-{
- /* OutName[1] = Extensions[Hornet_packer][0];
- OutName[2] = Extensions[Hornet_packer][1];
- OutName[3] = Extensions[Hornet_packer][2];*/
-
- PW_WholeSampleSize = 0;
- for ( PW_k=0 ; PW_k<31 ; PW_k++ )
- PW_WholeSampleSize += (((in_data[PW_Start_Address+42+PW_k*30]*256)+in_data[PW_Start_Address+43+PW_k*30])*2);
- PW_j = in_data[PW_Start_Address+950];
- PW_l=0;
- for ( PW_k=0 ; PW_k<128 ; PW_k++ )
- {
- if ( in_data[PW_Start_Address+952+PW_k] > PW_l )
- PW_l = in_data[PW_Start_Address+952+PW_k];
- }
- PW_l += 1;
- PW_k = 1084 + PW_l * 1024;
- OutputSize = PW_k + PW_WholeSampleSize;
- /* printf ( "\b\b\b\b\b\b\b\bHORNET packed module found at %ld !. its size is : %ld\n" , PW_Start_Address , OutputSize );*/
-
- CONVERT = GOOD;
- Save_Rip ( "HORNET packed module", Hornet_packer );
-
- if ( Save_Status == GOOD )
- PW_i += 1084;
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Rip_JamCracker ( void )
-{
- /* PW_j is the number of sample */
- /* PW_WholeSampleSize is the whole sample size :) */
- /* PW_l is the number of pattern saved */
- /* PW_m is the size of the pattern list */
-
- /* first, get rid of header size (til end of pattern list) */
- PW_n = 6 + (PW_j*40) + 2;
- OutputSize = PW_n + (PW_l*6) + 2 + (PW_m*2);
-
- /* PW_n points now at the beginning of pattern descriptions */
- /* now, let's calculate pattern data size */
- /* first address : */
- PW_o =((in_data[PW_Start_Address+PW_n+2]*256*256*256)+
- (in_data[PW_Start_Address+PW_n+3]*256*256)+
- (in_data[PW_Start_Address+PW_n+4]*256)+
- in_data[PW_Start_Address+PW_n+5] );
- PW_n += (PW_l*6);
- PW_k =((in_data[PW_Start_Address+PW_n-4]*256*256*256)+
- (in_data[PW_Start_Address+PW_n-3]*256*256)+
- (in_data[PW_Start_Address+PW_n-2]*256)+
- in_data[PW_Start_Address+PW_n-1] );
- PW_k -= PW_o;
- /* PW_k shoulb be the track data size by now ... save the last pattern ! */
- /* let's get its number of lines */
- PW_o = in_data[PW_Start_Address+PW_n-5];
- PW_o *= 4; /* 4 voices */
- PW_o *= 8; /* 8 bytes per note */
-
- OutputSize += PW_WholeSampleSize + PW_k + PW_o;
-
- /* printf ( "\b\b\b\b\b\b\b\bJamCracker / Pro module found at %ld !. its size is : %ld\n" , PW_Start_Address , OutputSize );*/
- /* OutName[1] = Extensions[JamCracker][0];
- OutName[2] = Extensions[JamCracker][1];
- OutName[3] = Extensions[JamCracker][2];*/
-
- CONVERT = BAD;
- Save_Rip ( "JamCracker / Pro module", JamCracker );
-
- if ( Save_Status == GOOD )
- PW_i += (OutputSize - 2); /* 0 should do but call it "just to be sure" :) */
-}
-
+++ /dev/null
-/*
- * Update: 20/12/2000
- * - debug .. correct size calculated now.
-*/
-
-
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Rip_KRIS ( void )
-{
- /* OutName[1] = Extensions[KRIS_tracker][0];
- OutName[2] = Extensions[KRIS_tracker][1];
- OutName[3] = Extensions[KRIS_tracker][2];*/
- PW_WholeSampleSize = 0;
- for ( PW_k=0 ; PW_k<31 ; PW_k++ )
- PW_WholeSampleSize += (((in_data[PW_Start_Address+44+PW_k*30]*256)+in_data[PW_Start_Address+45+PW_k*30])*2);
- PW_l = 0;
- for ( PW_k=0 ; PW_k<512 ; PW_k++ )
- {
- if ( (in_data[PW_Start_Address+958+PW_k*2]*256)+in_data[PW_Start_Address+959+PW_k*2] > PW_l )
- PW_l = (in_data[PW_Start_Address+958+PW_k*2]*256)+in_data[PW_Start_Address+959+PW_k*2];
- }
- PW_k = 1984 + PW_l + 256;
- OutputSize = PW_k + PW_WholeSampleSize;
- /* printf ( "\b\b\b\b\b\b\b\bKRIS Tracker module found at %ld !. its size is : %ld\n" , PW_Start_Address , OutputSize );*/
-
- CONVERT = GOOD;
- Save_Rip ( "KRIS Tracker module", KRIS_tracker );
-
- if ( Save_Status == GOOD )
- PW_i += (OutputSize - 954); /* 953 should do but call it "just to be sure" :) */
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Rip_KSM ( void )
-{
- /* PW_j is the highest track number */
-
- PW_WholeSampleSize = 0;
- for ( PW_k=0 ; PW_k<15 ; PW_k++ )
- PW_WholeSampleSize += ((in_data[PW_Start_Address+52+PW_k*32]*256)+in_data[PW_Start_Address+53+PW_k*32]);
-
- OutputSize = ((PW_j+1)*192) + PW_WholeSampleSize + 1536;
- /* printf ( "\b\b\b\b\b\b\b\bKefrens Sound Machine module found at %ld !. its size is : %ld\n" , PW_Start_Address , OutputSize );*/
- /* OutName[1] = Extensions[KSM][0];
- OutName[2] = Extensions[KSM][1];
- OutName[3] = Extensions[KSM][2];*/
-
- CONVERT = GOOD;
- Save_Rip ( "Kefrens Sound Machine module", KSM );
-
- if ( Save_Status == GOOD )
- PW_i += (OutputSize - 2); /* -1 should do but call it "just to be sure" :) */
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Rip_MaxPacker12 ( void )
-{
- /* PW_l is still the whole size */
-
- Uchar * Amiga_EXE_Header_Block;
- Uchar * Whatever;
-
- OutputSize = PW_l;
-
- /* printf ( "\b\b\b\b\b\b\b\bMax Packer 1.2 Exe-file found at %ld !. its size is : %ld\n" , PW_Start_Address , OutputSize );*/
- /* OutName[1] = Extensions[MaxPacker][0];
- OutName[2] = Extensions[MaxPacker][1];
- OutName[3] = Extensions[MaxPacker][2];*/
-
- CONVERT = BAD;
-
- if ( Amiga_EXE_Header == BAD )
- {
- OutputSize -= 32;
- Amiga_EXE_Header_Block = (Uchar *) malloc ( 32 );
- BZERO ( Amiga_EXE_Header_Block , 32 );
- Amiga_EXE_Header_Block[2] = Amiga_EXE_Header_Block[26] = 0x03;
- Amiga_EXE_Header_Block[3] = 0xF3;
- Amiga_EXE_Header_Block[11] = 0x01;
- Amiga_EXE_Header_Block[27] = 0xE9;
-
- /* WARNING !!! WORKS ONLY ON PC !!! */
- /* 68k machines code : c1 = *(Whatever+2); */
- /* 68k machines code : c2 = *(Whatever+3); */
- PW_j = PW_l - 36;
- PW_j /= 4;
- Whatever = (Uchar *) &PW_j;
- Amiga_EXE_Header_Block[20] = Amiga_EXE_Header_Block[28] = *(Whatever+3);
- Amiga_EXE_Header_Block[21] = Amiga_EXE_Header_Block[29] = *(Whatever+2);
- Amiga_EXE_Header_Block[22] = Amiga_EXE_Header_Block[30] = *(Whatever+1);
- Amiga_EXE_Header_Block[23] = Amiga_EXE_Header_Block[31] = *Whatever;
- Save_Rip_Special ( "Max Packer 1.2 Exe-file", MaxPacker, Amiga_EXE_Header_Block , 32 );
- free ( Amiga_EXE_Header_Block );
- }
- else
- {
- PW_Start_Address -= 32;
- Save_Rip ( "Max Packer 1.2 Exe-file", MaxPacker );
- }
-
- if ( Save_Status == GOOD )
- PW_i += (OutputSize - 36); /* 32 should do but call it "just to be sure" :) */
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Rip_MasterCruncher30addr ( void )
-{
- /* PW_l is still the whole size */
-
- Uchar * Amiga_EXE_Header_Block;
-
- OutputSize = PW_l;
-
- /* printf ( "\b\b\b\b\b\b\b\bMaster Cruncher 3.0 address Exe-file found at %ld !. its size is : %ld\n" , PW_Start_Address , OutputSize );*/
- /* OutName[1] = Extensions[MasterCruncher][0];
- OutName[2] = Extensions[MasterCruncher][1];
- OutName[3] = Extensions[MasterCruncher][2];*/
-
- CONVERT = BAD;
-
- if ( Amiga_EXE_Header == BAD )
- {
- OutputSize -= 36;
- Amiga_EXE_Header_Block = (Uchar *) malloc ( 36 );
- BZERO ( Amiga_EXE_Header_Block , 36 );
- Amiga_EXE_Header_Block[2] = Amiga_EXE_Header_Block[30] = 0x03;
- Amiga_EXE_Header_Block[3] = 0xF3;
- Amiga_EXE_Header_Block[11] = 0x02;
- Amiga_EXE_Header_Block[19] = 0x01;
- Amiga_EXE_Header_Block[23] = Amiga_EXE_Header_Block[35] = 0x6A;
- Amiga_EXE_Header_Block[31] = 0xE9;
-
- Amiga_EXE_Header_Block[24] = in_data[PW_Start_Address+428];
- Amiga_EXE_Header_Block[25] = in_data[PW_Start_Address+429];
- Amiga_EXE_Header_Block[26] = in_data[PW_Start_Address+430];
- Amiga_EXE_Header_Block[27] = in_data[PW_Start_Address+431];
- Save_Rip_Special ( "Master Cruncher 3.0 address Exe-file", MasterCruncher, Amiga_EXE_Header_Block , 36 );
- free ( Amiga_EXE_Header_Block );
- }
- else
- {
- PW_Start_Address -= 36;
- Save_Rip ( "Master Cruncher 3.0 address Exe-file", MasterCruncher );
- }
-
-
- if ( Save_Status == GOOD )
- PW_i += (OutputSize - 38); /* 36 should do but call it "just to be sure" :) */
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Rip_MegaCruncherObj ( void )
-{
- /* PW_l is still the whole size */
-
- Uchar * Amiga_EXE_Header_Block;
- Uchar * Whatever;
-
- OutputSize = PW_l;
-
- CONVERT = BAD;
-
- if ( Amiga_EXE_Header == BAD )
- {
- OutputSize -= 36;
- Amiga_EXE_Header_Block = (Uchar *) malloc ( 36 );
- BZERO ( Amiga_EXE_Header_Block , 36 );
- Amiga_EXE_Header_Block[2] = Amiga_EXE_Header_Block[30] = 0x03;
- Amiga_EXE_Header_Block[3] = 0xF3;
- Amiga_EXE_Header_Block[11] = 0x02;
- Amiga_EXE_Header_Block[19] = 0x01;
- Amiga_EXE_Header_Block[27] = 0x01;
- Amiga_EXE_Header_Block[31] = 0xE9;
-
- /* WARNING !!! WORKS ONLY ON PC !!! */
- /* 68k machines code : c1 = *(Whatever+2); */
- /* 68k machines code : c2 = *(Whatever+3); */
- PW_j = PW_l - 204;
- PW_j /= 4;
- Whatever = (Uchar *) &PW_j;
- Amiga_EXE_Header_Block[20] = Amiga_EXE_Header_Block[32] = *(Whatever+3);
- Amiga_EXE_Header_Block[21] = Amiga_EXE_Header_Block[33] = *(Whatever+2);
- Amiga_EXE_Header_Block[22] = Amiga_EXE_Header_Block[34] = *(Whatever+1);
- Amiga_EXE_Header_Block[23] = Amiga_EXE_Header_Block[35] = *Whatever;
-
- /* also the last 16 bytes are 'removed' frequently ... Here they are */
- in_data[PW_Start_Address+OutputSize-16] = 0x00;
- in_data[PW_Start_Address+OutputSize-15] = 0x00;
- in_data[PW_Start_Address+OutputSize-14] = 0x03;
- in_data[PW_Start_Address+OutputSize-13] = 0xF2;
-
- in_data[PW_Start_Address+OutputSize-12] = 0x00;
- in_data[PW_Start_Address+OutputSize-11] = 0x00;
- in_data[PW_Start_Address+OutputSize-10] = 0x03;
- in_data[PW_Start_Address+OutputSize-9] = 0xEB;
-
- in_data[PW_Start_Address+OutputSize-8] = 0x00;
- in_data[PW_Start_Address+OutputSize-7] = 0x00;
- in_data[PW_Start_Address+OutputSize-6] = 0x00;
- in_data[PW_Start_Address+OutputSize-5] = 0x01;
-
- in_data[PW_Start_Address+OutputSize-4] = 0x00;
- in_data[PW_Start_Address+OutputSize-3] = 0x00;
- in_data[PW_Start_Address+OutputSize-2] = 0x03;
- in_data[PW_Start_Address+OutputSize-1] = 0xF2;
-
- Save_Rip_Special ( "Mega Cruncher Obj", MegaCruncherObj, Amiga_EXE_Header_Block , 36 );
- free ( Amiga_EXE_Header_Block );
- }
- else
- {
- PW_Start_Address -= 36;
- Save_Rip ( "Mega Cruncher Obj", MegaCruncherObj );
- }
-
- if ( Save_Status == GOOD )
- PW_i += 40; /* beside header */
-}
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Rip_MegaCruncher ( void )
-{
- /* PW_l is still the whole size */
-
- Uchar * Amiga_EXE_Header_Block;
- Uchar * Whatever;
-
- OutputSize = PW_l;
-
- /* printf ( "\b\b\b\b\b\b\b\bMega Cruncher 1.0/1.2 Exe-file found at %ld !. its size is : %ld\n" , PW_Start_Address , OutputSize );*/
- /* OutName[1] = Extensions[MasterCruncher][0];
- OutName[2] = Extensions[MasterCruncher][1];
- OutName[3] = Extensions[MasterCruncher][2];*/
-
- CONVERT = BAD;
-
- if ( Amiga_EXE_Header == BAD )
- {
- OutputSize -= 36;
- Amiga_EXE_Header_Block = (Uchar *) malloc ( 36 );
- BZERO ( Amiga_EXE_Header_Block , 36 );
- Amiga_EXE_Header_Block[2] = Amiga_EXE_Header_Block[30] = 0x03;
- Amiga_EXE_Header_Block[3] = 0xF3;
- Amiga_EXE_Header_Block[11] = 0x02;
- Amiga_EXE_Header_Block[19] = 0x01;
- Amiga_EXE_Header_Block[27] = 0x01;
- Amiga_EXE_Header_Block[31] = 0xE9;
-
- /* WARNING !!! WORKS ONLY ON PC !!! */
- /* 68k machines code : c1 = *(Whatever+2); */
- /* 68k machines code : c2 = *(Whatever+3); */
- PW_j = PW_l - 60;
- PW_j /= 4;
- Whatever = (Uchar *) &PW_j;
- Amiga_EXE_Header_Block[20] = Amiga_EXE_Header_Block[32] = *(Whatever+3);
- Amiga_EXE_Header_Block[21] = Amiga_EXE_Header_Block[33] = *(Whatever+2);
- Amiga_EXE_Header_Block[22] = Amiga_EXE_Header_Block[34] = *(Whatever+1);
- Amiga_EXE_Header_Block[23] = Amiga_EXE_Header_Block[35] = *Whatever;
- Save_Rip_Special ( "Mega Cruncher 1.0/1.2 Exe-file", MegaCruncher, Amiga_EXE_Header_Block , 36 );
- free ( Amiga_EXE_Header_Block );
- }
- else
- {
- PW_Start_Address -= 36;
- Save_Rip ( "Mega Cruncher 1.0/1.2 Exe-file", MegaCruncher );
- }
-
- if ( Save_Status == GOOD )
- PW_i += (OutputSize - 42); /* 36 should do but call it "just to be sure" :) */
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Rip_MMD0 ( void )
-{
- /* PW_k is the module size */
-
- OutputSize = PW_k;
- /* if ( in_data[PW_i+3] == '0' )
- printf ( "\b\b\b\b\b\b\b\bMED (MMD0) module found at %ld !. its size is : %ld\n" , PW_Start_Address , OutputSize );
- if ( in_data[PW_i+3] == '1' )
- printf ( "\b\b\b\b\b\b\b\bOctaMED (MMD1) module found at %ld !. its size is : %ld\n" , PW_Start_Address , OutputSize );*/
- /* OutName[1] = Extensions[MED][0];
- OutName[2] = Extensions[MED][1];
- OutName[3] = Extensions[MED][2];*/
-
- CONVERT = BAD;
- if ( in_data[PW_i+3] == '0' )
- Save_Rip ( "MED (MMD0) module", MED );
- if ( in_data[PW_i+3] == '1' )
- Save_Rip ( "OctaMED (MMD1) module", MED );
-
- if ( Save_Status == GOOD )
- PW_i += (OutputSize - 2); /* 0 should do but call it "just to be sure" :) */
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Rip_MP_noID ( void )
-{
- /*PW_WholeSampleSize is the whole sample size*/
-
- PW_j = in_data[PW_Start_Address+248];
- PW_l = 0;
- for ( PW_k=0 ; PW_k<PW_j ; PW_k++ )
- if ( in_data[PW_Start_Address+250+PW_k] > PW_l )
- PW_l = in_data[PW_Start_Address+250+PW_k];
-
- PW_k = (in_data[PW_Start_Address+378]*256*256*256)+
- (in_data[PW_Start_Address+379]*256*256)+
- (in_data[PW_Start_Address+380]*256)+
- in_data[PW_Start_Address+381];
-
- PW_l += 1;
- OutputSize = PW_WholeSampleSize + (PW_l*1024) + 378;
- if ( PW_k == 0 )
- OutputSize += 4;
- /* printf ( "\b\b\b\b\b\b\b\bModule Protector Packed music found at %ld !. its size is : %ld\n" , PW_Start_Address , OutputSize );*/
- /* OutName[1] = Extensions[Module_protector][0];
- OutName[2] = Extensions[Module_protector][1];
- OutName[3] = Extensions[Module_protector][2];*/
-
- CONVERT = GOOD;
- Save_Rip ( "Module Protector Packed music", Module_protector );
-
- if ( Save_Status == GOOD )
- PW_i += 0x57E;
- /*PW_i += (OutputSize - 5); -- 4 should do but call it "just to be sure" :) */
-}
-
-
-void Rip_MP_withID ( void )
-{
- PW_WholeSampleSize = 0;
- for ( PW_j=0 ; PW_j<31 ; PW_j++ )
- PW_WholeSampleSize += (((in_data[PW_Start_Address+4+PW_j*8]*256)+in_data[PW_Start_Address+5+PW_j*8])*2);
- PW_j = in_data[PW_Start_Address+252];
- PW_l = 0;
- for ( PW_k=0 ; PW_k<PW_j ; PW_k++ )
- if ( in_data[PW_Start_Address+254+PW_k] > PW_l )
- PW_l = in_data[PW_Start_Address+254+PW_k];
-
- PW_k = (in_data[PW_Start_Address+382]*256*256*256)+
- (in_data[PW_Start_Address+383]*256*256)+
- (in_data[PW_Start_Address+384]*256)+
- in_data[PW_Start_Address+385];
-
- PW_l += 1;
- OutputSize = PW_WholeSampleSize + (PW_l*1024) + 382;
-
- /* not sure for the following test because I've never found */
- /* any MP file with "TRK1" ID. I'm basing all this on Gryzor's */
- /* statement in his Hex-dump exemple ... */
- if ( PW_k == 0 )
- OutputSize += 4;
- /* printf ( "\b\b\b\b\b\b\b\bModule Protector Packed music found at %ld !. its size is : %ld\n" , PW_Start_Address , OutputSize );*/
- /* OutName[1] = Extensions[Module_protector][0];
- OutName[2] = Extensions[Module_protector][1];
- OutName[3] = Extensions[Module_protector][2];*/
-
- CONVERT = GOOD;
- Save_Rip ( "Module Protector Packed music", Module_protector );
-
- if ( Save_Status == GOOD )
- PW_i += (OutputSize - 5); /* 4 should do but call it "just to be sure" :) */
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Rip_Newtron ( void )
-{
- /* PW_WholeSampleSize is the whole sample size :) */
-
- PW_k = (in_data[PW_Start_Address+2]*256) + in_data[PW_Start_Address+3];
-
- OutputSize = PW_k + PW_WholeSampleSize + 4;
-
- CONVERT = GOOD;
- Save_Rip ( "Newtron module", Newtron );
-
- if ( Save_Status == GOOD )
- PW_i += 7;
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-/* noise from heaven chiptune mag by Iris'01 */
-
-void Rip_NFH ( void )
-{
- /* PW_WholeSampleSize id still the whole sample size */
-
- PW_l=0;
- for ( PW_k=0 ; PW_k<128 ; PW_k++ )
- if ( in_data[PW_Start_Address+952+PW_k] > PW_l )
- PW_l = in_data[PW_Start_Address+952+PW_k];
- PW_l += 1;
- OutputSize = (PW_l*1024) + 1084 + PW_WholeSampleSize;
- /* printf ( "\b\b\b\b\b\b\b\bProrunner 1 module found at %ld !. its size is : %ld\n" , PW_Start_Address , OutputSize );*/
- /* OutName[1] = Extensions[ProRunner_v1][0];
- OutName[2] = Extensions[ProRunner_v1][1];
- OutName[3] = Extensions[ProRunner_v1][2];*/
-
- CONVERT = GOOD;
- Save_Rip ( "Noise From Heaven module", NoiseFromHeaven );
-
- if ( Save_Status == GOOD )
- PW_i += (OutputSize - 1083); /* 1080 could be enough */
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Rip_Noiserunner ( void )
-{
- /* PW_k is still the nbr of pattern */
-
- OutputSize = PW_WholeSampleSize + (PW_k*1024) + 1084;
-
- /* printf ( "\b\b\b\b\b\b\b\bNoiserunner music file found at %ld !. its size is : %ld\n" , PW_Start_Address , OutputSize );*/
- /* OutName[1] = Extensions[Noiserunner][0];
- OutName[2] = Extensions[Noiserunner][1];
- OutName[3] = Extensions[Noiserunner][2];*/
-
- CONVERT = GOOD;
- Save_Rip ( "Noiserunner music", Noiserunner );
-
- if ( Save_Status == GOOD )
- PW_i += (OutputSize - 1081); /* 1080 should do but call it "just to be sure" :) */
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Rip_Noisepacker1 ( void )
-{
- /* OutName[1] = Extensions[Noisepacker1][0];
- OutName[2] = Extensions[Noisepacker1][1];
- OutName[3] = Extensions[Noisepacker1][2];*/
-
- OutputSize = PW_k + PW_WholeSampleSize + PW_l;
- /* printf ( "\b\b\b\b\b\b\b\bNoisePacker v1 module found at %ld !. its size is : %ld\n" , PW_Start_Address , OutputSize );*/
-
- CONVERT = GOOD;
- Save_Rip ( "NoisePacker v1 module", Noisepacker1 );
-
- if ( Save_Status == GOOD )
- PW_i += (OutputSize - 16); /* 15 should do but call it "just to be sure" :) */
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Rip_Noisepacker2 ( void )
-{
- /* OutName[1] = Extensions[Noisepacker2][0];
- OutName[2] = Extensions[Noisepacker2][1];
- OutName[3] = Extensions[Noisepacker2][2];*/
-
- OutputSize = PW_k + PW_WholeSampleSize + PW_l;
- /* printf ( "\b\b\b\b\b\b\b\bNoisePacker v2 module found at %ld !. its size is : %ld\n" , PW_Start_Address , OutputSize );*/
-
- CONVERT = GOOD;
- Save_Rip ( "NoisePacker v2 module", Noisepacker2 );
-
- if ( Save_Status == GOOD )
- PW_i += (OutputSize - 16); /* 15 should do but call it "just to be sure" :) */
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Rip_Noisepacker3 ( void )
-{
- /* OutName[1] = Extensions[Noisepacker3][0];
- OutName[2] = Extensions[Noisepacker3][1];
- OutName[3] = Extensions[Noisepacker3][2];*/
-
- OutputSize = PW_k + PW_WholeSampleSize + PW_l;
- /* printf ( "\b\b\b\b\b\b\b\bNoisePacker v3 module found at %ld !. its size is : %ld\n" , PW_Start_Address , OutputSize );*/
-
- CONVERT = GOOD;
- Save_Rip ( "NoisePacker v3 module", Noisepacker3 );
-
- if ( Save_Status == GOOD )
- PW_i += (OutputSize - 16); /* 15 should do but call it "just to be sure" :) */
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Rip_P22A ( void )
-{
- /* PW_k is the number of sample */
-
- PW_l = ( (in_data[PW_Start_Address+16]*256*256*256) +
- (in_data[PW_Start_Address+17]*256*256) +
- (in_data[PW_Start_Address+18]*256) +
- in_data[PW_Start_Address+19] );
-
- /* get whole sample size */
- /* starting from the highest addy and adding the sample size */
- PW_o = 0;
- for ( PW_j=0 ; PW_j<PW_k ; PW_j++ )
- {
- PW_m = ( (in_data[PW_Start_Address+20+PW_j*16]*256*256*256) +
- (in_data[PW_Start_Address+21+PW_j*16]*256*256) +
- (in_data[PW_Start_Address+22+PW_j*16]*256) +
- in_data[PW_Start_Address+23+PW_j*16] );
- if ( PW_m > PW_o )
- {
- PW_o = PW_m;
- PW_n = ( (in_data[PW_Start_Address+24+PW_j*16]*256) +
- in_data[PW_Start_Address+25+PW_j*16] );
- }
- }
-
- OutputSize = PW_l + PW_o + (PW_n*2) + 4;
-
- CONVERT = GOOD;
- Save_Rip ( "The Player 2.2A module", ThePlayer22a );
-
- if ( Save_Status == GOOD )
- PW_i += (OutputSize - 2); /* 1 should do but call it "just to be sure" :) */
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Rip_P30A ( void )
-{
- /* PW_k is the number of sample */
-
- PW_l = ( (in_data[PW_Start_Address+16]*256*256*256) +
- (in_data[PW_Start_Address+17]*256*256) +
- (in_data[PW_Start_Address+18]*256) +
- in_data[PW_Start_Address+19] );
-
- /* get whole sample size */
- /* starting from the highest addy and adding the sample size */
- PW_o = 0;
- for ( PW_j=0 ; PW_j<PW_k ; PW_j++ )
- {
- PW_m = ( (in_data[PW_Start_Address+20+PW_j*16]*256*256*256) +
- (in_data[PW_Start_Address+21+PW_j*16]*256*256) +
- (in_data[PW_Start_Address+22+PW_j*16]*256) +
- in_data[PW_Start_Address+23+PW_j*16] );
- if ( PW_m > PW_o )
- {
- PW_o = PW_m;
- PW_n = ( (in_data[PW_Start_Address+24+PW_j*16]*256) +
- in_data[PW_Start_Address+25+PW_j*16] );
- }
- }
-
- OutputSize = PW_l + PW_o + (PW_n*2) + 4;
-
- CONVERT = GOOD;
- Save_Rip ( "The Player 3.0A module", ThePlayer30a );
-
- if ( Save_Status == GOOD )
- PW_i += (OutputSize - 2); /* 1 should do but call it "just to be sure" :) */
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Rip_P40A ( void )
-{
- /* PW_k is the number of sample */
-
- /* OutName[1] = Extensions[P40A][0];
- OutName[2] = Extensions[P40A][1];
- OutName[3] = Extensions[P40A][2];*/
-
- PW_l = ( (in_data[PW_Start_Address+16]*256*256*256) +
- (in_data[PW_Start_Address+17]*256*256) +
- (in_data[PW_Start_Address+18]*256) +
- in_data[PW_Start_Address+19] );
-
- /* get whole sample size */
- PW_o = 0;
- for ( PW_j=0 ; PW_j<PW_k ; PW_j++ )
- {
- PW_m = ( (in_data[PW_Start_Address+20+PW_j*16]*256*256*256) +
- (in_data[PW_Start_Address+21+PW_j*16]*256*256) +
- (in_data[PW_Start_Address+22+PW_j*16]*256) +
- in_data[PW_Start_Address+23+PW_j*16] );
- if ( PW_m > PW_o )
- {
- PW_o = PW_m;
- PW_n = ( (in_data[PW_Start_Address+24+PW_j*16]*256) +
- in_data[PW_Start_Address+25+PW_j*16] );
- }
- }
-
- OutputSize = PW_l + PW_o + (PW_n*2) + 4;
-
- /* printf ( "\b\b\b\b\b\b\b\bThe Player 4.0A module found at %ld !. its size is : %ld\n" , PW_Start_Address , OutputSize );*/
-
- CONVERT = GOOD;
- Save_Rip ( "The Player 4.0A module", P40A );
-
- if ( Save_Status == GOOD )
- PW_i += (OutputSize - 2); /* 1 should do but call it "just to be sure" :) */
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Rip_P40B ( void )
-{
- /* PW_k is the number of sample */
-
- /* OutName[1] = Extensions[P40B][0];
- OutName[2] = Extensions[P40B][1];
- OutName[3] = Extensions[P40B][2];*/
-
- PW_l = ( (in_data[PW_Start_Address+16]*256*256*256) +
- (in_data[PW_Start_Address+17]*256*256) +
- (in_data[PW_Start_Address+18]*256) +
- in_data[PW_Start_Address+19] );
-
- /* get whole sample size */
- PW_o = 0;
- for ( PW_j=0 ; PW_j<PW_k ; PW_j++ )
- {
- PW_m = ( (in_data[PW_Start_Address+20+PW_j*16]*256*256*256) +
- (in_data[PW_Start_Address+21+PW_j*16]*256*256) +
- (in_data[PW_Start_Address+22+PW_j*16]*256) +
- in_data[PW_Start_Address+23+PW_j*16] );
- if ( PW_m > PW_o )
- {
- PW_o = PW_m;
- PW_n = ( (in_data[PW_Start_Address+24+PW_j*16]*256) +
- in_data[PW_Start_Address+25+PW_j*16] );
- }
- }
-
- OutputSize = PW_l + PW_o + (PW_n*2) + 4;
-
- /* printf ( "\b\b\b\b\b\b\b\bThe Player 4.0B module found at %ld !. its size is : %ld\n" , PW_Start_Address , OutputSize );*/
-
- CONVERT = GOOD;
- Save_Rip ( "The Player 4.0B module", P40B );
-
- if ( Save_Status == GOOD )
- PW_i += (OutputSize - 2); /* 1 should do but call it "just to be sure" :) */
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Rip_P41A ( void )
-{
- /* PW_k is the number of sample */
-
- /* OutName[1] = Extensions[P41A][0];
- OutName[2] = Extensions[P41A][1];
- OutName[3] = Extensions[P41A][2];*/
-
- PW_l = ( (in_data[PW_Start_Address+16]*256*256*256) +
- (in_data[PW_Start_Address+17]*256*256) +
- (in_data[PW_Start_Address+18]*256) +
- in_data[PW_Start_Address+19] );
-
- /* get whole sample size */
- PW_o = 0;
- for ( PW_j=0 ; PW_j<PW_k ; PW_j++ )
- {
- PW_m = ( (in_data[PW_Start_Address+20+PW_j*16]*256*256*256) +
- (in_data[PW_Start_Address+21+PW_j*16]*256*256) +
- (in_data[PW_Start_Address+22+PW_j*16]*256) +
- in_data[PW_Start_Address+23+PW_j*16] );
- if ( PW_m > PW_o )
- {
- PW_o = PW_m;
- PW_n = ( (in_data[PW_Start_Address+24+PW_j*16]*256) +
- in_data[PW_Start_Address+25+PW_j*16] );
- }
- }
-
- OutputSize = PW_l + PW_o + (PW_n*2) + 4;
-
- /* printf ( "\b\b\b\b\b\b\b\bThe Player 4.1A module found at %ld !. its size is : %ld\n" , PW_Start_Address , OutputSize );*/
-
- CONVERT = GOOD;
- Save_Rip ( "The Player 4.1A module", P41A );
-
- if ( Save_Status == GOOD )
- PW_i += (OutputSize - 2); /* 1 should do but call it "just to be sure" :) */
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Rip_P50A ( void )
-{
- /* PW_j is the number of sample */
- /* PW_WholeSampleSize is the whole sample data size */
-
- /* OutName[1] = Extensions[P50A][0];
- OutName[2] = Extensions[P50A][1];
- OutName[3] = Extensions[P50A][2];*/
-
- OutputSize = PW_j + PW_WholeSampleSize;
-
- /* printf ( "\b\b\b\b\b\b\b\bThe Player 5.0A module found at %ld !. its size is : %ld\n" , PW_Start_Address , OutputSize );*/
-
- CONVERT = GOOD;
- Save_Rip ( "The Player 5.0A module", P50A );
-
- if ( Save_Status == GOOD )
- PW_i += (OutputSize - 8); /* 7 should do but call it "just to be sure" :) */
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Rip_P60A ( void )
-{
- /* PW_j is the number of sample */
- /* PW_WholeSampleSize is the whole sample data size */
-
- /* OutName[1] = Extensions[P60A][0];
- OutName[2] = Extensions[P60A][1];
- OutName[3] = Extensions[P60A][2];*/
-
- OutputSize = PW_j + PW_WholeSampleSize;
-
- /* printf ( "\b\b\b\b\b\b\b\bThe Player 6.0A module found at %ld !. its size is : %ld\n" , PW_Start_Address , OutputSize );*/
-
- CONVERT = GOOD;
- Save_Rip ( "The Player 6.0A module", P60A );
-
- if ( Save_Status == GOOD )
- PW_i += (OutputSize - 12); /* 7 should do but call it "just to be sure" :) */
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-
-void Rip_P61A ( void )
-{
- /* PW_j is the number of sample */
- /* PW_WholeSampleSize is the whole sample data size */
-
- /* OutName[1] = Extensions[P61A][0];
- OutName[2] = Extensions[P61A][1];
- OutName[3] = Extensions[P61A][2];*/
-
- OutputSize = PW_j + PW_WholeSampleSize;
-
- /* printf ( "\b\b\b\b\b\b\b\bThe Player 6.1A module found at %ld !. its size is : %ld\n" , PW_Start_Address , OutputSize );*/
-
- CONVERT = GOOD;
- Save_Rip ( "The Player 6.1A module", P61A );
-
- if ( Save_Status == GOOD )
- PW_i += (OutputSize - 12); /* 7 should do but call it "just to be sure" :) */
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Rip_PHA ( void )
-{
- /* PW_k is still the highest pattern address ... so, 'all' we */
- /* have to do, here, is to depack the last pattern to get its */
- /* size ... that's all we need. */
- /* NOTE: we dont need to calculate the whole sample size, so */
- PW_m = 0;
-
- /* printf ( "(pha)Where : %ld\n"
- "(pha)PW_Start_Address : %ld "
- "(pha)PW_k : %ld\n"
- , PW_i, PW_Start_Address, PW_k );
- fflush (stdout);*/
- for ( PW_j=0 ; PW_j<256 ; PW_j++ )
- {
- /* 192 = 1100-0000 ($C0) */
- if ( in_data[PW_Start_Address+PW_k+PW_m] < 192 )
- {
- PW_m += 4;
- continue;
- }
- else
- {
- PW_l = 255 - in_data[PW_Start_Address+PW_k+PW_m+1];
- PW_m += 2;
- PW_j += (PW_l-1);
- }
- }
- OutputSize = PW_m + PW_k;
-
- /* printf ( "\b\b\b\b\b\b\b\bPHA Packed music found at %ld !. its size is : %ld\n" , PW_Start_Address , OutputSize );*/
- /* OutName[1] = Extensions[Pha_packer][0];
- OutName[2] = Extensions[Pha_packer][1];
- OutName[3] = Extensions[Pha_packer][2];*/
-
- CONVERT = GOOD;
- Save_Rip ( "PHA Packed music", Pha_packer );
-
- if ( Save_Status == GOOD )
- PW_i += (OutputSize - 12); /* 11 should do but call it "just to be sure" :) */
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Rip_PM ( void )
-{
- /* OutName[1] = Extensions[Power_Music][0];
- OutName[2] = Extensions[Power_Music][1];
- OutName[3] = Extensions[Power_Music][2];*/
-
- PW_WholeSampleSize = 0;
- for ( PW_k=0 ; PW_k<31 ; PW_k++ )
- PW_WholeSampleSize += (((in_data[PW_Start_Address+42+PW_k*30]*256)+in_data[PW_Start_Address+43+PW_k*30])*2);
-
- PW_j = in_data[PW_Start_Address+950];
- PW_l=0;
- for ( PW_k=0 ; PW_k<128 ; PW_k++ )
- {
- if ( in_data[PW_Start_Address+952+PW_k] > PW_l )
- PW_l = in_data[PW_Start_Address+952+PW_k];
- }
- PW_l += 1;
- PW_k = 1084 + (PW_l * 1024);
- OutputSize = PW_k + PW_WholeSampleSize;
- /* printf ( "\b\b\b\b\b\b\b\bPower Music module found at %ld !. its size is : %ld\n" , PW_Start_Address , OutputSize );*/
-
- CONVERT = GOOD;
- Save_Rip ( "Power Music module", Power_Music );
-
- if ( Save_Status == GOOD )
- PW_i += (OutputSize - 1083); /* 1080 should do but call it "just to be sure" :) */
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Rip_PM01 ( void )
-{
- PW_WholeSampleSize = 0;
- for ( PW_j=0 ; PW_j<31 ; PW_j++ )
- PW_WholeSampleSize += (((in_data[PW_Start_Address+PW_j*8]*256)+in_data[PW_Start_Address+1+PW_j*8])*2);
-
- PW_k = (in_data[PW_Start_Address+762]*256*256*256)
- +(in_data[PW_Start_Address+763]*256*256)
- +(in_data[PW_Start_Address+764]*256)
- +in_data[PW_Start_Address+765];
-
- OutputSize = PW_WholeSampleSize + PW_k + 766;
-
- /* printf ( "\b\b\b\b\b\b\b\bPromizer 0.1 music found at %ld !. its size is : %ld\n" , PW_Start_Address , OutputSize );*/
- /* OutName[1] = Extensions[Promizer_01][0];
- OutName[2] = Extensions[Promizer_01][1];
- OutName[3] = Extensions[Promizer_01][2];*/
-
- CONVERT = GOOD;
- Save_Rip ( "Promizer 0.1 music", Promizer_01 );
-
- if ( Save_Status == GOOD )
- PW_i += (OutputSize - 4); /* 3 should do but call it "just to be sure" :) */
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Rip_PM10c ( void )
-{
- /* we NEED this 'PW_j' value found while testing !,so we keep it :) */
- PW_WholeSampleSize = 0;
- for ( PW_k=0 ; PW_k<31 ; PW_k++ )
- PW_WholeSampleSize += (((in_data[PW_Start_Address+4460+8*PW_k]*256)+in_data[PW_Start_Address+4461+8*PW_k])*2);
- OutputSize = 4456 + PW_j + PW_WholeSampleSize;
- /* printf ( "\b\b\b\b\b\b\b\bPromizer 1.0c module found at %ld !. its size is : %ld\n" , PW_Start_Address , OutputSize );*/
- /* OutName[1] = Extensions[Promizer_10c][0];
- OutName[2] = Extensions[Promizer_10c][1];
- OutName[3] = Extensions[Promizer_10c][2];*/
-
- CONVERT = GOOD;
- Save_Rip ( "Promizer 1.0c module", Promizer_10c );
-
- if ( Save_Status == GOOD )
- PW_i += (OutputSize - 2); /* 1 should do but call it "just to be sure" :) */
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Rip_PM18a ( void )
-{
- /* we NEED this 'PW_j' value found while testing !,so we keep it :) */
- PW_WholeSampleSize = 0;
- for ( PW_k=0 ; PW_k<31 ; PW_k++ )
- PW_WholeSampleSize += (((in_data[PW_Start_Address+4464+8*PW_k]*256)+in_data[PW_Start_Address+4465+8*PW_k])*2);
- OutputSize = 4460 + PW_j + PW_WholeSampleSize;
- /* printf ( "\b\b\b\b\b\b\b\bPromizer 1.8a module found at %ld !. its size is : %ld\n" , PW_Start_Address , OutputSize );*/
- /* OutName[1] = Extensions[Promizer_18a][0];
- OutName[2] = Extensions[Promizer_18a][1];
- OutName[3] = Extensions[Promizer_18a][2];*/
-
- CONVERT = GOOD;
- Save_Rip ( "Promizer 1.8a module", Promizer_18a );
-
- if ( Save_Status == GOOD )
- PW_i += (OutputSize - 2); /* 1 should do but call it "just to be sure" :) */
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Rip_PM20 ( void )
-{
- PW_WholeSampleSize = 0;
- for ( PW_k=0 ; PW_k<31 ; PW_k++ )
- PW_WholeSampleSize += (((in_data[PW_Start_Address+5458+PW_k*8]*256)+in_data[PW_Start_Address+5459+PW_k*8])*2);
- PW_j = (in_data[PW_Start_Address+5706]*256*256*256)+(in_data[PW_Start_Address+5707]*256*256)+(in_data[PW_Start_Address+5708]*256)+in_data[PW_Start_Address+5709];
- OutputSize = PW_WholeSampleSize + 5198 + PW_j;
- /* printf ( "\b\b\b\b\b\b\b\bPromizer 2.0 module found at %ld !. its size is : %ld\n" , PW_Start_Address , OutputSize );*/
- /* OutName[1] = Extensions[Promizer_20][0];
- OutName[2] = Extensions[Promizer_20][1];
- OutName[3] = Extensions[Promizer_20][2];*/
-
- CONVERT = GOOD;
- Save_Rip ( "Promizer 2.0 module", Promizer_20 );
-
- if ( Save_Status == GOOD )
- PW_i += (OutputSize - 2); /* 1 should do but call it "just to be sure" :) */
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Rip_PM40 ( void )
-{
- /* PW_l is the sample data address */
-
- PW_WholeSampleSize = 0;
- for ( PW_k=0 ; PW_k<31 ; PW_k++ )
- PW_WholeSampleSize += (((in_data[PW_Start_Address+264+PW_k*8]*256)+in_data[PW_Start_Address+265+PW_k*8])*2);
-
- OutputSize = PW_WholeSampleSize + PW_l + 4;
- /* printf ( "\b\b\b\b\b\b\b\bPromizer 4.0 module found at %ld !. its size is : %ld\n" , PW_Start_Address , OutputSize );*/
- /* OutName[1] = Extensions[PM40][0];
- OutName[2] = Extensions[PM40][1];
- OutName[3] = Extensions[PM40][2];*/
-
- CONVERT = GOOD;
- Save_Rip ( "Promizer 4.0 module", PM40 );
-
- if ( Save_Status == GOOD )
- PW_i += (OutputSize - 2); /* 1 should do but call it "just to be sure" :) */
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Rip_Polka ( void )
-{
- /* PW_WholeSampleSize is the whole sample size */
- /* PW_k is the highest pattern number */
-
- OutputSize = PW_WholeSampleSize + (PW_k*1024) + 0x43c;
-
- CONVERT = GOOD;
- Save_Rip ( "Polka Packed music", PolkaPacker );
-
- if ( Save_Status == GOOD )
- PW_i += 0x43C; /* put back pointer after header*/
-}
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Rip_Powerpacker23 ( void )
-{
- /* PW_l is still the whole size */
-
-
- Uchar * Amiga_EXE_Header_Block;
-
- OutputSize = PW_l;
-
- /* printf ( "\b\b\b\b\b\b\b\bPowerpacker 2.3 Exe-file found at %ld !. its size is : %ld\n" , PW_Start_Address , OutputSize );*/
- /* OutName[1] = Extensions[Powerpacker23][0];
- OutName[2] = Extensions[Powerpacker23][1];
- OutName[3] = Extensions[Powerpacker23][2];*/
-
- CONVERT = BAD;
-
- if ( Amiga_EXE_Header == BAD )
- {
- OutputSize -= 36;
- Amiga_EXE_Header_Block = (Uchar *) malloc ( 36 );
- BZERO ( Amiga_EXE_Header_Block , 36 );
-
- Amiga_EXE_Header_Block[2] = Amiga_EXE_Header_Block[30] = 0x03;
- Amiga_EXE_Header_Block[3] = 0xF3;
- Amiga_EXE_Header_Block[11] = 0x02;
- Amiga_EXE_Header_Block[19] = 0x01;
- Amiga_EXE_Header_Block[23] = Amiga_EXE_Header_Block[35] = 0x83;
- Amiga_EXE_Header_Block[31] = 0xE9;
-
- Save_Rip_Special ( "Powerpacker 2.3 Exe-file", Powerpacker23, Amiga_EXE_Header_Block , 36 );
- free ( Amiga_EXE_Header_Block );
- }
- else
- {
- PW_Start_Address -= 36;
- Save_Rip ( "Powerpacker 2.3 Exe-file", Powerpacker23 );
- }
-
- if ( Save_Status == GOOD )
- PW_i += (OutputSize - 40); /* 36 should do but call it "just to be sure" :) */
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-
-void Rip_Powerpacker30 ( void )
-{
- /* PW_l is still the whole size */
-
-
- Uchar * Amiga_EXE_Header_Block;
-
- OutputSize = PW_l;
-
- /* printf ( "\b\b\b\b\b\b\b\bPowerpacker 3.0 Exe-file found at %ld !. its size is : %ld\n" , PW_Start_Address , OutputSize );*/
- /* OutName[1] = Extensions[Powerpacker3][0];
- OutName[2] = Extensions[Powerpacker3][1];
- OutName[3] = Extensions[Powerpacker3][2];*/
-
- CONVERT = BAD;
-
- if ( Amiga_EXE_Header == BAD )
- {
- OutputSize -= 36;
- Amiga_EXE_Header_Block = (Uchar *) malloc ( 36 );
- BZERO ( Amiga_EXE_Header_Block , 36 );
-
- Amiga_EXE_Header_Block[2] = Amiga_EXE_Header_Block[30] = 0x03;
- Amiga_EXE_Header_Block[3] = 0xF3;
- Amiga_EXE_Header_Block[11] = 0x02;
- Amiga_EXE_Header_Block[19] = 0x01;
- Amiga_EXE_Header_Block[23] = Amiga_EXE_Header_Block[35] = 0x89;
- Amiga_EXE_Header_Block[31] = 0xE9;
-
- Save_Rip_Special ( "Powerpacker 3.0 Exe-file", Powerpacker3, Amiga_EXE_Header_Block , 36 );
- free ( Amiga_EXE_Header_Block );
- }
- else
- {
- PW_Start_Address -= 36;
- Save_Rip ( "Powerpacker 3.0 Exe-file", Powerpacker3 );
- }
-
- if ( Save_Status == GOOD )
- PW_i += (OutputSize - 40); /* 36 should do but call it "just to be sure" :) */
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Rip_Powerpacker40 ( void )
-{
- /* PW_l is still the whole size */
-
-
- Uchar * Amiga_EXE_Header_Block;
-
- OutputSize = PW_l;
-
- /* printf ( "\b\b\b\b\b\b\b\bPowerpacker 4.0 Exe-file found at %ld !. its size is : %ld\n" , PW_Start_Address , OutputSize );*/
- /* OutName[1] = Extensions[Powerpacker4][0];
- OutName[2] = Extensions[Powerpacker4][1];
- OutName[3] = Extensions[Powerpacker4][2];*/
-
- CONVERT = BAD;
-
- if ( Amiga_EXE_Header == BAD )
- {
- OutputSize -= 36;
- Amiga_EXE_Header_Block = (Uchar *) malloc ( 36 );
- BZERO ( Amiga_EXE_Header_Block , 36 );
-
- Amiga_EXE_Header_Block[2] = Amiga_EXE_Header_Block[30] = 0x03;
- Amiga_EXE_Header_Block[3] = 0xF3;
- Amiga_EXE_Header_Block[11] = 0x02;
- Amiga_EXE_Header_Block[19] = 0x01;
- Amiga_EXE_Header_Block[23] = Amiga_EXE_Header_Block[35] = 0x9E;
- Amiga_EXE_Header_Block[31] = 0xE9;
-
- Save_Rip_Special ( "Powerpacker 4.0 Exe-file", Powerpacker4, Amiga_EXE_Header_Block , 36 );
- free ( Amiga_EXE_Header_Block );
- }
- else
- {
- PW_Start_Address -= 36;
- Save_Rip ( "Powerpacker 4.0 Exe-file", Powerpacker4 );
- }
-
- if ( Save_Status == GOOD )
- PW_i += (OutputSize - 40); /* 36 should do but call it "just to be sure" :) */
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Rip_Powerpacker4lib ( void )
-{
- /* PW_l is still the whole size */
-
- Uchar * Amiga_EXE_Header_Block;
- Uchar * Whatever;
-
- OutputSize = PW_l;
-
- /* printf ( "\b\b\b\b\b\b\b\bPowerpacker 4.0 library Exe-file found at %ld !. its size is : %ld\n" , PW_Start_Address , OutputSize );*/
- /* OutName[1] = Extensions[Powerpacker4][0];
- OutName[2] = Extensions[Powerpacker4][1];
- OutName[3] = Extensions[Powerpacker4][2];*/
-
- CONVERT = BAD;
-
- if ( Amiga_EXE_Header == BAD )
- {
- OutputSize -= 36;
- Amiga_EXE_Header_Block = (Uchar *) malloc ( 36 );
- BZERO ( Amiga_EXE_Header_Block , 36 );
- Amiga_EXE_Header_Block[2] = Amiga_EXE_Header_Block[30] = 0x03;
- Amiga_EXE_Header_Block[3] = 0xF3;
- Amiga_EXE_Header_Block[11] = 0x02;
- Amiga_EXE_Header_Block[19] = 0x01;
- Amiga_EXE_Header_Block[27] = 0x01;
- Amiga_EXE_Header_Block[31] = 0xE9;
-
- /* WARNING !!! WORKS ONLY ON PC !!! */
- /* 68k machines code : c1 = *(Whatever+2); */
- /* 68k machines code : c2 = *(Whatever+3); */
- PW_j = PW_l - 60;
- PW_j /= 4;
- Whatever = (Uchar *) &PW_j;
- Amiga_EXE_Header_Block[20] = Amiga_EXE_Header_Block[32] = *(Whatever+3);
- Amiga_EXE_Header_Block[21] = Amiga_EXE_Header_Block[33] = *(Whatever+2);
- Amiga_EXE_Header_Block[22] = Amiga_EXE_Header_Block[34] = *(Whatever+1);
- Amiga_EXE_Header_Block[23] = Amiga_EXE_Header_Block[35] = *Whatever;
-
- /* also the last 4 bytes could be 'removed' frequently ... Here they are */
- in_data[PW_Start_Address+OutputSize-4] = 0x00;
- in_data[PW_Start_Address+OutputSize-3] = 0x00;
- in_data[PW_Start_Address+OutputSize-2] = 0x03;
- in_data[PW_Start_Address+OutputSize-1] = 0xF2;
-
- Save_Rip_Special ( "Powerpacker 4.0 library Exe-file", Powerpacker4, Amiga_EXE_Header_Block , 36 );
- free ( Amiga_EXE_Header_Block );
- }
- else
- {
- PW_Start_Address -= 36;
- Save_Rip ( "Powerpacker 4.0 library Exe-file", Powerpacker4 );
- }
-
- if ( Save_Status == GOOD )
- PW_i += (OutputSize - 37); /* 36 should do but call it "just to be sure" :) */
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Rip_PP10 ( void )
-{
- /* PW_k is still the size of the track data */
- /* PW_WholeSampleSize is still the sample data size */
-
- OutputSize = PW_WholeSampleSize + PW_k + 762;
-
- /* printf ( "\b\b\b\b\b\b\b\bProPacker v1.0 Exe-file found at %ld !. its size is : %ld\n" , PW_Start_Address , OutputSize );*/
- /* OutName[1] = Extensions[PP10][0];
- OutName[2] = Extensions[PP10][1];
- OutName[3] = Extensions[PP10][2];*/
-
- CONVERT = GOOD;
- Save_Rip ( "ProPacker v1.0 Exe-file", PP10 );
-
- if ( Save_Status == GOOD )
- PW_i += (OutputSize - 4); /* 3 should do but call it "just to be sure" :) */
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Rip_PP21 ( void )
-{
- /* PW_k is still the size of the track "data" ! */
- /* PW_WholeSampleSize is still the whole sample size */
-
- PW_l = (in_data[PW_Start_Address+762+PW_k]*256*256*256)
- +(in_data[PW_Start_Address+763+PW_k]*256*256)
- +(in_data[PW_Start_Address+764+PW_k]*256)
- +in_data[PW_Start_Address+765+PW_k];
-
- OutputSize = PW_WholeSampleSize + PW_k + PW_l + 766;
-
- CONVERT = GOOD;
- Save_Rip ( "ProPacker v2.1 module", Propacker_21 );
-
- if ( Save_Status == GOOD )
- PW_i += (OutputSize - 4); /* 3 should do but call it "just to be sure" :) */
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Rip_PP30 ( void )
-{
- /* PW_k is still the size of the track "data" ! */
- /* PW_WholeSampleSize is still the whole sample size */
-
- PW_l = (in_data[PW_Start_Address+762+PW_k]*256*256*256)
- +(in_data[PW_Start_Address+763+PW_k]*256*256)
- +(in_data[PW_Start_Address+764+PW_k]*256)
- +in_data[PW_Start_Address+765+PW_k];
-
- OutputSize = PW_WholeSampleSize + PW_k + PW_l + 766;
-
- CONVERT = GOOD;
- Save_Rip ( "ProPacker v3.0 module", Propacker_30 );
-
- if ( Save_Status == GOOD )
- PW_i += (OutputSize - 4); /* 3 should do but call it "just to be sure" :) */
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Rip_PPbk ( void )
-{
- /* PW_l is still the whole size */
-
- OutputSize = PW_l;
-
- /* printf ( "\b\b\b\b\b\b\b\bAMOS PowerPacker Bank \"PPbk\" Exe-file found at %ld !. its size is : %ld\n" , PW_Start_Address , OutputSize );*/
- printf ( " extracting PP20 subfile ...\n" );
- /* OutName[1] = Extensions[PP20][0];
- OutName[2] = Extensions[PP20][1];
- OutName[3] = Extensions[PP20][2];*/
-
- CONVERT = BAD;
-
- PW_Start_Address += 16;
- Save_Rip ( "AMOS PowerPacker Bank \"PPbk\" Data-file", PP20 );
-
- if ( Save_Status == GOOD )
- PW_i += (OutputSize - 40); /* 36 should do but call it "just to be sure" :) */
-}
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Rip_PRUN1 ( void )
-{
- PW_WholeSampleSize = 0;
- for ( PW_k=0 ; PW_k<31 ; PW_k++ )
- PW_WholeSampleSize += (((in_data[PW_Start_Address+42+30*PW_k]*256)+in_data[PW_Start_Address+43+30*PW_k])*2);
- PW_l=0;
- for ( PW_k=0 ; PW_k<128 ; PW_k++ )
- if ( in_data[PW_Start_Address+952+PW_k] > PW_l )
- PW_l = in_data[PW_Start_Address+952+PW_k];
- PW_l += 1;
- OutputSize = (PW_l*1024) + 1084 + PW_WholeSampleSize;
- /* printf ( "\b\b\b\b\b\b\b\bProrunner 1 module found at %ld !. its size is : %ld\n" , PW_Start_Address , OutputSize );*/
- /* OutName[1] = Extensions[ProRunner_v1][0];
- OutName[2] = Extensions[ProRunner_v1][1];
- OutName[3] = Extensions[ProRunner_v1][2];*/
-
- CONVERT = GOOD;
- Save_Rip ( "Prorunner 1 module", ProRunner_v1 );
-
- if ( Save_Status == GOOD )
- PW_i += (OutputSize - 1083); /* 1080 could be enough */
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Rip_PRUN2 ( void )
-{
- PW_WholeSampleSize = 0;
- for ( PW_k=0 ; PW_k<31 ; PW_k++ )
- PW_WholeSampleSize += (((in_data[PW_Start_Address+8+PW_k*8]*256)+in_data[PW_Start_Address+9+PW_k*8])*2);
-
- OutputSize = PW_j + PW_WholeSampleSize;
- /* printf ( "\b\b\b\b\b\b\b\bProrunner 2 module found at %ld !. its size is : %ld\n" , PW_Start_Address , OutputSize );*/
- /* OutName[1] = Extensions[ProRunner_v2][0];
- OutName[2] = Extensions[ProRunner_v2][1];
- OutName[3] = Extensions[ProRunner_v2][2];*/
-
- CONVERT = GOOD;
- Save_Rip ( "Prorunner 2 module", ProRunner_v2 );
-
- if ( Save_Status == GOOD )
- PW_i += (OutputSize - 2); /* -1 should do but call it "just to be sure" :) */
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Rip_PTK ( void )
-{
- /* PW_k is still the nbr of pattern */
- /* PW_WholeSampleSize is still the whole sample size */
-
- OutputSize = PW_WholeSampleSize + (PW_k*1024) + 1084;
-
- CONVERT = BAD;
- Save_Rip ( "Protracker module", Protracker );
-
- if ( Save_Status == GOOD )
- PW_i += (OutputSize - 1081); /* 1080 should do but call it "just to be sure" :) */
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Rip_QuadraComposer ( void )
-{
- PW_l = (in_data[PW_Start_Address+4]*256*256*256)+
- (in_data[PW_Start_Address+5]*256*256)+
- (in_data[PW_Start_Address+6]*256)+
- in_data[PW_Start_Address+7];
-
- OutputSize = PW_l + 8;
-
- /* printf ( "\b\b\b\b\b\b\b\bQuadra Composer module found at %ld !. its size is : %ld\n" , PW_Start_Address , OutputSize );*/
- /* OutName[1] = Extensions[QuadraComposer][0];
- OutName[2] = Extensions[QuadraComposer][1];
- OutName[3] = Extensions[QuadraComposer][2];*/
-
- CONVERT = GOOD;
- Save_Rip ( "Quadra Composer module", QuadraComposer );
-
- if ( Save_Status == GOOD )
- PW_i += (OutputSize - 9); /* 8 should do but call it "just to be sure" :) */
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Rip_RelokIt10 ( void )
-{
- /* PW_l is still the whole size */
-
- Uchar * Amiga_EXE_Header_Block;
- Uchar * Whatever;
-
- OutputSize = PW_l;
-
- /* printf ( "\b\b\b\b\b\b\b\bRelokIt 1.0 Exe-file found at %ld !. its size is : %ld\n" , PW_Start_Address , OutputSize );*/
- /* OutName[1] = Extensions[RelokIt][0];
- OutName[2] = Extensions[RelokIt][1];
- OutName[3] = Extensions[RelokIt][2];*/
-
- CONVERT = BAD;
-
- if ( Amiga_EXE_Header == BAD )
- {
- OutputSize -= 36;
- Amiga_EXE_Header_Block = (Uchar *) malloc ( 36 );
- BZERO ( Amiga_EXE_Header_Block , 36 );
- Amiga_EXE_Header_Block[2] = Amiga_EXE_Header_Block[30] = 0x03;
- Amiga_EXE_Header_Block[3] = 0xF3;
- Amiga_EXE_Header_Block[11] = 0x02;
- Amiga_EXE_Header_Block[19] = 0x01;
- Amiga_EXE_Header_Block[27] = 0x01;
- Amiga_EXE_Header_Block[31] = 0xE9;
-
- /* WARNING !!! WORKS ONLY ON PC !!! */
- /* 68k machines code : c1 = *(Whatever+2); */
- /* 68k machines code : c2 = *(Whatever+3); */
- PW_j = PW_l - 204;
- PW_j /= 4;
- Whatever = (Uchar *) &PW_j;
- Amiga_EXE_Header_Block[20] = Amiga_EXE_Header_Block[32] = *(Whatever+3);
- Amiga_EXE_Header_Block[21] = Amiga_EXE_Header_Block[33] = *(Whatever+2);
- Amiga_EXE_Header_Block[22] = Amiga_EXE_Header_Block[34] = *(Whatever+1);
- Amiga_EXE_Header_Block[23] = Amiga_EXE_Header_Block[35] = *Whatever;
-
- /* also the last 16 bytes are 'removed' frequently ... Here they are */
- in_data[PW_Start_Address+OutputSize-16] = 0x00;
- in_data[PW_Start_Address+OutputSize-15] = 0x00;
- in_data[PW_Start_Address+OutputSize-14] = 0x03;
- in_data[PW_Start_Address+OutputSize-13] = 0xF2;
-
- in_data[PW_Start_Address+OutputSize-12] = 0x00;
- in_data[PW_Start_Address+OutputSize-11] = 0x00;
- in_data[PW_Start_Address+OutputSize-10] = 0x03;
- in_data[PW_Start_Address+OutputSize-9] = 0xEB;
-
- in_data[PW_Start_Address+OutputSize-8] = 0x00;
- in_data[PW_Start_Address+OutputSize-7] = 0x00;
- in_data[PW_Start_Address+OutputSize-6] = 0x00;
- in_data[PW_Start_Address+OutputSize-5] = 0x01;
-
- in_data[PW_Start_Address+OutputSize-4] = 0x00;
- in_data[PW_Start_Address+OutputSize-3] = 0x00;
- in_data[PW_Start_Address+OutputSize-2] = 0x03;
- in_data[PW_Start_Address+OutputSize-1] = 0xF2;
-
- Save_Rip_Special ( "RelokIt 1.0 Exe-file", RelokIt, Amiga_EXE_Header_Block , 36 );
- free ( Amiga_EXE_Header_Block );
- }
- else
- {
- PW_Start_Address -= 36;
- Save_Rip ( "RelokIt 1.0 Exe-file", RelokIt );
- }
-
- if ( Save_Status == GOOD )
- PW_i += (OutputSize - 40); /* 36 should do but call it "just to be sure" :) */
-}
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Rip_SKYT ( void )
-{
- /* PW_WholeSampleSize is still the whole sample size */
-
- PW_l=0;
- PW_j = in_data[PW_Start_Address+260]+1;
- for ( PW_k=0 ; PW_k<(PW_j*4) ; PW_k++ )
- {
- PW_m = (in_data[PW_Start_Address+262+PW_k*2]);
- if ( PW_m > PW_l )
- {
- PW_l = PW_m;
- }
- /*printf ( "[%ld]:%ld\n",PW_k,PW_m);*/
- }
- OutputSize = (PW_l*256) + 262 + PW_WholeSampleSize + (PW_j*8);
- /*printf ( "\b\b\b\b\b\b\b\bSKYT Packed module found at %ld !. its size is : %ld\n" , PW_Start_Address , OutputSize );*/
- /* OutName[1] = Extensions[SKYT_packer][0];
- OutName[2] = Extensions[SKYT_packer][1];
- OutName[3] = Extensions[SKYT_packer][2];*/
-
- CONVERT = GOOD;
- Save_Rip ( "SKYT Packed module", SKYT_packer );
-
- if ( Save_Status == GOOD )
- PW_i += (OutputSize - 261); /* 260 could be enough */
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Rip_SoundFX13 ( void )
-{
- /* PW_k is still the nbr of pattern */
- /* PW_WholeSampleSize is the WholeSampleSize :) */
-
- OutputSize = PW_WholeSampleSize + (PW_k*1024) + 0x294;
-
- /*printf ( "\b\b\b\b\b\b\b\bSound FX 1.3 module found at %ld !. its size is : %ld\n" , PW_Start_Address , OutputSize );*/
- /* OutName[1] = Extensions[SoundFX][0];
- OutName[2] = Extensions[SoundFX][1];
- OutName[3] = Extensions[SoundFX][2];*/
-
-#ifdef UNIX
- CONVERT = BAD;
-#else
- CONVERT = GOOD;
-#endif
- Save_Rip ( "Sound FX 1.3 module", SoundFX );
-
- if ( Save_Status == GOOD )
- PW_i += (OutputSize - 0x40); /* 0x3C should do but call it "just to be sure" :) */
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-
-void Rip_SoundTracker ( void )
-{
- /* PW_k is still the nbr of pattern */
- /* PW_WholeSampleSize is still the whole sample size */
-
- OutputSize = PW_WholeSampleSize + (PW_k*1024) + 600;
-
- CONVERT = BAD;
- Save_Rip ( "SoundTracker module", SoundTracker );
-
- if ( Save_Status == GOOD )
- PW_i += 46; /* after 1st volume */
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Rip_SpikeCruncher ( void )
-{
- /* PW_l is still the whole size */
-
-
- Uchar * Amiga_EXE_Header_Block;
-
- OutputSize = PW_l;
-
- /* printf ( "\b\b\b\b\b\b\b\bSpike Cruncher Exe-file found at %ld !. its size is : %ld\n" , PW_Start_Address , OutputSize );*/
- /* OutName[1] = Extensions[SpikeCruncher][0];
- OutName[2] = Extensions[SpikeCruncher][1];
- OutName[3] = Extensions[SpikeCruncher][2];*/
-
- CONVERT = BAD;
-
- if ( Amiga_EXE_Header == BAD )
- {
- OutputSize -= 36;
- Amiga_EXE_Header_Block = (Uchar *) malloc ( 36 );
- BZERO ( Amiga_EXE_Header_Block , 36 );
-
- Amiga_EXE_Header_Block[2] = Amiga_EXE_Header_Block[30] = 0x03;
- Amiga_EXE_Header_Block[3] = 0xF3;
- Amiga_EXE_Header_Block[11] = 0x02;
- Amiga_EXE_Header_Block[19] = 0x01;
- Amiga_EXE_Header_Block[23] = Amiga_EXE_Header_Block[35] = 0x96;
- Amiga_EXE_Header_Block[31] = 0xE9;
-
- Save_Rip_Special ( "Spike Cruncher Exe-file", SpikeCruncher, Amiga_EXE_Header_Block , 36 );
- free ( Amiga_EXE_Header_Block );
- }
- else
- {
- PW_Start_Address -= 36;
- Save_Rip ( "Spike Cruncher Exe-file", SpikeCruncher );
- }
-
- if ( Save_Status == GOOD )
- PW_i += (OutputSize - 40); /* 36 should do but call it "just to be sure" :) */
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Rip_STARPACK ( void )
-{
- /* PW_k is still the sample data address */
- /* PW_WholeSampleSize is the whole sample size already */
-
- OutputSize = PW_WholeSampleSize + PW_k + 0x314;
-
- CONVERT = GOOD;
- Save_Rip ( "StarTrekker Packer module", Star_pack );
-
- if ( Save_Status == GOOD )
- PW_i += 24; /* 23 after 1st vol */
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Rip_StarTrekker ( void )
-{
- /* PW_k is still the nbr of pattern */
- /* PW_WholeSampleSize is still the whole sample size */
-
- OutputSize = PW_WholeSampleSize + (PW_k*1024) + 1084;
-
- CONVERT = BAD;
- Save_Rip ( "StarTrekker module", StarTrekker );
-
- if ( Save_Status == GOOD )
- PW_i += 1081; /* after header */
-}
-
+++ /dev/null
-#ifdef DOS
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Rip_StoneCracker270 ( void )
-{
- /* PW_l is still the whole size */
-
- Uchar * Amiga_EXE_Header_Block;
- Uchar * Whatever;
-
- OutputSize = PW_l;
-
- /* printf ( "\b\b\b\b\b\b\b\bStoneCracker 2.70 Exe-file found at %ld !. its size is : %ld\n" , PW_Start_Address , OutputSize );*/
- /* OutName[1] = Extensions[S404][0];
- OutName[2] = Extensions[S404][1];
- OutName[3] = Extensions[S404][2];*/
-
- CONVERT = BAD;
-
- if ( Amiga_EXE_Header == BAD )
- {
- OutputSize -= 32;
- Amiga_EXE_Header_Block = (Uchar *) malloc ( 32 );
- BZERO ( Amiga_EXE_Header_Block , 32 );
- Amiga_EXE_Header_Block[2] = Amiga_EXE_Header_Block[26] = 0x03;
- Amiga_EXE_Header_Block[3] = 0xF3;
- Amiga_EXE_Header_Block[11] = 0x01;
- Amiga_EXE_Header_Block[27] = 0xE9;
-
- /* WARNING !!! WORKS ONLY ON PC !!! */
- /* 68k machines code : c1 = *(Whatever+2); */
- /* 68k machines code : c2 = *(Whatever+3); */
- PW_j = PW_l - 36;
- PW_j /= 4;
- Whatever = (Uchar *) &PW_j;
- Amiga_EXE_Header_Block[20] = Amiga_EXE_Header_Block[28] = *(Whatever+3);
- Amiga_EXE_Header_Block[21] = Amiga_EXE_Header_Block[29] = *(Whatever+2);
- Amiga_EXE_Header_Block[22] = Amiga_EXE_Header_Block[30] = *(Whatever+1);
- Amiga_EXE_Header_Block[23] = Amiga_EXE_Header_Block[31] = *Whatever;
- Save_Rip_Special ( "StoneCracker 2.70 Exe-file", StoneCracker270, Amiga_EXE_Header_Block , 32 );
- free ( Amiga_EXE_Header_Block );
- }
- else
- {
- PW_Start_Address -= 32;
- Save_Rip ( "StoneCracker 2.70 Exe-file", StoneCracker270 );
- }
-
- if ( Save_Status == GOOD )
- PW_i += (OutputSize - 36); /* 32 should do but call it "just to be sure" :) */
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Rip_STC299 ( void )
-{
- /* PW_l is still the whole size */
-
- Uchar * Amiga_EXE_Header_Block;
- Uchar * Whatever;
-
- OutputSize = PW_l;
-
- CONVERT = BAD;
-
- if ( Amiga_EXE_Header == BAD )
- {
- OutputSize -= 32;
- Amiga_EXE_Header_Block = (Uchar *) malloc ( 32 );
- BZERO ( Amiga_EXE_Header_Block , 32 );
- Amiga_EXE_Header_Block[2] = Amiga_EXE_Header_Block[26] = 0x03;
- Amiga_EXE_Header_Block[3] = 0xF3;
- Amiga_EXE_Header_Block[11] = 0x01;
- Amiga_EXE_Header_Block[27] = 0xE9;
-
- /* WARNING !!! WORKS ONLY ON PC !!! */
- /* 68k machines code : c1 = *(Whatever+2); */
- /* 68k machines code : c2 = *(Whatever+3); */
- PW_j = PW_l - 36;
- PW_j /= 4;
- Whatever = (Uchar *) &PW_j;
- Amiga_EXE_Header_Block[20] = Amiga_EXE_Header_Block[28] = *(Whatever+3);
- Amiga_EXE_Header_Block[21] = Amiga_EXE_Header_Block[29] = *(Whatever+2);
- Amiga_EXE_Header_Block[22] = Amiga_EXE_Header_Block[30] = *(Whatever+1);
- Amiga_EXE_Header_Block[23] = Amiga_EXE_Header_Block[31] = *Whatever;
- Save_Rip_Special ( "StoneCracker 2.99 Exe-file", STC299, Amiga_EXE_Header_Block , 32 );
- free ( Amiga_EXE_Header_Block );
- }
- else
- {
- PW_Start_Address -= 32;
- Save_Rip ( "StoneCracker 2.99 Exe-file", STC299 );
- }
-
- if ( Save_Status == GOOD )
- PW_i += 348;
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Rip_STC299b ( void )
-{
- /* PW_l is still the whole size */
-
- Uchar * Amiga_EXE_Header_Block;
- Uchar * Whatever;
-
- OutputSize = PW_l;
-
- CONVERT = BAD;
-
- if ( Amiga_EXE_Header == BAD )
- {
- OutputSize -= 32;
- Amiga_EXE_Header_Block = (Uchar *) malloc ( 32 );
- BZERO ( Amiga_EXE_Header_Block , 32 );
- Amiga_EXE_Header_Block[2] = Amiga_EXE_Header_Block[26] = 0x03;
- Amiga_EXE_Header_Block[3] = 0xF3;
- Amiga_EXE_Header_Block[11] = 0x01;
- Amiga_EXE_Header_Block[27] = 0xE9;
-
- /* WARNING !!! WORKS ONLY ON PC !!! */
- /* 68k machines code : c1 = *(Whatever+2); */
- /* 68k machines code : c2 = *(Whatever+3); */
- PW_j = PW_l - 36;
- PW_j /= 4;
- Whatever = (Uchar *) &PW_j;
- Amiga_EXE_Header_Block[20] = Amiga_EXE_Header_Block[28] = *(Whatever+3);
- Amiga_EXE_Header_Block[21] = Amiga_EXE_Header_Block[29] = *(Whatever+2);
- Amiga_EXE_Header_Block[22] = Amiga_EXE_Header_Block[30] = *(Whatever+1);
- Amiga_EXE_Header_Block[23] = Amiga_EXE_Header_Block[31] = *Whatever;
- Save_Rip_Special ( "StoneCracker 2.99b Exe-file", STC299b, Amiga_EXE_Header_Block , 32 );
- free ( Amiga_EXE_Header_Block );
- }
- else
- {
- PW_Start_Address -= 32;
- Save_Rip ( "StoneCracker 2.99b Exe-file", STC299b );
- }
-
- if ( Save_Status == GOOD )
- PW_i += 344;
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Rip_STC299d ( void )
-{
- /* PW_l is still the whole size */
-
- Uchar * Amiga_EXE_Header_Block;
- Uchar * Whatever;
-
- OutputSize = PW_l;
-
- CONVERT = BAD;
-
- if ( Amiga_EXE_Header == BAD )
- {
- OutputSize -= 32;
- Amiga_EXE_Header_Block = (Uchar *) malloc ( 32 );
- BZERO ( Amiga_EXE_Header_Block , 32 );
- Amiga_EXE_Header_Block[2] = Amiga_EXE_Header_Block[26] = 0x03;
- Amiga_EXE_Header_Block[3] = 0xF3;
- Amiga_EXE_Header_Block[11] = 0x01;
- Amiga_EXE_Header_Block[27] = 0xE9;
-
- /* WARNING !!! WORKS ONLY ON PC !!! */
- /* 68k machines code : c1 = *(Whatever+2); */
- /* 68k machines code : c2 = *(Whatever+3); */
- PW_j = PW_l - 36;
- PW_j /= 4;
- Whatever = (Uchar *) &PW_j;
- Amiga_EXE_Header_Block[20] = Amiga_EXE_Header_Block[28] = *(Whatever+3);
- Amiga_EXE_Header_Block[21] = Amiga_EXE_Header_Block[29] = *(Whatever+2);
- Amiga_EXE_Header_Block[22] = Amiga_EXE_Header_Block[30] = *(Whatever+1);
- Amiga_EXE_Header_Block[23] = Amiga_EXE_Header_Block[31] = *Whatever;
- Save_Rip_Special ( "StoneCracker 2.99d Exe-file", STC299d, Amiga_EXE_Header_Block , 32 );
- free ( Amiga_EXE_Header_Block );
- }
- else
- {
- PW_Start_Address -= 32;
- Save_Rip ( "StoneCracker 2.99d Exe-file", STC299d );
- }
-
- if ( Save_Status == GOOD )
- PW_i += 340;
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Rip_STC300 ( void )
-{
- /* PW_l is still the whole size */
-
- Uchar * Amiga_EXE_Header_Block;
- Uchar * Whatever;
-
- OutputSize = PW_l;
-
- CONVERT = BAD;
-
- if ( Amiga_EXE_Header == BAD )
- {
- OutputSize -= 32;
- Amiga_EXE_Header_Block = (Uchar *) malloc ( 32 );
- BZERO ( Amiga_EXE_Header_Block , 32 );
- Amiga_EXE_Header_Block[2] = Amiga_EXE_Header_Block[26] = 0x03;
- Amiga_EXE_Header_Block[3] = 0xF3;
- Amiga_EXE_Header_Block[11] = 0x01;
- Amiga_EXE_Header_Block[27] = 0xE9;
-
- /* WARNING !!! WORKS ONLY ON PC !!! */
- /* 68k machines code : c1 = *(Whatever+2); */
- /* 68k machines code : c2 = *(Whatever+3); */
- PW_j = PW_l - 36;
- PW_j /= 4;
- Whatever = (Uchar *) &PW_j;
- Amiga_EXE_Header_Block[20] = Amiga_EXE_Header_Block[28] = *(Whatever+3);
- Amiga_EXE_Header_Block[21] = Amiga_EXE_Header_Block[29] = *(Whatever+2);
- Amiga_EXE_Header_Block[22] = Amiga_EXE_Header_Block[30] = *(Whatever+1);
- Amiga_EXE_Header_Block[23] = Amiga_EXE_Header_Block[31] = *Whatever;
- Save_Rip_Special ( "StoneCracker 3.00 Exe-file", STC300, Amiga_EXE_Header_Block , 32 );
- free ( Amiga_EXE_Header_Block );
- }
- else
- {
- PW_Start_Address -= 32;
- Save_Rip ( "StoneCracker 3.00 Exe-file", STC300 );
- }
-
- if ( Save_Status == GOOD )
- PW_i += 336; /* beside the S300 tag */
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Rip_STC310 ( void )
-{
- /* PW_l is still the whole size */
-
- Uchar * Amiga_EXE_Header_Block;
- Uchar * Whatever;
-
- OutputSize = PW_l;
-
- CONVERT = BAD;
-
- if ( Amiga_EXE_Header == BAD )
- {
- OutputSize -= 32;
- Amiga_EXE_Header_Block = (Uchar *) malloc ( 32 );
- BZERO ( Amiga_EXE_Header_Block , 32 );
- Amiga_EXE_Header_Block[2] = Amiga_EXE_Header_Block[26] = 0x03;
- Amiga_EXE_Header_Block[3] = 0xF3;
- Amiga_EXE_Header_Block[11] = 0x01;
- Amiga_EXE_Header_Block[27] = 0xE9;
-
- /* WARNING !!! WORKS ONLY ON PC !!! */
- /* 68k machines code : c1 = *(Whatever+2); */
- /* 68k machines code : c2 = *(Whatever+3); */
- PW_j = PW_l - 36;
- PW_j /= 4;
- Whatever = (Uchar *) &PW_j;
- Amiga_EXE_Header_Block[20] = Amiga_EXE_Header_Block[28] = *(Whatever+3);
- Amiga_EXE_Header_Block[21] = Amiga_EXE_Header_Block[29] = *(Whatever+2);
- Amiga_EXE_Header_Block[22] = Amiga_EXE_Header_Block[30] = *(Whatever+1);
- Amiga_EXE_Header_Block[23] = Amiga_EXE_Header_Block[31] = *Whatever;
- Save_Rip_Special ( "StoneCracker 3.10 Exe-file", STC310, Amiga_EXE_Header_Block , 32 );
- free ( Amiga_EXE_Header_Block );
- }
- else
- {
- PW_Start_Address -= 32;
- Save_Rip ( "StoneCracker 3.10 Exe-file", STC310 );
- }
-
- if ( Save_Status == GOOD )
- PW_i += 520; /* beside the S310 tag */
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Rip_STIM ( void )
-{
- OutputSize = PW_WholeSampleSize + PW_j + 31*4 + 31*8;
-
- /* printf ( "\b\b\b\b\b\b\b\bSTIM (Slamtilt) module found at %ld !. its size is : %ld\n" , PW_Start_Address , OutputSize );*/
- /* OutName[1] = Extensions[STIM][0];
- OutName[2] = Extensions[STIM][1];
- OutName[3] = Extensions[STIM][2];*/
-
- CONVERT = GOOD;
- Save_Rip ( "STIM (Slamtilt) module", STIM );
-
- if ( Save_Status == GOOD )
- PW_i += (OutputSize - 1); /* 0 should do but call it "just to be sure" :) */
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Rip_STK26 ( void )
-{
- /* PW_WholeSampleSize is the whole sample siz */
- OutputSize = (in_data[PW_Start_Address+951]*256) + 1468 + PW_WholeSampleSize;
-
- CONVERT = GOOD;
- if ( in_data[PW_Start_Address+1464] == 'M' )
- {
- /* OutName[1] = Extensions[STK26][0];
- OutName[2] = Extensions[STK26][1];
- OutName[3] = Extensions[STK26][2];*/
- Save_Rip ( "Sountracker 2.6 module", STK26 );
- /* printf ( "\b\b\b\b\b\b\b\bSountracker 2.6 module found at %ld !. its size is : %ld\n" , PW_Start_Address , OutputSize );*/
- }
- else
- {
- /* OutName[1] = Extensions[IceTracker][0];
- OutName[2] = Extensions[IceTracker][1];
- OutName[3] = Extensions[IceTracker][2];*/
- Save_Rip ( "IceTracker 1.0 modul", IceTracker );
- /* printf ( "\b\b\b\b\b\b\b\bIceTracker 1.0 module found at %ld !. its size is : %ld\n" , PW_Start_Address , OutputSize );*/
- }
-
-
- if ( Save_Status == GOOD )
- PW_i += (OutputSize - 1470); /* 1464 should do but call it "just to be sure" :) */
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Rip_SuperCruncher27 ( void )
-{
- /* PW_l is still the whole size */
-
- Uchar * Amiga_EXE_Header_Block;
-
- OutputSize = PW_l;
-
- /* printf ( "\b\b\b\b\b\b\b\bSuper Cruncher 2.7 Exe-file found at %ld !. its size is : %ld\n" , PW_Start_Address , OutputSize );*/
- /* OutName[1] = Extensions[SuperCruncher][0];
- OutName[2] = Extensions[SuperCruncher][1];
- OutName[3] = Extensions[SuperCruncher][2];*/
-
- CONVERT = BAD;
-
- if ( Amiga_EXE_Header == BAD )
- {
- OutputSize -= 36;
- Amiga_EXE_Header_Block = (Uchar *) malloc ( 36 );
- BZERO ( Amiga_EXE_Header_Block , 36 );
- Amiga_EXE_Header_Block[2] = Amiga_EXE_Header_Block[30] = 0x03;
- Amiga_EXE_Header_Block[3] = 0xF3;
- Amiga_EXE_Header_Block[11] = 0x02;
- Amiga_EXE_Header_Block[19] = 0x01;
- Amiga_EXE_Header_Block[23] = Amiga_EXE_Header_Block[35] = 0xA8;
- Amiga_EXE_Header_Block[31] = 0xE9;
-
- Amiga_EXE_Header_Block[24] = in_data[PW_Start_Address+680];
- Amiga_EXE_Header_Block[25] = in_data[PW_Start_Address+681];
- Amiga_EXE_Header_Block[26] = in_data[PW_Start_Address+682];
- Amiga_EXE_Header_Block[27] = in_data[PW_Start_Address+683];
-
- /* also the last 4 bytes are 'removed' frequently ... Here they are */
- in_data[PW_Start_Address+OutputSize-4] = 0x00;
- in_data[PW_Start_Address+OutputSize-3] = 0x00;
- in_data[PW_Start_Address+OutputSize-2] = 0x03;
- in_data[PW_Start_Address+OutputSize-1] = 0xF2;
-
- Save_Rip_Special ( "Super Cruncher 2.7 Exe-file", SuperCruncher, Amiga_EXE_Header_Block , 36 );
- free ( Amiga_EXE_Header_Block );
- }
- else
- {
- PW_Start_Address -= 36;
- Save_Rip ( "Super Cruncher 2.7 Exe-file", SuperCruncher );
- }
-
- if ( Save_Status == GOOD )
- PW_i += (OutputSize - 40); /* 36 should do but call it "just to be sure" :) */
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Rip_SyncroPacker ( void )
-{
- /* PW_l is still the whole size */
-
- Uchar * Amiga_EXE_Header_Block;
- Uchar * Whatever;
-
- OutputSize = PW_l;
-
- /* printf ( "\b\b\b\b\b\b\b\bSyncro Packer 4.6 Exe-file found at %ld !. its size is : %ld\n" , PW_Start_Address , OutputSize );*/
- /* OutName[1] = Extensions[SyncroPacker][0];
- OutName[2] = Extensions[SyncroPacker][1];
- OutName[3] = Extensions[SyncroPacker][2];*/
-
- CONVERT = BAD;
-
- if ( Amiga_EXE_Header == BAD )
- {
- OutputSize -= 32;
- Amiga_EXE_Header_Block = (Uchar *) malloc ( 32 );
- BZERO ( Amiga_EXE_Header_Block , 32 );
- Amiga_EXE_Header_Block[2] = Amiga_EXE_Header_Block[26] = 0x03;
- Amiga_EXE_Header_Block[3] = 0xF3;
- Amiga_EXE_Header_Block[11] = 0x01;
- Amiga_EXE_Header_Block[27] = 0xE9;
-
- /* WARNING !!! WORKS ONLY ON PC !!! */
- /* 68k machines code : c1 = *(Whatever+2); */
- /* 68k machines code : c2 = *(Whatever+3); */
- PW_j = PW_l - 36;
- PW_j /= 4;
- Whatever = (Uchar *) &PW_j;
- Amiga_EXE_Header_Block[20] = Amiga_EXE_Header_Block[28] = *(Whatever+3);
- Amiga_EXE_Header_Block[21] = Amiga_EXE_Header_Block[29] = *(Whatever+2);
- Amiga_EXE_Header_Block[22] = Amiga_EXE_Header_Block[30] = *(Whatever+1);
- Amiga_EXE_Header_Block[23] = Amiga_EXE_Header_Block[31] = *Whatever;
-
- Save_Rip_Special ( "Syncro Packer 4.6 Exe-file", SyncroPacker, Amiga_EXE_Header_Block , 32 );
- free ( Amiga_EXE_Header_Block );
- }
- else
- {
- PW_Start_Address -= 32;
- Save_Rip ( "Syncro Packer 4.6 Exe-file", SyncroPacker );
- }
-
- if ( Save_Status == GOOD )
- PW_i += (OutputSize - 100); /* 32 should do but call it "just to be sure" :) */
-}
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Rip_TheDarkDemon ( void )
-{
- /* PW_WholeSampleSize is the WholeSampleSize + pattern data size */
-
- /* 564 = header */
- OutputSize = PW_WholeSampleSize + 564;
-
- /* printf ( "\b\b\b\b\b\b\b\bThe Dark Demon module found at %ld !. its size is : %ld\n" , PW_Start_Address , OutputSize );*/
- /* OutName[1] = Extensions[TDD][0];
- OutName[2] = Extensions[TDD][1];
- OutName[3] = Extensions[TDD][2];*/
-
- CONVERT = GOOD;
- Save_Rip ( "The Dark Demon module", TDD );
-
- if ( Save_Status == GOOD )
- PW_i += (OutputSize - 140); /* 137 should do but call it "just to be sure" :) */
-}
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Rip_TimeCruncher17 ( void )
-{
- /* PW_l is still the whole size */
-
- Uchar * Amiga_EXE_Header_Block;
- Uchar * Whatever;
-
- OutputSize = PW_l;
-
- /* printf ( "\b\b\b\b\b\b\b\bTime Cruncher 1.7 Exe-file found at %ld !. its size is : %ld\n" , PW_Start_Address , OutputSize );*/
- /* OutName[1] = Extensions[TimeCruncher][0];
- OutName[2] = Extensions[TimeCruncher][1];
- OutName[3] = Extensions[TimeCruncher][2];*/
-
- CONVERT = BAD;
-
- if ( Amiga_EXE_Header == BAD )
- {
- OutputSize -= 36;
- Amiga_EXE_Header_Block = (Uchar *) malloc ( 36 );
- BZERO ( Amiga_EXE_Header_Block , 36 );
- Amiga_EXE_Header_Block[2] = Amiga_EXE_Header_Block[30] = 0x03;
- Amiga_EXE_Header_Block[3] = 0xF3;
- Amiga_EXE_Header_Block[11] = 0x02;
- Amiga_EXE_Header_Block[19] = 0x01;
- Amiga_EXE_Header_Block[27] = 0x01;
- Amiga_EXE_Header_Block[31] = 0xE9;
-
- /* WARNING !!! WORKS ONLY ON PC !!! */
- /* 68k machines code : c1 = *(Whatever+2); */
- /* 68k machines code : c2 = *(Whatever+3); */
- PW_j = PW_l - 60;
- PW_j /= 4;
- Whatever = (Uchar *) &PW_j;
- Amiga_EXE_Header_Block[20] = Amiga_EXE_Header_Block[32] = *(Whatever+3);
- Amiga_EXE_Header_Block[21] = Amiga_EXE_Header_Block[33] = *(Whatever+2);
- Amiga_EXE_Header_Block[22] = Amiga_EXE_Header_Block[34] = *(Whatever+1);
- Amiga_EXE_Header_Block[23] = Amiga_EXE_Header_Block[35] = *Whatever;
-
- /* also the last 24 bytes are 'removed' frequently ... Here they are */
- in_data[PW_Start_Address+OutputSize-24] = 0x00;
- in_data[PW_Start_Address+OutputSize-23] = 0x00;
- in_data[PW_Start_Address+OutputSize-22] = 0x03;
- in_data[PW_Start_Address+OutputSize-21] = 0xEC;
-
- in_data[PW_Start_Address+OutputSize-20] = 0x00;
- in_data[PW_Start_Address+OutputSize-19] = 0x00;
- in_data[PW_Start_Address+OutputSize-18] = 0x00;
- in_data[PW_Start_Address+OutputSize-17] = 0x00;
-
- in_data[PW_Start_Address+OutputSize-16] = 0x00;
- in_data[PW_Start_Address+OutputSize-15] = 0x00;
- in_data[PW_Start_Address+OutputSize-14] = 0x03;
- in_data[PW_Start_Address+OutputSize-13] = 0xF2;
-
- in_data[PW_Start_Address+OutputSize-12] = 0x00;
- in_data[PW_Start_Address+OutputSize-11] = 0x00;
- in_data[PW_Start_Address+OutputSize-10] = 0x03;
- in_data[PW_Start_Address+OutputSize-9] = 0xEB;
-
- in_data[PW_Start_Address+OutputSize-8] = 0x00;
- in_data[PW_Start_Address+OutputSize-7] = 0x00;
- in_data[PW_Start_Address+OutputSize-6] = 0x00;
- in_data[PW_Start_Address+OutputSize-5] = 0x01;
-
- in_data[PW_Start_Address+OutputSize-4] = 0x00;
- in_data[PW_Start_Address+OutputSize-3] = 0x00;
- in_data[PW_Start_Address+OutputSize-2] = 0x03;
- in_data[PW_Start_Address+OutputSize-1] = 0xF2;
-
- Save_Rip_Special ( "Time Cruncher 1.7 Exe-file", TimeCruncher, Amiga_EXE_Header_Block , 36 );
- free ( Amiga_EXE_Header_Block );
- }
- else
- {
- PW_Start_Address -= 36;
- Save_Rip ( "Time Cruncher 1.7 Exe-file", TimeCruncher );
- }
-
- if ( Save_Status == GOOD )
- PW_i += (OutputSize - 42); /* 36 should do but call it "just to be sure" :) */
-}
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Rip_TNMCruncher11 ( void )
-{
- /* PW_l is still the whole size */
- /* PW_m is the decrunched size (necessary to rebuild header) */
-
- Uchar * Amiga_EXE_Header_Block;
- Uchar * Whatever;
-
- OutputSize = PW_l;
-
- /* printf ( "\b\b\b\b\b\b\b\bTNM Cruncher 1.1 Exe-file found at %ld !. its size is : %ld\n" , PW_Start_Address , OutputSize );*/
- /* OutName[1] = Extensions[TNMCruncher][0];
- OutName[2] = Extensions[TNMCruncher][1];
- OutName[3] = Extensions[TNMCruncher][2];*/
-
- CONVERT = BAD;
-
- if ( Amiga_EXE_Header == BAD )
- {
- OutputSize -= 40;
- Amiga_EXE_Header_Block = (Uchar *) malloc ( 40 );
- BZERO ( Amiga_EXE_Header_Block , 40 );
- Amiga_EXE_Header_Block[2] = Amiga_EXE_Header_Block[34] = 0x03;
- Amiga_EXE_Header_Block[3] = 0xF3;
- Amiga_EXE_Header_Block[11] = 0x03;
- Amiga_EXE_Header_Block[19] = 0x02;
- Amiga_EXE_Header_Block[23] = Amiga_EXE_Header_Block[39] = 0x9B;
- Amiga_EXE_Header_Block[35] = 0xE9;
-
- /* WARNING !!! WORKS ONLY ON PC !!! */
- /* 68k machines code : c1 = *(Whatever+2); */
- /* 68k machines code : c2 = *(Whatever+3); */
- PW_j = PW_l - 680;
- PW_j /= 4;
- Whatever = (Uchar *) &PW_j;
- Amiga_EXE_Header_Block[24] = *(Whatever+3);
- Amiga_EXE_Header_Block[25] = *(Whatever+2);
- Amiga_EXE_Header_Block[26] = *(Whatever+1);
- Amiga_EXE_Header_Block[27] = *Whatever;
- PW_j = PW_m / 4;
- Whatever = (Uchar *) &PW_j;
- Amiga_EXE_Header_Block[28] = *(Whatever+3);
- Amiga_EXE_Header_Block[29] = *(Whatever+2);
- Amiga_EXE_Header_Block[30] = *(Whatever+1);
- Amiga_EXE_Header_Block[31] = *Whatever;
-
- /* also the last 12 bytes are 'removed' frequently ... Here they are */
- in_data[PW_Start_Address+OutputSize-12] = 0x00;
- in_data[PW_Start_Address+OutputSize-11] = 0x00;
- in_data[PW_Start_Address+OutputSize-10] = 0x03;
- in_data[PW_Start_Address+OutputSize-9] = 0xEB;
-
- in_data[PW_Start_Address+OutputSize-8] = *(Whatever+3);
- in_data[PW_Start_Address+OutputSize-7] = *(Whatever+2);
- in_data[PW_Start_Address+OutputSize-6] = *(Whatever+1);
- in_data[PW_Start_Address+OutputSize-5] = *Whatever;
-
- in_data[PW_Start_Address+OutputSize-4] = 0x00;
- in_data[PW_Start_Address+OutputSize-3] = 0x00;
- in_data[PW_Start_Address+OutputSize-2] = 0x03;
- in_data[PW_Start_Address+OutputSize-1] = 0xF2;
-
- Save_Rip_Special ( "TNM Cruncher 1.1 Exe-file", TNMCruncher, Amiga_EXE_Header_Block , 40 );
- free ( Amiga_EXE_Header_Block );
- }
- else
- {
- PW_Start_Address -= 40;
- Save_Rip ( "TNM Cruncher 1.1 Exe-file", TNMCruncher );
- }
-
- if ( Save_Status == GOOD )
- PW_i += (OutputSize - 44); /* 40 should do but call it "just to be sure" :) */
-}
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Rip_TP1 ( void )
-{
- /* PW_WholeSampleSize is the size of the module :) */
-
- OutputSize = PW_WholeSampleSize;
- /* printf ( "\b\b\b\b\b\b\b\bTracker Packer v1 module found at %ld !. its size is : %ld\n" , PW_Start_Address , OutputSize );*/
- /* OutName[1] = Extensions[TP1][0];
- OutName[2] = Extensions[TP1][1];
- OutName[3] = Extensions[TP1][2];*/
-
- CONVERT = GOOD;
- Save_Rip ( "Tracker Packer v1 module", TP1 );
-
- if ( Save_Status == GOOD )
- PW_i += (OutputSize - 1); /* 0 could be enough */
-}
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Rip_TP2 ( void )
-{
- /* PW_j is the size of the pattern list */
- /* PW_l is the number of sample */
- /* PW_WholeSampleSize is the sample data size */
-
-
- PW_m=0;
- for ( PW_k=0 ; PW_k<PW_j ; PW_k++ )
- {
- PW_o = (in_data[PW_Start_Address+PW_l*8+32+PW_k*2]*256)+in_data[PW_Start_Address+PW_l*8+33+PW_k*2];
- if ( PW_o > PW_m )
- PW_m = PW_o;
- }
- /* PW_m is the highest pattern number */
- PW_m += 8;
- /* PW_m is now the size of the track table list */
- PW_n = 0;
-/*printf ( "highest pattern : %ld (%x)\n" , PW_m , PW_m );*/
- for ( PW_k=0 ; PW_k<(PW_m/2) ; PW_k++ )
- {
- PW_o = (in_data[PW_Start_Address+PW_l*8+32+PW_j*2+PW_k*2]*256)+in_data[PW_Start_Address+PW_l*8+33+PW_j*2+PW_k*2];
-/*printf ( "%4x, " , PW_o );*/
- if ( PW_o > PW_n )
- PW_n = PW_o;
- }
-/*printf ( "\nhighest : %ld (%x)\n" , PW_n , PW_n );*/
-/*printf ( "track data address : %ld (%x)\n" , (34+8*PW_l+2*PW_j+PW_m ),(34+8*PW_l+2*PW_j+PW_m));*/
- PW_n += (34+8*PW_l+2*PW_j+PW_m);
-/*printf ( "address of last track : %ld\n" , PW_n );*/
- OutputSize = PW_n;
-
-
- /* all vars are availlable now, save PW_WholeSampleSize */
-
- /* now counting size of the last pattern ... pfiew .. */
- PW_l = 0;
- for ( PW_j=0 ; PW_j<64 ; PW_j++ )
- {
-/*printf ( "%ld," , PW_l );*/
- if ( (in_data[PW_Start_Address+PW_n+PW_l]&0xC0 ) == 0xC0 )
- {
- PW_j += (0x100-in_data[PW_Start_Address+PW_n+PW_l]);
- PW_j -= 1;
- PW_l += 1;
- continue;
- }
- if ( (in_data[PW_Start_Address+PW_n+PW_l]&0xC0 ) == 0x80 )
- {
- PW_l += 2;
- continue;
- }
- PW_l += 1;
- if ( (in_data[PW_Start_Address+PW_n+PW_l]&0x0F ) == 0x00 )
- {
- PW_l += 1;
- continue;
- }
- PW_l += 2;
- }
-/*printf ( "\nsize of the last track : %ld\n" , PW_l );*/
-
- OutputSize += PW_WholeSampleSize + PW_l;
- /* printf ( "\b\b\b\b\b\b\b\bTracker Packer v2 module found at %ld !. its size is : %ld\n" , PW_Start_Address , OutputSize );*/
- /* OutName[1] = Extensions[TP2][0];
- OutName[2] = Extensions[TP2][1];
- OutName[3] = Extensions[TP2][2];*/
-
- CONVERT = GOOD;
- Save_Rip ( "Tracker Packer v2 module", TP2 );
-
- if ( Save_Status == GOOD )
- PW_i += (OutputSize - 1); /* 0 could be enough */
-}
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Rip_TP3 ( void )
-{
- /* PW_j is the size of the pattern list */
- /* PW_l is the number of sample */
- /* PW_WholeSampleSize is the sample data size */
-
-
- PW_m=0;
- for ( PW_k=0 ; PW_k<PW_j ; PW_k++ )
- {
- PW_o = (in_data[PW_Start_Address+PW_l*8+32+PW_k*2]*256)+in_data[PW_Start_Address+PW_l*8+33+PW_k*2];
- if ( PW_o > PW_m )
- PW_m = PW_o;
- }
- /* PW_m is the highest pattern number */
- PW_m += 8;
- /* PW_m is now the size of the track table list */
- PW_n = 0;
-/*printf ( "highest pattern : %ld (%x)\n" , PW_m , PW_m );*/
- for ( PW_k=0 ; PW_k<(PW_m/2) ; PW_k++ )
- {
- PW_o = (in_data[PW_Start_Address+PW_l*8+32+PW_j*2+PW_k*2]*256)+in_data[PW_Start_Address+PW_l*8+33+PW_j*2+PW_k*2];
-/*printf ( "%4x, " , PW_o );*/
- if ( PW_o > PW_n )
- PW_n = PW_o;
- }
-/*printf ( "\nhighest : %ld (%x)\n" , PW_n , PW_n );*/
-/*printf ( "track data address : %ld (%x)\n" , (34+8*PW_l+2*PW_j+PW_m ),(34+8*PW_l+2*PW_j+PW_m));*/
- PW_n += (34+8*PW_l+2*PW_j+PW_m);
-/*printf ( "address of last track : %ld\n" , PW_n );*/
- OutputSize = PW_n;
-
-
- /* all vars are availlable now, save PW_WholeSampleSize */
-
- /* now counting size of the last pattern ... pfiew .. */
- PW_l = 0;
- for ( PW_j=0 ; PW_j<64 ; PW_j++ )
- {
-/*printf ( "%ld," , PW_l );*/
- if ( (in_data[PW_Start_Address+PW_n+PW_l]&0xC0 ) == 0xC0 )
- {
- PW_j += (0x100-in_data[PW_Start_Address+PW_n+PW_l]);
- PW_j -= 1;
- PW_l += 1;
- continue;
- }
- if ( (in_data[PW_Start_Address+PW_n+PW_l]&0xC0 ) == 0x80 )
- {
- PW_l += 2;
- continue;
- }
- PW_l += 1;
- if ( (in_data[PW_Start_Address+PW_n+PW_l]&0x0F ) == 0x00 )
- {
- PW_l += 1;
- continue;
- }
- PW_l += 2;
- }
-/*printf ( "\nsize of the last track : %ld\n" , PW_l );*/
-
- OutputSize += PW_l + 2; /* +2 for $0000 at the end .. */
- if ( ((OutputSize/2)*2) != OutputSize )
- OutputSize += 1;
- OutputSize += PW_WholeSampleSize;
- /* printf ( "\b\b\b\b\b\b\b\bTracker Packer v3 module found at %ld !. its size is : %ld\n" , PW_Start_Address , OutputSize );*/
- /* OutName[1] = Extensions[TP3][0];
- OutName[2] = Extensions[TP3][1];
- OutName[3] = Extensions[TP3][2];*/
-
- CONVERT = GOOD;
- Save_Rip ( "Tracker Packer v3 module", TP3 );
-
- if ( Save_Status == GOOD )
- PW_i += (OutputSize - 1); /* 0 could be enough */
-}
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Rip_Tetrapack102 ( void )
-{
- /* PW_l is still the whole size */
-
- Uchar * Amiga_EXE_Header_Block;
- Uchar * Whatever;
-
- OutputSize = PW_l;
-
- /* printf ( "\b\b\b\b\b\b\b\bTetrapack 1.02 Exe-file found at %ld !. its size is : %ld\n" , PW_Start_Address , OutputSize );*/
- /* OutName[1] = Extensions[TPACK102][0];
- OutName[2] = Extensions[TPACK102][1];
- OutName[3] = Extensions[TPACK102][2];*/
-
- CONVERT = BAD;
-
- if ( Amiga_EXE_Header == BAD )
- {
- OutputSize -= 32;
- Amiga_EXE_Header_Block = (Uchar *) malloc ( 32 );
- BZERO ( Amiga_EXE_Header_Block , 32 );
- Amiga_EXE_Header_Block[2] = Amiga_EXE_Header_Block[26] = 0x03;
- Amiga_EXE_Header_Block[3] = 0xF3;
- Amiga_EXE_Header_Block[11] = 0x01;
- Amiga_EXE_Header_Block[27] = 0xE9;
-
- /* WARNING !!! WORKS ONLY ON PC !!! */
- /* 68k machines code : c1 = *(Whatever+2); */
- /* 68k machines code : c2 = *(Whatever+3); */
- PW_j = PW_l - 36;
- PW_j /= 4;
- Whatever = (Uchar *) &PW_j;
- Amiga_EXE_Header_Block[20] = Amiga_EXE_Header_Block[28] = *(Whatever+3);
- Amiga_EXE_Header_Block[21] = Amiga_EXE_Header_Block[29] = *(Whatever+2);
- Amiga_EXE_Header_Block[22] = Amiga_EXE_Header_Block[30] = *(Whatever+1);
- Amiga_EXE_Header_Block[23] = Amiga_EXE_Header_Block[31] = *Whatever;
- Save_Rip_Special ( "Tetrapack 1.02 Exe-file", TPACK102, Amiga_EXE_Header_Block , 32 );
- free ( Amiga_EXE_Header_Block );
- }
- else
- {
- PW_Start_Address -= 32;
- Save_Rip ( "Tetrapack 1.02 Exe-file", TPACK102 );
- }
-
- if ( Save_Status == GOOD )
- PW_i += (OutputSize - 36); /* 32 should do but call it "just to be sure" :) */
-}
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Rip_Tetrapack_2_1 ( void )
-{
- /* PW_l is still the whole size */
-
- Uchar * Amiga_EXE_Header_Block;
- Uchar * Whatever;
-
- OutputSize = PW_l;
-
- /* printf ( "\b\b\b\b\b\b\b\bTetrapack 2.1 Exe-file found at %ld !. its size is : %ld\n" , PW_Start_Address , OutputSize );*/
- /* OutName[1] = Extensions[TPACK21][0];
- OutName[2] = Extensions[TPACK21][1];
- OutName[3] = Extensions[TPACK21][2];*/
-
- CONVERT = BAD;
-
- if ( Amiga_EXE_Header == BAD )
- {
- OutputSize -= 32;
- Amiga_EXE_Header_Block = (Uchar *) malloc ( 32 );
- BZERO ( Amiga_EXE_Header_Block , 32 );
- Amiga_EXE_Header_Block[2] = Amiga_EXE_Header_Block[26] = 0x03;
- Amiga_EXE_Header_Block[3] = 0xF3;
- Amiga_EXE_Header_Block[11] = 0x01;
- Amiga_EXE_Header_Block[27] = 0xE9;
-
- /* WARNING !!! WORKS ONLY ON PC !!! */
- /* 68k machines code : c1 = *(Whatever+2); */
- /* 68k machines code : c2 = *(Whatever+3); */
- PW_j = PW_l - 36;
- PW_j /= 4;
- Whatever = (Uchar *) &PW_j;
- Amiga_EXE_Header_Block[20] = Amiga_EXE_Header_Block[28] = *(Whatever+3);
- Amiga_EXE_Header_Block[21] = Amiga_EXE_Header_Block[29] = *(Whatever+2);
- Amiga_EXE_Header_Block[22] = Amiga_EXE_Header_Block[30] = *(Whatever+1);
- Amiga_EXE_Header_Block[23] = Amiga_EXE_Header_Block[31] = *Whatever;
- Save_Rip_Special ( "Tetrapack 2.1 Exe-file", TPACK21, Amiga_EXE_Header_Block , 32 );
- free ( Amiga_EXE_Header_Block );
- }
- else
- {
- PW_Start_Address -= 32;
- Save_Rip ( "Tetrapack 2.1 Exe-file", TPACK21 );
- }
-
- if ( Save_Status == GOOD )
- PW_i += (OutputSize - 36); /* 32 should do but call it "just to be sure" :) */
-}
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Rip_Tetrapack_2_2 ( void )
-{
- /* PW_l is still the whole size */
-
- Uchar * Amiga_EXE_Header_Block;
- Uchar * Whatever;
-
- OutputSize = PW_l;
-
- /* printf ( "\b\b\b\b\b\b\b\bTetrapack 2.2 Exe-file found at %ld !. its size is : %ld\n" , PW_Start_Address , OutputSize );*/
- /* OutName[1] = Extensions[TPACK22][0];
- OutName[2] = Extensions[TPACK22][1];
- OutName[3] = Extensions[TPACK22][2];*/
-
- CONVERT = BAD;
-
- if ( Amiga_EXE_Header == BAD )
- {
- OutputSize -= 32;
- Amiga_EXE_Header_Block = (Uchar *) malloc ( 32 );
- BZERO ( Amiga_EXE_Header_Block , 32 );
- Amiga_EXE_Header_Block[2] = Amiga_EXE_Header_Block[26] = 0x03;
- Amiga_EXE_Header_Block[3] = 0xF3;
- Amiga_EXE_Header_Block[11] = 0x01;
- Amiga_EXE_Header_Block[27] = 0xE9;
-
- /* WARNING !!! WORKS ONLY ON PC !!! */
- /* 68k machines code : c1 = *(Whatever+2); */
- /* 68k machines code : c2 = *(Whatever+3); */
- PW_j = PW_l - 36;
- PW_j /= 4;
- Whatever = (Uchar *) &PW_j;
- Amiga_EXE_Header_Block[20] = Amiga_EXE_Header_Block[28] = *(Whatever+3);
- Amiga_EXE_Header_Block[21] = Amiga_EXE_Header_Block[29] = *(Whatever+2);
- Amiga_EXE_Header_Block[22] = Amiga_EXE_Header_Block[30] = *(Whatever+1);
- Amiga_EXE_Header_Block[23] = Amiga_EXE_Header_Block[31] = *Whatever;
- Save_Rip_Special ( "Tetrapack 2.2 Exe-file", TPACK22, Amiga_EXE_Header_Block , 32 );
- free ( Amiga_EXE_Header_Block );
- }
- else
- {
- PW_Start_Address -= 32;
- Save_Rip ( "Tetrapack 2.2 Exe-file", TPACK22 );
- }
-
- if ( Save_Status == GOOD )
- PW_i += (OutputSize - 36); /* 32 should do but call it "just to be sure" :) */
-}
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Rip_TryIt101 ( void )
-{
- /* PW_l is still the whole size */
-
- Uchar * Amiga_EXE_Header_Block;
- Uchar * Whatever;
-
- OutputSize = PW_l;
-
- /* printf ( "\b\b\b\b\b\b\b\bTry-It Cruncher 1.01 Exe-file found at %ld !. its size is : %ld\n" , PW_Start_Address , OutputSize );*/
- /* OutName[1] = Extensions[TryIt][0];
- OutName[2] = Extensions[TryIt][1];
- OutName[3] = Extensions[TryIt][2];*/
-
- CONVERT = BAD;
-
- if ( Amiga_EXE_Header == BAD )
- {
- PW_Start_Address -= 32;
- OutputSize -= 32;
- Amiga_EXE_Header_Block = (Uchar *) malloc ( 32 );
- BZERO ( Amiga_EXE_Header_Block , 32 );
- Amiga_EXE_Header_Block[2] = Amiga_EXE_Header_Block[26] = 0x03;
- Amiga_EXE_Header_Block[3] = 0xF3;
- Amiga_EXE_Header_Block[11] = 0x01;
- Amiga_EXE_Header_Block[27] = 0xE9;
-
- /* WARNING !!! WORKS ONLY ON PC !!! */
- /* 68k machines code : c1 = *(Whatever+2); */
- /* 68k machines code : c2 = *(Whatever+3); */
- PW_j = PW_l - 36;
- PW_j /= 4;
- Whatever = (Uchar *) &PW_j;
- Amiga_EXE_Header_Block[20] = Amiga_EXE_Header_Block[28] = *(Whatever+3);
- Amiga_EXE_Header_Block[21] = Amiga_EXE_Header_Block[29] = *(Whatever+2);
- Amiga_EXE_Header_Block[22] = Amiga_EXE_Header_Block[30] = *(Whatever+1);
- Amiga_EXE_Header_Block[23] = Amiga_EXE_Header_Block[31] = *Whatever;
- Save_Rip_Special ( "Try-It Cruncher 1.01 Exe-file", TryIt, Amiga_EXE_Header_Block , 32 );
- free ( Amiga_EXE_Header_Block );
- }
- else
- {
- PW_Start_Address -= 64;
- Save_Rip ( "Try-It Cruncher 1.01 Exe-file", TryIt );
- }
-
- if ( Save_Status == GOOD )
- PW_i += (OutputSize - 65); /* 64 should do but call it "just to be sure" :) */
-}
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Rip_TurboSqueezer61 ( void )
-{
- /* PW_l is still the whole size */
-
- /*Uchar * Amiga_EXE_Header_Block;*/
- /*Uchar * Whatever;*/
-
- OutputSize = PW_l;
-
- CONVERT = BAD;
- /*
- if ( Amiga_EXE_Header == BAD )
- {
- OutputSize -= 40;
- Amiga_EXE_Header_Block = (Uchar *) malloc ( 40 );
- BZERO ( Amiga_EXE_Header_Block , 40 );
- Amiga_EXE_Header_Block[2] = Amiga_EXE_Header_Block[11] = Amiga_EXE_Header_Block[34] = 0x03;
- Amiga_EXE_Header_Block[3] = 0xF3;
- Amiga_EXE_Header_Block[19] = 0x02;
- Amiga_EXE_Header_Block[23] = Amiga_EXE_Header_Block[39] = 0x7D;
- Amiga_EXE_Header_Block[35] = 0xE9;
- */
- /* WARNING !!! WORKS ONLY ON PC !!! */
- /* 68k machines code : c1 = *(Whatever+2); */
- /* 68k machines code : c2 = *(Whatever+3); */
- /* PW_j = PW_l - 568;
- PW_j /= 4;
- Whatever = (Uchar *) &PW_j;
- Amiga_EXE_Header_Block[24] = *(Whatever+3);
- Amiga_EXE_Header_Block[25] = *(Whatever+2);
- Amiga_EXE_Header_Block[26] = *(Whatever+1);
- Amiga_EXE_Header_Block[27] = *Whatever;
-
- PW_j = ((in_data[PW_Start_Address+480]*256*256*256)+
- (in_data[PW_Start_Address+481]*256*256)+
- (in_data[PW_Start_Address+482]*256)+
- in_data[PW_Start_Address+483]) + 36;
-
- PW_j /= 4;
- Whatever = (Uchar *) &PW_j;
- Amiga_EXE_Header_Block[28] = *(Whatever+3);
- Amiga_EXE_Header_Block[29] = *(Whatever+2);
- Amiga_EXE_Header_Block[30] = *(Whatever+1);
- Amiga_EXE_Header_Block[31] = *Whatever;
- */
- /* also the last 4 bytes are 'removed' frequently ... Here they are */
- /* in_data[PW_Start_Address+OutputSize-4] = 0x00;
- in_data[PW_Start_Address+OutputSize-3] = 0x00;
- in_data[PW_Start_Address+OutputSize-2] = 0x03;
- in_data[PW_Start_Address+OutputSize-1] = 0xF2;
-
- Save_Rip_Special ( "TurboSqueezer 6.1 Exe-file", TurboSqueezer61, Amiga_EXE_Header_Block , 40 );
- free ( Amiga_EXE_Header_Block );
- }
- else
- {*/
- PW_Start_Address -= 40;
- Save_Rip ( "TurboSqueezer 6.1 Exe-file", TurboSqueezer61 );
- /* }*/
-
- if ( Save_Status == GOOD )
- PW_i += 44;
-}
+++ /dev/null
-#ifdef DOS
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Rip_UNIC_withID ( void )
-{
- /* PW_k is still the nbr of pattern */
-
- OutputSize = PW_WholeSampleSize + (PW_k*768) + 1084;
-
- /* printf ( "\b\b\b\b\b\b\b\bUNIC tracker v1 module found at %ld !. its size is : %ld\n" , PW_Start_Address , OutputSize );*/
- /* OutName[1] = Extensions[UNIC_v1][0];
- OutName[2] = Extensions[UNIC_v1][1];
- OutName[3] = Extensions[UNIC_v1][2];*/
-
- CONVERT = GOOD;
- Save_Rip ( "UNIC tracker v1 module", UNIC_v1 );
-
- if ( Save_Status == GOOD )
- PW_i += (OutputSize - 1081); /* 1080 should do but call it "just to be sure" :) */
-}
-
-
-void Rip_UNIC_noID ( void )
-{
- /* PW_k is still the nbr of pattern */
-
- OutputSize = PW_WholeSampleSize + (PW_k*768) + 1080;
-
- /* printf ( "\b\b\b\b\b\b\b\bUNIC tracker v1 module found at %ld !. its size is : %ld\n" , PW_Start_Address , OutputSize );*/
- /* OutName[1] = Extensions[UNIC_v1][0];
- OutName[2] = Extensions[UNIC_v1][1];
- OutName[3] = Extensions[UNIC_v1][2];*/
-
- CONVERT = GOOD;
- Save_Rip ( "UNIC tracker v1 module", UNIC_v1 );
-
- if ( Save_Status == GOOD )
- PW_i += (OutputSize - 46); /* 45 should do but call it "just to be sure" :) */
-}
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-
-void Rip_UNIC2 ( void )
-{
- /* PW_k is still the nbr of pattern */
-
- OutputSize = PW_WholeSampleSize + (PW_k*768) + 1060;
-
- /* printf ( "\b\b\b\b\b\b\b\bUNIC tracker v2 module found at %ld !. its size is : %ld\n" , PW_Start_Address , OutputSize );*/
- /* OutName[1] = Extensions[UNIC_v2][0];
- OutName[2] = Extensions[UNIC_v2][1];
- OutName[3] = Extensions[UNIC_v2][2];*/
-
- CONVERT = GOOD;
- Save_Rip ( "UNIC tracker v2 module", UNIC_v2 );
-
- if ( Save_Status == GOOD )
- PW_i += (OutputSize - 26); /* 25 should do but call it "just to be sure" :) */
-}
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Rip_WN ( void )
-{
- PW_WholeSampleSize = 0;
- for ( PW_k=0 ; PW_k<31 ; PW_k++ )
- PW_WholeSampleSize += (((in_data[PW_Start_Address+42+30*PW_k]*256)+in_data[PW_Start_Address+43+30*PW_k])*2);
- PW_j = in_data[PW_Start_Address+1083];
- OutputSize = PW_WholeSampleSize + (PW_j*1024) + 1084;
- /* printf ( "\b\b\b\b\b\b\b\bWanton Packer module found at %ld !. its size is : %ld\n" , PW_Start_Address , OutputSize );*/
- /* OutName[1] = Extensions[Wanton_packer][0];
- OutName[2] = Extensions[Wanton_packer][1];
- OutName[3] = Extensions[Wanton_packer][2];*/
-
- CONVERT = GOOD;
- Save_Rip ( "Wanton Packer module", Wanton_packer );
-
- if ( Save_Status == GOOD )
- PW_i += (OutputSize - 1082); /* 1081 should do but call it "just to be sure" :) */
-}
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Rip_XANN ( void )
-{
- /* PW_WholeSampleSize is the whole sample size */
-
- PW_k=0;
- for ( PW_j=0 ; PW_j<64 ; PW_j++ )
- {
- PW_l = in_data[PW_Start_Address+2+PW_j*4];
- if ( PW_l > PW_k )
- PW_k = PW_l;
- }
- PW_k /= 4;
- OutputSize = PW_WholeSampleSize + 1084 + (PW_k*1024);
-
- CONVERT = GOOD;
- Save_Rip ( "Xann Packer module", XANN_packer );
-
- if ( Save_Status == GOOD )
- PW_i += (OutputSize - 4); /* 3 should do but call it "just to be sure" :) */
-}
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Rip_XM ( void )
-{
- /* PW_l is the header size and points on the first pattern */
- /* PW_j is the number of pattern */
- /* PW_k is the number of instruments */
-
- /* get whole pattern data siz */
- for ( PW_o=0 ; PW_o<PW_j ; PW_o++ )
- {
- /* getting siz of one pattern */
- PW_m = (in_data[PW_Start_Address+PW_l+8]*256) + in_data[PW_Start_Address+PW_l+7];
- /* adding it to current pointer + 9 being the pat header siz */
- PW_l += (PW_m + 9);
- }
-
- /* PW_l is now on the first inst .. PW_j is free :)*/
- /* get whole insts data siz */
- for ( PW_o=0 ; PW_o<PW_k ; PW_o++ )
- {
- long siz=0;
- /* getting siz of one inst header */
- PW_m = (in_data[PW_Start_Address+PW_l+1]*256) + in_data[PW_Start_Address+PW_l];
- /* getting nbr of samples in this inst */
- PW_j = (in_data[PW_Start_Address+PW_l+28]*256) + in_data[PW_Start_Address+PW_l+27];
- /* getting sizes of samples */
- PW_l += PW_m; /* so that it points on first sample header */
- for ( PW_n=0 ; PW_n<PW_j ; PW_n++ )
- {
- /* siz of this samples */
- siz += ( (in_data[PW_Start_Address+PW_l+3]*256*256*256) +
- (in_data[PW_Start_Address+PW_l+2]*256*256) +
- (in_data[PW_Start_Address+PW_l+1]*256) +
- in_data[PW_Start_Address+PW_l]);
- /* move pointer onto the next sample header if one exists*/
- PW_l += 40;
- }
- /* add sample datas of this instrument now */
- PW_l += siz;
- }
-
- OutputSize = PW_l;
-
- CONVERT = BAD;
- Save_Rip ( "Fastracker (XM) 2.0 module", XM );
-
- if ( Save_Status == GOOD )
- PW_i += 2;
-}
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-void Rip_ZEN ( void )
-{
- /* PW_n is the highest sample data address */
- /* PW_WholeSampleSize if its size */
-
- OutputSize = PW_WholeSampleSize + PW_n;
- /* printf ( "\b\b\b\b\b\b\b\bZEN Packer module found at %ld !. its size is : %ld\n" , PW_Start_Address , OutputSize );*/
- /* OutName[1] = Extensions[ZEN][0];
- OutName[2] = Extensions[ZEN][1];
- OutName[3] = Extensions[ZEN][2];*/
-
- CONVERT = GOOD;
- Save_Rip ( "ZEN Packer module", ZEN );
-
- if ( Save_Status == GOOD )
- PW_i += (OutputSize - 10); /* 9 should do but call it "just to be sure" :) */
-}
+++ /dev/null
-#ifdef DOS
-
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-
-#endif
-
-#ifdef UNIX
-
-#include "../include/globals.h"
-#include "../include/extern.h"
-
-#endif
-
-
-
-
-short testAC1D ( void )
-{
- /* test #1 */
- /* if ( PW_i<2 )*/
- if ( test_1_start(2) == BAD )
- return BAD;
-
- /* test #2 */
- PW_Start_Address = PW_i-2;
- if ( (in_data[PW_Start_Address] > 0x7f) || ((PW_Start_Address+896)>PW_in_size) )
- {
- return BAD;
- }
-
- /* test #4 */
- for ( PW_k = 0 ; PW_k < 31 ; PW_k ++ )
- {
- if ( in_data[PW_Start_Address + 10 + (8*PW_k)] > 0x0f )
- {
- return BAD;
- }
- }
-
- /* test #5 */
- for ( PW_j=0 ; PW_j<128 ; PW_j++ )
- {
- if ( in_data[PW_Start_Address + 768 + PW_j] > 0x7f )
- {
- return BAD;
- }
- }
- return GOOD;
-}
-
+++ /dev/null
-/* (31 mar 2003)
- * ambk.c (test)
-*/
-
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-short testAmBk ( void )
-{
- if (PW_i + 68 > PW_in_size)
- {
- return BAD;
- }
-
- /* test #1 */
- PW_Start_Address = PW_i;
- if ((in_data[PW_Start_Address+4] != 0x00)||
- (in_data[PW_Start_Address+5] != 0x03)||
- (in_data[PW_Start_Address+6] != 0x00)||
- (in_data[PW_Start_Address+7] > 0x01)||
- (in_data[PW_Start_Address+12]!= 'M')||
- (in_data[PW_Start_Address+13]!= 'u')||
- (in_data[PW_Start_Address+14]!= 's')||
- (in_data[PW_Start_Address+15]!= 'i')||
- (in_data[PW_Start_Address+16]!= 'c')||
- (in_data[PW_Start_Address+17]!= ' ')||
- (in_data[PW_Start_Address+18]!= ' ')||
- (in_data[PW_Start_Address+19]!= ' '))
- {
-/*printf ( "#1 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
-
- /* get the whole size */
- PW_k = (in_data[PW_Start_Address+9]*256*256)+(in_data[PW_Start_Address+10]*256)+in_data[PW_Start_Address+11]+12;
- if ( PW_k+PW_Start_Address > PW_in_size )
- {
-/*printf ( "#1 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
-
- return GOOD;
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-short testArcDDataCruncher ()
-{
- PW_Start_Address = PW_i;
- if ( (PW_Start_Address + 12) > PW_in_size )
- {
- return BAD;
- }
-
- /* packed size */
- PW_l = ( (in_data[PW_Start_Address+8]*256*256*256) +
- (in_data[PW_Start_Address+9]*256*256) +
- (in_data[PW_Start_Address+10]*256) +
- in_data[PW_Start_Address+11] );
- /* unpacked size */
- PW_k = ( (in_data[PW_Start_Address+5]*256*256) +
- (in_data[PW_Start_Address+6]*256) +
- in_data[PW_Start_Address+7] );
-
- if ( (PW_k <= 2) || (PW_l <= 2) )
- {
-/*printf ( "#1\n" );*/
- return BAD;
- }
-
- if ( PW_l > 0xFFFFFF )
- {
-/*printf ( "#2\n" );*/
- return BAD;
- }
-
- if ( PW_k <= PW_l )
- {
-/*printf ( "#3\n" );*/
- return BAD;
- }
-
- return GOOD;
-}
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-short testBP ( void )
-{
- /* test 1 */
- if ( (PW_i < 26) || ((PW_Start_Address+512)>PW_in_size) )
- {
- return BAD;
- }
-
- /* test 2 */
- PW_Start_Address = PW_i-26;
- for ( PW_j=0 ; PW_j<15 ; PW_j++ )
- {
- if ( in_data[32+PW_j*32+PW_Start_Address] == 0xff )
- continue;
- if ( in_data[PW_j*32+63+PW_Start_Address] > 0x40 )
- return BAD;
- }
-
- /* various shits to calculate the size */
- PW_WholeSampleSize = 0;
- for ( PW_k=0 ; PW_k<15 ; PW_k++ )
- {
- if ( in_data[PW_Start_Address+32+32*PW_k] != 0xff )
- PW_WholeSampleSize += (((in_data[PW_Start_Address+56+32*PW_k]*256)+in_data[PW_Start_Address+57+32*PW_k])*2);
- }
- PW_j = in_data[PW_Start_Address+29];
- PW_l = in_data[PW_Start_Address+30]*256 + in_data[PW_Start_Address+31];
- OutputSize = PW_WholeSampleSize + (PW_j*64);
- PW_j = 0;
- if ( (PW_Start_Address+525+(PW_l*16)) > PW_in_size )
- return BAD;
-
- for ( PW_k=0 ; PW_k<PW_l ; PW_k++ )
- {
- if ( (in_data[PW_Start_Address+512+PW_k*16]*256 +
- in_data[PW_Start_Address+513+PW_k*16]) > PW_j )
- PW_j = (in_data[PW_Start_Address+512+PW_k*16]*256 + in_data[PW_Start_Address+513+PW_k*16]);
- if ( (in_data[PW_Start_Address+516+PW_k*16]*256 +
- in_data[PW_Start_Address+517+PW_k*16]) > PW_j )
- PW_j = (in_data[PW_Start_Address+516+PW_k*16]*256 + in_data[PW_Start_Address+517+PW_k*16]);
- if ( (in_data[PW_Start_Address+520+PW_k*16]*256 +
- in_data[PW_Start_Address+521+PW_k*16]) > PW_j )
- PW_j = (in_data[PW_Start_Address+520+PW_k*16]*256 + in_data[PW_Start_Address+521+PW_k*16]);
- if ( (in_data[PW_Start_Address+524+PW_k*16]*256 +
- in_data[PW_Start_Address+525+PW_k*16]) > PW_j )
- PW_j = (in_data[PW_Start_Address+524+PW_k*16]*256 + in_data[PW_Start_Address+525+PW_k*16]);
- }
-
- return GOOD;
-}
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-short testBSIFutureComposer ( void )
-{
- PW_Start_Address = PW_i;
-
- /* file size < 18424 */
- if ( test_1_start(PW_Start_Address + 18424) )
- {
-/*printf ( "#1 (start:%ld) (number of samples:%ld)\n" , PW_Start_Address , PW_j);*/
- return BAD;
- }
-
- if (( in_data[PW_Start_Address+17412] != 'D' ) ||
- ( in_data[PW_Start_Address+17413] != 'I' ) ||
- ( in_data[PW_Start_Address+17414] != 'G' ) ||
- ( in_data[PW_Start_Address+17415] != 'I' ) )
- {
-/*printf ( "#2 (start:%ld) (number of samples:%ld)\n" , PW_Start_Address , PW_j);*/
- return BAD;
- }
-
- if (( in_data[PW_Start_Address+18424] != 'D' ) ||
- ( in_data[PW_Start_Address+18425] != 'I' ) ||
- ( in_data[PW_Start_Address+18426] != 'G' ) ||
- ( in_data[PW_Start_Address+18427] != 'P' ) )
- {
-/*printf ( "#3 (start:%ld) (number of samples:%ld)\n" , PW_Start_Address , PW_j);*/
- return BAD;
- }
-
- return GOOD;
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-short testByteKiller_13 ( void )
-{
- /* if ( PW_i < 135 )*/
- if ( test_1_start (135) == BAD )
- {
-/*printf ( "#1\n" );*/
- return BAD;
- }
-
- PW_Start_Address = PW_i-135;
-
- if ( (in_data[PW_Start_Address] != 0x41 ) ||
- (in_data[PW_Start_Address+1] != 0xFA ) ||
- (in_data[PW_Start_Address+2] != 0x00 ) ||
- (in_data[PW_Start_Address+3] != 0xE6 ) ||
- (in_data[PW_Start_Address+4] != 0x43 ) ||
- (in_data[PW_Start_Address+5] != 0xF9 ) ||
- (in_data[PW_Start_Address+10] != 0x20 ) ||
- (in_data[PW_Start_Address+11] != 0x18 ) ||
- (in_data[PW_Start_Address+12] != 0x22 ) ||
- (in_data[PW_Start_Address+13] != 0x18 ) ||
- (in_data[PW_Start_Address+14] != 0x2A ) ||
- (in_data[PW_Start_Address+15] != 0x18 ) ||
- (in_data[PW_Start_Address+16] != 0x24 ) ||
- (in_data[PW_Start_Address+17] != 0x49 ) ||
- (in_data[PW_Start_Address+18] != 0xD1 ) ||
- (in_data[PW_Start_Address+19] != 0xC0 ) ||
- (in_data[PW_Start_Address+20] != 0xD5 ) ||
- (in_data[PW_Start_Address+21] != 0xC1 ) ||
- (in_data[PW_Start_Address+22] != 0x20 ) ||
- (in_data[PW_Start_Address+23] != 0x20 ) ||
- (in_data[PW_Start_Address+24] != 0xB1 ) ||
- (in_data[PW_Start_Address+25] != 0x85 ) )
- {
- /* should be enough :))) */
-/*printf ( "#2 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
-
- }
-
-
- /* packed size */
- PW_l = ( (in_data[PW_Start_Address+232]*256*256*256) +
- (in_data[PW_Start_Address+233]*256*256) +
- (in_data[PW_Start_Address+234]*256) +
- in_data[PW_Start_Address+235] );
-
- PW_l += 304;
-
- if ( PW_i >= 171 )
- {
- if ( (in_data[PW_Start_Address-36] != 0x00 ) ||
- (in_data[PW_Start_Address-35] != 0x00 ) ||
- (in_data[PW_Start_Address-34] != 0x03 ) ||
- (in_data[PW_Start_Address-33] != 0xF3 ) ||
- (in_data[PW_Start_Address-32] != 0x00 ) ||
- (in_data[PW_Start_Address-31] != 0x00 ) ||
- (in_data[PW_Start_Address-30] != 0x00 ) ||
- (in_data[PW_Start_Address-29] != 0x00 ) ||
- (in_data[PW_Start_Address-28] != 0x00 ) ||
- (in_data[PW_Start_Address-27] != 0x00 ) ||
- (in_data[PW_Start_Address-26] != 0x00 ) ||
- (in_data[PW_Start_Address-25] != 0x02 ) ||
- (in_data[PW_Start_Address-24] != 0x00 ) ||
- (in_data[PW_Start_Address-23] != 0x00 ) ||
- (in_data[PW_Start_Address-22] != 0x00 ) ||
- (in_data[PW_Start_Address-21] != 0x00 ) )
- {
- Amiga_EXE_Header = BAD;
- }
- else
- Amiga_EXE_Header = GOOD;
- }
- else
- Amiga_EXE_Header = BAD;
-
- return GOOD;
- /* PW_l is the size of the pack */
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-short testByteKiller_20 ( void )
-{
- if ( test_1_start(127) == BAD )
- {
-/*printf ( "#1\n" );*/
- return BAD;
- }
- PW_Start_Address = PW_i-127;
-
- if ( (in_data[PW_Start_Address] != 0x48 ) ||
- (in_data[PW_Start_Address+1] != 0xE7 ) ||
- (in_data[PW_Start_Address+2] != 0xFF ) ||
- (in_data[PW_Start_Address+3] != 0xFE ) ||
- (in_data[PW_Start_Address+4] != 0x4D ) ||
- (in_data[PW_Start_Address+5] != 0xF9 ) ||
- (in_data[PW_Start_Address+6] != 0x00 ) ||
- (in_data[PW_Start_Address+7] != 0xDF ) ||
- (in_data[PW_Start_Address+8] != 0xF1 ) ||
- (in_data[PW_Start_Address+9] != 0x80 ) ||
- (in_data[PW_Start_Address+10] != 0x41 ) ||
- (in_data[PW_Start_Address+11] != 0xFA ) ||
- (in_data[PW_Start_Address+12] != 0x00 ) ||
- (in_data[PW_Start_Address+13] != 0xBA ) ||
- (in_data[PW_Start_Address+14] != 0x43 ) ||
- (in_data[PW_Start_Address+15] != 0xF9 ) ||
- (in_data[PW_Start_Address+20] != 0x20 ) ||
- (in_data[PW_Start_Address+21] != 0x18 ) ||
- (in_data[PW_Start_Address+22] != 0x22 ) ||
- (in_data[PW_Start_Address+23] != 0x18 ) ||
- (in_data[PW_Start_Address+24] != 0x2A ) ||
- (in_data[PW_Start_Address+25] != 0x18 ) )
- {
- /* should be enough :))) */
-/*printf ( "#2 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
-
- }
-
- /* packed size */
- PW_l = ( (in_data[PW_Start_Address+198]*256*256*256) +
- (in_data[PW_Start_Address+199]*256*256) +
- (in_data[PW_Start_Address+200]*256) +
- in_data[PW_Start_Address+201] );
-
- PW_l += 272;
-
- if ( PW_i >= 163 )
- {
- if ( (in_data[PW_Start_Address-36] != 0x00 ) ||
- (in_data[PW_Start_Address-35] != 0x00 ) ||
- (in_data[PW_Start_Address-34] != 0x03 ) ||
- (in_data[PW_Start_Address-33] != 0xF3 ) ||
- (in_data[PW_Start_Address-32] != 0x00 ) ||
- (in_data[PW_Start_Address-31] != 0x00 ) ||
- (in_data[PW_Start_Address-30] != 0x00 ) ||
- (in_data[PW_Start_Address-29] != 0x00 ) ||
- (in_data[PW_Start_Address-28] != 0x00 ) ||
- (in_data[PW_Start_Address-27] != 0x00 ) ||
- (in_data[PW_Start_Address-26] != 0x00 ) ||
- (in_data[PW_Start_Address-25] != 0x02 ) ||
- (in_data[PW_Start_Address-24] != 0x00 ) ||
- (in_data[PW_Start_Address-23] != 0x00 ) ||
- (in_data[PW_Start_Address-22] != 0x00 ) ||
- (in_data[PW_Start_Address-21] != 0x00 ) )
- {
- Amiga_EXE_Header = BAD;
- }
- else
- Amiga_EXE_Header = GOOD;
- }
- else
- Amiga_EXE_Header = BAD;
-
- return GOOD;
- /* PW_l is the size of the pack */
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-short testByteKiller30 ( void )
-{
- PW_Start_Address = PW_i;
-
- if ( (in_data[PW_Start_Address+16] != 0x00 ) ||
- (in_data[PW_Start_Address+17] != 0xDF ) ||
- (in_data[PW_Start_Address+18] != 0xF1 ) ||
- (in_data[PW_Start_Address+19] != 0x80 ) ||
- (in_data[PW_Start_Address+20] != 0x20 ) ||
- (in_data[PW_Start_Address+21] != 0x18 ) ||
- (in_data[PW_Start_Address+22] != 0x22 ) ||
- (in_data[PW_Start_Address+23] != 0x18 ) ||
- (in_data[PW_Start_Address+24] != 0xD1 ) ||
- (in_data[PW_Start_Address+25] != 0xC0 ) ||
- (in_data[PW_Start_Address+26] != 0x20 ) ||
- (in_data[PW_Start_Address+27] != 0x10 ) ||
- (in_data[PW_Start_Address+28] != 0x24 ) ||
- (in_data[PW_Start_Address+29] != 0x49 ) ||
- (in_data[PW_Start_Address+30] != 0xD5 ) ||
- (in_data[PW_Start_Address+31] != 0xC1 ) ||
- (in_data[PW_Start_Address+32] != 0x7A ) ||
- (in_data[PW_Start_Address+33] != 0x03 ) )
- {
- /* should be enough :))) */
-/*printf ( "#2 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
-
- }
-
-
- /* packed size */
- PW_l = ( (in_data[PW_Start_Address+188]*256*256*256) +
- (in_data[PW_Start_Address+189]*256*256) +
- (in_data[PW_Start_Address+190]*256) +
- in_data[PW_Start_Address+191] );
-
- PW_l += 236;
-
-
- if ( PW_i >= 32 )
- {
- if ( (in_data[PW_Start_Address-32] != 0x00 ) ||
- (in_data[PW_Start_Address-31] != 0x00 ) ||
- (in_data[PW_Start_Address-30] != 0x03 ) ||
- (in_data[PW_Start_Address-29] != 0xF3 ) ||
- (in_data[PW_Start_Address-28] != 0x00 ) ||
- (in_data[PW_Start_Address-27] != 0x00 ) ||
- (in_data[PW_Start_Address-26] != 0x00 ) ||
- (in_data[PW_Start_Address-25] != 0x00 ) ||
- (in_data[PW_Start_Address-24] != 0x00 ) ||
- (in_data[PW_Start_Address-23] != 0x00 ) ||
- (in_data[PW_Start_Address-22] != 0x00 ) ||
- (in_data[PW_Start_Address-21] != 0x01 ) ||
- (in_data[PW_Start_Address-20] != 0x00 ) ||
- (in_data[PW_Start_Address-19] != 0x00 ) ||
- (in_data[PW_Start_Address-18] != 0x00 ) ||
- (in_data[PW_Start_Address-17] != 0x00 ) )
- {
- Amiga_EXE_Header = BAD;
- }
- else
- Amiga_EXE_Header = GOOD;
- }
- else
- Amiga_EXE_Header = BAD;
-
- return GOOD;
- /* PW_l is the size of the pack */
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-short testbytekillerpro10 ( void )
-{
- PW_Start_Address = PW_i;
-
- if ( (in_data[PW_Start_Address+22] != 0x00 ) ||
- (in_data[PW_Start_Address+23] != 0x04 ) ||
- (in_data[PW_Start_Address+24] != 0x2A ) ||
- (in_data[PW_Start_Address+25] != 0x28 ) ||
- (in_data[PW_Start_Address+26] != 0x00 ) ||
- (in_data[PW_Start_Address+27] != 0x08 ) ||
- (in_data[PW_Start_Address+28] != 0x41 ) ||
- (in_data[PW_Start_Address+29] != 0xE8 ) ||
- (in_data[PW_Start_Address+30] != 0x00 ) ||
- (in_data[PW_Start_Address+31] != 0x0C ) ||
- (in_data[PW_Start_Address+32] != 0x24 ) ||
- (in_data[PW_Start_Address+33] != 0x49 ) ||
- (in_data[PW_Start_Address+34] != 0xD1 ) ||
- (in_data[PW_Start_Address+35] != 0xC0 ) ||
- (in_data[PW_Start_Address+36] != 0xD5 ) ||
- (in_data[PW_Start_Address+37] != 0xC1 ) )
- {
- /* should be enough :))) */
-/*printf ( "#2 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
-
- }
-
-
- /* packed size */
- PW_l = ( (in_data[PW_Start_Address+222]*256*256*256) +
- (in_data[PW_Start_Address+223]*256*256) +
- (in_data[PW_Start_Address+224]*256) +
- in_data[PW_Start_Address+225] );
-
- PW_l += 308;
-
-
- if ( PW_i >= 50 )
- {
- if ( (in_data[PW_Start_Address-50] != 0x00 ) ||
- (in_data[PW_Start_Address-49] != 0x00 ) ||
- (in_data[PW_Start_Address-48] != 0x03 ) ||
- (in_data[PW_Start_Address-47] != 0xF3 ) ||
- (in_data[PW_Start_Address-46] != 0x00 ) ||
- (in_data[PW_Start_Address-45] != 0x00 ) ||
- (in_data[PW_Start_Address-44] != 0x00 ) ||
- (in_data[PW_Start_Address-43] != 0x00 ) ||
- (in_data[PW_Start_Address-42] != 0x00 ) ||
- (in_data[PW_Start_Address-41] != 0x00 ) ||
- (in_data[PW_Start_Address-40] != 0x00 ) ||
- (in_data[PW_Start_Address-39] != 0x02 ) ||
- (in_data[PW_Start_Address-38] != 0x00 ) ||
- (in_data[PW_Start_Address-37] != 0x00 ) ||
- (in_data[PW_Start_Address-36] != 0x00 ) ||
- (in_data[PW_Start_Address-35] != 0x00 ) )
- {
- Amiga_EXE_Header = BAD;
- }
- else
- Amiga_EXE_Header = GOOD;
- }
- else
- Amiga_EXE_Header = BAD;
-
- return GOOD;
- /* PW_l is the size of the pack */
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-short testcrunchmaniaAddr ( void )
-{
- PW_Start_Address = PW_i - 4;
-
- if ( (in_data[PW_Start_Address+36] != 0x6F ) ||
- (in_data[PW_Start_Address+37] != 0x14 ) ||
- (in_data[PW_Start_Address+38] != 0x26 ) ||
- (in_data[PW_Start_Address+39] != 0x4A ) ||
- (in_data[PW_Start_Address+40] != 0x49 ) ||
- (in_data[PW_Start_Address+41] != 0xE9 ) ||
- (in_data[PW_Start_Address+46] != 0xE4 ) ||
- (in_data[PW_Start_Address+47] != 0x8F ) ||
- (in_data[PW_Start_Address+48] != 0x52 ) ||
- (in_data[PW_Start_Address+49] != 0x87 ) ||
- (in_data[PW_Start_Address+50] != 0x24 ) ||
- (in_data[PW_Start_Address+51] != 0x4C ) ||
- (in_data[PW_Start_Address+52] != 0x28 ) ||
- (in_data[PW_Start_Address+53] != 0xDB ) ||
- (in_data[PW_Start_Address+54] != 0x53 ) ||
- (in_data[PW_Start_Address+55] != 0x87 ) ||
- (in_data[PW_Start_Address+56] != 0x66 ) ||
- (in_data[PW_Start_Address+57] != 0xFA ) )
- {
- /* should be enough :))) */
- /*printf ( "#2 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
-
- }
-
-
- /* packed size */
- PW_l = ( (in_data[PW_Start_Address]*256*256*256) +
- (in_data[PW_Start_Address+1]*256*256) +
- (in_data[PW_Start_Address+2]*256) +
- in_data[PW_Start_Address+3] );
-
- PW_l *= 4;
- PW_l += 36;
-
-
- if ( PW_i >= 28 )
- {
- if ( (in_data[PW_Start_Address-28] != 0x00 ) ||
- (in_data[PW_Start_Address-27] != 0x00 ) ||
- (in_data[PW_Start_Address-26] != 0x03 ) ||
- (in_data[PW_Start_Address-25] != 0xF3 ) ||
- (in_data[PW_Start_Address-24] != 0x00 ) ||
- (in_data[PW_Start_Address-23] != 0x00 ) ||
- (in_data[PW_Start_Address-22] != 0x00 ) ||
- (in_data[PW_Start_Address-21] != 0x00 ) ||
- (in_data[PW_Start_Address-20] != 0x00 ) ||
- (in_data[PW_Start_Address-19] != 0x00 ) ||
- (in_data[PW_Start_Address-18] != 0x00 ) ||
- (in_data[PW_Start_Address-17] != 0x01 ) ||
- (in_data[PW_Start_Address-16] != 0x00 ) ||
- (in_data[PW_Start_Address-15] != 0x00 ) ||
- (in_data[PW_Start_Address-14] != 0x00 ) ||
- (in_data[PW_Start_Address-13] != 0x00 ) )
- {
- Amiga_EXE_Header = BAD;
- }
- else
- Amiga_EXE_Header = GOOD;
- }
- else
- Amiga_EXE_Header = BAD;
-
- return GOOD;
- /* PW_l is the size of the pack */
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-
-short testCRND ( void )
-{
- PW_Start_Address = PW_i;
-
- /* packed size */
- PW_l = ( (in_data[PW_Start_Address+4]*256*256*256) +
- (in_data[PW_Start_Address+5]*256*256) +
- (in_data[PW_Start_Address+6]*256) +
- in_data[PW_Start_Address+7] );
-
- if ( (PW_l + PW_i) > PW_in_size )
- return BAD;
-
-/* testSpecialCruncherData ( 4 , in_data[(in_data[PW_i+4]*256*256*256+in_data[PW_i+5]*256*256+in_data[PW_i+6]*256+in_data[PW_i+7])-16] );*/
- testSpecialCruncherData ( 4 , in_data[PW_l-16] );
-
- return GOOD;
-}
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-short testDoubleAction10 ( void )
-{
- if ( PW_i < 123 )
- {
-/*printf ( "#1\n" );*/
- return BAD;
- }
- PW_Start_Address = PW_i-123;
-
- if ( (in_data[PW_Start_Address+8] != 0x47 ) ||
- (in_data[PW_Start_Address+9] != 0xF9 ) ||
- (in_data[PW_Start_Address+10] != 0x00 ) ||
- (in_data[PW_Start_Address+11] != 0xDF ) ||
- (in_data[PW_Start_Address+12] != 0xF0 ) ||
- (in_data[PW_Start_Address+13] != 0x00 ) ||
- (in_data[PW_Start_Address+14] != 0x37 ) ||
- (in_data[PW_Start_Address+15] != 0x7C ) ||
- (in_data[PW_Start_Address+18] != 0x00 ) ||
- (in_data[PW_Start_Address+19] != 0x9A ) ||
- (in_data[PW_Start_Address+26] != 0x43 ) ||
- (in_data[PW_Start_Address+27] != 0xF9 ) ||
- (in_data[PW_Start_Address+28] != 0x00 ) ||
- (in_data[PW_Start_Address+29] != 0xBF ) ||
- (in_data[PW_Start_Address+30] != 0xD1 ) ||
- (in_data[PW_Start_Address+31] != 0x00 ) ||
- (in_data[PW_Start_Address+32] != 0x12 ) ||
- (in_data[PW_Start_Address+33] != 0xBC ) ||
- (in_data[PW_Start_Address+34] != 0x00 ) ||
- (in_data[PW_Start_Address+35] != 0xFD ) )
- {
- /* should be enough :))) */
-printf ( "#2 Start:%ld\n" , PW_Start_Address );
- return BAD;
-
- }
-
-
- /* packed size */
- PW_l = ( (in_data[PW_Start_Address+4]*256*256*256) +
- (in_data[PW_Start_Address+5]*256*256) +
- (in_data[PW_Start_Address+6]*256) +
- in_data[PW_Start_Address+7] );
- PW_l *= 4;
- PW_l += 36;
-
- if ( PW_i >= 147 )
- {
- if ( (in_data[PW_Start_Address-24] != 0x00 ) ||
- (in_data[PW_Start_Address-23] != 0x00 ) ||
- (in_data[PW_Start_Address-22] != 0x03 ) ||
- (in_data[PW_Start_Address-21] != 0xF3 ) ||
- (in_data[PW_Start_Address-20] != 0x00 ) ||
- (in_data[PW_Start_Address-19] != 0x00 ) ||
- (in_data[PW_Start_Address-18] != 0x00 ) ||
- (in_data[PW_Start_Address-17] != 0x00 ) ||
- (in_data[PW_Start_Address-16] != 0x00 ) ||
- (in_data[PW_Start_Address-15] != 0x00 ) ||
- (in_data[PW_Start_Address-14] != 0x00 ) ||
- (in_data[PW_Start_Address-13] != 0x01 ) ||
- (in_data[PW_Start_Address-12] != 0x00 ) ||
- (in_data[PW_Start_Address-11] != 0x00 ) ||
- (in_data[PW_Start_Address-10] != 0x00 ) ||
- (in_data[PW_Start_Address-9] != 0x00 ) )
- {
- Amiga_EXE_Header = BAD;
- }
- else
- Amiga_EXE_Header = GOOD;
- }
- else
- Amiga_EXE_Header = BAD;
-
-
-
- return GOOD;
- /* PW_l is the size of the pack */
-}
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-short testDefjam32pro ( void )
-{
-
- PW_Start_Address = PW_i;
-
- if ( (in_data[PW_Start_Address+16] != 0x3D ) ||
- (in_data[PW_Start_Address+17] != 0x40 ) ||
- (in_data[PW_Start_Address+18] != 0x00 ) ||
- (in_data[PW_Start_Address+19] != 0x9A ) ||
- (in_data[PW_Start_Address+20] != 0x3D ) ||
- (in_data[PW_Start_Address+21] != 0x40 ) ||
- (in_data[PW_Start_Address+22] != 0x00 ) ||
- (in_data[PW_Start_Address+23] != 0x9C ) )
- {
- /* should be enough :))) */
-/*printf ( "#2 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
-
- }
-
-
- /* packed size */
- PW_l = ( (in_data[PW_Start_Address+180]*256*256*256) +
- (in_data[PW_Start_Address+181]*256*256) +
- (in_data[PW_Start_Address+182]*256) +
- in_data[PW_Start_Address+183] );
-
- PW_l += 796;
-
- if ( PW_i >= 32 )
- {
- if ( (in_data[PW_Start_Address-32] != 0x00 ) ||
- (in_data[PW_Start_Address-31] != 0x00 ) ||
- (in_data[PW_Start_Address-30] != 0x03 ) ||
- (in_data[PW_Start_Address-29] != 0xF3 ) ||
- (in_data[PW_Start_Address-28] != 0x00 ) ||
- (in_data[PW_Start_Address-27] != 0x00 ) ||
- (in_data[PW_Start_Address-26] != 0x00 ) ||
- (in_data[PW_Start_Address-25] != 0x00 ) ||
- (in_data[PW_Start_Address-24] != 0x00 ) ||
- (in_data[PW_Start_Address-23] != 0x00 ) ||
- (in_data[PW_Start_Address-22] != 0x00 ) ||
- (in_data[PW_Start_Address-21] != 0x01 ) ||
- (in_data[PW_Start_Address-20] != 0x00 ) ||
- (in_data[PW_Start_Address-19] != 0x00 ) ||
- (in_data[PW_Start_Address-18] != 0x00 ) ||
- (in_data[PW_Start_Address-17] != 0x00 ) )
- {
- Amiga_EXE_Header = BAD;
- }
- else
- Amiga_EXE_Header = GOOD;
- }
- else
- Amiga_EXE_Header = BAD;
-
-
- return GOOD;
- /* PW_l is the size of the pack */
-
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-short testDefjam32 ( void )
-{
- PW_Start_Address = PW_i-2;
-
- if ( (in_data[PW_Start_Address+12] != 0x28 ) ||
- (in_data[PW_Start_Address+13] != 0x7A ) ||
- (in_data[PW_Start_Address+14] != 0x01 ) ||
- (in_data[PW_Start_Address+15] != 0x52 ) ||
- (in_data[PW_Start_Address+16] != 0x20 ) ||
- (in_data[PW_Start_Address+17] != 0x4C ) ||
- (in_data[PW_Start_Address+18] != 0xD1 ) ||
- (in_data[PW_Start_Address+19] != 0xFC ) ||
- (in_data[PW_Start_Address+24] != 0xB3 ) ||
- (in_data[PW_Start_Address+25] != 0xCC ) ||
- (in_data[PW_Start_Address+26] != 0x6E ) ||
- (in_data[PW_Start_Address+27] != 0x08 ) ||
- (in_data[PW_Start_Address+28] != 0x20 ) ||
- (in_data[PW_Start_Address+29] != 0x49 ) ||
- (in_data[PW_Start_Address+30] != 0xD1 ) ||
- (in_data[PW_Start_Address+31] != 0xFA ) ||
- (in_data[PW_Start_Address+32] != 0xFF ) ||
- (in_data[PW_Start_Address+33] != 0xF4 ) ||
- (in_data[PW_Start_Address+34] != 0x60 ) ||
- (in_data[PW_Start_Address+35] != 0x06 ) ||
- (in_data[PW_Start_Address+36] != 0x18 ) ||
- (in_data[PW_Start_Address+37] != 0xD9 ) ||
- (in_data[PW_Start_Address+38] != 0xB9 ) ||
- (in_data[PW_Start_Address+39] != 0xC8 ) ||
- (in_data[PW_Start_Address+40] != 0x6D ) ||
- (in_data[PW_Start_Address+41] != 0xFA ) ||
- (in_data[PW_Start_Address+42] != 0x43 ) ||
- (in_data[PW_Start_Address+43] != 0xF9 ) ||
- (in_data[PW_Start_Address+44] != 0x00 ) )
- {
- /* should be enough :))) */
- /*printf ( "#2 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
-
- }
-
-
- /* packed size */
- PW_l = ( (in_data[PW_Start_Address+20]*256*256*256) +
- (in_data[PW_Start_Address+21]*256*256) +
- (in_data[PW_Start_Address+22]*256) +
- in_data[PW_Start_Address+23] );
-
- PW_l += 692;
-
- if ( PW_i >= 32 )
- {
- if ( (in_data[PW_Start_Address-32] != 0x00 ) ||
- (in_data[PW_Start_Address-31] != 0x00 ) ||
- (in_data[PW_Start_Address-30] != 0x03 ) ||
- (in_data[PW_Start_Address-29] != 0xF3 ) ||
- (in_data[PW_Start_Address-28] != 0x00 ) ||
- (in_data[PW_Start_Address-27] != 0x00 ) ||
- (in_data[PW_Start_Address-26] != 0x00 ) ||
- (in_data[PW_Start_Address-25] != 0x00 ) ||
- (in_data[PW_Start_Address-24] != 0x00 ) ||
- (in_data[PW_Start_Address-23] != 0x00 ) ||
- (in_data[PW_Start_Address-22] != 0x00 ) ||
- (in_data[PW_Start_Address-21] != 0x01 ) ||
- (in_data[PW_Start_Address-20] != 0x00 ) ||
- (in_data[PW_Start_Address-19] != 0x00 ) ||
- (in_data[PW_Start_Address-18] != 0x00 ) ||
- (in_data[PW_Start_Address-17] != 0x00 ) )
- {
- Amiga_EXE_Header = BAD;
- }
- else
- Amiga_EXE_Header = GOOD;
- }
- else
- Amiga_EXE_Header = BAD;
-
- return GOOD;
- /* PW_l is the size of the pack */
-}
-
+++ /dev/null
-/* (3rd of April 2000)
- * bugs pointed out by Thomas Neumann .. thx :)
- * (May 2002)
- * added test_smps()
-*/
-
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-short testDI ( void )
-{
- /* test #1 */
- if ( PW_i < 17 )
- {
- return BAD;
- }
-
- /* test #2 (number of sample) */
- PW_Start_Address = PW_i-17;
- PW_k = (in_data[PW_Start_Address]*256)+in_data[PW_Start_Address+1];
- if ( PW_k > 31 )
- {
-/*printf ( "#1 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
-
- /* test #3 (finetunes and whole sample size) */
- /* PW_k = number of samples */
- PW_WholeSampleSize = 0;
- PW_l = 0;
- for ( PW_j=0 ; PW_j<PW_k ; PW_j++ )
- {
- PW_o = (((in_data[PW_Start_Address+(PW_j*8)+14]*256)+in_data[PW_Start_Address+(PW_j*8)+15])*2);
- PW_m = (((in_data[PW_Start_Address+(PW_j*8)+18]*256)+in_data[PW_Start_Address+(PW_j*8)+19])*2);
- PW_n = (((in_data[PW_Start_Address+(PW_j*8)+20]*256)+in_data[PW_Start_Address+(PW_j*8)+21])*2);
- if ( (PW_o > 0xffff) ||
- (PW_m > 0xffff) ||
- (PW_n > 0xffff) )
- {
-/*printf ( "#2 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- if ( test_smps(PW_o, PW_m, PW_n, in_data[PW_Start_Address+17+PW_j*8], in_data[PW_Start_Address+16+PW_j*8] ) == BAD )
- return BAD;
- /* gets total size of samples */
- PW_WholeSampleSize += PW_o;
- }
- if ( PW_WholeSampleSize <= 2 )
- {
-/*printf ( "#2,4\n" );*/
- return BAD;
- }
-
- /* test #4 (addresses of pattern in file ... possible ?) */
- /* PW_WholeSampleSize is the whole sample size */
- /* PW_k is still the number of sample */
- PW_m = PW_k;
- PW_j = (in_data[PW_Start_Address+2]*256*256*256)
- +(in_data[PW_Start_Address+3]*256*256)
- +(in_data[PW_Start_Address+4]*256)
- +in_data[PW_Start_Address+5];
- /* PW_j is the address of pattern table now */
- PW_k = (in_data[PW_Start_Address+6]*256*256*256)
- +(in_data[PW_Start_Address+7]*256*256)
- +(in_data[PW_Start_Address+8]*256)
- +in_data[PW_Start_Address+9];
- /* PW_k is the address of the pattern data */
- PW_l = (in_data[PW_Start_Address+10]*256*256*256)
- +(in_data[PW_Start_Address+11]*256*256)
- +(in_data[PW_Start_Address+12]*256)
- +in_data[PW_Start_Address+13];
- /* PW_l is the address of the sample data */
- if ( (PW_k <= PW_j)||(PW_l<=PW_j)||(PW_l<=PW_k) )
- {
-/*printf ( "#3 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- if ( (PW_k-PW_j) > 128 )
- {
-/*printf ( "#3,1 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- if ( (PW_k > PW_in_size)||(PW_l>PW_in_size)||(PW_j>PW_in_size) )
- {
-/*printf ( "#3 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
-
- /* test #4,1 :) */
- PW_m *= 8;
- PW_m += 2;
- if ( PW_j < PW_m )
- {
-/*printf ( "#4 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
-
- /* test #5 */
- if ( (PW_k + PW_Start_Address) > PW_in_size )
- {
-/*printf ( "#5 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
-
- /* test pattern table reliability */
- for ( PW_m=PW_j ; PW_m<(PW_k-1) ; PW_m++ )
- {
- if ( in_data[PW_Start_Address + PW_m] > 0x80 )
- {
-/*printf ( "#6 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- }
- /* test #6 ($FF at the end of pattern list ?) */
- if ( in_data[PW_Start_Address+PW_k-1] != 0xFF )
- {
-/*printf ( "#6,1 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
-
- /* test #7 (addres of sample data > $FFFF ? ) */
- /* PW_l is still the address of the sample data */
- if ( PW_l > 65535 )
- {
-/*printf ( "#7 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
-
- return GOOD;
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-short testDigiBooster17 ( void )
-{
- PW_Start_Address = PW_i;
-
- /* get nbr of pattern saved */
- PW_m = in_data[PW_Start_Address+46]; /*this value is -1 !*/
-
- /* test if there are pattern in pattern list > number of pattern saved */
- for ( PW_j=0 ; PW_j<128 ; PW_j++ )
- {
- if ( in_data[PW_Start_Address+48+PW_j] > PW_m )
- {
-/*printf ( "#1 (Start:%ld) (max pat:%ld) (pat wrong:%d)\n"
- , PW_Start_Address , PW_m , in_data[PW_Start_Address+48+PW_j] );*/
- return BAD;
- }
- }
-
- /* samples > $FFFFFF ) */
- /* PW_m is the number of pattern saved -1 */
- PW_WholeSampleSize = 0;
- for ( PW_j=0 ; PW_j<31 ; PW_j++ )
- {
- PW_o = ((in_data[PW_Start_Address+176+(PW_j*4)]*256*256*256)+
- (in_data[PW_Start_Address+177+(PW_j*4)]*256*256)+
- (in_data[PW_Start_Address+178+(PW_j*4)]*256)+
- in_data[PW_Start_Address+179+(PW_j*4)] );
- if ( PW_o > 0xFFFFFF )
- {
-/*printf ( "#2 (Start:%ld) (sample:%ld) (len:%ld)\n"
- , PW_Start_Address , PW_j , PW_o );*/
- return BAD;
- }
- /* volumes */
- if ( in_data[PW_Start_Address+548+PW_j] > 0x40 )
- {
-/*printf ( "#3 (Start:%ld) (sample:%ld) (vol:%d)\n"
- , PW_Start_Address , PW_j , in_data[PW_Start_Address+548+PW_j] );*/
- return BAD;
- }
- PW_WholeSampleSize += PW_o;
- }
-
-
- /* pattern sizes */
- /* PW_m is the number of pattern saved -1 */
- /* PW_WholeSampleSize is the whole sample size :) */
- PW_k = 1572; /* first pattern addy */
- for ( PW_j=0 ; PW_j<=PW_m ; PW_j++ )
- {
- PW_o = (in_data[PW_Start_Address+PW_k]*256)+in_data[PW_Start_Address+PW_k+1];
- /* size < 64 ? */
- if ( PW_o < 64 )
- {
-/*printf ( "#4 (Start:%ld) (pat size:%ld) (at:%ld)\n" , PW_Start_Address , PW_o , PW_k );*/
- return BAD;
- }
- PW_k += PW_o+2;
- }
-
-
- /* PW_m is the number of pattern saved -1 */
- /* PW_WholeSampleSize is the whole sample size :) */
- /* PW_k is the module size saves the samples data */
-
- return GOOD;
-}
-
+++ /dev/null
-/* (27 dec 2001)
- * added some checks to prevent readings outside of input file (in test 1)
- * (May 2002)
- * added test_smps()
-*/
-
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-short testEUREKA ( void )
-{
- /* test 1 */
- if ( (PW_i < 45) || ((PW_Start_Address+950)>=PW_in_size) )
- {
-/*printf ( "#1 (PW_i:%ld)\n" , PW_i );*/
- return BAD;
- }
-
- /* test 2 */
- PW_Start_Address = PW_i-45;
- PW_j = in_data[PW_Start_Address+950];
- if ( (PW_j==0) || (PW_j>127) )
- {
-/*printf ( "#2 (Start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
-
- /* test #3 finetunes & volumes */
- PW_WholeSampleSize = 0;
- for ( PW_k=0 ; PW_k<31 ; PW_k++ )
- {
- PW_o = (in_data[PW_Start_Address+42+PW_k*30]*256) + in_data[PW_Start_Address+43+PW_k*30];
- PW_m = (in_data[PW_Start_Address+46+PW_k*30]*256) + in_data[PW_Start_Address+47+PW_k*30];
- PW_n = (in_data[PW_Start_Address+48+PW_k*30]*256) + in_data[PW_Start_Address+49+PW_k*30];
- PW_o *= 2;
- PW_m *= 2;
- PW_n *= 2;
- if ( (PW_o > 0xffff) ||
- (PW_m > 0xffff) ||
- (PW_n > 0xffff) )
- {
-/*printf ( "#3 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- if ( test_smps ( PW_o+2, PW_m, PW_n, in_data[PW_Start_Address+45+PW_k*30], in_data[PW_Start_Address+44+PW_k*30] ) == BAD)
- return BAD;
- PW_WholeSampleSize += PW_o;
- }
-
-
- /* test 4 */
- PW_l = (in_data[PW_Start_Address+1080]*256*256*256)
- +(in_data[PW_Start_Address+1081]*256*256)
- +(in_data[PW_Start_Address+1082]*256)
- +in_data[PW_Start_Address+1083];
- if ( (PW_l+PW_Start_Address) > PW_in_size )
- {
-/*printf ( "#4 (Start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- if ( PW_l < 1084 )
- {
-/*printf ( "#4,1 (Start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- PW_m=0;
- /* pattern list */
- for ( PW_k=0 ; PW_k<PW_j ; PW_k++ )
- {
- PW_n = in_data[PW_Start_Address+952+PW_k];
- if ( PW_n > PW_m )
- PW_m = PW_n;
- if ( PW_n > 127 )
- {
-/*printf ( "#4,2 (Start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- }
- PW_k += 2; /* to be sure .. */
- while ( PW_k != 128 )
- {
- if ( in_data[PW_Start_Address+952+PW_k] != 0 )
- {
-/*printf ( "#4,3 (Start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- PW_k += 1;
- }
- PW_m += 1;
- /* PW_m is the highest pattern number */
-
-
- /* test #5 */
- /* PW_j is still the size if the pattern table */
- /* PW_l is still the address of the sample data */
- /* PW_m is the highest pattern number */
- PW_n=0;
- PW_j=999999l;
- for ( PW_k=0 ; PW_k<(PW_m*4) ; PW_k++ )
- {
- PW_o = (in_data[PW_Start_Address+PW_k*2+1084]*256)+in_data[PW_Start_Address+PW_k*2+1085];
- if ( (PW_o > PW_l) || (PW_o < 1084) )
- {
-/*printf ( "#5 (Start:%ld)(PW_k:%ld)(PW_j:%ld)(PW_l:%ld)\n" , PW_Start_Address,PW_k,PW_j,PW_l );*/
- return BAD;
- }
- if ( PW_o > PW_n )
- PW_n = PW_o;
- if ( PW_o < PW_j )
- PW_j = PW_o;
- }
- /* PW_o is the highest track address */
- /* PW_j is the lowest track address */
-
- /* test track datas */
- /* last track wont be tested ... */
- for ( PW_k=PW_j ; PW_k<PW_o ; PW_k++ )
- {
- if ( (in_data[PW_Start_Address+PW_k]&0xC0) == 0xC0 )
- continue;
- if ( (in_data[PW_Start_Address+PW_k]&0xC0) == 0x80 )
- {
- PW_k += 2;
- continue;
- }
- if ( (in_data[PW_Start_Address+PW_k]&0xC0) == 0x40 )
- {
- if ( ((in_data[PW_Start_Address+PW_k]&0x3F) == 0x00) &&
- (in_data[PW_Start_Address+PW_k+1] == 0x00) )
- {
-/*printf ( "#6 Start:%ld (at:%x)\n" , PW_Start_Address , PW_k );*/
- return BAD;
- }
- PW_k += 1;
- continue;
- }
- if ( (in_data[PW_Start_Address+PW_k]&0xC0) == 0x00 )
- {
- if ( in_data[PW_Start_Address+PW_k] > 0x13 )
- {
-/*printf ( "#6,1 Start:%ld (at:%x)\n" , PW_Start_Address , PW_k );*/
- return BAD;
- }
- PW_k += 3;
- continue;
- }
- }
-
- return GOOD;
-}
+++ /dev/null
-/*
- * update 18 mar 2003
- * - fake test replaced by good test :) -> more FC13 found
-*/
-
-
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-short testFC13 ( void )
-{
- PW_Start_Address = PW_i;
-
- /* file size < 113 */
- if ( (PW_in_size - PW_Start_Address) < 113 )
- {
- /*printf ( "#1 (start:%ld) (size:%ld)\n" , PW_Start_Address , PW_in_size-PW_Start_Address);*/
- return BAD;
- }
-
- /* get addy of 1st sample */
- PW_m = (( in_data[PW_Start_Address+32]*256*256*256)+
- ( in_data[PW_Start_Address+33]*256*256)+
- ( in_data[PW_Start_Address+34]*256)+
- in_data[PW_Start_Address+35] );
-
- /* test in-size again */
- if ( PW_Start_Address+PW_m > PW_in_size )
- {
- /*printf ( "#2 (start:%ld) (1st smp addy:%ld)\n" , PW_Start_Address , PW_m);*/
- return BAD;
- }
-
- /* test various addresses */
- PW_j = (( in_data[PW_Start_Address+8] *256*256*256)+
- ( in_data[PW_Start_Address+9] *256*256)+
- ( in_data[PW_Start_Address+10]*256)+
- in_data[PW_Start_Address+11] );
-
- PW_k = (( in_data[PW_Start_Address+16]*256*256*256)+
- ( in_data[PW_Start_Address+17]*256*256)+
- ( in_data[PW_Start_Address+18]*256)+
- in_data[PW_Start_Address+19] );
-
- PW_l = (( in_data[PW_Start_Address+24]*256*256*256)+
- ( in_data[PW_Start_Address+25]*256*256)+
- ( in_data[PW_Start_Address+26]*256)+
- in_data[PW_Start_Address+27] );
-
- /* test in-size again */
- if ( (PW_j > PW_in_size) || (PW_k > PW_in_size) || (PW_l > PW_in_size) )
- {
- /*printf ( "#2 (start:%ld) (PW_j:%ld) (PW_k:%ld) (PW_l:%ld)\n" , PW_Start_Address , PW_j, PW_k, PW_l);*/
- return BAD;
- }
-
- /* PW_m is the addy of the 1st sample */
- return GOOD;
-}
-
+++ /dev/null
-/*
- * update 18 mar 2003
- * - fake test replaced by good test :) -> more FC14 found
-*/
-
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-short testFC14 ( void )
-{
- PW_Start_Address = PW_i;
-
- /* file size < 193 */
- if ( (PW_in_size - PW_Start_Address) < 193 )
- {
-/*printf ( "#1 (start:%ld) (size:%ld)\n" , PW_Start_Address , PW_in_size-PW_Start_Address);*/
- return BAD;
- }
-
- /* get 1st sample addy */
- PW_m = (( in_data[PW_Start_Address+32]*256*256*256)+
- ( in_data[PW_Start_Address+33]*256*256)+
- ( in_data[PW_Start_Address+34]*256)+
- in_data[PW_Start_Address+35] );
-
- /* test in-size again */
- if ( PW_Start_Address+PW_m > PW_in_size )
- {
-/*printf ( "#2 (start:%ld) (1st smp addy:%ld)\n" , PW_Start_Address , PW_m);*/
- return BAD;
- }
-
- /* test various addresses */
- PW_j = (( in_data[PW_Start_Address+8] *256*256*256)+
- ( in_data[PW_Start_Address+9] *256*256)+
- ( in_data[PW_Start_Address+10]*256)+
- in_data[PW_Start_Address+11] );
-
- PW_k = (( in_data[PW_Start_Address+16]*256*256*256)+
- ( in_data[PW_Start_Address+17]*256*256)+
- ( in_data[PW_Start_Address+18]*256)+
- in_data[PW_Start_Address+19] );
-
- PW_l = (( in_data[PW_Start_Address+36]*256*256*256)+
- ( in_data[PW_Start_Address+37]*256*256)+
- ( in_data[PW_Start_Address+38]*256)+
- in_data[PW_Start_Address+39] );
-
- /* test in-size again */
- if ( (PW_j > PW_in_size) || (PW_k > PW_in_size) || (PW_l > PW_in_size) )
- {
-/*printf ( "#2 (start:%ld) (PW_j:%ld) (PW_k:%ld) (PW_l:%ld)\n"
- , PW_Start_Address , PW_j, PW_k, PW_l);*/
- return BAD;
- }
-
- /* PW_l is 1st waveform addy */
- return GOOD;
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-short testFC_M ( void )
-{
- /* test 1 */
- PW_Start_Address = PW_i;
- if ( in_data[PW_Start_Address + 4] != 0x01 )
- {
- return BAD;
- }
-
- /* test 2 */
- if ( in_data[PW_Start_Address + 5] != 0x00 )
- {
- return BAD;
- }
-
- /* test 3 */
- for ( PW_j=0 ; PW_j<31 ; PW_j++ )
- {
- if ( in_data[PW_Start_Address+37+8*PW_j] > 0x40 )
- {
- return BAD;
- }
- }
-
- return GOOD;
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-
-short testFuchsTracker ( void )
-{
- /* test #1 */
- if ( PW_i<192 )
- {
-/*printf ( "#1\n" );*/
- return BAD;
- }
- PW_Start_Address = PW_i-192;
-
- /* all sample size */
- PW_j = ((in_data[PW_Start_Address+10]*256*256*256)+
- (in_data[PW_Start_Address+11]*256*256)+
- (in_data[PW_Start_Address+12]*256)+
- in_data[PW_Start_Address+13] );
- if ( (PW_j <= 2) || (PW_j >= (65535*16)) )
- {
-/*printf ( "#1,1\n" );*/
- return BAD;
- }
-
-
-
- /* samples descriptions */
- PW_m=0;
- for ( PW_k = 0 ; PW_k < 16 ; PW_k ++ )
- {
- /* size */
- PW_o = (in_data[PW_Start_Address+PW_k*2+14]*256)+in_data[PW_Start_Address+PW_k*2+15];
- /* loop start */
- PW_n = (in_data[PW_Start_Address+PW_k*2+78]*256)+in_data[PW_Start_Address+PW_k*2+79];
-
- /* volumes */
- if ( in_data[PW_Start_Address+46+PW_k*2] > 0x40 )
- {
-/*printf ( "#2\n" );*/
- return BAD;
- }
- /* size < loop start ? */
- if ( PW_o < PW_n )
- {
-/*printf ( "#2,1 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- PW_m += PW_o;
- }
-
- /* PW_m is the size of all samples (in descriptions) */
- /* PW_j is the sample data sizes (header) */
- /* size<2 or size > header sample size ? */
- if ( (PW_m <= 2) || (PW_m > PW_j) )
- {
-/*printf ( "#2,2 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
-
- /* get highest pattern number in pattern list */
- PW_k=0;
- for ( PW_j=0 ; PW_j<40 ; PW_j++ )
- {
- PW_n = in_data[PW_Start_Address+PW_j*2+113];
- if ( PW_n > 40 )
- {
-/*printf ( "#3 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- if ( PW_n > PW_k )
- PW_k = PW_n;
- }
-
- /* PW_m is the size of all samples (in descriptions) */
- /* PW_k is the highest pattern data -1 */
- /* input file not long enough ? */
- PW_k += 1;
- PW_k *= 1024;
- if ( (PW_k+200) > PW_in_size )
- {
-/*printf ( "#4 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
-
- /* PW_m is the size of all samples (in descriptions) */
- /* PW_k is the pattern data size */
-
- return GOOD;
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-short testFUZZAC ( void )
-{
- PW_Start_Address = PW_i;
-
- /* test finetune */
- for ( PW_k=0 ; PW_k<31 ; PW_k++ )
- {
- if ( in_data[PW_Start_Address+72+PW_k*68] > 0x0F )
- {
- return BAD;
- }
- }
-
- /* test volumes */
- for ( PW_k=0 ; PW_k<31 ; PW_k++ )
- {
- if ( in_data[PW_Start_Address+73+PW_k*68] > 0x40 )
- {
- return BAD;
- }
- }
-
- /* test sample sizes */
- PW_WholeSampleSize = 0;
- for ( PW_k=0 ; PW_k<31 ; PW_k++ )
- {
- PW_j = (in_data[PW_Start_Address+66+PW_k*68]*256)+in_data[PW_Start_Address+67+PW_k*68];
- if ( PW_j > 0x8000 )
- {
- return BAD;
- }
- PW_WholeSampleSize += (PW_j * 2);
- }
-
- /* test size of pattern list */
- if ( in_data[PW_Start_Address+2114] == 0x00 )
- {
- return BAD;
- }
-
- return GOOD;
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-short testGMC ( void )
-{
- /* test #1 */
- if ( (PW_i<7) || ((PW_Start_Address+444)>PW_in_size) )
- {
-/*printf ( "#1\n" );*/
- return BAD;
- }
- PW_Start_Address = PW_i-7;
-
- /* samples descriptions */
- PW_WholeSampleSize=0;
- PW_j=0;
- for ( PW_k = 0 ; PW_k < 15 ; PW_k ++ )
- {
- PW_o = (in_data[PW_Start_Address+16*PW_k+4]*256)+in_data[PW_Start_Address+16*PW_k+5];
- PW_n = (in_data[PW_Start_Address+16*PW_k+12]*256)+in_data[PW_Start_Address+16*PW_k+13];
- PW_o *= 2;
- /* volumes */
- if ( in_data[PW_Start_Address + 7 + (16*PW_k)] > 0x40 )
- {
-/*printf ( "#2\n" );*/
- return BAD;
- }
- /* size */
- if ( PW_o > 0xFFFF )
- {
-/*printf ( "#2,1 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- if ( PW_n > PW_o )
- {
-/*printf ( "#2,2 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- PW_WholeSampleSize += PW_o;
- if ( PW_o != 0 )
- PW_j = PW_k+1;
- }
- if ( PW_WholeSampleSize <= 4 )
- {
-/*printf ( "#2,3 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- /* PW_j is the highest not null sample */
-
- /* pattern table size */
- if ( ( in_data[PW_Start_Address+243] > 0x64 ) ||
- ( in_data[PW_Start_Address+243] == 0x00 ) )
- {
- return BAD;
- }
-
- /* pattern order table */
- PW_l=0;
- for ( PW_n=0 ; PW_n<100 ; PW_n++ )
- {
- PW_k = ((in_data[PW_Start_Address+244+PW_n*2]*256)+
- in_data[PW_Start_Address+245+PW_n*2]);
- if ( ((PW_k/1024)*1024) != PW_k )
- {
-/*printf ( "#4 Start:%ld (PW_k:%ld)\n" , PW_Start_Address , PW_k);*/
- return BAD;
- }
- PW_l = ((PW_k/1024)>PW_l) ? PW_k/1024 : PW_l;
- }
- PW_l += 1;
- /* PW_l is the number of pattern */
- if ( (PW_l == 1) || (PW_l >0x64) )
- {
- return BAD;
- }
-
- /* test pattern data */
- PW_o = in_data[PW_Start_Address+243];
- PW_m = 0;
- for ( PW_k=0 ; PW_k<PW_l ; PW_k++ )
- {
- for ( PW_n=0 ; PW_n<256 ; PW_n++ )
- {
- if ( ( in_data[PW_Start_Address+444+PW_k*1024+PW_n*4] > 0x03 ) ||
- ( (in_data[PW_Start_Address+444+PW_k*1024+PW_n*4+2]&0x0f) >= 0x90 ))
- {
-/*printf ( "#5,0 Start:%ld (PW_k:%ld)\n" , PW_Start_Address , PW_k);*/
- return BAD;
- }
- if ( ((in_data[PW_Start_Address+444+PW_k*1024+PW_n*4+2]&0xf0)>>4) > PW_j )
- {
-/*printf ( "#5,1 Start:%ld (PW_j:%ld) (where:%ld) (value:%x)\n"
- , PW_Start_Address , PW_j , PW_Start_Address+444+PW_k*1024+PW_n*4+2
- , ((in_data[PW_Start_Address+444+PW_k*1024+PW_n*4+2]&0xf0)>>4) );*/
- return BAD;
- }
- if ( ((in_data[PW_Start_Address+444+PW_k*1024+PW_n*4+2]&0x0f) == 3) &&
- (in_data[PW_Start_Address+444+PW_k*1024+PW_n*4+3] > 0x40) )
- {
-/*printf ( "#5,2 Start:%ld (PW_j:%ld)\n" , PW_Start_Address , PW_j);*/
- return BAD;
- }
- if ( ((in_data[PW_Start_Address+444+PW_k*1024+PW_n*4+2]&0x0f) == 4) &&
- (in_data[PW_Start_Address+444+PW_k*1024+PW_n*4+3] > 0x63) )
- {
-/*printf ( "#5,3 Start:%ld (PW_j:%ld)\n" , PW_Start_Address , PW_j);*/
- return BAD;
- }
- if ( ((in_data[PW_Start_Address+444+PW_k*1024+PW_n*4+2]&0x0f) == 5) &&
- (in_data[PW_Start_Address+444+PW_k*1024+PW_n*4+3] > PW_o+1) )
- {
-/*printf ( "#5,4 Start:%ld (effect:5)(PW_o:%ld)(4th note byte:%x)\n" , PW_Start_Address , PW_j , in_data[PW_Start_Address+444+PW_k*1024+PW_n*4+3]);*/
- return BAD;
- }
- if ( ((in_data[PW_Start_Address+444+PW_k*1024+PW_n*4+2]&0x0f) == 6) &&
- (in_data[PW_Start_Address+444+PW_k*1024+PW_n*4+3] >= 0x02) )
- {
-/*printf ( "#5,5 Start:%ld (at:%ld)\n" , PW_Start_Address , PW_Start_Address+444+PW_k*1024+PW_n*4+3 );*/
- return BAD;
- }
- if ( ((in_data[PW_Start_Address+444+PW_k*1024+PW_n*4+2]&0x0f) == 7) &&
- (in_data[PW_Start_Address+444+PW_k*1024+PW_n*4+3] >= 0x02) )
- {
-/*printf ( "#5,6 Start:%ld (at:%ld)\n" , PW_Start_Address , PW_Start_Address+444+PW_k*1024+PW_n*4+3 );*/
- return BAD;
- }
- if ( ((in_data[PW_Start_Address+444+PW_k*1024+PW_n*4]&0x0f) > 0x00) || (in_data[PW_Start_Address+445+PW_k*1024+PW_n*4] > 0x00) )
- PW_m = 1;
- }
- }
- if ( PW_m == 0 )
- {
- /* only empty notes */
- return BAD;
- }
- /* PW_WholeSampleSize is the whole sample size */
-
- return GOOD;
-}
-
+++ /dev/null
-/* 22 mar 2003
- * GnuPlayer.c
- * based on XtC's description ! ... good job ! :).
- *
-*/
-
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-short testGnuPlayer ( void )
-{
- /* test #1 */
- if ( PW_i < 0x92 )
- {
- /*printf ( "#0 (start:%ld) \n", PW_i - 0x92 );*/
- return BAD;
- }
-
- /* test #2 smp size and loop start */
- PW_WholeSampleSize = 0;
- PW_o = 0; /* will hold the number of non-null samples */
- PW_Start_Address = PW_i - 0x92;
- for ( PW_k=0 ; PW_k<31 ; PW_k++ )
- {
- PW_j = (in_data[PW_Start_Address+20+PW_k*4]*256) + in_data[PW_Start_Address+21+PW_k*4];
- PW_l = (in_data[PW_Start_Address+22+PW_k*4]*256) + in_data[PW_Start_Address+23+PW_k*4];
- if ( PW_l > (PW_j+1) )
- {
- /*printf ( "#1 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- if ( PW_j != 0 ) PW_o += 1;
- PW_WholeSampleSize += PW_j;
- }
-
- return GOOD;
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-short testGPMO ( void )
-{
- /* test 1 */
- if ( PW_i < 1080 )
- {
- /*printf ( "#1 (PW_i:%ld)\n" , PW_i );*/
- return BAD;
- }
- /*if ( PW_Start_Address == 0)printf ("yo");*/
-
- /* test 2 */
- PW_Start_Address = PW_i-1080;
- for ( PW_k=0 ; PW_k<31 ; PW_k++ )
- {
- /* size */
- PW_j = (((in_data[PW_Start_Address+42+PW_k*30]*256)+in_data[PW_Start_Address+43+PW_k*30])*2);
- /* loop start */
- PW_m = (((in_data[PW_Start_Address+46+PW_k*30]*256)+in_data[PW_Start_Address+47+PW_k*30])*2);
- /* loop size */
- PW_n = (((in_data[PW_Start_Address+48+PW_k*30]*256)+in_data[PW_Start_Address+49+PW_k*30])*2);
-
- if ( test_smps (PW_j,PW_m,PW_n,in_data[PW_Start_Address+45+PW_k*30]/2,in_data[PW_Start_Address+44+PW_k*30]) == BAD )
- {
- /* printf ( "#2 (Start:%ld)(siz:%ld)(lstart:%ld)(lsiz:%ld)\n" , PW_Start_Address,PW_j,PW_m,PW_n );*/
- return BAD;
- }
- }
-
- /*if ( PW_Start_Address == 0)printf ("yo");*/
-
- /* test #4 pattern list size */
- PW_l = in_data[PW_Start_Address+950];
- if ( (PW_l>127) || (PW_l==0) )
- {
- /* printf ( "#4,0 (Start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
-
- /*if ( PW_Start_Address == 0)printf ("yo");*/
-
- /* PW_l holds the size of the pattern list */
- PW_k=0;
- for ( PW_j=0 ; PW_j<128 ; PW_j++ )
- {
- if ( in_data[PW_Start_Address+952+PW_j] > PW_k )
- PW_k = in_data[PW_Start_Address+952+PW_j];
- if ( in_data[PW_Start_Address+952+PW_j] > 127 )
- {
- /* printf ( "#4,1 (Start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- }
-
- /*if ( PW_Start_Address == 0)printf ("yo");*/
-
- /* PW_k holds the highest pattern number */
- /* test last patterns of the pattern list = 0 ? */
- PW_j += 2; /* found some obscure ptk :( */
- while ( PW_j < 128 )
- {
- if ( in_data[PW_Start_Address+952+PW_j] > 0x7f )
- {
- /* printf ( "#4,2 (Start:%ld) (PW_j:%ld) (at:%ld)\n" , PW_Start_Address,PW_j ,PW_Start_Address+952+PW_j );*/
- return BAD;
- }
- PW_j += 1;
- }
- /* PW_k is the number of pattern in the file (-1) */
- PW_k += 1;
-
- /* if ( PW_Start_Address == 0)printf ("yo");*/
-
- /* test #5 pattern data ... */
- if ( ((PW_k*1024)+1084+PW_Start_Address) > PW_in_size )
- {
- /* printf ( "#5,0 (Start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- for ( PW_j=0 ; PW_j<(PW_k*256) ; PW_j++ )
- {
- /* sample > 1f or pitch > 358 ? */
- if ( in_data[PW_Start_Address+1084+PW_j*4] > 0x13 )
- {
- /* printf ( "#5.1 (Start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- PW_l = ((in_data[PW_Start_Address+1084+PW_j*4]&0x0f)*256)+in_data[PW_Start_Address+1085+PW_j*4];
- if ( (PW_l>0) && (PW_l<0x1C) )
- {
- /* printf ( "#5,2 (Start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- }
-
- return GOOD;
-}
-
+++ /dev/null
-/* (May 2002)
- * added test_smps()
-*/
-
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-short testHEATSEEKER ( void )
-{
- int nbr_notes=0;
-
- if ( (PW_i < 3) || ((PW_i+375)>=PW_in_size))
- {
- return BAD;
- }
- PW_Start_Address = PW_i-3;
-
- /* size of the pattern table */
- if ( (in_data[PW_Start_Address+248] > 0x7f) ||
- (in_data[PW_Start_Address+248] == 0x00) )
- {
- return BAD;
- }
-
- /* test noisetracker byte */
- if ( in_data[PW_Start_Address+249] != 0x7f )
- {
- return BAD;
- }
-
- /* test samples */
- PW_WholeSampleSize = 0;
- for ( PW_k=0 ; PW_k<31 ; PW_k++ )
- {
- /* size */
- PW_j = (in_data[PW_Start_Address+PW_k*8]*256)+in_data[PW_Start_Address+1+PW_k*8];
- /* loop start */
- PW_m = (in_data[PW_Start_Address+PW_k*8+4]*256)+in_data[PW_Start_Address+5+PW_k*8];
- /* loop size */
- PW_n = (in_data[PW_Start_Address+PW_k*8+6]*256)+in_data[PW_Start_Address+7+PW_k*8];
- PW_j *= 2;
- PW_m *= 2;
- PW_n *= 2;
- if ( test_smps(PW_j, PW_m, PW_n, in_data[PW_Start_Address+3+PW_k*8], in_data[PW_Start_Address+2+PW_k*8] ) == BAD )
- return BAD;
- if ( (PW_j > 0xFFFF) ||
- (PW_m > 0xFFFF) ||
- (PW_n > 0xFFFF) )
- {
-/*printf ( "#5 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- PW_WholeSampleSize += PW_j;
- }
- if ( PW_WholeSampleSize <= 4 )
- {
-/*printf ( "#5,3 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
-
- /* test pattern table */
- PW_l = 0;
- for ( PW_j=0 ; PW_j<128 ; PW_j ++ )
- {
- if ( in_data[PW_Start_Address+250+PW_j] > 0x7f )
- {
- return BAD;
- }
- if ( in_data[PW_Start_Address+250+PW_j] > PW_l )
- PW_l = in_data[PW_Start_Address+250+PW_j];
- }
- /* PW_l = highest pattern number */
- if ( (PW_Start_Address + (PW_l*16) + 378) > PW_in_size )
- {
- /* PW_l*16 is the minimum size of all patterns */
- return BAD;
- }
-
- /* test notes */
- PW_k=0;
- PW_j=0;
- for ( PW_m=0 ; PW_m<=PW_l ; PW_m++ )
- {
- for ( PW_n=0 ; PW_n<4 ; PW_n++ )
- {
- for ( PW_o=0 ; PW_o<64 ; PW_o++ )
- {
- switch (in_data[PW_Start_Address+378+PW_j]&0xE0)
- {
- case 0x00:
- if ( ((in_data[PW_Start_Address+378+PW_j]&0x0F)>0x03) || (((in_data[PW_Start_Address+378+PW_j]&0x0F)==0x00) && (in_data[PW_Start_Address+379+PW_j]<0x71) && (in_data[PW_Start_Address+379+PW_j]!=0x00)))
- {
- /*printf ( "#6) start:%ld (%x) (at:%x) (PW_l:%ld)\n",PW_Start_Address, in_data[PW_Start_Address+378+PW_j], PW_Start_Address+378+PW_j,PW_l );*/
- return BAD;
- }
- if ( ((in_data[PW_Start_Address+380+PW_j]&0x0f) == 0x0d) && (in_data[PW_Start_Address+381+PW_j]>0x64))
- {
- /* printf ( "#6,5 Start:%ld cmd D arg : %x\n", PW_Start_Address, in_data[PW_Start_Address+381+PW_j] );*/
- return BAD;
- }
- PW_k += 4;
- PW_j += 4;
- if ( ((in_data[PW_Start_Address+378+PW_j]&0x0f)!=0x00) || (in_data[PW_Start_Address+379+PW_j]!=0x00))
- nbr_notes = 1;
- break;
- case 0x80:
- if (( in_data[PW_Start_Address+379+PW_j]!=0x00 ) || ( in_data[PW_Start_Address+380+PW_j]!=0x00 ))
- {
-/*printf ( "#7) start:%ld (%x) (at:%x)\n"
-,PW_Start_Address, in_data[PW_Start_Address+379+PW_j], PW_Start_Address+379+PW_j );*/
- return BAD;
- }
- PW_o += in_data[PW_Start_Address+381+PW_j];
- PW_j += 4;
- PW_k += 4;
- break;
- case 0xC0:
- if ( in_data[PW_Start_Address+379+PW_j]!=0x00 )
- {
-/*printf ( "#7) start:%ld (%x) (at:%x)\n"
-,PW_Start_Address, in_data[PW_Start_Address+379+PW_j], PW_Start_Address+379+PW_j );*/
- return BAD;
- }
- PW_o = 100;
- PW_j += 4;
- PW_k += 4;
- break;
- default:
- return BAD;
- break;
- }
- }
- }
- }
- if ( nbr_notes == 0 )
- {
- /* only empty notes */
- return BAD;
- }
-
- /* PW_k is the size of the pattern data */
- /* PW_WholeSampleSize is the size of the sample data */
- return GOOD;
-}
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-short testHQCCruncher2 ( void )
-{
- PW_Start_Address = PW_i - 64;
-
- if ( (in_data[PW_Start_Address+1776] != 0x02 ) ||
- (in_data[PW_Start_Address+1777] != 0x4D ) ||
- (in_data[PW_Start_Address+1778] != 0x45 ) ||
- (in_data[PW_Start_Address+1779] != 0x58 ) ||
- (in_data[PW_Start_Address+1780] != 0x00 ) ||
- (in_data[PW_Start_Address+1781] != 0x00 ) ||
- (in_data[PW_Start_Address+1782] != 0x03 ) ||
- (in_data[PW_Start_Address+1783] != 0xEC ) ||
- (in_data[PW_Start_Address+1784] != 0x00 ) ||
- (in_data[PW_Start_Address+1785] != 0x00 ) ||
- (in_data[PW_Start_Address+1786] != 0x00 ) ||
- (in_data[PW_Start_Address+1787] != 0x00 ) ||
- (in_data[PW_Start_Address+1788] != 0x00 ) ||
- (in_data[PW_Start_Address+1789] != 0x00 ) ||
- (in_data[PW_Start_Address+1790] != 0x03 ) ||
- (in_data[PW_Start_Address+1791] != 0xF2 ) )
- {
- /* should be enough :))) */
-/*printf ( "#2 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
-
- }
-
-
- /* packed size */
- PW_l = ( (in_data[PW_Start_Address+1808]*256*256*256) +
- (in_data[PW_Start_Address+1809]*256*256) +
- (in_data[PW_Start_Address+1810]*256) +
- in_data[PW_Start_Address+1811] );
-
- PW_l *= 4;
- PW_l += 1816;
-
-
-/* if ( PW_i >= 50 ) */
-/* { */
-/* if ( (in_data[PW_Start_Address-50] != 0x00 ) || */
-/* (in_data[PW_Start_Address-49] != 0x00 ) || */
-/* (in_data[PW_Start_Address-48] != 0x03 ) || */
-/* (in_data[PW_Start_Address-47] != 0xF3 ) || */
-/* (in_data[PW_Start_Address-46] != 0x00 ) || */
-/* (in_data[PW_Start_Address-45] != 0x00 ) || */
-/* (in_data[PW_Start_Address-44] != 0x00 ) || */
-/* (in_data[PW_Start_Address-43] != 0x00 ) || */
-/* (in_data[PW_Start_Address-42] != 0x00 ) || */
-/* (in_data[PW_Start_Address-41] != 0x00 ) || */
-/* (in_data[PW_Start_Address-40] != 0x00 ) || */
-/* (in_data[PW_Start_Address-39] != 0x02 ) || */
-/* (in_data[PW_Start_Address-38] != 0x00 ) || */
-/* (in_data[PW_Start_Address-37] != 0x00 ) || */
-/* (in_data[PW_Start_Address-36] != 0x00 ) || */
-/* (in_data[PW_Start_Address-35] != 0x00 ) ) */
-/* { */
-/* Amiga_EXE_Header = BAD; */
-/* } */
-/* else */
- Amiga_EXE_Header = GOOD;
-/* } */
-/* else */
-/* Amiga_EXE_Header = BAD; */
-
- return GOOD;
- /* PW_l is the size of the pack */
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-short testHRT ( void )
-{
- /* test 1 */
- if ( PW_i < 1080 )
- {
- return BAD;
- }
-
- /* test 2 */
- PW_Start_Address = PW_i-1080;
- for ( PW_j=0 ; PW_j<31 ; PW_j++ )
- {
- if ( in_data[45+PW_j*30+PW_Start_Address] > 0x40 )
- {
- return BAD;
- }
- }
-
- return GOOD;
-}
-
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-short testJamCracker ( void )
-{
- PW_Start_Address = PW_i;
-
- /* number of samples */
- PW_j = in_data[PW_Start_Address+5];
- if ( (PW_j == 0) || (PW_j > 0x1f) )
- {
-/*printf ( "#1 (start:%ld) (number of samples:%ld)\n" , PW_Start_Address , PW_j);*/
- return BAD;
- }
-
- /* sample sizes */
- /* PW_j is the number of sample */
- PW_WholeSampleSize = 0;
- for ( PW_k=0 ; PW_k<PW_j ; PW_k++ )
- {
- PW_l =((in_data[PW_Start_Address+38+PW_k*40]*256*256*256)+
- (in_data[PW_Start_Address+39+PW_k*40]*256*256)+
- (in_data[PW_Start_Address+40+PW_k*40]*256)+
- in_data[PW_Start_Address+41+PW_k*40] );
- if ( PW_l == 0 )
- {
-/*printf ( "#2 (Start:%ld) (sample:%ld) (size:%ld)\n" , PW_Start_Address , PW_k , PW_l );*/
- return BAD;
- }
- PW_WholeSampleSize += PW_l;
- }
-
- /* number of pattern saved */
- /* PW_j is the number of sample */
- /* PW_WholeSampleSize is the whole sample size :) */
- PW_l = in_data[PW_Start_Address+(PW_j*40)+7];
- /* test if more than FF patterns */
- if ( in_data[PW_Start_Address+(PW_j*40)+6] != 0 )
- {
-/*printf ( "#3 (Start:%ld) (number of pattern : %d,%ld)\n" , PW_Start_Address , in_data[PW_Start_Address+(PW_j*40)+6] , PW_l );*/
- return BAD;
- }
-
- /* size of pattern list */
- /* PW_j is the number of sample */
- /* PW_WholeSampleSize is the whole sample size :) */
- /* PW_l is the number of pattern saved */
- PW_m = in_data[PW_Start_Address+(PW_j*40)+9+(PW_l*6)];
- PW_n = in_data[PW_Start_Address+(PW_j*40)+8+(PW_l*6)];
- /* test if more than FF patterns */
- if ( PW_n != 0 )
- {
-/*printf ( "#4 (Start:%ld) (number of pattern : %ld,%ld)\n" , PW_Start_Address , PW_n , PW_m );*/
- return BAD;
- }
-
-
- /* PW_j is the number of sample */
- /* PW_WholeSampleSize is the whole sample size :) */
- /* PW_l is the number of pattern saved */
- /* PW_m is the size of the pattern list */
- return GOOD;
-}
-
+++ /dev/null
-/* (3rd of april 2000)
- * bugs pointed out by Thomas Neumann .. thx :)
-*/
-
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-short testKRIS ( void )
-{
- /* test 1 */
- if ( (PW_i<952) || ((PW_Start_Address+977)>PW_in_size) )
- {
- return BAD;
- }
-
- /* test 2 */
- PW_Start_Address = PW_i-952;
- for ( PW_j=0 ; PW_j<31 ; PW_j++ )
- {
- /* volume > 64 ? */
- if ( in_data[PW_Start_Address+47+PW_j*30] > 0x40 )
- {
- return BAD;
- }
- /* finetune > 15 ? */
- if ( in_data[PW_Start_Address+46+PW_j*30] > 0x0f )
- {
- return BAD;
- }
- }
-
- return GOOD;
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-short testKSM ( void )
-{
- PW_Start_Address = PW_i;
- if ( (PW_Start_Address + 1536) > PW_in_size)
- return BAD;
-
- /* test "a" */
- if ( in_data[PW_Start_Address+15] != 'a' )
- return BAD;
-
- /* test volumes */
- for ( PW_k=0 ; PW_k<15 ; PW_k++ )
- if ( in_data[PW_Start_Address+54+PW_k*32] > 0x40 )
- return BAD;
-
- /* test tracks data */
- /* first, get the highest track number .. */
- PW_j = 0;
- for ( PW_k=0 ; PW_k<1024 ; PW_k ++ )
- {
- if ( in_data[PW_Start_Address+PW_k+512] == 0xFF )
- break;
- if ( in_data[PW_Start_Address+PW_k+512] > PW_j )
- PW_j = in_data[PW_Start_Address+PW_k+512];
- }
- if ( PW_k == 1024 )
- {
-/*printf ( "#5 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- if ( PW_j == 0 )
- {
-/*printf ( "#6 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- /* so, now, PW_j is the highest track number (first is 00h !!) */
- /* real test on tracks data starts now */
- /* first, test if we don't get out of the file */
- if ( (PW_Start_Address + 1536 + PW_j*192 + 64*3) > PW_in_size )
- return BAD;
- /* now testing tracks */
- for ( PW_k = 0 ; PW_k <= PW_j ; PW_k++ )
- for ( PW_l=0 ; PW_l < 64 ; PW_l++ )
- if ( in_data[PW_Start_Address+1536+PW_k*192+PW_l*3] > 0x24 )
- return BAD;
-
- /* PW_j is still the highest track number */
- return GOOD;
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-
-short testMaxPacker12 ( void )
-{
- PW_Start_Address = PW_i;
-
- if ( (in_data[PW_Start_Address+16] != 0x01 ) ||
- (in_data[PW_Start_Address+17] != 0x70 ) ||
- (in_data[PW_Start_Address+18] != 0xD7 ) ||
- (in_data[PW_Start_Address+19] != 0xFA ) ||
- (in_data[PW_Start_Address+20] != 0x01 ) ||
- (in_data[PW_Start_Address+21] != 0x70 ) ||
- (in_data[PW_Start_Address+22] != 0x49 ) ||
- (in_data[PW_Start_Address+23] != 0xFA ) ||
- (in_data[PW_Start_Address+24] != 0x01 ) ||
- (in_data[PW_Start_Address+25] != 0x60 ) ||
- (in_data[PW_Start_Address+26] != 0x34 ) ||
- (in_data[PW_Start_Address+27] != 0x1C ) ||
- (in_data[PW_Start_Address+28] != 0x12 ) ||
- (in_data[PW_Start_Address+29] != 0x1C ) ||
- (in_data[PW_Start_Address+30] != 0x10 ) ||
- (in_data[PW_Start_Address+31] != 0x1C ) ||
- (in_data[PW_Start_Address+32] != 0x2C ) ||
- (in_data[PW_Start_Address+33] != 0x4B ) )
- {
- /* should be enough :))) */
-/*printf ( "#2 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
-
- }
-
-
- /* packed size */
- PW_l = ( (in_data[PW_Start_Address+384]*256*256*256) +
- (in_data[PW_Start_Address+385]*256*256) +
- (in_data[PW_Start_Address+386]*256) +
- in_data[PW_Start_Address+387] );
-
- PW_l += 429;
- PW_m = (PW_l/4)*4;
- if ( PW_m != PW_l )
- PW_l = PW_m + 4;
-
-
- if ( PW_i >= 32 )
- {
- if ( (in_data[PW_Start_Address-32] != 0x00 ) ||
- (in_data[PW_Start_Address-31] != 0x00 ) ||
- (in_data[PW_Start_Address-30] != 0x03 ) ||
- (in_data[PW_Start_Address-29] != 0xF3 ) ||
- (in_data[PW_Start_Address-28] != 0x00 ) ||
- (in_data[PW_Start_Address-27] != 0x00 ) ||
- (in_data[PW_Start_Address-26] != 0x00 ) ||
- (in_data[PW_Start_Address-25] != 0x00 ) ||
- (in_data[PW_Start_Address-24] != 0x00 ) ||
- (in_data[PW_Start_Address-23] != 0x00 ) ||
- (in_data[PW_Start_Address-22] != 0x00 ) ||
- (in_data[PW_Start_Address-21] != 0x01 ) ||
- (in_data[PW_Start_Address-20] != 0x00 ) ||
- (in_data[PW_Start_Address-19] != 0x00 ) ||
- (in_data[PW_Start_Address-18] != 0x00 ) ||
- (in_data[PW_Start_Address-17] != 0x00 ) )
- {
- Amiga_EXE_Header = BAD;
- }
- else
- Amiga_EXE_Header = GOOD;
- }
- else
- Amiga_EXE_Header = BAD;
-
- return GOOD;
- /* PW_l is the size of the pack */
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-short testMasterCruncher30addr ( void )
-{
-
- PW_Start_Address = PW_i;
-
- if ( (in_data[PW_Start_Address+16] != 0xD3 ) ||
- (in_data[PW_Start_Address+17] != 0xC9 ) ||
- (in_data[PW_Start_Address+18] != 0x58 ) ||
- (in_data[PW_Start_Address+19] != 0x89 ) ||
- (in_data[PW_Start_Address+20] != 0x2B ) ||
- (in_data[PW_Start_Address+21] != 0x49 ) ||
- (in_data[PW_Start_Address+124]!= 0xE3 ) ||
- (in_data[PW_Start_Address+125]!= 0x10 ) ||
- (in_data[PW_Start_Address+126]!= 0xE3 ) ||
- (in_data[PW_Start_Address+127]!= 0x51 ) ||
- (in_data[PW_Start_Address+128]!= 0x51 ) ||
- (in_data[PW_Start_Address+129]!= 0xCA ) ||
- (in_data[PW_Start_Address+130]!= 0xFF ) ||
- (in_data[PW_Start_Address+131]!= 0xF4 ) ||
- (in_data[PW_Start_Address+132]!= 0x4A ) ||
- (in_data[PW_Start_Address+133]!= 0x43 ) ||
- (in_data[PW_Start_Address+134]!= 0x67 ) ||
- (in_data[PW_Start_Address+135]!= 0x06 ) )
- {
- /* should be enough :))) */
-/*printf ( "#2 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
-
- }
-
-
- /* packed size */
- PW_l = ( (in_data[PW_Start_Address+428]*256*256*256) +
- (in_data[PW_Start_Address+429]*256*256) +
- (in_data[PW_Start_Address+430]*256) +
- in_data[PW_Start_Address+431] );
-
- PW_l *= 4;
- PW_l += 472;
-
- if ( PW_i >= 36 )
- {
- if ( (in_data[PW_Start_Address-36] != 0x00 ) ||
- (in_data[PW_Start_Address-35] != 0x00 ) ||
- (in_data[PW_Start_Address-34] != 0x03 ) ||
- (in_data[PW_Start_Address-33] != 0xF3 ) ||
- (in_data[PW_Start_Address-32] != 0x00 ) ||
- (in_data[PW_Start_Address-31] != 0x00 ) ||
- (in_data[PW_Start_Address-30] != 0x00 ) ||
- (in_data[PW_Start_Address-29] != 0x00 ) ||
- (in_data[PW_Start_Address-28] != 0x00 ) ||
- (in_data[PW_Start_Address-27] != 0x00 ) ||
- (in_data[PW_Start_Address-26] != 0x00 ) ||
- (in_data[PW_Start_Address-25] != 0x02 ) ||
- (in_data[PW_Start_Address-24] != 0x00 ) ||
- (in_data[PW_Start_Address-23] != 0x00 ) ||
- (in_data[PW_Start_Address-22] != 0x00 ) ||
- (in_data[PW_Start_Address-21] != 0x00 ) )
- {
- Amiga_EXE_Header = BAD;
- }
- else
- Amiga_EXE_Header = GOOD;
- }
- else
- Amiga_EXE_Header = BAD;
-
-
- return GOOD;
- /* PW_l is the size of the pack */
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-short testMegaCruncherObj ( void )
-{
- PW_Start_Address = PW_i;
-
- if ( (in_data[PW_Start_Address+12] != 0x4C ) ||
- (in_data[PW_Start_Address+13] != 0xDD ) ||
- (in_data[PW_Start_Address+14] != 0x00 ) ||
- (in_data[PW_Start_Address+15] != 0x03 ) ||
- (in_data[PW_Start_Address+16] != 0x4E ) ||
- (in_data[PW_Start_Address+17] != 0xAE ) ||
- (in_data[PW_Start_Address+18] != 0xFF ) ||
- (in_data[PW_Start_Address+19] != 0x3A ) ||
- (in_data[PW_Start_Address+20] != 0x4A ) ||
- (in_data[PW_Start_Address+21] != 0x80 ) ||
- (in_data[PW_Start_Address+22] != 0x67 ) ||
- (in_data[PW_Start_Address+23] != 0x30 ) ||
- (in_data[PW_Start_Address+24] != 0x41 ) ||
- (in_data[PW_Start_Address+25] != 0xFA ) ||
- (in_data[PW_Start_Address+26] != 0x00 ) ||
- (in_data[PW_Start_Address+27] != 0x0E ) )
- {
- /* should be enough :))) */
-/*printf ( "#2 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
-
- }
-
- /* packed size */
- PW_l = ( (in_data[PW_Start_Address+466]*256*256*256) +
- (in_data[PW_Start_Address+467]*256*256) +
- (in_data[PW_Start_Address+468]*256) +
- in_data[PW_Start_Address+469] );
- PW_l += 532;
-
- if ( PW_i >= 36 )
- {
- if ( (in_data[PW_Start_Address-36] != 0x00 ) ||
- (in_data[PW_Start_Address-35] != 0x00 ) ||
- (in_data[PW_Start_Address-34] != 0x03 ) ||
- (in_data[PW_Start_Address-33] != 0xF3 ) ||
- (in_data[PW_Start_Address-32] != 0x00 ) ||
- (in_data[PW_Start_Address-31] != 0x00 ) ||
- (in_data[PW_Start_Address-30] != 0x00 ) ||
- (in_data[PW_Start_Address-29] != 0x00 ) ||
- (in_data[PW_Start_Address-28] != 0x00 ) ||
- (in_data[PW_Start_Address-27] != 0x00 ) ||
- (in_data[PW_Start_Address-26] != 0x00 ) ||
- (in_data[PW_Start_Address-25] != 0x02 ) ||
- (in_data[PW_Start_Address-24] != 0x00 ) ||
- (in_data[PW_Start_Address-23] != 0x00 ) ||
- (in_data[PW_Start_Address-22] != 0x00 ) ||
- (in_data[PW_Start_Address-21] != 0x00 ) )
- {
- Amiga_EXE_Header = BAD;
- }
- else
- Amiga_EXE_Header = GOOD;
- }
- else
- Amiga_EXE_Header = BAD;
-
- return GOOD;
- /* PW_l is the size of the pack */
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-short testMegaCruncher10 ( void )
-{
- PW_Start_Address = PW_i;
-
- if ( (in_data[PW_Start_Address+16] != 0x22 ) ||
- (in_data[PW_Start_Address+17] != 0x6B ) ||
- (in_data[PW_Start_Address+18] != 0x00 ) ||
- (in_data[PW_Start_Address+19] != 0x04 ) ||
- (in_data[PW_Start_Address+20] != 0x24 ) ||
- (in_data[PW_Start_Address+21] != 0x60 ) ||
- (in_data[PW_Start_Address+22] != 0xD5 ) ||
- (in_data[PW_Start_Address+23] != 0xC9 ) ||
- (in_data[PW_Start_Address+24] != 0x20 ) ||
- (in_data[PW_Start_Address+25] != 0x20 ) ||
- (in_data[PW_Start_Address+26] != 0x72 ) ||
- (in_data[PW_Start_Address+27] != 0x03 ) ||
- (in_data[PW_Start_Address+28] != 0x61 ) ||
- (in_data[PW_Start_Address+29] != 0x00 ) ||
- (in_data[PW_Start_Address+30] != 0x01 ) ||
- (in_data[PW_Start_Address+31] != 0x02 ) )
- {
- /* should be enough :))) */
-/*printf ( "#2 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
-
- }
-
- /* packed size */
- PW_l = ( (in_data[PW_Start_Address+312]*256*256*256) +
- (in_data[PW_Start_Address+313]*256*256) +
- (in_data[PW_Start_Address+314]*256) +
- in_data[PW_Start_Address+315] );
-
- PW_l += 376;
-
- if ( PW_i >= 36 )
- {
- if ( (in_data[PW_Start_Address-36] != 0x00 ) ||
- (in_data[PW_Start_Address-35] != 0x00 ) ||
- (in_data[PW_Start_Address-34] != 0x03 ) ||
- (in_data[PW_Start_Address-33] != 0xF3 ) ||
- (in_data[PW_Start_Address-32] != 0x00 ) ||
- (in_data[PW_Start_Address-31] != 0x00 ) ||
- (in_data[PW_Start_Address-30] != 0x00 ) ||
- (in_data[PW_Start_Address-29] != 0x00 ) ||
- (in_data[PW_Start_Address-28] != 0x00 ) ||
- (in_data[PW_Start_Address-27] != 0x00 ) ||
- (in_data[PW_Start_Address-26] != 0x00 ) ||
- (in_data[PW_Start_Address-25] != 0x02 ) ||
- (in_data[PW_Start_Address-24] != 0x00 ) ||
- (in_data[PW_Start_Address-23] != 0x00 ) ||
- (in_data[PW_Start_Address-22] != 0x00 ) ||
- (in_data[PW_Start_Address-21] != 0x00 ) )
- {
- Amiga_EXE_Header = BAD;
- }
- else
- Amiga_EXE_Header = GOOD;
- }
- else
- Amiga_EXE_Header = BAD;
-
- return GOOD;
- /* PW_l is the size of the pack */
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-short testMegaCruncher12 ( void )
-{
- PW_Start_Address = PW_i;
-
- if ( (in_data[PW_Start_Address+16] != 0x22 ) ||
- (in_data[PW_Start_Address+17] != 0x6B ) ||
- (in_data[PW_Start_Address+18] != 0x00 ) ||
- (in_data[PW_Start_Address+19] != 0x04 ) ||
- (in_data[PW_Start_Address+20] != 0x24 ) ||
- (in_data[PW_Start_Address+21] != 0x60 ) ||
- (in_data[PW_Start_Address+22] != 0xD5 ) ||
- (in_data[PW_Start_Address+23] != 0xC9 ) ||
- (in_data[PW_Start_Address+24] != 0x20 ) ||
- (in_data[PW_Start_Address+25] != 0x20 ) ||
- (in_data[PW_Start_Address+26] != 0x72 ) ||
- (in_data[PW_Start_Address+27] != 0x03 ) ||
- (in_data[PW_Start_Address+28] != 0x61 ) ||
- (in_data[PW_Start_Address+29] != 0x00 ) ||
- (in_data[PW_Start_Address+30] != 0x01 ) ||
- (in_data[PW_Start_Address+31] != 0x06 ) )
- {
- /* should be enough :))) */
-/*printf ( "#2 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
-
- }
-
- /* packed size */
- PW_l = ( (in_data[PW_Start_Address+316]*256*256*256) +
- (in_data[PW_Start_Address+317]*256*256) +
- (in_data[PW_Start_Address+318]*256) +
- in_data[PW_Start_Address+319] );
-
- PW_l += 380;
-
- if ( PW_i >= 36 )
- {
- if ( (in_data[PW_Start_Address-36] != 0x00 ) ||
- (in_data[PW_Start_Address-35] != 0x00 ) ||
- (in_data[PW_Start_Address-34] != 0x03 ) ||
- (in_data[PW_Start_Address-33] != 0xF3 ) ||
- (in_data[PW_Start_Address-32] != 0x00 ) ||
- (in_data[PW_Start_Address-31] != 0x00 ) ||
- (in_data[PW_Start_Address-30] != 0x00 ) ||
- (in_data[PW_Start_Address-29] != 0x00 ) ||
- (in_data[PW_Start_Address-28] != 0x00 ) ||
- (in_data[PW_Start_Address-27] != 0x00 ) ||
- (in_data[PW_Start_Address-26] != 0x00 ) ||
- (in_data[PW_Start_Address-25] != 0x02 ) ||
- (in_data[PW_Start_Address-24] != 0x00 ) ||
- (in_data[PW_Start_Address-23] != 0x00 ) ||
- (in_data[PW_Start_Address-22] != 0x00 ) ||
- (in_data[PW_Start_Address-21] != 0x00 ) )
- {
- Amiga_EXE_Header = BAD;
- }
- else
- Amiga_EXE_Header = GOOD;
- }
- else
- Amiga_EXE_Header = BAD;
-
- return GOOD;
- /* PW_l is the size of the pack */
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-/* valid for MMD0 & MMD1 */
-short testMMD0 ( void )
-{
- PW_Start_Address = PW_i;
- if ( (PW_Start_Address + 52) > PW_in_size )
- return BAD;
-
- /* get the 'should be' module size */
- PW_k = ((in_data[PW_Start_Address+4]*256*256*256)+
- (in_data[PW_Start_Address+5]*256*256)+
- (in_data[PW_Start_Address+6]*256)+
- in_data[PW_Start_Address+7] );
-
- /* 52 : size of header */
- if ( PW_k < 52 )
- {
-/*printf ( "#1 (start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
-
- /* test flag byte : 1 or 0 */
- PW_j = in_data[PW_Start_Address+20];
- if ( PW_j > 1 )
- {
-/*printf ( "#2 (start:%ld) (flag:%ld)\n" , PW_Start_Address,PW_j );*/
- return BAD;
- }
-
- /* get struct MMD* addy */
- PW_j = ((in_data[PW_Start_Address+8] *256*256*256)+
- (in_data[PW_Start_Address+9] *256*256)+
- (in_data[PW_Start_Address+10]*256)+
- in_data[PW_Start_Address+11] );
- if ( (PW_j < 52) || (PW_j > PW_k) )
- {
-/*printf ( "#3 (start:%ld) (siz:%ld) (struct addy:%ld)\n" , PW_Start_Address,PW_k,PW_j );*/
- return BAD;
- }
-
- /* test 'reserved' bytes which should be set to 0x00 */
- if ( (in_data[PW_Start_Address+21] != 0x00) ||
- (in_data[PW_Start_Address+22] != 0x00) ||
- (in_data[PW_Start_Address+23] != 0x00))
- {
-/*printf ( "#4 (start:%ld) (21:%x) (22:%x) (23:%x)\n"
- , PW_Start_Address
- , in_data[PW_Start_Address+21]
- , in_data[PW_Start_Address+22]
- , in_data[PW_Start_Address+23]);*/
- return BAD;
- }
-
- /* stop it for now ... few/cheap tests here, I agree .. */
- /* PW_k is the module size */
-
- return GOOD;
-}
-
+++ /dev/null
-/* (May 2002)
- * added test_smps()
-*/
-
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-short testMP_noID ( void )
-{
- /* test #1 */
- if ( (PW_i < 3) || ((PW_i+375)>PW_in_size))
- {
- return BAD;
- }
-
- /* test #2 */
- PW_Start_Address = PW_i-3;
- PW_l=0;
- for ( PW_j=0 ; PW_j<31 ; PW_j++ )
- {
- /* size */
- PW_k = (((in_data[PW_Start_Address+8*PW_j]*256)+in_data[PW_Start_Address+1+8*PW_j])*2);
- /* loop start */
- PW_m = (((in_data[PW_Start_Address+4+8*PW_j]*256)+in_data[PW_Start_Address+5+8*PW_j])*2);
- /* loop size */
- PW_n = (((in_data[PW_Start_Address+6+8*PW_j]*256)+in_data[PW_Start_Address+7+8*PW_j])*2);
- PW_WholeSampleSize += PW_k;
-
- if ( test_smps(PW_k, PW_m, PW_n, in_data[PW_Start_Address+3+8*PW_j], in_data[PW_Start_Address+2+8*PW_j] ) == BAD )
- {
- /* printf ( "#2 Start:%ld (siz:%ld)(lstart:%ld)(lsiz:%ld)\n", PW_Start_Address,PW_k,PW_m,PW_n );*/
- return BAD;
- }
- }
- if ( PW_WholeSampleSize <= 2 )
- {
- /*printf( "#2,5 (start:%ld)\n",PW_Start_Address );*/
- return BAD;
- }
-
- /* test #3 */
- PW_l = in_data[PW_Start_Address+248];
- if ( (PW_l > 0x7f) || (PW_l == 0x00) )
- {
- /*printf( "#3 (Start:%ld)\n",PW_Start_Address );*/
- return BAD;
- }
-
- /* test #4 */
- /* PW_l contains the size of the pattern list */
- PW_k = 0;
- for ( PW_j=0 ; PW_j<128 ; PW_j++ )
- {
- if ( in_data[PW_Start_Address+250+PW_j] > PW_k )
- PW_k = in_data[PW_Start_Address+250+PW_j];
- if ( in_data[PW_Start_Address+250+PW_j] > 0x7f )
- {
- /*printf( "#4 (Start:%ld)\n",PW_Start_Address );*/
- return BAD;
- }
- if ( PW_j > PW_l+3 )
- if (in_data[PW_Start_Address+250+PW_j] != 0x00)
- {
- /*printf( "#4,1 (Start:%ld)\n",PW_Start_Address );*/
- return BAD;
- }
- }
- PW_k += 1;
-
- /* test #5 ptk notes .. gosh ! (testing all patterns !) */
- /* PW_k contains the number of pattern saved */
- /* PW_WholeSampleSize is the whole sample size */
- PW_m = 0;
- if ( PW_Start_Address + 379 + ((PW_k*256)*4) > PW_in_size )
- {
- return BAD;
- }
- for ( PW_j=0 ; PW_j<((256*PW_k)-4) ; PW_j++ )
- {
- PW_l = in_data[PW_Start_Address+378+PW_j*4+4];
- if ( PW_l > 19 ) /* 0x13 */
- {
- /*printf( "#5 (Start:%ld)(byte0:%x)(Where:%ld)\n",PW_Start_Address,in_data[PW_Start_Address+378+PW_j*4],PW_Start_Address+378+PW_j*4 );*/
- return BAD;
- }
- PW_l = in_data[PW_Start_Address+378+PW_j*4]&0x0f;
- PW_l *= 256;
- PW_l += in_data[PW_Start_Address+379+PW_j*4];
- PW_n = in_data[PW_Start_Address+380+PW_j*4]>>4;
- if ( PW_l != 0 )
- PW_m = 1;
- if ( PW_n != 0 )
- PW_o = 1;
- if ( (PW_l > 0) && (PW_l<0x71) )
- {
- /*printf ( "#5,1 (Start:%ld)(where:%ld)(note:%ld)\n" , PW_Start_Address,PW_Start_Address+378+PW_j*4, PW_l );*/
- return BAD;
- }
- }
- if ( (PW_m == 0) || (PW_o == 0) )
- {
- /* no note ... odd */
- /*printf ("#5,2 (Start:%ld)\n",PW_Start_Address);*/
- return BAD;
- }
-
- /* test #6 (loopStart+LoopSize > Sample ? ) */
- for ( PW_j=0 ; PW_j<31 ; PW_j++ )
- {
- PW_k = (((in_data[PW_Start_Address+PW_j*8]*256)+in_data[PW_Start_Address+1+PW_j*8])*2);
- PW_l = (((in_data[PW_Start_Address+4+PW_j*8]*256)+in_data[PW_Start_Address+5+PW_j*8])*2)
- +(((in_data[PW_Start_Address+6+PW_j*8]*256)+in_data[PW_Start_Address+7+PW_j*8])*2);
- if ( PW_l > (PW_k+2) )
- {
- /*printf( "#6 (Start:%ld)\n",PW_Start_Address );*/
- return BAD;
- }
- }
-
- return GOOD;
-}
-
-
-short testMP_withID ( void )
-{
- /* test #1 */
- PW_Start_Address = PW_i;
- for ( PW_j=0 ; PW_j<31 ; PW_j++ )
- {
- if ( in_data[PW_Start_Address+6+8*PW_j] > 0x0f )
- {
- return BAD;
- }
- }
-
- /* test #2 */
- PW_l = in_data[PW_Start_Address+252];
- if ( (PW_l > 0x7f) || (PW_l == 0x00) )
- {
- return BAD;
- }
-
- /* test #4 */
- PW_k = 0;
- for ( PW_j=0 ; PW_j<128 ; PW_j++ )
- {
- if ( in_data[PW_Start_Address+254+PW_j] > PW_k )
- PW_k = in_data[PW_Start_Address+254+PW_j];
- if ( in_data[PW_Start_Address+254+PW_j] > 0x7f )
- {
- return BAD;
- }
- }
- PW_k += 1;
-
- /* test #5 ptk notes .. gosh ! (testing all patterns !) */
- /* PW_k contains the number of pattern saved */
- for ( PW_j=0 ; PW_j<(256*PW_k) ; PW_j++ )
- {
- PW_l = in_data[PW_Start_Address+382+PW_j*4];
- if ( PW_l > 19 ) /* 0x13 */
- {
- return BAD;
- }
- }
-
- return GOOD;
-}
-
-
+++ /dev/null
-/*
- * newtron.c ... 9 mar 2003
-*/
-
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-short testNewtron ( void )
-{
- /* test #1 */
- if ( (PW_i < 7) || ((PW_i+373+1024+2)>PW_in_size))
- {
- return BAD;
- }
-
- /* test #1.5 */
- if ( in_data[PW_i-6] != 0x00 )
- {
- return BAD;
- }
-
- /* test #2 */
- PW_Start_Address = PW_i-7;
- PW_l=0;
- PW_WholeSampleSize = 0;
- for ( PW_j=0 ; PW_j<31 ; PW_j+=1 )
- {
- /* size */
- PW_k = (((in_data[PW_Start_Address+4+8*PW_j]*256)+in_data[PW_Start_Address+5+8*PW_j])*2);
- /* loop start */
- PW_m = (((in_data[PW_Start_Address+8+8*PW_j]*256)+in_data[PW_Start_Address+9+8*PW_j])*2);
- /* loop size */
- PW_n = (((in_data[PW_Start_Address+10+8*PW_j]*256)+in_data[PW_Start_Address+11+8*PW_j])*2);
- PW_WholeSampleSize += PW_k;
-
- if ( test_smps(PW_k, PW_m, PW_n, in_data[PW_Start_Address+7+8*PW_j], in_data[PW_Start_Address+6+8*PW_j] ) == BAD )
- {
- /* printf ( "#2 (start:%ld),(siz:%ld)(loopstart:%ld)(lsiz:%ld)(vol:%d)(fine:%d)(where:%ld)(PW_j:%ld)\n"
- ,PW_Start_Address,PW_k,PW_m,PW_n, in_data[PW_Start_Address+7+8*PW_j], in_data[PW_Start_Address+6+8*PW_j]
- ,PW_j*8+4+PW_Start_Address,PW_j );*/
- return BAD;
- }
- }
-
- if ( PW_WholeSampleSize <= 2 )
- {
- /* printf( "#3\n" );*/
- return BAD;
- }
-
- /* test #4 */
- PW_l = in_data[PW_Start_Address];
- if ( (PW_l > 0x7f) || (PW_l == 0x00) )
- {
- /* printf( "#4 (start:%ld)(indata[0]:%x)\n",PW_Start_Address,in_data[PW_Start_Address] );*/
- return BAD;
- }
-
- /* test #5 */
- /* PW_l contains the size of the pattern list */
- PW_k = 0;
- for ( PW_j=0 ; PW_j<128 ; PW_j++ )
- {
- if ( in_data[PW_Start_Address+252+PW_j] > PW_k )
- PW_k = in_data[PW_Start_Address+252+PW_j];
- if ( in_data[PW_Start_Address+252+PW_j] > 0x7f )
- {
- /*printf( "#5\n" );*/
- return BAD;
- }
- }
- PW_k += 1;
-
- /* #6 */
- if ( ((PW_k*1024) + 380) != ((in_data[PW_Start_Address+2]*256)+in_data[PW_Start_Address+3]+4))
- {
- return BAD;
- }
-
- /* test #7 ptk notes .. gosh ! (testing all patterns !) */
- /* PW_k contains the number of pattern saved */
- /* PW_WholeSampleSize is the whole sample size */
- for ( PW_j=0 ; PW_j<(256*PW_k) ; PW_j++ )
- {
- PW_l = in_data[PW_Start_Address+380+PW_j*4];
- if ( PW_l > 19 ) /* 0x13 */
- {
- /*printf( "#7,0\n" );*/
- return BAD;
- }
- PW_m = in_data[PW_Start_Address+380+PW_j*4]&0x0f;
- PW_m *= 256;
- PW_m += in_data[PW_Start_Address+381+PW_j*4];
- if ( (PW_m > 0) && (PW_m<0x71) )
- {
- /*printf ( "#7,1 (Start:%ld)(where:%ld)(note:%ld)\n" , PW_Start_Address,PW_Start_Address+380+PW_j*4, PW_WholeSampleSize );*/
- return BAD;
- }
- }
-
- return GOOD;
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-/* Noise from Heaven Chipdisk (21 oct 2001) by Iris */
-
-short testNFH ( void )
-{
- /* test 1 */
- if ( PW_i < 1080 )
- {
-/*printf ( "#1 (PW_i:%ld)\n" , PW_i );*/
- return BAD;
- }
-
- /* test 2 */
- PW_Start_Address = PW_i-1080;
- PW_WholeSampleSize = 0;
- for ( PW_k=0 ; PW_k<31 ; PW_k++ )
- {
- /* size */
- PW_j = (((in_data[PW_Start_Address+42+PW_k*30]*256)+in_data[PW_Start_Address+43+PW_k*30])*2);
- /* loop start */
- PW_m = (((in_data[PW_Start_Address+46+PW_k*30]*256)+in_data[PW_Start_Address+47+PW_k*30])*2);
- /* loop size */
- PW_n = (((in_data[PW_Start_Address+48+PW_k*30]*256)+in_data[PW_Start_Address+49+PW_k*30])*2);
-
- if ( test_smps(PW_j*2, PW_m, PW_n, in_data[PW_Start_Address+45+30*PW_k], in_data[PW_Start_Address+44+30*PW_k] ) == BAD )
- {
- /*printf ( "start : %ld\n", PW_Start_Address );*/
- return BAD;
- }
-
- PW_WholeSampleSize += PW_j;
- }
-
- /* test #4 pattern list size */
- PW_l = in_data[PW_Start_Address+950];
- if ( (PW_l>127) || (PW_l==0) )
- {
- /*printf ( "#4,0 (Start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- /* PW_l holds the size of the pattern list */
- PW_k=0;
- for ( PW_j=0 ; PW_j<128 ; PW_j++ )
- {
- if ( in_data[PW_Start_Address+952+PW_j] > PW_k )
- PW_k = in_data[PW_Start_Address+952+PW_j];
- if ( in_data[PW_Start_Address+952+PW_j] > 127 )
- {
- /*printf ( "#4,1 (Start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- }
- /* PW_k holds the highest pattern number */
- /* test last patterns of the pattern list = 0 ? */
- PW_j += 2; /* found some obscure ptk :( */
- while ( PW_j < 128 )
- {
- if ( in_data[PW_Start_Address+952+PW_j] > 0x7f )
- {
- /*printf ( "#4,2 (Start:%ld) (PW_j:%ld) (at:%ld)\n" , PW_Start_Address,PW_j ,PW_Start_Address+952+PW_j );*/
- return BAD;
- }
- PW_j += 1;
- }
- /* PW_k is the number of pattern in the file (-1) */
- PW_k += 1;
-
-
- /* test #5 pattern data ... */
- if ( ((PW_k*1024)+1084+PW_Start_Address) > PW_in_size )
- {
-/*printf ( "#5,0 (Start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
-
- return GOOD;
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-short testNoiserunner ( void )
-{
- /* test 1 */
- if ( PW_i < 1080 )
- {
- return BAD;
- }
-
- /* test 2 */
- PW_Start_Address = PW_i-1080;
- PW_WholeSampleSize = 0;
- for ( PW_k=0 ; PW_k<31 ; PW_k++ )
- {
- PW_j = (((in_data[PW_Start_Address+6+PW_k*16]*256)+in_data[PW_Start_Address+7+PW_k*16])*2);
- if ( PW_j > 0xFFFF )
- {
-/*printf ( "#2 (Start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- /* volumes */
- if ( in_data[PW_Start_Address+1+PW_k*16] > 0x40 )
- {
-/*printf ( "#3 (Start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- PW_WholeSampleSize += PW_j;
- }
- if ( PW_WholeSampleSize == 0 )
- {
- return BAD;
- }
- /* PW_WholeSampleSize is the size of all the sample data */
-
- /* test #4 pattern list size */
- PW_l = in_data[PW_Start_Address+950];
- if ( (PW_l>127) || (PW_l==0) )
- {
-/*printf ( "#4,0 (Start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- /* PW_l holds the size of the pattern list */
- PW_k=0;
- for ( PW_j=0 ; PW_j<PW_l ; PW_j++ )
- {
- if ( in_data[PW_Start_Address+952+PW_j] > PW_k )
- PW_k = in_data[PW_Start_Address+952+PW_j];
- if ( in_data[PW_Start_Address+952+PW_j] > 127 )
- {
-/*printf ( "#4,1 (Start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- }
- /* PW_k holds the highest pattern number */
- /* test last patterns of the pattern list = 0 ? */
- while ( PW_j != 128 )
- {
- if ( in_data[PW_Start_Address+952+PW_j] != 0 )
- {
-/*printf ( "#4,2 (Start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- PW_j += 1;
- }
- /* PW_k is the number of pattern in the file (-1) */
- PW_k += 1;
-
- /* test if we read outside of the file */
- if ( (PW_Start_Address+PW_k*256) > PW_in_size )
- return BAD;
-
- /* test #5 pattern data ... */
- for ( PW_j=0 ; PW_j<(PW_k*256) ; PW_j++ )
- {
- /* note > 48h ? */
- if ( in_data[PW_Start_Address+1086+PW_j*4] > 0x48 )
- {
-/*printf ( "#5.1 (Start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- PW_l = in_data[PW_Start_Address+1087+PW_j*4];
- if ( ((PW_l/8)*8) != PW_l )
- {
-/*printf ( "#5,2 (Start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- PW_l = in_data[PW_Start_Address+1084+PW_j*4];
- if ( ((PW_l/4)*4) != PW_l )
- {
-/*printf ( "#5,2 (Start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- }
-
- return GOOD;
-}
-
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-short testNoisepacker1 ( void )
-{
- if ( PW_i < 15 )
- {
- return BAD;
- }
- PW_Start_Address = PW_i-15;
-
- /* size of the pattern table */
- PW_j = (in_data[PW_Start_Address+2]*256)+in_data[PW_Start_Address+3];
- if ( (((PW_j/2)*2) != PW_j) || (PW_j == 0) )
- {
-/*printf ( "#2 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- /* PW_j is the size of the pattern list (*2) */
-
- /* test nbr of samples */
- if ( (in_data[PW_Start_Address+1]&0x0f) != 0x0C )
- {
-/*printf ( "#3,0 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- PW_l = ((in_data[PW_Start_Address]<<4)&0xf0)|((in_data[PW_Start_Address+1]>>4)&0x0f);
- if ( (PW_l > 0x1F) || (PW_l == 0) || ((PW_Start_Address+PW_j+8+PW_l*8)>PW_in_size))
- {
-/*printf ( "#3 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- /* PW_l is the number of samples */
-
- /* test volumes */
- for ( PW_k=0 ; PW_k<PW_l ; PW_k++ )
- {
- if ( in_data[PW_Start_Address+15+PW_k*16] > 0x40 )
- {
-/*printf ( "#3,1 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- }
-
- /* test sample sizes */
- PW_WholeSampleSize=0;
- for ( PW_k=0 ; PW_k<PW_l ; PW_k++ )
- {
- PW_o = (in_data[PW_Start_Address+PW_k*16+12]*256)+in_data[PW_Start_Address+PW_k*16+13];
- PW_m = (in_data[PW_Start_Address+PW_k*16+20]*256)+in_data[PW_Start_Address+PW_k*16+21];
- PW_n = (in_data[PW_Start_Address+PW_k*16+22]*256)+in_data[PW_Start_Address+PW_k*16+23];
- PW_o *= 2;
- PW_m *= 2;
- if ( (PW_o > 0xFFFF) ||
- (PW_m > 0xFFFF) ||
- (PW_n > 0xFFFF) )
- {
-/*printf ( "#5 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- if ( (PW_m + PW_n) > (PW_o+2) )
- {
-/*printf ( "#5,1 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- if ( (PW_n != 0) && (PW_m == 0) )
- {
-/*printf ( "#5,2 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- PW_WholeSampleSize += PW_o;
- }
- if ( PW_WholeSampleSize <= 4 )
- {
-/*printf ( "#5,3 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
-
-
- /* small shit to gain some vars */
- PW_l *= 16;
- PW_l += 8;
- PW_l += 4;
- /* PW_l is now the size of the header 'til the end of sample descriptions */
- if (PW_l+PW_Start_Address > PW_in_size )
- {
- return BAD;
- }
-
-
- /* test pattern table */
- PW_n=0;
- for ( PW_k=0 ; PW_k<PW_j ; PW_k += 2 )
- {
- PW_m = ((in_data[PW_Start_Address+PW_l+PW_k]*256)+in_data[PW_Start_Address+PW_l+PW_k+1]);
- if ( ((PW_m/8)*8) != PW_m )
- {
-/*printf ( "#6 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- if ( PW_m > PW_n )
- PW_n = PW_m;
- }
- PW_l += PW_j;
- PW_l += PW_n;
- PW_l += 8; /*paske on a que l'address du dernier pattern .. */
- /* PW_l is now the size of the header 'til the end of the track list */
- /* PW_j is now available for use :) */
-
- /* test track data size */
- PW_k = (in_data[PW_Start_Address+6]*256)+in_data[PW_Start_Address+7];
- if ( (PW_k < 192) || (((PW_k/192)*192) != PW_k) )
- {
- /*printf ( "#7 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
-
- /* test notes */
- for ( PW_m=0 ; PW_m < PW_k ; PW_m+=3 )
- {
- if ( PW_Start_Address + PW_l + PW_m > PW_in_size )
- {
-/*printf ( "#8,0 Start:%ld\n", PW_Start_Address );*/
- return BAD;
- }
- if ( in_data[PW_Start_Address+PW_l+PW_m] > 0x49 )
- {
- /*printf ( "#8 Start:%ld (at %x)(PW_k:%x)(PW_l:%x)(PW_m:%x)\n" , PW_Start_Address,PW_Start_Address+PW_l+PW_m,PW_k,PW_l,PW_m );*/
- return BAD;
- }
- }
-
- /* PW_WholeSampleSize is the size of the sample data */
- /* PW_l is the size of the header 'til the track datas */
- /* PW_k is the size of the track datas */
- return GOOD;
-}
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-short testNoisepacker2 ( void )
-{
- if ( PW_i < 15 )
- {
- return BAD;
- }
- PW_Start_Address = PW_i-15;
-
- /* size of the pattern table */
- PW_j = (in_data[PW_Start_Address+2]*256)+in_data[PW_Start_Address+3];
- if ( (((PW_j/2)*2) != PW_j) || (PW_j == 0) )
- {
-/*printf ( "#2 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- /* PW_j is the size of the pattern list (*2) */
-
- /* test nbr of samples */
- if ( (in_data[PW_Start_Address+1]&0x0f) != 0x0C )
- {
-/*printf ( "#3,0 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- PW_l = ((in_data[PW_Start_Address]<<4)&0xf0)|((in_data[PW_Start_Address+1]>>4)&0x0f);
- if ( (PW_l > 0x1F) || (PW_l == 0) || ((PW_Start_Address+8+PW_j+PW_l*8)>PW_in_size))
- {
-/*printf ( "#3 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- /* PW_l is the number of samples */
-
- /* test volumes */
- for ( PW_k=0 ; PW_k<PW_l ; PW_k++ )
- {
- if ( in_data[PW_Start_Address+15+PW_k*16] > 0x40 )
- {
- return BAD;
- }
- }
-
- /* test sample sizes */
- PW_WholeSampleSize=0;
- for ( PW_k=0 ; PW_k<PW_l ; PW_k++ )
- {
- PW_o = (in_data[PW_Start_Address+PW_k*16+12]*256)+in_data[PW_Start_Address+PW_k*16+13];
- PW_m = (in_data[PW_Start_Address+PW_k*16+20]*256)+in_data[PW_Start_Address+PW_k*16+21];
- PW_n = (in_data[PW_Start_Address+PW_k*16+22]*256)+in_data[PW_Start_Address+PW_k*16+23];
- PW_o *= 2;
- PW_m *= 2;
- PW_n *= 2;
- if ( (PW_o > 0xFFFF) ||
- (PW_m > 0xFFFF) ||
- (PW_n > 0xFFFF) )
- {
-/*printf ( "#5 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- if ( (PW_m + PW_n) > (PW_o+2) )
- {
-/*printf ( "#5,1 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- if ( (PW_n != 0) && (PW_m == 0) )
- {
-/*printf ( "#5,2 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- PW_WholeSampleSize += PW_o;
- }
- if ( PW_WholeSampleSize <= 4 )
- {
-/*printf ( "#5,3 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
-
-
- /* small shit to gain some vars */
- PW_l *= 16;
- PW_l += 8;
- PW_l += 4;
- /* PW_l is now the size of the header 'til the end of sample descriptions */
- if ( PW_l+PW_Start_Address > PW_in_size )
- {
-/* printf ( "#5,4 Start:%ld\n", PW_Start_Address);*/
- return BAD;
- }
-
-
- /* test pattern table */
- PW_n=0;
- for ( PW_k=0 ; PW_k<PW_j ; PW_k += 2 )
- {
- PW_m = ((in_data[PW_Start_Address+PW_l+PW_k]*256)+in_data[PW_Start_Address+PW_l+PW_k+1]);
- if ( ((PW_m/8)*8) != PW_m )
- {
-/*printf ( "#6 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- if ( PW_m > PW_n )
- PW_n = PW_m;
- }
- PW_l += PW_j;
- PW_l += PW_n;
- PW_l += 8; /*paske on a que l'address du dernier pattern .. */
- /* PW_l is now the size of the header 'til the end of the track list */
- /* PW_n is the highest pattern number (*8) */
- /* PW_j is now available for use :) */
- if ( PW_l+PW_Start_Address>PW_in_size)
- {
-/* printf ( "#6,1 Start:%ld\n", PW_Start_Address);*/
- return BAD;
- }
-
- /* test track data size */
- PW_k = (in_data[PW_Start_Address+6]*256)+in_data[PW_Start_Address+7];
- if ( (PW_k < 192) || (((PW_k/192)*192) != PW_k) )
- {
-/*printf ( "#7 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
-
- /* test notes */
- PW_j = ((in_data[PW_Start_Address]<<4)&0xf0)|((in_data[PW_Start_Address+1]>>4)&0x0f);
- for ( PW_m=0 ; PW_m < PW_k ; PW_m+=3 )
- {
- if ( PW_Start_Address + PW_l + PW_m > PW_in_size )
- {
- /* printf ( "#8,0 Start:%ld\n", PW_Start_Address);*/
- return BAD;
- }
- if ( in_data[PW_Start_Address+PW_l+PW_m] > 0x49 )
- {
-/*printf ( "#8 Start:%ld (at %x)(PW_k:%x)(PW_l:%x)(PW_m:%x)\n" , PW_Start_Address,PW_Start_Address+PW_l+PW_m,PW_k,PW_l,PW_m );*/
- return BAD;
- }
- if ( (((in_data[PW_Start_Address+PW_l+PW_m]<<4)&0x10)|
- ((in_data[PW_Start_Address+PW_l+PW_m+1]>>4)&0x0f)) > PW_j )
- {
-/*printf ( "#8,1 Start:%ld (at %x)(PW_k:%x)(PW_l:%x)(PW_m:%x)(PW_j:%ld)\n" , PW_Start_Address,PW_Start_Address+PW_l+PW_m,PW_k,PW_l,PW_m,PW_j );*/
- return BAD;
- }
- PW_n = (in_data[PW_Start_Address+PW_l+PW_m+1]&0x0F);
- if ( (PW_n == 0) && (in_data[PW_Start_Address+PW_l+PW_m+2] != 0x00) )
- {
-/*printf ( "#8,2 Start:%ld (at %x)(PW_k:%x)(PW_l:%x)(PW_m:%x)(PW_j:%ld)\n" , PW_Start_Address,PW_Start_Address+PW_l+PW_m,PW_k,PW_l,PW_m,PW_j );*/
- return BAD;
- }
- }
-
- /* PW_WholeSampleSize is the size of the sample data */
- /* PW_l is the size of the header 'til the track datas */
- /* PW_k is the size of the track datas */
- return GOOD;
-}
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-short testNoisepacker3 ( void )
-{
- if ( PW_i < 9 )
- {
- return BAD;
- }
- PW_Start_Address = PW_i-9;
-
- /* size of the pattern table */
- PW_j = (in_data[PW_Start_Address+2]*256)+in_data[PW_Start_Address+3];
- if ( (((PW_j/2)*2) != PW_j) || (PW_j == 0) )
- {
-/*printf ( "#2 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- /* PW_j is the size of the pattern list (*2) */
-
- /* test nbr of samples */
- if ( (in_data[PW_Start_Address+1]&0x0f) != 0x0C )
- {
-/*printf ( "#3,0 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- PW_l = ((in_data[PW_Start_Address]<<4)&0xf0)|((in_data[PW_Start_Address+1]>>4)&0x0f);
- if ( (PW_l > 0x1F) || (PW_l == 0) || ((PW_Start_Address+8+PW_j+PW_l*8)>PW_in_size))
- {
-/*printf ( "#3 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- /* PW_l is the number of samples */
-
- /* test volumes */
- for ( PW_k=0 ; PW_k<PW_l ; PW_k++ )
- {
- if ( in_data[PW_Start_Address+9+PW_k*16] > 0x40 )
- {
- return BAD;
- }
- }
-
- /* test sample sizes */
- PW_WholeSampleSize=0;
- for ( PW_k=0 ; PW_k<PW_l ; PW_k++ )
- {
- PW_o = (in_data[PW_Start_Address+PW_k*16+14]*256)+in_data[PW_Start_Address+PW_k*16+15];
- PW_m = (in_data[PW_Start_Address+PW_k*16+20]*256)+in_data[PW_Start_Address+PW_k*16+21];
- PW_n = (in_data[PW_Start_Address+PW_k*16+22]*256)+in_data[PW_Start_Address+PW_k*16+23];
- PW_o *= 2;
- PW_m *= 2;
- PW_n *= 2;
- if ( (PW_o > 0xFFFF) ||
- (PW_m > 0xFFFF) ||
- (PW_n > 0xFFFF) )
- {
-/*printf ( "#5 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- if ( (PW_m + PW_n) > (PW_o+2) )
- {
-/*printf ( "#5,1 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- if ( (PW_n != 0) && (PW_m == 0) )
- {
-/*printf ( "#5,2 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- PW_WholeSampleSize += PW_o;
- }
- if ( PW_WholeSampleSize <= 4 )
- {
-/*printf ( "#5,3 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
-
-
- /* small shit to gain some vars */
- PW_l *= 16;
- PW_l += 8;
- PW_l += 4;
- /* PW_l is now the size of the header 'til the end of sample descriptions */
- if ( (PW_l+PW_Start_Address) > PW_in_size )
- {
-/* printf ( "NP3 Header bigger than file size (%ld > %ld)\n", PW_l, PW_in_size);*/
- return BAD;
- }
-
-
- /* test pattern table */
- PW_n=0;
- for ( PW_k=0 ; PW_k<PW_j ; PW_k += 2 )
- {
- PW_m = ((in_data[PW_Start_Address+PW_l+PW_k]*256)+in_data[PW_Start_Address+PW_l+PW_k+1]);
- if ( ((PW_m/8)*8) != PW_m )
- {
-/*printf ( "#6 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- if ( PW_m > PW_n )
- PW_n = PW_m;
- }
- PW_l += PW_j;
- PW_l += PW_n;
- PW_l += 8; /*paske on a que l'address du dernier pattern .. */
- /* PW_l is now the size of the header 'til the end of the track list */
- /* PW_j is now available for use :) */
- /* PW_n is the highest pattern number (*8) */
-
- /* test track data size */
- PW_k = (in_data[PW_Start_Address+6]*256)+in_data[PW_Start_Address+7];
- if ( (PW_k <= 63) || ((PW_k+PW_l+PW_Start_Address)>PW_in_size))
- {
-/*printf ( "#7 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
-
- /* test notes */
- /* re-calculate the number of sample */
- /* PW_k is the track data size */
- PW_j = ((in_data[PW_Start_Address]<<4)&0xf0)|((in_data[PW_Start_Address+1]>>4)&0x0f);
- for ( PW_m=0 ; PW_m < PW_k ; PW_m++ )
- {
- if ( (in_data[PW_Start_Address+PW_l+PW_m]&0x80) == 0x80 )
- continue;
- /* si note trop grande et si effet = A */
- if ( (in_data[PW_Start_Address+PW_l+PW_m] > 0x49)||
- ((in_data[PW_Start_Address+PW_l+PW_m+1]&0x0f) == 0x0A) )
- {
-/*printf ( "#8 Start:%ld (at %x)(PW_k:%x)(PW_l:%x)(PW_m:%x)\n" , PW_Start_Address,PW_Start_Address+PW_l+PW_m,PW_k,PW_l,PW_m );*/
- return BAD;
- }
- /* si effet D et arg > 0x40 */
- if ( ((in_data[PW_Start_Address+PW_l+PW_m+1]&0x0f) == 0x0D )&&
- (in_data[PW_Start_Address+PW_l+PW_m+2] > 0x40 ) )
- {
-/*printf ( "#8 Start:%ld (at %ld)(effet:%d)(arg:%ld)\n"
- , PW_Start_Address
- , PW_Start_Address+PW_l+PW_m
- , (PW_Start_Address+PW_l+PW_m+1)&0x0f
- , (PW_Start_Address+PW_l+PW_m+2) );*/
- return BAD;
- }
- /* sample nbr > ce qui est defini au debut ? */
- if ( (((in_data[PW_Start_Address+PW_l+PW_m]<<4)&0x10)|
- ((in_data[PW_Start_Address+PW_l+PW_m+1]>>4)&0x0f)) > PW_j )
- {
-/*printf ( "#8,1 Start:%ld (at %x)(PW_k:%x)(PW_l:%x)(PW_m:%x)(PW_j:%ld)\n" , PW_Start_Address,PW_Start_Address+PW_l+PW_m,PW_k,PW_l,PW_m,PW_j );*/
- return BAD;
- }
- /* all is empty ?!? ... cannot be ! */
- if ( (in_data[PW_Start_Address+PW_l+PW_m] == 0) &&
- (in_data[PW_Start_Address+PW_l+PW_m+1] == 0) &&
- (in_data[PW_Start_Address+PW_l+PW_m+2] == 0) && (PW_m<(PW_k-3)) )
- {
-/*printf ( "#8,2 Start:%ld (at %x)(PW_k:%x)(PW_l:%x)(PW_m:%x)(PW_j:%ld)\n" , PW_Start_Address,PW_Start_Address+PW_l+PW_m,PW_k,PW_l,PW_m,PW_j );*/
- return BAD;
- }
- PW_m += 2;
- }
-
- /* PW_WholeSampleSize is the size of the sample data */
- /* PW_l is the size of the header 'til the track datas */
- /* PW_k is the size of the track datas */
- return GOOD;
-}
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-short testP40A ( void )
-{
- PW_Start_Address = PW_i;
-
- /* number of pattern (real) */
- PW_j = in_data[PW_Start_Address+4];
- if ( PW_j > 0x7f )
- {
- return BAD;
- }
-
- /* number of sample */
- PW_k = in_data[PW_Start_Address+6];
- if ( (PW_k > 0x1F) || (PW_k == 0) )
- {
- return BAD;
- }
-
- /* test volumes */
- for ( PW_l=0 ; PW_l<PW_k ; PW_l++ )
- {
- if ( in_data[PW_Start_Address+35+PW_l*16] > 0x40 )
- {
- return BAD;
- }
- }
-
- /* test sample sizes */
- PW_WholeSampleSize = 0;
- for ( PW_l=0 ; PW_l<PW_k ; PW_l++ )
- {
- /* size */
- PW_o = (in_data[PW_Start_Address+24+PW_l*16]*256)+in_data[PW_Start_Address+25+PW_l*16];
- /* loop size */
- PW_n = (in_data[PW_Start_Address+30+PW_l*16]*256)+in_data[PW_Start_Address+31+PW_l*16];
- PW_o *= 2;
- PW_n *= 2;
-
- if ( (PW_o > 0xFFFF) ||
- (PW_n > 0xFFFF) )
- {
- return BAD;
- }
-
- if ( PW_n > (PW_o+2) )
- {
- return BAD;
- }
- PW_WholeSampleSize += PW_o;
- }
- if ( PW_WholeSampleSize <= 4 )
- {
- PW_WholeSampleSize = 0;
- return BAD;
- }
-
- /* PW_WholeSampleSize is the size of the sample data .. WRONG !! */
- /* PW_k is the number of samples */
- return GOOD;
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-short testP41A ( void )
-{
- PW_Start_Address = PW_i;
-
- /* number of pattern (real) */
- PW_j = in_data[PW_Start_Address+4];
- if ( PW_j > 0x7f )
- {
- return BAD;
- }
-
- /* number of sample */
- PW_k = in_data[PW_Start_Address+6];
- if ( (PW_k > 0x1F) || (PW_k == 0) )
- {
- return BAD;
- }
-
- /* test volumes */
- for ( PW_l=0 ; PW_l<PW_k ; PW_l++ )
- {
- if ( in_data[PW_Start_Address+33+PW_l*16] > 0x40 )
- {
- return BAD;
- }
- }
-
- /* test sample sizes */
- PW_WholeSampleSize = 0;
- for ( PW_l=0 ; PW_l<PW_k ; PW_l++ )
- {
- /* size */
- PW_o = (in_data[PW_Start_Address+24+PW_l*16]*256)+in_data[PW_Start_Address+25+PW_l*16];
- /* loop size */
- PW_n = (in_data[PW_Start_Address+30+PW_l*16]*256)+in_data[PW_Start_Address+31+PW_l*16];
- PW_o *= 2;
- PW_n *= 2;
-
- if ( (PW_o > 0xFFFF) ||
- (PW_n > 0xFFFF) )
- {
- return BAD;
- }
-
- if ( PW_n > (PW_o+2) )
- {
- return BAD;
- }
- PW_WholeSampleSize += PW_o;
- }
- if ( PW_WholeSampleSize <= 4 )
- {
- return BAD;
- }
-
- /* PW_WholeSampleSize is the size of the sample data .. WRONG !! */
- /* PW_k is the number of samples */
- return GOOD;
-}
-
+++ /dev/null
-/* update on the 3rd of april 2000 */
-/* bug pointed out by Thomas Neumann ... thx */
-
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-short testP50A ( void )
-{
- int nbr_notes=0;
- if ( PW_i < 7 )
- {
- return BAD;
- }
- PW_Start_Address = PW_i-7;
-
- /* number of pattern (real) */
- PW_m = in_data[PW_Start_Address+2];
- if ( (PW_m > 0x7f) || (PW_m == 0) )
- {
- /*printf ( "#1 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- /* PW_m is the real number of pattern */
-
- /* number of sample */
- PW_k = in_data[PW_Start_Address+3];
- if ( (PW_k&0x40) == 0x40 )
- {
- /*printf ( "#2\n" );*/
- return BAD;
- }
- if ( ((PW_k&0x3f) > 0x1F) || ((PW_k&0x3F) == 0) )
- {
- /*printf ( "#2,1 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- PW_k &= 0x3F;
- /* PW_k is the number of sample */
-
- /* test volumes */
- for ( PW_l=0 ; PW_l<PW_k ; PW_l++ )
- {
- if ( in_data[PW_Start_Address+7+PW_l*6] > 0x40 )
- {
- /*printf ( "#3 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- /* test fines */
- if ( in_data[PW_Start_Address+6+PW_l*6] > 0x0F )
- {
- /*printf ( "#4 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- }
-
- /* test sample sizes and loop start */
- PW_WholeSampleSize = 0;
- for ( PW_n=0 ; PW_n<PW_k ; PW_n++ )
- {
- PW_o = ( (in_data[PW_Start_Address+4+PW_n*6]*256) +
- in_data[PW_Start_Address+5+PW_n*6] );
- if ( ((PW_o < 0xFFDF) && (PW_o > 0x8000)) || (PW_o == 0) )
- {
- /*printf ( "#5 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- if ( PW_o < 0xFF00 )
- PW_WholeSampleSize += (PW_o*2);
-
- PW_j = ( (in_data[PW_Start_Address+8+PW_n*6]*256) +
- in_data[PW_Start_Address+9+PW_n*6] );
- if ( (PW_j != 0xFFFF) && (PW_j >= PW_o) )
- {
- /*printf ( "#5,1 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- if ( PW_o > 0xFFDF )
- {
- if ( (0xFFFF-PW_o) > PW_k )
- {
- /*printf ( "#5,2 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- }
- }
-
- /* test sample data address */
- PW_j = (in_data[PW_Start_Address]*256)+in_data[PW_Start_Address+1];
- if ( PW_j < (PW_k*6+4+PW_m*8) )
- {
- /*printf ( "#6 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- /* PW_j is the address of the sample data */
-
-
- /* test track table */
- for ( PW_l=0 ; PW_l<(PW_m*4) ; PW_l++ )
- {
- PW_o = ((in_data[PW_Start_Address+4+PW_k*6+PW_l*2]*256)+
- in_data[PW_Start_Address+4+PW_k*6+PW_l*2+1] );
- if ( (PW_o+PW_k*6+4+PW_m*8) > PW_j )
- {
- /*printf ( "#7 Start:%ld (value:%ld)(where:%x)(PW_l:%ld)(PW_m:%ld)(PW_o:%ld)\n"
-, PW_Start_Address
-, (in_data[PW_Start_Address+PW_k*6+4+PW_l*2]*256)+in_data[PW_Start_Address+4+PW_k*6+PW_l*2+1]
-, PW_Start_Address+PW_k*6+4+PW_l*2
-, PW_l
-, PW_m
-, PW_o );*/
- return BAD;
- }
- }
-
- /* test pattern table */
- PW_l=0;
- PW_o=0;
- /* first, test if we dont oversize the input file */
- if ( (PW_Start_Address+PW_k*6+4+PW_m*8) > PW_in_size )
- {
- /*printf ( "8,0 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- while ( (in_data[PW_Start_Address+PW_k*6+4+PW_m*8+PW_l] != 0xFF) && (PW_l<128) )
- {
- if ( ((in_data[PW_Start_Address+PW_k*6+4+PW_m*8+PW_l]/2)*2) != in_data[PW_Start_Address+PW_k*6+4+PW_m*8+PW_l] )
- {
-/*printf ( "#8,1 Start:%ld (value:%ld)(where:%x)(PW_l:%ld)(PW_m:%ld)(PW_k:%ld)\n"
-, PW_Start_Address
-, in_data[PW_Start_Address+PW_k*6+4+PW_m*8+PW_l]
-, PW_Start_Address+PW_k*6+4+PW_m*8+PW_l
-, PW_l
-, PW_m
-, PW_k );*/
- return BAD;
- }
-
- if ( in_data[PW_Start_Address+PW_k*6+4+PW_m*8+PW_l] > (PW_m*2) )
- {
-/*printf ( "#8,2 Start:%ld (value:%ld)(where:%x)(PW_l:%ld)(PW_m:%ld)(PW_k:%ld)\n"
-, PW_Start_Address
-, in_data[PW_Start_Address+PW_k*6+4+PW_m*8+PW_l]
-, PW_Start_Address+PW_k*6+4+PW_m*8+PW_l
-, PW_l
-, PW_m
-, PW_k );*/
- return BAD;
- }
- if ( in_data[PW_Start_Address+PW_k*6+4+PW_m*8+PW_l] > PW_o )
- PW_o = in_data[PW_Start_Address+PW_k*6+4+PW_m*8+PW_l];
- PW_l++;
- }
- /* are we beside the sample data address ? */
- if ( (PW_k*6+4+PW_m*8+PW_l) > PW_j )
- {
- return BAD;
- }
- if ( (PW_l == 0) || (PW_l == 128) )
- {
-/*printf ( "#8.3 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- PW_o /= 2;
- PW_o += 1;
- /* PW_o is the highest number of pattern */
-
-
- /* test notes ... pfiew */
- PW_l += 1;
- for ( PW_n=(PW_k*6+4+PW_m*8+PW_l) ; PW_n<PW_j ; PW_n++ )
- {
- if ( (in_data[PW_Start_Address+PW_n]&0x80) == 0x00 )
- {
- if ( in_data[PW_Start_Address+PW_n] > 0x49 )
- {
- /*printf ( "#9,0 Start:%ld (value:%ld) (where:%x) (PW_n:%ld) (PW_j:%ld)\n"
-, PW_Start_Address
-, in_data[PW_Start_Address+PW_n]
-, PW_Start_Address+PW_n
-, PW_n
-, PW_j );*/
- return BAD;
- }
- if ( in_data[PW_Start_Address+PW_n] > 0x02 )
- nbr_notes = 1;
- if ( (((in_data[PW_Start_Address+PW_n]<<4)&0x10) | ((in_data[PW_Start_Address+PW_n+1]>>4)&0x0F)) > PW_k )
- {
- /*printf ( "#9,1 Start:%ld (value:%ld) (where:%x) (PW_n:%ld) (PW_j:%ld)\n"
-, PW_Start_Address
-, in_data[PW_Start_Address+PW_n]
-, PW_Start_Address+PW_n
-, PW_n
-, PW_j );*/
- return BAD;
- }
- PW_n += 2;
- continue;
- }
-
- if ( (in_data[PW_Start_Address+PW_n]&0x80) == 0x80 )
- {
- if ( in_data[PW_Start_Address+PW_n] == 0x80 )
- {
- /* too many lines to repeat ? */
- if ( in_data[PW_Start_Address+PW_n+1] > 0x40 )
- {
- return BAD;
- }
- if ( ((in_data[PW_Start_Address+PW_n+2]*256)+in_data[PW_Start_Address+PW_n+3]) < (in_data[PW_Start_Address+PW_n+1]*3) )
- {
- /*printf ( "#9,3 (start:%ld)\n",PW_Start_Address);*/
- return BAD;
- }
- }
- else
- nbr_notes = 1;
- }
- PW_n += 3;
- }
- if ( nbr_notes == 0 )
- {
- /* empty notes */
- /*printf ( "#9,4 (start:%ld)\n",PW_Start_Address);*/
- return BAD;
- }
-
- /* PW_WholeSampleSize is the whole sample data size */
- /* PW_j is the address of the sample data */
- return GOOD;
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-short testP60A_nopack ( void )
-{
- int nbr_notes=0;
- if ( PW_i < 7 )
- {
- return BAD;
- }
- PW_Start_Address = PW_i-7;
-
- /* number of pattern (real) */
- PW_m = in_data[PW_Start_Address+2];
- if ( (PW_m > 0x7f) || (PW_m == 0) )
- {
-/*printf ( "#1 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- /* PW_m is the real number of pattern */
-
- /* number of sample */
- PW_k = (in_data[PW_Start_Address+3]&0x3F);
- if ( (PW_k > 0x1F) || (PW_k == 0) || ((PW_k*6+PW_Start_Address+7)>=PW_in_size))
- {
-/*printf ( "#2 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- /* PW_k is the number of sample */
-
- /* test volumes */
- for ( PW_l=0 ; PW_l<PW_k ; PW_l++ )
- {
- if ( in_data[PW_Start_Address+7+PW_l*6] > 0x40 )
- {
-/*printf ( "#3 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- }
-
- /* test fines */
- for ( PW_l=0 ; PW_l<PW_k ; PW_l++ )
- {
- if ( in_data[PW_Start_Address+6+PW_l*6] > 0x0F )
- {
-/*printf ( "#4 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- }
-
- /* test sample sizes and loop start */
- PW_WholeSampleSize = 0;
- for ( PW_n=0 ; PW_n<PW_k ; PW_n++ )
- {
- PW_o = ( (in_data[PW_Start_Address+4+PW_n*6]*256) +
- in_data[PW_Start_Address+5+PW_n*6] );
- if ( ((PW_o < 0xFFDF) && (PW_o > 0x8000)) || (PW_o == 0) )
- {
-/*printf ( "#5 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- if ( PW_o < 0xFF00 )
- PW_WholeSampleSize += (PW_o*2);
-
- PW_j = ( (in_data[PW_Start_Address+8+PW_n*6]*256) +
- in_data[PW_Start_Address+9+PW_n*6] );
- if ( (PW_j != 0xFFFF) && (PW_j >= PW_o) )
- {
-/*printf ( "#5,1 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- if ( PW_o > 0xFFDF )
- {
- if ( (0xFFFF-PW_o) > PW_k )
- {
-/*printf ( "#5,2 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- }
- }
-
- /* test sample data address */
- PW_j = (in_data[PW_Start_Address]*256)+in_data[PW_Start_Address+1];
- if ( PW_j < (PW_k*6+4+PW_m*8) )
- {
-/*printf ( "#6 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- /* PW_j is the address of the sample data */
-
-
- /* test track table */
- for ( PW_l=0 ; PW_l<(PW_m*4) ; PW_l++ )
- {
- PW_o = ((in_data[PW_Start_Address+4+PW_k*6+PW_l*2]*256)+
- in_data[PW_Start_Address+4+PW_k*6+PW_l*2+1] );
- if ( (PW_o+PW_k*6+4+PW_m*8) > PW_j )
- {
-/*printf ( "#7 Start:%ld (value:%ld)(where:%x)(PW_l:%ld)(PW_m:%ld)(PW_o:%ld)\n"
-, PW_Start_Address
-, (in_data[PW_Start_Address+PW_k*6+4+PW_l*2]*256)+in_data[PW_Start_Address+4+PW_k*6+PW_l*2+1]
-, PW_Start_Address+PW_k*6+4+PW_l*2
-, PW_l
-, PW_m
-, PW_o );*/
- return BAD;
- }
- }
-
- /* test pattern table */
- PW_l=0;
- PW_o=0;
- /* first, test if we dont oversize the input file */
- if ( (PW_Start_Address+PW_k*6+4+PW_m*8) > PW_in_size )
- {
-/*printf ( "8,0 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- while ( (in_data[PW_Start_Address+PW_k*6+4+PW_m*8+PW_l] != 0xFF) && (PW_l<128) )
- {
- if ( in_data[PW_Start_Address+PW_k*6+4+PW_m*8+PW_l] > (PW_m-1) )
- {
-/*printf ( "#8,1 Start:%ld (value:%ld)(where:%x)(PW_l:%ld)(PW_m:%ld)(PW_k:%ld)\n"
-, PW_Start_Address
-, in_data[PW_Start_Address+PW_k*6+4+PW_m*8+PW_l]
-, PW_Start_Address+PW_k*6+4+PW_m*8+PW_l
-, PW_l
-, PW_m
-, PW_k );*/
- return BAD;
- }
- if ( in_data[PW_Start_Address+PW_k*6+4+PW_m*8+PW_l] > PW_o )
- PW_o = in_data[PW_Start_Address+PW_k*6+4+PW_m*8+PW_l];
- PW_l++;
- }
- /* are we beside the sample data address ? */
- if ( (PW_k*6+4+PW_m*8+PW_l) > PW_j )
- {
- return BAD;
- }
- if ( (PW_l == 0) || (PW_l == 128) )
- {
-/*printf ( "#8.2 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- PW_o += 1;
- /* PW_o is the highest number of pattern */
-
-
- /* test notes ... pfiew */
- PW_l += 1;
- /* printf ( "Where : %ld\n" , PW_k*6+4+PW_m*8+PW_l);*/
- for ( PW_n=(PW_k*6+4+PW_m*8+PW_l) ; PW_n<PW_j ; PW_n++ )
- {
- if ( (in_data[PW_Start_Address+PW_n]&0x80) == 0x00 )
- {
- if ( in_data[PW_Start_Address+PW_n] > 0x49 )
- {
-/*printf ( "#9,0 Start:%ld (value:%ld) (where:%x) (PW_n:%ld) (PW_j:%ld)\n"
-, PW_Start_Address
-, in_data[PW_Start_Address+PW_n]
-, PW_Start_Address+PW_n
-, PW_n
-, PW_j
- );*/
- return BAD;
- }
- if ( in_data[PW_Start_Address+PW_n] >= 0x02 )
- nbr_notes = 1;
- if ( (((in_data[PW_Start_Address+PW_n]<<4)&0x10) | ((in_data[PW_Start_Address+PW_n+1]>>4)&0x0F)) > PW_k )
- {
-/*printf ( "#9,1 Start:%ld (value:%ld) (where:%x) (PW_n:%ld) (PW_j:%ld)\n"
-, PW_Start_Address
-, in_data[PW_Start_Address+PW_n]
-, PW_Start_Address+PW_n
-, PW_n
-, PW_j
- );*/
- return BAD;
- }
- PW_n += 2;
- }
- else
- PW_n += 3;
- }
- if ( nbr_notes == 0 )
- {
- /*printf ( "9,3 (Start:%ld)\n",PW_Start_Address);*/
- return BAD;
- }
-
- /* PW_WholeSampleSize is the whole sample data size */
- /* PW_j is the address of the sample data */
- return GOOD;
-}
-
-
-/******************/
-/* packed samples */
-/******************/
-short testP60A_pack ( void )
-{
- if ( PW_i < 11 )
- {
- return BAD;
- }
- PW_Start_Address = PW_i-11;
-
- /* number of pattern (real) */
- PW_m = in_data[PW_Start_Address+2];
- if ( (PW_m > 0x7f) || (PW_m == 0) )
- {
-/*printf ( "#1 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- /* PW_m is the real number of pattern */
-
- /* number of sample */
- PW_k = in_data[PW_Start_Address+3];
- if ( (PW_k&0x40) != 0x40 )
- {
-/*printf ( "#2,0 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- PW_k &= 0x3F;
- if ( (PW_k > 0x1F) || (PW_k == 0) )
- {
-/*printf ( "#2,1 Start:%ld (PW_k:%ld)\n" , PW_Start_Address,PW_k );*/
- return BAD;
- }
- /* PW_k is the number of sample */
-
- /* test volumes */
- if ( (PW_Start_Address+11+(PW_k*6)) > PW_in_size)
- return BAD;
- for ( PW_l=0 ; PW_l<PW_k ; PW_l++ )
- {
- if ( in_data[PW_Start_Address+11+PW_l*6] > 0x40 )
- {
-/*printf ( "#3 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- }
-
- /* test fines */
- for ( PW_l=0 ; PW_l<PW_k ; PW_l++ )
- {
- if ( (in_data[PW_Start_Address+10+PW_l*6]&0x3F) > 0x0F )
- {
-/*printf ( "#4 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- }
-
- /* test sample sizes and loop start */
- PW_WholeSampleSize = 0;
- for ( PW_n=0 ; PW_n<PW_k ; PW_n++ )
- {
- PW_o = ( (in_data[PW_Start_Address+8+PW_n*6]*256) +
- in_data[PW_Start_Address+9+PW_n*6] );
- if ( ((PW_o < 0xFFDF) && (PW_o > 0x8000)) || (PW_o == 0) )
- {
-/*printf ( "#5 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- if ( PW_o < 0xFF00 )
- PW_WholeSampleSize += (PW_o*2);
-
- PW_j = ( (in_data[PW_Start_Address+12+PW_n*6]*256) +
- in_data[PW_Start_Address+13+PW_n*6] );
- if ( (PW_j != 0xFFFF) && (PW_j >= PW_o) )
- {
-/*printf ( "#5,1 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- if ( PW_o > 0xFFDF )
- {
- if ( (0xFFFF-PW_o) > PW_k )
- {
-/*printf ( "#5,2 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- }
- }
-
- /* test sample data address */
- PW_j = (in_data[PW_Start_Address]*256)+in_data[PW_Start_Address+1];
- if ( PW_j < (PW_k*6+8+PW_m*8) )
- {
-/*printf ( "#6 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- /* PW_j is the address of the sample data */
-
-
- /* test track table */
- for ( PW_l=0 ; PW_l<(PW_m*4) ; PW_l++ )
- {
- PW_o = ((in_data[PW_Start_Address+8+PW_k*6+PW_l*2]*256)+
- in_data[PW_Start_Address+8+PW_k*6+PW_l*2+1] );
- if ( (PW_o+PW_k*6+8+PW_m*8) > PW_j )
- {
-/*printf ( "#7 Start:%ld (value:%ld)(where:%x)(PW_l:%ld)(PW_m:%ld)(PW_o:%ld)\n"
-, PW_Start_Address
-, (in_data[PW_Start_Address+PW_k*6+8+PW_l*2]*256)+in_data[PW_Start_Address+8+PW_k*6+PW_l*2+1]
-, PW_Start_Address+PW_k*6+8+PW_l*2
-, PW_l
-, PW_m
-, PW_o );*/
- return BAD;
- }
- }
-
- /* test pattern table */
- PW_l=0;
- PW_o=0;
- /* first, test if we dont oversize the input file */
- if ( (PW_k*6+8+PW_m*8) > PW_in_size )
- {
-/*printf ( "8,0 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- while ( (in_data[PW_Start_Address+PW_k*6+8+PW_m*8+PW_l] != 0xFF) && (PW_l<128) )
- {
- if ( in_data[PW_Start_Address+PW_k*6+8+PW_m*8+PW_l] > (PW_m-1) )
- {
-/*printf ( "#8,1 Start:%ld (value:%ld)(where:%x)(PW_l:%ld)(PW_m:%ld)(PW_k:%ld)\n"
-, PW_Start_Address
-, in_data[PW_Start_Address+PW_k*6+8+PW_m*8+PW_l]
-, PW_Start_Address+PW_k*6+8+PW_m*8+PW_l
-, PW_l
-, PW_m
-, PW_k );*/
- return BAD;
- }
- if ( in_data[PW_Start_Address+PW_k*6+8+PW_m*8+PW_l] > PW_o )
- PW_o = in_data[PW_Start_Address+PW_k*6+8+PW_m*8+PW_l];
- PW_l++;
- }
- if ( (PW_l == 0) || (PW_l == 128) )
- {
-/*printf ( "#8.2 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- PW_o += 1;
- /* PW_o is the highest number of pattern */
-
-
- /* test notes ... pfiew */
- PW_l += 1;
- for ( PW_n=(PW_k*6+8+PW_m*8+PW_l) ; PW_n<PW_j ; PW_n++ )
- {
- if ( (in_data[PW_Start_Address+PW_n]&0x80) == 0x00 )
- {
- if ( in_data[PW_Start_Address+PW_n] > 0x49 )
- {
-/*printf ( "#9,0 Start:%ld (value:%ld) (where:%x) (PW_n:%ld) (PW_j:%ld)\n"
-, PW_Start_Address
-, in_data[PW_Start_Address+PW_n]
-, PW_Start_Address+PW_n
-, PW_n
-, PW_j
- );*/
- return BAD;
- }
- if ( (((in_data[PW_Start_Address+PW_n]<<4)&0x10) | ((in_data[PW_Start_Address+PW_n+1]>>4)&0x0F)) > PW_k )
- {
-/*printf ( "#9,1 Start:%ld (value:%ld) (where:%x) (PW_n:%ld) (PW_j:%ld)\n"
-, PW_Start_Address
-, in_data[PW_Start_Address+PW_n]
-, PW_Start_Address+PW_n
-, PW_n
-, PW_j
- );*/
- return BAD;
- }
- PW_n += 2;
- }
- else
- PW_n += 3;
- }
-
- /* PW_WholeSampleSize is the whole sample data size */
- /* PW_j is the address of the sample data */
- return GOOD;
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-short testP61A_nopack ( void )
-{
- if ( PW_i < 7 )
- {
- return BAD;
- }
- PW_Start_Address = PW_i-7;
-
- /* number of pattern (real) */
- PW_m = in_data[PW_Start_Address+2];
- if ( (PW_m > 0x7f) || (PW_m == 0) )
- {
-/*printf ( "#1 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- /* PW_m is the real number of pattern */
-
- /* number of sample */
- PW_k = (in_data[PW_Start_Address+3]&0x3F);
- if ( (PW_k > 0x1F) || (PW_k == 0) || ((PW_k*6+PW_Start_Address+7)>=PW_in_size))
- {
-/*printf ( "#2 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- /* PW_k is the number of sample */
-
- /* test volumes */
- for ( PW_l=0 ; PW_l<PW_k ; PW_l++ )
- {
- if ( in_data[PW_Start_Address+7+PW_l*6] > 0x40 )
- {
-/*printf ( "#3 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- }
-
- /* test fines */
- for ( PW_l=0 ; PW_l<PW_k ; PW_l++ )
- {
- if ( in_data[PW_Start_Address+6+PW_l*6] > 0x0F )
- {
-/*printf ( "#4 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- }
-
- /* test sample sizes and loop start */
- PW_WholeSampleSize = 0;
- for ( PW_n=0 ; PW_n<PW_k ; PW_n++ )
- {
- PW_o = ( (in_data[PW_Start_Address+4+PW_n*6]*256) +
- in_data[PW_Start_Address+5+PW_n*6] );
- if ( ((PW_o < 0xFFDF) && (PW_o > 0x8000)) || (PW_o == 0) )
- {
-/*printf ( "#5 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- if ( PW_o < 0xFF00 )
- PW_WholeSampleSize += (PW_o*2);
-
- PW_j = ( (in_data[PW_Start_Address+8+PW_n*6]*256) +
- in_data[PW_Start_Address+9+PW_n*6] );
- if ( (PW_j != 0xFFFF) && (PW_j >= PW_o) )
- {
-/*printf ( "#5,1 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- if ( PW_o > 0xFFDF )
- {
- if ( (0xFFFF-PW_o) > PW_k )
- {
-/*printf ( "#5,2 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- }
- }
-
- /* test sample data address */
- PW_j = (in_data[PW_Start_Address]*256)+in_data[PW_Start_Address+1];
- if ( PW_j < (PW_k*6+4+PW_m*8) )
- {
-/*printf ( "#6 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- /* PW_j is the address of the sample data */
-
-
- /* test track table */
- for ( PW_l=0 ; PW_l<(PW_m*4) ; PW_l++ )
- {
- PW_o = ((in_data[PW_Start_Address+4+PW_k*6+PW_l*2]*256)+
- in_data[PW_Start_Address+4+PW_k*6+PW_l*2+1] );
- if ( (PW_o+PW_k*6+4+PW_m*8) > PW_j )
- {
-/*printf ( "#7 Start:%ld (value:%ld)(where:%x)(PW_l:%ld)(PW_m:%ld)(PW_o:%ld)\n"
-, PW_Start_Address
-, (in_data[PW_Start_Address+PW_k*6+4+PW_l*2]*256)+in_data[PW_Start_Address+4+PW_k*6+PW_l*2+1]
-, PW_Start_Address+PW_k*6+4+PW_l*2
-, PW_l
-, PW_m
-, PW_o );*/
- return BAD;
- }
- }
-
- /* test pattern table */
- PW_l=0;
- PW_o=0;
- /* first, test if we dont oversize the input file */
- if ( (PW_Start_Address+PW_k*6+4+PW_m*8) > PW_in_size )
- {
-/*printf ( "8,0 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- while ( (in_data[PW_Start_Address+PW_k*6+4+PW_m*8+PW_l] != 0xFF) && (PW_l<128) )
- {
- if ( in_data[PW_Start_Address+PW_k*6+4+PW_m*8+PW_l] > (PW_m-1) )
- {
-/*printf ( "#8,1 Start:%ld (value:%ld)(where:%x)(PW_l:%ld)(PW_m:%ld)(PW_k:%ld)\n"
-, PW_Start_Address
-, in_data[PW_Start_Address+PW_k*6+4+PW_m*8+PW_l]
-, PW_Start_Address+PW_k*6+4+PW_m*8+PW_l
-, PW_l
-, PW_m
-, PW_k );*/
- return BAD;
- }
- if ( in_data[PW_Start_Address+PW_k*6+4+PW_m*8+PW_l] > PW_o )
- PW_o = in_data[PW_Start_Address+PW_k*6+4+PW_m*8+PW_l];
- PW_l++;
- }
- /* are we beside the sample data address ? */
- if ( (PW_k*6+4+PW_m*8+PW_l) > PW_j )
- {
- return BAD;
- }
- if ( (PW_l == 0) || (PW_l == 128) )
- {
-/*printf ( "#8.2 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- PW_o += 1;
- /* PW_o is the highest number of pattern */
-
-
- /* test notes ... pfiew */
- PW_l += 1;
- for ( PW_n=(PW_k*6+4+PW_m*8+PW_l) ; PW_n<PW_j ; PW_n++ )
- {
- if ( (in_data[PW_Start_Address+PW_n]&0xff) == 0xff )
- {
- if ( (in_data[PW_Start_Address+PW_n+1]&0xc0) == 0x00 )
- {
- PW_n += 1;
- continue;
- }
- if ( (in_data[PW_Start_Address+PW_n+1]&0xc0) == 0x40 )
- {
- PW_n += 2;
- continue;
- }
- if ( (in_data[PW_Start_Address+PW_n+1]&0xc0) == 0xc0 )
- {
- if ( PW_n < ((in_data[PW_Start_Address+PW_n+2]*256)+in_data[PW_Start_Address+PW_n+3]-1) )
- return BAD;
- PW_n += 3;
- continue;
- }
- }
- if ( (in_data[PW_Start_Address+PW_n]&0xff) == 0x7f )
- {
- continue;
- }
-
- /* no Fx nor FxArg */
- if ( (in_data[PW_Start_Address+PW_n]&0xf0) == 0xf0 )
- {
- if ( (in_data[PW_Start_Address+PW_n+1]&0x1F) > PW_k )
- {
-/*printf ( "#9,1 Start:%ld (value:%ld) (where:%x) (PW_n:%ld) (PW_j:%ld)\n"
-, PW_Start_Address
-, in_data[PW_Start_Address+PW_n]
-, PW_Start_Address+PW_n
-, PW_n
-, PW_j
- );*/
- return BAD;
- }
- PW_n += 2;
- continue;
- }
- if ( (in_data[PW_Start_Address+PW_n]&0xf0) == 0x70 )
- {
- if ( (in_data[PW_Start_Address+PW_n+1]&0x1F) > PW_k )
- {
-/*printf ( "#9,2 Start:%ld (value:%ld) (where:%x) (PW_n:%ld) (PW_j:%ld)\n"
-, PW_Start_Address
-, in_data[PW_Start_Address+PW_n]
-, PW_Start_Address+PW_n
-, PW_n
-, PW_j
- );*/
- return BAD;
- }
- PW_n += 1;
- continue;
- }
- /* no Note nor Sample number */
- if ( (in_data[PW_Start_Address+PW_n]&0xf0) == 0xe0 )
- {
- PW_n += 2;
- continue;
- }
- if ( (in_data[PW_Start_Address+PW_n]&0xf0) == 0x60 )
- {
- PW_n += 1;
- continue;
- }
-
- if ( (in_data[PW_Start_Address+PW_n]&0x80) == 0x80 )
- {
- if ( (((in_data[PW_Start_Address+PW_n]<<4)&0x10) | ((in_data[PW_Start_Address+PW_n+1]>>4)&0x0F)) > PW_k )
- {
-/*printf ( "#9,3 Start:%ld (value:%ld) (where:%x) (PW_n:%ld) (PW_j:%ld)\n"
-, PW_Start_Address
-, in_data[PW_Start_Address+PW_n]
-, PW_Start_Address+PW_n
-, PW_n
-, PW_j
- );*/
- return BAD;
- }
- PW_n += 3;
- continue;
- }
-
- if ( (((in_data[PW_Start_Address+PW_n]<<4)&0x10) | ((in_data[PW_Start_Address+PW_n+1]>>4)&0x0F)) > PW_k )
- {
-/*printf ( "#9,4 Start:%ld (value:%ld) (where:%x) (PW_n:%ld) (PW_j:%ld)\n"
-, PW_Start_Address
-, in_data[PW_Start_Address+PW_n]
-, PW_Start_Address+PW_n
-, PW_n
-, PW_j
- );*/
- return BAD;
- }
- PW_n += 2;
- }
-
- /* PW_WholeSampleSize is the whole sample data size */
- /* PW_j is the address of the sample data */
- return GOOD;
-}
-
-
-/******************/
-/* packed samples */
-/******************/
-short testP61A_pack ( void )
-{
- if ( PW_i < 11 )
- {
- return BAD;
- }
- PW_Start_Address = PW_i-11;
-
- /* number of pattern (real) */
- PW_m = in_data[PW_Start_Address+2];
- if ( (PW_m > 0x7f) || (PW_m == 0) )
- {
-/*printf ( "#1 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- /* PW_m is the real number of pattern */
-
- /* number of sample */
- PW_k = in_data[PW_Start_Address+3];
- if ( (PW_k&0x40) != 0x40 )
- {
-/*printf ( "#2,0 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- PW_k &= 0x3F;
- if ( (PW_k > 0x1F) || (PW_k == 0) )
- {
-/*printf ( "#2,1 Start:%ld (PW_k:%ld)\n" , PW_Start_Address,PW_k );*/
- return BAD;
- }
- /* PW_k is the number of sample */
-
- /* test volumes */
- if ( (PW_Start_Address+11+(PW_k*6))>PW_in_size)
- return BAD;
- for ( PW_l=0 ; PW_l<PW_k ; PW_l++ )
- {
- if ( in_data[PW_Start_Address+11+PW_l*6] > 0x40 )
- {
-/*printf ( "#3 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- }
-
- /* test fines */
- for ( PW_l=0 ; PW_l<PW_k ; PW_l++ )
- {
- if ( (in_data[PW_Start_Address+10+PW_l*6]&0x3F) > 0x0F )
- {
-/*printf ( "#4 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- }
-
- /* test sample sizes and loop start */
- PW_WholeSampleSize = 0;
- for ( PW_n=0 ; PW_n<PW_k ; PW_n++ )
- {
- PW_o = ( (in_data[PW_Start_Address+8+PW_n*6]*256) +
- in_data[PW_Start_Address+9+PW_n*6] );
- if ( ((PW_o < 0xFFDF) && (PW_o > 0x8000)) || (PW_o == 0) )
- {
-/*printf ( "#5 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- if ( PW_o < 0xFF00 )
- PW_WholeSampleSize += (PW_o*2);
-
- PW_j = ( (in_data[PW_Start_Address+12+PW_n*6]*256) +
- in_data[PW_Start_Address+13+PW_n*6] );
- if ( (PW_j != 0xFFFF) && (PW_j >= PW_o) )
- {
-/*printf ( "#5,1 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- if ( PW_o > 0xFFDF )
- {
- if ( (0xFFFF-PW_o) > PW_k )
- {
-/*printf ( "#5,2 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- }
- }
-
- /* test sample data address */
- PW_j = (in_data[PW_Start_Address]*256)+in_data[PW_Start_Address+1];
- if ( PW_j < (PW_k*6+8+PW_m*8) )
- {
-/*printf ( "#6 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- /* PW_j is the address of the sample data */
-
-
- /* test track table */
- for ( PW_l=0 ; PW_l<(PW_m*4) ; PW_l++ )
- {
- PW_o = ((in_data[PW_Start_Address+8+PW_k*6+PW_l*2]*256)+
- in_data[PW_Start_Address+8+PW_k*6+PW_l*2+1] );
- if ( (PW_o+PW_k*6+8+PW_m*8) > PW_j )
- {
-/*printf ( "#7 Start:%ld (value:%ld)(where:%x)(PW_l:%ld)(PW_m:%ld)(PW_o:%ld)\n"
-, PW_Start_Address
-, (in_data[PW_Start_Address+PW_k*6+8+PW_l*2]*256)+in_data[PW_Start_Address+8+PW_k*6+PW_l*2+1]
-, PW_Start_Address+PW_k*6+8+PW_l*2
-, PW_l
-, PW_m
-, PW_o );*/
- return BAD;
- }
- }
-
- /* test pattern table */
- PW_l=0;
- PW_o=0;
- /* first, test if we dont oversize the input file */
- if ( (PW_k*6+8+PW_m*8) > PW_in_size )
- {
-/*printf ( "8,0 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- while ( (in_data[PW_Start_Address+PW_k*6+8+PW_m*8+PW_l] != 0xFF) && (PW_l<128) )
- {
- if ( in_data[PW_Start_Address+PW_k*6+8+PW_m*8+PW_l] > (PW_m-1) )
- {
-/*printf ( "#8,1 Start:%ld (value:%ld)(where:%x)(PW_l:%ld)(PW_m:%ld)(PW_k:%ld)\n"
-, PW_Start_Address
-, in_data[PW_Start_Address+PW_k*6+8+PW_m*8+PW_l]
-, PW_Start_Address+PW_k*6+8+PW_m*8+PW_l
-, PW_l
-, PW_m
-, PW_k );*/
- return BAD;
- }
- if ( in_data[PW_Start_Address+PW_k*6+8+PW_m*8+PW_l] > PW_o )
- PW_o = in_data[PW_Start_Address+PW_k*6+8+PW_m*8+PW_l];
- PW_l++;
- }
- if ( (PW_l == 0) || (PW_l == 128) )
- {
-/*printf ( "#8.2 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- PW_o += 1;
- /* PW_o is the highest number of pattern */
-
-
- /* test notes ... pfiew */
- PW_l += 1;
- for ( PW_n=(PW_k*6+8+PW_m*8+PW_l) ; PW_n<PW_j ; PW_n++ )
- {
- if ( (in_data[PW_Start_Address+PW_n]&0xff) == 0xff )
- {
- if ( (in_data[PW_Start_Address+PW_n+1]&0xc0) == 0x00 )
- {
- PW_n += 1;
- continue;
- }
- if ( (in_data[PW_Start_Address+PW_n+1]&0xc0) == 0x40 )
- {
- PW_n += 2;
- continue;
- }
- if ( (in_data[PW_Start_Address+PW_n+1]&0xc0) == 0xc0 )
- {
- PW_n += 3;
- continue;
- }
- }
- if ( (in_data[PW_Start_Address+PW_n]&0xff) == 0x7f )
- {
- continue;
- }
-
- /* no Fx nor FxArg */
- if ( (in_data[PW_Start_Address+PW_n]&0xf0) == 0xf0 )
- {
- if ( (in_data[PW_Start_Address+PW_n+1]&0x1F) > PW_k )
- {
-/*printf ( "#9,1 Start:%ld (value:%ld) (where:%x) (PW_n:%ld) (PW_j:%ld)\n"
-, PW_Start_Address
-, in_data[PW_Start_Address+PW_n]
-, PW_Start_Address+PW_n
-, PW_n
-, PW_j
- );*/
- return BAD;
- }
- PW_n += 2;
- continue;
- }
- if ( (in_data[PW_Start_Address+PW_n]&0xf0) == 0x70 )
- {
- if ( (in_data[PW_Start_Address+PW_n+1]&0x1F) > PW_k )
- {
-/*printf ( "#9,1 Start:%ld (value:%ld) (where:%x) (PW_n:%ld) (PW_j:%ld)\n"
-, PW_Start_Address
-, in_data[PW_Start_Address+PW_n]
-, PW_Start_Address+PW_n
-, PW_n
-, PW_j
- );*/
- return BAD;
- }
- PW_n += 1;
- continue;
- }
- /* no Note nor Sample number */
- if ( (in_data[PW_Start_Address+PW_n]&0xf0) == 0xe0 )
- {
- PW_n += 2;
- continue;
- }
- if ( (in_data[PW_Start_Address+PW_n]&0xf0) == 0x60 )
- {
- PW_n += 1;
- continue;
- }
-
- if ( (in_data[PW_Start_Address+PW_n]&0x80) == 0x80 )
- {
- if ( (((in_data[PW_Start_Address+PW_n]<<4)&0x10) | ((in_data[PW_Start_Address+PW_n+1]>>4)&0x0F)) > PW_k )
- {
-/*printf ( "#9,1 Start:%ld (value:%ld) (where:%x) (PW_n:%ld) (PW_j:%ld)\n"
-, PW_Start_Address
-, in_data[PW_Start_Address+PW_n]
-, PW_Start_Address+PW_n
-, PW_n
-, PW_j
- );*/
- return BAD;
- }
- PW_n += 3;
- continue;
- }
-
- if ( (((in_data[PW_Start_Address+PW_n]<<4)&0x10) | ((in_data[PW_Start_Address+PW_n+1]>>4)&0x0F)) > PW_k )
- {
-/*printf ( "#9,1 Start:%ld (value:%ld) (where:%x) (PW_n:%ld) (PW_j:%ld)\n"
-, PW_Start_Address
-, in_data[PW_Start_Address+PW_n]
-, PW_Start_Address+PW_n
-, PW_n
-, PW_j
- );*/
- return BAD;
- }
- PW_n += 2;
- }
-
-
- /* PW_WholeSampleSize is the whole sample data size */
- /* PW_j is the address of the sample data */
- return GOOD;
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-short testPHA ( void )
-{
- /* test #1 */
- if ( PW_i < 11 )
- {
-/*
-printf ( "#1 (PW_i:%ld)\n" , PW_i );
-*/
- return BAD;
- }
-
- /* test #2 (volumes,sample addresses and whole sample size) */
- PW_Start_Address = PW_i-11;
- PW_l=0;
- PW_WholeSampleSize = 0;
- for ( PW_j=0 ; PW_j<31 ; PW_j++ )
- {
- /* sample size */
- PW_n =(((in_data[PW_Start_Address+PW_j*14]*256)+in_data[PW_Start_Address+PW_j*14+1])*2);
- PW_WholeSampleSize += PW_n;
- /* loop start */
- PW_m =(((in_data[PW_Start_Address+PW_j*14+4]*256)+in_data[PW_Start_Address+PW_j*14+5])*2);
-
- if ( in_data[PW_Start_Address+3+PW_j*14] > 0x40 )
- {
-/*printf ( "#2 (start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- if ( PW_m > PW_WholeSampleSize )
- {
-/*printf ( "#2,1 (start:%ld) (smp nbr:%ld) (size:%ld) (lstart:%ld)\n"
- , PW_Start_Address,PW_j,PW_n,PW_m );*/
- return BAD;
- }
- PW_k = (in_data[PW_Start_Address+8+PW_j*14]*256*256*256)
- +(in_data[PW_Start_Address+9+PW_j*14]*256*256)
- +(in_data[PW_Start_Address+10+PW_j*14]*256)
- +in_data[PW_Start_Address+11+PW_j*14];
- /* PW_k is the address of this sample data */
- if ( (PW_k < 0x3C0) || (PW_k>PW_in_size) )
- {
-/*printf ( "#2,2 (start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- }
- if ( (PW_WholeSampleSize <= 2) || (PW_WholeSampleSize>(31*65535)) )
- {
- /*printf ( "#2,3 (start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
-
- /* test #3 (addresses of pattern in file ... possible ?) */
- /* PW_WholeSampleSize is the WholeSampleSize */
- PW_l = PW_WholeSampleSize + 960;
- PW_k = 0;
- for ( PW_j=0 ; PW_j<128 ; PW_j++ )
- {
- PW_m = (in_data[PW_Start_Address+448+PW_j*4]*256*256*256)
- +(in_data[PW_Start_Address+449+PW_j*4]*256*256)
- +(in_data[PW_Start_Address+450+PW_j*4]*256)
- +in_data[PW_Start_Address+451+PW_j*4];
- if ( PW_m > PW_k )
- PW_k = PW_m;
- if ( (PW_m+2) < PW_l )
- {
- /*printf ( "#5 (start:%ld)(add:%ld)(min:%ld)(where:%ld)\n" , PW_Start_Address,PW_m,PW_l, PW_j );*/
- return BAD;
- }
- }
- /* PW_k is the highest pattern data address */
-
-
- return GOOD;
-}
-
-
+++ /dev/null
-/* update on the 3rd of april 2000 */
-/* some advices by Thomas Neumann .. thx */
-
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-/* Power Music */
-short testPM ( void )
-{
- /* test 1 */
- if ( PW_i < 1080 )
- {
- return BAD;
- }
-
- /* test 2 */
- PW_Start_Address = PW_i-1080;
- for ( PW_j=0 ; PW_j<31 ; PW_j++ )
- {
- if ( in_data[PW_Start_Address+45+30*PW_j] > 0x40 )
- {
- return BAD;
- }
- }
-
- /* test 3 */
- if ( (in_data[PW_Start_Address+951] > 0x7F) && (in_data[PW_Start_Address+951] != 0xFF) )
- {
- return BAD;
- }
-
- return GOOD;
-}
-
-
+++ /dev/null
-/*
-- 22 sept 2001 -
-bugfix : test #5 was fake since first pat addy can be != $00000000
-*/
-
-
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-
-short testPM01 ( void )
-{
- /* test #1 */
- if ( (PW_i < 3) || ((PW_Start_Address + 766)>PW_in_size) )
- {
-/*printf ( "#1 (PW_i:%ld)\n" , PW_i );*/
- return BAD;
- }
-
- /* test #2 */
- PW_Start_Address = PW_i-3;
- PW_l=0;
- for ( PW_j=0 ; PW_j<31 ; PW_j++ )
- {
- PW_k = (((in_data[PW_Start_Address+PW_j*8]*256)+in_data[PW_Start_Address+1+PW_j*8])*2);
- PW_l += PW_k;
- /* finetune > 0x0f ? */
- if ( in_data[PW_Start_Address+2+8*PW_j] > 0x0f )
- {
-/*printf ( "#2 (start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- /* loop start > size ? */
- if ( (((in_data[PW_Start_Address+4+PW_j*8]*256)+in_data[PW_Start_Address+5+PW_j*8])*2) > PW_k )
- {
-/*printf ( "#2,1 (start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- }
- if ( PW_l <= 2 )
- {
-/*printf ( "#2,2 (start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
-
- /* test #3 about size of pattern list */
- PW_l = (in_data[PW_Start_Address+248]*256)+in_data[PW_Start_Address+249];
- PW_k = PW_l/4;
- if ( (PW_k*4) != PW_l )
- {
-/*printf ( "#3 (start:%ld)(PW_l:%ld)(PW_k:%ld)\n" , PW_Start_Address,PW_l,PW_k );*/
- return BAD;
- }
- if ( PW_k>127 )
- {
-/*printf ( "#3,1 (start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- if ( PW_l == 0 )
- {
-/*printf ( "#3,2 (start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
-
- /* test #4 size of all the pattern data */
- /* PW_k contains the size of the pattern list */
- PW_l = (in_data[PW_Start_Address+762]*256*256*256)
- +(in_data[PW_Start_Address+743]*256*256)
- +(in_data[PW_Start_Address+764]*256)
- +in_data[PW_Start_Address+765];
- if ( (PW_l<1024) || (PW_l>131072) || ((PW_l+PW_Start_Address)>PW_in_size) )
- {
-/*printf ( "#4 (start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
-
- /* test #5 first pattern address != $00000000 ? */
- /* bugfix : removed coz first addy can be != $00000000 ! */
-
- /* test #6 pattern addresses */
- /* PW_k is still ths size of the pattern list */
- for ( PW_j=0 ; PW_j<PW_k ; PW_j++ )
- {
- PW_l = (in_data[PW_Start_Address+250+PW_j*4]*256*256*256)
- +(in_data[PW_Start_Address+251+PW_j*4]*256*256)
- +(in_data[PW_Start_Address+252+PW_j*4]*256)
- +in_data[PW_Start_Address+253+PW_j*4];
- if ( PW_l > 131072 )
- {
-/*printf ( "#6 (start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- if ( ((PW_l/1024)*1024) != PW_l )
- {
- return BAD;
- }
- }
-
- /* test #7 last patterns in pattern table != $00000000 ? */
- PW_j += 4; /* just to be sure */
- while ( PW_j != 128 )
- {
- PW_l = (in_data[PW_Start_Address+250+PW_j*4]*256*256*256)
- +(in_data[PW_Start_Address+251+PW_j*4]*256*256)
- +(in_data[PW_Start_Address+252+PW_j*4]*256)
- +in_data[PW_Start_Address+253+PW_j*4];
- if ( PW_l != 0 )
- {
-/*printf ( "#7 (start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- PW_j += 1;
- }
-
- /* test #8 : first pattern data */
- for ( PW_j=0 ; PW_j<256 ; PW_j+=4 )
- {
- if ( (255-in_data[PW_Start_Address+766+PW_j])>0x13 )
- {
-/*printf ( "#8 (Start:%ld)\n", PW_Start_Address);*/
- return BAD;
- }
- }
-
- return GOOD;
-}
-
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-
-short testPM10c ( void )
-{
- /* test 1 */
- if ( (PW_Start_Address + 4452) > PW_in_size )
- {
- return BAD;
- }
-
- /* test 2 */
- if ( in_data[PW_Start_Address + 21] != 0xce )
- {
- return BAD;
- }
-
- /* test 3 */
- PW_j = (in_data[PW_Start_Address+4452]*256*256*256)+(in_data[PW_Start_Address+4453]*256*256)+(in_data[PW_Start_Address+4454]*256)+in_data[PW_Start_Address+4455];
- if ( (PW_Start_Address + PW_j + 4452) > PW_in_size )
- {
- return BAD;
- }
-
- /* test 4 */
- PW_k = (in_data[PW_Start_Address+4712]*256)+in_data[PW_Start_Address+4713];
- PW_l = PW_k/4;
- PW_l *= 4;
- if ( PW_l != PW_k )
- {
- return BAD;
- }
-
- /* test 5 */
- if ( in_data[PW_Start_Address + 36] != 0x10 )
- {
- return BAD;
- }
-
- /* test 6 */
- if ( in_data[PW_Start_Address + 37] != 0xFC )
- {
- return BAD;
- }
-
- return GOOD;
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-short testPM2 ( void )
-{
- PW_Start_Address = PW_i;
- /* test 1 */
- if ( (PW_Start_Address + 5714) > PW_in_size )
- {
- return BAD;
- }
-
- /* test 2 */
- /*if ( in_data[PW_Start_Address+5094] != 0x03 )*/
- /* not sure in fact ... */
- /* well, it IS the frequency table, it always seem */
- /* to be the 'standard one .. so here, there is 0358h */
- /* {
- return BAD;
- }*/
-
- /* test 3 */
- if ( in_data[PW_Start_Address+5461] > 0x40 )
- /* testing a volume */
- {
- return BAD;
- }
-
- return GOOD;
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-short testPM40 ( void )
-{
- PW_Start_Address = PW_i;
-
- /* size of the pattern list */
- PW_j = in_data[PW_Start_Address+7];
- if ( PW_j > 0x7f )
- {
-/*printf ( "#1 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- /* PW_j is the size of the pattern list */
-
- /* finetune */
- for ( PW_k=0 ; PW_k<31 ; PW_k++ )
- {
- if ( in_data[PW_Start_Address+PW_k*8+266] > 0x0f )
- {
-/*printf ( "#2 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- }
-
- /* volume */
- for ( PW_k=0 ; PW_k<31 ; PW_k++ )
- {
- if ( in_data[PW_Start_Address+PW_k*8+267] > 0x40 )
- {
-/*printf ( "#3 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- }
-
- /* sample data address */
- PW_l = ( (in_data[PW_Start_Address+512]*256*256*256)+
- (in_data[PW_Start_Address+513]*256*256)+
- (in_data[PW_Start_Address+514]*256)+
- in_data[PW_Start_Address+515] );
- if ( (PW_l <= 520) || (PW_l > 2500000l ) )
- {
-/*printf ( "#4 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
-
- /* PW_l is the sample data address */
- return GOOD;
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-short testPMZ ( void )
-{
- PW_Start_Address = PW_i;
-
- /* test 1 */
- if ( (PW_Start_Address + 4456) > PW_in_size )
- {
- return BAD;
- }
-
- /* test 2 */
- if ( in_data[PW_Start_Address + 21] != 0xd2 )
- {
- return BAD;
- }
-
- /* test 3 */
- PW_j = (in_data[PW_Start_Address+4456]*256*256*256)+(in_data[PW_Start_Address+4457]*256*256)+(in_data[PW_Start_Address+4458]*256)+in_data[PW_Start_Address+4459];
- if ( (PW_Start_Address + PW_j + 4456) > PW_in_size )
- {
- return BAD;
- }
-
- /* test 4 */
- PW_k = (in_data[PW_Start_Address+4712]*256)+in_data[PW_Start_Address+4713];
- PW_l = PW_k/4;
- PW_l *= 4;
- if ( PW_l != PW_k )
- {
- return BAD;
- }
-
- /* test 5 */
- if ( in_data[PW_Start_Address + 36] != 0x11 )
- {
- return BAD;
- }
-
- /* test 6 */
- if ( in_data[PW_Start_Address + 37] != 0x00 )
- {
- return BAD;
- }
-
- return GOOD;
-}
-
+++ /dev/null
-/* (Mar 2003)
- * polka.c
-*/
-
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-short testPolka ( void )
-{
- /* test #1 */
- if ( (PW_i < 0x438) || ((PW_i+0x830)>PW_in_size))
- {
- return BAD;
- }
-
- /* test #2 */
- PW_Start_Address = PW_i-0x438;
- PW_l=0;
- for ( PW_j=0 ; PW_j<31 ; PW_j++ )
- {
- /* size */
- PW_k = (((in_data[PW_Start_Address+42+30*PW_j]*256)+in_data[PW_Start_Address+43+30*PW_j])*2);
- /* loop start */
- PW_m = (((in_data[PW_Start_Address+46+30*PW_j]*256)+in_data[PW_Start_Address+47+30*PW_j])*2);
- /* loop size */
- PW_n = (((in_data[PW_Start_Address+48+30*PW_j]*256)+in_data[PW_Start_Address+49+30*PW_j])*2);
- PW_WholeSampleSize += PW_k;
-
- if ( test_smps(PW_k, PW_m, PW_n, in_data[PW_Start_Address+45+30*PW_j], in_data[PW_Start_Address+44+30*PW_j] ) == BAD )
- {
- /* printf ("#2 (start:%ld)(siz:%ld)(lstart:%ld)(lsiz:%ld)(vol:%d)(fine:%d)(Where:%ld)\n"
- ,PW_Start_Address,PW_k,PW_m,PW_n
- ,in_data[PW_Start_Address+0x2d +30+PW_j],in_data[PW_Start_Address+0x2c +30*PW_j]
- ,PW_Start_Address+0x2a + 30*PW_j);*/
- return BAD;
- }
- }
- if ( PW_WholeSampleSize <= 2 )
- {
- /* printf( "#2,1\n" );*/
- return BAD;
- }
-
- /* test #3 */
- PW_l = in_data[PW_Start_Address+0x3b6];
- if ( (PW_l > 0x7f) || (PW_l == 0x00) )
- {
- /*printf( "#3\n" );*/
- return BAD;
- }
-
- /* test #4 */
- /* PW_l contains the size of the pattern list */
- PW_k = 0;
- for ( PW_j=0 ; PW_j<128 ; PW_j++ )
- {
- if ( in_data[PW_Start_Address+0x3b8+PW_j] > PW_k )
- PW_k = in_data[PW_Start_Address+0x3b8+PW_j];
- if ( in_data[PW_Start_Address+0x3b8+PW_j] > 0x7f )
- {
- /*printf( "#4 (start:%ld)\n",PW_Start_Address );*/
- return BAD;
- }
- }
- PW_k += 1;
-
- /* test #5 notes .. gosh ! (testing all patterns !) */
- /* PW_k contains the number of pattern saved */
- /* PW_WholeSampleSize contains the whole sample size :) */
- for ( PW_j=0 ; PW_j<(256*PW_k) ; PW_j++ )
- {
- PW_l = in_data[PW_Start_Address+0x43c+PW_j*4];
- if ( (PW_l > 72) || (((PW_l/2)*2)!=PW_l) )
- {
- /*printf( "#5 (start:%ld)(note:%ld)(where:%ld)\n",PW_Start_Address,PW_l,PW_Start_Address+0x43c +PW_j*4 );*/
- return BAD;
- }
- PW_l = in_data[PW_Start_Address+0x43e +PW_j*4]&0xf0;
- PW_m = in_data[PW_Start_Address+0x43d +PW_j*4];
- if ( (PW_l != 0) || (PW_m > 0x1f))
- {
- /*printf ( "#5,1 (Start:%ld)(where:%ld)(note:%ld)\n" , PW_Start_Address,PW_Start_Address+0x43c +PW_j*4, PW_m );*/
- return BAD;
- }
- }
-
- return GOOD;
-}
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-short testPowerpacker23 ( void )
-{
- PW_Start_Address = PW_i;
-
- if ( (in_data[PW_Start_Address+16] != 0x22 ) ||
- (in_data[PW_Start_Address+17] != 0x48 ) ||
- (in_data[PW_Start_Address+18] != 0xD3 ) ||
- (in_data[PW_Start_Address+19] != 0xFC ) ||
- (in_data[PW_Start_Address+20] != 0x00 ) ||
- (in_data[PW_Start_Address+21] != 0x00 ) ||
- (in_data[PW_Start_Address+22] != 0x02 ) ||
- (in_data[PW_Start_Address+23] != 0x00 ) ||
- (in_data[PW_Start_Address+24] != 0x2C ) ||
- (in_data[PW_Start_Address+25] != 0x78 ) ||
- (in_data[PW_Start_Address+26] != 0x00 ) ||
- (in_data[PW_Start_Address+27] != 0x04 ) ||
- (in_data[PW_Start_Address+28] != 0x48 ) ||
- (in_data[PW_Start_Address+29] != 0xE7 ) ||
- (in_data[PW_Start_Address+30] != 0x00 ) ||
- (in_data[PW_Start_Address+31] != 0xC0 ) )
- {
- /* should be enough :))) */
-/*printf ( "#2 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
-
- }
-
-
- /* packed size */
- PW_l = ( (in_data[PW_Start_Address+344]*256*256*256) +
- (in_data[PW_Start_Address+345]*256*256) +
- (in_data[PW_Start_Address+346]*256) +
- in_data[PW_Start_Address+347] );
-
- PW_l += 572;
-
- if ( PW_i >= 36 )
- {
- if ( (in_data[PW_Start_Address-36] != 0x00 ) ||
- (in_data[PW_Start_Address-35] != 0x00 ) ||
- (in_data[PW_Start_Address-34] != 0x03 ) ||
- (in_data[PW_Start_Address-33] != 0xF3 ) ||
- (in_data[PW_Start_Address-32] != 0x00 ) ||
- (in_data[PW_Start_Address-31] != 0x00 ) ||
- (in_data[PW_Start_Address-30] != 0x00 ) ||
- (in_data[PW_Start_Address-29] != 0x00 ) ||
- (in_data[PW_Start_Address-28] != 0x00 ) ||
- (in_data[PW_Start_Address-27] != 0x00 ) ||
- (in_data[PW_Start_Address-26] != 0x00 ) ||
- (in_data[PW_Start_Address-25] != 0x02 ) ||
- (in_data[PW_Start_Address-24] != 0x00 ) ||
- (in_data[PW_Start_Address-23] != 0x00 ) ||
- (in_data[PW_Start_Address-22] != 0x00 ) ||
- (in_data[PW_Start_Address-21] != 0x00 ) )
- {
- Amiga_EXE_Header = BAD;
- }
- else
- Amiga_EXE_Header = GOOD;
- }
- else
- Amiga_EXE_Header = BAD;
-
-
- return GOOD;
- /* PW_l is the size of the pack */
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-short testPowerpacker30 ( void )
-{
- PW_Start_Address = PW_i;
-
- if ( (in_data[PW_Start_Address+16] != 0xD1 ) ||
- (in_data[PW_Start_Address+17] != 0xC8 ) ||
- (in_data[PW_Start_Address+18] != 0x58 ) ||
- (in_data[PW_Start_Address+19] != 0x48 ) ||
- (in_data[PW_Start_Address+20] != 0x26 ) ||
- (in_data[PW_Start_Address+21] != 0x48 ) ||
- (in_data[PW_Start_Address+22] != 0x50 ) ||
- (in_data[PW_Start_Address+23] != 0x4B ) ||
- (in_data[PW_Start_Address+24] != 0x2C ) ||
- (in_data[PW_Start_Address+25] != 0x78 ) ||
- (in_data[PW_Start_Address+26] != 0x00 ) ||
- (in_data[PW_Start_Address+27] != 0x04 ) ||
- (in_data[PW_Start_Address+28] != 0x2F ) ||
- (in_data[PW_Start_Address+29] != 0x08 ) ||
- (in_data[PW_Start_Address+30] != 0xD1 ) ||
- (in_data[PW_Start_Address+31] != 0xFC ) )
- {
- /* should be enough :))) */
-/*printf ( "#2 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
-
- }
-
-
- /* packed size */
- PW_l = ( (in_data[PW_Start_Address+32]*256*256*256) +
- (in_data[PW_Start_Address+33]*256*256) +
- (in_data[PW_Start_Address+34]*256) +
- in_data[PW_Start_Address+35] );
-
- PW_l += 600;
-
- if ( PW_i >= 36 )
- {
- if ( (in_data[PW_Start_Address-36] != 0x00 ) ||
- (in_data[PW_Start_Address-35] != 0x00 ) ||
- (in_data[PW_Start_Address-34] != 0x03 ) ||
- (in_data[PW_Start_Address-33] != 0xF3 ) ||
- (in_data[PW_Start_Address-32] != 0x00 ) ||
- (in_data[PW_Start_Address-31] != 0x00 ) ||
- (in_data[PW_Start_Address-30] != 0x00 ) ||
- (in_data[PW_Start_Address-29] != 0x00 ) ||
- (in_data[PW_Start_Address-28] != 0x00 ) ||
- (in_data[PW_Start_Address-27] != 0x00 ) ||
- (in_data[PW_Start_Address-26] != 0x00 ) ||
- (in_data[PW_Start_Address-25] != 0x02 ) ||
- (in_data[PW_Start_Address-24] != 0x00 ) ||
- (in_data[PW_Start_Address-23] != 0x00 ) ||
- (in_data[PW_Start_Address-22] != 0x00 ) ||
- (in_data[PW_Start_Address-21] != 0x00 ) )
- {
- Amiga_EXE_Header = BAD;
- }
- else
- Amiga_EXE_Header = GOOD;
- }
- else
- Amiga_EXE_Header = BAD;
-
-
- return GOOD;
- /* PW_l is the size of the pack */
-}
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-short testPowerpacker40 ( void )
-{
- PW_Start_Address = PW_i;
-
- if ( (in_data[PW_Start_Address+16] != 0xD1 ) ||
- (in_data[PW_Start_Address+17] != 0xC8 ) ||
- (in_data[PW_Start_Address+18] != 0x58 ) ||
- (in_data[PW_Start_Address+19] != 0x48 ) ||
- (in_data[PW_Start_Address+20] != 0x26 ) ||
- (in_data[PW_Start_Address+21] != 0x48 ) ||
- (in_data[PW_Start_Address+22] != 0x50 ) ||
- (in_data[PW_Start_Address+23] != 0x4B ) ||
- (in_data[PW_Start_Address+24] != 0x2C ) ||
- (in_data[PW_Start_Address+25] != 0x78 ) ||
- (in_data[PW_Start_Address+26] != 0x00 ) ||
- (in_data[PW_Start_Address+27] != 0x04 ) ||
- (in_data[PW_Start_Address+28] != 0x2F ) ||
- (in_data[PW_Start_Address+29] != 0x08 ) ||
- (in_data[PW_Start_Address+30] != 0xD1 ) ||
- (in_data[PW_Start_Address+31] != 0xFC ) )
- {
- /* should be enough :))) */
-/*printf ( "#2 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
-
- }
-
-
- /* packed size */
- PW_l = ( (in_data[PW_Start_Address+32]*256*256*256) +
- (in_data[PW_Start_Address+33]*256*256) +
- (in_data[PW_Start_Address+34]*256) +
- in_data[PW_Start_Address+35] );
-
- PW_l += 684;
-
- if ( PW_i >= 36 )
- {
- if ( (in_data[PW_Start_Address-36] != 0x00 ) ||
- (in_data[PW_Start_Address-35] != 0x00 ) ||
- (in_data[PW_Start_Address-34] != 0x03 ) ||
- (in_data[PW_Start_Address-33] != 0xF3 ) ||
- (in_data[PW_Start_Address-32] != 0x00 ) ||
- (in_data[PW_Start_Address-31] != 0x00 ) ||
- (in_data[PW_Start_Address-30] != 0x00 ) ||
- (in_data[PW_Start_Address-29] != 0x00 ) ||
- (in_data[PW_Start_Address-28] != 0x00 ) ||
- (in_data[PW_Start_Address-27] != 0x00 ) ||
- (in_data[PW_Start_Address-26] != 0x00 ) ||
- (in_data[PW_Start_Address-25] != 0x02 ) ||
- (in_data[PW_Start_Address-24] != 0x00 ) ||
- (in_data[PW_Start_Address-23] != 0x00 ) ||
- (in_data[PW_Start_Address-22] != 0x00 ) ||
- (in_data[PW_Start_Address-21] != 0x00 ) )
- {
- Amiga_EXE_Header = BAD;
- }
- else
- Amiga_EXE_Header = GOOD;
- }
- else
- Amiga_EXE_Header = BAD;
-
-
- return GOOD;
- /* PW_l is the size of the pack */
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-short testPowerpacker4lib ( void )
-{
- PW_Start_Address = PW_i;
-
- if ( (in_data[PW_Start_Address+92] != 'p' ) ||
- (in_data[PW_Start_Address+93] != 'o' ) ||
- (in_data[PW_Start_Address+94] != 'w' ) ||
- (in_data[PW_Start_Address+95] != 'e' ) ||
- (in_data[PW_Start_Address+96] != 'r' ) ||
- (in_data[PW_Start_Address+97] != 'p' ) ||
- (in_data[PW_Start_Address+98] != 'a' ) ||
- (in_data[PW_Start_Address+99] != 'c' ) ||
- (in_data[PW_Start_Address+100]!= 'k' ) ||
- (in_data[PW_Start_Address+101]!= 'e' ) ||
- (in_data[PW_Start_Address+102]!= 'r' ) ||
- (in_data[PW_Start_Address+103]!= '.' ) ||
- (in_data[PW_Start_Address+104]!= 'l' ) ||
- (in_data[PW_Start_Address+105]!= 'i' ) ||
- (in_data[PW_Start_Address+106]!= 'b' ) ||
- (in_data[PW_Start_Address+107]!= 'r' ) ||
- (in_data[PW_Start_Address+108]!= 'a' ) ||
- (in_data[PW_Start_Address+109]!= 'r' ) ||
- (in_data[PW_Start_Address+110]!= 'y' ) )
- {
-/*printf ( "#2 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
-
- }
-
-
- /* packed size */
- PW_l = ( (in_data[PW_Start_Address+32]*256*256*256) +
- (in_data[PW_Start_Address+33]*256*256) +
- (in_data[PW_Start_Address+34]*256) +
- in_data[PW_Start_Address+35] );
-
- PW_l += 176;
-
- if ( PW_i >= 36 )
- {
- if ( (in_data[PW_Start_Address-36] != 0x00 ) ||
- (in_data[PW_Start_Address-35] != 0x00 ) ||
- (in_data[PW_Start_Address-34] != 0x03 ) ||
- (in_data[PW_Start_Address-33] != 0xF3 ) ||
- (in_data[PW_Start_Address-32] != 0x00 ) ||
- (in_data[PW_Start_Address-31] != 0x00 ) ||
- (in_data[PW_Start_Address-30] != 0x00 ) ||
- (in_data[PW_Start_Address-29] != 0x00 ) ||
- (in_data[PW_Start_Address-28] != 0x00 ) ||
- (in_data[PW_Start_Address-27] != 0x00 ) ||
- (in_data[PW_Start_Address-26] != 0x00 ) ||
- (in_data[PW_Start_Address-25] != 0x02 ) ||
- (in_data[PW_Start_Address-24] != 0x00 ) ||
- (in_data[PW_Start_Address-23] != 0x00 ) ||
- (in_data[PW_Start_Address-22] != 0x00 ) ||
- (in_data[PW_Start_Address-21] != 0x00 ) )
- {
- Amiga_EXE_Header = BAD;
- }
- else
- Amiga_EXE_Header = GOOD;
- }
- else
- Amiga_EXE_Header = BAD;
-
- return GOOD;
- /* PW_l is the size of the pack */
-}
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-short testPP10 ( void )
-{
- /* test #1 */
- if ( (PW_i < 3) || ((PW_i+246)>=PW_in_size))
- {
-/*printf ( "#1 (PW_i:%ld)\n" , PW_i );*/
- return BAD;
- }
- PW_Start_Address = PW_i-3;
-
- /* noisetracker byte */
- if ( in_data[PW_Start_Address+249] > 0x7f )
- {
-/*printf ( "#1,1 (start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
-
- /* test #2 */
- PW_WholeSampleSize = 0;
- for ( PW_j=0 ; PW_j<31 ; PW_j++ )
- {
- PW_k = (((in_data[PW_Start_Address+PW_j*8]*256)+in_data[PW_Start_Address+1+PW_j*8])*2);
- PW_l = (((in_data[PW_Start_Address+PW_j*8+4]*256)+in_data[PW_Start_Address+5+PW_j*8])*2);
- /* loop size */
- PW_m = (((in_data[PW_Start_Address+PW_j*8+6]*256)+in_data[PW_Start_Address+7+PW_j*8])*2);
- if ( (PW_m == 0) || (PW_m == PW_l) )
- {
-/*printf ( "#1,98 (start:%ld) (PW_k:%ld) (PW_l:%ld) (PW_m:%ld)\n" , PW_Start_Address,PW_k,PW_l,PW_m );*/
- return BAD;
- }
- if ( (PW_l != 0) && (PW_m <= 2) )
- {
-/*printf ( "#1,99 (start:%ld) (PW_k:%ld) (PW_l:%ld) (PW_m:%ld)\n" , PW_Start_Address,PW_k,PW_l,PW_m );*/
- return BAD;
- }
- if ( (PW_l+PW_m) > (PW_k+2) )
- {
-/*printf ( "#2,0 (start:%ld) (PW_k:%ld) (PW_l:%ld) (PW_m:%ld)\n" , PW_Start_Address,PW_k,PW_l,PW_m );*/
- return BAD;
- }
- if ( (PW_l!=0) && (PW_m == 0) )
- {
-/*printf ( "#2,01 (start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- PW_WholeSampleSize += PW_k;
- /* finetune > 0x0f ? */
- if ( in_data[PW_Start_Address+2+8*PW_j] > 0x0f )
- {
-/*printf ( "#2 (start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- /* volume > 0x40 ? */
- if ( in_data[PW_Start_Address+3+8*PW_j] > 0x40 )
- {
-/*printf ( "#2,1 (start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- /* loop start > size ? */
- if ( (((in_data[PW_Start_Address+4+PW_j*8]*256)+in_data[PW_Start_Address+5+PW_j*8])*2) > PW_k )
- {
-/*printf ( "#2,2 (start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- /* size > 0xffff ? */
- if ( PW_k > 0xFFFF )
- {
-/*printf ( "#2,3 (start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- }
- if ( PW_WholeSampleSize <= 2 )
- {
-/*printf ( "#2,4 (start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- /* PW_WholeSampleSize = whole sample size */
-
- /* test #3 about size of pattern list */
- PW_l = in_data[PW_Start_Address+248];
- if ( (PW_l > 127) || (PW_l==0) )
- {
-/*printf ( "#3 (start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
-
- /* get the highest track value */
- PW_k=0;
- for ( PW_j=0 ; PW_j<512 ; PW_j++ )
- {
- PW_l = in_data[PW_Start_Address+250+PW_j];
- if ( PW_l>PW_k )
- PW_k = PW_l;
- }
- /* PW_k is the highest track number */
- PW_k += 1;
- PW_k *= 64;
-
- if ( PW_Start_Address + 762 + (PW_k*4) > PW_in_size )
- {
- return BAD;
- }
-
- /* track data test */
- PW_l=0;
- for ( PW_j=0 ; PW_j<PW_k ; PW_j++ )
- {
- if ( in_data[PW_Start_Address+762+PW_j*4] > 0x13 )
- {
-/*printf ( "#3,1 (start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- if ( ((in_data[PW_Start_Address+762+PW_j*4]&0x0f) == 0x00 ) && (in_data[PW_Start_Address+763+PW_j*4] < 0x71) && (in_data[PW_Start_Address+763+PW_j*4] != 0x00))
- {
- /* printf ( "#3,2 (start:%ld)(where:%ld)\n",PW_Start_Address,762+PW_j*4 );*/
- return BAD;
- }
- if ( ((in_data[PW_Start_Address+762+PW_j*4]&0x0f) != 0x00 ) || (in_data[PW_Start_Address+763+PW_j*4] != 0x00 ))
- PW_l = 1;
- }
- if ( PW_l == 0 )
- {
- /* only some empty patterns */
- return BAD;
- }
- PW_k *= 4;
-
- /* PW_WholeSampleSize is the sample data size */
- /* PW_k is the track data size */
- return GOOD;
-}
-
-
+++ /dev/null
-/*
- * 5th, oct 2001 : strenghtened a test that hanged the prog sometimes
-*/
-
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-short testPP21 ( void )
-{
- /* test #1 */
- if ( (PW_i < 3) || ((PW_i+891)>=PW_in_size))
- {
-/*printf ( "#1 (PW_i:%ld)\n" , PW_i );*/
- return BAD;
- }
-
- /* test #2 */
- PW_Start_Address = PW_i-3;
- PW_WholeSampleSize=0;
- for ( PW_j=0 ; PW_j<31 ; PW_j++ )
- {
- PW_k = (((in_data[PW_Start_Address+PW_j*8]*256)+in_data[PW_Start_Address+1+PW_j*8])*2);
- PW_WholeSampleSize += PW_k;
- /* finetune > 0x0f ? */
- if ( in_data[PW_Start_Address+2+8*PW_j] > 0x0f )
- {
-/*printf ( "#2 (start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- /* loop start > size ? */
- if ( (((in_data[PW_Start_Address+4+PW_j*8]*256)+in_data[PW_Start_Address+5+PW_j*8])*2) > PW_k )
- {
-/*printf ( "#2,1 (start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- }
- if ( PW_WholeSampleSize <= 2 )
- {
-/*printf ( "#2,2 (start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
-
- /* test #3 about size of pattern list */
- PW_l = in_data[PW_Start_Address+248];
- if ( (PW_l > 127) || (PW_l==0) )
- {
-/*printf ( "#3 (start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
-
- /* get the highest track value */
- PW_k=0;
- for ( PW_j=0 ; PW_j<512 ; PW_j++ )
- {
- PW_l = in_data[PW_Start_Address+250+PW_j];
- if ( PW_l>PW_k )
- PW_k = PW_l;
- }
- /* PW_k is the highest track number */
- PW_k += 1;
- PW_k *= 64;
- if ( (PW_k*2) + PW_Start_Address + 763 > PW_in_size )
- {
-/* printf ( "#3,5 (start:%ld)\n" , PW_Start_Address)*/
- return BAD;
- }
-
- /* test #4 track data value > $4000 ? */
- PW_m = 0;
- for ( PW_j=0 ; PW_j<PW_k ; PW_j++ )
- {
- PW_l = (in_data[PW_Start_Address+762+PW_j*2]*256)+in_data[PW_Start_Address+763+PW_j*2];
- if ( PW_l > PW_m )
- PW_m = PW_l;
- if ( PW_l > 0x4000 )
- {
-/*printf ( "#4 (start:%ld)(where:%ld)\n" , PW_Start_Address,PW_Start_Address+PW_j*2+762 );*/
- return BAD;
- }
- }
-
- /* test #5 reference table size *4 ? */
- PW_k *= 2;
- PW_l = (in_data[PW_Start_Address+PW_k+762]*256*256*256)
- +(in_data[PW_Start_Address+PW_k+763]*256*256)
- +(in_data[PW_Start_Address+PW_k+764]*256)
- +in_data[PW_Start_Address+PW_k+765];
- if ( PW_l != ((PW_m+1)*4) )
- {
-/*printf ( "#5 (start:%ld)(where:%ld)\n" , PW_Start_Address,(PW_Start_Address+PW_k+762) );*/
- return BAD;
- }
-
- return GOOD;
-}
-
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-short testPP30 ( void )
-{
- /* test #1 */
- if ( (PW_i < 3) || ((PW_i+891)>=PW_in_size))
- {
-/*printf ( "#1 (PW_i:%ld)\n" , PW_i );*/
- return BAD;
- }
-
- /* test #2 */
- PW_Start_Address = PW_i-3;
- PW_WholeSampleSize=0;
- for ( PW_j=0 ; PW_j<31 ; PW_j++ )
- {
- PW_k = (((in_data[PW_Start_Address+PW_j*8]*256)+in_data[PW_Start_Address+PW_j*8+1])*2);
- PW_WholeSampleSize += PW_k;
- /* finetune > 0x0f ? */
- if ( in_data[PW_Start_Address+8*PW_j+2] > 0x0f )
- {
-/*printf ( "#2 (start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- /* volume > 0x40 ? */
- if ( in_data[PW_Start_Address+8*PW_j+3] > 0x40 )
- {
-/*printf ( "#2,0 (start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- /* loop start > size ? */
- if ( (((in_data[PW_Start_Address+4+PW_j*8]*256)+in_data[PW_Start_Address+5+PW_j*8])*2) > PW_k )
- {
-/*printf ( "#2,1 (start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- }
- if ( PW_WholeSampleSize <= 2 )
- {
-/*printf ( "#2,2 (start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
-
- /* test #3 about size of pattern list */
- PW_l = in_data[PW_Start_Address+248];
- if ( (PW_l > 127) || (PW_l==0) )
- {
-/*printf ( "#3 (start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
-
- /* get the highest track value */
- PW_k=0;
- for ( PW_j=0 ; PW_j<512 ; PW_j++ )
- {
- PW_l = in_data[PW_Start_Address+250+PW_j];
- if ( PW_l>PW_k )
- PW_k = PW_l;
- }
- /* PW_k is the highest track number */
- PW_k += 1;
- PW_k *= 64;
-
- /* test #4 track data value *4 ? */
- /* PW_WholeSampleSize is the whole sample size */
- PW_m = 0;
- if ( ((PW_k*2)+PW_Start_Address+763) > PW_in_size )
- {
- return BAD;
- }
- for ( PW_j=0 ; PW_j<PW_k ; PW_j++ )
- {
- PW_l = (in_data[PW_Start_Address+762+PW_j*2]*256)+in_data[PW_Start_Address+763+PW_j*2];
- if ( PW_l > PW_m )
- PW_m = PW_l;
- if ( ((PW_l*4)/4) != PW_l )
- {
-/*printf ( "#4 (start:%ld)(where:%ld)\n" , PW_Start_Address,PW_Start_Address+PW_j*2+762 );*/
- return BAD;
- }
- }
-
- /* test #5 reference table size *4 ? */
- /* PW_m is the highest reference number */
- PW_k *= 2;
- PW_m /= 4;
- PW_l = (in_data[PW_Start_Address+PW_k+762]*256*256*256)
- +(in_data[PW_Start_Address+PW_k+763]*256*256)
- +(in_data[PW_Start_Address+PW_k+764]*256)
- +in_data[PW_Start_Address+PW_k+765];
- if ( PW_l > 65535 )
- {
- return BAD;
- }
- if ( PW_l != ((PW_m+1)*4) )
- {
-/*printf ( "#5 (start:%ld)(where:%ld)\n" , PW_Start_Address,(PW_Start_Address+PW_k+762) );*/
- return BAD;
- }
-
- /* test #6 data in reference table ... */
- for ( PW_j=0 ; PW_j<(PW_l/4) ; PW_j++ )
- {
- /* volume > 41 ? */
- if ( ((in_data[PW_Start_Address+PW_k+766+PW_j*4+2]&0x0f)==0x0c) &&
- (in_data[PW_Start_Address+PW_k+766+PW_j*4+3] > 0x41 ) )
- {
-/*printf ( "#6 (vol > 40 at : %ld)\n" , PW_Start_Address+PW_k+766+PW_j*4+2 );*/
- return BAD;
- }
- /* break > 40 ? */
- if ( ((in_data[PW_Start_Address+PW_k+766+PW_j*4+2]&0x0f)==0x0d) &&
- (in_data[PW_Start_Address+PW_k+766+PW_j*4+3] > 0x40 ) )
- {
-/*printf ( "#6,1\n" );*/
- return BAD;
- }
- /* jump > 128 */
- if ( ((in_data[PW_Start_Address+PW_k+766+PW_j*4+2]&0x0f)==0x0b) &&
- (in_data[PW_Start_Address+PW_k+766+PW_j*4+3] > 0x7f ) )
- {
-/*printf ( "#6,2\n" );*/
- return BAD;
- }
- /* smp > 1f ? */
- if ((in_data[PW_Start_Address+PW_k+766+PW_j*4]&0xf0)>0x10)
- {
-/*printf ( "#6,3\n" );*/
- return BAD;
- }
- }
- /* PW_WholeSampleSize is the whole sample size */
-
- return GOOD;
-}
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-short testPPbk ( void )
-{
- PW_Start_Address = PW_i;
-
- /* packed size */
- PW_l = ( (in_data[PW_Start_Address+12]*256*256*256) +
- (in_data[PW_Start_Address+13]*256*256) +
- (in_data[PW_Start_Address+14]*256) +
- in_data[PW_Start_Address+15] );
-
- if ( PW_l > PW_in_size )
- {
-/*printf ( "#2 Start:%ld (header size:%ld) (in_size:%ld)\n" , PW_Start_Address,PW_l , PW_in_size);*/
- return BAD;
- }
-
-
- /* PP20 packed size */
- PW_k = ( (in_data[PW_Start_Address+20+PW_l]*256*256) +
- (in_data[PW_Start_Address+21+PW_l]*256) +
- in_data[PW_Start_Address+22+PW_l]);
- /* PP20 packed size */
- PW_m = ( (in_data[PW_Start_Address+8]*256*256*256) +
- (in_data[PW_Start_Address+9]*256*256) +
- (in_data[PW_Start_Address+10]*256) +
- in_data[PW_Start_Address+11] );
-
- if ( PW_m != PW_k )
- {
-/*printf ( "#2 Start:%ld (PP20 size:%ld) (Header size:%ld)\n" , PW_Start_Address , PW_k , PW_m );*/
- return BAD;
- }
-
- PW_l += 8;
- return GOOD;
- /* PW_l is the size of the pack (PP20 subfile size !)*/
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-short testPRUN1 ( void )
-{
- /* test 1 */
- if ( PW_i < 1080 )
- {
- return BAD;
- }
-
- /* test 2 */
- PW_Start_Address = PW_i-1080;
- if ( in_data[PW_Start_Address+951] != 0x7f )
- {
- return BAD;
- }
-
- /* test 3 */
- if ( in_data[PW_Start_Address+950] > 0x7f )
- {
- return BAD;
- }
- return GOOD;
-}
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-short testPRUN2 ( void )
-{
- PW_Start_Address = PW_i;
- PW_j = (in_data[PW_i+4]*256*256*256)+(in_data[PW_i+5]*256*256)+(in_data[PW_i+6]*256)+in_data[PW_i+7];
-
- /* test sample_data address */
- if ( (PW_j+PW_Start_Address) > PW_in_size )
- {
- return BAD;
- }
-
- /* test volumes */
- for ( PW_k=0 ; PW_k<31 ; PW_k++ )
- {
- if ( in_data[PW_Start_Address+11+PW_k*8] > 0x40 )
- {
- return BAD;
- }
- }
-
- /* test finetunes */
- for ( PW_k=0 ; PW_k<31 ; PW_k++ )
- {
- if ( in_data[PW_Start_Address+10+PW_k*8] > 0x0F )
- {
- return BAD;
- }
- }
-
- return GOOD;
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-short testPTK ( void )
-{
- /* test 1 */
- if ( PW_i < 1080 )
- {
-/*printf ( "#1 (PW_i:%ld)\n" , PW_i );*/
- return BAD;
- }
-
- /* test 2 */
- PW_Start_Address = PW_i-1080;
- PW_WholeSampleSize = 0;
- for ( PW_k=0 ; PW_k<31 ; PW_k++ )
- {
- /* size */
- PW_j = (((in_data[PW_Start_Address+42+PW_k*30]*256)+in_data[PW_Start_Address+43+PW_k*30])*2);
- /* loop start */
- PW_m = (((in_data[PW_Start_Address+46+PW_k*30]*256)+in_data[PW_Start_Address+47+PW_k*30])*2);
- /* loop size */
- PW_n = (((in_data[PW_Start_Address+48+PW_k*30]*256)+in_data[PW_Start_Address+49+PW_k*30])*2);
-
- if ( test_smps(PW_j*2, PW_m, PW_n, in_data[PW_Start_Address+45+30*PW_k], in_data[PW_Start_Address+44+30*PW_k] ) == BAD )
- {
- /*printf ( "start : %ld\n", PW_Start_Address );*/
- return BAD;
- }
-
- PW_WholeSampleSize += PW_j;
- }
-
- /* test #4 pattern list size */
- PW_l = in_data[PW_Start_Address+950];
- if ( (PW_l>127) || (PW_l==0) )
- {
- /*printf ( "#4,0 (Start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- /* PW_l holds the size of the pattern list */
- PW_k=0;
- for ( PW_j=0 ; PW_j<128 ; PW_j++ )
- {
- if ( in_data[PW_Start_Address+952+PW_j] > PW_k )
- PW_k = in_data[PW_Start_Address+952+PW_j];
- if ( in_data[PW_Start_Address+952+PW_j] > 127 )
- {
- /*printf ( "#4,1 (Start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- }
- /* PW_k holds the highest pattern number */
- /* test last patterns of the pattern list = 0 ? */
- PW_j += 2; /* found some obscure ptk :( */
- while ( PW_j < 128 )
- {
- if ( in_data[PW_Start_Address+952+PW_j] > 0x7f )
- {
- /*printf ( "#4,2 (Start:%ld) (PW_j:%ld) (at:%ld)\n" , PW_Start_Address,PW_j ,PW_Start_Address+952+PW_j );*/
- return BAD;
- }
- PW_j += 1;
- }
- /* PW_k is the number of pattern in the file (-1) */
- PW_k += 1;
-
-
- /* test #5 pattern data ... */
- if ( ((PW_k*1024)+1084+PW_Start_Address) > PW_in_size )
- {
-/*printf ( "#5,0 (Start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- for ( PW_j=0 ; PW_j<(PW_k*256) ; PW_j++ )
- {
- /* sample > 1f or pitch > 358 ? */
- if ( in_data[PW_Start_Address+1084+PW_j*4] > 0x13 )
- {
-/*printf ( "#5.1 (Start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- PW_l = ((in_data[PW_Start_Address+1084+PW_j*4]&0x0f)*256)+in_data[PW_Start_Address+1085+PW_j*4];
- if ( (PW_l>0) && (PW_l<0x1C) )
- {
-/*printf ( "#5,2 (Start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- }
-
- return GOOD;
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-short testQuadraComposer ( void )
-{
- /* test #1 */
- if ( PW_i < 8 )
- {
-/*printf ( "#1 (PW_i:%ld)\n" , PW_i );*/
- return BAD;
- }
- PW_Start_Address = PW_i-8;
-
- /* test #2 "FORM" & "EMIC" */
- if ( (in_data[PW_Start_Address] != 'F') ||
- (in_data[PW_Start_Address+1] != 'O') ||
- (in_data[PW_Start_Address+2] != 'R') ||
- (in_data[PW_Start_Address+3] != 'M') ||
- (in_data[PW_Start_Address+12] != 'E') ||
- (in_data[PW_Start_Address+13] != 'M') ||
- (in_data[PW_Start_Address+14] != 'I') ||
- (in_data[PW_Start_Address+15] != 'C') )
- {
-/*printf ( "#2 (start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
-
- /* test number of samples */
- PW_l = in_data[PW_Start_Address+63];
- if ( (PW_l == 0x00) || (PW_l > 0x20) )
- {
-/*printf ( "#3 (start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
-
- return GOOD;
-}
-
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-short testRelokIt10 ( void )
-{
- PW_Start_Address = PW_i;
-
- if ( (in_data[PW_Start_Address+16] != 0x00 ) ||
- (in_data[PW_Start_Address+17] != 0x00 ) ||
- (in_data[PW_Start_Address+18] != 0x01 ) ||
- (in_data[PW_Start_Address+19] != 0xF0 ) ||
- (in_data[PW_Start_Address+20] != 0x23 ) ||
- (in_data[PW_Start_Address+21] != 0xE8 ) ||
- (in_data[PW_Start_Address+22] != 0x00 ) ||
- (in_data[PW_Start_Address+23] != 0x06 ) ||
- (in_data[PW_Start_Address+24] != 0x00 ) ||
- (in_data[PW_Start_Address+25] != 0x00 ) ||
- (in_data[PW_Start_Address+26] != 0x01 ) ||
- (in_data[PW_Start_Address+27] != 0xEC ) ||
- (in_data[PW_Start_Address+28] != 0x20 ) ||
- (in_data[PW_Start_Address+29] != 0x28 ) ||
- (in_data[PW_Start_Address+30] != 0x00 ) ||
- (in_data[PW_Start_Address+31] != 0x0E ) )
- {
- /* should be enough :))) */
-/*printf ( "#2 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
-
- }
-
- PW_j = in_data[PW_Start_Address+721];
- PW_l = ( (in_data[PW_Start_Address+734+(PW_j*8)]*256*256*256) +
- (in_data[PW_Start_Address+735+(PW_j*8)]*256*256) +
- (in_data[PW_Start_Address+736+(PW_j*8)]*256) +
- in_data[PW_Start_Address+737+(PW_j*8)] );
- PW_l += (952 + (PW_j*8));
-
- if ( PW_i >= 36 )
- {
- if ( (in_data[PW_Start_Address-36] != 0x00 ) ||
- (in_data[PW_Start_Address-35] != 0x00 ) ||
- (in_data[PW_Start_Address-34] != 0x03 ) ||
- (in_data[PW_Start_Address-33] != 0xF3 ) ||
- (in_data[PW_Start_Address-32] != 0x00 ) ||
- (in_data[PW_Start_Address-31] != 0x00 ) ||
- (in_data[PW_Start_Address-30] != 0x00 ) ||
- (in_data[PW_Start_Address-29] != 0x00 ) ||
- (in_data[PW_Start_Address-28] != 0x00 ) ||
- (in_data[PW_Start_Address-27] != 0x00 ) ||
- (in_data[PW_Start_Address-26] != 0x00 ) ||
- (in_data[PW_Start_Address-25] != 0x02 ) ||
- (in_data[PW_Start_Address-24] != 0x00 ) ||
- (in_data[PW_Start_Address-23] != 0x00 ) ||
- (in_data[PW_Start_Address-22] != 0x00 ) ||
- (in_data[PW_Start_Address-21] != 0x00 ) )
- {
- Amiga_EXE_Header = BAD;
- }
- else
- Amiga_EXE_Header = GOOD;
- }
- else
- Amiga_EXE_Header = BAD;
-
- return GOOD;
- /* PW_l is the size of the pack */
-}
-
+++ /dev/null
-/*
- * Even in these poor lines, I managed to insert a bug :)
- *
- * update: 19/04/00
- * - bug correction (really testing volume !)
-*/
-
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-short testSKYT ( void )
-{
- /* test 1 */
- if ( PW_i < 256 )
- {
- return BAD;
- }
-
- /* test 2 */
- PW_WholeSampleSize = 0;
- PW_Start_Address = PW_i-256;
- for ( PW_j=0 ; PW_j<31 ; PW_j++ )
- {
- if ( in_data[PW_Start_Address+3+8*PW_j] > 0x40 )
- {
- return BAD;
- }
- PW_WholeSampleSize += (((in_data[PW_Start_Address+8*PW_j]*256)+in_data[PW_Start_Address+1+8*PW_j])*2);
- }
-
- return GOOD;
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-short testSoundFX13 ( void )
-{
- /* test 1 */
- if ( PW_i < 0x3C )
- {
-/*printf ( "#1 (PW_i:%ld)\n" , PW_i );*/
- return BAD;
- }
-
- /* test 2 */
- /* samples tests */
- PW_Start_Address = PW_i-0x3C;
- for ( PW_k=0 ; PW_k<15 ; PW_k++ )
- {
- /* size */
- PW_j = ((in_data[PW_Start_Address+PW_k*4+2]*256)+in_data[PW_Start_Address+PW_k*4+3]);
- /* loop start */
- PW_m = ((in_data[PW_Start_Address+106+PW_k*30]*256)+in_data[PW_Start_Address+107+PW_k*30]);
- /* loop size */
- PW_n = (((in_data[PW_Start_Address+108+PW_k*30]*256)+in_data[PW_Start_Address+109+PW_k*30])*2);
- /* all sample sizes */
-
- /* size,loopstart,replen > 64k ? */
- if ( (PW_j > 0xFFFF) || (PW_m > 0xFFFF) || (PW_n > 0xFFFF) )
- {
-/*printf ( "#2,0 (Start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- /* replen > size ? */
- if ( PW_n > (PW_j+2) )
- {
-/*printf ( "#2 (Start:%ld) (smp:%ld) (size:%ld) (replen:%ld)\n"
- , PW_Start_Address , PW_k+1 , PW_j , PW_n );*/
- return BAD;
- }
- /* loop start > size ? */
- if ( PW_m > PW_j )
- {
-/*printf ( "#2,0 (Start:%ld) (smp:%ld) (size:%ld) (lstart:%ld)\n"
- , PW_Start_Address , PW_k+1 , PW_j , PW_m );*/
- return BAD;
- }
- /* loop size =0 & loop start != 0 ?*/
- if ( (PW_m != 0) && (PW_n==0) )
- {
-/*printf ( "#2,1 (start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- /* size & loopstart !=0 & size=loopstart ? */
- if ( (PW_j != 0) && (PW_j==PW_m) )
- {
-/*printf ( "#2,15 (start:%ld) (smp:%ld) (siz:%ld) (lstart:%ld)\n"
- , PW_Start_Address,PW_k+1,PW_j,PW_m );*/
- return BAD;
- }
- /* size =0 & loop start !=0 */
- if ( (PW_j==0) && (PW_m!=0) )
- {
-/*printf ( "#2,2 (start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- }
-
- /* get real whole sample size */
- PW_WholeSampleSize = 0;
- for ( PW_j=0 ; PW_j<15 ; PW_j++ )
- {
- PW_k = ((in_data[PW_Start_Address+PW_j*4]*256*256*256)+
- (in_data[PW_Start_Address+PW_j*4+1]*256*256)+
- (in_data[PW_Start_Address+PW_j*4+2]*256)+
- in_data[PW_Start_Address+PW_j*4+3] );
- if ( PW_k > 131072 )
- {
-/*printf ( "#2,4 (start:%ld) (smp:%ld) (size:%ld)\n"
- , PW_Start_Address,PW_j,PW_k );*/
- return BAD;
- }
- PW_WholeSampleSize += PW_k;
- }
-
- /* test #3 finetunes & volumes */
- for ( PW_k=0 ; PW_k<15 ; PW_k++ )
- {
- if ( in_data[PW_Start_Address+105+PW_k*30]>0x40 )
- {
-/*printf ( "#3 (Start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- }
-
- /* test #4 pattern list size */
- PW_l = in_data[PW_Start_Address+0x212];
- if ( (PW_l>127) || (PW_l==0) )
- {
-/*printf ( "#4,0 (Start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- /* PW_l holds the size of the pattern list */
- PW_k=0;
- for ( PW_j=0 ; PW_j<PW_l ; PW_j++ )
- {
- if ( in_data[PW_Start_Address+0x214+PW_j] > PW_k )
- PW_k = in_data[PW_Start_Address+0x214+PW_j];
- if ( in_data[PW_Start_Address+0x214+PW_j] > 127 )
- {
-/*printf ( "#4,1 (Start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- }
- /* PW_k is the number of pattern in the file (-1) */
- PW_k += 1;
-
-
- /* test #5 pattern data ... */
- if ( ((PW_k*1024)+0x294+PW_Start_Address) > PW_in_size )
- {
-/*printf ( "#5,0 (Start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
-
- return GOOD;
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-short testSoundTracker ( void )
-{
- /* test 1 */
- /* start of stk before start of file ? */
- if ( (PW_i < 45) || ((PW_i+555)>PW_in_size) )
- {
-/*printf ( "#1 (PW_i:%ld)\n" , PW_i );*/
- return BAD;
- }
-
- /* test 2 */
- /* samples tests */
- PW_Start_Address = PW_i-45;
- PW_WholeSampleSize = 0;
- for ( PW_k=0 ; PW_k<15 ; PW_k++ )
- {
- /* size */
- PW_j = (((in_data[PW_Start_Address+42+PW_k*30]*256)+in_data[PW_Start_Address+43+PW_k*30])*2);
- /* loop start */
- PW_m = (((in_data[PW_Start_Address+46+PW_k*30]*256)+in_data[PW_Start_Address+47+PW_k*30])*2);
- /* loop size */
- PW_n = (((in_data[PW_Start_Address+48+PW_k*30]*256)+in_data[PW_Start_Address+49+PW_k*30])*2);
- /* all sample sizes */
- PW_WholeSampleSize += PW_j;
-
- /* size,loopstart,replen > 64k ? */
- if ( (PW_j > 0xFFFF) || (PW_m > 0xFFFF) || (PW_n > 0xFFFF) )
- {
-/*printf ( "#2,0 (Start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- /* replen > size ? */
- if ( PW_n > (PW_j+2) )
- {
-/*printf ( "#2 (Start:%ld) (smp:%ld) (size:%ld) (replen:%ld)\n"
- , PW_Start_Address , PW_k+1 , PW_j , PW_n );*/
- return BAD;
- }
- /* loop start > size ? */
- if ( PW_m > PW_j )
- {
-/*printf ( "#2,0 (Start:%ld) (smp:%ld) (size:%ld) (lstart:%ld)\n"
- , PW_Start_Address , PW_k+1 , PW_j , PW_m );*/
- return BAD;
- }
- /* loop size =0 & loop start != 0 ?*/
- if ( (PW_m != 0) && (PW_n==0) )
- {
-/*printf ( "#2,1\n" );*/
- return BAD;
- }
- /* size & loopstart !=0 & size=loopstart ? */
- if ( (PW_j != 0) && (PW_j==PW_m) )
- {
-/*printf ( "#2,15\n" );*/
- return BAD;
- }
- /* size =0 & loop start !=0 */
- if ( (PW_j==0) && (PW_m!=0) )
- {
-/*printf ( "#2,2\n" );*/
- return BAD;
- }
- }
- /* all sample sizes < 8 ? */
- if ( PW_WholeSampleSize<8 )
- {
-/*printf ( "#2,3\n" );*/
- return BAD;
- }
-
- /* test #3 finetunes & volumes */
- for ( PW_k=0 ; PW_k<15 ; PW_k++ )
- {
- if ( (in_data[PW_Start_Address+44+PW_k*30]>0x0f) || (in_data[PW_Start_Address+45+PW_k*30]>0x40) )
- {
-/*printf ( "#3 (Start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- }
-
- /* test #4 pattern list size */
- PW_l = in_data[PW_Start_Address+470];
- if ( (PW_l>127) || (PW_l==0) )
- {
-/*printf ( "#4,0 (Start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- /* PW_l holds the size of the pattern list */
- PW_k=0;
- for ( PW_j=0 ; PW_j<PW_l ; PW_j++ )
- {
- if ( in_data[PW_Start_Address+472+PW_j] > PW_k )
- PW_k = in_data[PW_Start_Address+472+PW_j];
- if ( in_data[PW_Start_Address+472+PW_j] > 127 )
- {
-/*printf ( "#4,1 (Start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- }
- /* PW_k holds the highest pattern number */
- /* test last patterns of the pattern list = 0 ? */
- PW_j += 2; /* found some obscure stk :( */
- while ( PW_j != 128 )
- {
- if ( in_data[PW_Start_Address+472+PW_j] != 0 )
- {
-/*printf ( "#4,2 (Start:%ld) (PW_j:%ld) (at:%ld)\n" , PW_Start_Address,PW_j ,PW_Start_Address+472+PW_j );*/
- return BAD;
- }
- PW_j += 1;
- }
- /* PW_k is the number of pattern in the file (-1) */
- PW_k += 1;
-
-
- /* test #5 pattern data ... */
- if ( ((PW_k*1024)+600+PW_Start_Address) > PW_in_size )
- {
-/*printf ( "#5,0 (Start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- for ( PW_j=0 ; PW_j<(PW_k*256) ; PW_j++ )
- {
- /* sample > 1f or pitch > 358 ? */
- if ( in_data[PW_Start_Address+600+PW_j*4] > 0x13 )
- {
-/*printf ( "#5.1 (Start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- PW_l = ((in_data[PW_Start_Address+600+PW_j*4]&0x0f)*256)+in_data[PW_Start_Address+601+PW_j*4];
- if ( (PW_l>0) && (PW_l<0x71) )
- {
-/*printf ( "#5,2 (Start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- }
-
- return GOOD;
-}
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-short testSpikeCruncher ( void )
-{
- PW_Start_Address = PW_i;
-
- if ( (in_data[PW_Start_Address+38] != 0x2C ) ||
- (in_data[PW_Start_Address+39] != 0x78 ) ||
- (in_data[PW_Start_Address+40] != 0x00 ) ||
- (in_data[PW_Start_Address+41] != 0x04 ) ||
- (in_data[PW_Start_Address+42] != 0x22 ) ||
- (in_data[PW_Start_Address+43] != 0x4B ) ||
- (in_data[PW_Start_Address+44] != 0x24 ) ||
- (in_data[PW_Start_Address+45] != 0x4B ) ||
- (in_data[PW_Start_Address+46] != 0x2F ) ||
- (in_data[PW_Start_Address+47] != 0x0B ) ||
- (in_data[PW_Start_Address+48] != 0x20 ) ||
- (in_data[PW_Start_Address+49] != 0x3A ) ||
- (in_data[PW_Start_Address+50] != 0xFF ) ||
- (in_data[PW_Start_Address+51] != 0xD8 ) ||
- (in_data[PW_Start_Address+52] != 0xD3 ) ||
- (in_data[PW_Start_Address+53] != 0xC0 ) )
- {
- /* should be enough :))) */
-/*printf ( "#2 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
-
- }
-
-
- /* packed size */
- PW_l = ( (in_data[PW_Start_Address+10]*256*256*256) +
- (in_data[PW_Start_Address+11]*256*256) +
- (in_data[PW_Start_Address+12]*256) +
- in_data[PW_Start_Address+13] );
-
- PW_l += 648;
-
- if ( PW_i >= 36 )
- {
- if ( (in_data[PW_Start_Address-36] != 0x00 ) ||
- (in_data[PW_Start_Address-35] != 0x00 ) ||
- (in_data[PW_Start_Address-34] != 0x03 ) ||
- (in_data[PW_Start_Address-33] != 0xF3 ) ||
- (in_data[PW_Start_Address-32] != 0x00 ) ||
- (in_data[PW_Start_Address-31] != 0x00 ) ||
- (in_data[PW_Start_Address-30] != 0x00 ) ||
- (in_data[PW_Start_Address-29] != 0x00 ) ||
- (in_data[PW_Start_Address-28] != 0x00 ) ||
- (in_data[PW_Start_Address-27] != 0x00 ) ||
- (in_data[PW_Start_Address-26] != 0x00 ) ||
- (in_data[PW_Start_Address-25] != 0x02 ) ||
- (in_data[PW_Start_Address-24] != 0x00 ) ||
- (in_data[PW_Start_Address-23] != 0x00 ) ||
- (in_data[PW_Start_Address-22] != 0x00 ) ||
- (in_data[PW_Start_Address-21] != 0x00 ) )
- {
- Amiga_EXE_Header = BAD;
- }
- else
- Amiga_EXE_Header = GOOD;
- }
- else
- Amiga_EXE_Header = BAD;
-
-
- return GOOD;
- /* PW_l is the size of the pack */
-}
+++ /dev/null
-/*
- * 27 dec 2001 : added some checks to prevent readings outside of
- * the input file.
-*/
-
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-short testSTARPACK ( void )
-{
- /* test 1 */
- if ( (PW_i < 23) || ((PW_i+269-23)>=PW_in_size) )
- {
-/*printf ( "#1 (PW_i:%ld)\n" , PW_i );*/
- return BAD;
- }
-
- /* test 2 */
- PW_Start_Address = PW_i-23;
- PW_l = (in_data[PW_Start_Address+268]*256)+in_data[PW_Start_Address+269];
- PW_k = PW_l/4;
- if ( (PW_k*4) != PW_l )
- {
-/*printf ( "#2,0 (Start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- if ( PW_k>127 )
- {
-/*printf ( "#2,1 (Start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- if ( (PW_k==0) || ((PW_Start_Address+784)>PW_in_size) )
- {
-/*printf ( "#2,2 (Start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
-
- if ( in_data[PW_Start_Address+784] != 0 )
- {
-/*printf ( "#3,-1 (Start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
-
- /* test #3 smp size < loop start + loop size ? */
- /* PW_l is still the size of the pattern list */
- PW_WholeSampleSize = 0;
- for ( PW_k=0 ; PW_k<31 ; PW_k++ )
- {
- PW_j = (((in_data[PW_Start_Address+20+PW_k*8]*256)+in_data[PW_Start_Address+21+PW_k*8])*2);
- PW_m = (((in_data[PW_Start_Address+24+PW_k*8]*256)+in_data[PW_Start_Address+25+PW_k*8])*2)
- +(((in_data[PW_Start_Address+26+PW_k*8]*256)+in_data[PW_Start_Address+27+PW_k*8])*2);
- if ( (PW_j+2) < PW_m )
- {
-/*printf ( "#3 (Start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- PW_WholeSampleSize += PW_j;
- }
-
- /* test #4 finetunes & volumes */
- /* PW_l is still the size of the pattern list */
- for ( PW_k=0 ; PW_k<31 ; PW_k++ )
- {
- if ( (in_data[PW_Start_Address+22+PW_k*8]>0x0f) || (in_data[PW_Start_Address+23+PW_k*8]>0x40) )
- {
-/*printf ( "#4 (Start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- }
-
- /* test #5 pattern addresses > sample address ? */
- /* PW_l is still the size of the pattern list */
- /* get sample data address */
- if ( (PW_Start_Address + 0x314) > PW_in_size )
- {
-/*printf ( "#5,-1 (Start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- /* PW_k gets address of sample data */
- PW_k = (in_data[PW_Start_Address+784]*256*256*256)
- +(in_data[PW_Start_Address+785]*256*256)
- +(in_data[PW_Start_Address+786]*256)
- +in_data[PW_Start_Address+787];
- if ( (PW_k+PW_Start_Address) > PW_in_size )
- {
-/*printf ( "#5,0 (Start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- if ( PW_k < 788 )
- {
-/*printf ( "#5,1 (Start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- /* PW_k is the address of the sample data */
- /* pattern addresses > sample address ? */
- for ( PW_j=0 ; PW_j<PW_l ; PW_j+=4 )
- {
- /* PW_m gets each pattern address */
- PW_m = (in_data[PW_Start_Address+272+PW_j]*256*256*256)
- +(in_data[PW_Start_Address+273+PW_j]*256*256)
- +(in_data[PW_Start_Address+274+PW_j]*256)
- +in_data[PW_Start_Address+275+PW_j];
- if ( PW_m > PW_k )
- {
-/*printf ( "#5,2 (Start:%ld) (smp addy:%ld) (pat addy:%ld) (pat nbr:%ld) (max:%ld)\n"
- , PW_Start_Address
- , PW_k
- , PW_m
- , (PW_j/4)
- , PW_l );*/
- return BAD;
- }
- }
- /* test last patterns of the pattern list == 0 ? */
- PW_j += 2;
- while ( PW_j<128 )
- {
- PW_m = (in_data[PW_Start_Address+272+PW_j*4]*256*256*256)
- +(in_data[PW_Start_Address+273+PW_j*4]*256*256)
- +(in_data[PW_Start_Address+274+PW_j*4]*256)
- +in_data[PW_Start_Address+275+PW_j*4];
- if ( PW_m != 0 )
- {
-/*printf ( "#5,3 (start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- PW_j += 1;
- }
-
-
- /* test pattern data */
- /* PW_k is the address of the sample data */
- PW_j = PW_Start_Address + 788;
- /* PW_j points on pattern data */
-/*printf ( "PW_j:%ld , PW_k:%ld\n" , PW_j , PW_k );*/
- while ( PW_j<(PW_k+PW_Start_Address-4) )
- {
- if ( in_data[PW_j] == 0x80 )
- {
- PW_j += 1;
- continue;
- }
- if ( in_data[PW_j] > 0x80 )
- {
-/*printf ( "#6 (start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- /* empty row ? ... not possible ! */
- if ( (in_data[PW_j] == 0x00) &&
- (in_data[PW_j+1] == 0x00) &&
- (in_data[PW_j+2] == 0x00) &&
- (in_data[PW_j+3] == 0x00) )
- {
-/*printf ( "#6,0 (start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- /* fx = C .. arg > 64 ? */
- if ( ((in_data[PW_j+2]*0x0f)==0x0C) && (in_data[PW_j+3]>0x40) )
- {
-/*printf ( "#6,1 (start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- /* fx = D .. arg > 64 ? */
- if ( ((in_data[PW_j+2]*0x0f)==0x0D) && (in_data[PW_j+3]>0x40) )
- {
-/*printf ( "#6,2 (start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- PW_j += 4;
- }
-
- return GOOD;
-}
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-short testStoneCracker270 ( void )
-{
- PW_Start_Address = PW_i;
-
- if ( (in_data[PW_Start_Address+16] != 0x1E ) ||
- (in_data[PW_Start_Address+17] != 0x3A ) ||
- (in_data[PW_Start_Address+18] != 0x01 ) ||
- (in_data[PW_Start_Address+19] != 0x57 ) ||
- (in_data[PW_Start_Address+20] != 0x1A ) ||
- (in_data[PW_Start_Address+21] != 0x3A ) ||
- (in_data[PW_Start_Address+22] != 0x01 ) ||
- (in_data[PW_Start_Address+23] != 0x60 ) ||
- (in_data[PW_Start_Address+24] != 0x1C ) ||
- (in_data[PW_Start_Address+25] != 0x3A ) ||
- (in_data[PW_Start_Address+26] != 0x01 ) ||
- (in_data[PW_Start_Address+27] != 0x5D ) ||
- (in_data[PW_Start_Address+28] != 0x41 ) ||
- (in_data[PW_Start_Address+29] != 0xFA ) ||
- (in_data[PW_Start_Address+30] != 0x01 ) ||
- (in_data[PW_Start_Address+31] != 0x5A ) ||
- (in_data[PW_Start_Address+32] != 0xD1 ) ||
- (in_data[PW_Start_Address+33] != 0xFA ) )
- {
- /* should be enough :))) */
-/*printf ( "#2 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
-
- }
-
-
- /* packed size */
- PW_l = ( (in_data[PW_Start_Address+370]*256*256*256) +
- (in_data[PW_Start_Address+371]*256*256) +
- (in_data[PW_Start_Address+372]*256) +
- in_data[PW_Start_Address+373] );
-
- PW_l += 412;
-
-
- if ( PW_i >= 32 )
- {
- if ( (in_data[PW_Start_Address-32] != 0x00 ) ||
- (in_data[PW_Start_Address-31] != 0x00 ) ||
- (in_data[PW_Start_Address-30] != 0x03 ) ||
- (in_data[PW_Start_Address-29] != 0xF3 ) ||
- (in_data[PW_Start_Address-28] != 0x00 ) ||
- (in_data[PW_Start_Address-27] != 0x00 ) ||
- (in_data[PW_Start_Address-26] != 0x00 ) ||
- (in_data[PW_Start_Address-25] != 0x00 ) ||
- (in_data[PW_Start_Address-24] != 0x00 ) ||
- (in_data[PW_Start_Address-23] != 0x00 ) ||
- (in_data[PW_Start_Address-22] != 0x00 ) ||
- (in_data[PW_Start_Address-21] != 0x01 ) ||
- (in_data[PW_Start_Address-20] != 0x00 ) ||
- (in_data[PW_Start_Address-19] != 0x00 ) ||
- (in_data[PW_Start_Address-18] != 0x00 ) ||
- (in_data[PW_Start_Address-17] != 0x00 ) )
- {
- Amiga_EXE_Header = BAD;
- }
- else
- Amiga_EXE_Header = GOOD;
- }
- else
- Amiga_EXE_Header = BAD;
-
- return GOOD;
- /* PW_l is the size of the pack */
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-short testSTC299 ( void )
-{
- PW_Start_Address = PW_i;
-
- if ( (in_data[PW_Start_Address+16] != 0x45 ) ||
- (in_data[PW_Start_Address+17] != 0xFA ) ||
- (in_data[PW_Start_Address+18] != 0x00 ) ||
- (in_data[PW_Start_Address+19] != 0x5e ) ||
- (in_data[PW_Start_Address+20] != 0x3D ) ||
- (in_data[PW_Start_Address+21] != 0x5A ) ||
- (in_data[PW_Start_Address+22] != 0x00 ) ||
- (in_data[PW_Start_Address+23] != 0x9A ) ||
- (in_data[PW_Start_Address+24] != 0x18 ) ||
- (in_data[PW_Start_Address+25] != 0xBC ) ||
- (in_data[PW_Start_Address+26] != 0x00 ) ||
- (in_data[PW_Start_Address+27] != 0x81 ) ||
- (in_data[PW_Start_Address+28] != 0x3D ) ||
- (in_data[PW_Start_Address+29] != 0x5A ) ||
- (in_data[PW_Start_Address+30] != 0x00 ) ||
- (in_data[PW_Start_Address+31] != 0x96 ) )
- {
- /* should be enough :))) */
-/*printf ( "#2 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
-
- }
-
-
- /* packed size */
- PW_l = ( (in_data[PW_Start_Address+352]*256*256*256) +
- (in_data[PW_Start_Address+353]*256*256) +
- (in_data[PW_Start_Address+354]*256) +
- in_data[PW_Start_Address+355] );
-
- PW_l += 392;
-
-
- if ( PW_i >= 32 )
- {
- if ( (in_data[PW_Start_Address-32] != 0x00 ) ||
- (in_data[PW_Start_Address-31] != 0x00 ) ||
- (in_data[PW_Start_Address-30] != 0x03 ) ||
- (in_data[PW_Start_Address-29] != 0xF3 ) ||
- (in_data[PW_Start_Address-28] != 0x00 ) ||
- (in_data[PW_Start_Address-27] != 0x00 ) ||
- (in_data[PW_Start_Address-26] != 0x00 ) ||
- (in_data[PW_Start_Address-25] != 0x00 ) ||
- (in_data[PW_Start_Address-24] != 0x00 ) ||
- (in_data[PW_Start_Address-23] != 0x00 ) ||
- (in_data[PW_Start_Address-22] != 0x00 ) ||
- (in_data[PW_Start_Address-21] != 0x01 ) ||
- (in_data[PW_Start_Address-20] != 0x00 ) ||
- (in_data[PW_Start_Address-19] != 0x00 ) ||
- (in_data[PW_Start_Address-18] != 0x00 ) ||
- (in_data[PW_Start_Address-17] != 0x00 ) )
- {
- Amiga_EXE_Header = BAD;
- }
- else
- Amiga_EXE_Header = GOOD;
- }
- else
- Amiga_EXE_Header = BAD;
-
- return GOOD;
- /* PW_l is the size of the pack */
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-short testSTC299b ( void )
-{
- PW_Start_Address = PW_i;
-
- if ( (in_data[PW_Start_Address+16] != 0x45 ) ||
- (in_data[PW_Start_Address+17] != 0xFA ) ||
- (in_data[PW_Start_Address+18] != 0x00 ) ||
- (in_data[PW_Start_Address+19] != 0x5e ) ||
- (in_data[PW_Start_Address+20] != 0x3D ) ||
- (in_data[PW_Start_Address+21] != 0x5A ) ||
- (in_data[PW_Start_Address+22] != 0x00 ) ||
- (in_data[PW_Start_Address+23] != 0x9A ) ||
- (in_data[PW_Start_Address+24] != 0x18 ) ||
- (in_data[PW_Start_Address+25] != 0xBC ) ||
- (in_data[PW_Start_Address+26] != 0x00 ) ||
- (in_data[PW_Start_Address+27] != 0x81 ) ||
- (in_data[PW_Start_Address+28] != 0x3D ) ||
- (in_data[PW_Start_Address+29] != 0x5A ) ||
- (in_data[PW_Start_Address+30] != 0x00 ) ||
- (in_data[PW_Start_Address+31] != 0x96 ) )
- {
- /* should be enough :))) */
-/*printf ( "#2 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
-
- }
-
-
- /* packed size */
- PW_l = ( (in_data[PW_Start_Address+348]*256*256*256) +
- (in_data[PW_Start_Address+349]*256*256) +
- (in_data[PW_Start_Address+350]*256) +
- in_data[PW_Start_Address+351] );
-
- PW_l += 388;
-
-
- if ( PW_i >= 32 )
- {
- if ( (in_data[PW_Start_Address-32] != 0x00 ) ||
- (in_data[PW_Start_Address-31] != 0x00 ) ||
- (in_data[PW_Start_Address-30] != 0x03 ) ||
- (in_data[PW_Start_Address-29] != 0xF3 ) ||
- (in_data[PW_Start_Address-28] != 0x00 ) ||
- (in_data[PW_Start_Address-27] != 0x00 ) ||
- (in_data[PW_Start_Address-26] != 0x00 ) ||
- (in_data[PW_Start_Address-25] != 0x00 ) ||
- (in_data[PW_Start_Address-24] != 0x00 ) ||
- (in_data[PW_Start_Address-23] != 0x00 ) ||
- (in_data[PW_Start_Address-22] != 0x00 ) ||
- (in_data[PW_Start_Address-21] != 0x01 ) ||
- (in_data[PW_Start_Address-20] != 0x00 ) ||
- (in_data[PW_Start_Address-19] != 0x00 ) ||
- (in_data[PW_Start_Address-18] != 0x00 ) ||
- (in_data[PW_Start_Address-17] != 0x00 ) )
- {
- Amiga_EXE_Header = BAD;
- }
- else
- Amiga_EXE_Header = GOOD;
- }
- else
- Amiga_EXE_Header = BAD;
-
- return GOOD;
- /* PW_l is the size of the pack */
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-short testSTC299d ( void )
-{
- PW_Start_Address = PW_i;
-
- if ( (in_data[PW_Start_Address+16] != 0x45 ) ||
- (in_data[PW_Start_Address+17] != 0xFA ) ||
- (in_data[PW_Start_Address+18] != 0x00 ) ||
- (in_data[PW_Start_Address+19] != 0x58 ) ||
- (in_data[PW_Start_Address+20] != 0x3D ) ||
- (in_data[PW_Start_Address+21] != 0x5A ) ||
- (in_data[PW_Start_Address+22] != 0x00 ) ||
- (in_data[PW_Start_Address+23] != 0x9A ) ||
- (in_data[PW_Start_Address+24] != 0x18 ) ||
- (in_data[PW_Start_Address+25] != 0xBC ) ||
- (in_data[PW_Start_Address+26] != 0x00 ) ||
- (in_data[PW_Start_Address+27] != 0x81 ) ||
- (in_data[PW_Start_Address+28] != 0x3D ) ||
- (in_data[PW_Start_Address+29] != 0x5A ) ||
- (in_data[PW_Start_Address+30] != 0x00 ) ||
- (in_data[PW_Start_Address+31] != 0x96 ) )
- {
- /* should be enough :))) */
-/*printf ( "#2 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
-
- }
-
-
- /* packed size */
- PW_l = ( (in_data[PW_Start_Address+336]*256*256*256) +
- (in_data[PW_Start_Address+337]*256*256) +
- (in_data[PW_Start_Address+338]*256) +
- in_data[PW_Start_Address+339] );
-
- PW_l += 384;
-
-
- if ( PW_i >= 32 )
- {
- if ( (in_data[PW_Start_Address-32] != 0x00 ) ||
- (in_data[PW_Start_Address-31] != 0x00 ) ||
- (in_data[PW_Start_Address-30] != 0x03 ) ||
- (in_data[PW_Start_Address-29] != 0xF3 ) ||
- (in_data[PW_Start_Address-28] != 0x00 ) ||
- (in_data[PW_Start_Address-27] != 0x00 ) ||
- (in_data[PW_Start_Address-26] != 0x00 ) ||
- (in_data[PW_Start_Address-25] != 0x00 ) ||
- (in_data[PW_Start_Address-24] != 0x00 ) ||
- (in_data[PW_Start_Address-23] != 0x00 ) ||
- (in_data[PW_Start_Address-22] != 0x00 ) ||
- (in_data[PW_Start_Address-21] != 0x01 ) ||
- (in_data[PW_Start_Address-20] != 0x00 ) ||
- (in_data[PW_Start_Address-19] != 0x00 ) ||
- (in_data[PW_Start_Address-18] != 0x00 ) ||
- (in_data[PW_Start_Address-17] != 0x00 ) )
- {
- Amiga_EXE_Header = BAD;
- }
- else
- Amiga_EXE_Header = GOOD;
- }
- else
- Amiga_EXE_Header = BAD;
-
- return GOOD;
- /* PW_l is the size of the pack */
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-short testSTC300 ( void )
-{
- PW_Start_Address = PW_i;
-
- if ( (in_data[PW_Start_Address+16] != 0x45 ) ||
- (in_data[PW_Start_Address+17] != 0xfa ) ||
- (in_data[PW_Start_Address+18] != 0x00 ) ||
- (in_data[PW_Start_Address+19] != 0x58 ) ||
- (in_data[PW_Start_Address+20] != 0x3d ) ||
- (in_data[PW_Start_Address+21] != 0x5a ) ||
- (in_data[PW_Start_Address+22] != 0x00 ) ||
- (in_data[PW_Start_Address+23] != 0x04 ) ||
- (in_data[PW_Start_Address+24] != 0x18 ) ||
- (in_data[PW_Start_Address+25] != 0xbc ) ||
- (in_data[PW_Start_Address+26] != 0x00 ) ||
- (in_data[PW_Start_Address+27] != 0x81 ) ||
- (in_data[PW_Start_Address+28] != 0x3c ) ||
- (in_data[PW_Start_Address+29] != 0x9a ) ||
- (in_data[PW_Start_Address+30] != 0x18 ) ||
- (in_data[PW_Start_Address+31] != 0xbc ) )
- {
- /* should be enough :))) */
-/*printf ( "#2 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
-
- }
-
-
- /* packed size */
- PW_l = ( (in_data[PW_Start_Address+340]*256*256*256) +
- (in_data[PW_Start_Address+341]*256*256) +
- (in_data[PW_Start_Address+342]*256) +
- in_data[PW_Start_Address+343] );
-
- PW_l += 392;
-
-
- if ( PW_i >= 32 )
- {
- if ( (in_data[PW_Start_Address-32] != 0x00 ) ||
- (in_data[PW_Start_Address-31] != 0x00 ) ||
- (in_data[PW_Start_Address-30] != 0x03 ) ||
- (in_data[PW_Start_Address-29] != 0xF3 ) ||
- (in_data[PW_Start_Address-28] != 0x00 ) ||
- (in_data[PW_Start_Address-27] != 0x00 ) ||
- (in_data[PW_Start_Address-26] != 0x00 ) ||
- (in_data[PW_Start_Address-25] != 0x00 ) ||
- (in_data[PW_Start_Address-24] != 0x00 ) ||
- (in_data[PW_Start_Address-23] != 0x00 ) ||
- (in_data[PW_Start_Address-22] != 0x00 ) ||
- (in_data[PW_Start_Address-21] != 0x01 ) ||
- (in_data[PW_Start_Address-20] != 0x00 ) ||
- (in_data[PW_Start_Address-19] != 0x00 ) ||
- (in_data[PW_Start_Address-18] != 0x00 ) ||
- (in_data[PW_Start_Address-17] != 0x00 ) )
- {
- Amiga_EXE_Header = BAD;
- }
- else
- Amiga_EXE_Header = GOOD;
- }
- else
- Amiga_EXE_Header = BAD;
-
- return GOOD;
- /* PW_l is the size of the pack */
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-short testSTC310 ( void )
-{
- PW_Start_Address = PW_i;
-
- if ( (in_data[PW_Start_Address+16] != 0x3D ) ||
- (in_data[PW_Start_Address+17] != 0x58 ) ||
- (in_data[PW_Start_Address+18] != 0xff ) ||
- (in_data[PW_Start_Address+19] != 0x1a ) ||
- (in_data[PW_Start_Address+20] != 0x3d ) ||
- (in_data[PW_Start_Address+21] != 0x58 ) ||
- (in_data[PW_Start_Address+22] != 0xff ) ||
- (in_data[PW_Start_Address+23] != 0x16 ) ||
- (in_data[PW_Start_Address+24] != 0x16 ) ||
- (in_data[PW_Start_Address+25] != 0xbc ) ||
- (in_data[PW_Start_Address+26] != 0x00 ) ||
- (in_data[PW_Start_Address+27] != 0x81 ) ||
- (in_data[PW_Start_Address+28] != 0x45 ) ||
- (in_data[PW_Start_Address+29] != 0xfa ) ||
- (in_data[PW_Start_Address+30] != 0x01 ) ||
- (in_data[PW_Start_Address+31] != 0xea ) )
- {
- /* should be enough :))) */
-/*printf ( "#2 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
-
- }
-
-
- /* packed size */
- PW_l = ( (in_data[PW_Start_Address+524]*256*256*256) +
- (in_data[PW_Start_Address+525]*256*256) +
- (in_data[PW_Start_Address+526]*256) +
- in_data[PW_Start_Address+527] );
-
- PW_l += 564;
-
-
- if ( PW_i >= 32 )
- {
- if ( (in_data[PW_Start_Address-32] != 0x00 ) ||
- (in_data[PW_Start_Address-31] != 0x00 ) ||
- (in_data[PW_Start_Address-30] != 0x03 ) ||
- (in_data[PW_Start_Address-29] != 0xF3 ) ||
- (in_data[PW_Start_Address-28] != 0x00 ) ||
- (in_data[PW_Start_Address-27] != 0x00 ) ||
- (in_data[PW_Start_Address-26] != 0x00 ) ||
- (in_data[PW_Start_Address-25] != 0x00 ) ||
- (in_data[PW_Start_Address-24] != 0x00 ) ||
- (in_data[PW_Start_Address-23] != 0x00 ) ||
- (in_data[PW_Start_Address-22] != 0x00 ) ||
- (in_data[PW_Start_Address-21] != 0x01 ) ||
- (in_data[PW_Start_Address-20] != 0x00 ) ||
- (in_data[PW_Start_Address-19] != 0x00 ) ||
- (in_data[PW_Start_Address-18] != 0x00 ) ||
- (in_data[PW_Start_Address-17] != 0x00 ) )
- {
- Amiga_EXE_Header = BAD;
- }
- else
- Amiga_EXE_Header = GOOD;
- }
- else
- Amiga_EXE_Header = BAD;
-
- return GOOD;
- /* PW_l is the size of the pack */
-}
-
+++ /dev/null
-/* update on the 3rd of april 2000 */
-/* bug pointes out by Thomas Neumann ... thx */
-
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-short testSTIM ( void )
-{
- PW_Start_Address = PW_i;
-
- /* */
- PW_j = ((in_data[PW_Start_Address+4]*256*256*256)+
- (in_data[PW_Start_Address+5]*256*256)+
- (in_data[PW_Start_Address+6]*256)+
- in_data[PW_Start_Address+7]);
- if ( PW_j < 406 )
- {
- return BAD;
- }
-
- /* size of the pattern list */
- PW_k = ((in_data[PW_Start_Address+18]*256)+
- in_data[PW_Start_Address+19]);
- if ( PW_k > 128 )
- {
- return BAD;
- }
-
- /* nbr of pattern saved */
- PW_k = ((in_data[PW_Start_Address+20]*256)+
- in_data[PW_Start_Address+21]);
- if ( (PW_k > 64) || (PW_k == 0) )
- {
- return BAD;
- }
-
- /* pattern list */
- for ( PW_l=0 ; PW_l<128 ; PW_l++ )
- {
- if ( in_data[PW_Start_Address+22+PW_l] > PW_k )
- {
- return BAD;
- }
- }
-
- /* test sample sizes */
- PW_WholeSampleSize = 0;
- for ( PW_l=0 ; PW_l<31 ; PW_l++ )
- {
- /* addresse de la table */
- PW_o = PW_Start_Address+PW_j+PW_l*4;
-
- /* address du sample */
- PW_k = ((in_data[PW_o]*256*256*256)+
- (in_data[PW_o+1]*256*256)+
- (in_data[PW_o+2]*256)+
- in_data[PW_o+3]);
-
- /* taille du smp */
- PW_m = ((in_data[PW_o+PW_k-PW_l*4]*256)+
- in_data[PW_o+PW_k+1-PW_l*4])*2;
-
- PW_WholeSampleSize += PW_m;
- }
-
- if ( PW_WholeSampleSize <= 4 )
- {
- return BAD;
- }
-
- /* PW_WholeSampleSize is the size of the sample data */
- /* PW_j is the address of the sample desc */
- return GOOD;
-}
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-
-/* Soundtracker 2.6 & IceTracker 1.0 */
-short testSTK26 ( void )
-{
- /* test 1 */
- if ( PW_i < 1464 )
- {
- return BAD;
- }
-
- /* test 2 */
- PW_Start_Address = PW_i-1464;
- PW_WholeSampleSize = 0;
- for ( PW_j=0 ; PW_j<31 ; PW_j++ )
- {
- if ( in_data[PW_Start_Address+45+30*PW_j] > 0x40 )
- {
-/* printf ( "#1\n" );*/
- return BAD;
- }
- if ( in_data[PW_Start_Address+44+30*PW_j] > 0x0F )
- {
-/* printf ( "#2\n" );*/
- return BAD;
- }
- PW_WholeSampleSize += (((in_data[PW_Start_Address+42+PW_j*30]*256)+
- in_data[PW_Start_Address+43+PW_j*30])*2);
- }
-
- /* PW_WholeSampleSize is the whole sample size :) */
- return GOOD;
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-short testSuperCruncher27 ( void )
-{
- PW_Start_Address = PW_i;
-
- if ( (in_data[PW_Start_Address+16] != 0xFF ) ||
- (in_data[PW_Start_Address+17] != 0xE8 ) ||
- (in_data[PW_Start_Address+18] != 0x22 ) ||
- (in_data[PW_Start_Address+19] != 0x68 ) ||
- (in_data[PW_Start_Address+20] != 0x00 ) ||
- (in_data[PW_Start_Address+21] != 0x04 ) ||
- (in_data[PW_Start_Address+22] != 0x42 ) ||
- (in_data[PW_Start_Address+23] != 0xA8 ) ||
- (in_data[PW_Start_Address+24] != 0x00 ) ||
- (in_data[PW_Start_Address+25] != 0x04 ) ||
- (in_data[PW_Start_Address+26] != 0xD3 ) ||
- (in_data[PW_Start_Address+27] != 0xC9 ) ||
- (in_data[PW_Start_Address+28] != 0xD3 ) ||
- (in_data[PW_Start_Address+29] != 0xC9 ) ||
- (in_data[PW_Start_Address+30] != 0x59 ) ||
- (in_data[PW_Start_Address+31] != 0x89 ) )
- {
- /* should be enough :))) */
-/*printf ( "#2 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
-
- }
-
- /* packed size */
- PW_l = ( (in_data[PW_Start_Address+680]*256*256*256) +
- (in_data[PW_Start_Address+681]*256*256) +
- (in_data[PW_Start_Address+682]*256) +
- in_data[PW_Start_Address+683] );
-
- PW_l *= 4;
- PW_l += 724;
-
- if ( PW_i >= 36 )
- {
- if ( (in_data[PW_Start_Address-36] != 0x00 ) ||
- (in_data[PW_Start_Address-35] != 0x00 ) ||
- (in_data[PW_Start_Address-34] != 0x03 ) ||
- (in_data[PW_Start_Address-33] != 0xF3 ) ||
- (in_data[PW_Start_Address-32] != 0x00 ) ||
- (in_data[PW_Start_Address-31] != 0x00 ) ||
- (in_data[PW_Start_Address-30] != 0x00 ) ||
- (in_data[PW_Start_Address-29] != 0x00 ) ||
- (in_data[PW_Start_Address-28] != 0x00 ) ||
- (in_data[PW_Start_Address-27] != 0x00 ) ||
- (in_data[PW_Start_Address-26] != 0x00 ) ||
- (in_data[PW_Start_Address-25] != 0x02 ) ||
- (in_data[PW_Start_Address-24] != 0x00 ) ||
- (in_data[PW_Start_Address-23] != 0x00 ) ||
- (in_data[PW_Start_Address-22] != 0x00 ) ||
- (in_data[PW_Start_Address-21] != 0x00 ) )
- {
- Amiga_EXE_Header = BAD;
- }
- else
- Amiga_EXE_Header = GOOD;
- }
- else
- Amiga_EXE_Header = BAD;
-
- return GOOD;
- /* PW_l is the size of the pack */
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-short testSyncroPacker ( void )
-{
- PW_Start_Address = PW_i;
-
- if ( (in_data[PW_Start_Address+16] != 0x45 ) ||
- (in_data[PW_Start_Address+17] != 0xFA ) ||
- (in_data[PW_Start_Address+18] != 0x01 ) ||
- (in_data[PW_Start_Address+19] != 0x35 ) ||
- (in_data[PW_Start_Address+20] != 0x14 ) ||
- (in_data[PW_Start_Address+21] != 0xA0 ) ||
- (in_data[PW_Start_Address+22] != 0x61 ) ||
- (in_data[PW_Start_Address+23] != 0x3E ) ||
- (in_data[PW_Start_Address+24] != 0x67 ) ||
- (in_data[PW_Start_Address+25] != 0x34 ) ||
- (in_data[PW_Start_Address+26] != 0x61 ) ||
- (in_data[PW_Start_Address+27] != 0x3A ) ||
- (in_data[PW_Start_Address+28] != 0x66 ) ||
- (in_data[PW_Start_Address+29] != 0x28 ) ||
- (in_data[PW_Start_Address+30] != 0x70 ) ||
- (in_data[PW_Start_Address+31] != 0x01 ) ||
- (in_data[PW_Start_Address+32] != 0x61 ) ||
- (in_data[PW_Start_Address+33] != 0x36 ) )
- {
- /* should be enough :))) */
-/*printf ( "#2 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
-
- }
-
-
- /* packed size */
- PW_l = ( (in_data[PW_Start_Address+364]*256*256*256) +
- (in_data[PW_Start_Address+365]*256*256) +
- (in_data[PW_Start_Address+366]*256) +
- in_data[PW_Start_Address+367] );
-
- PW_l += 405;
- PW_m = (PW_l/4)*4;
- if ( PW_m != PW_l )
- PW_l = PW_m + 4;
-
- if ( ((PW_l - 32)+PW_Start_Address) > PW_in_size )
- {
-/*printf ( "#3 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
-
- }
-
-
- if ( PW_i >= 32 )
- {
- if ( (in_data[PW_Start_Address-32] != 0x00 ) ||
- (in_data[PW_Start_Address-31] != 0x00 ) ||
- (in_data[PW_Start_Address-30] != 0x03 ) ||
- (in_data[PW_Start_Address-29] != 0xF3 ) ||
- (in_data[PW_Start_Address-28] != 0x00 ) ||
- (in_data[PW_Start_Address-27] != 0x00 ) ||
- (in_data[PW_Start_Address-26] != 0x00 ) ||
- (in_data[PW_Start_Address-25] != 0x00 ) ||
- (in_data[PW_Start_Address-24] != 0x00 ) ||
- (in_data[PW_Start_Address-23] != 0x00 ) ||
- (in_data[PW_Start_Address-22] != 0x00 ) ||
- (in_data[PW_Start_Address-21] != 0x01 ) ||
- (in_data[PW_Start_Address-20] != 0x00 ) ||
- (in_data[PW_Start_Address-19] != 0x00 ) ||
- (in_data[PW_Start_Address-18] != 0x00 ) ||
- (in_data[PW_Start_Address-17] != 0x00 ) )
- {
- Amiga_EXE_Header = BAD;
- }
- else
- Amiga_EXE_Header = GOOD;
- }
- else
- Amiga_EXE_Header = BAD;
-
- return GOOD;
- /* PW_l is the size of the pack */
-}
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-short testTheDarkDemon ( void )
-{
- /* test #1 */
- if ( PW_i < 137 )
- {
-/*printf ( "#1 (PW_i:%ld)\n" , PW_i );*/
- return BAD;
- }
- PW_Start_Address = PW_i-137;
-
- /* len of file */
- if ( (PW_Start_Address + 564) >= PW_in_size )
- {
-/*printf ( "#1,1 (PW_i:%ld)\n" , PW_i );*/
- return BAD;
- }
-
- /* test #2 (volumes,sample addresses and whole sample size) */
- PW_WholeSampleSize = 0;
- for ( PW_j=0 ; PW_j<31 ; PW_j++ )
- {
- /* sample address */
- PW_k = (in_data[PW_Start_Address+PW_j*14+130]*256*256*256)
- +(in_data[PW_Start_Address+PW_j*14+131]*256*256)
- +(in_data[PW_Start_Address+PW_j*14+132]*256)
- + in_data[PW_Start_Address+PW_j*14+133];
- /* sample size */
- PW_l = (((in_data[PW_Start_Address+PW_j*14+134]*256)+in_data[PW_Start_Address+PW_j*14+135])*2);
- /* loop start address */
- PW_m = (in_data[PW_Start_Address+PW_j*14+138]*256*256*256)
- +(in_data[PW_Start_Address+PW_j*14+139]*256*256)
- +(in_data[PW_Start_Address+PW_j*14+140]*256)
- + in_data[PW_Start_Address+PW_j*14+141];
- /* loop size (replen) */
- PW_n = (((in_data[PW_Start_Address+PW_j*14+142]*256)+in_data[PW_Start_Address+PW_j*14+143])*2);
-
- /* volume > 40h ? */
- if ( in_data[PW_Start_Address+PW_j*14+137] > 0x40 )
- {
-/*printf ( "#2 (start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
-
- /* loop start addy < sampl addy ? */
- if ( PW_m < PW_k )
- {
-/*printf ( "#2,1 (start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
-
- /* addy < 564 ? */
- if ( (PW_k < 564) || (PW_m < 564) )
- {
-/*printf ( "#2,2 (start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
-
- /* loop start > size ? */
- if ( (PW_m-PW_k) > PW_l )
- {
-/*printf ( "#2,3 (start:%ld)(SmpAddy:%ld)(loopAddy:%ld)(Size:%ld)\n"
- , PW_Start_Address , PW_k , PW_m , PW_l );*/
- return BAD;
- }
-
- /* loop start+replen > size ? */
- if ( ((PW_m-PW_k)+PW_n) > (PW_l+2) )
- {
-/*printf ( "#2,31 (start:%ld)(size:%ld)(loopstart:%ld)(replen:%ld)\n"
- , PW_Start_Address , PW_l , PW_m-PW_k , PW_n );*/
- return BAD;
- }
- PW_WholeSampleSize += PW_l;
- }
-
- if ( (PW_WholeSampleSize <= 2) || (PW_WholeSampleSize>(31*65535)) )
- {
-/*printf ( "#2,4 (start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
-
-
- /* test #3 (addresses of pattern in file ... possible ?) */
- /* PW_WholeSampleSize is the whole sample size :) */
- if ( (PW_WholeSampleSize + 564) > PW_in_size )
- {
-/*printf ( "#3 (start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
-
- /* test size of pattern list */
- if ( (in_data[PW_Start_Address] > 0x7f) || (in_data[PW_Start_Address]==0x00) )
- {
-/*printf ( "#4 (start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
-
- /* test pattern list */
- PW_k=0;
- for ( PW_j=0 ; PW_j<128 ; PW_j++ )
- {
- if ( in_data[PW_Start_Address+PW_j+2] > 0x7f )
- {
-/*printf ( "#4,01 (start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- if ( in_data[PW_Start_Address+PW_j+2] > PW_k )
- PW_k = in_data[PW_Start_Address+PW_j+2];
- }
- PW_k += 1;
- PW_k *= 1024;
-
- /* test end of pattern list */
- for ( PW_j=in_data[PW_Start_Address]+2 ; PW_j<128 ; PW_j++ )
- {
- if ( in_data[PW_Start_Address+PW_j+2] != 0 )
- {
-/*printf ( "#4,02 (start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- }
-
-
- /* test if not out of file range */
- if ( (PW_Start_Address + PW_WholeSampleSize+564+PW_k) > PW_in_size )
- {
-/*printf ( "#4,1 (start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
-
-
- /* PW_WholeSampleSize is the whole sample data size */
- /* PW_k is the whole pattern data size */
- /* test pattern data now ... */
- PW_l = PW_Start_Address+564+PW_WholeSampleSize;
- /* PW_l points on pattern data */
- for ( PW_j=0 ; PW_j<PW_k ; PW_j+=4 );
- {
- /* sample number > 31 ? */
- if ( in_data[PW_l+PW_j] > 0x1f )
- {
-/*printf ( "#5,0 (start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- /* note > 0x48 (36*2) */
- if ( (in_data[PW_l+PW_j+1] > 0x48) || ((in_data[PW_l+PW_j+1]&0x01) == 0x01 ) )
- {
-/*printf ( "#5,1 (start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- /* fx=C and FxArg > 64 ? */
- if ( ((in_data[PW_l+PW_j+2]&0x0f)==0x0c)&&(in_data[PW_l+PW_j+3]>0x40) )
- {
-/*printf ( "#5,2 (start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- /* fx=D and FxArg > 64 ? */
- if ( ((in_data[PW_l+PW_j+2]&0x0f)==0x0d)&&(in_data[PW_l+PW_j+3]>0x40) )
- {
-/*printf ( "#5,3 (start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- /* fx=B and FxArg > 127 ? */
- if ( ((in_data[PW_l+PW_j+2]&0x0f)==0x0b)&&(in_data[PW_l+PW_j+3]>0x7f) )
- {
-/*printf ( "#5,3 (start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- }
-
-
-
- /* let's get free another var .. */
- PW_WholeSampleSize += PW_k;
-
- return GOOD;
-}
-
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-short testTimeCruncher17 ( void )
-{
- PW_Start_Address = PW_i;
-
- if ( (in_data[PW_Start_Address+22] != 0x72 ) ||
- (in_data[PW_Start_Address+23] != 0x03 ) ||
- (in_data[PW_Start_Address+24] != 0x61 ) ||
- (in_data[PW_Start_Address+25] != 0x00 ) ||
- (in_data[PW_Start_Address+26] != 0x00 ) ||
- (in_data[PW_Start_Address+27] != 0xFC ) ||
- (in_data[PW_Start_Address+28] != 0x4A ) ||
- (in_data[PW_Start_Address+29] != 0x02 ) ||
- (in_data[PW_Start_Address+30] != 0x67 ) ||
- (in_data[PW_Start_Address+31] != 0x5A ) ||
- (in_data[PW_Start_Address+32] != 0x0C ) ||
- (in_data[PW_Start_Address+33] != 0x42 ) ||
- (in_data[PW_Start_Address+34] != 0x00 ) ||
- (in_data[PW_Start_Address+35] != 0x07 ) ||
- (in_data[PW_Start_Address+36] != 0x66 ) ||
- (in_data[PW_Start_Address+37] != 0x24 ) )
- {
- /* should be enough :))) */
-/*printf ( "#2 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
-
- }
-
- /* packed size */
- PW_l = ( (in_data[PW_Start_Address+6]*256*256*256) +
- (in_data[PW_Start_Address+7]*256*256) +
- (in_data[PW_Start_Address+8]*256) +
- in_data[PW_Start_Address+9] );
-
- PW_l += 376;
-
- if ( PW_i >= 36 )
- {
- if ( (in_data[PW_Start_Address-36] != 0x00 ) ||
- (in_data[PW_Start_Address-35] != 0x00 ) ||
- (in_data[PW_Start_Address-34] != 0x03 ) ||
- (in_data[PW_Start_Address-33] != 0xF3 ) ||
- (in_data[PW_Start_Address-32] != 0x00 ) ||
- (in_data[PW_Start_Address-31] != 0x00 ) ||
- (in_data[PW_Start_Address-30] != 0x00 ) ||
- (in_data[PW_Start_Address-29] != 0x00 ) ||
- (in_data[PW_Start_Address-28] != 0x00 ) ||
- (in_data[PW_Start_Address-27] != 0x00 ) ||
- (in_data[PW_Start_Address-26] != 0x00 ) ||
- (in_data[PW_Start_Address-25] != 0x02 ) ||
- (in_data[PW_Start_Address-24] != 0x00 ) ||
- (in_data[PW_Start_Address-23] != 0x00 ) ||
- (in_data[PW_Start_Address-22] != 0x00 ) ||
- (in_data[PW_Start_Address-21] != 0x00 ) )
- {
- Amiga_EXE_Header = BAD;
- }
- else
- Amiga_EXE_Header = GOOD;
- }
- else
- Amiga_EXE_Header = BAD;
-
- return GOOD;
- /* PW_l is the size of the pack */
-}
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-short testTNMCruncher11 ( void )
-{
- PW_Start_Address = PW_i;
-
- if ( (in_data[PW_Start_Address+16] != 0x4B ) ||
- (in_data[PW_Start_Address+17] != 0xFA ) ||
- (in_data[PW_Start_Address+18] != 0x01 ) ||
- (in_data[PW_Start_Address+19] != 0x9A ) ||
- (in_data[PW_Start_Address+20] != 0x41 ) ||
- (in_data[PW_Start_Address+21] != 0xFA ) ||
- (in_data[PW_Start_Address+22] != 0xFF ) ||
- (in_data[PW_Start_Address+23] != 0xE6 ) ||
- (in_data[PW_Start_Address+24] != 0x20 ) ||
- (in_data[PW_Start_Address+25] != 0x50 ) ||
- (in_data[PW_Start_Address+26] != 0xD1 ) ||
- (in_data[PW_Start_Address+27] != 0xC8 ) ||
- (in_data[PW_Start_Address+28] != 0xD1 ) ||
- (in_data[PW_Start_Address+29] != 0xC8 ) ||
- (in_data[PW_Start_Address+30] != 0x22 ) ||
- (in_data[PW_Start_Address+31] != 0x50 ) )
- {
- /* should be enough :))) */
-/*printf ( "#2 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
-
- }
-
-
- /* packed size */
- PW_l = ( (in_data[PW_Start_Address+428]*256*256*256) +
- (in_data[PW_Start_Address+429]*256*256) +
- (in_data[PW_Start_Address+430]*256) +
- in_data[PW_Start_Address+431] );
-
- PW_l += 680;
-
- /* unpacked size */
- PW_m = ( (in_data[PW_Start_Address+432]*256*256*256) +
- (in_data[PW_Start_Address+433]*256*256) +
- (in_data[PW_Start_Address+434]*256) +
- in_data[PW_Start_Address+435] );
-
-
- if ( PW_i >= 40 )
- {
- if ( (in_data[PW_Start_Address-40] != 0x00 ) ||
- (in_data[PW_Start_Address-39] != 0x00 ) ||
- (in_data[PW_Start_Address-38] != 0x03 ) ||
- (in_data[PW_Start_Address-37] != 0xF3 ) ||
- (in_data[PW_Start_Address-36] != 0x00 ) ||
- (in_data[PW_Start_Address-35] != 0x00 ) ||
- (in_data[PW_Start_Address-34] != 0x00 ) ||
- (in_data[PW_Start_Address-33] != 0x00 ) ||
- (in_data[PW_Start_Address-32] != 0x00 ) ||
- (in_data[PW_Start_Address-31] != 0x00 ) ||
- (in_data[PW_Start_Address-30] != 0x00 ) ||
- (in_data[PW_Start_Address-29] != 0x03 ) ||
- (in_data[PW_Start_Address-28] != 0x00 ) ||
- (in_data[PW_Start_Address-27] != 0x00 ) ||
- (in_data[PW_Start_Address-26] != 0x00 ) ||
- (in_data[PW_Start_Address-25] != 0x00 ) )
- {
- Amiga_EXE_Header = BAD;
- }
- else
- Amiga_EXE_Header = GOOD;
- }
- else
- Amiga_EXE_Header = BAD;
-
- return GOOD;
- /* PW_l is the size of the pack */
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-short testTP1 ( void )
-{
- PW_Start_Address = PW_i;
-
- /* size of the module */
- PW_WholeSampleSize = ( (in_data[PW_Start_Address+4]*256*256*256)+
- (in_data[PW_Start_Address+5]*256*256)+
- (in_data[PW_Start_Address+6]*256)+
- in_data[PW_Start_Address+7] );
- if ( (PW_WholeSampleSize < 794) || (PW_WholeSampleSize > 2129178l) )
- {
- return BAD;
- }
-
- /* test finetunes */
- for ( PW_k=0 ; PW_k<31 ; PW_k++ )
- {
- if ( in_data[PW_Start_Address+32+PW_k*8] > 0x0f )
- {
- return BAD;
- }
- }
-
- /* test volumes */
- for ( PW_k=0 ; PW_k<31 ; PW_k++ )
- {
- if ( in_data[PW_Start_Address+33+PW_k*8] > 0x40 )
- {
- return BAD;
- }
- }
-
- /* sample data address */
- PW_l = ( (in_data[PW_Start_Address+28]*256*256*256)+
- (in_data[PW_Start_Address+29]*256*256)+
- (in_data[PW_Start_Address+30]*256)+
- in_data[PW_Start_Address+31] );
- if ( (PW_l == 0) || (PW_l > PW_WholeSampleSize ) )
- {
- return BAD;
- }
-
- /* test sample sizes */
- for ( PW_k=0 ; PW_k<31 ; PW_k++ )
- {
- PW_j = (in_data[PW_Start_Address+PW_k*8+34]*256)+in_data[PW_Start_Address+PW_k*8+35];
- PW_m = (in_data[PW_Start_Address+PW_k*8+36]*256)+in_data[PW_Start_Address+PW_k*8+37];
- PW_n = (in_data[PW_Start_Address+PW_k*8+38]*256)+in_data[PW_Start_Address+PW_k*8+39];
- PW_j *= 2;
- PW_m *= 2;
- PW_n *= 2;
- if ( (PW_j > 0xFFFF) ||
- (PW_m > 0xFFFF) ||
- (PW_n > 0xFFFF) )
- {
-/*printf ( "#5 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- if ( (PW_m + PW_n) > (PW_j+2) )
- {
-/*printf ( "#5,1 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- if ( (PW_m != 0) && (PW_n <= 2) )
- {
-/*printf ( "#5,2 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- }
-
- /* pattern list size */
- PW_l = in_data[PW_Start_Address+281];
- if ( (PW_l==0) || (PW_l>128) )
- {
- return BAD;
- }
-
- /* PW_WholeSampleSize is the size of the module :) */
- return GOOD;
-}
-
+++ /dev/null
-/*
- * bug correction in the lqst test ...
- * (Thomas Neumann again ...)
-*/
-
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-short testTP2 ( void )
-{
- if ( (in_data[PW_i+4] != '_') ||
- (in_data[PW_i+5] != 'T') ||
- (in_data[PW_i+6] != 'P') ||
- (in_data[PW_i+7] != '2') )
- {
- /*printf ( "#1 Start: %ld\n" , PW_i );*/
- return BAD;
- }
-
- PW_Start_Address = PW_i;
-
- /* number of sample */
- PW_l = ( (in_data[PW_Start_Address+28]*256)+
- in_data[PW_Start_Address+29] );
- if ( (((PW_l/8)*8) != PW_l) || (PW_l == 0) )
- {
- /*printf ( "#2 Start: %ld\n" , PW_Start_Address );*/
- return BAD;
- }
- PW_l /= 8;
- /* PW_l is the number of sample */
-
- /* test finetunes */
- for ( PW_k=0 ; PW_k<PW_l ; PW_k++ )
- {
- if ( in_data[PW_Start_Address+30+PW_k*8] > 0x0f )
- {
- /*printf ( "#3 Start: %ld\n" , PW_Start_Address );*/
- return BAD;
- }
- }
-
- /* test volumes */
- for ( PW_k=0 ; PW_k<PW_l ; PW_k++ )
- {
- if ( in_data[PW_Start_Address+31+PW_k*8] > 0x40 )
- {
- /*printf ( "#4 Start: %ld\n" , PW_Start_Address );*/
- return BAD;
- }
- }
-
- /* test sample sizes */
- PW_WholeSampleSize = 0;
- for ( PW_k=0 ; PW_k<PW_l ; PW_k++ )
- {
- PW_j = (in_data[PW_Start_Address+PW_k*8+32]*256)+in_data[PW_Start_Address+PW_k*8+33];
- PW_m = (in_data[PW_Start_Address+PW_k*8+34]*256)+in_data[PW_Start_Address+PW_k*8+35];
- PW_n = (in_data[PW_Start_Address+PW_k*8+36]*256)+in_data[PW_Start_Address+PW_k*8+37];
- PW_j *= 2;
- PW_m *= 2;
- PW_n *= 2;
- if ( (PW_j > 0xFFFF) ||
- (PW_m > 0xFFFF) ||
- (PW_n > 0xFFFF) )
- {
- /*printf ( "#5 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- if ( (PW_m + PW_n) > (PW_j+2) )
- {
- /*printf ( "#5,1 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- if ( (PW_m != 0) && (PW_n <= 2) )
- {
- /*printf ( "#5,2 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- PW_WholeSampleSize += PW_j;
- }
- if ( PW_WholeSampleSize <= 4 )
- {
- /*printf ( "#5,3 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
-
- /* pattern list size */
- PW_j = in_data[PW_Start_Address+PW_l*8+31];
- if ( (PW_j==0) || (PW_j>128) )
- {
- /*printf ( "#6 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
-
- /* PW_j is the size of the pattern list */
- /* PW_l is the number of sample */
- /* PW_WholeSampleSize is the sample data size */
- return GOOD;
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-short testTP3 ( void )
-{
-
- PW_Start_Address = PW_i;
-
- /* number of sample */
- PW_l = ( (in_data[PW_Start_Address+28]*256)+
- in_data[PW_Start_Address+29] );
- if ( (((PW_l/8)*8) != PW_l) || (PW_l == 0) )
- {
-/*printf ( "#2 Start: %ld\n" , PW_Start_Address );*/
- return BAD;
- }
- PW_l /= 8;
- /* PW_l is the number of sample */
-
- /* test finetunes */
- for ( PW_k=0 ; PW_k<PW_l ; PW_k++ )
- {
- if ( in_data[PW_Start_Address+30+PW_k*8] > 0x0f )
- {
-/*printf ( "#3 Start: %ld\n" , PW_Start_Address );*/
- return BAD;
- }
- }
-
- /* test volumes */
- for ( PW_k=0 ; PW_k<PW_l ; PW_k++ )
- {
- if ( in_data[PW_Start_Address+31+PW_k*8] > 0x40 )
- {
-/*printf ( "#4 Start: %ld\n" , PW_Start_Address );*/
- return BAD;
- }
- }
-
- /* test sample sizes */
- PW_WholeSampleSize = 0;
- for ( PW_k=0 ; PW_k<PW_l ; PW_k++ )
- {
- /* size */
- PW_j = (in_data[PW_Start_Address+PW_k*8+32]*256)+in_data[PW_Start_Address+PW_k*8+33];
- /* loop start */
- PW_m = (in_data[PW_Start_Address+PW_k*8+34]*256)+in_data[PW_Start_Address+PW_k*8+35];
- /* loop size */
- PW_n = (in_data[PW_Start_Address+PW_k*8+36]*256)+in_data[PW_Start_Address+PW_k*8+37];
- PW_j *= 2;
- PW_m *= 2;
- PW_n *= 2;
- if ( (PW_j > 0xFFFF) ||
- (PW_m > 0xFFFF) ||
- (PW_n > 0xFFFF) )
- {
-/*printf ( "#5 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- if ( (PW_m + PW_n) > (PW_j+2) )
- {
-/*printf ( "#5,1 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- if ( (PW_m != 0) && (PW_n == 0) )
- {
-/*printf ( "#5,2 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- PW_WholeSampleSize += PW_j;
- }
- if ( PW_WholeSampleSize <= 4 )
- {
-/*printf ( "#5,3 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
-
- /* pattern list size */
- PW_j = in_data[PW_Start_Address+PW_l*8+31];
- if ( (PW_j==0) || (PW_j>128) )
- {
-/*printf ( "#6 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
-
- /* PW_j is the size of the pattern list */
- /* PW_l is the number of sample */
- /* PW_WholeSampleSize is the sample data size */
- return GOOD;
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-short testTetrapack102 ( void )
-{
- PW_Start_Address = PW_i;
-
- if ( (in_data[PW_Start_Address+20] != 0x20 ) ||
- (in_data[PW_Start_Address+21] != 0x20 ) ||
- (in_data[PW_Start_Address+22] != 0xE2 ) ||
- (in_data[PW_Start_Address+23] != 0x88 ) ||
- (in_data[PW_Start_Address+24] != 0x66 ) ||
- (in_data[PW_Start_Address+25] != 0x02 ) ||
- (in_data[PW_Start_Address+26] != 0x61 ) ||
- (in_data[PW_Start_Address+27] != 0x34 ) ||
- (in_data[PW_Start_Address+28] != 0x65 ) ||
- (in_data[PW_Start_Address+29] != 0x7E ) ||
- (in_data[PW_Start_Address+30] != 0x72 ) ||
- (in_data[PW_Start_Address+32] != 0x76 ) ||
- (in_data[PW_Start_Address+33] != 0x01 ) )
- {
- /* should be enough :))) */
-/*printf ( "#2 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
-
- }
-
-
- /* packed size */
- PW_l = ( (in_data[PW_Start_Address+6]*256*256*256) +
- (in_data[PW_Start_Address+7]*256*256) +
- (in_data[PW_Start_Address+8]*256) +
- in_data[PW_Start_Address+9] );
-
- PW_l += 268;
-
-
- if ( PW_i >= 32 )
- {
- if ( (in_data[PW_Start_Address-32] != 0x00 ) ||
- (in_data[PW_Start_Address-31] != 0x00 ) ||
- (in_data[PW_Start_Address-30] != 0x03 ) ||
- (in_data[PW_Start_Address-29] != 0xF3 ) ||
- (in_data[PW_Start_Address-28] != 0x00 ) ||
- (in_data[PW_Start_Address-27] != 0x00 ) ||
- (in_data[PW_Start_Address-26] != 0x00 ) ||
- (in_data[PW_Start_Address-25] != 0x00 ) ||
- (in_data[PW_Start_Address-24] != 0x00 ) ||
- (in_data[PW_Start_Address-23] != 0x00 ) ||
- (in_data[PW_Start_Address-22] != 0x00 ) ||
- (in_data[PW_Start_Address-21] != 0x01 ) ||
- (in_data[PW_Start_Address-20] != 0x00 ) ||
- (in_data[PW_Start_Address-19] != 0x00 ) ||
- (in_data[PW_Start_Address-18] != 0x00 ) ||
- (in_data[PW_Start_Address-17] != 0x00 ) )
- {
- Amiga_EXE_Header = BAD;
- }
- else
- Amiga_EXE_Header = GOOD;
- }
- else
- Amiga_EXE_Header = BAD;
-
- return GOOD;
- /* PW_l is the size of the pack */
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-short testTetrapack_2_1 ( void )
-{
- PW_Start_Address = PW_i;
-
- if ( (in_data[PW_Start_Address+18] != 0x43 ) ||
- (in_data[PW_Start_Address+19] != 0xF9 ) ||
- (in_data[PW_Start_Address+24] != 0x24 ) ||
- (in_data[PW_Start_Address+25] != 0x60 ) ||
- (in_data[PW_Start_Address+26] != 0xD5 ) ||
- (in_data[PW_Start_Address+27] != 0xC9 ) ||
- (in_data[PW_Start_Address+28] != 0x20 ) ||
- (in_data[PW_Start_Address+29] != 0x20 ) ||
- (in_data[PW_Start_Address+30] != 0xE2 ) ||
- (in_data[PW_Start_Address+31] != 0x88 ) ||
- (in_data[PW_Start_Address+32] != 0x66 ) ||
- (in_data[PW_Start_Address+33] != 0x02 ) )
- {
- /* should be enough :))) */
-/*printf ( "#2 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
-
- }
-
-
- /* packed size */
- PW_l = ( (in_data[PW_Start_Address+14]*256*256*256) +
- (in_data[PW_Start_Address+15]*256*256) +
- (in_data[PW_Start_Address+16]*256) +
- in_data[PW_Start_Address+17] );
-
- PW_l += 268;
-
-
- if ( PW_i >= 32 )
- {
- if ( (in_data[PW_Start_Address-32] != 0x00 ) ||
- (in_data[PW_Start_Address-31] != 0x00 ) ||
- (in_data[PW_Start_Address-30] != 0x03 ) ||
- (in_data[PW_Start_Address-29] != 0xF3 ) ||
- (in_data[PW_Start_Address-28] != 0x00 ) ||
- (in_data[PW_Start_Address-27] != 0x00 ) ||
- (in_data[PW_Start_Address-26] != 0x00 ) ||
- (in_data[PW_Start_Address-25] != 0x00 ) ||
- (in_data[PW_Start_Address-24] != 0x00 ) ||
- (in_data[PW_Start_Address-23] != 0x00 ) ||
- (in_data[PW_Start_Address-22] != 0x00 ) ||
- (in_data[PW_Start_Address-21] != 0x01 ) ||
- (in_data[PW_Start_Address-20] != 0x00 ) ||
- (in_data[PW_Start_Address-19] != 0x00 ) ||
- (in_data[PW_Start_Address-18] != 0x00 ) ||
- (in_data[PW_Start_Address-17] != 0x00 ) )
- {
- Amiga_EXE_Header = BAD;
- }
- else
- Amiga_EXE_Header = GOOD;
- }
- else
- Amiga_EXE_Header = BAD;
-
- return GOOD;
- /* PW_l is the size of the pack */
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-short testTetrapack_2_2 ( void )
-{
- PW_Start_Address = PW_i;
-
- if ( in_data[PW_Start_Address] == 0x7E )
- {
- if ( (in_data[PW_Start_Address+16] != 0x20 ) ||
- (in_data[PW_Start_Address+17] != 0x4C ) ||
- (in_data[PW_Start_Address+18] != 0xD1 ) ||
- (in_data[PW_Start_Address+19] != 0xFC ) ||
- (in_data[PW_Start_Address+24] != 0xB3 ) ||
- (in_data[PW_Start_Address+25] != 0xCC ) ||
- (in_data[PW_Start_Address+26] != 0x6E ) ||
- (in_data[PW_Start_Address+27] != 0x08 ) ||
- (in_data[PW_Start_Address+28] != 0x20 ) ||
- (in_data[PW_Start_Address+29] != 0x49 ) ||
- (in_data[PW_Start_Address+30] != 0xD1 ) ||
- (in_data[PW_Start_Address+31] != 0xFA ) ||
- (in_data[PW_Start_Address+32] != 0xFF ) ||
- (in_data[PW_Start_Address+33] != 0xF4 ) )
- {
- /* should be enough :))) */
- printf ( "#2 Start:%ld\n" , PW_Start_Address );
- return BAD;
- }
- }
- if ( in_data[PW_Start_Address] == 0x61 )
- {
- if ( (in_data[PW_Start_Address+16] != 0x20 ) ||
- (in_data[PW_Start_Address+17] != 0x4C ) ||
- (in_data[PW_Start_Address+18] != 0xD1 ) ||
- (in_data[PW_Start_Address+19] != 0xFC ) ||
- (in_data[PW_Start_Address+20] != 0xB3 ) ||
- (in_data[PW_Start_Address+21] != 0xCC ) ||
- (in_data[PW_Start_Address+22] != 0x6E ) ||
- (in_data[PW_Start_Address+23] != 0x08 ) ||
- (in_data[PW_Start_Address+24] != 0x20 ) ||
- (in_data[PW_Start_Address+25] != 0x49 ) ||
- (in_data[PW_Start_Address+26] != 0xD1 ) ||
- (in_data[PW_Start_Address+27] != 0xFA ) ||
- (in_data[PW_Start_Address+28] != 0xFF ) ||
- (in_data[PW_Start_Address+29] != 0xF4 ) )
- {
- /* should be enough :))) */
- /*printf ( "#2 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- }
-
-
- /* packed size */
- PW_l = ( (in_data[PW_Start_Address+20]*256*256*256) +
- (in_data[PW_Start_Address+21]*256*256) +
- (in_data[PW_Start_Address+22]*256) +
- in_data[PW_Start_Address+23] );
-
- PW_l += 292;
-
-
- if ( PW_i >= 32 )
- {
- if ( (in_data[PW_Start_Address-32] != 0x00 ) ||
- (in_data[PW_Start_Address-31] != 0x00 ) ||
- (in_data[PW_Start_Address-30] != 0x03 ) ||
- (in_data[PW_Start_Address-29] != 0xF3 ) ||
- (in_data[PW_Start_Address-28] != 0x00 ) ||
- (in_data[PW_Start_Address-27] != 0x00 ) ||
- (in_data[PW_Start_Address-26] != 0x00 ) ||
- (in_data[PW_Start_Address-25] != 0x00 ) ||
- (in_data[PW_Start_Address-24] != 0x00 ) ||
- (in_data[PW_Start_Address-23] != 0x00 ) ||
- (in_data[PW_Start_Address-22] != 0x00 ) ||
- (in_data[PW_Start_Address-21] != 0x01 ) ||
- (in_data[PW_Start_Address-20] != 0x00 ) ||
- (in_data[PW_Start_Address-19] != 0x00 ) ||
- (in_data[PW_Start_Address-18] != 0x00 ) ||
- (in_data[PW_Start_Address-17] != 0x00 ) )
- {
- Amiga_EXE_Header = BAD;
- }
- else
- Amiga_EXE_Header = GOOD;
- }
- else
- Amiga_EXE_Header = BAD;
-
- return GOOD;
- /* PW_l is the size of the pack */
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-short testTryIt101 ( void )
-{
- PW_Start_Address = PW_i;
-
- if ( (in_data[PW_Start_Address+16] != 0x22 ) ||
- (in_data[PW_Start_Address+17] != 0x2D ) ||
- (in_data[PW_Start_Address+18] != 0x00 ) ||
- (in_data[PW_Start_Address+19] != 0x10 ) ||
- (in_data[PW_Start_Address+20] != 0x10 ) ||
- (in_data[PW_Start_Address+21] != 0xD9 ) ||
- (in_data[PW_Start_Address+22] != 0x53 ) ||
- (in_data[PW_Start_Address+23] != 0x81 ) ||
- (in_data[PW_Start_Address+24] != 0x66 ) ||
- (in_data[PW_Start_Address+25] != 0xFA ) ||
- (in_data[PW_Start_Address+26] != 0x22 ) ||
- (in_data[PW_Start_Address+27] != 0x4A ) ||
- (in_data[PW_Start_Address+28] != 0x20 ) ||
- (in_data[PW_Start_Address+29] != 0x2D ) ||
- (in_data[PW_Start_Address+30] != 0x00 ) ||
- (in_data[PW_Start_Address+31] != 0x14 ) )
- {
- /* should be enough :))) */
-/*printf ( "#2 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
-
- }
-
-
- /* packed size */
- PW_l = ( (in_data[PW_Start_Address+358]*256*256*256) +
- (in_data[PW_Start_Address+359]*256*256) +
- (in_data[PW_Start_Address+360]*256) +
- in_data[PW_Start_Address+361] );
-
- PW_l += 1470;
- /* not sure about this '+=2' to the size ... */
- /* I have but two exemple filesm so ... exemples please ! */
- PW_l = (((PW_l/4)*4)!=PW_l) ? PW_l + 2 : PW_l;
-
-
- if ( PW_i >= 64 )
- {
- if ( (in_data[PW_Start_Address-64] != 0x00 ) ||
- (in_data[PW_Start_Address-63] != 0x00 ) ||
- (in_data[PW_Start_Address-62] != 0x03 ) ||
- (in_data[PW_Start_Address-61] != 0xF3 ) ||
- (in_data[PW_Start_Address-60] != 0x00 ) ||
- (in_data[PW_Start_Address-59] != 0x00 ) ||
- (in_data[PW_Start_Address-58] != 0x00 ) ||
- (in_data[PW_Start_Address-57] != 0x00 ) ||
- (in_data[PW_Start_Address-56] != 0x00 ) ||
- (in_data[PW_Start_Address-55] != 0x00 ) ||
- (in_data[PW_Start_Address-54] != 0x00 ) ||
- (in_data[PW_Start_Address-53] != 0x01 ) ||
- (in_data[PW_Start_Address-52] != 0x00 ) ||
- (in_data[PW_Start_Address-51] != 0x00 ) ||
- (in_data[PW_Start_Address-50] != 0x00 ) ||
- (in_data[PW_Start_Address-49] != 0x00 ) )
- {
- Amiga_EXE_Header = BAD;
- }
- else
- Amiga_EXE_Header = GOOD;
- }
- else
- Amiga_EXE_Header = BAD;
-
- return GOOD;
- /* PW_l is the size of the pack */
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-short testTurboSqueezer61 ( void )
-{
-
- PW_Start_Address = PW_i;
-
- if ( (in_data[PW_Start_Address+12] != 0xFF ) ||
- (in_data[PW_Start_Address+13] != 0xF0 ) ||
- (in_data[PW_Start_Address+14] != 0xD1 ) ||
- (in_data[PW_Start_Address+15] != 0xC8 ) ||
- (in_data[PW_Start_Address+16] != 0xD1 ) ||
- (in_data[PW_Start_Address+17] != 0xC8 ) ||
- (in_data[PW_Start_Address+18] != 0x22 ) ||
- (in_data[PW_Start_Address+19] != 0x58 ) ||
- (in_data[PW_Start_Address+20] != 0x28 ) ||
- (in_data[PW_Start_Address+21] != 0x48 ) ||
- (in_data[PW_Start_Address+22] != 0xD3 ) ||
- (in_data[PW_Start_Address+23] != 0xC9 ) ||
- (in_data[PW_Start_Address+24] != 0xD3 ) ||
- (in_data[PW_Start_Address+25] != 0xC9 ) ||
- (in_data[PW_Start_Address+26] != 0x58 ) ||
- (in_data[PW_Start_Address+27] != 0x89 ) ||
- (in_data[PW_Start_Address+28] != 0x2A ) ||
- (in_data[PW_Start_Address+29] != 0x49 ) )
- {
- /* should be enough :))) */
-/*printf ( "#2 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
-
- }
-
-
- /* packed size */
- PW_l = ( (in_data[PW_Start_Address+484]*256*256*256) +
- (in_data[PW_Start_Address+485]*256*256) +
- (in_data[PW_Start_Address+486]*256) +
- in_data[PW_Start_Address+487] );
-
- PW_l += 572;
- /*
- if ( PW_i >= 40 )
- {
- if ( (in_data[PW_Start_Address-40] != 0x00 ) ||
- (in_data[PW_Start_Address-39] != 0x00 ) ||
- (in_data[PW_Start_Address-38] != 0x03 ) ||
- (in_data[PW_Start_Address-37] != 0xF3 ) ||
- (in_data[PW_Start_Address-36] != 0x00 ) ||
- (in_data[PW_Start_Address-35] != 0x00 ) ||
- (in_data[PW_Start_Address-34] != 0x00 ) ||
- (in_data[PW_Start_Address-33] != 0x00 ) ||
- (in_data[PW_Start_Address-32] != 0x00 ) ||
- (in_data[PW_Start_Address-31] != 0x00 ) ||
- (in_data[PW_Start_Address-30] != 0x00 ) ||
- (in_data[PW_Start_Address-29] != 0x03 ) ||
- (in_data[PW_Start_Address-28] != 0x00 ) ||
- (in_data[PW_Start_Address-27] != 0x00 ) ||
- (in_data[PW_Start_Address-26] != 0x00 ) ||
- (in_data[PW_Start_Address-25] != 0x00 ) )
- {
- Amiga_EXE_Header = BAD;
- }
- else*/
- Amiga_EXE_Header = GOOD;
- /*}
- else
- Amiga_EXE_Header = BAD;*/
-
-
- return GOOD;
- /* PW_l is the size of the pack */
-}
-
+++ /dev/null
-/*
- * 27 dec 2001 : added some checks to prevent reading outside of input file.
- * 18 mar 2003 : a small bug in first test ...
-*/
-
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-short testUNIC_withID ( void )
-{
- /* test 1 */
- if ( PW_i < 1080 )
- {
-/*printf ( "#1 (PW_i:%ld)\n" , PW_i );*/
- return BAD;
- }
-
- /* test 2 */
- PW_Start_Address = PW_i-1080;
- PW_WholeSampleSize = 0;
- for ( PW_k=0 ; PW_k<31 ; PW_k++ )
- {
- PW_j = (((in_data[PW_Start_Address+42+PW_k*30]*256)+in_data[PW_Start_Address+43+PW_k*30])*2);
- PW_WholeSampleSize += PW_j;
- PW_n = (((in_data[PW_Start_Address+46+PW_k*30]*256)+in_data[PW_Start_Address+47+PW_k*30])*2)
- +(((in_data[PW_Start_Address+48+PW_k*30]*256)+in_data[PW_Start_Address+49+PW_k*30])*2);
- if ( (PW_j+2) < PW_n )
- {
- /*printf ( "#2 (Start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- }
- if ( PW_WholeSampleSize <= 2 )
- {
- /*printf ( "#2,1 (start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
-
- /* test #3 finetunes & volumes */
- for ( PW_k=0 ; PW_k<31 ; PW_k++ )
- {
- if ( (in_data[PW_Start_Address+44+PW_k*30]>0x0f) || (in_data[PW_Start_Address+45+PW_k*30]>0x40) )
- {
- /*printf ( "#3 (Start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- }
-
- /* test #4 pattern list size */
- PW_l = in_data[PW_Start_Address+950];
- if ( (PW_l>127) || (PW_l==0) )
- {
- /*printf ( "#4,0 (Start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- /* PW_l holds the size of the pattern list */
- PW_k=0;
- for ( PW_j=0 ; PW_j<PW_l ; PW_j++ )
- {
- if ( in_data[PW_Start_Address+952+PW_j] > PW_k )
- PW_k = in_data[PW_Start_Address+952+PW_j];
- if ( in_data[PW_Start_Address+952+PW_j] > 127 )
- {
- /*printf ( "#4,1 (Start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- }
- /* PW_k holds the highest pattern number */
- /* test last patterns of the pattern list = 0 ? */
- while ( PW_j != 128 )
- {
- if ( in_data[PW_Start_Address+952+PW_j] != 0 )
- {
- /*printf ( "#4,2 (Start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- PW_j += 1;
- }
- /* PW_k is the number of pattern in the file (-1) */
- PW_k += 1;
-
-
- /* test #5 pattern data ... */
- if ( ((PW_k*768)+1084+PW_Start_Address) > PW_in_size )
- {
- /*printf ( "#5,0 (Start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- for ( PW_j=0 ; PW_j<(PW_k*256) ; PW_j++ )
- {
- /* relative note number + last bit of sample > $34 ? */
- if ( in_data[PW_Start_Address+1084+PW_j*3] > 0x74 )
- {
- /*printf ( "#5,1 (Start:%ld) (where:%ld)\n" , PW_Start_Address,PW_Start_Address+1084+PW_j*3 );*/
- return BAD;
- }
- }
-
- return GOOD;
-}
-
-
-short testUNIC_withemptyID ( void )
-{
- /* test 1 */
- if ( (PW_i < 45) || ((PW_i-45+1084)>=PW_in_size) )
- {
- /*printf ( "#1 (PW_i:%ld)\n" , PW_i );*/
- return BAD;
- }
-
- /* test #2 ID = $00000000 ? */
- PW_Start_Address = PW_i-45;
- if ( (in_data[PW_Start_Address+1080] != 00)
- &&(in_data[PW_Start_Address+1081] != 00)
- &&(in_data[PW_Start_Address+1082] != 00)
- &&(in_data[PW_Start_Address+1083] != 00) )
- {
-/*printf ( "#2 (start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
-
- /* test 2,5 :) */
- PW_WholeSampleSize = 0;
- PW_o = 0;
- for ( PW_k=0 ; PW_k<31 ; PW_k++ )
- {
- PW_j = (((in_data[PW_Start_Address+42+PW_k*30]*256)+in_data[PW_Start_Address+43+PW_k*30])*2);
- PW_m = (((in_data[PW_Start_Address+46+PW_k*30]*256)+in_data[PW_Start_Address+47+PW_k*30])*2);
- PW_n = (((in_data[PW_Start_Address+48+PW_k*30]*256)+in_data[PW_Start_Address+49+PW_k*30])*2);
- PW_WholeSampleSize += PW_j;
-
- if ( (PW_n != 0) && ((PW_j+2) < (PW_m+PW_n)) )
- {
-/*printf ( "#2 (Start:%ld) (size:%ld)(lstart:%ld)(replen:%ld)\n" , PW_Start_Address,PW_j,PW_m,PW_n );*/
- return BAD;
- }
- if ( (PW_j>0xffff) ||
- (PW_m>0xffff) ||
- (PW_n>0xffff) )
- {
-/*printf ( "#2,2 (Start:%ld) (at:%x)\n" , PW_Start_Address,PW_Start_Address+42+PW_k*30 );*/
- return BAD;
- }
- if ( in_data[PW_Start_Address+45+PW_k*30]>0x40 )
- {
-/*printf ( "#3 (Start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- /* finetune ... */
- if ( ( (((in_data[PW_Start_Address+40+PW_k*30]*256)+in_data[PW_Start_Address+41+PW_k*30]) != 0) && (PW_j == 0) ) ||
- ( (((in_data[PW_Start_Address+40+PW_k*30]*256)+in_data[PW_Start_Address+41+PW_k*30]) > 8 ) &&
- (((in_data[PW_Start_Address+40+PW_k*30]*256)+in_data[PW_Start_Address+41+PW_k*30]) < 247) ) )
- {
-/*printf ( "#3,1 (Start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- /* loop start but no replen ? */
- if ( (PW_m!=0) && (PW_n<=2) )
- {
-/*printf ( "#3,15 (Start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- if ( (in_data[PW_Start_Address+45+PW_k*30]!=0) && (PW_j == 0) )
- {
-/*printf ( "#3,2 (Start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- /* get the highest !0 sample */
- if ( PW_j != 0 )
- PW_o = PW_j+1;
- }
- if ( PW_WholeSampleSize <= 2 )
- {
-/*printf ( "#2,1 (Start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
-
-
- /* test #4 pattern list size */
- PW_l = in_data[PW_Start_Address+950];
- if ( (PW_l>127) || (PW_l==0) )
- {
-/*printf ( "#4,0 (Start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- /* PW_l holds the size of the pattern list */
- PW_k=0;
- for ( PW_j=0 ; PW_j<PW_l ; PW_j++ )
- {
- if ( in_data[PW_Start_Address+952+PW_j] > PW_k )
- PW_k = in_data[PW_Start_Address+952+PW_j];
- if ( in_data[PW_Start_Address+952+PW_j] > 127 )
- {
-/*printf ( "#4,1 (Start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- }
- /* PW_k holds the highest pattern number */
- /* test last patterns of the pattern list = 0 ? */
- while ( PW_j != 128 )
- {
- if ( in_data[PW_Start_Address+952+PW_j] != 0 )
- {
-/*printf ( "#4,2 (Start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- PW_j += 1;
- }
- /* PW_k is the number of pattern in the file (-1) */
- PW_k += 1;
-
-
- /* test #5 pattern data ... */
- if ( ((PW_k*768)+1084+PW_Start_Address) > PW_in_size )
- {
-/*printf ( "#5,0 (Start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- for ( PW_j=0 ; PW_j<(PW_k*256) ; PW_j++ )
- {
- /* relative note number + last bit of sample > $34 ? */
- if ( in_data[PW_Start_Address+1084+PW_j*3] > 0x74 )
- {
-/*printf ( "#5,1 (Start:%ld) (where:%ld)\n" , PW_Start_Address,PW_Start_Address+1084+PW_j*3 );*/
- return BAD;
- }
- if ( (in_data[PW_Start_Address+1084+PW_j*3]&0x3F) > 0x24 )
- {
-/*printf ( "#5,2 (Start:%ld) (where:%ld)\n" , PW_Start_Address,PW_Start_Address+1084+PW_j*3 );*/
- return BAD;
- }
- if ( ((in_data[PW_Start_Address+1084+PW_j*3+1]&0x0F) == 0x0C) &&
- (in_data[PW_Start_Address+1084+PW_j*3+2] > 0x40) )
- {
-/*printf ( "#5,3 (Start:%ld) (where:%ld)\n" , PW_Start_Address,PW_Start_Address+1084+PW_j*3+1 );*/
- return BAD;
- }
- if ( ((in_data[PW_Start_Address+1084+PW_j*3+1]&0x0F) == 0x0B) &&
- (in_data[PW_Start_Address+1084+PW_j*3+2] > 0x7F) )
- {
-/*printf ( "#5,4 (Start:%ld) (where:%ld)\n" , PW_Start_Address,PW_Start_Address+1084+PW_j*3+1 );*/
- return BAD;
- }
- if ( ((in_data[PW_Start_Address+1084+PW_j*3+1]&0x0F) == 0x0D) &&
- (in_data[PW_Start_Address+1084+PW_j*3+2] > 0x40) )
- {
-/*printf ( "#5,5 (Start:%ld) (where:%ld)\n" , PW_Start_Address,PW_Start_Address+1084+PW_j*3+2 );*/
- return BAD;
- }
- PW_n = ((in_data[PW_Start_Address+1084+PW_j*3]>>2)&0x30)|((in_data[PW_Start_Address+1085+PW_j*3+1]>>4)&0x0F);
- if ( PW_n > PW_o )
- {
-/*printf ( "#5,3 (Start:%ld) (where:%ld)\n" , PW_Start_Address,PW_Start_Address+1084+PW_j*3 );*/
- return BAD;
- }
- }
-
- return GOOD;
-}
-
-
-
-short testUNIC_noID ( void )
-{
- /* test 1 */
- if ( (PW_i < 45) || ((PW_i-45+1083)>=PW_in_size) )
- {
- /* printf ( "#1 (PW_i:%ld)\n" , PW_i );*/
- return BAD;
- }
-
- /* test #2 ID = $00000000 ? */
- PW_Start_Address = PW_i-45;
- if ( (in_data[PW_Start_Address+1080] == 00)
- &&(in_data[PW_Start_Address+1081] == 00)
- &&(in_data[PW_Start_Address+1082] == 00)
- &&(in_data[PW_Start_Address+1083] == 00) )
- {
-/*printf ( "#2 (start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
-
- /* test 2,5 :) */
- PW_WholeSampleSize=0;
- PW_o = 0;
- for ( PW_k=0 ; PW_k<31 ; PW_k++ )
- {
- PW_j = (((in_data[PW_Start_Address+42+PW_k*30]*256)+in_data[PW_Start_Address+43+PW_k*30])*2);
- PW_m = (((in_data[PW_Start_Address+46+PW_k*30]*256)+in_data[PW_Start_Address+47+PW_k*30])*2);
- PW_n = (((in_data[PW_Start_Address+48+PW_k*30]*256)+in_data[PW_Start_Address+49+PW_k*30])*2);
- PW_WholeSampleSize += PW_j;
- if ( (PW_n!=0) && ((PW_j+2) < (PW_m+PW_n)) )
- {
-/*printf ( "#2,1 (Start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- /* samples too big ? */
- if ( (PW_j>0xffff) ||
- (PW_m>0xffff) ||
- (PW_n>0xffff) )
- {
-/*printf ( "#2,2 (Start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- /* volume too big */
- if ( in_data[PW_Start_Address+45+PW_k*30]>0x40 )
- {
-/*printf ( "#3 (Start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- /* finetune ... */
- if ( ( (((in_data[PW_Start_Address+40+PW_k*30]*256)+in_data[PW_Start_Address+41+PW_k*30]) != 0) && (PW_j == 0) ) ||
- ( (((in_data[PW_Start_Address+40+PW_k*30]*256)+in_data[PW_Start_Address+41+PW_k*30]) > 8 ) &&
- (((in_data[PW_Start_Address+40+PW_k*30]*256)+in_data[PW_Start_Address+41+PW_k*30]) < 247) ) )
- {
-/*printf ( "#3,1 (Start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- /* loop start but no replen ? */
- if ( (PW_m!=0) && (PW_n<=2) )
- {
-/*printf ( "#3,15 (Start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- if ( (in_data[PW_Start_Address+45+PW_k*30]!=0) && (PW_j == 0) )
- {
-/*printf ( "#3,2 (Start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- /* get the highest !0 sample */
- if ( PW_j != 0 )
- PW_o = PW_j+1;
- }
- if ( PW_WholeSampleSize <= 2 )
- {
-/*printf ( "#3,3 (Start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
-
-
- /* test #4 pattern list size */
- PW_l = in_data[PW_Start_Address+950];
- if ( (PW_l>127) || (PW_l==0) )
- {
-/*printf ( "#4,0 (Start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- /* PW_l holds the size of the pattern list */
- PW_k=0;
- for ( PW_j=0 ; PW_j<PW_l ; PW_j++ )
- {
- if ( in_data[PW_Start_Address+952+PW_j] > PW_k )
- PW_k = in_data[PW_Start_Address+952+PW_j];
- if ( in_data[PW_Start_Address+952+PW_j] > 127 )
- {
-/*printf ( "#4,1 (Start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- }
- /* PW_k holds the highest pattern number */
- /* test last patterns of the pattern list = 0 ? */
- while ( PW_j != 128 )
- {
- if ( in_data[PW_Start_Address+952+PW_j] != 0 )
- {
-/*printf ( "#4,2 (Start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- PW_j += 1;
- }
- /* PW_k is the number of pattern in the file (-1) */
- PW_k += 1;
-
-
- /* test #5 pattern data ... */
- /* PW_o is the highest !0 sample */
- if ( ((PW_k*768)+1080+PW_Start_Address) > PW_in_size )
- {
-/*printf ( "#5,0 (Start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- for ( PW_j=0 ; PW_j<(PW_k*256) ; PW_j++ )
- {
- /* relative note number + last bit of sample > $34 ? */
- if ( in_data[PW_Start_Address+1080+PW_j*3] > 0x74 )
- {
-/*printf ( "#5,1 (Start:%ld) (where:%ld)\n" , PW_Start_Address,PW_Start_Address+1080+PW_j*3 );*/
- return BAD;
- }
- if ( (in_data[PW_Start_Address+1080+PW_j*3]&0x3F) > 0x24 )
- {
-/*printf ( "#5,2 (Start:%ld) (where:%ld)\n" , PW_Start_Address,PW_Start_Address+1080+PW_j*3 );*/
- return BAD;
- }
- if ( ((in_data[PW_Start_Address+1080+PW_j*3+1]&0x0F) == 0x0C) &&
- (in_data[PW_Start_Address+1080+PW_j*3+2] > 0x40) )
- {
-/*printf ( "#5,3 (Start:%ld) (where:%ld)\n" , PW_Start_Address,PW_Start_Address+1080+PW_j*3+1 );*/
- return BAD;
- }
- if ( ((in_data[PW_Start_Address+1080+PW_j*3+1]&0x0F) == 0x0B) &&
- (in_data[PW_Start_Address+1080+PW_j*3+2] > 0x7F) )
- {
-/*printf ( "#5,4 (Start:%ld) (where:%ld)\n" , PW_Start_Address,PW_Start_Address+1080+PW_j*3+1 );*/
- return BAD;
- }
- if ( ((in_data[PW_Start_Address+1080+PW_j*3+1]&0x0F) == 0x0D) &&
- (in_data[PW_Start_Address+1080+PW_j*3+2] > 0x40) )
- {
-/*printf ( "#5,5 (Start:%ld) (where:%ld)\n" , PW_Start_Address,PW_Start_Address+1080+PW_j*3+2 );*/
- return BAD;
- }
- PW_n = ((in_data[PW_Start_Address+1080+PW_j*3]>>2)&0x30)|((in_data[PW_Start_Address+1081+PW_j*3+1]>>4)&0x0F);
- if ( PW_n > PW_o )
- {
-/*printf ( "#5,9 (Start:%ld) (where:%ld)\n" , PW_Start_Address,PW_Start_Address+1080+PW_j*3 );*/
- return BAD;
- }
- }
-
- /* test #6 title coherent ? */
- for ( PW_j=0 ; PW_j<20 ; PW_j++ )
- {
- if ( ((in_data[PW_Start_Address+PW_j] != 0)
- &&(in_data[PW_Start_Address+PW_j] < 32))
- ||(in_data[PW_Start_Address+PW_j] > 180) )
- {
-/*printf ( "#6 (Start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- }
-
- return GOOD;
- /* PW_k is still the number of pattern */
-}
-
+++ /dev/null
-/* update on the 3rd of april 2000 */
-/* bugs pointed out by Thomas Neumann .. thx :) */
-
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-short testUNIC2 ( void )
-{
- /* test 1 */
- if ( (PW_i < 25) || ((PW_i+1828)>=PW_in_size) ) /* 1828=Head+1 pat */
- {
-/*printf ( "#1 (PW_i:%ld)\n" , PW_i );*/
- return BAD;
- }
-
- /* test #2 ID = $00000000 ? */
- PW_Start_Address = PW_i-25;
- if ( (in_data[PW_Start_Address+1060] == 00)
- &&(in_data[PW_Start_Address+1061] == 00)
- &&(in_data[PW_Start_Address+1062] == 00)
- &&(in_data[PW_Start_Address+1063] == 00) )
- {
-/*printf ( "#2 (start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
-
- /* test 2,5 :) */
- PW_o=0;
- PW_WholeSampleSize = 0;
- for ( PW_k=0 ; PW_k<31 ; PW_k++ )
- {
- PW_j = ((in_data[PW_Start_Address+22+PW_k*30]*256)+in_data[PW_Start_Address+23+PW_k*30]);
- PW_m = ((in_data[PW_Start_Address+26+PW_k*30]*256)+in_data[PW_Start_Address+27+PW_k*30]);
- PW_n = ((in_data[PW_Start_Address+28+PW_k*30]*256)+in_data[PW_Start_Address+29+PW_k*30]);
- PW_WholeSampleSize += (PW_j*2);
- if ( test_smps ( PW_j, PW_m, PW_n, in_data[PW_Start_Address+25+PW_k*30], 0) == BAD )
- {
-/*printf ( "#2,1 (Start:%ld) (PW_j:%ld) (PW_m:%ld) (PW_n:%ld) (PW_k:%ld)\n" , PW_Start_Address,PW_j,PW_m,PW_n,PW_k );*/
- return BAD;
- }
- if ( (PW_j>0x7fff) ||
- (PW_m>0x7fff) ||
- (PW_n>0x7fff) )
- {
-/*printf ( "#2,2 (Start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- if ( (((in_data[PW_Start_Address+20+PW_k*30]*256)+in_data[PW_Start_Address+21+PW_k*30]) != 0) && (PW_j == 0) )
- {
-/*printf ( "#3,1 (Start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- if ( (in_data[PW_Start_Address+25+PW_k*30]!=0) && (PW_j == 0) )
- {
-/*printf ( "#3,2 (Start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- /* get the highest !0 sample */
- if ( PW_j != 0 )
- PW_o = PW_j+1;
- }
- if ( PW_WholeSampleSize <= 2 )
- {
-/*printf ( "#3,3 (Start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
-
-
- /* test #4 pattern list size */
- PW_l = in_data[PW_Start_Address+930];
- if ( (PW_l>127) || (PW_l==0) )
- {
-/*printf ( "#4,0 (Start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- /* PW_l holds the size of the pattern list */
- PW_k=0;
- for ( PW_j=0 ; PW_j<PW_l ; PW_j++ )
- {
- if ( in_data[PW_Start_Address+932+PW_j] > PW_k )
- PW_k = in_data[PW_Start_Address+932+PW_j];
- if ( in_data[PW_Start_Address+932+PW_j] > 127 )
- {
-/*printf ( "#4,1 (Start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- }
- /* PW_k holds the highest pattern number */
- /* test last patterns of the pattern list = 0 ? */
- PW_j += 2; /* just to be sure .. */
- while ( PW_j != 128 )
- {
- if ( in_data[PW_Start_Address+932+PW_j] != 0 )
- {
-/*printf ( "#4,2 (Start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- PW_j += 1;
- }
- /* PW_k is the number of pattern in the file (-1) */
- PW_k += 1;
-
-
- /* test #5 pattern data ... */
- if ( ((PW_k*768)+1060+PW_Start_Address+PW_WholeSampleSize) > PW_in_size )
- {
-/*printf ( "#5,0 (Start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- for ( PW_j=0 ; PW_j<(PW_k*256) ; PW_j++ )
- {
- /* relative note number + last bit of sample > $34 ? */
- if ( in_data[PW_Start_Address+1060+PW_j*3] > 0x74 )
- {
-/*printf ( "#5,1 (Start:%ld) (where:%ld)\n" , PW_Start_Address,PW_Start_Address+1060+PW_j*3 );*/
- return BAD;
- }
- if ( (in_data[PW_Start_Address+1060+PW_j*3]&0x3F) > 0x24 )
- {
-/*printf ( "#5,2 (Start:%ld) (where:%ld)\n" , PW_Start_Address,PW_Start_Address+1060+PW_j*3 );*/
- return BAD;
- }
- if ( ((in_data[PW_Start_Address+1060+PW_j*3+1]&0x0F) == 0x0C) &&
- (in_data[PW_Start_Address+1060+PW_j*3+2] > 0x40) )
- {
-/*printf ( "#5,3 (Start:%ld) (where:%ld)\n" , PW_Start_Address,PW_Start_Address+1060+PW_j*3+1 );*/
- return BAD;
- }
- if ( ((in_data[PW_Start_Address+1060+PW_j*3+1]&0x0F) == 0x0B) &&
- (in_data[PW_Start_Address+1060+PW_j*3+2] > 0x7F) )
- {
-/*printf ( "#5,4 (Start:%ld) (where:%ld)\n" , PW_Start_Address,PW_Start_Address+1060+PW_j*3+1 );*/
- return BAD;
- }
- if ( ((in_data[PW_Start_Address+1060+PW_j*3+1]&0x0F) == 0x0D) &&
- (in_data[PW_Start_Address+1060+PW_j*3+2] > 0x40) )
- {
-/*printf ( "#5,5 (Start:%ld) (where:%ld)\n" , PW_Start_Address,PW_Start_Address+1060+PW_j*3+2 );*/
- return BAD;
- }
- PW_n = ((in_data[PW_Start_Address+1060+PW_j*3]>>2)&0x30)|((in_data[PW_Start_Address+1061+PW_j*3+1]>>4)&0x0F);
- if ( PW_n > PW_o )
- {
-/*printf ( "#5,6 (Start:%ld) (where:%ld)\n" , PW_Start_Address,PW_Start_Address+1060+PW_j*3 );*/
- return BAD;
- }
- }
-
- return GOOD;
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-
-short testWN ( void )
-{
- /* test 1 */
- if ( PW_i < 1080 )
- {
- return BAD;
- }
-
- /* test 2 */
- PW_Start_Address = PW_i-1080;
- if ( in_data[PW_Start_Address+951] != 0x7f )
- {
- return BAD;
- }
-
- /* test 3 */
- if ( in_data[PW_Start_Address+950] > 0x7f )
- {
- return BAD;
- }
-
- return GOOD;
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-short testXANN ( void )
-{
- /* test 1 */
- if ( PW_i < 3 )
- {
- return BAD;
- }
-
- /* test 2 */
- PW_Start_Address = PW_i - 3;
- for ( PW_l=0 ; PW_l<128 ; PW_l++ )
- {
- PW_j = (in_data[PW_Start_Address+PW_l*4]*256*256*256)
- +(in_data[PW_Start_Address+PW_l*4+1]*256*256)
- +(in_data[PW_Start_Address+PW_l*4+2]*256)
- +in_data[PW_Start_Address+PW_l*4+3];
- PW_k = (PW_j/4)*4;
- if ( (PW_k != PW_j) || (PW_j>132156) )
- {
-/*printf ( "#2 (Start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- }
-
- /* test 3 */
- if ( (PW_in_size - PW_Start_Address) < 2108)
- {
-/*printf ( "#3 (Start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
-
- /* test 4 */
- for ( PW_j=0 ; PW_j<64 ; PW_j++ )
- {
- if ( (in_data[PW_Start_Address+3+PW_j*4] != 0x3c) &&
- (in_data[PW_Start_Address+3+PW_j*4] != 0x00) )
- {
-/*printf ( "#4 (Start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- }
-
- /* test 5 */
- PW_WholeSampleSize = 0;
- for ( PW_j=0 ; PW_j<31 ; PW_j++ )
- {
- if ( in_data[PW_Start_Address+519+16*PW_j] > 0x40 )
- {
-/*printf ( "#5 (Start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- PW_WholeSampleSize += (((in_data[PW_Start_Address+530+PW_j*16]*256)+in_data[PW_Start_Address+531+PW_j*16])*2);
- }
-
- /* test #6 (address of samples) */
- for ( PW_l=0 ; PW_l<30 ; PW_l++ )
- {
- PW_k = (in_data[PW_Start_Address+526+16*PW_l]*256*256*256)
- +(in_data[PW_Start_Address+527+16*PW_l]*256*256)
- +(in_data[PW_Start_Address+528+16*PW_l]*256)
- +in_data[PW_Start_Address+529+16*PW_l];
- PW_j = (((in_data[PW_Start_Address+524+16*PW_l]*256)
- +in_data[PW_Start_Address+525+16*PW_l])*2);
- PW_m = (in_data[PW_Start_Address+520+16*(PW_l+1)]*256*256*256)
- +(in_data[PW_Start_Address+521+16*(PW_l+1)]*256*256)
- +(in_data[PW_Start_Address+522+16*(PW_l+1)]*256)
- +in_data[PW_Start_Address+523+16*(PW_l+1)];
- if ( (PW_k<2108) || (PW_m<2108) )
- {
-/*printf ( "#6 (Start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- if ( PW_k > PW_m )
- {
-/*printf ( "#6,1 (Start:%ld) (PW_k:%ld) (PW_j:%ld) (PW_m:%ld)\n" , PW_Start_Address,PW_k,PW_j,PW_m );*/
- return BAD;
- }
- }
-
- /* test #7 first pattern data .. */
- for ( PW_j=0 ; PW_j<256 ; PW_j++ )
- {
- PW_k = (in_data[PW_Start_Address+PW_j*4+1085]/2);
- PW_l = PW_k*2;
- if ( in_data[PW_Start_Address+PW_j*4+1085] != PW_l )
- {
-/*printf ( "#7 (Start:%ld)\n" , PW_Start_Address );*/
- return BAD;
- }
- }
-
- return GOOD;
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-short testXM ( void )
-{
- /* test #1 */
- PW_Start_Address = PW_i;
- if ( (PW_Start_Address + 336) > PW_in_size)
- {
- /*printf ( "#1 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
-
- if ( (in_data[PW_Start_Address + 37] != 0x1A ) || (in_data[PW_Start_Address+58] != 0x04) )
- {
- /*printf ( "#2 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
-
- /* get header siz */
- PW_l = ( (in_data[PW_Start_Address+63]*256*256*256)+
- (in_data[PW_Start_Address+62]*256*256)+
- (in_data[PW_Start_Address+61]*256)+
- in_data[PW_Start_Address+60] );
- /* get number of patterns */
- PW_j = (in_data[PW_Start_Address + 71]*256) + in_data[PW_Start_Address + 70];
- /* get number of instruments */
- PW_k = (in_data[PW_Start_Address + 73]*256) + in_data[PW_Start_Address + 72];
-
- if ( (PW_j>256)||(PW_k>128) )
- {
-printf ( "#3 Start:%ld\n" , PW_Start_Address );
- return BAD;
- }
-
- PW_l += 60; /* points now on the first pattern data */
-
-
- /* PW_l is the header size and points on the first pattern */
- /* PW_j is the number of pattern */
- /* PW_k is the number of instruments */
- return GOOD;
-}
-
+++ /dev/null
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
-
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
-
-short testZEN ( void )
-{
- /* test #1 */
- if ( PW_i<9 )
- {
- return BAD;
- }
-
- /* test #2 */
- PW_Start_Address = PW_i-9;
- PW_l = ( (in_data[PW_Start_Address]*256*256*256)+
- (in_data[PW_Start_Address+1]*256*256)+
- (in_data[PW_Start_Address+2]*256)+
- in_data[PW_Start_Address+3] );
- if ( (PW_l<502) || (PW_l>2163190l) || (PW_l>(PW_in_size-PW_Start_Address)) )
- {
-/*printf ( "#1 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- /* PW_l is the address of the pattern list */
-
- /* volumes */
- for ( PW_k = 0 ; PW_k < 31 ; PW_k ++ )
- {
- if ( (( PW_Start_Address + 9 + (16*PW_k) ) > PW_in_size )||
- (( in_data[PW_Start_Address + 9 + (16*PW_k)] > 0x40 )))
- {
-/*printf ( "#2 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- }
-
- /* fine */
- for ( PW_k = 0 ; PW_k < 31 ; PW_k ++ )
- {
- PW_j = (in_data[PW_Start_Address+6+(PW_k*16)]*256)+in_data[PW_Start_Address+7+(PW_k*16)];
- if ( ((PW_j/72)*72) != PW_j )
- {
-/*printf ( "#3 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- }
-
- /* smp sizes .. */
- PW_n = 0;
- for ( PW_k = 0 ; PW_k < 31 ; PW_k ++ )
- {
- PW_o = (in_data[PW_Start_Address+10+PW_k*16]*256)+in_data[PW_Start_Address+11+PW_k*16];
- PW_m = (in_data[PW_Start_Address+12+PW_k*16]*256)+in_data[PW_Start_Address+13+PW_k*16];
- PW_j = ((in_data[PW_Start_Address+14+PW_k*16]*256*256*256)+
- (in_data[PW_Start_Address+15+PW_k*16]*256*256)+
- (in_data[PW_Start_Address+16+PW_k*16]*256)+
- in_data[PW_Start_Address+17+PW_k*16] );
- PW_o *= 2;
- PW_m *= 2;
- /* sample size and loop size > 64k ? */
- if ( (PW_o > 0xFFFF)||
- (PW_m > 0xFFFF) )
- {
-/*printf ( "#4 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- /* sample address < pattern table address ? */
- if ( PW_j < PW_l )
- {
-/*printf ( "#4,1 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- /* too big an address ? */
- if ( PW_j > PW_in_size )
- {
-/*printf ( "#4,2 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
- /* get the nbr of the highest sample address and its size */
- if ( PW_j > PW_n )
- {
- PW_n = PW_j;
- PW_WholeSampleSize = PW_o;
- }
- }
- /* PW_n is the highest sample data address */
- /* PW_WholeSampleSize is the size of the same sample */
-
- /* test size of the pattern list */
- PW_j = in_data[PW_Start_Address+5];
- if ( (PW_j > 0x7f) || (PW_j == 0) )
- {
-/*printf ( "#5 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
-
-
- /* test if the end of pattern list is $FFFFFFFF */
- if ( (in_data[PW_Start_Address+PW_l+PW_j*4] != 0xFF ) ||
- (in_data[PW_Start_Address+PW_l+PW_j*4+1] != 0xFF ) ||
- (in_data[PW_Start_Address+PW_l+PW_j*4+2] != 0xFF ) ||
- (in_data[PW_Start_Address+PW_l+PW_j*4+3] != 0xFF ) )
- {
-/*printf ( "#6 Start:%ld\n" , PW_Start_Address );*/
- return BAD;
- }
-
- /* PW_n is the highest address of a sample data */
- /* PW_WholeSampleSize is its size */
- return GOOD;
-}
-
case 81: return cfgfile_uaelib (ARG1, ARG2, ARG3, ARG4);
case 82: return cfgfile_uaelib_modify (ARG1, ARG2, ARG3, ARG4, ARG5);
case 83: currprefs.mmkeyboard = ARG1 ? 1 : 0; return currprefs.mmkeyboard;
+#ifdef DEBUGGER
+ case 84: return snooper (ARG0);
+#endif
}
return 0;
}