Re: [hatari-devel] cfg (8 vs 16 Mhz)

[ Thread Index | Date Index | More Archives ]

Am Wed, 7 Dec 2022 18:43:09 +0100
schrieb Miguel Saro <miguel.saro@xxxxxxx>:

> Bonsoir,
> I looked for what put me the frequency at 8 MHz at startup. I think it's the General Choice CPX that does this. Whatever the frequency indicated in hatari.cfg, this CPX allows to set the frequency to 8 MHz or 16 MHz. The problem seems to be an inversion between the MHz setting and the Cache setting. Without cache -> 8 MHz, with cache -> 16 MHz.

Hmm, there is either a bug in Hatari, or in XCONTROL...

As far as I can see, XCONTROL writes these values into $ff8e21:

8 MHz              ==> 0x00
16 MHz, no cache   ==> 0x02
16 MHz, with cache ==> 0x03

So from the XCONTROL point of view, it seems like bit 1 toggles the
frequency, and bit 0 toggles the cache setting.

Now in Hatari, we've implemented it according to the memory map doc from 
Dan Hollis:

##############Mega STe Cache/Processor Control                     ###########
$FF8E21|byte |Mega STe Cache/Processor Control           BIT 15-1 0|R/W (MSTe)
       |     |Cache enable lines (set all to 1 to enable) -----'  ||
       |     |CPU Speed (0 - 8mhz, 1 - 16mhz) --------------------'|

So here it's bit 0 that toggles the CPU speed.

But maybe that doc is wrong? ... unfortunately, most other docs simply do
not talk about this register, so it's hard to judge what's right or wrong
here. I only found this page where it is documented the other way round:

Does anybody have a real Mega STE and some means of checking which bit
toggles the frequency?


Mail converted by MHonArc 2.6.19+