Jump to content
IGNORED

Help on playfield tables?


hendersonn

Recommended Posts

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

(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?

Link to comment
Share on other sites

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 by SpiceWare
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...