Ute Posted March 4 Share Posted March 4 (edited) I've been burning a lot of XEGS carts lately, but I would also like to be able to burn the Williams games as well. I've searched on Atari Age and the internet but it doesn't seem like anyone ever made pcb's for these. I did find a schematic, I don't remember who made it, Nir Dary or someone else: But it looks like it matches electrically, the description of a switchable Williams Cart(Except this can do 128K, 16 banks instead of 8 ) "Cartridge takes 8KB memory window, and could be turned off by writing to $D5xx, where X has bit 3 on ($D508, as an example). Three lower bits of address select the bank. Number of banks varies, 8 in type 8, 4 in type 22 and 2 in type 76. On the bootup bank 0 is mapped in." Can anyone give me insight or confirm if this would work? I've got it going in KiCad and ready to get some made, but I would like some confirmation before I go wasting money on PCB's. Edited March 4 by Ute Quote Link to comment Share on other sites More sharing options...
Sikor Posted March 5 Share Posted March 5 Maybe this schematics will help in future - all made by Jerzy Sobola: https://jsobola.atari8.info/dereatari/atarisch/cartxlxe.zip 1 Quote Link to comment Share on other sites More sharing options...
Ute Posted March 5 Author Share Posted March 5 Thanks @Sikor, these are excellent! Unfortunately it didn't contain the Williams cart type. Now I am wondering if this type is exclusive to Video 61 and possibly created later, maybe after Jerzy had created all of those nice schematics. But after disassembling Archon 2, I realized the above schematic will not work for the pcb. Possibly only a minor alteration I believe, which could be either in software or hardware. Anyways I'll keep at it and update this thread if I find anything. Quote Link to comment Share on other sites More sharing options...
manterola Posted March 6 Share Posted March 6 Hi @Ute, the schematics you posted does not look it is going to decode the specific addresses mentioned in the description: "turned off by writing to $D5xx, where X has bit 3 on ($D508, as an example). Three lower bits of address select the bank". In order to implement that you can use some logic gates, a good example is shown in the basicxe cartridge (also in other carts schematics), which looks to me (after a very fast check) very similar to the schematics you posted. I would like to check this out tomorrow, with more time. Quote Link to comment Share on other sites More sharing options...
Ute Posted March 6 Author Share Posted March 6 Hi @manterola, thanks for your feedback I realized what I had posted above would not work once I disassembled the Archon 2 Williams cart. I drew this up in KiCad and it should be closer to what is needed: This is sort of a combination of the XE Super Cart and the schematic above. What are your thoughts? Quote Link to comment Share on other sites More sharing options...
manterola Posted March 6 Share Posted March 6 That schematics uses the 0s and 1s in the data lines to select the banks. Which makes sense in XE cartridges. But according to the description in a couple of sites, Williams banking scheme depends on the address lines: "An access to $D500 selects bank 0, $D501 - bank 1, etc. An access to $D508-$D50F disables the cartridge" Therefore, first change is to feed the 74174 with the A3, A2, A1 and A0 instead of the data lines. Another thing I noticed is that Williams Carts are 8x8kb=64kb max, please confirm that. A2, A1 and A0 flip flop outputs should go EPROM A15, A14 and A13 respectively. A3 should drive the logic to deactivate the cart (i.e. RD5 signal back to the Atari and OE, CE, to the EPROM, see BasicXE cart posted by Sikor for an idea on how to do that). Now, to ensure that the processor is accessing $D50X (and nor $D512 for example), and follow the description quoted above, A7 to A4 might go all together with the logic that activates and latch the flip-flops (however, I have no idea if this is really implemented in an original William cart). I am not so sure about it, it might work without that part. Something like this or similar: _______ O2 -----o| | /CCTL----| BIG | A7-------| NOR | A6-------| GATE | A5-------| |o--------> CLK A4-------|_______| Another thing I would copy from BasicXE cart schematic is the generation of the CLK signal. In your schem. is inverted wrt the BasicXE cart. Since BasicXE cart looks to me closer to the Williams cart design, I will copy that part (probably has something to do with timing differences b/w data lines and address lines). I have no way to now if this will ever work, but I will be glad to give it a try, someday, with a game ROM known to work under the Williams 64KB banking scheme. Quote Link to comment Share on other sites More sharing options...
Ute Posted March 7 Author Share Posted March 7 (edited) Hi, thanks for your feedback. 8 hours ago, manterola said: That schematics uses the 0s and 1s in the data lines to select the banks. Which makes sense in XE cartridges. Well, I'm confused on how this works. I've programmed XE Carts, and changing banks is done like this: lda #$06 ;Bank 6 sta $D500 ;Set it as current bank And then access that bank as normal. I incorrectly assumed that the data lines were bi-directional(I thought I read it in the Altirra Hardware Manual) and that while CCTL was low it was getting the Flip-Flop/Latch data from the data lines. Could you explain what is actually happening, because it doesn't make sense to me that it could set the latch any other way. 8 hours ago, manterola said: But according to the description in a couple of sites, Williams banking scheme depends on the address lines: "An access to $D500 selects bank 0, $D501 - bank 1, etc. An access to $D508-$D50F disables the cartridge" Therefore, first change is to feed the 74174 with the A3, A2, A1 and A0 instead of the data lines. Ok, that makes sense I guess since CCTL and S5(or S4) are probably not driven low at the same time then that is where the latch data should be coming from. 8 hours ago, manterola said: Another thing I noticed is that Williams Carts are 8x8kb=64kb max, please confirm that. Correct AFAIK. 8 hours ago, manterola said: A2, A1 and A0 flip flop outputs should go EPROM A15, A14 and A13 respectively. A3 should drive the logic to deactivate the cart (i.e. RD5 signal back to the Atari and OE, CE, to the EPROM, see BasicXE cart posted by Sikor for an idea on how to do that). The outputs are doing that currently, as well I think RD5 is doing something similar to BasicXE. In my schematic RD5 should always be high until latch 4 becomes high then the signal will be inverted and RD5 will go low and(hopefully) turn off the cart. 8 hours ago, manterola said: Now, to ensure that the processor is accessing $D50X (and nor $D512 for example), and follow the description quoted above, A7 to A4 might go all together with the logic that activates and latch the flip-flops (however, I have no idea if this is really implemented in an original William cart). I am not so sure about it, it might work without that part. Something like this or similar: _______ O2 -----o| | /CCTL----| BIG | A7-------| NOR | A6-------| GATE | A5-------| |o--------> CLK A4-------|_______| Another thing I would copy from BasicXE cart schematic is the generation of the CLK signal. In your schem. is inverted wrt the BasicXE cart. Since BasicXE cart looks to me closer to the Williams cart design, I will copy that part (probably has something to do with timing differences b/w data lines and address lines). I have no way to now if this will ever work, but I will be glad to give it a try, someday, with a game ROM known to work under the Williams 64KB banking scheme. I'm not too keen on the BasicXE design, it's the OSS 16K cart that is divided in to 4 - 4K banks, one is fixed and the other 3 selected by A0 and A3. But the banking scheme is really odd - "The cartridge occupies 8 KB of address space between $A000 and $BFFF. Its memory is divided into 4 banks, 4 KB each. Bank number 0 (the first one) is always mapped to $B000-$BFFF. Bank in $A000-$AFFF is selected by an access to $D500-$D5FF." I'll keep trying, thanks for your help. Edited March 7 by Ute Quote Link to comment Share on other sites More sharing options...
manterola Posted March 7 Share Posted March 7 (edited) I put together this, but there are many uncertain things, yet. Some variations w.r.t. the XE cart and the OSS regarding disabling the cart, etc. But this is the basic idea. As I mentioned before, I think A4-A7 addresses should be decoded to detect and disable latching the flip-flops if there anything different from zeros. But I need more time to think that part, or help in using some "black magic" to get rid of the gates and instead use 138, 153, etc. (high order glue logic) to do a better address decoding. To use this with your example (activate bank #6 counting from zero) you just need to do: STA $D506, no matter which number is currently in the Accumulator. Could you confirm that the ROM for Williams banking does this kind of stuff? I guess you mentioned Archon 2 uses Williams banking scheme. Edited March 7 by manterola Quote Link to comment Share on other sites More sharing options...
Ute Posted March 7 Author Share Posted March 7 (edited) Here is a screen shot while debugging Archon 2 This bit of code is particularly interesting - First setting bank 5 active(STA $D505), then loading a byte from ROM, then switches the cart off(STA $D508), then stores the value in RAM underneath the ROM. The game basically copies all of what is contained in the ROM to RAM. This looks to be the same for Arkanoid and Alley Cat. Looking at a few other carts the loader seems to be the same standard code, just the number of bytes to load and addresses to load them to changes. Can you help me understand why we need to be concerned about the high bits? (A4-A7) It seem like if someone accidentally did something like STA $D5F3, couldn't the high bits just be ignored since in this case they're meaningless? Also the same for STA $D5F8? Edited March 7 by Ute Quote Link to comment Share on other sites More sharing options...
Ute Posted March 10 Author Share Posted March 10 Does anybody else have any thoughts on this? @phaeron @ascrnet Quote Link to comment Share on other sites More sharing options...
phaeron Posted March 10 Share Posted March 10 (edited) If you are making a new cartridge type, then it is a good idea to fully decode all the address lines. But here we're talking about reimplementing an existing cartridge type, and for that you would want to match the original cartridge's behavior as closely as possible. Otherwise, any difference in behavior is an opportunity for software from the original cartridges to not work on the new cartridge implementation. The thing to realize about old cartridges is that most of them had their banking logic implemented in a very small number of common 74LS chips -- generally 1-2 at most. There's not a lot of gates available for complex logic, and so incomplete decoding was very common. For the Williams cartridge type, schematics or pictures for the original PCB aren't available, but it's likely that the implemented consisted of at most a latch/flip-flop chip and maybe one additional chip with misc gates. Two chip select lines on the ROM means that the latched disable signal can be combined with /S5 for free, and then all that's needed is a bit of logic to clock the latch from accesses to /CCTL and drive RD5. ANDing together A4-A7 would have added additional complexity to the PCB for no real benefit, and possibly real cost if it required another chip. Generally that extra decoding complexity has only been seen in cartridges that were intended to stack with another cartridge, such as the ones designed to work in the pass-through slot of a SpartaDOS X cartridge and need to co-exist with the /CCTL range decoded by SDX. The generally available description for the Williams cartridge types is somewhat underspecified, so Altirra implements it as follows: A4-A7 is ignored for /CCTL accesses. R/W is ignored, and any /CCTL access triggers a bank switch change. This means that a read can trigger a bank switch, including from ANTIC. This is similar to behavior seen on real XEGS and AtariMax cartridges. Edited March 10 by phaeron 3 2 Quote Link to comment Share on other sites More sharing options...
Ute Posted March 10 Author Share Posted March 10 (edited) That helps, thanks @phaeron. Edited March 10 by Ute Quote Link to comment Share on other sites More sharing options...
manterola Posted March 10 Share Posted March 10 Yes, I really like @phaeron comments. It give a lot of good tips. It also provides information about how this is implemented in Altirra and that something what I did not think before. Which is super important since allow us to try the ROMs you have and even try changing the sta $d506 for a $d5f6 for example and see how it should continue working. I would like to know how a8picocart and avgcart implement this Williams banking scheme. Maybe @electrotrains and @tmp can shed some light. For example, my assumption that properly decoding the upper address lines is good to make it satisfy the description of how Williams banking works, but in practice it should work without it but might produce conflicts with other hardware. So it is basically a typical trade off. Same with RW, you can do an LDA from $D506 and it will switch banks, if you don't take RW into account, that would be okay, and depends on what the actual code of the game does. I will modify the circuit to get rid of the LS00 and make it work with the F/F and the NOR gates, if possible. Quote Link to comment Share on other sites More sharing options...
manterola Posted March 11 Share Posted March 11 (edited) Okay, so I modified (simplify) the schematics using Avery's ideas. My main concern is the clk input to the F/F, since sometimes is used inverted, but I read the LS174, LS74 and LS175 datasheets and they are all positive-edge triggered and basically interchangeable for this purpose. So, I think this should be the correct way, but it might work with a logical inverter (logical negation) in front of it. The 174 has more input/outputs, but the 175 is nice since it includes the inverted output as well (Q and /Q). Anyway, I am willing to give it a try, unless there are more suggestions about it. BTW, there still is an unused NOR gate to use it as inverter if needed, but it is not in my original screenshot, so I draw it, to bring attention to that open issue. Edited March 11 by manterola Quote Link to comment Share on other sites More sharing options...
manterola Posted March 12 Share Posted March 12 FYI. This is how it is done in A8PicoCart. else if (!(pins & CCTL_GPIO_MASK)) { // CCTL low addr = pins & ADDR_GPIO_MASK; if ((addr & 0xF0) == 0) { bank = addr & 0x07; if (addr & 0x08) { RD5_LOW; rd5_high = false; } else { RD5_HIGH; rd5_high = true; } } } So, A8Pico actually decode A7-A4 (checks if (addr & 0xf0) is zero i.e. if A7-A4 are all zeros) then it looks the A2-A0 bits for the banks (addr&0x07) , and finally the A4 bit (addr&0x08) to en/dis the cart with RD5. 2 Quote Link to comment Share on other sites More sharing options...
manterola Posted March 18 Share Posted March 18 I am sending this PCB for fabrication. Then I will see whether it works or not. If it is working I will share the gerbers if someone is interested. 1 Quote Link to comment Share on other sites More sharing options...
_The Doctor__ Posted March 18 Share Posted March 18 Down Away Back Up Towards Front 2 1 Quote Link to comment Share on other sites More sharing options...
Rybags Posted March 18 Share Posted March 18 "Side facing TV" is confusing if using a machine with flat mount - 1200XL, most XE. 5 1 Quote Link to comment Share on other sites More sharing options...
Ute Posted March 19 Author Share Posted March 19 On 3/17/2024 at 7:03 PM, manterola said: I am sending this PCB for fabrication. Then I will see whether it works or not. If it is working I will share the gerbers if someone is interested. Hi @manterola I'm curios as to what your final schematic looks like if you don't mind sharing. I went with this design: It's based on the original Williams Cart schematic: Quote Link to comment Share on other sites More sharing options...
manterola Posted March 19 Share Posted March 19 (edited) 43 minutes ago, Ute said: It's based on the original Williams Cart schematic: So did you get the original Williams Cart schematic!?!? I used the one posted on March 10th. Edited March 19 by manterola Quote Link to comment Share on other sites More sharing options...
Ute Posted March 19 Author Share Posted March 19 I acquired two Williams carts so I was able to reverse the schematic from the cart. But they're different than I expected, they use two 27c256 Eproms instead of one 27c512: As you can see the front of the card is a mess of wires and the back has 5 chips instead of what I was assuming would be 3. So I burned Archon 2(64K) on two eproms(32K each) a low half and high half, and it worked no problem. Next I burned Blue Max 2001 on a single 32K rom and put it on the left side and it ran no problem also. The specs say that a 16K Williams roms exist but I couldn't find any to test. Then I just attached the nice breakout boards @Dropcheck made available for free(Thanks!) and started testing each individual pin: The additional components are a 6K8 Resistor, .1uf Cap, and a much smaller cap that I couldn't make out a value for except that it is rated for 10V and polarized, the actual value was painted over - on both carts. If you're interested I could send you one of the carts(No charge) and you could verify my results. Never hurts to have more than one set of eyes. If not maybe someone else is interested in helping document the schematic? Anyways I got the single chip version up and running: I did make a tiny mistake - I forgot to put on a jumper for 32K compatibility. 2 1 Quote Link to comment Share on other sites More sharing options...
lbaeza Posted March 20 Share Posted March 20 Is the Bill Williams credited on the PCB the same Bill Williams who created Salmon Run and other jewels? Regards, Luis. Quote Link to comment Share on other sites More sharing options...
phaeron Posted March 20 Share Posted March 20 Interesting... it almost looks like the circuit was designed to be able to support 16K windows as well as 8K windows, with other unused 74LS139 half being wired up to /S4. 2 Quote Link to comment Share on other sites More sharing options...
manterola Posted March 20 Share Posted March 20 (edited) 6 hours ago, Ute said: If you're interested I could send you one of the carts(No charge) and you could verify my results. Never hurts to have more than one set of eyes. Yes I am. For what you posted in the schematics we were pretty close: that clock signal going to flip flop is the same, and the signal going back to Rd 5 is the same. The Williams cart uses a ls175, which I mentioned before, but I used an ls174. I also miss adding a jumper to allow the use 32k eproms, but it is really not that important. Once I get my PCBs I can send you a cartridge for your to p lay and explore. Edit: as @phaeron pointed out, the main difference is that S5 and S4 are connected to the unused half of the ls139. Probably that hidden banking scheme was never fully implemented, and/or never documented, which it is pretty awesome we are discovering that today. Edited March 20 by manterola 1 Quote Link to comment Share on other sites More sharing options...
Ute Posted March 21 Author Share Posted March 21 On 3/19/2024 at 7:16 PM, lbaeza said: Is the Bill Williams credited on the PCB the same Bill Williams who created Salmon Run and other jewels? Regards, Luis. Sorry, I don't know. 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.