It is currently Mon Dec 11, 2017 9:44 pm

All times are UTC - 7 hours



Forum rules


Related:



Post new topic Reply to topic  [ 38 posts ]  Go to page Previous  1, 2, 3
Author Message
PostPosted: Sat Feb 28, 2015 6:58 am 
Offline
User avatar

Joined: Mon Sep 15, 2014 4:35 pm
Posts: 3152
Location: Nacogdoches, Texas
Stef wrote:
is there any C compiler for the SuperFX in first place ? I don't think so...

Here's something I found from http://en.wikibooks.org/wiki/Super_NES_ ... X_routines, although I'm not sure how useful it is:

Wikibooks wrote:
Whilst SNES assembly language programs can be compiled using a regular 65c816 compiler, the SuperFX assembly language requires a custom compiler. The original compiler used on existing SuperFX games has not been released outside the closed development community. An open source compiler is rumored to be in development as of January 2015 to compile SuperFX programs.


Top
 Profile  
 
PostPosted: Sat Feb 28, 2015 8:01 am 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19334
Location: NE Indiana, USA (NTSC)
Unless by "compiler" they mean "assembler".


Top
 Profile  
 
PostPosted: Sat Feb 28, 2015 10:21 am 
Offline

Joined: Wed May 19, 2010 6:12 pm
Posts: 2421
Nitroman wrote:
Many games actually may be coded in C, I heard japanese devs mostly used C and that even SuperFX-2 title Doom coded in C with no assembly involved what so ever. Makes sense for me, if some game's slowdowns too much.


I would make a whole lot of sense, explaining how programmers were capable of making such a mess, but still were able to somehow finish the game on schedule. That's the thing about programming, if you try to rush through it, you're bound to get stuck later on.


Top
 Profile  
 
PostPosted: Fri Mar 06, 2015 11:33 am 
Offline

Joined: Sun Aug 11, 2013 6:07 am
Posts: 57
Stef wrote:
I'm really septic about the fact that Doom on SNES was coded in C, is there any C compiler for the SuperFX in first place ? I don't think so...

There's no official argonaut or nintendo C compiler for the GSU, but iirc carmack has dabbled in compiler development so it's certainly a possibility.
I might skim through it at some point and see if there's anything indicative of compiler (ab)use.
Wikibooks wrote:
An open source compiler is rumored to be in development as of January 2015 to compile SuperFX programs.

Compiler, or assembler? Who wrote this article, are they active on this board?


Top
 Profile  
 
PostPosted: Fri Mar 06, 2015 5:18 pm 
Offline

Joined: Thu Feb 07, 2013 1:15 am
Posts: 96
Location: Sweden
ARM9 wrote:
Stef wrote:
I'm really septic about the fact that Doom on SNES was coded in C, is there any C compiler for the SuperFX in first place ? I don't think so...

There's no official argonaut or nintendo C compiler for the GSU, but iirc carmack has dabbled in compiler development so it's certainly a possibility.
I might skim through it at some point and see if there's anything indicative of compiler (ab)use.

Before QuakeC I don't think Carmack did any compiler development that saw use, and more importantly he was always quite ruthlessly chasing performance rather than some more academic higher level "elegance". Most of the original Doom rendering code is x86 assember.

Also, the SNES port was programmed by Randy Linden of Sculptured Software using their own SFX2+ development system. IIRC there was some C support in their dev kit, but again, using C for the rendering code (or anything in game, really) and get the performance of the SNES Doom port is quite unthinkable.

ARM9 wrote:
Wikibooks wrote:
An open source compiler is rumored to be in development as of January 2015 to compile SuperFX programs.

Compiler, or assembler? Who wrote this article, are they active on this board?

I'd be surprised if this was referencing anything but your ca65 SuperFX macros.


Top
 Profile  
 
PostPosted: Wed Sep 07, 2016 4:34 pm 
Offline

Joined: Wed Sep 07, 2016 4:27 pm
Posts: 2
The only part of Doom that used x86 assembly was a small procedure that dealt with ray casting. This could have been implemented in C - why not I don't know? All the rest of the rendering including texturing was written in C. The source code was uploaded over ten years ago and is available on GitHub.


Last edited by cdcdcd on Thu Sep 08, 2016 1:53 pm, edited 1 time in total.

Top
 Profile  
 
PostPosted: Wed Sep 07, 2016 5:20 pm 
Online

Joined: Sun Apr 13, 2008 11:12 am
Posts: 6509
Location: Seattle
C on a 486 is a very different beast than C on the 65816...


Top
 Profile  
 
PostPosted: Wed Sep 07, 2016 5:22 pm 
Offline

Joined: Sat Apr 25, 2015 1:47 pm
Posts: 336
Location: FL
The latest SNES game I've personally looked at which was almost definitely written in C (or some other higher-level language) is HAL's mediocre port of SimCity 2000. Take a look and you'll notice the direct page pointer being used as a frame pointer, with functions doing an obscene number of reads/writes to direct page memory to deal with variables in really roundabout ways that feel exactly like the sort of code a (not particularly clever) compiler would generate, being much larger, slower and less idiomatic than anything that tends to be seen in hand-written assembly. There are also some functions that behave basically identically to C standard library functions like strcmp, etc.

Some late-era EA Sports titles are similar, including a stack-based calling convention, even more naive compiler-isms (like explicitly allocating 0 bytes on the stack for functions with no local variables), a stubbed-out version of printf used for debug output, etc.

I haven't looked into the SNES port of Doom as much as some other games, but what I've seen of it looked rather hand-written to me.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 38 posts ]  Go to page Previous  1, 2, 3

All times are UTC - 7 hours


Who is online

Users browsing this forum: Bing [Bot], Jarhmander and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group