It is currently Wed Nov 14, 2018 3:13 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 15 posts ] 
Author Message
PostPosted: Tue Oct 23, 2018 2:10 pm 
Offline

Joined: Thu Mar 08, 2018 1:03 pm
Posts: 2
Hello,

I have loked through this site and I must say there are some great people here, so I thank you in advance and I apologize for a dumb question. I want to learn to program the NES. I want to learn and program in 6502 Assembly. I know this is not easy and is not a quick process. Its just ] something I would like to learn I thought about the Nerdy Nights tutorials, unless someone knows of a moe beginner type tutorial. My question is, what are the basic tools I will need to stat? I would just like a basic list to download and start.

I want to thank you all for your help. I look forward to many nights lerning from this great site and you great people.

Thanks,
Bj


Top
 Profile  
 
PostPosted: Tue Oct 23, 2018 2:25 pm 
Offline

Joined: Tue Aug 28, 2018 8:54 am
Posts: 61
Location: Edmonton, Canada
For nerdy nights, you need some kind of text editor (Notepad++ https://notepad-plus-plus.org/) and actual assembler (NESASM, it is archive from lesson 4 http://www.nespowerpak.com/nesasm/sprites.zip).

I don't think there is anything easier for NES than Nerdy Nights. Do you have any experience in programming?


Top
 Profile  
 
PostPosted: Tue Oct 23, 2018 3:09 pm 
Offline

Joined: Thu Mar 08, 2018 1:03 pm
Posts: 2
I do not have any other experience other that Basic programming and using some of the more popular game engines like Gamemaker Studio and Clickteam Fusion.

I do have NESmaker and I think it is great. I was thinking that learning 6502, or atleast getting more of an understanding of the process would help.


Top
 Profile  
 
PostPosted: Tue Oct 23, 2018 3:42 pm 
Offline
User avatar

Joined: Thu Mar 31, 2016 11:15 am
Posts: 418
You can try the easy6502 tutorial. It has a built-in assembler.

https://skilldrick.github.io/easy6502/


Top
 Profile  
 
PostPosted: Tue Oct 23, 2018 4:52 pm 
Offline
User avatar

Joined: Fri Nov 19, 2004 7:35 pm
Posts: 4104
Suggested programming exercises:
Write `memset` and `memcpy`.
Write something that will clear a whole nametable to zeroes.
Write something that will display a string of text at a specific location in the nametable.

Any questions, just ask.

_________________
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!


Top
 Profile  
 
PostPosted: Tue Oct 23, 2018 9:17 pm 
Offline

Joined: Fri Sep 30, 2016 8:57 pm
Posts: 92
i found using NESICIDE worked best for me. it has a 'hello world' program by tepples that'll give you a basic template to build off of.

in fact, my game (project blue) began it's life as the NROM hello world demo... literally none of the code from that remains, but it got me started with a program that was easy to modify and experiment with. plus there's a built-in emulator and several other helpful tools.


Top
 Profile  
 
PostPosted: Tue Oct 23, 2018 10:32 pm 
Offline

Joined: Tue Feb 07, 2017 2:03 am
Posts: 621
The NES is not a good machine to learn 6502 on, its not interactive, it doesn't have any helper functions, you will need to spend ages learning the hardware and how it works before you can print hello world. You would be better off learning at least the basics of 6502 on something more sane like a C64 and then once you understand how loops, indirect indexing, memory works etc coming back to the NES.

http://www.bombjack.org/commodore/books.htm see the MACHINE LANGUAGE and ASSEMBLY LANGUAGE section to which the "Machine Language on the Commodore 64, 128 and other Commodore Computers Revised and Expanded Edition" by Jim Butterfield is the book to learn 6502 from however I also find the "Commodore 64 Assembly Language" by Bruce Smith to also be quite good.


Top
 Profile  
 
PostPosted: Wed Oct 24, 2018 12:26 am 
Offline
User avatar

Joined: Fri Nov 12, 2004 2:49 pm
Posts: 7568
Location: Chexbres, VD, Switzerland
Oziphantom wrote:
The NES is not a good machine to learn 6502 on, its not interactive, it doesn't have any helper functions, you will need to spend ages learning the hardware and how it works before you can print hello world. You would be better off learning at least the basics of 6502 on something more sane like a C64 and then once you understand how loops, indirect indexing, memory works etc coming back to the NES.

Back then I've learnt 6502 assembly with NES and it was just fine.


Top
 Profile  
 
PostPosted: Wed Oct 24, 2018 12:51 am 
Online
User avatar

Joined: Sat Feb 12, 2005 9:43 pm
Posts: 10967
Location: Rio de Janeiro - Brazil
I too would like to jump in and disagree with the Commodore 64 suggestion, unless you actually have any interest in coding C64 games. Learning 6502 in the context of another machine won't help you much with becoming an NES developer, because you'll soon have to "unlearn" part of the stuff you learned, and being a beginner, it can be hard to tell apart what's pure 6502 and what's the machine's architecture, which might make the process unnecessarily confusing.

I do agree that learning 6502 before touching any of the NES-specific stuff is a good strategy, though. But instead of using another period machine such as the C64, which has its own idiosyncrasies, I second the suggestion of trying easy6502, which adds only the bare minimum on top of a raw 6502 so you can add a little interactivity to your programs. Michal Kowalski's 6502 Simulator does something similar, and is the tool I used to learn 6502 assembly myself, way back when.

So yeah, my advice is to either start out with a simulator that will allow you to practice 6502 programming without having to learn about (and get confused by!) hardware architectures you're not interested in, or dive straight into NES programming, as a lot of people here have done. You will probably mix up the CPU and the hardware's architecture in your head anyway, specially with no prior experience with computer architecture and low-level programming, but at least whatever you learn is stuff you can use for your end goal, even if you don't understand it 100%.

Another bit of advice: looking at your first post, I see it's full of typos and other errors, suggesting that you wrote it in a hurry. If you're serious about programming NES games, you can't do things in a hurry. You have to be very meticulous about how you express your ideas, because when you're working so close to the hardware, there isn't much room for error.


Top
 Profile  
 
PostPosted: Wed Oct 24, 2018 7:50 am 
Offline
User avatar

Joined: Sat Jan 09, 2016 9:21 pm
Posts: 493
Location: Central Illinois, USA
tokumaru wrote:
So yeah, my advice is to either start out with a simulator that will allow you to practice 6502 programming without having to learn about (and get confused by!) hardware architectures you're not interested in, or dive straight into NES programming, as a lot of people here have done. You will probably mix up the CPU and the hardware's architecture in your head anyway, specially with no prior experience with computer architecture and low-level programming, but at least whatever you learn is stuff you can use for your end goal, even if you don't understand it 100%.


I agree with just diving it. It's harder, but it's a lot easier to learn when you have a real project with a real goal in front of you. The reward of seeing sprites move around on a NES screen keeps you motivated.

_________________
My games: http://www.bitethechili.com


Top
 Profile  
 
PostPosted: Wed Oct 24, 2018 8:40 am 
Offline

Joined: Tue Oct 16, 2018 5:46 am
Posts: 19
I'm still on my first year learning assembly on the 6502 and I agree with what's been said about just diving in. Following a tutorial step-by-step was what got me started. Just go over it again and again until you can grasp something of what the code does and start thinking of how you can change it to do what you want to. And start with small goals!

I set up the goal that on day one I would have something compiled, even if it was just a ready-made tutorial with no code of my own. When I'd done that I started playing around with changing variables, graphic tiles and dissecting the code to grasp how they were combined to make bigger sprites (metasprites).

So in short, just dive in! Oh, and use the debugger in fceux or an equivalent in another emulator.


Top
 Profile  
 
PostPosted: Wed Oct 24, 2018 7:09 pm 
Offline

Joined: Mon Apr 07, 2008 6:08 pm
Posts: 333
Location: Missouri
tokumaru wrote:
Michal Kowalski's 6502 Simulator does something similar, and is the tool I used to learn 6502 assembly myself, way back when.


Even here, you have to learn the memory-mapped i/o of the virtual machine to see your code do anything. So it simplifies - but doesn't eliminate - the issue of separating pure machine code from the functionality of the system. Still, I agree it's a better platform for asm beginners than a real-life 6502 device.


Top
 Profile  
 
PostPosted: Wed Oct 24, 2018 7:18 pm 
Online
User avatar

Joined: Sat Feb 12, 2005 9:43 pm
Posts: 10967
Location: Rio de Janeiro - Brazil
strat wrote:
Even here, you have to learn the memory-mapped i/o of the virtual machine to see your code do anything.

I did acknowledge that these simulators add some bare bones "virtual hardware" on top of the 6502 so you can add interactivity to your programs. I personally didn't use any of that when learning ASM myself though, I merely used the debug tools to watch the CPU state and the memory. I didn't write anything interactive, I merely wrote subroutines that performed various tasks (array sorting, multiplication, etc.) and the auxiliary code needed to test them.


Top
 Profile  
 
PostPosted: Thu Oct 25, 2018 4:51 am 
Offline
User avatar

Joined: Wed Sep 21, 2016 8:55 am
Posts: 81
Location: Calgary.Alberta,Canada
tokumaru wrote:
I merely used the debug tools to watch the CPU state and the memory.


I did the same


Top
 Profile  
 
PostPosted: Thu Oct 25, 2018 8:59 am 
Offline
User avatar

Joined: Thu Apr 23, 2009 11:21 pm
Posts: 940
Location: cypress, texas
pwnskar wrote:
So in short, just dive in! Oh, and use the debugger in fceux or an equivalent in another emulator.


cybersmudge, welcome. :) Yes I dove right in, skipped C64, like many have said. Also try using Mesen as your emulator because it's debug features are beyond excellent. :) One other recommendation, that tokumaru suggested to me, is try using the asm6 assembler. It was written by loopy, a forum member, and in its readme he writes:
loopy in asm6's README.TXT wrote:
Yes, it's another 6502 assembler. I built it to do NES development, but you can probably use it for just about anything. Why use this instead of one of the other zillion assemblers out there? I don't know, but choice is good, right? :) I wrote it because I thought most others were either too finicky, had weird syntax, took too much work to set up, or too bug-ridden to be useful.
asm6 is written extremely well! :D

Also recommend you visit the nesdev wiki because it has potential to answer many specific NES related questions. :)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 15 posts ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 1 guest


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