Hello everyone!
My name is Kevin, and I have been a developer since I can remember. My full-time job is a development job creating build and deployment software solutions for my company. I mainly use Python as a programming language, although I have recently been diving more into FreePascal/Lazarus(AKA FreeDelphi) in recent months, as I would love to have a compiled static language under my arsenal, and Pascal has always been a fun language to program in. My experience with assembly language is very limited, and even more limited is my knowledge in 6502... Actually, I just started diving into 6502 assembly yesterday, but have used assembly prior.
So, you might be wondering why I decided to take the dive into 6502 assembly now. Well, it's for a rather unique project of mine, which is actually what brought me to 6502.org in the first place. You see, my project requires a Virtual Machine of sorts, and my past experience with assembly comes from that. I have created my own VM instruction sets for past projects, both for the sake of learning, and for purpose. However, for this particular project, I wanted my user base to be-able to create custom content which would under the constraints of this 6502 Virtual Machine. I use this term, rather than emulator or simulator, because of it's general purpose. I equally joined this forum to also thank the maintainer for all the 6502 information provided, or I wouldn't have been able to do this in the 20 hours I have currently spent on it. I plan on using the resources hosted here a lot more during the next couple of weeks.
Okay, now you must be wondering what my project is exactly. I will not post any links to it here, as I am not aiming to advertise, however if you subscribe to PlanetPython RSS, you should see an 6502 related article pop-up, you can read about it there. In summary, I am the developer of an online multiplayer hacking simulation game. The game is terminal based, and very open world and user-generated content heavy(or at least will be eventually). Previously for this project, I attempted to use my homegrown Virtual Machine, however this would deter many users from creating any content(AKA custom programs), as it would require hours of learning, not to mention, I would have to write an extensive set of documentation... Sometime last year, I started reading about potential real-world processors, and the 6502 stood out as the best candidate. There is a wide range of online documentation, it's CMOS implementation is still widely used in embedded projects, and I thought there must be a large community of 6502 developers worldwide. So naturally, I took it among myself to integrate a 6502 Virtual Machine into my project. Today I finally finishes the initial integration, and it's live within the game for connected players to use to their hearts content. However, the integration is far from complete. To make using the 6502 within my project a 100% success, much of my hardcoded Python needs to be ported over to 6502 assembly...
This is the second reason why I have joined this forum, not only to thank you for all the great resources, but also for when I need help and/or guidance for when I dive into assembling my own 6502 Kernel... Yes, you read that right. Basically, this multiplayer game will run on 6502 code. So, the idea is that after the player connects, and if their host is not in an online state, the Virtual Machine memory will be initialized, and a Kernel will be loaded from their host into memory and executed. If the host is still online(AKA powered on), then the player will connect to their TTY shell, another program running in 6502 code.
So, I am here, because I have a really ambitious project ahead of me here. I need to build a working Kernel for these Virtual Machines, which would have some APIs for various routines and services. It will also need to initialize the virtual networking stack(as this is a multiplayer online hacking simulation), and initialize other services. Most of these virtual I/O, like networking, block device access, and the like will be performed through standard memory mapped I/O addresses, as that is commonly how the 6502 works. On top of the Kernel, a shell processor will need to be written as well, which I think might be fairly complicated to write in assembly.
I do plan on diverting from 6502 standard a wee bit, namely to support advanced operations like having more than 1 program in memory, and TCP-like networking. So, as a result, the stack segment will not be at 0x0100 as per standard 6502, but will be floating and can be set when needed. So, each program and the Kernel itself can have their own stack. I am also thinking of writing in memory protection, so that you can write-protect pages of memory. Both of these will be very useful in the environment where the 6502 is being used, it's a nice mix of vintage and modern architecture. I do not believe I will be adding/removing any op codes from the CPU core however, I do want to keep it as compatible with 6502 as possible.
So that's my project in a nutshell, as I said, it's a very ambitious project. If your up for playing an online multiplayer hacking simulation game with virtual 6502 hosts, and almost infinite possibilities, this will definitely be something to look out for once I have the full 6502 integration in place.
|