A couple of updates to recent blog posts: I did a little more work on the Apple II Monitor port to the Apple 1, getting the source code to assemble the version that includes the Woz Monitor at the end. This version can be burned to a ROM (or EPROM or EEPROM) in the Replica 1, so you can have both the original Woz Monitor and Apple II Monitor in ROM from powerup. I confirmed that it does work when programmed into a ROM. It also works in the POM1 Apple 1 Emulator. As before, the Apple II Monitor port can be found here.
Wednesday, May 21, 2014
Tuesday, May 13, 2014
Apple II Monitor Running on Briel Replica 1
As a followup to my previous blog post, here is a transcript of running some Apple II Monitor commands on the Briel Replica 1. You can find documentation on the Monitor commands in a number of places, including here. The commands typed by the user are in bold.
Monitor prompt:
*
Dump memory:
*1000.100F
1000- A2 10 EA CA D0 FA 60 BE
1008- 00 00 4A 83 00 00 75 D7
Change memory:
*1000:01 02 03
*1000.100F
1000- 01 02 03 CA D0 FA 60 BE
1008- 00 00 4A 83 00 00 75 D7
Move Memory:
*1000<2000 .2fffm="" b="">2000>
Verify Memory:
*1000<2000 .3000v="" b="">2000>
3000-FF (00)
Disassemble:
*FF00L
FF00- D8 CLD
FF01- 58 CLI
FF02- A0 7F LDY #$7F
FF04- 8C 12 D0 STY $D012
FF07- A9 A7 LDA #$A7
FF09- 8D 11 D0 STA $D011
FF0C- 8D 13 D0 STA $D013
FF0F- C9 DF CMP #$DF
FF11- F0 13 BEQ $FF26
FF13- C9 9B CMP #$9B
FF15- F0 03 BEQ $FF1A
FF17- C8 INY
FF18- 10 0F BPL $FF29
FF1A- A9 DC LDA #$DC
FF1C- 20 EF FF JSR $FFEF
FF1F- A9 8D LDA #$8D
FF21- 20 EF FF JSR $FFEF
FF24- A0 01 LDY #$01
FF26- 88 DEY
FF27- 30 F6 BMI $FF1F
Mini-Assembler:
*7666G
!1000:LDX #$10
1000- A2 10 LDX #$10
! NOP
1002- EA NOP
! DEX
1003- CA DEX
! BNE 1000
1004- D0 FA BNE $1000
! RTS
1006- 60 RTS
Call Monitor to Disassemble:
!$1000L
1000- A2 10 LDX #$10
1002- EA NOP
1003- CA DEX
1004- D0 FA BNE $1000
1006- 60 RTS
1007- BE 00 00 LDX $0000,Y
100A- 4A LSR
100B- 83 ???
100C- 00 BRK
100D- 00 BRK
100E- 75 D7 ADC $D7,X
1010- 00 BRK
1011- 00 BRK
1012- F8 SED
1013- 87 ???
1014- 00 BRK
1015- 00 BRK
1016- B5 F6 LDA $F6,X
1018- 42 ???
1019- 00 BRK
Go back to Monitor:
!$7F65G
Single step:
*1000S
1000- A2 10 LDX #$10
A=10 X=10 Y=7D P=70 S=CA
*S
1002- EA NOP
A=10 X=10 Y=7D P=70 S=CA
*S
1003- CA DEX
A=10 X=0F Y=7D P=70 S=CA
*S
1004- D0 FA BNE $1000
A=10 X=0F Y=7D P=70 S=CA
*S
1000- A2 10 LDX #$10
A=10 X=10 Y=7D P=70 S=CA
*
Display 6502 Registers:
*^E
A=10 X=10 Y=7D P=70 S=CA
Hex arithmetic:
*12+34
=46
*FE-12
=EC
Go to BASIC:
*^B
>LIST
Monitor prompt:
*
Dump memory:
*1000.100F
1000- A2 10 EA CA D0 FA 60 BE
1008- 00 00 4A 83 00 00 75 D7
Change memory:
*1000:01 02 03
*1000.100F
1000- 01 02 03 CA D0 FA 60 BE
1008- 00 00 4A 83 00 00 75 D7
Move Memory:
*1000<2000 .2fffm="" b="">2000>
Verify Memory:
*1000<2000 .3000v="" b="">2000>
3000-FF (00)
Disassemble:
*FF00L
FF00- D8 CLD
FF01- 58 CLI
FF02- A0 7F LDY #$7F
FF04- 8C 12 D0 STY $D012
FF07- A9 A7 LDA #$A7
FF09- 8D 11 D0 STA $D011
FF0C- 8D 13 D0 STA $D013
FF0F- C9 DF CMP #$DF
FF11- F0 13 BEQ $FF26
FF13- C9 9B CMP #$9B
FF15- F0 03 BEQ $FF1A
FF17- C8 INY
FF18- 10 0F BPL $FF29
FF1A- A9 DC LDA #$DC
FF1C- 20 EF FF JSR $FFEF
FF1F- A9 8D LDA #$8D
FF21- 20 EF FF JSR $FFEF
FF24- A0 01 LDY #$01
FF26- 88 DEY
FF27- 30 F6 BMI $FF1F
Mini-Assembler:
*7666G
!1000:LDX #$10
1000- A2 10 LDX #$10
! NOP
1002- EA NOP
! DEX
1003- CA DEX
! BNE 1000
1004- D0 FA BNE $1000
! RTS
1006- 60 RTS
Call Monitor to Disassemble:
!$1000L
1000- A2 10 LDX #$10
1002- EA NOP
1003- CA DEX
1004- D0 FA BNE $1000
1006- 60 RTS
1007- BE 00 00 LDX $0000,Y
100A- 4A LSR
100B- 83 ???
100C- 00 BRK
100D- 00 BRK
100E- 75 D7 ADC $D7,X
1010- 00 BRK
1011- 00 BRK
1012- F8 SED
1013- 87 ???
1014- 00 BRK
1015- 00 BRK
1016- B5 F6 LDA $F6,X
1018- 42 ???
1019- 00 BRK
Go back to Monitor:
!$7F65G
Single step:
*1000S
1000- A2 10 LDX #$10
A=10 X=10 Y=7D P=70 S=CA
*S
1002- EA NOP
A=10 X=10 Y=7D P=70 S=CA
*S
1003- CA DEX
A=10 X=0F Y=7D P=70 S=CA
*S
1004- D0 FA BNE $1000
A=10 X=0F Y=7D P=70 S=CA
*S
1000- A2 10 LDX #$10
A=10 X=10 Y=7D P=70 S=CA
*
Display 6502 Registers:
*^E
A=10 X=10 Y=7D P=70 S=CA
Hex arithmetic:
*12+34
=46
*FE-12
=EC
Go to BASIC:
*^B
>LIST
Sunday, May 11, 2014
Apple II Monitor Ported to Apple 1
As announced here, a cassette tape was found that contains a port of the Apple II Monitor to the Apple 1. It was done by Winston Gayler. Additional work was done by Wendell Sander, who posted documentation, cassette tape sound files and Woz Mon binaries here .
I've tested the code on a Briel Replica 1 and it works quite well. The only issue I found on the Replica 1 is that the commands that require Control keys do not work as the Replica 1 does not emulate Control keys when using a PS/2 keyboard. They will work if entered from the serial port.
This weekend I went a little further adapted the original monitor source from the "Red Book" to build under the CA65 assembler, then applied the changes for the Apple 1. The result is code that can be assembled from source and easily relocated.
References:
I've tested the code on a Briel Replica 1 and it works quite well. The only issue I found on the Replica 1 is that the commands that require Control keys do not work as the Replica 1 does not emulate Control keys when using a PS/2 keyboard. They will work if entered from the serial port.
This weekend I went a little further adapted the original monitor source from the "Red Book" to build under the CA65 assembler, then applied the changes for the Apple 1. The result is code that can be assembled from source and easily relocated.
References:
- www.apple1notes.com/old_apple/Monitor_II_on_1.html
- www.applefritter.com/content/apple-ii-monitor-ported-apple-1
- github.com/jefftranter/6502/tree/master/asm/Apple%5D%5BMonitor
Thursday, May 8, 2014
Heathkit GR-64 Restoration
My latest radio restoration project is a Heathkit GR-64 Shortwave Receiver. This was a low-end receiver made from 1964 to 1971 and originally selling for $39.95. It covers AM and shortwave in four bands and utilizes four tubes.
This one was acquired on eBay. Other than the usual scratches and small cracks around the plastic front panel, it looked to be in pretty good shape. It had suffered a bit in shipping with some tubes and the power transformer coming loose, but there did not seem to be any damage. It appeared to be complete, and when powered up it picked up several AM stations.
The shortwave bands didn't seem to be working well, if at all, and the S-meter was always off scale.
A check of the components showed that most resistors had drifted up in value, as is normal for the old carbon composition type. I replaced a few were 20% off or more. I figured that was the likely case of the S-meter problems, as it uses some resistors as a voltage divider to compare the AVC voltage to a reference value.
However, that did not fix the problem. I spent considerable time poking around, checking components and wiring. I tried swapping some of the tubes with known good ones from a Heathkit AR-3.
After lifting several resistors in the AVC circuit, there was still a resistance of about 60K to ground that should not be there and I could not account for.
The printed circuit board really had a lot of rosin flux residue on it. On a hunch, I scraped some of it off, and the mysterious resistance to ground went way up. After cleaning the board with alcohol to remove the flux, the resistance became too high to measure. The S-meter also started reading on scale. Lesson learned - flux residue can cause problems in high impedance circuits. Obviously this flux was there since the kit was built but whether it caused a problem from day one or only later, who knows.
The next problem was that it was dead on bands other than AM. Actually band D was working (poorly). There was no local oscillator activity at all on bands B and C. All the coils looked good. But I was seeing a low resistance between the local oscillator tuning capacitor and ground on bands B through D that should not be there, according to the schematic. The local oscillator frequency on band D was also way off.
After a bit of tracing of the circuit I found the cause: two wires that crossed were touching where there was insulation missing and were shorted. One was the antenna lead and the other was from the local oscillator. After pulling them apart, the local oscillator started running on all bands.
I did a full alignment and it all went well -- I could align each band on each end of the dial. Because of the low 455 KHz IF frequency you have to watch out that you don't align to the image frequency that is only 910 KHz away from the correct one. The manual mentions this in the procedure, but I almost did this on one band and thought at first that I could not get it to align correctly.
Restoration is now almost complete. The S-meter is still off scale for no signal, so I expect to have to tweak some of the resistors in the circuit.
The limited testing I have done indicate that the radio is reasonably sensitive and can pick up lots of shortwave broadcast signals with a decent antenna. It would not be very suitable for amateur radio, as bands like the 40 meter ham band only take up a small portion of the dial. The BFO is also hard to use as it is not very stable and interacts with other controls, so it could be used for strong CW signals but would be frustrating for SSB.
I plan to make a YouTube video on this radio as I have done for the other models I own, so watch for that in the coming weeks.
This one was acquired on eBay. Other than the usual scratches and small cracks around the plastic front panel, it looked to be in pretty good shape. It had suffered a bit in shipping with some tubes and the power transformer coming loose, but there did not seem to be any damage. It appeared to be complete, and when powered up it picked up several AM stations.
The shortwave bands didn't seem to be working well, if at all, and the S-meter was always off scale.
A check of the components showed that most resistors had drifted up in value, as is normal for the old carbon composition type. I replaced a few were 20% off or more. I figured that was the likely case of the S-meter problems, as it uses some resistors as a voltage divider to compare the AVC voltage to a reference value.
However, that did not fix the problem. I spent considerable time poking around, checking components and wiring. I tried swapping some of the tubes with known good ones from a Heathkit AR-3.
After lifting several resistors in the AVC circuit, there was still a resistance of about 60K to ground that should not be there and I could not account for.
The printed circuit board really had a lot of rosin flux residue on it. On a hunch, I scraped some of it off, and the mysterious resistance to ground went way up. After cleaning the board with alcohol to remove the flux, the resistance became too high to measure. The S-meter also started reading on scale. Lesson learned - flux residue can cause problems in high impedance circuits. Obviously this flux was there since the kit was built but whether it caused a problem from day one or only later, who knows.
The next problem was that it was dead on bands other than AM. Actually band D was working (poorly). There was no local oscillator activity at all on bands B and C. All the coils looked good. But I was seeing a low resistance between the local oscillator tuning capacitor and ground on bands B through D that should not be there, according to the schematic. The local oscillator frequency on band D was also way off.
After a bit of tracing of the circuit I found the cause: two wires that crossed were touching where there was insulation missing and were shorted. One was the antenna lead and the other was from the local oscillator. After pulling them apart, the local oscillator started running on all bands.
I did a full alignment and it all went well -- I could align each band on each end of the dial. Because of the low 455 KHz IF frequency you have to watch out that you don't align to the image frequency that is only 910 KHz away from the correct one. The manual mentions this in the procedure, but I almost did this on one band and thought at first that I could not get it to align correctly.
Restoration is now almost complete. The S-meter is still off scale for no signal, so I expect to have to tweak some of the resistors in the circuit.
The limited testing I have done indicate that the radio is reasonably sensitive and can pick up lots of shortwave broadcast signals with a decent antenna. It would not be very suitable for amateur radio, as bands like the 40 meter ham band only take up a small portion of the dial. The BFO is also hard to use as it is not very stable and interacts with other controls, so it could be used for strong CW signals but would be frustrating for SSB.
I plan to make a YouTube video on this radio as I have done for the other models I own, so watch for that in the coming weeks.
Wednesday, May 7, 2014
Toroidal Inductors
I was reading through my 80th anniversary reproduction of the first Radio Amateur's Handbook, published in 1926. At the back are advertisements from electronics companies.
An ad from Cardwell Condensors lists some of the contributions the company made to radio and electronics, such as "the first commercial Neutrodyne". One of them caught my eye:
"The first Toroid (abandoned due to inherent electrical defects in this type of coil, impossible to overcome!)"
Those of us who have been around electronics probably think of toroidal inductors as a relatively new phenomenon. When I started in the 1970s and 80s most inductors were wound on cylindrical cores, and back in the 1920s and 30s the most common was air wound inductors, often featuring exotic methods of winding and ways to shield or arrange coils to minimize interference with each other. But for the last couple of decades, the doughnut-shaped toroidal inductors have been the most popular type for RF use. It is interesting that someone explored toroidal inductors back in the 1920s, and a mystery why they concluded that it was not a feasible design. Perhaps the core materials available to them at the time were a factor (modern toroids use ferrites and powdered iron cores). I'd be interested in hearing anyone's ideas or theories.
The company is still in business, so maybe I will ask them about it.
More information on toroidal inductors can be found in this Wikipedia article.
An ad from Cardwell Condensors lists some of the contributions the company made to radio and electronics, such as "the first commercial Neutrodyne". One of them caught my eye:
"The first Toroid (abandoned due to inherent electrical defects in this type of coil, impossible to overcome!)"
Those of us who have been around electronics probably think of toroidal inductors as a relatively new phenomenon. When I started in the 1970s and 80s most inductors were wound on cylindrical cores, and back in the 1920s and 30s the most common was air wound inductors, often featuring exotic methods of winding and ways to shield or arrange coils to minimize interference with each other. But for the last couple of decades, the doughnut-shaped toroidal inductors have been the most popular type for RF use. It is interesting that someone explored toroidal inductors back in the 1920s, and a mystery why they concluded that it was not a feasible design. Perhaps the core materials available to them at the time were a factor (modern toroids use ferrites and powdered iron cores). I'd be interested in hearing anyone's ideas or theories.
The company is still in business, so maybe I will ask them about it.
More information on toroidal inductors can be found in this Wikipedia article.