Follow Slashdot stories on Twitter

 



Forgot your password?
typodupeerror
×
Games Technology

Minecraft Mod Adds Emulated 6502 Processor 96

New submitter Direwolf20 writes "The Red Power 2 mod for Minecraft has recently been updated, and it adds a fully emulated 6502 processor that can be programmed in assembly, but comes with a Forth interpreter. From the article: 'Eloraam calls it the 65EL02, because "it supports all the 6502, 65C02, and part of the 65C816 instruction set" as well as "a set of completely new instructions and two addressing modes. Since the 65EL02 is an 8-bit CPU, Eloraam didn't have as many options for programming environments as we have on today's 64-bit computers. While it's possible to program the 65EL02 in assembly language, for general use she chose to implement a Forth interpreter. Further technical information about RedPower Control's 65EL02 is available on Eloraam's blog RP Control Internals, and on the RedPower wiki's page for Red Power Control.' (Fair disclosure: The video linked in the article is mine.)"
This discussion has been archived. No new comments can be posted.

Minecraft Mod Adds Emulated 6502 Processor

Comments Filter:
  • Clock Rate? (Score:3, Interesting)

    by Narcocide ( 102829 ) on Wednesday May 23, 2012 @04:50PM (#40093971) Homepage

    So what type of Mhz can you get out of this thing? Is it feasible on modern hardware for it to run at a clock rate equal to or higher than say, the stock speed of a Commodore 64? And what about I/O interfaces like audio, video and joysticks? How far can this really be taken?

    • by BeerCat ( 685972 )

      Since the C-64 (and PET, Apple ][ and others) had 6502 running at 1MHz, then that shouldn't be too hard to do, even allowing for the emulation running inside a game environment

      • by 0123456 ( 636235 )

        I remember playing games on a Sinclair Spectrum emulator running in a PC emulator on a Sun laptop which probably had a 40MHz CPU, so a 1MHz 6502 on a 3GHz x86 should be trivial even with a ton of overheads in a game.

        • Oh, I just watched a little of the video and realized this isn't emulated using minecraft built-in materials and physics, its just a fancy plugin that lets you make computers in minecraft. Very cool, but not as cool as I originally imagined.

          • by Tarlus ( 1000874 )

            Same here. Being a mod, it's basically just using Minecraft as the GUI for its virtual operations...

          • Re:Clock Rate? (Score:4, Interesting)

            by Pseudonym ( 62607 ) on Wednesday May 23, 2012 @10:50PM (#40096635)

            I've toyed with building the 6502 in redstone logic. If you know anything about the internals of the 6502, it actually lends itself to emulation better than, say, the Z80, since it doesn't use microcode and has a data path which is simply laid-out geometrically. Plus, there are quirks in the 6502's design which mean that the delay in getting a slow clock signal around the device wouldn't be a problem in practice.

            The complication is that the 6502 has two logical internal busses (the data bus and the secondary bus) which are connected by a set of bypass MOSFETs which are bidirectional: they can pass data in either direction. That's okay when you're realising the 6502 in analogue electronics (which is what transistors are, after all), but it makes it difficult in digital electronics. At the very least, you'd need to separate the one control signal into two (one for each direction). It's a bit of a mess.

        • by DamonHD ( 794830 )

          Oh yes, you from Edinburgh Uni too? In fact, we had to slow ours down to match the screen refresh rate.

          And I suspect that the SPARC was 25MHz and the C compiler not especially good.

          Rgds

          Damon

    • by Mercano ( 826132 )
      It's supposed to run 1000 instructions per Minecraft tick, which is 1/20th of a second. [wikispaces.com] Note that that's instructions, which on a traditional 6502 can take multiple clock cycles.
    • by Mal-2 ( 675116 )

      MHz? Try just plain Hz. A "tick" (the minimum unit in redstone circuitry) is 100 ms. If you set up a circuit to run on both the rising and falling edges of the clock, you get a whopping 10 Hz.

      That's vanilla Minecraft, it appears the mod may double the speed. It also appears that the 6502 emulator can run multiple operations per clock, but you're still talking about something a couple orders of magnitude slower than the original 6502 in operation. I don't use any of these mods since I'm almost exclusively a

  • I watch the posters videos, they're pretty cool. If you're into minecraft, especially the mods, check him out. That being said, I'm pretty excited for this. I'm looking forward to seeing people's creations from this.
    • And if you either wasn't interested/got bored of minecraft and the vids are tickling your fancy.
      And then got dissuaded by having to hunt down individual packages and modify the jars with several frameworks(its not hard but it can be tedious as hell).

      I suggest you spoil yourself with some accessibility and head over to http://technicpack.net/ [technicpack.net] and grab a launcher.

      Technicpack was originally created by some Goons just wanting to a create modpack with all the more technical mods, already configured and simple to

      • I actually have used Technic Pack, I just don't have time to play anymore, so sometimes I'll work and have a video open in the background.
  • by fuzzyfuzzyfungus ( 1223518 ) on Wednesday May 23, 2012 @05:14PM (#40094229) Journal
    My impression of the metagame that is Minecraft is that doing things the hard and/or rube-goldberg way is part of the charm. There is some reason why people are trying to build ALUs in crap redstone logic rather than just alt-tabbing to the logic circuit simulator of their choice(or a VM, or an emulator of some popular retro architecture).

    Given that, at what point do mods that improve minecraft's program-ability go too far and turn it from a perverse simulation game of enormous popularity into a really dreadful IDE?
    • by toygeek ( 473120 ) on Wednesday May 23, 2012 @05:42PM (#40094551) Journal

      It got my son interested in programming. Not this mod, but another. He actually programmed a pong game on his own over the course of a week using lua in a minecraft mod that has a computer that runs lua.

      • Since the only mod I know of that uses LUA and has programming, it very likely _is_ the same mod. RedPower2. This is just the newest version with a bigger "computer"

        • by toygeek ( 473120 )

          Since the only mod I know of that uses LUA and has programming, it very likely _is_ the same mod. RedPower2. This is just the newest version with a bigger "computer"

          Its not RedPower2.

          http://computercraft.info/ [computercraft.info]

          He also runs a minecraft server on our VPS.

      • by simoncoles ( 31429 ) * on Thursday May 24, 2012 @09:27AM (#40099487) Homepage

        My son is the same, he's 11 and wanting to create Minecraft Mods has caused him to:
          - Learn Java (he had a few brief experiences with Processing but now he's reading the Nutshell books)
          - Decompile Minecraft
          - Find and follow instructions on how to do all this (Web and YouTube it seems)
          - Write his own mods

        He's currently at the stage where he's letting his brother have his mods, and we're starting to talk to him about the implications of distribution (support, licensing etc.).

        I'm doing very little except providing the right tools at the right time (IntelliJ has been excellent for navigating the code base).

        Very impressed with Minecraft and how much he's been motivated to learn. I had tried to teach him some programming before but never really got anywhere, now he's so deep into aspects of Java that I can't really help him... and I've not had to utter a single word of encouragement or assistance.

        Minecraft feels like it is the BBC Model B of his generation.

    • by History's Coming To ( 1059484 ) on Wednesday May 23, 2012 @05:49PM (#40094617) Journal
      I think a large part of it is the "because I can" factor. People often have some weird sideline projects on the go - I've hunted for the first three books in pi (by ISBN) and written a directed evolution program which is building a picture of Charles Darwin from random ellipses. Other people built computers in a game running on a computer just for the hell of it. No, it's never going to be the best 6502 emulator, the point is it's the best emulator written in Minecraft. Which is cool, obviously.

      I'm looking forward to seeing what happens with 0x10^c, Notch's new game, which has an inbuilt and fully emulated 16 bit for each player. I wouldn't be at all surprised to see a new ultra-low-power OS come out of it.
      • Well, there is more to it then that you see(though there is no denying the modders motivation and joys of hack'n'show)...Red Power started out with logic gate blocks and bundled signal cables.
        They provided functionality for the player, not just as a gimmick.

        Same applies for this mini computer, I belive part of the incentive was to add something bit more versatile and compact then hardwired circuts and logic blocks.

        She released a frame-block, the idea is that you design a machine using whatever components yo

    • by bmo ( 77928 )

      Given that, at what point do mods that improve minecraft's program-ability go too far and turn it from a perverse simulation game of enormous popularity into a really dreadful IDE?

      When someone abandons cool things like forth and tries to implement Visual Basic.

      --
      BMO

    • by Charliemopps ( 1157495 ) on Wednesday May 23, 2012 @06:12PM (#40094847)
      Because the environment "feels" real. You can run around and see the circuit pathways and actually visually understand how the processor works... as apposed to having some abstract flowchart or diagram.
      • Disclaimer: I've never played Minecraft

        However, from the embedded video in this post [shroomery.org], it felt like I'm in a 3D VLSI design tool. Maybe in the future we'll be literally designing devices one block at a time. Either that or the Nazcas [wikipedia.org] have been playing Minecraft all this while....

    • Given that, at what point do mods that improve minecraft's program-ability go too far and turn it from a perverse simulation game of enormous popularity into a really dreadful IDE?

      Compare emacs to hurd and you'll see the lengths people go to to avoid doing something that looks like actual work.

    • Comment removed based on user account deletion
      • Minecraft as a game...pretty much sucks...the survival aspect did add to it...and quite recently Notch added the final boss, which gave you an overall goal to reach.

        But it felt kinda tacked on, since building palaces don't really help you much in that goal when you could just build an bunker with much less effort, not that there isnt alot of things you must construct items, transportation, etc to help gather resources and being systematic about it certainly gives credence to free form building as a challeng

        • Comment removed based on user account deletion
          • But just because YOU think it sucks doesn't mean other people feel the same. look at the Sims, i have NO fucking clue why but women just love that damned thing and funnily enough Age of Empires I of all games. My former boss showed me how you could bring in the females just by putting AoE I on the boxes in the window but when i watched them play...Did you know many women do NOT play that game like a guy does? i saw many build a big wall around their place and if any bad guys attacked they would just use priests to turn the bad guys on each other and then would just spend their time building stuff.

            So maybe Minecraft is like that, who gives a shit about playing it the 'right" way when there are better things to do. I know I have a game (Just Cause II) where i never even fuck with the missions because i'm too busy doing crazy shit and blowing stuff up to care. I mean I'm using the grapple to tie the biker cops chasing me to trees like jedi and jumping out of flaming choppers and hijacking planes by riding them like a bronco, why would i care about your stupid mission?

            In the end what matters is you are having FUN with a capital F, which sadly so damned many games seem to forget. Like Yahtzee at Zero punctuation said "its a sightseeing tour" where they take you from one set piece to another being led by the nose, fuck that. So I give the Minecraft guys credit (along with some of the other great indies like Torchlight series and Grimlock) because they remember that at the end of the day it doesn't matter what the "rules' or "goals" are, what matters is "Are You having FUN?" and from all the stuff being cooked up in MC I'd say that answer is a giant FUCK YES!

            This ISNT a subjective thing...if a game does not have coherent, rules, obstacles and goals its probably going to be lacking...if it lacks any of these aspects its not a game at ALL.

            Sims is a spin of of Sim City... although the scale is much lower and not as challenging, in the bare essence the same concept. Organize/build/budget a city, organize/build/budget your household.

            There is nothing peculiar about your AoE example, its a strategy game...and the game is to devise your own strategy...if focusing on pr

          • by jythie ( 914043 )
            Thing is, as a "game" minecraft does suck, as does The Sims. Both have had game-like elements tacked on to them but at their core they are not really games.

            Keep in mind, saying something isn't a 'game' doesn't mean it is not fun or is a bad project, it simply states that a particular label doesn't apply well to it. Will Wright did a good job of describing the category of 'toys' or simulations rather then 'games'... all go under the umbrella of 'fun' and can be awesome, but what they mechanically are is a
            • Comment removed based on user account deletion
              • How did you know? Sometimes you spend loads of time building up resources before you attack.

                If you think that is weird...i once saw gyrls playing counter strike...IMAGINE THAT.

                Also...just to finish this...fun is a louse description of..:ANYTHING!

                If its FUN its a Game?! WTF!

          • > i have NO fucking clue why but women just love that damned thing and funnily enough Age of Empires I of all games

            Generally,
            Men love to Destroying. i.e. "Fuck it, or Fuck it up" (which is why First Person Shooters sell so well)
            Women love Creating and Relationships (which is why The Sims has so many women playing)

            It's not rocket science - to study game design is to study psychology, Yin / Yang, etc.

    • by jythie ( 914043 )
      *nods* that is actually my though here. RP5 has always had logic blocks that condense large redstone devices into single block, but I feel that including a full virtual machine to control in-game devices goes a bit far. Granted, like any mod, I can just not use it of course ^_^ though sometimes I worry that RP is slowly eating other mods. It is often coupled with things like BuildCraft or IndustrialCraft because of its useful logic components, but she seems to be trying to replace the functionality in th
  • by Anonymous Coward

    Asperger's is one hell of a drug..

  • When they drop the Lego blocks and start letting you play with things at a molecular level, give me a call. Until then. *yawn*

    • That would be kind of neat actually... have a simplified physics model based solely on gravitational attraction of proton, electron and neutron blocks, each with their relative mass. Based on that, you could build up algorithms for elements, cellular structures, etc. and keep most of the popular ones available. Then you'll get the really focused people building RNA etc. and attampting to build real-world models to see how the physics need to be tweaked to replicate real-world interactions.

      Then we can get

      • by nurb432 ( 527695 )

        Well, i was also to be realistic.

        Modeling at an atomic level is a bit much to expect with current hardware, but common molecules are large enough and easy enough to simulate that it should be possible.

        Or at the least abstract out materials, like 'wood', 'steel', etc., and let you build that at a near-molecular level. Using Lego like blocks is rather limiting.

        • I do no think you comprehend the difference in scale between the molecular level and anything remotely recognizable or interesting to us. If your basic water molecule is 275 pm, and anything complex enough to be recognizable as "wood" would be something like 0.1 mm, you'd need something like 3 million building blocks. In addition, you're asking for many more degrees of freedom for position/angle of your basic building blocks as well as interactions between a much greater number of blocks. Here is something

          • Even if all of this were possible to simulate on our dinky little home computers, the time and effort it would take to actually build anything interesting would be far too much for almost every body.

            The whole idea is that it only has to be done once, and only one assembler algorithm has to be produced. You wouldn't store a literal representation of the molecule and resulting substances, only a much lighter-weight symbolic representation, as is done with bmpmapping currently on advanced videogames.

            And as I implied in my original post, you'd definitely not be able to get much more advanced than a single celled object (which, as you point out, is plenty advanced already). Creating an entire block of woo

          • by nurb432 ( 527695 )

            No i fully comprehend it, and until we reach that point things such as Minecraft are of no trust to me.

  • Apropos... (Score:5, Interesting)

    by fuzzyfuzzyfungus ( 1223518 ) on Wednesday May 23, 2012 @05:18PM (#40094275) Journal
    Since we are talking about implementing 6502s in questionably efficient ways, it seems like a good time to plug http://visual6502.org/ [visual6502.org]. Efficient? No. Logic-accurate emulation of a 6502 implemented in javascript based entirely on photographs of a decapped 6502 die? Fuck Yeah.
    • by epyT-R ( 613989 )

      why would someone go through the effort of decapping a real cpu to emulate it exactly, then write the emulator in javascript?

    • As I noted above, the 6502's design relies on the MOSFETs being analogue devices in various nontrivial ways, particularly the bypass MOSFETs between the data bus and the secondary bus. The 6502 is a good candidate for realisation in redstone logic; it would be much simpler and achieve a much higher clock rate than doing a Z80. But you can't just plug the reverse engineered 6502 into Minecraft. There's at least a little redesign that needs to be done.

  • So the guy wrote an emulator of the 6502 processor and various perihipals as a native-code plugin for the game. Technically, it does not seem so special, as various 6502 emulators have been written before; they just usually have a more usable GUI than operating them from within a 3D game.

    I would be much more impressed if they actually implemented a general purpose computer by only using readily-available in-game building blocks and mechanics without code extensions to the game engine. This has been done for

    • by History's Coming To ( 1059484 ) on Wednesday May 23, 2012 @05:59PM (#40094725) Journal
      See this video of Conway's Game of Life [youtube.com], in Minecraft, using only native bricks in a very old version of the game. Everything from abacuses to basic calculators and full processor simulations have been done, so this may well just be all of that "landscape" wrapped into a more manageable few bricks and a GUI stuck on it.
    • This article is news not because it was crazy accomplishment, but because it's a new tool/building block that opens up enormous new possibilities for creativity in Minecraft. Sure, if someone had ported Tetris as a mod into Minecraft, you would have a point, but this guy ported a processor, and that is something certainly worth getting excited about.

      • Well apparently my post got modded -1 Troll already, but I'll just say I still fail to see the point. If you are implementing a Turing complete programming environment, why go with 6502 + Assembler? Why not go Ruby, Python, Perl or some other modern programming language? I am just honestly failing to see the utility of this, although I admit emulators are always very cool and have mad respect for guys who make them.
  • Has Arnie's code been open sourced yet?
    I woul to run it in this emulator.

    • by tepples ( 727027 )
      If I had to guess, I'd say the 6502 in The Terminator is an Apple II-compatible microcontroller acting as an I/O processor for Arnie's short-term memory. It looks like setting up a RAM disk and then using Key Perfect checksums, possibly for a hash table.
  • Up or down? (Score:4, Interesting)

    by History's Coming To ( 1059484 ) on Wednesday May 23, 2012 @05:39PM (#40094521) Journal
    There's an interesting school of thought which says that advanced forms of life will eventually create countless virtual worlds for fun or research, and asks the question "what are the odds that we're in an 'original' reality?". (See Nick Bostrom, Oxford University [simulation-argument.com], he's a philosopher rather than a computational scientist or theoretical cosmologist, but they all seem to be nudging each other these days.

    With that in mind, I found the following quote from the creator of this processor amusing:

    Infinite loops are fine. RP Control is carefully designed so that you won't screw up your world even if you crash the virtual computer. It's actually not especially hard to crash the virtual computer, since the whole OS is loaded into its RAM and you can easily write to that RAM. Still, since the computer is fully virtualized, it won't hurt your world or even cause a slowdown.

    • See Descartes.

      I could see a simulation controlling my physical actions or stimuli, but the chance that a conscience thought as we know it is so predictable that you could actually stimulate me in the right way to get me to think exactly what you want is pretty far fetched.

  • I'm in for 2! (Score:1, Insightful)

    by PopeRatzo ( 965947 )

    Minecraft Mod Adds Emulated 6502 Processor

    Nothing says "fun in gaming" like a 6502 processor emulator. When I'm sitting down to play games, I often find myself thinking, "God, I wish I could do some assembly-language programming in this game". I don't think there's any question that was the biggest weakness of Call of Duty 4, Modern Warfare 3: Black Ops - there were no emulated 8-bit processors.

    And there are actually some out there who don't understand why computer geeks are sometimes the butt of jokes.

    • Re:I'm in for 2! (Score:5, Insightful)

      by suomynonAyletamitlU ( 1618513 ) on Wednesday May 23, 2012 @07:18PM (#40095311)

      Yes, programmers shouldn't program in their off time, just like artists shouldn't draw and singers shouldn't sing. Which, unfortunately, a lot of people believe.

      "What are you doing?" parents and peers always say. "You're wasting your life." And they keep doing it because they want to.

      I say screw people like you, and more power to people like them.

      • I say screw people like you, and more power to people like them.

        Jeez, lighten up, Francis. I love the idea of someone writing assembly language programs with a bunch of blocks in Minecraft. It's one of the reasons why I really appreciate the Slashdot community. I would much rather a gamer create logic gates with blocks than rape and kill ho's with his psychopath RPG character and get points for it. There is absolutely nothing wrong with having little in-jokes in a game. Bach wrote a piece of music that

    • There's an emulated 6502 in Animal Crossing for the GameCube. It's used to run NES games obtained from Tom Nook and Crazy Redd.
  • by WrecklessSandwich ( 1000139 ) on Wednesday May 23, 2012 @05:54PM (#40094675)
    ...because the only logical conclusion from there is Minecraftduino.
  • What's inside? (Score:4, Interesting)

    by mark-t ( 151149 ) <markt@ner[ ]at.com ['dfl' in gap]> on Wednesday May 23, 2012 @06:02PM (#40094753) Journal

    What's the emulated hardware organization like? The 6502 didn't actually have designated input or output instructions, so as I recall, a programmer had to read or write to specific memory locations that were hardware mapped to various devices, especially peripheral devices.

    Discounting the memory mapped IO locations, how much RAM does the emulated system have to play with? What sort of firmware is loaded into the emulated ROM?

    • by alannon ( 54117 )
      If you watch the video, you'll see the answers to each of these questions in detail.
      • by mark-t ( 151149 )

        Not really... I was talking about programming it in assembly, not from inside the Forth operating system.

        Although it is apparent that it can be expanded to 64K of RAM... I also get the impression that there is no firmware.

        Nonetheless how do you program this in native 6502? Effectively making one's own operating system?

    • by Mercano ( 826132 )
      8KB in the base computer block with up to seven 8KB memory expansion blocks behind it. There are peripherals that do in fact connect via memory windows; Eloraam has implemented a custom MMU instruction to map in whatever you've connected with RedBus wire. Currently, there are only three of them, though: the disk drive, the terminal, and the IOX box, which lets you interface with redstone signals. I think you can also connect multiple CPUs up over Red Bus; you just have to give them different bus IDs. Bu
  • by biodata ( 1981610 ) on Thursday May 24, 2012 @02:21AM (#40097479)
    We heard you like computers so we put a computer in your computer
  • If anyone wants to compile stuff for it i'd look into cc65, just started using that to compile c code down to my Apple IIe, works like a charm :) Not sure if you can run any app/disk image on Minecraft's processor, but its worth looking into.

Every successful person has had failures but repeated failure is no guarantee of eventual success.

Working...