Welcome, Guest. Please login or register.


Author Topic: SymbOS (Read 445357 times)

Offline Z80System

  • EP addict
  • *
  • Posts: 3848
  • Country: hu
Re: SymbOS
« Reply #195 on: 2014.November.10. 09:27:49 »
Quote
Ehhh. The key if you try to find something: download all stuffs, unpack ZIPs etc then use grep (or whatever, at least on UNIX systems) to try to find some words. Eg: symbos-doc-develop.zip contains SymbOS-DesktopDataRecords.txt file, and you can find the word 'font' at many places, the format should be about at the end of the file.

Yes, you are right. Again. I have no excuses ... :(
Z80 System

Offline Zozosoft

  • Global Moderator
  • EP addict
  • *
  • Posts: 14722
  • Country: hu
    • http://enterprise.iko.hu/
Re: SymbOS
« Reply #196 on: 2014.November.10. 09:28:12 »
use grep (or whatever, at least on UNIX systems) to try to find some words.
On Windows: Total Commander ALT+F7 :-)

Offline Z80System

  • EP addict
  • *
  • Posts: 3848
  • Country: hu
Re: SymbOS
« Reply #197 on: 2014.November.10. 09:30:39 »
Quote
On Windows: Total Commander ALT+F7 :-)

Yes, I did that. But I did it wrong, and I had the preconceptions that there is no font documantation in those docs ... and I did not verify my search.
Z80 System

Offline Prodatron

  • EP user
  • *
  • Posts: 256
  • Country: de
  • Back on the Z80
    • http://www.symbos.de
Re: SymbOS
« Reply #198 on: 2014.November.10. 10:05:39 »
Regarding fonts, yes, it's possible to change them and to load other ones. It seems that I forgot to upload some fonts that are currently available and which are suitable to be used as system fonts. I will catch up here... The font format is quite simple as you can see in the "SymbOS-DesktopDataRecords.txt".

Offline Prodatron

  • EP user
  • *
  • Posts: 256
  • Country: de
  • Back on the Z80
    • http://www.symbos.de
Re: SymbOS
« Reply #199 on: 2014.November.10. 10:21:18 »
It is same, but read from WD STATUS need to additional instructions for check DRQ.
From EXDOS STATUS register:
IN A,(C)
JP M,DRQ_ACTIVE

EXDOS check the INTRQ bit at 18h after every readed bytes.

Thanks, Zozo!
If I got it correctly the core loop of a sector read routine should look like this:
Code: [Select]
        ;[...] start execution phase

        LD C,#13
        LD HL,destination_address
loop    INI
check   IN A,(#18)
        JP M,loop
        BIT 1,A
        JR Z,check

        ;[...] do result phase

Would this work?

Offline Zozosoft

  • Global Moderator
  • EP addict
  • *
  • Posts: 14722
  • Country: hu
    • http://enterprise.iko.hu/
Re: SymbOS
« Reply #200 on: 2014.November.10. 10:34:06 »
Would this work?
No, because the IN A,(nn) don't set the flags, only the IN r,(C) do it.

Offline Prodatron

  • EP user
  • *
  • Posts: 256
  • Country: de
  • Back on the Z80
    • http://www.symbos.de
Re: SymbOS
« Reply #201 on: 2014.November.10. 10:39:13 »
List of the EXDOS floppy driver capatibilities:

Let me comment this for SymbOS:
[OK] can handle four drives (A,B,C,D)
[OK] drive can be a 40 or 80 tracks, single or double sided, any combination of these
[OK] drive types can be mixed in any combination
[OK] 40 tracks disks can be used in 80 tracks drive with double stepping
[OK] at non compatibility situation (80 track disk in 40 track drive or a double sided disk in single sided drive) error reported

If it doesn't require a different programming of the WD, this should work, too:
[OK] handle 8,9,10,11 sectors/track disks
[OK] plus tracks don't problem (I have a 90 tracks drives :-) ), most commonly used disk format 84x2x10=840K

This should work, too, but has to be tested:
[OK] don't use Drive Ready signal, then no problem with modern drives
[OK] at default don't use Disck Change signal, then also no problem with modern drives

This isn't supported:
[N/A] disk compatibility checked, double stepping automaticaly switch on or off

I have no idea about this:
[??] works reliable at different speed machines (from 4 to 10Mhz tested yet)
[??] exist a Turbo EXDOS hack, where WD overclocked to 10Mhz then 13 sectors/track can be stored with normal DD disks and drives, it is can be work both WD1770 and 1772
[??] more Turbo :-), 13.333Mhz for 1.2M drives (300rpm mode) with HD disks, and 16Mhz for 1.44M drives with HD disk. With 1.44 drive can be up to 22 sectors/disk. Exist a different configuration where 1.2M drives run at 360rpm then 9.6Mhz used for handle DD disks, and 16MHz for HD.

Another:
EXDOS card built with WD1770 or WD1772, at 1770 the step rate 0 are the fastest, 6ms. With 1772 the step rate 3 will be faster, 3ms. About 99% of the drives in the world can be used with 3ms, then faster and quiet. (The fastest with 1772 the step rate 2 which are 2ms.) EXDOS have a variable where can selecet the step rate. [...] I think need a Setup option or Configuration windows or something :-) for select step rates and enable/select turbo modes.
I wonder how to support the Turbo modes, what different WD-programming they require...

Offline Prodatron

  • EP user
  • *
  • Posts: 256
  • Country: de
  • Back on the Z80
    • http://www.symbos.de
Re: SymbOS
« Reply #202 on: 2014.November.10. 10:42:04 »
No, because the IN A,(nn) don't set the flags, only the IN r,(C) do it.
Ah yes! But in this case it doesn't seem to make sense to use IN A,(C) in the 512byte sector loop, as then I wouldn't be able to use INI anymore...?
So better this one?

Code: [Select]
       ;[...] start execution phase

        LD C,#13
        LD HL,destination_address
loop    INI
check   IN A,(#18)
        RLCA
        JR C,loop
        BIT 2,A
        JR Z,check

        ;[...] do result phase
« Last Edit: 2014.November.10. 10:48:14 by Prodatron »

Offline Zozosoft

  • Global Moderator
  • EP addict
  • *
  • Posts: 14722
  • Country: hu
    • http://enterprise.iko.hu/
Re: SymbOS
« Reply #203 on: 2014.November.10. 10:46:44 »
From the EXDOS ROM:
Common routine for read sectors/track/ID
A contain the Command value.
Code: ZiLOG Z80 Assembler
  1. lde43:  CALL    LDF50           ;set the delay values
  2.         OUT     (C),A           ;write WD Command
  3.         SET     3,C                     ;point to EXDOS Status register
  4. lde4a:  JR      LDE4C       ;delay
  5. lde4c:  LD      A,00H           ;delay
  6.         IN      A,(C)           ;read EXDOS Status
  7.         JP      M,LDE65         ;jump if DRQ
  8.         DEC     DE                      ;decrement time out counter
  9.         IN      A,(C)           ;delay
  10.         IN      A,(C)           ;read EXDOS Status
  11.         JP      M,LDE65         ;jump if DRQ
  12.         LD      A,D                     ;time out counter
  13.         OR      E                       ;=0?
  14.         JP      Z,LDEE3         ;exit if time outed without DRQ
  15.         IN      A,(C)           ;read EXDOS Status
  16.         JP      P,LDE4A         ;jump if no DRQ
  17. lde65:  DEC     C                       ;point to WD Data (shadow)
  18.         IN      A,(C)           ;read data byte
  19.         LD      (HL),A          ;store
  20.         INC     HL                      ;increment transfer address
  21.         INC     C                       ;point to EXDOS Status
  22. lde6b:  IN      A,(C)           ;read status olvasása
  23.         AND     82H             ;keep only DRQ and INTRQ
  24.         JR      Z,LDE6B     ;wait for  next DRQ if no active bits
  25.         JP      M,LDE65         ;jump to read byte if DRQ active
  26.         JR      LDEE0       ;at INTRQ will exit
  27.  
  28. ldf50:  BIT     2,(IY-16H)      ;head moved?
  29.         JR      Z,LDF58         ;jump if no
  30.         SET     2,A                   ;enable 30ms delay in command byte
  31. ldf58:  LD      DE,9331H        ;time out counter
  32.         BIT     7,(IY-16H)       ;Motor ON?
  33.         RET     NZ                 ;return if yes
  34.         LD      DE,0               ;greater value (65536) for the time out counter
  35.         RET
  36.  

Offline Prodatron

  • EP user
  • *
  • Posts: 256
  • Country: de
  • Back on the Z80
    • http://www.symbos.de
Re: SymbOS
« Reply #204 on: 2014.November.10. 11:05:09 »
Great, thank you!
Is there a reason why they use...
IN A,(C)           ;read data byte
LD (HL),A          ;store
INC HL
...instead of...
INI
? (B doesn't seem to be used)

Offline Zozosoft

  • Global Moderator
  • EP addict
  • *
  • Posts: 14722
  • Country: hu
    • http://enterprise.iko.hu/
Re: SymbOS
« Reply #205 on: 2014.November.10. 11:21:33 »
Is there a reason why they use...
I not found :oops:
I using modified EXDOS routines in my programs and replaced this part to INI :-)

Offline Zozosoft

  • Global Moderator
  • EP addict
  • *
  • Posts: 14722
  • Country: hu
    • http://enterprise.iko.hu/
Re: SymbOS
« Reply #206 on: 2014.November.10. 11:37:35 »
Write routine, very similar:
Code: ZiLOG Z80 Assembler
  1.         CALL    LDF50           ;set the delay values
  2.         OUT     (C),A           ;write WD Command
  3.         SET     3,C                     ;point to EXDOS Status register
  4.         LD      DE,0            ;time out counter
  5. lde89:  DEC     DE                      ;decrement time out counter
  6.         LD      A,D                     ;time out counter
  7.         OR      E                       ;=0?
  8.         JR      Z,LDEE2     ;error exit if time outed without DRQ
  9.         IN      A,(C)           ;read EXDOS Status
  10.         JP      M,LDE99         ;jump if DRQ
  11.         AND     02H                     ;INTRQ?
  12.         JR      NZ,LDEE2    ;error exit if yes
  13.         JR      LDE89      
  14. lde99:  DEC     C                       ;WD Data (shadow)
  15.         LD      E,C                     ;
  16. lde9b:  INC     C                       ;EXDOS Status
  17.         LD      D,(HL)          ;bytes for output
  18.         INC     HL                      ;increment transfer address
  19. lde9e:  IN      A,(C)           ;read EXDOS Status
  20.         AND     82H                     ;only DRQ and INTRQ bits
  21.         JR      Z,LDE9E     ;wait for the next DRQ if no active bits
  22.         LD      C,E                     ;WD Data
  23.         OUT     (C),D           ;write out data byte
  24.         JP      M,LDE9B         ;continue if DRQ happened
  25.         INC     C                       ;point to EXDOS Status
  26.         DEC     HL                      ;decrement transfer address to
  27.                                                         ;last sent byte
  28.         JR      LDEF7           ;exit at INTRQ

Offline Zozosoft

  • Global Moderator
  • EP addict
  • *
  • Posts: 14722
  • Country: hu
    • http://enterprise.iko.hu/
Re: SymbOS
« Reply #207 on: 2014.November.10. 11:46:16 »
And the Verify:
Code: ZiLOG Z80 Assembler
  1. ldeae:  CALL    LDF50           ;set the delay values
  2.         OUT     (C),A           ;write WD Command
  3.         SET     3,C                     ;point to EXDOS Status register
  4. ldeb5:  JR      LDEB7       ;delay
  5. ldeb7:  LD      A,00H       ;delay
  6.         IN      A,(C)           ;read EXDOS Status
  7.         JP      M,LDECF         ;jump if DRQ           
  8.         DEC     DE                      ;decrement time out counter
  9.         IN      A,(C)           ;delay
  10.         IN      A,(C)           ;read EXDOS Status
  11.         JP      M,LDECF         ;jump if DRQ
  12.         LD      A,D                     ;time out counter
  13.         OR      E                       ;=0?
  14.         JR      Z,LDEE3         ;error exit if time outed without DRQ
  15.         IN      A,(C)           ;read EXDOS Status
  16.         JP      P,LDEB5         ;jump if no DRQ
  17. ldecf:  DEC     C                       ;point to WD Data (shadow)
  18.         IN      A,(C)           ;read data byte
  19.         INC     C                       ;point to EXDOS Status
  20.         CP      (HL)            ;compare bytes
  21.         JR      NZ,LDEED    ;error exit if difference
  22.         INC     HL                      ;increment transfer address
  23. lded7:  IN      A,(C)           ;read EXDOS Status
  24.         AND     82H                     ;keep only DRQ and INTRQ
  25.         JR      Z,LDED7     ;wait for  next DRQ if no active bits
  26.         JP      M,LDECF         ;jump if DRQ
  27. ldee0:  JR      LDEF8       ;exit at INTRQ

Offline Zozosoft

  • Global Moderator
  • EP addict
  • *
  • Posts: 14722
  • Country: hu
    • http://enterprise.iko.hu/
Re: SymbOS
« Reply #208 on: 2014.November.10. 12:12:36 »
About the Double Stepping:
When identify the disk, EXDOS read Sector ID from track 8, then check the track number in the readed ID:
=4? then 40 tracks disk in 80 tracks drive, switch on Double Stepping
=8? right disk for the drive, Double Stepping off
=16? 80 tracks disk in 40 tracks drive, report incompatibility error

Also at disk identify: if the disk double sided then read a Sector ID from Side 1 then check the side in the ID. If it is 0 then report incompatibility error (double sided disk in one sided drive)

At Sector Read/Write/Verify calculate the physical track number (logical track x2 if Double Stepping), then use Seek Track command (which also do the Motor On).
Then write out the logical Track number, start sector, number of sectors parameter to WD registers, and then start the main Read/Write/VerifY routines.

Offline Prodatron

  • EP user
  • *
  • Posts: 256
  • Country: de
  • Back on the Z80
    • http://www.symbos.de
Re: SymbOS
« Reply #209 on: 2014.November.10. 12:42:34 »
Thanks again for these details!

About the Double Stepping:
When identify the disk, EXDOS read Sector ID from track 8, then check the track number in the readed ID:
=4? then 40 tracks disk in 80 tracks drive, switch on Double Stepping
=8? right disk for the drive, Double Stepping off
=16? 80 tracks disk in 40 tracks drive, report incompatibility error
Good idea! :) What's about reading track 2 instead, as you save some seek time (you will be at track 0, too, for reading the boot sector, so it's not so "far" away)?

then use Seek Track command (which also do the Motor On).
Does it always use the seek command (for turning the motor on), even if the track didn't change during the last access?
« Last Edit: 2014.November.10. 12:47:31 by Prodatron »