It is currently Fri Dec 14, 2018 3:21 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 23 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Tue Sep 12, 2006 9:48 am 
Offline
User avatar

Joined: Tue Sep 12, 2006 8:40 am
Posts: 6
Hello!

I have been lurking on these forums for quite some time now, and am about ready to start tackling a game. However, I have a few newbie questions that I hope can be answered:

(1) I am a hillbilly. I programmed briefly with Visual Basic in College, but thats as much experience as I have with programming. Are there any idiot-friendly 6502 tutorials that pertain to NES game development out there? I have looked into several tutorials, but they all leave me just scratching my head :cry: Don't get me wrong, because I am willing to do/learn anything to make this work.

(2) Are there any other helpful things that I should know about?

I really appreciate the help, and look forward to making a game possible!


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 12, 2006 10:32 am 
Offline
User avatar

Joined: Sun Sep 19, 2004 10:59 pm
Posts: 1440
You mentioned that you don't have much programming experience. Have you programmed a game on any platform before?

The reason I ask is that if you haven't, the NES is probably not the wisest place to start - since you'll likely be doing everything in ASM, figuring out how to do common gameplay-related tasks won't be as intuitive without a frame of reference (namely, having done the same tasks in a high level language and knowing what tasks you need to perform).

Most NES programming tutorials assume that you already know 6502 assembly, so you'll need to find a generic 6502 tutorial if you want to start from scratch. The other problem is that most tutorials aren't very "idiot-friendly" as you put it - they expect you to be able to understand the fundamentals of assembly language programming (that is, the ability to break down a complex operation into small and simple pieces).

I'm not trying to discourage you, but I feel I must point out that lots of people have come here with the belief that they can easily program a game on the NES, only to find out that it's a lot harder than it looks. My first graphical game was/is also on the NES and it's been a significant challenge, and it's only a game port (meaning that I already have a complete picture of how the game works and what needs to be done).

_________________
Quietust, QMT Productions
P.S. If you don't get this note, let me know and I'll write you another.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 12, 2006 10:48 am 
Offline

Joined: Fri Jul 29, 2005 3:40 pm
Posts: 345
Location: near chicago
if you are a fast learner then you might be able to learn asm programming. i would suggest you forget visual basic, that will not help you (except maybe experience with if's and loop's). i would learn C. while that is not what the nes uses, it is a lower level language that should help with learning asm. also it is a procedural language which will help with asm. or if you want to jump right into it, look at the source of the demo's posted on the site.

matt


Top
 Profile  
 
PostPosted: Tue Sep 12, 2006 11:44 am 
Online
User avatar

Joined: Sat Feb 12, 2005 9:43 pm
Posts: 11012
Location: Rio de Janeiro - Brazil
Meatballsub wrote:
I have looked into several tutorials, but they all leave me just scratching my head :cry:

That's exactly what happened to me a few years back. And I can tell you, head-scratching usually is the first step. Even today, sometimes I'll look at something and won't understand anything at first. But after reading it all again a few more times things start to get into place.

The ASM part was the most difficult thing for me to learn at first. I just couldn't understand how those tiny little instructions could be used to make complex programs, since I was so used to higher level languages such as basic and pascal. In fact, before you can learn ASM, you have to understand how it works, 'cause it's completelly different from high-level languages.

Once you understand it, learning to do more complex tasks gets easier and easier. I made heavy use of Michal Kowalski's 6502 simulator when I was learning (and still use it a lot for trying routines and such). It's very easy to use, 'cause you can just type in code and watch live how the instructions work, without worrying about compiling the code, doing something graphical so you can see anything or using complicated debuggers. It's integrated debugger is pretty easy to use. What really made me learn 6502 ASM was trying to code a few math routines (multiplication, division, etc) with this simulator.

As for graphics, I think that the NES PPU is the easiest thing to learn in NES programming. If you understand the limitations of the PPU (without getting into any programming details) you have a greater chance of understanding the rest. Most people wanting to program for the NES have a good idea of the limitations, for having played so many games for it. Try to keep it simple in the beginning, though. No fancy scrolling tricks, character swapping, split screens, etc or you'll easily get lost.

The hardest part of game programming, IMO, is game logic. This is the hardest (if not impossible) thing to teach. The concept of a game loop, object handling, physics, level maps, etc. are tough things to master. So, my tip is that you start out simple, maybe with Atari 2600 styled games. You know, single screen games without scrolling (so you don't have to worry about big level maps or progressive background rendering). These kind of games can give you a pretty good idea of how a game loop works, and for your next project you'll want to try something more interesting graphically.

Anyway, this is all I can think of right now. Keep reading about the 6502, grab a copy of the simulator and try to code a few simple routines. Don't worry about displaying the results of your routines, you can just use the debugger to watch the memory and the registers, so you can verify that the code behaves as you expect.

Once you feel confident about your 6502 skills, read about the PPU. Shortly after that you'll be able to write a nice first demo. By this time you'll have to learn about how to make code that's compatible with an actual NES, and you'll learn all the initialization steps, how to sync your stuff to VBlank, etc. After that it's all easy.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 12, 2006 11:49 am 
Offline
User avatar

Joined: Fri Nov 12, 2004 2:49 pm
Posts: 7604
Location: Chexbres, VD, Switzerland
Before I started learning 6502 ASM; I also knew only Visual Basic and C64 Basic (both were basic after all, while striaightly different because VB is object-oriented). I tried to learn C just after that but I failed (I was about 11, and most C tutorials aren't made for a public of 11 years old). So a couple of years later I started to grow interest with the NES and 6502 and I didn't have that much trouble to now have a decent level of experience of making a game.
I've not released any complete game yet, but I've just managed I could do until the very end of 2006 or the begining of 2007 if I work hard enough.
Learning programming isn't very hard, learn how to create a game from scratch and build your own game engine is.

_________________
Life is complex: it has both real and imaginary components.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 12, 2006 10:19 pm 
Offline
User avatar

Joined: Tue Sep 12, 2006 8:40 am
Posts: 6
Wow...

First of all, thank you for the replies. I wish every forums was like this; good ol constructive criticism. I really appreciate that :)


I know it will be overwhelming, but I plan on reading up on any articles/tutorials I can get my hands on. Right now, I am following Gbaguy's tutorial just to see how some basic commands work. I am at a part where I need to compile and test the .NES file. However, I keep getting this error when compiling through NESASM. Any idea what this might be? If not, I am sure I will figure it out at some point :)

Again, Thank you for the healthy responses!

Image

Here is a link to my .ASM file if needed...

HTTP://crapfromthebasement.com/bent.asm


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 12, 2006 10:29 pm 
Offline

Joined: Fri Jul 29, 2005 3:40 pm
Posts: 345
Location: near chicago
while i am not a winblows user, that looks like the assembler you used crashed. trying to access memory that didnt belong to it. no idea how to fix since i never used it. ..... my guess.

matt


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 12, 2006 10:54 pm 
Offline
User avatar

Joined: Sun Sep 19, 2004 10:59 pm
Posts: 1440
My two comments:

1. NESasm isn't a very decent quality assembler, as you have no doubt just noticed.
2. Gbaguy's tutorials aren't very decent quality, either - from what I have observed, they serve only to teach you how to write programs that will not work on an NES (or even in most newer emulators).

Of course, I can't at the moment recommend decent replacements for a beginner - I use TASM and CA65 for assemblers, and the only other NES tutorials I know of assume that you already know assembly.

_________________
Quietust, QMT Productions
P.S. If you don't get this note, let me know and I'll write you another.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 13, 2006 8:17 am 
Offline
User avatar

Joined: Fri Nov 12, 2004 2:49 pm
Posts: 7604
Location: Chexbres, VD, Switzerland
I think Celius, who have himself making great progress in very short time, originally planned to make a new quality newbie tutorial.
I don't know if he still is working on that idea, or if he will just assume the reader knows 6502 asm.
I just recommand learning 6502 programming before you can do anything with the NES, exept hack existing ROMs wich definitely have nothing to do with programming games, so I don't recommand that too much.

_________________
Life is complex: it has both real and imaginary components.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 13, 2006 2:42 pm 
Offline
User avatar

Joined: Mon Sep 11, 2006 6:48 pm
Posts: 194
Location: Moose Lake, Minnesota
NESasm could be better, but I like it. I've certainly never had it crash, though.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 13, 2006 4:01 pm 
Offline
User avatar

Joined: Sun Jun 05, 2005 2:04 pm
Posts: 2150
Location: Minneapolis, Minnesota, United States
It is true that I was writing a tutorial for newbies, but I kind of got lost, and just put it aside. I can pick it up again, and now I know about 1.3 times as much as I did then, so I could probably do a decent tutorial.

It's really really funny how little I knew when I first came here. First of all, I was so angry because I kept thinking NESASM wouldn't work, when I didn't know that it was a DOS program that's only supposed to be run via a .bat file or the command prompt. I didn't know what a bit or a byte was either. I didn't know the hexidecimal system. I was really really scratching my head when I wanted to learn how to program NES games. If you look back at some of my really really old threads I started in like June of last year, I really made a fool of myself, because I had really no clue what I was doing. Then I magically figured it out. I couldn't figure out most things on my own, and I copied and pasted most code that was written.

I honestly know what I'm doing now, and I should be able to write a document for newbies. When I pick it up again, I'll try and describe things in a way that I would want them described to me if I was a newbie. I may teach basic 6502 stuff in there, so you won't have to go look at a boring document you won't want to read (Because you want to get going on making a test ROM), so I'll do that. Some things are explained the same by many people, and I never really understand what they are trying to say. Like, if someone tells you how to roll your Rs for learning a different language (If your native language is English, and that is all you know), they will say "Put your tongue on the top of your mouth and blow". I've heard that so many times, and it never worked. I eventually found my own way to do it, and I will teach anyone that asks me how to roll their Rs the same way I learned, not the crap that didn't work for me that everyone else teaches. You know? I will do the same for the NES programming doc.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 13, 2006 8:46 pm 
Offline
User avatar

Joined: Tue Sep 12, 2006 8:40 am
Posts: 6
I appreciate all of the comments, and I definitely look forward to your tutorial, Celius, whenever you have the time to make it that is :)

In the meantime, I am going to keep digging through more documents and tutorials. Hopefully, I can pick up on some basic coding this way (which I feel like I've begun to do already). I may even run down to the library and see what kind of 6502 books I can find.

Another question...I attempted to find those two compilers suggested in a post, but no luck so far. Any idea where I should get those, or should I just stick with NESASM?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 13, 2006 8:49 pm 
Offline
User avatar

Joined: Sun Sep 19, 2004 10:59 pm
Posts: 1440
TASM - http://home.comcast.net/~tasm/ (supports a bunch of CPUs, including the 6502)
CA65 - http://www.cc65.org/ (actually a C compiler, but I only use the assembler)

_________________
Quietust, QMT Productions
P.S. If you don't get this note, let me know and I'll write you another.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 13, 2006 9:02 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 20875
Location: NE Indiana, USA (NTSC)
I think CA65 is the one that the plurality of us use nowadays.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 14, 2006 8:28 am 
Offline
User avatar

Joined: Mon Sep 11, 2006 6:48 pm
Posts: 194
Location: Moose Lake, Minnesota
NESHLA has lots of nice features to simplify NES coding.


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

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 3 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