Path: blob/master/BizHawk.Emulation.Cores/Consoles/Atari/docs/Atari_Mappers.txt
2 views
Copied from:1http://blog.kevtris.org/blogfiles/Atari%202600%20Mappers.txt23Mostly Inclusive Atari 2600 Mapper / Selected Hardware Document4---------------------------------------------------------------5603/04/127Kevin Horton aka kevtris8---910Version 1.00111213Things covered in this document:14--------------------------------1516"original" mappers from when the system was in production:17182K194K20CV (Commavid)21F8 (Atari 8K)22F6 (Atari 16K)23F4 (Atari 32K)24FE (Activision 8K)25E0 (Parker bros. 8K)263F (Tigervision 8K)27FA (CBS RAM Plus 12K)28E7 (M-network 16K)29F0 (Megaboy 64K)30UA (UA Ltd 8K)3132"homebrew" mappers which are more recent:33343F (Enhanced Tigervision style, up to 512K)353E (up to 512K of ROM, 256K of RAM)360840 (Econobanking)37MC (Megacart)38EF (16K)39X07 (Atariage)404A50 (no name)4142Atari 2600 peripherals:4344Spectravideo Compumate45Pitfall 2 DPC46Supercharger47Supercharger tape format48Supercharger demo unit495051---525354"original" 2600 Mappers55-----------------------56572K (no name)58-----59602K of ROM. no bankswitching.61624K (no name)63-----64654K of ROM. no bankswitching.6667CV Commavid68-----6970This was used by Commavid. It allowed for both ROM and RAM on the cartridge,71without using bankswitching. There's 2K of ROM and 1K of RAM.72732K of ROM is mapped at 1800-1FFF.741K of RAM is mapped in at 1000-17FF.7576The read port is at 1000-13FF.77The write port is at 1400-17FF.7879F8 (Atari style 8K)80-----8182This is the fairly standard way 8K of cartridge ROM was implemented. There are two834K ROM banks, which get mapped into the 4K of cartridge space. Accessing 1FF8 or841FF9 selects one of the two 4K banks. When one of these two addresses are accessed,85the banks switch spontaniously.8687ANY kind of access will trigger the switching- reading or writing. Usually games use88LDA or BIT on 1FF8/1FF9 to perform the switch.8990When the switch occurs, the entire 4K ROM bank switches, including the code that is91reading the 1FF8/1FF9 location. Usually, games put a small stub of code in BOTH banks92so when the switch occurs, the code won't crash.9394F6 (Atari style 16K)95-----9697This is a fairly standard 16K bankswitching method. It works like F8, except there's98four 4K banks of ROM, selected by accessing 1FF6 through 1FF9. These sequentially99select one of the 4 banks. i.e. 1FF6 selects bank 0, 1FF7 selects bank 1, etc.100101F4 (Atari style 32K)102-----103104Again, this works like F8 and F6 except now there's 8 4K banks. Selection is performed105by accessing 1FF4 through 1FFB.106107FE (Activision special)108-----109110Activision used this method on only three games: Decathlon, Robot Tank, and the111prototype Thwocker. This mapper is one of the more interesting ones in that it uses112stack access to select banks. It is composed of two 4K banks, similar to F8.113Unlike F8, however, switching occurs when the stack is accessed.114115This mapper allows for "automatic" bankswitching to occur, using JSR and RTS. The116addresses for all JSRs and RTS' are either Fxxx or Dxxx, and the mapper uses this to117figure out which bank it should be going to.118119The cycles of a JSR are as such:1201211: opcode fetch1222: fetch low byte of address1233: read 100,s : garbage fetch1244: write 100,s : PCH, decrement S1255: write 100,s : PCL, decrement S1266: fetch high byte of address127128The cycles of an RTS are as such:1291301: opcode fetch1312: fetch next opcode (and throw it away)1323: read 100,S : increment S1334: read 100,S : pull PCL from stack, increment S1345: read 100,S : pull PCH from stack135136The chip can determine what instruction is being executed by watching the data and137address bus.138139It watches for 20 (JSR) and 60 (RTS), and accesses to 100-1ff:140141(opcode cycles)14214320 (opcode)144add low (new add low)145stack (garbage read)146stack (push PCH)147stack (push PCL)148add high (new add hi) : latch D5. This is the NEW bank we need to be in.14915060 (opcode)151xx (garbage fetch)152stack153stack (pull PCL)154stack (pull PCH) : latch D5. This is the NEW bank we need to be in.155156157Using emulators or similar there is a large cheat that can be used. A13 can be used158to simply select which 8K bank to be in.159160E0 (Parker Bros)161-----162163Parker Brothers used this, and it was used on one other game (Tooth Protectors). It164uses 8K of ROM and can map 1K sections of it.165166This mapper has 4 1K banks of ROM in the address space. The address space is broken up167into the following locations:1681691000-13FF : To select a 1K ROM bank here, access 1FE0-1FE7 (1FE0 = select first 1K, etc)1701400-17FF : To select a 1K ROM bank, access 1FE8-1FEF1711800-1BFF : To select a 1K ROM bank, access 1FF0-1FF71721C00-1FFF : This is fixed to the last 1K ROM bank of the 8K173174Like F8, F6, etc. accessing one of the locations indicated will perform the switch.1751763F (Tigervision)177-----178179Traditionally, this method was used on the Tigervision games. The ROMs were all 8K, and180there's two 2K pages in the 4K of address space. The upper bank is fixed to the last 2K181of the ROM.182183The first 2K is selectable by writing to any location between 0000 and 003F. Yes, this184overlaps the TIA, but this is not a big deal. You simply use the mirrors of the TIA at18540-7F instead! To select a bank, the games write to 3Fh, because it's not implemented186on the TIA.187188The homebrew community has decided that if 8K is good, more ROM is better! This mapper189can support up to 512K bytes of ROM just by implementing all 8 bits on the mapper190register, and this has been done... however I do not think 512K ROMs have been made just191yet.192193FA (RAM Plus)194-----195196CBS Thought they'd throw a few tricks of their own at the 2600 with this. It's got19712K of ROM and 256 bytes of RAM.198199This works similar to F8, except there's only 3 4K ROM banks. The banks are selected by200accessing 1FF8, 1FF9, and 1FFA. There's also 256 bytes of RAM mapped into 1000-11FF.201The write port is at 1000-10FF, and the read port is 1100-11FF.202203E7 (M-Network)204-----205206M-network wanted something of their own too, so they came up with what they called207"Big Game" (this was printed on the prototype ASICs on the prototype carts). It208can handle up to 16K of ROM and 2K of RAM.2092101000-17FF is selectable2111800-19FF is RAM2121A00-1FFF is fixed to the last 1.5K of ROM213214Accessing 1FE0 through 1FE6 selects bank 0 through bank 6 of the ROM into 1000-17FF.215Accessing 1FE7 enables 1K of the 2K RAM, instead.216217When the RAM is enabled, this 1K appears at 1000-17FF. 1000-13FF is the write port, 1400-17FF218is the read port.2192201800-19FF also holds RAM. 1800-18FF is the write port, 1900-19FF is the read port.221Only 256 bytes of RAM is accessable at time, but there are four different 256 byte222banks making a total of 1K accessable here.223224Accessing 1FE8 through 1FEB select which 256 byte bank shows up.225226F0 (Megaboy)227-----228229This was used on one game, "megaboy".. Some kind of educational cartridge. It supports23064K of ROM making it the biggest single production game made during the original run231of the 2600.232233Bankswitching is very simple. There's 16 4K banks, and accessing 1FF0 causes the bank234number to increment.235236This means that you must keep accessing 1FF0 until the bank you want is selected. Each237bank is numbered by means of one of the ROM locations, and the code simply keeps accessing2381FF0 until the bank it is looking for comes up.239240241UA (UA Ltd)242-----243244This one was found out later on, lurking on a proto of Pleaides. It works with 8K of ROM245and banks it in 4K at a time.246247Accessing 0220 will select the first bank, and accessing 0240 will select the second.248249250That's about it for the "Traditional" mappers that were used on commercial releases.251252-----------------------------------253254The 2600 programming community's been pretty busy with adding new mappers. Here's the list255of known (to me) mappers used on homebrew games.2562573E (Boulderdash258-----259260This works similar to 3F (Tigervision) above, except RAM has been added. The range of261addresses has been restricted, too. Only 3E and 3F can be written to now.2622631000-17FF - this bank is selectable2641800-1FFF - this bank is the last 2K of the ROM265266To select a particular 2K ROM bank, its number is poked into address 3F. Because there's2678 bits, there's enough for 256 2K banks, or a maximum of 512K of ROM.268269Writing to 3E, however, is what's new. Writing here selects a 1K RAM bank into2701000-17FF. The example (Boulderdash) uses 16K of RAM, however there's theoretically271enough space for 256K of RAM. When RAM is selected, 1000-13FF is the read port while2721400-17FF is the write port.2732740840 (Econobanking)275-----276277This is another 8K bankswitching method with two 4K banks. The rationale is that it's278cheap and easy to implement with only a single 74HC153 or 253 dual 4:1 multiplexer.279280This multiplexer can act as a 1 bit latch AND the inverter for A12.281282To bankswitch, the following mask it used:283284A13 A0285----------------2860 1xxx xBxx xxxx287288Each bit corresponds to one of the 13 address lines. a 0 or 1 means that bit must be2890 or 1 to trigger the bankswitch. x is a bit that is not concidered (it can be either2900 or 1 and is thus a "don't care" bit).291292B is the bank we will select. sooo, accessing 0800 will select bank 0, and 0840293will select bank 1.294295SB (Superbanking)296-----297298This is the same as 0840, except A0-A6 are used instead of just A6, as so:299300A13 A0301----------------3020 1xxx xBBB BBBB303304By using 6 bits, the maximum ROM size has been increased from 8K to 256K.305306307MC (Megacart)308-----309310This is the mapper for the "Chris Wilkson's Megacart".311312Only four addresses are used to bankswitch on this one.313314Up to 128K of ROM and 64K of RAM can be accessed.3153161000-13FF is selected by address 3C3171400-17FF is selected by address 3D3181800-1BFF is selected by address 3E3191C00-1FFF is selected by address 3F320321The value written determines what will be selected:32232300-7F written will select one of the 128 1K ROM banks32480-FF written will select one of the 128 512 byte RAM banks325326When a RAM bank is selected, the lower 512 bytes is the write port, while327the upper 512 bytes is the read port.328329On accessing address FFFC or FFFD, the last 1K bank points to the last bank in ROM,330to allow for system initialization. Jumping out of the last bank disables this.331It's debatable how easy this system would be to implement on a real system.332333Detecting when to disable the last bank fixing is difficult. The documentation334says:335336"337Megacart Specification, Rev1.1338(c) 1997 Chris Wilkson339[email protected]340341Because the console's memory is randomized at powerup, there is no way to342predict the data initially contained in the "hot addresses". Therefore,343hardware will force slot 3 to always point to ROM block $FF immediately344after any read or write to the RESET vector at $FFFC-$FFFD. Block $FF345must contain code to initialize the 4 memory slots to point to the desired346physical memory blocks before any other code can be executed. After program347execution jumps out of the boot code, the hardware will release slot 3 and348it will function just like any other slot.349"350351Unfortunately, there's not an easy way to detect this. Just watching the address352bus won't work easily: Writing anywhere outside the bank 1C00-1FFF (i.e. bank353registers, RAM, TIA registers) will cause the switching to revert bank 3, crashing354the system.355356The only way I can see it working is to disregard any access to addresses 3C-3F.357358Emulators have it easier: they can simply watch the program counter, vs. the359address bus. An actual system doesn't have that luxury, unfortunately, so it must360disregard accesses to 3C-3F instead.361362EF (no name?)363-----364365This is a fairly simple method that allows for up to 64K of ROM, using 16 4K banks.366It works similar to F8, F6, etc. Only the addresses to perform the switch is3671FE0-1FEF. Accessing one of these will select the desired bank. 1FE0 = bank 0,3681FE1 = bank 1, etc.369370X07 (Atariage)371-----372373Apparently, this was only used on one cart: Stella's Stocking.374Similar to EF, there are 16 4K banks, for a total of up to 64K of ROM.375376The addresses to select banks is below the ROM area, however.377378The following TWO masks are used:379380A13 A0381----------------3820 1xxx nnnn 1101383384This means the address 80B selects bank 0, 81B selects bank 1, etc.385386In addition to this, there is another way:387388A13 A0389----------------3900 0xxx 0nxx xxxx391392This is somewhat special purpose: Accessing here does nothing, unless one of the393last two banks are selected (banks 14 or 15). In that case, the new bank is:394395111n i.e. accessing 0000 will select bank 14 (Eh, 1110b) while accessing 0040396will select bank 15 (Fh, 1111b). This allows for bankswitching by accessing397TIA registers at 00-3F or 40-7F without incurring any overhead.3983994004014A50 (no name)402-----403404Upon review, I don't think this method is terribly workable on real405hardware. There's so many problems that I kinda gave up trying to406count them all. Seems that this is more of a "pony" method than something407actually usable. ("pony" referring to "I want this, and that, and that, and408a pony too!")409410One major problem is that it specifies that memory can be read and written411to at the same address, but this is nearly impossible to detect on a 2600412cartridge. You'd almost have to try and figure out what opcodes are being413run, and what cycle it's on somehow, all just by watching address and414data bus state. Not very practical.415416The other problem is just the sheer volume of things it is supposed to do.417There's just tons and tons of unnecessary things like attempting to detect418BIT instructions, handling page wraps and other silly things.419420This all supposidly fit into a Xilinx XC9536XL but I am not sure how the421chip could handle the RAM issue above at all. It almost needs to see R/W422and M2 (clock) to be able to properly do most of the things it's doing.423424425----------------------------------------------426427Peripherals428-----------429430431Spectravideo Compumate Add-on432-----433434This is more than just a cartridge mapper- it's also a "computer" add-on.435There's two 8K EPROMs soldered on top of each other. There's two short436wires with DB-9's on them which you plug into the two controller ports.437A 42 or so key membrane keyboard with audio in and audio out, and 1K of RAM.438439Port A on the RIOT is used to run most of the functions on the Compumate:4404417 0442---------443ACRE 31BB444445A - Audio input from tape player446C - Audio out to tape player and 4017 CLK447R - 4017 RST, and RAM direction. (high = write, low = read)448E - RAM enable. 1 = disable RAM, 0 = enable RAM4493 - Row 3 of keyboard4501 - Row 1 of keyboard451B - 2 bit ROM bank number452453All bits are outputs except for the 2 row inputs from the keyboard.454455Unlike most things, the Compumate uses all three of the TIA inputs on each456joystick port (paddles and fire).457458TIA inputs:4594600 - function key4611 - pulled high thru 20K resistor4622 - pulled high thru 20K resistor4633 - shift key4644 - Row 04655 - Row 2466467468Memory Map:469-----------4704711000-1FFF : selectable 4K ROM bank (selected by D0, D1 on portA)472473On powerup, the port is all 1's, so the last bank of ROM is enabled, RAM is474disabled.475476when RAM is enabled:4774781000-17FF : 2K of RAM. It's mapped into 1000-17FF. Unlike most 2600 carts,479bit 5 of portA controls if the RAM is readable or writable. When it's high,480the RAM is write only. When it's low, it is read only. There's no separate481read and write ports.482483484Keyboard:485---------486487The keyboard's composed of a 4017 1 of 10 counter, driving the 10 columns of488the keyboard. It has 4 rows. The 4 row outputs are buffered by inverters.489490Bit 5 of portA controls the reset line on the 4017. Pulling it high will reset491scanning to column 0. Pulling it low will allow the counter to be clocked.492493Bit 6 of portA clocks the 4017. Each rising edge advances the column one494count.495496There's 10 columns labelled 0-9, and 4 rows, labelled 0-3.497498Column4995000 1 2 3 4 5 6 7 8 9501+---+ +---+ +---+ +---+ +---+ +---+ +---+ +---+ +---+ +---+502| 7 | | 6 | | 8 | | 2 | | 3 | | 0 | | 9 | | 5 | | 1 | | 4 | 0503+---+ +---+ +---+ +---+ +---+ +---+ +---+ +---+ +---+ +---+504+---+ +---+ +---+ +---+ +---+ +---+ +---+ +---+ +---+ +---+505| U | | Y | | I | | W | | E | | P | | O | | T | | Q | | R | 1506+---+ +---+ +---+ +---+ +---+ +---+ +---+ +---+ +---+ +---+ Row507+---+ +---+ +---+ +---+ +---+ +---+ +---+ +---+ +---+ +---+508| J | | H | | K | | S | | D | |ent| | L | | G | | A | | F | 2509+---+ +---+ +---+ +---+ +---+ +---+ +---+ +---+ +---+ +---+510+---+ +---+ +---+ +---+ +---+ +---+ +---+ +---+ +---+ +---+511| M | | N | | < | | X | | C | |spc| | > | | B | | Z | | V | 3512+---+ +---+ +---+ +---+ +---+ +---+ +---+ +---+ +---+ +---+513514Function and Shift are separate keys that are read by 2 of the paddle inputs.515These two buttons pull the specific paddle input low when pressed.516517Because the inputs are inverted, a low indicates a pressed button, and a high518is an unpressed one.519520The audio input/output are designed to drive a tape player. The audio output is521buffered through an inverter and 2 resistors and a capacitor to reduce the level522to feed it into the tape player.523524The audio input is passed through a .1uf capacitor and is pulled to 1/2 supply525by two 20K resistors, then it goes through a hex inverting schmitt trigger to526square it up. This then runs into bit 7 of portA.527528529DPC (Pitfall 2)530-----531532Back in the day, this game was da shizzle (and IMO still is). It did its trick via533a custom chip in the cartridge. Fortunately for us, there's a patent that describes534lots of the internal workings of the chip (number 4644495, "video memory system").535536Interestingly, the patent shows the DPC as a *separate* device. You plug a537passthrough cartridge into your 2600, then plug the game cartridge into the538passthrough. Apparently, Activision thought that people wouldn't like this, or539there was some other reasoning behind it and they ditched that idea and went with540the DPC inside the cartridge.541542Unfortunately for Activision, it was filed in January of 1984, during the height of543the crash. The inventor is listed as David Crane.544545OK, enough background. Now onto the meat:546547The DPC chip is just 24 pins, and needs to pass through the chip enable to the548game ROM on the cartridge, so it can only address 2K of memory. This means the549DPC shows up twice in the address space, once at 1000-107F and again at 1800-18FF.550551There's been some discussion about the pitch of the music generated by this chip,552and how different carts will play the music at different pitches. Turns out, on the553cart, the frequency is determined by a resistor (560K ohms) and a capacitor integrated554onto the die of the DPC chip itself. The resistor is a 5% tolerance part, and the555process variations of the DPC itself will control the frequency of the music produced556by it.557558If you touch the resistor on the cartridge board, the music pitch will drastically559change, almost like you were playing it on a theremin! Lowering the resistance makes560the music pitch increase, increasing the resistance makes the pitch lower.561562It's extremely high impedance so body effects of you touching the pin makes it563vary wildly.564565Thus, I say there's really no "one true" pitch for the music. The patent, however,566says that the frequency of this oscillator is 42KHz in the "preferred embodiment".567The patent says that it can range from 15KHz to 80KHz depending on the application568and the particular design of the sound generator. I chose 21KHz (half their preferred569value) and it sounds fairly close to my actual cartridge.570571Address map:572573Read Only:5741000-1003 : random number generator5751004-1005 : sound value (and MOVAMT value ANDed with draw line carry, with draw line add)5761006-1007 : sound value (and MOVAMT value ANDed with draw line carry, no draw line add)5771008-100F : returned data value for fetcher 0-75781010-1017 : returned data value for fetcher 0-7, masked5791018-101F : returned data value for fetcher 0-7, nybble swapped, masked5801020-1027 : returned data value for fetcher 0-7, byte reversed, masked5811028-102F : returned data value for fetcher 0-7, rotated right one bit, masked5821030-1037 : returned data value for fetcher 0-7, rotated left one bit, masked5831038-103F : fetcher 0-7 mask584585Write Only:5861040-1047 : fetcher 0-7 start count5871048-104F : fetcher 0-7 end count5881050-1057 : fetcher 0-7 pointer low5891058-105B : fetcher 0-3 pointer high590105C : fetcher 4 pointer high and draw line enable591105D-105F : fetcher 5-7 pointer high and music enable5921060-1067 : draw line movement value (MOVAMT)5931068-106F : not used5941070-1077 : random number generator reset5951078-107F : not used596597random number generator598-----------------------599600The random number generator is used on Pitfall 2 to make the eel flash between white and601black, and nothing else. Failure to emulate this will result in the eel not flashing.602603It's an 8 bit LFSR which can be reset to the all 0's condition by accessing 1070-1077.604Unlike a regular LFSR, this one uses three XOR gates and an inverter, so the illegal605condition is the all 1's condition.606607There's 255 states and the following code emulates it:608609LFSR = ((LFSR << 1) | (~(((LFSR >> 7) ^ (LFSR >> 5)) ^ ((LFSR >> 4) ^ (LFSR >> 3))) & 1)) & 0xff;610611Bits 3, 4, 5, and 7 are XOR'd together and inverted and fed back into bit 0 each time the612LFSR is clocked.613614The LFSR is clocked each time it is read. It wraps after it is read 255 times. (The615256th read returns the same value as the 1st).616617data fetchers618-------------619620Internal to the DPC is a 2K ROM containing the graphics and a few other bits and pieces621(playfield values I think) of data that can be read via the auto-incrementing data622fetchers.623624Each set of 8 addresses (1008-100F for example) return the data from one of the 8625data fetcher pointers, returning the data in a slightly different format for each.626The format for the 6 possible register ranges is as follows:627628For the byte "ABCDEFGH" (bit 7 to bit 0) it is returned:6296301008-100F: ABCDEFGH (never masked)6311010-1017: ABCDEFGH6321018-101F: EFGHABCD (nybble swap)6331020-1027: HGFEDCBA (bit reversed)6341028-102F: 0ABCDEFG (shifted right)6351030-1037: BCDEFGH0 (shifted left)636637Reading from each set of locations above returns the byte of data from the DPC's638internal ROM. Reading from 1008 accesses data at DF (data fetcher) 0's pointer,639then decrements the pointer. Reading from 1009 accesses data at DF1, and so on.640641There is no difference except how the data is returned when reading from 1008,6421010, 1018, 1020, etc. All of them return data pointed to by DF0's pointer. Only643the order of the bits returned changes.644645I am not sure what purpose returning the data shifted left or right 1 bit serves,646and it was not used on Pitfall 2, but that's what it does. I guess you could647use it to make a sprite appear to "wiggle" left and right a bit, if it were 6 pixels648wide.649650All of these read ports returns the data masked by an enable signal, except for6511008-100F. The data here is never masked. (more about this in a minute)652653To read data out of the chip, first you program in its start address into the654pointer registers. These are at 1050-1057 for the lower 8 bits of the pointer655value, and 1058-105F for the upper 4 bits of the pointer value. This forms the65612 bit address which can then be used to index the DPC's ROM.657658A few of the upper bits on 105C-105F are used for a few other purposes, which will be659described later.660661Masking the data:662-----------------6636641038-103F is the readback for the mask value6651040-1047 is the start count6661048-104F is the end count667668669The mask value can be read via 1038-103F. It returns 0 when graphics are masked, and670FFh when they are not masked. (0 = reset, 1 = set)671672The basic synopsis is thus:673674When the lower 8 bits of the pointer equals the start count, the mask register is set.675When the lower 8 bits of the pointer equals the end count, the mask register is reset.676Writing to the start count register also sets the register.677678This allows one to have the sprites only show up on specific scanlines, by programming679the proper start and end counts, and the proper starting value into the pointer. This680way, the sprite can be drawn from top to bottom of the screen, and have it only appear681where it is desired without having to do anything else in the 2600 code.682683Making Music:684-------------685686The music is generated by repurposing three of the fetchers, the last three.687Each fetcher can be individually selected for music or fetching.6886897 0690---------691105D-105F: xxSM PPPP692693S: Select clock input to fetching counter. 0 = read pulse when the proper returned694data register is read (i.e. for fetcher 5, 1015 is being read) 1 = music oscillator.695696M: Music mode. 1 = enable music mode, 0 = disable music mode.697698P: upper 4 bits of the 12 bit data fetcher pointer.699700701I am not sure why you can separately select the clock source and the music mode,702but you can. Maybe they had some plans for externally clocking the chip via some703logic to bump the pointers.704705Normally you set both the M and P bits to make music.706707When in music mode, the lower 8 bits of the fetcher pointer is used as an 8 bit down708counter. Each time the lower 8 bits equals FFh, it is reloaded from the start count709register.710711To turn the data fetcher into a square wave generator takes very little hardware. The712start/end count registers are used as-is to toggle the flag register.713714This means that the duty cycle of the square waves produced can be varied by adjusting715the end count register relative to the start count register. I suspect the game simply716right shifts the start count by one and stuffs it into the end count to produce a71750% duty cycle waveform.718719The three flag outputs for fetchers 5 to 7 are fed into a cool little circuit composed720of a 3 to 8 decoder and four 4 input NAND gates to produce the 4 bit audio output.721722The output is as follows:723724fetcher result725567726---------------------727000 0h728001 4h729010 5h730011 9h731100 6h732101 Ah733110 Bh734111 Fh735736737This is a somewhat nonlinear mixing of the three channels, so the apparent volume of them738is different relative to each other.739740The final 4 bit output value from the above table is then available to read at address7411004-1007, in bits 0 to 3.742743Pitfall 2 just reads this location and stuffs it into the audio register every scanline or744so. The value read at 1004-1007 is the instantanious value generated by the fetchers and745mixing hardware.746747748HMOVE adjustment stuff:749-----------------------750751I have not done much research on how this works, and P2 doesn't use it. It appears to752let you draw curved lines using a missile or two, probably to make swinging vines.753754The patent explains how it works, but it just appears to be an adder that adds the start755count value to itself via a multiplexer and stuff. It appears to let you input an756offset and it calculates a new hmove value. Not sure how useful this really is.757758759AR (Starpath Supercharger)760--------------------------761762Aaah the good ol' Supercharger. This is the large "cartridge" that you could plug into763your 2600 that had 6K of RAM which you could download games into off of cassette tape.764765The idea being you plug your cassette player into the cable coming off of the cartridge,766and then you can download games into RAM from it.767768When first turned on, it says "rewind tape" and "press play". When this is done, it will769start loading the game off tape and fill the screen in with blue bars from the sides770to the inside while a rising tone plays. When the screen is fully blue, it then clears771the screen and says "stop tape", and then the game starts.772773If there is an error (corrupt tape, etc) it will continously flash "rewind tape" on774the screen until the audio input stops toggling.775776Games can re-enable the BIOS ROM and load more data off tape at any time.777778So, that's what it is... but how does it work?779780I didn't find a whole huge amount of information on how the Supercharger actually781WORKS. There was some info about how to program it, but nothing on how the782ASIC in the Supercharger does its thing.783784Well, turns out it's pretty cool and as far as I know, unique.785786First off, there are two registers on the Supercharger. The first is the audio787input register. It's at FFF9:7887897 0790---------791FFF9: 0000 000A792793A: Supercharger audio data. 0 = low input, 1 = high input.794795The audio input's just a filtered and schmitt triggered version of the audio data796coming into the Supercharger. The upper 7 bits must all be 0's, or else it797will not properly read the data. For testing, I fed my FPGA 2600's Supercharger798with data from Bankzilla's tape emulator. This is simply a digital output that799is fed into the Supercharger's audio pin (and to my FPGA board).800801The next register is the control register.8028037 0804---------805FFF8: DDDB BBWE806807D: write delay (see below)808B: bankswitching mode (see below)809W: RAM write enable (1 = enabled, 0 = disabled)810E: ROM power enable (0 = enabled, 1 = turn off ROM)811812To write to RAM or the control register on the Supercharger requires a somewhat813round-about method. First, you read a location at F000-F0FF, then you read814either FFF8 to write to the control register, or somewhere else in RAM.815Sooo, to write to the control register, the following type of code is816used:817818;A = value we will write to the banking register819TAX820LDA F000,X821LDA FFF8822823The TAX moves the value we wish to write into F000,X (i.e. if we wish to write 16h824to the control register, the location F016 is read).825826Next, we read FFF8 which performs the write. *any* instruction that reads FFF8827will suffice. The BIOS uses BIT FFF8 and LDX FFF8 sometimes, depending on828what's convenient, and what flags or registers need to be saved. The829instruction really does not matter, so long as it simply READS.830831Note: THERE IS NO UPPER LIMIT on the number of cycles that can elapse between832reading F0xx and reading FFF8 to write to the control register. Usually,833it is written to immediately after reading F0xx, but not always. The very834last write to FFF8 which sets the RAM banking before launching the game835after loading waits a very long time before reading FFF8 to set the banking836mode.837838The basic method it does the final write is as such:839840LDA F000,X841<thousands of cycles>842843FA0B : 9A TXS ;X entered at ffh844FA0C : A2 3 LDX #$3845FA0E : BC AB FD LDY $FDAB,X846FA11 : 94 FA STY $FA,X ;load cmp fff8h, jmp opcode only847FA13 : CA DEX848FA14 : 10 F8 BPL $FA0E ;jmp target was at fe/ff849FA16 : A0 0 LDY #$0850FA18 : 84 81 STY $81851FA1A : 4C FA 0 JMP $FA ;run the code we loaded in RAM85285300FA : CD F8 FF CMP $FFF8 ;sets up control register for the game85400FD : 4C xx xx JMP xxxx ;we now jump to the start of our code855856857FDAB : CD F8 FF 4C ;this is the code loaded into RAM858859860The control register contains a few different things.861862The ROM power can be turned on and off (which IMO is dumb. The ROM doesn't863draw appriciable power, but they have a PNP transistor that can turn it on864and off anyways. Most games turn it off when they are done loading, and865then turn it back on if they need to load again from tape. I guess they866were worried it was going to vampire too much current from the system, so867running it only as long as necessary was their solution.868869The next bit is the write enable. If set, the RAM can be written to.870If clear, it is read-only. This is useful for loading 2K and 4K games into871the Supercharger to play them. Not much use otherwise. The Supercharger872will never attempt to write to ROM, and it will not write to RAM if this873bit is clear.874875Banking mode. The Supercharger allows for 8 different memory maps, depending876on how these three bits are set. The following are supported:877878BBB 1000-17FF, 1800-1FFF879--- ---------------------880000 - RAM bank 3 ROM881001 - RAM bank 1 ROM882010 - RAM bank 3 RAM bank 1883011 - RAM bank 1 RAM bank 3884100 - RAM bank 3 ROM885101 - RAM bank 2 ROM886110 - RAM bank 3 RAM bank 2887111 - RAM bank 2 RAM bank 3888889ROM can never be mapped into 1000-17FF but this makes sense, since the code is890written to only run from 1800-1FFF. Also, a few combinations are not possible891such as RAM bank 1, RAM bank 2, and RAM bank 2, RAM bank 1. All others are892possible.893894The last part of the control register is the write pulse delay. I don't think895anything uses this and just keeps it at 0. Heck, it may not even be implemented.896897So that takes care of how to read audio and how to access the control register.898That leaves writing to RAM.899900The Supercharger watches all 13 address lines to determine when RAM should be901written. It first watches for a write to F0xx, just like when writing to the902control register, then it waits 5 address bus transitions, then it attempts to903write data to the RAM chip by pushing the value onto the data bus, while the CPU904is reading.905906The usual way this is done in the BIOS is like so:907908;X = byte to write909LDA F000,X ;tell the supercharger what to write910LDA (8B),Y ;write it!911912If we look at bus transitions, it looks like this:913914Assume that the code is sitting at 1800, and 8B/8C holds the address 1100h.915Also assume X = 66h916917c# address, data9181: 1800 BD ;LDA,X opcode9192: 1801 00 ;low byte of add9203: 1802 10 ;hi byte of add9214: 1066 ?? ;read address 1066 (this is the RAM byte, could hold anything).9225: 1803 B1 ;LDA (),y opcode9236: 1804 8B ;zeropage address of pointer9247: 008B 00 ;low byte of destination9258: 008C 11 ;hi byte of destination9269: 1100 66 ;Supercharger writes data now to RAM by forcing value on bus927928As we can see, cycle 9 is exactly 5 cycles after cycle 4, where we read from F0xx.929The supercharger will only attempt to write if writes are enabled, and the area930we're attempting to write to is set up for RAM. It will not attempt to write to931ROM, or outside the range of 1000-1FFF.932933This method of operation has an interesting side effect. Because the Supercharger934forces a value onto the bus while the CPU is reading, the CPU will actually935READ this value! This makes sense- the CPU doesn't know if it's reading RAM, ROM,936or the Supercharger's write value.937938In fact, this is REQUIRED for it to even work. It does some pretty extensive939RAM tests on powerup, and if it cannot write to RAM it will flash the screen940yellowish/black as it attempts to test RAM over and over. If RAM fails to test941properly, it will reset and start again.942943The RAM testing code looks like this:944945FF58 : A9 F1 LDA #$F1946FF5A : 85 8C STA $8C947FF5C : A0 0 LDY #$0 ;start address = F100948FF5E : 84 8B STY $8B949FF60 : AD 0 F0 LDA $F000 ;write 00h950FF63 : B1 8B LDA ($8B),Y ;write !951FF65 : D1 8B CMP ($8B),Y ;is it 00h?952FF67 : D0 14 BNE $FF7D ;no953FF69 : AD FF F0 LDA $F0FF ;write ffh954FF6C : B1 8B LDA ($8B),Y ;write !955FF6E : D1 8B CMP ($8B),Y ;is if ffh?956FF70 : D0 B BNE $FF7D ;nope957FF72 : C8 INY958FF73 : D0 EB BNE $FF60 ;last byte of page?959FF75 : E6 8C INC $8C960FF77 : A5 8C LDA $8C961FF79 : C9 F8 CMP #$F8962FF7B : D0 E3 BNE $FF60 ;last page?963FF7D : 60 RTS ;return zero set if passed964965Basically what happens is this: It first sets up the address F100 (aka 1100) into9668B/8C, then it steps through the entire RAM area up to 17FF, and returns with967Z flag set, if it passed, or NZ if it fails.968969The code at FF60-FF66 is very interesting: It first reads from F000 so that970we will write 00 to memory. Then it writes it and immediately compares it.971Remember that the CPU will READ what the Supercharger writes, so the accumulator972will hold 00 after executing that LDA (),y!973974The same test is repeated, this time by writing FF. If it can step through all975locations without erroring out, it passes the test. This code only tests one9762K bank (minus the first 256 locations, more on that in a minute). The code is977then called three times, testing each bank of RAM in turn.978979This testing brings up an interesting note about the Supercharger's RAM.980981When writes are enabled to RAM, you CANNOT READ FROM 10xx WITHOUT CORRUPTING RAM.982This means, you cannot read data here, and you cannot excute code here! Doing983so will trigger writes, which will overwrite whatever happens to be 5 cycles later984if it's in RAM! You *CAN* write to 1000-10FF, however just fine... you just985cannot read it or execute from it without first disabling writes. In fact, the986BIOS starts writing at 1000 when it's loading the game from tape. Since it never987attempts to execute code from there or read back the data, this is legal.988989The BIOS' RAM testing routine must therefore skip testing the first 256 bytes990of each bank. It *could* test it, but I guess they figured running the code from991RAM to do it would've been too much of a hassle, concidering space was at992a premium.993994Remember how I said the Supercharger counted *BUS TRANSITIONS* to know when to995write to RAM? Well, this is very very important. You cannot just count CPU cycles.996That won't work (because the Supercharger cannot see the CPU's clock line for one).997998Here's the other way that you can write to RAM:9991000FFC7 : A0 8 LDY #$81001FFC9 : D9 0 F0 CMP $F000,Y1002FFCC : EA NOP1003FFCD : CD E3 F7 CMP $F7E310041005This writes 8 to location 17E3. Notice the NOP to "fill up" the cycles. If we1006look at what the address/data bus is doing, we will see how this can work, even1007though the write occurs 6 cycles after the CMP, instead of 5.100810091010c# address, data10111: FFC9 D9 ;CMP,Y opcode10122: FFCA 00 ;low byte of add10133: FFCB F0 ;hi byte of add10144: F008 xx ;read RAM here, contents unimportant10155: FFCC EA ;NOP opcode10166: FFCD CD ;CMP opcode, but throw it away (NOP is 2 cycles)10177: FFCD CD ;CMP opcode10188: FFCE E3 ;low byte of add10199: FFCF F7 ;hi byte of add102010:F7E3 08 ;write to F7E310211022Yes, it does indeed take 6 cycles to get to the write... however, look at the address1023bus. There's only FIVE transitions! The byte at FFCD gets read twice. This is1024because NOP is a 2 cycle instruction. NOP's second cycle reads the next opcode1025and throws it away, and does NOT increment the program counter. So, the next1026cycle reads it too and fetches CD for the CMP opcode. Pretty tricky stuff!10271028Note that when I say "transition", I am talking about when one or more of the 131029address lines changes. The Supercharger can only count cycles by watching these1030address lines. That's why it only counts up 5 transitions on the above code snippet.1031The double access to FFCD counts as 1 transition as far as the Supercharger is1032concerned.10331034That about wraps up the Supercharger's hardware.103510361037Supercharger Tape Format1038------------------------10391040The tape format on the Supercharger is fairly straight forward. It's a form of1041pulse width modulation. Interestingly, the length of the pulses is not fixed, and1042the software on the Supercharger can adapt to a pretty wide range.10431044According to the "tapedocs.txt" file:104510461047"0" pulse "1" pulse1048-------------------------------1049minimum 158uS 317uS1050optimal* 227uS 340uS1051maximum 317uS 2450uS10521053* According to the tapedocs.txt file, the filters on the Supercharger are tuned1054specifically for 227uS and 340uS pulse lengths.105510561057NOTE: these times are for the entire pulse, i.e. the low and high portions of it.1058The low and high portions would thus be half these values.105910601061i.e. if the pulse is 300uS long...10621063low high10641065____________------------10661067\--150uS--/ \--150uS--/106810691070Here is a generic representation of what a typical signal looks like:10711072____----____----____----________--------________--------____----________--------10731074\--0--/ \--0--/ \--0--/ \------1------/ \------1------/ \--0--/ \------1------/107510761077The "one" pulses only have to be approximately 90uS wider than the "zero" pulses,1078but it's a good idea to have them at least 25% wider so the Supercharger can1079adapt to tape speed fluctuations during the load.108010811082A Supercharger tape load is composed of 6 separate parts:10831084---------------------------------10851. Preamble10861087The preamble is a 50% duty cycle low frequency waveform that causes all the1088elements in the tape chain (amplifiers, the filter in the Supercharger proper,1089etc) to stabilize. Without this preamble, the volume level into the 'charger1090can change while the capacitors in the signal chain charge.10911092A frequency of around 750Hz (666uS low, 666uS high) is pretty decent.10931094The preamble needs to be at least 800 pulses long (i.e. around 1 second or more).10951096---------------------------------10972. Synchronization10981099After the preamble, at least 256 or more bytes of 55h (0/1/0/1) bits need to be1100sent at the chosen bit rate. The Supercharger software uses this to synchronize1101its decoder software.11021103---------------------------------11043. Start pulse11051106To tell the Supercharger our data is coming, a final 0 pulse is sent. After this1107point, the Supercharger header follows.11081109---------------------------------11104. Header data111111120: WORD Start address11132: BYTE Control word11143: BYTE Block count11154: BYTE Header checksum11165: BYTE Multiload number11176: WORD Progress bar speed11181119All values are little endian. Bytes are sent out, MSB first (i.e. left shift1120the data byte).11211122Start address: The start address specifies where the 6502 will1123jump to after all the data is loaded from the tape.11241125Control word: Specifies the value to load into the Supercharger's control register.1126Usually the upper 3 bits should be clear. (See above for more info on the control1127register in the Supercharger section).11281129Block count: How many 256 byte blocks will be sent in this transfer.11301131Header checksum: As the name indicates, a checksum of the header. The checksum1132is computed by starting out with 55h and subtracting every byte in the header1133(not including the sumcheck byte itself).11341135The result is that when the Supercharger adds up ALL bytes of the header (including1136the sumcheck byte) it will be 55h. All carries/borrows are ignored when calculating1137the sumchecks.11381139This is what the demo unit's header contains:11401141.dw 0ffc0h ;start address of code1142.db 01bh ;control word: 1000-17ff= b.3, 1800-1fff= b.2 ROM=off WR=on1143.db 001h ;# of 256 byte blocks1144.db 06dh ;header checksum1145.db 000h ;this is not a multiload1146.dw 0010ch ;speed for progress bars11471148when all these bytes (c0, ff, 1b, 01, 6d, 00, 0c, 01) are added together, the result1149is 255h... dropping carries (AND with ffh) results in 55h... meaning that the1150sumcheck passes and the data was properly received.11511152Multiload number: If the game has no multiload, this byte is simply kept at 0. If1153this game IS a multiload game, then the sequence number is stored here. This lets1154Supercharger BIOS know if the proper game load is being received or not.11551156The first load of a multiload game is always 0. When the first load wishes to1157load the second (or subsequent) part(s), the current load tells the Supercharger1158BIOS which load it is looking for and runs the BIOS' receive routine again.11591160If the data received is not the proper load #, it will do a "false load" and load1161the data, but then throw the results away and wait for the next load to come around.1162This is repeated until the correct load number is reached and loaded.11631164On Escape from the Mindmaster this can be seen if you lose all your lives in the first1165load. It will instruct you to press "play" on your tape player, and will load part 2.1166But the ending is not in part 2, so it throws the data away after loading it and1167proceeds to load part 3, which is thrown away, and then the final part is loaded.11681169To prevent someone from getting cute, the multiload sequence numbers were never1170recycled. They were allocated like so:11711172Escape from the mindmaster uses 1, 2, and 31173Dragonstomper uses 4 and 51174Survival Island uses 6 and 711751176Progress bar speed: The value here specifies how fast the progress bars.. well..1177progress as the game is loaded. If the value is wrong the bars will proceed to the1178middle before the game is fully loaded.11791180The value is calculated by taking the block count and multiplying it by1181approximately 22.8 i.e. for a game that's 6K in size (each block being 256 bytes)1182is 24 blocks * 22.8, which is 547 (223h).11831184This works for most bank sizes, however when only 1 bank is loaded, the value1185has to be 10ch for some reason I have not researched.11861187---------------------------------11885. Data blocks11891190Once the header is finished sending, the data is sent in 256 byte blocks. Each1191block has a 2 byte header, followed by the 256 bytes of data.11921193Block header:119411950: BYTE Block location11961: BYTE Checksum119711981199Block location: This is the block location in RAM where the data will be loaded.1200Blocks are specified in the following format:120112027 01203---------1204000B BBRR12051206B: block number, from 0 to 71207R: RAM chip #12081209Ram chip number is specified like so (reffing the bank numbers in the Supercharger1210documentation above)1211121200 - RAM bank 1121301 - RAM bank 2121410 - RAM bank 3121511 - invalid (would select ROM)12161217The block number is the particular 256 byte block in the specified RAM bank.12181219So, to load data sequentially, from RAM bank 1's first block, to RAM bank 3's1220last block, the following block locations would be used:12211222RAM 1: 00, 04, 08, 0C, 10, 14, 18, 1C1223RAM 2: 01, 05, 09, 0D, 11, 15, 19, 1D1224RAM 3: 02, 06, 0A, 0E, 12, 16, 1A, 1E12251226Checksum: The checksum for the block is calculated exactly like the header's1227checksum is. All 258 bytes (256 data bytes, block location byte, and sumcheck)1228are added together, and the result must be 55h. If the sumcheck fails, the1229"rewind tape" message flashes as long as audio data is coming in, then when the1230audio data stops coming in, it reverts to the "press play" message.12311232---------------------------------12336. Postamble12341235After all the blocks of data are sent, the Supercharger will play the "Press stop"1236message until audio data stops coming in, and then it starts running the game.12371238The postamble is used to detect when stop is pressed. The postamble is simply1239a string of "0" bits. The length of the postamble should be at least 256 bits,1240but it can be as long as desired. The Supercharger will not run the game1241until the postamble stops, however.12421243---124412451246Supercharger Demo Unit1247----------------------12481249This doodad is pretty cool. First, you plug a Supercharger into your 2600. Then1250you plug the audio cable from it into this black box. Then the black box plugs1251into the joystick port.12521253You can optionally plug a regular joystick into the other joystick port.12541255The demo unit itself is a nondescript black box with a label on it. Inside the box is1256quite a bit of hardware.12571258* 8 2764 EPROMs1259* 1 2732 EPROM1260* 1 6805E CPU1261* various discrete logic12621263The basics of operation are as such:12641265When powered up, a small bootloader is loaded into the Supercharger through its1266audio cable. Once this initial bootloader is loaded, the audio cable is never used1267again until the system is reset or power cycled.12681269After the bootloader is sent, the rest of the data to the Supercharger's RAM is loaded1270through the joystick port 4 bits at a time.12711272The net result is incredibly high loading speeds. A complete 6K of RAM data can be1273sent in around 250ms.12741275Internally, there is a 6805E CPU made by Motorola. This is similar to the 68705 and other1276microcontrollers Motorola made, except it's the external ROM version. There is no1277ROM on the chip.12781279The two IO ports are connected as such:12801281PortA: This port is used to send data out 8 bits at a time to the 2600 through the joystick1282port. The byte of data is simply written here, and the 2600 picks it off when it's good1283and ready (there's an explaination later on of how this works exactly).12841285PortB:128612877 01288---------1289AExB BBBB12901291A: Audio output. This port pin connects to the Supercharger's audio cable through a resistor1292divider that cuts the audio level down to a level of a few hundred millivolts to prevent1293overloading the audio input.12941295E: EPROM enable. Must be low to enable the 8 2764 EPROMs.1296B: EPROM bank. Selects a 2K EPROM bank from the 2764's (more about this later)129712981299PortA's data is passed through a quad 2:1 multiplexer (a 74LS157). The select line connects1300to bit 3 of the joystick port. When it's low, the multiplexer outputs the lower nybble of1301the byte on PortA. When it's high, it outputs the upper nybble.13021303The data bits from the muxer connect like so:13041305bit 3: this is acting as an output- it runs the select line of the 74LS157, and also1306connects to /IRQ on the CPU.1307bits 2 to 0 connect to the multiplexer's upper 3 bits.13081309The fire button input connects to the multiplexer's lowest bit.13101311So, to read a byte of data in through the controller port, the select line is pulled low1312via the RIOT register at 280h. Bit 3 must be set as an output, while bits 0-2 are inputs.13131314bits 3,2, and 1 of the data byte are read on 280 bits 2 to 0. bit 0 of the data byte is1315read via 3Dh bit 7.13161317the select line is thin pulled high via 280.313181319bits 7,6, and 5 are then read from 280 bits 2 to 0 . bit 4 of the data byte is read via13203Dh bit 7.13211322There's a very elegant piece of code that does this on the bootloader, which gets loaded1323into RAM:13241325;enters with Y = 3fh13260081 : CD 0 F0 CMP $F000 ;select proper RAM bank (note: self modifying)13270084 : CD F8 FF CMP $FFF813280087 : A9 7F LDA #$7F13290089 : C5 3D CMP $3D ;puts fire button data into carry and invert it1330008B : 4D 80 2 EOR $280 ;get data, and invert it (data is sent inverted)1331008E : 8D 80 2 STA $280 ;write inverted data back (toggles bit 3 to demo unit)13320091 : 2A ROL13330092 : A ASL13340093 : A ASL13350094 : A ASL ;put lower 3 bits into bits 6 to 4, carry into 313360095 : 85 B7 STA $B7 ;save for now13370097 : A9 7F LDA #$7F13380099 : C5 3D CMP $3D ;put fire button into carry and invert it1339009B : 4D 80 2 EOR $280 ;get data, and invert it1340009E : 8D 80 2 STA $280 ;write inverted data back134100A1 : 29 7 AND #$7 ;strip off upper bits134200A3 : 5 B7 ORA $B7 ;or it on to add into bits 2 to 0134300A5 : 2A ROL ;finish up by putting carry into 0 and shifting the mess left134400A6 : AA TAX134500A7 : DD 0 F0 CMP $F000,X ;write it to supercharger RAM134600AA : D1 B9 CMP ($B9),Y134700AC : 88 DEY134800AD : 10 D8 BPL $FF8A ;do all bytes134900AF : CD 19 F0 CMP $F019 ;bankswitch135000B2 : CD F8 FF CMP $FFF8135100B5 : 60 RTS135213531354This core routine is used to load data. It lives in the FF00-FFBF range and is loaded1355into RIOT RAM when data needs to be transferred.13561357Since bit 3 of 280h is also connected to the /IRQ line on the CPU, this is used to1358tell the 6805 when a byte of data has been read, and it should get the next one ready1359to go.13601361That's about it for the 2600 to demo unit interface.13621363The memory map of the demo unit is extremely simple:136413650000-0FFF : on-chip resources (ports, the timer, RAM)13661000-17FF : 2K bank of data from the 64K worth of 2764's13671800-1FFF : 2K of BIOS code from the 2732 EPROM.13681369The 2K bank of data at 1000-17FF comes from the 64K of EPROMs. PortB bits 0-4 select1370a desired 2K bank.13711372That's about it for the details. There are a few other amusing (to me) details of the1373hardware, however.13741375When the unit starts, there's a 10 second countdown. This is there for a reason.1376Those 8 2764's can draw a lot of power if they were all turned on at once, so to1377enable the EPROMs there are 8 PNP transistors connected to a decoder, which connect1378to the VCC lines of each EPROM. So, when you wish to read from the EPROMs, you must1379actually enable the power line to it via a decoder chip (74LS42).13801381To prevent a huge power suck from the 2600, there's a large capacitor that supplies1382power to the EPROMs. I can't remember how big it was, but I think it was 4700uF.1383This is connected through a resistor to 5V. So, that 10 second countdown at the1384start is so this capacitor can charge. The countdown code and bootstraps are stored1385in the 2K EPROM.13861387Only one of the 8K EPROMs may be enabled at any time, and they can all be disabled1388to prevent them drawing any power by clearing bit 6 of portB. The desired EPROM is1389selected via bits 2,3,4 of portB. (bits 0 and 1 of portB connect to A11 and A121390of the 8 EPROMs.)13911392The 74LS42 is a 1 of 10 decoder, and the inputs are connected as such:139313947 01395---------1396xDxC BAxx13971398ABCD: the 4 selector inputs (A = LSB, D = MSB). x = not used.13991400Thus, to enable an EPROM, bit 6 must be clear. When this bit is set, no outputs1401connected to EPROM power enable transistors will be turned on.14021403I am not 100% sure of the speed the demo unit's CPU runs at. It was 12 years ago,1404but I think it was 4.1952MHz. I am using this on my demo unit FPGA emulation and1405it works good.14061407That about wraps up this mysterious piece of hardware.1408140914101411