Salora Manager Disk ROM

Discuss computers from the Laser series, Time & Fun handhelds, etc.
@username@
Posts: 172
Joined: Tue Oct 22, 2013 6:59 pm
Location: Glasgow, Scotland

Re: Salora Manager Disk ROM

Post by @username@ » Fri Apr 22, 2016 2:14 pm

Appledos 3.3 for sure uses a similar system but with 16 sectors so not 100% compatible. MS-DOS has a different strategy, and a completely different encoding system.

For the most part though, Laser DOS is a modified AppleDOS 3.3

Sector skew for AppleDOS is

Code: Select all

0 1 2 3 4 5 6 7 8 9 A B C D E F
0 7 E 6 D 5 C 4 B 3 A 2 9 1 8 F
I would imagine any bitmap based allocation would indeed have some gaps, from file deletion for example.
˙uʍop-ǝpısdn sı ɹoʇıuoɯ ɹnoʎ 'sıɥʇ pɐǝɹ uɐɔ noʎ ɟı

The creatiVision Emulator 16.04.24
Salora Manager / Laser 2001 BLOAD utility 0.9
CSL Cartridge middleware
http://sourceforge.net/projects/creativisionemulator
User avatar
MADrigal
Site Admin
Posts: 967
Joined: Sun Sep 15, 2013 1:00 pm
Contact:

Re: Salora Manager Disk ROM

Post by MADrigal » Sat Apr 23, 2016 8:40 am

Thanks for the clarification :)
@username@
Posts: 172
Joined: Tue Oct 22, 2013 6:59 pm
Location: Glasgow, Scotland

Re: Salora Manager Disk ROM

Post by @username@ » Sat Apr 23, 2016 12:19 pm

This is a short BASIC program to read individual disc sectors.

Code: Select all

10  GOSUB 20000
20  GOSUB 10000
30 T = 17:S = 4
40  GOSUB 30000
50  GOSUB 40000
60  FOR B = 0 TO 255
70  PRINT  CHR$ ( PEEK (BP + B));
80  NEXT B
90  END 
10000  REM  ********************
10010  REM  * LASER DOS V1.0
10020  REM  * I/O INITIALISE
10030  REM  ********************
10040  FOR I = 20208 TO 20253
10050  POKE I,0
10060  NEXT I
10070  POKE 20246,96
10080  POKE 20247,1
10090  POKE 20248,255
10100  POKE 20249,17
10110  CALL 11031
10120  RETURN 
19999 :
20000  REM  ********************
20010  REM  * LOAD SECTOR SWAPS
20020  REM  ********************
20030  DIM TS(13)
20040  DATA  0,7,8,6,13,5,12,4,11,3,10,2,9,1
20050  FOR I = 0 TO 13
20060  READ A%
20070 TS(I) = A%
20080  NEXT I
20090  RETURN 
29999 :
30000  REM  *******************
30010  REM  * READ SECTOR
30020  REM  *******************
30030  POKE 20255,T
30040  POKE 20256,TS(S)
30050  POKE 20263,1
30060  CALL 11141
30070  RETURN 
39999 :
40000  REM  ********************
40010  REM  * GET BUFFER POINTER
40020  REM  ********************
40030 BP =  PEEK (63) * 256
40040 BP = BP +  PEEK (62)
40050  RETURN 
As it stands, it will list the printable characters from the first directory table - track 17, sector 4.

An interesting discovery here is that the controller was designed to manage two drives - 1 and 2. It has confirmed that the missing MMIO of $118B, is drive select for drive 2 :)
˙uʍop-ǝpısdn sı ɹoʇıuoɯ ɹnoʎ 'sıɥʇ pɐǝɹ uɐɔ noʎ ɟı

The creatiVision Emulator 16.04.24
Salora Manager / Laser 2001 BLOAD utility 0.9
CSL Cartridge middleware
http://sourceforge.net/projects/creativisionemulator
@username@
Posts: 172
Joined: Tue Oct 22, 2013 6:59 pm
Location: Glasgow, Scotland

Re: Salora Manager Disk ROM

Post by @username@ » Mon May 02, 2016 5:02 pm

Disc ROM Input Output Control Block

The IO control block for LaserDOS is located at $4F1B

Code: Select all

Offset  Detail
---------------
$00     Table type - always $01

$01     Slot number - always $60 (AppleDOS slot $60, here used as X offset)

$02     Drive number - $01 or $02 - default to $01

$03     Volume number - $FF == any volume

$04     Track number - $00 to $27

$05     Sector number - $00 to $0D - Translated format

$06-$07 Device Character Table - set by ROM to $2FAC - see next

$08-$09 Buffer pointer - 256 byte data buffer

$0A     Unused - always $00

$0B     Byte count of partial sector ($00==256)

$0C     Command codes $00 = SEEK,  $01 = READ, $02 = WRITE, $04 = FORMAT

$0D     Return codes $00 = No Error, $08 = Error initialising, $10 = Write Protect Error, $20 = Volume mismatch Error,  $40 = Drive Error, $80 = Read Error

$0E     Volume last accessed - Set by DIR 

$0F     Slot number of last access - always $60

$10     Drive number of last access

Device Characteristics Table at ROM $2FAC

Offset  Detail
---------------
$00     Device type - ROM has $00 == Apple Disk II :)
$01     Phases per track - ROM has $01
$02-$03 Motor on time count - ROM has $D8EF - same as Apple Disk II :)
To use in a program :

1) JSR $2709 - Set defaults for I/O block. Also set $4F18 to $FF
2) Set defaults for track, sector, command code and buffer pointers
3) JSR $2B85 - go READ/WRITE the sector
4) Check $4F28 for error condition

That's all there is to it!
˙uʍop-ǝpısdn sı ɹoʇıuoɯ ɹnoʎ 'sıɥʇ pɐǝɹ uɐɔ noʎ ɟı

The creatiVision Emulator 16.04.24
Salora Manager / Laser 2001 BLOAD utility 0.9
CSL Cartridge middleware
http://sourceforge.net/projects/creativisionemulator
Post Reply