-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
53 lines (42 loc) · 2.24 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
This is Lua 5.2.4, released on 25 Feb 2015.
For installation instructions, license details, and
further information about Lua, see doc/readme.html.
===============================================================================
This version of Lua has been modified to work on the Sony PlayStation 1.
There are now only three platforms available for compilation:
- `psx`: This platform is used to compile Lua for the Sony PlayStation 1. This
will only generate a library file named "liblua.a". The binary footprint of
this library will be roughly 110kB.
- `psx-noparser`: This platform is used to compile Lua for the Sony PlayStation
1 without the parser. Only precompiled bytecode can be loaded by this version.
This will only generate a library file named "liblua-noparser.a". The binary
footprint of this library will be roughly 85kB.
- `host32`: This platform is used to compile Lua for a 32-bit host system. This
will generate the Lua interpreter (lua) and the lua compiler (luac). The
compiler should be able to generate bytecode that can be run on the Sony
PlayStation 1.
The following key differences exist between the original Lua 5.2.4 and this
version of Lua:
- The `os`, `io`, `math`, and `package` libraries have been removed. This means
the functions `luaL_execresult` and `luaL_fileresult` are now irrelevant, and
have been removed.
- The `luaL_loadfile` and `luaL_dofile` functions have been removed, as well
as their corresponding Lua functions `loadfile` and `dofile`.
- The interactive debugger has been removed from the `debug` library.
- Numbers are represented as 32-bits integers, so no floating point numbers
are available.
The libraries have exactly four required libc-style imports the user has to
somehow provide: `luaI_sprintf`, `luaI_realloc`, `luaI_free`, `memcpy`.
Aliasing these functions to the standard C library functions can be done by
using the following LDFLAGS toggles:
- `-Wl,--defsym,luaI_sprintf=sprintf`
- `-Wl,--defsym,luaI_realloc=realloc`
- `-Wl,--defsym,luaI_free=free`
Additionally, a few kernel functions are required from the A0 table, and will
be called using the typical jump to 0xa0 while setting the function number in
the T1 register:
- 03: write
- 13: setjmp
- 14: longjmp
- 3c: putchar
- 40: abort