Page 1 of 1
Is there any way to compile a NES rom without ASM?
Posted: Tue Jul 26, 2016 8:46 pm
by Marscaleb
I just had a stray thought.
Is it possible to create a new NES rom without learning assembly to do it?
Well I suppose of course it is *technically* possible, but I mean with existing tools. Like, has anyone made a program that can create a new ROM from modern code or custom scripts or such thing?
Re: Is there any way to compile a NES rom without ASM?
Posted: Tue Jul 26, 2016 9:02 pm
by dougeff
Yes. I feel like my tutorial proves that. Cc65 can be done entirely in C code. And, you probably don't need to follow all the restrictions that I recommended.
Also recommended is Shiru's library, and/or thefox's library... also for cc65.
Re: Is there any way to compile a NES rom without ASM?
Posted: Tue Jul 26, 2016 10:04 pm
by rainwarrior
There's a whole lot of past threads about C and the NES, and there's a lot of other ones about various other high level languages in use on the NES. Here's a couple off the top of my head:
Shiru's C tutorial:
https://shiru.untergrund.net/articles/p ... s_in_c.htm
Python for the NES:
http://gutomaia.net/pyNES/
There's also Family BASIC for the Famicom. Some people make things with that.
Re: Is there any way to compile a NES rom without ASM?
Posted: Wed Jul 27, 2016 3:06 am
by DRW
Despite the fact that it's possible, I would still advice to do
some stuff in Assembly, namely the initialization and NMI updates.
NMI because of the limited time frame during vblank.
Additionally, sprite updates (turning the meta sprites into the actual sprites data) might be good in Assembly as well, but not necessary since they are done during the regular game logic and not in NMI.
Likewise, some general purpose functions, like stuff akin to memcpy.
For the rest of the game logic, you can basically use C exclusively. (The compiler would be CC65.)
And don't let anybody tell you that you will only be able to do very simple games with C because of the speed.
I did a jump 'n' run sidescrolling platformer, i.e. a game where the movement functions are a bit more complicated than a simple
Code: Select all
if (ButtonUpIsPressed()
&& !LevelIsWall(X, Y - 1))
{
--Y;
}
And I still have
tons of time between two vblanks, so that I could extend my game logic with all kinds of stuff and still wouldn't encounter a slowdown.
Re: Is there any way to compile a NES rom without ASM?
Posted: Wed Jul 27, 2016 3:52 am
by na_th_an
I've made several side scrolling platformers in C (yet to be finished and published, but hey!). You can make great games if you know what you are doing.
Knowing some assembly, or at least being able to read it and alter some bits is quite useful. If you use Shiru's neslib all the "dirty work" is done for you, but if you know how to tweat it a bit further to meet your requirements, all you have to do is win

Re: Is there any way to compile a NES rom without ASM?
Posted: Wed Jul 27, 2016 4:39 am
by Bregalad
I wrote a
detailed post about which high-level alternatives exists for 6502 development. (No, CC65 is not the only option). Probably some further options are missing from my post.
Unfortuantely I didn't try to do anything "deep" in any of those solutions, so I cannot tell you my opinion on them and how realistic they would be to write a full game. Many of them will still require some assembly for, say, interrupt routines and PPU updates, maybe the sound engine, raster effects, things like that.
This particular post doesn't mention back then didn't include UCSD pacal and it's p-code, which were very popular back when the NES was a contemporary platform. It got a GNU compatible clone in between, and I
made a whole thread to discuss the matter.
Again, I never developed actual code (other than simple hellos) with any of those tools but I wouldn't underestimate non-C solutions.
Re: Is there any way to compile a NES rom without ASM?
Posted: Thu Jul 28, 2016 1:23 am
by Marscaleb
I'm... honestly surprised at this. I thought that *maybe* someone might have something that is enough for a proof-of-concept but with no weight behind it.
Re: Is there any way to compile a NES rom without ASM?
Posted: Thu Jul 28, 2016 1:55 am
by DRW
Marscaleb wrote:I thought that *maybe* someone might have something that is enough for a proof-of-concept but with no weight behind it.
Huh? I don't really understand what you mean with this statement.
Re: Is there any way to compile a NES rom without ASM?
Posted: Thu Jul 28, 2016 2:21 am
by Myask
Technically, you can't compile a NES ROM with only assembly.
Also technically, one can create a NES ROM with a hex-editor without knowing assembly, as one is working in machine code, not assembly mnemonics…but
lower-level was not the direction you were interested in, it seems.
Re: Is there any way to compile a NES rom without ASM?
Posted: Thu Jul 28, 2016 10:02 am
by rainwarrior
Marscaleb wrote:I'm... honestly surprised at this. I thought that *maybe* someone might have something that is enough for a proof-of-concept but with no weight behind it.
Shiru in particular has released a number of good quality games made in C:
https://shiru.untergrund.net/software.shtml#nes
His Alter Ego port is probably the best of the bunch, and it's even open source.
I think that goes well beyond "proof of concept".
Re: Is there any way to compile a NES rom without ASM?
Posted: Fri Jul 29, 2016 2:26 am
by na_th_an
All our NES games are coded in C (cc65+neslib+famitone2). We have released a number of them. They show us learning how to do things properly, but you can peek at the sources. The games are Sir Ababol (although we have recoded this game from scratch and it's yet to be released you can play the buggy original), Sgt. Helmet: Training Day, Jet Paco and Yun.
Our latest game (almost finished) takes part in this year's compo:
viewtopic.php?f=32&t=14589
Short video showing the first level:
viewtopic.php?f=32&t=14589
Re: Is there any way to compile a NES rom without ASM?
Posted: Fri Nov 11, 2016 2:20 am
by freetress
Interesting form

Re: Is there any way to compile a NES rom without ASM?
Posted: Fri Dec 02, 2016 4:45 pm
by slobu
There is nbasic by Bob Rost:
http://bobrost.com/nes/resources.php
Also Aatlan:
http://atalan.kutululu.org/
I'd honestly wait until Joe Granato releases his game maker for NES.
http://www.thenew8bitheroes.com/