Welcome, Guest. Please login or register.


Author Topic: Enterprise Deployment Attempt Over FPGA. (Read 54986 times)

Offline rampa

  • Beginner
  • *
  • Posts: 30
  • Country: es
  • OS:
  • Mac OS X 10.15 Mac OS X 10.15
  • Browser:
  • Firefox 98.0 Firefox 98.0
    • View Profile
Re: Enterprise Deployment Attempt Over FPGA.
« Reply #225 on: 2022.March.09. 19:14:12 »

 Testing your routine, seems my controller is latching the value. each time i peek the port, got the previous value.

 Looking at it. thanks

Offline rampa

  • Beginner
  • *
  • Posts: 30
  • Country: es
  • OS:
  • Mac OS X 10.15 Mac OS X 10.15
  • Browser:
  • Firefox 98.0 Firefox 98.0
    • View Profile
Re: Enterprise Deployment Attempt Over FPGA.
« Reply #226 on: 2022.March.09. 19:47:34 »

 Ok. changed timings on the signal and now, ports are ok and the controller is ready.... now struggling with "not a dos disk"

Offline Zozosoft

  • EP addict
  • *
  • Posts: 14417
  • Country: hu
  • OS:
  • Windows 10+ Windows 10+
  • Browser:
  • Firefox 98.0 Firefox 98.0
    • View Profile
    • http://enterprise.iko.hu/
Re: Enterprise Deployment Attempt Over FPGA.
« Reply #227 on: 2022.March.09. 20:24:58 »
now struggling with "not a dos disk"
This means: reading boot sector successfully, but the readed data not a valid FAT boot sector.
I suggest use EPDOS Disk Editor, for easy view what readed.
After enter EPDOS, press Abort on disk error, navigate to the D-EDIT, start it, Abort on disk error, press CTRL+F8 for switch Track/Sector mode.
ALT+Up/Down track change, ALT+Left/Right sector change, CTRL+Left/Right side change.

Offline rampa

  • Beginner
  • *
  • Posts: 30
  • Country: es
  • OS:
  • Mac OS X 10.15 Mac OS X 10.15
  • Browser:
  • Firefox 98.0 Firefox 98.0
    • View Profile
Re: Enterprise Deployment Attempt Over FPGA.
« Reply #228 on: 2022.March.09. 21:40:03 »
This means: reading boot sector successfully, but the readed data not a valid FAT boot sector.
I suggest use EPDOS Disk Editor, for easy view what readed.
After enter EPDOS, press Abort on disk error, navigate to the D-EDIT, start it, Abort on disk error, press CTRL+F8 for switch Track/Sector mode.
ALT+Up/Down track change, ALT+Left/Right sector change, CTRL+Left/Right side change.

 Thanks for the tip.... all 00.... back to code diving....

-ramon-

Offline rampa

  • Beginner
  • *
  • Posts: 30
  • Country: es
  • OS:
  • Mac OS X 10.15 Mac OS X 10.15
  • Browser:
  • Firefox 98.0 Firefox 98.0
    • View Profile
Re: Enterprise Deployment Attempt Over FPGA.
« Reply #229 on: 2022.March.14. 17:57:04 »

 Still fighting with the fdd controller... :(

 i was thinking in problems with the disk image. so i have tried to format it.  (reading still getting "no OS disk") it seems to start the format and afer two or three seconds. "not ready"


Offline BruceTanner

  • EP lover
  • *
  • Posts: 594
  • Country: gb
  • OS:
  • Windows 10+ Windows 10+
  • Browser:
  • Firefox 98.0 Firefox 98.0
    • View Profile
Re: Enterprise Deployment Attempt Over FPGA.
« Reply #230 on: 2022.March.14. 18:33:27 »
In case it is any help, this is the loop within EXDOS that reads disk data:

Code: ZiLOG Z80 Assembler
  1. ;   READ COMMANDS  -  READ SECTORS, READ ADDRESS and READ TRACK
  2. ;
  3. ;
  4. READ:   CALL    GET_CMD                 ;Get FDC command and timeout
  5.         OUT     (C),A                   ;Give command to FDC chip
  6.         SET     3,C                     ;Point to external status port 
  7. ;
  8. ; WAIT FOR FIRST DRQ WITH TIMEOUT.  138T (34.5us) per loop.
  9. ;
  10. RD_WT1: JR      $+2             ;13T    Padding
  11.         LD      A,0             ;8 T    Padding
  12.         IN      A,(C)           ;14T
  13.         JP      M,RD_LP         ;11T    Jump if got DRQ
  14.         DEC     DE              ;7 T    Decrement timeout count
  15.         IN      A,(C)           ;14T    Padding
  16.         IN      A,(C)           ;14T
  17.         JP      M,RD_LP         ;11T    Jump if got DRQ
  18.         LD      A,D             ;5 T   
  19.         OR      E               ;5 T
  20.         JP      Z,TIMED_OUT     ;11T    Jump if timeout expired
  21.         IN      A,(C)           ;14T
  22.         JP      P,RD_WT1        ;11T    Loop if still no DRQ   
  23. ;
  24. ;
  25. RD_LP:  DEC     C               ;5 T   
  26.         IN      A,(C)           ;14T    Get byte from FDC data register
  27.         LD      (HL),A          ;8+8T   Store it in RAM (clock stretch!)
  28.         INC     HL              ;7 T    Bump disk transfer address
  29.         INC     C               ;5 T
  30. RD_WT:  IN      A,(C)           ;14T   
  31.         AND     82H             ;8 T    Look at DRQ and INTRQ bits
  32.         JR      Z,RD_WT         ;8/13T  Wait if neither set
  33.         JP      M,RD_LP         ;11T    Jump if DRQ is set
  34. ;
  35.         JR      DONE_X          ;Exit when INTRQ occurs  
  36.  
  37.  
  38. GET_CMD:
  39. ;
  40. ;    Determine correct FDC command by including "settle delay" flag if
  41. ; required.  Also determine correct timeout delay for read and verify
  42. ; depending on "motor on" flag.  Write will ignore this value.
  43. ;
  44. ;
  45.         BIT     2,(IY+DELAY_FLAGS##)    ;Test "settle delay" flag
  46.         JR      Z,NO_SET
  47.         SET     2,A                     ;If required then set bit-2
  48. NO_SET:
  49. ;
  50.         LD      DE,09331h               ;Short timeout of 1.3s if motor on
  51.         BIT     7,(IY+DELAY_FLAGS##)
  52.         RET     NZ
  53.         LD      DE,0                    ;Long timeout of 2.3s if motor off
  54.         RET
  55.  
« Last Edit: 2022.March.14. 20:07:43 by Zozosoft, Reason: code block fixed »

Offline BruceTanner

  • EP lover
  • *
  • Posts: 594
  • Country: gb
  • OS:
  • Linux (Ubuntu) Linux (Ubuntu)
  • Browser:
  • Firefox 98.0 Firefox 98.0
    • View Profile
Re: Enterprise Deployment Attempt Over FPGA.
« Reply #231 on: 2022.March.14. 18:37:05 »
I don't know what happened there, and sorry the tabs size is mixed up but hopefully it is usable. Ignore the bit at the end that says ". str_ireplace(' [ Attachment Invalid Or Does Not Exist ] '" I did not add that, the "system" did! :lol:

B.

Offline Zozosoft

  • EP addict
  • *
  • Posts: 14417
  • Country: hu
  • OS:
  • Windows 10+ Windows 10+
  • Browser:
  • Firefox 98.0 Firefox 98.0
    • View Profile
    • http://enterprise.iko.hu/
Re: Enterprise Deployment Attempt Over FPGA.
« Reply #232 on: 2022.March.14. 20:09:30 »
I don't know what happened there, and sorry the tabs size is mixed up but hopefully it is usable. Ignore the bit at the end that says ". str_ireplace(' [ Attachment Invalid Or Does Not Exist ] '" I did not add that, the "system" did! :lol:
It is a forum bug :oops:
At the code block start with code=z80, then working.

Offline BruceTanner

  • EP lover
  • *
  • Posts: 594
  • Country: gb
  • OS:
  • Unknown Unknown
  • Browser:
  • Firefox 60.0 Firefox 60.0
    • View Profile
Re: Enterprise Deployment Attempt Over FPGA.
« Reply #233 on: 2022.March.14. 20:33:16 »
:shock: surely not! :lol: Thanks for fixing!

Offline rampa

  • Beginner
  • *
  • Posts: 30
  • Country: es
  • OS:
  • Mac OS X 10.15 Mac OS X 10.15
  • Browser:
  • Firefox 98.0 Firefox 98.0
    • View Profile
Re: Enterprise Deployment Attempt Over FPGA.
« Reply #234 on: 2022.March.16. 11:58:13 »

 Still in the same point.... but some doubts.

  In the real hardware, each time i change unit (from A: to B:) the ep ask me to put a disk in the drive (there is a floppy in the drive) but the FPGA simply try to read the drive. Also, i only have one drive, but the fpga try to access inexistent drives. How it detect the drives?


Offline BruceTanner

  • EP lover
  • *
  • Posts: 594
  • Country: gb
  • OS:
  • Linux (Ubuntu) Linux (Ubuntu)
  • Browser:
  • Firefox 98.0 Firefox 98.0
    • View Profile
Re: Enterprise Deployment Attempt Over FPGA.
« Reply #235 on: 2022.March.16. 12:47:15 »
In the real hardware, each time i change unit (from A: to B:) the ep ask me to put a disk in the drive (there is a floppy in the drive) but the FPGA simply try to read the drive. Also, i only have one drive, but the fpga try to access inexistent drives. How it detect the drives?
It does a WD1770 "Restore" command, waits for the WD to become non-busy in the status resgister (bit 0 == 0), and then looks at bit 2 of the status register, which should be 0 if the drive head is now at track 0.

After testing drive A: in this way, it repeats for drive B:. For emulating a one-drive system, bit 2 of the status register needs to be 0 for drive A: and 1 for drive B:. after a "Restore" command.

B.

Offline BruceTanner

  • EP lover
  • *
  • Posts: 594
  • Country: gb
  • OS:
  • Unknown Unknown
  • Browser:
  • Firefox 60.0 Firefox 60.0
    • View Profile
Re: Enterprise Deployment Attempt Over FPGA.
« Reply #236 on: 2022.March.16. 17:44:55 »
Still in the same point...
Just a thought... are you using a FPGA Z80? If you are, does the IN A,(C) instruction set the flags? The code I posted earlier relies on this but it is probably not the most frequently used Z80 feature!

Offline rampa

  • Beginner
  • *
  • Posts: 30
  • Country: es
  • OS:
  • Mac OS X 10.15 Mac OS X 10.15
  • Browser:
  • Firefox 98.0 Firefox 98.0
    • View Profile
Re: Enterprise Deployment Attempt Over FPGA.
« Reply #237 on: 2022.March.16. 18:45:14 »
Just a thought... are you using a FPGA Z80? If you are, does the IN A,(C) instruction set the flags? The code I posted earlier relies on this but it is probably not the most frequently used Z80 feature!

  As far as i recall i have used it in the past. T80 is a good Z80 implementation. I think the problem is in the 1770 controller. seems it is seting the tr00 bit without "inserted disk" (really a monted image)

Offline ron

  • User
  • *
  • Posts: 83
  • Country: es
  • OS:
  • Linux Linux
  • Browser:
  • Firefox 99.0 Firefox 99.0
    • View Profile
    • RetroWiki & Cacharreo [RW]

Offline Dr.OG

  • EP lover
  • *
  • Posts: 594
  • Country: hu
  • dr.
  • OS:
  • Windows 10+ Windows 10+
  • Browser:
  • Chrome 100.0.4896.127 Chrome 100.0.4896.127
    • View Profile
Re: Enterprise Deployment Attempt Over FPGA.
« Reply #239 on: 2022.May.02. 05:06:41 »
WOW! Thanks for your efforts!
ÉN ekelek, TE keregsz, Ő gyeleg,
MI ákolunk, TI vornyáztok, ŐK lendeznek.