Home | Forums | What's new | Resources | |
Another Saturn SDK |
Red Ring Rico - Jun 29, 2014 |
< Prev | 1 | 2 | 3 | 4 | 5 | Next> |
Red Ring Rico | Jul 2, 2015 | |||||||||
I've tried using my BIOS to underclock the CPU, but the temperatures were still high. I'll give this utility a try, though. Thanks.
You will need to set/create the SATURN_ROOT environment variable to the root directory of the SDK, which is installed to your home directory under saturndev/saturn-sdk by default. This environment variable is not too difficult to add to the installer for Windows, but Linux requires some more work (I'm not sure why it's not built-in to the Qt Installer Framework for Linux). In Code::Blocks, you will need to go to Settings/Compiler, select GNU GCC Compiler for Hitachi SH-2 from the drop-down, navigate to the "Toolchain executables" tab, select "Auto-detect" next to the ellipsis where the "Compiler's installation directory" area is, then "Set as default" which is under the drop-down for "Selected compiler" if it detects the directory correctly. EDIT: After trying to run it under Windows, the linker script seems to be missing. I'm not sure how this happened. For now, you will need to download the linker script from https://raw.githubusercontent.com/SaturnSDK/Saturn.... As it's pretty late over here I'll have to look into this later. |
Red Ring Rico | Jul 3, 2015 | |||
I can set the environment variable in Windows with Qt IFW, but on Linux there's no support for it. I'm sure there's a method involving using the scripting language for it to modify ~/.profile and append or modify the environment variable there. You will need to use mkisofs... and create a valid IP.BIN using the official SEGA Saturn tools, or you can use the pre-compiled IP.BIN from the SGL... (under sample/sys). With those two downloaded, you can create an ISO with this command (courtesy of The Rockin'-B...): mkisofs -quiet -sysid "SEGA SATURN" -volid "SaturnApp" -volset "SaturnApp" -publisher "SEGA ENTERPRISES, LTD." -preparer "SEGA ENTERPRISES, LTD." -appid "SaturnApp" -abstract "ABS.TXT" -copyright "CPY.TXT" -biblio "BIB.TXT" -generic-boot IP.BIN -full-iso9660-filenames -o sl.iso CD Assuming that you've opened a terminal and changed into your project's bin/Debug or bin/Release directory, and that mkisofs is copied into that directory. The CD at the end is a relative directory called CD, which should contain ABS.TXT, CPY.TXT, BIB.TXT, and your binary. Name the binary 001.bin (or anything which will be considered the first file by name). Also note that the SEGA Saturn requires uppercase characters for these files, if you create abs.TXT or abs.txt it will not work. These files can be empty, just as long as you create them. IP.BIN is case-insensitive and is only used by mkisofs, not included in the CD directory. This is another step which will be automated by the IDE in the future, too. When you run it you should see the SEGA license notice, check out Debug/Master SH2 from Yabause, you should see the following highlighted: 0x600406E: bra 0x0600406E |
CarlosTheMover | Jul 3, 2015 | |||
I'll try that out, thanks! for mkisofs, do you think that would belong in a post build step built into the project or do you think it should always be separate? |
Red Ring Rico | Jul 3, 2015 | |||
The SDK is still in an infantile state, it will be a while before it's complete and ready to go. There are a few APIs, such as SGL and libyaul available. I haven't had much time to actually do Saturn development, as I'm working on this development environment. vbt... may be able to tell you how to set it up. Update: I've updated the installer to create an environment variable under Windows for SATURN_ROOT, next I'll look at the linker script, then work out how to set the environment variable under Linux. Update #2: After 2 hours 20 minutes, I figured out the Qt Installer Framework documentation, which is helpful if you know how to read it (it refers to Qt-specific JavaScript, and I don't know regular JavaScript). Anyway, after trying 5 different methods to achieve the same thing, creating 44 different directories with the installer, and learning some JavaScript along the way, I finally managed to add 14 lines of script which adds export SATURN_ROOT= Update #3: Fixed the linker script issue on Windows, which created an issue on Linux, leading to another build which works on both. I thought the lnk extension was being ignored as a valid extension under Windows and therefore Code::Blocks just couldn't see the file. This was not the case, I needed to have a Saturn.lnk file in both the C and C++ directories. Next: Looking at deploying to a Saturn from Code::Blocks. |
Red Ring Rico | Jul 5, 2015 | |||
I think you're right, antime. Not being able to associate the files with an editor is a problem. I just wanted to get it working and was blinded that it would create another problem. I can't remember where I read that file names had to be upper-case ASCII, including numbers and some limited set of symbols. Misinformation isn't good, and I should have been more thorough. On another note; I'm setting up the build server for the Windows version of Code::Blocks on an Amazon EC2 instance, mainly because it's free for a year. I'm still looking into getting it cross-compiled from Linux. |
antime | Jul 5, 2015 | |||||
For the abs/bib/cpy files, the character set is limited to 0-9, A-Z and the underscore character (if you really want to know, the details are found in the ECMA-119 document...). But there's nothing on the Saturn that cares, so any name that mkisofs accepts will do. |
Red Ring Rico | Jul 5, 2015 | |||
Thanks for the information, antime. After building the IDE on an Amazon EC2 instance, the compilation time has gone from 1 hour to ten minutes. |
Red Ring Rico | Jul 10, 2015 | |||
Update It turns out that the issue I had with my desktop overheating was due to the motherboard being warped. Too much pressure used when mounting the HSF. Luckily, I can just get a new motherboard and RAM, unfortunately the motherboard I was looking at isn't in stock at the moment. Hopefully it won't be too long until I can replace it. In the meantime I'm looking into C++ support and installing the SDK on BSD as well as Mac OS X. Update Initial C++ support After a few hours of re-compiling (which turned into days with trying to get Mac OS X running in VirtualBox) I have built the C++ compiler and libstdc++. Though I have not thoroughly tested support, at least the compiler and standard C++ library are working. Deploying to the Saturn I'm currently looking through the source code of the file transfer utility for the USB Development Cartridge in order to allow for deployment directly to the Saturn by pressing Ctrl+F10 to run or F9 to build and run. Website Over the next few months I will be setting up a website dedicated to the SDK to bring everything into one cohesive location. Mainly the site is just for laying out a full roadmap for all the components of the SDK and allowing for separate issues (the IDE, compiler, other tools) to be discussed with their own threads via a mailing list. |
dibz | Jul 17, 2015 | |||
You're more then welcome to use SX as a base for your forums and hosting the files and such. |
Red Ring Rico | Jul 17, 2015 | |||
Thanks, dibz. I was thinking that I could set up a github.io site for the organisation as a landing page for describing the SDK, use each project on GitHub for bug tracking, and use the forums here for communication of ideas (improvements, changes, etc.). The file hosting isn't a problem as I have a 1TiB transfer limit per month, and I haven't gone anywhere near it. I just created the site a few minutes ago: http://saturnsdk.github.io... |
dibz | Jul 17, 2015 | |||
Sounds like a plan to me. I'm thinking a sub-forum of this saturn dev forum, thoughts? and name for it? |
Red Ring Rico | Jul 17, 2015 | |||
A sub-forum here would be great. I think "SEGA Saturn SDK" would be very megalomaniacal of me to put forward. "Rico's Saturn SDK" would be a better fit. |
dibz | Jul 17, 2015 | |||
All set. I set you up as a moderator of the new sub-forum as well. |
Red Ring Rico | Jul 18, 2015 | |||
Thanks, dibz. |
< Prev | 1 | 2 | 3 | 4 | 5 | Next> |