PDA

View Full Version : sudoku engine on propeller



Reinhard
01-08-2012, 02:23 PM
Hi All
Have found a very clean sudoku solver engine in web and tailored the call for propeller purpose.
That means in the original application the unsolved puzzle is in a File, I replaced it in a static char array.
I compile the modified app with dev-cpp and see the solution is true.

Unfortunaly I have always no a xmmc environment, because the ordered C3 from my local distributor is currently not on stock.
Have the petition, can anyone who has a xmmc platform compile and compare the result with the attached exe.
Maybe I can shrink the sudoku engine, but at first I need to know is the result ok in general.

Thanks forward
Reinhard

edit: propgcc compile and link w/o errors

yeti
01-08-2012, 04:12 PM
I cannot test the exe because I only have Unixes at hand but maybe the output of running propsudoku.elf on my C3 helps:

sudoku$ /usr/local/propeller/bin/propeller-load -b c3 -r -t propsudoku.elf
Propeller Version 1 on /dev/ttyUSB0
Writing 4556 bytes to Propeller RAM.
Verifying ... Upload OK!
Loading cache driver 'c3_cache.dat'
1944 bytes sent
Loading program image
42656 bytes sent
Loading .xmmkernel
1724 bytes sent
[ Entering terminal mode. Type ESC or Control-C to exit. ]

+---+---+---+
|417|369|825|
|632|158|947|
|958|724|316|
+---+---+---+
|825|437|169|
|791|586|432|
|346|912|758|
+---+---+---+
|289|643|571|
|573|291|684|
|164|875|293|
+---+---+---+

jazzed
01-08-2012, 04:22 PM
Cool. Runs from 64KB EEPROM too.



C:\Propeller\sudoku>propeller-load -r -t -b eeprom propsudoku.elf
Propeller Version 1 on COM8
Writing 4556 bytes to Propeller RAM.
Verifying ... Upload OK!
Loading cache driver
1496 bytes sent
Loading program image
42656 bytes sent
Loading .xmmkernel
1724 bytes sent
[ Entering terminal mode. Type ESC or Control-C to exit. ]


+---+---+---+
|417|369|825|
|632|158|947|
|958|724|316|
+---+---+---+
|825|437|169|
|791|586|432|
|346|912|758|
+---+---+---+
|289|643|571|
|573|291|684|
|164|875|293|
+---+---+---+


C:\Propeller\sudoku>pcsudoku.exe


+---+---+---+
|417|369|825|
|632|158|947|
|958|724|316|
+---+---+---+
|825|437|169|
|791|586|432|
|346|912|758|
+---+---+---+
|289|643|571|
|573|291|684|
|164|875|293|
+---+---+---+


C:\Propeller\sudoku>

Reinhard
01-08-2012, 04:23 PM
yeti, thank's for the test !

yes the result is equal to the exe output.

Have expected, but now it's proofed.

Thanks
Reinhard

Reinhard
01-08-2012, 04:42 PM
Thanks to all be involved in this experiment !

it's ultimatly time for me to get the eeprom and soldering on breadboard. (shame)

its nice to see first time the loader message >32 K

Reinhard