new newbie !

Are you new to 6502, NES, or even programming in general? Post any of your questions here. Remember - the only dumb question is the question that remains unasked.

Moderator: Moderators

Post Reply
User avatar
qtoyoda
Posts: 60
Joined: Sun Feb 13, 2011 5:04 pm
Location: Canada

new newbie !

Post by qtoyoda » Tue Feb 15, 2011 10:59 pm

i just started reading a bunch of the forums on this site and realized tht the newbies ussually write a little intro about themselve (I DIDNT DO THIS) so here it goes:

i live in canada and am only in gr 8. i recently started getting very addicted to old video games (particularly rpgs) ever since i played FF1 for the nes :) i quickly began trying to ref as much hockey as i could to get money (my very sad low income...) and shortly after would buy nintendo with it ! i now have like 11 consoles +160 games and 2 tvs in my room... my favourite game is earthbound :) which i logged +60 hours on in like 2 weeks even with school. i then purchased earthbound "zero" for the nes from gamereproductions.com and shortly after that got an idea. to reproduct my own cart. I thot tht no other hobbiest had done this (VERY overoptimistic) and then while googling every possible combination of words read a bunch of stuff about it and found this site fairly often... i decided that this community seemed very helpful kind and i signed up! so here i am now writing a rlly long and boring intro...

anyways getting back to the point, i am stilll waiting to buy a eprom programmer (now know to get a usb one, thx for the info guys :) ) and am waiting for some other stuff like a gamebit driver and stuff. so in the meantime i thought i would eventually want to make my own game! i have looked up a bunch of 6502 programming docs and read them all (24/7, staying up at night, sneaking it during class etc (plz dont tell my mom) haha) and still dont rlly understand it. i cant reallly get anything to work unless using a step by step tutorial. :(

i have no programming experience and very little rom hacking experience (thx to nes mods tuts for those ) just like chaging the graght using TLP and chging the txt and a bit of pallette stuff.

For my first game all i want in a sprite (dont care wut it looks like, a circle?) tht i can move around with the Dpad and a background tht has a design (dont really care wut it looks like just something ) does this seem doable? i would like to make sure all my programming would be able to work on an actual NES if i ever decide to do that :)

HOLY COWW THT WAS LONG! thanks :)

WJYkK
Posts: 60
Joined: Thu Dec 24, 2009 12:23 am
Location: Igloo and Bear Land (Canada)
Contact:

Would you please spell properly dammit!

Post by WJYkK » Wed Feb 16, 2011 12:20 am

Er, you might want to start with the Nerdy Nights tutorial. However, I must warn you, if you think that placing a sprite is as easy as "PutSprite(sprite.png,x-coordinate,y-coordinate)"... you will be mistaken.

Sadly, I have not found any better tutorials, as they're either written by newbies a la GbaGuy, explain lots of complex stuff at once, or don't start from the basics at all.

User avatar
qtoyoda
Posts: 60
Joined: Sun Feb 13, 2011 5:04 pm
Location: Canada

Post by qtoyoda » Wed Feb 16, 2011 9:35 am

i have been reading the nerdy nights tutorial, and ino it is a lot harder than tht, but its a goal :)

User avatar
Kasumi
Posts: 1292
Joined: Wed Apr 02, 2008 2:09 pm

Post by Kasumi » Wed Feb 16, 2011 2:07 pm

One day, (probably after my current project is finished) I think I will write a tutorial. But it will probably end up being in the category of "explains too much technical stuff at once." I always seem to do that to the poor people I try to help :(

Anyway, welcome. Glad to see another Mother/Earthbound fan around.

User avatar
qtoyoda
Posts: 60
Joined: Sun Feb 13, 2011 5:04 pm
Location: Canada

Post by qtoyoda » Wed Feb 16, 2011 4:27 pm

ya i was lucky enuf to get a copy of earthbound from my local craigslist :) got it and chrono trigger from the same guy for $120 not bad, then bought mother 2 for super famicom and mother 1 for famicom and earthbound zero, trying to get mother 3 deluxe box now... so dmn expensive tho ! if u ever make a tutorial tht wuld be great even tho i probs wouldnt understand it... id enjoy reading it anyways :) itss like trying to read a 500 pg novel when ur in gr 2 haha, u dont understand a thing but enjoy it anyways and if i ever do start to understand the language then it might help me increase my knowledge . the main thing i dont understand is what exactly the accumulator is.... and how it work, i understand all tht hex and binary stuff and like storing stuff in the certain parts on the memory... also i dont quite understand how too program in the graphix, but im unable to do like any programming cus the A, X, and Y are all the registers and i dont know how to use them welll (pretty big problem ino) anyways thxs for welcoming me :)

tepples
Posts: 21839
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Post by tepples » Wed Feb 16, 2011 5:36 pm

qtoyoda wrote:enuf
PROTIP: You'll look more serious if you make an effort to 1. spell correctly, 2. use capital letters correctly, and 3. use punctuation correctly.
the main thing i dont understand is what exactly the accumulator is.... and how it work
It's a register inside the CPU. Various instructions do arithmetic (e.g. ADC, SBC, CMP) and logical (e.g. ORA, AND, EOR), taking one operand from the accumulator and putting the result in the computer.
im unable to do like any programming cus the A, X, and Y are all the registers
X and Y are often used as the indices for two arrays.

User avatar
qtoyoda
Posts: 60
Joined: Sun Feb 13, 2011 5:04 pm
Location: Canada

Post by qtoyoda » Wed Feb 16, 2011 5:41 pm

Thanks for the tip. I'm too used to facebook. So the accumulator pretty much is how everything moves and respondes on the screen? Using addition, subtraction and logical? would you mind explaining the logical? and what they do? thanks :)

User avatar
Memblers
Site Admin
Posts: 3786
Joined: Mon Sep 20, 2004 6:04 am
Location: Indianapolis
Contact:

Post by Memblers » Wed Feb 16, 2011 6:02 pm

I was 15 when I started learning how to program, I started out taking source code to a demo that was available and started changing stuff in it. You could try that with some of the sources on the main page of the site, that helps with the first battle - just getting the assembler to produce a properly formatted ROM. I first hacked the Mouser ROM (not recommended these days), and also learned from SnowBro's and Chris Covell's stuff.

The accumulator is the brain of the 6502, pretty much. Adds, subs, logical only works on A. That's where the result ends up, anyways.

The logical stuff btw is AND, OR, and EOR (exclusive or). Essentially, you use those operations to clear, set, or invert individual bits (respective in that order). This doc has some examples of using the AND, ORA, EOR, and other instructions.
Here is another tutorial that's on this site.

Doing stuff with the screen using the PPU is a little different - it's a whole separate processor. From the CPU, you write to the video memory through a port (the $2006-$2007 registers listed in the docs).
Last edited by Memblers on Wed Feb 16, 2011 6:03 pm, edited 1 time in total.

tepples
Posts: 21839
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Post by tepples » Wed Feb 16, 2011 6:03 pm

To learn about the "logical", see Bitwise operation and Mask.

Yes, the vast majority of pieces of information seen on the screen have passed through the accumulator. For example, moving an object across the screen involves loading the current position from a variable in memory into the accumulator, adding its velocity from another variable, and storing the position back to the first variable.

User avatar
Kasumi
Posts: 1292
Joined: Wed Apr 02, 2008 2:09 pm

Post by Kasumi » Wed Feb 16, 2011 6:34 pm

One way to look at the accumulator, X and Y is that they store a number outside of RAM/ROM. No more, no less.

3gengames
Formerly 65024U
Posts: 2269
Joined: Sat Mar 27, 2010 12:57 pm

Post by 3gengames » Wed Feb 16, 2011 6:59 pm

I like to think of it as this:

RAM=Array of variables the processor stores and reads.

A register=Byte/Variable that the processor is editing and using for math at that moment.

X/Y are pointers to the RAM somethimes for some operations, and I even use them for scratchpad sometimes (TAY and TAX instructions if I only need to use one byte of RAM and not make some scratchpad for it or even use the stack other times)


Hope that helps some. If you want, message me I'll help you work on a couple examples of how to do stuff on the NES.

Post Reply