Japanese
FAQDevelopment environmentSNASM environment
BackForward
FAQ/Development environment

SNASM environment



I want to restart snbugsat with the memory contents intact after it hangs.

Q)
I am using CartDev + Snbugsat.
There is no problem in normal use, but if the program becomes unable to communicate with the debugger monitor due to a runaway, etc., you will have to reload the monitor and check the memory state at the time of the runaway. I want to do this, but when the monitor loads, the memory used by the application is cleared.
Is there a way to restore the debugger functionality without clearing memory?

A)
there is no.


I want to use the READ/WRITE cycle condition settings and history functions in SNASM.

Q)
Is it possible to use SNBUGSAT to set conditions for "READ/WRITE cycles" and "data bus value size" as in GUISH?
Also, please let us know if you have any plans for version upgrades, such as adding history functions.

A)
In the case of GUI-SH, the CPU used is an EVA chip (with debugging function), so READ/WRITE cycle conditions were possible, but this is not possible in the SNASM2 operating environment.
It is possible with simple condition settings (compared to ICE etc.). (Break at what time, etc.)
Similar to the history function, this cannot be done.
If you want to do this kind of debugging, you can use a combination of ProgrammingBox and ROM Debugger (manufactured by Sophia Systems).
One set costs about 800,000 yen (including software), but it can read both the SH-C output format (SYSROF format) and the GNU-C output format (COFF format).
It seems that the software bugs have also been fixed.


Does SNASM have a function to dump the contents of RAM into a coff file, etc.?

Q)
Is there a way to use SNASM2's debugger to output data such as BG and MAP recorded in work RAM to a file format that can be used by the linker by specifying an arbitrary address and number of bytes?
Also, are there any detailed translated materials on how to use the debugger?

A)
It is not a feature of SNBUGSAT. (However, it is possible if you only load/save the binary)
The English translation of the manual SNASM2.09y is provided in the Technical Information Forum's data library as a text file and a Microsoft Word file for Windows.


Please tell me how to read the SIMM address in a SNASM environment.

Q)
From SNASM2, it appears that the SIMM address of CartDev does not exist from the same address as the Programming Box (0x04000000).
When I looked at the address using snbugsat.exe's Alt+W (Window), M (Memory), '**' was displayed, indicating that it was not active.
Can the simple SIMM system actually be used in a CartDev + DevSaturn environment?

A)
Similarly, in the CartDev + DevSaturn environment, a SIMM is assigned to address 0x04000000 (0x24000000 for a cache-through address).
Specifically, give memory space access rights to the SNBUG.CFG file.

[SAT_SH2_MAIN]
Read      = 0x00000000, 0x0007FFFF, BYTE
Write     = 0x00100000, 0x0010001F, BYTE
Read      = 0x00100020, 0x0010005F, BYTE
Write     = 0x00180000, 0x0018FFFF, BYTE
ReadWrite = 0x00200000, 0x002FFFFF, BYTE
ReadWrite = 0x01000000, 0x01000003, BYTE
ReadWrite = 0x01800000, 0x01800003, BYTE
ReadWrite = 0x04000000, 0x04FFFFFF, BYTE ←These two lines
ReadWrite = 0x24000000, 0x24FFFFFF, BYTE ←

[SAT_SH2_SUB]
Read      = 0x00000000, 0x0007FFFF, BYTE
Write     = 0x00100000, 0x0010001F, BYTE
Read      = 0x00100020, 0x0010005F, BYTE
Read      = 0x00180000, 0x0018FFFF, BYTE
ReadWrite = 0x00200000, 0x002FFFFF, BYTE
ReadWrite = 0x01000000, 0x01000003, BYTE
ReadWrite = 0x01800000, 0x01800003, BYTE
ReadWrite = 0x04000000, 0x04FFFFFF, BYTE ←These two lines
ReadWrite = 0x24000000, 0x24FFFFFF, BYTE ←

Add these two lines.

This area is assigned to SIMM memory, so you can use it by loading the necessary data here in binary.
Booting from SIMM and changing memory addresses are not possible in the CartDev environment.
The same goes for modems, etc., by allowing read/write permissions in this configuration file for the addresses of applications and devices that access SNASM's prohibited areas.


How to debug with SNASM?

Q)
I am developing in the SNASM2 environment. How can I display the contents of variables using this debugger?
In addition, debugging by displaying the source code (step trace, etc.) is possible without any problems.
The compile-time options are

-Wall -O2 -m2 -g (and include directory specification)

is.

A)
procedure

  1. Run the program.

  2. Open the source file in which variables have been registered using the "Mixed" command.

  3. Set a breakpoint and stop the program.

  4. If you want to see global variables, use the "watch" command, or if you want to see local variables, use the "watch" command.
    Use the "local var" command.

  5. For "watch", use the "Edit" → "add" command to display the value of the variable.
    (For structures, double-click the item with a "+" to see detailed information.)

  6. In the case of "local var", the memory value set in the local variable is automatically displayed.

Although variable values can be referenced in both windows, they cannot be directly rewritten.
Please rewrite it in the "Memory" window.


I can't see inside the structure with SNASM.

Q)
I can use watch with SNASM, but the contents of the structure are not displayed.
Is it a replacement?

A)
This is because SNASM depends on the development environment, which assumes development in assembler, but snasmld does not import internal symbols of structures and symbols of automatic variables as debug information when linking.
Therefore, if you want to reference the symbols of internal members of a structure or perform source code debugging such as displaying Auto variables (as much as possible in other cases), please do not use snasmld as a linker.
All of these things can be done using GNU ld.


BackForward
FAQDevelopment environmentSNASM environment
Copyright SEGA ENTERPRISES, LTD. 1997