| |||
Views: 88,434,290 |
Main | FAQ | Uploader | IRC chat | Radio | Memberlist | Active users | Latest posts | Calendar | Stats | Online users | Search | 04-19-24 04:18 AM |
|
Guest: Register | Login |
0 users currently in ROM Hacking | 1 guest |
Main - ROM Hacking - If you've ever programmed the NES... | New thread | New reply |
RetroRain |
| ||
Fuzz Ball Level: 66 Posts: 551/994 EXP: 2436723 Next: 25128 Since: 09-30-07 Last post: 1927 days Last view: 950 days |
NOTE: I posted this in ROM hacking instead of Programming because I believe it relates more to the NES and ROMs
A question for those who have ever programmed the NES. Do you need to look at NES documents, or are you able to just program without looking at anything else? I find that I have to look at a the document nestech.txt, because I can't remember everything, but I was just wondering for those of you who have made small NES demos or homebrews, or have done any kind of NES programming from scratch, who are experienced programmers, if you can program the NES without looking at the specs. It wouldn't be considered "amateur-ish" to have to look right? What made me ask this question? Just looking at the asm code from programmers who made small NES demos. I feel like that maybe I'm not experienced enough because I have to always look at certain documentation. For example, while I am familiar with how the NES operates, and I know the basics of C, when I was following a NES tutorial to make a demo, there were commands that I never recognized, like: .org .dw .bank Are these considered ASM or NES-specific commands? And I never used the stack. Is it possible to get by without it? Probably because I think documentation on it doesn't answer my questions. How many set of numbers can you place on a stack, or is it unlimited, because the stack is not a RAM address right? I've seen no indication that it is. All I know is that it allows you to place numbers on it temporarily so you can quickly use them again. ____________________ My YouTube Channel |
NovaYoshi |
| ||
Red Goomba Level: 15 Posts: 2/35 EXP: 14350 Next: 2034 Since: 02-24-11 Last post: 4191 days Last view: 1280 days |
Just skimming over the original post, and I probably did a terrible job at explaining stuff, but...
Posted by RetroRain I look all the time, but decreasingly so. I started to remember the register names (Easier than memorizing addresses) instead of having to look them up each time, but I still have to look up the PPUCTRL flags, PPUMASK flags, and OAM flags each time I deal with them. Posted by RetroRain As far as I can tell they're quite common in 6502 assemblers. In the one I use (ca65), .dw is called .addr (sticks an address directly into the ROM), and .org doesn't even exist at all. (normally says "this code starts at this address" ) Posted by RetroRain The stack's 256 bytes big, and it resides in RAM from $100 to $1ff. ____________________ |
blackhole89 |
| |||
The Guardian Moloch whose eyes are a thousand blind windows! Level: 124 Posts: 3593/4196 EXP: 21520458 Next: 316143 Since: 02-19-07 From: Ithaca, NY, US Last post: 464 days Last view: 77 days |
|
NovaYoshi |
| ||
Red Goomba Level: 15 Posts: 3/35 EXP: 14350 Next: 2034 Since: 02-24-11 Last post: 4191 days Last view: 1280 days |
Posted by blackhole89 Special registers? wut You'll need the stack for subroutine calls and interrupts. It's not really THAT scary... ( it scares me in x86 more ) ____________________ |
RetroRain |
| ||
Fuzz Ball Level: 66 Posts: 552/994 EXP: 2436723 Next: 25128 Since: 09-30-07 Last post: 1927 days Last view: 950 days |
Posted by blackhole89I'm sorry, I should have been more specific. I meant registers, like $4014 (Sprite DMA Register), $2000 (PPU Control Register 1), etc. Wouldn't it be pretty hard to remember every register for a specific system without having to look it up? I was just wondering if experienced NES programmers had these memorized by heart, and didn't have to refer to a document? ____________________ My YouTube Channel |
Matrixz |
| ||
Ninji Level: 35 Posts: 159/225 EXP: 266219 Next: 13717 Since: 04-07-07 From: Norway Last post: 3099 days Last view: 1776 days |
When i started to look at NES asm, i looked up the documentation all of the time, especially to know the details about those registers which contain bits, like $2000 and $2001.
Don't worry about it. also, stack example:
|
kuja killer |
| ||
Level: 55 Posts: 223/628 EXP: 1243151 Next: 71038 Since: 03-20-07 From: Lake Havasu City, Arizona Last post: 274 days Last view: 42 min. |
yea for me, i look at documents when i need to, specifically when i dont remember what something does. Cause you cant just memorize everything obviously. Goes for all my megaman 3 stuff. I got 2 main notepad documents for megaman-odyssey i need open whenever im doing coding on stuff, so i can remember what commands and jumps and stuff to do for...whatever. Sorry if im not making much sense.
everything i do for odyssey is 100% pure custom in terms of programming for NES. |
blackhole89 |
| ||
The Guardian Moloch whose eyes are a thousand blind windows! Level: 124 Posts: 3594/4196 EXP: 21520458 Next: 316143 Since: 02-19-07 From: Ithaca, NY, US Last post: 464 days Last view: 77 days |
|
Ailure |
| ||
Hats Steam Board2 group Level: 121 Posts: 3856/3965 EXP: 19767645 Next: 289051 Since: 02-19-07 From: Sweden, Skåne Last post: 3294 days Last view: 2045 days |
As long you remember to have a equal numbers of push and pull in your code, the stack shouldn't really be that scary to use. If you manage to run out of stack space, that's probably a sign that your code is nested too deep anyway. I can't personally think of any examples of where that can easily happen on NES, but then most of the coding I done on the NES is rather simple.
For the most part you can get away with generic 6502 documentation, especially when it comes to opcodes and such (and I generally find it better than NES-spefic documentation). I used NES spefic documentation for the location of registers and such, and generic 6502 for opcodes (the biggest difference between a generic 6502 and the NES 2A03 opcode-wise is the lack of decimal mode as far I saw. Someone more experienced probably can point out way more differences.). ____________________ AIM: gamefreak1337, MSN: Emil_sim@spray.se, XMPP: ailure@xmpp.kafuka.org
|
never-obsolete |
| ||
Rat Level: 24 Posts: 73/96 EXP: 74452 Next: 3673 Since: 02-22-07 From: Phoenix, AZ Last post: 2589 days Last view: 2589 days |
After awhile you'll have it memorized. Especially for the NES, which only has a handful of registers compared to some of the other systems. I mostly need to reference cycle counts nowadays, but in the beginning I couldn't go more than 20 minutes without having to page through a document. |
Main - ROM Hacking - If you've ever programmed the NES... | New thread | New reply |
© 2005-2023 Acmlm, blackhole89, Xkeeper et al. |
MySQL - queries: 62, rows: 91/92, time: 0.016 seconds. |