• Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal
Welcome to OpenComputers

Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more!

This message will be removed once you have signed in.

Solra Bizna

[MC1.7.10][OC1.6+]65C02 architecture "OCMOS", version 0.5.1 released 2017-03-21, beta-quality

3 posts in this topic

Since I had to write a 65C02 emulator core for work anyway, and since there is still a distinct lack of finished "real CPU" architecture modules for OpenComputers, I just spent the last couple weekends making one. All features that have been tested work, though the testing has not been very thorough.

The Minecraft 1.7.10 version can be found here, and the (very dry) documentation for both the hardware and the BIOS is here. It should build for later Minecraft versions with only minor modifications; I built it for 1.7.10 because that's the version I use. (Source code is on GitHub.)

Please report bugs on the GitHub issue tracker, though don't be surprised if it takes me a while to respond there (GitHub notifications aren't working for me). Feel free to poke me on IRC; SolraBizna on irc.esper.net or irc.tejat.net.

Features

  • Total control over memory usage 
  • Fully persistable
  • Technically supports almost 32MiB of main memory through the MMU*
  • Straightforward memory mapped interfaces for disk drives, redstone, and battery
  • "Serial terminal" allows basic, simple screen-and-keyboard based UIs
  • Support via UIF for all components accessible from Lua, including userdata support
  • Standard BIOS includes a basic monitor program, and supports CAB-compliant booting from clipboard, filesystem, or unmanaged drive
  • User Mode (barely tested) allows memory protection, multitasking—even total virtualization with some work
  • Sync safe
  • The CPU has around 512 bytes of built-in memory, allowing simple programs to run without any RAM modules

*If you dial up the memory amount high enough, you may get disconnection errors due to an oversight in OpenComputers' API. This will hopefully be fixed soon, whether through a workaround in OCMOS or a change to OpenComputers. Memory modules are, by default, smaller than those for Lua computers; in my own testing with two tier 3.5 memory modules (256KiB), I did not experience any disconnects. Meanwhile, since the 65C02 can do so much with very limited memory, you shouldn't experience any serious problems.

Version History

0.5.1

  • Works on the server now. (The LAST change I made before releasing 0.5 broke this.)
  • biosOptional option means you get the Standard BIOS even if no EEPROM is installed. This is slightly cheaty, but since there's not a crafting recipe for the Standard BIOS yet...

0.5.0

  • Initial release

Share this post


Link to post
Share on other sites

The "Enhanced" Apple IIe did. The others, as with earlier Apples, used a plain old NMOS 6502. The 65C02 is the CMOS version of the processor. It's largely compatible with the NMOS one, but has more instructions, fewer bugs, and draws less power at high clock speeds. Most of the undocumented instructions of the NMOS processor became documented no-ops, breaking the programs that relied on them. Apple BASIC should be compatible; someone should try to load it up...

I forgot to mention in the OP that I specifically emulate the Western Design Center version of the chip, so it has the RMB*/SMB*/BBR*/BBS* instructions. While I was programming the BIOS, those quickly became my favorite instructions in the whole set.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now