My current Sega MD/CD/32X devkit

Talk about development tools here

Moderator: BigEvilCorporation

Post Reply
Chilly Willy
Very interested
Posts: 2736
Joined: Fri Aug 17, 2007 9:33 pm

My current Sega MD/CD/32X devkit

Post by Chilly Willy » Sun May 05, 2019 3:34 pm

I'm posting an arc of the code needed to build my latest toolchain, along with a few examples. All the needed code is included together with a makefile to build everything at once. The toolchain is comprised of

gcc 9.1.0
binutils 2.32
newlib 3.1.0
zasm 3.0.22

Those are all the latest releases other than zasm. That's the last v3 zasm, which I use for assembling z80 code. v4 zasm introduced some changes to the assembler that I haven't bothered updating for, as well as being more of a pain to build. I made a makefile for zasm (since it normally comes set to build in MACOSX), and used the linux config file set for x86-84. If you use MacOS and/or use 32-bit, you'll need to change the config.h file.

To build, make sure your /opt folder can be written by your user. Download this archive and decompress into a folder; note that the file is about 101MB, compressed with 7zip. In a terminal, cd to the directory you decompressed everything to, then enter 'make'. It will create the toolchains directory (if need be) and then the sega directory inside that. It will then build c, c++, obj-c, and obj-c++ compilers for SH2 and 68000, using newlib for the standard c libraries. It will then create a bin directory in toolchains/sega, build zasm, and copy it into that bin directory. It will then copy the bootblocks and ldscripts directories into toolchains/sega. Once it's done, you can clean up the build folder by running 'make clean'. Note that the examples aren't copied into the toolchain.

Once the toolchain is done, you can build the examples to check that everything is working. I included my Yeti3D example, and the C/C++ TicTacToe examples for MD and 32X. All were tested on my system under Xubuntu 18.04 and work fine on real hardware and Fusion 3.64.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest