Project C - WIP - Sega Genesis / Mega Drive

Announce (tech) demos or games releases

Moderator: Mask of Destiny

User avatar
Sik
Very interested
Posts: 714
Joined: Thu Apr 10, 2008 3:03 pm
Contact:

Re: Project C - WIP - Sega Genesis / Mega Drive

Post by Sik » Thu Feb 08, 2018 11:04 pm

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.
Sik is pronounced as "seek", not as "sick".

mix256
Very interested
Posts: 124
Joined: Thu Jan 25, 2018 2:08 pm
Location: Sweden
Contact:

Re: Project C - WIP - Sega Genesis / Mega Drive

Post by mix256 » Fri Feb 09, 2018 10:52 am

Sik wrote:
Thu Feb 08, 2018 11:04 pm
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.
Yeah, come to think of it, how often do you actually score (pre-pubertal pun not intended) per frame. :)

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!

User avatar
Stef
Very interested
Posts: 2781
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Re: Project C - WIP - Sega Genesis / Mega Drive

Post by Stef » Fri Feb 09, 2018 12:32 pm

Exactly, BCD operations are never a bottleneck in a game as you rarely need it more than once per frame...

User avatar
Miquel
Very interested
Posts: 341
Joined: Sat Jul 30, 2016 12:33 am

Re: Project C - WIP - Sega Genesis / Mega Drive

Post by Miquel » Fri Feb 09, 2018 3:13 pm

Sik wrote:
Thu Feb 08, 2018 11:04 pm
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).
Timing of rotations/shifts is depended of the arguments, for example (talking about register operations):
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.
Yeah, I see you have to hive hope for the “believers” and the “non- believers”. Don’t worry I know.
“How much you have yet to learn”, is usually what them tell me when I fail to comprehend.

User avatar
Sik
Very interested
Posts: 714
Joined: Thu Apr 10, 2008 3:03 pm
Contact:

Re: Project C - WIP - Sega Genesis / Mega Drive

Post by Sik » Fri Feb 09, 2018 4:21 pm

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).
Sik is pronounced as "seek", not as "sick".

User avatar
SegaTim
Very interested
Posts: 93
Joined: Thu Nov 19, 2015 1:59 pm
Location: East Prussia
Contact:

Re: Project C - WIP - Sega Genesis / Mega Drive

Post by SegaTim » Sun Feb 18, 2018 12:41 pm


mix256
Very interested
Posts: 124
Joined: Thu Jan 25, 2018 2:08 pm
Location: Sweden
Contact:

Re: Project C - WIP - Sega Genesis / Mega Drive

Post by mix256 » Sun Feb 18, 2018 6:41 pm

But now you must have some of the palms as sprites, right? :)

cero
Very interested
Posts: 230
Joined: Mon Nov 30, 2015 1:55 pm

Re: Project C - WIP - Sega Genesis / Mega Drive

Post by cero » Sun Feb 18, 2018 6:43 pm

Reminds me more than a bit of Duke Nukem 1.

User avatar
SegaTim
Very interested
Posts: 93
Joined: Thu Nov 19, 2015 1:59 pm
Location: East Prussia
Contact:

Re: Project C - WIP - Sega Genesis / Mega Drive

Post by SegaTim » Sun Feb 18, 2018 11:40 pm

mix256 wrote:
Sun Feb 18, 2018 6:41 pm
But now you must have some of the palms as sprites, right? :)
Everything was so conceived.

Chilly Willy
Very interested
Posts: 2603
Joined: Fri Aug 17, 2007 9:33 pm

Re: Project C - WIP - Sega Genesis / Mega Drive

Post by Chilly Willy » Mon Feb 19, 2018 7:34 pm

cero wrote:
Sun Feb 18, 2018 6:43 pm
Reminds me more than a bit of Duke Nukem 1.
Yeah, it sure does. It's coming along nicely. Nice parallax effects.

User avatar
SegaTim
Very interested
Posts: 93
Joined: Thu Nov 19, 2015 1:59 pm
Location: East Prussia
Contact:

Re: Project C - WIP - Sega Genesis / Mega Drive

Post by SegaTim » Sat Jun 09, 2018 10:51 am

Work in progress. New screenshots:

Image Image

User avatar
SegaTim
Very interested
Posts: 93
Joined: Thu Nov 19, 2015 1:59 pm
Location: East Prussia
Contact:

Re: Project C - WIP - Sega Genesis / Mega Drive

Post by SegaTim » Wed Jul 18, 2018 7:17 pm

Work in progress...

New video - https://youtu.be/cs615CozC8k

Chilly Willy
Very interested
Posts: 2603
Joined: Fri Aug 17, 2007 9:33 pm

Re: Project C - WIP - Sega Genesis / Mega Drive

Post by Chilly Willy » Thu Jul 19, 2018 12:11 pm

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.

User avatar
SegaTim
Very interested
Posts: 93
Joined: Thu Nov 19, 2015 1:59 pm
Location: East Prussia
Contact:

Re: Project C - WIP - Sega Genesis / Mega Drive

Post by SegaTim » Wed Jul 25, 2018 8:48 pm

Chilly Willy wrote:
Thu Jul 19, 2018 12:11 pm
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.
This is normal?:

Image

Chilly Willy
Very interested
Posts: 2603
Joined: Fri Aug 17, 2007 9:33 pm

Re: Project C - WIP - Sega Genesis / Mega Drive

Post by Chilly Willy » Fri Jul 27, 2018 2:58 pm

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.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest