lionkingcmsl: (Radioshop)
[personal profile] lionkingcmsl
I have a Sony Clie that was given to me many moons ago by [livejournal.com profile] smrgol_t_kirin.

It has 16 bit processor and I have a question about what happens when a certain point is reached.
On the Clie is a card game called "Railroad". Now from the zero a 16 bit processor can go to 65,535 and stop, or, as in the case with the game, go to 32,767 and then roll back to -32,768. Being I have done that with both total number of games played (-14,553) and games played since reset (-20,586), what happens when the counter reaches zero again? Does it keep going or does it stop at -1?

BTW, that means I have played a total of 44,950 games for a maximum score of 2,051,300 points! That is an average of 45.635 points per game average. I spend about a half hour playing the game before I go to sleep. :=3

The total number of Railroad games played by both [livejournal.com profile] smrgol_t_kirin and myself is a whopping 50,982 games.

Date: 2015-02-03 09:48 pm (UTC)
From: [identity profile] whitefangedwolf.livejournal.com
Since the game's using two's complement for its integers and it doesn't have any value checks for the game totals variables, it would be reasonable to assume that, when it reaches -1 (1111111111111111 in binary), it should overflow to 0 and continue on. If it ends up behaving differently, I'd be interested in hearing what it does.

Date: 2015-02-04 01:39 am (UTC)
From: [identity profile] strredwolf.livejournal.com
A 16-bit processor using 16-bit unsigned integers will go to 65535, and adding 1 to that will just roll over to 0 and toggle an overflow flag.

Hmmm... The Clie that you have I think is a Motorola Dragonball, aka a 68000-series chip. That's a 32-bit processor. If I remember reading the old 68K docs, 16-bit data uses separate instructions, so it acts like a 16-bit computer. It sets an overflow and carry flag for such rollovers.

If the counter reaches zero again, depending on the Clie's software, it ether lets it go forward (ignoring the two flags) or it crashes.

Date: 2015-02-04 09:42 am (UTC)
carlfoxmarten: (Default)
From: [personal profile] carlfoxmarten
If there are no blocks to prevent it, which it sounds like there isn't, it'll keep looping over and over and over again, going from 0 to 32,767, then rolling "over" to -32,768, running through to -1 and starting over at 0 again.

Date: 2015-02-04 09:50 pm (UTC)
From: [identity profile] skipai.livejournal.com
Yeah, I had a Atari ST back in the day which was set really weird. It was a 16/32bit system as in some parts was 16 bit, other parts was 32bit.

I do know I did many, many times when I was a kid managing to make the poor processor in the Atari VCS2600 give up as I max'd out the score quite easily. Even it's fastest speed it offered wasn't enough for my reflexes back then.

I broke Pac Man, Missile Command, Smurfs. I just didn't die at all. Game ended when the processor just went. "Yep, that's it, no more."

Mind you, I worked out the way to get through the Pac Man maze on the 2600 where the ghosts would never catch you ever. Keep to the routine and you're set for maximum score.
Edited Date: 2015-02-04 09:51 pm (UTC)

Profile

lionkingcmsl: (Default)
LionkingCMSL

January 2023

S M T W T F S
1234567
891011121314
15161718 192021
22232425262728
293031    

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Mar. 21st, 2026 09:43 pm
Powered by Dreamwidth Studios