As I have two memory mapping configurations, I first will have to make sure the Primary mapping option works. If that works, I can then move on to patching a relocated version for the Alternate mapping option.
Also with my memory mapping options I have excluded the first 512 bytes of memory from $0000..$0200 so I can leave that installed on the ET-3400. I should first test that the GAL is correctly decoding the memory and doesn't try to select RAM on the ETA-3400X at the same time as the ET-3400. To do that I removed the ROM and RAM from the ET-3400 breadboard and then using just the hex keypad I can examine memory using the E (Exam) key on the keypad, while at the same time I place my logic probe on the various Chip Select outputs on the GAL (pins 18, 19 and 20).
Examining memory starting at $0000, I can see that there is no low pulses out of the GAL for RAM. As I step up through RAM it continues to read RAM on the ET-3400 main board only. I then start to examine memory just below $0200 then using the F (FWD) button I step up beyond $0200 and I can then see my Chip Select low pulses on the logic probe from $0200 and upward. That works as intended.
I then check higher RAM addresses just below $1000 where the PIA is mapped, and it also works up to $0FFF, after that address the Chip Select is no longer on the /RAMCS pin. I repeat this method to ensure the /ROMCS, /RAMCS, and /PIACS are working in there respective ranges and they are.
So I am now safe to plug in some RAM and test that I can read and write to it. I plug in the 628128-70ns 32K RAM chip and am able to read and write to memory between $0200..$0FFF as well as $2400..$BFFF. Wow, I now have a whopping 43K of RAM on my ET-3400, more if I relocate the ROM and PIA, but that will come later.
Walk before you Run
In theory I should be able to just copy the original ROM for the Fantom II monitor and Tiny BASIC directly onto my 32K ROM chip, but I have to solve a small problem. The original machine code is on two separate 2K chips but I'm using a single 32K ROM, so where do I put the code so it is read back in it's correct memory location. Because I haven't done any fancy address swapping in the circuit layout I need to break up the original code into 1K blocks and place it the EPROM in the correct 1K block.
This is where I need to place code in ROM so it appears in it's correct memory location:
The reason for the code appearing in the upper 64K of memory when we only have a 32K EPROM is because only 15 bits (A0..A14) are fed to the EPROM, so it really appears twice in memory, once in the lower 32K and again in the upper 32K of memory. This is known as a shadow or mirror image. Luckily we don't use the same block of the EPROM for both (in this case), so it's possible to have two different versions of the code. Lucky because I need to patch the version in high memory when I do the relocated version.
At first I didn't need to patch the version of Fantom II monitor in the Primary mapping layout. Burning an EPROM with the above EPROM arrangement and installing it in the breadboard I can now test it out.
I try and read the EPROM data just using the ET-3400 monitor and the 7-segment display and it's not there. I just see $FF's in those lower ROM locations.
Wait, maybe I got the ALT jumper backward. No it's not installed, so the ALT input is tied high as I wanted it for normal memory mapping. Thinking, what could have gone wrong...
Doh! maybe the GAL equations are wrong. Initially I had assigned pin 13 of the GAL as ALT instead of !ALT. One little mistake. Doesn't matter now, I can just simply pull the ALT pin low instead of reprogramming it.
Back on track I can now read back various memory locations in the ROM and they appear to be correct according to the hex dump of the monitor I have. Likewise the Tiny BASIC appears at it's correct location.
But I can't do anything else yet because I don't have a serial terminal connected. In fact I don't even have the PIA and serial circuit built. My first attempt at the PIA circuit is on breadboard. That doesn't go too well as the jumpers are not getting good connections and keep pulling out.
I decide to rebuild the PIA and serial circuit onto small pre-etched pcb's from Jaycar, which are then jumpered to the ET-3400 I/O, address and data lines according to the diagram. At one stage I had overheating on a couple of the transistors and thought I may have burned out the PIA. Not good as I have a limited number of those. I swap in another 6821 and still no luck, but monitoring the previously hot transistors, they seem to be OK now?, and measuring some voltages they look OK.
I don't have a serial cable with correct connections to plug into my PC serial port readily available. Instead I connect up the VT-132 clone serial terminal with some short jumpers to a DB25M plug.
I ambitiously set up the maximum baud rate to 9600 on the VT-132 and the ETA-3400X expecting that to fail, but what the hell, give it a go and see what happens.
Turning on the ET-3400 and ETA-3400X and VT-132 I get to the 7-segment prompt of CPU UP. on the ET-3400. Now to try the Fantom II monitor, I type D (Do) 1400 and NOTHING!...
I then tried the inbuilt test program: D 1AF6 and still NOTHING!...
I probed the /PIACS pin with my logic probe while the test program is running and I am getting low pulses, so that's good. I then tested pin 2 (TX data) on the PIA and got no pulses (meaning no data). After rechecking the analogue cct I discovered an error that stopped the PIA from being able to turn off Q103, and therefore Q103 was always on, that meant the Serial Data out (pin 3 of the DB25) was permanently pulled down to -12V. oops.
That might explain why some of the transistors were hot previously. A quick fix on the analogue circuit and try again.
Now D 1AF6 produces this...
Finally it's looking good.
I have to learn how to use the Fantom II serial monitor and read through some of the basic commands. It's a pretty good monitor and you can display a block of memory, display and change registers, change memory, place breakpoints, save to cassette (not yet though as I don't have a cassette circuit).
After learning enough of the monitor to get by I am ready to try Tiny BASIC, so here we go...
starting from MON> G 1C00, I then type in the sample 5 line test program from the manual...
Almost, but no cigar yet.
Next we find out what's causing these issues and a fix...
No comments:
Post a Comment