Re: [hatari-devel] HDDriver issues with WinUAE CPU core (and with EmuTOS) -> RAM detection issue |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
Hi,
On sunnuntai 11 tammikuu 2015, Nicolas Pomarède wrote:
> I made more tests ; the boot can work with VDI enabled, but the problem
> is when the resolution is above some values. From what I see, there's a
> problem when screensize (computed in stMemmory.c) is > 0x8000.
> So for example 1100x260 works, but 1100x280 will show the problem.
>
> But I rarely use VDI, so I have no idea about how screensize should be
> set in relation to memtop.
VDI screen memory needs to reside in Atari RAM so that
it can be written. If it's larger than normal ST screen,
space must be done for it. stMemory.c:
-----------
/* Set memory size, adjust for extra VDI screens if needed.
* Note: TOS seems to set phys_top-0x8000 as the screen base
* address - so we have to move phys_top down in VDI resolution
* mode, although there is more "physical" ST RAM available. */
screensize = VDIWidth * VDIHeight / 8 * VDIPlanes;
/* Use 32 kiB in normal screen mode or when the screen size is
smaller than 32 kiB */
if (!bUseVDIRes || screensize < 0x8000)
screensize = 0x8000;
/* mem top - upper end of user memory (right before the screen
memory).
* Note: memtop / phystop must be dividable by 512, or TOS crashes
*/
memtop = (STRamEnd - screensize) & 0xfffffe00;
STMemory_WriteLong(0x436, memtop);
/* phys top - This must be memtop + 0x8000 to make TOS happy */
STMemory_WriteLong(0x42e, memtop+0x8000);
-----------
- Eero