First commit
This commit is contained in:
commit
d5efb85861
|
@ -0,0 +1,6 @@
|
|||
mov.l syscall_number, r0 # Store the syscall ID in r0
|
||||
mov.l do_syscall, r2 # Set r2 to the syscall function
|
||||
jmp @r2 # jump to r2 (syscall)
|
||||
nop # delayed jump so do nothing
|
||||
.align 4 # do_syscall is already aligned but I prefered
|
||||
do_syscall: .long 0x80010070
|
Binary file not shown.
|
@ -0,0 +1,31 @@
|
|||
# Index
|
||||
|
||||
`main.c :`
|
||||
```c
|
||||
int main(void)
|
||||
{
|
||||
printf("Hello welcome to Lailouezzz CASIO documentation ! :)");
|
||||
return;
|
||||
}
|
||||
```
|
||||
|
||||
#####################################
|
||||
|
||||
`gcc main.cpp -o welcome`
|
||||
|
||||
`./welcome`
|
||||
|
||||
-------------------------------------
|
||||
|
||||
## Hello welcome to Lailouezzz CASIO documentation ! :)
|
||||
|
||||
- [All files (ressources)](files/)
|
||||
- (Section being written) : [OSRECOVER Protocol](osrecover.md)
|
||||
- (Section being written) : [Syscalls (FX-9860g)](syscalls_fx9860g.md)
|
||||
|
||||
-------------------------------------
|
||||
|
||||
### Download document as pdf
|
||||
|
||||
- Download link <a href="files/doc.pdf" download>here</a>.
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
# OSRECOVER.sh4 ([simlo](/simlo/)) Documentation
|
||||
|
||||
In this section I describe the best that I can the osrecover.sh4 protocol.
|
||||
|
||||
-------------------------------------
|
||||
|
||||
## Downloads
|
||||
|
||||
You can download osrecover.sh4 {{downloadlink("here", "files/osrecover.sh4")}}.
|
|
@ -0,0 +1,20 @@
|
|||
# System info syscalls
|
||||
|
||||
Description explaination of some system info syscalls.
|
||||
|
||||
## Syscall 0x0178 : char * GetProductID()
|
||||
|
||||
### Return
|
||||
|
||||
return the product ID serie (pointer to a string of 8 `char` ended by `0xFF`)
|
||||
|
||||
0 if the product ID is not found.
|
||||
|
||||
### Example
|
||||
|
||||
TODO
|
||||
|
||||
----------
|
||||
|
||||
## Syscall 0x02ED : void GetProtocolVersion(char * out_str)
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
# Some FX-9860g syscalls
|
||||
|
||||
## How to call a syscall ?
|
||||
|
||||
The calling convention to access the system calls (syscall), is to
|
||||
jump to 0x80010070 with the syscall number in r0 :
|
||||
|
||||
{{includecode("files/code/do_syscall.S", "asm")}}
|
||||
|
||||
-------------------------------------------------
|
||||
|
||||
## Syscalls table
|
||||
|
||||
| Name | | | | ID |
|
||||
| :------------------------------------------------------------------------------------------- | --- | --- | --- | ------ |
|
||||
| [char * GetProductID()](syscalls/system_info.md) | | | | 0x0178 |
|
||||
| [void GetProtocolVersion(char * out_str)](syscalls/system_info.md) | | | | 0x02ED |
|
||||
| [void System_GetOSVersion(char * version) (simlo)](../../simlo/chm/v20/fx_legacy_System.HTM) | | | | 0x02EE |
|
||||
| [void GetSystemInfo(char * out_str)](syscalls/system_info.md) | | | | 0x02EF |
|
||||
| [void GetEnvironmentID(char * out_str)](syscalls/system_info.md) | | | | 0x02F5 |
|
||||
| [void GetCpuID(char * out_str)](syscalls/system_info.md) | | | | 0x02F6 |
|
||||
| void PrintFull(ID1, ID2, ID3) | | | | 0x0A51 |
|
|
@ -0,0 +1,50 @@
|
|||
import html
|
||||
import os
|
||||
|
||||
|
||||
def declare_variables(variables, macro):
|
||||
@macro
|
||||
def includecode(fn: str, flavor: str = ""):
|
||||
"""
|
||||
Load code from a file and save as a preformatted code block.
|
||||
If a flavor is specified, it's passed in as a hint for syntax highlighters.
|
||||
|
||||
Example usage in markdown:
|
||||
|
||||
{{includecode("code/myfile.py", "python")}}
|
||||
|
||||
"""
|
||||
docs_dir = variables.get("docs_dir", "docs")
|
||||
fn = os.path.abspath(os.path.join(docs_dir, fn))
|
||||
if not os.path.exists(fn):
|
||||
return f"""<b>File not found: {fn}</b>"""
|
||||
with open(fn, "r") as f:
|
||||
return (
|
||||
f"""```{flavor}\n{f.read()}\n```"""
|
||||
)
|
||||
|
||||
@macro
|
||||
def includemd(fn: str):
|
||||
"""
|
||||
Load markdown from files external to the mkdocs root path.
|
||||
Example usage in markdown:
|
||||
|
||||
{{includemd("../../README.md")}}
|
||||
|
||||
"""
|
||||
docs_dir = variables.get("docs_dir", "docs")
|
||||
fn = os.path.abspath(os.path.join(docs_dir, fn))
|
||||
if not os.path.exists(fn):
|
||||
return f"""<b>File not found: {fn}</b>"""
|
||||
with open(fn, "r") as f:
|
||||
return f.read()
|
||||
|
||||
@macro
|
||||
def downloadlink(contain: str, url: str):
|
||||
"""
|
||||
Create a download link example :
|
||||
|
||||
{{downloadlink("Download readme", "../../README.md")}}
|
||||
|
||||
"""
|
||||
return f"""<a href={url} download>{contain}</a>"""
|
|
@ -0,0 +1,22 @@
|
|||
site_name: Lailouezzz CASIO documentation
|
||||
nav:
|
||||
- Index: index.md
|
||||
- OSRECOVER Protocol: osrecover.md
|
||||
- Syscalls (FX-9860g):
|
||||
- syscalls_fx9860g.md
|
||||
- syscalls/system_info.md
|
||||
|
||||
theme:
|
||||
name: 'material'
|
||||
markdown_extensions:
|
||||
- codehilite
|
||||
|
||||
|
||||
plugins:
|
||||
- search
|
||||
- pdf-export:
|
||||
media_type: print
|
||||
combined: true
|
||||
combined_output_path: files/doc.pdf
|
||||
- macros:
|
||||
module_name: macros_def
|
Loading…
Reference in New Issue