Giter Club home page Giter Club logo

pawn-3.2-plus's Introduction

Pawn 3.2(+)

This is a modified version of the Pawn 3.2 toolkit by ITB CompuPhase.

The main goal of this project is to provide an improved version of Pawn 3.2 with changes made to both the compiler and the runtime.

The codebase is based off of the Community fork of Pawn 3.2 (also known as "Pawn 3.10") which is aimed at fixing and adding new features to the compiler for SA-MP. This project, in turn, is focused on improvement of the runtime components - this includes bugfixes and backporting functionality from Pawn 3.3, as well as adding completely new features (such as much more thorough bytecode verification and a new unified interpreter core).

Changes

See changes.md for the list of notable changes.

Compiling

Building is done using CMake. The CMakeLists.txt file is located in the root directory of this repository and covers both the interpreter and (optionally) the compiler.
Options:

Option name Description Default value
PAWN_BUILD_PAWNCC Build Pawn compiler ON
PAWN_BUILD_PAWNRUN Build the example run-time program and the debugger ON
PAWN_USE_64BIT_CELLS Use 64-bit cells (uses 32-bit cells otherwise) OFF
PAWN_USE_NEW_AMXEXEC Use the new interpreter core ON
PAWN_AMX_EXTS_STATIC Build AMX extension modules as static libraries ON
PAWN_AMX_EXT_<name> Allows to enable/disable specific extension modules ON
PAWN_AMX_EXT_CONSOLE_IDLE Enable @keypressed() callback in extension module Console ON
PAWN_AMX_EXT_TIME_IDLE Enable @timer() callback in extension module Time ON

If you want to embed Pawn into your project, just include the root directory of this repository as a subdirectory in your project's CMake script.

License

The project is licensed under the zlib license, with small portions of code released under other licenses that don't require binary attribution. See file license.txt for details.

pawn-3.2-plus's People

Contributors

agraber avatar amyrahmady avatar daniel-cortez avatar gitter-badger avatar maddinat0r avatar misiur avatar mschnitzer avatar oscar-broman avatar southclaws avatar spacemud avatar sysadminjeroen avatar vvwvv avatar y-less avatar yashassamaga avatar zeex avatar ziggi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

pawn-3.2-plus's Issues

Memory mapping

Proposal/Question

Ever since I saw your improvements to the runtime, specifically the address checking, I wondered, whether you would consider adding/pulling memory-mapping to the runtime. The way I imagine it could work is, that when an instruction gets invalid address, it would first check, whether it is a mapped address before returning an error.

So for example, the upper 1GB of the amx address space could be used for mapping. So the mapping code would first chceck the two most significant bits and if they are not 11, the address is not in the upper 1 GB. So it would return an error.

Otherwise it would check the third most significant bit, if it was 0, it would use segmentation. So it would strip the three most significant bits from the amx address, compare it to the size of the mapped memory and if it is lower, it would add base pointer and use that address as physical adress.

If the third most significant bit was 1, it would use paging. It would use pages up to 64 kB large, allowing for 8192 pages. Each page would have 8 byte entry in its page table. 4 bytes would be the base address, 2 bytes would be flags and 2 bytes would be the size of the page. So the page table would take up 64 kB. 13 most significant bits (exluding the 3) would be the number of the page in the page table, the remaining 16 bits would be offset from the base of the page.

This would help with a lot of functionality, such as dynamic memory, shared memory, allowing better passing of arguments between amx files (instead of copying an array/string, you would temporarily map the array to the other amx), etc.

The flags would at least contain read permission, write permission, execute permission and possibly more advanced stuff, such as copy-on-write. They could also contain technical information, such as if this is the first page in a mapping.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.