Code: Select all
]The SH4 CPU has a 29-bit physical memory space, so the range of addresses are 0x00000000 - 0x1FFFFFFF; thus it is capable of addressing 512 Mb of physical memory. This 512 Mb is split up into eight 64 Mb areas. Table 1 shows how the SH4 sees the physical memory.
Table 1: SH4 memory areas
Start End Area
0x00000000 0x03FFFFFF 0
0x04000000 0x07FFFFFF 1
0x08000000 0x0BFFFFFF 2
0x0C000000 0x0FFFFFFF 3
0x10000000 0x13FFFFFF 4
0x14000000 0x17FFFFFF 5
0x18000000 0x1BFFFFFF 6
0x1C000000 0x1FFFFFFF 7 (Reserved)
The Dreamcast splits this memory up thus:
Table 2: Dreamcast memory map
Start End Description Area
0x03FFFFFF Boot ROM (2 Mb)
Flash ROM (256 Kb)
System devices/Hardware registers 0
0x07FFFFFF Video/Texture memory (8 Mb)
0x08000000 0x0BFFFFFF Unused 2
0x0FFFFFFF System memory (16 Mb)
0x8C000000 - 0x8CFFFFFF (MMU is enabled)
0xAC000000 - 0xAFFFFFFF (Cache is enabled)
0x13FFFFFF Tile Accelerator (write only)
Texture memory (write only) I'm not sure about this one
0x14000000 0x17FFFFFF G2 devices 5
0x18000000 0x1BFFFFFF Unused 6
0x1C000000 0x1FFFFFFF SH4 control registers 7 (Reserved)
When looking at source code from other projects you may see registers starting at address 0xA05F8000, this may cause some confusion. As the SH4 has a 29-bit address space, the top 3 bits have specific meanings.
So, if we clear the top 3 bits we get, 0x005F8000 and as we can see from tables 1 & 2, this address is in area 0.
On the Dreamcast the MMU is not activated by default, this means that all programs executed are done so in priviledged mode rather than user mode. The only exception here would be games written using WinCE, as this is a real (yeah, right!) operating system.
When running in priviledged mode, the application has access to all of the memory areas. If an application is running in user mode, then it is limatited in what it can access.
If an applicion is running in user mode, then the MMU must be enabled. So, if the MMU is enabled, then some sort of memory mapping must be provided.
leilei wrote:Open source games are NOT "freeware games". They are not public domain either, and neither are freeware games.
Users browsing this forum: No registered users