[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: DSK to NIB Instruction



In article <3YSdnSFo3q8SZdXeRVnzvA@telenor.com>,
Knut Roll-Lund  <kr-lund@nogarbage.online.no> wrote:
> Paul Schlyter wrote:
>> In article <wc02f.8681$oc.149@newsread2.news.pas.earthlink.net>,
>> BluPhoenyx  <bluphoenyx-@-earthlink.net> wrote:
>>  
>> 
>>>As for how to combine two .nib images, I don't know.
>> 
>>  
>>  
>> Why not simply try to concatenate the images?
>>  
>>  
>> On a UNIX machine, you do like this:
>>  
>>   cat  image1.nib  image2.nib  >  combined_image.nib
>>  
>> and in a Windows machine you do (from a command line):
>>  
>>   copy /b  image1.nib+image2.nib  combined_image.nib
> 
> No! Have you tried this?

No -- I've never dealt with those nib files of partial disks.

> A nib is 232960 bytes long and two times 143360 is 286720.
> This wouldn't work.

Why is the nib file of half the disk 143360 bytes = exactly 140K bytes?
Are you sure it's not a dsk file?

> The dsk format is sector contents directly 256 bytes times 16 sectors 
> times 35 tracks.

True -- and you can indeed not concatenate two dsk image files and
expect to get a valid nib image file.... :-)
 
> The nib format seems to be each track as it would be seen by the drive 
> head that is 416 bytes times 16 sectors times 35 tracks. Sometimes it 
> seems that it is sectors still, not tracks, but some nib files seems to 
> be starting in the middle of a sector so it is probably tracks, even 
> when each sector is 416 bytes.
> 
> So how does SST store this information... in the nib there is extra 160 
> bytes per sector. I don't know if it is this regular in SST's format. 
> There seems to be stored two tracks per on track original or maybe two 
> sectors per original sector. There is probably some header information 
> saying number of bytes etc.

OK, so you need to do some binary editing as well.  If this format is
documented, it ought to be quite straightforward to write a program
which merges two SST files into one valid nib file.  If the SST format
is undocumented, one can probably figure it out anyway.  But I don't
see any serious difficulties in doing this, even though it is somewhat
more complex than just concatenating two files.
 
> I would be interested in a tool that would do the opposite of the 
> question in this thread, to break a nib into two dsk images that can be 
> used with ADT and SST "unpack" on a real Apple. SST fails miserably in 
> the emulators doing this, to "pack" a nib into two dsk images. If 
> someone would point out an emulator where SST pack wouldn't fail that 
> would also help.
> 
> Maybe some source code for handling nib and dsk would enable me to 
> understand more.
> 
> Knut

-- 
----------------------------------------------------------------
Paul Schlyter,  Grev Turegatan 40,  SE-114 38 Stockholm,  SWEDEN
e-mail:  pausch at stockholm dot bostream dot se
WWW:     http://stjarnhimlen.se/