Search found 132 matches

by electro
Fri Feb 01, 2008 8:12 am
Forum: Newbie Help Center
Topic: Help with some code for reading keypresses
Replies: 22
Views: 6880

Now I guess I need to know what the binary number is for each individual key on the keypad, so that I can then "mask" them with the "AND" operation? I was given "right" and "start". LDA button_state AND #%10000000 ; check high bit (right) BNE right_is_down LDA...
by electro
Fri Feb 01, 2008 5:54 am
Forum: Newbie Help Center
Topic: I want to learn 6502 asm but don't know where to start
Replies: 17
Views: 6395

"Atari Roots", I believe, is a great book for a beginner (like myself). It doesn't lay on too much extra tech stuff. Just plain english, easy to undertsand. I found the web calculator, very helpful for converting between hex and binary numbers. http://www.easycalculation.com/hex-converter....
by electro
Thu Jan 31, 2008 2:30 pm
Forum: Newbie Help Center
Topic: Help with some code for reading keypresses
Replies: 22
Views: 6880

Thanks for the help, really appreciate it. I understand this now: updatejoy: ; first, strobe the joypad LDA #1 STA $4016 LDA #0 STA $4016 ; now we're going to loop 8 times (once for each button), and ; rotate each button's status into our button_state variable LDX #$08 ; set X to 8 (the number of ti...
by electro
Thu Jan 31, 2008 8:59 am
Forum: Newbie Help Center
Topic: Help with some code for reading keypresses
Replies: 22
Views: 6880

Almost. What was already in button_state on the previous run through the loop? Or to put it another way, "shifting all the bits" of what? I thought that "ROR button_state" meant that we perform ROR on the number in the accumator after "LSR A", and then store the result...
by electro
Thu Jan 31, 2008 7:40 am
Forum: Newbie Help Center
Topic: Help with some code for reading keypresses
Replies: 22
Views: 6880

LDX #$08 ; set X to 8 (the number of times we want to loop) joyloop: LDA $4016 ; get button state LSR A ; shift it into the C flag ROR button_state ; rotate C flag into our button_state variable DEX ; decrement X (our loop counter) BNE joyloop ; jump back to our loop until X is zero Just wondering ...
by electro
Wed Jan 30, 2008 7:29 am
Forum: Newbie Help Center
Topic: Help with some code for reading keypresses
Replies: 22
Views: 6880

When you say "what you actually get is $40 if the button is not pressed, and $41 if the button is pressed." Those hex numbers are being stored in the accumulator? Yes. You get some of the bits from the controller circuitry, and you get some of the bits left over from the last byte of the ...
by electro
Wed Jan 30, 2008 6:29 am
Forum: Newbie Help Center
Topic: Help with some code for reading keypresses
Replies: 22
Views: 6880

Thanks a lot for your help. This is a lot fancier than what I've seen. I think I'm understanding most of what you described. I have to digest it. When you say "what you actually get is $40 if the button is not pressed, and $41 if the button is pressed." Those hex numbers are being stored i...
by electro
Tue Jan 29, 2008 6:25 pm
Forum: Newbie Help Center
Topic: Help with some code for reading keypresses
Replies: 22
Views: 6880

Help with some code for reading keypresses

Hi, This code was cut and pasted from "Rwin's" "Jumpy" program which just displayed a little character that jumped up and down and could be moved left and right with the keypad. I was only interested in the key reading section. I left out the sub routines. That's where I'll be ad...
by electro
Tue Jan 29, 2008 2:09 pm
Forum: Newbie Help Center
Topic: Using neasm with jnes?
Replies: 15
Views: 6010

Each emulator I have ever seen have fully configurable buttons, including the direction keys, which can be substitued by any keyboard keys or joypad buttons you want. Most emulators use the arrow keys by default for the directionnal arrows, but maybe your emulator does require you to specify all jo...
by electro
Tue Jan 29, 2008 2:00 pm
Forum: Newbie Help Center
Topic: I want to learn 6502 asm but don't know where to start
Replies: 17
Views: 6395

Re: I want to learn 6502 asm but don't know where to start

sweet. someone used it!! :D

anyway, send me a message on aim or look for me in the #nesdev channel if you wanna collab with another noob. i'm sure i'd pay a lot more attention and learn faster with an extra person working with me.
Sounds good, would be very helpful.

Thanks,
Tony
by electro
Tue Jan 29, 2008 12:20 pm
Forum: Newbie Help Center
Topic: I want to learn 6502 asm but don't know where to start
Replies: 17
Views: 6395

Re: I want to learn 6502 asm but don't know where to start

Can any one help? I read the docs but don't understand them. Hi, This is a relatively old post but I'm also just getting started. Check out this archive of free e-books on machine language (assembly language). Atari Roots is a good one. http://www.atariarchives.org/ Also the C64 manual chapter 5 ha...
by electro
Tue Jan 29, 2008 11:24 am
Forum: Newbie Help Center
Topic: Using neasm with jnes?
Replies: 15
Views: 6010

Using neasm with jnes?

I am just starting to explore working with the NES, I have no previous programming experience. So I am using nesasm which is working out nice. I tried to load a rom which is supposed to move a little jumping guy (character) left and right in jnes and noticed the arrow keys on my PC don't do anything...