Author Topic: amstrad cpc "acid" test  (Read 13591 times)

0 Members and 1 Guest are viewing this topic.

Offline arnoldemu

  • Supporter
  • 6128 Plus
  • *
  • Posts: 5.273
  • Country: gb
    • Unofficial Amstrad WWW Resource
  • Liked: 2152
amstrad cpc "acid" test
« on: 21: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.

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

Offline Lone

  • Supporter
  • CPC664
  • *
  • Posts: 81
  • Country: fr
  • Liked: 142
Re: amstrad cpc "acid" test
« Reply #1 on: 23:06, 20 January 16 »
That's GREAT tools !


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



Offline remax

  • 6128 Plus
  • ******
  • Posts: 1.004
  • Country: fr
  • Liked: 327
Re: amstrad cpc "acid" test
« Reply #2 on: 23:30, 20 January 16 »
I did an acid test on my Amstrad (mine was clorhydric i think), and it melted down...


What next ?

Offline Bryce

  • The Hardware Guy.
  • Supporter
  • 6128 Plus
  • *
  • Posts: 10.077
  • Country: wf
  • It's not broken, it just hasn't been fixed yet.
    • index.php?action=treasury
  • Liked: 3396
Re: amstrad cpc "acid" test
« Reply #3 on: 10:52, 21 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.

Offline remax

  • 6128 Plus
  • ******
  • Posts: 1.004
  • Country: fr
  • Liked: 327
Re: amstrad cpc "acid" test
« Reply #4 on: 17:35, 21 January 16 »
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 !
« Last Edit: 23:19, 21 January 16 by remax »

Offline TFM

  • Visit the mysteries of the CPC at www.futureos.de
  • Supporter
  • 6128 Plus
  • *
  • Posts: 9.899
  • Country: aq
  • Space Chicken for FutureOS is free!
    • index.php?action=treasury
    • FutureOS - The revolution on CPC!
  • Liked: 1971
Re: amstrad cpc "acid" test
« Reply #5 on: 20:48, 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

Offline remax

  • 6128 Plus
  • ******
  • Posts: 1.004
  • Country: fr
  • Liked: 327
Re: amstrad cpc "acid" test
« Reply #6 on: 21:54, 21 January 16 »

You could at least tell a joke...  ;)


done

Offline Bryce

  • The Hardware Guy.
  • Supporter
  • 6128 Plus
  • *
  • Posts: 10.077
  • Country: wf
  • It's not broken, it just hasn't been fixed yet.
    • index.php?action=treasury
  • Liked: 3396
Re: amstrad cpc "acid" test
« Reply #7 on: 23:07, 21 January 16 »
That was a joke??[nb]Ok, it's not that bad[/nb]

Bryce.
« Last Edit: 23:10, 21 January 16 by Bryce »

Offline remax

  • 6128 Plus
  • ******
  • Posts: 1.004
  • Country: fr
  • Liked: 327
Re: amstrad cpc "acid" test
« Reply #8 on: 23:10, 21 January 16 »
That was a joke??

Bryce.


which post do you talk about ?  ;D

Offline Bryce

  • The Hardware Guy.
  • Supporter
  • 6128 Plus
  • *
  • Posts: 10.077
  • Country: wf
  • It's not broken, it just hasn't been fixed yet.
    • index.php?action=treasury
  • Liked: 3396
Re: amstrad cpc "acid" test
« Reply #9 on: 23:18, 21 January 16 »
The "Si Si entre entre" joke.

Bryce.

Offline remax

  • 6128 Plus
  • ******
  • Posts: 1.004
  • Country: fr
  • Liked: 327
Re: amstrad cpc "acid" test
« Reply #10 on: 23: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).
« Last Edit: 23:20, 21 January 16 by remax »

Offline robcfg

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.931
  • Country: se
  • 8-Bit Technomancer
    • index.php?action=treasury
  • Liked: 775
Re: amstrad cpc "acid" test
« Reply #11 on: 23:27, 21 January 16 »
If if!

Offline andycadley

  • Supporter
  • 6128 Plus
  • *
  • Posts: 770
  • Liked: 334
Re: amstrad cpc "acid" test
« Reply #12 on: 01: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. ;-)

Offline arnoldemu

  • Supporter
  • 6128 Plus
  • *
  • Posts: 5.273
  • Country: gb
    • Unofficial Amstrad WWW Resource
  • Liked: 2152
Re: amstrad cpc "acid" test
« Reply #13 on: 15:01, 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

Offline Executioner

  • Supporter
  • 6128 Plus
  • *
  • Posts: 783
  • Country: au
  • WinAPE Developer
    • WinAPE
  • Liked: 387
Re: amstrad cpc "acid" test
« Reply #14 on: 23:45, 13 February 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.

Offline arnoldemu

  • Supporter
  • 6128 Plus
  • *
  • Posts: 5.273
  • Country: gb
    • Unofficial Amstrad WWW Resource
  • Liked: 2152
Re: amstrad cpc "acid" test
« Reply #15 on: 12:52, 14 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

Offline Executioner

  • Supporter
  • 6128 Plus
  • *
  • Posts: 783
  • Country: au
  • WinAPE Developer
    • WinAPE
  • Liked: 387
Re: amstrad cpc "acid" test
« Reply #16 on: 22:58, 14 February 16 »

Offline Lone

  • Supporter
  • CPC664
  • *
  • Posts: 81
  • Country: fr
  • Liked: 142
Re: amstrad cpc "acid" test
« Reply #17 on: 11:56, 29 March 16 »
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 !

Offline roudoudou

  • 464 Plus
  • *****
  • Posts: 472
  • Country: fr
    • urban exploration
  • Liked: 523
Re: amstrad cpc "acid" test
« Reply #18 on: 10:24, 18 April 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)
delirium tremens mainpart preview [cpc+] &copy hard'os (2001)

And the real result
https://www.youtube.com/watch?v=yJcBsQwMzuw


++
« Last Edit: 10:27, 18 April 16 by roudoudou »
use RASM, the best assembler ever made :p

I will survive

Offline arnoldemu

  • Supporter
  • 6128 Plus
  • *
  • Posts: 5.273
  • Country: gb
    • Unofficial Amstrad WWW Resource
  • Liked: 2152
Re: amstrad cpc "acid" test
« Reply #19 on: 11:31, 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.


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?


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

Offline arnoldemu

  • Supporter
  • 6128 Plus
  • *
  • Posts: 5.273
  • Country: gb
    • Unofficial Amstrad WWW Resource
  • Liked: 2152
Re: amstrad cpc "acid" test
« Reply #20 on: 15:51, 18 April 16 »
Do these tests pass 100% on Ace?
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Offline roudoudou

  • 464 Plus
  • *****
  • Posts: 472
  • Country: fr
    • urban exploration
  • Liked: 523
Re: amstrad cpc "acid" test
« Reply #21 on: 20:59, 18 April 16 »
Do these tests pass 100% on Ace?


since i do not have a powerPC, i can't run ACE :(
use RASM, the best assembler ever made :p

I will survive

Offline roudoudou

  • 464 Plus
  • *****
  • Posts: 472
  • Country: fr
    • urban exploration
  • Liked: 523
Re: amstrad cpc "acid" test
« Reply #22 on: 23:33, 19 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







use RASM, the best assembler ever made :p

I will survive

Offline Executioner

  • Supporter
  • 6128 Plus
  • *
  • Posts: 783
  • Country: au
  • WinAPE Developer
    • WinAPE
  • Liked: 387
Re: amstrad cpc "acid" test
« Reply #23 on: 02:54, 20 April 16 »
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.

Offline arnoldemu

  • Supporter
  • 6128 Plus
  • *
  • Posts: 5.273
  • Country: gb
    • Unofficial Amstrad WWW Resource
  • Liked: 2152
Re: amstrad cpc "acid" test
« Reply #24 on: 09:05, 20 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