Welcome, Guest. Please login or register.


Author Topic: SymbOS (Read 610144 times)

Offline Zozosoft

  • Global Moderator
  • EP addict
  • *
  • Posts: 14775
  • Country: hu
    • http://enterprise.iko.hu/
Re: SymbOS
« Reply #180 on: 2014.November.09. 20:45:17 »
the exact functions of bits on port 0x18 on reading/writing
18h write:
b0: Drive Select 0 (Drive A: )
b1: Drive Select 1 (Drive B: )
b2: Drive Select 2 (Drive C: )
b3: Drive Select 3 (Drive D: ) at all, 1 will be select the drive
b4: Side 1 Select: 0=Side 0, 1=Side 1
b5: Double Density Enable, 0=MFM 250Kbits/sec, 1=FM 125Kbits/sec
b6: Disk Change Reset, some very early 3.5" drives suport this, praticaly don't used, left at 0
b7: In Use signal, don't used, left at 0

18h read:
b0: Ready signal (pin 34) from the selected drive, EXDOS don't use. Active low.
b1: INTREQ output from WD, Active high
b2: nc
b3: nc
b4: nc
b5: nc
b6: Disk Change signal (pin 2) from the selected drive, at default EXDOS don't use. Active low.
b7: DRQ output from WD, Active high. EXDOS use at all transfer routine, because this is the fastest way check the DRQ (IN A then JP M)


Quote
and there was some topic about "turbo EXDOS carts" with switchable clocks or so?
Turbo switch at 20h, lowest 2 bits select from 4 clock speeds.

Offline Prodatron

  • EP user
  • *
  • Posts: 256
  • Country: de
  • Back on the Z80
    • http://www.symbos.de
Re: SymbOS
« Reply #181 on: 2014.November.09. 20:48:29 »
Wow, so much infos, thanks a lot!!
Before I start in the details, one question:
Where is the "Motor On/Off" bit?? :)

Offline Zozosoft

  • Global Moderator
  • EP addict
  • *
  • Posts: 14775
  • Country: hu
    • http://enterprise.iko.hu/
Re: SymbOS
« Reply #182 on: 2014.November.09. 20:55:18 »
Where is the "Motor On/Off" bit?? :)
WD177x automaticaly handle this.

Offline Z80System

  • EP addict
  • *
  • Posts: 3848
  • Country: hu
Re: SymbOS
« Reply #183 on: 2014.November.09. 20:55:30 »
Quote
http://symbos.cpc-live.com/

It's cool, and what is the most important of all: I could make "transparent" icon titles ... and blue and grey graphics ... :)

This CPC thing is not too strong with color mixing, is it ? Or is it the 3-3-2 bit color mixing ?
Z80 System

Offline Z80System

  • EP addict
  • *
  • Posts: 3848
  • Country: hu
Re: SymbOS
« Reply #184 on: 2014.November.09. 21:05:10 »
On the font settings page I saw chance to load a font file ...

I think maybe EP text 80 font (did you already see that?) nicer like the default font in this emulator config ...

Probably you already was in WP or tried TEXT 80 in BASIC or such ...

Is not that font more stable or readable ? Or probably are many font files for SymbOS already ?
« Last Edit: 2014.November.09. 21:28:47 by Z80System »
Z80 System

Offline Zozosoft

  • Global Moderator
  • EP addict
  • *
  • Posts: 14775
  • Country: hu
    • http://enterprise.iko.hu/
Re: SymbOS
« Reply #185 on: 2014.November.09. 21:22:27 »
About the boot sector, for the software disk change checking and UNDEL function need at
40-45h: "VOL_ID" identifier string
46h: Dirty Disk Flag (last FAT copy contain allocation information for deleted files)
47-4Ah: 32bit random serial number. (Todays same written to 27-2Ah for PC)

Offline Prodatron

  • EP user
  • *
  • Posts: 256
  • Country: de
  • Back on the Z80
    • http://www.symbos.de
Re: SymbOS
« Reply #186 on: 2014.November.09. 22:32:23 »
Quick answer, WD commands used by the EXDOS ROM:
88h read sectors
E8h read track
C8h read sector ID
A8h write sectors
F8h write track
08h restore
18h seek track
58h step in
78h step out
D0h abort command

Interesting that most commands need to have bit 3 set (x8h). Does it have a special meaning?

18h write:
b0: Drive Select 0 (Drive A: )
b1: Drive Select 1 (Drive B: )
b2: Drive Select 2 (Drive C: )
b3: Drive Select 3 (Drive D: ) at all, 1 will be select the drive
b4: Side 1 Select: 0=Side 0, 1=Side 1
b5: Double Density Enable, 0=MFM 250Kbits/sec, 1=FM 125Kbits/sec
b6: Disk Change Reset, some very early 3.5" drives suport this, praticaly don't used, left at 0
b7: In Use signal, don't used, left at 0

18h read:
b0: Ready signal (pin 34) from the selected drive, EXDOS don't use. Active low.
b1: INTREQ output from WD, Active high
b2: nc
b3: nc
b4: nc
b5: nc
b6: Disk Change signal (pin 2) from the selected drive, at default EXDOS don't use. Active low.
b7: DRQ output from WD, Active high. EXDOS use at all transfer routine, because this is the fastest way check the DRQ (IN A then JP M)

Turbo switch at 20h, lowest 2 bits select from 4 clock speeds.

Some questions:
- double density: Don't we have usually DD 720K discs (2 sides, 360K/80 tracks per side)? I would probably always set this bit to 0 (I guess SymbOS won't be used to read very old EP discs but those which can be exchanged with a PC)
- DRQ (bit 7) at port 18h is the same like bit 1 of the status register (port 10h), which reports a DRQ? Usually I use the status register to check if there is a DRQ while reading a sector. So I should better use port 18h? But how do I recognize, if the sector is finished? (bit 0 of the status register) I don't want to bring confusions here.

E.g. this is a routine for the "National" WD-type:

Code: [Select]
;### FDCRED -> read sector
;### Input      A=sector, HL=destination address
;### Output     CF=0 -> ok
;###            CF=1 -> A=error code (...)
;### Destroyed  AF,BC,DE,HL
fdcred  ld b,fdc_cmd_read
        call fdcexe
fdcred1 ld a,(fdc_data)
        ld (hl),a
        inc hl
fdcred2 ld a,(bc)
        add a
        jp p,fdcred1        ;bit6=1 drq, new byte
        jr nc,fdcred2       ;bit7=0 execution goes on
        ld d,0
        jr fdcres  ;go to result phase

And this is the one for the Microsol:

Code: [Select]
;### FDCRED -> read sector
;### Input      A=sector, HL=destination address
;### Output     CF=0 -> ok
;###            CF=1 -> A=error code (...)
;### Destroyed  AF,BC,DE,HL
fdcred  ld b,fdc_cmd_read
        call fdcexe
        ld d,0
fdcred1 ini
fdcred2 in a,(fdc_status)
        rrca
        jr nc,fdcres
        rrca
        jr c,fdcred1
        jr fdcred2

Do you use the "abort command" for proceeding "Motor on"? This is how the Microsol WD-like FDC is doing it.

Offline Zozosoft

  • Global Moderator
  • EP addict
  • *
  • Posts: 14775
  • Country: hu
    • http://enterprise.iko.hu/
Re: SymbOS
« Reply #187 on: 2014.November.09. 23:14:52 »
Interesting that most commands need to have bit 3 set (x8h). Does it have a special meaning?
It is disable the Spin-up sequence. If enabled the WD177x wait 6 revolutions (=1 second) before the command started.

Quote
Some questions:
- double density: Don't we have usually DD 720K discs (2 sides, 360K/80 tracks per side)? I would probably always set this bit to 0 (I guess SymbOS won't be used to read very old EP discs but those which can be exchanged with a PC)
Yes it is always 0. But don't confuse with "disk DD". It is the write encoding method. 40x1x9=180K disk also use Double Density MFM encoding.

Quote
- DRQ (bit 7) at port 18h is the same like bit 1 of the status register (port 10h), which reports a DRQ? Usually I use the status register to check if there is a DRQ while reading a sector. So I should better use port 18h?
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


Quote
But how do I recognize, if the sector is finished?
EXDOS check the INTRQ bit at 18h after every readed bytes.

Offline Zozosoft

  • Global Moderator
  • EP addict
  • *
  • Posts: 14775
  • Country: hu
    • http://enterprise.iko.hu/
Re: SymbOS
« Reply #188 on: 2014.November.09. 23:28:29 »
Do you use the "abort command" for proceeding "Motor on"?
EXDOS use a Seek Track command. And check the old and new track numbers, really needed a Seek? If yes then enable 30ms wait bit in the command byte.
And at the begin store the Motor On bit from WD STATUS, it used when set the initial time out counter. This counter used when waiting for the first DRQ.

Offline Zozosoft

  • Global Moderator
  • EP addict
  • *
  • Posts: 14775
  • Country: hu
    • http://enterprise.iko.hu/
Re: SymbOS
« Reply #189 on: 2014.November.09. 23:35:24 »
And one important note: unfortunately the WD timings not emulated in the emulators. Then needed to test the floppy driver on real machines.

Offline lgb

  • EP addict
  • *
  • Posts: 3563
  • Country: hu
  • æðsta yfirmaður
    • http://lgb.hu/
Re: SymbOS
« Reply #190 on: 2014.November.10. 00:13:02 »
On the font settings page I saw chance to load a font file ...

I think maybe EP text 80 font (did you already see that?) nicer like the default font in this emulator config ...

Probably you already was in WP or tried TEXT 80 in BASIC or such ...

Is not that font more stable or readable ? Or probably are many font files for SymbOS already ?

Ok, but text 80 on EP (which is actually not a hardware text mode unlike text 40 but a pixel mode) is for 640 pixel wide screen, but here SymbOS runs in 320 pixel mode to be able to have 4 colours (so SymbOS uses quite narrow fonts to have mode chars, not 8 pixel wide). Indeed SymbOS have (?) 640 pixel mode but then you have only a 2 colours only. Also SymbOS seems to use proportional fonts. As far as I can know from various SymbOS documents, it seems it has its own font format, indeed. Imho, but I can be wrong here.

Offline Z80System

  • EP addict
  • *
  • Posts: 3848
  • Country: hu
Re: SymbOS
« Reply #191 on: 2014.November.10. 08:14:03 »

Quote
so SymbOS uses quite narrow fonts to have mode chars, not 8 pixel wide

I did not take that into account, It's true ... I have to reconsider this ...

Quote
Indeed SymbOS have (?) 640 pixel mode but then you have only a 2 colours only.

Yes, I saw that setting, but I did not try, yet. I like colors ...

Quote
As far as I can know from various SymbOS documents, it seems it has its own font format, indeed.

What documents did you find about SymbOS ?
Z80 System

Offline Zozosoft

  • Global Moderator
  • EP addict
  • *
  • Posts: 14775
  • Country: hu
    • http://enterprise.iko.hu/
Re: SymbOS
« Reply #192 on: 2014.November.10. 08:45:01 »

Offline Z80System

  • EP addict
  • *
  • Posts: 3848
  • Country: hu
Re: SymbOS
« Reply #193 on: 2014.November.10. 08:56:21 »
Quote
Try it :-)
http://symbos.de/download.htm

I think there is no talking about fonts in those docs.

I only found this (on this site search for "font"):

http://www.msx.org/forum/development/msx-development/symbos-msx-multitasking-operating-system-help-needed?page=329
Z80 System

Offline lgb

  • EP addict
  • *
  • Posts: 3563
  • Country: hu
  • æðsta yfirmaður
    • http://lgb.hu/
Re: SymbOS
« Reply #194 on: 2014.November.10. 09:16:29 »
I think there is no talking about fonts in those docs.

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.