Jump to content
IGNORED

USCF Chess and Triple Challenge


Recommended Posts

1 hour ago, IMBerzerk said:

This kinda helps a little...

 

Says it contains codes from USCF Chess... so I'd say no, not the same.

 

https://history.blueskyrangers.com/intvcorp/triplechallenge.html

I would say that that statement says that the Chess code IS the same. (but those are Keith's words, not mine - I have no direct information except that I would be surprised if it was different, or at least much different)

 

Link to comment
Share on other sites

The Chess ROM inside Triple Challenge is identical to the original Chess, with two alterations:

  • The cartridge header (UDB in EXEC parlance) was replaced with one that launches the Triple Challenge menu.  The menu then switches the EXEC to point to the (now-relocated) UDB before reinitializing the EXEC to start Chess.
  • The title string "CHESS" in the original ROM is rewritten as "Chess".

Other than that, there are no other differences between the 8K of ROM in the front part of Triple Challenge and the original Chess ROM image.  It's decle-for-decle identical.

 

Are there any Chess cartridges that say "Chess" at the title screen instead of "CHESS"?

 

Other details:  The menu was crammed at the end of Checkers, it appears.  This suggests Checkers may have been tweaked slightly to share code with one of the other games.  

 

ROM layout, roughly:

  • $5000 - $5015: UDB that points to menu. 
  • $5016 - $6FFF: Chess, identical to the original.
  • $9000 - $9E25: Checkers
  • $9E26 - $9F45: Menu
  • $9F46 - $9FFF: Empty
  • $A000 - $AFFF: Backgammon
  • $B000 - $BFFF: Reversi

 

That's right... if you install a properly prepared Reversi ROM at $B000 - $BFFF, a menu item will appear for Reversi, and it will let you play it.

 

Note I didn't dig into Checkers or Backgammon, nor do I intend to.

Edited by intvnut
Added more details about what's in Triple Challenge.
  • Like 11
Link to comment
Share on other sites

7 hours ago, intvnut said:

Other details:  The menu was crammed at the end of Checkers, it appears.  This suggests Checkers may have been tweaked slightly to share code with one of the other games.  

 

ROM layout, roughly:

  • $5000 - $5015: UDB that points to menu. 
  • $5016 - $6FFF: Chess, identical to the original.
  • $9000 - $9E25: Checkers
  • $9E26 - $9F45: Menu
  • $9F46 - $9FFF: Empty
  • $A000 - $AFFF: Backgammon
  • $B000 - $BFFF: Reversi

 

That's right... if you install a properly prepared Reversi ROM at $B000 - $BFFF, a menu item will appear for Reversi, and it will let you play it.

 

Note I didn't dig into Checkers or Backgammon, nor do I intend to.

Now this is very interesting.

 

First, Checkers might not have used the entire 4K, so there might have been room for the menu here.  I'll try reverse-engineering the original Checkers to see how much ROM space it really needs.

 

Second, are you saying the menu checks for Reversi code to be present in $Bxxx and adds a menu item?  Perhaps Reversi was taken out due to ROM space considerations, or perhaps the Stack Overflow issue manifested here as well.

 

I should be able to concatenate Triple Challenge and Reversi, same as Go For The Gold, right?  And then just modify the .cfg file to what you've got here?

  • Like 1
Link to comment
Share on other sites

10 hours ago, Zendocon said:

Second, are you saying the menu checks for Reversi code to be present in $Bxxx and adds a menu item? 

Yes.

 

.START:
        PSHR    R5                              ; 9E88   0275
        SDBD                                    ; 9E89   0001
        MVII    #$B000, R1                      ; 9E8A   02B9 0000 00B0
        MVI@    R1,     R1                      ; 9E8D   0289
        COMR    R1                              ; 9E8E   0019
        RLC     R1,     1                       ; 9E8F   0051
        CLRR    R1                              ; 9E90   01C9
        RLC     R1,     1                       ; 9E91   0051
        MVO     R1,     G_0160                  ; 9E92   0241 0160

;...

        MVI     G_0160, R0                      ; 9EE3   0280 0160
        TSTR    R0                              ; 9EE5   0080
        BEQ     L_9EFA                          ; 9EE6   0204 0012

        MVII    #$0007, R3                      ; 9EE8   02BB 0007
        MVII    #$027A, R4                      ; 9EEA   02BC 027A

        JSR     R5,     X_PRINT_R5              ; 9EEC   0004 0118 007B
        STRING  "4. Reversi"                    ; 9EEF  
        DECLE   $0000                           ; 9EF9   0000
L_9EFA:

 

There's a corresponding bit of code in the keypad dispatch to change the bounds check as well.

 

10 hours ago, Zendocon said:

I'll try reverse-engineering the original Checkers to see how much ROM space it really needs.

From what I recall, it's very full, especially the later version that includes the overflow bugfix.  (One decle free at the end.)  A lot of space is taken up near the end for Flight of the Valkyries, so perhaps that was optimized down somewhat to make room.  A cursory inspection suggests the music was encoded differently, but I spent less than 30 seconds looking at it.

 

 

10 hours ago, Zendocon said:

Perhaps Reversi was taken out due to ROM space considerations, or perhaps the Stack Overflow issue manifested here as well.

More likely cost vs. benefit.  Reference: https://history.blueskyrangers.com/intvcorp/triplechallenge.html

Quote

DEVELOPMENT HISTORY

Triple Challenge began as a quadruple challenge: the original concept was to put the four board games from the Mattel Electronics Strategy Network onto one cartridge. At the last minute, Reversi was cut to save money.

 

The test and jump allowed for a late-binding decision whether to add the last 4K ROM, I suppose.  As it stood, it was already almost too expensive:

Quote

FUN FACT: This idea almost died due to cost -- Chess requires 2K of RAM onboard the cartridge, which was found to be too expensive for INTV. Then INTV's executive in charge of procurement, Roger Rambeau, found a company that was stuck with thousands of defective 4K RAM chips. The chips did each have 2K of usable contiguous RAM. Roger bought them for a song, making the cartridge possible.

 

 

10 hours ago, Zendocon said:

I should be able to concatenate Triple Challenge and Reversi, same as Go For The Gold, right?  And then just modify the .cfg file to what you've got here?

Not without some additional work.  Go For The Gold uses paged ROMs and runs the games at their original addresses.  You would need to relocate the ROM from $5xxx to $Bxxx (that is, change JSRs, EXEC dispatches, etc.... anything that has an absolute address) to make it work.  It's not impossible, but it's not automatically a walk in the park.

 

Some of the addresses are tricky to find.  There's a couple EXEC dispatch structures that store an address in DBD format (lower 8 bits across two words) and use the upper two bits in those words for flags.

  • Like 1
Link to comment
Share on other sites

1 hour ago, intvnut said:

You would need to relocate the ROM from $5xxx to $Bxxx (that is, change JSRs, EXEC dispatches, etc.... anything that has an absolute address) to make it work.  It's not impossible, but it's not automatically a walk in the park.

Also, I believe the UDB for Reversi was modified to point its title string at location $9E1B, as the ROM contains:

      DECLE 86, "Reversi", 0
      B     INTV_TITLE_SCREEN

at that location.  Backgammon has a similar modification.  Its UDB pointer is $A014 (meaning that the UDB starts at $A000), and its title string pointer points to $9E0D, where you find:

      DECLE 86, "Backgammon", 0
      B     INTV_TITLE_SCREEN

In both cases, INTV_TITLE_SCREEN is $9E38.

 

So, actually, the inserted title screen /menu code starts at more like $9E0D.

 

Quickly scanning through the Checkers disassembly, comparing against the "newest" version (the 1979 copyright version with lowercase text), it appears the only modifications are:

  • Relocate to $9xxx
  • Set the "run titlescreen code" and ECS copyright bypass bits
  • Change the copyright year to 86
  • Insert a J INTV_TITLE_SCREEN at $9026
  • Rewrite the music at the end

Inserting the jump shifts the whole ROM down by 3 words.  At $5D24 (original) / $9D27 (Triple Challenge), the real differences kick in.  It looks like they took out Flight of the Valkyries with three part harmony, and replaced it with a couple bars of the 1812 Overture and a single "cannon" blast.

  • Like 1
Link to comment
Share on other sites

7 hours ago, intvnut said:

Inserting the jump shifts the whole ROM down by 3 words.  At $5D24 (original) / $9D27 (Triple Challenge), the real differences kick in.  It looks like they took out Flight of the Valkyries with three part harmony, and replaced it with a couple bars of the 1812 Overture and a single "cannon" blast.

Getting Reversi working should be a fun little rainy afternoon project.  That and adding Air Strike and Brickout to Triple Action, and renaming it "Some Of Theirs".

 

So an early version of Checkers played Ride of the Valkyries if you won, same as Sub Hunt?  I'll definitely have to fire that up now!

 

BTW, I did hack Sub Hunt so you automatically win when you start the game, just so I could listen to Ride of the Valkyries anytime I want to.  There's a check for whether you've sunk the requisite number of enemy convoys just before the "All Clear" text.  I swapped 204 with 20c, or vice versa (BNE <-> BEQ).  At the highest difficulty setting (5 at the title screen), there's a little extra text.

  • Like 1
Link to comment
Share on other sites

My understanding was that the original cartridge release of checkers played ride of the valkyries and the original backgammon cartridge played the 1812 overture.  So in triple challenge they axed the music from checkers and used the tune in backgammon in it's place. Is that correct?

 

Yeah, there's no point in getting triple challenge if you just want to have cartridge versions of these games.

Edited by mr_me
Link to comment
Share on other sites

2 hours ago, TeddyBear89 said:

Well, I think I shall not be looking for a Triple Challenge cartridge after this and just stick with USCF Chess.......

 

Returning to my seat at the kids' table,

 

Ted

Triple Challenge was always just a "no-frills" multicart.  That's why so few people bought it from the INTV catalogs.  I was lucky in that we had only Reversi and none of the other board game titles, so we bought it.  The one cool aspect is the box design.

2 hours ago, mr_me said:

My understanding was that the original cartridge release of checkers played ride of the valkyries and the original backgammon cartridge played the 1812 overture.  So in triple challenge they axed the music from checkers and used the tune in backgammon in it's place. Is that correct?

 

Yeah, there's no point in getting triple challenge if you just want to have cartridge versions of these games.

The other difference between the old versions is that the sound effects are different.  There's one where the sound effects when a move is made is the same as the dealer talking in Poker & Blackjack, and the AI "thinking" sound is the same as in Backgammon.  The version on Triple Challenge has deeper sounds than that.

Link to comment
Share on other sites

On 6/23/2020 at 10:14 AM, Zendocon said:

The other difference between the old versions is that the sound effects are different.  There's one where the sound effects when a move is made is the same as the dealer talking in Poker & Blackjack, and the AI "thinking" sound is the same as in Backgammon.  The version on Triple Challenge has deeper sounds than that.

There are three versions of Checkers outside of Triple Challenge.  From what I recall, the original version has a min-max stack overflow bug, and the higher-pitched sound effects.  It also has a longer "RAZZ."  The revised versions, IIRC, have the short RAZZ, and lower "think" sounds, and the fix for the min-max stack overflow.  The third version is the same as the second, but with the title string in lower case.

 

If I'm not mistaken, this is the min-max stack overflow check/fix that was added.  (At least, I assume Checkers uses min-max, since that was the state of the art and should be very effective.  In any case, it uses a recursive descent that scores potential moves.)

 

Before:

L_548F:
        MVO     R0,     G_01D6                  ; 548F   0240 01D6
        CMPI    #$000C, R0                      ; 5491   0378 000C
        BGE     L_54C3                          ; 5493   020D 002E

        MOVR    R0,     R1                      ; 5495   0081
        ADDI    #$033D, R1                      ; 5496   02F9 033D
        SUBR    R2,     R2                      ; 5498   0112
        RRC     R2,     1                       ; 5499   0072
        SARC    R0,     1                       ; 549A   0078
        BNC     L_549E                          ; 549B   0209 0001

 

After:

L_548F:
        MVO     R0,     G_01D6                  ; 548F   0240 01D6
        CMPI    #$000C, R0                      ; 5491   0378 000C
        BGE     L_54CC                          ; 5493   020D 0037

        MOVR    R0,     R1                      ; 5495   0081           << starting here
        ADDI    #$0331, R1                      ; 5496   02F9 0331
        MVI@    R1,     R2                      ; 5498   028A
        CMPI    #$01CF, R2                      ; 5499   037A 01CF
        BGT     L_54CC                          ; 549B   020E 002F      << ending here

        SDBD                                    ; 549D   0001
        ADDI    #$000D, R1                      ; 549E   02F9 000D 0000
        SUBR    R2,     R2                      ; 54A1   0112
        RRC     R2,     1                       ; 54A2   0072
        SARC    R0,     1                       ; 54A3   0078
        BNC     L_54A7                          ; 54A4   0209 0001
Link to comment
Share on other sites

2 hours ago, Zendocon said:

Interesting.  The standalone ROM image I have draws the title in all-caps but has the lower-pitched sounds.  My physical cart has the higher-pitched sounds I think.  Which version(s) play Ride of the Valkyries?

All three standalone versions.  Only Triple Challenge is different.

 

To hear it, you either need to beat the computer, or complete the game in two-player mode.  I've tried patching the game to jump directly to the code, but the song doesn't play correctly and it crashes partway through.  I think I need to get through more of the initialization before the three-part harmony will play correctly.

 

Edited by intvnut
Link to comment
Share on other sites

On 6/23/2020 at 7:34 AM, mr_me said:

My understanding was that the original cartridge release of checkers played ride of the valkyries and the original backgammon cartridge played the 1812 overture.  So in triple challenge they axed the music from checkers and used the tune in backgammon in it's place. Is that correct?

 

For whatever reason, there's two copies of the tune—one in Checkers starting at $9D2C, and one in Backgammon starting at $AF44.  But it's the same code, word for word.

 

Link to comment
Share on other sites

Yep.  I played a 2-player game last night and heard Ride of the Valkyries (not to be confused in name with Flight of the Bumblebee).

 

I tried disassembling my ROM too, if only to see how the three-part harmony is encoded.  I'm pretty sure the EXEC routines just play a melody line, with different instruments depending on the exact entry point used.  I'll try checking address $5D2C.

 

I also stumbled upon the Bump & Jump music while trying to hack it to get the 50,000-point bonus every time.  It also plays a single melody line, and has its own tracker to use a second channel to play another note two "white keys" below the melody.  I ended up hacking the melody line in a few places to make it match the arcade version.  Maybe I'll do the same with Burgertime.

 

Getting back to Chess though, I ran standalone Chess with speed throttling disabled and 2 CPU players at difficulty level 6, to make sure it played the same game.  It did.  After a combined 31 hours, the game ended in a Stalemate.  Both players could have used their queens to capture each other's one remaining rook and put the opposing king in Check.  But no, they didn't want to sacrifice their rook, and so they kept making the same moves back and forth until Stalemate occurred.

Link to comment
Share on other sites

On 6/23/2020 at 1:36 PM, Zendocon said:

Getting Reversi working should be a fun little rainy afternoon project.

It's sunny here at the moment, but challenge accepted! :thumbsup:

 

quadChallenge.zip

 

 

Within this zip archive you will find a script that should work on Linux (and possibly MacOS or other POSIX environments) and an JzIntv configuration file.  When supplied with a JzIntv install, Reversi and Triple Challenge .bin files, the script will use the assembler and disassembler in JzIntv to patch Reversi and create what Intv intended all along - Quadruple Challenge!

 

quadChallenge.gif.e55b430b906fc939f31c59b1b07a71b1.gif

 

 

To run the script just do following (note that the path to JzIntv is to the root of the install not the actual JzIntv binary):

quadChallenge.sh <path to JzIntv install> <path to reversi> <path to triple challenge>

for example:

quadChallenge.sh path/to/jzintv games/reversi.bin games/tripleChallenge.bin

Then just put the included .cfg file next to the quadChallenge.bin file that the script creates and fire up Quadruple Challenge using JzIntv, fresh from 1986 :party:

 

5 hours ago, Zendocon said:

I also stumbled upon the Bump & Jump music while trying to hack it to get the 50,000-point bonus every time.

A little birdy tells me that is not the only thing to be looking for in the Bump N Jump codebase :ponder:

 

 

cheers

 

decle

 

 

Edited by decle
Fix for INTV title screen
  • Like 1
  • Thanks 2
Link to comment
Share on other sites

4 hours ago, Zendocon said:

Yep.  I played a 2-player game last night and heard Ride of the Valkyries (not to be confused in name with Flight of the Bumblebee).

Apparently the original German name given by Wagner (Walkürenrittcan be translated as either Ride of the Valkyries or Flight of the Valkyries.  For whatever reason, I tend to remember the "Flight" variation, but "Ride" is more common.  They're on horses in the air, so it's kinda both.  :D

 

 

 

  • Like 1
Link to comment
Share on other sites

I did look it up earlier,  just to be sure I wasn't making a fool of myself once again.  A literal search for "Flight of the Valkyries" kept pointing to "Ride of the Valkyries" with a couple of exceptions.

 

According to Wikipedia, "Flight of the Valkyries is an annual metal festival ... dedicated to metal bands with female lead vocalists."  I had a coworker at a previous job talk about wanting to create a mix album with various female metal vocalists, titled "That's What She Said.""

  • Like 1
Link to comment
Share on other sites

2 hours ago, decle said:

To run the script just do following (note that the path to JzIntv is to the root of the install not the actual JzIntv binary):


quadChallenge.sh <path to JzIntv install> <path to reversi> <path to triple challenge>

for example:


quadChallenge.sh path/to/jzintv games/reversi.bin games/tripleChallenge.bin

Then just put the included .cfg file next to the quadChallenge.bin file that the script creates and fire up Quadruple Challenge using JzIntv, fresh from 1986 :party:

I ran your script (after changing the hashbang for Termux) and took your .cfg file.  The original three games work, but choosing Reversi just gives me a garbled screen (but no "CPU off in the weeds").

 

I've still got the disassembled/reassembled files.  Perhaps the call to sed is different for me, and I ended up with a bad reassembled file.  Or perhaps you were using a different version of jzintv than me.  I'm running 20200607, though I doubt dis1600 and as1600 changed.

Link to comment
Share on other sites

2 hours ago, Zendocon said:

I did look it up earlier,  just to be sure I wasn't making a fool of myself once again.  A literal search for "Flight of the Valkyries" kept pointing to "Ride of the Valkyries" with a couple of exceptions.

I did a search for "Flight of the Valkyries vs. Ride of the Valkyries" or something to that effect in order to satisfy my curiosity.  That's where that link came from.  "Ride" seems to be the overwhelming favorite, in any case.

 

6 minutes ago, Zendocon said:

I've still got the disassembled/reassembled files.  Perhaps the call to sed is different for me, and I ended up with a bad reassembled file.  Or perhaps you were using a different version of jzintv than me.  I'm running 20200607, though I doubt dis1600 and as1600 changed.

Or, is it possible there's multiple Reversi versions out there?  The CRC32 on the copy I have is C7BB1B0E.

 

I'll have to try the script later.  Can't really try it while on the clock.

 

@decle : Can you post the CRC32s for your copy of Reversi, and the resulting reversib.bin?  jzIntv helpfully comes with a crc32 tool.  ?

Link to comment
Share on other sites

2 hours ago, decle said:

A little birdy tells me that is not the only thing to be looking for in the Bump N Jump codebase :ponder:

 

 

cheers

 

decle

I looked through the disassembly for some naughty text, but I didn't find any.  I also looked on the BSR site for a clue, but no dice.

 

What I did find so far is a lot of dead space at the end of the $6xxx and $Dxxx blocks.  Plenty of missed opportunity for a cool Easter egg.

Link to comment
Share on other sites

2 hours ago, intvnut said:

Apparently the original German name given by Wagner (Walkürenrittcan be translated as either Ride of the Valkyries or Flight of the Valkyries.  For whatever reason, I tend to remember the "Flight" variation, but "Ride" is more common.  They're on horses in the air, so it's kinda both.  :D

 

 

 

Ritt der Wallküren or Wallkürenritt is in it’s direct translation Ride of the Valkyries.

 

Either way it’s...

 

 

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

15 minutes ago, intvnut said:

I did a search for "Flight of the Valkyries vs. Ride of the Valkyries" or something to that effect in order to satisfy my curiosity.  That's where that link came from.  "Ride" seems to be the overwhelming favorite, in any case.

 

Or, is it possible there's multiple Reversi versions out there?  The CRC32 on the copy I have is C7BB1B0E.

 

I'll have to try the script later.  Can't really try it while on the clock.

 

@decle : Can you post the CRC32s for your copy of Reversi, and the resulting reversib.bin?  jzIntv helpfully comes with a crc32 tool.  ?

My original ROM files are in .rom format.  That's helpful when ROM hacking, because I have to run rom2bin first before running dasm1600.  Then my scripts append " (Hack)" to the .bin+.cfg filenames.

 

The CRC32 for my Reversi.rom is 00D813A6

For Reversi.bin, created with rom2bin, it's C7BB1B0E

For reversib.bin, created with the quadChallenge script, it's 3E948456

 

I hope that helps.

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...