Jump to content
IGNORED

Intellivision II Coleco compatibly mod explanation.


Recommended Posts

I have a pretty good idea why it works. You're shorting together BDIR_OUT and BC2_OUT.

 

Before I get to why that's important, let me answer this: How does the third-party lockout work?

 

First, it checks for a particular bit to be set in the cartridge header. Location $500C is sometimes known as the "keyclicks" word, because bits in that word control the circumstances under which the EXEC will make an automatic clicking sound on user input. For example, it makes sense to make a clicking sound on disc input in Poker and Blackjack, but not in Astrosmash. Bit 6 in this word was reserved and games always just left it set to 0. The lock-out check looks to see if it's set, and if it's set, then it skips the rest of the checks and launches the game.

 

Next, it checks the copyright year in the header. The copyright year is used by the built in title screen. 3rd party games used their own custom title screens, and so had no reason to set this word to a meaningful value. The check basically makes sure that the year is in the range 1978 to 1982. If it's inside that range, it lets the game start. Otherwise, it goes into an infinite loop.

 

For Coleco's Donkey Kong, you can see the last few cycles of that process in this debugger trace:

0000 502B 0295 8007 0296 502D 02F4 1E7D S-----i-  JSR  R4,$04EE         39590
0000 502B 0295 8007 1E80 502D 02F4 04EE S-----i-  PULR R1               39603
0000 500C 0295 8007 1E80 502D 02F3 04EF S-----i-  PULR R2               39615
0000 500C 0000 8007 1E80 502D 02F2 04F0 S-----i-  PSHR R4               39627
0000 500C 0000 8007 1E80 502D 02F3 04F1 S-------  MVI@ R1,R1            39636    <-- read the keyclicks word
0000 0080 0000 8007 1E80 502D 02F3 04F2 S-----i-  RSWD R1               39644    <-- if bit 6 was set, skip the test
0000 0080 0000 8007 1E80 502D 02F3 04F3 S-------  BEQ  $04FD            39650
0000 0080 0000 8007 1E80 502D 02F3 04F5 S-----i-  SUBI #$004E,R2        39657    <-- Is the year in R2 less than 1978? ($4E = 78)
0000 0080 FFB2 8007 1E80 502D 02F3 04F7 S-----i-  BMI  $04F7            39665    <-- Yes:  Loop here infinitely!
0000 0080 FFB2 8007 1E80 502D 02F3 04F7 S-----i-  BMI  $04F7            39674
0000 0080 FFB2 8007 1E80 502D 02F3 04F7 S-----i-  BMI  $04F7            39683

That BMI $04F7 instruction will loop indefinitely. Had that test succeeded, the next test in the code makes sure the year is less than or equal to 1982:

 $04F9:    037A 0004              CMPI #$0004,R2                              
 $04FB:    022E 0001              BGT  $04FB                                  
 $04FD:    0039                   RSWD R1                                     
 $04FE:    02B7                   PULR R7       

Anyway, that's enough code. The point is that when the lock fails for Donkey Kong, we're stuck at an infinite loop on that BMI instruction. R2 holds the number -78, and we loop forever.

 

So what does shorting BDIR_OUT and BC2_OUT buy us? It will corrupt the bus control lines that feed the EXEC by shorting them together. They both come off of TTL outputs (at least in the Intellivision 1), and so in all likelihood, when the values of BDIR_OUT and BC2_OUT disagree, 0 will win over 1.

 

There's a handy table of bus phases over at my website.

 

During this infinite loop, the CPU will be issuing the following sequence of bus phases repeatedly:

  • BAR with address $4F7
  • DTB to fetch the BMI opcode
  • BAR with address $4F8
  • DTB to fetch the branch offset

Wash, rinse, repeat.

 

The BAR bus phase sets BDIR=1, BC2=0, BC1=0; in contrast, DTB sets BDIR=0, BC2=1, BC1=1. If my theory is correct, then shorting BDIR and BC2 will convert these to bus phases to "NACT" and "ADAR", respectively.

 

NACT is the no-action bus phase. ADAR copies the current contents of the bus to everyone's "address register," forming the address of the next bus phase. I will assert without explanation that by doing this, eventually (within a few bus cycles) the CPU starts reading nothing but $FFFF. I'll leave the proof as an exercise for the reader.

 

The series of FFFFs turn into the instruction "XORI #$FFFF, R7". This is a really rather baroque branch instruction, it turns out. It sets the program counter to the inverse of the value of the program counter after fetching the instruction. (That's a mouthful!)

 

If fetched in place of the branch opcode at $4F7, it'll cause the CPU to keep jumping back and forth between location $4F7 and $FB06. It will also muck with the CPU flags, clearing the S flag when jumping back from $FB06 to $4F7. The reason it bounces between the two locations is that the CPU will also fetch "XORI #$FFFF, R7" at $FB06 as well.

 

If fetched in place of the branch offset at $4F8, then things are slightly different. The branch offset at $4F8 is $0001. Replacing this with $FFFF will cause the BMI to branch to location $4F9 instead of $4F7. This breaks us out of the BMI-to-self loop. But, upon arriving at $4F9, the CPU immediately starts fetching XORI #$FFFF, R7, and bounces between $4F9 and $FB04.

 

In any case, once you release the short circuit, the bus phases start operating correctly again.

 

If you had happened to hit the button when the CPU was fetching from $4F7, the CPU will eventually return to $4F7, with the sign bit cleared. This will cause it to not take the branch and fall through to the following comparison. That comparison checks to see if R2 is less than 4 (and R2, as you recall, holds -78). That check passes and the game starts.

 

If you had happened to hit the button when the CPU was fetching from $4F8, the CPU will eventually return to $4F9 (the instruction after the infinite branch). This will continue with the comparison I just described, and will start the game.

 

Note that if there were any game ROM at $Fxxx for these games, the hack could fail for that reason, as the CPU would fetch something other than XORI #$FFFF, R7 there. But, the Coleco games don't seem to have any ROM up there.

 

The reason the hack might not work with Word Fun is that its copyright year is above 1978.... (Interestingly: I couldn't check this, as my copy of Word Fun works OK with the Intellivision 2 EXEC.)

Edited by intvnut
  • Like 2
Link to comment
Share on other sites

 

I believe I get some of what your saying. I don't understand programing language so please correct me if I got it wrong. The Intellivision II Exec checks for a value to determine a year between 78-82 for it's built in title copyrite screen. Coleco didn't use the built title screen so therefore they didn't bother assigning a value for it. Which causes a infinite loop when the exec check for it. Shorting out those two pins breaks the infinite loop and some how in the process creates a value of 78 for the year.

Link to comment
Share on other sites

I believe I get some of what your saying. I don't understand programing language so please correct me if I got it wrong. The Intellivision II Exec checks for a value to determine a year between 78-82 for it's built in title copyrite screen. Coleco didn't use the built title screen so therefore they didn't bother assigning a value for it. Which causes a infinite loop when the exec check for it. Shorting out those two pins breaks the infinite loop and some how in the process creates a value of 78 for the year.

 

Yep, that's the short, short version. I'd add one add'l detail to that: The Intellivision II also checks to see if another bit is set to skip the year check. All new games after the Intellivision 2 came out were supposed to set this secret bit so they'd still work with a copyright year after 1982.

 

As far as whether this mod is safe? I'm not a big fan of shorting out two output lines like this. I imagine if you just tap it quickly, it might not damage anything. I'm not going to make the mod to my own system, though.

Link to comment
Share on other sites

Yeah I didn't plan on using the switch a lot anyway. It's just nice to have if I really need to play Venture or Donkey Kong on it (I hate Carnival so that one is a non issue). I have a couple original models and if doing this eventually screws it up it would suck but not be the end of the world. Anyway thanks for the info. :)

Edited by thecrypticodor
Link to comment
Share on other sites

I played Donkey Kong when I was a kid. I remember being disappointed in how different it was from the arcade version. Still, my brother and I played it quite a bit, though we never loved the game.

 

I concur. As one who was deeply disappointed as a kid when I first encountered Coleco's Donkey Kong, I can say that in spite of it's bad resemblance to the original, it was still a decent game, as good as many other Intellivision games with bad control handling and cheap-o graphics. I know I played it a lot.

 

There is more value to having it than just keeping a "complete collection and to laugh at."

 

-dZ.

 

P.S. Thanks, intvnut, for providing that detailed description of the lock-out feature.

Edited by DZ-Jay
Link to comment
Share on other sites

 

 

I disagree. I was not a kid when I got it for the system. Popped it in, deemed it 'crap' and that was that. I felt no need to play it as a substitute. There were a lot more games that deserved my attention. I fail to see how you can call it a 'decent game'.

 

Common Games For Your Intellivision you know you love the Intellivision version of Donkey Kong. It's probably plugged into your Intellivision right now still slightly warm from a long play session. I'd bet that not only is it one of your favorite Intellivision games but one of your favorite games of all time in general. :P

Link to comment
Share on other sites

I fail to see how you can call it a 'decent game'.

 

I know it's hard, but I don't have replacement stock burning a hole in my inventory, so it's not that hard for me to call it a "decent game". In my opinion, on its own merit, it's not any worse than Tutankham, Mousetrap, or many other old games, which I've enjoyed as well.

 

There are some games I find completely unplayable or "un-fun," but Coleco's Donkey Kong is not one of them. Sorry.

 

-dZ.

Link to comment
Share on other sites

Only thing I can say is that I didn't realize how bad Donkey Kong was because I was only 9 when I got it and played different games in the Arcade. I will say my cousin who was 2 years older and played it im arcade begged to get it and was severely disappointed. I didn't have to go through that because I was ignorant as I played stuff like Ms. Pac-Man, Pole Position, Table Hockey and other games in arcade. I guess I was lucky that my parents didn't pay full price for that one and I didn't know any better so I actually played it a bit as a kid. With knowledge of course, you can see what a POC game really was.

Link to comment
Share on other sites

 

I know it's hard, but I don't have replacement stock burning a hole in my inventory, so it's not that hard for me to call it a "decent game". In my opinion, on its own merit, it's not any worse than Tutankham, Mousetrap, or many other old games, which I've enjoyed as well.

 

There are some games I find completely unplayable or "un-fun," but Coleco's Donkey Kong is not one of them. Sorry.

 

-dZ.

 

You didn't say what I think you are saying did you? Are you implying that my dislike and calling Coleco Donkey Kong 'utter crap' is tainted by my desire to sell copies of DK Arcade. If you did, well you know what you can do.

 

Your likes are your likes. If you like Coleco DK, who am I to tell you what to like and not to like? However, don't think that your opinion is 'typical' because its not. You don't speak for the Intellivision community.

Link to comment
Share on other sites

You didn't say what I think you are saying did you? Are you implying that my dislike and calling Coleco Donkey Kong 'utter crap' is tainted by my desire to sell copies of DK Arcade. If you did, well you know what you can do.

 

Your likes are your likes. If you like Coleco DK, who am I to tell you what to like and not to like? However, don't think that your opinion is 'typical' because its not. You don't speak for the Intellivision community.

Which part of "I think" and "I'm my opinion" is supposed to represent the Intellivision community?

 

The last comment from you to which I replied suggested incredulity as to why I could have a different opinion than yours. Everyone in this thread (and in the forum at large) is expressing their opinions. So I did.

 

dZ.

Link to comment
Share on other sites

Do you even read your own posts? Where in this earlier reply to my comment is there any 'I think' or 'In my opinion'?

 

"I concur. As one who was deeply disappointed as a kid when I first encountered Coleco's Donkey Kong, I can say that in spite of it's bad resemblance to the original, it was still a decent game, as good as many other Intellivision games with bad control handling and cheap-o graphics. I know I played it a lot.

 

There is more value to having it than just keeping a "complete collection and to laugh at."

 

You state it as if it is a 'fact'. Perhaps you should read your posts and try and see how others would view such a post as arrogant.

 

And, yes, you put in an 'in my opinion' here (I saw no I THINK) :

 

"I know it's hard, but I don't have replacement stock burning a hole in my inventory, so it's not that hard for me to call it a "decent game". In my opinion, on its own merit, it's not any worse than Tutankham, Mousetrap, or many other old games, which I've enjoyed as well.

 

There are some games I find completely unplayable or "un-fun," but Coleco's Donkey Kong is not one of them. Sorry."

 

....which certainly implies 'My opinion is correct, and you're wrong....sorry'.....

 

You come off as an arrogant 'know it all' who believes he is speaking for the entire community. For a guy who knows a lot of big words in English, you certainly don't have a grasp on some basics.

 

And, you didn't answer my question.

 

Did you or did you not imply that my opinion that Coleco Donkey Kong is crap was influenced by wanting to sell stock of DK Arcade?

Link to comment
Share on other sites

You said,

I fail to see how you can call it a 'decent game'.

You "fail to see" how I can have a different opinion, yet I'm the one saying "you are wrong"?

 

Moreover, your comment above acknowledges that "I" am calling it a decent game. Unless you believe that my words are de facto the voice of the community, I never suggested that. That's your hang up then, not mine.

 

When I talk, or post, I represent myself. That's just part of participating in a forum.

 

By the way, if it wasn't clear to you, that is my opinion.

Link to comment
Share on other sites

FWIW, if you happen to have a multi-cart, you can patch the 3rd party game images so that they'll play on the Intellivision II without any issues. That's my own preferred solution for playing 3rd party games on an Inty 2. :-)

Is there a way to patch them all the same? Or is it a different patch for each one?

Link to comment
Share on other sites

Is there a way to patch them all the same? Or is it a different patch for each one?

 

So far, it seems safe just to set bit 6 in location $500C. I haven't had any game fail with that patch. Granted, I've only tested minimally. That said, what I don't remember is if all the games have the same value in $500C. So the exact word you need in that location may vary by cartridge.

 

I'm at work right now and can't really check.

Link to comment
Share on other sites

Your failure to answer my question is clear to me that you intended it. Just do me a favour, and never comment on anything I ever say again.

 

I have no interest in your opinion of me. If you continue to take cheap shots at me, you will just reveal yourself to be the DB that many people have identified you as to me.

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