RE: [hatari-devel] Re:Microwire register value on Falcon

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Hi All,

Attached you can find Python parser (instead of HTML5 one). 

Below you can find my outcome for STE microwire test.

In my test Blitter reads microwire data every 8 cycles. It reads first value 12 cycles after write value to microwire's mask (12 cycles = 8 cycles for start blitter, 4 cycles for blitter's delay). 
CPU reads microwire's data every 12 cycles. CPU reads first value 4 cycles after write value to microwire's mask (4 cycles for read instruction - move). 

STE Microwire starts rotating data: 
 - in my worst CPU case after 132 cycles (11 times value $04e2, reads every 12 cycle);
 - in my best Blitter case - immediately.

CPU needs 11 reads/132 cycles to finish, and reading sequence is: $04e2, $1388, $2710, $9c40, $3880, $e200, $c400, $1000, $2000, $8000, $0000					
Blitter needs 16 reads/128 cycles to finish, and reading sequence is: $04e2, $09c4, $1388, $2710, $4e20, $9c40, $3880, $7100, $e200, $c400, $8800, $1000, $2000, $4000, $8000, $0000

If I understand those figures correctly, STE Microwire rotates data by 1 bit every 8 cycles.

In case of Hatari, reading sequence for CPU and Blitter looks almost the same $09c4, $1388, $2710, $4e20, $9c40, $3880, $7100, $e200, $c400, $8800, $1000, $2000, $4000, $8000, $0000
CPU needs 15 reads/180 cycles
Blitter needs 14 reads/112 cycles


It seems that the difference between Hatari and real STE is that in Hatari:
 - There is no delay in starting rotating Microwire's data/mask;
 - Microwire doesn't rotate data every constant number of cycles but when its register are accessed - every 12 cycles for CPU, every 8 cycles for blitter;

To be honest I'm not sure if there is a need to implement exact emulation 

And sorry for that a bit boring email :)


BR
Cyprian

STE CPU - Microwire Data read:
pass 1	pass 2	pass 3	pass 4
------  ------  ------  ------
$04e2	$04e2	$04e2	$04e2
$04e2	$04e2	$04e2	$04e2
$04e2	$04e2	$04e2	$04e2
$1388	$04e2	$04e2	$04e2
$2710	$04e2	$04e2	$1388
$9c40	$04e2	$04e2	$2710
$3880	$04e2	$04e2	$9c40
$e200	$1388	$04e2	$3880
$c400	$2710	$04e2	$e200
$1000	$9c40	$04e2	$c400
$2000	$3880	$04e2	$1000
$8000	$e200	$1388	$2000
$0000	$c400	$6710	$8000
$0000	$1000	$9c40	$0000
$0000	$2000	$3880	$0000
$0000	$8000	$e200	$0000
$0000	$0000	$c400	$0000
$0000	$0000	$1000	$0000
$0000	$0000	$2000	$0000
$0000	$0000	$8000	$0000
$0000	$0000	$0000	$0000

STE Blitter - Microwire Data read:
pass 1	pass 2	pass 3	pass 4
------  ------  ------  ------
$04e2	$04e2	$04e2	$09c4
$04e2	$04e2	$04e2	$1388
$04e2	$04e2	$04e2	$2710
$04e2	$04e2	$09c4	$4e20
$04e2	$04e2	$1388	$9c40
$04e2	$09c4	$2710	$3880
$04e2	$1388	$4e20	$7100
$04e2	$2710	$9c40	$e200
$09c4	$4e20	$3880	$c400
$1388	$9c40	$7100	$8800
$2710	$3880	$e200	$1000
$4e20	$7100	$c400	$2000
$9c40	$e200	$8800	$4000
$3880	$c400	$1000	$8000
$7100	$8800	$2000	$0000
$e200	$1000	$4000	$0000
$c400	$2000	$8000	$0000
$8800	$4000	$0000	$0000
$1000	$8000	$0000	$0000
$2000	$0000	$0000	$0000
$4000	$0000	$0000	$0000
$8000	$0000	$0000	$0000
$0000	$0000	$0000	$0000


Hatari CPU - Microwire Data read:
pass 1	pass 2	pass 3	pass 4
------  ------  ------  ------
$09c4	$09c4	$09c4	$09c4
$1388	$1388	$1388	$1388
$2710	$2710	$2710	$2710
$4e20	$4e20	$4e20	$4e20
$9c40	$9c40	$9c40	$9c40
$3880	$3880	$3880	$3880
$7100	$7100	$7100	$7100
$e200	$e200	$e200	$e200
$c400	$c400	$c400	$c400
$8800	$8800	$8800	$8800
$1000	$1000	$1000	$1000
$2000	$2000	$2000	$2000
$4000	$4000	$4000	$4000
$8000	$8000	$8000	$8000
$0000	$0000	$0000	$0000



Hatari Blitter - Microwire Data read:
pass 1	pass 2	pass 3	pass 4
------  ------  ------  ------
$1388	$1388	$1388	$1388
$2710	$2710	$2710	$2710
$4e20	$4e20	$4e20	$4e20
$9c40	$9c40	$9c40	$9c40
$3880	$3880	$3880	$3880
$7100	$7100	$7100	$7100
$e200	$e200	$e200	$e200
$c400	$c400	$c400	$c400
$8800	$8800	$8800	$8800
$1000	$1000	$1000	$1000
$2000	$2000	$2000	$2000
$4000	$4000	$4000	$4000
$8000	$8000	$8000	$8000
$0000	$0000	$0000	$0000


-----Original Message-----
From: Listengine [mailto:listengine@xxxxxxxxxxxxxxxxx] On Behalf Of Konador, Cyprian
Sent: Wednesday, February 01, 2012 13:52 PM
To: hatari-devel@xxxxxxxxxxxxxxxxxxx
Subject: RE: [hatari-devel] Re:Microwire register value on Falcon

Hi All,

Maybe someone can use my Microwire test (attached) on Falcon.

It writes value $4E2 to Microwire data reg. ( -12db master volume) and writes value $7FF to Microwire mask reg. and then reads 32 words from:
 - Microwire data reg. by cpu;
 - Microwire mask reg. by cpu;
 - Microwire data reg. by blitter;
 - Microwire mask reg. by blitter.
Every test is done 4 times. Final result is written to file RESULT.BIN

Attached you can find source code, compiled program MCRW.PRG and my results for Hatari, 1040 STE, MegaSTE 8Mhz and MegaSTE 16Mhz+Cache.
There is also small html parser - MCRW.html. It works under Chrome 11, Firefox4 (HTML5 File API and Drag and Drop needed) - Just open that document in a web browser and drag&drop RESULT.BIN on it.

Thanks

BR
Cyprian

-----Original Message-----
From: Listengine [mailto:listengine@xxxxxxxxxxxxxxxxx] On Behalf Of laurent.sallafranque@xxxxxxx
Sent: Wednesday, February 01, 2012 11:40 AM
To: hatari-devel@xxxxxxxxxxxxxxxxxxx
Subject: Re: [hatari-devel] Re:Microwire register value on Falcon

Hi,

I think it needs a few more tests here (especially for $ff8924).

For $ff8922, does it still read 0 after a write of a value != 0 in the register ?
I mean does it still read 0 after a MOVE.B #$A5,$FF8922.B (or any value you want instead of $A5).

For $FF8924, according to what I saw in team.prg (a soccer game that is supposed to run on STE and  Falcon), the program loops forever into :

$0397bc : 31fc 07ff 8924                       move.w    #$7ff,$ffff8924.w
$0397c2 : 0c78 07ff 8924                       cmpi.w    #$7ff,$ffff8924.w
$0397c8 : 66f2                                 bne.s     $397bc

I bypassed this by removing the microwire from the ioMemTabFalcon.c, but that's obviously not the good way to fix this (it was just for the test).
Again I would like to be sure that writing a value to $ff8924 should return this value instead of 0.

Could you do these 2 tests please ?

Regards

Laurent



----- Mail Original -----
De: "Thomas Huth" <th.huth@xxxxxx>
À: hatari-devel@xxxxxxxxxxxxxxxxxxx
Envoyé: Mardi 31 Janvier 2012 22h34:32 GMT +01:00 Amsterdam / Berlin / Berne / Rome / Stockholm / Vienne
Objet: Re: [hatari-devel] Re:Microwire register value on Falcon

Am Tue, 31 Jan 2012 13:37:05 -0500
schrieb "Roger Burrows" <rfburrows@xxxxxxxxx>:

> On 30 Jan 2012 at 21:04, Thomas Huth wrote:
> > 
> > Can somebody check what you get when reading $ff8922 on a real 
> > Falcon? Looking at this piece of code, I'd guess that $ff8922 is 
> > hard-wired to zero on the Falcon...
> > 
> > 
> > > Thomas, should we remove the microwire addresses from the 
> > > IoMemTabFalcon.c as I did (There's really no microwire in the
> > > Falcon) ? I know you did a lot of tests on the bus errors.
> > > 
> > > Actually, it looks like :
> > > //    { 0xff8922, SIZE_WORD, IoMem_VoidRead, IoMem_VoidWrite 
> > > },                                     /* Microwire data */
> > > //    { 0xff8924, SIZE_WORD, IoMem_VoidRead, IoMem_VoidWrite 
> > > },                                     /* Microwire mask */
> > 
> > According to the bus error tester (see 
> > tests/buserror/results/fal_n_w.txt), the Falcon does not generate a 
> > bus error here, so you should not remove these entries. I'd rather 
> > guess that the Falcon always returns 0 when reading the ff8922 
> > register...
> > 
> That's correct, I just tested on my Falcon.  It doesn't bus error (in 
> supervisor state :-), and it returns zero.

Great, thanks for the test, Roger, I've fixed Hatari now accordingly.

 Thomas




Attachment: MCRW.py
Description: MCRW.py



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/