Re: [hatari-devel] Sync byte on Falcon

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


Am Sat, 18 Nov 2023 14:46:08 -0500
schrieb "Roger Burrows" <anodyne@xxxxxxxxxxxx>:

> On 18 Nov 2023 at 7:43, Thomas Huth wrote:
> 
> > Am Wed, 15 Nov 2023 22:35:42 -0500
> > schrieb "Roger Burrows" <anodyne@xxxxxxxxxxxx>:  
> > > The following results were all gathered using TOS 4.04.l
> > > 
> > > With both an RGB monitor and plain old VGA, reading 0xff820a on my Falcon 
> > > returns 0x00, which indicates 60Hz.  Looking at the Hatari source 
> > > (VIDEL_SyncMode_WriteByte() in Hatari 2.3.0), if there isn't a mono monitor
> > > connected, whenever you write to 0xff820a, Hatari kindly ORs it with 0x02,
> > > which is then always returned to a program reading that byte.
> > > 
> > > I think Hatari is clearly wrong: bit 1 on a Falcon means exactly the same as  
> > it   
> > > does on an ST(e) and should be handled in a similar fashion.  
> > 
> > Ok, that really sounds like the documentation (and thus Hatari) was wrong.
> > 
> > I can change the source code in Hatari, but I'd like to have a better
> > understanding how this register really behaves.
> > 
> > So if you've got some spare minutes, could you write a little test program
> > that:
> > 
> > - Reads ff820a to back up the original value
> > - Write 0xfc to ff820a and read back the value from the register
> > - Write 0x02 to ff820a and read back the value from the register
> > - Write 0x01 to ff820a and read back the value from the register
> > - Restore the original value to the register
> > - Print out the three values that have been read back after altering the
> >   register
> > 
> > and then run it with your RGB monitor (or let me know if you want me to
> > write such a program instead).  
> 
> OK, values returned are 0x00, 0x02, 0x01 respectively.

Great, thanks for testing! So the upper bits are hard-wired to zero, and
the lower two bits can be changed, indeed. Changed in Hatari now
accordingly:

 https://git.tuxfamily.org/hatari/hatari.git/commit/?id=96d7e168b8a79d9c0add5308e17ad89e952b1071

 HTH,
  Thomas



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