6502 processor IDE

Mos6502

This is a page about my freeware 6502 processor IDE program which is an editor / emulator / debugger / assembler / disassembler for the 6502 processor all in one portable Windows executable. I was never a big fan of the MOS 6502 processor, it was far to simple compared to the Z80 processor that I used. But the MOS 6502 processor was the biggest competitor of the Z80 in home computers in the 80ties and a lot of great computers used this processor. A few years ago I build my first Apple 1 clone and I got interested in the MOS 6502 again, this time I took some time to learn to program it. But as with so many old processors, it is hard to find the programming tools, there are some, but most of them cover only one configuration or are not portable and not suited for Windows. I had already written an Apple 1 emulator and had the emulator code. So I decided to add another IDE to the ones I had already written. (It get easier every time). In this IDE I support the Apple 1 computer, the Elector Junior (KIM 1) board and a simple 64K rom/ram machine with only LED outputs. Have fun. Regards, Hein Pragt.

I also have a Facebook Group on Retro Computing and Electronics, feel free to join!

6502 editor / assembler / emulator / debugger

Mc6502 Ide

To be able to program for the 6502 processor you need an assembler or compiler. I personally still like to write in assembler but I could no longer find tools for Windows 10. There were still some programs to download but most of them worked at DOS level, had serious bugs or did not fit my needs. After some searching I decided that it was time for a new project, building a complete integrated 6502 development environment. I found a pretty good assembler and the base code of my Z80 IDE and I had some old code in my code library. The result is 6502 workbench, a portable x64 Windows program that includes an editor, assembler, disassembler, emulator, single step debugger, Intel hex read / write function a VT100 terminal window, a seven segment display with 8 LEDs and keyboard support.

Installation

Download the zip file and unzip it at the place where you want to install it on your hard drive. Then create a shortcut to the program to the desktop and the program is ready for use. It is a so-called portable program which means that it does not use external sources or libraries and does not use the registry. After removing the directory from this program, it has also disappeared completely from your system.

First time use

To practice there are a few example files in the example directory, which you can load after which it will be in the shown in the middle edit window. Now you can convert this into machine code by means of the assemble button, this will appear on the left of the screen and be put into the virtual memory of the emulator. The last (or first) .org statement will also be put in the program counter and by simply pressing the run button you can execute the program and follow it on the screen. The speed will be just like the original processor, you can set the speed in the top of the screen. You can now stop running and modify the program, reassemble it and run it again. You can chose to see a realtime update of all registers (update checkbox) and you can set a breakpoint on code or memory access, a value of zero means its off. You can choose to stop at a breakpoint or start the realtime disassembler so you can trace your program. You can also set this trace on manually when you choose to single step trough the code. You can inspect the memory in the hex window. Default the 6521 PIA is emulated and the WozMon rom is loaded in Apple 1 mode. This terminal is a VT100 type. You can also select the Junior computer in which case the 6532 PIA is emulated and the Junior rom is loaded. Both rom files are external so you can modify them.

You can save the modified code as an asm file again but also save it as a hex file so that you can load the binary code in a circuit or ep(rom) for a real 6502 circuit. You can also read an Intel-Hex file, which will then be loaded into the internal emulator memory. You can also run this code when you put the correct start address in the program counter. You can also disassemble this internal emulator memory code after which the source code will appears in the edit screen in the middle. This can then be changed and written back into the emulator memory by means of assemble button.

I/O map

The 6502 has no I/O space so I implemented am MC6821 and a MC6532 PIA, in Apple 1 mode the 6821 PIA is used and mapped just like the Apple1, connecting the keyboard and the display with a VT100 terminal. In Junior mode the 6532 is emulated and the I/O mapping is just like the Junior computer (or KIM 1) with the seven segment displays and the keys mapped to the PC keyboard. You can also click the keys on the screen image. In simple mode the 8 leds are on memory address $d000 and the keyboard can be read using the same address.

Junior memory map

Junior Map

Version 1.01

I use the 6502_workbench myself and that is one of the way I find and fix bugs. I it now time to release the first version on my website so other can use it and I will continue to use improve the code. Suggestions and bugs reports are always welecome. I proudly present version 1.04 of the 6502 processor developer IDE.

Buy 6502 and 6502 related chips and hardware

I also have a webshop where I sell several 6502 types processors, boards and support chips.

https://www.heinpragt.nl/?s=6502&post_type=product

Download

Here you can download the latest version if this IDE. This download is a zip file containing a portable x64 (and a x32 version) Windows exe programs, an assembler directory and a examples directory.

https://www.heinpragt.nl/?product=6502-processor-ide

  • Version 1.04
    • Fixed some small bugs in the user interface
    • Fixed overflow bug in monitor.
  • Version 1.01
    • Initial release, it might be not completely bug free, I will test on, wait for remarks amd release the next version soon.

More pages on software development

Leave a Reply

Your email address will not be published. Required fields are marked *