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: arnoldemu on 07:05, 20 April 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

roudoudou


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
My pronouns are RASM and ACE

GOB

Quote from: arnoldemu on 08:15, 03 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 ;)

Ast

Quote from: roudoudou on 19: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
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"

http://amstradplus.forumforever.com/index.php
http://impdos.wikidot.com/
http://impdraw.wikidot.com/

All friends are welcome !

roudoudou


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

My pronouns are RASM and ACE

Ast

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?


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"

http://amstradplus.forumforever.com/index.php
http://impdos.wikidot.com/
http://impdraw.wikidot.com/

All friends are welcome !

arnoldemu

#31
Quote from: roudoudou on 19:41, 08 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.
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

arnoldemu

Quote from: GOB on 19:57, 08 June 16
I want to see my delirium tremens intro on your emulator !!! Make a vidéo please ;)
[attach=2][attach=3]

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

arnoldemu

Quote from: roudoudou on 19: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
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

roudoudou

Quote from: arnoldemu on 07:04, 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
Quoteat 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
My pronouns are RASM and ACE

roudoudou

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.
My pronouns are RASM and ACE

GOB

Quote from: arnoldemu on 07:00, 09 June 16
[attach=2][attach=3]

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 !!! :)


Ast

@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"

http://amstradplus.forumforever.com/index.php
http://impdos.wikidot.com/
http://impdraw.wikidot.com/

All friends are welcome !

arnoldemu

#38
Quote from: roudoudou on 10:26, 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:

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
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

arnoldemu

Quote from: Ast on 12: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?
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

Ast

Quote from: arnoldemu on 13:33, 09 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"

http://amstradplus.forumforever.com/index.php
http://impdos.wikidot.com/
http://impdraw.wikidot.com/

All friends are welcome !

||C|-|E||

You can send a copy to me as well to test in my real computer  ;D ;D

Ast

Petit filou, va... :-D
_____________________

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

http://amstradplus.forumforever.com/index.php
http://impdos.wikidot.com/
http://impdraw.wikidot.com/

All friends are welcome !

arnoldemu

Quote from: Ast on 22:44, 09 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

CraigsBar

Quote from: roudoudou on 18:59, 18 April 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

arnoldemu

@CraigsBar : I will send you the disks :)
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

CraigsBar

Quote from: arnoldemu on 14:54, 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

Wanderer

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 -

arnoldemu

Quote from: Wanderer on 16: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.
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

Wanderer

Quote from: arnoldemu on 09:15, 24 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 -

Powered by SMFPacks Menu Editor Mod