Chilly Willy
Established Member
I'm posting an arc of the source 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
Those are all the latest releases. 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 over 100 MB, compressed with 7zip. In a terminal, cd to the directory you decompressed everything to, then enter 'make'. It will create the toolchain's directory (if need be) and then the sega directory inside that. It will then build c and 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 20.04 and work fine on real hardware and Fusion 3.64. I've also been building Doom 32X Resurrection and OpenLara with this for more than a month without issue, so it should be safe to update if you're using one of my older toolchains. Note that zasm 4.x introduced some changes - you need to change the makefile targeting the z80 like this
and the first couple lines of the z80 source file like this
gcc 12.1.0
binutils 2.38
newlib 4.2.0
zasm 4.4
Those are all the latest releases. 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 over 100 MB, compressed with 7zip. In a terminal, cd to the directory you decompressed everything to, then enter 'make'. It will create the toolchain's directory (if need be) and then the sega directory inside that. It will then build c and 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 20.04 and work fine on real hardware and Fusion 3.64. I've also been building Doom 32X Resurrection and OpenLara with this for more than a month without issue, so it should be safe to update if you're using one of my older toolchains. Note that zasm 4.x introduced some changes - you need to change the makefile targeting the z80 like this
ASMZ80 = $(ROOTDIR)/bin/zasm
FLAGSZ80 = -bv2
and the first couple lines of the z80 source file like this
#target ram
#code SRAM, $0000, $2000