Is there some complete documented/explained source code of a NES-Game?

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
nesProHackerNot
Posts: 4
Joined: Sun May 21, 2023 9:59 am

Is there some complete documented/explained source code of a NES-Game?

Post by nesProHackerNot »

I have been doing some research online and while there seem to be some decent tutorials, none of them are either well-structured/-documented in a beginner-friendly way (at least for a lazy dumba** like me) or go into enough actual in-depth coding required for an actual game.
I just now got to this forum and will try to find something here, but it would be tons easier if someone could point me to the source code of a game where there is at least to some extent explained what is going on.
Because thats how i learn best: Doing actual hands-on coding while its explained/ documented at the same time.
Maybe some of you know if stuff like this exists, Thanks in advance.
creaothceann
Posts: 611
Joined: Mon Jan 23, 2006 7:47 am
Location: Germany
Contact:

Re: Is there some complete documented/explained source code of a NES-Game?

Post by creaothceann »

My current setup:
Super Famicom ("2/1/3" SNS-CPU-GPM-02) → SCART → OSSC → StarTech USB3HDCAP → AmaRecTV 3.10
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Is there some complete documented/explained source code of a NES-Game?

Post by tepples »

Several of my GitHub repositories are of open-source NES games.
Concentration Room | Thwaite | Zap Ruder | RHDE: Furniture Fight

So are my cousin's.
Double Action Blaster Guys | Sliding Blaster | Nova the Squirrel
nesProHackerNot
Posts: 4
Joined: Sun May 21, 2023 9:59 am

Re: Is there some complete documented/explained source code of a NES-Game?

Post by nesProHackerNot »

Thanks bunches.
Though i pity the fool (me) who has to figure out what is going on there without any prior 6502/ NES experience.
Guess ill just complete the available tutorials for now and see if any of the code makes more sense then.
I know this is an old platform, so there is obviously not as much material to go with.
But what would be nice for a noob like me, was something tutorial-style like nerdy nerds, only extended to cover a complete game from start to finish, with the thought process behind the code explained.
Well ill just see how far i get with what i got.
Dont be afraid to keep the suggestions coming tho, maybe if there is enough material to go with, eventually ill find something that makes sense ;)
User avatar
Individualised
Posts: 310
Joined: Mon Sep 05, 2022 6:46 am

Re: Is there some complete documented/explained source code of a NES-Game?

Post by Individualised »

If you want more period-accurate code I believe the Boogerman bootleg source code was open sourced a while back
Oziphantom
Posts: 1565
Joined: Tue Feb 07, 2017 2:03 am

Re: Is there some complete documented/explained source code of a NES-Game?

Post by Oziphantom »

trying to learn how to program 6502 from reading 6502 source code is like trying to learn Greek from reading the Iliad without knowing any Greek or another version of the Iliad by heart.

The basics of what you want don't exist for the NES it was not a platform one could just develop for, however on the Commodore 64 they are plentiful see this section https://commodore.bombjack.org/commodor ... Y_LANGUAGE were the Buttefield book is "the book" however I prefer the "Bruce Smith" book my self. Find one that speaks to you, there is a foreign language section elsewhere on the site if English is not your native language and you would understand one of the `FIGS` languages better. For the art of how and why to make games see https://commodore.bombjack.org/commodor ... -games.htm the Compute! books are particularly good in this regard, although you may wish to stick the "machine language" books as most are in BASIC.

These books will give you a solid foundation in understanding how to solve problems in 6502 and ways to solve action game basics. With a tutorial such as Doug's or NerdyNights you should be able to apply the input and graphics differences to the make them for the NES with relative ease.

I have Qwak for the SNES but not NES however the core logic is the same for the C64, CX16 and SNES versions of which the concepts of OAM, VBlank limits and input style from the SNES are very similar to the NES https://github.com/oziphantom/QwakSNES/ ... Bank80.asm it is however extensively documented with a comment for almost all steps of the engine.
User avatar
donato-zits-
Posts: 47
Joined: Fri Jun 03, 2022 11:14 am
Contact:

Re: Is there some complete documented/explained source code of a NES-Game?

Post by donato-zits- »

Oziphantom wrote: Mon May 22, 2023 7:25 am

The basics of what you want don't exist for the NES it was not a platform one could just develop for, however on the Commodore 64 they are plentiful see this section https://commodore.bombjack.org/commodor ... Y_LANGUAGE were the Buttefield book is "the book" however I prefer the "Bruce Smith" book my self. Find one that speaks to you, there is a foreign language section elsewhere on the site if English is not your native language and you would understand one of the `FIGS` languages better. For the art of how and why to make games see https://commodore.bombjack.org/commodor ... -games.htm the Compute! books are particularly good in this regard, although you may wish to stick the "machine language" books as most are in BASIC.
sorry for maybe go a little out of the subject´thread
I find this books and downloads a some of it more or less two years ago I think so...there was a loot of this kind of magazines in territories like europe or northAmerika(dont no exactily) but certainly nothing like get one of then for true... anyway particularly my aim is yet a economicmachine build for MMC1, dont no if some of then trully helps to build a a non mapper 0 for the Family(FCS).
"NES it was not a platform one could just develop for" I try to understand what do you means here ^^ Family is(was) like a computer outside a computer right?is bout that your words?--about the foreing language section do you typing bout the google translate? for the Standard English/formal English/cultured norma this artificial works a little well and still just not personal kind of energy,I mean definitly really no good(Noam Chomsky its not ignored here...) but yet getting outside of this,in colokial language...is like try to trow bones whit rock meat to dogs, we can't runway of the fact that this Family stuff just doent exist in more or less, only to trow a number...75% of the world, getting FIGS and others inside.
Oziphantom
Posts: 1565
Joined: Tue Feb 07, 2017 2:03 am

Re: Is there some complete documented/explained source code of a NES-Game?

Post by Oziphantom »

"NES it was not a platform one could just develop for" - The Commodore 64 was an open machine, and you could buy books, get technical details about what the Chips such as VIC-II, SID, CIA do, and any person could make a program for the Commodore 64 and sell it. It was encouraged by Commodore. To make software for the Commodore 64 you only need a Commodore 64, you can make software on it without any other tool, hardware or software.

The NES is private, and to make software for it, Nintendo has to approve you to be allowed. You have to pay money to Nintendo to get a License to make software. You then have to buy custom tools and hardware. This cost $100,000s to get. You have to sign an Non-Disclosure Agreement (NDA) with Nintendo to get information about what the chips do and how to program them. So in the 80s and 90s the only people who knew how to make a NES game were the low number of people who worked at large game companies who had the money to buy the License and hardware.

So there are no "how to program the NES" books unlike the Commodore 64 which has hundreds of books. Also all NES documents assume you know how to program 6502 and another computer, they are not beginner documents. While the Commodore 64 books are written for people who have never used a computer before.

For FIGS+
https://commodore.bombjack.org/commodor ... german.htm this has programming books in German.
https://commodore.bombjack.org/commodor ... guages.htm has books in Dutch, Danish, French, Italian, Spanish and Finnish. But a limited number of topics.
This page has some Hungarian and Swedish documents http://cbm.6502.org/etexts-pr-name
Commodores were made in Argentina by Drean so there will also be official documents in Argentine Spanish and Brazilian Portuguese somewhere on the net.
There is a also a "Persian" forum that may be able help you get documentation in Arabic. http://www.c64persian.66ghz.com/?i=1
User avatar
Individualised
Posts: 310
Joined: Mon Sep 05, 2022 6:46 am

Re: Is there some complete documented/explained source code of a NES-Game?

Post by Individualised »

Oziphantom wrote: Fri May 26, 2023 7:31 am There is a also a "Persian" forum that may be able help you get documentation in Arabic. http://www.c64persian.66ghz.com/?i=1
Persian isn't the same language as Arabic, Persian is spoken in Iran
Oziphantom
Posts: 1565
Joined: Tue Feb 07, 2017 2:03 am

Re: Is there some complete documented/explained source code of a NES-Game?

Post by Oziphantom »

Ah Persian is a synonym for Farsi. Thank you for bringing it to my attention.
Pokun
Posts: 2681
Joined: Tue May 28, 2013 5:49 am
Location: Hokkaido, Japan

Re: Is there some complete documented/explained source code of a NES-Game?

Post by Pokun »

They are not even related as Persian/Farsi is an Indo-European language much like English, while Arabic is Semitic, though the latter has some similarities to Indo-European language (such as grammatical gender) and modern Persian has a lot of Arabic loan-words.
Post Reply