full refactor on linker and verifier to become more JVM-like
This commit is contained in:
@@ -249,11 +249,39 @@ impl Syscall {
|
||||
|
||||
pub fn results_count(&self) -> usize {
|
||||
match self {
|
||||
// --- System ---
|
||||
Self::SystemHasCart => 1,
|
||||
Self::SystemRunCart => 0,
|
||||
|
||||
// --- GFX (void) ---
|
||||
Self::GfxClear => 0,
|
||||
Self::GfxFillRect => 0,
|
||||
Self::GfxDrawLine => 0,
|
||||
Self::GfxDrawCircle => 0,
|
||||
Self::GfxDrawDisc => 0,
|
||||
Self::GfxDrawSquare => 0,
|
||||
Self::GfxSetSprite => 0,
|
||||
Self::GfxDrawText => 0,
|
||||
Self::GfxClear565 => 0,
|
||||
|
||||
// --- Input (scalar/snapshots) ---
|
||||
Self::InputGetPad => 1,
|
||||
Self::InputGetPadPressed => 1,
|
||||
Self::InputGetPadReleased => 1,
|
||||
Self::InputGetPadHold => 1,
|
||||
Self::InputPadSnapshot => 48,
|
||||
Self::InputTouchSnapshot => 6,
|
||||
// Touch finger and Pad per-button services return a Button (4 slots)
|
||||
Self::TouchGetFinger => 4,
|
||||
|
||||
// --- Touch (scalars/struct) ---
|
||||
Self::TouchGetX => 1,
|
||||
Self::TouchGetY => 1,
|
||||
Self::TouchIsDown => 1,
|
||||
Self::TouchIsPressed => 1,
|
||||
Self::TouchIsReleased => 1,
|
||||
Self::TouchGetHold => 1,
|
||||
Self::TouchGetFinger => 4, // Button struct (4 slots)
|
||||
|
||||
// --- Pad (per-button struct: 4 slots) ---
|
||||
Self::PadGetUp
|
||||
| Self::PadGetDown
|
||||
| Self::PadGetLeft
|
||||
@@ -266,7 +294,30 @@ impl Syscall {
|
||||
| Self::PadGetR
|
||||
| Self::PadGetStart
|
||||
| Self::PadGetSelect => 4,
|
||||
_ => 1,
|
||||
|
||||
// --- Audio (void) ---
|
||||
Self::AudioPlaySample => 0,
|
||||
Self::AudioPlay => 0,
|
||||
|
||||
// --- FS ---
|
||||
Self::FsOpen => 1,
|
||||
Self::FsRead => 1, // bytes read
|
||||
Self::FsWrite => 1, // bytes written
|
||||
Self::FsClose => 0,
|
||||
Self::FsListDir => 1, // entries count/handle (TBD)
|
||||
Self::FsExists => 1,
|
||||
Self::FsDelete => 0,
|
||||
|
||||
// --- Log (void) ---
|
||||
Self::LogWrite | Self::LogWriteTag => 0,
|
||||
|
||||
// --- Asset/Bank (conservador) ---
|
||||
Self::AssetLoad => 1,
|
||||
Self::AssetStatus => 1,
|
||||
Self::AssetCommit => 0,
|
||||
Self::AssetCancel => 0,
|
||||
Self::BankInfo => 1,
|
||||
Self::BankSlotInfo => 1,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user