News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu

amstrad cpc "acid" test

Started by arnoldemu, 20:56, 20 January 16

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

arnoldemu

Quote from: Fredouille on 12:28, 24 December 16
Hi @arnoldemu !! Any idea when new tests will be available ?
Sorry not yet.

I have re-written the disc tests. The code is simpler, the results are more stable and accurate and the tests cover more.

It is still in progress.

I am also busy at work so progress has slowed down a little, but I make progress every day.

It will be worth the wait.

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

arnoldemu

I am *still* re-writing the tests. Each day I think up a new thing to test.

The original fdc tests missed a lot of things. In fact there are so many tests now they are split into multiple parts. Each is around 32kb in size.
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

arnoldemu

#77
New tests!

http://www.cpctech.org.uk/test.zip

I have re-organised them. I hope it is easier to find tests and use them.
I have added more tests.
A lot have information about what is tested.
CRTC and Plus tests were not updated this time. I need to add the "intro" message to them all.
Some tests are still unorganised (cpctests).
I have also described the configuration of my test computers.

It has taken a lot of work (almost daily) to get this far and I still need to do more work on them. (e.g. fdctest3).
Where the result can be tested and verified it will say "PASS" or "FAIL" depending on the result and list the result bytes. For FDC it will be data like size read and the result phase bytes. Look at the source to see what the numbers mean I tried to format the text to make it easier to read.

See the TODO for the list of tests I have thought about but not added yet.

I have taken all the feedback and used that to improve the tests. :)

I welcome feedback and questions.

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

arnoldemu

Quote from: Fredouille on 08:35, 09 November 16
I just have a silly question that only people with real CPC can answer.
I am new in this forum so maybe the answer is already hidden somewhere.

I am just wandering what is the time needed by the floppy drive to become "ready" when motor is starting ?
And also the time to become "not ready" when motor is stopping ?
It depends on the drive. My 3.5" drive is very quick to go ready and not-ready (the test can't measure it).

My 3" drives are much slower and they are not all the same.

In my new tests I have numbers:

3" on type 1 6128:
on: 6c7, a04,93f
off: 0,0,0

The numbers are the number of iterations of the testing loop. I will find out what this means in seconds or milliseconds.

These are min, max and average times.
It takes time from not-ready to ready, but seems to be not-ready almost immediately. (The test is not accurate enough to measure this).

The test does a not-ready to ready and ready to not-ready 32 times and calculates the result. The not-ready to ready definitely depends on the drive belt age, 3.5" has direct drive so is very quick.

It's also worth noting that drives can't always handle the faster step rates and the result is often different when seeking 0->39 and 39->0.

My 3.5" can handle all but the fastest step rate with both directions.

The test (disc/drivetest) sets the step rate time and makes it seek to track 39. It then does a seek from 39 to 0. It will then read the id from the track it reached to discover where it got to. 3.5" can do all step rates except 1. My 3" drives, can't handle below 4, and it also seems if the step rate is too slow they can also have problems.  So I can't give an exact answer.

If others can do measurements then perhaps we can find an average value for a 3" drive.

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

Lone

Hello,


It seems that the first link is not correct. Using http://www.cpctech.org.uk/test.zip instead works (the zip file is recent)


Anyway, thanks for this amazing tool !

arnoldemu

Quote from: Lone on 16:12, 13 May 17
Hello,


It seems that the first link is not correct. Using http://www.cpctech.org.uk/test.zip instead works (the zip file is recent)


Anyway, thanks for this amazing tool !
Yes you are correct it is test.zip. Sorry for the bad link.
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Fredouille

Hello Kevin,

I am beginning to play with your new tests and I feel very happy with them.
We just need the disk containing the test and an empty one to perform tests.

Furthermore, that is just easy to recompile them... And for that, a great THANK YOU !!


For the moment, I just have one question: How to interpret those errors ?

arnoldemu

#82
Quote from: Fredouille on 09:55, 26 May 17
Hello Kevin,

I am beginning to play with your new tests and I feel very happy with them.

We just need the disk containing the test and an empty one to perform tests.
good :)

The disc tests are split into many parts because I ran out of ram if they are all together AND each part needs it's own disc format for the tests. The older test was incomplete. In fact these tests are still incomplete, I thought about as many tests as possible, but still I think up more today.

Each disc test will first test the drive and make a test format of 5 tracks. Then the test disk is formatted and the deleted data sectors are marked. Then the tests run.

Do you want me to make a dump of the test disk for each test (fdc_seek, fdc_write etc)?

If your emulator is passing a lot and you don't want to wait, you can edit the code and comment out each "DEFINE_TEST" if you wish and build it. Then you can concentrate on the fails. The tests are meant to be independent. The only ones to be careful of are the dma tests, these need to be last.

For the test you show in the picture it is in test\disc\fdc_write
code is in fdctest.asm in that directory.

Each test uses a pasmo macro

DEFINE_TEST "description",test_addr

The test that has failed is "dd_wc". Find it by looking for the DEFINE_TEST line in the code :)

This test uses write deleted data and track 13. It calls "cm_wc" or "common_wc".

The expected results are in res_dd_wc. I have structured them in the code to try and make it easier to read. Bytes &fe,&00 is "end of test data". If you see &fe,&01 this means to take the previous byte and OR the drive number to it. (bit 1,0) fe,&02, means to take the previous byte and OR the drive and side to it. (bits 2,1,0)

The test disc format is this label: test_disk_format_data

And in there is the definition for track 13.

;; dd_wc
defb 13
defb 0   
defb %01000000

defb 2
defb 1
defb def_format_gap
defb def_format_filler
defb 14,&0,&41,2

This means: track 13, side 0, double density, format with size 2, 1 sector per track, default gap and default filler byte and the chrn value.

The code initialises various write deleted data parameters and counts the number of bytes written and takes the result data.

In this case the result data is like this:

2 bytes size written (the number of bytes in the execution phase)
1 byte number of bytes in fdc result phase (7)
then fdc result phase bytes.

Quote from: Fredouille on 09:55, 26 May 17
Furthermore, that is just easy to recompile them... And for that, a great THANK YOU !!
great :) I tried hard to make them much easier to use.

if using windows then run the "buildall.bat", or for each test there is a "build.bat". Windows makes bin and dsks.
For linux use the makefile in each dir. linux doesn't make a dsk. I can add that for next release of the tests.

On windows, you need pasmo and cpcxfs in c:\tools

cpcxfs can be downloaded from www.cpctech.org.uk/download.html

Quote from: Fredouille on 09:55, 26 May 17
For the moment, I just have one question: How to interpret those errors ?
In the code I have expected bytes these are the results I got from a real cpc.
Result of "FAIL" means 1 or more bytes is not the expected value.

if the result byte is ok it just puts the byte and "Ok". This byte matches the expected.
if the result byte is different it puts the value YOUR EMULATOR gives and the byte it wants.

So "xx got expected yy". xx is from your emulator, yy is the result I got from the real cpc.

The results for each test are not all formatted in the same way, but the pattern is similar.

If in doubt look at the test in the source, look and the format information, and look at the result bytes. Each test is written to be similar in structure so it should be easy to find what you need.

EDIT: The 16-bit number is the position in the test results (ignoring &fe,xx). (0001: got 02 - OK) it is second byte in test results, 0 is first, your emulator reported 2, it wanted 2 and that was correct)

I hope that helps :)
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Fredouille

Thank you, I do not need any dumps for the moment.
Your steps to create the test disk seems OK.

As you said, I have already changed tests order to remove FM and MFM, as I know there are not relevant for me because my emulator doesn't handle FM mode, no DMA as well.

I am not sure, but i believe I have found some bug into disc\fdc_write\fdctest.asm:
line 1766: "ld hl,res_d_ov_fill" instead of "ld hl,res_d_wc"
line 1782: "ld hl,res_dd_ov_fill" instead of "ld hl,res_d_wc"

I will try to test using a real CPC...

arnoldemu

Quote from: Fredouille on 14:59, 26 May 17
Thank you, I do not need any dumps for the moment.
Your steps to create the test disk seems OK.

As you said, I have already changed tests order to remove FM and MFM, as I know there are not relevant for me because my emulator doesn't handle FM mode, no DMA as well.

I am not sure, but i believe I have found some bug into disc\fdc_write\fdctest.asm:
line 1766: "ld hl,res_d_ov_fill" instead of "ld hl,res_d_wc"
line 1782: "ld hl,res_dd_ov_fill" instead of "ld hl,res_d_wc"

I will try to test using a real CPC...
Ah yes, that one needs to be finished, same with "write deleted data (overrun - thrash data register)" and "write deleted data (ready change during sector)".

On this test it will show a grid of numbers.

My notes say:

write deleted data (overrun - fill byte):

UM8272 - it's the last byte in the data register (0-7f, 7f repeated)

So you will see 0-7f, then 7f repeated to the end of the list of numbers.

write deleted data (overrun - thrash data register):

On this test I cause an overrun and then write the data register with values until the execution phase is complete.

You will see 0-7f, 7f repeated 4 more times, then 0,2,3,4,6,7,8,a,b,c,d,e,f and some more numbers.


On "write deleted data (ready change during sector)" it says:

0 for most of sector data, then 07,40,20,60 etc.

In this one I write data and the stop the drive motor, the pll can't lock properly and you will get some strange bytes at the end as the pll tries to lock to the data which is now coming in at a slower and slower rate.

EDIT: Yes try on a real cpc.
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Fredouille

#85
Tests done with same results (failure on both Caprice and real CPC6128).
I have tried to attach pictures without success...

Attach CPC Picture: Your attachment has failed security checks and cannot be uploaded. Please consult the forum administrator.

arnoldemu

#86
Quote from: Fredouille on 17:25, 26 May 17
Tests done with same results (failure on both Caprice and real CPC6128).
I have tried to attach pictures without success...

Attach CPC Picture: Your attachment has failed security checks and cannot be uploaded. Please consult the forum administrator.
What is the configuration of the CPC you tested? Do you know the model of the FDC, the data seperator, GA etc? This is important because FDCs do different things in tests like this one and it would be good to know which configuration you have.

I expected these results for these tests and the "fail" is expected because the results are not checked in this test - sorry I should have disabled it before I released the tests.

Please continue with the other tests.

The numbers (7f etc) are the important ones.

On UM8728 FDC in one of my CPCs, I can make overrun, then write data to the data register and it writes into the sector. So here this is another difference in FDCs.

Continue to compare against the real CPC :)

fdctest3 test does not have checking for all tests yet. fdc_seek, fdc_gen are good (you may get different results on the tests with "unformatted" tracks because this is different on various fdcs and I need to test more - you will need to know the model of the fdc you have in your cpc to get the same results.

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

arnoldemu

btw on some tests you will see this:

"ready change during command-008 007 006 005 004 003 002 001 001 PASS"

These are not result bytes so please ignore them. They are a progress indicator. I add these when the test is a lot of work. :)


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

Fredouille

#88
I have performed my tests yesterday on a CPC6128 French including UM6845R (CRTC) and UM8272A (FDC).
I will try to fix the drive of another 6128 French including HD6845SP (CRTC) and D765AC-2 (FDC).

I am using HxC to execute FDCTEST and all tests are performed on internal drive.

Edit : I can also try on a 664 French including HD6845SP (CRTC) and D765AC (FDC).

3 differents FDC !!

arnoldemu

Quote from: Fredouille on 09:16, 27 May 17
I have performed my tests yesterday on a CPC6128 French including UM6845R (CRTC) and UM8272A (FDC).
I will try to fix the drive of another 6128 French including HD6845SP (CRTC) and D765AC-2 (FDC).

I am using HxC to execute FDCTEST and all tests are performed on internal drive.

Edit : I can also try on a 664 French including HD6845SP (CRTC) and D765AC (FDC).

3 differents FDC !!
Fantastic.

Please continue to report bugs :) I am adding some new tests today and I will fix all the problems reported :)

I didn't try the tests on a 664 or DDI-1 yet. I do have them but I didn't have time to run them yet. It is possible one of these does support single density :)


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

Fredouille

#90
Quote from: arnoldemu on 10:31, 27 May 17
Fantastic.

Please continue to report bugs :) I am adding some new tests today and I will fix all the problems reported :)

I didn't try the tests on a 664 or DDI-1 yet. I do have them but I didn't have time to run them yet. It is possible one of these does support single density :)

Of course, I forgot the DDI-1... I will test with it as well !!


I have many problems with test "write data (wrong cylinder)" on a real CPC.
What is the meaning of the 2nd  results ?
0000: got 00 - OK
0001: got 00 expected 02 - FAIL

Edit: I believe I have found. First bytes are the size of data transferred. 512 or 0 depending on operation failure.

Fredouille

Here is the test "write deleted data (wrong cylinder)" resource working for both of my CPC6128:

res_d_wc:
defw &0
defb 7,&40,&fe,&02,&4,&10,4,0,&41,&2
defw &200
defb 7,&40,&fe,&02,&80,&0,3,0,&41,&2
defw &0
defb 7,&40,&fe,&02,&4,&0,3,1,&41,&2
defw &0
defb 7,&40,&fe,&02,&4,&0,3,1,&41,&3
defw &0
defb 7,&40,&fe,&02,&4,&10,4,1,&41,&2
defw &0
defb 7,&40,&fe,&02,&4,&10,4,1,&41,&3
defb &fe,&00

arnoldemu

Thank you.

I am working through the tests and fixing the problems reported and checking all the tests again.

Known: fm and unformatted tests - the c,h,r,n values seem to be random, or not initialized. I try to find the results by reading a valid track and then reading the fm/unformatted track. My attempt is to find how the values are decided. I will disable these tests for now.


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

roudoudou

Hello, today i wanna criticize some emulators so i made a test  :P


Here is the result, it's about split-raster


Pictures only as an illustration, please run the real test in CPR



My pronouns are RASM and ACE

roudoudou

#94
was tryin' to reproduce a reported bug with sprites priorities when i saw this problem with Arnold / Winape
i guess it's the same problem as splitraster management, it's only NOP accurate and not Cycle accurate (one cycle is 1/4 nop)
on a real CPC, the sprite in mode 2 has almost disappear
on a real CPC, mode 1 & mode 0 sprite x-change occur a little further/later
as usual, screenshot only to illustrate, run the f*ck*ng CPR !!!



My pronouns are RASM and ACE

Lone

Hey Roudoudou,


As I don't have any PLUS at home, do you have a photo of the complete screen of your plus, to check ?


roudoudou

Quote from: Lone on 14:35, 06 August 17
As I don't have any PLUS at home, do you have a photo of the complete screen of your plus, to check ?


There is no differences with the sprites in the upper screen. I tried to reproduce a priority bug but i failed. Maybe Offset has a code for this.
My pronouns are RASM and ACE

arnoldemu

Quote from: roudoudou on 14:48, 06 August 17

There is no differences with the sprites in the upper screen. I tried to reproduce a priority bug but i failed. Maybe Offset has a code for this.
I haven't heard of this bug. There is a bug with the sprite priorities?
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

roudoudou

Quote from: arnoldemu on 15:00, 06 August 17
I haven't heard of this bug. There is a bug with the sprite priorities?


Be sure as soon as i have more informations about it, you will be the first informed  8) ;D
My pronouns are RASM and ACE

arnoldemu

Quote from: roudoudou on 16:50, 06 August 17

Be sure as soon as i have more informations about it, you will be the first informed  8) ;D
The Plus specification says that the sprite is removed for the duration of a write. I don't know if this is x,y,mag or sprite data.

This is something I didn't test yet.

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

Powered by SMFPacks Menu Editor Mod