Skip to content
brickpool edited this page Mar 26, 2020 · 6 revisions

Emulation File Format

Some details

Software

  • The 35S has a limitation of 26 labels
  • Variables and numbers are stored with a size of 35 bytes
  • It looks like the format is little endian
  • One command has a length of 3 bytes
  • If the memory has been cleared, 30192 bytes are available for variables and program
  • Programs are at the end of the memory
  • The program commands are stored in descending order
  • Used Memory: shift MEM / ChkSum shift MEM ctrl SHOW
  • The Checksum algorithm is a variant of CRC-16-CCITT.
  • The Pointer has a size of 16bit

Hardware

  • The pictures inside shows the processor and a memory chip (epoxy 'blobs')
  • The chip is most likely mounted using COB (Chip On Board)
  • The sizes of the low-power SRAM is 256 Kbit (32 KB)
  • The microcontroller based on a 6502 core with masked ROM
  • The chip which is used is a SPLB31A (SunPlus) or GPLB31A (GeneralPlus)

File Header

Offset Data Type Size Name Content
0 C-String 28 szFileId ASCII-String Zero Terminated: "SPLB3X-SIMULATOR-STATE-FILE"
28 unknown 44 - binary
72 Byte 1 bIsOn Indicates if the calculator is turned on
73 unknown 99 - binary
172 Word 2 wTimer1 Elapsed seconds since last reset
174 unknown 206 - binary
380 C-String 8 szProcId ASCII-String Zero Terminated: "SPLB31A"
388 reserved 388 - default 0
636 C-String 6 szCoreId ASCII-String Zero Terminated: "F6502"
642 unknown 254 - default 0
896 reserved 376 - binary

Display

Offset Data Type Size Name Content
1272 Byte 1 bStartId Start: 47h
1273 unknown 1403 - binary
2676 Word 2 wTimer2 Elapsed seconds since last on
2678 Word 2 wTimer3 Elapsed seconds since last on
2680 unknown 96 - (Display Cache?)
2776 unknown 417 - binary
3193 Byte 1 bEndId End: 47h

Program Index

Offset Data Type Size Name Content
3194 unknown 253 - binary
3447 Pointer 2 pPrgCnt Program counter
3449 Byte 1 bLbl01 FF=not used, 01=A, 02=B, ...
3450 Pointer 2 pPrgOfs01 Program Pointer or 0
3452 Byte 1 bLbl02 FF=not used, 01=A, 02=B, ...
3453 Pointer 2 pPrgOfs02 Program Pointer or 0
... ... ... ...
3605 Byte 1 bLbl26 FF=not used, 01=A, 02=B, ...
3606 Pointer 2 pPrgOfs26 Program Pointer or 0
3608 unknown 150 - binary
3758 ByteArray 3 rgbInstr Last or current program instruction

Program Control

Offset Data Type Size Name Content
3761 unknown 250 - binary
3912 C-String 41 szLstLitter Last Litterals (EQN strings or const values)
3953 unknown 58 -
3954 Byte 1 -
4011 String 5 usLstLetter Last Letter Key/s (Opcode or C-String)
3953 Byte 1 -
4018 C-String 5 szPrgmTop Top of program memory (ASCII character)
4023 unknown 1145 - binary
5168 Word 2 wTimer4 Elapsed seconds since last on

Code and Data Segment

The data segment starts at 17592d. The pointer to the first data entry is 0774h.

The first program statement in the code segment begins at the end of the memory. The pointer to the first code instruction is 7FFBh.

Offset Data Type Size Name Content
17592 Word 2 wStartId 003Ah
17594 unknown 1906 - binary
19500 ByteArray 30858 rgbSegment Memory for the data and code segment
50358 Word 2 wEndId 3A00h

Equation/Expression Structure

The data segment starts at the offset 19500d with the first Item. Each Item has a length of 35 Bytes. There is at least one Start Item followed by 0 to n Extension Items. The following two sections describe the structure.

Startup Item

Offset Data Type Size Name Content
0 Word 2 wItemLen Total length of the Equation/Expression
2 ByteArray 28 rgbItemData Equation/Expression (ASCII character)
30 Byte 1 byUsedLen Number of used bytes for this item
31 Word 2 wStartOffset Start offset address (always 3)
33 Word 2 pNextAddr Pointer to the next entry or 0

Extension Item

Offset Data Type Size Name Content
0 ByteArray 30 rgbItemData Equation/Expression (ASCII character)
30 Byte 1 byUsedLen Number of used bytes for this item
31 Word 2 pPrevAddr Pointer to the previous entry
33 Word 2 pNextAddr Pointer to the next entry or 0

Links

Clone this wiki locally