-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
x64 branch support? #50
Comments
I guess me or @nosoop will give it a go soon™️ |
It's not just a gamedata change. Once that blocker is resolved it's a matter of adding |
NotnHeavy/SM-Address64 now exists so I believe the memory manipulation side of things are covered. I'm not sure if SDKTools is currently at the point where it'll take 64-bit pointers for raw calls, so there's likely still a ways to go. |
Has anyone made any progress on this? This extension doesn't seem to have had any testing https://github.com/NotnHeavy/SM-Address64 done. It tries to return int64_t (a 2 integer array) which isn't legal in sourcepawn as far as I can tell. But in theory it should be all that is needed to fix tf2attributes. No idea if there are going to be any official replacements and if we should just wait for that instead. |
Never mind you also need my modifications to sdktools here. I introduce a new type called SDKType_Pointer which is a an array of 2 ints. You can also use an enum struct that has 2 ints. Should be backwards compatible with 32 bits, sdktools will only use the first int and ignore the 2nd one. Usage is as follows. It appears to work but everything so far.
|
Made my own 64 bit loadaddress extension. The one from NotnHeavy does not even use legal sourcepawn nor will it load in 32 bits. API here, should be self explanatory. https://github.com/skial-com/port64/blob/main/sourcepawn/port64.inc Linux binaries available. |
Wait, I thought NotnHeavy's was set up to work in both 64bit and 32bit environments; does it make some bad assumptions that break that? Either way, I'll take a look at a port64 impl. Ideally port64's impl is close to what will eventually show up in SM natively, but I'm not holding my breath on that. |
It has an assert so it crashes if it is loaded on 32 bits. And it tries to return a 64 bit enum struct which isn't legal sourcepawn. |
I think there's a chance that 32 bit servers will be removed in the next month or two. It doesn't seem like anyone else is thinking about this possibility and everything is being done super slowly. This is the last thing we use that hasn't ported to 64 bits. |
I feel like this is the standard for SM mainline development... |
Port64's StoreToAddress will crash servers when patching code segments as it's missing SetMemAccess adjustments, otherwise great work!
|
The assert wasn't well-thought out to be honest. As for the "illegal SourcePawn code", I was working on the assumption that native enum struct parameter code would eventually be implemented (I was having some conversation with Kenzzer a while back I think in the AlliedModders Discord server and he made a point about having to re-write code numerous times, although to be fair this was a quick project I put together and called it a day anyway and it's probably not remotely close to what would be future SourceMod natives). I figured I would get a few looks anyway, I think the reason why it's not natively supported is because there's a lack of API for transferring enum structs and so one plugin could have one enum struct definition while another could have a different definition - this wasn't something I thought that should've come up as a massive concern so I just went with it. I suppose whenever I've done SourceMod stuff though, they were always super hacky. I suppose Port64 seems more ideal so I would probably recommend using it - again, my repo was pretty quickly thought and just kind of put together quickly. |
@NotnHeavy I'm not passing any judgement on you for your extension not working, I'm just pointing out that it won't work without a significant change to sourcepawn while we're looking for solutions that work right now. I just wanted to be prepared for the possibility that valve deletes the 32 bit server with little to no warning one day when I'm too busy to work on it, leaving all our servers down for weeks. As someone that runs a large community having our servers down that long means losing a lot of players and having to pay huge server costs out of pocket. I've managed to port just about everything save for ff2 (which is too much of a hassle) and deathrun neu (which can be downgraded to the vsh version), so I don't have to worry about this anymore. I am accepting any pull requests if you want to add that in. Make it default to not changing memory protection as it is relatively slow. I'm currently too busy to work on any of this stuff right now and I'm basically already prepared for any sudden switch to 64 bit. |
@bottiger1 That's fair. I ended up correcting some of the issues in my repo yesterday (I forgot to send a reply here) so that it should now support 32-bit SourceMod as well, rather than just throw an assert, so thank you for these reports. Good luck with maintaining your servers! (I take it that you're a key figure in Skial.) |
Hi, I noticed you created a branch here: https://github.com/skial-com/tf2attributes/tree/port64 And in this version it seems there is some ext called: ctf2attributes.ext I can't seem to find this anywhere. Would it be possible to release this publically if it does fix TF2Attributes for 64bit? Thanks for your time and effort. |
It isn't something I want to release because it only ports the few functions we use and it will crash if you use anything else. I'd rather people focus on porting this plugin. |
With the release of the x64 TF2 beta I was wondering if there was any chances of the gamedata being updated to support it.
From my testing in game (and from uploading the server binaries on https://asherkin.github.io/vtable/), the offsets seem to be the same, but the signatures have changed.
The text was updated successfully, but these errors were encountered: