Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.sys.sinclair > #4195

Re: Fuse 1.2.0 release

From Volker Bartheld <news2016@bartheld.net>
Newsgroups comp.sys.sinclair
Subject Re: Fuse 1.2.0 release
Date 2016-06-10 08:10 +0200
Organization bartheld.net
Message-ID <19jo5lfltqfte$.dlg@news.bartheld.net> (permalink)
References <nj697j$2v8$1@gioia.aioe.org> <pfuflbdtkv7s4845nvio874n5va251qa7q@4ax.com> <a6b7c24c-4536-42f5-a149-9411d01a4a1f@googlegroups.com> <cfailbh1b30aoptbfr5s9mo40djtnbankh@4ax.com>

Show all headers | View raw


Hi!

On Thu, 09 Jun 2016 10:03:56 +0100, p-0''0-h the cat (ES) wrote:
> I have some on microdrive and some on cassette I think. Has anyone got
> any tips? Last time I tried [~10-15 years ago] the cassettes were
> generally OK but the tape in the microdrives had stuck together on some.
> The pressure foam had rotted as well but that was easy to fix. Should I
> change /can I get new pinch wheels?

Message-ID: <vxeiw9fgl8la$.dlg@news.bartheld.net> might help.

For MDV cartridges, I had success removing the felt/foam from the little
brass pressure spring (tweezers), cleaning the surfaces as good as possible
(isopropylic alcohol). Then replace the foam with DIY double sided
adhesive foam tape, something like
- https://www.amazon.de/doppelseitiges-SchaumKlebeband-9515W-wei%C3%9F-8021684551635/dp/B002ZXWUEY
- https://www.klebeshop24.de/Schaumklebeband-doppelseitig-1-mm-Dicke ,
whatever is available. Should be around 1mm thick. Use the old felt ontop.

Most likely, your cartridges will work again, mechanically. Logically these
media suffer from the dreaded "magnetic print through" problem BASF Super
Chrome Tapes are infamous for. E. g. one tape layer magnetizes the layer
ontop/below after some time. My data was corrupted in most cases, at least
using the Microdrive's standard hardware to read the cartridges.

You could use just the drive mechanics, digitize the bitstream directly
from the drive head(s - it's Stereo) with a measurement amplifier/ADC and
then run some DSP magic on it to increase SNR again. I stopped at this
point, not enough time.

If you want to investigate yourself:
http://www.worldofspectrum.org/utilities.html ->
http://www.worldofspectrum.org/pub/sinclair/tools/pc/mdv2img.zip

No need to change the pinch wheel(s) in my case.

> Another question. Is there a way to write Z80 assembler in Windows and
> assemble it into like a .tap file or something?

Sure. I recommend tniASM (http://tniasm.tni.nl) as preferred assembler.
The .tap-Format ist trivial: http://www.worldofspectrum.org/faq/reference/formats.htm
, it's not even worth writing a tool for it. Say your M/C starts at 32768
and ends at 65545, then prepend the raw binary code with 0x8000 (which
would be the length), then insert your .tap and run

CLEAR 32767
LOAD "" CODE 32768
RANDOMIZE USR 32768

from the emulator.

If you need more comfort, check out bintap (I'm quoting it below, since it
seems to be hard to get) or bas2tap
(http://www.worldofspectrum.org/pub/sinclair/tools/generic/bas2tap26-generic.zip).

From time to time, I use a Sinclair Basic loader to POKE the data (just as
in the old times, when we were typing things from magazines), e.g.

70 RESTORE 1000
80 LET c=0
90 LET a=32768
100
200 PRINT AT 4,0;"Loading machine code..."
210 FOR i=1000 TO 1999
220 READ h$
230 PRINT AT 5,0;h$
240 FOR j=1 TO LEN h$ STEP 2
250 LET s$=h$(j)
260 GO SUB 800
270 LET v=16*s
280 LET s$=h$(j+1)
290 GO SUB 800
300 LET v=v+s
310 POKE a,v
320 LET c=c+v
330 LET a=a+1
340 NEXT j
350 NEXT i
360
400 IF c=<yourchecksum_here> THEN GO TO 500
410 PRINT "Checksum ",c," incorrect."
420 STOP
430
500 PRINT "Checksum ",c," OK."
510 PAUSE 0
520 RANDOMIZE USR 32768
520
900 REM Machine Code Data
1000 DATA "00000000000000000000000000000000"
1001 REM 16 hex bytes in every line...
1999 REM The End

Greets & HTH,
Volker


<bintap.h>
// BINTAP version 1.1
// By the infamous BLOOD!
// (C)1996 Cheese Freak Software
//         modifications 2012 by Volker Bartheld (www.bartheld.net)
// This prog is most definitely FREEWARE!
// But please don't distribute updated versions without asking first...!

typedef unsigned char BYTE;

void getheader(BYTE header[21], char *filename, char *length, unsigned int fl);
void conv(BYTE *high, BYTE *low, size_t number);
unsigned int getsize(FILE *fp);
</bintap.h>

<bintap.cpp>
// BINTAP version 1.1
// By the infamous BLOOD!
// (C)1996 Cheese Freak Software
//         modifications 2012 by Volker Bartheld (www.bartheld.net)
// This prog is most definitely FREEWARE!
// But please don't distribute updated versions without asking first...!

#include <stdio.h>
#include <stdlib.h>
#include <io.h>
#include <string.h>
#include "bintap.h"

void main(int argc, char *argv[])
{
  FILE *fp1, *fp2;
  BYTE header[21], checkbit=0, buffer[3];
  unsigned int count;
  size_t result;
  unsigned int fl;
  BYTE high, low;

  printf("\n\nBINTAP version 1.1\n");
  printf("Written by the infamous BLOOD! (l.d.tonks@bra0202.wins.icl.co.uk)\n");
  printf("(C)1996 Cheese Freak Software\n");
  printf("        modifications 2012 by Volker Bartheld (www.bartheld.net)\n");
  printf("This program is FREEWARE! Don't pay more than 2p for it!\n\n");

  if(argc!=5)
  {
    printf("Usage : BINTAP <bin. filename> <.tap filename> <speccy filename> <.org address>\n");
    printf("Example : BINTAP jetset.obj jetset.tap jetset 32000\n\n");
    exit(0);
  }
  else
  {
    printf("Converting %s to %s....\n", argv[1], argv[2]);
    fp1=fopen(argv[1],"rb");
    if(fp1==NULL)
    {
      printf("Error opening %s...!\n", argv[1]);
      exit(1);
    };
    fp2=fopen(argv[2],"wb");
    if(fp2==NULL)
    {
      printf("Error opening %s...!\n", argv[2]);
      fclose(fp1);
      exit(1);
    };

    // CREATE HEADER 
    fl=getsize(fp1);
    getheader(header,argv[3], argv[4], fl);
    result=fwrite(header, 21, 1, fp2);
    if(result!=1)
    {
      printf("Can't write to %s...!\n", argv[2]);
      fclose(fp1);
      fclose(fp2);
      exit(1);
    };

    // NOT RIGHT YET 
    conv(&high, &low, fl+2);
    buffer[0]=low;
    buffer[1]=high;
    buffer[2]=255;
    checkbit=(checkbit ^ buffer[2]);

    result=fwrite(buffer,3,1,fp2);
    if(result!=1)
    {
      printf("Write error in %s...!\n",argv[2]);
      fclose(fp1);
      fclose(fp2);
      exit(1);
    };

    for(count=0;count<fl;count++)
    {
      result=fread(buffer, 1, 1, fp1);
      if(result!=1)
      {
        printf("Read error in %s...!\n", argv[1]);
        fclose(fp1);
        fclose(fp2);              
        exit(1);
      };
      result=fwrite(buffer, 1, 1, fp2);
      if(result!=1)
      {
        printf("Write error in %s...!\n", argv[2]);
        fclose(fp1);
        fclose(fp2);
        exit(1);
      };
      checkbit=(checkbit ^ buffer[0]);            
    };

    buffer[0]=checkbit;
    result=fwrite(buffer,1,1,fp2);
    if(result!=1)
    {
      printf("Write error in %s...!\n", argv[2]);
      fclose(fp1);
      fclose(fp2);
      exit(1);
    };

    printf("\nConversion done...!\n");

    fclose(fp1);
    fclose(fp2);
  };
}


void getheader(BYTE header[21], char *filename, char *length, unsigned int fl)
{
  size_t len, count;
  BYTE checkbit=0;
  BYTE high, low;

  // MANDATORY BIT 
  header[0]=19;    
  header[1]=0;    
  header[2]=0;    
  header[3]=3;

  // NEXT 10 BYTES ARE FILENAME 
  len=strlen(filename);
  if(len>10) len=10;
  for(count=0; count<len; count++) header[count+4]=filename[count];
  if(len<10)
    for(count=len;count<10;count++) header[count+4]=32;

  // CODE DATA 
  conv(&high,&low,fl);
  header[14]=low;    
  header[15]=high;
  len=atoi(length);
  conv(&high,&low,len);    
  header[16]=low;    
  header[17]=high;    
  header[18]=0;    
  header[19]=128;

  // CHECK BIT 
  for(count=2; count<20; count++) checkbit=(checkbit ^ header[count]);
  header[20]=checkbit;
}


void conv(BYTE *high, BYTE *low, size_t number)
{
  int temp;

  *high=(BYTE)(number/256);
  temp=(int)  (*high)*256;
  *low=(BYTE) (number-temp);
}


unsigned int getsize(FILE *fp)
{
  fseek(fp, 0L, SEEK_END);
  long l=ftell(fp);
  fseek(fp, 0L, SEEK_SET); // reset file pointer 
  return l;   
}
</bintap.cpp>


-- 
@:  W E B 2 0 1 6 at B A R T H E L D dot N E T
3W: www.bartheld.net

Back to comp.sys.sinclair | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Fuse 1.2.0 release Fred <fredm@spamcop.net> - 2016-06-07 10:55 +0000
  Re: Fuse 1.2.0 release "p-0''0-h the cat (ES)" <super.pooh@fluffyunderbelly.invalid> - 2016-06-08 12:04 +0100
    Re: Fuse 1.2.0 release serbalgi <serbalgi@gmail.com> - 2016-06-08 16:03 -0700
      Re: Fuse 1.2.0 release "p-0''0-h the cat (ES)" <super.pooh@fluffyunderbelly.invalid> - 2016-06-09 10:03 +0100
        Re: Fuse 1.2.0 release Volker Bartheld <news2016@bartheld.net> - 2016-06-10 08:10 +0200
          Re: Fuse 1.2.0 release "p-0''0-h the cat (ES)" <super.pooh@fluffyunderbelly.invalid> - 2016-06-17 23:58 +0100

csiph-web