Archive for the ‘Apple II’ Category

fixed 6502/Apple 1 Cheat Sheet

Friday, February 6th, 2015

Apple 1 6502, cheat sheet, v.98

I fixed the definition of the ROL and ROR instructions.

6502 memory test gotcha – 6502 cheat sheet error

Friday, February 6th, 2015

One of the more popular programs that I’ve written is this 6502 memory test. One person using this test to checkout his Mimeo, recently discovered that it doesn’t work with his early white 6502. Turns out that that particular 6502 is a nice collectors piece, without a functioning ROR instruction. I used the ROR instruction at the end of the third test, so the program hangs when run on an early 6502 with the missing ROR functionality.

;
;
; all test 2 passes complete – prepase for test 3
;
LDA #$7F
BNE NX_TEST ;always branch

CHK_TEST3 ;floating zeros in progress or done
CPY #3
BNE CHK_TEST4
;
; pass of test 3 complete – 8 passes in all with 0 in each bit position
;
SEC
ROR TEST_PATRN ; rotate right – Carry to MSB, LSB to Carry
BCS NX_PASS2 ; keep going until zero bit reaches carry

I haven’t checked it, but I think the following code will accomplish the same basic test without using the ROR instruction.

;
;
; all test 2 passes complete – prepase for test 3
;
LDA #$FE
BNE NX_TEST ;always branch

CHK_TEST3 ;floating zeros in progress or done
CPY #3
BNE CHK_TEST4
;
; pass of test 3 complete – 8 passes in all with 0 in each bit position
;
SEC
ROL TEST_PATRN ; rotate left – MSB TO Carry, LSB = Carry
BCS NX_PASS2 ; keep going until zero bit reaches carry

I recently discovered that my 6502 cheat sheet has an egregious error. The ROL and ROR instructions move the Carry bit into the LSB and MSB (respectively), not the MSB and LSB. In other words the instructions are rotate through carry instructions.

I’m not sure how I managed to mess this one up or why it took so long for me to notice this or why no one else noticed it. Perhaps the functionality of these instructions are so well known that most people don’t need to refer to a cheat sheet to understand functionality. Clearly, I knew how they worked (or were supposed to work in the case of the early chips) when I wrote the 6502 memory test.

Brain Boards Sold Out – summary of pending projects

Friday, January 9th, 2015

I built and tested the last two kits over the holiday break and sold them on eBay. I made 59 PCBs, and kept 1 for myself, so there are 58 that were sold, either as kits or fully assembled.

Once the initial interest passed, they were very slow sellers, so I’m not expecting to make any more. I have some ideas for an enhanced version, but that is very far down my list of things to do, so I don’t know if or when I’ll take the time to work on that.

Here are just a few projects on my backlog that are ahead of the enhanced Brain Board. These will easily keep me busy for a couple of years or more.

  • Finishing all the SCELBI I/O Boards
  • Getting Apple II RTTY on the air – reception is working – transmission software is coded, but needs lab testing prior to actual “on air” tests
  • Getting vintage computer Morse code encoder/decoder on the air – Jack Rubin sent me an early Byte Magazine article with a 8008 software package for this, so I’ll probably do this on the SCELBI
  • Fabricating SCELBI Chassis Components
  • Putting together the VCF East 10 display and “Fix It” lecture
  • Hack together a Mimeo with 20K DRAM
  • Move Apple II RTTY application to the Mimeo/Apple 1
  • I have identified another board that is rare, of historical significance and worthy of replication
  • I have other ideas, that are even further out, such as doing a Mark-8. If I did a Mark-8, I would probably etch my own boards. This would probably be pretty easy to do, as the artwork was published and there was no solder mask and the holes were not plated through. I don’t think I would make batches of boards for sale, as this has been done already, and some of the parts are in the harder to find category.

    I also really need to do a manual/book on the SCELBI and I have made some half hearted attempts to start this. The main obstacle is that I’d want to scan and OCR the original docs and that is a very laborious process.

    Improved Apple Teletype Emulation

    Wednesday, December 31st, 2014

    A previous post showed how I attempted to connect the SCELBI TTY to an Apple IIe with an old serial card that supported current loop. Well I’ve been working on some of the issues and now have it working good enough to post some of the details. With the standard Apple 80 column scroll routine, I can only reliably get 8 lines to scroll at 110 baud, but it’s working pretty decently, with that limitation.

    First of all, here is how the TTY card is connected. The standard SCELBI MEA software assumes these port assignments.

    Apple Serial To SCELBI TTY Connection Diagram

    Apple Serial To SCELBI TTY Connection Diagram

    If you try repeating this experiment, be aware that there are two versions of the Apple Serial Card firmware,. However, since I don’t use the standard driver, it doesn’t matter which version you have.

    The simple TTY emulation source code can be downloaded from www.willegal.net/appleii/ttyemul.asm. It is written to use an assembler called DASM, which can be found and downloaded with a web search.

    You can experiment with changing the window size by changing the second line in the program. Note that I started with a “hijacked” version of the original serial card driver, but it has been greatly modified. This code assumes a IIe with 80 column card. For display, I had a lot of issues getting CR not to send a LF, but still return to beginning of the line. I also implemented a bare bones bell that sounds only if no characters are coming in.

    I suppose a custom “fast” scroll routine might help with increasing the window size, but I haven’t had time to work on that. I think I left enough of the original Apple II peripheral card software mechanism in place, that it wouldn’t be too hard to move the code to PROMs that would reside on the serial card itself. For now, it assumes slot 2 for the serial card, and slot 3 for the 80 column card. Let me know if you have any luck with this.

    I’m using a modified version of this software as the basis for my Apple II RTTY software, but the transmit side of that implementation needs some work. I want to create a way to type in some canned strings for transmitting CQ with a call sign and so forth.

    Video Posted Showing RTTY RX with Vintage Gear

    Thursday, December 25th, 2014

    Check out my latest podcast.

    feed://www.willegal.net/feed.xml

    The Radio Teletype receive function seems to be working real well. The work I did in the “lab” preparing for this, resulted in almost immediate success upon hooking up my rig to a real HAM receiver.

    Before I can start transmitting over the airwaves, I still have to do some work with antenna tuning, write an Apple IIe RTTY transmit driver and generally check things out in the lab. I also have some kludged cabling going on that needs to be fixed.

    That said, I think that KC1CKV will soon be on the air…

    73

    HAL ST-6 RTTY TU Restored to Operating Order

    Monday, December 22nd, 2014

    In a previous post, I showed a picture of my HAL ST-6 RTTY Terminal Unit.

    Now that I had the SCELBI 8B working, in my spare time, I have devoted a few hours to getting the ST-6 up and operating. For those of you who aren’t aware, an ST-6, demodulates a Radio Teletype (RTTY) signal and presents a current loop data stream to an external device. It was intended for connection to a Teletype, but I’m connecting it to my vintage computers.

    The HAL ST-6 is quite a different beast, as compared to the computers I’ve been working with over the years. There is a lot of hand wiring in it, and each module is filled with discrete components along with a few op-amps.

    inside the HAL ST-6

    inside the HAL ST-6

    The RTTY signal comes in several forms. My mid 70’s era HAL ST-6 was designed to support demodulating a signal with frequency shift keying offset of 170, 425 or 850 Hertz. Instead of a teletype, my plans are to have a vintage computer decode the serial stream and display the incoming data. I’m starting with an Apple IIe and have written a driver for the old serial printer board that supports current loop. The driver reads 45.45 baud 5 bit BAUDET format, converts it to ASCII, and displays it on the screen. Eventually I hope to be able to port this code over to a SCELBI.

    For testing purposes, I’m using an internet RTTY audio stream. This audio is routed from a computer speaker output to the HAL ST-6 audio input. This audio stream replaces the radio’s audio output of a real RTTY stream, which would normally come from the speaker output of the radio. At this point, except for a few quirks with my Apple II software, it seems to be working quite nicely. Once I get the kinks worked out of the software, I’ll hook it up to my radio, and see if I can tune in some real RTTY broadcasts.

    RTTY tuning in the old days was enhanced by hooking an oscilloscope in XY mode to the oscilloscope output of the ST-6. I have done the same with this test stream and think I have a pretty good pattern.

    RTTY eye pattern

    RTTY eye pattern

    Getting the HAL ST-6 up and running wasn’t trouble free. At first, the output of the 170 Hertz filter/limiter wasn’t working at all. It took quite a bit of debugging before I discovered that a potentiometer case was shorted against the windings of a coil. While debugging this issue, I found and repaired a broken wire on another coil. I also tweaked the “alignment” and spent considerable time just checking out the circuit to make sure everything was working correctly. I also spent a lot of time chasing “issues” that turned out to be operator error, but I learned a lot in the process.

    Once I get reception working well, and get a handle on how real operations work on HAM RTTY, I’ll start working on the transmit side of things. This HAL ST-6 has an audio FSK modulator incorporated in it. I’ll have to be cautious about how I bring it up, since AFSK operations are well known to have a lot a issues with harmonics and spurious noise.

    VCF presentations added to Apple II repair pages

    Saturday, December 20th, 2014

    I’m not sure it will be of much help, but I just added links to a couple of presentations that I made at VCF over the last couple of years to my Apple II repair pages.

    http://www.willegal.net/appleii/appleii-repair.htm

    Apple PROM board, MEA/Apple TTY emulation update

    Saturday, December 13th, 2014

    The SCELBI PROM board is working fine and I was able to create a small program in the editor and execute pass one of the assembler with MEA. I can’t completely assemble a program and run it until I get the cassette interface built and operating. Pass two of the assembler writes the output to cassette tape. I’ll have to hold up doing a video until I can get the complete package going. My impressions of the MEA package are quite positive. It’s not as elegant as later software you might be more used to. However, considering the time frame it was made and the platform is the 8008, it’s a pretty nice package.

    SCELBI PROM and extra SRAM boards cost $50 each and are available now. This recent work also confirms that the TTY board is working fine and those are available for $30.

    I’ve been using an Apple IIe in 80 column mode with a bit-banged serial serial card to act as TTY emulator. However there are a couple of fairly significant issues that need to be solved before publishing this teletype replacement solution. It’s usable for me, but there are some problems. The two issues with my current Apple II TTY emulation solution are:

  • 1)The Apple II isn’t fast enough to scroll it’s screen at the same time it’s receiving data in a bit banged mode. It drops a few bits from the next character while scrolling the screen. This means that I’ll need to come up with a special designed card to support 110baud current loop with a UART. Since I’m doing a new card, I’ll consider figuring out how to add paper tape support and possibly printer support, as well.
  • 2) In 80 column mode, the screen driver doesn’t support carriage return, without also doing a line feed. In other words, you can’t move the cursor backwards to position 0 on the same line, like a real TTY would when it receives a CR. I’ll have to look into a software fix for this, but it might take sending the cursor to home and then moving it back down to the correct position on the page or something like that.
  • SCELBI running MEA

    SCELBI running MEA

    This image shows the Apple IIe acting as a TTY for the SCLEBI 8B on the left. The screen contains a small program entered with the MEA editor. The listing of the program at the top of the screen has two extra lines at the end. The “D 000 006,000 007″ is an editor command that deletes lines 6 and 7. The “L” command lists the text buffer. The last two commands “P1″ and “P2″ are pass 1 and pass 2 of the assembler. Pass 1 shows no errors. Pass 2 writes results to cassette tape. Since the cassette isn’t installed in my system it actually does nothing. If I had a tape, pass 3 would read the object back into the system so it could be executed.

    The “E”s on the left side of the screen should be the first character of the next line, but the Apple IIe can’t scroll fast enough to be ready to receive the first character of the new line, so it receives a partial character.

    yeah – MEA running on reproduction SCELBI 8B

    Wednesday, December 10th, 2014
    MEA dump memory command - Apple IIe used as TTY emulator connected to reproduction SCELBI 8B

    MEA dump memory command – Apple IIe used as TTY emulator connected to reproduction SCELBI 8B

    Here is the dump of memory from the SCELBI PROM card from addresses 060-000 to 0600-037 as displayed on a 40 column Apple IIe, running some very simple TTY emulation software.

    To interface to the SCELBI, I’m using an Apple IIe with an old serial interface card. The Apple Serial Card is the first serial card released by Apple, and was intended to connect to serial printers. It included support for current loop and 110 baud rate. It’s the only thing I own, that supports that combination of baud rates and interface protocols. Be aware that this card is not the same as the very common Apple Super Serial card, which does not support current loop.

    For TTY terminal emulation purposes, I’m doing a major rewrite to the driver, as the default printer driver is not suitable for TTY emulation. I’ll post the emulation software and directions on connecting this serial card to the SCELBI TTY card as soon as I clean up a number of small issues.

    More updates on this exciting development to come soon.

    SCELBI PROM Board Progress

    Saturday, December 6th, 2014
    SCELBI PROM Board

    SCELBI PROM Board

    The PROM Board is built, installed and appears to be running. However, it’s not completely checked out. I need to hack together a simple Apple IIe TTY emulation program that will work with Apple’s old serial card. That card is the only card that I have (outside of my SCELBI stuff) that will run at 110 baud, but it was designed for printing, so I couldn’t find any ready made terminal program for it. The standard PROMs on the SCELBI 8B assume either a keyboard/oscilloscope interface or a TTY interface at 110 baud. Since we don’t have the keyboard/oscilloscope software, I burnt the TTY software into PROMs.

    It should take me a day to two to complete the TTY/terminal program hack for the Apple II, at which point, I will probably make short video showing the capabilities of the SCELBI 8B minus the cassette interface.

    I used black tape to cover the windows on the EPROMs because I’m told that sunlight will erase them after a while.

    Meanwhile, you can run the software in my OS/X emulator by downloading the MEA hex file from scelbi.com and jumping to 060-000. In a quick trial, it appeared to work ok for me. Be aware that I don’t currently have the cassette interface emulated, so cassette operations will not work. Cassette emulation is one the things on my to do list.