It is currently Thu Nov 23, 2017 5:57 am

All times are UTC - 7 hours





Post new topic Reply to topic  [ 1386 posts ]  Go to page Previous  1 ... 69, 70, 71, 72, 73, 74, 75 ... 93  Next
Author Message
PostPosted: Sat Sep 14, 2013 1:23 pm 
Offline
User avatar

Joined: Thu Apr 23, 2009 11:21 pm
Posts: 803
Location: cypress, texas
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. :oops: :(
My sister can hear those notes... and that's awesome! :) :mrgreen:


Top
 Profile  
 
PostPosted: Fri Sep 20, 2013 5:10 pm 
Offline
User avatar

Joined: Thu Apr 23, 2009 11:21 pm
Posts: 803
Location: cypress, texas
How could this be done? THIS...

Code:
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


Ok thanks for reading and trying to help me here with this.


Top
 Profile  
 
PostPosted: Fri Sep 20, 2013 5:26 pm 
Offline

Joined: Mon Apr 01, 2013 11:17 pm
Posts: 437
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.


Top
 Profile  
 
PostPosted: Fri Sep 20, 2013 5:38 pm 
Offline
User avatar

Joined: Thu Apr 23, 2009 11:21 pm
Posts: 803
Location: cypress, texas
well, I'd just like to somehow

Code:


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,


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.


Top
 Profile  
 
PostPosted: Fri Sep 20, 2013 6:05 pm 
Offline

Joined: Mon Apr 01, 2013 11:17 pm
Posts: 437
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.


Top
 Profile  
 
PostPosted: Fri Sep 20, 2013 6:24 pm 
Offline
User avatar

Joined: Thu Apr 23, 2009 11:21 pm
Posts: 803
Location: cypress, texas
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...
Code:
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....


I'm sorry again. Nevermind... I'll think this over tomorrow. Thank you for being willing to help! :D


Top
 Profile  
 
PostPosted: Fri Sep 20, 2013 6:31 pm 
Offline

Joined: Mon Apr 01, 2013 11:17 pm
Posts: 437
I've seen some code do things like this:
Code:
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

Is this what you mean?


Top
 Profile  
 
PostPosted: Fri Sep 20, 2013 8:52 pm 
Offline
User avatar

Joined: Sat Feb 12, 2005 9:43 pm
Posts: 10118
Location: Rio de Janeiro - Brazil
unregistered wrote:
And then I would like to find a way to not have to write out every + number...

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:

Code:
offset = 0
.rept 60
   sta cup+offset
   offset = offset + 1
.endr

This will generate 60 STAs to consecutive addresses, the 6502 will not run any sort of loop.


Top
 Profile  
 
PostPosted: Sat Sep 21, 2013 1:45 pm 
Offline
User avatar

Joined: Thu Apr 23, 2009 11:21 pm
Posts: 803
Location: cypress, texas
Joe wrote:
I've seen some code do things like this:
Code:
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

Is this what you mean?
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. :D I'm going to spend time on this now.

tokumaru wrote:
unregistered wrote:
And then I would like to find a way to not have to write out every + number...

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:

Code:
offset = 0
.rept 60
   sta cup+offset
   offset = offset + 1
.endr

This will generate 60 STAs to consecutive addresses, the 6502 will not run any sort of loop.
I did not realise that; that is excellent! Thanks tokumaru! :D 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!


Top
 Profile  
 
PostPosted: Tue Sep 24, 2013 2:25 pm 
Offline
User avatar

Joined: Thu Apr 23, 2009 11:21 pm
Posts: 803
Location: cypress, texas
unregistered wrote:
Joe wrote:
I've seen some code do things like this:
Code:
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

Is this what you mean?
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. :D I'm going to spend time on this now.
I figured it out! :D Well almost.

---
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.


Top
 Profile  
 
PostPosted: Tue Sep 24, 2013 4:18 pm 
Offline
User avatar

Joined: Thu Apr 23, 2009 11:21 pm
Posts: 803
Location: cypress, texas
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.


Nevermind!!!!!!!! FIGURED IT OUT!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! :D :mrgreen:


Top
 Profile  
 
PostPosted: Tue Sep 24, 2013 4:29 pm 
Offline
User avatar

Joined: Thu Apr 23, 2009 11:21 pm
Posts: 803
Location: cypress, texas
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? :)


Top
 Profile  
 
PostPosted: Tue Sep 24, 2013 4:51 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19251
Location: NE Indiana, USA (NTSC)
Essentially the CPU does this when you power it on:
Code:
  sei
  jmp ($FFFC)

So if the vector at $FFFC points to your reset handler, then yes, it'll start at the beginning of your reset handler.


Top
 Profile  
 
PostPosted: Tue Sep 24, 2013 4:56 pm 
Offline
User avatar

Joined: Thu Apr 23, 2009 11:21 pm
Posts: 803
Location: cypress, texas
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.
AWESOME, THANKS tepples! :D


Top
 Profile  
 
PostPosted: Tue Oct 01, 2013 1:18 pm 
Offline
User avatar

Joined: Thu Apr 23, 2009 11:21 pm
Posts: 803
Location: cypress, texas
tepples, on page 69, 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.
My level starts out already drawn on nametable 0 and nametable 1. So could I pretend that they were drawn as columns?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1386 posts ]  Go to page Previous  1 ... 69, 70, 71, 72, 73, 74, 75 ... 93  Next

All times are UTC - 7 hours


Who is online

Users browsing this forum: Yahoo [Bot] and 8 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group