+DZ-Jay Posted January 30, 2019 Share Posted January 30, 2019 CP1600 support is still in the plans. I personally never abandoned C as my original goal was to get C# working not C for CP1600. All for a C compiler but C is just portable assembly for me. Because of the conversations with @intvnut and looking into all the issues people have with re-targeting C to run on a custom 16bit CPUs made with FPGAs or the CP1600 I think a new lang will solve portability issues across Intellivision, Atari 8-bit, Nintendo, etc and be useful on modern PCs as well. This new lang will be called "Ez" and you will get the same performance (if not better) as you would with C. So ... is it a new language or is it C? Quote Link to comment Share on other sites More sharing options...
zezba9000 Posted January 30, 2019 Author Share Posted January 30, 2019 So ... is it a new language or is it C? A new lang. Quote Link to comment Share on other sites More sharing options...
+DZ-Jay Posted January 30, 2019 Share Posted January 30, 2019 OK. So your actual response to artrag is that you have given up on a C compiler for the Intellivision and will focus instead in a C-ish language. Quote Link to comment Share on other sites More sharing options...
zezba9000 Posted January 30, 2019 Author Share Posted January 30, 2019 OK. So your actual response to artrag is that you have given up on a C compiler for the Intellivision and will focus instead in a C-ish language. Well not really as I never had a C focus @intvnut did. I just wanted to use C as a target assembler for a different lang to output to and so was just helping investigate C as I could make use of it as a portable assembly lang. Quote Link to comment Share on other sites More sharing options...
artrag Posted January 30, 2019 Share Posted January 30, 2019 I do not see how a new language will guarantee portability, C was interesting just for this reason. It allows to reuse millions of algorithms and lines of code on the net, but it is your project so do not care about me. Quote Link to comment Share on other sites More sharing options...
artrag Posted January 30, 2019 Share Posted January 30, 2019 (edited) . Edited January 30, 2019 by artrag Quote Link to comment Share on other sites More sharing options...
zezba9000 Posted January 30, 2019 Author Share Posted January 30, 2019 (edited) I do not see how a new language will guarantee portability, C was interesting just for this reason. It allows to reuse millions of algorithms and lines of code on the net, but it is your project so do not care about me. If C is wanted seems like making a new simple one might be a solution. One thats built with a plugin system for making it easy to re-target. C for me personally is only useful as a portable assembly as its just not good for the majority of my projects and or work. Edited January 30, 2019 by zezba9000 Quote Link to comment Share on other sites More sharing options...
carlsson Posted January 30, 2019 Share Posted January 30, 2019 I kind of like the idea of a new language that borrows some of the best constructs from other languages, and supposedly can use existing compilers for partial code generation. It will require people to think when they try to implement old code, just like I posted earlier in this thread why I have reservations of a C compiler for a target which may have built in restrictions (and was questioned for my standpoint). Quote Link to comment Share on other sites More sharing options...
zezba9000 Posted January 30, 2019 Author Share Posted January 30, 2019 (edited) I kind of like the idea of a new language that borrows some of the best constructs from other languages, and supposedly can use existing compilers for partial code generation. It will require people to think when they try to implement old code, just like I posted earlier in this thread why I have reservations of a C compiler for a target which may have built in restrictions (and was questioned for my standpoint). I can post some of the initial syntax concepts thus far if interested later today after work. Keep in mind some syntax stuff may change. Edited January 30, 2019 by zezba9000 Quote Link to comment Share on other sites More sharing options...
ppelleti Posted April 3, 2019 Share Posted April 3, 2019 My GCC port is based on GCC 7.2, so it's reasonably fresh. I doubt many of the enhancements in 8.x and 9.x will benefit the Intellivision greatly. If someone with serious dev chops wants to help me get a baseline release over the line, I can check in what I have and arrange for SVN access. Perhaps having a second set of eyes on the project would help draw some of my focus to getting it done. I know having Steve Orth on LTO Flash! was a huge help getting that over the line and shipped. I would love to have a C compiler for the Intellivision, but I only have so many hours in the day, and I keep letting myself get distracted. :-P I would love a C compiler, too, and I'd be happy to help, although I don't know if my chops are "serious" when it comes to compilers. I took one semester on compilers way back in college, but more recently when I looked into writing an LLVM backend, I got intimidated and gave up. Do you still need a program to convert ELF to bin+cfg? I could probably do that. Do you have an example ELF file produced by your binutils port that I could look at? 1 Quote Link to comment Share on other sites More sharing options...
zezba9000 Posted April 5, 2019 Author Share Posted April 5, 2019 I would love a C compiler, too, and I'd be happy to help, although I don't know if my chops are "serious" when it comes to compilers. I took one semester on compilers way back in college, but more recently when I looked into writing an LLVM backend, I got intimidated and gave up. Do you still need a program to convert ELF to bin+cfg? I could probably do that. Do you have an example ELF file produced by your binutils port that I could look at? C would be awesome. However just an alternative update I've been hard at work on: https://github.com/reignstudios/IL2X Been making some good progress on getting C# => C89 super optimized. I now have the fastest .NET runtime. I get even faster performance results than C++ using modern compilers for some stuff. Much of the work learned here will go into a project called CS2X more suited for compiling a C# subset into CP1610 assembly. 1 Quote Link to comment Share on other sites More sharing options...
zezba9000 Posted May 3, 2019 Author Share Posted May 3, 2019 Can't remember if this was mentioned but PCC might be portable enough: https://github.com/IanHarvey/pcc Quote Link to comment Share on other sites More sharing options...
intvnut Posted May 3, 2019 Share Posted May 3, 2019 Can't remember if this was mentioned but PCC might be portable enough: https://github.com/IanHarvey/pcc I've tried compiling PCC a few times for its already-supported platforms. I never got it to produce anything but a coredump, across several versions. Clearly I'm Doing It Wrong™, but that really turned me off to PCC. 1 Quote Link to comment Share on other sites More sharing options...
zezba9000 Posted June 5, 2019 Author Share Posted June 5, 2019 (edited) Been doing some good work on my CS2X transpiler: https://github.com/reignstudios/CS2X Here is a demo of C# => C89 => WASM: http://reign-studios.com/wasm/cs2x/ray-trace-benchmark/cs2x.html After I get C89 complete I will later add a C# => "CPU agnostic Byte-Code" that will be designed to make it easy to target assembly langs such as the CP1610. The byte-code will have a C# API to make it super easy for anyone to just take it and convert it to any assembly lang with minimal effort (that will be the goal). When I get to that point it will be much easier to collaborate and get Intellivision support working is my thinking. Edited June 5, 2019 by zezba9000 1 Quote Link to comment Share on other sites More sharing options...
zezba9000 Posted June 7, 2019 Author Share Posted June 7, 2019 (edited) @intvnut LLVM IR supports any bit on integer types: https://llvm.org/docs/BitCodeFormat.html Which means I can add support for LLVM directly and then we can do a backend for LLVM IR => CP1610 asm. I will look more into this approach when I get into supporting a byte-code. This should allow for very optimized assembly. Edited June 7, 2019 by zezba9000 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.