Jump to content

nanochess

+AtariAge Subscriber
  • Posts

    6,871
  • Joined

  • Last visited

  • Days Won

    21

Posts posted by nanochess

  1. Ok. I now have enough data to write a very informative article on Video Chess and some of the techniques that were used in its code.

     

    However, I disassembled it because I wanted to know about the level 6 and 7 bug. I've a very good suspect based on the small stack space available, but I need to find a way to prove it.

     

    Also some code triggers a pattern in my mind, and I need to compare against an older chess program.

    • Like 4
  2. 18 hours ago, davyK said:

    I'm guessing each node in the decision tree holds the evaluation score for both players and the last move, but how does it evaluate the score without encoding the entire board at each node? Unless it stores the difference between each board state at each node too and work the new eval score from that? Hair raising stuff.

    Would be really interesting to see a commented listing. (I presume the games uses a decision tree with an evaluation function since that was the prime way to day these game back in the 70s/80s).

    So far there is nothing like trees and nodes.

     

    This is what I've got so far (still work to do, because I'm searching how it validates legal moves, and where it returns to video chores).

     

    It is based on a simulated stack using 4-bit values preserved in the same bytes as the chessboard (lower 4 bits for board).

     

    It starts analyzing the board from the bottom-right corner, and once it finds an own piece, it saves the current state in this simulated stack, it does the movement, and it starts another board analysis with the opposite side (it can deepen even more), once this is finished, it reverts the movement using the information on the stack, and it continues where it was.

     

    • Like 1
  3. I'm curious enough so I've started disassembling and analyzing the code of Video Chess.

     

    Edit: So far I found the Reset/Select buttons code operation and how the chessboard is setup so now I know how the pieces are represented and the board addresses.

     

    Edit 2: Now I know where it handles the joystick movement and button, along with the chessboard editing feature. I found the movement generator, the code to restore the board after a movement, and the code to change the background color as the Atari "thinks". Now I need to find the code that saves the board state before a movement.

    • Like 2
  4. 1 minute ago, DZ-Jay said:

     

    So, to recap, the only problem was when copying the position to the SPRITE command for display; the rest of the functions and variables were correct.  Right?

     

    (That is apart from the problem of not truncating the fraction when the sprite is "snapped" to the ladder column.)

     

    Apparently yes. The mystery was why the red block wasn't shown the way it was supposed to.

     

  5. Hi @Lillapojkenpåön I revised your code and it is working fine.

     

    However, the thing that is bothering you is logical.

     

    My first test was to make sure your right macro was calculated correctly. To do this, I marked each floor tile as red as the square walks, using this code (just before SPRITE 2):

     

    temp4 = right
    #backtab(220 + temp4) = BG00 + FG_BLACK  + BG_RED 'stones
    

     

    With this code I was sure your right macro is correct. You can see how each stone gets red in turn in the correct place.

     

    The second test took me a little longer because a logical fallacy. The important things is: the background is affected by hardware scrolling counters, but MOB's aren't affected by hardware scrolling counters.

     

    So this means that any position used for sprites is the real position in screen as if scrolling isn't happening, and that's why we need to adjust sprites with the scrolling offsets. However, if you are going to use a sprite to pinpoint a card on the screen, you need to use the real coordinate.

     

    The correct code to make your red sprite to pinpoint correctly the card is this:

     

        temp4 = right * 8 + PF_DIFF
        'temp4 = left * 8 + PF_DIFF
        SPRITE 2,   temp4 + HIT + VISIBLE,    (#playerY AND 255) + ZOOMY2,    SPR16 + SPR_RED

     

    Notice the removal of the fine adjustment.

     

    So the code was always right. It was only the display code that wasn't right, but you weren't aware of the coordinate differences between the card background world and the sprite world.

     

    Probably I'm not using the standard STIC language for describing these, but I'm sure @DZ-Jay can correct any of my non-sense :dunce:

     

     

     

    • Like 1
  6. When envelopes are used, the "command code" for the envelope should be loaded a single time at the start. Otherwise the envelope is "resetted" continuously creating a "motor" noise.


     

    if throw_sound = 1 then
    
        IF SND = 0 THEN
          sound 4,$0f,$0007
          sound 2,$0BB8,$30
          sound 3,$0800,$0004
    
        END IF
        snd = snd + 1
    
    
    if snd = 20 then
      SOUND 4,,0
      SOUND 2,,0
      SOUND 3,,0
      snd = 0
      throw_sound = 0
     end if
    end if
    
    

     

  7. On 4/19/2023 at 7:50 AM, turbo graphics 220 said:

    I've got this book now, I really want to get into programming on all retro systems. I tried to buy your boot sector books on amazon and they said they wouldn't deliver to my address which was odd since I got a bunch of other books but I might just buy them from another place. I thought amazon just prints them on demand. Anyway book looks great. You also have an intellivision book but I want to concentrate on atari first.

    Thanks for your comments!

     

    You can also try https://lulu.com/spotlight/nanochess

     

    It doesn't require registration to shop.

     

  8. Just I've been informed there are (still) two sets of four games (it was miscounted before).

     

    People ordering the four games together will get ROM files for the four games, PDF manuals, and JPG of the boxes, and this is immediately after your payment.

     

    BTW cartridges are being built 😉

     

    received_235768215686924.thumb.jpeg.b1821b691b9676b9aeac2c9c0e41e848.jpeg

    • Like 8
    • Thanks 1
  9. Hi all!

     

    Again, an state-of-the-art game from nanochess, including poliphonic music, big animated sprites, and many colors!!! Even it includes my new feature: Download levels from the Internet using my patented Inteliwifi code.

     

    This game is set in the future, when big evil corporations dominate the whole world (wait, it sounds familiar! well I don't mind), and Rev Corp. finally has adquired all the Intellivision cartridges of the world. However, our hero has the last 10 loose Intellivision cartridges in his house, and now the hordes of Rev Corp. clones will try to stole these cartridges!!!

     

    The only salvation is the ability of our hero to throw Atari cartridges at light speed towards the clones. (Yes, even in the future, everyone has access to tons of Atari cartridges for just cents a copy)

     

    Download it NOW to WATCH THE AMAZING GRAPHICS!!!

     

    Enjoy it!

     

    tower.zip

    • Like 6
    • Thanks 4
    • Haha 3
×
×
  • Create New...