Shop OBEX P1 Docs P2 Docs Learn Events
sudoku engine on propeller — Parallax Forums

sudoku engine on propeller

ReinhardReinhard Posts: 489
edited 2012-01-08 09:42 in Propeller 1
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

Comments

  • yetiyeti Posts: 819
    edited 2012-01-08 09:12
    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|
    +---+---+---+
    
  • jazzedjazzed Posts: 11,803
    edited 2012-01-08 09:22
    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>
    
  • ReinhardReinhard Posts: 489
    edited 2012-01-08 09:23
    yeti, thank's for the test !

    yes the result is equal to the exe output.

    Have expected, but now it's proofed.

    Thanks
    Reinhard
  • ReinhardReinhard Posts: 489
    edited 2012-01-08 09:42
    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
Sign In or Register to comment.