What languages does the DC support?

If you have any questions on programming, this is the place to ask them, whether you're a newbie or an experienced programmer. Discussion on programming in general is also welcome. We will help you with programming homework, but we will not do your work for you! Any porting requests must be made in Developmental Ideas.
Post Reply
iamscuzzo
DCEmu Newbie
DCEmu Newbie
Posts: 1
Joined: Mon Nov 03, 2008 4:46 pm
Has liked: 0
Been liked: 0

What languages does the DC support?

Post by iamscuzzo » Mon Nov 03, 2008 4:49 pm

Does anyone know if the DC can run python, lua, ruby or any other languages other than C? Thanks
Guaripolo
DCEmu Freak
DCEmu Freak
Posts: 89
Joined: Mon Jul 28, 2008 10:04 am
Has liked: 0
Been liked: 0

Re: What languages does the DC support?

Post by Guaripolo » Mon Nov 03, 2008 7:25 pm

the DC as *almost* any computer does NOT support other language (well instead that arm java proccessors and some old queue based processors that run ALGOL code) than machine code. All other languages are compiled/interpreted, so C in Dreamcast is compiled by the GCC or the Microsoft wince compiler.

(Sorry this is just a technical correction).

If your search is for other languages to be runned in DC, well, you have FENIX, LUA, FLASH (there's a web browser that can run FLASH 3), javascript (web browser). Also a lot of more compilers/interpreters can be PORTED to run in DC hardware. so you have:

- Machine Code
- Assembler
- C
- C++
- Lua
- Fenix
- Flash
- Javascript


I don't know if there's more compilers/interpreters, maybe some java code can be runned with a gcj port. Phyton? maybe.
Hope this answer your question. bye!
User avatar
Maturion
Moderator
Moderator
Posts: 619
Joined: Fri Oct 12, 2007 1:52 pm
Location: Munich, Germany
Has liked: 0
Been liked: 0
Contact:

Re: What languages does the DC support?

Post by Maturion » Tue Nov 04, 2008 1:46 am

Before you can run a language like Ruby or Python, you need an interpreter. Sadly there is no intrepreter for those languages for the Dreamcast. However, I think there is a Lua interpreter. (As stated above)

Of course you can run Assembler on the Dreacmast.
User avatar
BlueCrab
The Crabby Overlord
The Crabby Overlord
Posts: 5448
Joined: Mon May 27, 2002 11:31 am
Location: Sailing the Skies of Arcadia
Has liked: 3 times
Been liked: 24 times
Contact:

Re: What languages does the DC support?

Post by BlueCrab » Tue Nov 04, 2008 1:24 pm

This really doesn't belong in this particular forum so...

Moved to Programming Discussion
sqrt(-1)+1
DCEmu Freak
DCEmu Freak
Posts: 78
Joined: Wed Oct 17, 2001 7:44 pm
Has liked: 0
Been liked: 0

Re: What languages does the DC support?

Post by sqrt(-1)+1 » Thu Nov 06, 2008 1:50 pm

DCLinux or NetBSD DC has all of the mentioned languages and a few other.
kohan69
DCEmu Freak
DCEmu Freak
Posts: 58
Joined: Mon Apr 17, 2006 11:25 pm
Has liked: 0
Been liked: 0
Contact:

Re: What languages does the DC support?

Post by kohan69 » Wed Jan 07, 2009 4:18 pm

There are also emulators, but that gets verrry messy.
BlackAura
DC Developer
DC Developer
Posts: 9951
Joined: Sun Dec 30, 2001 9:02 am
Has liked: 0
Been liked: 0

Re: What languages does the DC support?

Post by BlackAura » Thu Jan 08, 2009 8:24 am

Natively: SH-4 assembly, C (using GCC), C++ (using GCC again). That's it. In theory, any language supported by GCC might work (like Java), but you'd have to get the compiler working for the Dreamcast, and provide the required runtime libraries (written in C, most likely).

A version of Lua 4 is included in KOS. Lua 5 is known to work, and a couple of people around here have been using that in their projects. However, you can't write a complete game in Lua - you have to write some code in C to talk to the Dreamcast hardware, load the Lua scripts, and handle anything else that can't be done in Lua.

Someone (Scherzo?) ported a JavaScript interpreter. I think it was used internally by one project, but not independently.

Most scripting languages that only require a basic C runtime will work. I've had a couple of BASIC interpreters running pretty well, for example, although you couldn't really do anything useful with them. Stuff like Squirrel might work too.

Larger languages, like Python or Ruby, usually require a bit more than just a C runtime, or require far more resources than the Dreamcast has available. They're unlikely to work on a Dreamcast without a lot of effort, and even then, their standard libraries would likely be unavailable.
sqz
DCEmu Cool Newbie
DCEmu Cool Newbie
Posts: 12
Joined: Wed Jan 07, 2009 2:50 am
Has liked: 0
Been liked: 0

Re: What languages does the DC support?

Post by sqz » Tue Apr 28, 2009 3:33 am

Guys,

I've succesfully ported (read 'just compiled') the monkey scripting language for DC KallistiOS.
Basically its lua with a C syntax (very easy readable).

Any idea who is handling contributions concerning KallistiOS? Dan Potter?

kind regards,
User avatar
BlueCrab
The Crabby Overlord
The Crabby Overlord
Posts: 5448
Joined: Mon May 27, 2002 11:31 am
Location: Sailing the Skies of Arcadia
Has liked: 3 times
Been liked: 24 times
Contact:

Re: What languages does the DC support?

Post by BlueCrab » Tue Apr 28, 2009 8:01 am

The best way to get things out there to the DC world isn't necessarily to integrate it into KOS. Integrating it into KOS just makes it more of a pain for us KOS maintainers when things get updated. :wink:

My opinion is that the best thing to do is to upload it somewhere, and provide a link to it (you could even just upload it with a post here).

Oh, and I can handle contributions to KOS proper (to actually answer your question), but I'm not particularly interested in seeing anything new into the kos-ports tree right now (since all of what's there is horribly outdated, and needs to be updated).
Stryfe
Psychotic DCEmu
Psychotic DCEmu
Posts: 577
Joined: Mon Aug 11, 2008 9:34 am
Location: Nowhere U.S.A.
Has liked: 0
Been liked: 0

Re: What languages does the DC support?

Post by Stryfe » Tue Apr 28, 2009 8:29 am

Just as examples for him to check out, "NesterDC SE" by Scherzo is what he implemented the JavaScript into wasn't it?

And of course, "DcPlaya" was the one app I could think of that uses Lua.
ImageImageImageImage
BlackAura
DC Developer
DC Developer
Posts: 9951
Joined: Sun Dec 30, 2001 9:02 am
Has liked: 0
Been liked: 0

Re: What languages does the DC support?

Post by BlackAura » Tue Apr 28, 2009 8:33 am

Stryfe wrote:Just as examples for him to check out, "NesterDC SE" by Scherzo is what he implemented the JavaScript into wasn't it?
Yep. I believe it was a port of JavaScriptCore from Safari. Ancient by now, of course.
sqz
DCEmu Cool Newbie
DCEmu Cool Newbie
Posts: 12
Joined: Wed Jan 07, 2009 2:50 am
Has liked: 0
Been liked: 0

Re: What languages does the DC support?

Post by sqz » Tue Apr 28, 2009 9:21 am

hehe, I can understand.
KOS is contains a shitload of shitload...its huge already!
Every contribution on top of the shitload means more testing of shitload :)

Maybe I should just start a topic with 'monkey script works on KOS!' and an link + example.
Adding it to KOS would only prove monkey script is full portable ANSI c/c++ :)
Post Reply