Skip to content

Instantly share code, notes, and snippets.

View sajattack's full-sized avatar

Paul Sajna sajattack

View GitHub Profile
found match: 844AF6BD = sceSysregDeleteReincarnatedDevctl
found match: 584AD989 = sceSysregMp3HandleTranslationSendmsg
found match: 136E8F5A = sceSysregPositionAA3HalfwayCompressed
found match: 55B18B84 = sceSysregYDmaCreate
found match: 136E8F5A = sceSysregAAttachEVOLNetconf
found match: 136E8F5A = sceSysregAGlobalDescSHA1
found match: 7BDF0556 = sceSysregATicksHJoin
found match: 2112E686 = sceSysregAA3DataCallbacksNMt19937
found match: 0EA487FA = sceSysregAA3DataChPkgDetect
found match: 7B9E9A53 = sceSysregAA3DataRotatePrependJoin
@sajattack
sajattack / nid-collisions.txt
Created October 7, 2020 09:03
NID collisions
found match: 2458B6AC = sceSysregAddressSwitchGPO
found match: 1561BCD2 = sceSysregAsHandlersFormatted
found match: C9585F8E = sceSysregBindReferAccept
found match: 20B1D0A9 = sceSysregGetSkipDigest
found match: C6C75585 = sceSysregGetsockoptParamUMD
found match: B6296512 = sceSysregMkdirReplaceReincarnated
found match: 85B74FDA = sceSysregPutcharPrngenWait
found match: 15786501 = sceSysregSha1BatteryInfo
#![no_std]
#![no_main]
extern crate metro_m4 as hal;
extern crate cortex_m;
extern crate panic_halt;
extern crate usb_device;
extern crate usbd_serial;
use hal::clock::GenericClockController;
fn draw_iter<T>(&mut self, pixels: T) -> Result<(), Self::Error>
where T: IntoIterator<Item = Pixel<Rgb888>> {
let mut ptr = self.vram_base as *mut u32;
let mut iter = pixels.into_iter();
let Pixel(coord, _color) = iter.next().unwrap();
unsafe {
if let Ok((x @ 0..=SCREEN_WIDTH, y @ 0..=SCREEN_HEIGHT)) = coord.try_into() {
ptr = (self.vram_base as *mut u32)
.offset(x as isize)
.offset((y * BUF_WIDTH) as isize);
@sajattack
sajattack / bindings.rs
Created May 11, 2020 17:38
PSPSDK Rust Bindings
/* automatically generated by rust-bindgen */
pub const _PSPTYPES_H_: u32 = 1;
pub const __have_longlong64: u32 = 1;
pub const __have_long64: u32 = 1;
pub const __int8_t_defined: u32 = 1;
pub const __int_least8_t_defined: u32 = 1;
pub const __int16_t_defined: u32 = 1;
pub const __int_least16_t_defined: u32 = 1;
pub const __int32_t_defined: u32 = 1;
@sajattack
sajattack / neopixel_rainbow.rs
Created March 10, 2019 22:11
neopixel rainbow using timers on trellis_m4
#![no_std]
#![no_main]
extern crate cortex_m;
extern crate panic_halt;
extern crate smart_leds;
extern crate trellis_m4 as hal;
extern crate ws2812_timer_delay as ws2812;
use hal::prelude::*;
@sajattack
sajattack / sid.rs
Last active March 5, 2019 17:40
siddacious' requested demo
#![no_std]
#![no_main]
extern crate cortex_m;
extern crate trellis_m4 as hal;
extern crate panic_halt;
extern crate smart_leds;
extern crate smart_leds_trait;
extern crate ws2812_timer_delay as ws2812;
extern crate embedded_hal;
@sajattack
sajattack / fail.txt
Created February 28, 2019 01:20
#define hell
[paul@P50-Arch python]$ rg "define SIZEOF_LONG" build
build/pyconfig.h
1360:#define SIZEOF_LONG 8
1363:#define SIZEOF_LONG_DOUBLE 16
1366:#define SIZEOF_LONG_LONG 8
build/configure
8567:#define SIZEOF_LONG $ac_cv_sizeof_long
8600:#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8924:#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
@sajattack
sajattack / serial.rs
Created February 18, 2019 13:20
bitbang uart rx
impl <TX, RX, Delay> serial::Read<u8> for Serial <TX, RX, Delay>
where
TX: OutputPin,
RX: InputPin,
Delay: DelayUs<u32>
{
type Error = ();
fn read(&mut self) -> nb::Result<u8, Self::Error> {
@sajattack
sajattack / error_log.txt
Created February 6, 2019 19:18
celeste crash
Celeste Error Log
==========================================
Ver 1.2.6.1
02/06/2019 11:10:35
System.Exception: FMOD Failed: ERR_OUTPUT_INIT
at Celeste.Audio.CheckFmod (FMOD.RESULT result) [0x00019] in <e6396995e64e4637a8dd70ee94d7253d>:0
at Celeste.Audio.Init () [0x00039] in <e6396995e64e4637a8dd70ee94d7253d>:0
at Celeste.GameLoader.LoadThread () [0x0002b] in <e6396995e64e4637a8dd70ee94d7253d>:0
at Celeste.RunThread.RunThreadWithLogging (System.Action method) [0x00002] in <e6396995e64e4637a8dd70ee94d7253d>:0