Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal

GreaseMonkey

Members
  • Content Count

    36
  • Joined

  • Last visited

  • Days Won

    5

Everything posted by GreaseMonkey

  1. MS-DOS is a proper operating system. Writing an x86 emu will be a pain in the arse, but there's enough resources to do it. Heck, I got pretty close to getting Linux to mount root w/ OCMIPS. I did have to modify the config to allow 8MB of RAM though, but allegedly you can *juuust* squeeze Linux into 4MB of RAM. For extra fun, I managed to get Lua 5.3.2 (~350KB) to boot off a T1 stick of RAM (192KB) using a virtual memory microkernel. I would argue that it's possible to emulate a C64 - probably not at full speed or accuracy - in Lua. The real thing has 64KB of RAM. Technically it's a p
  2. What libc are you using? You can just use newlib. TIP: sbrk() returns the value of the break before it was called. Here, have a completely free* implementation: #include <stdint.h> extern char end; void *current_break = (void *)&end; void *sbrk(intptr_t increment) { void *ret = current_break; current_break += increment; return ret; } *it's also completely untested. but hey, it's free!EDIT: I had a look at your code, it appears you've rolled your own malloc(). TIP: Use the memory allocator that newlib provides in its libc. Then you only have to write sbrk().
  3. 12. #oc, where people actively avoid calling Sangar by any names that might namedrop him.
  4. 1. Lua is not an acronym. With that said, that could be pretty cool. 2. Look for something called MineOS. It kinda does what you say but it's more based around Mac OS X aesthetically. 3. This is an exercise left to the reader. 4. This would be useful. It's the sort of thing you'd put on a loot disk. 5. There's a competition on right now. You should have your entry done by about the 20th of July. As for you specifically, you should have a go at this - it doesn't have to be a technical masterpiece, just have a go at it, it might be really fun.
  5. 10. #oc, the constant sound of software falling apart.
  6. There's a couple of custom OC architectures floating around that could benefit from this. Really, we need people to write software and we don't have in-mod C compilers yet. I'll give you my setup (with a few distro-specific things stripped out): ../binutils-2.25.1/configure --target=mipsel-none-elf --disable-multilib --disable-nls --enable-lto ../gcc-5.3.0/configure --target=mipsel-none-elf --disable-nls --enable-languages=c,c++ --enable-lto ../newlib-2.3.0.20160104/configure --target=mipsel-none-elf --enable-lto For ARM I use arm-none-eabi as my target, but arm-none-elf might work better
  7. OCMIPS is a mod for OpenComputers which adds a MIPS-I architecture core. Status: - The CPU itself is mostly complete. - It's sorely lacking in software, although Lua 5.3.2 runs (or at least used to). - It's got an ELF bootloader EEPROM. - I used to be able to boot Lua off a T1 (192KB) stick of RAM when run atop Mocha + libgreen, but I accidentally broke stuff so I still need to fix that. - The component API currently sucks. Here's a proposal that should help make it suck less for some components. OCMIPS source: https://github.com/iamgreaser/ocmips If you want binaries, lurk on
  8. Due to Minecraft's 20Hz tick rate, it should be completely adequate to implement a PLC environment as a program. It shouldn't be hard to compile to Lua source code anyway... assuming you've parsed the input of course.
  9. Let me make this post readable (no really this looks absolutely awful in my browser - use the "code" tags if you're going to do something like this post): https://gist.github.com/iamgreaser/a8cf17906b0a799851087eed4181ea87 Note, I could only make about a third of it readable as after that point I just gave up where it started to get inconsistent. ---- This is OpenComputers. It is not OpenPCs. Not every computer is a PC. I would say that the computer that most of your friends use all the time does not resemble a PC at all. It's called a "smart phone", or as I like to call it, a "sur
  10. Relevant Lua 5.3 manual section in case you want to know more about require: http://www.lua.org/manual/5.3/manual.html#pdf-require The error says that handler is currently being loaded when it calls itself. Here's a possible workaround: local Handler = {object = {}} local workspace = { shell.getWorkingDirectory().."dir1", shell.getWorkingDirectory().."dir2" } function Handler.init() local key, dir for key, dir in pairs(workspace) do local element for element in fs.list(dir) do local s, e = string.find(element, "%.") local ext = string.su
  11. Let me help you rethink your life: Lua's easier than C++ and you'll probably enjoy it much more. It's fairly lightweight but there's some funky stuff you can do with metatables and closures and whatnot. Also, join us on IRC, seriously. As long as you can read some documentation and have some idea of how to use a search engine, you'll do just fine. ---- While I'm at it, might as well address this point: I'll use OCMIPS as a reference. Sadly there's no post here (memo to self, get back into this stuff). During testing (prior to actually making it into a Minecraft mod) I coul
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.