Jump to content

Microcontroller like mod interest survey


soxslayer

Recommended Posts

I'm thinking of starting a KSP mod similar to kOS in that it will allow you to write programs to control your crafts. I think kOS is a fantastic mod but I want something a little more "realistic". What I'm thinking of is something similar except it will behave more like an actual CPU or microcontroller.

Here is a list of features I'm thinking of as of now:

* you'll have to program it in assembly, opens up the possibility of a higher level language compiler

* access to various information/control modules will be with memory mapped I/O

* there will be different craft parts which will give you more processing power and memory, possibly even co-processors

* initial interrupt support, like a timer for multitasking like activities

I realize this mod won't be for everyone as it will require some degree of technical background. I'm looking to gauge the community's interest in something like this.

SoxSlayer

Link to comment
Share on other sites

I'm thinking of starting a KSP mod similar to kOS in that it will allow you to write programs to control your crafts. I think kOS is a fantastic mod but I want something a little more "realistic". What I'm thinking of is something similar except it will behave more like an actual CPU or microcontroller.

Here is a list of features I'm thinking of as of now:

* you'll have to program it in assembly, opens up the possibility of a higher level language compiler

* access to various information/control modules will be with memory mapped I/O

* there will be different craft parts which will give you more processing power and memory, possibly even co-processors

* initial interrupt support, like a timer for multitasking like activities

I realize this mod won't be for everyone as it will require some degree of technical background. I'm looking to gauge the community's interest in something like this.

SoxSlayer

As a computer engineer, I have mixed feelings about this. I already have too look at code for work... not so sure I would want to do this for a game. Especially if it would have to be done in machine-level code.

Link to comment
Share on other sites

I think that being forced to program in assembly is a bit too far for KSP, but that's just my opinion. The game is just a bit too fanciful, even with some hardcore/realism mods installed, to go that far I think.

Only having assembly as an option would only be an initial step. Writing an assembler is much easier than writing a full fledged language parser. Later releases would include the option for writing programs in some sort of higher level language.

Link to comment
Share on other sites

If it had a good higher level compiler, I'd be in. I also like the idea of control being resource based.

Agreed on both points. It would be kinda cool if the electric draw was based on how much computation was being performed. For example if the CPU is sitting idle waiting on an event it would draw very little but if it was performing some number crunching calculations the power draw would increase.

Link to comment
Share on other sites

Other than kOS which clearly differs in it's goals, there's also ProgCom http://forum.kerbalspaceprogram.com/threads/24955-0-21-1-ProgCom-CPU-Emulator-V0-9

It's programmed in assembly and as far as I'm aware (which is not very far) there is a C compiler for it. Even if this still differs from your goals, it'd probably be helpful to talk to SimpleSimon. He's been too busy to update ProgCom, maybe yalls could team up

*this is the worst ninja I've ever fallen to...*

Link to comment
Share on other sites

I don't think that it would be convenient and efficient to make programmes for rockets in assembler. It s good for small programmes, but when it comes to adding some logic to your rocket it will become really hard work. High levl programming is more suitable for this. Actually russian 'Proton' rocket and some others use graphical programming language 'DRAKON'.

Link to comment
Share on other sites

Other than kOS which clearly differs in it's goals, there's also ProgCom http://forum.kerbalspaceprogram.com/threads/24955-0-21-1-ProgCom-CPU-Emulator-V0-9

This is exactly what I wanted to say. Although I really like that initiative, I think there is a reason that it never went as far as kOS. If you are going to do it, you need to set clear goals and a featureset (like a compiler). There has to be some central control over the prject. Otherwise it will end up as another ProgCom that did not make it.

For the moment I have enough to do with kOS, but when I am feeling more comfortable with that, chances are I want to get even more into the subject.

Link to comment
Share on other sites

Yikes...

The moment I read 'you'll have to program in assembly' my mind went: 'Oh god, why!?' in a Team Four Star Krillin voice.

Why, WHY would you inflict the torment that is Assembly on players? What cruel, sadistic thoughts swirl around in that black heart of yours to unleash such unspeakable evils upon the Kerbin Race? What madness possesses your soul to drive you to such horrors too unspeakable even for the Great Old Ones?! Think of the children! Think of the kittens! ... Actually. If you're that evil as to throw assembly at people, you've probably already scheduled your morning torture routine with your not-to-be-trusted-but-competent-enough-to-keep-alive right hand general... But I digress. =p

Second question: What do you have planned (or rather, just roadmapped) as an architecture concept for this 'Mikrokontroller'? I ask this because while getting all the CPU and chipset emulation working seems like a lofty goal in itself, it still runs into the problem of 'how does this translate from MC output to in-game commands?' How many inputs? How many outputs? What are the peripheral components this thing is to control? How do the peripherals control the vehicle they're attached to? What is the plan for an interface? In-game programming console? External editing? Programming with an actual external IDE? And how much processor overhead will the simulated processor need to operate?

Are you going for a truncated experience for players, or are you aiming for unleashing a full-on, bachelors level course of Microcontroller Chaos here? This rabbit hole is deep, and realism like this is... Well. The PIC18F8680 Microcontroller's spec sheet, as an example, is 500 pages long.

In short: What is the scope and scale of this microcontroller simulation/emulation? Because in all honesty, I don't think anyone has a real clear idea of what to think until they at least know that much about it.

Link to comment
Share on other sites

its not really hard to write up a fake cpu and assembler. i did a bytecode interpreter to extend the programming capability of an atmega328 microcontroller (to pretty much let me run code from anywhere, not just the flash, all be it with greatly limited performance).

2 things though. first off not many people have experiece with asm. so you may want to consider emulating a cpu that has existing compilers for various languages. its considerably easier to emulate an instruction set for an existing cpu than it is to write a c compiler for a custom one. the other thing is having a computer isnt much use if you cant interface it to the ship's systems. so you need to emulate some peripherals too. not sure if any of the programmable cpu mods do this (or do this enough). and id like to see one with an interface that other mods can use. for instance id love to be able to program infernal robotics, then i can write some ik code for big stompy mech action. or you could use rover wheels and a reaction wheel for self balancing vehicles. so exposing some kind of fake peripheral bus to other mods would be awesome.

Link to comment
Share on other sites

@ soxslayer: I know that, if your "microcontroller" already existed, I would certainly try it. I always feel a nasty attaction to things that seem overcomplex or plain difficult to make work right. Of course, I used ASM for some time, and that's a start.

However, I believe I will feel disappointed after running my first program. Ther reason is, you're going to emulate the real thing, and unless you are building that aside from KSP (which I don't think would then work ingame) that means the emulator would be awfully slow. If I use a microcontroller, it is for speed.

Actually, I would love if anybody could make a kind of speedy kOS (e.g., a version running some kind of "compiled program"). I have projects for quite complex subsystems, that can't perform correctly due to the time required by kOS to run their control program.

Link to comment
Share on other sites

I would be interested in this, specifically emulating peripheral control which kOS et al doesn't really do.

As others in this thread have said, a resource-based control system would be really cool.

Also, you should really consider designing the thing with remotetech compatibility in mind.

Link to comment
Share on other sites

I checked out DRAKON, and it looks like a really interesting programming language. Comprehensive, fairly easy to understand and visualize. It basically takes a block chart of an algorithm and runs it as an actual program. Perhaps this microcontroller could emulate that.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...