/// <summary> /// Renders the contents of the ROM from the given offset to the screen. /// </summary> private void DrawRAM(int x, int y, ushort addr, int rows, int cols, Graphics g) { int PosX = x; int PosY = y; _StringBuilder.Clear(); for (int row = 0; row < rows; row++) { _StringBuilder.Append(String.Format("${0,4:X4}: ", addr)); for (int col = 0; col < cols; col++) { _StringBuilder.Append(String.Format("{0,2:X2} ", _NESCore.CPURead(addr, true))); addr++; } _StringBuilder.Append("\n"); } g.DrawString(_StringBuilder.ToString(), _DrawFont, _DrawOnBrush, new PointF(x, y)); }