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

Accuracy is important in emulation.

I present the tests I have written to test Arnold emulator and the devices it emulates. The "acid" test for CPCs.

Download the Arnold source (Unofficial Amstrad WWW Resource) and look in the test folder.

I am sharing these so that all emulators both hardware (e.g. FreeMac's CPC hardware) and software can be made more accurate.

All tests have been run on real CPCs and Plus's and pass. You can confirm this for yourself by running them on real
machines.

Feel free to run the tests on your favourite emulator and see how it matches up.

Some tests are only applicable to the Plus because they test Plus features others will run on CPC and Plus.

I will continue to add more tests at each Arnold release.

If there is a specific hardware feature or device you want to see a test for. Post here and I will add it as soon as I can.

The most important directories:

test/cpctests
- Many tests for cpc/plus. Includes PSG,PPI,CRTC, Plus features

test/z80tests
- I converted two tests from Spectrum to CPC. I had to disable the in/out instructions on these. All the other tests work ok.

test/fdctest
- My nec765 tester from back in 2002. I updated the build scripts and added a description of each test.

Enjoy!


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

Lone

That's GREAT tools !


Thanks for them, I'll use them as soon as I finish my current works.



remax

I did an acid test on my Amstrad (mine was clorhydric i think), and it melted down...


What next ?
Brain Radioactivity

Bryce

Quote from: remax on 22:30, 20 January 16
I did an acid test on my Amstrad (mine was clorhydric i think), and it melted down...


What next ?

Strange, my Acid test went quite well:
- Plug in cartridge.
- Check for 5V across pins 1 and 16.
- Check for address bits on pin 2 and pins 9 to 15.
- Check for CLK signal.
- Check for SIN signal.

Yup, the Acid is working :)

Bryce.

P.s. Great set of tools Arnoldemu.

remax

#4
un jour un étudiant voulant suivre des cours d'anglais, cherche des prix imbattables, car il était vraiment pauvre.

Il commence donc à regarder : british school ? trop cher , americain center ? aussi...
puis miracle , il voit une annonce dans le journal : comment parler l'anglais couramment en une semaine , à 30 euros ... Ben voila ! dit-il, c'est parfait, c'est exactement ce que je cherchais , il prend l'adresse et sa mobylette pour aller s'inscrire , il cherche, ne voit rien, demande aux passants , personne ne connait d'école d'anglais dans le coin, finalement il trouve un appartement correspondant à l'adresse , il sonne, un tout petit monsieur ouvre :


- Bonjour, je cherche les cours d'anglais à 30 €, c'est pas ici ?!? demande-t-il perplexe.

Et l'autre lui répond d'un air accueillant


-IF IF !! Between ! between !
Brain Radioactivity

TFM

Quote from: remax on 16:35, 21 January 16
nothing...


You could at least tell a joke...  ;)
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

remax

Brain Radioactivity

Bryce

#7
That was a joke??[nb]Ok, it's not that bad[/nb]

Bryce.

remax

Quote from: Bryce on 22:07, 21 January 16
That was a joke??

Bryce.


which post do you talk about ?  ;D
Brain Radioactivity

Bryce

The "Si Si entre entre" joke.

Bryce.

remax

#10
Quote from: Bryce on 22:18, 21 January 16
The "Si Si entre entre" joke.

Bryce.


Yes, it's one of my favorite  ;D  (but it's better when told with big gestures).
Brain Radioactivity

robcfg


andycadley

Very cool, I shall have to have a good dig through this and the Arnold release and do my best to find any quirks you've missed. ;-)

arnoldemu

Quote from: andycadley on 00:25, 22 January 16
Very cool, I shall have to have a good dig through this and the Arnold release and do my best to find any quirks you've missed. ;-)
yes please. I can add tests for those and update Arnold to do that quirk :)
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Executioner

Quote from: arnoldemu on 20:56, 20 January 16
Download the Arnold source (Unofficial Amstrad WWW Resource) and look in the test folder.

I did, and there are none of the above mentioned tests in the current src zip file.

arnoldemu

Quote from: Executioner on 22:45, 13 February 16
I did, and there are none of the above mentioned tests in the current src zip file.
Sorry. I've zipped it separately here:

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

Executioner


Lone

Hi there


I would like to thanks again @arnoldemu for his great tests compilation.


Last night I was (finally) able to run the whole z80 tests without error (as on my 6128) thanks to it !

roudoudou

#18


Quote from: arnoldemu on 20:56, 20 January 16
Accuracy is important in emulation.

I present the tests I have written to test Arnold emulator and the devices it emulates. The "acid" test for CPCs.

I read some asic tests and they are quite simple. Really simple.

I'm currently coding an intro with Winape with an ASIC split each line EQ that means that i change 6801,6802,6803 & 6804 register every lines. As the splits are following a curve, i'm doing some computations and i can't change every registers in a short time. Registers changing is dispatched along the 64 nops i have for a line. I finally managed to set the timing FOR Winape. The code works, the intro is fine. But when i sent my code to a friend how own a real CPC+, everything goes wrong...

So i ask Offset/Futur's because his emulator seems to be the most advanced and accurate to give me some tips about the ASIC. Here is an extract of his very interresting answer:

(original)
Il y a plein de cas limites et d'artefacts. (...)   les splits sprite hard qui sont décalés d'un ou deux pixels lorsqu'ils sont faits avec certains instructions du Z80 (...) lors de la HBL le CPC+ fait des tonnes de choses avec une séquence bien précise, et les timings dépendent des fonctionnalités activées... et de ce que font les DMA (un DMA en pause induira des timings Z80 différents d'un DMA en écriture de registre, etc..).

(translation)
There is many limit cases and artifacts / doing split with hardware sprite (change hardware sprites coordinates/size during the display of them for example) may occurs some pixel translation according to the Z80 instruction doin' the change / during the HBL, ASIC refresh his own registers in a specific order. Timings of ASIC management depends on features enabled...   AND of what DMA are doing!!!!!! A paused DMA will cause differents timing than a DMA writing a register.


Personnaly, i plan to create ACID tests, because I need to develop on emulator and translate my code quickly for the real machine. (i do not own a real CPC+ :/ )

I will also share my work here,

Hope the Offset's informations about the ASIC will give you some ideas for the ASIC emulation.

And if you are looking for one existing CPC+ intro where most of emulator failed to run cause of heavy hardcore ASIC programming  delirium tremens mainpart preview [cpc+] &copy hard'os (2001)
And the real result

++
My pronouns are RASM and ACE

arnoldemu

Quote from: roudoudou on 08:24, 18 April 16

I read some asic tests and they are quite simple. Really simple.
Yes some are but they are effective and they reproduce the bugs and the pri bug you discussed.

Quote from: roudoudou on 08:24, 18 April 16
I'm currently coding an intro with Winape with an ASIC split each line EQ that means that i change 6801,6802,6803 & 6804 register every lines. As the splits are following a curve, i'm doing some computations and i can't change every registers in a short time. Registers changing is dispatched along the 64 nops i have for a line. I finally managed to set the timing FOR Winape. The code works, the intro is fine. But when i sent my code to a friend how own a real CPC+, everything goes wrong...

Have you tried the acid tests on winape?

Quote from: roudoudou on 08:24, 18 April 16
So i ask Offset/Futur's because his emulator seems to be the most advanced and accurate to give me some tips about the ASIC. Here is an extract of his very interresting answer:


(original)
Il y a plein de cas limites et d'artefacts. (...)   les splits sprite hard qui sont décalés d'un ou deux pixels lorsqu'ils sont faits avec certains instructions du Z80 (...) lors de la HBL le CPC+ fait des tonnes de choses avec une séquence bien précise, et les timings dépendent des fonctionnalités activées... et de ce que font les DMA (un DMA en pause induira des timings Z80 différents d'un DMA en écriture de registre, etc..).

(translation)
There is many limit cases and artifacts / doing split with hardware sprite (change hardware sprites coordinates/size during the display of them for example) may occurs some pixel translation according to the Z80 instruction doin' the change / during the HBL, ASIC refresh his own registers in a specific order. Timings of ASIC management depends on features enabled...   AND of what DMA are doing!!!!!! A paused DMA will cause differents timing than a DMA writing a register.
Interesting.
True DMA doing a pause and DMA writing are different and I have a test that shows that. run dmatiming ;)
I will try different combinations now :)

Arnold doesn't emulate that demo properly because it also needs exact instruction timing which arnold doesn't have.
And timings on asic are 2 us behind normal crtc.

I will post more tests soon that show these delays and things :)


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

arnoldemu

Do these tests pass 100% on Ace?
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

roudoudou

Quote from: arnoldemu on 13:51, 18 April 16
Do these tests pass 100% on Ace?


since i do not have a powerPC, i can't run ACE :(
My pronouns are RASM and ACE

roudoudou

Quote from: arnoldemu on 09:31, 18 April 16
Arnold doesn't emulate that demo properly because it also needs exact instruction timing which arnold doesn't have.


when you say "exact instruction timing", you mean doing things (read/write) at the exact time, instead of executing the whole instruction and add total time of the instruction?


i had test the double interrupt "problem" with a real CPC+ and Winape


in my example, Winape execute LD (#6800),A in zero nop (!!!) then winape add 4 nops to ticker
in a real CPC+ (i guess), Z80 start to decode instruction (1 nop) then read the adress (2 nops) and finally write register A (1 nop)
that will explain the differences in the two screenshots below

ASM source: Uplea - Advanced File hosting
And the DSK: Uplea - Advanced File hosting







My pronouns are RASM and ACE

Executioner

WinAPE currently doesn't implements the DMA imposing wait states on the Z80 during IN/OUT/PSG reads as per the spec properly, that's something I have to work on. As far as I know, however, it does read the instruction first, read the two address bytes, then do the palette switch when you do LD (nnnn),A with the correct timing. You may see early changes due to the lack of DMA WAIT states.

arnoldemu

Quote from: roudoudou on 21:33, 19 April 16

when you say "exact instruction timing", you mean doing things (read/write) at the exact time, instead of executing the whole instruction and add total time of the instruction?
correct. It is on my list to do.
*BUT* I have analysed when Plus, CRTC and GA use values and I have emulated most (I can't say all because I haven't tested all and I can't confirm all in all cases).

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

Powered by SMFPacks Menu Editor Mod