Making a Virtual Machine with SourcePawn
https://bitbucket.org/assyrian/tf2-building-vm/src/
Hello to whoever reads this, I'm making a stack-based VM straight in sourcepawn. The entire purpose of this plugin is to create programmable engineer buildings for TF2 where knowledgeable or interested players could make their buildings do more than what they currently do. the Current Opcode list is... PHP Code:
|
Re: Making a Virtual Machine with SP
So... a VM on top of another VM?
|
Re: Making a Virtual Machine with SP
Quote:
|
Re: Making a Virtual Machine with SourcePawn
I forgot that there's a Stack datatype in the sourcemod lib which I should probably use to replace the stack in this MetaVM. I should also add registers to this VM and use the stack for function calls.
|
Re: Making a Virtual Machine with SourcePawn
there we go, upgraded the whole plugin to use data structures!
I used stringmap to make an opcode table, used the arraylist struct to hold all the tokens for the instruction set, and used arraystack to replace the int array stack. https://bitbucket.org/assyrian/tf2-b...ng/?at=default |
Re: Making a Virtual Machine with SourcePawn
You should make this VM capable of running Windows. Then put Windows on it, and then load a source engine game on THAT.
Great way to make the universe implode on itself. |
Re: Making a Virtual Machine with SourcePawn
Quote:
|
Re: Making a Virtual Machine with SourcePawn
Quote:
I mean, how else can u make the engineer buildings do custom things? |
Re: Making a Virtual Machine with SourcePawn
new update to this thing!
I changed the instructions to be a little bit more similar to x86 for familiarity. I made a cheap little tokenizer to actually split up text in a way that you can format better and still have it. the tokenizer can even tokenize the 0x0 style Hexadecimal values. tokenizer ignores spaces, tabs, commas, new lines, and carriage return. most importantly, this VM isn't just a stack machine either, it has both a useable stack and 8 registers the new instruction set is... PHP Code:
PHP Code:
PHP Code:
PHP Code:
https://bitbucket.org/assyrian/tf2-building-vm/src/ |
| All times are GMT -4. The time now is 22:33. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.