Salora Manager Disk ROM

User avatar
@username@
Posts: 335
Joined: Tue Oct 22, 2013 6:59 pm
Location: Scotland

Salora Manager Disk ROM

Post by @username@ » Sun Jan 10, 2016 5:43 pm

Initial ROM Binary

Having entered the screenshots three times now - I am confident that is is a good image to start from.

The ROM is mapped to $1200 through $1FFF, then from $2100 through $21FF,

The attached image is linear - so it includes 256 null bytes at $2000.

I/O Ports appear to be mapped at $11xx.
You do not have the required permissions to view the files attached to this post.
User avatar
@username@
Posts: 335
Joined: Tue Oct 22, 2013 6:59 pm
Location: Scotland

Re: Salora Manager Disk ROM

Post by @username@ » Sun Jan 10, 2016 5:52 pm

Initialisation

The ROM is called from BIOS through an indirect jump to $18E0, which is the word located at $2FFE.

Trace

$18E0 - Clear memory from $4400 to $4FFF
$191D - Copy 43 bytes from $25BC to $4C67 (Section 1)
$1928 - Write 60 bytes of $5E to $4C8D
$1932 - Copy 13 bytes from $2EB7 to $4CCD (Section 2)
$193D - Copy 6 bytes from $2ED9 to $4CD8 (Section 3)
$1948 - Store $7A to $4D01
$194D - Copy 8 bytes from $2EDF to $4D0A (Section 4)
$1958 - Copy 18 bytes from $2EE7 to $4EDA (Section 5)
$1963 - Store 2 to $4EF4
$1968 - Copy 4 bytes from $2EF9 to $4F16 (Section 6)
$1973 - Copy 19 bytes from $2F9B to $4F1B (Section 7)
$19D6 - Hook BASIC ROM at $36 and $38
$1A0B - Back to BASIC initialisation at $E23A ($19D0)

Attached is the binary image of memory, after initialisation, at $4400.
You do not have the required permissions to view the files attached to this post.
Last edited by @username@ on Mon Jan 11, 2016 10:37 pm, edited 1 time in total.
User avatar
@username@
Posts: 335
Joined: Tue Oct 22, 2013 6:59 pm
Location: Scotland

Re: Salora Manager Disk ROM

Post by @username@ » Sun Jan 10, 2016 6:00 pm

Commented disassembly 10 January 2016

Although far from complete, this static disassembly listing has some good pointers to each command function,
You do not have the required permissions to view the files attached to this post.
User avatar
Mobsie
Posts: 717
Joined: Fri Jun 13, 2008 10:38 am
Location: Weinheim, Germany

Re: Salora Manager Disk ROM

Post by Mobsie » Mon Jan 11, 2016 10:49 am

Top
User avatar
@username@
Posts: 335
Joined: Tue Oct 22, 2013 6:59 pm
Location: Scotland

Re: Salora Manager Disk ROM

Post by @username@ » Sat Jan 23, 2016 3:27 pm

Some progress ...
You do not have the required permissions to view the files attached to this post.
User avatar
Scouter3d
Posts: 676
Joined: Mon Jun 28, 2010 7:02 am
Location: Wien
Contact:

Re: Salora Manager Disk ROM

Post by Scouter3d » Sat Jan 23, 2016 10:20 pm

Congratulations!
User avatar
@username@
Posts: 335
Joined: Tue Oct 22, 2013 6:59 pm
Location: Scotland

Re: Salora Manager Disk ROM

Post by @username@ » Sun Jan 24, 2016 1:23 pm

Floppy Disk Format

This is an analysis of the formatting of track 0 on the floppy disk.

Most, if not all, has been "borrowed" from Woz's Apple DOS format.

The track header consists of 128 bytes of $FF - or all bits on.

Address Header

The address header for each sector, there are 14 per track (0-13), is constructed as

D5 AA 96 V1 V2 T1 T2 S1 S2 C1 C2 DE AA EB

This uses the GCR 4:4 encoding scheme. In the tests I have done, the volume seems to default to $FE.

4:4 is simply take the intial byte, shift the odd bits 1 to the right, and OR to $AA. Then write out the original byte, also OR'd to $AA. To reconstruct, just read the first byte, ROL then AND the second.

An actual header for Volume FE, Track 0, Sector 1 is

D5 AA 96 FF FE AA AA AA AB FF FF DE AA EB

Broken down this is

D5 AA 96 - Unique address header
FF FE - Volume number - (FF ROL) AND FE == FE
AA AA - Track number - (AA ROL) AND AA == 0
AA AB - Sector number (AA ROL) AND AB == 1
FF FF - Checksum (FF ROL) AND FF == FF (Volume XOR Track XOR Sector)
DE AA EB - End of stream tail

Data Header

The data header preceeds the GCR 6:2 encoded data, which needs 343 disk bytes used to encode 256 memory bytes.

D5 AA AD - Unique data header
343 bytes of 6:2 encoded data (the 6 and 2 write translation table of 64 bytes, can be found at memory offset $1465)
DE AA EB - End of stream tail

Attached is a binary image of the track 0 format.
You do not have the required permissions to view the files attached to this post.
User avatar
MADrigal
Site Admin
Posts: 1270
Joined: Sun Sep 15, 2013 1:00 pm
Contact:

Re: Salora Manager Disk ROM

Post by MADrigal » Mon Jan 25, 2016 8:10 am

Wow that's a big leap for emulating the Disk Drive properly!

I am wondering if you have any plans to develop a software to dump the commercial SM floppy diskettes?

Our largest Finnish contributor has a bunch of original SM floppy diskettes.

If you could provide him with a PC program to dump a SM dikette through a Commodore 1541 with USB connector, I would be happy to pay for the USB interface and have it shipped to him.

Then it would be a matter of time to have all the diskettes dumped and emulated properly :)
User avatar
MADrigal
Site Admin
Posts: 1270
Joined: Sun Sep 15, 2013 1:00 pm
Contact:

Re: Salora Manager Disk ROM

Post by MADrigal » Mon Jan 25, 2016 8:11 am

And oh, I have just got scans of 75% of the Salora DOS manual last night!

Well it's in Finnish, but I bet that it is still of some use to you guys.

I will do my best to post-process the scans ASAP and publish them here.
User avatar
@username@
Posts: 335
Joined: Tue Oct 22, 2013 6:59 pm
Location: Scotland

Re: Salora Manager Disk ROM

Post by @username@ » Mon Jan 25, 2016 6:18 pm

Good news on the scans! More information is always better!

I am a long way off from having anything like emulation going ... there are 7 bits involved in controlling the drive, so far I know 2 :)

The drive "controller" is select by the address bus when $11xx is asserted. The low byte holds the key to what the drive is doing.

For example, $8D, is an 8 bit write to the data port, $8C is always read. Quite clever really how it uses just address lines to control the drive.

So I still have the basics to work out, motor on/off, phase step etc - but will get there :)

I know there is a device, the FC5025, which claims to be able to read most old formats using a cheap 5.25" drive. It would be relatively easy to just patch the software to accommodate the SM - as they are the same as Apple 2 disks, just a different sector count.

In fact, the directory sector and bitmap are on track 17, sector 3 - same as AppleDOS 3.2 and up.

Maybe Tom has some ideas ....
Post Reply