Metal Blast 2277 - Sega Genesis / Mega Drive - FREE release!
Moderator: Mask of Destiny
Re: Project C - WIP - Sega Genesis / Mega Drive
Well, ABCD uses carry so you can concatenate multiple of them easily to do larger numbers... May want to add those values in RAM to make this easier (otherwise you need to use many rotations which is slow). At least it should be faster than the approach there (in terms of cycles).
Dividing would be the obvious easy option, the big issue is 32-bit division (which you'd need for large digit counts)... there are more specialized algorithms for this purpose, although they need large look-up tables if you mind the ROM space usage.
Dividing would be the obvious easy option, the big issue is 32-bit division (which you'd need for large digit counts)... there are more specialized algorithms for this purpose, although they need large look-up tables if you mind the ROM space usage.
Sik is pronounced as "seek", not as "sick".
Re: Project C - WIP - Sega Genesis / Mega Drive
Yeah, come to think of it, how often do you actually score (pre-pubertal pun not intended) per frame.Sik wrote: ↑Thu Feb 08, 2018 11:04 pmWell, ABCD uses carry so you can concatenate multiple of them easily to do larger numbers... May want to add those values in RAM to make this easier (otherwise you need to use many rotations which is slow). At least it should be faster than the approach there (in terms of cycles).
Dividing would be the obvious easy option, the big issue is 32-bit division (which you'd need for large digit counts)... there are more specialized algorithms for this purpose, although they need large look-up tables if you mind the ROM space usage.
So "having the BCD-add X times and then a cheap print" vs "having X easy u32 adds and then a complex print".
If X is 1...which is the normal case, unless you fire off some smart bomb or something, then we won't be gaining much.
So, once again, I do premature optimization.
Don't want to hijack SegaTims thread with this, though, so sorry SegaTim!
Tänzer kickstarter: https://www.kickstarter.com/projects/83 ... lusive-gam
https://twitter.com/mix256
https://twitter.com/mix256
-
- Very interested
- Posts: 3131
- Joined: Thu Nov 30, 2006 9:46 pm
- Location: France - Sevres
- Contact:
Re: Project C - WIP - Sega Genesis / Mega Drive
Exactly, BCD operations are never a bottleneck in a game as you rarely need it more than once per frame...
Re: Project C - WIP - Sega Genesis / Mega Drive
Timing of rotations/shifts is depended of the arguments, for example (talking about register operations):Sik wrote: ↑Thu Feb 08, 2018 11:04 pmWell, ABCD uses carry so you can concatenate multiple of them easily to do larger numbers... May want to add those values in RAM to make this easier (otherwise you need to use many rotations which is slow). At least it should be faster than the approach there (in terms of cycles).
x << n will take 2+n*2 cycles
So x<<2 will be 6 cycles, and x<<3 will be 8 cycles.
Not that much really.
Note: [To anyone] I'm speaking from memory, if I'm wrong about the cycles tell me so but not crush my skull. Thanks.
HELP. Spanish TVs are brain washing people to be hostile to me.
Re: Project C - WIP - Sega Genesis / Mega Drive
I was thinking of 8-bit rotation on two long values which is 48 cycles in total (24*2) and you'd need to do it for every extra pair of digits in addition to another ABCD... doing it from memory directly is faster than that, besides requiring less instructions (and hence being simpler to understand).
Also you got the cycle count right for byte/word (add 2 more cycles for long).
Also you got the cycle count right for byte/word (add 2 more cycles for long).
Sik is pronounced as "seek", not as "sick".
Re: Project C - WIP - Sega Genesis / Mega Drive
But now you must have some of the palms as sprites, right?
Tänzer kickstarter: https://www.kickstarter.com/projects/83 ... lusive-gam
https://twitter.com/mix256
https://twitter.com/mix256
Re: Project C - WIP - Sega Genesis / Mega Drive
Reminds me more than a bit of Duke Nukem 1.
-
- Very interested
- Posts: 2984
- Joined: Fri Aug 17, 2007 9:33 pm
Re: Project C - WIP - Sega Genesis / Mega Drive
Work in progress. New screenshots:
-
- Very interested
- Posts: 2984
- Joined: Fri Aug 17, 2007 9:33 pm
Re: Project C - WIP - Sega Genesis / Mega Drive
Cool more action. The platform part is still a bit... sharp. You might want to round off the edges of the ground a bit... break up the stark up-down nature of the level a little. It doesn't seem natural.
Re: Project C - WIP - Sega Genesis / Mega Drive
This is normal?:Chilly Willy wrote: ↑Thu Jul 19, 2018 12:11 pmCool more action. The platform part is still a bit... sharp. You might want to round off the edges of the ground a bit... break up the stark up-down nature of the level a little. It doesn't seem natural.
-
- Very interested
- Posts: 2984
- Joined: Fri Aug 17, 2007 9:33 pm
Re: Project C - WIP - Sega Genesis / Mega Drive
That's a little better, but what I was thinking was more along the lines of what you see in Rayman in the first area. Not exactly the same thing, but more like it. Or like some of the zones in Sonic. That's probably a better example than Rayman.