Jump to content

Photo

c99 - getting started?


78 replies to this topic

#1 unhuman OFFLINE  

unhuman

    Stargunner

  • 1,227 posts
  • Location:Vienna, VA

Posted Thu Apr 29, 2010 1:20 PM

Ok - until I get Forth and decide that's the way I'm gonna go, I want to move beyond XB. So, the choice seems to be c99, but I can't find any details on it...

Anyone have good links / tutorials / etc?

Thanks - Howie

#2 Opry99er OFFLINE  

Opry99er

    Quadrunner

  • 10,733 posts
  • Location:Hustisford, WI

Posted Thu Apr 29, 2010 1:42 PM

If you want, I can email you a copy of Forth that you can start with. :) Its the same as Marks but for a few syntax points... You can start working through the book you bought. :) I know there are a TON of excellent assembly tutorials out there too, thanks to Matthew, Filip, Bruce Harrison, and many others.

#3 unhuman OFFLINE  

unhuman

    Stargunner

  • Topic Starter
  • 1,227 posts
  • Location:Vienna, VA

Posted Thu Apr 29, 2010 1:58 PM

If you want, I can email you a copy of Forth that you can start with. :) Its the same as Marks but for a few syntax points... You can start working through the book you bought. :) I know there are a TON of excellent assembly tutorials out there too, thanks to Matthew, Filip, Bruce Harrison, and many others.


Yeah - well - I don't think I'm too interested in learning assembly on the TMS9900... I think that the effort -> reward would be way too small. c99 would likely be my best bet, but the Forth stuff is fine too.

But, I do need to finish my new game first anyway... Just trying to have the info I'd need all lined up.

#4 Opry99er OFFLINE  

Opry99er

    Quadrunner

  • 10,733 posts
  • Location:Hustisford, WI

Posted Thu Apr 29, 2010 2:05 PM

Well, when you want it, send me your mail address.... I'll email you Forth and the reference guide for it. Also, have you played "Honeycomb Rapture?" It's pretty fast for an XB game and it's got some cool assembly music support with it. You can DL it from the TI Gameshelf or from my site. :)

#5 Tursi OFFLINE  

Tursi

    Quadrunner

  • 5,638 posts
  • HarmlessLion
  • Location:BUR

Posted Thu Apr 29, 2010 3:55 PM

I can't get super specific with C99 these days since I don't think I have all the disks anymore (though I'm sure they are online). I did several games with it, though. It's a fairly limited dialect of C and the code it produces is not very efficient -- but it does work.

The basic process is first to write your program using the editor of your choice (normally Editor/Assembler, but it doesn't matter). Next, you run C99C in Editor/Assembler, and give it the input and output filenames - this compiles the code into assembly. Finally, run the Assembler to assemble the code into an object file.

To run, load the object file, CSUP (which is the C library), any other libraries you need, and I believe START is the program name.

You can use the Editor/Assembler image creation tool SAVE with C99 programs.. to do that, load C99PFI as the first modules, and C99PFF as the last one. After that, load SAVE and run it. The program must fit in the 24k bank to work this way.

C99 programs used to require the Editor/Assembler cart be loaded, and would hang otherwise. I don't remember if later runtimes fixed that. I tended to use my own startup code which bypassed the copy from GROM and manually loaded the E/A utilities into the load bank by making it one of the program images. That probably isn't going to be a concern when you are starting out.

Also... C99 programs will not run on a cartridge-only system, they require the 32k (because the stack is hard coded into the low memory bank). There are no switches to change that behaviour.

Feel free to ask questions, and if someone more useful doesn't pop up I can try to remember. ;)

#6 Gary from OPA OFFLINE  

Gary from OPA

    Moonsweeper

  • 420 posts
  • Location:The World Wide Web

Posted Thu Apr 29, 2010 4:03 PM

Ok - until I get Forth and decide that's the way I'm gonna go, I want to move beyond XB. So, the choice seems to be c99, but I can't find any details on it...

Anyone have good links / tutorials / etc?

Thanks - Howie


c99 is wonderful to use, it was written and designed by "Clint Pulley", and I used to enjoy chating with him once a month at the local Hamilton TI user group meetings, which were just a short drive from my neck of the woods in Canada.

Some good info on the man himself: http://www.ti99hof.o...ClintPulley.htm

c99 is better used on the Geneve, because of the memory limits on the TI99, but it is still possible to write some good programs, with the compliers, etc. that have been written for the TI.

Good starting point, all the releases, programs: ftp://ftp.whtech.com/programming/c99/

I remember "TI Lander" was neat game written in c99, and I sure there is others.

Good luck with your learning of this wonderful lang. for the TI99 system.

#7 unhuman OFFLINE  

unhuman

    Stargunner

  • Topic Starter
  • 1,227 posts
  • Location:Vienna, VA

Posted Thu Apr 29, 2010 4:26 PM

I'm actually quite fond of my current development environment - editing in a real editor and pasting into the TI (Classic99). I had forgotten how god awful line editing was... How much easier it is to develop when you can actually see a fairly large amount of code.... I don't think I would've had the success with Inaccurate Invaders on the console. Seeing all 29 lines of code without line wrap versus 4 or 5 wrapped up to horror is just such a better situation.

If c99 requires 32K expansion, I don't think that's ideal, but I'll figure it all out.

Thanks guys!

Edited by unhuman, Thu Apr 29, 2010 4:26 PM.


#8 Opry99er OFFLINE  

Opry99er

    Quadrunner

  • 10,733 posts
  • Location:Hustisford, WI

Posted Thu Apr 29, 2010 5:49 PM

I'm with ya on one point... I coded Lemonade Stand on real gear with a RAMDisk. I coded Honeycomb Rapture using a text editor and Classic99. I have honestly NEVER played Honeycomb on the real TI. I hope it plays well. :). Developing Honeycomb was much easier and faster, but I actually feel like I cheated... I'm stuck now working in emulation because of all the wonderful tools we have on the PC. However, from this point forward, any game I develop will be a hybrid of hardware and emulation in the development stage. Nothing feels as good as when you can load up a program off a RAMDisk and edit it in it's native environment!!! I agree, text editors are awesome... But I cannot ever forget how rewarding it is to program in the real environment. It's most certainly the most satisfying kind of work, in my opinion. Now, on topic::

Jacques Groslouis wrote an amazing C99 game called C99 games. It's basically a track and field gem!!! If I had the inclination to learn a new language, it would be C99.... But since I'm ALWAYS learning in XB and I have started to really enjoy programming in Wycove Forth 3.0, I don't see C99 in the cards for me--- at least for the time being.

On a very cool note, you can write a game in console BASIC, use Harry Wilhelm's compiler, and have an assembly program, no problems. It's a brilliant compiler that works perfectly on BASIC code... Not so much for XB. Write a BASIC game, compile it into machine code, run it, and adjust the BASIC program for speed... It can run up to 50x faster once compiled, so you will probably have to slow down your program quite a bit. Anyway, I made a speed test video and put it on YouTube of BASIC vs. the compiler. SMOKING FAST man!!!! You can't use SPRITEs like you can in XB, but any BASIC program will compile. :)

#9 unhuman OFFLINE  

unhuman

    Stargunner

  • Topic Starter
  • 1,227 posts
  • Location:Vienna, VA

Posted Thu Apr 29, 2010 7:29 PM

Oh my... That might be interesting... it just might....

Now just gotta find out how to use it... after I finish my other game...

-H

I'm with ya on one point... I coded Lemonade Stand on real gear with a RAMDisk. I coded Honeycomb Rapture using a text editor and Classic99. I have honestly NEVER played Honeycomb on the real TI. I hope it plays well. :). Developing Honeycomb was much easier and faster, but I actually feel like I cheated... I'm stuck now working in emulation because of all the wonderful tools we have on the PC. However, from this point forward, any game I develop will be a hybrid of hardware and emulation in the development stage. Nothing feels as good as when you can load up a program off a RAMDisk and edit it in it's native environment!!! I agree, text editors are awesome... But I cannot ever forget how rewarding it is to program in the real environment. It's most certainly the most satisfying kind of work, in my opinion. Now, on topic::

Jacques Groslouis wrote an amazing C99 game called C99 games. It's basically a track and field gem!!! If I had the inclination to learn a new language, it would be C99.... But since I'm ALWAYS learning in XB and I have started to really enjoy programming in Wycove Forth 3.0, I don't see C99 in the cards for me--- at least for the time being.

On a very cool note, you can write a game in console BASIC, use Harry Wilhelm's compiler, and have an assembly program, no problems. It's a brilliant compiler that works perfectly on BASIC code... Not so much for XB. Write a BASIC game, compile it into machine code, run it, and adjust the BASIC program for speed... It can run up to 50x faster once compiled, so you will probably have to slow down your program quite a bit. Anyway, I made a speed test video and put it on YouTube of BASIC vs. the compiler. SMOKING FAST man!!!! You can't use SPRITEs like you can in XB, but any BASIC program will compile. :)



#10 Opry99er OFFLINE  

Opry99er

    Quadrunner

  • 10,733 posts
  • Location:Hustisford, WI

Posted Thu Apr 29, 2010 8:06 PM

Wilhelm's compiler is EEEEASY to use... 3 easy and fully documented steps to glory. :). I might do a BASIC game just to show how great the compiler is. :)

#11 Vorticon OFFLINE  

Vorticon

    River Patroller

  • 3,726 posts
  • Location:Eagan, MN, USA

Posted Thu Apr 29, 2010 8:38 PM

I have used c99 extensively in the past, and it does work great. It has a lot of libraries available that let you accomplish pretty much anything you want including speech. The down side is that it is a small subset of C, and memory is a problem for larger projects because compilation is not terribly efficient.

Nonetheless, it is an excellent alternative to assembly and certainly a heck of a lot easier to master. Go for it.

#12 Opry99er OFFLINE  

Opry99er

    Quadrunner

  • 10,733 posts
  • Location:Hustisford, WI

Posted Thu Apr 29, 2010 8:51 PM

Walid, is there a dedicated site for C99 programming? Possibly a place to get all the docs and disks needed to work in C99?

#13 Tursi OFFLINE  

Tursi

    Quadrunner

  • 5,638 posts
  • HarmlessLion
  • Location:BUR

Posted Thu Apr 29, 2010 11:22 PM

My own c99 games are Super Space Acer, Super Sled Acer, and Waterville Rescue:
http://www.harmlessl.../onesoft.cgi?64
http://www.harmlessl.../onesoft.cgi?28
http://www.harmlessl.../onesoft.cgi?67

There's source, but they are very badly written. I've ported Space Acer and Waterville Rescue to the ColecoVision, and will be porting Space Acer back to the TI when I'm done improving it (though I need a new compiler.. ;) )

#14 retroclouds OFFLINE  

retroclouds

    Stargunner

  • 1,698 posts
  • Location:Germany

Posted Thu Apr 29, 2010 11:39 PM

Walid, is there a dedicated site for C99 programming? Possibly a place to get all the docs and disks needed to work in C99?


I think it would be a great idea to add C99 to the Development resources thread ;)

For those who don't program on the TI-99/4A directly (or emulator). There is also an (old) cross-compiler version for running on the PC, available on whtech.
I believe that Fred Kaal has programmed most of his disk utilities using this cross-compiler and a custom loader.

Anyway, I'll look at my notes and add C99 to the development resources thread. If anyone has URL's/resources to share concerning C99 then please contact me and I can add it to the mentioned thread :)

On a sidenote, I've checked in making SPECTRA compatible with C99 and that certainly looks doable.
The main issue is that SPECTRA uses another register as stack pointer and the stack itself grows in the wrong direction, but that would be quite easily to fix in a new version. The reason I would make SPECTRA compatible with C99 is that it
would be possible to do a cartridge only game (256 scratch-pad memory). Ofcourse you would also have to fiddle with the C99 library itself, but should be doable.

I got myself the "a small C compiler book", which not only explains small C, but also explains the inner workings of the compiler. Even though not directly TI-99/4A related a very interesting read (haven't found this book in an online version).

#15 Vorticon OFFLINE  

Vorticon

    River Patroller

  • 3,726 posts
  • Location:Eagan, MN, USA

Posted Fri Apr 30, 2010 6:51 AM

Walid, is there a dedicated site for C99 programming? Possibly a place to get all the docs and disks needed to work in C99?


Send me your snail mail address and I will get you copies of all my disks and documentation including a nice tutorial.

#16 Opry99er OFFLINE  

Opry99er

    Quadrunner

  • 10,733 posts
  • Location:Hustisford, WI

Posted Fri Apr 30, 2010 7:18 AM

Wow, thanks!! I can help Filip put all this info on the development thread here as well. I think unHUman will probably get started before I do on C99 programming, although I would still love to learn it and have the disks myself... It would do me alot better to have digital versions of these disks... Just because I don't always have access to my gear... I know it's not "pure", but it's convenient and it allows me to program more. Thank you for the offer, Walid. :) If you have digital copies of this stuff--- I would love to have it!! If not, I would be willing to digitize the disks and make them available on the development resources thread of this forum. :)

#17 The Codex OFFLINE  

The Codex

    Dragonstomper

  • 573 posts
  • Location:Richmond, VA

Posted Fri Apr 30, 2010 7:59 AM

Not having done much with Small C, I can't vouch for the quality or content of this free book, but here's a link for those who are interested:

http://rapidshare.co...-C_Compiler.rar

#18 Vorticon OFFLINE  

Vorticon

    River Patroller

  • 3,726 posts
  • Location:Eagan, MN, USA

Posted Fri Apr 30, 2010 10:35 AM

Wow, thanks!! I can help Filip put all this info on the development thread here as well. I think unHUman will probably get started before I do on C99 programming, although I would still love to learn it and have the disks myself... It would do me alot better to have digital versions of these disks... Just because I don't always have access to my gear... I know it's not "pure", but it's convenient and it allows me to program more. Thank you for the offer, Walid. :) If you have digital copies of this stuff--- I would love to have it!! If not, I would be willing to digitize the disks and make them available on the development resources thread of this forum. :)


I only have them in hard format. I could convert them but it may take a little time.

#19 Opry99er OFFLINE  

Opry99er

    Quadrunner

  • 10,733 posts
  • Location:Hustisford, WI

Posted Fri Apr 30, 2010 10:50 AM

Is it more than just a transfer that needs to be done? Transfer is about the extent of my ability on this kind of thing..... Some of these diskettes had some sector issues--- such as the Asgard ToD editor that won't run on Classic99 because of the sector access format of the program. I believe, though, that the reason for this is that this specific program edits hex values, it used sector access--- If C99 isn't a read/write by sector type deal, then a transfer shouldn't be anything out of the ordinary... Yea, if you get some time, I'd love a digital copy!!! If not, I would be happy to transfer them... However I only have rs232 MFM capabilities.... No drives on my PC yet. Anyway, whatever works best for you Walid. I just want to get this info onto the development resources thread of our Atariage forum so we can start doing work. :). Thanks again buddy.

#20 retroclouds OFFLINE  

retroclouds

    Stargunner

  • 1,698 posts
  • Location:Germany

Posted Fri Apr 30, 2010 11:18 AM

Not having done much with Small C, I can't vouch for the quality or content of this free book, but here's a link for those who are interested:

http://rapidshare.co...-C_Compiler.rar


Thanks for pointing this out codex! This is the online version of the Small C Compiler book I mentioned earlier.
I looked for the online version for a long time, but didn't get lucky.

This is good stuff! :thumbsup: :thumbsup: :thumbsup:

Edited by retroclouds, Fri Apr 30, 2010 11:19 AM.


#21 The Codex OFFLINE  

The Codex

    Dragonstomper

  • 573 posts
  • Location:Richmond, VA

Posted Fri Apr 30, 2010 11:33 AM

Cool, so it is the same book. Glad to help! I'll check it out myself at home, sounds fascinating from what you posted about it Filip. Cheers!

#22 retroclouds OFFLINE  

retroclouds

    Stargunner

  • 1,698 posts
  • Location:Germany

Posted Sat May 1, 2010 4:38 AM

I contacted Fred (TI99Dir programmer) and asked for some advice on this topic. I think he's currently the one in
the TI community who has the most C99 knowledge. He also has written some tools for optimizing the output of the C99 compiler.
So perhaps he can chime in on this topic.

#23 Vorticon OFFLINE  

Vorticon

    River Patroller

  • 3,726 posts
  • Location:Eagan, MN, USA

Posted Sat May 1, 2010 6:40 AM

Is it more than just a transfer that needs to be done? Transfer is about the extent of my ability on this kind of thing..... Some of these diskettes had some sector issues--- such as the Asgard ToD editor that won't run on Classic99 because of the sector access format of the program. I believe, though, that the reason for this is that this specific program edits hex values, it used sector access--- If C99 isn't a read/write by sector type deal, then a transfer shouldn't be anything out of the ordinary... Yea, if you get some time, I'd love a digital copy!!! If not, I would be happy to transfer them... However I only have rs232 MFM capabilities.... No drives on my PC yet. Anyway, whatever works best for you Walid. I just want to get this info onto the development resources thread of our Atariage forum so we can start doing work. :). Thanks again buddy.


I'll work on it this week :) This is probably the best way to make these disks available to all.

#24 Vorticon OFFLINE  

Vorticon

    River Patroller

  • 3,726 posts
  • Location:Eagan, MN, USA

Posted Sun May 2, 2010 10:00 PM

Walid, is there a dedicated site for C99 programming? Possibly a place to get all the docs and disks needed to work in C99?


Owen, I'm working on getting my c99 library converted. However, I have attached to this message Vern Jensen's excellent c99 tutorial as well as its associated starter kit. Both are zipped. The tutorial is in doc format and the kit is in TI native format. This is what I used to get started with c99 and I went from there. My disks have many additional libraries for sound, speech, half-bit graphics mode, math etc... which will greatly enhance c99's capabilities as well as a c99 optimizer which will help alleviate the compiler's inefficient output code. I'll post those here when I am done with the conversion. Filip, you may want to add these resources to your programming resources thread on this forum.

Attached Files



#25 Vorticon OFFLINE  

Vorticon

    River Patroller

  • 3,726 posts
  • Location:Eagan, MN, USA

Posted Sun May 2, 2010 10:03 PM

Walid, is there a dedicated site for C99 programming? Possibly a place to get all the docs and disks needed to work in C99?


Owen, I'm working on getting my c99 library converted. However, I have attached to this message Vern Jensen's excellent c99 tutorial as well as its associated starter kit. Both are zipped. The tutorial is in doc format and the kit is in TI native format. This is what I used to get started with c99 and I went from there. My disks have many additional libraries for sound, speech, half-bit graphics mode, math etc... which will greatly enhance c99's capabilities as well as a c99 optimizer which will help alleviate the compiler's inefficient output code. I'll post those here when I am done with the conversion. Filip, you may want to add these resources to your programming resources thread on this forum.


I should also mention that Jacques Groslouis is a huge resource when it comes to c99.




0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users