Difference between revisions of "Debug device"

From MSX Game Library

(Created page with "Proposal to improve the debugging protocol used by openMSX pseudo-device. Based on: https://openmsx.org/manual/user.html#debugdevice == Improvement == In Multi-byte mode, u...")
 
Line 4: Line 4:
  
 
== Improvement ==
 
== Improvement ==
 +
<pre>
 +
-----------------------------------------------------------------------------
 +
Port 0x2E - Mode Set Register
 +
-----------------------------------------------------------------------------
 +
  7  6  5  4  3  2  1  0
 +
  │  │  │  │  └───┴───┴───┴── Mode-specific parameters
 +
  │  │  └───┴────────────────── Output mode (0 = OFF, 1 = single byte, 2 = multi byte)
 +
  │  └────────────────────────── Line feed mode (0 = line feed at mode change, 1 = no line feed)
 +
  └────────────────────────────── Functionality (0 = output, 1 = special)
  
In Multi-byte mode, use the two remaining bits for:
+
-----------------------------------------------------------------------------
bits #2: 0=8 bits number; 1=16 bits number (requires 2 consecutive outputs to 2Fh port)
+
Functionality = output, Output mode = single byte
bits #3: 0=unsigned, 1=signed (needed for decimal display)
+
-----------------------------------------------------------------------------
 +
  7  6  5  4  3  2  1  0
 +
  │  │  │  │  │  │  │  └── Hexadecimal mode (0 = OFF, 1 = ON)
 +
  │  │  │  │  │  │  └────── Binary mode (0 = OFF, 1 = ON)
 +
  │  │  │  │  │  └────────── Decimal mode (0 = OFF, 1 = ON)
 +
  :  :  :  :   └────────────── ASCII mode (0 = OFF, 1 = ON)
  
Bit #7 can also be used:
+
-----------------------------------------------------------------------------
0=Output
+
Functionality = output, Output mode = single byte
1=Special (for the moment, have a break with FFh)
+
-----------------------------------------------------------------------------
 +
  7   6  5  4  3  2  1  0
 +
  │  │  │  │  │  │  └───┴── Mode (0 = hex, 1 = binary, 2 = decimal, 3 = ASCII mode)
 +
  │  │  │  │  │  └────────── Data width (0 = 8 bits; 1 = 16 bits)
 +
  :  :  :  :  └────────────── Signed (0 = unsigned, 1 = signed)
 +
</pre>

Revision as of 18:34, 27 July 2023

Proposal to improve the debugging protocol used by openMSX pseudo-device.

Based on: https://openmsx.org/manual/user.html#debugdevice

Improvement

-----------------------------------------------------------------------------
 Port 0x2E - Mode Set Register
-----------------------------------------------------------------------------
  7   6   5   4   3   2   1   0
  │   │   │   │   └───┴───┴───┴── Mode-specific parameters
  │   │   └───┴────────────────── Output mode (0 = OFF, 1 = single byte, 2 = multi byte)
  │   └────────────────────────── Line feed mode (0 = line feed at mode change, 1 = no line feed)
  └────────────────────────────── Functionality (0 = output, 1 = special)

-----------------------------------------------------------------------------
 Functionality = output, Output mode = single byte
-----------------------------------------------------------------------------
  7   6   5   4   3   2   1   0
  │   │   │   │   │   │   │   └── Hexadecimal mode (0 = OFF, 1 = ON)
  │   │   │   │   │   │   └────── Binary mode (0 = OFF, 1 = ON)
  │   │   │   │   │   └────────── Decimal mode (0 = OFF, 1 = ON)
  :   :   :   :   └────────────── ASCII mode (0 = OFF, 1 = ON)

-----------------------------------------------------------------------------
 Functionality = output, Output mode = single byte
-----------------------------------------------------------------------------
  7   6   5   4   3   2   1   0
  │   │   │   │   │   │   └───┴── Mode (0 = hex, 1 = binary, 2 = decimal, 3 = ASCII mode)
  │   │   │   │   │   └────────── Data width (0 = 8 bits; 1 = 16 bits)
  :   :   :   :   └────────────── Signed (0 = unsigned, 1 = signed)