NintendoAge http://nintendoage.com/forum/ -Sqooner Nerdy Nights week 3 http://nintendoage.com/forum/messageview.cfm?catid=22&threadid=4440 2018-12-28T10:42:07 -05.00 bunnyboy 81 Nerdy Nights week 3 http://nintendoage.com/forum/messageview.cfm?catid=22&threadid=4440 2018-12-28T10:38:34 -05.00 bunnyboy 81 Nerdy Nights week 3 http://nintendoage.com/forum/messageview.cfm?catid=22&threadid=4440 2015-09-17T06:34:14 -05.00 bunnyboy 81 Originally posted by: Cockroachcharlie

Either way.  Thanks guys.  As I've said elsewhere on these boards.  Every little insight is a step forward that keeps me from giving up and the support this board has shown myself and others I see struggling is very uplifting.  I think I have enough understanding that a little research will get me started on a simple thing to boost morale.  Even if I can't do the "from scratch" method yet, two player controlled sprites running around the screen is a sure start.

p.s.  Is it considered kosher on these boards to post "junk" roms of our progress?
 
Go ahead and do it. It is appreciated to post any kinds of homebrew ROMs IMO
  ]]>
Nerdy Nights week 3 http://nintendoage.com/forum/messageview.cfm?catid=22&threadid=4440 2015-09-15T19:28:23 -05.00 bunnyboy 81
p.s.  Is it considered kosher on these boards to post "junk" roms of our progress?
  ]]>
Nerdy Nights week 3 http://nintendoage.com/forum/messageview.cfm?catid=22&threadid=4440 2015-09-15T19:03:49 -05.00 bunnyboy 81
Trying to figure the entire NES architecture out from the start sounds terribly daunting to me. ]]>
Nerdy Nights week 3 http://nintendoage.com/forum/messageview.cfm?catid=22&threadid=4440 2015-09-15T19:00:28 -05.00 bunnyboy 81 Originally posted by: Vectrex280996
 
Originally posted by: Cockroachcharlie

LOL. Man. I can see why people wanted to simplify it. Assembly is seriously a lot different than anything I have ever worked with so far. Again. It's just hard to grasp how number transferring produces these results. Almost like trying to visualize in pure binary. So now that I have the actual coding a little more in place, I should probably work more on the architecture and the specifics of memory locations?

You'll get used to the registers, there aren't too many so you'll get a good grasp on how they work the more you program.

Also, here's how I would do a "Hello World" program if you're interested (Basically what KHAN said in code form). It's covered in a later tutorial, because even simple things like that need to have you understand the registers and what they do.

  
  LDA $2002       ;wake up PPU
  LDA #$22
  STA $2006       ;Write the hi part of the starting address to $2006
  LDA #$00
  STA $2006       ;and the second part.
  LDX #$00
.hwloop
  LDA helloworld,x       ;Draws h, e, l, l, o, etc. on the background with $2007
  STA $2007
  INX                    ;x register makes the writing possible
  CPX #$0B               ;Do it 11 times
  BNE .hwloop

helloworld:
  .db $11,$0E,$15,$15,$18,$2F,$20,$18,$1B,$14,$0D
                                                              ;The CHR goes like that.______0123456789ABCDEF
                                                              ;That's just my way of using__GHIJKLMNOPQRSTUV
                                                              ;using fonts on the CHR tho.__WXYZ.,-!?©:;'() 

 
I think I am starting to see what you mean.  I actually grasped a lot of the "what" in what you wrote.  It's the "why" that is still elusive, but coming together.  From a basic standpoint, some parts of memory act as temporary/permanent data holders, while others act as (sorta) switchboards.  I think with a little more research into the hardware topic itself (both my books fail to cover such aspects, but then, both were written in 1980 for a specific board).

LOL.  Sadly, in the class I took, as well as all studies, the actual hardware part was always where I was left with swirly eyes.  But.  My son and I are bound and determined to put a game onto our favorite console, so for once I have a reason not to just say to hell with it all.  :-)
  ]]>
Nerdy Nights week 3 http://nintendoage.com/forum/messageview.cfm?catid=22&threadid=4440 2015-09-15T18:47:49 -05.00 bunnyboy 81 Originally posted by: Cockroachcharlie

LOL. Man. I can see why people wanted to simplify it. Assembly is seriously a lot different than anything I have ever worked with so far. Again. It's just hard to grasp how number transferring produces these results. Almost like trying to visualize in pure binary. So now that I have the actual coding a little more in place, I should probably work more on the architecture and the specifics of memory locations?
You'll get used to the registers, there aren't too many so you'll get a good grasp on how they work the more you program.

Also, here's how I would do a "Hello World" program if you're interested (Basically what KHAN said in code form). It's covered in a later tutorial, because even simple things like that need to have you understand the registers and what they do.

  
  LDA $2002       ;wake up PPU
  LDA #$22
  STA $2006       ;Write the hi part of the starting address to $2006
  LDA #$00
  STA $2006       ;and the second part.
  LDX #$00
.hwloop
  LDA helloworld,x       ;Draws h, e, l, l, o, etc. on the background with $2007
  STA $2007
  INX                    ;x register makes the writing possible
  CPX #$0B               ;Do it 11 times
  BNE .hwloop

helloworld:
  .db $11,$0E,$15,$15,$18,$2F,$20,$18,$1B,$14,$0D
                                                              ;The CHR goes like that.______0123456789ABCDEF
                                                              ;That's just my way of using__GHIJKLMNOPQRSTUV
                                                              ;using fonts on the CHR tho.__WXYZ.,-!?©:;'() 

  ]]>
Nerdy Nights week 3 http://nintendoage.com/forum/messageview.cfm?catid=22&threadid=4440 2015-09-15T18:27:38 -05.00 bunnyboy 81 Originally posted by: Cockroachcharlie

Ok. I think I have figured out where my major roadblock is on 6502 design. I am going to write an excerpt in BASIC (we should all recognize this one)

10: Print "Hello World"

20 Goto 10

It's obvious here why the words "Hello World" appear on the screen. The command "Print" told them to. I think that's where I am running into trouble here. In 6502 all I am STILL seeing is storing numbers in memory locations (after various tutorials and two books), but I am not understanding how all this number movement adds up to telling the processor to print "Hello World" to the screen. From this weeks tutorial

LDA %10000000 ;intensify blues

STA $2001

I don't get how that storage is any different than storing at any other location, yet produces a different result. Can somebody explain what I am missing here or guide me to a place that would help me wrap my head around this part. I am actually becoming pretty educated in assembly, but still fail to see how to APPLY all of it to produce an intended result other than moving numbers around.

on the NES, $2001 isn't really storage- it's like a set of switches the system provides you to interact with the graphics system. flipping the first switch does blue intensity, second switch is red, third is green (or vice versa on those last two), and whatever else the other 5 bits control. there are several addresses like this in the $2000 range that affect ppu activities, and there are more in the $4000 range that handle controller communication and audio, etc. 

I still don't know how to put hello world on the screen though. someone else can explain that. ]]>
Nerdy Nights week 3 http://nintendoage.com/forum/messageview.cfm?catid=22&threadid=4440 2015-09-15T18:24:35 -05.00 bunnyboy 81 Nerdy Nights week 3 http://nintendoage.com/forum/messageview.cfm?catid=22&threadid=4440 2015-09-15T18:17:45 -05.00 bunnyboy 81
As you can see from this wiki, the $2001 address is the address where the color emphasis is located.

If you wanted to write actual text on the screen, as in HELLO WORLD, (assuming you were writing to the background, and not using sprites), first you would load $2002 to get the PPU ready, and then you would be using the $2006/$2007 registers to tell it where the text goes, and what background tiles contain those letters.

You'll find out that you are basically using the same registers all the time when it comes to the NES.  Some for sprites, some for background, etc. ]]>