hendersonn Posted September 11, 2014 Share Posted September 11, 2014 Hello, I've been poking around with some code, looking at different tutorials and such. I was wondering if I could have someone look at my code concerning the tables where an image might be stored. While it does display the image, when I tweek it, it dosen't really change as I'd expect it to, causing me to believe it's just serendipity (and obviously that's not what I want). I've looked though the forums, but I feel like i'm over thinking something here. Much appreciated, Matt aa.asm aa.bin Quote Link to comment Share on other sites More sharing options...
Nukey Shay Posted September 11, 2014 Share Posted September 11, 2014 Exactly what is it you are expecting? Quote Link to comment Share on other sites More sharing options...
+SpiceWare Posted September 11, 2014 Share Posted September 11, 2014 You might like to read my Collect blog entries. It's the step-by-step development of a 2K game. Quote Link to comment Share on other sites More sharing options...
+Random Terrain Posted September 11, 2014 Share Posted September 11, 2014 You might like to read my Collect blog entries. It's the step-by-step development of a 2K game. For those who don't know, adapted versions of the Collect blog entries and more can be found here: randomterrain.com/atari-2600-memories.html#assembly_language Quote Link to comment Share on other sites More sharing options...
hendersonn Posted September 11, 2014 Author Share Posted September 11, 2014 Exactly what is it you are expecting? Oops, I meant to upload a slightly different file, no matter. In the 'Kernel' loop where it calls the tables, if I replace the broad scope of 'Matt' with specific letters (M__, A__, etc), there is a disconnect somewhere (timing?) and only produces 'M' and the first 'T' followed by a bar trailing below, leaving out the 'A' and the second 'T'. You might like to read my Collect blog entries. It's the step-by-step development of a 2K game. I had been following along for a bit, but wanted to get the basics down before things like logic shifts and whatnot. I'll have to take another look, maybe I missed something. Quote Link to comment Share on other sites More sharing options...
hendersonn Posted September 11, 2014 Author Share Posted September 11, 2014 (I don't see an edit button) Spice, So I went over your Step 3 example and noticed all the graphics were loaded into one large area (DigitGfx). I guess what I'm hung up on is, suppose you wanted to display a 7, followed by an A, then a 3... is it all a matter of turning it on/off at the right time, or is there another way? Quote Link to comment Share on other sites More sharing options...
+SpiceWare Posted September 11, 2014 Share Posted September 11, 2014 (edited) Took a look at your code, didn't have time earlier and assumed you were spelling MATT across the screen, not down it. As such, I thought your timing of the updates to PF0, PF1 and PF2 were off. If what you did was change this: Aaa sta WSYNC lda Matt,x sta PF1 inx iny sty COLUPF cpx #12 ;-------- 6+6=12 bne Aaa bne Kernel to this: Aaa sta WSYNC lda A__,x sta PF1 inx iny sty COLUPF cpx #12 ;-------- 6+6=12 bne Aaa bne Kernel Then the problem is a misunderstanding of the lda aaaa,x command. aaaa refers to an address in memory, denoted in your code by either Matt or A__. The data starting at Matt is the M graphic data. The data starting at A__ is the A graphic data. When determining which data gets loaded into A, the value of X is added to the address. When your program gets to Aaa X has the value of 6. Matt+6 points to the start of the A graphic data, but A__+6 points to the start of the first T graphic data. If you change that code to this: ldx #0 Aaa sta WSYNC lda A__,x sta PF1 inx iny sty COLUPF cpx #6 ;-------- 6+6=12 bne Aaa you'll get what you're expecting. The edit button goes away after an hour. aa.asm Edited September 11, 2014 by SpiceWare Quote Link to comment Share on other sites More sharing options...
hendersonn Posted September 12, 2014 Author Share Posted September 12, 2014 Thanks, Spice, It's making a lot more sense now. Much appreciated! 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.