Search found 259 matches
- Fri May 01, 2015 10:15 am
- Forum: General Stuff
- Topic: Decreased S-CPU Velocity: Real or Imagined?
- Replies: 379
- Views: 45890
Re: Decreased S-CPU Velocity: Real or Imagined?
It is on topic, because were talking about optimizations and we shouldn't waste cycles unless there's a benefeit, and I don't see any difference in having a range of -32768 to 32767 compared to a range of 0 to 65535. stef is a professional of examples which have no use in a game or a 2D machine .. ...
- Fri May 01, 2015 10:07 am
- Forum: General Stuff
- Topic: Decreased S-CPU Velocity: Real or Imagined?
- Replies: 379
- Views: 45890
Re: Decreased S-CPU Velocity: Real or Imagined?
If you're asking "why did you (presumably Stef) design your thing that way?", then that's a discussion of a very different type. I did both implementation actually, unsigned and signed... but signed is more generic and should be the way to go in general, objects partially on screen (on th...
- Fri May 01, 2015 8:50 am
- Forum: General Stuff
- Topic: Decreased S-CPU Velocity: Real or Imagined?
- Replies: 379
- Views: 45890
Re: Decreased S-CPU Velocity: Real or Imagined?
I was speaking about V flag (overflow), without it no way to compare signed value (or require many more operations)
- Fri May 01, 2015 7:54 am
- Forum: General Stuff
- Topic: Decreased S-CPU Velocity: Real or Imagined?
- Replies: 379
- Views: 45890
Re: Decreased S-CPU Velocity: Real or Imagined?
so we can consider about a bit less than 35 cycles for the mean yes in the better case for 68k, but if collision accur for the first test, 68k is far behind (it's 192 cycles) .. This does not have any sense... 68000 is faster in every case when you have lot of computation to do , that is the point ...
- Fri May 01, 2015 7:50 am
- Forum: General Stuff
- Topic: Decreased S-CPU Velocity: Real or Imagined?
- Replies: 379
- Views: 45890
Re: Decreased S-CPU Velocity: Real or Imagined?
Now the 65816 version properly handling signed comparison: 5 ldy numEnemies 3 ldx #0 8 .loop // TEST on X coordinates 4 lda <player.xmax 2 clc 5(+1) sbc enemies.xmin,X 2 bvs .no_collid 13 4 lda <player.xmin 2 clc 5(+1) sbc enemies.xmax,X 2 bvc .no_collid 13 // TEST on Y coordinates 4 lda <player.yma...
- Fri May 01, 2015 7:36 am
- Forum: General Stuff
- Topic: Decreased S-CPU Velocity: Real or Imagined?
- Replies: 379
- Views: 45890
Re: Decreased S-CPU Velocity: Real or Imagined?
And now the 65816 version, assuming both A and XY are set in 16 bits, also i use DP for player coordinate in optimist condition (low byte = 0), also to make it faster i have to consider positives only values again as i don't see fast way of handling comparison on negatives values with the 65xx CPU (...
- Fri May 01, 2015 6:57 am
- Forum: General Stuff
- Topic: Decreased S-CPU Velocity: Real or Imagined?
- Replies: 379
- Views: 45890
Re: Decreased S-CPU Velocity: Real or Imagined?
Definitely not... i think you can only reduce by a limited amount of cycles but you can try to prove me the contrary ;) In you code exemple it's all the adc and sbc who's take the whole of cycles, you can divide it by to with native 16 bits operations . Plus your code is not optimal, and you probab...
- Fri May 01, 2015 6:47 am
- Forum: General Stuff
- Topic: Decreased S-CPU Velocity: Real or Imagined?
- Replies: 379
- Views: 45890
Re: Decreased S-CPU Velocity: Real or Imagined?
i think 65816 code should be close to 2 time faster. Definitely not... i think you can only reduce by a limited amount of cycles but you can try to prove me the opposite ;) Don't forget i took the best case for the 6502, "almost cheated"... To be almost "comparable" to the 68000...
- Fri May 01, 2015 5:32 am
- Forum: General Stuff
- Topic: Decreased S-CPU Velocity: Real or Imagined?
- Replies: 379
- Views: 45890
Re: Decreased S-CPU Velocity: Real or Imagined?
My cycle counting may be a bit off but here's what i obtain: Yes, for exemple a branching instruction take 3 cycles if branch is take else is 2 . You also forget clc before adc and sec before sbc, it's not forced if you are sure that cary is clear or set before doing adc/sbc . The branch is ok as i...
- Fri May 01, 2015 5:06 am
- Forum: General Stuff
- Topic: Decreased S-CPU Velocity: Real or Imagined?
- Replies: 379
- Views: 45890
Re: Decreased S-CPU Velocity: Real or Imagined?
So to compare a collision code between the 2 CPUs :) Here's a code i wrote for the 6502 CPU, it computes 16 bits integer collision of 1 bounding box against N bounding boxes (where N is limited to 30 max as i use 8 bits indexing only and a part of the zero page is also used by player position). Also...
- Thu Apr 30, 2015 8:47 am
- Forum: General Stuff
- Topic: Decreased S-CPU Velocity: Real or Imagined?
- Replies: 379
- Views: 45890
Re: Decreased S-CPU Velocity: Real or Imagined?
Konami isn't exactly known for their programming skills... Is this sarcastic ? Honestly if in your mind Konami are not good programmers then i really wonder which team you consider as good O_o ?? I admit they could have made it better and avoid the slowdown on the simple car explosion but still tha...
- Thu Apr 30, 2015 1:14 am
- Forum: General Stuff
- Topic: Decreased S-CPU Velocity: Real or Imagined?
- Replies: 379
- Views: 45890
Re: Decreased S-CPU Velocity: Real or Imagined?
How many enemies does it check against? Anyway, if it only checks against one and we're including the init part, that's 250 cycles. If you want something comparable on the SNES, you'd have to make it about half, which is 125 cycles. That doesn't sound impossible, and I might try if I know more abou...
- Thu Apr 30, 2015 12:20 am
- Forum: General Stuff
- Topic: Decreased S-CPU Velocity: Real or Imagined?
- Replies: 379
- Views: 45890
Re: Decreased S-CPU Velocity: Real or Imagined?
Yes. They just added velocity to the explosions and might have had some sort of way to figure out what the velocities of the explotions are. they could have possibly indexed a table that has precalculated values or something. I doubt the shrinking explosions would be that hard either. I wouldn't be...
- Wed Apr 29, 2015 11:57 pm
- Forum: General Stuff
- Topic: Decreased S-CPU Velocity: Real or Imagined?
- Replies: 379
- Views: 45890
Re: Decreased S-CPU Velocity: Real or Imagined?
Thanks Touko, so here's the 68000 code for a real simple bounding box collision code of player versus an array of bullet/enemies: 8 lea 4(a7), a6 ; a6 point on parameters 12 move.l (a6)+, a0 ; a0 = player 12 move.l (a6)+, a1 ; a1 = enemies 12 move.l (a6), d7 ; d7 = numEnemies 4 subq.w #1,d7 ; d7 = n...
- Wed Apr 29, 2015 12:47 pm
- Forum: General Stuff
- Topic: Decreased S-CPU Velocity: Real or Imagined?
- Replies: 379
- Views: 45890
Re: Decreased S-CPU Velocity: Real or Imagined?
Um, yeah... How is Contra Hard Corps any different than Contra III? It's almost exactly like a Contra III boss rush. If you really think this : https://www.youtube.com/watch?v=-9YFtbCb3y0#t=75 is the same as this : https://www.youtube.com/watch?v=6lMxDTGrHYQ#t=77 then i think i understand the probl...