In this case (when each source file is compiled+linked separately -> bin) it's not possible/easy. You should compile all the source files to objects, then link those together in a single step for it to be able to resolve everything. If you need duplicate data/code in several banks I would use macros.mic_ wrote: Let's say you split your code/data into separate banks which are compiled and linked separately (to avoid having duplicates of the same stuff for different combinations of banks) and then combined into a .nes file.
Programming NES games in C article
Moderator: Moderators
Besides the article, I also wrote a few very simple examples of NES programming in C. They are prebuilt, so you may check them out without compiling, the source code is example1-4.c.
Low level library was updated for these (minor fixes), and Chase code was updated as well.
Low level library was updated for these (minor fixes), and Chase code was updated as well.
This is the input from the dead-end users perspective:
The example source gave me more practical knowledge than the article. The comments are enough but with a little more detail could be considered a tutorial in itself. Also, it's easy to make highly concatenated (and obfuscated) lines of code in C. To make a tutorial-by-commented-code some instructions could be broken down for readability.
I guess what I'm saying is that the example source is great and with a little more effort could be a tutorial in itself.
The example source gave me more practical knowledge than the article. The comments are enough but with a little more detail could be considered a tutorial in itself. Also, it's easy to make highly concatenated (and obfuscated) lines of code in C. To make a tutorial-by-commented-code some instructions could be broken down for readability.
I guess what I'm saying is that the example source is great and with a little more effort could be a tutorial in itself.
- cpow
- NESICIDE developer
- Posts: 1097
- Joined: Mon Oct 13, 2008 7:55 pm
- Location: Minneapolis, MN
- Contact:
I think what you're looking for in this statement is interleaved C/assembly? See the screenshot I posted on the first page of this thread.slobu wrote: To make a tutorial-by-commented-code some instructions could be broken down for readability.
If you want to know what assembly is generated for any C statement, no matter how obfuscated the C statement is, mixed-mode debugging is the way to go.
Hi
I am totally new to NES development (started looking into it last week), and this is my first post here. Your article and c library is great. I had my own game up and running in a couple of hours!!! Thank you for this great tutorial!
The code is quite fast, I am doing quite a lot of stuff without slowdown.
Now, if only I had any musical and/or pixel art talent...
I will post my game here when it's done.
/Nioreh
I am totally new to NES development (started looking into it last week), and this is my first post here. Your article and c library is great. I had my own game up and running in a couple of hours!!! Thank you for this great tutorial!
The code is quite fast, I am doing quite a lot of stuff without slowdown.
Now, if only I had any musical and/or pixel art talent...
I will post my game here when it's done.
/Nioreh
You can find a musician rather easily, there are many musicians who use FamiTracker and would like to make music for a game, even for a freeware one. You can try FamiTracker forums.
Graphics is a more difficult thing, because there aren't too many pixel artists who are able to make good NES graphics and are not busy with pro projects yet (iPhone games etc). Also, there are not many people who are familiar with NES graphics limitations. Anyway, you can try PixelJoint forums.
Graphics is a more difficult thing, because there aren't too many pixel artists who are able to make good NES graphics and are not busy with pro projects yet (iPhone games etc). Also, there are not many people who are familiar with NES graphics limitations. Anyway, you can try PixelJoint forums.
- rainwarrior
- Posts: 8062
- Joined: Sun Jan 22, 2012 12:03 pm
- Location: Canada
- Contact:
*aham*Nioreh wrote:Shiru, I tried to download your famitone exporter for FamiTracker, but it gives me a 404.Where can I find it?
I decided to try my best at both graphics and audio myself, and I think I am doing ok
http://famitracker.shoodot.net/downloads.php
Zepper
RockNES author
RockNES author
Thanks!Shiru wrote:Sorry, my FTP is down by some reason for two days already. FamiTracker page links to my website, there is no separate download.
Here is temporary link for FamiTone.
Maybe this is a bit off topic, but I can't get my music files to play correctly with famitone. When I convert it from the text export to .s I get a bunch of these:
"Warning! Note out of supported range, frame 0 row 00 channel 1"
Even if I have nothing on frame 0 row 0 (if channel 1 means square wave 1?).
When I load the music up in my game it is suuuuper slow. Like 1/20 speed or slower. If I use the music from the sample game everything is fine (Fine all the way, export - convert - play).
I'm sorry. It was me being stupidShiru wrote:I can't guess what is wrong or fix anything without seeing the exported txt file at least.
I think I have found a bug in your library, though. Using pad_poll causes the game to crash when pressing a button at the same time as a direction on the d-pad. (or if pressing both a and b simultaneously)
Edit: I am using it kind of like this:
Code: Select all
j=pad_poll(0);
if(j&PAD_LEFT){
--px;
}
else if(j&PAD_RIGHT){
++px;
}