Best resources for learning NES programming?

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

User avatar
clueless
Posts: 496
Joined: Sun Sep 07, 2008 7:27 am
Location: Seatlle, WA, USA

Re: Best resources for learning NES programming?

Post by clueless »

NESICIDE wrote:
clueless wrote: One very memorable assignment was to write a program to solve the "peg solitaire" game using a depth-first recursive solver. For my final
Like this?
And this?
Those URLs are identical. :)

Close. Ours was a 7x7 grid, with 16 cells completely not usable (2x2 square in each of the four corners), and the center peg already taken. The goal was to end with the final peg in the center.

Code: Select all

. . X X X . .
. . X X X . .
X X X X X X X
X X X O X X X
X X X X X X X
. . X X X . .
. . X X X . .
Mine took ~3 hours on a P90 to solve, IIRC.

I redid mine years later in "C" and didn't use recursion. I kept a stack of pegs moved, and just iterated in place. I could find the first solution much faster on a Celeron 400 MHz. I don't recall how much faster. I do remember that I was trying to find a way to eliminate all of the symmetric solutions and find just the unique ones. But since it wasn't an assignment, and by then I was really busy, I kinda gave up on it. :(

The point of the original assignment was to study a use for recursion, but also (and more important imho) to learn depth-first search strategies.

Later in the same class we did a depth-first "min-max" search to write a simple AI to play some game. I don't recall what. It might have been tic-tac-toe.

OMG- this reminds me. My company interviewed a recent college graduate for an entry-level programming position. His very first interview question was supposed to be an ice-breaker, but also designed to gauge his intelligence. The interviewer (the Senior developer) challenged him to a game of tic-tac-toe. The candidate got to go first. The candidate lost. The interview was terminated right then. He never made it to the really important interview question: "Why was TK-421 not at his post?"
User avatar
cpow
NESICIDE developer
Posts: 1097
Joined: Mon Oct 13, 2008 7:55 pm
Location: Minneapolis, MN
Contact:

Re: Best resources for learning NES programming?

Post by cpow »

clueless wrote: Like this?
And this?

Those URLs are identical. :)
DOH! Corrected them in this reply! The second puzzle was infinitely more interesting from a complexity perspective. :shock:
clueless wrote: Close.

Code: Select all

. . X X X . .
. . X X X . .
X X X X X X X
X X X O X X X
X X X X X X X
. . X X X . .
. . X X X . .
Yay! Now I have a third puzzle to solve. heh
clueless wrote: Mine took ~3 hours on a P90 to solve, IIRC.
I seem to remember mine taking similar time. However, once I realized that the board could be represented in binary and a board "visual" fit into 15 bits, and each move could be represented by a mask involving three of the 15 bits (exchange two, remove one), I was well on the way to a very quick solution involving 14 arrays of unsigned shorts each less than 32,768 wide.

The second puzzle solver uses the same concept but on 64-bit (8x8 square) unsigned long long's. 8)
User avatar
Hamtaro126
Posts: 786
Joined: Thu Jan 19, 2006 5:08 pm

Post by Hamtaro126 »

I know this is long, It can be an intro to me also, So I am sorry for anything that I do wrong here

I once was not able to do anything, Then studied on Game creators called ZZT and MegaZeux (Both Famous Rougelike GCS), Then learned more to do NES/SNES Hacking, Currently an Intermediate NES ROMHacker.

Most of my hacks revolve around SMB1 and less likely SMW (Super Mario World).

My first true romhack that I am recreating currently: Super Mario Bros. 1 with CHR-RAM (ROM Expansion, Was UxROM, Turning it to MMC1), First released in (Acmlm)Board 2 @ Kafuka, but I must replace a newer, smaller routine for it to be rereleased.

Another one is Super Mario Bros. 1 without Sprite 0, Which I done success on several times. Might add a status screen to complete it!

TIPS:
This is why you must practice on programming, Or there could be problems waiting to happen,

That happened to me to several of the first visits, Plus ask questions that are valid questions at times, Make points for others when they need it.
Post Reply