Skip navigation
Welcome, Guest! Please Login or Join

Loading...

Nerdy Nights week 3 6502 ASM, first app

Sep 15, 2015 at 7:00:28 PM
Cockroachcharlie (0)
avatar
< Cherub >
Posts: 19 - Joined: 09/05/2015
Pennsylvania
Profile
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.  :-)
 

Sep 15, 2015 at 7:03:49 PM
KHAN Games (88)
avatar
(Kevin Hanley) < Master Higgins >
Posts: 7788 - Joined: 06/21/2007
Florida
Profile
Honestly I think the best way to figure this stuff out is just to sit down, decide what you want to do, and then slowly get to work figuring out how to do it while asking questions.

Trying to figure the entire NES architecture out from the start sounds terribly daunting to me.

Sep 15, 2015 at 7:28:23 PM
Cockroachcharlie (0)
avatar
< Cherub >
Posts: 19 - Joined: 09/05/2015
Pennsylvania
Profile
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?
 

Sep 17, 2015 at 6:34:14 AM
MODERATOR
Vectrex28 (120)
avatar
(A Metroid) < Bowser >
Posts: 7239 - Joined: 07/28/2012
Switzerland
Profile
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