Package smsqmulator

Class SmsqeString

java.lang.Object
smsqmulator.SmsqeString

public class SmsqeString extends Object
Methods to get string from smsqe to java and vice-versa.
  • Constructor Details

    • SmsqeString

      public SmsqeString()
  • Method Details

    • readSmsqeString

      public static final String readSmsqeString(int address, MC68000Cpu cpu)
      Returns a java String from an SMSQE string at a certain address MAKING accented chars conversion.
      Parameters:
      address - where the string lies in memory. This is presumed to be even (after all, the string is preceded by a length word).
      cpu - the cpu with the momory
      Returns:
      the String read, this may be "" but will not be null.

      This makes character conversion from SMSQQE charset to Java charset.

    • writeSmsqeString

      public static final void writeSmsqeString(int address, String s, int maxLength, MC68000Cpu cpu)
      Writes a java String as an SMSQE string to a certain address MAKING accented chars conversion.
      Parameters:
      address - - where to start writing.
      s - the String to write.
      maxLength - the max length of the string to write NOT INCLUDING THE LENGTH WORD, -1 if no max length.
      cpu - the cpu with the momory
    • writeSmsqeString

      public static final void writeSmsqeString(int address, String s, boolean writeLength, int maxLength, MC68000Cpu cpu)
      Writes a java String as an SMSQE string to a certain address MAKING accented chars conversion.
      Parameters:
      address - - where to start writing.
      s - the String to write.
      writeLength - true if the length of the string should be prepended to the string (as would be usual in SMSQE)
      maxLength - the max length of the string to write NOT INCLUDING THE LENGTH WORD, -1 if no max length.
      cpu - the cpu with the momory
    • convertToSMSQE

      public static final byte convertToSMSQE(String c)
      Converts from java string to smsqe char/byte.
      Parameters:
      c - the char to convert
      Returns:
      the converted char
    • convertToSMSQE

      public static final byte convertToSMSQE(char c)
      Converts from java char to smsqe char/byte.
      Parameters:
      c - the char to convert
      Returns:
      the converted char
    • convertToJava

      public static final String convertToJava(byte c)
      Converts from SMSQE byte to Java string.
      Parameters:
      c - the byte ti convert
      Returns:
      the byte as a java unicode string.