| Posted By
Litwr on 2006-01-23 04:27:50
| XAA/ANE again
I am going to continue 2004 year discussion (see it here) about XAA/ANE/#$8B undocumented instruction.
Can anybody run Csabo's test program in the screen blank mode? The 'c64doc' describes this instruction depend on video chip DMA activity. The test of this instruction in the c64 CPU Test Suite is performed only in this mode.
I can assume that ANE may work in this mode in the same manner for different C16/116/+4. Am I right?
The 'c64doc' shows the formulae for ANE. It is used also in the mentioned Test Suite. It is AC = (AC or #$EE) and XR and Imm. SVS tests show that the parameter #$EE at his +4 is other (#$E0?).
|
|
Posted By
Gaia on 2006-01-24 07:25:42
| Re: XAA/ANE again
I have run Csabo's program yesterday on my plus/4 in screen blank mode and it gave identical results to those run with the screen on. So - at least for the sake of this small test program - the DMA seemingly has no effect. I got similar results to that of Ulysses's 4th and 5th plus/4 but it was depending on the initial value of the accumulator (on the contrary to what Csabos has said in the herein linked thread, there is no X -> AC operation). Note too, that the test program is by far not complete, we should theoretically test for all AC, X and immediate parameter combinations that is almost 17 million cases Runtime is less of a problem but how shall we store the results?
Ulysses: I think your results were varying because of the different default values of the MONITOR register dumps (that have nothing to do with the real register values but rather what values are found at those RAM locations where the initial values are read from when issuing the G command in MONITOR). So if you could just make sure you test both with an AC value of a $00 and a $FF (by setting it via the R command) on all the different computers? But more importantly, we should make a better test program. Once such program is done, I guess we could indicate here which revision of the 8501 processor is built into the machine for which the test program is run. But first a more sophisticated test program is necessary. Any volunteers maybe?
|
|
Posted By
Litwr on 2006-02-07 01:49:07
| Re: XAA/ANE again
I've created the test programs which may remove any "fog" from the ANE(8B) and LXA(AB) instructions.
1) ANE test . 2000 A9 0B LDA #$0B . 2002 8D 06 FF STA $FF06 . 2005 A2 FF LDX #$FF . 2007 A0 00 LDY #$00 . 2009 98 TYA . 200A 8B ??? . 200B FF ??? . 200C 99 00 21 STA $2100,Y . 200F C8 INY . 2010 D0 F7 BNE $2009 . 2012 8A TXA . 2013 4A LSR . 2014 EE 0E 20 INC $200E . 2017 AA TAX . 2018 B0 EF BCS $2009 . 201A 4E 0B 20 LSR $200B . 201D B0 E6 BCS $2005 . 201F A9 1B LDA #$1B . 2021 8D 06 FF STA $FF06 . 2024 00 BRK
2) LXA test . 2000 A9 0B LDA #$0B . 2002 8D 06 FF STA $FF06 . 2005 A2 FF LDX #$FF . 2007 86 D0 STX $D0 . 2009 A0 00 LDY #$00 . 200B A6 D0 LDX $D0 . 200D 98 TYA . 200E AB ??? . 200F FF ??? . 2010 99 00 21 STA $2100,Y . 2013 C8 INY . 2014 D0 F5 BNE $200B . 2016 46 D0 LSR $D0 . 2018 EE 12 20 INC $2012 . 201B B0 EE BCS $200B . 201D 4E 0F 20 LSR $200F . 2020 B0 E3 BCS $2005 . 2022 A9 1B LDA #$1B . 2024 8D 06 FF STA $FF06 . 2027 00 BRK
Both programs are activated by G2000 - they produce a big table at $2100-7200. So next command after G2000 is S"ANE.RES",8,2100,7200
These programs are small (37 and 40 bytes) but available also at http://litwr.atspace.com
Happy +4/16/116 owners! Please help to discover all features of our the best computers. The results may be send to my email litwr@yandex.ru or published somewhere in internet for further analysis.
|
|
Posted By
Gaia on 2006-02-07 16:31:02
| Re: XAA/ANE again
OK, I have just tested ANE/XAA ($8B)... on my computer at least it is *almost* irrelevant wheather the screen is blank or not, I even tested in slow mode... it looked very similar all around except sometimes when tested with screen on, there were random bit "errors" (like 1 bit every 4 kb or so).
However, the currently known formula (X & #imm & (AC|#$EE) does not seem to approximate the real figures that well. To give you an idea, here's the beginning of the dump from my machine:
M2100 >2100 EE EF EE EF EE EF EE EF :®¯®¯®¯®¯ >2108 FE FF FE FF FE FF FE FF :¾¿¾¿¾¿¾¿ >2110 FE FF FE FF FE FF FE FF :¾¿¾¿¾¿¾¿ >2118 FE FF FE FF FE FF FE FF :¾¿¾¿¾¿¾¿ >2120 EE EF EE EF EE EF EE EF :®¯®¯®¯®¯ >2128 FE FF FE FF FE FF FE FF :¾¿¾¿¾¿¾¿ >2130 FE FF FE FF FE FF FE FF :¾¿¾¿¾¿¾¿ >2138 FE FF FE FF FE FF FE FF :¾¿¾¿¾¿¾¿ >2140 EE EF EE EF EE EF EE EF :®¯®¯®¯®¯ >2148 FE FF FE FF FE FF FE FF :¾¿¾¿¾¿¾¿ >2150 FE FF FE FF FE FF FE FF :¾¿¾¿¾¿¾¿ >2158 FE FF FE FF FE FF FE FF :¾¿¾¿¾¿¾¿
With the formula known until now, the area $2108-$210F is identical to that of $2100.
It looks like the formula is more of something like:
AC = (X AND #imm AND (AC OR #$EE)) OR ( X AND #imm AND ((AC*2) AND #$10))
...at least on my plus/4 Of course I need to look further because even this formula does not look 100% correct and stable...
|
|
Posted By
Litwr on 2006-02-09 01:17:21
| Re: XAA/ANE again
Your piece of results shows that it and your addition to known formula don't match. Try AC=$10. Your addition gives (X=Imm=$FF) 0! It must be 1xxxxxx0 in this case. I find that this addition is equivalent to (AC%$20 && 1) *128. I use C syntax. PLEASE send me both 20.25K dumps for ANE and LXA. It will be fine if I can get dumps from other computers - these dumps will allow me to produce all formulae.
|
|
|
Posted By
Lavina on 2011-12-20 07:23:44
| Re: XAA/ANE again
"Exactly what happens is an analogue problem, not a digital one, so it will depend on the exact model of CPU, the variations of chip manufacture, the power supply and the temperature. "
Pretty weird stuff. Will Yape emulate temperature? Upon startup enter weather conditions and local date/time, then as time passes, try to emulate the temp.
|
|
Posted By
Gaia on 2011-12-20 16:11:49
| Re: XAA/ANE again
Note, that our forum is listed as reference (under "Resources")!
|
|
| |
Copyright © Plus/4 World Team, 2001-2024. Support Plus/4 World on Patreon |