What is this? if i know about it i'll add it to stock firmware with ATARI parameter on.
MonSTer ram size register appears to be at 0xfffffe00 and EmuTOS reads from here to detect it.
Unfortunatelly EmuTOS is then hardcoded to change the setting to 8MB (or 6MB for STE) :/
Locally, I will just rebuild EmuTOS to use the value it reads, but it makes it somewhat tricky to include MonSTer pretend in an official firmware due to this behavior? Except for on TF boards with >=8MB of course.
Having the MonSTer register(s) on the TF would also mean that we would be able to use the MonSTer alt-ram driver instead of writing our own.
The Monster Alt-RAM driver with source can be found here:
http://www.fairlite.co.uk/AtariKit/monster/monster.html
It appears there are some other registers as well but since I am at work I haven't had time to see if we actually need to include any more of them.
Here's a rough copy-paste from the EmuTOS sources:
#define MONSTER_REG 0xfffffe00UL
has_monster = check_read_byte(MONSTER_REG);
/* Add MonSTer Alt-RAM detected in machine.c */
if (has_monster)
{
/* Dummy read from MonSTer register to initiate write sequence. */
unsigned short monster_reg = *(volatile unsigned short *)MONSTER_REG;
/* Only enable 6Mb when on a Mega STE due to address conflict with
VME bus. Todo: This should be made configurable. */
if (cookie_mch == MCH_MSTE)
monster_reg = 6;
else
monster_reg = 8;
/* Register write sequence: read - write - write */
*(volatile unsigned short *)MONSTER_REG = monster_reg;
*(volatile unsigned short *)MONSTER_REG = monster_reg;
KDEBUG(("xmaddalt()\n"));
xmaddalt((UBYTE *)0x400000L, monster_reg*0x100000L);
}
/* ==== check_read_byte =====================================================
*
* check_read_byte - Verify access to the memory pointed to by the ptr
*
* C call: int check_read_byte(long);
* returns 0 if reading the address caused a bus error
*/
_check_read_byte: