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

0 Members and 1 Guest are viewing this topic.

Offline arnoldemu

  • Supporter
  • 6128 Plus
  • *
  • Posts: 5.332
  • Country: gb
    • Unofficial Amstrad WWW Resource
  • Liked: 2247
  • Likes Given: 3477
Re: amstrad cpc "acid" test
« Reply #25 on: 10:15, 03 June 16 »
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).
Arnold now emulates the Delirium Tremens intro fully AND AE2015 demo :)

Split on plus:
* at most times, the split value is captured when HCC=R1 (i.e. border starts on horizontal). BUT when VCC=R4 and RCC=R9 (i.e. last scanline of frame) the split value is captured at HCC=R0 and is then used when RCC=1, VCC=0.  :)

Delirium Tremens intro relies on the VCC=R4, RCC=R9 case.

EDIT: No interaction with other ASIC registers, I can test this on it's own and it happens just like this.

I wanted to fix this before I released a new version of Arnold :)

I didn't need to fix the instruction timings just yet.
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Offline roudoudou

  • 6128 Plus
  • ******
  • Posts: 693
  • Country: fr
    • urban exploration
  • Liked: 968
  • Likes Given: 610
Re: amstrad cpc "acid" test
« Reply #26 on: 21:41, 08 June 16 »

Did you create your own tests to validate this behaviour?


Cause i have an intro to debug (it works on Winape but not on a real CPC+ :/ ) and i don't know how to fix it
use RASM, the best assembler ever made :p

I will survive

Offline GOB

  • Supporter
  • CPC6128
  • *
  • Posts: 159
  • Country: fr
  • Liked: 149
  • Likes Given: 110
Re: amstrad cpc "acid" test
« Reply #27 on: 21:57, 08 June 16 »
Arnold now emulates the Delirium Tremens intro fully AND AE2015 demo :)

Split on plus:
* at most times, the split value is captured when HCC=R1 (i.e. border starts on horizontal). BUT when VCC=R4 and RCC=R9 (i.e. last scanline of frame) the split value is captured at HCC=R0 and is then used when RCC=1, VCC=0.  :)

Delirium Tremens intro relies on the VCC=R4, RCC=R9 case.

EDIT: No interaction with other ASIC registers, I can test this on it's own and it happens just like this.

I wanted to fix this before I released a new version of Arnold :)

I didn't need to fix the instruction timings just yet.

I want to see my delirium tremens intro on your emulator !!! Make a vidéo please ;)

Offline Ast

  • 6128 Plus
  • ******
  • Posts: 1.017
  • Country: fr
    • Amstrad cpc Website of Ast/iMPACT
  • Liked: 807
  • Likes Given: 689
Re: amstrad cpc "acid" test
« Reply #28 on: 22:55, 08 June 16 »
Did you create your own tests to validate this behaviour?


Cause i have an intro to debug (it works on Winape but not on a real CPC+ :/ ) and i don't know how to fix it
Just timing problems Roud... I already had the same problem during the developpement of Synergy in 2007.
_____________________

Ast/iMP4CT. "By the power of Grayskull, i've the power"


Amstrad Plus French Forum

All friends are welcomed !

Offline roudoudou

  • 6128 Plus
  • ******
  • Posts: 693
  • Country: fr
    • urban exploration
  • Liked: 968
  • Likes Given: 610
Re: amstrad cpc "acid" test
« Reply #29 on: 23:01, 08 June 16 »

Like peace on earth, it's "just" a matter of will...

use RASM, the best assembler ever made :p

I will survive

Offline Ast

  • 6128 Plus
  • ******
  • Posts: 1.017
  • Country: fr
    • Amstrad cpc Website of Ast/iMPACT
  • Liked: 807
  • Likes Given: 689
Re: amstrad cpc "acid" test
« Reply #30 on: 23:06, 08 June 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?


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





@Roudoudou : Can you post the code source without this fucking website link please ?
_____________________

Ast/iMP4CT. "By the power of Grayskull, i've the power"


Amstrad Plus French Forum

All friends are welcomed !

Offline arnoldemu

  • Supporter
  • 6128 Plus
  • *
  • Posts: 5.332
  • Country: gb
    • Unofficial Amstrad WWW Resource
  • Liked: 2247
  • Likes Given: 3477
Re: amstrad cpc "acid" test
« Reply #31 on: 08:59, 09 June 16 »
Did you create your own tests to validate this behaviour?
Yes.

I disassembled the demo and I knew when the ASIC registers were written. I first thought it was a timing bug in Arnold. I also knew that my emulation of split was not exact because it didn't emulate the split bug correctly.

So I wrote more tests and found this difference. I fixed it in Arnold. I ran the demo again and it worked fine :) This time I was confident I found how the demo worked.
« Last Edit: 09:05, 09 June 16 by arnoldemu »
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Offline arnoldemu

  • Supporter
  • 6128 Plus
  • *
  • Posts: 5.332
  • Country: gb
    • Unofficial Amstrad WWW Resource
  • Liked: 2247
  • Likes Given: 3477
Re: amstrad cpc "acid" test
« Reply #32 on: 09:00, 09 June 16 »
I want to see my delirium tremens intro on your emulator !!! Make a vidéo please ;)

* pic2.png
(5.98 kB, 768x544 - viewed 84 times)
[ Invalid Attachment ]

Two pictures made with "Save screenshot" in the emulator. I will make a video and post that soon so you can see it works correctly. :)
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Offline arnoldemu

  • Supporter
  • 6128 Plus
  • *
  • Posts: 5.332
  • Country: gb
    • Unofficial Amstrad WWW Resource
  • Liked: 2247
  • Likes Given: 3477
Re: amstrad cpc "acid" test
« Reply #33 on: 09:04, 09 June 16 »
Did you create your own tests to validate this behaviour?


Cause i have an intro to debug (it works on Winape but not on a real CPC+ :/ ) and i don't know how to fix it
In a private message tell me the effect you want to make and share some of your code (or the demo itself). I can debug it in Arnold (I hope it shows it correct, but if not I can use it's debugger to find the problem) and I hope I can tell you exactly what to change.
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Offline roudoudou

  • 6128 Plus
  • ******
  • Posts: 693
  • Country: fr
    • urban exploration
  • Liked: 968
  • Likes Given: 610
Re: amstrad cpc "acid" test
« Reply #34 on: 12:13, 09 June 16 »
In a private message tell me the effect you want to make and share some of your code (or the demo itself). I can debug it in Arnold (I hope it shows it correct, but if not I can use it's debugger to find the problem) and I hope I can tell you exactly what to change.


I bought a real CPC+ last week (just need to get it as it is still 300km far from me!) and a C4CPC extension


So i will debug by myself.


I may try already with your informations
Quote
at most times, the split value is captured when HCC=R1 (i.e. border starts on horizontal). BUT when VCC=R4 and RCC=R9 (i.e. last scanline of frame) the split value is captured at HCC=R0 and is then used when RCC=1, VCC=0
use RASM, the best assembler ever made :p

I will survive

Offline roudoudou

  • 6128 Plus
  • ******
  • Posts: 693
  • Country: fr
    • urban exploration
  • Liked: 968
  • Likes Given: 610
Re: amstrad cpc "acid" test
« Reply #35 on: 12:26, 09 June 16 »
When you wrote "the split value is captured"


And the block information contained in the SoftScrollRegister?


Cause i update both of them, the 6802/6803 value is updated before HCC=R1 for sure but i update SSR after to avoid visible artifacts.
use RASM, the best assembler ever made :p

I will survive

Offline GOB

  • Supporter
  • CPC6128
  • *
  • Posts: 159
  • Country: fr
  • Liked: 149
  • Likes Given: 110
Re: amstrad cpc "acid" test
« Reply #36 on: 12:47, 09 June 16 »
[ Invalid Attachment ]  [ Invalid Attachment ]

Two pictures made with "Save screenshot" in the emulator. I will make a video and post that soon so you can see it works correctly. :)

Very nice !!! Great !!! :)


Offline Ast

  • 6128 Plus
  • ******
  • Posts: 1.017
  • Country: fr
    • Amstrad cpc Website of Ast/iMPACT
  • Liked: 807
  • Likes Given: 689
Re: amstrad cpc "acid" test
« Reply #37 on: 14:20, 09 June 16 »
@Arnoldemu : can you give us arnold's link ?
We want to test it.
Did you add the sna in your emulator?
_____________________

Ast/iMP4CT. "By the power of Grayskull, i've the power"


Amstrad Plus French Forum

All friends are welcomed !

Offline arnoldemu

  • Supporter
  • 6128 Plus
  • *
  • Posts: 5.332
  • Country: gb
    • Unofficial Amstrad WWW Resource
  • Liked: 2247
  • Likes Given: 3477
Re: amstrad cpc "acid" test
« Reply #38 on: 15:32, 09 June 16 »
When you wrote "the split value is captured"
When I say "captured" I mean the conditions that must be true for the data to be read and used. :)

For split and soft scroll you need to think in CRTC coordinates (HCC for horizontal matching against R1,R0 and R2, RCC and VCC for vertical, RCC counter matching against R9, VCC matching against R4 and R7).

Split screen comparison is like this:

SPLT7 SPLT6 SPLT5 SPLT4 SPLT3 SPLT2 SPLT1 SPLT0 == VC4    VC3   VC2   VC1   VC0    RC2   RC1    RC0

SPLT7->SPLT0 are the bit 7 to bit 0 of value written to 6801.
VC4 to VC0 are bits from VCC counter.
RC2 to RC0 are bits from RCC counter.

VCC counter is 7 bits. RCC counter is 5 bits. So some bits are ignored.
For split screen the values are "captured" or "collected" under these conditions:
- If VCC!=R4 and RCC!=R9 and SPLT line is matched (see above), and HCC=R1 then the value in 6802/6803 is stored.

This means you must set 6801 before HCC=R1 and 6802/6803 before HCC=R1 for the split to use your values.

- If VCC==R4 and RCC=R9 and SPLT line is matched (see above), and HCC=(R0-1) (or it could be HCC=R0 I can't tell exactly at the moment), then the value in 6802/6803 is stored. It will not be stored when HCC=R1 in *this* case.

This means you must set 6801 before HCC=R0 and 6802/6803 before HCC=R0. They are ignored at HCC=R1.

MA is the counter inside the CRTC which makes part of the ram address. It is incremented for each char horizontally. At the end of the line it is often reloaded from a stored value. So it resets each scanline. Without split (6801=0), MA is captured at HC=R1 and RCC=R9 and used on the next scanline (i.e. VCC=VCC+1 and RCC=0).

SPLT takes priority.

When SPLT is used:

- When VCC!=0 and RCC!=0 (i.e. not first scanline), stored value is used to set MA at the start of the next scan line.

(e.g. "captured" on VCC=1, RCC=2, stored value used on VCC=1, RCC=3. If "captured" on VCC=1, RCC=7, used on VCC=2 and RCC=0.)

- When VCC=0 and RCC=0 (start of frame) then R12/R13 is *ALWAYS* used for MA. The stored value is then used when VCC=0 and RCC=1.

MA will continue to count with new value until you set a new SPLT which matches OR until RCC=R9 when normal operation continues.

For Delerium Tremens, although R1 is set on last scanline, split happens at the end of the scanline. Also, because R12/R13 is used for first scanline then the left column is always the same, the remaining columns change using the split value.

Soft scroll:

Note: Split has priority over soft scroll and normal operation. If you set the split it uses it.

With vertical soft scroll the RCC=R9 condition to capture MA when HCC=R1 is altered.

It takes SSCR and adds it to RCC. If the condition matches R9 then MA is captured when HCC=R1 and used on next scanline.

Like this:

SSCR=0, R9=7
0 + 0 -> 0
1 + 0 -> 1
2 + 0 -> 2
3 + 0 -> 3
4 + 0 -> 4
5 + 0 -> 5
6 + 0 -> 6
7 + 0 -> 7 <<<MA is captured this line if HCC=R1


SSCR = 5, R9=7
0 + 5 -> 5
1 + 5 -> 6
2 + 5 -> 7 <- MA captured on this line.
3 + 5 -> 0
4 + 5 -> 1
5 + 5 -> 2
6 + 5 -> 3
7 + 5 -> 4

For scroll we also need to look at the RA "outputs" from the ASIC "CRTC":

For soft scroll it appears to make RA+SSCR.

EDIT: Added ASCII art:
Code: [Select]
HCC=0                                   HCC=R1                  HCC=R0
-----------------------------------------------------------------
|                                        |XXXXXXXXXXXXXXXXXXXXXXX
-----------------------------------------------------------------
                                         ^
                                         capture here


HCC=0                                   HCC=R1                  HCC=R0
-----------------------------------------------------------------
|                                        |XXXXXXXXXXXXXXXXXXXXXXX
-----------------------------------------------------------------
                                                                ^
                                                                capture here                                                                 
                                                               

                                                               
HCC=0                                   HCC=R1                  HCC=R0
-----------------------------------------------------------------
|                                        |XXXXXXXXXXXXXXXXXXXXXXX
-----------------------------------------------------------------
^
used here
« Last Edit: 15:42, 09 June 16 by arnoldemu »
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Offline arnoldemu

  • Supporter
  • 6128 Plus
  • *
  • Posts: 5.332
  • Country: gb
    • Unofficial Amstrad WWW Resource
  • Liked: 2247
  • Likes Given: 3477
Re: amstrad cpc "acid" test
« Reply #39 on: 15:33, 09 June 16 »
@Arnoldemu : can you give us arnold's link ?
We want to test it.
Did you add the sna in your emulator?
I will make a download in a couple of days. One more thing I need to fix.

SNA is still a little bit broken in Arnold, please use DSK or CDT :)
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Offline Ast

  • 6128 Plus
  • ******
  • Posts: 1.017
  • Country: fr
    • Amstrad cpc Website of Ast/iMPACT
  • Liked: 807
  • Likes Given: 689
Re: amstrad cpc "acid" test
« Reply #40 on: 00:44, 10 June 16 »
I will make a download in a couple of days. One more thing I need to fix.

SNA is still a little bit broken in Arnold, please use DSK or CDT :)
I was thinking about sending you "beast+" to test it in Arnold. I'll do a proper dsk for your tests...
_____________________

Ast/iMP4CT. "By the power of Grayskull, i've the power"


Amstrad Plus French Forum

All friends are welcomed !

Offline ||C|-|E||

  • Administrator
  • 6128 Plus
  • *****
  • Posts: 1.817
  • Country: gb
    • index.php?action=treasury
    • Mundo CPC
  • Liked: 1017
  • Likes Given: 1072
Re: amstrad cpc "acid" test
« Reply #41 on: 00:58, 10 June 16 »
You can send a copy to me as well to test in my real computer  ;D ;D

Offline Ast

  • 6128 Plus
  • ******
  • Posts: 1.017
  • Country: fr
    • Amstrad cpc Website of Ast/iMPACT
  • Liked: 807
  • Likes Given: 689
Re: amstrad cpc "acid" test
« Reply #42 on: 01:42, 10 June 16 »
Petit filou, va... :-D
_____________________

Ast/iMP4CT. "By the power of Grayskull, i've the power"


Amstrad Plus French Forum

All friends are welcomed !

Offline arnoldemu

  • Supporter
  • 6128 Plus
  • *
  • Posts: 5.332
  • Country: gb
    • Unofficial Amstrad WWW Resource
  • Liked: 2247
  • Likes Given: 3477
Re: amstrad cpc "acid" test
« Reply #43 on: 09:55, 10 June 16 »
I was thinking about sending you "beast+" to test it in Arnold. I'll do a proper dsk for your tests...
I have your beast+ snapshot :)
But because there is a bug in arnold with snapshot (which I will fix next time) when I ran the snapshot it didn't work :(
Please send a dsk :)

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

Offline CraigsBar

  • Supporter
  • 6128 Plus
  • *
  • Posts: 3.280
  • Country: ie
  • The party ain't over yet
    • index.php?action=treasury
  • Liked: 1171
  • Likes Given: 79
Re: amstrad cpc "acid" test
« Reply #44 on: 15:05, 22 June 16 »

since i do not have a powerPC, i can't run ACE :(


I do have a PowerPC Mac Mini running MorphOS and ACE has become my Amstrad Emulator of choice.


So if you can clarify which tests you want running (Better yet provide a DSK with them on, as the TEST.DSK in the archive seems to be blank to me) then I can certainly run them for you.


Craig

IRC:  #Retro4All on Freenode

Offline arnoldemu

  • Supporter
  • 6128 Plus
  • *
  • Posts: 5.332
  • Country: gb
    • Unofficial Amstrad WWW Resource
  • Liked: 2247
  • Likes Given: 3477
Re: amstrad cpc "acid" test
« Reply #45 on: 16:54, 22 June 16 »
@CraigsBar : I will send you the disks :)
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Offline CraigsBar

  • Supporter
  • 6128 Plus
  • *
  • Posts: 3.280
  • Country: ie
  • The party ain't over yet
    • index.php?action=treasury
  • Liked: 1171
  • Likes Given: 79
Re: amstrad cpc &quot;acid&quot; test
« Reply #46 on: 16:57, 22 June 16 »
@CraigsBar : I will send you the disks :)
Perfect, I'll get it done today then.....  Little boy permitting!
IRC:  #Retro4All on Freenode

Offline Wanderer

  • Supporter
  • CPC664
  • *
  • Posts: 60
  • Country: 00
  • CPC fan
  • Liked: 4
  • Likes Given: 21
Re: amstrad cpc "acid" test
« Reply #47 on: 18:07, 23 June 16 »
Firefox is busting my #$%^&*

Trying to download the test.zip file from this post, it's complaining about an insecure connection and certificate (cpctech.cpc-live.com uses an invalid security certificate). I added an exception to the site and then tried to download it again, now it complains that "/test.zip was not found on the server". I used IE and downloaded it in a sec but i'm guessing that the site's certificate needs a fix.
- Wanderer -

Offline arnoldemu

  • Supporter
  • 6128 Plus
  • *
  • Posts: 5.332
  • Country: gb
    • Unofficial Amstrad WWW Resource
  • Liked: 2247
  • Likes Given: 3477
Re: amstrad cpc "acid" test
« Reply #48 on: 11:15, 24 June 16 »
Firefox is busting my #$%^&*

Trying to download the test.zip file from this post, it's complaining about an insecure connection and certificate (cpctech.cpc-live.com uses an invalid security certificate). I added an exception to the site and then tried to download it again, now it complains that "/test.zip was not found on the server". I used IE and downloaded it in a sec but i'm guessing that the site's certificate needs a fix.
Sorry I think I deleted it a few days ago. I will re-upload it this weekend.

Are you using https or http?
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Offline Wanderer

  • Supporter
  • CPC664
  • *
  • Posts: 60
  • Country: 00
  • CPC fan
  • Liked: 4
  • Likes Given: 21
Re: amstrad cpc "acid" test
« Reply #49 on: 00:31, 26 June 16 »
Sorry I think I deleted it a few days ago. I will re-upload it this weekend.

Are you using https or http?


Well, now i get "The requested URL /test.zip was not found on this server" with http. The previous problem was created with https. Anyway, i managed to download it with IE on that day...
- Wanderer -