Author Topic: SGX VPC problem ??  (Read 522 times)

touko

  • Hero Member
  • *****
  • Posts: 953
SGX VPC problem ??
« on: May 03, 2017, 05:43:51 AM »
Hi, i found something weird with the SGX, you loose even the basic sprites priority ??
For exemple you cannot have something as simple as VDC1&2 sprites behind the VDC1 backgrounds   :shock:
That's a shitty design that VPC, really .  [-(

More i learn about it, and more i'am disappointed  ](*,)
« Last Edit: May 03, 2017, 06:21:33 AM by touko »

elmer

  • Hero Member
  • *****
  • Posts: 2153
Re: SGX VPC problem
« Reply #1 on: May 03, 2017, 06:26:52 AM »
For exemple you cannot have VDC1&2 sprites behind the VDC1 backgrounds ???  :shock:

Really?  :-k

What you're saying doesn't match what Charles MacDonald says in his sgxtech.txt document.

With the default priorities, all VDC2 sprites should appear behind the VDC1 background, and it looks like you'd just set the VDC1 sprites to low-priority to put them behind the VDC1 background too.

Is that not happening?

touko

  • Hero Member
  • *****
  • Posts: 953
Re: SGX VPC problem ??
« Reply #2 on: May 03, 2017, 09:13:28 AM »
Quote
With the default priorities, all VDC2 sprites should appear behind the VDC1 background, and it looks like you'd just set the VDC1 sprites to low-priority to put them behind the VDC1 background too
Yes, until today I thought that too,but when i set VDC1 sprite to low priority my sprite is in low priority as expected but filled with a black shape. :?
May be i missed something .

EDIT1:Aaaarg, in fact my routine who's changing sprites attributes which has a bug  :mrgreen:
 :dance:

EDIT2:not my routine but my brain lol, i set priority low/high with a define like that:

PRIORITY_LOW         .equ   $7F
PRIORITY_HIGH         .equ   $80

ldx      #( SZ_32x64 | NO_FLIP )   & ( FLIP_MAS | SIZE_MAS )
ldy      #( 1 | PRIORITY_HIGH )
jsr      _spr_set_attribs_vdc1

And for low priority

ldx      #( SZ_32x64 | NO_FLIP )   & ( FLIP_MAS | SIZE_MAS )
ldy      #( 1 | PRIORITY_LOW )
jsr      _spr_set_attribs_vdc1

i did | rather than &  :cry:


« Last Edit: May 03, 2017, 10:03:25 AM by touko »

elmer

  • Hero Member
  • *****
  • Posts: 2153
Re: SGX VPC problem ??
« Reply #3 on: May 03, 2017, 09:56:14 AM »
i did | rather than &  :cry:

Haha ... programming is such *fun* isn't it!  ](*,)

I've just spent over an hour debugging yet-another compression routine of mine, which turned out to have a stupid operator-precedence error.  :oops:  :roll:

(uLzssLength + 0xF0u & (uLzssWindow >> 4))

gives very different results to ..

(uLzssLength + (0xF0u & (uLzssWindow >> 4)))

touko

  • Hero Member
  • *****
  • Posts: 953
Re: SGX VPC problem ??
« Reply #4 on: May 03, 2017, 10:01:51 AM »
 :mrgreen:

You know, when you're absolutely sure you did things right,impossible to see what's wrong .  :wink:
« Last Edit: May 03, 2017, 10:04:31 AM by touko »