This file contains 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
asar 1.90 | |
lorom | |
dpbase 0 | |
optimize dp always | |
optimize address ram | |
;;; RAM Variables | |
samus_collected_items = $7E09A4 |
This file contains 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
#!/usr/bin/env python3 | |
# | |
# Copyright (c) 2022 Yuri Kunde Schlesner (yuriks) | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to the following conditions: |
This file contains 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
# Search returns false positives if A isn't actually in ptrs | |
def create_search(f, table, label_prefix='.l'): | |
search_bits = len(table).bit_length() | |
def pad_label(s): | |
return (s + ':').ljust(len(label_prefix) + search_bits + 2) | |
def emit_search(prefix, sub_table): | |
f.write(pad_label(prefix)) | |
if len(sub_table) == 1: |
This file contains 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
mod parser; | |
// Actual range: 11 bits [0, 2048) | |
pub type TileIndex = u16; | |
#[derive(Debug)] | |
pub struct AnimatedTileFrame { | |
pub frames_wait: u8, | |
pub tile_index: TileIndex, | |
} |
This file contains 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
dpx = 0 | |
dpy = 0 | |
bx1 = 0 | |
bx2 = 180 | |
by1 = 0 | |
by2 = 909 | |
if 0: | |
px_s = -2 | |
py_s = 18 | |
dpx = -1 |
This file contains 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
mod decode; | |
use self::decode::DecodeInstruction; | |
use self::decode::DecodedArmInstruction; | |
use scheduler::GeneratorTask; | |
use scheduler::Task; | |
use system::AccessWidth; | |
use system::Bus; | |
use system::MemoryRequest; | |
use system::OperationType; |
This file contains 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
#![feature(macro_literal_matcher, min_const_fn)] | |
extern crate byteorder; | |
extern crate num; | |
extern crate sdl2; | |
use byteorder::ByteOrder; | |
use byteorder::LE; | |
use sdl2::event::Event; | |
use sdl2::keyboard::Scancode; |
This file contains 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
#include <3ds.h> | |
#include <citro3d.h> | |
#include <string.h> | |
#include "vshader_shbin.h" | |
#define CLEAR_COLOR 0x68B0D8FF | |
#define DISPLAY_TRANSFER_FLAGS \ | |
(GX_TRANSFER_FLIP_VERT(0) | GX_TRANSFER_OUT_TILED(0) | GX_TRANSFER_RAW_COPY(0) | \ | |
GX_TRANSFER_IN_FORMAT(GX_TRANSFER_FMT_RGBA8) | GX_TRANSFER_OUT_FORMAT(GX_TRANSFER_FMT_RGB8) | \ |
This file contains 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
void MapSharedPages(VMManager& address_space) { | |
auto cfg_mem_vma = address_space | |
.MapBackingMemory(Memory::CONFIG_MEMORY_VADDR, | |
reinterpret_cast<u8*>(&ConfigMem::config_mem), | |
Memory::CONFIG_MEMORY_SIZE, MemoryState::Shared) | |
.MoveFrom(); | |
address_space.Reprotect(cfg_mem_vma, VMAPermission::Read); | |
auto shared_page_vma = address_space | |
.MapBackingMemory(Memory::SHARED_PAGE_VADDR, |
This file contains 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
const TEST_DATA : &'static str = "Device: ID=1; Fw=16071801; Evt=2; Alarms: CoilRevesed=OFF; Power: Active=1753W; Reactive=279var; Appearent=403VA; Line: Current=7.35900021; Voltage=230.08V; Phase=-43,841rad; Peaks: 7.33199978;7.311999799999999;7.53000021;7.48400021;7.54300022;7.62900019;7.36499977;7.28599977;7.37200022;7.31899977; FFT Re: 9748;46;303;33;52;19;19;39;-455; FFT Img: 2712;6;-792;-59;1386;-19;963;33;462; UTC Time: 2016-10-4 16:47:50; hz: 49.87; WiFi Strength: -62; Dummy: 20"; | |
fn partition(s: &str) -> (&str, Option<char>, &str) { | |
const TOKEN_SEPARATORS : &'static [char] = &[':', '=', ';']; | |
let idx = s.find(TOKEN_SEPARATORS).unwrap_or(s.len()); | |
let (head, tail) = s.split_at(idx); | |
let mut tail_it = tail.chars(); | |
let separator = tail_it.next(); | |
(head, separator, tail_it.as_str()) |
NewerOlder