Raised This Month: $8 Target: $400

Sourcemod Info Help

Post New Thread Reply   
Thread Tools Display Modes
Author Message
Join Date: Sep 2010
Old 05-02-2017 , 16:53   Sourcemod Info Help
Reply With Quote #1

So I had an idea for something to code over the Summer because I have a few ideas in my head, but no clue which one I actually wanna dedicate my new-found time to.

One of my ideas involves playing around with some SM language related stuff.
Does anyone know where I could find documentation on the .smx file format and documentation on the Sourcemod VM instruction set?

Or is my only option to go through the source code to figure it all out myself?

Last edited by Chief149; 05-02-2017 at 16:55.
Chief149 is offline
FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren
Join Date: Feb 2106
Old 05-02-2017 , 21:45   Re: Sourcemod Info Help
Reply With Quote #2

There isn't really documentation. The upstream Pawn docs have some information about the instruction set in this document. However, SourcePawn forked off long ago and our VM will not handle instructions we know our compiler won't generate.

What are you looking to do?
Fyren is offline
Join Date: Sep 2010
Old 05-02-2017 , 21:51   Re: Sourcemod Info Help
Reply With Quote #3

I read up on Bailopans blog. Found a couple of posts from 2007 involving the structure of .smx files, and I was able to get some info from looking at the source code, but I wasn't able to get a complete picture.

Additionally, I found a bunch of instructions from the Sourcemod header files, but not the corresponding opcodes and bit layouts for the VM instructions. Also some of the instructions weren't self-explanatory by name.

I was thinking of writing a compiler for Sourcemod that rethinks how plugins are developed. I would give details, but I don't even know all of them myself.

I have multiple ideas, but I haven't been investing myself into any of them to a huge extent because I'm figuring out which ideas to pursue.
Chief149 is offline
Join Date: Jan 2004
Old 05-03-2017 , 00:57   Re: Sourcemod Info Help
Reply With Quote #4

The file format is documented in smx-headers.h, smx-v1-opcodes.h, and smx-v1.h here: https://github.com/alliedmodders/sou...er/include/smx

There's a reference implementation of the VM in interpreter.cpp.

We have another repo, "smxtools" (should probably be merged into the SP repo): https://github.com/alliedmodders/smxtools

It's basically a C# implementation of everything but the VM, and it's a bit easier to read than the C++ code.
BAILOPAN is offline
Join Date: Sep 2010
Old 05-03-2017 , 14:04   Re: Sourcemod Info Help
Reply With Quote #5

Personally I wouldn't merge the two. If one is in C# and the other is C++ I'd keep them separate.
Chief149 is offline

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -4. The time now is 13:26.

Powered by vBulletin®
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Theme made by Freecode