mirror of
https://github.com/emu-russia/pureikyubu.git
synced 2025-04-02 10:42:15 -04:00
Docs: New TODO moved to EMU, old renamed to old_todo Docs: Old coding style is deprecated (old_style.txt) Docs: Removed mention about CubeDocumented and fixed old emails RE: boot.s, proved first asm line (lis instruction parameter) RE: Added PAL and NTSC Boot and IPL IDA files RE: Some work on NTSC IPL (identified many lib calls, including OS, GX) RE: Added EXI Bootrom descrambler by segher RE: GXInit RE: Internal GX lib structures (GXPrivate.h) RE: More details on lomem (OS versions) RE: OSInit and OS.c RE: OSAlloc (heap allocator) RE: Very first code of Metrowerk runtime (__start.c) Docs: Added copy of http://gcdev.narod.ru Source\Utils: Command processor (Cmd.c) Source\Utils: File wrapper Source\Utils: Gekko disasm cleaned up and ported to plain C Source\Utils: Double-linked lists Source\Utils: Ported old Profiler code Source\Utils: String utils
79 lines
2.3 KiB
Text
79 lines
2.3 KiB
Text
0xCC004000 - MI (memory protection interface).
|
|
|
|
-------------------------------------------------------------------------------
|
|
|
|
Overview
|
|
---------
|
|
|
|
Protection can be enabled only for pages (page size is 1024 bytes), as example:
|
|
|
|
addr = 0x80EFEFEF, page = 0x3BFB, or
|
|
|
|
100000 0011101111111011 1111101111
|
|
|
|
|
-- this is page number
|
|
|
|
Supported types of protection :
|
|
0 - access denied
|
|
1 - read only
|
|
2 - write only
|
|
3 - read / write (no protection, full access)
|
|
|
|
You can specify only 4 protected regions of memory. External interrupt will be
|
|
signaled, if CPU try to access protected region. Because of its allowed
|
|
to enable protection only for 4 regions, there are total 4 possible interrupts.
|
|
They are called : MEM_0, MEM_1, MEM_2 and MEM_3.
|
|
|
|
|
|
Hardware registers
|
|
-------------------
|
|
|
|
0xCC004000...0xCC00400F - keeping ranges for 4 protected regions :
|
|
|
|
// 0xCC004000 (N like to call the regions as "channels")
|
|
struct
|
|
{
|
|
u16 pageLo, pageHi;
|
|
} MEM_CHAN[4];
|
|
|
|
0xCC004010 - keeping protection type for each of 4 chans. each 2 bits containing
|
|
type of the protection (see above).
|
|
|
|
------------------------
|
|
| bits | 0 1 2 3 4 5 6 7 | (big-endian)
|
|
|------|-----------------|
|
|
| chan | [3] [2] [1] [0] |
|
|
------------------------
|
|
|
|
0xCC00401C MI interrupt mask :
|
|
|
|
------------------------
|
|
| bits | 0 1 2 3 4 5 6 7 | (big-endian)
|
|
|------|-----------------|
|
|
| desc | M 3 2 1 0 |
|
|
------------------------
|
|
|
|
0 - mask MEM0 interrupt (1 - enable)
|
|
1 - mask MEM1 interrupt
|
|
2 - mask MEM2 interrupt
|
|
3 - mask MEM3 interrupt
|
|
M - mask all MI interrupts
|
|
|
|
1 - enable, 0 - disable. other bits unused.
|
|
|
|
0xCC00401E interrupt cause. bit layout same as interrupt mask.
|
|
|
|
0xCC004020 assume to be zero, after init, and should be cleared by
|
|
interrupt handler.
|
|
|
|
0xCC004022 theese are used inside interrupt handler. seems to contain
|
|
0xCC004024 address, which failed protection rules. need to check on real GC
|
|
|
|
0xCC004028 2 after init, if RAM size is exactly 24MB.
|
|
|
|
(all registers are 16-bit only)
|
|
|
|
|
|
-------------------------------------------------------------------------------
|
|
|
|
org -- ogamespec@gmail.com
|