Is there any way to compile a NES rom without ASM?
Moderator: Moderators
Is there any way to compile a NES rom without ASM?
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?
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?
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.
Also recommended is Shiru's library, and/or thefox's library... also for cc65.
nesdoug.com -- blog/tutorial on programming for the NES
- rainwarrior
- Posts: 8062
- Joined: Sun Jan 22, 2012 12:03 pm
- Location: Canada
- Contact:
Re: Is there any way to compile a NES rom without ASM?
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.
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?
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
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.
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;
}
Last edited by DRW on Wed Jul 27, 2016 4:25 am, edited 1 time in total.
Available now: My game "City Trouble".
Website: https://megacatstudios.com/products/city-trouble
Trailer: https://youtu.be/IYXpP59qSxA
Gameplay: https://youtu.be/Eee0yurkIW4
German Retro Gamer article: http://i67.tinypic.com/345o108.jpg
Website: https://megacatstudios.com/products/city-trouble
Trailer: https://youtu.be/IYXpP59qSxA
Gameplay: https://youtu.be/Eee0yurkIW4
German Retro Gamer article: http://i67.tinypic.com/345o108.jpg
Re: Is there any way to compile a NES rom without ASM?
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
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?
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.
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?
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?
Huh? I don't really understand what you mean with this statement.Marscaleb wrote:I thought that *maybe* someone might have something that is enough for a proof-of-concept but with no weight behind it.
Available now: My game "City Trouble".
Website: https://megacatstudios.com/products/city-trouble
Trailer: https://youtu.be/IYXpP59qSxA
Gameplay: https://youtu.be/Eee0yurkIW4
German Retro Gamer article: http://i67.tinypic.com/345o108.jpg
Website: https://megacatstudios.com/products/city-trouble
Trailer: https://youtu.be/IYXpP59qSxA
Gameplay: https://youtu.be/Eee0yurkIW4
German Retro Gamer article: http://i67.tinypic.com/345o108.jpg
Re: Is there any way to compile a NES rom without ASM?
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.
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.
- rainwarrior
- Posts: 8062
- Joined: Sun Jan 22, 2012 12:03 pm
- Location: Canada
- Contact:
Re: Is there any way to compile a NES rom without ASM?
Shiru in particular has released a number of good quality games made in C: https://shiru.untergrund.net/software.shtml#nesMarscaleb 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.
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?
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
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?
Interesting form 
Re: Is there any way to compile a NES rom without ASM?
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/
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/