flammingcowz Posted June 25, 2004 Share Posted June 25, 2004 i know i should know what these things mean, but ive read andrews whole tutorial, but what does this mean... ; '2600 for Newbies ; Session 13 - Playfield processor 6502 include "vcs.h" include "macro.h" ;------------------------------------------------------------------------------ PATTERN = $80 ; storage location (1st byte in RAM) TIMETOCHANGE = 20 ; speed of "animation" - change as desired ;------------------------------------------------------------------------------ SEG ORG $F000 Reset ; Clear RAM and all TIA registers ldx #0 lda #0 Clear sta 0,x inx bne Clear ;------------------------------------------------ ; Once-only initialisation... lda #0 sta PATTERN ; The binary PF 'pattern' lda #$45 sta COLUPF ; set the playfield colour ldy #0 ; "speed" counter ;------------------------------------------------ StartOfFrame ; Start of new frame ; Start of vertical blank processing lda #0 sta VBLANK lda #2 sta VSYNC sta WSYNC sta WSYNC sta WSYNC ; 3 scanlines of VSYNC signal lda #0 sta VSYNC ;------------------------------------------------ ; 37 scanlines of vertical blank... ldx #0 VerticalBlank sta WSYNC inx cpx #37 bne VerticalBlank ;------------------------------------------------ ; Handle a change in the pattern once every 20 frames ; and write the pattern to the PF1 register iny ; increment speed count by one cpy #TIMETOCHANGE ; has it reached our "change point"? bne notyet ; no, so branch past ldy #0 ; reset speed count inc PATTERN ; switch to next pattern notyet lda PATTERN ; use our saved pattern sta PF1 ; as the playfield shape ;------------------------------------------------ ; Do 192 scanlines of colour-changing (our picture) ldx #0 ; this counts our scanline number Picture stx COLUBK ; change background colour (rainbow effect) sta WSYNC ; wait till end of scanline inx cpx #192 bne Picture ;------------------------------------------------ lda #%01000010 sta VBLANK ; end of screen - enter blanking ; 30 scanlines of overscan... ldx #0 Overscan sta WSYNC inx cpx #30 bne Overscan jmp StartOfFrame ;------------------------------------------------------------------------------ ORG $FFFA InterruptVectors .word Reset ; NMI .word Reset ; RESET .word Reset ; IRQ END Quote Link to comment Share on other sites More sharing options...
+Andrew Davie Posted June 25, 2004 Share Posted June 25, 2004 i know i should know what these things mean, but ive read andrews whole tutorial, but what does this mean... ; '2600 for Newbies [snip] END [/snip] Well the basic problem here is that not only do you have to read the tutorials, but you have to try to understand them and learn! Throwing a large block of source code via cut/paste into a question "what does this mean?" isn't going to draw many helpful answers and to be honest really just shows us all that you probably haven't spent the slightest effort in really trying to understand what it is all about. I believe the tutorials are well written and geared to beginners. I designed them to lead anyone with a reasonable chance of programming '2600 step by step through all the fundamentals of programming for the machine. If you've HONESTLY read the tutorials, and REALLY tried to understand each one (as opposed to just reading them "yeah, blah blah, right... very interesting.. blah blah... OK, I've read the tutorials but what does it mean").... if you've honestly put in the effort to seriously LEARN what they're trying to teach you and you still feel the need to ask the question "what does it mean?" -- then give up now. Honestly. Because you're not going to find anywhere or anyone who is going to break it down into simpler steps than the tutorials already do -- and, frankly, you just look foolish asking such a question. Quote Link to comment Share on other sites More sharing options...
flammingcowz Posted June 25, 2004 Author Share Posted June 25, 2004 i have tried and actualy tried and know what a lot of it means but there is still some thigns i dont know. Quote Link to comment Share on other sites More sharing options...
Bruce Tomlin Posted June 25, 2004 Share Posted June 25, 2004 It would be helpful if you told us which parts you didn't understand. Throwing up an entire program listing and merely saying "I don't understand this" isn't very helpful. Quote Link to comment Share on other sites More sharing options...
flammingcowz Posted June 26, 2004 Author Share Posted June 26, 2004 nvm i get it now. Quote Link to comment Share on other sites More sharing options...
Mord Posted June 28, 2004 Share Posted June 28, 2004 The best way to learn them, for me at least, has been to sit back offline with the tutorials open in a text editor, mp3s playing in the background, and repeatedly slamming my head into the keyboard until I got it! Well, ok, perhaps that last part hasn't happened quite yet! My biggest stumbling block is dealing with typos and errors. Took me a long time to find a simple thing as "GP1" and "GP0" being used instead of "GRP1" etc. I'm starting to get use to finding bugs by checking out the information I have after a failed compile. the binary size, the .txt it outputs, and the reference table mostly. It's obvious to me that I still have a loong way to go, especially with how easily distracted I can be! But l managed to display a sprite recently! I'm very proud! -- Mord 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.