Jump to content
IGNORED

Backgammon hack wanted!


Recommended Posts

Good to see that this variant is played with the same rules as the original, only the starting position that differs. Depending on how the starting position is encoded: as data or hard coded into code, someone who does CP1610 code might be able to change it.

  • Like 2
Link to comment
Share on other sites

Yes, so it seems. If you find a simple way to change the starting position, you might be able to do a 4-in-1 and create a game that plays Backgammon, Nackgammon, Hyper-Backgammon and LongGammon, though I realize it would require some menu options or difficulty settings so perhaps release three separate ROM hacks then.

  • Like 2
Link to comment
Share on other sites

Ask and ye shall receive.  Instructions to apply this patch are on my website.  I hid the ROM details inside of a "spoiler" for those who are not interested.

 

Spoiler
  • The board data is a 12-word array, stored in the memory address range $325-330.  (This is where sprite data is normally held, but $104 is set to 1.  That means the EXEC only maintains one sprite throughout the game, leaving the rest of the sprite record table alone for 16-bit scratchpad data.)  The first index is at the left edge of the board.
    • Each index of the "board data" array has two signed 8-bit values.
    • The high-order byte is for the space on the bottom half of the board.  The low-order byte is for the space on the top half of the board.
    • A negative value indicates how many black checkers are in that space.  A positive value indicates how many white checkers are in that space.
  • ROM address $5096 contains the code to initialize these values.
    • Turns out, 10 words were being used to initialize each of the 4 indexes in the board array, since there was an EXEC function call to pack the low-order byte of 2 registers into a single register.
    • I was able to get the same job done with only 6 words, and use only 2 more words to write a recycled value to the 5th index now being used, so I put in 2 NOP instructions and left the rest of the code alone ...
    • with the exception of the values that now had to be changed from 5 to 4.
  • The pip counts are stored in 2 more of the unused 16-bit memory locations, but are only updated on-the-fly when the user presses the "pip count" button.
  • Therefore, there are only 14 ROM pokes needed to change the board arrangement, and one more poke to modify the title.

 

Enjoy!

Backgammon (Hack).cfg

Edited by Zendocon
Clarification
  • Like 6
Link to comment
Share on other sites

1 hour ago, SoundGammon said:

Right!  My next question is can this be burned and put on an eprom to play on a real console?

Definitely.  There are people who have done exactly that with other patched ROMs.

 

The big variable is how many other people would actually want this on a real cartridge.  I'm pretty sure nobody will do this unless there is enough demand.

 

The good news is, LTO Flash (and Cuttle Cart 3) allows you to put your whole ROM image library onto a single cartridge and launch anything you want from there on a real Intellivision console.

Link to comment
Share on other sites

7 hours ago, Zendocon said:

Definitely.  There are people who have done exactly that with other patched ROMs.

 

The big variable is how many other people would actually want this on a real cartridge.  I'm pretty sure nobody will do this unless there is enough demand.

 

The good news is, LTO Flash (and Cuttle Cart 3) allows you to put your whole ROM image library onto a single cartridge and launch anything you want from there on a real Intellivision console.

I have an extra cart, could I put it on that?

Link to comment
Share on other sites

On 5/17/2021 at 1:55 PM, SoundGammon said:

Right!  My next question is can this be burned and put on an eprom to play on a real console?

 

I can do this for you. IM me.

 

carlsson made a great suggestion of having other versions of the game included also. Zendocon, did you consider doing this with a menu?

 

 

Link to comment
Share on other sites

24 minutes ago, intvdave said:

Zendocon, did you consider doing this with a menu?

Yes, but it would take more than a few ROM pokes.  There are only 5 decles left over at the end of the ROM space, so it would require a larger ROM.

Link to comment
Share on other sites

A lot of variants are described here, but many involve different rules which complicates things. The three variants added have in common that they use standard rules but with different starting positions. Maybe there are even more variants of this kind? Since I'm not a backgammon player, I'm not versed into this world.

https://bkgm.com/variants/

 

Link to comment
Share on other sites

7 minutes ago, intvdave said:

 

http://ltoflash.leftturnonly.info/

 

If you do not get a multi-cart, I can make you a game board with just the one game.

 

I added Dutch Gammon. I am thinking of making a random version.

Great! Can I put it into a extra Backgammon cart? I will definitely get a multi-cart in the future! Thanks for the link! 

Link to comment
Share on other sites

2 hours ago, SoundGammon said:

How about Nackgammon Plus, 2 EXTRA men to move, 17 total.

I better check to see what happens in the chance more than 15 checkers occupy a single space.  You might get graphical corruption at that point.

Link to comment
Share on other sites

This is what it looks like with 32 pieces in a slot

 

shot0001.gif.dbfa2c3027264cd17e96f8d715cc19e9.gif

 

I am not sure I care to update the code to handle more than 15 pieces.

 

This is what it looks with 15.

 

shot0002.gif.d2a6aa4578df256efc7931fe0b9eb409.gif

 

Zendocon, do you know where in the code it checks for the 15 pieces? Not that you are in the mood to look either :)

 

 

Link to comment
Share on other sites

3 hours ago, intvdave said:

Zendocon, do you know where in the code it checks for the 15 pieces? Not that you are in the mood to look either :)

I haven't looked just yet, but I can easily set watches at display memory to find out.

 

My guess was that after every 5 pieces, it draws the next graphic in GRAM for a checker.  There would be consecutive frames for pieces with no dashes, with one dash, and with two dashes.  Beyond 15 pieces, it would fetch the next graphic, whatever it is.  Maybe I'll utilize the ECS "sucky" feature to find out.

Link to comment
Share on other sites

1 hour ago, Zendocon said:

I haven't looked just yet, but I can easily set watches at display memory to find out.

 

My guess was that after every 5 pieces, it draws the next graphic in GRAM for a checker.  There would be consecutive frames for pieces with no dashes, with one dash, and with two dashes.  Beyond 15 pieces, it would fetch the next graphic, whatever it is.  Maybe I'll utilize the ECS "sucky" feature to find out.

 

Are you saying you are going to look into what it will look like with more than 15 pieces in a slot? I do not think anything needs to be done with this. I am not going to put a version of the game that has more than 15 pieces.  If you want a long game, play the Dutch version. All pieces start off on the center.

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...