SS-50 software SBUG SWTBUG

Archive with SS-50 software

See also the Corsham github repositories for the latest versions of programs.

In this archive:

  • 6800 programs

    xswtbug
    This is the extended version of SWTBUG, originally written by SWTPC and then enhanced by Corsham Tech. It is fully compatible with the original, and all entry points are the same, so old programs should run with it. This is the source file to the code in the EPROM on the 6800 CPU board.
    Note that this includes some low level functions for the SD card adaptor we’ve been working on, so that’s what some of the code is about.
    MicroBas

    This is Technical Systems Consultants’ (TSC) Micro Basic Plus, a 4K BASIC interpreter. This has been modified so the user can build it for use with either the MP-C card (as delivered) or the MP-S card (our change). The S19 file is built for the MP-S (or
    compatible card such as our serial board). It can be loaded with SWTBUG’s L command.
    numguess
    A silly number guessing game I wrote one evening, based on an interview question at Microsoft in the mid 1980s. Read the comments for an explanation. Basically, guess a number between 1 and 100 but it involves some rewards or consequences.
    console.asm
    I wanted a stripped down set of input/output functions for the console, and also a kbhit function to determine if a key is waiting or not, so this file was tossed together. It only supports ACIA boards, not the MP-C. Other source files include this.
    othello
    This is a decent version of the Othello game taken from the internet. We did nothing except make it assemble with the AS02 assembler.
    memtest
    A decent little memory test program that prompts the user for the starting and ending location, then does a rolling nine bit pattern. Since the pattern repeats every nine bytes (as opposed to a power of two), it can detect shorted address busses and the like.
    A “hunt the wumpus” game I found on the net. It assembles and runs, but that’s as far as I’ve tested it.
    Life.
    Don’t speak to me about life.” (you should know the reference).
    This is a version of Conway’s Life program, although it has bugs. One know issue is that it scrolls the screen when using a WYSE-30 terminal, so the whole screen is off by one row; makes updates look odd. Might have other bugs too. You can assemble it for either VT-100 or Wyse-30 terminals.

  • 6809 programs

    This contains 6809 related software. Sorry, but the 6809 board took a lot longer than anticipated, so there wasn’t much time to develop fun software like we did for the 6800 board.
    sbug_1_8 is the basic 6809 debugger that SWTPC included on their 6809 board. This is modified to build with the Kingswood Consulting 6809 cross assembler AS09.
    sbug is our more modified version that has options for building a Tiny BASIC into the lower 2K.
    basic is the Tiny BASIC interpreter

  • SBUG 1.8.1

    (see github for 1.8.2)

  • xSWTBUG

    ;REPLACEMENT FOR MIKBUG ROM
    ;FOR SWTPC 6800 COMPUTER SYSTEM
    ;COPYRIGHT 1977
    ;SOUTHWEST TECHNICAL PROD. CORP.
    ;AUGUST, 1977
    ;***************************************************
    ;
    ; Enhancements by Bob Applegate, K2UT
    ; bob@corshamtech.com
    ; www.corshamtech.com
    ;
    ; This was all done for the SWTBUG included with the
    ; Corsham Tech 6800 CPU board.
    (see also github)

  • CTMon65

    Monitor for the SS-50 65C02 CPU board
    (see also github)

SS-50 6809 CPU board

This is the coolest thing we’ve done… so far!

Our original 6800 board continues to be a fun project to work with. I grew up doing 6502 and Z80 assembly language and have always been able to do a lot with either, but the 6809 is just amazing! The instruction set and addressing modes make it easy to write much more complicated code. There are numerous operating systems for this processor, include multi-tasking and multi-user options.

Features
– 68B09 processor running at 2 MHz.
4- K EPROM – SBUG occupies upper 2K, and the lower 2K is available. We usually put either a Tiny BASIC or SD card subroutines there, but it can be replaced with user code.
– Switch allows disabling the lower 2K of the EPROM.
– 128K RAM – Extended memory banks 0 and 1. Each 8K block can be enabled/disabled via easy to use DIP switches.
– Support for the extended 20 bit address bus using the same Dynamic Address Translation (DAT) as the original SWTPC board.
– Jumper selection of either baud rate clocks or address bits for A16 to A19.
– Jumper selection of either baud rate clock or /BUSRQ line.
– On-board RESET button along with headers for external reset and interrupt buttons.
– High quality dual-layer board.
– Off the shelf components: easy to understand, easy to repair, easy to modify.

This shows the jumpers used to select the extended address lines or baud clocks, and clock selection. The jumper block labeled VAR sets the “VAR” clock rate to 1200, 2400, 4800 or 9600 baud (actually x16). The VAR/BUSRQ jumper selects which of those two signals are placed onto bus pin 46, usually the 110 baud clock line.

The other four jumpers select whether A16 to A19 or additional baud rate clocks are placed onto pins 47 to 50. The usual practice is to use all four lines for the extended address bus, then use pin 46 (110 baud/BUSRQ) as the clock for the serial board:

SS-50 6809 CPU Manual

Archive with older revisions (2-5) schematics




SS-30 bus extender

For those of you using one of our SS-50 motherboards and find yourself needing more I/O ports, this board will add an additional six SS–30 ports via a connector already on your motherboard. This extender simply plugs in and you’ll have the full eight slots available for more I/O boards. As you can deduce from this picture, each slot has a fixed address unlike the two slots present on the motherboard:

SS-30 Prototype board

Two versions were produced of the SS-30 Prototype board, small and large.


Yet another experiment that we needed to develop our own products. This is meant to allow someone to experiment with building their own SS-30 (I/O) boards. The two connectors on the left have +5 and ground, while all the SS-30 pins have connectors on the bottom to make it easy to build a circuit with. Trying to accommodate both the SS-30 and SS-30C busses, this board has labels for both. Due to a lack of double-checking, the board pictured above has a bizarre error… all the lettering below the CORSHAM logo is on the back side of the board in a mirror image! Details, details, details.
UPDATE The board above works fine for our system since we don’t have a chassis, but didn’t work well in a real SWTPC chassis without removing the back panel. A new version was laid out that fits entirely in a genuine SWTPC chassis but I’ve yet to order any blank PC boards for it.

Large board
2019: Customers often come up with good ideas for new products or improvements to existing ones, and this was certainly one of those cases! Basically, he suggested adding more breadboard space, and adding a spring loaded connector on top for running wires to external circuitry. The resulting product is our new board:


SS-30 SS-50 technical notes

On this page:
– SS-50 6800 CPU Power-On Reset
– SS050 FAQs
– SS-50 and SS-30 standards

SS-50 6800 CPU Power-On Reset

Update (2/7/2021): Rather than using a 220uf electrolytic, use a 47 uf tantalum capacitor instead.

Update (2/5/2021): A previous version of this page said to add the capacitor to U1… that was incorrect! It is definitely on U4, the MC6875!

All existing versions, including up to 3A, of the SS-50 6800 CPU Board have a problem where power-on reset does not work. A part is missing. This is not a severe problem, as the user can press the RESET button on the board or the motherboard to do the reset, but it can be easily fixed.

You’ll need to solder a 47 uf, 16v (or higher) tantalum capacitor to the back of the board. The negative side of the capacitor goes to U4 pin 8 (ground) and the positive side goes to U4 pin 12. This is a picture from when I was using a much larger electrolytic capacitor, but I’ve switched to a 47 uf tantalum cap for all new boards:

All future revisions of the board will include this fix.

SS-50 FAQs

Q: Where can I get a copy of the SS-50 standard?
A: There is no standard, just a loose specification manufacturers followed when designing boards. The first SS-50 machine was from SWTPC and had a 6800 processor, so the buss was closely designed around that processor’s architecture. When SWTPC added a 6809 board they more-or-less followed the previous use of most pins on the buss, but also changed the purpose of others. Other companies began making compatible boards based on what was already on the market. To paraphrase Dr. McCoy of Star Trek fame, “Dammit Jim, I’m a buss, not a standard!”

Q: I keep hearing SS-50 and SS-30. Are they the same thing?
A: No, but closely related. The SS-50 buss is the main processor buss which includes all the address, data, and control signals needed to control the buss or respond to the processor board. It has 50 pins. The SS-30 buss is meant only for I/O. Decoding addresses takes a few chips that chew up real estate on a peripheral board and add cost, so SWTPC does the decoding on the motherboard and runs only essential signals to the peripheral boards. This is the SS-30 buss, and has 30 pins. Only a few address lines, data lines, and very few control signals.

Q: What are those strange connectors?
A: Those are Molex connectors which SWTPC used on other, non-computer, products. Hey, use what you’ve got in stock to save development time and stocking cost! They are still available from many sources, but the cost has gone up tremendously since they aren’t widely used anymore. The male connector with 10 pins, as used on motherboards is AMP/ TE Connectivity part number 1-640384-0, while the female connector used on plug-in boards is Molex/Waldom 09-48-2101. There is also a polarizing plug that goes into the female connectors and is Molex part number XXXXXXX.

Q: Which pin is pin 1 on both the SS-30 and SS-50 busses?
A: Technically, there were no pin numbers. SWTPC simply used the name of the line and never referenced a pin number. Many companies use http://www.cs.unc.edu/~yakowenk/swtpc/ss50.html as a guide, but I am aware of at least one board where the pin numbers were exactly the opposite direction.

Q: Boards don’t seem to plug in without a lot of force. Are you sure they are meant to plug into the motherboard?
A: Yes, the Molex connectors offer a lot of resistance at first but eventually get looser with insertions and removals. Make sure the polarizing plug is aligned properly with the missing pin on the motherboard. Some people insert a small screwdriver or used dental tool into each of the female connectors to loosen them up, but be very careful not to over-loosen them or else some of the pins might not make contact.

Q: Why are there so many pieces to build a complete system?
A: This is a clone, so it has an SS-50 buss for the CPU and memory, and an SS-30 buss for the peripheral devices. The original systems had a motherboard, CPU board, memory board(s), serial console board, terminal, etc, which means our system does too. Back in the day, people were driven by cost (just like now) so systems were modular, allowing someone to buy exactly what they wanted (or could afford) while building their system.

Q: What is the bare minimum to get started?
A: The motherboard contains the framework for the other boards to plug into, and is required. To use a terminal for a console, a serial board is required. We have two CPU boards, one having a 6800 and 16K of RAM, and a 6809 CPU with 128K. Only one CPU board is required.

Q: What can the bare minimum systems do?
A: Actually quite a lot, thanks to all the available software on the net. If you want to re-live the early days of the microcomputer revolution, there is plenty of RAM on either CPU board to load up Tiny BASICs, play games, write assembly language code, etc.

Q: How about mass storage?
A: We use our SD Card System. Our CPU boards include the low-level code providing drivers for the SD system, along with monitor commands to boot an operating system.

Q: What OS do you provide?
A: For the 6800, we use FLEX. For the 6809 we use FLEX/9 but have talked to various groups about multi-tasking operating systems. A different (still not released) I/O board is being developed to add additional capabilities for some OSes.

Q: An OS is great, but is there any software for those old systems?
A: Absolutely! Try looking at the FLEX User Group site: www.flexusergroup.com. They also have a large FTP site with a bunch of disk images. Drop those DSK files onto the SD card, mount the file as a disk drive, and you’ve got the disk contents for your use.

Q: So what do you guys do with YOUR systems?
A: I’ve got both 6800 and 6809 systems on the bench, both of which run FLEX, and are both a lot of fun to just program. I enjoy assembly language programming, so I’ve been working on some better tools for writing code.

Q: This stuff is all old technology, so shouldn’t it be cheap?
A: Sorry, this has a long answer. Some vintage parts are getting harder to find, demanding higher prices, or available in small quantities which have higher shipping costs. Some of these parts haven’t been manufactured since the early 1980s. Another big cost factor is that a lot of parts are needed, so while a more modern part might cost a few dollars more, the “more vintage” design sometimes requires several dozen of the older technology devices. Yet another factor is that the cost of printed circuit boards is based on the size of the board and the number being ordered. Ordering a single board might have a $70 set-up fee, and then $50 for the single board. Bumping up to 30 boards still has the $70 set-up fee, but the per-board cost might drop to $10. Given the size of the boards and the fact that each board has only limited functionality (as per the original design), the fixed prices are fairly high. This is a slightly political issue, but keep in mind the 25% US tax (it’s a tax paid by every American) on goods purchased from China, which is where a large percentage of electronic parts come from. Invoices from major US based suppliers show the dollar amount I had to pay in “tariffs” (it’s a tax) for that order.

Q: What else is needed, really?
A: Just a terminal and an RS-232 cable OR a personal computer with a serial port, cable, and a terminal emulator program. At shows we always use Wyse 30 terminals as they are available nicely refurbished for about $200.

Q: If I buy one, how hard is it to get running?
A: Before we ship a complete system, everything is plugged in, the system is brought up, then it is disassembled, packaged, and shipped. It’s really quite simple to plug in the boards and get running. Our suggestion is to set up just the motherboard, power supply, CPU board and serial board. Once your terminal is talking to the system, then it’s easy to plug in the parallel card, connect the SD card system, and boot into FLEX.

Q: Can I use Corsham Tech boards in a real SWTPC system or use SWTPC boards in a Corsham Tech system?
A: Absolutely! I sometimes bring several real SWTPC boards to demos, but they tend to draw a lot of current. Their 8K RAM board draws more than our complete 6809 system with a meg of RAM.

Q: Is there a case to put a system in?
A: No. It is expensive to have a case built unless we buy in very large numbers which we will probably never sell most of.

SS-50 Specification

This isn’t really any definitive definition of the SS-50 bus, as boards were simply produced that worked with other SS-50 boards. When SWTPC devised the bus, they just made things work and other manufacturers made compatible boards. Years ago I found two sites that gave a clear description of the pins for both the SS-50 and SS-50C versions, and since they haven’t been touched in decades, I decided to copy the information here just in case the original pages ever go away.

The SS-50 bus

The SS-50 was the main backplane in 6800 based SWTPC machines, and connected the CPU board with memory, disk controllers, and so on. As was common in that era, a board usually did just one thing, and did it well, so a system would have a CPU board, one or more memory boards, a serial board connecting to a terminal, and either a cassette I/O or disk controller board for program/data storage. Physically, the SS-50 bus consisted of rows of male Molex connectors, spaced 0.156 inches apart. The boards that plugged into it had the corresponding female connectors along one edge, rather than the more modern (and cheaper) printed-circuit contacts. The SS-50 bus had all signals from the processor. For I/O, see the section below about the SS-30 bus.

All signals starting with “/” are active low.

  1. /D0 – (complement) data bus line 0
  2. /D1 “
  3. /D2 “
  4. /D3 “
  5. /D4 “
  6. /D5 “
  7. /D6 “
  8. /D7 – (complement) data bus line 7
  9. A15 – address bus line 15
  10. A14 “
  11. A13 “
  12. A12 “
  13. A11 “
  14. A10 “
  15. A9 “
  16. A8 “
  17. A7 “
  18. A6 “
  19. A5 “
  20. A4 “
  21. A3 “
  22. A2 “
  23. A1 “
  24. A0 – address bus line 0
  25. GND – ground
  26. GND – ground
  27. GND – ground
  28. +8V – power line
  29. +8V – power line
  30. +8V – power line
  31. -12V – power line
  32. +12V – power line
  33. INDEX – no pin – prevents backwards insertion
  34. /M.RST – (complement) manual reset
  35. /NMI – (complement) non-maskable interrupt
  36. /IRQ – (complement) interrupt request
  37. UD – user-defined
  38. UD – user-defined
  39. /Phase 2 – (complement) processor clock 2
  40. /VMA – (complement) Valid Memory Address
  41. R/W – Read / (complement) Write
  42. /RESET – (complement) Reset or power-up
  43. BA – Bus Available for DMA
  44. /Phase 1 – (complement) processor clock 1
  45. /Halt – (complement) halts the processor
  46. 110b – 110 baud clock signal
  47. 150b – 150 baud clock signal
  48. 300b – 300 baud clock signal
  49. 600b – 600 baud clock signal
  50. 1200b – 1200 baud clock signal

The SS-30 Bus

I/O was handled on a distinct 30-pin bus (the SS-30), which was generally similar to the SS-50 but had a “board select” signal instead of the address bus. The logic to select individual I/O boards in the SS-30 was hardwired to memory-map them into four-byte slots starting with board 0 at address $8000. Very few address lines from the SS-50 bus were present, usually only A0 and A1 (called RS0 and RS1) but the two UD (user defined) pins could have A2 and A3 connected to them.

  1. UD – user-defined
  2. UD – user-defined
  3. -12V – power line
  4. +12V – power line
  5. GND – ground
  6. GND – ground
  7. INDEX – no pin – prevents backwards insertion
  8. /NMI – (complement) non-maskable interrupt
  9. /IRQ – (complement) interrupt request
  10. RS0 – register select – like A0
  11. RS1 – register select – like A1
  12. D0 – data bus line 0
  13. D1 “
  14. D2 “
  15. D3 “
  16. D4 “
  17. D5 “
  18. D6 “
  19. D7 – data bus line 7
  20. /Phase 2 – (complement) processor clock 2
  21. R/W – Read / (complement) Write
  22. +8V – power line
  23. +8V – power line
  24. 1200 baud clock signal x 16
  25. 600 baud clock signal x 16
  26. 300 baud clock signal x 16
  27. 150 baud clock signal x 16
  28. 110 baud clock signal x 16
  29. /RESET – (complement) Reset or power-up
  30. /Board Select

SD Card Shield

When we began building the first of our SS-50 series of cards, the most common request was for a mass storage option. Those old disk controllers are hard to find on the surplus market and the old disk drives are getting harder to maintain. While we like vintage equipment, sometimes it’s worth using some modern technology to do updates.

Enter our SD Card System.
This is a two board system that provides a very inexpensive, flexible, and long-lasting storage option for our KIM Clone , SS-50 based designs, or almost any third party system.

The main board is our SD Shield. It plugs into an Arduino Mega and provides for insertion of a micro SD card, and also includes a DS3231 based real time clock (RTC). The Arduino does the hard work of providing an interface between the host processor (6502, 6800, 6809, etc) and the SD card and RTC. It connects to the host via a ribbon cable.

The board also contains three LEDs used for status, a RESET switch, a four position DIP switch, a DS3231 RTC, backup battery, and it maintains the Arduino Mega headers so additional shields can be placed on top. Since the source code is available you can add additional drivers for whatever shields you add. Want to add an LCD shield that displays which files are mounted? Just plug in the shield and modify the user interface class in the source code. Only one of the DIP switches has a defined purpose, so the rest are free for you to add your own logic.

The protocol between the host and the SD Card System is completely defined in The Remote Disk Protocol Guide.

In order to use this card on an SS-50 based system, you will also need a parallel card such as ours.



SD Card System 2015
SD Card System 2017
SD Card System 2021
The Remote Disk Protocol Guide August 2015 V0.1
The Remote Disk Protocol Guide April 2017 V1.1

Downloads
Drivers for 6502, 6800 and 6089 Flex, Arduino Mega Firmware, SD Images Flex, older versions also
Firmware 2021
Test program for SD Shield
Clock utilities set time and date from KIM-1
Reproduction and uptodate SD Shield by Eduardo Casino (Github copy)


The schematic above is the only version posted. It is not the latest schematic used by Bob (see below). Eduardo Casino (see the download above) reverse engineered the SD Shield and produced an uptodate version 9.

April 5, 2021 New Version of SD Card Shield

This is another board done entirely with KiCad and rolls in a few changes from the previous boards. It is completely compatible with the rev 8 boards, which were compatible with rev 7, which were compatible with… etc, etc, etc.There is no new revision of Arduino code for this board.

No new features but a few changes:

  • The CR1220 battery has been replaced with a much more common CR2032 to keep the RTC (Real Time Clock) chip alive.  I did extension market research (ie, I emailed all my nieces and nephews) and found they all had 2032 batteries at home, while none of them had 1220s.My family is used to getting odd emails from Uncle Bob.  The local hardware store was surprised  when I asked about CR1220s, so going to a more common battery makes sense.
  • A different micro SD socket. The old one was push-in, pull-out, but this one is pop-in, pop-out.  It also has alignment pins on the bottom making it much easier to get seated exactly in the right spot before soldering. The solder connections are at the back of the socket, not in the front like the old board.  So far every surface mount solder job with the new socket has been perfect the first time, whereas the old sockets needing to be touched-up about 15% of the time.
  • The old 5-pin header for an external RTC board has been removed, allowing the LEDs to be aligned in a row.  With the RTC on-board there was little reason to keep the header.
  • Added a clearly labeled 4-pin area for adding external I2C devices.
  • For those buying the bare board, the LED colors are labeled on the silk screen. BTW, the “bare board” has the DS3231 RTC and the microSD socket already soldered.

The rev 9k1A will eventually be changed to just rev 9, as there is no need to keep KiCad revisions uniquely identified.

March 21, 2018 What’s On the Bench

Sometimes it’s nice to just enhance an existing product, especially when the supply of blank boards starts running low and more need to be ordered.  I’m running low on the SD shields so it was a good time to make some improvements. This is a prototype:

The changes from the Rev 4 boards:

  • A DS3231 RTC and backup battery are now on-board instead of having the plug-in RTC.; Too many of those plug-in boards had batteries that died within a year or two, so I decided to just put the chip directly on the board and have a battery connector.  It takes a very common LR44 battery which can be replaced easily when it fails.
  • DIP switches are clearly labeled as to which is which, and which direction is on and off.
  • A pull-down resistor is temporarily added here to fix a problem where the green and red LEDs don’t work right until the host computer initializes the interface to the SD shield. A pin was left floating and confused the software into thinking the host was sending a byte when it wasn’t.
  • Two I2C pull-up resistors were added but do not seem to be necessary.

There will eventually be a Rev 6 with the new pull-down resistor and maybe the two pull-ups removed, but I’ll use the current Rev 5 boards and manually add the pull-down for now.

The RTC is completely software compatible with the current boards so any version of our Arduino code will work with it.

post

Elektor EC-68

Published in Elektuur/Elektor Computing 3 (Dutch and gherman) and in issue 100 1986 Elektor France.
The articles, downloadable below, are slightly different, especially the French.

A 6809 based computer on two eurocards, CPU/DRAM and CRT/FDC with the Flex operating system.

EC-68 in Elektuur Computing 3 Dutch
EC-68 in Elektor Computing 3 German
Elektor 100 August 1986 French

Philippe a.k.a. Wawavoun has build/reconstructed this system.

You can see his work at his github page

He has published:
– Gerbers of the PCBs
– dumps of the ROMs ESS541 and ESS540 and reconstructed sources
– A version of the Flex operating system adapted to the EC-68 (disks, bootcode etc)


Elektor EC-68 6809

Published in Elektuur/Elektor Computing 3 (Dutch and German) and in issue 100 1986 Elektor France.A 6809 based computer on two eurocards, CPU/DRAM and CRT/FDC with the Flex operating system.A reconstruction by Philippe
.

post

My retro toolchain

About my toolchains for retro computing.

Tools are very personal choice, what works for me. I use Windows (11 now) as my main workstation and often the command line. I do have Linux desktops for compatibility testing. As I grew up in the 80ties with mini’s like HP1000, PDP-11 + RSX-11M, VAX/VMS, MS-DOS, all command line, many many editors, from line editors to screen oriented (EDT from DEC was great!) with all kind of automation tools and code management, I feel comfortable with what Windows (and Linux) offer me now, it makes me very productive! YMMV, pick your tools as you like it.

Tools development
When there is not a tool available that does easy what I need, I write my own. GUI or command line, depending on the context.
My toolchain consists of Freepascal (commandline) and Lazarus (GUI).
Most tools have to do with manipulating binary data as to be expected. Other areas are compilers and simulators.
Resulting tools run on Windows, Linux and Apple Mac’s. See the, like the Hex format conversion, the KIM-1 Simulator and more.

Assembly toolchain

I have quite a collection of 8 bit computers, 6502, Z80, 6809.
Each processor comes with its own machine language, and for each processor myriads of assemblers have been made, each with its own deviations of the official syntax and way they operate. The simple ones are two-pass assemblers generating binaries and listings and symbol tables. More advanced are made up of an assembler and a linker. Linkers are nice and powerful, but a bit overkill for simple projects. I like command line assemblers, callable from an editor.

Notepad++ Editor
A very powerful text editor, with syntax highlighting, multiple files windows open, good search, plugins like hex editor and external tools support.

  1. Install latest version from the download
  2. Add plugins Hexeditor and NPPEXEC
  3. Add scripts to nppexec such as (requires TASM 2 installed, read below)

    • make6502pap tasm -65 -x3 -g1 -s “$(FILE_NAME)” “$(NAME_PART).pap” “$(NAME_PART).lst” -s “$(NAME_PART).sym”
    • make6502bin tasm -65 -g3 -s -l -fff “$(FILE_NAME)” “$(NAME_PART).bin” “$(NAME_PART).lst” -s “$(NAME_PART).sym”
    • make6502hex tasm -65 -x3 -g0 -s “$(FILE_NAME)” “$(NAME_PART).ihex” “$(NAME_PART).lst” -s “$(NAME_PART).sym”
    • makez80hex tasm -80 -g0 -s “$(FILE_NAME)” “$(NAME_PART).ihex” “$(NAME_PART).lst” -s “$(NAME_PART).sym”
    • etc, see c:\tasm\TASMMAN,HTM
  4. Edit you source
  5. Assembly first time: press F6 choose wanted script
  6. After that Press CTRL-F6 to asemble
  7. The output of the assemble appears at the bottom of the editor in a separate part
  8. Open in Notepad also the listing file
  9. If errors, correct the source
  10. if errorfree, start debugging your code, leave Notepad++ open to edit source and read the listing

TASM32
This is a command line assembler that supports processors like 6502 and Z80. Output is binary, MOS papertape, Intel Hex, Motorola S-record. Listings and symbol tables (for the KIM-1 Simulator) can be generated. Used from Notepad++ as Tool, no need to start from the command line.

  1. Download TASM 32 here
  2. Unpack in e.g. c:\tasm
  3. Create environment variable TASMTABS=C:\TASM
    (Settings – Related Settings – Advanced system settings – Advanced tab – Environment Variables).
  4. Add c:\tasm to the PATH
  5. Invoke tasm from the command line without arguments for help and/or read TASMMAN.HTM in C:/tasm
  6. Add macro’s to Notepad++, see there.

Test and debug
The output of the assembler can be downloaded to the SBC. Burn an EPROM, download hex or papertape. And test the code.

For KIM-1 programs I always use the KIM-1 Simulator debugger on the PC.
Set breakpoints and watches, trace the code, inspect memory, run the program.
When it is a TTY console program, I sue a terminal emulator, Teraterm.
2400 baud 8 bit, one stop bit, no parity, 5 ms character delay, 20 ms line delay for papertape upload.. Higher baudrates may work.

For CP/M there are many emulators available, choose one that allows file from the PC to be accessed also by the emulator. E.g. the Z80 IDE and CP.M emulator of Hein Pragt.
CC65
I only use the assembler and linker of the CC65 package. Mainly for KIM-1 KB9 Basic development, as the source from Pagetable is in this format.

This is how I do it (Windows, can be done also on Linux)

  1. Download and unpack the archive of pagetable in a folder on your PC.
  2. Download and unpack the CC65 package, a C compiler, from which only the assembler and linker is used. I used the Windows binary.
  3. Copy CA65.EXE, LD65.EXE and longbranch.mac from the CC65 package to the folder where you unpacked the MS Basic source.
  4. Change whatever you like in the source. It is quite a complicated construction, with macros for every variant, so look carefully at the listing file what really is produced.
    Start with no adaptations and then go on studying the listing file and testing. The KIM-1 Simulator is a good tool for testing! Load the symbol table file to see what is where.
  5. Assemble and link with this simple batch file makekb9v2.bat, resulting in an object, a binary, a listing file and a symbol label file.
    ca65 -D kb9 msbasic.s -o tmp/kb9v2.o -l tmp/kb9v2.lst
    ld65 -C kb9.cfg tmp/kb9v2.o -o tmp/kb9v2.bin -Ln tmp/kb9v2.lbl
    
  6. Repeat step 4 and 5 until you are satisfied with the adaptations. The article listed above are a good source of inspiration.

Winmerge
A tool to compare files, text and binary. Open the program, drop binary files from the explorer on it and see the differences highlighted. Essential to compare ROM dumps or to check if assembler source assembly leads to identical binary as the original. Detects subtle syntax differences from sources converted or disassembled, leading to different code.

Disassembler
Still searching for a good multiprocessor tool. With some intelligence, like input files not only binary, but also a symbol file and tips of what is data and what is code. Output should be in assembler format ready to assemble. A multipass operation, where you learn from each iteration symbols and data areas.

For 6502 code I use the online tool at Virtual Disassembler. Drop the binary and copy the code. Choose the output format, like “listing” or “assembler”. You can input a symbol file.