• Rise from your gwave!

Languages

Discussion in 'Saturn Dev' started by Cloud121, Jan 19, 2002.

  1. Cloud121

    Cloud121 Member

    Is C the standard language for developing Sega games? I know you use C for Saturn, how about Pascal? Will Pascal work on Saturn? DC? Genny and it's add-ons? and SMS? How about Visual Basic?

    (Edited by Cloud121 at 4:59 pm on Jan. 19, 2002)
     
  2. IceDigger

    IceDigger Founder Staff Member

    you better start running, before I hurt you.
     
  3. Cloud121

    Cloud121 Member

    What did I do?

    If it's about the questions, sorry to bombard you with so much. I just want to know. I have some knowledge of VB, a tiny bit of Pascal. I want to know if I can just continue with those (Gotta LONG way to go though, before I can even remotely think about Sega programming), or if I have to learn more stuff (I plan to learn C after Pascal).

    (Edited by Cloud121 at 6:47 pm on Jan. 19, 2002)
     
  4. ExCyber

    ExCyber Staff Member

    Given a reasonably powerful system, the hardware doesn't care what lanugage you're writing in. You could program Saturn with Brainfuck or INTERCAL, *if* someone were to write the appropriate compilers/interpreters (and if you were sufficiently intelligent and/or masochistic). In terms of tools that exist right now, I'm only aware of assemblers, and compilers for C and C++. There's also a BASIC interpreter or compiler, but I've never actually seen it. It might be possible to use GCC to compile Fortran, Objective C, and maybe Java, but that would probably take a substantial amount of work to get running.

    edit: as for the others, C is the best bet for Dreamcast, and assembly language for everything else. There's a C compiler for Genesis, but I've never tried it.

    (Edited by ExCyber at 10:15 pm on Jan. 19, 2002)

    (Edited by ExCyber at 10:16 pm on Jan. 19, 2002)
     
  5. TakaIsSilly

    TakaIsSilly New Member

    The BASIC that the interpreter program for Saturn uses is actually quite simmilar to INTERCAL :p
     
  6. RadSil

    RadSil New Member

    My God. "Turing-complete." But the real question is: why? :)

    If you're interested in programming the SMS in C, you could use the Small Device C Compiler, but you'll have to cobble together your own libraries, functions, and startup code. It generates pretty decent code (I'm no judge, I don't really know Z80 too well) and lets you embed assembly if you need to. Maybe I could do a machine port for SMS... that would be cool. Oh well, I'll never get around to it. :(

    (Edited by RadSil at 6:07 pm on Jan. 22, 2002)
     
  7. ExCyber

    ExCyber Staff Member

    Apparently, to write the Smallest Compiler Ever. In any case, I mentioned BF and INTERCAL just to drive home the point that the hardware doesn't really care how absurd a language is :).
     
  8. Cloud121

    Cloud121 Member

    So... What you guys are basically saying... is that I can make games in Pascal or anything else? #### YEAH!!! It'd probably be easier to do it in C though (although I gotta learn Pascal first, or else C is gonna be tougher than #### to learn (or so my good friend Pedro says, Programmer Extraordinaire in Pascal, C, and Java :))) is C more universal than Pascal? Or can I use Pascal is program ANYTHING?

    (Edited by Cloud121 at 9:03 pm on Jan. 22, 2002)
     
  9. mal

    mal Member

    Why don't you ask Pedro?
     
  10. ExCyber

    ExCyber Staff Member

    I think you misread something.

    As far as I know, there are no SuperH-targeted Pascal compilers. Unless you can find (or write) one, you'll have nothing to compile your Saturn programs with.

    As for a "universal" language in terms of existing support, C is the closest thing you're going to get, but it's not available for 100% of systems either.

    edit: By the way, C itself is not really that complex. However, learning Pascal might be worth the effort anyway for other reasons.

    (Edited by ExCyber at 9:02 pm on Jan. 22, 2002)
     
  11. Cloud121

    Cloud121 Member

    Is there a SuperH C Compiler for Mac? I found a C Compiler (Apple's Macintosh Programmers Workshop [​IMG]), but do I need an SH compiler as well? Or will just any compiler do the trick? What does the SuperH Compiler do?
     
  12. Cloud121

    Cloud121 Member

    Shutup Skank! I'm just starting to learn how to program. I know I'll need a deep understanding of C to program for Saturn, I just wanna get all the stuff I need now.

    BTW, I maintain a B average in Math.
     
  13. antime

    antime Extra Hard Mid Boss

    What you need is GCC configured as a SH cross-compiler (ie. a compiler that runs on your Mac and produces SH code). However, unless you're running OSX I don't think you can really run GCC as it doesn't support older Macs. I briefly browsed the web and could only find an ancient port of GCC 1.3something which probably won't do you much good.

    If you have a beefy machine you could always try running one of them DOS/Windows emulators and run Sega's compiler under that. But really, Macs aren't your ideal coding platform. (And even if you did get a compiler running, how are you going to test the code? By burning a CD each time? The Commlink is an ISA card and AFAIK there's no Mac alternative.)
     
  14. Cloud121

    Cloud121 Member

    Well... looks like I'll need to use a PC for Saturn, DC, and Sega CD (CD is doubtful though). I'll do 32x and Genny on my Mac (don' have to worry about harddrive space then). Are there any special compilers I need for Genny and 32x? If so.. they available for Mac?
     
  15. racketboy

    racketboy Member

    C is probably your best bet when it comes to finding a compiler. It's a very common language.

    A lot of the best games are written in Assembly language which is pretty machine specific, but at the same time, very powerful if you know how to use it.

    I wish you the best -- but don't waste your time looking for Pascal compilers
     
  16. antime

    antime Extra Hard Mid Boss

    You might be able to use old Mac compilers for the Megadrive and MegaCD, since they're all using CPUs from Motorola's M86k family. You'd have to be able to use your own link scripts and startup code, since a Mac is quite different from a MD.

    The 32X uses the same model SH2 CPUs as the Saturn, so you'll have to use GCC for that. I honestly think you'll be better off by abandoning the idea of using a Mac for coding for anything else than Macs. All of the old code tools are for either DOS or Windows meaning you'll have to make replacement tools as well. So unless you're using OSX, I suggest you forget about it.
     
  17. kyuusaku

    kyuusaku New Member

    do not even try high level languages with genesis (32x) or SMS (thats rediculous, do you want your game to run like a sh1t famicom pirate original?)
     
  18. antime

    antime Extra Hard Mid Boss

    For the SMS, sure. From what I've heard the currently available C compilers that target the Z80 aren't so good. But for the Megadrive using a HLL makes more sense than forcing yourself to use assembly out of principle.

    If you've properly optimized your program, profiled it and identified the trouble spots then by all means convert them to assembly, but trying to get a faster program by reimplementing bad C code in equally bad assembly isn't going to do you much good.
     
  19. ExCyber

    ExCyber Staff Member

    This is true, but C doesn't offer a huge advantage on platforms like SMS and MD unless you're trying to write portable code (which opens up a whole other can of worms). Since the hardware handles the details of pixel blasting and sound, the benefits of using prewritten libraries are kind of diminished - no matter what you do, you still need to deal with that hardware's programming model to get anything useful out of the system. That's why I recommend assembly language for MD and SMS, not for performance.
     

Share This Page