Go to the source code of this file.
|
| char | DecodeShiftJisCharacter (const char *pShiftJis) |
| | Convert one full-width Shift-JIS character back to ASCII.
|
| unsigned short | EncodeShiftJisCharacter (unsigned char cAscii) |
| | Convert one ASCII character to its full-width Shift-JIS code.
|
| void | ShiftJisToAscii (const char *pszShiftJis, char *pszAscii) |
| | Convert Shift-JIS text back to ASCII.
|
| void | AsciiToShiftJis (const char *pszAscii, char *pszDest) |
| | Convert ASCII text to the Shift-JIS bytes icon.sys stores a title as.
|
◆ DecodeShiftJisCharacter()
| char DecodeShiftJisCharacter |
( |
const char * | pShiftJis | ) |
|
Convert one full-width Shift-JIS character back to ASCII.
A lead byte of 0x82 maps three trail-byte runs back onto the digits and the letters, and the digit run covers one trail byte more than the ten digits. A lead byte of 0x81 is looked up in g_aShiftJisSymbols by its trail byte alone. The title is inferred.
- Parameters
-
| pShiftJis | The two bytes of the character. |
- Returns
- The ASCII character, or zero when the character has none.
- Ghidra address:
- NTSC-U/C: 0x00556750
- Ghidra address:
- PAL: 0x005978a8
◆ EncodeShiftJisCharacter()
| unsigned short EncodeShiftJisCharacter |
( |
unsigned char | cAscii | ) |
|
Convert one ASCII character to its full-width Shift-JIS code.
A code outside space to tilde is reported through the log as bad ASCII code 0xx. The title is inferred.
- Parameters
-
- Returns
- The two-byte code, lead byte high, or zero for a character outside the tables.
- Ghidra address:
- NTSC-U/C: 0x00556818
- Ghidra address:
- PAL: 0x00597970
◆ ShiftJisToAscii()
| void ShiftJisToAscii |
( |
const char * | pszShiftJis, |
|
|
char * | pszAscii ) |
Convert Shift-JIS text back to ASCII.
The source length is halved and every pair converted. The first pair with no ASCII form replaces the whole result with .Kanji.. The shipped program does not call it, and the title is inferred.
- Parameters
-
| pszShiftJis | The text to convert. |
| pszAscii | The destination, of at least half the source length plus one byte. |
- Ghidra address:
- NTSC-U/C: 0x00556928
- Ghidra address:
- PAL: 0x00597a80
◆ AsciiToShiftJis()
| void AsciiToShiftJis |
( |
const char * | pszAscii, |
|
|
char * | pszDest ) |
Convert ASCII text to the Shift-JIS bytes icon.sys stores a title as.
Every character becomes two bytes, lead byte first, and two zero bytes end the result. SaveFileMCT::BuildIconSys() is its only caller, and the title is inferred from that use and from the .Kanji. fallback of the reverse conversion.
- Parameters
-
| pszAscii | The text to convert. |
| pszDest | The destination, of at least twice the text length plus two bytes. |
- Ghidra address:
- NTSC-U/C: 0x00556a20
- Ghidra address:
- PAL: 0x00597b78
◆ kShiftJisSymbolCount
| int kShiftJisSymbolCount = 33 |
|
constexpr |
Punctuation pairs in g_aShiftJisSymbols, one for each printable ASCII symbol.
◆ kShiftJisRangeCount
| int kShiftJisRangeCount = 3 |
|
constexpr |
Runs in g_aShiftJisRanges: the digits, the capital letters, and the small letters.
◆ g_aShiftJisSymbols
The ASCII punctuation from space to tilde in ASCII order, followed by one zero entry.
- Ghidra address:
- NTSC-U/C: 0x007251a8
- Ghidra address:
- PAL: 0x00768e48
◆ g_aShiftJisRanges
The digit, capital, and small-letter runs, based at 0x824f, 0x8260, and 0x8281.
- Ghidra address:
- NTSC-U/C: 0x00725230
- Ghidra address:
- PAL: 0x00768ed0