Skip navigation
Welcome, Guest! Please Login or Join

Loading...

NES Programming Organized - Nerdy Nights

Dec 5, 2011 at 12:18:16 PM
JKeefe56 (55)
avatar
(Jim K) < Meka Chicken >
Posts: 882 - Joined: 12/05/2011
New York
Profile
Sorry, nevermind. Found it in one of the three tutorials I've been workig my way through:
http://bobrost.com/nes
Anyone having a similar problem can work their way through "assignment one" to get started.
Again, thanks for this great resource.

-------------------------
This space intentionally left mostly blank.

Dec 5, 2011 at 12:21:01 PM
removed04092017 (0)
This user has been banned -- click for more information.
< Bowser >
Posts: 7316 - Joined: 12/04/2010
Other
Profile
All of them do that because you don't point it to a file to start assembling. Loo up how to use the command prompt and pass variables and files to a program for it to use.

Dec 18, 2011 at 2:56:07 AM
BrandonE (0)
avatar
(Brandon Evans) < Cherub >
Posts: 3 - Joined: 12/18/2011
New York
Profile
Nice tutorials! I just thought I should point out two issues that I have come across so far:

1. Week 1 contains the following sentences: "Base 2 binary works the same way, except each digit can be 0-1 and the place values are powers of 2 instead of 10. Insert a 0 to the right of a number and it becomes 2 times bigger. Remove a 0 and it becomes 10 times smaller." Shouldn't the last sentence say "2 times smaller"?
2. For week 4, my sprite seemed to use an improper coloring scheme even though I was doing everything the tutorial asked me to. thefox from #nesdev noticed that I "set the PPU address to $3F10, not $3F00 when loading the palette." Changing this fixed the colors, but the tutorial says to "write the low byte of $3F10 address." Is this a mistake?

-------------------------
All the best,

Dec 19, 2011 at 9:01:46 AM
NESHomebrew (20)
avatar
(Brad Bateman - Strange Brew Games) < King Solomon >
Posts: 4200 - Joined: 04/28/2008
Saskatchewan
Profile
Originally posted by: BrandonE

Nice tutorials! I just thought I should point out two issues that I have come across so far:

1. Week 1 contains the following sentences: "Base 2 binary works the same way, except each digit can be 0-1 and the place values are powers of 2 instead of 10. Insert a 0 to the right of a number and it becomes 2 times bigger. Remove a 0 and it becomes 10 times smaller." Shouldn't the last sentence say "2 times smaller"?

10 is binary for what?  Playing off an old joke, "There are 10 types of people, those who understand binary, and those who don't.

Originally posted by: BrandonE


2. For week 4, my sprite seemed to use an improper coloring scheme even though I was doing everything the tutorial asked me to. thefox from #nesdev noticed that I "set the PPU address to $3F10, not $3F00 when loading the palette." Changing this fixed the colors, but the tutorial says to "write the low byte of $3F10 address." Is this a mistake?

$3F10 is $3F00 + 16 bytes.  The first 16 bytes are for the background, and the second 16 are for sprites.  I'm guessing you had all 32 palette entries and not just the 16 for the sprites in your table.  If you just want to update the sprite palettes, then you SHOULD point to $3F10.  In your case, it was assigning your background colours to your sprites.


Edited: 12/19/2011 at 09:09 AM by NESHomebrew

Dec 19, 2011 at 3:19:14 PM
thefox (0)
avatar
(Kalle Immonen) < Meka Chicken >
Posts: 532 - Joined: 07/08/2008
Finland
Profile
Originally posted by: WhatULive4

Originally posted by: BrandonE

Nice tutorials! I just thought I should point out two issues that I have come across so far:

1. Week 1 contains the following sentences: "Base 2 binary works the same way, except each digit can be 0-1 and the place values are powers of 2 instead of 10. Insert a 0 to the right of a number and it becomes 2 times bigger. Remove a 0 and it becomes 10 times smaller." Shouldn't the last sentence say "2 times smaller"?

10 is binary for what?  Playing off an old joke, "There are 10 types of people, those who understand binary, and those who don't.

I noticed the "joke" as well, I just don't think it was intentional. In any case, it's not really a good idea to put jokes like that on a tutorial.

-------------------------
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: kkfos.aspekt.fi

Dec 19, 2011 at 6:43:21 PM
BrandonE (0)
avatar
(Brandon Evans) < Cherub >
Posts: 3 - Joined: 12/18/2011
New York
Profile
Originally posted by: WhatULive4

Originally posted by: BrandonE

Nice tutorials! I just thought I should point out two issues that I have come across so far:

1. Week 1 contains the following sentences: "Base 2 binary works the same way, except each digit can be 0-1 and the place values are powers of 2 instead of 10. Insert a 0 to the right of a number and it becomes 2 times bigger. Remove a 0 and it becomes 10 times smaller." Shouldn't the last sentence say "2 times smaller"?

10 is binary for what?  Playing off an old joke, "There are 10 types of people, those who understand binary, and those who don't.
I agree with thefox that this joke couldn't have been intentional. If it were, it'd use 10 instead of 2 in both sentences. I'm sure this would be quite confusing to newbies.

Originally posted by: WhatULive4

Originally posted by: BrandonE


2. For week 4, my sprite seemed to use an improper coloring scheme even though I was doing everything the tutorial asked me to. thefox from #nesdev noticed that I "set the PPU address to $3F10, not $3F00 when loading the palette." Changing this fixed the colors, but the tutorial says to "write the low byte of $3F10 address." Is this a mistake?

$3F10 is $3F00 + 16 bytes.  The first 16 bytes are for the background, and the second 16 are for sprites.  I'm guessing you had all 32 palette entries and not just the 16 for the sprites in your table.  If you just want to update the sprite palettes, then you SHOULD point to $3F10.  In your case, it was assigning your background colours to your sprites.
The zip file had it writing $00, which worked, whereas $10 did not. Either the tutorial is wrong or the attached file is.

Also, I think there's an issue with the attribute table in Week 6. The tutorial says it is:

%00000000, %00010000, %0010000, %00010000, %00000000, %00000000, %00000000, %00110000


The code says it is:

%00000000, %00010000, %01010000, %00010000, %00000000, %00000000, %00000000, %00110000

The one in the code looks right, whereas the one in the tutorial makes one of the blocks greenish.

-------------------------
All the best,


Edited: 12/19/2011 at 06:48 PM by BrandonE

Feb 1, 2012 at 12:43:52 PM
Nightowljrm (40)
avatar
(Joseph, not Joe!) < King Solomon >
Posts: 3976 - Joined: 12/07/2010
Tennessee
Profile
I'm trying to dive into learning how to program for the NES. Hope it works out. At any rate, thanks to everyone who contributed to this, especially making it a sticky and keeping the threads organized.

Feb 17, 2012 at 8:42:33 AM
muffins (0)
avatar
(I am Error.) < Tourian Tourist >
Posts: 44 - Joined: 01/31/2012
Maine
Profile
Would it be worthwhile creating a tutorial on how to utilize user-defined functions and macros for NESASM3? I know that having had programming experience with modern languages it is helping me clean up my assembly code a lot, and would be beneficial to those who have similar backgrounds, as well as to those that have to sift through code to help debug (big thanks to KHAN and 3Gen for putting up with me prior to having these tools at my fingertips).

EDIT: I'd be glad to write one up to contribute for this section as well.

-------------------------



Edited: 02/20/2012 at 09:32 PM by muffins

May 10, 2012 at 12:00:50 PM
Nesogger (0)

(Queen Mothra!) < Cherub >
Posts: 3 - Joined: 09/16/2011
New Jersey
Profile
Sorry to bump this thread but, would it be possible to combine all the Nerdy Nights Tutorial into a single Word Document and have it posted for download somewhere? Any assistance would be gresatly appreciated.

Sincerely,

Nesogger

-------------------------
 

May 10, 2012 at 1:11:14 PM
dra600n (287)
avatar
(Adym \m/) < Bonk >
Posts: 15796 - Joined: 09/16/2010
Connecticut
Profile
Nothing is stopping you from opening up word, and copy/pasting the tutorials into there yourself. I think they're split up so that people can ask questions that pertain to each tutorial.

-------------------------
Proud owner of post #1800 in Inner Circle HQ thread

Aug 31, 2012 at 1:54:42 PM
0LD5K00L (0)
avatar
(Mikel ) < Tourian Tourist >
Posts: 24 - Joined: 08/28/2012
Sweden
Profile
I've been following the Nerdy Nights-series long before I joined NA but I haven't been able to say thanks until now. Thank you bunnyboy for these brilliant tutorials! They are really informative.

-------------------------
Photobucket


Edited: 08/31/2012 at 01:55 PM by 0LD5K00L

Sep 17, 2012 at 11:22:17 PM
Bothi (0)

(Bodhi Culver) < Cherub >
Posts: 6 - Joined: 09/17/2012
Nebraska
Profile
Hello everyone, new guy Bothi here. Just wondering if there was a language I should know before starting this tutorial? It seems more of a guide on how to modify something existing to run on the NES. Thanks in advance.

Sep 18, 2012 at 6:41:07 AM
DoNotWant (1)

(Ham Sammich) < Eggplant Wizard >
Posts: 440 - Joined: 12/08/2011
Sweden
Profile
6502 assembly would be good to know, yes.

-------------------------
 

Sep 18, 2012 at 12:44:12 PM
JC-Dragon (0)
avatar
(JC Childs) < Eggplant Wizard >
Posts: 388 - Joined: 04/24/2011
United States
Profile
Originally posted by: Bothi

Hello everyone, new guy Bothi here. Just wondering if there was a language I should know before starting this tutorial? It seems more of a guide on how to modify something existing to run on the NES. Thanks in advance.

Although the tuts do show you how to view the sprites using emulators and the tut is using the sprites for SMB it is indeed teaching you code. The Language is 6502 Assembly. you write all the code in notepad (or notepad++ as most prefer) and then use a compiler to assemble the code. Just stick with the tutorials and feel free to ask questions as you go along. I'm still going through them as well but things are slowly making more sense the more i plug away at them.


-------------------------
You can't depend on your eyes when your imagination is out of focus
- Mark Twain

Sep 19, 2012 at 6:48:07 PM
Bothi (0)

(Bodhi Culver) < Cherub >
Posts: 6 - Joined: 09/17/2012
Nebraska
Profile
Thanks, JC. I saw the 6502 while skimming, but, being unfamiliar with it, did not immediately recognize it as the language. I do have Np++, thanks again.

-B

Sep 20, 2012 at 3:51:12 PM
JC-Dragon (0)
avatar
(JC Childs) < Eggplant Wizard >
Posts: 388 - Joined: 04/24/2011
United States
Profile
No problem man. Assembly isn't and upper level language like C++ or Java. It's essentially machine code and because of that it tends to turn people off as it requires a better understanding of core computing concepts. Just keep plugging away at it and again don't feel bad if you have to ask a question. Often times everyone will point you to a solution or means thereof rather than giving you simply the code needed to solve the problem as it helps you learn why something works rather than just that it does. It can be frustrating but ultimately more helpful.

-------------------------
You can't depend on your eyes when your imagination is out of focus
- Mark Twain

Sep 20, 2012 at 8:03:08 PM
Bothi (0)

(Bodhi Culver) < Cherub >
Posts: 6 - Joined: 09/17/2012
Nebraska
Profile
Hello again everyone, I am working my way through NN week 3, and noticed that it he inserts his Mario sprite as ".incbin 'mario.chr'". Could anyone tell me what the .chr filetype is, and if I should use it?

Sep 20, 2012 at 10:03:51 PM
JC-Dragon (0)
avatar
(JC Childs) < Eggplant Wizard >
Posts: 388 - Joined: 04/24/2011
United States
Profile
I'm not sure exactly what .incbin is but in my head it means "include binary" and the mario.chr is a file that has all of the mario sprites and images in it. If you downloaded the attachment it should have come with the mario.chr that bunnyboy separated from the SMB ROM to use for the tutorials. It's important that you have it otherwise none of your graphics will show up.

---edit for more info----

i should state the the mario.chr has ALL of the graphics from SMB, background, enimies, blocks, etc...

-------------------------
You can't depend on your eyes when your imagination is out of focus
- Mark Twain


Edited: 09/20/2012 at 10:05 PM by JC-Dragon

Sep 21, 2012 at 6:44:14 PM
Bothi (0)

(Bodhi Culver) < Cherub >
Posts: 6 - Joined: 09/17/2012
Nebraska
Profile
I got the .incbin, was just wondering whether or not your graphics had to be in (this alien) .chr format. Thank you.

Sep 21, 2012 at 6:45:53 PM
removed04092017 (0)
This user has been banned -- click for more information.
< Bowser >
Posts: 7316 - Joined: 12/04/2010
Other
Profile
.chr is just the default name for most. I use .bin for graphics myself, for pretty much everything. Those 3 extra letters as the extension don't matter honestly, as long as the binary data is in the NES graphics format, it's good to go.

Sep 27, 2012 at 4:38:11 AM
The Adventurer (0)
avatar
(James Purcell) < Cherub >
Posts: 7 - Joined: 09/27/2012
Connecticut
Profile
Hey. Joined the forum specifically to say that this resource KICKS ASS. I haven't programmed anything in 10+ years and got me up to speed and thinking with code again in no time flat.

Question though, does anyone recommend a specific code text editor? I'm using Notepad to edit code at the moment, and while functional its still Notepad.

Thanks!

Sep 27, 2012 at 8:38:35 AM
DoNotWant (1)

(Ham Sammich) < Eggplant Wizard >
Posts: 440 - Joined: 12/08/2011
Sweden
Profile
I use notepad++, it's great.
http://notepad-plus-plus.org/...

-------------------------
 

Sep 27, 2012 at 1:44:49 PM
JC-Dragon (0)
avatar
(JC Childs) < Eggplant Wizard >
Posts: 388 - Joined: 04/24/2011
United States
Profile
Originally posted by: The Adventurer

Hey. Joined the forum specifically to say that this resource KICKS ASS. I haven't programmed anything in 10+ years and got me up to speed and thinking with code again in no time flat.

Question though, does anyone recommend a specific code text editor? I'm using Notepad to edit code at the moment, and while functional its still Notepad.

Thanks!

yeah go with NP++ , it has all kinds of code resources and plug-in availible for it. someone even did a  Assebly 6502 plug-in (i don't use it but it exists) for the most part i just use the line counting feature so when the compiler throughs an error on a line of code I can quickly navigate to that line.


-------------------------
You can't depend on your eyes when your imagination is out of focus
- Mark Twain

Sep 27, 2012 at 3:11:33 PM
The Adventurer (0)
avatar
(James Purcell) < Cherub >
Posts: 7 - Joined: 09/27/2012
Connecticut
Profile
Sweet. Anyone got a link to that Assembly Plug-In? That would sure be handy.

Sep 27, 2012 at 3:57:57 PM
The Adventurer (0)
avatar
(James Purcell) < Cherub >
Posts: 7 - Joined: 09/27/2012
Connecticut
Profile
Quick question, and this will probably be obvious. What can I use to open and edit .chr files? Any image editor?