Sozobon source code changes?
Moderator: BigEvilCorporation
Sozobon source code changes?
I was wondering if the changes to the linker, and assembler to the Sozobon compiler were ever posted anywhere?
I figured the linker just omits the headder, since it is making a raw image. But the real fun is in JAS or namely how the modified version can assemble stuff greater than 32kb.
I know I can hear the call of "just run gcc" but in my insane experiments, I want to actually run sozobon on 68k hardware as well, and getting it to run will be a heck of a lot easier than bootstrapping up GCC. Not to mention requiring a lot less precious stack ram.
The email address for PLee was @enron and I don't think that works anymore...
I figured the linker just omits the headder, since it is making a raw image. But the real fun is in JAS or namely how the modified version can assemble stuff greater than 32kb.
I know I can hear the call of "just run gcc" but in my insane experiments, I want to actually run sozobon on 68k hardware as well, and getting it to run will be a heck of a lot easier than bootstrapping up GCC. Not to mention requiring a lot less precious stack ram.
The email address for PLee was @enron and I don't think that works anymore...
Re: Sozobon source code changes?
Was it ever updated? And I recall that most of those changes were specific to x86. The 68000 version had the 32KB limit because it was using word-sized offsets (which with sign extension gives you a 15-bit range in either direction, hence 32KB). I guess you could change it to use long-sized offsets instead but that'll take quite a while to update it.
Note that you can always just split the code into several smaller files instead. Sozobon has no problem with that.
Note that you can always just split the code into several smaller files instead. Sozobon has no problem with that.
Sik is pronounced as "seek", not as "sick".
Re: Sozobon source code changes?
From the included 'readme' of soz_3.zip
And inside jas.h there is this gem:Sozobon C Compiler, release 3.0
03 Jan 2001
by P.Lee
Distribued by Kaneda
Compiler Limits
Some limits imposed by the Sozobon compiler were:
* Include files may not be nested more than 8 deep.
* The assembler will have problems with extremely large
source files that produce more than 32K of code from a
single file.
Now they are
* Include files may not be nested more than 32 deep.
* The assembler have been tested on large source files without errors.
so on a 32bit machine, this makes the defined 'shorts' 'ints'... I'm such a n00b when it comes to messing with sozobon... Since I'm not trying to build this with some real mode 16bit compiler, but rather MinGW./* i don't know why we need this ...
#define short int
... */
Re: Sozobon source code changes?
I looked in my archive : got only the binaries
I think paul never released the source...
All I have is on the readme.txt
I think paul never released the source...
All I have is on the readme.txt
Code: Select all
I have modified a version Sozobon C Compiler to work 'somewhat' with the
Sega Genesis. What do you mean by 'somewhat'? Well, there are still
some limitiations which the programmer must be aware of. I have made
two changes to the Linker (ld) which allow the following:
1) All variables will start at $FF0000.
2) A new -g option will pad the output file with $FF on 128K boundaries.
Re: Sozobon source code changes?
Oh well it was worth a shot. I'll either have to run JAS under a debugger to figure out why it has issues with 32k, or just find another assembler capable of assembling Sozobon... Or see just how hard it is to run GCC. I guess the DJGPP port ought to have cut down dependencies for things like pipes, and anything multitasking. I know GCC 1.3 was easy enough to get running on MinGW, so maybe there is a way with really old GCC 2.x?KanedaFr wrote:I looked in my archive : got only the binaries
I think paul never released the source...
With any luck, maybe oneday patches will surface somehow.
-
- Very interested
- Posts: 3131
- Joined: Thu Nov 30, 2006 9:46 pm
- Location: France - Sevres
- Contact:
Re: Sozobon source code changes?
What Operating are you using ? If you are on Windows you can pick up the bin folder of SGDK, it includes a minimalist GCC 3.4.6 version which allow you to compile C code for Sega Genesis. You will have to remove all useless files / tools used by SGDK.
Re: Sozobon source code changes?
Nope:
neozeed wrote:I want to actually run sozobon on 68k hardware as well
Sik is pronounced as "seek", not as "sick".
Re: Sozobon source code changes?
CP/M 68k, or something more bare/raw. I really really really don't want to run GCC. It's far too big and unwieldy.Stef wrote:What Operating are you using ? If you are on Windows you can pick up the bin folder of SGDK, it includes a minimalist GCC 3.4.6 version which allow you to compile C code for Sega Genesis. You will have to remove all useless files / tools used by SGDK.
-
- Very interested
- Posts: 3131
- Joined: Thu Nov 30, 2006 9:46 pm
- Location: France - Sevres
- Contact:
Re: Sozobon source code changes?
Oh yeah sorry i didn't saw you wanted something running on M68K, i guess you can dig in the Amiga / Atari C compiler.
VBCC is a nice compiler and you can get the sources from here:
http://www.ibaug.de/vbcc/vbcc.tar.gz
VBCC hompage :
http://www.compilers.de/vbcc.html
The problem with Sobozon C compiler is that it's really broken, I started Genesis development with that compiler but quickly realized it suffers from too much bugs so i had to get back to GCC :-/
VBCC is a nice compiler and you can get the sources from here:
http://www.ibaug.de/vbcc/vbcc.tar.gz
VBCC hompage :
http://www.compilers.de/vbcc.html
The problem with Sobozon C compiler is that it's really broken, I started Genesis development with that compiler but quickly realized it suffers from too much bugs so i had to get back to GCC :-/
Re: Sozobon source code changes?
I know the Amiga folks patched it at some point to do 32bit ints instead of 16bit, as AmigaDOS is 32bit, while TOS is 16bit. Funny I was just reading about vbcc, and it's enormous ~900kb compiler size.. ugh I know it's far from perfect but sozo is so damned small, and relatively portable.Stef wrote:Oh yeah sorry i didn't saw you wanted something running on M68K, i guess you can dig in the Amiga / Atari C compiler.
VBCC is a nice compiler and you can get the sources from here:
http://www.ibaug.de/vbcc/vbcc.tar.gz
VBCC hompage :
http://www.compilers.de/vbcc.html
The problem with Sobozon C compiler is that it's really broken, I started Genesis development with that compiler but quickly realized it suffers from too much bugs so i had to get back to GCC :-/
There is no doubt, the bigger machines got, the seemingly impractical size of GCC became moot.
It's just such a damned shame SEGA was so freaking cheap with the RAM. the best fit seems to be the 32x with it's glorious 256kb of ram, or the megaCD with it's 128kb shareable pages between the CD and main cpu. sigh
-
- Very interested
- Posts: 50
- Joined: Tue Dec 24, 2013 1:00 am
Re: Sozobon source code changes?
Do you specifically need a C compiler or just runtime code generation of some sort?
Re: Sozobon source code changes?
ehaliewicz wrote:Do you specifically need a C compiler or just runtime code generation of some sort?
I wanted a tiny and portable c compiler (linker and assembler ).
I may just give up, or start debugging.
-
- Very interested
- Posts: 50
- Joined: Tue Dec 24, 2013 1:00 am
Re: Sozobon source code changes?
Or write your ownneozeed wrote:ehaliewicz wrote:Do you specifically need a C compiler or just runtime code generation of some sort?
I wanted a tiny and portable c compiler (linker and assembler ).
I may just give up, or start debugging.
Re: Sozobon source code changes?
That'd be harder than fixing Sozobon though =P (an assembler only, on the other hand, may be easier)
Sik is pronounced as "seek", not as "sick".
Re: Sozobon source code changes?
I put my crap work up on sourceforge.
The linker is doing something different at relocations I think. Maybe it is the stack/ram being at 0xff0000? I can't figure out what 004926 is...
or
No doubt FF001E or FF0000 is something important... lol
But I could build the other sozo examples, and even the Fvr technical demo.
The linker is doing something different at relocations I think. Maybe it is the stack/ram being at 0xff0000? I can't figure out what 004926 is...
Code: Select all
Comparing files demo5.bin and WORKING\DEMO5.BIN
0000035D: 00 FF
0000035E: 49 00
0000035F: 26 00
000006EB: 00 FF
000006EC: 49 00
000006ED: 26 00
000006F1: 00 FF
000006F2: 49 00
000006F3: 26 00
Code: Select all
Comparing files busted.bin and FVR_TECH_DEMO.BIN
00000325: 00 FF
00000326: 7F 00
00000327: 6C 1E
00000901: 00 FF
00000902: 7F 00
00000903: 4E 00
00000937: 00 FF
00000938: 7F 00
00000939: 4F 01
0000096D: 00 FF
0000096E: 7F 00
0000096F: 50 02
00000973: 00 FF
00000974: 7F 00
00000975: 51 03
00000979: 00 FF
0000097A: 7F 00
0000097B: 52 04
But I could build the other sozo examples, and even the Fvr technical demo.