Jump to content

Thomas Jentzsch

Members
  • Content Count

    27,895
  • Joined

  • Days Won

    3

Blog Comments posted by Thomas Jentzsch


  1. I'll PM the code to you (must first check where I have it).

     

    IIRC the approach is based a X and Y distance tables, which are then combined "somehow". The results looked convincing though there are heavily cheating with the math. Didn't fully understand it back then, but I was able to adapt the gravity effects for the PDP-1 version.


  2. Well, your code is performing (to start with):

     ldy phase1
     lda (amp1c),y
     lda (next0),y
     tay
    

    I'm not quite clear on what you're intenting there, but I don't see how two consecutive LDA's are going to do anything useful.

    I (finally :)) got the code now.

     

    There still might be one cycle to save, but then you had to carry Y from one line to the next one, making the code between more limited. Plus you would have to reverse the order of setting the two channels , probably that would hamper the sound. Not worth it.


  3. Can you show me how you'd do it without having to hold over A or Y? It seems to me that each phase value is only loaded once, and one of them gets stored, so unless a phase value is held over I see no way to eliminate a load.

    Since I don't have access to your code, I have to post Distella code:

    .loop:
    sta	WSYNC		   ; 3
    ;---------------------------------------
    ldy	$84			 ; 3
    lda	($a4),y		 ; 5
    lda	($8a),y		 ; 5
    sta	$82			 ; 3	
    tay					; 2
    adc	($aa),y		 ; 5
    sta	AUDV0		   ; 3
    ldy	$86			 ; 3
    lda	($9e),y		 ; 5
    ldy	$88			 ; 3
    adc	($98),y		 ; 5
    sta	AUDV1		   ; 3
    sta	WSYNC		   ; 3
    ;---------------------------------------
    ldy	$82			 ; 3
    lda	($92),y		 ; 5
    lda	($8c),y		 ; 5
    sta	$84			 ; 3	
    tay					; 2
    adc	($ac),y		 ; 5
    sta	AUDV0		   ; 3
    ldy	$86			 ; 3
    lda	($a6),y		 ; 5
    ldy	$88			 ; 3
    adc	($a0),y		 ; 5
    sta	AUDV1		   ; 3
    sta	WSYNC		   ; 3
    ;---------------------------------------
    ldy	$82			 ; 3
    lda	($9a),y		 ; 5
    ldy	$84			 ; 3
    adc	($94),y		 ; 5
    sta	AUDV0		   ; 3
    lda	($8e),y		 ; 5
    sta	$86			 ; 3	
    tay					; 2
    lda	($ae),y		 ; 5
    ldy	$88			 ; 3
    adc	($a8),y		 ; 5
    sta	AUDV1		   ; 3
    sta	WSYNC		   ; 3
    ;---------------------------------------
    ldy	$82			 ; 3
    lda	($a2),y		 ; 5
    ldy	$84			 ; 3
    adc	($9c),y		 ; 5
    sta	AUDV0		   ; 3
    lda	($90),y		 ; 5
    sta	$88			 ; 3
    tay					; 2
    lda	($b0),y		 ; 5
    ldy	$86			 ; 3
    adc	($96),y		 ; 5
    sta	AUDV1		   ; 3

    You need to adapt your slightly, but as far as I can tell, that should be all.


  4. Hm, why do you mix the values that way? Why not just a, b, c, d? And why the same ptrs for both voices in V1, but not in V0? :)

    Uh, maybe because I oopsed? (now fixed above)

    Ok, that answers my last question. :)

     

    I understand the meaning of the pointers, but why not just a, b, c, d for all 4 voices? :)


    • AUDV0 = ptr1d[i1] + ptr2c[i2]; AUDV1 = ptr3b[i3]+ptr4b[i4]; i1=ptr1s[i1];
    • AUDV0 = ptr1a[i1] + ptr2d[i2]; AUDV1 = ptr3c[i3]+ptr4c[i4]; i2=ptr1s[i2];
    • AUDV0 = ptr1b[i1] + ptr2a[i2]; AUDV1 = ptr3d[i3]+ptr4d[i4]; i3=ptr1s[i3];
    • AUDV0 = ptr1c[i1] + ptr2b[i2]; AUDV1 = ptr3a[i3]+ptr4a[i4]; i4=ptr1s[i4];

    Hm, why do you mix the values that way? Why not just a, b, c, d? And why the same ptrs for both voices in V1, but not in V0? :)


  5. For Leprechaun I ended up breaking the repositioning routine into three separate chunks. I can't recall offhand why three worked best.

    Two or three chunks are useful, more usually have to much overhead for determining which chunk to select. Unless you have a table approach.

×
×
  • Create New...