Jump to content
IGNORED

UNIX/sdcc vs. CPM/Hi-Tech, Libraries?


ChocolateCake

Recommended Posts

Hello! I was recently reunited with my beloved ColecoVision after over 20 years! (My first computer was an Apple IIe and I have not owned another console since the CV.) Perhaps it is just nostalgia, but I find that most of the CV games are quite playable as opposed to the majority of 2600 games which are too primitive. The console seems to have a certain magic to it and some of the ports; the Centipede port in particular, lead me to believe that the majority of games did not fully exploit the capabilities of the system. To be honest, some of the ports are poor.

 

I work as a software developer in UNIX environment so I would like to use Cygwin/sdcc for development, but realize that most development is done with CP/M emulator and Hi-Tech compiler. The youtube video states that the Gui ide for hi-tech compiler will not work under vista, and as my laptop is vista/cygwin (have decided against dual boot), i am leaning towards sdcc. I would like to be able to tinker with a CV game whereever I am.

 

However, there does not seem to be as much documentation for sdcc and its linux libs. The cpm libs used by hitech seem better documented.

 

1) If I move ahead with cygwin/sdcc, will I be shooting myself in the foot and wish I had gone with hitech? Any known limitations?

 

2) Will hi-tech/CPM ide work on vista?

 

3) Do any of the emulators run under linux/cygwin?

 

4) What is best emulator that gives high chance of working on CV eprom?

 

5) Do most guys developing scrollers code in z80 assmbly?

 

I've got an idea for an R-Type shooter with horizontal scrolling. Most CV titles are single screen maze/puzzle games.

 

I have already skimmed benvienues c-language docs, the CV bios descriptions. Havent read the sdcc c-library stuff yet DB seems to have coded quite a few utilities for sound, sprite/character development, its not clear if equivalents exists for the sdcc stuff. Advice apprecited.

 

Thanks,

-CC

Link to comment
Share on other sites

2) Will hi-tech/CPM ide work on vista?
The reason why the free Hitech C compiler for CP/M doesn't work under Vista is because the CP/M emulator for DOS named 22NICE is a 16bit application which is no longer supported by Windows Vista. Because of that, the GUI named CCI that simply create batch files to run in a DOS window and try running the 22NICE program just give an error message about 16bit application not compatible with Vista.

 

But, I was able to use 22NICE under DOSBOX by doing my own batch files rather than using CCI... it's not the perfect solution but Vista is just making thing just even worst, and not only because of the compiler... the tools programmed in VisualBasic 5 and 6 need a DLL that is no longer already installed with Windows, and even if you download the missing DLL, the application may not look like what it supposed to be, specially the graphic tools.

 

Someone did try VirtualPC to "switch to XP" to run programs and it seems to be a working solution for him.

Link to comment
Share on other sites

2) Will hi-tech/CPM ide work on vista?
The reason why the free Hitech C compiler for CP/M doesn't work under Vista is because the CP/M emulator for DOS named 22NICE is a 16bit application which is no longer supported by Windows Vista. Because of that, the GUI named CCI that simply create batch files to run in a DOS window and try running the 22NICE program just give an error message about 16bit application not compatible with Vista.

 

But, I was able to use 22NICE under DOSBOX by doing my own batch files rather than using CCI... it's not the perfect solution but Vista is just making thing just even worst, and not only because of the compiler... the tools programmed in VisualBasic 5 and 6 need a DLL that is no longer already installed with Windows, and even if you download the missing DLL, the application may not look like what it supposed to be, specially the graphic tools.

 

Someone did try VirtualPC to "switch to XP" to run programs and it seems to be a working solution for him.

 

Oh, I see. Given that my notebook is vista, it seems the path of least resistance is to use Cygwin/sdcc. If that doesnt work out I can use your workarounds, the CP/M emulator, and maybe a virtual PC so I can use the old DLLs.

 

Thanks.

Edited by ChocolateCake
Link to comment
Share on other sites

To compile the minigames compilation, I did it on Vista with the cp/m emulator and compilator, I just didn't use the gui interface tu use only plain dos environment with dosbox.

 

And for the graphic utilities written in VisualBasic, they work on vista with the old dll, but do not display the same as it supposed to be, and I did see this in many applications, not only these, where graphic buttons are out of window limits, pictures are non proportional to the space they can use, etc.

 

But yes, you should use sdcc if you are a regular cygwin and vista user. You will enconter less problems and get more faster results.

 

And yes, each programming in C solutions don't use the same compiler, the same librairies, even the same tools... like all the programming in assembler solutions you may find.

 

Keep us informed about your coleco developments. Good luck in your projects!

Link to comment
Share on other sites

To compile the minigames compilation, I did it on Vista with the cp/m emulator and compilator, I just didn't use the gui interface tu use only plain dos environment with dosbox.

 

And for the graphic utilities written in VisualBasic, they work on vista with the old dll, but do not display the same as it supposed to be, and I did see this in many applications, not only these, where graphic buttons are out of window limits, pictures are non proportional to the space they can use, etc.

 

But yes, you should use sdcc if you are a regular cygwin and vista user. You will enconter less problems and get more faster results.

 

And yes, each programming in C solutions don't use the same compiler, the same librairies, even the same tools... like all the programming in assembler solutions you may find.

 

Keep us informed about your coleco developments. Good luck in your projects!

 

I have a high level design question. My idea is for a side scrolling "mining" type game where a ship flies through an asteroid belt and must shoot rocks out of his path. (Its really a maze game.) I think this will require more than 32 "sprites" and was wondering what is the functional difference between characters and sprites? I read in the documentation that the sprites offer some collision detection. Can a game have more than 32 "objects" -- IOW would I be able to maintain a data structure (maybe a 2d array) of characters that are used to draw the "maze" and detect collisions between them and player objects?

Link to comment
Share on other sites

Hello! I was recently reunited with my beloved ColecoVision after over 20 years! (My first computer was an Apple IIe and I have not owned another console since the CV.) Perhaps it is just nostalgia, but I find that most of the CV games are quite playable as opposed to the majority of 2600 games which are too primitive. The console seems to have a certain magic to it and some of the ports; the Centipede port in particular, lead me to believe that the majority of games did not fully exploit the capabilities of the system. To be honest, some of the ports are poor.

 

I work as a software developer in UNIX environment so I would like to use Cygwin/sdcc for development, but realize that most development is done with CP/M emulator and Hi-Tech compiler. The youtube video states that the Gui ide for hi-tech compiler will not work under vista, and as my laptop is vista/cygwin (have decided against dual boot), i am leaning towards sdcc. I would like to be able to tinker with a CV game whereever I am.

 

However, there does not seem to be as much documentation for sdcc and its linux libs. The cpm libs used by hitech seem better documented.

Well, there's rather long comments in the header files documenting each function and there are some sample programs that come with the libraries. Two short tutorials exist. However there's certainly more documention for the old Hi-Tech compiler.

1) If I move ahead with cygwin/sdcc, will I be shooting myself in the foot and wish I had gone with hitech? Any known limitations?

 

The libraries do not yet support the spinner wheel on the super action controller and the roller controller. I do not know of any other limitations. There are more tools and documentation for the HITECH-C approach. On the other hand there are some advantages to using sdcc over HITECH-C: It's still maintained and being improved, it generates better code and supports a larger subset of the C standard. sdcc and the tools for it are easy to use with standard unix tools such as make or sed.

 

2) Will hi-tech/CPM ide work on vista?

 

3) Do any of the emulators run under linux/cygwin?

xmess and Meka do. VColeco works with wine.

4) What is best emulator that gives high chance of working on CV eprom?

AFAIK Meka. However I suggest using multiple emulators for testing. I mostly use xmess, sometimes Meka, more rarely my own emulator or VColeco.

5) Do most guys developing scrollers code in z80 assmbly?

 

I've got an idea for an R-Type shooter with horizontal scrolling. Most CV titles are single screen maze/puzzle games.

 

I have already skimmed benvienues c-language docs, the CV bios descriptions. Havent read the sdcc c-library stuff yet DB seems to have coded quite a few utilities for sound, sprite/character development, its not clear if equivalents exists for the sdcc stuff. Advice apprecited.

There are some tools for use with sdcc. However they are command line utilitites, not GUI applications:

 

png2cv creates tile data from .png graphics

png2cvs creates sprite data from .png graphics

abc2cvm is for music, cvmtuning can be used when playing music using a tuning different from the common ISO and scientific tunings.

Then are some compression utilities, too.

There currently is no dedicated tool for sound creation.

 

Philipp

Link to comment
Share on other sites

Is there an easy-to-use download kit for setting up sdcc for CV programming?

I do not know of any.

I've seen some loose instructions, but they looked pretty complicated, IMHO. This was the beauty of the Hi-Tech solution, thanks to Daniel/Marcel.

The instructiuons at http://colecovision.eu/ColecoVision/develo...tutorial0.shtml should do, they might look a bit complicated due to the use of Cygwin when used with Windows, but it's not a problem for someone using sdcc on a Unix like GNU/Linux or at least familiar with Unix.

 

Philipp

Link to comment
Share on other sites

Warning : the following lines are blahblahblah...

 

Personnaly, I will not be surprized to see another programming kit emerging, maybe someone will do libraries for z88dk c cross-compiler for z80 based machines like ColecoVision, another one did a kind of basic language project but I had no news about it lately.

 

I know that pkk did improve sdcc z80 support which is good, and microsoft stoped 16bit support which is bad for the hitech kit. Even if an easy workaround is done for the hitech kit, it may result as buying the dos version and adapting all the libraries to the new format, which seems to not be possible because the version I tried didn't had the library maker support. Anyway, hitech for cp/m can be used if you find a way to run it on your system, cci and the other tools are there to make it easier to use for windows users, otherwise it's not necessary if you are not afraid of command-line environment. I know there is a hitech kit for BeOS, but I never tried it.

Link to comment
Share on other sites

Personnaly, I will not be surprized to see another programming kit emerging, maybe someone will do libraries for z88dk c cross-compiler for z80 based machines like ColecoVision, another one did a kind of basic language project but I had no news about it lately.

 

I know that pkk did improve sdcc z80 support which is good, and microsoft stoped 16bit support which is bad for the hitech kit. Even if an easy workaround is done for the hitech kit, it may result as buying the dos version and adapting all the libraries to the new format, which seems to not be possible because the version I tried didn't had the library maker support. Anyway, hitech for cp/m can be used if you find a way to run it on your system, cci and the other tools are there to make it easier to use for windows users, otherwise it's not necessary if you are not afraid of command-line environment. I know there is a hitech kit for BeOS, but I never tried it.

 

I don't think there will be that much diversity in C compilers used for ColecoVision development. Probably sdcc, HITECH-C 3.09 and maybe HITECH-C 7.80PL2 will be used:

For HITECH-C 3.09 there exist lots of tools and it's the compiler most people use.

sdcc and HITECH-C 7.80PL2 generate the best code.

 

Some time ago I compared three sdcc version, HITECH-C 7.80PL2, ADC 5.02 and z88dk 1.8. You can see the results in the table at the bottom of http://sdcc.wiki.sourceforge.net/Philipp%27s+TODO+list

 

We see that in terms of code size and standard C support sdcc and HITECH-C 7.80PL2 are the best compilers.

 

According to the compilers' websites sdcc and z88dk are free software. HITECH-C (HITECH-C 3.09 for CP/M is non-free freeware) and ADC 5.02 are nonfree, a HITECH-C 7.80PL2 license costs $295, an ADC 5.02 license costs $745.

 

Philipp

Link to comment
Share on other sites

Personnaly, I will not be surprized to see another programming kit emerging, maybe someone will do libraries for z88dk c cross-compiler for z80 based machines like ColecoVision, another one did a kind of basic language project but I had no news about it lately.

Actually, you did hear about it, only indirectly. ;) I'm talking about the CV sound editor project I want to do in Java (not these days because I'm so busy I can't even go to the gym on a regular basis - stupid crappy job...). I would like to design this sound editor so that it can be integrated into a larger IDE, which used to be the BasicVision project.

 

I say "used to be" because the idea evolved into something else in terms of programming language: I realized that a BASIC-like language wouldn't work on the CV because the generated code would contain too much invisible overhead that would eat up everything in a 32K cart and 1K of RAM. As I told Guy Foster when we met at his house last summer, my new take on this is to define a language that sits somewhere between assembly and C. To be exact, code written in this proposed language would be nearly as legible as C, but would allow direct access to Z80 registers and other low-level aspects of the CV hardware, in order to allow the programmer to write optimized code.

 

I'm not really sure what this new language will actually look like, and logically, I'll probably have to study Z80 assembly language to get a grip on what needs to be included in my language. The simplest way to get it done would be to do something along the lines of Batari Basic which, if I understand correctly, simply converts the user's BASIC-like code into Atari 2600 assembly language to be compiled by an external compiler. Likewise, my compiler would convert BasicVision code into Z80 assembly source code.

 

For now, I just want to concentrate on the CV sound editor, which is quite a big project in itself, even with the help of Daniel's CV sound playback Java code. :)

Link to comment
Share on other sites

Warning : some extra blahblahblah

 

Also, there is a BASIC called SmartBASIC for the Coleco Adam computer, and I remember that Dale Wick talked about a BASIC language with "inline" assembler coding support, something that did exist but not sure if it can produce games for the ColecoVision console.

 

Because Coleco Adam can run CP/M software, there was a group of developpers trying to make new softwares for this computer, even if the company did stop the support of it after only a few years. The progamming languages for cp/m are more than basic and C, there is also pascal which was used in the past to make ColecoVision games.

 

For music, some Coleco Adam users did use a tool to convert simple midi files into a kind of colecovision format to be used in their projects like the annual electronic Christmas cards made by AdamCon members and available as floppy disk images to be used with AdamEm emulator. Last year, I did a Christmas picture with my Jeepers Creepers title screen.

http://ann.hollowdreams.com/

Edited by newcoleco
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...