thisframe_first_drawn_line = vpos;
thisframe_last_drawn_line = vpos;
- /* These are for comparison. */
- thisline_decision.bplcon0 = bplcon0;
- thisline_decision.bplcon2 = bplcon2;
-#ifdef AGA
- thisline_decision.bplcon3 = bplcon3;
- thisline_decision.bplcon4 = bplcon4;
-#endif
-
#ifdef SMART_UPDATE
if (line_decisions[next_lineno].plflinelen != thisline_decision.plflinelen
|| line_decisions[next_lineno].plfleft != thisline_decision.plfleft
#endif
/* Expansions from bplcon0/bplcon1. */
-static int toscr_res, toscr_res_first, toscr_nr_planes, fetchwidth;
+static int toscr_res, toscr_nr_planes, fetchwidth;
static int toscr_delay1x, toscr_delay2x, toscr_delay1, toscr_delay2;
/* The number of bits left from the last fetched words.
i += flush_plane_data (fm);
thisline_decision.plfright = i;
thisline_decision.plflinelen = out_offs;
- thisline_decision.bplres = toscr_res_first;
finish_playfield_line ();
}
out_nbits = 0;
out_offs = 0;
toscr_nbits = 0;
- toscr_res_first = GET_RES (bplcon0);
+ thisline_decision.bplres = GET_RES (bplcon0);
ddfstate = DIW_waiting_stop;
compute_toscr_delay (last_fetch_hpos);
* but the new color has not been entered into the table yet. */
static void record_color_change (int hpos, int regno, unsigned long value)
{
- if (regno == -1 && value) {
- thisline_decision.ham_seen = 1;
- if (hpos < HARD_DDF_START)
- thisline_decision.ham_at_start = 1;
- }
-
/* Early positions don't appear on-screen. */
- if (nodraw () || vpos < minfirstline || hpos < HARD_DDF_START
- /*|| currprefs.emul_accuracy == 0*/)
+ if (regno < 0x1000 && nodraw ())
+ return;
+ if (vpos < minfirstline)
return;
decide_diw (hpos);
curr_color_changes[next_color_change].linepos = hpos;
curr_color_changes[next_color_change].regno = regno;
curr_color_changes[next_color_change++].value = value;
+ if (hpos < HBLANK_OFFSET) {
+ curr_color_changes[next_color_change].linepos = HBLANK_OFFSET;
+ curr_color_changes[next_color_change].regno = regno;
+ curr_color_changes[next_color_change++].value = value;
+ }
+ curr_color_changes[next_color_change].regno = -1;
+}
+
+static void record_register_change (int hpos, int regno, unsigned long value)
+{
+ if (regno == 0x100) {
+ if (value & 0x800)
+ thisline_decision.ham_seen = 1;
+ if (hpos < HARD_DDF_START || hpos < plfstrt + 0x20) {
+ thisline_decision.bplcon0 = value;
+ thisline_decision.bplres = GET_RES (value);
+ }
+ }
+ record_color_change (hpos, regno + 0x1000, value);
}
typedef int sprbuf_res_t, cclockres_t, hwres_t, bplres_t;
{
if (nodraw ())
return;
- toscr_res_first = 0;
+ thisline_decision.bplres = GET_RES (bplcon0);
thisline_decision.any_hires_sprites = 0;
thisline_decision.nr_planes = 0;
last_sprite_hpos = -1;
last_fetch_hpos = -1;
+ /* These are for comparison. */
+ thisline_decision.bplcon0 = bplcon0;
+ thisline_decision.bplcon2 = bplcon2;
+#ifdef AGA
+ thisline_decision.bplcon3 = bplcon3;
+ thisline_decision.bplcon4 = bplcon4;
+#endif
+
+
}
static int isvsync (void)
decide_fetch (hpos);
decide_blitter (hpos);
- /* HAM change? */
- if ((bplcon0 ^ v) & 0x800) {
- record_color_change (hpos, -1, !! (v & 0x800));
- }
bplcon0 = v;
+ record_register_change (hpos, 0x100, v);
#ifdef AGA
if (currprefs.chipset_mask & CSMASK_AGA) {
return;
decide_line (hpos);
bplcon2 = v;
+ record_register_change (hpos, 0x104, v);
}
#ifdef AGA
decide_sprites (hpos);
bplcon3 = v;
expand_sprres ();
+ record_register_change (hpos, 0x106, v);
}
STATIC_INLINE void BPLCON4 (int hpos, uae_u16 v)
return;
decide_line (hpos);
bplcon4 = v;
+ record_register_change (hpos, 0x10c, v);
}
#endif
#ifdef CPUEMU_6
if (currprefs.cpu_cycle_exact || currprefs.blitter_cycle_exact) {
decide_blitter (hpos);
- memset (cycle_line, 0, sizeof(cycle_line));
+ memset (cycle_line, 0, sizeof cycle_line);
#if 1
{
cycle_line[maxhpos - 1] = CYCLE_REFRESH;
- cycle_line[2] = CYCLE_REFRESH;
- cycle_line[4] = CYCLE_REFRESH;
- cycle_line[6] = CYCLE_REFRESH;
+ cycle_line[1] = CYCLE_REFRESH;
+ cycle_line[5] = CYCLE_REFRESH;
+ cycle_line[7] = CYCLE_REFRESH;
}
#else
{
STATIC_INLINE decide_fetch_ce (int hpos)
{
- if (ddf_change == vpos && vpos < maxvpos)
+ if ((ddf_change == vpos || ddf_change + 1 == vpos) && vpos < maxvpos)
decide_fetch (hpos);
}
}
line[9 + cols * 5] = ' ';
line[9 + cols * 5 + 1 + 2 * cols] = 0;
- console_out (line);
+ console_out ("%s", line);
console_out ("\n");
}
*nxmem = addr;
#endif
ham_lastcolor = colors_for_drawing.color_regs_ecs[pv];
- ham_linebuf[ham_decode_pixel++] = ham_lastcolor;
+ ham_linebuf[ham_decode_pixel++] = 0; //ham_lastcolor;
}
#ifdef AGA
} else if (currprefs.chipset_mask & CSMASK_AGA) {
}
}
+/* We only save hardware registers during the hardware frame. Now, when
+ * drawing the frame, we expand the data into a slightly more useful
+ * form. */
+static void pfield_expand_dp_bplcon (void)
+{
+ bplres = dp_for_drawing->bplres;
+ bplplanecnt = dp_for_drawing->nr_planes;
+ bplham = dp_for_drawing->ham_seen;
+
+ if (bplres > 0)
+ can_use_lores = 0;
+ if (currprefs.chipset_mask & CSMASK_AGA) {
+ /* The KILLEHB bit exists in ECS, but is apparently meant for Genlock
+ * stuff, and it's set by some demos (e.g. Andromeda Seven Seas) */
+ bplehb = ((dp_for_drawing->bplcon0 & 0x7010) == 0x6000 && !(dp_for_drawing->bplcon2 & 0x200));
+ } else {
+ bplehb = (dp_for_drawing->bplcon0 & 0xFC00) == 0x6000;
+ }
+ plf1pri = dp_for_drawing->bplcon2 & 7;
+ plf2pri = (dp_for_drawing->bplcon2 >> 3) & 7;
+ plf_sprite_mask = 0xFFFF0000 << (4 * plf2pri);
+ plf_sprite_mask |= (0xFFFF << (4 * plf1pri)) & 0xFFFF;
+ bpldualpf = (dp_for_drawing->bplcon0 & 0x400) == 0x400;
+ bpldualpfpri = (dp_for_drawing->bplcon2 & 0x40) == 0x40;
+#ifdef AGA
+ bpldualpf2of = (dp_for_drawing->bplcon3 >> 10) & 7;
+ sbasecol[0] = ((dp_for_drawing->bplcon4 >> 4) & 15) << 4;
+ sbasecol[1] = ((dp_for_drawing->bplcon4 >> 0) & 15) << 4;
+
+ brdsprt = (currprefs.chipset_mask & CSMASK_AGA) && (dp_for_drawing->bplcon0 & 1) && (dp_for_drawing->bplcon3 & 0x02);
+ /* FIXME: we must update top and bottom borders when BRDBLANK changes */
+ brdblank = (currprefs.chipset_mask & CSMASK_ECS_DENISE) && (dp_for_drawing->bplcon0 & 1) && (dp_for_drawing->bplcon3 & 0x20);
+ if (brdblank)
+ brdsprt = 0;
+#endif
+}
+static void pfield_expand_dp_bplcon2(int regno, int v)
+{
+ regno -= 0x1000;
+ switch (regno)
+ {
+ case 0x100:
+ dp_for_drawing->bplcon0 = v;
+ dp_for_drawing->bplres = GET_RES(v);
+ dp_for_drawing->nr_planes = GET_PLANES(v);
+ dp_for_drawing->ham_seen = !! (v & 0x800);
+ break;
+ case 0x104:
+ dp_for_drawing->bplcon2 = v;
+ break;
+#ifdef AGA
+ case 0x106:
+ dp_for_drawing->bplcon3 = v;
+ break;
+ case 0x108:
+ dp_for_drawing->bplcon4 = v;
+ break;
+#endif
+ }
+ pfield_expand_dp_bplcon();
+ res_shift = lores_shift - bplres;
+}
+
STATIC_INLINE void do_color_changes (line_draw_func worker_border, line_draw_func worker_pfield)
{
int i;
lastpos = nextpos_in_range;
}
if (i != dip_for_drawing->last_color_change) {
- if (regno == -1)
- bplham = value;
- else {
+ if (regno >= 0x1000) {
+ pfield_expand_dp_bplcon2(regno, value);
+ } else {
color_reg_set (&colors_for_drawing, regno, value);
colors_for_drawing.acolors[regno] = getxcolor (value);
}
}
}
-/* We only save hardware registers during the hardware frame. Now, when
- * drawing the frame, we expand the data into a slightly more useful
- * form. */
-static void pfield_expand_dp_bplcon (void)
+/* move color changes in horizontal cycles 0 to HBLANK_OFFSET to previous line
+ * cycles 0 to HBLANK_OFFSET must be visible in right border
+ */
+static void mungedip(int lineno)
{
- bplres = dp_for_drawing->bplres;
- bplplanecnt = dp_for_drawing->nr_planes;
- bplham = dp_for_drawing->ham_at_start;
-
- if (bplres > 0)
- can_use_lores = 0;
- if (currprefs.chipset_mask & CSMASK_AGA) {
- /* The KILLEHB bit exists in ECS, but is apparently meant for Genlock
- * stuff, and it's set by some demos (e.g. Andromeda Seven Seas) */
- bplehb = ((dp_for_drawing->bplcon0 & 0x7010) == 0x6000 && !(dp_for_drawing->bplcon2 & 0x200));
- } else {
- bplehb = (dp_for_drawing->bplcon0 & 0xFC00) == 0x6000;
+ int i = dip_for_drawing->last_color_change;
+ struct draw_info *dip_for_drawing_next = curr_drawinfo + (lineno + 1);
+ if (dip_for_drawing_next->first_color_change == 0)
+ dip_for_drawing_next = curr_drawinfo + (lineno + 2);
+ while (i < dip_for_drawing_next->last_color_change) {
+ int regno = curr_color_changes[i].regno;
+ int hpos = curr_color_changes[i].linepos;
+ if (regno < 0)
+ break;
+ if (hpos >= HBLANK_OFFSET)
+ break;
+ curr_color_changes[i].linepos += maxhpos + 2;
+ dip_for_drawing->last_color_change++;
+ dip_for_drawing->nr_color_changes++;
+ dip_for_drawing_next->first_color_change++;
+ dip_for_drawing_next->nr_color_changes--;
+ i++;
}
- plf1pri = dp_for_drawing->bplcon2 & 7;
- plf2pri = (dp_for_drawing->bplcon2 >> 3) & 7;
- plf_sprite_mask = 0xFFFF0000 << (4 * plf2pri);
- plf_sprite_mask |= (0xFFFF << (4 * plf1pri)) & 0xFFFF;
- bpldualpf = (dp_for_drawing->bplcon0 & 0x400) == 0x400;
- bpldualpfpri = (dp_for_drawing->bplcon2 & 0x40) == 0x40;
-#ifdef AGA
- bpldualpf2of = (dp_for_drawing->bplcon3 >> 10) & 7;
- sbasecol[0] = ((dp_for_drawing->bplcon4 >> 4) & 15) << 4;
- sbasecol[1] = ((dp_for_drawing->bplcon4 >> 0) & 15) << 4;
-
- brdsprt = (currprefs.chipset_mask & CSMASK_AGA) && (dp_for_drawing->bplcon0 & 1) && (dp_for_drawing->bplcon3 & 0x02);
- /* FIXME: we must update top and bottom borders when BRDBLANK changes */
- brdblank = (currprefs.chipset_mask & CSMASK_ECS_DENISE) && (dp_for_drawing->bplcon0 & 1) && (dp_for_drawing->bplcon3 & 0x20);
- if (brdblank)
- brdsprt = 0;
-#endif
}
enum double_how {
dp_for_drawing = line_decisions + lineno;
dip_for_drawing = curr_drawinfo + lineno;
+ mungedip(lineno);
switch (linestate[lineno]) {
case LINE_REMEMBERED_AS_PREVIOUS:
if (!warned)
/* According to the HRM, pixel data spends a couple of cycles somewhere in the chips
before it appears on-screen. */
#define DIW_DDF_OFFSET 9
+/* this many cycles starting from hpos=0 are visible on right border */
+#define HBLANK_OFFSET 4
/* We ignore that many lores pixels at the start of the display. These are
* invisible anyway due to hardware DDF limits. */
extern struct uae_prefs currprefs, changed_prefs;
extern void machdep_init (void);
+extern void machdep_free (void);
/* AIX doesn't think it is Unix. Neither do I. */
#if defined(_ALL_SOURCE) || defined(_AIX)
savestate_free ();
memory_cleanup ();
cfgfile_addcfgparam (0);
+ machdep_free ();
}
void start_program (void)
adaptec = -1;
strcpy (path_adaptec, "wnaspi32.dll");
if (getversion(path_adaptec, &ver)) {
- if (ver.dwFileVersionMS >= 0x40000) {
+ if (ver.dwFileVersionMS >= 0x40000 || ver.dwFileVersionMS < 0x10000) {
adaptec = 1;
return path_adaptec;
}
#include "direct3d.h"
+#if 0
typedef D3DXMATRIX (CALLBACK* D3DXMATRIXPERSPECTIVEFOVLH)
(D3DXMATRIX *pOut,FLOAT fovy,FLOAT Aspect,FLOAT zn,FLOAT zf);
static D3DXMATRIXPERSPECTIVEFOVLH pD3DXMatrixPerspectiveFovLH;
(LPDIRECT3DDEVICE9 pDevice,UINT *pWidth,UINT *pHeight,UINT *pNumMipLevels,
DWORD Usage,D3DFORMAT *pFormat,D3DPOOL Pool);
static D3DXCHECKTEXTUREREQUIREMENTS pD3DXCheckTextureRequirements;
+#endif
static int tformat;
static int d3d_enabled, scanlines_ok;
// Set the projection matrix
aspect = ((FLOAT)dsdbb.Width) / dsdbb.Height;
- pD3DXMatrixPerspectiveFovLH (&matrix, D3DX_PI/4, aspect, 1.0f, 100.0f);
+ D3DXMatrixPerspectiveFovLH (&matrix, D3DX_PI/4, aspect, 1.0f, 100.0f);
hr = IDirect3DDevice9_SetTransform(d3ddev, D3DTS_PROJECTION, &matrix);
// turn off lighting
UINT hh = h;
D3DFORMAT format = tformat;
- hr = pD3DXCheckTextureRequirements(d3ddev, &ww, &hh, NULL, 0, &format, D3DPOOL_MANAGED);
+ hr = D3DXCheckTextureRequirements(d3ddev, &ww, &hh, NULL, 0, &format, D3DPOOL_MANAGED);
if (FAILED (hr)) {
write_log ("D3DXCheckTextureRequirements failed: %s\n", D3D_ErrorString (hr));
}
- hr = pD3DXCreateTexture(d3ddev, ww, hh, 0, 0, format, D3DPOOL_MANAGED, &texture);
+ hr = D3DXCreateTexture(d3ddev, ww, hh, 0, 0, format, D3DPOOL_MANAGED, &texture);
if (FAILED (hr)) {
write_log ("D3DXCreateTexture failed: %s\n", D3D_ErrorString (hr));
}
UINT hh = required_sl_texture_h;
D3DFORMAT format = D3DFMT_A4R4G4B4;
- hr = pD3DXCheckTextureRequirements(d3ddev, &ww, &hh, NULL, 0, &format, D3DPOOL_MANAGED);
+ hr = D3DXCheckTextureRequirements(d3ddev, &ww, &hh, NULL, 0, &format, D3DPOOL_MANAGED);
if (FAILED (hr)) {
write_log ("SL D3DXCheckTextureRequirements failed: %s\n", D3D_ErrorString (hr));
return 0;
}
- hr = pD3DXCreateTexture(d3ddev, ww, hh, 0, 0, format, D3DPOOL_MANAGED, &sltexture);
+ hr = D3DXCreateTexture(d3ddev, ww, hh, 0, 0, format, D3DPOOL_MANAGED, &sltexture);
if (FAILED (hr)) {
write_log ("SL D3DXCreateTexture failed: %s\n", D3D_ErrorString (hr));
return 0;
LPDIRECT3D9 (WINAPI *D3DCreate)(UINT);
D3DDISPLAYMODE mode;
D3DCAPS9 d3dCaps;
+#if 0
char d3dxdlls[100];
HINSTANCE d3dxDLL;
+#endif
d3d_enabled = 0;
scanlines_ok = 0;
return errmsg;
}
+#if 0
sprintf (d3dxdlls, "d3dx9_%d.dll", 27);
d3dxDLL = LoadLibrary(d3dxdlls);
pD3DXMatrixPerspectiveFovLH = (D3DXMATRIXPERSPECTIVEFOVLH)GetProcAddress(
d3dxDLL, "D3DXCreateTexture");
pD3DXCheckTextureRequirements = (D3DXCHECKTEXTUREREQUIREMENTS)GetProcAddress(
d3dxDLL, "D3DXCheckTextureRequirements");
-
+#endif
D3DCreate = (LPDIRECT3D9 (WINAPI *)(UINT))
GetProcAddress(d3dDLL, "Direct3DCreate9");
if(D3DCreate == NULL) {
#if defined(LOGITECHLCD)
+#include "resource.h"
#include "gui.h"
#include "lcd.h"
#include <lglcd.h>
+extern HINSTANCE hInst;
+
static int inited;
static lgLcdConnectContext cctx;
static lgLcdDeviceDesc desc;
static int device;
static lgLcdBitmapHeader *lbh;
-static uae_u8 *bitmap;
-
-#define TD_NUM_WIDTH 7
-#define TD_NUM_HEIGHT 7
-#define NUMBERS_NUM 16
-#define TD_LED_WIDTH 24
-
-static char *numbers = { /* ugly 0123456789CHD%x */
-"+++++++--++++-+++++++++++++++++-++++++++++++++++++++++++++++++++++++++++++++-++++++-++++----++---+++++++++++++++"
-"+xxxxx+--+xx+-+xxxxx++xxxxx++x+-+x++xxxxx++xxxxx++xxxxx++xxxxx++xxxxx++xxxx+-+x++x+-+xxx++-+xx+-+x+xxxxxxxxxxxx+"
-"+x+++x+--++x+-+++++x++++++x++x+++x++x++++++x++++++++++x++x+++x++x+++x++x++++-+x++x+-+x++x+--+x++x++xxxxxxxxxxxx+"
-"+x+-+x+---+x+-+xxxxx++xxxxx++xxxxx++xxxxx++xxxxx+--++x+-+xxxxx++xxxxx++x+----+xxxx+-+x++x+----+x+++xxxxxxxxxxxx+"
-"+x+++x+---+x+-+x++++++++++x++++++x++++++x++x+++x+--+x+--+x+++x++++++x++x++++-+x++x+-+x++x+---+x+x++xxxxxxxxxxxx+"
-"+xxxxx+---+x+-+xxxxx++xxxxx+----+x++xxxxx++xxxxx+--+x+--+xxxxx++xxxxx++xxxx+-+x++x+-+xxx+---+x++xx+xxxxxxxxxxxx+"
-"+++++++---+++-++++++++++++++----+++++++++++++++++--+++--++++++++++++++++++++-++++++-++++----------++++++++++++++"
-};
-static char *one = { "x" };
+static uae_u8 *bitmap, *origbitmap;
+static uae_u8 *numbers;
+static int numbers_width = 7, numbers_height = 10;
void lcd_close(void)
{
{
DWORD ret;
lgLcdOpenContext octx;
+ HBITMAP bmp;
+ BITMAP binfo;
+ HDC dc;
+ int x, y;
ret = lgLcdInit();
if (ret != ERROR_SUCCESS) {
lcd_close();
return 0;
}
- lbh = xcalloc (1, sizeof (lgLcdBitmapHeader) + desc.Width * desc.Height);
+ lbh = xcalloc (1, sizeof (lgLcdBitmapHeader) + desc.Width * (desc.Height + 20));
lbh->Format = LGLCD_BMP_FORMAT_160x43x1;
bitmap = (uae_u8*)lbh + sizeof (lgLcdBitmapHeader);
+ origbitmap = xcalloc (1, desc.Width * desc.Height);
memset (&octx, 0, sizeof (octx));
octx.connection = cctx.connection;
octx.index = 0;
return 0;
}
device = octx.device;
+
+ bmp = LoadBitmap(hInst, MAKEINTRESOURCE(IDB_LCD160X43));
+ dc = CreateCompatibleDC(NULL);
+ SelectObject(dc, bmp);
+ GetObject (bmp, sizeof (binfo), &binfo);
+ for (y = 0; y < binfo.bmHeight; y++) {
+ for (x = 0; x < binfo.bmWidth; x++) {
+ bitmap[y * binfo.bmWidth + x] = GetPixel(dc, x, y) == 0 ? 0xff : 0;
+ }
+ }
+ numbers = bitmap + desc.Width * desc.Height;
+ memcpy (origbitmap, bitmap, desc.Width * desc.Height);
+ DeleteDC(dc);
+
write_log("LCD: Logitech LCD system initialized\n");
return 1;
}
+static void dorect(int *crd, int inv)
+{
+ int yy, xx;
+ int x = crd[0], y = crd[1], w = crd[2], h = crd[3];
+ for (yy = y; yy < y + h; yy++) {
+ for (xx = x; xx < x + w; xx++) {
+ uae_u8 b = origbitmap[yy * desc.Width + xx];
+ if (inv)
+ b = b == 0 ? 0xff : 0;
+ bitmap[yy * desc.Width + xx] = b;
+ }
+ }
+}
+
static void putnumber(int x, int y, int n, int inv)
{
int xx, yy;
uae_u8 *dst, *src;
- for (yy = 0; yy < TD_NUM_HEIGHT; yy++) {
- for (xx = 0; xx < TD_NUM_WIDTH; xx++) {
+ if (n == 0)
+ n = 9;
+ else
+ n--;
+ if (n < 0)
+ n = 10;
+ for (yy = 0; yy < numbers_height; yy++) {
+ for (xx = 0; xx < numbers_width; xx++) {
dst = bitmap + (yy + y) * desc.Width + (xx + x);
- src = numbers + n * TD_NUM_WIDTH + yy * TD_NUM_WIDTH * NUMBERS_NUM + xx;
+ src = numbers + n * numbers_width + yy * desc.Width + xx;
*dst = 0;
- if (*src == 'x')
+ if (*src == 0)
*dst = 0xff;
if (inv)
*dst ^= 0xff;
static void putnumbers(int x, int y, int num, int inv)
{
- putnumber(x, y, num / 10, inv);
- putnumber(x + TD_NUM_WIDTH, y, num % 10, inv);
+ putnumber(x, y, num < 0 ? num : num / 10, inv);
+ putnumber(x + numbers_width, y, num < 0 ? num : num % 10, inv);
}
+static int coords[] = {
+ 53, 2, 13, 10, // CD
+ 36, 2, 13, 10, // HD
+ 2, 2, 30, 10 // POWER
+};
+
void lcd_update(int led, int on)
{
- int track, x, y, y1, y2;
+ int track, x, y;
if (!inited)
return;
- x = 10;
- y1 = desc.Height - TD_NUM_HEIGHT - 2;
- y2 = y1 - TD_NUM_HEIGHT - 4;
+ if (led < 0) {
+ lgLcdUpdateBitmap(device, lbh, LGLCD_PRIORITY_IDLE_NO_SHOW);
+ return;
+ }
+
if (led >= 1 && led <= 4) {
- x += (led - 1) * TD_LED_WIDTH;
- y = y1;
+ x = 23 + (led - 1) * 40;
+ y = 17;
track = gui_data.drive_track[led - 1];
+ if (gui_data.drive_disabled[led - 1])
+ track = -1;
putnumbers(x, y, track, on);
} else if (led == 0) {
- y = y2;
- x += 2 * TD_LED_WIDTH;
- putnumber(x, y, 14, on);
- putnumber(x + TD_NUM_WIDTH, y, 15, on);
+ dorect(&coords[4 * 2], on);
} else if (led == 5) {
- y = y2;
- x += 3 * TD_LED_WIDTH;
- putnumber(x, y, 11, on);
- putnumber(x + TD_NUM_WIDTH, y, 12, on);
+ dorect(&coords[4 * 1], on);
} else if (led == 6) {
- y = y2;
- x += 4 * TD_LED_WIDTH;
- putnumber(x, y, 10, on);
- putnumber(x + TD_NUM_WIDTH, y, 12, on);
+ dorect(&coords[4 * 0], on);
} else if (led == 7) {
- y = y2;
- x += 1 * TD_LED_WIDTH;
+ y = 2;
+ x = 125;
putnumbers(x, y, gui_data.fps <= 999 ? gui_data.fps / 10 : 99, 0);
} else if (led == 8) {
- y = y2;
- x += 0 * TD_LED_WIDTH;
+ y = 2;
+ x = 98;
putnumbers(x, y, gui_data.idle <= 999 ? gui_data.idle / 10 : 99, 0);
}
- lgLcdUpdateBitmap(device, lbh, LGLCD_ASYNC_UPDATE(LGLCD_PRIORITY_NORMAL));
+ lgLcdUpdateBitmap(device, lbh, LGLCD_ASYNC_UPDATE(LGLCD_PRIORITY_NORMAL + 1));
}
int lcd_open(void)
#define IDS_SOUND_SWAP_AHI 250
#define IDD_PROGRESSBAR 250
#define IDS_SOUND_SWAP_BOTH 251
+#define IDB_BITMAP1 252
+#define IDB_LCD160X43 252
#define IDS_NUMSG_NEEDEXT2 300
#define IDS_NUMSG_NOROMKEY 301
#define IDS_NUMSG_KSROMCRCERROR 302
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NO_MFC 1
#define _APS_3D_CONTROLS 1
-#define _APS_NEXT_RESOURCE_VALUE 251
+#define _APS_NEXT_RESOURCE_VALUE 253
#define _APS_NEXT_COMMAND_VALUE 40021
#define _APS_NEXT_CONTROL_VALUE 1707
#define _APS_NEXT_SYMED_VALUE 101
EXSTYLE WS_EX_CONTEXTHELP
FONT 8, "MS Sans Serif", 0, 0, 0x1
BEGIN
- GROUPBOX "System ROM settings",-1,5,0,290,74
+ GROUPBOX "System ROM Settings",-1,5,0,290,74
RTEXT "Main ROM File:",IDC_ROMTEXT,10,15,75,10
COMBOBOX IDC_ROMFILE,89,12,186,75,CBS_DROPDOWN | CBS_AUTOHSCROLL | CBS_SORT | WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "...",IDC_KICKCHOOSER,280,10,10,15
GROUPBOX "Centering",IDC_STATIC,221,0,61,67
CONTROL "Horizontal",IDC_XCENTER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,229,16,45,10
CONTROL "Vertical",IDC_YCENTER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,229,32,39,10
- GROUPBOX "Line mode",IDC_LINEMODE,222,73,61,73
+ GROUPBOX "Line Mode",IDC_LINEMODE,222,73,61,73
CONTROL "Normal",IDC_LM_NORMAL,"Button",BS_AUTORADIOBUTTON | BS_LEFT | WS_GROUP | WS_TABSTOP,233,89,38,10
CONTROL "Double",IDC_LM_DOUBLED,"Button",BS_AUTORADIOBUTTON | BS_LEFT | WS_TABSTOP,233,105,41,10
CONTROL "Scanlines",IDC_LM_SCANLINES,"Button",BS_AUTORADIOBUTTON | BS_LEFT | WS_TABSTOP,233,121,40,10
EXSTYLE WS_EX_CONTEXTHELP
FONT 8, "MS Sans Serif", 0, 0, 0x1
BEGIN
- GROUPBOX "Memory settings",-1,14,40,274,93
+ GROUPBOX "Memory Settings",-1,14,40,274,93
RTEXT "Chip:",-1,24,60,20,10,SS_CENTERIMAGE
CONTROL "Slider1",IDC_CHIPMEM,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,54,55,50,20
RTEXT "Fast:",IDC_FASTTEXT,24,85,20,10,SS_CENTERIMAGE
"Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,10,130,70,10
CONTROL "JIT [] Enable just-in-time CPU emulator. Significantly increases the speed of CPU emulation. Requires 68020 or 68040 CPU.",IDC_JITENABLE,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,145,64,10
- GROUPBOX "CPU emulation speed",IDC_STATIC,90,5,205,86
+ 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 "Match A500 speed",IDC_CS_68000,"Button",BS_AUTORADIOBUTTON | BS_LEFT | WS_TABSTOP,95,32,195,10
LTEXT "Chipset",IDC_CS_CHIPSET_TEXT,182,71,25,10,SS_CENTERIMAGE | NOT WS_GROUP | WS_TABSTOP
RTEXT "CPU idle",IDC_CS_CPU_TEXT2,236,56,32,10,SS_CENTERIMAGE | WS_TABSTOP
CONTROL "",IDC_CPUIDLE,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,219,66,69,20
- GROUPBOX "Advanced JIT settings",IDC_STATIC,90,92,205,79
+ GROUPBOX "Advanced JIT Settings",IDC_STATIC,90,92,205,79
RTEXT "Cache size:",IDC_CS_CACHE_TEXT,95,109,45,10,SS_CENTERIMAGE | WS_TABSTOP
CONTROL "Slider1",IDC_CACHE,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,140,104,115,20
EDITTEXT IDC_CACHETEXT,255,109,30,12,ES_CENTER | ES_READONLY
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,35
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
- GROUPBOX "Floppy drive emulation speed",IDC_SETTINGSTEXT2,5,144,289,35
+ GROUPBOX "Floppy Drive Emulation Speed",IDC_SETTINGSTEXT2,5,144,289,35
CONTROL "",IDC_FLOPPYSPD,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,32,152,116,20
EDITTEXT IDC_FLOPPYSPDTEXT,169,155,107,12,ES_CENTER | ES_READONLY
PUSHBUTTON "Delete save image",IDC_SAVEIMAGE0,43,5,70,15,NOT WS_VISIBLE
BEGIN
RTEXT "Sound device:",IDC_SOUNDCARD,8,9,51,13,SS_CENTERIMAGE
COMBOBOX IDC_SOUNDCARDLIST,64,9,229,50,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
- GROUPBOX "Sound emulation",IDC_SOUNDSETTINGS,5,30,120,68
+ GROUPBOX "Sound Emulation",IDC_SOUNDSETTINGS,5,30,120,68
CONTROL "Disabled",IDC_SOUND0,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,13,45,43,10
CONTROL "Disabled, but emulated",IDC_SOUND1,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,13,57,88,10
CONTROL "Enabled",IDC_SOUND2,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,13,69,42,10
COMBOBOX IDC_SOUNDSTEREOSEP,156,120,62,75,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
LTEXT "Stereo mixing delay:",IDC_SOUNDSTEREOMIXTXT,155,135,63,8,SS_CENTERIMAGE
COMBOBOX IDC_SOUNDSTEREOMIX,156,144,62,75,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
- GROUPBOX "Floppy drive sound emulation",IDC_STATIC,6,164,290,46
+ GROUPBOX "Floppy Drive Sound Emulation",IDC_STATIC,6,164,290,46
CONTROL "",IDC_SOUNDDRIVEVOLUME,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,14,172,107,19
EDITTEXT IDC_SOUNDDRIVEVOLUME2,124,178,40,12,ES_CENTER | ES_READONLY
COMBOBOX IDC_SOUNDDRIVE,237,174,46,75,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
COMBOBOX IDC_SOUNDDRIVESELECT,18,192,265,75,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
- GROUPBOX "Audio driver lag compensation",IDC_STATIC,6,211,290,31
+ GROUPBOX "Audio Driver Lag Compensation",IDC_STATIC,6,211,290,31
CONTROL "Slider1",IDC_SOUNDADJUST,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,14,221,107,19
EDITTEXT IDC_SOUNDADJUSTNUM,124,224,40,12,ES_CENTER | ES_READONLY
PUSHBUTTON "Calibrate",IDC_SOUNDCALIBRATE,183,223,40,14
STYLE DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD
FONT 8, "MS Sans Serif", 0, 0, 0x1
BEGIN
- GROUPBOX "Parallel port",IDC_SERPARFRAME,5,2,291,68
+ GROUPBOX "Parallel Port",IDC_SERPARFRAME,5,2,291,68
RTEXT "Printer:",IDC_STATIC,12,15,25,15,SS_CENTERIMAGE
COMBOBOX IDC_PRINTERLIST,49,15,153,134,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "Flush print job",IDC_FLUSHPRINTER,220,14,58,12
EDITTEXT IDC_PRINTERAUTOFLUSH,263,33,25,12,ES_NUMBER
RTEXT "Ghostscript extra parameters:",IDC_STATIC,12,49,91,15,SS_CENTERIMAGE
EDITTEXT IDC_PS_PARAMS,120,50,169,12,ES_AUTOHSCROLL
- GROUPBOX "Serial port",IDC_SERIALFRAME,4,72,292,29
+ GROUPBOX "Serial Port",IDC_SERIALFRAME,4,72,292,29
COMBOBOX IDC_SERIAL,19,83,95,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
CONTROL "Shared",IDC_SHARED,"Button",BS_AUTOCHECKBOX | BS_VCENTER | WS_TABSTOP,132,83,48,13
CONTROL "RTS/CTS",IDC_SER_CTSRTS,"Button",BS_AUTOCHECKBOX | BS_VCENTER | WS_TABSTOP,185,83,53,12
COMBOBOX IDC_MIDIOUTLIST,50,115,95,130,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
RTEXT "In:",IDC_MIDI2,150,115,29,15,SS_CENTERIMAGE
COMBOBOX IDC_MIDIINLIST,185,115,95,134,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
- GROUPBOX "Mouse/joystick ports",IDC_PORT0,4,139,292,75
+ GROUPBOX "Mouse/Joystick Ports",IDC_PORT0,4,139,292,75
COMBOBOX IDC_PORT0_JOYS,45,155,241,130,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
COMBOBOX IDC_PORT1_JOYS,45,176,241,130,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "Swap ports",IDC_SWAP,211,195,75,14
IDD_CONTRIBUTORS DIALOGEX 0, 0, 411, 242
STYLE DS_SETFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_3DLOOK | WS_POPUP | WS_VISIBLE | WS_CAPTION
-CAPTION "UAE authors and contributors..."
+CAPTION "UAE Authors and Contributors..."
FONT 8, "MS Sans Serif", 0, 0, 0x0
BEGIN
DEFPUSHBUTTON "Ok",ID_OK,177,219,53,14
GROUPBOX "Logging",IDC_STATIC,97,120,195,25
CONTROL "Create log file",IDC_CREATELOGFILE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,107,131,72,10,0,HIDC_CREATELOGFILE
CONTROL "Illegal memory accesses",IDC_ILLEGAL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,189,131,95,10
- GROUPBOX "State files",IDC_STATIC,98,146,195,69
+ GROUPBOX "State Files",IDC_STATIC,98,146,195,69
PUSHBUTTON "Load state...",IDC_DOLOADSTATE,105,162,49,14
PUSHBUTTON "Save state...",IDC_DOSAVESTATE,106,188,49,14
CONTROL "Enable state recording",IDC_STATE_CAPTURE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,188,161,88,10
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,174,30,96,10
CONTROL "Cycle-exact CPU and Blitter [] The most compatible A500 emulation mode. Very fast PC recommended.",IDC_CYCLEEXACT,
"Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,174,43,100,10
- GROUPBOX "Collision level",IDC_STATIC,14,97,267,48
+ GROUPBOX "Collision Level",IDC_STATIC,14,97,267,48
CONTROL "None [] Collision hardware emulation disabled.",IDC_COLLISION0,
"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,40,113,50,10
CONTROL "Sprites only [] Emulate only sprite vs. sprite collisions.",IDC_COLLISION1,
"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,104,113,161,10
CONTROL "Full [] 100% collision hardware emulation. Only very few games need this option. Slowest.",IDC_COLLISION3,
"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,104,129,82,10
- GROUPBOX "Sound emulation",IDC_STATIC,13,151,268,65
+ GROUPBOX "Sound Emulation",IDC_STATIC,13,151,268,65
CONTROL "Disabled",IDC_CS_SOUND0,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,39,167,102,10
CONTROL "Emulated",IDC_CS_SOUND1,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,39,182,91,10
CONTROL "Emulated, 100% accurate",IDC_CS_SOUND2,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,39,197,95,10
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
+ 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 "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
+ 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
STYLE DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD
FONT 8, "MS Sans Serif", 0, 0, 0x1
BEGIN
- GROUPBOX "Filter settings",-1,0,0,294,174
+ GROUPBOX "Filter Settings",-1,0,0,294,174
CONTROL "Enable",IDC_FILTERENABLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,26,17,38,10
COMBOBOX IDC_FILTERMODE,67,15,56,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
COMBOBOX IDC_FILTERFILTER,128,15,65,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
STYLE DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD
FONT 8, "MS Sans Serif", 0, 0, 0x1
BEGIN
- GROUPBOX "When active",IDC_STATIC,8,7,88,73
+ GROUPBOX "When Active",IDC_STATIC,8,7,88,73
RTEXT "Run at priority:",IDC_ACTIVE_PRI,14,17,45,10,SS_CENTERIMAGE | WS_TABSTOP
COMBOBOX IDC_ACTIVE_PRIORITY,14,29,76,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
- GROUPBOX "When inactive",IDC_STATIC,102,7,92,73
+ GROUPBOX "When Inactive",IDC_STATIC,102,7,92,73
RTEXT "Run at priority:",IDC_INACTIVE_PRI,109,17,45,10,SS_CENTERIMAGE | WS_TABSTOP
COMBOBOX IDC_INACTIVE_PRIORITY,109,29,76,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
CONTROL "Pause emulation",IDC_INACTIVE_PAUSE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,109,50,69,10
CONTROL "Disable sound output",IDC_INACTIVE_NOSOUND,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,109,63,79,10
- GROUPBOX "When minimized",IDC_STATIC,199,7,92,73
+ GROUPBOX "When Minimized",IDC_STATIC,199,7,92,73
RTEXT "Run at priority:",IDC_MINIMIZED_PRI,207,18,45,10,SS_CENTERIMAGE | WS_TABSTOP
COMBOBOX IDC_MINIMIZED_PRIORITY,207,30,76,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
CONTROL "Pause emulation",IDC_MINIMIZED_PAUSE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,207,50,69,10
STYLE DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD
FONT 8, "MS Sans Serif", 0, 0, 0x1
BEGIN
- GROUPBOX "Emulated hardware",IDC_QUICKSTART_CONFIG,3,0,294,54
+ GROUPBOX "Emulated Hardware",IDC_QUICKSTART_CONFIG,3,0,294,54
RTEXT "Model:",IDC_STATIC,5,14,56,10,SS_CENTERIMAGE
COMBOBOX IDC_QUICKSTART_MODEL,65,12,225,50,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
RTEXT "Configuration:",IDC_STATIC,5,33,56,10,SS_CENTERIMAGE
COMBOBOX IDC_QUICKSTART_CONFIGURATION,65,31,225,50,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
- GROUPBOX "Compatibility vs required CPU power ",IDC_QUICKSTART_COMPA,3,56,294,33
+ GROUPBOX "Compatibility vs Required CPU Power ",IDC_QUICKSTART_COMPA,3,56,294,33
RTEXT "Best compatibility",IDC_STATIC,13,70,67,10,SS_CENTERIMAGE
CONTROL "",IDC_QUICKSTART_COMPATIBILITY,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,88,65,115,21
RTEXT "Low compatibility",IDC_STATIC,215,70,63,10,SS_CENTERIMAGE
GROUPBOX "Host configuration",IDC_QUICKSTART_HOST,3,91,294,33
RTEXT "Configuration:",IDC_STATIC,5,105,55,10,SS_CENTERIMAGE
COMBOBOX IDC_QUICKSTART_HOSTCONFIG,65,103,225,50,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
- GROUPBOX "Emulated floppy drives",IDC_QUICKSTART_DF,3,126,294,84
+ GROUPBOX "Emulated Floppy Drives",IDC_QUICKSTART_DF,3,126,294,84
LTEXT "Floppy drive DF0:",IDC_STATIC,10,138,56,10,SS_CENTERIMAGE
PUSHBUTTON "Select disk image",IDC_DF0QQ,77,135,98,15
RTEXT "Write-protected",IDC_STATIC,180,139,58,10,SS_CENTERIMAGE
//
IDB_XARCADE BITMAP "xarcade-winuae.bmp"
+IDB_LCD160X43 BITMAP "lcd.bmp"
/////////////////////////////////////////////////////////////////////////////
//
if (DSCaps.dwFlags & DSCAPS_CONTINUOUSRATE) {
int minfreq = DSCaps.dwMinSecondarySampleRate;
int maxfreq = DSCaps.dwMaxSecondarySampleRate;
- if (minfreq > freq) {
+ if (minfreq > freq && freq < 22050) {
freq = minfreq;
changed_prefs.sound_freq = currprefs.sound_freq = freq;
write_log("SOUND: minimum supported frequency: %d\n", minfreq);
}
- if (maxfreq < freq) {
+ if (maxfreq < freq && freq > 44100) {
freq = maxfreq;
changed_prefs.sound_freq = currprefs.sound_freq = freq;
write_log("SOUND: maximum supported frequency: %d\n", maxfreq);
while (strlen (p) > 0 && (p[strlen (p) - 1] == '\\' || p[strlen (p) - 1] == '/'))
p[strlen (p) - 1] = 0;
}
+static void fixtrailing(char *p)
+{
+ if (strlen(p) == 0)
+ return;
+ if (p[strlen(p) - 1] == '/' || p[strlen(p) - 1] == '\\')
+ return;
+ strcat(p, "\\");
+}
void fetch_path (char *name, char *out, int size)
{
if (v == INVALID_FILE_ATTRIBUTES || !(v & FILE_ATTRIBUTE_DIRECTORY))
strcpy (out, start_path_data);
}
- strncat (out, "\\", size);
+ fixtrailing (out);
}
void set_path (char *name, char *path)
{
strcat (tmp, "..\\shared\\rom");
}
}
- strcat (tmp, "\\");
+ fixtrailing (tmp);
if (hWinUAEKey)
RegSetValueEx (hWinUAEKey, name, 0, REG_SZ, (CONST BYTE *)tmp, strlen (tmp) + 1);
SHGETFOLDERPATH pSHGetFolderPath;
SHGETSPECIALFOLDERPATH pSHGetSpecialFolderPath;
char *posn, *p;
- char tmp[MAX_DPATH], prevpath[MAX_DPATH];
+ char tmp[MAX_DPATH], tmp2[MAX_DPATH], prevpath[MAX_DPATH];
DWORD v;
HKEY key;
DWORD dispo;
pSHGetSpecialFolderPath = (SHGETSPECIALFOLDERPATH)GetProcAddress(
GetModuleHandle("shell32.dll"), "SHGetSpecialFolderPathA");
strcpy (start_path_exe, _pgmptr );
- if((posn = strrchr (start_path_exe, '\\')))
+ if((posn = strrchr (start_path_exe, '\\')))
posn[1] = 0;
strcpy (tmp, start_path_exe);
}
p = getenv("AMIGAFOREVERDATA");
- if (p) {
+ if (p && 0) {
strcpy (tmp, p);
+ fixtrailing(tmp);
strcpy (start_path_af, p);
+ fixtrailing(start_path_af);
v = GetFileAttributes(tmp);
if (v != INVALID_FILE_ATTRIBUTES && (v & FILE_ATTRIBUTE_DIRECTORY)) {
if (start_data == 0) {
else if (pSHGetSpecialFolderPath)
ok = pSHGetSpecialFolderPath(NULL, tmp, CSIDL_COMMON_DOCUMENTS, 0);
if (ok) {
- strcpy (start_path_af, tmp);
- strcat (start_path_af, "\\Amiga Files\\");
- strcpy (tmp, start_path_af);
+ fixtrailing(tmp);
+ strcpy (tmp2, tmp);
+ strcat (tmp2, "Amiga Files\\");
+ strcpy (tmp, tmp2);
strcat(tmp, "WinUAE");
v = GetFileAttributes(tmp);
if (v != INVALID_FILE_ATTRIBUTES && (v & FILE_ATTRIBUTE_DIRECTORY)) {
if (start_data == 0) {
if (path_done == 0) {
+ strcpy (start_path_af, tmp2);
strcpy (start_path_data, start_path_af);
strcat (start_path_data, "WinUAE");
path_done = 1;
if (v == INVALID_FILE_ATTRIBUTES || !(v & FILE_ATTRIBUTE_DIRECTORY) || start_data <= 0)
strcpy(start_path_data, start_path_exe);
- if (strlen(start_path_data) > 0) {
- p = start_path_data + strlen(start_path_data) - 1;
- if (p[0] != '\\' && p[0] != '/')
- strcat(start_path_data, "\\");
- }
+ fixtrailing(start_path_data);
}
#endif
#ifdef PARALLEL_PORT
paraport_mask = paraport_init ();
-#endif
-#ifdef LOGITECHLCD
- lcd_open();
#endif
real_main (argc, argv);
}
-#ifdef LOGITECHLCD
- lcd_close();
-#endif
if (mm_timerres && timermode == 0)
timeend ();
#ifdef AVIOUTPUT
extern int mouseactive, focus;
extern int ignore_messages_all;
#define WINUAEBETA 1
-#define WINUAEBETASTR " Beta 1"
+#define WINUAEBETASTR " Beta 2"
extern char start_path_exe[MAX_DPATH];
extern char start_path_data[MAX_DPATH];
#include "avioutput.h"
#include "gfxfilter.h"
#include "parser.h"
+#include "lcd.h"
#define AMIGA_WIDTH_MAX 736
#define AMIGA_HEIGHT_MAX 568
picasso_on = 0;
screen_is_picasso = 0;
memset (currentmode, 0, sizeof (*currentmode));
+#ifdef LOGITECHLCD
+ lcd_open();
+#endif
+}
+
+void machdep_free (void)
+{
+#ifdef LOGITECHLCD
+ lcd_close();
+#endif
}
int graphics_init (void)
<Tool
Name="VCLinkerTool"
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 winio.lib setupapi.lib wininet.lib capsimg.lib dxerr8.lib shlwapi.lib zlibstat.lib lglcd.lib"
+ 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 lglcd.lib"
ShowProgress="0"
OutputFile="d:\amiga\winuae.exe"
LinkIncremental="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 winio.lib setupapi.lib wininet.lib dxerr8.lib shlwapi.lib zlibstat.lib lglcd.lib"
+ 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 lglcd.lib"
OutputFile="d:\amiga\winuae.exe"
LinkIncremental="1"
SuppressStartupBanner="true"
RelativePath="..\resources\joystick.ico"
>
</File>
+ <File
+ RelativePath="..\resources\lcd.bmp"
+ >
+ </File>
<File
RelativePath="..\resources\misc.ico"
>
Name="rips"
>
<File
- RelativePath="..\..\prowizard\rips\ac1d.c"
- >
- </File>
- <File
- RelativePath="..\..\prowizard\rips\ambk.c"
- >
- </File>
- <File
- RelativePath="..\..\prowizard\rips\bp.c"
- >
- </File>
- <File
- RelativePath="..\..\prowizard\rips\bsifc.c"
- >
- </File>
- <File
- RelativePath="..\..\prowizard\rips\bytek30.c"
- >
- </File>
- <File
- RelativePath="..\..\prowizard\rips\bytekil.c"
- >
- </File>
- <File
- RelativePath="..\..\prowizard\rips\bytekp10.c"
- >
- </File>
- <File
- RelativePath="..\..\prowizard\rips\crmaddr.c"
- >
- </File>
- <File
- RelativePath="..\..\prowizard\rips\dblatn.c"
- >
- </File>
- <File
- RelativePath="..\..\prowizard\rips\defjam32.c"
- >
- </File>
- <File
- RelativePath="..\..\prowizard\rips\di.c"
- >
- </File>
- <File
- RelativePath="..\..\prowizard\rips\digibst.c"
- >
- </File>
- <File
- RelativePath="..\..\prowizard\rips\eureka.c"
- >
- </File>
- <File
- RelativePath="..\..\prowizard\rips\fc13.c"
- >
- </File>
- <File
- RelativePath="..\..\prowizard\rips\fc14.c"
- >
- </File>
- <File
- RelativePath="..\..\prowizard\rips\fc_m.c"
- >
- </File>
- <File
- RelativePath="..\..\prowizard\rips\fuchs.c"
- >
- </File>
- <File
- RelativePath="..\..\prowizard\rips\fuzzac.c"
- >
- </File>
- <File
- RelativePath="..\..\prowizard\rips\gmc.c"
- >
- </File>
- <File
- RelativePath="..\..\prowizard\rips\gnpl.c"
- >
- </File>
- <File
- RelativePath="..\..\prowizard\rips\gpmo.c"
- >
- </File>
- <File
- RelativePath="..\..\prowizard\rips\heatseek.c"
- >
- </File>
- <File
- RelativePath="..\..\prowizard\rips\hqc2.c"
- >
- </File>
- <File
- RelativePath="..\..\prowizard\rips\hrt.c"
- >
- </File>
- <File
- RelativePath="..\..\prowizard\rips\jamcrack.c"
- >
- </File>
- <File
- RelativePath="..\..\prowizard\rips\kris.c"
- >
- </File>
- <File
- RelativePath="..\..\prowizard\rips\ksm.c"
- >
- </File>
- <File
- RelativePath="..\..\prowizard\rips\maxpac12.c"
- >
- </File>
- <File
- RelativePath="..\..\prowizard\rips\mc30addr.c"
- >
- </File>
- <File
- RelativePath="..\..\prowizard\rips\mcobj.c"
- >
- </File>
- <File
- RelativePath="..\..\prowizard\rips\mcrun.c"
- >
- </File>
- <File
- RelativePath="..\..\prowizard\rips\med.c"
- >
- </File>
- <File
- RelativePath="..\..\prowizard\rips\mp.c"
- >
- </File>
- <File
- RelativePath="..\..\prowizard\rips\newtron.c"
- >
- </File>
- <File
- RelativePath="..\..\prowizard\rips\nfh.c"
- >
- </File>
- <File
- RelativePath="..\..\prowizard\rips\noiserun.c"
- >
- </File>
- <File
- RelativePath="..\..\prowizard\rips\npd1.c"
- >
- </File>
- <File
- RelativePath="..\..\prowizard\rips\npd2.c"
- >
- </File>
- <File
- RelativePath="..\..\prowizard\rips\npd3.c"
- >
- </File>
- <File
- RelativePath="..\..\prowizard\rips\p22a.c"
- >
- </File>
- <File
- RelativePath="..\..\prowizard\rips\p30a.c"
- >
- </File>
- <File
- RelativePath="..\..\prowizard\rips\p40a.c"
- >
- </File>
- <File
- RelativePath="..\..\prowizard\rips\p40b.c"
+ RelativePath="..\..\prowizard\rippers\AC1D_packer.c"
>
</File>
<File
- RelativePath="..\..\prowizard\rips\p41a.c"
+ RelativePath="..\..\prowizard\rippers\AMOS-MusicBank.c"
>
</File>
<File
- RelativePath="..\..\prowizard\rips\p50a.c"
+ RelativePath="..\..\prowizard\rippers\AMOS-PowerPackerBank.c"
>
</File>
<File
- RelativePath="..\..\prowizard\rips\p60a.c"
+ RelativePath="..\..\prowizard\rippers\BP-Soundmonitor.c"
>
</File>
<File
- RelativePath="..\..\prowizard\rips\p61a.c"
+ RelativePath="..\..\prowizard\rippers\BSI-FutureComposer.c"
>
</File>
<File
- RelativePath="..\..\prowizard\rips\pha.c"
+ RelativePath="..\..\prowizard\rippers\Bytekiller.c"
>
</File>
<File
- RelativePath="..\..\prowizard\rips\pm.c"
+ RelativePath="..\..\prowizard\rippers\ChipTracker.c"
>
</File>
<File
- RelativePath="..\..\prowizard\rips\pm01.c"
+ RelativePath="..\..\prowizard\rippers\Crunchmania-Address.c"
>
</File>
<File
- RelativePath="..\..\prowizard\rips\pm10c.c"
+ RelativePath="..\..\prowizard\rippers\datacrunchers.c"
>
</File>
<File
- RelativePath="..\..\prowizard\rips\pm18a.c"
+ RelativePath="..\..\prowizard\rippers\DefjamCruncher32-pro.c"
>
</File>
<File
- RelativePath="..\..\prowizard\rips\pm20.c"
+ RelativePath="..\..\prowizard\rippers\DigiBooster17.c"
>
</File>
<File
- RelativePath="..\..\prowizard\rips\pm40.c"
+ RelativePath="..\..\prowizard\rippers\DigitalIllusion.c"
>
</File>
<File
- RelativePath="..\..\prowizard\rips\polka.c"
+ RelativePath="..\..\prowizard\rippers\DoubleAction.c"
>
</File>
<File
- RelativePath="..\..\prowizard\rips\powerp23.c"
+ RelativePath="..\..\prowizard\rippers\Dragpack100.c"
>
</File>
<File
- RelativePath="..\..\prowizard\rips\powerp30.c"
+ RelativePath="..\..\prowizard\rippers\Dragpack252.c"
>
</File>
<File
- RelativePath="..\..\prowizard\rips\powerp40.c"
+ RelativePath="..\..\prowizard\rippers\EurekaPacker.c"
>
</File>
<File
- RelativePath="..\..\prowizard\rips\powerp4l.c"
+ RelativePath="..\..\prowizard\rippers\FastTracker2.c"
>
</File>
<File
- RelativePath="..\..\prowizard\rips\pp10.c"
+ RelativePath="..\..\prowizard\rippers\FC-M-Packer.c"
>
</File>
<File
- RelativePath="..\..\prowizard\rips\pp21.c"
+ RelativePath="..\..\prowizard\rippers\FuchsTracker.c"
>
</File>
<File
- RelativePath="..\..\prowizard\rips\pp30.c"
+ RelativePath="..\..\prowizard\rippers\FutureComposer13.c"
>
</File>
<File
- RelativePath="..\..\prowizard\rips\ppbk.c"
+ RelativePath="..\..\prowizard\rippers\FutureComposer14.c"
>
</File>
<File
- RelativePath="..\..\prowizard\rips\prun1.c"
+ RelativePath="..\..\prowizard\rippers\FuzzacPacker.c"
>
</File>
<File
- RelativePath="..\..\prowizard\rips\prun2.c"
+ RelativePath="..\..\prowizard\rippers\GameMusicCreator.c"
>
</File>
<File
- RelativePath="..\..\prowizard\rips\ptk.c"
+ RelativePath="..\..\prowizard\rippers\GnuPlayer.c"
>
</File>
<File
- RelativePath="..\..\prowizard\rips\qc.c"
+ RelativePath="..\..\prowizard\rippers\GPMO.c"
>
</File>
<File
- RelativePath="..\..\prowizard\rips\relokit.c"
+ RelativePath="..\..\prowizard\rippers\HeatseekerMC10.c"
>
</File>
<File
- RelativePath="..\..\prowizard\rips\skyt.c"
+ RelativePath="..\..\prowizard\rippers\HornetPacker.c"
>
</File>
<File
- RelativePath="..\..\prowizard\rips\soundfx.c"
+ RelativePath="..\..\prowizard\rippers\HQC2.c"
>
</File>
<File
- RelativePath="..\..\prowizard\rips\soundtk.c"
+ RelativePath="..\..\prowizard\rippers\JamCracker.c"
>
</File>
<File
- RelativePath="..\..\prowizard\rips\spike.c"
+ RelativePath="..\..\prowizard\rippers\KefrensSoundMachine.c"
>
</File>
<File
- RelativePath="..\..\prowizard\rips\starpack.c"
+ RelativePath="..\..\prowizard\rippers\MasterCruncher30-Address.c"
>
</File>
<File
- RelativePath="..\..\prowizard\rips\startrek.c"
+ RelativePath="..\..\prowizard\rippers\MaxPacker12.c"
>
</File>
<File
- RelativePath="..\..\prowizard\rips\stc270.c"
+ RelativePath="..\..\prowizard\rippers\MED-Octamed.c"
>
</File>
<File
- RelativePath="..\..\prowizard\rips\stc299.c"
+ RelativePath="..\..\prowizard\rippers\MegaCruncher-Object.c"
>
</File>
<File
- RelativePath="..\..\prowizard\rips\stc299b.c"
+ RelativePath="..\..\prowizard\rippers\MegaCruncher.c"
>
</File>
<File
- RelativePath="..\..\prowizard\rips\stc299d.c"
+ RelativePath="..\..\prowizard\rippers\MOD-compatible.c"
>
</File>
<File
- RelativePath="..\..\prowizard\rips\stc300.c"
+ RelativePath="..\..\prowizard\rippers\ModuleProtector.c"
>
</File>
<File
- RelativePath="..\..\prowizard\rips\stc310.c"
+ RelativePath="..\..\prowizard\rippers\Newtron.c"
>
</File>
<File
- RelativePath="..\..\prowizard\rips\stim.c"
+ RelativePath="..\..\prowizard\rippers\NoiseFromHeaven.c"
>
</File>
<File
- RelativePath="..\..\prowizard\rips\stk26.c"
+ RelativePath="..\..\prowizard\rippers\NoisePacker1.c"
>
</File>
<File
- RelativePath="..\..\prowizard\rips\superc27.c"
+ RelativePath="..\..\prowizard\rippers\NoisePacker2.c"
>
</File>
<File
- RelativePath="..\..\prowizard\rips\syncro.c"
+ RelativePath="..\..\prowizard\rippers\NoisePacker3.c"
>
</File>
<File
- RelativePath="..\..\prowizard\rips\tdd.c"
+ RelativePath="..\..\prowizard\rippers\NoiseRunner.c"
>
</File>
<File
- RelativePath="..\..\prowizard\rips\time17.c"
+ RelativePath="..\..\prowizard\rippers\PhaPacker.c"
>
</File>
<File
- RelativePath="..\..\prowizard\rips\tnmc11.c"
+ RelativePath="..\..\prowizard\rippers\PolkaPacker.c"
>
</File>
<File
- RelativePath="..\..\prowizard\rips\tp1.c"
- >
- </File>
- <File
- RelativePath="..\..\prowizard\rips\tp2.c"
- >
- </File>
- <File
- RelativePath="..\..\prowizard\rips\tp3.c"
- >
- </File>
- <File
- RelativePath="..\..\prowizard\rips\tpack102.c"
- >
- </File>
- <File
- RelativePath="..\..\prowizard\rips\tpack21.c"
- >
- </File>
- <File
- RelativePath="..\..\prowizard\rips\tpack22.c"
- >
- </File>
- <File
- RelativePath="..\..\prowizard\rips\tryit101.c"
- >
- </File>
- <File
- RelativePath="..\..\prowizard\rips\turbosqueezer61.c"
- >
- </File>
- <File
- RelativePath="..\..\prowizard\rips\unic.c"
- >
- </File>
- <File
- RelativePath="..\..\prowizard\rips\unic2.c"
- >
- </File>
- <File
- RelativePath="..\..\prowizard\rips\wn.c"
- >
- </File>
- <File
- RelativePath="..\..\prowizard\rips\xann.c"
- >
- </File>
- <File
- RelativePath="..\..\prowizard\rips\xm.c"
- >
- </File>
- <File
- RelativePath="..\..\prowizard\rips\zen.c"
- >
- </File>
- </Filter>
- <Filter
- Name="tests"
- >
- <File
- RelativePath="..\..\prowizard\tests\ac1d.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\prowizard\tests\ambk.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\prowizard\tests\arcd.c"
- >
- </File>
- <File
- RelativePath="..\..\prowizard\tests\bp.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\prowizard\tests\bsifc.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\prowizard\tests\bytek13.c"
- >
- </File>
- <File
- RelativePath="..\..\prowizard\tests\bytek20.c"
- >
- </File>
- <File
- RelativePath="..\..\prowizard\tests\bytek30.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\prowizard\tests\bytekp10.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\prowizard\tests\crmaddr.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\prowizard\tests\crnd.c"
- >
- </File>
- <File
- RelativePath="..\..\prowizard\tests\dblatn.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\prowizard\tests\defja32p.c"
- >
- </File>
- <File
- RelativePath="..\..\prowizard\tests\defjam32.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\prowizard\tests\di.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\prowizard\tests\digibst.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\prowizard\tests\eureka.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\prowizard\tests\fc13.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\prowizard\tests\fc14.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\prowizard\tests\fc_m.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\prowizard\tests\fuchs.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\prowizard\tests\fuzzac.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\prowizard\tests\gmc.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\prowizard\tests\gnpl.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\prowizard\tests\gpmo.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\prowizard\tests\heatseek.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\prowizard\tests\hqc2.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\prowizard\tests\hrt.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\prowizard\tests\jamcrack.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\prowizard\tests\kris.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\prowizard\tests\ksm.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\prowizard\tests\maxpac12.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\prowizard\tests\mc30addr.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\prowizard\tests\mcobj.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\prowizard\tests\mcrun10.c"
- >
- </File>
- <File
- RelativePath="..\..\prowizard\tests\mcrun12.c"
- >
- </File>
- <File
- RelativePath="..\..\prowizard\tests\mmd0.c"
- >
- </File>
- <File
- RelativePath="..\..\prowizard\tests\mp.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\prowizard\tests\newtron.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\prowizard\tests\nfh.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\prowizard\tests\noiserun.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\prowizard\tests\npd1.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\prowizard\tests\npd2.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\prowizard\tests\npd3.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\prowizard\tests\p40a.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\prowizard\tests\p41a.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\prowizard\tests\p50a.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\prowizard\tests\p60a.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\prowizard\tests\p61a.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\prowizard\tests\pha.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\prowizard\tests\pm.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\prowizard\tests\pm01.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\prowizard\tests\pm10c.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\prowizard\tests\pm20.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\prowizard\tests\pm40.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\prowizard\tests\pmz.c"
- >
- </File>
- <File
- RelativePath="..\..\prowizard\tests\polka.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\prowizard\tests\powerp23.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\prowizard\tests\powerp30.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\prowizard\tests\powerp40.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\prowizard\tests\powerp4l.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\prowizard\tests\pp10.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\prowizard\tests\pp21.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\prowizard\tests\pp30.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\prowizard\tests\ppbk.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\prowizard\tests\prun1.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\prowizard\tests\prun2.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\prowizard\tests\ptk.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\prowizard\tests\qc.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\prowizard\tests\relokit.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\prowizard\tests\skyt.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\prowizard\tests\soundfx.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\prowizard\tests\soundtk.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\prowizard\tests\spike.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\prowizard\tests\starpack.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\prowizard\tests\stc270.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\prowizard\tests\stc299.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\prowizard\tests\stc299b.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\prowizard\tests\stc299d.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\prowizard\tests\stc300.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\prowizard\tests\stc310.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\prowizard\tests\stim.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\prowizard\tests\stk26.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\prowizard\tests\superc27.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\prowizard\tests\syncro.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\prowizard\tests\tdd.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\prowizard\tests\time17.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\prowizard\tests\tnmc11.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\prowizard\tests\tp1.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\prowizard\tests\tp2.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\prowizard\tests\tp3.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\prowizard\tests\tpack102.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\prowizard\tests\tpack21.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\prowizard\tests\tpack22.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\prowizard\tests\tryit101.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\prowizard\tests\turbosqueezer61.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\prowizard\tests\unic.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\prowizard\tests\unic2.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\prowizard\tests\wn.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\prowizard\tests\xann.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\prowizard\tests\xm.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\prowizard\tests\zen.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- </File>
- </Filter>
- <Filter
- Name="depack"
- >
- <File
- RelativePath="..\..\prowizard\depack\ac1d.c"
+ RelativePath="..\..\prowizard\rippers\PowerMusic.c"
>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
</File>
<File
- RelativePath="..\..\prowizard\depack\ambk.c"
+ RelativePath="..\..\prowizard\rippers\PowerPacker23.c"
>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
</File>
<File
- RelativePath="..\..\prowizard\depack\di.c"
+ RelativePath="..\..\prowizard\rippers\PowerPacker30.c"
>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
</File>
<File
- RelativePath="..\..\prowizard\depack\eureka.c"
+ RelativePath="..\..\prowizard\rippers\PowerPacker40-library.c"
>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
</File>
<File
- RelativePath="..\..\prowizard\depack\fc-m.c"
+ RelativePath="..\..\prowizard\rippers\PowerPacker40.c"
>
</File>
<File
- RelativePath="..\..\prowizard\depack\fuchs.c"
+ RelativePath="..\..\prowizard\rippers\Promizer01.c"
>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
</File>
<File
- RelativePath="..\..\prowizard\depack\fuzzac.c"
+ RelativePath="..\..\prowizard\rippers\Promizer10c.c"
>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
</File>
<File
- RelativePath="..\..\prowizard\depack\gmc.c"
+ RelativePath="..\..\prowizard\rippers\Promizer18a.c"
>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
</File>
<File
- RelativePath="..\..\prowizard\depack\gnpl.c"
+ RelativePath="..\..\prowizard\rippers\Promizer20.c"
>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
</File>
<File
- RelativePath="..\..\prowizard\depack\gpmo.c"
+ RelativePath="..\..\prowizard\rippers\Promizer40.c"
>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
</File>
<File
- RelativePath="..\..\prowizard\depack\heatseek.c"
+ RelativePath="..\..\prowizard\rippers\ProPacker10.c"
>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
</File>
<File
- RelativePath="..\..\prowizard\depack\hrt.c"
+ RelativePath="..\..\prowizard\rippers\ProPacker21.c"
>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
</File>
<File
- RelativePath="..\..\prowizard\depack\kris.c"
+ RelativePath="..\..\prowizard\rippers\ProPacker30.c"
>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
</File>
<File
- RelativePath="..\..\prowizard\depack\ksm.c"
+ RelativePath="..\..\prowizard\rippers\Prorunner10.c"
>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
</File>
<File
- RelativePath="..\..\prowizard\depack\mp.c"
+ RelativePath="..\..\prowizard\rippers\Prorunner20.c"
>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
</File>
<File
- RelativePath="..\..\prowizard\depack\newtron.c"
+ RelativePath="..\..\prowizard\rippers\QuadraComposer.c"
>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
</File>
<File
- RelativePath="..\..\prowizard\depack\nfh.c"
+ RelativePath="..\..\prowizard\rippers\RelokIt10.c"
>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
</File>
<File
- RelativePath="..\..\prowizard\depack\noiserun.c"
+ RelativePath="..\..\prowizard\rippers\SkytPacker.c"
>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
</File>
<File
- RelativePath="..\..\prowizard\depack\np1.c"
+ RelativePath="..\..\prowizard\rippers\SoundFX.c"
>
</File>
<File
- RelativePath="..\..\prowizard\depack\np2.c"
+ RelativePath="..\..\prowizard\rippers\SoundTracker.c"
>
</File>
<File
- RelativePath="..\..\prowizard\depack\np3.c"
+ RelativePath="..\..\prowizard\rippers\SoundTracker26.c"
>
</File>
<File
- RelativePath="..\..\prowizard\depack\p22a.c"
+ RelativePath="..\..\prowizard\rippers\SpikeCruncher.c"
>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
</File>
<File
- RelativePath="..\..\prowizard\depack\p30a.c"
+ RelativePath="..\..\prowizard\rippers\StartrekkerPack.c"
>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
</File>
<File
- RelativePath="..\..\prowizard\depack\p40.c"
+ RelativePath="..\..\prowizard\rippers\StimPacker.c"
>
</File>
<File
- RelativePath="..\..\prowizard\depack\p41a.c"
+ RelativePath="..\..\prowizard\rippers\StoneCracker270.c"
>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
</File>
<File
- RelativePath="..\..\prowizard\depack\p50a.c"
+ RelativePath="..\..\prowizard\rippers\StoneCracker299.c"
>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
</File>
<File
- RelativePath="..\..\prowizard\depack\p60a.c"
+ RelativePath="..\..\prowizard\rippers\StoneCracker299b.c"
>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
</File>
<File
- RelativePath="..\..\prowizard\depack\p61a.c"
+ RelativePath="..\..\prowizard\rippers\StoneCracker299d.c"
>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
</File>
<File
- RelativePath="..\..\prowizard\depack\pha.c"
+ RelativePath="..\..\prowizard\rippers\StoneCracker300.c"
>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
</File>
<File
- RelativePath="..\..\prowizard\depack\pm.c"
+ RelativePath="..\..\prowizard\rippers\StoneCracker310.c"
>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
</File>
<File
- RelativePath="..\..\prowizard\depack\pm01.c"
+ RelativePath="..\..\prowizard\rippers\SuperCruncher27.c"
>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
</File>
<File
- RelativePath="..\..\prowizard\depack\pm10c.c"
+ RelativePath="..\..\prowizard\rippers\SyncroPacker46.c"
>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
</File>
<File
- RelativePath="..\..\prowizard\depack\pm18a.c"
+ RelativePath="..\..\prowizard\rippers\TetraPack102.c"
>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)1.obj"
- />
- </FileConfiguration>
</File>
<File
- RelativePath="..\..\prowizard\depack\pm20.c"
+ RelativePath="..\..\prowizard\rippers\TetraPack21.c"
>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
</File>
<File
- RelativePath="..\..\prowizard\depack\pm40.c"
+ RelativePath="..\..\prowizard\rippers\TetraPack22.c"
>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
</File>
<File
- RelativePath="..\..\prowizard\depack\polka.c"
+ RelativePath="..\..\prowizard\rippers\TheDarkDemon.c"
>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
</File>
<File
- RelativePath="..\..\prowizard\depack\pp10.c"
+ RelativePath="..\..\prowizard\rippers\ThePlayer22a.c"
>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
</File>
<File
- RelativePath="..\..\prowizard\depack\pp21.c"
+ RelativePath="..\..\prowizard\rippers\ThePlayer30a.c"
>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
</File>
<File
- RelativePath="..\..\prowizard\depack\pp30.c"
+ RelativePath="..\..\prowizard\rippers\ThePlayer40.c"
>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
</File>
<File
- RelativePath="..\..\prowizard\depack\prun1.c"
+ RelativePath="..\..\prowizard\rippers\ThePlayer41a.c"
>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
</File>
<File
- RelativePath="..\..\prowizard\depack\prun2.c"
+ RelativePath="..\..\prowizard\rippers\ThePlayer50a.c"
>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
</File>
<File
- RelativePath="..\..\prowizard\depack\qc.c"
+ RelativePath="..\..\prowizard\rippers\ThePlayer60a.c"
>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
</File>
<File
- RelativePath="..\..\prowizard\depack\skyt.c"
+ RelativePath="..\..\prowizard\rippers\ThePlayer61a.c"
>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
</File>
<File
- RelativePath="..\..\prowizard\depack\soundfx.c"
+ RelativePath="..\..\prowizard\rippers\TimeCruncher17.c"
>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
</File>
<File
- RelativePath="..\..\prowizard\depack\starpack.c"
+ RelativePath="..\..\prowizard\rippers\TMK.c"
>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
</File>
<File
- RelativePath="..\..\prowizard\depack\stim.c"
+ RelativePath="..\..\prowizard\rippers\TNMCruncher.c"
>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
</File>
<File
- RelativePath="..\..\prowizard\depack\stk26.c"
+ RelativePath="..\..\prowizard\rippers\TrackerPacker1.c"
>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
</File>
<File
- RelativePath="..\..\prowizard\depack\tdd.c"
+ RelativePath="..\..\prowizard\rippers\TrackerPacker2.c"
>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
</File>
<File
- RelativePath="..\..\prowizard\depack\tp1.c"
+ RelativePath="..\..\prowizard\rippers\TrackerPacker3.c"
>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
</File>
<File
- RelativePath="..\..\prowizard\depack\tp2.c"
+ RelativePath="..\..\prowizard\rippers\TryItCruncher101.c"
>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
</File>
<File
- RelativePath="..\..\prowizard\depack\tp3.c"
+ RelativePath="..\..\prowizard\rippers\TurboSqueezer61.c"
>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
</File>
<File
- RelativePath="..\..\prowizard\depack\unic.c"
+ RelativePath="..\..\prowizard\rippers\UnicTracker.c"
>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)3.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)3.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)3.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)3.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)3.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)3.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)3.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)3.obj"
- />
- </FileConfiguration>
</File>
<File
- RelativePath="..\..\prowizard\depack\unic2.c"
+ RelativePath="..\..\prowizard\rippers\UnicTracker2.c"
>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
</File>
<File
- RelativePath="..\..\prowizard\depack\wn.c"
+ RelativePath="..\..\prowizard\rippers\WantonPacker.c"
>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
</File>
<File
- RelativePath="..\..\prowizard\depack\xann.c"
+ RelativePath="..\..\prowizard\rippers\XannPlayer.c"
>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
</File>
<File
- RelativePath="..\..\prowizard\depack\zen.c"
+ RelativePath="..\..\prowizard\rippers\ZenPacker.c"
>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestRelease|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug64|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- ObjectFile="$(IntDir)/$(InputName)2.obj"
- />
- </FileConfiguration>
</File>
</Filter>
</Filter>
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 :).
+The ripped formats are mainly amiga formats. I'm beginning to add a few
+other from the Atari ST, now.
Note
----
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.
+ MS-DOS/WIN* binary are compiled by friends when spare time comes up.
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.
+At this stage, I still can't 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 !.
"I wanted to do it myself" is the main motivation :).
+Compiling
+---------
+
+ A simple 'make' should do the trick.
+ Now, if you want a version that contains only the music files (WinUAE ?),
+edit the 'makefile' and remove the '-DINCLUDEALL'. then 'make simple' will
+compile only the needed files.
+ Sounds like bad work on the makefile, but I wasn't able to make it any
+simplier. Sorry.
+
Credits
-------
Sylvain "Asle" Chipaux
asle@free.fr
-Port under *nix:
+Initial port under *nix:
Michael Doering
mldoering@gmx.net
And various bug reports:
look in CREDITS file
+There's a web page here : http://asle.free.fr/prowiz
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.
# #
# #
# #
-# 1997-2003 (c) Sylvain "asle" Chipaux #
+# 1997-2004 (c) Sylvain "asle" Chipaux #
# #
###############################################################################
#
# 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.
+# Also, this file must be is the current directory. If not, the
+# default extension will be used.
#
-# NOTE: at now, there should be 116 extensions.
+# NOTE: at now, there should be 126 extensions.
#
###############################################################################
#
##120 : Noise from Heaven
NoiseFromHeaven
#
+##121 : TMK
+tmk
+#
+##122 : DragPack 2.52
+DragPack252
+#
+##123 : DragPack 1.00
+DragPack100
+#
+##124 : Speed Packer 3 (Atari ST)
+SPv3
+#
+##125 : Atomik Packer (ATOM or ATM3) (Atari ST)
+AtomikPackerData
+#
+##126 : Automation Packer 5.* (Atari ST)
+AutomationPackerData
+#
###############################################################################
###############################################################################
\ No newline at end of file
your help was valuable !.
Markus Jaegermeister for pointing out bugs too, and for providing
- invaluable information regarding "exotic formats" !.
+ valuable information regarding "exotic formats" !.
Laurent Clévy for numerous synth descriptions !.
-Known formats
+Known formats (not updated !)
-------------
Note: The order is alphabetically arranged with the extensions.
| EXT | NAME OF THE FORMAT | CPU | DETECTION | SIZE CALC |
|=======|====================================|=====|===========|============|
+| (22A) |The Player 2.2A |Amiga| easy | some job |
+|-------|------------------------------------|-----|-----------|------------|
+| (33A) |The Player 3.3A |Amiga| easy | some job |
+|-------|------------------------------------|-----|-----------|------------|
| (40A) |The Player 4.0A |Amiga| easy | some job |
|-------|------------------------------------|-----|-----------|------------|
| (40B) |The Player 4.0B |Amiga| easy | some job |
| (ZEN) |Zen Packer |Amiga| some job |child's play|
|-------|------------------------------------|-----|-----------|------------|
- * that's 58 formats now :)
+ * that's 60 formats now :)
there, now some Synthetic ...
| (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|
+| (STC) |StoneCracker 2.99(d/b)/3.10/3.00 (exe) |Amiga| easy |Child's play|
|-------|---------------------------------------|-----|-----------|------------|
| (SP ) |Syncro Packer 4.6 (exe) |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 !.
+ about 59 formats recognized now !.
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.
+ And here is another release. Long time since the last :(. Anyway, as
+promised, I put this version online in the hope it will behave correctly
+everywhere .. feedback plz !.
here are some things one ought to know about possible 'failure' of
Pro-Wizard-1 (for PeeCee) ... meaning this prog might overlook or mistake
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
+ answer my old email (thx man !) and sent me a thorough 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
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
+ One word about the packed data files ... . I've included these format
+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 packed EXE. Yet, I still
dont know how to depack this by myself. Extracting that way saves hours of
Hex-work .. at least for me :).
- Snail mail (new !!)
Chipaux "asle" Sylvain
- 55 rue des grands champs
- 75020 Paris
+ 19 rue censier, esc C
+ 75005 Paris
France
- E-Mail
- WWW
http://asle.free.fr/prowiz/
- there's always the latest src version on there
+ there's always the latest released src version on there
- Tel
none at now
-
+
Last word
- Adding the whole lot of other ptk-compatible formats I still dont have
decrunched yet :(.
- -> Pygmy packer
+ -> Pygmy packer (probably will never make it)
-> AMOS music bank (what a mess !)
-> an alien XANN packer ? (found in an old Silents intro :)
+ -> The Player 3.3
- Adding some PC music format (S3M ...)
CHANGE LOG
----------
-Date format is DDMMYYYY. (from lattest to first)
-
+#date format is DDMMYYYY. (from lattest to first)
+02102005 Version 1.60
+
+ Merged test(),rip() and pack() into one file for all formats. Now in rippers/.
+ Renamed Noise From Heaven #2 to Noise From Heaven. All three musicdisk are packed samely.
+ Removed a few printf() that were hidden here and there :)
+ Trashed all the #ifdef DOS and used a -I in the makefile instead (Thanks Laurent Clevy)
+
+16052005 Version 1.52
+
+ Fixed DragPack 2.52 size calculation routine and removed the rebuiling (help !)
+
+15052005 Version 1.51
+
+ Added some checks for the file opening.
+ Mostly some cleaning/reshaping.
+
+11072004 Version 1.50
+
+ Some cleaning because other project wish to used PW4PC (namely WinUAE)
+ Removed SQ/SP/SF data cruncher due to too many fakes files found.
+ New supported (PTK clones) format :
+ - TMK packer (found in a few Eremation demos)
+ not sure I'm compliant with Deliplayer on this one :(.
+ New supported (exe/data)format :
+ - DragPack 2.52 - with rebuilding
+ - DragPack 1.00 is on the way (some trouble with the rebuilding)
+ - Speed Packer 3 (Atari ST) (kindly sent by Mike Mee (thx!))
+ - Atomik Packer (Atari ST) (on sheer description sent by Mike Mee (thx!))
+ - Automation Packer 5.* (Atari ST) (on sheer description sent by Mike Mee (thx!))
+
24112003 Version 1.50.b3
More Double Action v1.0 to be found
# Makefile for Pro-Wizard 1 (for PeeCee)
-# copyright 1997-2003 Sylvain "asle" Chipaux
+# copyright 1997-2005 Sylvain "asle" Chipaux
+#
+# add -DINCLUDEALL in the '.c.o' case for a compilation with the binaries rippers
+# and type 'make' or 'make prowiz'
+#
+# 'make simple' to compile w/o binaries rippers.
-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
+CFLAGS = -O6 -Wall -mpentiumpro -I/usr/local/include \
+ -Wshadow -Wcast-align -Wstrict-prototypes \
+ -Wmissing-prototypes -Wredundant-decls -Wnested-externs
-#
+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 \
+OFILESWOPACKER = prowiz.o \
+ rippers/AC1D_packer.o rippers/AMOS-MusicBank.o rippers/BP-Soundmonitor.o rippers/BSI-FutureComposer.o rippers/ChipTracker.o rippers/DigiBooster17.o rippers/DigitalIllusion.o rippers/EurekaPacker.o rippers/FC-M-Packer.o rippers/FastTracker2.o rippers/FuchsTracker.o rippers/FutureComposer13.o rippers/FutureComposer14.o rippers/FuzzacPacker.o rippers/GPMO.o rippers/GameMusicCreator.o rippers/GnuPlayer.o rippers/HeatseekerMC10.o rippers/HornetPacker.o rippers/JamCracker.o rippers/KefrensSoundMachine.o rippers/MED-Octamed.o rippers/MOD-compatible.o rippers/ModuleProtector.o rippers/Newtron.o rippers/NoiseFromHeaven.o rippers/NoisePacker1.o rippers/NoisePacker2.o rippers/NoisePacker3.o rippers/NoiseRunner.o rippers/PhaPacker.o rippers/PolkaPacker.o rippers/PowerMusic.o rippers/ProPacker10.o rippers/ProPacker21.o rippers/ProPacker30.o rippers/Promizer01.o rippers/Promizer10c.o rippers/Promizer18a.o rippers/Promizer20.o rippers/Promizer40.o rippers/Prorunner10.o rippers/Prorunner20.o rippers/QuadraComposer.o rippers/SkytPacker.o rippers/SoundFX.o rippers/SoundTracker.o rippers/SoundTracker26.o rippers/StartrekkerPack.o rippers/StimPacker.o rippers/TMK.o rippers/TheDarkDemon.o rippers/ThePlayer22a.o rippers/ThePlayer30a.o rippers/ThePlayer40.o rippers/ThePlayer41a.o rippers/ThePlayer50a.o rippers/ThePlayer60a.o rippers/ThePlayer61a.o rippers/TrackerPacker1.o rippers/TrackerPacker2.o rippers/TrackerPacker3.o rippers/UnicTracker.o rippers/UnicTracker2.o rippers/WantonPacker.o rippers/XannPlayer.o rippers/ZenPacker.o \
+ misc/misc.o misc/testbag.o
+OFILESALL = prowiz.o \
+ rippers/AC1D_packer.o rippers/AMOS-MusicBank.o rippers/BP-Soundmonitor.o rippers/BSI-FutureComposer.o rippers/ChipTracker.o rippers/DigiBooster17.o rippers/DigitalIllusion.o rippers/EurekaPacker.o rippers/FC-M-Packer.o rippers/FastTracker2.o rippers/FuchsTracker.o rippers/FutureComposer13.o rippers/FutureComposer14.o rippers/FuzzacPacker.o rippers/GPMO.o rippers/GameMusicCreator.o rippers/GnuPlayer.o rippers/HeatseekerMC10.o rippers/HornetPacker.o rippers/JamCracker.o rippers/KefrensSoundMachine.o rippers/MED-Octamed.o rippers/MOD-compatible.o rippers/ModuleProtector.o rippers/Newtron.o rippers/NoiseFromHeaven.o rippers/NoisePacker1.o rippers/NoisePacker2.o rippers/NoisePacker3.o rippers/NoiseRunner.o rippers/PhaPacker.o rippers/PolkaPacker.o rippers/PowerMusic.o rippers/ProPacker10.o rippers/ProPacker21.o rippers/ProPacker30.o rippers/Promizer01.o rippers/Promizer10c.o rippers/Promizer18a.o rippers/Promizer20.o rippers/Promizer40.o rippers/Prorunner10.o rippers/Prorunner20.o rippers/QuadraComposer.o rippers/SkytPacker.o rippers/SoundFX.o rippers/SoundTracker.o rippers/SoundTracker26.o rippers/StartrekkerPack.o rippers/StimPacker.o rippers/TMK.o rippers/TheDarkDemon.o rippers/ThePlayer22a.o rippers/ThePlayer30a.o rippers/ThePlayer40.o rippers/ThePlayer41a.o rippers/ThePlayer50a.o rippers/ThePlayer60a.o rippers/ThePlayer61a.o rippers/TrackerPacker1.o rippers/TrackerPacker2.o rippers/TrackerPacker3.o rippers/UnicTracker.o rippers/UnicTracker2.o rippers/WantonPacker.o rippers/XannPlayer.o rippers/ZenPacker.o \
+ rippers/AMOS-PowerPackerBank.o rippers/Bytekiller.o rippers/Crunchmania-Address.o rippers/DefjamCruncher32-pro.o rippers/DoubleAction.o rippers/Dragpack100.o rippers/Dragpack252.o rippers/HQC2.o rippers/MasterCruncher30-Address.o rippers/MaxPacker12.o rippers/MegaCruncher-Object.o rippers/MegaCruncher.o rippers/PowerPacker23.o rippers/PowerPacker30.o rippers/PowerPacker40-library.o rippers/PowerPacker40.o rippers/RelokIt10.o rippers/SpikeCruncher.o rippers/StoneCracker270.o rippers/StoneCracker299.o rippers/StoneCracker299b.o rippers/StoneCracker299d.o rippers/StoneCracker300.o rippers/StoneCracker310.o rippers/SuperCruncher27.o rippers/SyncroPacker46.o rippers/TNMCruncher.o rippers/TetraPack102.o rippers/TetraPack21.o rippers/TetraPack22.o rippers/TimeCruncher17.o rippers/TryItCruncher101.o rippers/TurboSqueezer61.o rippers/datacrunchers.o \
misc/misc.o misc/testbag.o
EXEFILE = prowiz.exe
+# add -DINCLUDEALL here for a compilation with the binaries rippers
.c.o:
- $(CC) -DUNIX $(CFLAGS) -c $< -o $@
+ $(CC) -DUNIX -DINCLUDEALL $(CFLAGS) -c $< -o $@
+
+all: prowiz
+
+simple: prowiz_wo_packer
+
+prowiz: $(OFILESALL)
+ $(CC) -o $(EXEFILE) -L/usr/local/lib -ldmalloc $(OFILESALL)
-prowiz: $(OFILES)
- $(CC) -o $(EXEFILE) -L/usr/local/lib -ldmalloc $(OFILES)
+prowiz_wo_packer: $(OFILESWOPACKER)
+ $(CC) -o $(EXEFILE) -L/usr/local/lib -ldmalloc $(OFILESWOPACKER)
#
clean: clear
rm -f *.o
- rm -f tests/*.o
- rm -f rips/*.o
- rm -f depack/*.o
+ rm -f rippers/*.o
rm -f misc/*.o
rm -f core *.core
#
clear:
- rm -f *~ *.*~ tests/*~ tests/*.*~ rips/*~ rips/*.*~ misc/*~ misc/*.*~ include/*~ include/*.*~ depack/*~ depack/*.*~ *.i *.s
+ rm -f *~ *.*~ rippers/*~ rippers/*.*~ misc/*~ misc/*.*~ include/*~ include/*.*~ *.i *.s
# Makefile for Pro-Wizard 1 (for PeeCee)
-# copyright 1997-2002 Sylvain "asle" Chipaux
+# copyright 1997-2005 Sylvain "asle" Chipaux
# Amiga port (05/2002)
-CFLAGS = -Wall -m68020 -IGNU:include
+CFLAGS = -Wall -m68020 -IGNU:include -Iinclude
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 \
+OFILES = prowiz.o \
+ rippers/AC1D_packer.o rippers/AMOS-MusicBank.o rippers/BP-Soundmonitor.o rippers/BSI-FutureComposer.o rippers/ChipTracker.o rippers/DigiBooster17.o rippers/DigitalIllusion.o rippers/EurekaPacker.o rippers/FC-M-Packer.o rippers/FastTracker2.o rippers/FuchsTracker.o rippers/FutureComposer13.o rippers/FutureComposer14.o rippers/FuzzacPacker.o rippers/GPMO.o rippers/GameMusicCreator.o rippers/GnuPlayer.o rippers/HeatseekerMC10.o rippers/HornetPacker.o rippers/JamCracker.o rippers/KefrensSoundMachine.o rippers/MED-Octamed.o rippers/MOD-compatible.o rippers/ModuleProtector.o rippers/Newtron.o rippers/NoiseFromHeaven.o rippers/NoisePacker1.o rippers/NoisePacker2.o rippers/NoisePacker3.o rippers/NoiseRunner.o rippers/PhaPacker.o rippers/PolkaPacker.o rippers/PowerMusic.o rippers/ProPacker10.o rippers/ProPacker21.o rippers/ProPacker30.o rippers/Promizer01.o rippers/Promizer10c.o rippers/Promizer18a.o rippers/Promizer20.o rippers/Promizer40.o rippers/Prorunner10.o rippers/Prorunner20.o rippers/QuadraComposer.o rippers/SkytPacker.o rippers/SoundFX.o rippers/SoundTracker.o rippers/SoundTracker26.o rippers/StartrekkerPack.o rippers/StimPacker.o rippers/TMK.o rippers/TheDarkDemon.o rippers/ThePlayer22a.o rippers/ThePlayer30a.o rippers/ThePlayer40.o rippers/ThePlayer41a.o rippers/ThePlayer50a.o rippers/ThePlayer60a.o rippers/ThePlayer61a.o rippers/TrackerPacker1.o rippers/TrackerPacker2.o rippers/TrackerPacker3.o rippers/UnicTracker.o rippers/UnicTracker2.o rippers/WantonPacker.o rippers/XannPlayer.o rippers/ZenPacker.o \
+ rippers/AMOS-PowerPackerBank.o rippers/Bytekiller.o rippers/Crunchmania-Address.o rippers/DefjamCruncher32-pro.o rippers/DoubleAction.o rippers/Dragpack100.o rippers/Dragpack252.o rippers/HQC2.o rippers/MasterCruncher30-Address.o rippers/MaxPacker12.o rippers/MegaCruncher-Object.o rippers/MegaCruncher.o rippers/PowerPacker23.o rippers/PowerPacker30.o rippers/PowerPacker40-library.o rippers/PowerPacker40.o rippers/RelokIt10.o rippers/SpikeCruncher.o rippers/StoneCracker270.o rippers/StoneCracker299.o rippers/StoneCracker299b.o rippers/StoneCracker299d.o rippers/StoneCracker300.o rippers/StoneCracker310.o rippers/SuperCruncher27.o rippers/SyncroPacker46.o rippers/TNMCruncher.o rippers/TetraPack102.o rippers/TetraPack21.o rippers/TetraPack22.o rippers/TimeCruncher17.o rippers/TryItCruncher101.o rippers/TurboSqueezer61.o rippers/datacrunchers.o \
misc/misc.o misc/testbag.o
EXEFILE = prowiz.exe
#
clean: clear
rm -f *.o
- rm -f tests/*.o
- rm -f rips/*.o
- rm -f depack/*.o
+ rm -f rippers/*.o
rm -f misc/*.o
rm -f core *.core
#
clear:
- rm -f *~ *.*~ tests/*~ tests/*.*~ rips/*~ rips/*.*~ misc/*~ misc/*.*~ include/*~ include/*.*~ depack/*~ depack/*.*~
+ rm -f *~ *.*~ rippers/*~ rippers/*.*~ misc/*~ misc/*.*~ include/*~ include/*.*~
# Makefile for Pro-Wizard 1 (for PeeCee)
-# copyright 1997-2003 Sylvain "asle" Chipaux
+# copyright 1997-2005 Sylvain "asle" Chipaux
# Fixed for MinGWin32 by Xigh !... Thx
-CFLAGS = -O6 -Wall -march=pentiumpro
+CFLAGS = -O6 -Wall -march=pentiumpro -Iinclude
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 \
+OFILESWOPACKER = prowiz.o \
+ rippers/AC1D_packer.o rippers/AMOS-MusicBank.o rippers/BP-Soundmonitor.o rippers/BSI-FutureComposer.o rippers/ChipTracker.o rippers/DigiBooster17.o rippers/DigitalIllusion.o rippers/EurekaPacker.o rippers/FC-M-Packer.o rippers/FastTracker2.o rippers/FuchsTracker.o rippers/FutureComposer13.o rippers/FutureComposer14.o rippers/FuzzacPacker.o rippers/GPMO.o rippers/GameMusicCreator.o rippers/GnuPlayer.o rippers/HeatseekerMC10.o rippers/HornetPacker.o rippers/JamCracker.o rippers/KefrensSoundMachine.o rippers/MED-Octamed.o rippers/MOD-compatible.o rippers/ModuleProtector.o rippers/Newtron.o rippers/NoiseFromHeaven.o rippers/NoisePacker1.o rippers/NoisePacker2.o rippers/NoisePacker3.o rippers/NoiseRunner.o rippers/PhaPacker.o rippers/PolkaPacker.o rippers/PowerMusic.o rippers/ProPacker10.o rippers/ProPacker21.o rippers/ProPacker30.o rippers/Promizer01.o rippers/Promizer10c.o rippers/Promizer18a.o rippers/Promizer20.o rippers/Promizer40.o rippers/Prorunner10.o rippers/Prorunner20.o rippers/QuadraComposer.o rippers/SkytPacker.o rippers/SoundFX.o rippers/SoundTracker.o rippers/SoundTracker26.o rippers/StartrekkerPack.o rippers/StimPacker.o rippers/TMK.o rippers/TheDarkDemon.o rippers/ThePlayer22a.o rippers/ThePlayer30a.o rippers/ThePlayer40.o rippers/ThePlayer41a.o rippers/ThePlayer50a.o rippers/ThePlayer60a.o rippers/ThePlayer61a.o rippers/TrackerPacker1.o rippers/TrackerPacker2.o rippers/TrackerPacker3.o rippers/UnicTracker.o rippers/UnicTracker2.o rippers/WantonPacker.o rippers/XannPlayer.o rippers/ZenPacker.o \
+ misc/misc.o misc/testbag.o
+OFILESALL = prowiz.o \
+ rippers/AC1D_packer.o rippers/AMOS-MusicBank.o rippers/BP-Soundmonitor.o rippers/BSI-FutureComposer.o rippers/ChipTracker.o rippers/DigiBooster17.o rippers/DigitalIllusion.o rippers/EurekaPacker.o rippers/FC-M-Packer.o rippers/FastTracker2.o rippers/FuchsTracker.o rippers/FutureComposer13.o rippers/FutureComposer14.o rippers/FuzzacPacker.o rippers/GPMO.o rippers/GameMusicCreator.o rippers/GnuPlayer.o rippers/HeatseekerMC10.o rippers/HornetPacker.o rippers/JamCracker.o rippers/KefrensSoundMachine.o rippers/MED-Octamed.o rippers/MOD-compatible.o rippers/ModuleProtector.o rippers/Newtron.o rippers/NoiseFromHeaven.o rippers/NoisePacker1.o rippers/NoisePacker2.o rippers/NoisePacker3.o rippers/NoiseRunner.o rippers/PhaPacker.o rippers/PolkaPacker.o rippers/PowerMusic.o rippers/ProPacker10.o rippers/ProPacker21.o rippers/ProPacker30.o rippers/Promizer01.o rippers/Promizer10c.o rippers/Promizer18a.o rippers/Promizer20.o rippers/Promizer40.o rippers/Prorunner10.o rippers/Prorunner20.o rippers/QuadraComposer.o rippers/SkytPacker.o rippers/SoundFX.o rippers/SoundTracker.o rippers/SoundTracker26.o rippers/StartrekkerPack.o rippers/StimPacker.o rippers/TMK.o rippers/TheDarkDemon.o rippers/ThePlayer22a.o rippers/ThePlayer30a.o rippers/ThePlayer40.o rippers/ThePlayer41a.o rippers/ThePlayer50a.o rippers/ThePlayer60a.o rippers/ThePlayer61a.o rippers/TrackerPacker1.o rippers/TrackerPacker2.o rippers/TrackerPacker3.o rippers/UnicTracker.o rippers/UnicTracker2.o rippers/WantonPacker.o rippers/XannPlayer.o rippers/ZenPacker.o \
+ rippers/AMOS-PowerPackerBank.o rippers/Bytekiller.o rippers/Crunchmania-Address.o rippers/DefjamCruncher32-pro.o rippers/DoubleAction.o rippers/Dragpack100.o rippers/Dragpack252.o rippers/HQC2.o rippers/MasterCruncher30-Address.o rippers/MaxPacker12.o rippers/MegaCruncher-Object.o rippers/MegaCruncher.o rippers/PowerPacker23.o rippers/PowerPacker30.o rippers/PowerPacker40-library.o rippers/PowerPacker40.o rippers/RelokIt10.o rippers/SpikeCruncher.o rippers/StoneCracker270.o rippers/StoneCracker299.o rippers/StoneCracker299b.o rippers/StoneCracker299d.o rippers/StoneCracker300.o rippers/StoneCracker310.o rippers/SuperCruncher27.o rippers/SyncroPacker46.o rippers/TNMCruncher.o rippers/TetraPack102.o rippers/TetraPack21.o rippers/TetraPack22.o rippers/TimeCruncher17.o rippers/TryItCruncher101.o rippers/TurboSqueezer61.o rippers/datacrunchers.o \
misc/misc.o misc/testbag.o
EXEFILE = prowiz.exe
+# add -DINCLUDEALL here for a compilation with the binaries rippers
.c.o:
$(CC) -DDOS $(CFLAGS) -c $< -o $@
#
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 rippers\*.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 rippers\*~"
+ -CMD /c "DEL /F /Q rippers\*.*~"
-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\*.*~"
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
+#include "../rippers/globals.h"
+#include "../rippers/extern.h"
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
+extern void write_log (const char *, ...);
/*
* at now, when this fonction is called, no global var has been used ...
types_file = fopen ( _TYPES_FILENAME , "rb" );
if ( types_file == NULL )
{
- printf ( "!!! couldn't find \"%s\" file !. Default extension used.\n"
+ write_log ( "!!! couldn't find \"%s\" file !. Default extension used.\n"
, _TYPES_FILENAME );
Support_Types_FileDefault ();
return;
continue;
if ( sizeof ( read_line ) < 2 )
{
- printf ( "!!! Damaged \"%s\" file at non-commented line %ld\n"
+ write_log ( "!!! Damaged \"%s\" file at non-commented line %ld\n"
, _TYPES_FILENAME , PW_i+1 );
PW_i = 99999l;
break;
Extensions[PW_i][cpt] = read_line[cpt];
cpt += 1;
}
- /*printf ( "[%ld]%ld:%s," , PW_i,ftell (types_file),read_line );*/
+ /*write_log ( "[%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"
+ write_log ( "!!! Damaged \"%s\" file. Missing up %ld extensions definitions\n"
, _TYPES_FILENAME , _KNOWN_FORMATS-(PW_i+1));
Support_Types_FileDefault ();
return;
strcpy ( Extensions[117], "ThePlayer30a" );
strcpy ( Extensions[118], "ThePlayer22a" );
strcpy ( Extensions[119], "NoiseFromHeaven" );
- strcpy ( Extensions[120], "---" );
+ strcpy ( Extensions[120], "TMK" );
+ strcpy ( Extensions[121], "DragPack252" );
+ strcpy ( Extensions[122], "DragPack100" );
+ strcpy ( Extensions[123], "SPv3" );
+ strcpy ( Extensions[124], "AtomikPackerData" );
+ strcpy ( Extensions[125], "---" );
}
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 );
+ write_log ( "%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"
+ write_log ( "!!! 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 );
+ write_log ( " saving in file \"%s\" ... " , OutName_final );
Cpt_Filename += 1;
- PW_out = mr2_fopen ( OutName_final , "w+b", format_to_save);
+ PW_out = moduleripper2_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" );
+ write_log ( "done\n" );
if ( CONVERT == GOOD )
{
- printf ( " converting to Protracker ... " );
+ write_log ( " converting to Protracker ... " );
}
fflush ( stdout );
Save_Status = GOOD;
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 );
+ write_log ( "%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"
+ write_log ( "!!! 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 );
+ write_log ( " saving in file \"%s\" ... " , OutName_final );
Cpt_Filename += 1;
- PW_out = mr2_fopen ( OutName_final , "w+b", format_to_save );
+ PW_out = moduleripper2_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" );
+ write_log ( "done\n" );
if ( CONVERT == GOOD )
{
- printf ( " converting to Protracker ... " );
+ write_log ( " converting to Protracker ... " );
}
- printf ( " Header of this file was missing and has been rebuilt !\n" );
+ write_log ( " Header of this file was missing and has been rebuilt !\n" );
+ if ( FMT_EXT == DragPack252)
+ write_log ( " WARNING !: it's a fake header since in this case !!\n" );
fflush ( stdout );
Amiga_EXE_Header = GOOD;
Save_Status = GOOD;
}
}
-
/*
* Special version of Test() for cruncher data (Ice! etc...)
* only one file and not hundreds ...
/* e.g. addressing of unassigned data */
if ( ( (long)PW_i + Pack_addy ) > PW_in_size )
{
-/*printf ( "#0\n" );*/
+/*write_log ( "#0\n" );*/
return BAD;
}
if ( (PW_k <= 2) || (PW_l <= 2) )
{
-/*printf ( "#1\n" );*/
+/*write_log ( "#1\n" );*/
return BAD;
}
if ( PW_l > 0x989680 ) /* 10 mb */
{
-/*printf ( "#2\n" );*/
+/*write_log ( "#2\n" );*/
return BAD;
}
if ( PW_k <= PW_l )
{
-/*printf ( "#3\n" );*/
+/*write_log ( "#3\n" );*/
return BAD;
}
if ( PW_k > 0x989689 ) /* 10 Megs ! */
{
-/*printf ( "#4\n" );*/
+/*write_log ( "#4\n" );*/
return BAD;
}
return GOOD;
}
+
+
/*
* Special version of Rip() for cruncher data (Ice! etc...)
* only one file and not hundreds ...
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 );*/
+ /* write_log ( "\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];*/
}
+
/* yet again on Xigh's suggestion. How to handle 'correctly' a file size */
-long GetFileSizeX (char *infile)
+long GetFileSizeX (char * infile)
{
long i;
struct stat *Stat;
free ( Stat );
return i;
}
+
+#if 0
+/* Same as fopen() but saves a lot of tests, done only here. */
+/* Done to check if the output file could be created */
+FILE * PW_fopen (char *filename, char *fopenargs)
+{
+ FILE *local_out;
+ local_out = fopen (filename, fopenargs);
+ if (local_out == NULL)
+ {
+ write_log ("!!couldn't create the file \"%s\"!\nexiting...",filename);
+ exit (-1);
+ }
+ return local_out;
+}
+#endif
+FILE * PW_fopen (char *filename, char *fopenargs)
+{
+ return moduleripper_fopen (filename, fopenargs);
+}
+
+/* fills a var with all the pitch for PTK */
+/* doing a function instead of a lot of includes ...*/
+void fillPTKtable (Uchar poss[37][2])
+{
+ 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;
+ return;
+}
-#ifdef DOS
-#include "..\include\globals.h"
-#include "..\include\extern.h"
-#endif
+#include "globals.h"
+#include "extern.h"
-#ifdef UNIX
-#include "../include/globals.h"
-#include "../include/extern.h"
-#endif
/*
* group of tests funcs that are common to most of test\*.c files
/*
* Pro-Wizard_1.c
*
- * 1997-2003 (c) Sylvain "Asle" Chipaux
+ * 1997-2005 (c) Sylvain "Asle" Chipaux
*
*/
#ifdef UNIX
+#include "rippers/globals.h"
+#include "rippers/extern.h"
+#include "rippers/vars.h"
+#if 0
#include "include/globals.h"
#include "include/extern.h"
#include "include/vars.h"
#endif
-
-#ifdef DMALLOC
-#include "dmalloc.h"
#endif
+#if 0
+int main ( int ac , char **av )
+#else
int prowizard_search (Uchar *in_data_p, int PW_in_size_p)
+#endif
{
Support_Types ();
in_data = in_data_p;
PW_in_size = PW_in_size_p;
+
+#if 0
+ printf ( "\n\n-<([ Pro-Wizard v1.6 ])>-\n\n" );
+
+ 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 */
+ Support_Types ();
+ /*printf ( "%x,%x,%x\n" , Extensions[70][0], Extensions[70][1], Extensions[70][2] );*/
+
+ /* get input file size */
+ PW_in_size = GetFileSizeX (av[1]);
+ fseek ( PW_in , 0 , 0 ); /* probably useless */
+ 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 );
+#endif
+
/********************************************************************/
/************************** SEARCH ******************************/
/********************************************************************/
continue;
}
}
+#ifdef INCLUDEALL
/* 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) )
+ ((in_data[PW_i+3] == 0x08) ||
+ (in_data[PW_i+3] == 0x0A)))
{
if ( testSpecialCruncherData ( 8, 4 ) != BAD )
{
continue;
}
}
+#endif
+ /* "[1-9]CHN" FastTracker v1 */
+ if ( ((in_data[PW_i] == '1') ||
+ (in_data[PW_i] == '2') ||
+ (in_data[PW_i] == '3') ||
+ (in_data[PW_i] == '4') ||
+ (in_data[PW_i] == '5') ||
+ (in_data[PW_i] == '6') ||
+ (in_data[PW_i] == '7') ||
+ (in_data[PW_i] == '8') ||
+ (in_data[PW_i] == '9'))&&
+ (in_data[PW_i+1] == 'C') &&
+ (in_data[PW_i+2] == 'H') &&
+ (in_data[PW_i+3] == 'N') )
+ {
+ if ( testMOD(in_data[PW_i]-0x30) != BAD )
+ {
+ Rip_MOD (in_data[PW_i]-0x30);
+ continue;
+ }
+ }
+ /* "[10-32]CH" FastTracker v1/v2 */
+ if ( ((((in_data[PW_i] == '1') || (in_data[PW_i] == '2')) &&
+ ((in_data[PW_i+1] == '0') ||
+ (in_data[PW_i+1] == '1') ||
+ (in_data[PW_i+1] == '2') ||
+ (in_data[PW_i+1] == '3') ||
+ (in_data[PW_i+1] == '4') ||
+ (in_data[PW_i+1] == '5') ||
+ (in_data[PW_i+1] == '6') ||
+ (in_data[PW_i+1] == '7') ||
+ (in_data[PW_i+1] == '8') ||
+ (in_data[PW_i+1] == '9'))) ||
+ ((in_data[PW_i] == '3') &&
+ ((in_data[PW_i+1] == '0') ||
+ (in_data[PW_i+1] == '1')))) &&
+ (in_data[PW_i+2] == 'C') &&
+ (in_data[PW_i+3] == 'H') )
+ {
+ if ( testMOD((in_data[PW_i]-0x30)*10+in_data[PW_i+1]-0x30) != BAD )
+ {
+ Rip_MOD ((in_data[PW_i]-0x30)*10+in_data[PW_i+1]-0x30);
+ continue;
+ }
+ }
+#ifdef INCLUDEALL
/* =SB= data cruncher */
if ( (in_data[PW_i] == 0x3D) &&
(in_data[PW_i+1] == 'S') &&
Rip_MaxPacker12 ();
continue;
}
+#endif
/* XANN packer */
if ( in_data[PW_i] == 0x3c )
/* 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 );
+ write_log ( "\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 (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 );
+ write_log ( "\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;
switch ( in_data[PW_i] )
{
case 'A': /* ATN! another Imploder case */
+#ifdef INCLUDEALL
if ( (in_data[PW_i+1] == 'T') &&
(in_data[PW_i+2] == 'N') &&
(in_data[PW_i+3] == '!') )
Rip_SpecialCruncherData ( "Imploder data" , 50 , IMP );
break;
}
+#endif
/* AMOS Music bank "AmBk" */
if ( (in_data[PW_i+1] == 'm') &&
(in_data[PW_i+2] == 'B') &&
Depack_AmBk();
break;
}
+#ifdef INCLUDEALL
/* Time Cruncher 1.7 */
if ( (in_data[PW_i+1] == 0xFA) &&
(in_data[PW_i+2] == 0x01) &&
Rip_SpecialCruncherData ( "IAM Packer 1.0 (ATM5) data" , 12 , ICE );
break;
}
+ /* ATOM - Atomik Packer (Atari ST) */
+ if ( (in_data[PW_i+1] == 'T') &&
+ (in_data[PW_i+2] == 'O') &&
+ (in_data[PW_i+3] == 'M') )
+ {
+ if ( testSpecialCruncherData ( 8, 4 ) == BAD )
+ break;
+ Rip_SpecialCruncherData ( "Atomik Packer (ATOM) data" , 12 , AtomikPackerData );
+ break;
+ }
+ /* ATM3 - Atomik Packer (Atari ST) */
+ if ( (in_data[PW_i+1] == 'T') &&
+ (in_data[PW_i+2] == 'M') &&
+ (in_data[PW_i+3] == '3') )
+ {
+ if ( testSpecialCruncherData ( 8, 4 ) == BAD )
+ break;
+ Rip_SpecialCruncherData ( "Atomik Packer (ATOM) data" , 12 , AtomikPackerData );
+ break;
+ }
+ /* "AU5!" - Automation Packer 5.* (Atari ST) */
+ if ( (in_data[PW_i+1] == 'U') &&
+ (in_data[PW_i+2] == '5') &&
+ (in_data[PW_i+3] == '!') )
+ {
+ if ( testSpecialCruncherData ( 4, 8 ) == BAD )
+ break;
+ Rip_SpecialCruncherData ( "Automation Packer v5.01 (data)" , 0 , AutomationPackerData );
+ break;
+ }
/* Syncro Packer 4.6 */
if ( (in_data[PW_i+1] == 0xFA ) &&
(in_data[PW_i+2] == 0x01 ) &&
Rip_SpecialCruncherData ( "(Ace?) Data Cruncher" , 0 , ACECruncherData );
break;
}
+#endif
break;
case 'B': /* BTB6 */
+#ifdef INCLUDEALL
/* ByteKiller 1.3 (exepack) */
if ( (in_data[PW_i+1] == 'T') &&
(in_data[PW_i+2] == 'B') &&
}
break;
}
+#endif
/* "BeEp" Jam Cracker */
if ( (in_data[PW_i+1] == 'e') &&
(in_data[PW_i+2] == 'E') &&
Depack_TP3 ();
break;
}
+#ifdef INCLUDEALL
/* CrM2 | Crm2 | CrM! */
if ( ((in_data[PW_i+1] == 'r') &&
(in_data[PW_i+2] == 'M') &&
Rip_Defjam32 ();
break;
}
- break;
+#endif
break;
case 'D': /* 0x44 */
Depack_QuadraComposer ();
break;
}
- /* "Extended Module" : ID of Quadra Composer */
+ /* "Extended Module" : ID of FastTracker 2 XM */
if ( (in_data[PW_i+1] == 'x') &&
(in_data[PW_i+2] == 't') &&
(in_data[PW_i+3] == 'e') &&
(in_data[PW_i+2] == 'T') &&
(in_data[PW_i+3] == '4') )
{
- if ( testPTK() == BAD )
+ if ( testMOD(4) == BAD )
break;
- Rip_StarTrekker ();
+ Rip_MOD (4);
break;
}
/* "FC14" : Future Composer 1.4 */
Rip_BSIFutureComposer ();
break;
}
- /* "Fuck" : ID of Noise From Heaven #2 chiptunes */
+ /* "Fuck" : ID of Noise From Heaven chiptunes */
if ( (in_data[PW_i+1] == 'u') &&
(in_data[PW_i+2] == 'c') &&
(in_data[PW_i+3] == 'k') )
Depack_NFH ();
break;
}
+#ifdef INCLUDEALL
/* FIRE (RNC clone) Cruncher */
if ( (in_data[PW_i+1] == 'I') &&
(in_data[PW_i+2] == 'R') &&
Rip_SpecialCruncherData ( "FIRE (RNC Clone) data Cruncher" , 0 , FIRE );
break;
}
+#endif
break;
case 'G': /* 0x47 */
+#ifdef INCLUDEALL
/* Mega Cruncher 1.0 */
if ( (in_data[PW_i+1] == 0xFA ) &&
(in_data[PW_i+2] == 0x01 ) &&
}
break;
}
-
+#endif
/* GPMO (crunch player ?)*/
if ( (in_data[PW_i+1] == 'P') &&
(in_data[PW_i+2] == 'M') &&
break;
}
+#ifdef INCLUDEALL
/* Master Cruncher 3.0 Address */
if ( (in_data[PW_i+1] == 0xE7) &&
(in_data[PW_i+2] == 0xFF) &&
Rip_TurboSqueezer61 ();
break;
}
+
+ /* DragPack 2.52 */
+ if ( (in_data[PW_i+1] == 0x7A) &&
+ (in_data[PW_i+2] == 0x00) &&
+ (in_data[PW_i+3] == 0x46) &&
+ (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] == 0xEE) &&
+ (in_data[PW_i+12] == 0x28) &&
+ (in_data[PW_i+13] == 0xFC) &&
+ (in_data[PW_i+14] == 0x00) &&
+ (in_data[PW_i+15] == 0x00) )
+ {
+ if ( testDragpack252() == BAD )
+ break;
+ Rip_Dragpack252 ();
+ break;
+ }
+ /* DragPack 1.00 */
+ 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] == 0xF9) &&
+ (in_data[PW_i+6] == 0x00) &&
+ (in_data[PW_i+7] == 0x00) &&
+ (in_data[PW_i+8] == 0x00) &&
+ (in_data[PW_i+9] == 0x00) &&
+ (in_data[PW_i+10] == 0x43) &&
+ (in_data[PW_i+11] == 0xF9) &&
+ (in_data[PW_i+12] == 0x00) &&
+ (in_data[PW_i+13] == 0x00) &&
+ (in_data[PW_i+14] == 0x00) &&
+ (in_data[PW_i+15] == 0x00) )
+ {
+ if ( testDragpack100() == BAD )
+ break;
+ Rip_Dragpack100 ();
+ break;
+ }
+#endif
break;
case 'I': /* 0x48 */
+#ifdef INCLUDEALL
/* "ICE!" : ID of IAM packer 1.0 */
if ( (in_data[PW_i+1] == 'C') &&
(in_data[PW_i+2] == 'E') &&
Rip_SpecialCruncherData ( "Imploder data" , 50 , IMP );
break;
}
-
+#endif
if ( (in_data[PW_i+1] == 'T') &&
(in_data[PW_i+2] == '1') &&
(in_data[PW_i+3] == '0') )
Depack_KRIS ();
break;
}
+#ifdef INCLUDEALL
/* Try-It Cruncher 1.01 */
if ( (in_data[PW_i+1] == 0xFA) &&
(in_data[PW_i+2] == 0x01) &&
Rip_TryIt101 ();
break;
}
+#endif
break;
case 'M': /* 0x4D */
(in_data[PW_i+3] == '.') )
{
/* protracker ? */
- if ( testPTK() != BAD )
+ if ( testMOD(4) != BAD )
{
- Rip_PTK ();
+ Rip_MOD(4);
break;
}
Rip_MMD0 ();
}
+#ifdef INCLUDEALL
/* Defjam Cruncher 3.2 pro */
if ( (in_data[PW_i+1] == 0xF9 ) &&
(in_data[PW_i+2] == 0x00 ) &&
break;
}
}
+#endif
break;
case 'P': /* 0x50 */
+#ifdef INCLUDEALL
/* "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 );
+ write_log ( "PowerPacker ID (PP20) found at %ld ... cant rip it!\n" , PW_i );
break;
}
-
+#endif
/* "P30A" : ID of The Player */
if ( (in_data[PW_i+1] == '3') &&
(in_data[PW_i+2] == '0') &&
break;
}
+#ifdef INCLUDEALL
/* "PPbk" : ID of AMOS PowerPacker Bank */
if ( (in_data[PW_i+1] == 'P') &&
(in_data[PW_i+2] == 'b') &&
Rip_SpecialCruncherData ( "Master Cruncher 3.0 data" , 8 , MasterCruncher3data );
break;
}
-
+#endif
/* POLKA Packer */
if ( ((in_data[PW_i+1] == 'W') &&
(in_data[PW_i+2] == 'R') &&
break;
case 'R': /* RNC */
+#ifdef INCLUDEALL
if ( (in_data[PW_i+1] == 'N') &&
(in_data[PW_i+2] == 'C') )
{
Rip_SpecialCruncherData ( "RLE Data Cruncher" , 11 , RLE );
break;
}
+#endif
break;
case 'S': /* 0x53 */
break;
}
+#ifdef INCLUDEALL
/* S404 StoneCracker 4.04 data */
if ( (in_data[PW_i+1] == '4') &&
(in_data[PW_i+2] == '0') &&
}
/* SF data cruncher */
- if ( (in_data[PW_i+1] == 'F') )
+ /*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 ( (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 ( (in_data[PW_i+1] == 'P') )
{
if ( testSpecialCruncherData ( 8, 4 ) == BAD )
break;
Rip_SpecialCruncherData ( "SP Data Cruncher" , 12 , SP );
break;
- }
-
+ }*/
+#endif
/* STIM Slamtilt */
if ( (in_data[PW_i+1] == 'T') &&
(in_data[PW_i+2] == 'I') &&
}
}
+#ifdef INCLUDEALL
+ /* SPv3 - Speed Packer 3 (Atari ST) */
+ if ( (in_data[PW_i+1] == 'P') &&
+ (in_data[PW_i+2] == 'v') &&
+ (in_data[PW_i+3] == '3') )
+ {
+ if ( testSpecialCruncherData ( 8, 12 ) == BAD )
+ break;
+ Rip_SpecialCruncherData ( "Speed Packer 3 data" , 0 , SpeedPacker3Data );
+ break;
+ }
+#endif
/* SONG Fuchs Tracker */
if ( (in_data[PW_i+1] == 'O') &&
(in_data[PW_i+2] == 'N') &&
Rip_BP ();
break;
}
+#ifdef INCLUDEALL
/* Virtual Dreams VDCO data cruncher */
if ( (in_data[PW_i+1] == 'D') &&
(in_data[PW_i+2] == 'C') &&
Rip_SpecialCruncherData ( "Virtual Dreams (VDCO) data cruncher" , 13 , VDCO );
break;
}
+#endif
break;
case 'T':
Depack_MP ();
break;
}
+
+ /* "TMK. Timetracker ?!? */
+ if ( ( in_data[PW_i+1] == 'M' ) &&
+ ( in_data[PW_i+2] == 'K' ) &&
+ ( in_data[PW_i+3] == 0x01 ) )
+ {
+ if ( testTMK() == BAD )
+ break;
+ Rip_TMK ();
+ Depack_TMK ();
+ break;
+ }
break;
case 'W': /* 0x57 */
break;
case 'X': /* XPKF */
+#ifdef INCLUDEALL
/* xpk'ed file */
if ( (in_data[PW_i+1] == 'P') &&
(in_data[PW_i+2] == 'K') &&
Rip_SpecialCruncherData ( "XPK" , 8 , XPK );
break;
}
+#endif
break;
case 0x60:
break;
}
+#ifdef INCLUDEALL
/* Spike Cruncher */
if ( (in_data[PW_i+1] == 0x16) &&
(in_data[PW_i+24] == 0x48) &&
Rip_SpikeCruncher ();
break;
}
+#endif
break;
case 0x61: /* "a" */
+#ifdef INCLUDEALL
/* TNM Cruncher 1.1 */
if ( (in_data[PW_i+1] == 0x06) &&
(in_data[PW_i+2] == 0x4E) &&
Rip_Tetrapack_2_2 ();
break;
}
+#endif
break;
case 0x7E:
+#ifdef INCLUDEALL
/* Tetrapack 2.2 case #2 */
if ( (in_data[PW_i+1] == 0x00) &&
(in_data[PW_i+2] == 0x43) &&
Rip_Tetrapack_2_1 ();
break;
}
-
+#endif
break;
case 0xA9:
+#ifdef INCLUDEALL
/* Double Action v1.0 */
if ( (in_data[PW_i+1] == ' ') &&
(in_data[PW_i+2] == 'B') )
Rip_DoubleAction10 ();
break;
}
+#endif
break;
case 0xAC:
} /* 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");
+ printf ( " 1997-2005 (c) Sylvain \"Asle\" Chipaux (asle@free.fr)\n\n");
exit ( 0 );
+#endif
+ return 0;
}
-#endif
\ No newline at end of file
--- /dev/null
+/* testAC1D() */
+/* Rip_AC1D() */
+/* Depack_AC1D() */
+
+#include "globals.h"
+#include "extern.h"
+
+
+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;
+}
+
+
+/* Rip_AC1D */
+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;
+
+ 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" :) */
+}
+
+
+
+/*
+ * 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
+ * 20051002 : testing fopen() ...
+*/
+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;
+
+ sprintf ( Depacked_OutName , "%ld.mod" , Cpt_Filename-1 );
+ out = PW_fopen ( Depacked_OutName , "w+b" );
+ if (!out)
+ return;
+
+ memset (Pattern_Addresses , 0 , 128*4);
+ BZERO (Pattern_Sizes , 128*4);
+
+ fillPTKtable(poss);
+
+ /* 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
+/* (31 mar 2003) */
+/* testAmBk() */
+/* Rip_AmBk() */
+/* Depack_AmBk() */
+
+#include "globals.h"
+#include "extern.h"
+
+
+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;
+}
+
+
+/* Rip_AmBk */
+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;
+}
+
+
+/*
+ * ambk.c mar 2003 (c) Asle / ReDoX
+ *
+ * based in Kyz description ... thx !.
+ *
+*/
+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;
+
+ sprintf ( Depacked_OutName , "%ld.mod" , Cpt_Filename-1 );
+ out = PW_fopen ( Depacked_OutName , "w+b" );
+ if (!out)
+ return;
+
+ fillPTKtable(poss);
+
+ 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
+/* testPPbk() */
+/* Rip_PPbk() */
+
+
+#include "globals.h"
+#include "extern.h"
+
+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 !)*/
+}
+
+
+
+
+void Rip_PPbk ( void )
+{
+ /* PW_l is still the whole size */
+
+ OutputSize = PW_l;
+
+ /*printf ( " extracting PP20 subfile ...\n" );*/
+
+ 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
+/* testBP() */
+/* Rip_BP() */
+
+#include "globals.h"
+#include "extern.h"
+
+
+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;
+}
+
+
+/* Rip_BP */
+void Rip_BP ( void )
+{
+ OutputSize += ((PW_j*48) + (PW_l*16) + 512);
+
+ 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
+/* testBSIFutureComposer() */
+/* Rip_BSIFutureComposer() */
+
+#include "globals.h"
+#include "extern.h"
+
+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;
+}
+
+
+/* Rip_BSIFutureComposer */
+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;
+
+ 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
+/* testByteKiller_13() */
+/* testByteKiller_20() */
+/* testByteKiller30() */
+/* testbytekillerpro10() */
+/* Rip_ByteKiller() */
+/* Rip_ByteKiller30() */
+/* Rip_bytekillerpro10 */
+
+#include "globals.h"
+#include "extern.h"
+
+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 */
+}
+
+
+
+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 */
+}
+
+
+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 */
+}
+
+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 */
+}
+
+
+void Rip_ByteKiller ( 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 - 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" :) */
+}
+
+void Rip_ByteKiller30 ( 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 ( "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" :) */
+}
+
+
+void Rip_bytekillerpro10 ( 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 -= 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
+/* (3rd of april 2000)
+ * bugs pointed out by Thomas Neumann .. thx :)
+*/
+/* testKRIS() */
+/* Rip_KRIS() */
+/* Depack_KRIS() */
+
+
+#include "globals.h"
+#include "extern.h"
+
+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;
+}
+
+
+
+/*
+ * Update: 20/12/2000
+ * - debug .. correct size calculated now.
+*/
+void Rip_KRIS ( void )
+{
+ /* nothing was calculated in the test part */
+
+ 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);
+ /*printf ("\nKRIS:smpsiz:%ld\n", PW_WholeSampleSize);*/
+ PW_l = 0;
+ /*printf ("KRIS:");*/
+ for ( PW_k=0 ; PW_k<512 ; PW_k++ )
+ {
+ /*printf ( "%2x-%2x ",in_data[PW_Start_Address+958+PW_k*2],in_data[PW_Start_Address+959+PW_k*2]);*/
+ 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];
+ }
+ /*printf ("\nKRIS:patsiz:%ld\n",PW_l);*/
+ PW_k = 1984 + PW_l + 256;
+ OutputSize = PW_k + PW_WholeSampleSize;
+
+ 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" :) */
+}
+
+
+/*
+ * 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 ...
+ * Update: 02/10/2005
+ * - testing fopen()
+*/
+
+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;
+
+ sprintf ( Depacked_OutName , "%ld.mod" , Cpt_Filename-1 );
+ out = PW_fopen ( Depacked_OutName , "w+b" );
+ if (!out)
+ return;
+
+ fillPTKtable(poss);
+
+ BZERO ( TrackAddressTable , 128*4*2 );
+ BZERO ( TrackData , 512*256 );
+ BZERO ( PatternTable , 128 );
+
+/* 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
+/* testcrunchmaniaAddr() */
+/* Rip_CrunchmaniaAddr() */
+
+#include "globals.h"
+#include "extern.h"
+
+
+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 */
+}
+
+
+void Rip_CrunchmaniaAddr ( 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;
+ 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
+/* testDefjam32() */
+/* testDefjam32pro() */
+/* Rip_Defjam32() */
+
+#include "globals.h"
+#include "extern.h"
+
+
+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 */
+}
+
+
+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 */
+
+}
+
+
+void Rip_Defjam32 ( 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;
+
+ /* 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
+/* testDigiBooster17() */
+/* Rip_DigiBooster17() */
+
+#include "globals.h"
+#include "extern.h"
+
+
+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;
+}
+
+
+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;
+
+ 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
+/* (3rd of April 2000)
+ * bugs pointed out by Thomas Neumann .. thx :)
+ * (May 2002)
+ * added test_smps()
+*/
+/* testDI() */
+/* Rip_DI() */
+/* Depack_DI() */
+
+
+#include "globals.h"
+#include "extern.h"
+
+
+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;
+}
+
+
+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" :) */
+}
+
+
+/*
+ * 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
+ * 20051002 : testing fopen()
+*/
+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;
+
+ sprintf ( Depacked_OutName , "%ld.mod" , Cpt_Filename-1 );
+ out = PW_fopen ( Depacked_OutName , "w+b" );
+ if (!out)
+ return;
+
+ fillPTKtable(poss);
+
+ BZERO ( Pattern_Addresses_Table , 128*2 );
+
+ /* 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
+/* testDoubleAction10() */
+/* Rip_DoubleAction10() */
+
+#include "globals.h"
+#include "extern.h"
+
+
+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_l<0 || PW_l > 2000000)
+ return BAD;
+
+
+ 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 */
+}
+
+
+void Rip_DoubleAction10 ( void )
+{
+ /* PW_l is still the whole size */
+
+ Uchar * Amiga_EXE_Header_Block;
+
+ OutputSize = PW_l;
+
+ 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
+/* testDragpack100() */
+/* Rip_Dragpack100() */
+
+#include "globals.h"
+#include "extern.h"
+
+
+short testDragpack100 ( void )
+{
+ PW_Start_Address = PW_i;
+
+ if ( (in_data[PW_Start_Address+16] != 0x20 ) ||
+ (in_data[PW_Start_Address+17] != 0x18 ) ||
+ (in_data[PW_Start_Address+18] != 0x22 ) ||
+ (in_data[PW_Start_Address+19] != 0x18 ) ||
+ (in_data[PW_Start_Address+22] != 0x2A ) ||
+ (in_data[PW_Start_Address+23] != 0x18 ) ||
+ (in_data[PW_Start_Address+24] != 0x24 ) ||
+ (in_data[PW_Start_Address+25] != 0x49 ) ||
+ (in_data[PW_Start_Address+26] != 0xD1 ) ||
+ (in_data[PW_Start_Address+27] != 0xC0 ) ||
+ (in_data[PW_Start_Address+30] != 0xD5 ) ||
+ (in_data[PW_Start_Address+31] != 0xC1 ) )
+ {
+ /* should be enough :))) */
+/*printf ( "#2 Start:%ld\n" , PW_Start_Address );*/
+ return BAD;
+
+ }
+
+
+ /* packed size */
+ PW_l = ( (in_data[PW_Start_Address+0x2ec]*256*256*256) +
+ (in_data[PW_Start_Address+0x2ed]*256*256) +
+ (in_data[PW_Start_Address+0x2ee]*256) +
+ in_data[PW_Start_Address+0x2ef] );
+
+ PW_l += 0x330;
+
+ if ( PW_i >= 32 )
+ {
+ 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 */
+}
+
+
+void Rip_Dragpack100 ( 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] = 0x03;
+ Amiga_EXE_Header_Block[3] = 0xF3;
+ Amiga_EXE_Header_Block[11] = 0x03;
+ Amiga_EXE_Header_Block[19] = 0x02;
+ Amiga_EXE_Header_Block[23] = 0xA2;
+ Amiga_EXE_Header_Block[34] = 0x03;
+ Amiga_EXE_Header_Block[35] = 0xE9;
+ Amiga_EXE_Header_Block[39] = 0xA2;
+
+ /* WARNING !!! WORKS ONLY ON PC !!! */
+ /* 68k machines code : c1 = *(Whatever+2); */
+ /* 68k machines code : c2 = *(Whatever+3); */
+ PW_j = PW_l - 804;
+ PW_j /= 4;
+ Whatever = (Uchar *) &PW_j;
+ Amiga_EXE_Header_Block[24] = Amiga_EXE_Header_Block[28] = *(Whatever+3);
+ Amiga_EXE_Header_Block[25] = Amiga_EXE_Header_Block[29] = *(Whatever+2);
+ Amiga_EXE_Header_Block[26] = Amiga_EXE_Header_Block[30] = *(Whatever+1);
+ Amiga_EXE_Header_Block[27] = Amiga_EXE_Header_Block[31] = *Whatever;
+ Save_Rip_Special ( "DragPack 1.00 Exe-file", DragPack100, Amiga_EXE_Header_Block , 40 );
+ free ( Amiga_EXE_Header_Block );
+ }
+ else
+ {
+ PW_Start_Address -= 40;
+ Save_Rip ( "DragPack 1.00 Exe-file", ByteKiller );
+ }
+
+ if ( Save_Status == GOOD )
+ PW_i += 0x42; /* 40 should do but call it "just to be sure" :) */
+}
+
--- /dev/null
+/* testDragpack252() */
+/* Rip_Dragpack252() */
+
+#include "globals.h"
+#include "extern.h"
+
+
+short testDragpack252 ( void )
+{
+ PW_Start_Address = PW_i;
+
+ if ( (in_data[PW_Start_Address+16] != 0x01 ) ||
+ (in_data[PW_Start_Address+17] != 0x50 ) ||
+ (in_data[PW_Start_Address+18] != 0x41 ) ||
+ (in_data[PW_Start_Address+19] != 0xFA ) ||
+ (in_data[PW_Start_Address+22] != 0x24 ) ||
+ (in_data[PW_Start_Address+23] != 0x48 ) ||
+ (in_data[PW_Start_Address+24] != 0x22 ) ||
+ (in_data[PW_Start_Address+25] != 0x48 ) ||
+ (in_data[PW_Start_Address+26] != 0x4B ) ||
+ (in_data[PW_Start_Address+27] != 0xE8 ) ||
+ (in_data[PW_Start_Address+30] != 0xD3 ) ||
+ (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+38]*256*256*256) +
+ (in_data[PW_Start_Address+39]*256*256) +
+ (in_data[PW_Start_Address+40]*256) +
+ in_data[PW_Start_Address+41] );
+
+ PW_l += 0x170;
+ if ( (PW_l/4)*4 != PW_l )
+ PW_l += 2; /* aligned on dwords it seems */
+
+
+ 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 */
+}
+
+void Rip_Dragpack252 ( 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 ( "DragPack 2.52 Exe-file", DragPack252, Amiga_EXE_Header_Block , 32 );
+ free ( Amiga_EXE_Header_Block );
+ }
+ else
+ {
+ PW_Start_Address -= 32;
+ Save_Rip ( "DragPack 2.52 Exe-file", DragPack252 );
+ }
+
+ if ( Save_Status == GOOD )
+ PW_i += (OutputSize - 36); /* 32 should do but call it "just to be sure" :) */
+}
--- /dev/null
+/* (27 dec 2001)
+ * added some checks to prevent readings outside of input file (in test 1)
+ * (May 2002)
+ * added test_smps()
+*/
+/* testEUREKA() */
+/* Rip_EUREKA() */
+/* Depack_EUREKA() */
+
+
+#include "globals.h"
+#include "extern.h"
+
+
+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;
+}
+
+
+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;
+
+ 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" :) */
+}
+
+
+/*
+ * 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
+ * 20051002 : testing fopen()
+*/
+
+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 = PW_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
+/* testFC_M() */
+/* Rip_FC_M() */
+/* Depack_FC_M() */
+
+#include "globals.h"
+#include "extern.h"
+
+
+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;
+}
+
+void Rip_FC_M ( void )
+{
+ 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" :) */
+}
+
+
+
+/*
+ * 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
+ * 20051002 : testing fopen()
+*/
+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 = PW_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
+/* testXM() */
+/* Rip_XM() */
+
+
+#include "globals.h"
+#include "extern.h"
+
+
+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;
+}
+
+
+
+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
+/* testFuchsTracker() */
+/* Rip_FuchsTracker() */
+/* Depack_FuchsTracker() */
+
+#include "globals.h"
+#include "extern.h"
+
+
+
+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;
+}
+
+
+
+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;
+
+ 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" :) */
+}
+
+
+
+/*
+ * 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
+*/
+
+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 = PW_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
+/*
+ * update 18 mar 2003
+ * - fake test replaced by good test :) -> more FC13 found
+*/
+/* testFC13() */
+/* Rip_FC13() */
+
+
+
+#include "globals.h"
+#include "extern.h"
+
+
+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;
+}
+
+
+
+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
+/*
+ * update 18 mar 2003
+ * - fake test replaced by good test :) -> more FC14 found
+*/
+/* testFC14() */
+/* Rip_FC14() */
+
+
+#include "globals.h"
+#include "extern.h"
+
+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;
+}
+
+
+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
+/* testFUZZAC() */
+/* Rip_Fuzzac() */
+/* Depack_Fuzzac() */
+
+#include "globals.h"
+#include "extern.h"
+
+
+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;
+}
+
+
+
+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;
+
+ 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" :) */
+}
+
+/*
+ * 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 !)
+*/
+
+
+#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 = PW_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
+/* testGPMO() */
+/* Rip_GPMO() */
+/* Depack_GPMO() */
+
+
+#include "globals.h"
+#include "extern.h"
+
+
+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;
+}
+
+
+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;
+
+ 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" :) */
+}
+
+
+
+/*
+ * gpmo.c 2003 (c) Asle / ReDoX
+ *
+ * Converts GPMO MODs back to PTK
+ *
+*/
+
+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 = PW_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
+/* testGMC() */
+/* Rip_GMC() */
+/* Depack_GMC() */
+
+#include "globals.h"
+#include "extern.h"
+
+
+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;
+}
+
+
+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 */
+}
+
+/*
+ * 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
+*/
+
+
+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 = PW_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
+/* 22 mar 2003
+ * GnuPlayer.c
+ * based on XtC's description ! ... good job ! :).
+ *
+*/
+/* testGnuPlayer() */
+/* Rip_GnuPlayer() */
+/* Depack_GnuPlayer() */
+
+#include "globals.h"
+#include "extern.h"
+
+
+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;
+}
+
+
+
+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;
+}
+
+/*
+ * GnuPlayer.c 2003 (c) Asle@free.fr
+ *
+*/
+
+
+#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;
+
+ fillPTKtable(poss);
+
+ sprintf ( Depacked_OutName , "%ld.mod" , Cpt_Filename-1 );
+ out = PW_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
+/* testHQCCruncher2() */
+/* Rip_HQCCruncher2() */
+
+#include "globals.h"
+#include "extern.h"
+
+
+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 */
+}
+
+
+
+void Rip_HQCCruncher2 ( void )
+{
+ /* PW_l is still the whole size */
+
+ Uchar * Amiga_EXE_Header_Block;
+ Uchar * Whatever;
+
+ OutputSize = PW_l;
+
+ 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
+/* (May 2002)
+ * added test_smps()
+*/
+/* testHEATSEEKER() */
+/* Rip_HEATSEEKER() */
+/* Depack_HEATSEEKER() */
+
+
+#include "globals.h"
+#include "extern.h"
+
+
+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;
+}
+
+
+void Rip_HEATSEEKER ( void )
+{
+ 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" :) */
+}
+
+
+/*
+ * 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
+*/
+
+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 = PW_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
+/* testHRT() */
+/* Rip_HRT() */
+/* Depack_HRT() */
+
+#include "globals.h"
+#include "extern.h"
+
+
+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;
+}
+
+
+
+void Rip_HRT ( void )
+{
+ 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;
+}
+
+
+/*
+ * 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
+*/
+
+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;
+
+ fillPTKtable(poss);
+
+ sprintf ( Depacked_OutName , "%ld.mod" , Cpt_Filename-1 );
+ out = PW_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
+/* testJamCracker() */
+/* Rip_JamCracker() */
+
+#include "globals.h"
+#include "extern.h"
+
+
+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;
+}
+
+
+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;
+
+ 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
+/* testKSM() */
+/* Rip_KSM() */
+/* Depack_KSM() */
+
+#include "globals.h"
+#include "extern.h"
+
+
+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;
+}
+
+
+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;
+
+ 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" :) */
+}
+
+
+/*
+ * 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
+*/
+
+#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 );
+
+ fillPTKtable(poss);
+
+ sprintf ( Depacked_OutName , "%ld.mod" , Cpt_Filename-1 );
+ out = PW_fopen ( Depacked_OutName , "w+b" );
+ if (!out)
+ return;
+
+ /* 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
+/* testMMD0() */
+/* Rip_MMD0() */
+
+#include "globals.h"
+#include "extern.h"
+
+
+/* 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;
+}
+
+
+void Rip_MMD0 ( void )
+{
+ /* PW_k is the module size */
+
+ OutputSize = PW_k;
+
+ 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
+/* testMOD() */
+/* Rip_MOD() */
+
+/*
+ this funtion will handle any MOD-alike formats
+ meaning whatever the number of channels. This
+ number is the arg in fact.
+*/
+
+
+#include "globals.h"
+#include "extern.h"
+
+
+short testMOD ( int nbrchannels )
+{
+ /* 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*256*nbrchannels)+1084+PW_Start_Address) > PW_in_size )
+ {
+ /*printf ( "#5,0 (Start:%ld)(1patsize:%ld)\n" , PW_Start_Address, 256*nbrchannels);*/
+ 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*nbrchannels] > 0x13 )
+ {
+ /*printf ( "#5.1 (Start:%ld)(sample value:%x)(Where:%lx)\n" , PW_Start_Address,in_data[PW_Start_Address+1084+PW_j*nbrchannels],PW_Start_Address+1084+PW_j*nbrchannels);*/
+ return BAD;
+ }
+ PW_l = ((in_data[PW_Start_Address+1084+PW_j*nbrchannels]&0x0f)*256)+in_data[PW_Start_Address+1085+PW_j*nbrchannels];
+ if ( (PW_l>0) && (PW_l<0x1C) )
+ {
+ /*printf ( "#5,2 (Start:%ld)(PW_l:%lx)(Where:%lx)\n" , PW_Start_Address,PW_l,PW_Start_Address+1084+PW_j*nbrchannels );*/
+ return BAD;
+ }
+ }
+
+ return GOOD;
+}
+
+
+
+void Rip_MOD ( int nbrchannels )
+{
+ char whatever[64];
+ BZERO (whatever,64);
+ /* PW_k is still the nbr of pattern */
+ /* PW_WholeSampleSize is still the whole sample size */
+
+ OutputSize = PW_WholeSampleSize + (PW_k*256*nbrchannels) + 1084;
+
+ CONVERT = BAD;
+ sprintf(whatever,"Pro|Star|whatever tracker %d channels module",nbrchannels);
+ Save_Rip ( whatever, Protracker );
+
+ if ( Save_Status == GOOD )
+ PW_i += 1084;
+}
+
--- /dev/null
+/* testMasterCruncher30addr() */
+/* Rip_MasterCruncher30addr() */
+
+#include "globals.h"
+#include "extern.h"
+
+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 */
+}
+
+
+
+void Rip_MasterCruncher30addr ( void )
+{
+ /* PW_l is still the whole size */
+
+ Uchar * Amiga_EXE_Header_Block;
+
+ 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[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
+/* testMaxPacker12() */
+/* Rip_MaxPacker12() */
+
+
+#include "globals.h"
+#include "extern.h"
+
+
+
+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 */
+}
+
+
+void Rip_MaxPacker12 ( 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 ( "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
+/* testMegaCruncherObj() */
+/* Rip_MegaCruncherObj() */
+
+#include "globals.h"
+#include "extern.h"
+
+
+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_l > PW_in_size) || (PW_l > 2000000l))
+ {
+ return BAD;
+ }
+
+ 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 */
+}
+
+
+
+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
+/* testMegaCruncher10() */
+/* testMegaCruncher12() */
+/* Rip_MegaCruncher() */
+
+#include "globals.h"
+#include "extern.h"
+
+
+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 */
+}
+
+
+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 */
+}
+
+
+
+void Rip_MegaCruncher ( 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 - 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
+/* (May 2002)
+ * added test_smps()
+*/
+/* testMP_noID() */
+/* testMP_withID() */
+/* Rip_MP_noID() */
+/* Rip_MP_withID() */
+/* Depack_MP() */
+
+#include "globals.h"
+#include "extern.h"
+
+
+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;
+}
+
+
+
+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;
+
+ 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;
+
+ 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" :) */
+}
+
+
+/*
+ * 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
+*/
+
+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;
+
+ sprintf ( Depacked_OutName , "%ld.mod" , Cpt_Filename-1 );
+ out = PW_fopen ( Depacked_OutName , "w+b" );
+ if (!out)
+ return;
+
+ Whatever = (Uchar *) malloc (64);
+ BZERO ( Whatever , 64 );
+
+ /* 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 ... 9 mar 2003
+*/
+/* testNewtron() */
+/* Rip_Newtron() */
+/* Depack_Newtron() */
+
+
+#include "globals.h"
+#include "extern.h"
+
+
+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;
+}
+
+
+
+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;
+}
+
+/*
+ * newtron.c 2003 (c) Asle / ReDoX
+ *
+ * Converts Newtron packed MODs back to PTK MODs
+ *
+ * Last update: 09 mar 2003
+*/
+
+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;
+
+ sprintf ( Depacked_OutName , "%ld.mod" , Cpt_Filename-1 );
+ out = PW_fopen ( Depacked_OutName , "w+b" );
+ if (!out)
+ return;
+
+ Whatever = (Uchar *) malloc (64);
+ BZERO ( Whatever , 64 );
+
+ /* 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
+/* testNFH() */
+/* Rip_NFH() */
+/* Depack_NFH() */
+
+#include "globals.h"
+#include "extern.h"
+
+
+/* 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;
+}
+
+
+
+/* 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 */
+}
+
+
+
+/*
+ * nfh.c 2003 (c) Asle / ReDoX
+ *
+ * converts ziks from Noise From Heaven chiptune diskmag by Iris'01
+ *
+*/
+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;
+
+ fillPTKtable(poss);
+
+ if ( Save_Status == BAD )
+ return;
+
+ sprintf ( Depacked_OutName , "%ld.mod" , Cpt_Filename-1 );
+ out = PW_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 Heaven " , BAD , BAD , out );
+
+ fflush ( out );
+ fclose ( out );
+
+ printf ( "done\n" );
+ return; /* useless ... but */
+}
+
--- /dev/null
+/* testNoisepacker1() */
+/* Rip_Noisepacker1() */
+/* Depack_Noisepacker1() */
+
+#include "globals.h"
+#include "extern.h"
+
+
+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;
+}
+
+
+
+void Rip_Noisepacker1 ( void )
+{
+ 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" :) */
+}
+
+
+/*
+ * 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.
+*/
+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;
+
+ fillPTKtable(poss);
+
+ BZERO ( Track_Addresses , 128*4*4 );
+
+ sprintf ( Depacked_OutName , "%ld.mod" , Cpt_Filename-1 );
+ out = PW_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
+/* testNoisepacker2() */
+/* Rip_Noisepacker2() */
+/* Depack_Noisepacker2() */
+
+#include "globals.h"
+#include "extern.h"
+
+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;
+}
+
+
+
+void Rip_Noisepacker2 ( void )
+{
+ 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" :) */
+}
+
+
+/*
+ * 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.
+*/
+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;
+
+ fillPTKtable(poss);
+
+ BZERO ( Track_Addresses , 128*4*4 );
+
+ sprintf ( Depacked_OutName , "%ld.mod" , Cpt_Filename-1 );
+ out = PW_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
+/* testNoisepacker3() */
+/* Rip_Noisepacker3() */
+/* Depack_Noisepacker3() */
+
+#include "globals.h"
+#include "extern.h"
+
+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;
+}
+
+
+
+void Rip_Noisepacker3 ( void )
+{
+ 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" :) */
+}
+
+
+
+/*
+ * 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.
+*/
+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;
+
+ fillPTKtable(poss);
+
+ BZERO ( Track_Addresses , 128*4*4 );
+
+ sprintf ( Depacked_OutName , "%ld.mod" , Cpt_Filename-1 );
+ out = PW_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
+/* testNoiserunner() */
+/* Rip_Noiserunner() */
+/* Depack_Noiserunner() */
+
+#include "globals.h"
+#include "extern.h"
+
+
+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;
+}
+
+
+
+void Rip_Noiserunner ( void )
+{
+ /* PW_k is still the nbr of pattern */
+
+ OutputSize = PW_WholeSampleSize + (PW_k*1024) + 1084;
+
+ 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" :) */
+}
+
+/*
+ * 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
+*/
+
+#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;
+
+ fillPTKtable(poss);
+
+ sprintf ( Depacked_OutName , "%ld.mod" , Cpt_Filename-1 );
+ out = PW_fopen ( Depacked_OutName , "w+b" );
+ if (!out)
+ return;
+
+ Whatever = (Uchar *) malloc (1024);
+ BZERO ( Whatever , 1024 );
+
+ /* 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
+/* testPHA() */
+/* Rip_PHA() */
+/* Depack_PHA() */
+
+
+#include "globals.h"
+#include "extern.h"
+
+
+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;
+}
+
+
+
+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" :) */
+}
+
+
+
+/*
+ * 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 ?
+ * update (8 dec 2003)
+ * - removed fopen()
+*/
+void Depack_PHA ( void )
+{
+ Uchar c1=0x00,c2=0x00,c3=0x00;
+ Uchar poss[37][2];
+ Uchar *Whole_Pattern_Data;
+ Uchar *Pattern;
+ 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;
+ long Where = PW_Start_Address;
+ short Old_cpt[4];
+ FILE *out;/*,*info;*/
+
+ if ( Save_Status == BAD )
+ return;
+
+ fillPTKtable(poss);
+
+ BZERO ( Pats_Address , 128*4 );
+ BZERO ( Old_Note_Value , 4*4 );
+ BZERO ( Old_cpt , 4*2 );
+ BZERO ( MyPatList, 128*sizeof(long));
+
+ sprintf ( Depacked_OutName , "%ld.mod" , Cpt_Filename-1 );
+ out = PW_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 );
+
+ /*sample name*/
+ fwrite ( &Whatever[32] , 22 , 1 , out );
+
+ /* size */
+ fwrite ( &in_data[Where] , 2 , 1 , out );
+ Whole_Sample_Size += (((in_data[Where]*256)+in_data[Where+1])*2);
+
+ /* finetune */
+ c1 = ( Uchar ) (((in_data[Where+12]*256)+in_data[Where+13])/0x48);
+ fwrite ( &c1 , 1 , 1 , out );
+
+ /* volume */
+ fwrite ( &in_data[Where+3] , 1 , 1 , out );
+
+ /* loop start */
+ fwrite ( &in_data[Where+4] , 2 , 1 , out );
+
+ /* loop size */
+ fwrite ( &in_data[Where+6] , 2 , 1 , out );
+ Where += 14;
+ }
+ /*printf ( "Whole sample size : %ld\n" , Whole_Sample_Size );*/
+
+ /* bypass those unknown 14 bytes */
+ Where += 14;
+
+ 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;
+ /*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 = Where;
+ /* 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 */
+ Whole_Pattern_Data_Size = OutputSize - Start_Pat_Address;
+ Whole_Pattern_Data = (Uchar *) malloc ( Whole_Pattern_Data_Size );
+ Where = Start_Pat_Address + PW_Start_Address;
+ for (i=0;i<Whole_Pattern_Data_Size;i++)Whole_Pattern_Data[i] = in_data[Where+i];
+ /* 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 */
+ fwrite ( &in_data[Sample_Data_Address] , Whole_Sample_Size , 1 , out );
+
+ Crap ( " PhaPacker " , BAD , BAD , out );
+
+ fflush ( out );
+ fclose ( out );
+
+ printf ( "done\n" );
+ return; /* useless ... but */
+}
--- /dev/null
+/* (Mar 2003)
+ * polka.c
+*/
+/* testPolka() */
+/* Rip_Polka() */
+/* Depack_Polka() */
+
+
+#include "globals.h"
+#include "extern.h"
+
+
+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;
+}
+
+
+
+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*/
+}
+
+
+
+/*
+ * Polka.c 2003 (c) Asle
+ *
+*/
+
+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;
+
+ fillPTKtable(poss);
+
+ sprintf ( Depacked_OutName , "%ld.mod" , Cpt_Filename-1 );
+ out = PW_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 );
+
+ fclose ( out );
+
+ printf ( "done\n" );
+ return; /* useless ... but */
+}
--- /dev/null
+/* update on the 3rd of april 2000 */
+/* some advices by Thomas Neumann .. thx */
+
+/* testPM() */
+/* Rip_PM() */
+/* Depack_PM() */
+
+#include "globals.h"
+#include "extern.h"
+
+
+/* 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;
+}
+
+
+
+void Rip_PM ( void )
+{
+ 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;
+
+ 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" :) */
+}
+
+
+
+/*
+ * 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
+*/
+
+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 = PW_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 );
+
+ fclose ( out );
+
+ printf ( "done\n" );
+ return; /* useless ... but */
+}
--- /dev/null
+/* testPowerpacker23() */
+/* Rip_Powerpacker23() */
+
+#include "globals.h"
+#include "extern.h"
+
+
+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 */
+}
+
+
+
+
+void Rip_Powerpacker23 ( void )
+{
+ /* PW_l is still the whole size */
+
+
+ Uchar * Amiga_EXE_Header_Block;
+
+ 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[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
+/* testPowerpacker30() */
+/* Rip_Powerpacker30() */
+
+#include "globals.h"
+#include "extern.h"
+
+
+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 */
+}
+
+
+
+void Rip_Powerpacker30 ( void )
+{
+ /* PW_l is still the whole size */
+
+
+ Uchar * Amiga_EXE_Header_Block;
+
+ 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[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
+/* testPowerpacker4lib() */
+/* Rip_Powerpacker4lib() */
+
+#include "globals.h"
+#include "extern.h"
+
+
+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 */
+}
+
+
+
+void Rip_Powerpacker4lib ( 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 - 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
+/* testPowerpacker40() */
+/* Rip_Powerpacker40() */
+
+#include "globals.h"
+#include "extern.h"
+
+
+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 ) ||
+ (in_data[PW_Start_Address+36] != 0x61 ) ||
+ (in_data[PW_Start_Address+37] != 0x00 ) ||
+ (in_data[PW_Start_Address+40] != 0x20 ) ||
+ (in_data[PW_Start_Address+41] != 0x57 ) ||
+ (in_data[PW_Start_Address+42] != 0x51 ) )
+ {
+ /* should be enough :))) */
+/*printf ( "#2 Start:%ld\n" , PW_Start_Address );*/
+ return BAD;
+
+ }
+ if ((PW_Start_Address + 684) > PW_in_size)
+ {
+ 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_l > PW_in_size) || (PW_l > 2000000l))
+ {
+ return BAD;
+ }
+
+ 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 */
+}
+
+
+
+void Rip_Powerpacker40 ( void )
+{
+ /* PW_l is still the whole size */
+
+
+ Uchar * Amiga_EXE_Header_Block;
+
+ 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[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
+/* testPP10() */
+/* Rip_PP10() */
+/* Depack_PP10() */
+
+
+#include "globals.h"
+#include "extern.h"
+
+
+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;
+}
+
+
+
+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;
+
+ 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" :) */
+}
+
+
+
+/*
+ * 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
+*/
+
+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 = PW_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
+/*
+ * 5th, oct 2001 : strenghtened a test that hanged the prog sometimes
+*/
+
+/* testPP21() */
+/* Rip_PP21() */
+/* Depack_PP21() */
+
+#include "globals.h"
+#include "extern.h"
+
+
+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;
+}
+
+
+
+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" :) */
+}
+
+
+
+/*
+ * 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 !!!
+ *
+ * update : 26/11/1999 by Sylvain "Asle" Chipaux
+ * - reduced to only one FREAD.
+ * - Speed-up and Binary smaller.
+ * update : 8 dec 2003
+ * - no more fopen ()
+*/
+
+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 *Whatever;
+ long i=0,j=0;
+ long Total_Sample_Size=0;
+ long Where=PW_Start_Address;
+ FILE *out;
+
+ if ( Save_Status == BAD )
+ return;
+
+ BZERO ( Tracks_Numbers , 4*128 );
+ BZERO ( Tracks_PrePointers , 512*128 );
+
+ sprintf ( Depacked_OutName , "%ld.mod" , Cpt_Filename-1 );
+ out = PW_fopen ( Depacked_OutName , "w+b" );
+ if (!out)
+ return;
+
+ 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 += (((in_data[Where]*256)+in_data[Where+1])*2);
+ /* siz,fine,vol,lstart,lsize */
+ fwrite ( &in_data[Where] , 8 , 1 , out );
+ Where += 8;
+ }
+
+ /* pattern table lenght */
+ NOP = in_data[Where];
+ fwrite ( &NOP , 1 , 1 , out );
+ Where += 1;
+
+ /*printf ( "Number of patterns : %d\n" , NOP );*/
+
+ /* NoiseTracker restart byte */
+ fwrite ( &in_data[Where] , 1 , 1 , out );
+ Where += 1;
+
+ Max = 0;
+ for ( j=0 ; j<4 ; j++ )
+ {
+ for ( i=0 ; i<128 ; i++ )
+ {
+ Tracks_Numbers[j][i] = in_data[Where];
+ Where += 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] = (in_data[Where]*256)+in_data[Where+1];
+ Where += 2;
+ }
+ }
+
+ /* read "reference table" 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 "reference Table" */
+ /*printf ( "Reference table location : %ld\n" , OverallCpt );*/
+ ReferenceTable = (Uchar *) malloc ( j );
+ for ( i=0 ; i<j ; i++,Where+=1 )
+ ReferenceTable[i] = in_data[Where];
+
+ /* 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 ( &in_data[Where] , Total_Sample_Size , 1 , out );
+
+ Crap ( " ProPacker v2.1 " , BAD , BAD , out );
+
+ fflush ( out );
+ fclose ( out );
+
+ printf ( "done\n" );
+ return; /* useless ... but */
+}
--- /dev/null
+/* testPP30() */
+/* Rip_PP30() */
+/* Depack_PP30() */
+
+#include "globals.h"
+#include "extern.h"
+
+
+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;
+}
+
+
+
+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" :) */
+}
+
+
+
+/*
+ * 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 !!!
+ *
+ * update : 26/11/1999 by Sylvain "Asle" Chipaux
+ * - reduced to only one FREAD.
+ * - Speed-up and Binary smaller.
+ * update : 8 dec 2003
+ * - no more fopen ()
+*/
+
+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 *Whatever;
+ long i=0,j=0;
+ long Total_Sample_Size=0;
+ long Where = PW_Start_Address;
+ FILE *out;
+
+ if ( Save_Status == BAD )
+ return;
+
+ BZERO ( Tracks_Numbers , 4*128 );
+ BZERO ( Tracks_PrePointers , 512*64 );
+
+ sprintf ( Depacked_OutName , "%ld.mod" , Cpt_Filename-1 );
+ out = PW_fopen ( Depacked_OutName , "w+b" );
+ if (!out)
+ return;
+
+ /* 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 += (((in_data[Where]*256)+in_data[Where+1])*2);
+ /* size,fine,vol,lstart,lsize */
+ fwrite ( &in_data[Where] , 8 , 1 , out );
+ Where += 8;
+ }
+
+ /* pattern table lenght */
+ NOP = in_data[Where];
+ fwrite ( &NOP , 1 , 1 , out );
+ Where += 1;
+ /*printf ( "Number of patterns : %d\n" , NOP );*/
+
+ /* NoiseTracker restart byte */
+ fwrite ( &in_data[Where] , 1 , 1 , out );
+ Where += 1;
+
+ Max = 0;
+ for ( j=0 ; j<4 ; j++ )
+ {
+ for ( i=0 ; i<128 ; i++ )
+ {
+ Tracks_Numbers[j][i] = in_data[Where];
+ Where += 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] = ((in_data[Where]*256)+
+ in_data[Where+1])/4;
+ Where += 2;
+ }
+ }
+
+ /* read "reference table" 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 "reference Table" */
+ ReferenceTable = (Uchar *) malloc ( j );
+ for ( i=0 ; i<j ; i++,Where+=1 )
+ ReferenceTable[i] = in_data[Where];
+
+ /* 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 ( &in_data[Where] , Total_Sample_Size , 1 , out );
+
+ Crap ( " ProPacker v3.0 " , BAD , BAD , out );
+
+ fflush ( out );
+ fclose ( out );
+
+ printf ( "done\n" );
+ return; /* useless ... but */
+}
--- /dev/null
+/*
+- 22 sept 2001 -
+bugfix : test #5 was fake since first pat addy can be != $00000000
+*/
+
+/* testPM01() */
+/* Rip_PM01() */
+/* Depack_PM01() */
+
+
+#include "globals.h"
+#include "extern.h"
+
+
+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;
+}
+
+
+
+
+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;
+
+ 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" :) */
+}
+
+
+/*
+ * 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)
+*/
+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;
+
+ #include "tuning.h"
+ fillPTKtable(poss);
+
+ 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 = PW_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
+/* testPM10c() */
+/* Rip_PM10c() */
+/* Depack_PM10c() */
+
+#include "globals.h"
+#include "extern.h"
+
+
+
+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;
+}
+
+
+
+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;
+
+ 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" :) */
+}
+
+
+
+/*
+ * 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 !)
+*/
+
+#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;*/
+
+ #include "tuning.h"
+ fillPTKtable(poss);
+
+
+ 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 = PW_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 );
+
+ fflush ( out );
+ fclose ( out );
+ /*fclose ( info );*/
+
+ printf ( "done\n" );
+ return; /* useless ... but */
+}
--- /dev/null
+/* testPMZ() */
+/* Rip_PM18a() */
+/* Depack_PM18a() */
+
+#include "globals.h"
+#include "extern.h"
+
+
+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;
+}
+
+
+
+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;
+
+ 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" :) */
+}
+
+
+
+/*
+ * 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 !)
+*/
+
+#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;
+
+ #include "tuning.h"
+ fillPTKtable(poss);
+
+ if ( Save_Status == BAD )
+ return;
+
+ sprintf ( Depacked_OutName , "%ld.mod" , Cpt_Filename-1 );
+ out = PW_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 */
+ 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 );
+
+ fflush ( out );
+ fclose ( out );
+
+ printf ( "done\n" );
+ return; /* useless ... but */
+}
--- /dev/null
+/* testPM2() */
+/* Rip_PM20() */
+/* Depack_PM20() */
+
+#include "globals.h"
+#include "extern.h"
+
+
+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;
+}
+
+
+
+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;
+
+ 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" :) */
+}
+
+
+
+/*
+ * 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 !)
+*/
+
+#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;
+
+ fillPTKtable(poss);
+
+ sprintf ( Depacked_OutName , "%ld.mod" , Cpt_Filename-1 );
+ out = PW_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 );
+
+ fflush ( out );
+ fclose ( out );
+ /*fclose (info );*/
+
+ printf ( "done\n" );
+ return; /* useless ... but */
+}
--- /dev/null
+/* testPM40() */
+/* Rip_PM40() */
+/* Depack_PM40() */
+
+#include "globals.h"
+#include "extern.h"
+
+
+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;
+}
+
+
+
+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;
+
+ 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" :) */
+}
+
+
+
+
+/*
+ * Promizer_40.c 1997 (c) Asle / ReDoX
+ *
+ * Converts PM40 packed MODs back to PTK MODs
+ *
+*/
+
+#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;
+
+ fillPTKtable(poss);
+
+ 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 = PW_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 );
+
+ fflush ( in );
+ fflush ( out );
+ fclose ( in );
+ fclose ( out );
+
+ printf ( "done\n" );
+ return; /* useless ... but */
+}
--- /dev/null
+/* testPRUN1() */
+/* Rip_PRUN1() */
+/* Depack_PRUN1() */
+
+
+#include "globals.h"
+#include "extern.h"
+
+
+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;
+}
+
+
+
+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;
+
+ CONVERT = GOOD;
+ Save_Rip ( "Prorunner 1 module", ProRunner_v1 );
+
+ if ( Save_Status == GOOD )
+ PW_i += (OutputSize - 1083); /* 1080 could be enough */
+}
+
+
+
+/*
+ * 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
+*/
+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;
+
+ fillPTKtable(poss);
+
+ if ( Save_Status == BAD )
+ return;
+
+ sprintf ( Depacked_OutName , "%ld.mod" , Cpt_Filename-1 );
+ out = PW_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
+/* testPRUN2() */
+/* Rip_PRUN2() */
+/* Depack_PRUN2() */
+
+
+#include "globals.h"
+#include "extern.h"
+
+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;
+}
+
+
+
+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;
+
+ 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" :) */
+}
+
+
+
+
+/*
+ * 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 !.
+*/
+
+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;
+
+ fillPTKtable(poss);
+
+ if ( Save_Status == BAD )
+ return;
+
+ sprintf ( Depacked_OutName , "%ld.mod" , Cpt_Filename-1 );
+ out = PW_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 );
+
+ fflush ( out );
+ fclose ( out );
+
+ printf ( "done\n" );
+ return; /* useless ... but */
+}
+
--- /dev/null
+/* testQuadraComposer() */
+/* Rip_QuadraComposer() */
+/* Depack_QuadraComposer() */
+
+#include "globals.h"
+#include "extern.h"
+
+
+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;
+}
+
+
+
+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;
+
+ 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" :) */
+}
+
+
+
+/*
+ * QuadraComposer.c 1999 (c) Asle / ReDoX
+ *
+ * Converts QC MODs back to PTK MODs
+ *
+*/
+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;
+
+ fillPTKtable(poss);
+
+ sprintf ( Depacked_OutName , "%ld.mod" , Cpt_Filename-1 );
+ out = PW_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];
+ fwrite ( &in_data[Where] , SmpSizes[i] , 1 , out );
+ }
+/*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
+/* testRelokIt10() */
+/* Rip_RelokIt10() */
+
+#include "globals.h"
+#include "extern.h"
+
+
+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 */
+}
+
+
+
+
+void Rip_RelokIt10 ( 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 ( "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
+/* testSKYT() */
+/* Rip_SKYT() */
+/* Depack_SKYT() */
+
+
+/*
+ * Even in these poor lines, I managed to insert a bug :)
+ *
+ * update: 19/04/00
+ * - bug correction (really testing volume !)
+*/
+
+#include "globals.h"
+#include "extern.h"
+
+
+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;
+}
+
+
+
+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);
+
+ CONVERT = GOOD;
+ Save_Rip ( "SKYT Packed module", SKYT_packer );
+
+ if ( Save_Status == GOOD )
+ PW_i += (OutputSize - 261); /* 260 could be enough */
+}
+
+
+
+/*
+ * 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 :(.
+*/
+
+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;
+
+ fillPTKtable(poss);
+
+ if ( Save_Status == BAD )
+ return;
+
+ BZERO ( Track_Values , 128*16 );
+
+ sprintf ( Depacked_OutName , "%ld.mod" , Cpt_Filename-1 );
+ out = PW_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
+/* testSoundFX13() */
+/* Rip_SoundFX13() */
+/* Depack_SoundFX13() */
+
+
+#include "globals.h"
+#include "extern.h"
+
+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;
+}
+
+
+
+void Rip_SoundFX13 ( void )
+{
+ /* PW_k is still the nbr of pattern */
+ /* PW_WholeSampleSize is the WholeSampleSize :) */
+
+ OutputSize = PW_WholeSampleSize + (PW_k*1024) + 0x294;
+
+ CONVERT = BAD;
+
+ 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" :) */
+}
+
+
+
+/*
+ * SoundFX.c 1999 (c) Sylvain "Asle" Chipaux
+ *
+ * Depacks musics in the SoundFX format and saves in ptk.
+ *
+*/
+
+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 = PW_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
+/* testSoundTracker() */
+/* Rip_SoundTracker() */
+
+
+#include "globals.h"
+#include "extern.h"
+
+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;
+}
+
+
+
+
+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
+/* testSTK26() */
+/* Rip_STK26() */
+/* Depack_STK26() */
+
+
+#include "globals.h"
+#include "extern.h"
+
+
+
+/* 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;
+}
+
+
+
+
+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' )
+ {
+ Save_Rip ( "Sountracker 2.6 module", STK26 );
+ }
+ else
+ {
+ Save_Rip ( "IceTracker 1.0 modul", IceTracker );
+ }
+
+
+ if ( Save_Status == GOOD )
+ PW_i += (OutputSize - 1470); /* 1464 should do but call it "just to be sure" :) */
+}
+
+
+
+/*
+ * 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.
+*/
+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 = PW_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
+/* testSpikeCruncher() */
+/* Rip_SpikeCruncher() */
+
+
+#include "globals.h"
+#include "extern.h"
+
+
+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 */
+}
+
+
+
+void Rip_SpikeCruncher ( void )
+{
+ /* PW_l is still the whole size */
+
+
+ Uchar * Amiga_EXE_Header_Block;
+
+ 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[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
+/*
+ * 27 dec 2001 : added some checks to prevent readings outside of
+ * the input file.
+*/
+
+/* testSTARPACK() */
+/* Rip_STARPACK() */
+/* Depack_STARPACK() */
+
+#include "globals.h"
+#include "extern.h"
+
+
+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;
+}
+
+
+
+
+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 */
+}
+
+
+
+
+/*
+ * StarTrekker _Packer.c 1997 (c) Asle / ReDoX
+ *
+ * Converts back to ptk StarTrekker packed MODs
+ *
+*/
+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 );
+
+ sprintf ( Depacked_OutName , "%ld.mod" , Cpt_Filename-1 );
+ out = PW_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 );
+
+ fflush ( out );
+ fclose ( out );
+
+ printf ( "done\n" );
+ return; /* useless ... but */
+}
--- /dev/null
+/* testSTIM() */
+/* Rip_STIM() */
+/* Depack_STIM() */
+
+
+/* update on the 3rd of april 2000 */
+/* bug pointes out by Thomas Neumann ... thx */
+
+#include "globals.h"
+#include "extern.h"
+
+
+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;
+}
+
+
+
+void Rip_STIM ( void )
+{
+ OutputSize = PW_WholeSampleSize + PW_j + 31*4 + 31*8;
+
+ 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" :) */
+}
+
+
+/*
+ * 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
+*/
+
+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;
+
+ fillPTKtable(poss);
+
+ BZERO ( PatAdds , 64*4 );
+ BZERO ( SmpDataAdds , 31*4 );
+ BZERO ( SmpSizes , 31*4 );
+
+ sprintf ( Depacked_OutName , "%ld.mod" , Cpt_Filename-1 );
+ out = PW_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 );
+
+ fflush ( out );
+ fclose ( out );
+
+ printf ( "done\n" );
+ return; /* useless ... but */
+}
--- /dev/null
+/* testStoneCracker270() */
+/* Rip_StoneCracker270() */
+
+
+#include "globals.h"
+#include "extern.h"
+
+
+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 */
+}
+
+
+
+
+void Rip_StoneCracker270 ( 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.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
+/* testSTC299() */
+/* Rip_STC299() */
+
+
+#include "globals.h"
+#include "extern.h"
+
+
+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 */
+}
+
+
+
+
+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
+/* testSTC299b() */
+/* Rip_STC299b() */
+
+
+#include "globals.h"
+#include "extern.h"
+
+
+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 */
+}
+
+
+
+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
+/* testSTC299d() */
+/* Rip_STC299d() */
+
+#include "globals.h"
+#include "extern.h"
+
+
+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 */
+}
+
+
+
+
+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
+/* testSTC300() */
+/* Rip_STC300() */
+
+
+#include "globals.h"
+#include "extern.h"
+
+
+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 */
+}
+
+
+
+
+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
+/* testSTC310() */
+/* Rip_STC310() */
+
+#include "globals.h"
+#include "extern.h"
+
+
+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 */
+}
+
+
+
+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
+/* testSuperCruncher27() */
+/* Rip_SuperCruncher27() */
+
+
+#include "globals.h"
+#include "extern.h"
+
+
+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 */
+}
+
+
+
+
+void Rip_SuperCruncher27 ( void )
+{
+ /* PW_l is still the whole size */
+
+ Uchar * Amiga_EXE_Header_Block;
+
+ 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[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
+/* testSyncroPacker() */
+/* Rip_SyncroPacker() */
+
+
+#include "globals.h"
+#include "extern.h"
+
+
+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 */
+}
+
+
+
+
+void Rip_SyncroPacker ( 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 ( "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
+/* testTMK() */
+/* Rip_TMK() */
+/* Depack_TMK() */
+
+#include "globals.h"
+#include "extern.h"
+
+
+
+short testTMK ( void )
+{
+ /* test 1 */
+ PW_Start_Address = PW_i;
+ if ( (PW_Start_Address+100) > PW_in_size )
+ return BAD;
+
+ /* test 2 - nbr of smps*/
+ PW_j = in_data[PW_Start_Address + 5]&0x7f;
+ if ( PW_j > 0x1f )
+ return BAD;
+
+ /* test 2 - size of patlist */
+ PW_l = in_data[PW_Start_Address + 4];
+ if ( PW_l > 0x80 )
+ return BAD;
+
+ /* test 2,5 - out of in_file ? */
+ if ( PW_Start_Address + 6 + (PW_j*8) + PW_l > PW_in_size )
+ return BAD;
+
+ /* test 3 - fine */
+ for ( PW_k=(PW_Start_Address+12);PW_k<PW_j*8;PW_k+=8)
+ if (in_data[PW_k]>0x0f)
+ return BAD;
+
+ /* test 4 - vol */
+ for ( PW_k=(PW_Start_Address+13);PW_k<PW_j*8;PW_k+=8)
+ if (in_data[PW_k]>0x40)
+ return BAD;
+
+ /* get all smp size */
+ PW_WholeSampleSize = 0;
+ for (PW_k=PW_Start_Address+6;PW_k<PW_Start_Address+6+PW_j*8;PW_k+=8)
+ PW_WholeSampleSize += (((in_data[PW_k]*256)+in_data[PW_k+1])*2);
+
+ /* test 5 - max of line pointer */
+ /* first, max of patlist */
+ PW_m = 0;
+ for ( PW_k=PW_Start_Address+6+(8*PW_j); PW_k<(PW_Start_Address+6+(8*PW_j)+PW_l);PW_k++)
+ if(in_data[PW_k] > PW_m)
+ PW_m = in_data[PW_k]/2 + 1;
+
+ if ( (PW_m*64*2)+6+(8*PW_j)+PW_l+PW_Start_Address > PW_in_size )
+ return BAD;
+
+ return GOOD;
+}
+
+
+
+
+void Rip_TMK ( void )
+{
+ /* PW_j is the number of samples - useless*/
+ /* PW_l is the patlist size */
+ /* PW_WholeSampleSize is the whole sample size :) */
+ /* PW_m is the highest pat nbr */
+
+ /* get highest ref addy */
+ /* also taking care of the uneven patlist size */
+ if ((PW_l/2)*2 != PW_l)
+ PW_l += 1;
+ PW_n = 6+(8*PW_j)+PW_l+PW_Start_Address;
+ /*printf ("\nsize of header (PW_n) : %ld (%lx)\n",PW_n,PW_n);*/
+ /* now PW_n points on the first referencer */
+ /* hence PW_j and PW_l are free */
+ PW_l = 0;
+ for (PW_k=PW_n;PW_k<PW_n+(PW_m*128);PW_k+=2)
+ {
+ PW_o = ((in_data[PW_k]*256)+in_data[PW_k+1]);
+ if (PW_o>PW_l)
+ PW_l = PW_o;
+ }
+ /* PW_l is now the highest ref pointer */
+ /*printf ("highest ref number (PW_l):%ld (%lx)\n",PW_l,PW_l);*/
+ /* remain to depack the last line */
+
+ PW_o = 0;
+ for ( PW_j=0; PW_j<4; PW_j++ )
+ {
+ if ( in_data[PW_l+PW_n+PW_o] == 0x80 ){PW_o+=1;continue;}
+ if ( (in_data[PW_l+PW_n+PW_o] & 0x80) == 0x80 ){PW_o+=2;continue;}
+ PW_o += 3;
+ }
+ /*printf ("last line size (PW_l) : %ld (%lx)\n",PW_o,PW_o);*/
+
+ OutputSize = PW_WholeSampleSize + PW_n + PW_l + PW_o - PW_Start_Address;
+
+ CONVERT = GOOD;
+ Save_Rip ( "TMK module", TMK );
+
+ if ( Save_Status == GOOD )
+ PW_i += (OutputSize - 1); /* 0 should do but call it "just to be sure" :) */
+}
+
+
+
+/*
+ * tmk.c 2003 (c) sylvain "Asle" Chipaux
+ *
+ * Converts TMK packed MODs back to PTK MODs
+ * 20040906 - added the uneven case in the patternlist
+ *
+*/
+
+#define ON 0
+#define OFF 1
+
+#define PATTERN_DATA_ADDY 5222
+
+void Depack_TMK ( void )
+{
+ Uchar *Pattern;
+ long i=0,j=0,k=0,l=0;
+ long Total_Sample_Size=0;
+ Uchar poss[37][2];
+
+ int patdataaddy;
+ int reftableaddy;
+ int maxlineaddy;
+ int sizlastline;
+ long *samplesizes;
+ Uchar patternlist[128];
+ Uchar maxpat = 0x00;
+ Uchar NOP=0x00; /* number of pattern */
+ Uchar NOS=0x00; /* number of sample */
+ Uchar *Whatever;
+ Uchar GLOBAL_DELTA = OFF;
+ long Where = PW_Start_Address;
+ FILE *out;/*,*info;*/
+
+ fillPTKtable(poss);
+
+ if ( Save_Status == BAD )
+ return;
+
+ BZERO ( patternlist , 128 );
+
+ sprintf ( Depacked_OutName , "%ld.mod" , Cpt_Filename-1 );
+ out = PW_fopen ( Depacked_OutName , "w+b" );
+ if (!out)
+ return;
+ /*info = fopen ( "info", "w+b");*/
+
+ Whatever = (Uchar *) malloc (128);
+ BZERO (Whatever,128);
+
+ /* title */
+ fwrite ( &Whatever[0] , 20 , 1 , out );
+
+ /* bypass TMK.*/
+ Where += 4;
+ /*fprintf ( info,"bypass TMK (Where = %ld)\n",Where);*/
+
+ /* get nbr of samples/patterns */
+ NOP = in_data[Where];
+ NOS = in_data[Where+1]&0x7f;
+ if ( (in_data[Where+1]&0x80) == 0x80 )
+ GLOBAL_DELTA = ON;
+ Where += 2;
+ samplesizes = (long *) malloc (NOS*sizeof(long));
+
+ /*fprintf ( info,"NOP:%d NOS %d (Where = %ld)\n",NOP,NOS,Where);*/
+ for ( i=0 ; i<NOS ; i++ )
+ {
+ /*sample name*/
+ fwrite ( &Whatever[32] ,22 , 1 , out );
+
+ /* siz */
+ fwrite ( &in_data[Where],2,1,out);
+ /* fine/vol */
+ fwrite ( &in_data[Where+6],2,1,out);
+ /* repstart/replen */
+ fwrite ( &in_data[Where+2],4,1,out);
+
+ /* whole sample size */
+ Total_Sample_Size += (((in_data[Where]*256)+in_data[Where+1])*2);
+ samplesizes[i] = (((in_data[Where]*256)+in_data[Where+1])*2);
+ Where += 8;
+ }
+ Whatever[29] = 0x01;
+ while (i<31)
+ {
+ fwrite (Whatever,30,1,out);
+ i++;
+ }
+
+ /* write patlist (get also max) */
+ fwrite (&NOP,1,1,out);
+ Whatever[0] = 0x7f;
+ fwrite (&Whatever[0],1,1,out);
+ for (i=0 ; i<NOP ; i++)
+ {
+ patternlist[i] = in_data[Where+i]/2; /*pat list nbrs are *2 */
+ if ( patternlist[i] > maxpat )
+ maxpat = patternlist[i];
+ }
+ fwrite (patternlist,128,1,out);
+ maxpat += 1; /* the first value is 0 ... */
+
+ /*fprintf (info,"maxpat : %d(%x)\n",maxpat,maxpat);*/
+
+ Where += NOP;
+
+ /* write tag */
+ Whatever[0] = 'M';
+ Whatever[1] = Whatever[3] = '.';
+ Whatever[2] = 'K';
+
+ fwrite ( &Whatever[0] , 4 , 1 , out );
+ free ( Whatever );
+
+ /* taking care of the uneven case of patlist size */
+ if ( (NOP/2)*2 != NOP )
+ Where += 1;
+ reftableaddy = Where;
+ patdataaddy = maxpat*128 + reftableaddy; /* one ref is a short:64*2 */
+ /*fprintf ( info,"reftableaddy:%x\n"
+ "patdataaddy:%x\n",reftableaddy,patdataaddy);*/
+
+ /*get siz of last 4 notes at max(patdataaddy) */
+ maxlineaddy = 0;
+ for ( i=reftableaddy; i<patdataaddy; i+=2 )
+ {
+ k = (in_data[i]*256 + in_data[i+1]);
+ if ( k > maxlineaddy )
+ maxlineaddy = k;
+ }
+
+ /*fprintf ( info,"maxlineaddy : %d (%x)\n",maxlineaddy,maxlineaddy);*/
+ maxlineaddy += reftableaddy; /* to reach the real addy in mem/file */
+ k = maxlineaddy;
+
+ sizlastline = 0;
+ for ( i=0; i<4; i++ )
+ {
+ if ( in_data[k] == 0x80 ){sizlastline += 1;k+=1;continue;}
+ if ( (in_data[k] & 0x80) == 0x80 ){sizlastline += 2;k+=2;continue;}
+ else
+ sizlastline+=3;
+ k += 3;
+ }
+
+ /*fprintf (info,"sizlastline : %d\n",sizlastline);*/
+
+ /* pat data */
+ Pattern = (Uchar *) malloc (1024);
+ for ( i=0 ; i<maxpat ; i+=1 )
+ {
+ BZERO (Pattern, 1024);
+ for (j=0; j<64; j++)
+ {
+ k = (in_data[reftableaddy+(i*128)+(j*2)]*256)
+ +in_data[reftableaddy+(i*128)+(j*2)+1]
+ +reftableaddy;
+ /*fprintf (info,"--k:%lx--\n",k);*/
+ for (l=0;l<4;l++)
+ {
+ if ( in_data[k] == 0x80 )
+ {
+ /*fprintf (info,"[%2ld][%2ld][%1ld]> empty (%lx)\n",i,j,l,k);*/
+ k += 1;
+ continue;
+ }
+ if ( (in_data[k] & 0xC0) == 0xC0 )
+ { /* only sfx */
+ /*fprintf (info,"[%2ld][%2ld][%1ld]> %2x,%2x (%lx) <- sfx only\n",i,j,l,in_data[k]&0x0f,in_data[k+1],k);*/
+ Pattern[j*16+l*4+2] = in_data[k]&0x0f;
+ Pattern[j*16+l*4+3] = in_data[k+1];
+ k += 2;
+ continue;
+ }
+ if ( (in_data[k] & 0xC0) == 0x80 )
+ { /* note (not *2!) + smp */
+ /*fprintf (info,"[%2ld][%2ld][%1ld]> %2x,%2x (%lx)",i,j,l,in_data[k]&0x0f,in_data[k+1],k);*/
+ Pattern[j*16+l*4] = in_data[k+1]&0xf0;
+ Pattern[j*16+l*4] |= poss[in_data[k]&0x7f][0];
+ Pattern[j*16+l*4+1] = poss[in_data[k]&0x7f][1];
+ Pattern[j*16+l*4+2] = in_data[k+1]<<4;
+ /*fprintf (info," ->%2x,%2x,%2x,%2x\n",Pattern[j*16+l*4],Pattern[j*16+l*4+1],Pattern[j*16+l*4+2],Pattern[j*16+l*4+3]);*/
+ k += 2;
+ continue;
+ }
+ else
+ {
+ /*fprintf (info,"[%2ld][%2ld][%1ld]> %2x,%2x,%2x (%lx)",i,j,l,in_data[k]&0x7f,in_data[k+1],in_data[k+2],k);*/
+ Pattern[j*16+l*4] = (in_data[k]&0x01)<<4;
+ Pattern[j*16+l*4] |= poss[in_data[k]/2][0];
+ Pattern[j*16+l*4+1] = poss[in_data[k]/2][1];
+ Pattern[j*16+l*4+2] = in_data[k+1];
+ Pattern[j*16+l*4+3] = in_data[k+2];
+ /*fprintf (info," ->%2x,%2x,%2x,%2x\n",Pattern[j*16+l*4],Pattern[j*16+l*4+1],Pattern[j*16+l*4+2],Pattern[j*16+l*4+3]);*/
+ k += 3;
+ }
+ }
+ if (k+8 > Where) Where = k+8;
+ /*fprintf ( info ,"\n");*/
+ }
+ fwrite (Pattern,1024,1,out);
+ }
+
+ free (Pattern);
+
+
+ /* sample data */
+ /*printf ( "Total sample size : %ld\n" , Total_Sample_Size );*/
+
+ if ( GLOBAL_DELTA == ON )
+ {
+ Uchar c1,c2,c3;
+ signed char *SmpDataWork;
+ k = maxlineaddy+sizlastline;
+ for ( i=0; i<NOS; i++ )
+ {
+ SmpDataWork = (signed char *) malloc ( samplesizes[i] );
+ for ( j=0 ; j<samplesizes[i] ; j++ )
+ SmpDataWork[j] = in_data[k+j];
+ 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 );
+ k += samplesizes[i];
+ }
+ }
+ else
+ fwrite ( &in_data[maxlineaddy+sizlastline] , Total_Sample_Size , 1 , out );
+
+ if ( GLOBAL_DELTA == ON )
+ Crap ( " TMK " , GOOD , BAD , out );
+ else
+ Crap ( " TMK " , BAD , BAD , out );
+
+ fflush ( out );
+ fclose ( out );
+ /*fclose ( info );*/
+
+ printf ( "done\n" );
+ return; /* useless ... but */
+}
--- /dev/null
+/* testTNMCruncher11() */
+/* Rip_TNMCruncher11() */
+
+
+#include "globals.h"
+#include "extern.h"
+
+
+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 */
+}
+
+
+
+
+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;
+
+ 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
+/* testTetrapack102() */
+/* Rip_Tetrapack102() */
+
+#include "globals.h"
+#include "extern.h"
+
+
+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 */
+}
+
+
+
+
+void Rip_Tetrapack102 ( 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 ( "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
+/* testTetrapack_2_1() */
+/* Rip_Tetrapack_2_1() */
+
+#include "globals.h"
+#include "extern.h"
+
+
+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 */
+}
+
+
+
+
+void Rip_Tetrapack_2_1 ( 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 ( "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
+/* testTetrapack_2_2() */
+/* Rip_Tetrapack_2_2() */
+
+#include "globals.h"
+#include "extern.h"
+
+
+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 */
+}
+
+
+
+
+void Rip_Tetrapack_2_2 ( 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 ( "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
+/* testTheDarkDemon() */
+/* Rip_TheDarkDemon() */
+/* Depack_TheDarkDemon() */
+
+
+#include "globals.h"
+#include "extern.h"
+
+
+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;
+}
+
+
+
+void Rip_TheDarkDemon ( void )
+{
+ /* PW_WholeSampleSize is the WholeSampleSize + pattern data size */
+
+ /* 564 = header */
+ OutputSize = PW_WholeSampleSize + 564;
+
+ 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" :) */
+}
+
+
+
+/*
+ * 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
+ *
+*/
+
+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;
+
+ fillPTKtable(poss);
+
+ BZERO ( SampleAddresses , 31*4 );
+ BZERO ( SampleSizes , 31*4 );
+
+ sprintf ( Depacked_OutName , "%ld.mod" , Cpt_Filename-1 );
+ out = PW_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
+/* tests sone in ThePlayer40.c */
+/* Rip_P22A() */
+/* Depack_P22() */
+
+
+#include "globals.h"
+#include "extern.h"
+
+
+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" :) */
+}
+
+
+
+/*
+ * 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
+*/
+
+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 );
+
+ fillPTKtable(poss);
+
+ sprintf ( Depacked_OutName , "%ld.mod" , Cpt_Filename-1 );
+ out = PW_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
+/* tests sone in ThePlayer40.c */
+/* Rip_P30A() */
+/* Depack_P30() */
+
+#include "globals.h"
+#include "extern.h"
+
+
+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" :) */
+}
+
+
+
+
+/*
+ * 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
+*/
+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 );
+
+ fillPTKtable(poss);
+
+ sprintf ( Depacked_OutName , "%ld.mod" , Cpt_Filename-1 );
+ out = PW_fopen ( Depacked_OutName , "w+b" );
+ if (!out)
+ return;
+ if ( out == NULL)
+ /* 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
+/* testP40A() */
+/* Rip_P40A() */
+/* Rip_P40B() */
+/* Depack_P40() */
+
+#include "globals.h"
+#include "extern.h"
+
+
+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;
+}
+
+
+
+void Rip_P40A ( void )
+{
+ 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;
+
+ 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" :) */
+}
+
+
+
+void Rip_P40B ( void )
+{
+ 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;
+
+ 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" :) */
+}
+
+
+
+/*
+ * 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
+*/
+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 );
+
+ fillPTKtable(poss);
+
+ sprintf ( Depacked_OutName , "%ld.mod" , Cpt_Filename-1 );
+ out = PW_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
+/* testP41A() */
+/* Rip_P41A() */
+/* Depack_P41A() */
+
+#include "globals.h"
+#include "extern.h"
+
+
+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;
+}
+
+
+
+void Rip_P41A ( void )
+{
+ 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;
+
+ 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" :) */
+}
+
+
+
+/*
+ * 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
+*/
+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 );
+
+ fillPTKtable(poss);
+
+ sprintf ( Depacked_OutName , "%ld.mod" , Cpt_Filename-1 );
+ out = PW_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
+/* update on the 3rd of april 2000 */
+/* bug pointed out by Thomas Neumann ... thx */
+
+/* testP50A() */
+/* Rip_P50A() */
+/* Depack_P50A() */
+
+
+#include "globals.h"
+#include "extern.h"
+
+
+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;
+}
+
+
+
+void Rip_P50A ( void )
+{
+ /* PW_j is the number of sample */
+ /* PW_WholeSampleSize is the whole sample data size */
+
+ OutputSize = PW_j + PW_WholeSampleSize;
+
+ 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" :) */
+}
+
+
+
+/*
+ * 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
+*/
+
+#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 );
+
+ fillPTKtable(poss);
+
+ sprintf ( Depacked_OutName , "%ld.mod" , Cpt_Filename-1 );
+ out = PW_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
+/* testP60A_nopack() */
+/* testP60A_pack() */
+/* Rip_P60A() */
+/* Depack_P60A() */
+
+
+#include "globals.h"
+#include "extern.h"
+
+
+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;
+}
+
+
+
+
+void Rip_P60A ( void )
+{
+ /* PW_j is the number of sample */
+ /* PW_WholeSampleSize is the whole sample data size */
+
+ OutputSize = PW_j + PW_WholeSampleSize;
+
+ 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" :) */
+}
+
+
+
+/*
+ * 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
+*/
+
+#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;*/
+ }
+
+ fillPTKtable(poss);
+
+ sprintf ( Depacked_OutName , "%ld.mod" , Cpt_Filename-1 );
+ out = PW_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
+/* testP61A_nopack() */
+/* testP61A_pack () */
+/* Rip_P61A() */
+/* Depack_P61A() */
+
+
+#include "globals.h"
+#include "extern.h"
+
+
+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;
+}
+
+
+
+void Rip_P61A ( void )
+{
+ /* PW_j is the number of sample */
+ /* PW_WholeSampleSize is the whole sample data size */
+
+ OutputSize = PW_j + PW_WholeSampleSize;
+
+ 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" :) */
+}
+
+
+
+/*
+ * 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
+*/
+
+#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;*/
+ }
+
+ fillPTKtable(poss);
+
+ sprintf ( Depacked_OutName , "%ld.mod" , Cpt_Filename-1 );
+ out = PW_fopen ( Depacked_OutName , "w+b" );
+ if (!out)
+ return;
+
+ /* 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" );*/
+
+ /* crap for GLOBAL_DELTA is taken cared of elsewhere */
+ if ( GLOBAL_DELTA == ON )
+ Crap ( " The Player 6.1A " , GOOD , BAD , out );
+ else
+ Crap ( " The Player 6.1A " , BAD , BAD , out );
+
+ fclose ( out );
+
+ printf ( "done\n" );
+ return; /* useless ... but */
+}
--- /dev/null
+/* testTimeCruncher17() */
+/* Rip_TimeCruncher17() */
+
+
+#include "globals.h"
+#include "extern.h"
+
+
+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 */
+}
+
+
+
+
+void Rip_TimeCruncher17 ( 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 - 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
+/* testTP1() */
+/* Rip_TP1() */
+/* Depack_TP1() */
+
+
+#include "globals.h"
+#include "extern.h"
+
+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;
+}
+
+
+
+
+void Rip_TP1 ( void )
+{
+ /* PW_WholeSampleSize is the size of the module :) */
+
+ OutputSize = PW_WholeSampleSize;
+
+ CONVERT = GOOD;
+ Save_Rip ( "Tracker Packer v1 module", TP1 );
+
+ if ( Save_Status == GOOD )
+ PW_i += (OutputSize - 1); /* 0 could be enough */
+}
+
+
+
+/*
+ * 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.
+ *
+*/
+
+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;
+
+ fillPTKtable(poss);
+
+ if ( Save_Status == BAD )
+ return;
+
+ BZERO ( Pats_Address , 128*4 );
+
+ sprintf ( Depacked_OutName , "%ld.mod" , Cpt_Filename-1 );
+ out = PW_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
+/* testTP2() */
+/* Rip_TP2() */
+/* Depack_TP2() */
+
+
+/*
+ * bug correction in the lqst test ...
+ * (Thomas Neumann again ...)
+*/
+
+#include "globals.h"
+#include "extern.h"
+
+
+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;
+}
+
+
+
+
+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;
+
+ CONVERT = GOOD;
+ Save_Rip ( "Tracker Packer v2 module", TP2 );
+
+ if ( Save_Status == GOOD )
+ PW_i += (OutputSize - 1); /* 0 could be enough */
+}
+
+
+
+/*
+ * 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.
+*/
+
+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;*/
+
+ fillPTKtable(poss);
+
+ if ( Save_Status == BAD )
+ return;
+
+ BZERO ( Track_Address , 128*4*4 );
+ BZERO ( Pats_Numbers , 128 );
+
+ sprintf ( Depacked_OutName , "%ld.mod" , Cpt_Filename-1 );
+ out = PW_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
+/* testTP3() */
+/* Rip_TP3() */
+/* Depack_TP3() */
+
+
+#include "globals.h"
+#include "extern.h"
+
+
+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;
+}
+
+
+
+
+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;
+
+ CONVERT = GOOD;
+ Save_Rip ( "Tracker Packer v3 module", TP3 );
+
+ if ( Save_Status == GOOD )
+ PW_i += (OutputSize - 1); /* 0 could be enough */
+}
+
+
+
+/*
+ * 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.
+*/
+
+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;
+
+ fillPTKtable(poss);
+
+ if ( Save_Status == BAD )
+ return;
+
+ BZERO ( Track_Address , 128*4*4 );
+
+ sprintf ( Depacked_OutName , "%ld.mod" , Cpt_Filename-1 );
+ out = PW_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 );
+
+ fflush ( out );
+ fclose ( out );
+
+ printf ( "done\n" );
+ return; /* useless ... but */
+}
--- /dev/null
+/* testTryIt101() */
+/* Rip_TryIt101() */
+
+
+#include "globals.h"
+#include "extern.h"
+
+
+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 */
+}
+
+
+
+
+void Rip_TryIt101 ( 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 )
+ {
+ 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
+/* testTurboSqueezer61() */
+/* Rip_TurboSqueezer61() */
+
+
+#include "globals.h"
+#include "extern.h"
+
+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 */
+}
+
+
+
+
+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
+/* testUNIC_withID() */
+/* testUNIC_withemptyID() */
+/* testUNIC_noID() */
+/* Rip_UNIC_withID() */
+/* Rip_UNIC_noID() */
+/* Depack_UNIC() */
+
+
+/*
+ * 27 dec 2001 : added some checks to prevent reading outside of input file.
+ * 18 mar 2003 : a small bug in first test ...
+*/
+
+#include "globals.h"
+#include "extern.h"
+
+
+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 */
+}
+
+
+
+
+void Rip_UNIC_withID ( void )
+{
+ /* PW_k is still the nbr of pattern */
+
+ OutputSize = PW_WholeSampleSize + (PW_k*768) + 1084;
+
+ 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;
+
+ 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" :) */
+}
+
+
+
+/*
+ * 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 :).
+ *
+*/
+
+#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;
+
+ fillPTKtable(poss);
+
+ if ( Save_Status == BAD )
+ return;
+
+ sprintf ( Depacked_OutName , "%ld.mod" , Cpt_Filename-1 );
+ out = PW_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 );
+
+ fflush ( out );
+ fclose ( out );
+
+ printf ( "done\n" );
+ return; /* useless ... but */
+}
+
--- /dev/null
+/* testUNIC2() */
+/* Rip_UNIC2() */
+/* Depack_UNIC2() */
+
+
+/* update on the 3rd of april 2000 */
+/* bugs pointed out by Thomas Neumann .. thx :) */
+
+#include "globals.h"
+#include "extern.h"
+
+
+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;
+}
+
+
+
+void Rip_UNIC2 ( void )
+{
+ /* PW_k is still the nbr of pattern */
+
+ OutputSize = PW_WholeSampleSize + (PW_k*768) + 1060;
+
+ 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" :) */
+}
+
+
+/*
+ * 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.
+*/
+
+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;
+
+ fillPTKtable(poss);
+
+ if ( Save_Status == BAD )
+ return;
+
+ sprintf ( Depacked_OutName , "%ld.mod" , Cpt_Filename-1 );
+ out = PW_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 );
+
+ fflush ( out );
+ fclose ( out );
+
+ printf ( "done\n" );
+ return; /* useless ... but */
+}
+
--- /dev/null
+/* testWN() */
+/* Rip_WN() */
+/* Depack_WN() */
+
+#include "globals.h"
+#include "extern.h"
+
+
+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;
+}
+
+
+
+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;
+
+ 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" :) */
+}
+
+
+
+/*
+ * 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.
+*/
+
+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;
+
+ fillPTKtable(poss);
+
+ if ( Save_Status == BAD )
+ return;
+
+ sprintf ( Depacked_OutName , "%ld.mod" , Cpt_Filename-1 );
+ out = PW_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 );
+
+ fflush ( out );
+ fclose ( out );
+
+ printf ( "done\n" );
+ return; /* useless ... but */
+}
--- /dev/null
+/* testXANN() */
+/* Rip_XANN() */
+/* Depack_XANN() */
+
+#include "globals.h"
+#include "extern.h"
+
+
+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;
+}
+
+
+
+
+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" :) */
+}
+
+
+
+/*
+ * 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
+*/
+
+#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;
+
+ fillPTKtable(poss);
+
+ if ( Save_Status == BAD )
+ return;
+
+ sprintf ( Depacked_OutName , "%ld.mod" , Cpt_Filename-1 );
+ out = PW_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 );
+
+ fflush ( out );
+ fclose ( out );
+
+ printf ( "done\n" );
+ return; /* useless ... but */
+}
+
--- /dev/null
+/* testZEN() */
+/* Rip_ZEN() */
+/* Depack_ZEN() */
+
+#include "globals.h"
+#include "extern.h"
+
+
+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;
+}
+
+
+
+void Rip_ZEN ( void )
+{
+ /* PW_n is the highest sample data address */
+ /* PW_WholeSampleSize if its size */
+
+ OutputSize = PW_WholeSampleSize + PW_n;
+
+ 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" :) */
+}
+
+
+
+/*
+ * 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
+*/
+
+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;
+
+ fillPTKtable(poss);
+
+ 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 = PW_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 );
+
+ fflush ( out );
+ fclose ( out );
+
+ printf ( "done\n" );
+ return; /* useless ... but */
+}
--- /dev/null
+/* testArcDDataCruncher() */
+/* testCRND() */
+
+#include "globals.h"
+#include "extern.h"
+
+
+short testArcDDataCruncher ( void )
+{
+ 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;
+}
+
+
+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[PW_l-16] );
+
+ return GOOD;
+}
--- /dev/null
+/*
+ * extern.h
+ *
+ * part of Pro-Wizard-1 package
+ * (c) Sylvain "Asle" Chipaux
+*/
+
+/* tests */
+#ifdef INCLUDEALL
+extern short testArcDDataCruncher ( 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 testDoubleAction10 ( void );
+extern short testDragpack100 ( void );
+extern short testDragpack252 ( void );
+extern short testHQCCruncher2 ( void );
+extern short testMasterCruncher30addr ( void );
+extern short testMaxPacker12 ( void );
+extern short testMegaCruncher10 ( void );
+extern short testMegaCruncher12 ( void );
+extern short testMegaCruncherObj ( void );
+extern short testPowerpacker23 ( void );
+extern short testPowerpacker30 ( void );
+extern short testPowerpacker40 ( void );
+extern short testPowerpacker4lib ( void );
+extern short testPPbk ( void );
+extern short testRelokIt10 ( void );
+extern short testSpikeCruncher ( void );
+extern short testSTC299 ( void );
+extern short testSTC299b ( void );
+extern short testSTC299d ( void );
+extern short testSTC300 ( void );
+extern short testSTC310 ( 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 testTimeCruncher17 ( void );
+extern short testTNMCruncher11 ( void );
+extern short testTryIt101 ( void );
+extern short testTurboSqueezer61 ( void );
+#endif
+extern short testAC1D ( void );
+extern short testAmBk ( void );
+extern short testBP ( void );
+extern short testBSIFutureComposer ( void );
+extern short testDI ( void );
+extern short testDigiBooster17 ( 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 testHRT ( void );
+extern short testJamCracker ( void );
+extern short testKRIS ( void );
+extern short testKSM ( void );
+extern short testMMD0 ( void );
+extern short testMOD ( int );
+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 testPP10 ( void );
+extern short testPP21 ( void );
+extern short testPP30 ( void );
+extern short testPRUN1 ( void );
+extern short testPRUN2 ( void );
+/*extern short testPTK ( void );*/
+extern short testQuadraComposer ( void );
+extern short testSKYT ( void );
+extern short testSoundFX13 ( void );
+extern short testSoundTracker ( void );
+extern short testSTARPACK ( void );
+extern short testSTK26 ( void );
+extern short testSTIM ( void );
+extern short testTheDarkDemon ( void );
+extern short testTMK ( void );
+extern short testTP1 ( void );
+extern short testTP2 ( void );
+extern short testTP3 ( 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 */
+
+#ifdef INCLUDEALL
+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_DoubleAction10 ( void );
+extern void Rip_Dragpack100 ( void );
+extern void Rip_Dragpack252 ( void );
+extern void Rip_HQCCruncher2 ( void );
+extern void Rip_MasterCruncher30addr ( void );
+extern void Rip_MaxPacker12 ( void );
+extern void Rip_MegaCruncher ( void );
+extern void Rip_MegaCruncherObj ( void );
+extern void Rip_Powerpacker23 ( void );
+extern void Rip_Powerpacker30 ( void );
+extern void Rip_Powerpacker40 ( void );
+extern void Rip_Powerpacker4lib ( void );
+extern void Rip_PPbk ( void );
+extern void Rip_RelokIt10 ( void );
+extern void Rip_SpikeCruncher ( 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_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_TimeCruncher17 ( void );
+extern void Rip_TNMCruncher11 ( void );
+extern void Rip_TryIt101 ( void );
+extern void Rip_TurboSqueezer61 ( void );
+#endif
+extern void Rip_AC1D ( void );
+extern void Rip_AmBk ( void );
+extern void Rip_BP ( void );
+extern void Rip_BSIFutureComposer ( void );
+extern void Rip_DI ( void );
+extern void Rip_DigiBooster17 ( 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_HRT ( void );
+extern void Rip_JamCracker ( void );
+extern void Rip_KRIS ( void );
+extern void Rip_KSM ( void );
+extern void Rip_MMD0 ( void );
+extern void Rip_MOD ( int );
+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_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_PP10 ( void );
+extern void Rip_PP21 ( void );
+extern void Rip_PP30 ( void );
+/*extern void Rip_PTK ( void );*/
+extern void Rip_QuadraComposer ( void );
+extern void Rip_SKYT ( void );
+extern void Rip_SoundFX13 ( void );
+extern void Rip_SoundTracker ( void );
+extern void Rip_STARPACK ( void );
+/*extern void Rip_StarTrekker ( void );*/
+extern void Rip_STK26 ( void );
+extern void Rip_STIM ( void );
+extern void Rip_TheDarkDemon ( void );
+extern void Rip_TMK ( void );
+extern void Rip_TP1 ( void );
+extern void Rip_TP2 ( void );
+extern void Rip_TP3 ( 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_TMK ( 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 * );
+extern FILE * PW_fopen ( char *, char * );
+extern void fillPTKtable ( Uchar[37][2] );
+
+/* 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>
+#if 0
+#include <sys/param.h>
+#endif
+#include <sys/types.h>
+#include <sys/stat.h>
+/*#include <gtk/gtk.h>*/
+#ifdef DOS
+#include <winsock.h>
+#endif
+#ifdef DMALLOC
+#include "dmalloc.h"
+#endif
+
+
+typedef unsigned char Uchar;
+typedef unsigned long Ulong;
+typedef unsigned short Ushort;
+
+#include "moduleripper.h"
+#ifdef _WIN32
+__inline Ulong htonl (Ulong v)
+{
+ return (v >> 24) | ((v >> 8) & 0xff00) | (v << 24) | ((v << 8) & 0xff0000);
+}
+#endif
+
+#define _KNOWN_FORMATS 126
+#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,
+ TMK,
+ DragPack252,
+ DragPack100,
+ SpeedPacker3Data,
+ AtomikPackerData,
+ AutomationPackerData,
+};
--- /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
+ 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
+/*
+ * 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
+# 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-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
+#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