Last active
April 18, 2024 22:36
-
-
Save Pokechu22/caa73242a5969ff5dc413177fcb7f516 to your computer and use it in GitHub Desktop.
Ghidra Starlet (Wii IOS) processor spec - place these files in Processors/ARM/data/languages
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@define ENDIAN "big" | |
@define T_VARIANT "" | |
@define VERSION_5 "" | |
@define VERSION_5E "" | |
@include "ARM.sinc" | |
# Hacky because we can't define a new token for bits 5-15 since sleigh doesn't | |
# allow adding new fields to the instrArm token | |
ioscallnum: value is c0507 & c0811 & c1212 & c1313 & c1414=0 & c1515=0 | |
[ value = (c0507 | c0811 << 3 | c1212 << 7 | c1313 << 8); ] | |
{ export *[const]:1 value; } | |
define pcodeop ios_syscall; | |
:iossyscall^COND ioscallnum is $(AMODE) & COND & c0004=0x10 & c1627=0x600 & ioscallnum | |
{ | |
build COND; | |
ios_syscall(ioscallnum); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.1" encoding="UTF-8"?> | |
<language_definitions> | |
<language processor="ARM" | |
endian="big" | |
size="32" | |
variant="Starlet" | |
version="1.0" | |
slafile="ARM_Starlet.sla" | |
processorspec="ARMt_v45.pspec" | |
manualindexfile="../manuals/ARM.idx" | |
id="ARM:BE:32:Starlet"> | |
<description>Starlet</description> | |
<compiler name="default" spec="ARM_v45.cspec" id="default"/> | |
</language> | |
</language_definitions> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!-- Allow conversion from regular arm to starlet. This is a noop. --> | |
<language_translation> | |
<from_language version="1">ARM:BE:32:v8</from_language> | |
<to_language version="1">ARM:BE:32:Starlet</to_language> | |
</language_translation> |
Ghidra also automatically generates it when you first use it.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Note: To generate
ARM_Starlet.sla
manually, run (on Linux x86-64):