8x16 and whatever else unreg wants to know
Moderator: Moderators
-
- Posts: 1318
- Joined: Thu Apr 23, 2009 11:21 pm
- Location: cypress, texas
Re: 8x16 and whatever else unreg wants to know
songZi.ftm is special because it is songZ but moved over to the triangle channel. I honestly cant hear the dash1 notes on triangle channel. I can certianly tell when they are susposed to be playing but I can't hear the notes... that's the problem I've been having.
My sister can hear those notes... and that's awesome!
My sister can hear those notes... and that's awesome!
-
- Posts: 1318
- Joined: Thu Apr 23, 2009 11:21 pm
- Location: cypress, texas
Re: 8x16 and whatever else unreg wants to know
How could this be done? THIS...
Ok thanks for reading and trying to help me here with this.
Code: Select all
able: 0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64, 68, 72, 76, 80, 84, 88, 92, 96, 100, 104, 108, 112, 116
ldx able, x
lda
sta glove+0, x ;<something like this... I know it wont work but how could it work? :)
lda
sta glove+1, x
lda
sta glove+2, x
lda
sta glove+3, x
Re: 8x16 and whatever else unreg wants to know
What's the input and output of that snippet of code supposed to be? I think I know what you want, but I'd like to be sure before I start writing code.
-
- Posts: 1318
- Joined: Thu Apr 23, 2009 11:21 pm
- Location: cypress, texas
Re: 8x16 and whatever else unreg wants to know
well, I'd just like to somehow
edit: I'm sorry, I don't know input or output...
edit2: Well hmmm............... I want to always be able to specify what place (either 0, 1, 2 or 3) to store the value and I would always like to have it be a multiple of 4.
Code: Select all
sta glove+0+x*4
sta glove+1+x*4
sta glove+2+x*4
sta glove+3+x*4
where x is some value
x: 0, 4, 8, 12, 16, 20,
edit2: Well hmmm............... I want to always be able to specify what place (either 0, 1, 2 or 3) to store the value and I would always like to have it be a multiple of 4.
Re: 8x16 and whatever else unreg wants to know
Perhaps I should ask a different question:
What are you trying to accomplish? What is the purpose of this code? I haven't been following this thread for very long, so I'm not at all familiar with what you've done so far.
What are you trying to accomplish? What is the purpose of this code? I haven't been following this thread for very long, so I'm not at all familiar with what you've done so far.
-
- Posts: 1318
- Joined: Thu Apr 23, 2009 11:21 pm
- Location: cypress, texas
Re: 8x16 and whatever else unreg wants to know
I am trying to accomplish creating a new different way of having a RAMbuffer.
Having a ram buffer of size 60. And then I would like to find a way to not have to write out every + number...
I'm sorry again. Nevermind... I'll think this over tomorrow. Thank you for being willing to help!
Having a ram buffer of size 60. And then I would like to find a way to not have to write out every + number...
Code: Select all
like this
sta cup+0
sta cup+1
sta cup+2
sta cup+3
sta cup+4
sta cup+5
sta cup+6
sta cup+7
sta cup+8
etc....
Re: 8x16 and whatever else unreg wants to know
I've seen some code do things like this:
Is this what you mean?
Code: Select all
ldx #$5C
loop:
lda #$AA
sta buffer+0,x
lda #$BB
sta buffer+1,x
lda #$CC
sta buffer+2,x
lda #$DD
sta buffer+3,x
dex
dex
dex
dex
bpl loop
Re: 8x16 and whatever else unreg wants to know
If all you want to do is save on typing, assemblers usually offer some kind of repetition command. ASM6 for example has .REPT, which allows you to do this:unregistered wrote:And then I would like to find a way to not have to write out every + number...
Code: Select all
offset = 0
.rept 60
sta cup+offset
offset = offset + 1
.endr
-
- Posts: 1318
- Joined: Thu Apr 23, 2009 11:21 pm
- Location: cypress, texas
Re: 8x16 and whatever else unreg wants to know
This is what I wanted yes... but I'm sure there is a possible way to do this. (I think that tokumaru told me that something like sta buffer+1,x isnt possible earlier in this thread.) Thank you Joe. I'm going to spend time on this now.Joe wrote:I've seen some code do things like this:Is this what you mean?Code: Select all
ldx #$5C loop: lda #$AA sta buffer+0,x lda #$BB sta buffer+1,x lda #$CC sta buffer+2,x lda #$DD sta buffer+3,x dex dex dex dex bpl loop
I did not realise that; that is excellent! Thanks tokumaru! I want to save on typing... by creating a loop so the code is cleaner. But I am happy that loopy provided the .REPT for us!tokumaru wrote:If all you want to do is save on typing, assemblers usually offer some kind of repetition command. ASM6 for example has .REPT, which allows you to do this:unregistered wrote:And then I would like to find a way to not have to write out every + number...
This will generate 60 STAs to consecutive addresses, the 6502 will not run any sort of loop.Code: Select all
offset = 0 .rept 60 sta cup+offset offset = offset + 1 .endr
-
- Posts: 1318
- Joined: Thu Apr 23, 2009 11:21 pm
- Location: cypress, texas
Re: 8x16 and whatever else unreg wants to know
I figured it out! Well almost.unregistered wrote:This is what I wanted yes... but I'm sure there is a possible way to do this. (I think that tokumaru told me that something like sta buffer+1,x isnt possible earlier in this thread.) Thank you Joe. I'm going to spend time on this now.Joe wrote:I've seen some code do things like this:Is this what you mean?Code: Select all
ldx #$5C loop: lda #$AA sta buffer+0,x lda #$BB sta buffer+1,x lda #$CC sta buffer+2,x lda #$DD sta buffer+3,x dex dex dex dex bpl loop
---
I would really appreciate your help.
There is a procedure named next that correctly determines the high and low address for the next column to be drawn... I would like to somehow delay it being used until directly before the second nametable switch. Right before nametable 0 becomes set to the left side again. How could this be done? You know so it is like SMB...
edit.
-
- Posts: 1318
- Joined: Thu Apr 23, 2009 11:21 pm
- Location: cypress, texas
Re: 8x16 and whatever else unreg wants to know
Nevermind!!!!!!!! FIGURED IT OUT!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!unregistered wrote:I would really appreciate your help.
There is a procedure named next that correctly determines the high and low address for the next column to be drawn... I would like to somehow delay it being used until directly before the second nametable switch. Right before nametable 0 becomes set to the left side again. How could this be done? You know so it is like SMB...
edit.
-
- Posts: 1318
- Joined: Thu Apr 23, 2009 11:21 pm
- Location: cypress, texas
Re: 8x16 and whatever else unreg wants to know
Thank you tepples for trying to help me... well you were logged in right after my post. I have a small question... does the console start at reset: when you turn it on? I think maybe it does... but does anyone know for sure?
Re: 8x16 and whatever else unreg wants to know
Essentially the CPU does this when you power it on:
So if the vector at $FFFC points to your reset handler, then yes, it'll start at the beginning of your reset handler.
Code: Select all
sei
jmp ($FFFC)
-
- Posts: 1318
- Joined: Thu Apr 23, 2009 11:21 pm
- Location: cypress, texas
Re: 8x16 and whatever else unreg wants to know
AWESOME, THANKS tepples!tepples wrote:...So if the vector at $FFFC points to your reset handler, then yes, it'll start at the beginning of your reset handler.
-
- Posts: 1318
- Joined: Thu Apr 23, 2009 11:21 pm
- Location: cypress, texas
Re: 8x16 sprite is really a 16x32 pixel image?
My level starts out already drawn on nametable 0 and nametable 1. So could I pretend that they were drawn as columns?tepples[color=#8040FF], on page 69,[/color] wrote:Here's the logic:
- At the start of the level, before turning on rendering, draw all columns from valid_left through valid_left + 31.