[HN Gopher] How does Sonic and Knuckles' "Lock-On Technology" wo...
       ___________________________________________________________________
        
       How does Sonic and Knuckles' "Lock-On Technology" work? (2016)
        
       Author : cglong
       Score  : 189 points
       Date   : 2023-07-16 01:02 UTC (22 hours ago)
        
 (HTM) web link (retrocomputing.stackexchange.com)
 (TXT) w3m dump (retrocomputing.stackexchange.com)
        
       | dclowd9901 wrote:
       | I never had a genesis but I recall thinking how cool this was at
       | the time. Kind of magic, really (granted I didn't know much about
       | computers in those days, but I knew it must've been hard to alter
       | an already shipped game).
       | 
       | Turns out it has a pretty simple and clever solution. Kind of
       | lost that with post production shipped patches.
        
         | gjsman-1000 wrote:
         | Sometimes, I wonder if there would be a niche market for an
         | indie-focused video game console with the following constraints
         | - I'm just thinking out load:
         | 
         | - 1080p maximum video output, meaning lower production and GPU
         | costs
         | 
         | - Absolutely no internet or wireless connectivity. Wired
         | controllers.
         | 
         | - Due to no wireless connectivity, all games produced are final
         | from the beginning. Like the good old days.
         | 
         | - Switch-like cartridges, but with weaker DRM that maybe
         | permits just using standard SD cards. Thus console has no need
         | to have an expensive built-in disc reader and only requires
         | minimal internal flash.
         | 
         | - Due to the niche market, the console manufacturer doesn't
         | charge a 30% cut, and handles all manufacturing in-house, so
         | nobody needs to worry about financing a production run.
         | 
         | I think with proper marketing, and a good enough system for
         | quickly porting games (maybe it's just Proton under the hood?),
         | you could find an audience in collectors... and prisons where
         | the lack of connectivity is a feature.
        
           | NovaDudely wrote:
           | I don't know if it would be a hit. I was convinced that Ouya
           | would have been vaguely similar in that it would allow
           | smaller devs into the market by having it as an alternative
           | to the big three. Instead it was plagued by all manner of
           | technical issues and incredibly poor handling of the whole
           | project and died in next to now time.
           | 
           | I guess there are things like the Colour Maximite 2 that
           | allows for decent speed Basic interpretation.
           | https://micromite.org/shop/maximites/colour-
           | maximite/colour-...
        
           | wolrah wrote:
           | You've basically described a worse Steam Deck, and would
           | likely have a hard time beating the price of a Steam Deck by
           | enough to be worth the sacrifices.
           | 
           | Particularly intentionally making it unable to patch games.
           | It's not like cartridge or pre-internet era disc games were
           | bug free, just in that era you were stuck with whatever bugs
           | the game shipped with forever. Games popular enough to get
           | additional production runs were often patched, but those who
           | bought an early version didn't get whatever changes the new
           | one brought unless they went out and purchased a new one.
           | Games that didn't sell well enough, perhaps at least in part
           | _because of_ the bugs they shipped with (E.T.? Superman 64?)
           | never got patched.
           | 
           | The best case scenario back then was something like Morrowind
           | on Xbox, where the game was popular enough to warrant the
           | expansions being ported over from PC and released as a
           | compilation with an updated version of the base game that
           | included a workaround for the game-breaking issue experienced
           | on the original release. We still had to buy the patch, but
           | at least it came along with a lot of new content so it didn't
           | feel like rebuying the same game.
        
             | endgame wrote:
             | > ...but those who bought an early version didn't get
             | whatever changes the new one brought unless they went out
             | and purchased a new one.
             | 
             | And for certain groups (e.g., speedrunners), this was
             | incredibly important. The example I'm most familiar with is
             | Metroid Prime 1, where so many tricks and sequence breaks
             | are only possible in the original NSTC release.
        
               | wolrah wrote:
               | One could make an argument that having to seek out rare
               | early releases to participate in the top tier of
               | speedrunning is not a good thing. It's not like updates
               | changing runs destroys a game's community, see the
               | recently popular "Only Up" for a great example. One of
               | the models used for a substantial part of the structure
               | you climb was apparently not appropriately licensed and
               | the updated route after it was replaced was significantly
               | shorter. People kept playing, the same names stayed at
               | the top of the leaderboard, the world went on.
               | 
               | That said, this also isn't inherently a problem either.
               | 
               | Steam has a feature to allow delivery of different
               | versions of a title. It's intended mostly for test
               | releases, but some games use it to allow players to
               | downgrade to specific versions for mod compatibility
               | (Kerbal Space Program) or to deliver a different tweaked
               | version for specific use cases (Truck Simulator VR port).
               | This sort of thing could be used in the same way to
               | support the speedrun community.
               | 
               | Also there are games which have restored rare bugs
               | intentionally to support speedrunning. If the bug was
               | unlikely to affect someone playing normally and is
               | important to the speedrunning community there's no reason
               | it necessarily needs to be patched.
        
             | gjsman-1000 wrote:
             | I don't know. Unlike a Steam Deck, the lack of a screen or
             | battery or large internal storage helps reduce costs - and
             | the appeal to collectors comes from having physical media
             | with a complete game.
             | 
             | The Steam Deck has no physical media. Xbox and PlayStation
             | Physical Media is a joke with extremely buggy and often
             | incomplete builds. Switch cartridges are much closer to
             | ideal... but the Switch has well-known compromises.
             | Performance could be far superior on a stationary non-
             | handheld, you wouldn't need to develop assuming Joy-Cons...
             | 
             | It would almost be marketable as being the machine for
             | archivists and collectors; with a focus solely on what they
             | appreciate (complete games, physical media, no gimmicks.)
        
           | philistine wrote:
           | There are now two disgraced video game hucksters who tried
           | what you are proposing: the Coleco Chameleon and the
           | Intellivision Amico.
           | 
           | Surprisingly, the rotting corporate corpse of a company that
           | is the modern Atari managed to release their version, the
           | stupendously called Atari VCS. However, no one cares about
           | it, with Atari's 50th anniversary collection the only thing
           | of note that company has licensed. Not made. Licensed.
        
           | jonhohle wrote:
           | I'm not sure if it fits your use case but the Evercade VS is
           | essentially this. Evercade carts are SD flash mapped to a
           | Game Boy pin out (the first 8 pins are the same as an SD
           | card). It's both easy to read carts as well as get a flash
           | cart for running arbitrary ARM code.
           | 
           | Blaze changed the way the Evercade EXP reads carts, however,
           | and it seems like the console no longer reads carts, or at
           | least doesn't after the first time.
        
         | Nition wrote:
         | Similarly amazing was the few games that had _additional
         | controller ports_ on the cartridge. _Micro Machines 2_ is one
         | example.
        
           | EgregiousCube wrote:
           | What continues to blow my mind is the Sega Channel TV
           | service. So many cool things were done with carts.
        
             | matheusmoreira wrote:
             | Brazilian bank Bradesco released internet banking software
             | for the Mega Drive in 1995.
             | 
             | https://www.segaretro.org/TeleBradesco_Resid%C3%AAncia
        
           | [deleted]
        
       | tndata wrote:
       | Cool blog post, it brings back memories!
       | 
       | I wrote a blog post for some time ago titled "How I built my own
       | Sega Mega Drive hardware dev kit from scratch"
       | https://nestenius.se/2022/01/18/how-i-built-my-own-sega-mega...
        
         | qingcharles wrote:
         | That's awesome.
        
       | Villodre wrote:
       | I remember that, in order to play S3&K in emulation, you just had
       | to concatenate both games in a COPY S3.BIN + S&K.BIN way (if you
       | used DOS) so I mostly knew the answer already.
       | 
       | But man, that answer in the Stack site was excellent.
       | Informative, long but concise, and very fun to read.
        
         | LeoPanthera wrote:
         | Many modern Genesis emulators have the ability to select a
         | second ROM to "connect" to S&K, allowing you to connect
         | arbitrary carts, if you want to.
        
       | Dylan16807 wrote:
       | > If it detects Sonic the Hedgehog 2, a signal is generated on
       | the ROM's D0 line, setting the Q bit of the 74HC74.
       | 
       | This is missing some important information. One input to the flip
       | flop is D0 on the ROM, yes, but it only sets when there is a
       | clock signal. Otherwise there would be some _very interesting_
       | coding constraints.
       | 
       | The clock of the flip flop is connected to cartridge pin B31.
       | Here's the best explanation I can find of that pin:
       | 
       |  _' /TIME' is the schematic label given to pin B31 on the
       | cartridge slot. It is essentially a chip enable for the I/O port
       | range $A130Fx, and is used for programming on-cart memory
       | mappers. The only games I know of that use it are Beyond Oasis,
       | Phantasy Star 4 (both for switching between ROM and SRAM at
       | $200000-3FFFFF) and Super Street Fighter 2 (for a full-blown ROM
       | banking chip). I don't know why it's called '/TIME'; perhaps they
       | expected to connect an RTC chip to it._
       | 
       | So if you write to certain addresses, the genesis will flicker
       | that pin, which is great for controlling an extra chip like this.
       | (I mean, it's meant to control an extra chip, but it seems like
       | the plan is a significantly smarter one than a flip flop.)
        
         | Eduard wrote:
         | Great info; go ahead and add it as an answer / comment / edit
         | to that Stackexchange page.
        
           | Dylan16807 wrote:
           | Well I'm not going to make my own answer to correct a couple
           | sentences of someone else's answer, and I don't have enough
           | points to comment or edit.
        
             | matheusmoreira wrote:
             | Hi, I'm the original author of that stack exchange answer.
             | I'd be more than happy to add your information with full
             | attribution.
             | 
             | Thanks for your explanation. I'm a programmer but don't
             | have a strong electronics background. Clock signals, those
             | chip enable signals and how they interact were difficult
             | for me, especially at the time I wrote that.
             | 
             | Edit: I just added a full citation for your comment. Thanks
             | again!
        
               | Dylan16807 wrote:
               | I don't feel like credit is necessary here but great,
               | glad the info's improved.
        
       | userbinator wrote:
       | When the cartridge connector is just the CPU bus, you can put
       | whatever devices you want into the address space. I'm not
       | familiar with newer consoles, but I believe cartridge-based ones
       | now don't do that anymore, instead treating it as a mass storage
       | device interface.
        
         | grishka wrote:
         | Yes. I read somewhere that modern CPUs run so fast that various
         | forms of interference become a problem if you just let the
         | memory bus stick out as a slot to plug things into. Switch
         | cartridges definitely use some kind of serial interface judging
         | by the number of pins.
        
           | [deleted]
        
           | LeoPanthera wrote:
           | Switch carts use an 8-bit SPI interface.
        
       | danparsonson wrote:
       | Well that's great - now I've got the music stuck in my head
       | again!
       | 
       | Seriously though, great post! As a teenager with some knowledge
       | of programming I always wondered what black magic enabled them to
       | graft a new character into an old game (Sonic 2) - it never
       | occurred to me that they'd just shipped a new version of the game
       | code.
        
       | mdale wrote:
       | Great write up. I recall the excitement of the combined effect /
       | bonus games.
        
       | matheusmoreira wrote:
       | Hey, I wrote that answer seven years ago! I tried my best to
       | understand and describe the circuits but I'm not particularly
       | knowledgeable about electronics so I'm not sure if it's 100%
       | correct.
       | 
       | Never thought it would make it to HN. In the comments I wrote:
       | 
       | > I wish a professional would comment on my analysis of the
       | circuit; if there are errors, I would like to fix them and learn
       | more.
       | 
       | Perhaps today is the day!
        
         | cushychicken wrote:
         | Very quick read suggests you got the gist of it. (Professional
         | EE with decade of embedded system HW and SW design experience
         | here.)
        
       | aerio wrote:
       | This is super interesting. I had Sonic 3 (and 1 and 2) on the
       | Sega Mega Drive, but it didn't come with these combining
       | cartridges.
        
         | atdrummond wrote:
         | Sonic and Knuckles has the Lock-in Slot. You were one game
         | away.
        
         | [deleted]
        
       | intellix wrote:
       | Did any other game ever do this on any other console?
        
         | NovaDudely wrote:
         | Not that I am aware of. There was talk about this being a
         | potential thing on N64 with Banjo and Tooie but it never came
         | to be.
        
           | atribecalledqst wrote:
           | It's actually fully functional in Banjo-Kazooie, it wasn't
           | until Donkey Kong 64 that Rare was told to remove it from the
           | game. The game is constantly writing to a certain region of
           | memory with information about which hidden locations are
           | unlocked, then on the flipside when the game boots it checks
           | RAM to see if the special data is there, then unlocks the
           | locations. It doesn't actually work by hot swapping, it
           | relies on the fact that the RAM is preserved for a certain
           | amount of time after shutting the console off.
           | 
           | I realized recently that you could actually test this -- with
           | a sufficiently old N64 console, and two copies of Banjo
           | Kazooie, you could use the cheat codes to unlock the hidden
           | locations on one game, then swap over to the second copy.
           | Theoretically, that should unlock them without having to use
           | the cheat codes.
           | 
           | If I was a bit more motivated to spend the money, I'd try it
           | myself and make a Youtube video about it!
           | 
           | Reference: https://www.raregamer.co.uk/rare-gamer-interviews-
           | paul-macha...
           | 
           | e; actually I think it's not possible for a Banjo-Kazooie
           | game to transfer to another Banjo-Kazooie game, the memory
           | that it writes to is different from the one it reads from.
           | https://tcrf.net/Banjo-Kazooie/Stop_N_Swop
        
         | ranger207 wrote:
         | No, but there were some third-party devices like the Action
         | Replay like this for cheat (read: real time manipulation of the
         | data coming over the bus) purposes, which I successfully used
         | to corrupt my Pokemon Diamond save file by saving in an out of
         | bounds area, alas
        
         | p1necone wrote:
         | Not quite as technologically involved, but there are some disc
         | based games with novel uses of disc swapping. Monster Rancher
         | is a monster breeding game where you get new monsters via
         | inserting any other disc into the console.
        
           | fredoralive wrote:
           | There were a couple of expansion discs for PlayStation 1
           | games as well, Metal Gear Solid Special Missions and Grand
           | Theft Auto: London 1969 required copies of the base games to
           | operate (at least for the European / PAL releases). I suspect
           | there's little data used from the original game discs except
           | acting as a "key".
           | 
           | I think the Dreamcast Pop'n'music (Japan only) games might've
           | had expansion discs as well? Not sure about that one.
        
             | Zach_the_Lizard wrote:
             | I want to say Shenmue on the Dreamcast had run-of-the-mill
             | multi-disc for different chapters _and_ a special disc with
             | internet options.
        
               | fredoralive wrote:
               | The discs I was talking about were sold separately, not
               | just multi disc games. Although Shenmue having what is
               | basically a "bonus features" disc in the package is
               | pretty unique (doesn't Shenmue II have some bonus stuff
               | on Disc 4 as well? I think the Saturn Shenmue prototype
               | video is on that disc?).
        
             | atribecalledqst wrote:
             | I know the Playstation 2 did -- Persona 3 for example, in
             | Japan, had its expansion content released as a separate
             | disc. (I think there was also a version released that was
             | both the base game AND the expansion content)
        
         | rahkiin wrote:
         | This is basically any DLC, right? Extra code is loaded.
        
           | LocalH wrote:
           | DLC doesn't usually introduce new _code_ to a game, that
           | tends to be reserved for full-on title updates. DLC is more
           | like if Sonic and Knuckles could _also_ support special  "new
           | level" cartridges, that didn't do anything on their own, but
           | when inserted on top of S&K provided new levels for the
           | player, but didn't themselves contain any program code.
        
             | doophus wrote:
             | Every game I've worked on (360-era) with DLC has needed
             | supporting code to be distributed in an update first.
             | Everyone gets the update, then the DLC is either just an
             | unlock for what's already there (but hidden), or contains
             | some supporting data.
        
         | Philadelphia wrote:
         | The Game Genie for the original NES worked like that
         | 
         | https://en.m.wikipedia.org/wiki/Game_Genie
        
           | christoph wrote:
           | Unlicensed NES Codemasters carts as well like Dizzy and Micro
           | Machines, that used "plug-thru" to utilise the licence chip
           | from any other official game -
           | https://www.nesworld.com/codemasters.php
        
       ___________________________________________________________________
       (page generated 2023-07-16 23:02 UTC)