Author Topic: arnoldemu's testbench fdctest "14:FAIL 01"  (Read 1311 times)

0 Members and 1 Guest are viewing this topic.

Offline freemac

  • 464 Plus
  • *****
  • Posts: 374
  • Country: 00
  • Liked: 268
  • Likes Given: 272
arnoldemu's testbench fdctest "14:FAIL 01"
« on: 18:21, 14 July 17 »
Hi,

I'm trying to pass the "read_de_data" test but it does fail "14:FAIL 01", it is commented "data error" and script is:

Quote
read_de_data:
call start_drive_motor

ld a,4
call move2track

ld a,%01000110 ;; read data
call send_command_byte
ld a,(drive)
call send_command_byte
ld a,0 ;; C
call send_command_byte
ld a,0 ;; H
call send_command_byte
ld a,&aa ;; R
call send_command_byte
ld a,3 ;; N
call send_command_byte
ld a,&aa ;; EOT
call send_command_byte
ld a,&2a ;; GPL
call send_command_byte
ld a,&ff ;; DTL
call send_command_byte

ld de,0
call fdc_read_data2
;; 0x0400 <= EDIT : ;; should have read 2 sectors (like test 19) : 2*512B
ex de,hl
ld bc,&400
or a
sbc hl,bc
ld a,h
or l
ex de,hl
ld a,1
call nz,set_error


call fdc_result_phase
;; 41,20,20,00,00,aa,03
ld ix,result_data
ld a,(ix+3)
or a
ld a,2
call nz,set_error
ld a,(ix+4)
or a
ld a,3
call nz,set_error
ld a,(ix+5)
cp &aa
ld a,4
call nz,set_error
ld a,(ix+6)
cp 3
ld a,5
call nz,set_error
ld a,(ix+2)
cp &20
ld a,6
call nz,set_error
ld a,(ix+1)
cp &20
ld a,7
call nz,set_error
ld a,(ix+0)
and %11111000
cp &40
ld a,8
call nz,set_error
call stop_drive_motor

ret

It seems about ST1_DATA_ERROR/ST2_DATA_ERROR, sent when sector id R is not reach.

I don't understand theses "ex de,hl" instructions, what behavior is expected here?


* EDIT : found the same formula in test 19 with comment ;; should have read 2 sectors : 2*512B
For this testbench, 1024 bytes (N of CHRN being 3 so then 1024 bytes instead of classic 512bytes (N=2)) read (during EXEC_MODE) are wanted before switching into RESULT sequence.
« Last Edit: 23:54, 18 July 17 by freemac »

Offline arnoldemu

  • Supporter
  • 6128 Plus
  • *
  • Posts: 5.336
  • Country: gb
    • Unofficial Amstrad WWW Resource
  • Liked: 2281
  • Likes Given: 3478
Re: arnoldemu's testbench fdctest "14:FAIL 01"
« Reply #1 on: 19:28, 14 July 17 »
Hi,

I'm trying to pass the "read_de_data" test but it does fail "14:FAIL 01", it is commented "data error" and script is:

It seems about ST1_DATA_ERROR/ST2_DATA_ERROR, sent when sector id R is not reach.

I don't understand theses "ex de,hl" instructions, what behavior is expected here?
Please don't use those old tests. The 'acid test' disc tests are much better and more reliable.
http://www.cpctech.org.uk/test.zip

See "disc" directory.
I need to go back and improve some of the tests because the result is different on some fdcs and I need to test on 664 and ddi-1.

These are all good:
- seek, recalibrate, sense interrupt status, sense drive status, write protect


My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Offline freemac

  • 464 Plus
  • *****
  • Posts: 374
  • Country: 00
  • Liked: 268
  • Likes Given: 272
Re: arnoldemu's testbench fdctest "14:FAIL 01"
« Reply #2 on: 13:01, 15 July 17 »

I'm implementing NEC FDC, then old test seems great on it. But more and more tests are still good ;)


After some debug, I succeed in starting new FDC testbench
[attachimg=1]
...but in my project (MiST-board's CoreAmstrad), I cannot implement "format" command (command are simply ignored) : because it does grow up files, and all files on my SDCARD are defrag, in order to gain the write access.


I suppose that creating the testdisk from an emulator and then put it in MiST-board shall do the stuff, isn't it ?

Offline arnoldemu

  • Supporter
  • 6128 Plus
  • *
  • Posts: 5.336
  • Country: gb
    • Unofficial Amstrad WWW Resource
  • Liked: 2281
  • Likes Given: 3478
Re: arnoldemu's testbench fdctest "14:FAIL 01"
« Reply #3 on: 13:35, 15 July 17 »
I'm implementing NEC FDC, then old test seems great on it. But more and more tests are still good ;)


After some debug, I succeed in starting new FDC testbench
[attachimg=1]
...but in my project (MiST-board's CoreAmstrad), I cannot implement "format" command (command are simply ignored) : because it does grow up files, and all files on my SDCARD are defrag, in order to gain the write access.


I suppose that creating the testdisk from an emulator and then put it in MiST-board shall do the stuff, isn't it ?
[/quote
I could change the test to write the test disk the same as the old test.

Do you support ipf or other low-level disc format?
Some of these tests look at the low-level disc structure.

My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Offline freemac

  • 464 Plus
  • *****
  • Posts: 374
  • Country: 00
  • Liked: 268
  • Likes Given: 272
Re: arnoldemu's testbench fdctest "14:FAIL 01"
« Reply #4 on: 20:05, 15 July 17 »
Just a common disk formated for all tests (seek, recalibrate, sense interrupt status) in each next testbench version is enough for me. I can use emulators to create the test disk... no problems about updating tesdisks.

I'm implementing .dsk format, not raw ones. Because my project is a luck about validating reverse engineering of emulating CPC... that's all 8)