/[RomCheater]/trunk/RomCheater.EmuMMAPPlugin/EmuMEMMapDockControl.cs
ViewVC logotype

Diff of /trunk/RomCheater.EmuMMAPPlugin/EmuMEMMapDockControl.cs

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 646 by william, Sat Jun 8 22:21:47 2013 UTC revision 652 by william, Sun Jun 9 00:30:55 2013 UTC
# Line 74  namespace RomCheater.EmuMMAPPlugin Line 74  namespace RomCheater.EmuMMAPPlugin
74          #region NES          #region NES
75          private DeviceMemoryMap CreateNESMemMap()          private DeviceMemoryMap CreateNESMemMap()
76          {          {
77                /* http://en.wikibooks.org/wiki/NES_Programming */
78              const string name = "NES";              const string name = "NES";
79              DeviceMemoryMap map = new DeviceMemoryMap();                          DeviceMemoryMap map = new DeviceMemoryMap();            
80              List<IMemMap> maprange = new List<IMemMap>();              List<IMemMap> maprange = new List<IMemMap>();
81              #region memory maps              #region memory maps
82              maprange.Add(new MemMap(string.Format("{0}_test", name), 0, 0));              //maprange.Add(new MemMap(string.Format("{0}_test", name), 0, 0));
83                maprange.Add(new MemMap("Zero Page", 0x0000, 0x00FF));
84                maprange.Add(new MemMap("Stack", 0x0100, 0x01FF));
85                maprange.Add(new MemMap("Ram", 0x0200, 0x07FF));
86    
87                // mirror
88                maprange.Add(new MemMap("ZeroPage/Stack/Ram Mirror1", 0x0800, 0x0FFF));
89                // mirror
90                maprange.Add(new MemMap("ZeroPage/Stack/Ram Mirror2", 0x1000, 0x17FF));
91                // mirror
92                maprange.Add(new MemMap("ZeroPage/Stack/Ram Mirror3", 0x1800, 0x1FFF));
93              
94                maprange.Add(new MemMap("IO Reg1", 0x2000, 0x2007));
95                maprange.Add(new MemMap("IO reg1 mirror - repeated", 0x2000, 0x3FFF));
96                maprange.Add(new MemMap("IO Reg2", 0x4000, 0x401F));
97                maprange.Add(new MemMap("Expansion ROM", 0x4020, 0x5FFF));
98                maprange.Add(new MemMap("SRAM", 0x6000, 0x7FFF));
99                maprange.Add(new MemMap("PRG-ROM", 0x8000, 0xFFFF));
100    
101                maprange.Add(new MemMap("Address of NMI Interrupt handler", 0xFFFA, 0xFFFB));
102                maprange.Add(new MemMap("Address of Power on reset handler", 0xFFFC, 0xFFFD));
103                maprange.Add(new MemMap("Address of BRK handler routine", 0xFFFE, 0xFFFF));
104              #endregion              #endregion
105              map = new DeviceMemoryMap(name, maprange);              map = new DeviceMemoryMap(name, maprange);
106              return map;              return map;
# Line 87  namespace RomCheater.EmuMMAPPlugin Line 109  namespace RomCheater.EmuMMAPPlugin
109          #region SNES          #region SNES
110          private DeviceMemoryMap CreateSNESMemMap()          private DeviceMemoryMap CreateSNESMemMap()
111          {          {
112                /* http://www.emulatronia.com/doctec/consolas/snes/SNESMem.txt */
113              const string name = "SNES";              const string name = "SNES";
114              DeviceMemoryMap map = new DeviceMemoryMap();              DeviceMemoryMap map = new DeviceMemoryMap();
115              List<IMemMap> maprange = new List<IMemMap>();              List<IMemMap> maprange = new List<IMemMap>();
116              #region memory maps              #region memory maps
117              maprange.Add(new MemMap(string.Format("{0}_test", name), 0, 0));              //maprange.Add(new MemMap(string.Format("{0}_test", name), 0, 0));
118                maprange.Add(new MemMap("LowRAM", 0x0000, 0x1fff));
119                maprange.Add(new MemMap("HighRAM", 0x2000, 0x7fff));
120                maprange.Add(new MemMap("Expanded RAM", 0x8000, 0xffff));
121              #endregion              #endregion
122              map = new DeviceMemoryMap(name, maprange);              map = new DeviceMemoryMap(name, maprange);
123              return map;              return map;
# Line 100  namespace RomCheater.EmuMMAPPlugin Line 126  namespace RomCheater.EmuMMAPPlugin
126          #region PS1          #region PS1
127          private DeviceMemoryMap CreatePS1MemMap()          private DeviceMemoryMap CreatePS1MemMap()
128          {          {
129                /* http://rveach.romhack.org/PSXInfo/psx%20hardware%20info.txt */
130              const string name = "PS1";              const string name = "PS1";
131              DeviceMemoryMap map = new DeviceMemoryMap();              DeviceMemoryMap map = new DeviceMemoryMap();
132              List<IMemMap> maprange = new List<IMemMap>();              List<IMemMap> maprange = new List<IMemMap>();
# Line 109  namespace RomCheater.EmuMMAPPlugin Line 136  namespace RomCheater.EmuMMAPPlugin
136              maprange.Add(new MemMap("User Memory", 0x00010000, 0x001FFFFF));              maprange.Add(new MemMap("User Memory", 0x00010000, 0x001FFFFF));
137              maprange.Add(new MemMap("Parallel Port", 0x1f000000, 0x1f00ffff));              maprange.Add(new MemMap("Parallel Port", 0x1f000000, 0x1f00ffff));
138              maprange.Add(new MemMap("Scratch Pad", 0x1f800000, 0x1f8003ff));              maprange.Add(new MemMap("Scratch Pad", 0x1f800000, 0x1f8003ff));
139              maprange.Add(new MemMap("HW Registers", 0x1f801000, 0x1f802fff));              maprange.Add(new MemMap("HW Registers", 0x1f801000, 0x1f802fff));            
140                maprange.Add(new MemMap("BIOS", 0x1FC00000, 0x1FC7FFFF));
141    
142              maprange.Add(new MemMap("Kernel & User Memory (cached)", 0x80000000, 0x801fffff));              maprange.Add(new MemMap("Kernel & User Memory (cached)", 0x80000000, 0x801fffff));
143              maprange.Add(new MemMap("Kernel & User Memory (uncached)", 0xa0000000, 0xa01fffff));              maprange.Add(new MemMap("Kernel & User Memory (uncached)", 0xa0000000, 0xa01fffff));
144              maprange.Add(new MemMap("BIOS", 0x1FC00000, 0x1FC7FFFF));  
145              #endregion              #endregion
146              map = new DeviceMemoryMap(name, maprange);              map = new DeviceMemoryMap(name, maprange);
147              return map;              return map;
# Line 121  namespace RomCheater.EmuMMAPPlugin Line 150  namespace RomCheater.EmuMMAPPlugin
150          #region PS2          #region PS2
151          private DeviceMemoryMap CreatePS2MemMap()          private DeviceMemoryMap CreatePS2MemMap()
152          {          {
153                /* http://psx-scene.com/forums/attachments/f19/17285d1280158606-ps2-memory-hardware-mapped-registers-layout-ps2-memory-hardware-mapped-registers-layout.txt */
154                /* http://psx-scene.com/forums/f19/ps2-memory-hardware-mapped-registers-layout-64760/ */
155              const string name = "PS2";              const string name = "PS2";
156              DeviceMemoryMap map = new DeviceMemoryMap();              DeviceMemoryMap map = new DeviceMemoryMap();
157              List<IMemMap> maprange = new List<IMemMap>();              List<IMemMap> maprange = new List<IMemMap>();
# Line 147  namespace RomCheater.EmuMMAPPlugin Line 178  namespace RomCheater.EmuMMAPPlugin
178          #region N64          #region N64
179          private DeviceMemoryMap CreateN64MemMap()          private DeviceMemoryMap CreateN64MemMap()
180          {          {
181                /* http://n64.icequake.net/doc/n64intro/kantan/step1/1-4.html */
182              const string name = "N64";              const string name = "N64";
183              DeviceMemoryMap map = new DeviceMemoryMap();              DeviceMemoryMap map = new DeviceMemoryMap();
184              List<IMemMap> maprange = new List<IMemMap>();              List<IMemMap> maprange = new List<IMemMap>();
185              #region memory maps              #region memory maps
186              maprange.Add(new MemMap(string.Format("{0}_test", name), 0, 0));              //maprange.Add(new MemMap(string.Format("{0}_test", name), 0, 0));
187                maprange.Add(new MemMap("KUSEG [TLB Map]", 0x00000000, 0x7fffffff));
188                maprange.Add(new MemMap("KSEG0 [Ram cached]", 0x80000000, 0x9fffffff));
189                maprange.Add(new MemMap("KSEG1 [Ram uncached]", 0xa0000000, 0xbfffffff));
190                maprange.Add(new MemMap("KSSEG [TLB Map]", 0xc0000000, 0xdfffffff));
191                maprange.Add(new MemMap("KSEG3 [TLB Map]", 0xe0000000, 0xffffffff));
192              #endregion              #endregion
193              map = new DeviceMemoryMap(name, maprange);              map = new DeviceMemoryMap(name, maprange);
194              return map;              return map;
# Line 160  namespace RomCheater.EmuMMAPPlugin Line 197  namespace RomCheater.EmuMMAPPlugin
197          #region NGC          #region NGC
198          private DeviceMemoryMap CreateNGCMemMap()          private DeviceMemoryMap CreateNGCMemMap()
199          {          {
200                /* http://hitmen.c02.at/files/yagcd/yagcd/chap4.html#sec4 */
201              const string name = "NGC";              const string name = "NGC";
202              DeviceMemoryMap map = new DeviceMemoryMap();              DeviceMemoryMap map = new DeviceMemoryMap();
203              List<IMemMap> maprange = new List<IMemMap>();              List<IMemMap> maprange = new List<IMemMap>();
204              #region memory maps              #region memory maps
205              maprange.Add(new MemMap(string.Format("{0}_test", name), 0, 0));              //maprange.Add(new MemMap(string.Format("{0}_test", name), 0, 0));
206                maprange.Add(new MemMap("Physical RAM", 0x00000000, 0x017fffff));
207                maprange.Add(new MemMap("Logical RAM [cached]", 0x80000000, 0x817fffff));
208                maprange.Add(new MemMap("Logical RAM [uncached]", 0xC0000000, 0xC17fffff));
209              #endregion              #endregion
210              map = new DeviceMemoryMap(name, maprange);              map = new DeviceMemoryMap(name, maprange);
211              return map;              return map;
# Line 214  namespace RomCheater.EmuMMAPPlugin Line 255  namespace RomCheater.EmuMMAPPlugin
255          {          {
256              this.MapStart = start;              this.MapStart = start;
257              this.MapEnd = end;              this.MapEnd = end;
258              this.MapSize = string.Format("0x{0}={1:0.00}MB", size.ToString("X"), ((double)size / (1024.0 * 1024.0)));  
259                ulong _size = size + 1;
260                double t = 1024.0 * 1024.0;
261                double __size = (double)_size/t;
262                this.MapSize = string.Format("0x{0}={1:0.000000}MB", _size.ToString("X"), __size);
263          }          }
264          #region IMappedMemRange Members          #region IMappedMemRange Members
265          public string MapName { get; private set; }          public string MapName { get; private set; }

Legend:
Removed from v.646  
changed lines
  Added in v.652

  ViewVC Help
Powered by ViewVC 1.1.22