Jump to content





Photo

Sudoku Kernel

Posted by Thomas Jentzsch, 12 July 2008 · 25 views

Programming Damned Tag Clouds
After a longer break, I finally took the time and decided for a kernel. Many thanks to John for providing the basic idea of it. :thumbsup:

Attached Thumbnails

  • Attached Image

Attached Files






Wow, that is one cool flickerless kernel! :ponder:

What is the plan for a cursor?
  • Report

Cybergoth, on Sat Jul 12, 2008 10:15 PM, said:

Wow, that is one cool flickerless kernel! :ponder:
Thanks, but credits really go to John. His "score16" kernel provided me with what I was looking for.

Quote

What is the plan for a cursor?
Just the ball, blinking and hiding the digit below.

I haven't decided yet what to display when there is no digit. Maybe a blinking square or underline.
  • Report
Added a 2nd kernel, displaying a simple grid. Which one do you like better?
  • Report
Wow! Amazing there's no flicker! I like the grid one better.
  • Report
Definitely go with the grid.
  • Report
Does it work on real hardware? Stella and z26 don't emulate all RESPx tricks correctly (though z26 is a little better) and there are differences between consoles as well.
  • Report

batari, on Sun Jul 13, 2008 3:27 AM, said:

Does it work on real hardware?
Testing.... Works! :ponder:
  • Report
Nice kernel - presumably it does a RESPx mid-line? I definitely prefer the grid one, though it could use a coloured background to brighten things up, but I don't think that would work with the ball cursor?

Chris
  • Report

cd-w, on Sun Jul 13, 2008 4:45 PM, said:

Nice kernel - presumably it does a RESPx mid-line? I definitely prefer the grid one, though it could use a coloured background to brighten things up, but I don't think that would work with the ball cursor?
I could do all background in e.g. dark blue. No problem.

Since I don't have many options, I'll probably use the back- and foreground colors as indicators.
  • Report
Nice work! I also prefer the kernel with the grid.
  • Report
The grid one looks frickin' awesome. I tested it on my Krok and it worked fine too Thomas. You guys and your clever programming tricks amaze me though, and I mean that. All those numbers and no flicker? Outstanding. :ponder:
  • Report

Omegamatrix, on Fri Jul 18, 2008 11:56 PM, said:

The grid one looks frickin' awesome. I tested it on my Krok and it worked fine too Thomas. You guys and your clever programming tricks amaze me though, and I mean that. All those numbers and no flicker? Outstanding. :ponder:

The grid one does indeed look very nice. I haven't looked at the code, so I have no idea what your cycle counts are, but it would certainly seem like it would be nice if it were possible to do something other than blink a number on and off for the cursor. I would think there is also a need to have some type of indicator that would show whether a number is "given". Perhaps a scan line above and below each row of numbers could be used for that purpose.

It's too bad that the only way to have the Ball be colored "specially" is to have the playfield color match the sprite colors (not useful in this case). Were it not for that restriction, the Ball would make a nice cursor. Still, if the scan lines above and below can be used for that purpose that should probably work well enough.
  • Report

supercat, on Sat Jul 19, 2008 10:50 PM, said:

The grid one does indeed look very nice. I haven't looked at the code, so I have no idea what your cycle counts are,...
VERY tight. :ponder:

Quote

but it would certainly seem like it would be nice if it were possible to do something other than blink a number on and off for the cursor. I would think there is also a need to have some type of indicator that would show whether a number is "given". Perhaps a scan line above and below each row of numbers could be used for that purpose.
Wouldn't it be sufficent to know this when the cursor is at that number? I am playing Sudoku quite a lot and I hardly ever need to know which digits are original ones. P

Possible indicators are either a changed digit or background color or different cursor blinking intervalls. A smaller cursor might also be an option.

BTW: I am wondering about a 10th line, which could display some information (e.g. allowed digits for the currently selected cell).

Quote

It's too bad that the only way to have the Ball be colored "specially" is to have the playfield color match the sprite colors (not useful in this case). Were it not for that restriction, the Ball would make a nice cursor. Still, if the scan lines above and below can be used for that purpose that should probably work well enough.
This would require a much larger spacing of the rows (4 lines). Also the screen would look very "busy" and I like the current, clean look.
  • Report

Thomas Jentzsch, on Sun Jul 20, 2008 1:52 PM, said:

supercat, on Sat Jul 19, 2008 10:50 PM, said:

I would think there is also a need to have some type of indicator that would show whether a number is "given". Perhaps a scan line above and below each row of numbers could be used for that purpose.
Wouldn't it be sufficent to know this when the cursor is at that number? I am playing Sudoku quite a lot and I hardly ever need to know which digits are original ones.
How about a different font? Maybe similar to the main font, but with an underline built-in.
  • Report

Thomas Jentzsch, on Sun Jul 20, 2008 3:52 PM, said:

Wouldn't it be sufficent to know this when the cursor is at that number? I am playing Sudoku quite a lot and I hardly ever need to know which digits are original ones. P

If a number gets entered incorrectly, having to move over digits to see which were original and which weren't would be a pain. Perhaps the best thing would be to have a difficulty switch enable 30Hz flicker for the user-entered numbers? Normally most players would probably opt for flicker-free, but someone who wanted to see what was what could turn on the flicker.
  • Report

Nathan Strum, on Mon Jul 21, 2008 2:51 AM, said:

How about a different font? Maybe similar to the main font, but with an underline built-in.
Due to the trick the kernel is based on, a different font is impossible.
  • Report

supercat, on Mon Jul 21, 2008 6:58 AM, said:

Perhaps the best thing would be to have a difficulty switch enable 30Hz flicker for the user-entered numbers? Normally most players would probably opt for flicker-free, but someone who wanted to see what was what could turn on the flicker.
The mode switch is a very good idea.

Maybe not to use it for enabling flicker but e.g. to let all original or non-original numbers blink.
  • Report

Thomas Jentzsch, on Mon Jul 21, 2008 1:16 AM, said:

Maybe not to use it for enabling flicker but e.g. to let all original or non-original numbers blink.

Depending upon a person's television set, 30Hz flicker might not be too annoying while one is trying to figure out where one slipped up. Blinking would be simply obnoxious. Besides, blinking might be useful for other purposes (e.g. blink between a digit and an underline to show the cursor, and blink numbers which violate the rules). I have a pocket Sudoku game I rather like that does that. To avoid having to keep track of all the misplaced numbers, you could require that when a person places a number that violates the rules, the person can't place any more numbers until one or more numbers are erased to bring the board back into compliance with the rules.
  • Report

supercat, on Tue Jul 22, 2008 5:35 AM, said:

Depending upon a person's television set, 30Hz flicker might not be too annoying while one is trying to figure out where one slipped up. Blinking would be simply obnoxious.
True, permanent blinking would be pretty annoying. But temporarily, e.g. when realizing that you made an error, I think it is ok.

Quote

Besides, blinking might be useful for other purposes (e.g. blink between a digit and an underline to show the cursor, and blink numbers which violate the rules).
That's already working. :ponder: Though not posted yet.

Quote

I have a pocket Sudoku game I rather like that does that. To avoid having to keep track of all the misplaced numbers, you could require that when a person places a number that violates the rules, the person can't place any more numbers until one or more numbers are erased to bring the board back into compliance with the rules.
Yup, that's the plan. My favorite Sudoku does it like that too.

BTW: My main problem is RAM. I *really* want to put everything into the standard 128 bytes or RAM. And I want to minimize the vertical gap between rows for a nice display. So I will use the larger vertical gap between 3x3 blocks for quite some time consuming memory copy operations. So that I am able to setup the rows inside the 3x3 block very fast.
  • Report