Home | Forums | What's new | Resources | |
Using SBL |
BrokenLizard - Dec 26, 2009 |
vbt | Dec 26, 2009 | |||
did you include strt1_g.o & strt2_g.o ? |
BrokenLizard | Dec 26, 2009 | |||
Linking in those two files removes the random characters, but the code still does not work. It now hangs at the Sega logo screen just like all of the official SBL examples. |
antime | Dec 27, 2009 | |||||
When you built the samples, did you use the provided startup files and linker script (STRT1_G.SRC, STRT2_G.C, SATURN.LNK) or your own? |
BrokenLizard | Dec 27, 2009 | |||
The official samples were compiled and linked with the support files and tools from SaturnOrbit. No modifications were made or attempted. I also tried patch 1 and patch 2 but the result was the same. Uploading the bin file to 0x06010000 on real hardware results in a hang at the Sega logo while loading the iso image in SSF or Yabause generates an unknown opcode error. |
mrkotfw | Dec 27, 2009 | |||
Check the linker script. You might have to load the binary at 0x26004000. |
BrokenLizard | Dec 27, 2009 | |||
The official SBL samples use the file saturn.lnk, which places the text segment at 0x06001000. This is different than the bart.lnk and sl.lnk files, which place the text segment at 0x06004000. Changing saturn.lnk to use 0x06004000 did not fix the problem. Before altering the saturn.lnk file, I tried loading the binary to 0x06001000, 0x06002000, and 0x06004000. |
vbt | Dec 28, 2009 | |||||||
Maybe it can help you Link flags :
Link script :
|
antime | Dec 30, 2009 | |||
Loading the binary to some random address isn't going to fix it, the linker script says what the base address is. If you look at the final object file (ie. before you convert it into a "raw" binary) using objdump or similar tools, is everything there? Are all the bits in their right sections and where they are supposed to be? IIRC the SBL build mechanism uses some tricks in order to be compatible with the Hitachi compiler, this may not work so well with the linker script you're using. As a last resort, just disassemble the binary and see if the code makes sense. |
BrokenLizard | Jan 1, 2010 | |||
It appears that SaturnOrbit is using the same IP.BIN file for all of its examples. Since this file specifies the loading address of the application bin file, the SBL examples (only using the provided build files) should not be able to start correctly. I tried using the IP.BIN file located in common/IP_GASM_SYS (it appears to be configured for 0x06010000), but that did not seem to work. Has anyone been able to start an SBL example compiled with the build mechanisms provided by SaturnOrbit? Before Segaxtreme moved, I downloaded the stand-alone archive of the SBL libraries and the build scripts are different. Once the download links in the resources section are operational, I will attempt to use this alternate set of build scripts with the Hitachi compiler. Hopefully, I will then be able to get a SBL example to at least start. |
antime | Jan 2, 2010 | |||
You can download the SBL archive from my website. Using an emulator with debugging features is also useful, especially with simple applications like this. |