Jump to content
Site switched to HTTPS Read more... ×
jstout

NES Programming Info

Recommended Posts

I'm hoping the links work as this would be cleaner than having a few dozen posts thrown all about.  This is still a work in progress with more in the future and the below files are still subject to changes/improvements as I'm not happy with all of them.  All demos should contain source files for the ca65 assembler and a working rom.  For those that read these please let me know of things that are good, bad, and need much more clarification.


 


Complete Folder


 


6502:


Number Formats


Registers


Processor Status Flags


Opcodes - Transfer Operations


Opcodes - Other Operations


Opcodes - Programming Model


Addressing Modes


Complete Opcodes


Basic Math


 


NES Programming:


Memory Map


NES Header


PPU Registers


Skeleton ROM


Palettes            Demo


Sprites             Demo


Controllers         Demo


Backgrounds         Demo


Scrolling           Demo


Sprite 0 Hit        Demo


Animated Sprites    Demo


Camera Window       Demo


Collision Detection Demo


MMC3                Demo

Edited by jstout

Share this post


Link to post
Share on other sites

This I understand:

attachicon.gifMega Mario22.png

 

You were always over my head. sorry..

 

I have a feeling your post is off-topic as editing only TSB isn't the main subject.  From the image, its obvious that you know where things are located from yours/others findings and the notes attached.  But what else do you know about that info that you understand?

Share this post


Link to post
Share on other sites

I have a feeling your post is off-topic as editing only TSB isn't the main subject.  From the image, its obvious that you know where things are located from yours/others findings and the notes attached.  But what else do you know about that info that you understand?

No, sorry, I dont know why I posted that image link (finding stuff and making a tutorial, anyone can do it). I was talking about the "6502 assembler for the NES" (not any rom in particular)

 

The LINK WAS SUPPOSED TO BE: http://romhacking.org/docs/asm_nes/apend11.html THIS I CERTAINLY CAN UNDERSTAND!!!

 

Because I dont have any knowledge in "programming" whatsoever, I found your links a little (very) "incomprehensible" for me. Yes, you are right I DONT UNDERSTAND shit!. But since you say TSB is not  the only subject you are after, (that was exactly the same thing I wanted to link before) there are hundreds of "NEW-HOME BREWS" based not only in hacking, But in UNDERSTANDING what you are doing with the assembler! (that is the whole point)

 

I bet you can even learn something from datasteve and DrKoopa themselves (who are also programmers, not hackers like me, and they can make really "digestible" introductions to the 6502 assembler. Just like 10 steps back from where you start)

 

Y mas aun, si alguien habla español pueden checar las traducciones que ha hecho Darkwizard a los distintos tutoriales del lenguaje ensamblador y de otras herramientas de hackeo:

http://romhackhispano.org/principal.php

Share this post


Link to post
Share on other sites

yeah, kinda like pambazos is saying, I am more of (and interested in being) a "TSB hacker" than a "NES programmer".  TSB-specific examples would be the best for me, too.

This is all killer stuff. If you wanted TSB specific stuff you should have spoken up when he posted his outline of what was going to be covered.

 

I've always wondered about the NES camera and scrolling.doc set me straight. Thanks for this again.

Share this post


Link to post
Share on other sites

I agree. Not trying to be a dick, but the title of the thread is NES programming. This is what we asked jstout to do. Give tutorials on asm.

 

all I was saying was that I was hoping that some of the examples would be TSB-based.  I wasn't trying to piss on the information given.  I just have a hard time taking this sort of stuff out of TSB context.  

 

anyways, I deleted my post like a minute after I posted it, dick.

Edited by buck

Share this post


Link to post
Share on other sites

all I was saying was that I was hoping that some of the examples would be TSB-based.  I wasn't trying to piss on the information given.  I just have a hard time taking this sort of stuff out of TSB context.  

 

anyways, I deleted my post like a minute after I posted it, dick.

 

I'll see what I can do Buck with making some of the demos like TSB.  I wanted to try to make the demos flowing so the entire code setup was vastly overhauled with each segment as TSB does a lot of advanced techniques with some that aren't even possible without the MMC3 mapper.

Share this post


Link to post
Share on other sites

I dont see why ANYBODY should be pissed at all!!. This is a TSB-BASED forum in the first place. It should be ok if someone tried to keep it in that same line.


 


Jstout, you got me all wrong. If I say I dont understant a thing you are saying, it is almost completely MY PROBLEM. You are doing a fantastic job here and you know it!


Since it is my problem, I had to solve it somehow. I found a "comprehensible" solution in the Tutorials at romhacking.org to KEEP UP WITH YOUR TOPIC, thats all!. (because we all know in the end, you will still head in to that TSB direction anyway and come up with another "FANTASTIC FEATURE" for it). Most of us enter a forum because of our own interest, not to hassle.


Now, for being so "forthright" (or a dick)... for that maybe I am responsible and I'm sorry. BUT if someone takes it personal when I say: I need "additional support" to catch up with you, then it is almost completely NOT MY PROBLEM.


 


If I were making such a great contribution to this game, I wouldnt be pissed at all, in fact I WOULD BE SMILING ALL FUCKING DAY LONG!!!


Share this post


Link to post
Share on other sites

I dont see why ANYBODY should be pissed at all!!. This is a TSB-BASED forum in the first place. It should be ok if someone tried to keep it in that same line.

Jstout, you got me all wrong. If I say I dont understant a thing you are saying, it is almost completely MY PROBLEM. You are doing a fantastic job here and you know it!

Since it is my problem, I had to solve it somehow. I found a "comprehensible" solution in the Tutorials at romhacking.org to KEEP UP WITH YOUR TOPIC, thats all!. (because we all know in the end, you will still head in to that TSB direction anyway and come up with another "FANTASTIC FEATURE" for it). Most of us enter a forum because of our own interest, not to hassle.

Now, for being so "forthright" (or a dick)... for that maybe I am responsible and I'm sorry. BUT if someone takes it personal when I say: I need "additional support" to catch up with you, then it is almost completely NOT MY PROBLEM.

If I were making such a great contribution to this game, I wouldnt be pissed at all, in fact I WOULD BE SMILING ALL FUCKING DAY LONG!!!

I "KNEW" I should have began my post with ""with all DUE respect"""".... Ok, I get "it", IT was a "dick" statement"!" Edited by drunken_honkey

Share this post


Link to post
Share on other sites

TSB does a lot of advanced techniques with some that aren't even possible without the MMC3 mapper.

 

This statement is being supremely undervalued. You need to understand the above information to even try to crack the case of what TSB is. There is no jumping straight to TSB programming. (Unless you are MT Remix and then and only then do you rewrite the garbage code that is TSB3.)

 

Jstout is doing a great job of starting from the core and building on it. 

Share this post


Link to post
Share on other sites

I delurked here to just say that I am not a programmer or hacker of any level, and I have found these docs extremely interesting.  The Camera Window one in particular, and Traps, answered a long-standing question of mine about scrolling in these kind of games.  I assume the trap would then just be oriented in a different manner in an up-down game like, say, 10 Yard Fight?


 


Can you "trap" on something other than the ball in TSB?  I know there are hacks to control other off-the-ball players, but can the camera be trapped onto them instead of the ball (AFAIK all these hacks still keep the "trap" on the ball)?  So you could control a WR downfield and have the camera locked on him instead?  Or "trap" on whatever defensive player you control?


 


 


The Controller one?  Interesting as well to see how that's mapped.  So it flips a value rapidly between 1 and 0 for "on"/"off" in order to constantly check for button status, is the gist I get.


 


I also have enjoyed the Collision Detection one, I always wondered how that worked in general in a game.


 


 


 



"The background is 32 x 30 tiles, (256 x 240 pixels) with the NTSC not displaying the top and bottom rows (256 x 224 pixels)".



 


 


Wait, so are you saying that NTSC technically displays less than PAL?  Why? And does PAL display those rows?


 


 


This forum is such a repository of NES knowledge in general.


Share this post


Link to post
Share on other sites

Hopefully, I'll be able to get some new stuff up soon.


 


Primis, for your questions.


 


Yes, you can put a trap onto any specific object.  Though it might be quite a hindrance to try and tackle a ballcarrier you can't see because you are watching a receiver downfield.


 


For the NTSC/PAL, this is less a NES issue than a TV standards issue.  NTSC, PAL, and SECAM are the Analog TV Standards where NTSC and PAL have different size standards.  So the TVs produced in the PAL countries simply have a different display size to support the standard.  The PAL standard however also has a slower refresh causing some flickering that doesn't exist on a NTSC display.


Share this post


Link to post
Share on other sites

Primis, for your questions.

 

Yes, you can put a trap onto any specific object.  Though it might be quite a hindrance to try and tackle a ballcarrier you can't see because you are watching a receiver downfield.

 

I'm just thinking out loud here... putting the trap focused on your chosen player and not the ball might be pretty cool.  If you're a LB blitzing and the ball is thrown downfield out of your camera view, that's the risk you run.  For offense it wouldn't matter much though I guess, as the focus auto-changes from QB to RB on a hand-off say.  The ball-carrier is who you control on offense, so... it'd only really affect defense, and maybe defense doesn't need to be any more difficult.  But it'd be a different feel and kinda' fun.  And there are the hacks out there where you play locked on at WR if I'm remembering correctly, so changing the trap on that could be pretty awesome in conjunction with it.  Though again, playing defense would suck...

 

These would be single-player roms because boy... it'd completely wreck multiplayer.  I'm not sure what havoc would ensue if the trap were taken off the ball.  It'd be fun to find out though.

 

 

Probably a dumb question:  can the rom be hacked to support something non-NTSC, non-PAL?

 

 

Thanks for this stuff jstout.  I know some of these are things that have undoubtedly been covered over the years, but this forum has been here so long and it never hurts to ask, especially since the game knowledge changes.  There are a number of us here that have been on this forum for a long time (like me) but don't necessarily post much.  So this stuff is being seen by far more people than feedback would indicate.

 

There simply isn't a game out there (not just ROM, any game period) that has gotten the attention and research this one has.  And every time we think something might be impossible, we find otherwise.  It's much appreciated, and it's part of why my Nintendo DS still is solely platform to emulate and play TSB roms & have them portable.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×