Re: [hatari-devel] It seems I encounter a bug into hatari

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


A little question : why in video.s and iomemtabST (E) are there 15 different functions that all call the same function ?


void Video_Color0_WriteWord(void)
{
    Video_ColorReg_WriteWord();
}

void Video_Color1_WriteWord(void)
{
    Video_ColorReg_WriteWord();
}



In IOmemtabST :

{ 0xff8240, SIZE_WORD, Video_Color0_ReadWord, Video_Color0_WriteWord }, /* COLOR 0 */ { 0xff8242, SIZE_WORD, Video_Color1_ReadWord, Video_Color1_WriteWord }, /* COLOR 1 */ { 0xff8244, SIZE_WORD, Video_Color2_ReadWord, Video_Color2_WriteWord }, /* COLOR 2 */
     ...


Wasn't it possible to just call Video_ColorReg_WriteWord() in IOmemtabST for the 15 colors ?

Regards

Laurent



Le 27/03/2014 19:03, Nicolas Pomarède a écrit :
Le 27/03/2014 18:48, Laurent Sallafranque a écrit :
You're right again ;)
I should have taken more time before replying.

In Racer, I use byte values most of the time, that's why it works.
And of course, it didn't work when I used long values.


Here are the results of the 2 tests :

1st test :

Under Falcon:
move.l #$ffeeddcc,$ffff8240.w
D1 ($ffff8240.w) = $0fee
D2 ($ffff8242.w) = $0dcc

Under hatari :
move.l #$ffeeddcc,$ffff8240.w
D1 ($ffff8240.w) = $ffee
D2 ($ffff8242.w) = $ddcc


2nd test :

Under Falcon:
move.l #$ffffffff,$ffff8240.w
D1 ($ffff8240.w) = $0fff
D2 ($ffff8242.w) = $0fff

Under hatari :
move.l #$ffffffff,$ffff8240.w
D1 ($ffff8240.w) = $ffff
D2 ($ffff8242.w) = $ffff


Don't hesitate to ask if you want me to make more tests or to test some
other registers that would help improving hatari.


Yes, the function VIDEL_StColorRegsWrite() doesn't mask the value with 0x0fff as this is done in video.c for STF/STE.

It could be added to match the behaviour of a real Falcon, but I don't think it's a priority, apart from your code I'm not sure many programs rely on this :) You can try to adapt video.c part into videl.c if you like.

Nicolas





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