Steven Seagal's Atari ST Web Site

Steem

page 1 - page 2 - page 3 - page 4 - page 5

 

 

"Hard to Copy"

  Second screen of brags for v3.7.  
     
 

New disk image format: STW

 
  STW is yet another Atari ST disk image format, devised for Steem SSE as
of v3.7.

The W in STW stands for 'write', ST is a reference to well known ST format
and of course to the Atari ST itself.

The purpose of this format is to allow emulation of all WD1772 (floppy
disk controller) commands in Steem SSE, and keep the results of command
Write Track (Format).

We want to emulate what a drive on the Atari ST, controlled by the WD1772
itself, was able to do. If a disk could be copied by one of the software copiers
(ProCopy, ACopy, etc.) then it should work in Steem.
But we don't try to replicate the work of other devices (Amiga, Trace
duplicator, Hardcopier, Discovery cartridge).
Only what you could do with your standard ST.

Like ST, STW is mainly a dump of the tracks, but with clock info as well
as data bytes. Hence each data byte (8bit) is represented by one word (16bit)
in the image.

All track bytes are included, not just the sector data but also format bytes
(gaps and address marks).

This increases file size but reduces complexity (no need for apart ID field
tables etc.) and allows to handle more cases, such as data inside gaps.

This makes the files more than twice as big as a ST image, about 2 MB.



At first I tried to do it with the STG ghost disks, but it got so complicated,
it became clear that two different problems require two different solutions.

As a result, both STG and STW are, by themselves, quite simple formats.

It is perfectly possible, in the future and if that's really needed, to add
STW functionality to the STG format provided the game does a Format
track command.
 

 
     
   
 

There's a new context option in the disk manager to create a STW disk image.

 
     
 

Because we emulate standard 2D floppy disks as formatted by an Atari ST,
there's no option for the number of sides, tracks, sectors, bytes...

You may format the same image as a single sided disk and later as double
sided. If we did otherwise, it would just be more complicated and less
realistic anyway.

 
     
   
   
 

The command to try is of course 'Format'.
Disk images are unreadable before that (filled with random data).

 
     
   
  Yes we must "retry", with better code.  
     
   
  Oh dear, my nice STW disk unusable?  
     
 

And after much debugging...

 
     
 

 
  Is it a tear rolling down my cheek?  
     
   
  357,376 available bytes aren't too bad for a 2MB disk image, right?
I could as well have formatted 2 sides, but it would have made tests longer.
 
     
   
  First checking the basics: it writes and it reads.  
   
 

 

Then do it in MFM

 
     
  Of course you need to believe this, I could as well have written "FM encoded" or "bit level".
MFM encoding is possible, at the expense of just a little more computing, so we do the conversion for fun (it wasn't necessary).

That way, the $A1 address marks are encoded as $4489 in this format as well.

 
     
 

 
 

As promised, after some debugging though, double sided.

 
     
 

Dragonflight

 
  OK. Let's get to the real challenge: Dragonflight, the first reason for the existence of the STW disk image format.

This game creates backup disks, that you need to play, with a very special format.

1) Except the first one, each track is made up of five 1024 byte sectors and one 512 byte sectors, which allows to cram more data thanks to fewer inter-sector gaps.

 

 
 

 
 

The first track has a single sector that displays this, just like the original disk B.

 
     
 

2) Tracks all have the same recorded number (ID field): 178. This number is obtained by using the $F7 format code, that orders the WD1772 to issue two CRC (control) bytes. Notice that the CRC of the ID field itself is correct.

3) Each track has a special header in the pre-data gap zone (so an emulator really needs all the bytes of the disk, not just data and ID fields). This header is obtained by using the format codes $F5 (address mark) and $F7 (CRC).

Techniques of points (2) and (3) seem to have been used for fun by the author. We thank him because after much head-scratching they give us some good insights into the WD1772.

Or maybe it was to make sure that only Dragonflight, and no copier, could produce backup disks?

1) Contrary to what the doc states, the CRC Register isn't preset to ones
($FFFF) prior to data being shifted through the circuit, but to $CDB4.
This happens for each $A1 address mark (read or written), so the register
value after $A1 is the same no matter how many address marks.
When formatting the backup disk, Dragonflight writes a single $F5 (->$A1)
in its custom track headers and expects value $CDB4.

2) The format code $F7 may be used inside an ID field. The CRC bytes are added
to the CRC, so that this is correct. This implies that at the receipt of
$F7, the WD1772 saves the current value of the CRC (at least the lower
byte), before it is modified by adding the upper byte to the logic.

3) $F7 will trigger output of CRC only if the CRC is non null (Dragonflight
track headers).
Notice that the CRC is null if after a reset you output it:
$F5 -> $A1, CRC = $CDB4
$F7 -> $CD, $B4, CRC = 0
$F7 -> $F7
So the 2nd $F7 is really written $F7 on the disk.

Note: maybe it's wrong, it's an interpretation, emulating that way Dragonflight seems to work.

Update:

In fact, a byte following F7 isn't interpreted as a format byte, that's why the 2nd F7 is written F7, you can write F5, F6 the same way.

 

 
     
 

 
 

Copying on the backup disk (2nd side before 1st)...

 
     
   
  Accepting this disk (at last)...  
     
   
  Now you may play the STX or CTR version in Steem, or at least I hope!  
     
 

Realm of the Trolls

 
  It's a cool name, reminiscent of some internet forums.

This game also creates a data disk. The utility in this version is provided by the crackers (dbug).

 
  Data is written and read over the index pulse! We need to make sure sync isn't lost at IP then.

Funny how challenging just a few cases are.

Also, sector number 0 is used. This isn't hard to emulate.
 

 
 

 
 

At least it accepts the disk, hopefully it works

 
  Update: some more debugging was necessary so that the STX version (image of original) also works.  
     
 

Union Demo

 
 

 
 

This, ladies and gentlemen, now works in Steem.

 
     
 

 
  The Union demo is a copy-protected demo. One of the demo screens is in fact a copier, that you needed to use to spread the demo. It's an interesting case because the copier does other things than copy, that is, rasters and music, and this could interfere with our timings somehow.

Here we copy STX (Pasti) to STW, also thanks to option 'Pasti only for STX'.

The "protection" uses some similar techniques as in Dragonflight.

 
     
 

 
 

But I did :(

 
     
  Similar but different too. Here it failed because the first address mark found by the WD1772 will not read as $A1 (due to sync issues?), yet it is recognised as an address mark and the CRC is reset. We do like Pasti, reading $14 instead, not knowing exactly why.

Update: with the SCP version, it will also read as $14, as computed by the "CAPS-inspired" low-level data separator emulation.

 
     
 

 
 

Here it passed.

 
     
  So now, after the Pasti version, the Union demo is also available as a STW image. 2MB, 1MB zipped.

Hmm, I wonder what demo will be included with Steem SSE v3.7.0?

 
     
 

Microprose Golf

 
 

 
  The timings are good enough for this pretty sensitive game. Phew! I would have been dismayed if that wasn't the case.  
     
 

Delirious 3 (STE)

 
 

 
  And here some humour. Ha ha ha! The loader of this demo is really troublesome, it seems it's because it changes the drive select register too fast.  
     
 

It works

 
  It's simple, it works and it's a nice advance in emulation, with WD1772 command Format finally handled without compromise, it supports some more games and demos, and big-name ones at that, so I don't really get the criticism of the format, expressed at atari-forum.  
     
 

Some disk images

 
  The following disks, available for download, were tested in the STW format.

They were produced using copiers, with ST/MSA disk in drive A: and STW disk in drive B:, like in good times.

Some were chosen because they may cause drive and controller emulation issues, and they helped debugging the WD1772 emulator.

I also converted all games that require 'ADAT' option in Steem. Even if the ST/MSA version works fine too, it may be advantageous to use the STW version because you don't need to worry about drive speed: it is always slow, and it will always work.

 
 
3615GEN4-HMD STW

Amiga Demo STW

Auto001 STW (The Sentinel)

Auto239 STW (Jumping Jackson)

BIG demo STW

Blood STW A

Blood STW B

Chessmaster 2000 (original) disk A  disk B

Closure STW

Delirious 3 STW (STE only; this one may fail at load)

Demoniak (STF WU2 C1 C2)

Dragonflight STX (please create your own STW disk and rename it as
suggested by the game just in case, eg dragonflight 6CZD4E)

ESWAT STW  disk A  disk B

Exile STW

G.nius STW

Les Passagers du Vent 1 & 2 (French)

Lost Patrol STW  disk A  disk B  disk C

Mean Street  disk A  disk B

MPS Golf STW (cr Elite)

My Socks are Weapons STW

Oh No More Froggies STW

Overdrive Demo STW

Overscan Demos STW (11 sectors/track) (plz send me a Pasti image of the original with fancy format, this one is based on the common disk image) (STF version)

Realm of the Trolls -DBG (to create STW, bash 2 on menu, insert in drive B:)

Alternatively, pasti images of the original:

http://atari.8bitchip.info/ASTGA/R/realmtr.php (use disk B as valid datadisc, then
create STW disk and init it in the game)

ST NICCC STW (STF version)

Suretrip2 STW A.rar     Suretrip2 STW B.rar

Ultimate 3D dots STW

Union Demo STW

Vroom STW

War Heli STW

Wipe-Out -RPL STW
 

 

 
     
 

Some other woes during development

 
     
 

 
 

Each byte is precious!

 
     
 

 
 

The Pawn, good old game with good protection.

 
     
  Sector number above specs just can't be written by the WD1772.
On the Atari ST, software copiers were a joke.

I even discovered that ProCopy marks all sectors as deleted when copying. Of course this makes some programs fail! A better name would have been AmateurCopy. You have better chances with the latest ACopy, but when disks were correctly protected no software copier could possibly work.

Update: this snide remark is justified only for unofficial releases. ProCopy 1.5 is fine (better copier than ACopy for some cases).

 
     
 

 

 
     
 

 
 

Maybe the trolls damaged the disc?

 
     
 

 
 

This bug was found in the niccc of time...

 
     
     
     
 

Specification of STW format

 

 

Previous screen

Next screen

Games (1) (2)

Demos (1) (2) (3) (4)

Apps

Steem

 

 

 

-