Welcome, Guest. Please login or register.


Author Topic: EXDOS (Read 25496 times)

Offline BruceTanner

  • EP lover
  • *
  • Posts: 607
  • Country: gb
EXDOS
« on: 2014.April.14. 10:40:33 »
Zozo there as an interesting (to me anyway!) sounding discussion on an EXDOS bug in the Hungarian topics but google translate is a bit limited...any chance you could put an English summary here when you have a spare 5 minutes, thanks!

Offline Zozosoft

  • Global Moderator
  • EP addict
  • *
  • Posts: 14723
  • Country: hu
    • http://enterprise.iko.hu/
Re: EXDOS
« Reply #1 on: 2014.April.14. 10:48:01 »
As you say:
Quote from: BruceTanner
There is a huge amount of hand-written assembly in IS-BASIC, EXOS and EXDOS - there must be loads of bugs!
Now found another one in the EXDOS :oops:

When started testing the SD interface cartridge I noticed the written files are randomly damaged :-(
More than two weeks of debbuging I found exactly what is the bug.
When handling FAT sectors, some information copied to sector buffer header, for example the FAT size, this is will be used when calculating LBA address of specified FAT sector in the next FAT copy. Sector buffers are in the System Segment, paged to Page 2.
There is the buggy routine from 1.3 version (but all other versions have same):
Code: ZiLOG Z80 Assembler
  1.   CA5F  7E           LD    A, (HL)
  2.   CA60  D3 B1        OUT   (B1), A
  3.   CA62  23           INC   HL
  4.   CA63  5E           LD    E, (HL)
  5.   CA64  23           INC   HL
  6.   CA65  56           LD    D, (HL)
  7.   CA66  23           INC   HL
  8.   CA67  D5           PUSH  DE
  9.   CA68  CB B4        RES   6, H
  10.   CA6A  CB FC        SET   7, H
  11.   CA6C  E5           PUSH  HL
  12.   CA6D  DD E1        POP   IX
  13.   CA6F  E1           POP   HL
  14.   CA70  0E 01        LD    C, 01
  15.   CA72  D1           POP   DE
  16.   CA73  D5           PUSH  DE
  17.   CA74  C5           PUSH  BC
  18.   CA75  01 FF 01     LD    BC, 01FF
  19.   CA78  CD B0 CA     CALL  CAB0
  20.   CA7B  CD 1E CC     CALL  CC1E
  21.   CA7E  C1           POP   BC
  22.   CA7F  D1           POP   DE
  23.   CA80  20 01        JR    NZ, CA83
  24.   CA82  0C           INC   C
  25.   CA83  FE BF        CP    BF
  26.   CA85  20 03        JR    NZ, CA8A
  27.   CA87  01 01 01     LD    BC, 0101
  28.   CA8A  F5           PUSH  AF
  29.   CA8B  7B           LD    A, E
  30.   CA8C  DD 86 FC     ADD   A, (IX-04)
  31.   CA8F  5F           LD    E, A
  32.   CA90  30 01        JR    NC, CA93
  33.   CA92  14           INC   D
  34.   CA93  F1           POP   AF
  35.   CA94  10 DD        DJNZ  CA73

It is page in to Page 1 the Unit Handler segment, this is needed for the Unit Handler call (The EXDOS paging routine will move it to Page 3, and page in the transfer segment fro C register to Page 1).
Ix will point to the transfer area (sector buffer data) it is converted to Page 1 address as the Unit Handler call (CC1Eh) need it.
After the call come the problem: using the IX addressing the sector buffer header (for the FAT size), but the IX point to the Page 1 where the Unit Handler segment paged in!!!
It is don't problem with the built in Units (floppy, Ramdisk) these are also in the System Segment then it is paged to both Page 1 and 2, the wrong IX also point to right place.
But with EXDOS extensions which are use separate segments the IX point to wrong place then using false data for calculations -> FAT2 written to the data area overwritting file data.

In the fix I only convert IX to Page 1 only for the Unit Handler call, removed the RES, SET from CA68h,CA6Ah, and the CALL CC1Eh modified to CALL this routine:
Code: ZiLOG Z80 Assembler
  1.                 PUSH IX
  2.                 PUSH HL
  3.                 PUSH IX
  4.                 POP HL
  5.                 SET 6,H
  6.                 RES 7,H
  7.                 PUSH HL
  8.                 POP IX
  9.                 POP HL
  10.                 CALL 0CC1EH
  11.                 POP IX
  12.                 RET

This is can be done only in 1.3 version, because only this have a free ROM space. It is renamed to version 1.4 because the extension programs can check the EXDOS are bug free (least this bug :oops: ).
« Last Edit: 2014.April.14. 10:52:16 by Zozosoft »

Offline BruceTanner

  • EP lover
  • *
  • Posts: 607
  • Country: gb
Re: EXDOS
« Reply #2 on: 2014.April.15. 00:41:38 »
:oops: Thanks for posting zozo, impressive debugging! :bow:

Offline Zozosoft

  • Global Moderator
  • EP addict
  • *
  • Posts: 14723
  • Country: hu
    • http://enterprise.iko.hu/
Re: EXDOS
« Reply #3 on: 2014.April.18. 23:10:18 »
The EXDOS has a lot of error codes that have no error messages.
I think this is because in the original 16K versions the ROM space is very limited so the rare errors don't get messages.
The 1.4 was developed from version 1.3 which uses a 32K ROM, with lots of free space. I want to put messages for all the errors.
I hate so much when a computer displays error code xxx as an error message :twisted:

Bruce, can you help define messages for these errors? Following the original style of the Enterprise error messages.
I will write each specified error code when it has been done.
« Last Edit: 2014.April.19. 11:59:32 by szipucsu »

Offline gflorez

  • EP addict
  • *
  • Posts: 3607
  • Country: es
    • Támogató Támogató
Re: EXDOS
« Reply #4 on: 2014.April.19. 11:03:43 »
I want to help too.....

Offline Zozosoft

  • Global Moderator
  • EP addict
  • *
  • Posts: 14723
  • Country: hu
    • http://enterprise.iko.hu/
Re: EXDOS
« Reply #5 on: 2014.April.19. 11:45:25 »
Quote from: gflorez
I want to help too.....
Spanish version also will be updated! :-)

Online szipucsu

  • Global Moderator
  • EP addict
  • *
  • Posts: 9898
  • Country: hu
    • Támogató Támogató
    • Webnyelv.hu - Tanuljunk nyelveket!
Re: EXDOS
« Reply #6 on: 2014.April.19. 12:02:22 »
OFF:
New error messages in the 21st centruy:

*** Internet connection error.
*** Server connection error.
100 SOUND SOURCE 2,STYLE 128,PITCH 25.2,SYNC 1
110 SOUND PITCH 25,SYNC 1
120 ! Videos

Offline lgb

  • EP addict
  • *
  • Posts: 3563
  • Country: hu
  • æðsta yfirmaður
    • http://lgb.hu/
Re: EXDOS
« Reply #7 on: 2014.April.19. 13:49:48 »
Quote from: szipucsu
OFF:
New error messages in the 21st centruy:

*** Internet connection error.
*** Server connection error.

*** 404 Not found, HTTP error.
:)

Offline BruceTanner

  • EP lover
  • *
  • Posts: 607
  • Country: gb
Re: EXDOS
« Reply #8 on: 2014.April.19. 20:45:35 »
Quote from: Zozosoft
The EXDOS has a lot of error codes that have no error messages.
I think this is because in the original 16K versions the ROM space is very limited so the rare errors don't get messages.
The 1.4 was developed from version 1.3 which uses a 32K ROM, with lots of free space. I want to put messages for all the errors.
I hate so much when a computer displays error code xxx as an error message :twisted:

Bruce, can you help define messages for these errors? Following the original style of the Enterprise error messages.
I will write each specified error code when it has been done.
Zozo I'd be glad to give that a go although it was so long ago I'm not sure I'd be any better than anyone else!

I certainly share your hate of giving the end user error code xxx as an error message although that is better than just ”an error occured” as so often happens in Windows!

I don't actually remember having to restrict the error messages in EXDOS but you may well be right about lack of ROM space. I assume they are in a compressed format in the ROM. Do you have an example of something the user can do that results in an Error xxx message?

Online szipucsu

  • Global Moderator
  • EP addict
  • *
  • Posts: 9898
  • Country: hu
    • Támogató Támogató
    • Webnyelv.hu - Tanuljunk nyelveket!
Re: EXDOS
« Reply #9 on: 2014.April.19. 21:07:23 »
Quote from: BruceTanner
I assume they are in a compressed format in the ROM.
I don't know. Many years ago I used some PRINT STR$(PEEK(x)) in a FOR loop, and I got a lot of messages and basic commands printed on the screen.
« Last Edit: 2014.April.19. 21:24:13 by szipucsu »
100 SOUND SOURCE 2,STYLE 128,PITCH 25.2,SYNC 1
110 SOUND PITCH 25,SYNC 1
120 ! Videos

Offline Zozosoft

  • Global Moderator
  • EP addict
  • *
  • Posts: 14723
  • Country: hu
    • http://enterprise.iko.hu/
Re: EXDOS
« Reply #10 on: 2014.April.19. 21:33:18 »
Quote from: BruceTanner
I assume they are in a compressed format in the ROM.
Yes it is compressed, similar as the EXOS or BASIC ROMs. But only in the original English EXDOS ROMs (16K size). When the German Enterprise company released the 1.3 two languages version (English/German) then the decompression routine and compressed data removed (at source code level), and putted both message tables (English/German) as plain text to the second segment.

For examples the error xxx message, the most frequent reason: damaged disk with FAT or Directory error.
File operation try to access more than the FFFFh Z80 address. Many original tape released programs just put a big number as lenght to EXOS 6 block read, and don't care with the final EOF error. These generated error coded messages from disk.

Offline Zozosoft

  • Global Moderator
  • EP addict
  • *
  • Posts: 14723
  • Country: hu
    • http://enterprise.iko.hu/
Re: EXDOS
« Reply #11 on: 2014.April.20. 23:40:44 »
Bruce! What do you think about this?
[ Guests cannot view attachments ]

Offline BruceTanner

  • EP lover
  • *
  • Posts: 607
  • Country: gb
Re: EXDOS
« Reply #12 on: 2014.April.20. 23:52:05 »
Quote from: Zozosoft
Bruce! What do you think about this?
(Attachment Link)
:smt023

Online szipucsu

  • Global Moderator
  • EP addict
  • *
  • Posts: 9898
  • Country: hu
    • Támogató Támogató
    • Webnyelv.hu - Tanuljunk nyelveket!
Re: EXDOS
« Reply #13 on: 2014.April.21. 10:46:06 »
Quote from: Zozosoft
What do you think about this?
I would leave the colon ( : ) after "by":
"Written by Martin Lea & Bruce Tanner."
not: "Written by: Martin Lea & Bruce Tanner."
100 SOUND SOURCE 2,STYLE 128,PITCH 25.2,SYNC 1
110 SOUND PITCH 25,SYNC 1
120 ! Videos

Offline gflorez

  • EP addict
  • *
  • Posts: 3607
  • Country: es
    • Támogató Támogató
Re: EXDOS
« Reply #14 on: 2014.April.21. 10:52:34 »
Yes, with the colon it seems it follows a crew....
--
Si, con los dos puntos parece que a continuación viene un grupo....