Description: In the final stages of this project, the Arduino has been functioning as both an SD card controller and, in case of errors, as an emergency EEPROM programmer. It is now late July, and although not all objectives for the Retrochallenge project have been met, significant progress has been made. The integration of the 6502 microprocessor with the Arduino to read data from the SD card has been successful, leading to the incorporation of this code into the P:65's basic operating system, stored in an 8 KB EEPROM. Before the Retrochallenge commenced, a program was developed to allow the P:65 to download and rewrite its EEPROM, simplifying the process compared to physically removing the EEPROM for programming. Initial attempts led to errors due to misconfigured linker settings, causing the EEPROM burner to write data incorrectly. The software, written in 6502 assembly, has had its share of bugs, yet most were relatively simple to resolve once identified. The debugging process has been challenging, especially when modifying low-level input/output systems. However, basic I/O routines have been successfully integrated into the OS, enabling communication with four virtual devices. Shell commands have been implemented, including basic file operations such as listing directory contents, creating and deleting directories, and loading and saving files from the SD card. Notably, the "more" command required extensive debugging, while the "load" command faced challenges due to pointer arithmetic errors. Transitioning from downloading programs via XMODEM to loading them from the SD card marks a significant advancement in convenience. Future enhancements include enabling the BASIC interpreter to load and save files and integrating the I/O code with the CC65 standard library for C programming capabilities. The project has progressed well, with an explicit goal and deadline aiding focus and motivation. The Project:65 is a homebrew 8-bit computer utilizing a 6502 processor, and preparations are underway for potential entries into the Retrochallenge. The system has been disassembled and reassembled to ensure proper documentation and accessibility of components, while layout improvements have been made. New features include a display using blue bar LEDs connected to the address bus and a write-protect switch for the EEPROM.
The Project:65 computer is a custom-built 8-bit system that utilizes the 6502 microprocessor, a well-known CPU architecture that has been pivotal in the development of early computing systems. The integration of an Arduino as both an SD card controller and an EEPROM programmer enhances the functionality of the Project:65, allowing for seamless data management and system updates. The Arduino's role in facilitating communication between the 6502 processor and the SD card is critical, as it enables the retrieval and storage of data without the need for manual EEPROM handling.
The operating system within the P:65, housed in an 8 KB EEPROM, has been designed to support a range of basic shell commands. These commands provide users with the ability to interact with the file system effectively. For instance, the "ls" command lists files in a directory, while "mkdir" and "rmdir" allow for directory management. The "rm" command deletes files, and "more" enables users to view file contents directly in the console. The "load" and "save" commands facilitate program execution and data storage, respectively, reflecting a well-thought-out design for user interaction.
The debugging process has been a significant aspect of the project, particularly when addressing issues related to pointer arithmetic and file handling. The implementation of a generic device interface allows for flexible communication with multiple virtual devices, enhancing the overall capability of the system. The successful integration of basic I/O routines serves as a foundation for further development, including potential compatibility with the CC65 standard library, which would enable the use of C programming functions.
The physical layout of the Project:65 has undergone refinements to enhance accessibility and organization. The addition of blue bar LEDs connected to the address bus not only adds a visual element but also aids in monitoring system activity, providing real-time feedback on the operation of the CPU. The introduction of a write-protect switch for the EEPROM is a thoughtful feature that safeguards against accidental overwriting, ensuring the integrity of the stored operating system.
Overall, the project represents a blend of retro computing nostalgia and modern engineering practices, showcasing the potential for innovation within the realm of homebrew computing. Future developments will likely focus on expanding the capabilities of the BASIC interpreter and enhancing the user experience through additional features and improved system performance.In the final stages of this project, the Arduino has been doing double duty as an SD card controller (left) and, when things go wrong, as an emergency EEPROM burner (top). It`s just about the end of July, and while I haven`t accomplished everything I wanted for my Retrochallenge project, I have reached a good place to conclude.
It`s been fun and c hallenging and occasionally frustrating but definitely worth it. Most of all, I got stuff to work, and that makes me very happy. Once I got my 6502 to talk to the Arduino and read data back from the SD card, I had to integrate all that code into the P:65`s primitive operating system, which lives in an 8 KB EEPROM. Shortly before the Retrochallenge started, I wrote a program that let the P:65 download and rewrite the EEPROM itself.
It`s a lot easier than pulling the EEPROM out and sticking it in my homemade programmer every time I make a change. The first time I tried that, I wrote a ROM image that was so bad the poor thing couldn`t even boot up again afterwards.
It turned out my linker configuration was screwed up, and it put the. rodata section in front of where the code was supposed to start, and the EEPROM burner code proceeded to put everything in the wrong place. Even when the code was right, sometimes I`ve been wrong. Several times now I`ve accidentally flashed the EEPROM with the wrong data file. In particular, at least once I`ve overwritten my operating system with the code for the EEPROM burning utility itself.
This did not work. As for the actual software (all written in 6502 assembly), I`m happy to say that most of my bugs have turned out to be simple ones. That doesn`t mean they were easy to track down, by any means, but once they were identified they were easy to fix.
That`s lucky, since it`s been really tricky to debug this software. Since I`m changing the way the low-level input/output system works, it`s hard to generate any debug output without further messing up the code I`m trying to fix. Eventually, I got the basic I/O routines built into the OS and running correctly. I now have a generic device interface that can be used to talk to four virtual devices: For example, when I try to write a character to a file, I call a generic putc() function.
The generic putc() looks up the specific device driver putc() function for the current device and passes the character to be written to it. Devices 2 and 3 can be used to open files on the SD card by name and read or write data to them. With the basic functions all working, it was time to write some shell commands that I could use interactively from the P:65`s command prompt.
Running out of time, I just implemented the basics: ls directory Get a list of files in a directory. mkdir name Create a new directory. rmdir name Delete a directory. rm name Delete a file. more name Print the contents of the file name to the console. load name Load and run the named file. save name Save the most recently downloaded file to the SD card. Out of all of these, the more command probably took the longest to get right that`s because it was the first to use the full range of file open and read commands, and it required a lot of time tracking down a handful of really trivial (but hard to spot) bugs, on both the 6502 and Arduino sides of the communications. The load command also had me stymied for a while because of a bug in my pointer math when putting the new data into memory.
Luckily, once I figured that out I was able to avoid a similar problem in the save command, which came together very quickly earlier this evening. Up to now, I`ve had to download programs to the P:65 using XMODEM over its serial port. Finally being able to load programs into memory from the SD card is a big step up in convenience big enough that I can say I`ve completed the first phase of this project.
There`s certainly more to do with this project. For example, I can load my BASIC interpreter from the SD card, but the interpreter doesn`t know how to load or save BASIC files. I`m also interested in adding support for this IO code to the CC65 standard library, so that I can write (very short) C programs for the Project:65 computer that use functions like fprintf and fscanf.
I`d hoped to get into that this month, but it`s going to be a significant project all on its own. Overall, I`m happy with where I ended up. Having an explicit goal and a deadline made things go faster than they would have otherwise, and I mostly avoided distractions. Plus, watching the progress on some of the other Retrochallenge projects kept me motivated if you haven`t yet, you should definitely check them out.
I`ve been splitting my time between a number of projects over the last couple weeks I`ve been playing games and demos on my newly-repaired Amiga 500, and doing some work-related projects making use of the new features in C+11. I`ve also started playing with my Project:65 breadboard computer again, and that`s what I want to talk about today.
The Project:65 computer is a homebrew 8-bit computer using a 6502 processor; you can read more about it over at this page. I`m getting back into it now because I`ve been thinking about an entry for the Retrochallenge, which is usually in July.
I`m not trying to cheat and get a head start; I`m just trying to whip the machine into shape so that, if I do decide to do something, I can hit the ground running. The first thing I did to the P:65 was take it apart and put it back together just to make sure that I could, and to make sure that my documentation was good enough.
Good enough for me, anyway it`s mostly hand-drawn diagrams in a notebook. I`d like to make a really nice version of the schematics to put on the project page, but I`m not sure what the best format for something that complex is. While I was reassembling it, I tried to clean up the layout and make the components a little more accessible.
That was a partial success the I/O circuit is a lot clearer now and the reset button is a little easier to reach, but I kind of made the EEPROM a little more difficult to reach. In the earlier stages of development, I was constantly pulling the EEPROM out to reprogram it, but I may have found a way to avoid that in the future.
The new layout uses three pieces of breadboard, and that gave me room for some new features. The one thing P:65 really needed to give it some retro style was more blinking lights. I found these cool blue bar LEDs at Sparkfun, and hooked them up to the address bus. This display would be really cool if I had a way to single-step the CPU, but even running at full speed it can be neat to see the changing patterns. The other new feature I added was a write-protect switch for the EEPROM. A what, you ask Well, I got the idea from Garth Wilson`s schematics that, ifquick sketch to print out the value on th/Busy line.
The Arduino displays the time and date on an optional LCD and in the Arduino IDE serial monitor window. A PCF8563 real-time clock (RTC) integrated circuit (IC) is utilized to generate the time and date. The time and date can...
Upon purchasing the slave dial, it arrived without instructions, packaging, or additional details. The only visible markings, aside from decades of grime, were on the face (SMITH SECTRIC, ACELEC SYDNEY) and some markings on the bracket holding the mechanism (E....
First, download any version of the Arduino software (the latest version is recommended) using the provided link, and then download the specified Arduino sketches. After the download is complete, open the sketches to view the written code. Complete the circuit...
This section of code outlines the main sequence of operation for the sequencer. A for loop is utilized to determine which step the sequencer is operating in. Within this loop, an address is generated using the assignByteToPins() function, which sends...
Powerful for its size and cost, and extremely easy to learn and use. A voltage monitor was added to a scooter to warn when the battery might need recharging, instead of waiting for the electric starter to fail. An Arduino...
A 9 V DC battery initially powered the solenoid valve effectively. However, the solenoid did not generate sufficient force due to inadequate DC power. A modification was made to use a computer power supply as the power source. Providing +12...
The USB to RS232 converter is called USB-2-bot and comes from another project. Any other converter would work as well, e.g. this USB-TTL-232-cable from adafruit. It has an ISP connector to program the bootloader and a serial connection used for...
The DOGM graphics module should be connected to the Arduino board as illustrated. Pin 12 (MISO) of the Arduino board must remain unused. Furthermore, the DOGM graphics module requires an address line (A0), which can be connected to any output...
A quick circuit showing how to control the speed of a DC motor with a potentiometer with your Arduino board. Also shows how to use a TIP120 transistor to allow the Arduino control a larger power supply.
This circuit utilizes an...
We use cookies to enhance your experience, analyze traffic, and (if you allow) serve personalized ads.
By clicking Accept All, you agree to our use of cookies.
Learn more