Skip to content

Instantly share code, notes, and snippets.

@blowfish64
blowfish64 / bwtest.sh
Created December 3, 2023 17:15 — forked from hackerb9/bwtest.sh
Busybox compatible simple speedtest that downloads a file to /dev/null. Useful for sshing into various routers and seeing where the bottleneck is.
#!/bin/sh
# Silly speed test just by downloading a file directly to /dev/null
# Useful on routers which only have busybox installed.
# ↄ⃝🄯 B9 2016, 2018, 2023. Creative Commons Zero.
# NOTA BENE: cachefly has worked for over a decade, however they may
# be getting tired of scripts like this. Starting February 2023, their
# 100mb.test file is empty and the 50mb.test file holds 100MB.
dotest() {
@blowfish64
blowfish64 / steps.md
Created July 28, 2023 16:28 — forked from wohali/steps.md
Multi-Function Tester TC1 flashing

Updating U4

  1. Unscrew the case via the 4 screws on the back.
  2. Desolder the positive lead of the rechargeable battery. This is necessary because the bootloader of U4 is only present immediately after power-on.
  3. Configure Tigard (or other USB-TTL device) as follows:
    1. VTGT switch to 3V3
    2. TX to P1 (left side of U4, clearly marked
    3. RX to P2 (just above P1)
    4. GND to GND (just below P1, unmarked)
    5. Prep VTGT to connect to VTGT (just above P2, unmarked, trace goes to pin 2 of U4)
#include <stdint.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
// This offset is only for UDNL modules in kHn unpacked PSBBN 0.32...
// Adjust if needed
#define DATA_OFFSET 0x1720
int psbbn_ioprp_decompress(uint8_t *a1, uint8_t *a2)
Symbol SCMD IRX export RPC command
sceCdReadClock 0x08 0x18 0x01
sceCdWriteClock 0x09 0x19 0x02
sceCdGetDiskType 0NA 0x0c 0x03
sceCdGetError 0NA 0x08 0x04
sceCdTrayReq 0NA 0x0e 0x05
sceCdRI 0x12 0x16 0x06
sceCdWI 0x13 0x17 0x07
sceCdReadNVM 0x0a 0x1a 0x08
sceCdWriteNVM 0x0b 0x1b 0x09

Here's a contest for OSDSYS/BIOS/ROM/Menu permissively licensed assets.
The voting page will go up once enough submissions are made.
The goal of this contest is to select the best assets for a brand new OSDSYS program, which will be launched from a Memory Card (using the exploited Memory Card Update feature of the original OSDSYS) or from a brand new ROM reimplementation.
All assets submitted must be licensed under a permissive license such as Apache, BSD, MIT, CC0, etc.
Please submit your own original works, not those copied or modified from the original ROM.
Feel free to submit assets in the format that you prefer.
Also, feel free to submit short descriptions for each asset that does not have a description. For icon/3D assets, try uploading in the PS2 icon format, but if you can't, upload the original project file along with the name of the software that you are using so I can take a crack at it.
For image assets, try uploading in the PNG format.
For audio assets, any format that is readable

OSDSYS image resource image information

The information in this documentation does not apply to the early Protokernel consoles which has a very different OSDSYS program.

The images stored in the ROM are in a compressed format, so decompress before use. The following is the implementation of the decompression routine: https://gist.github.com/uyjulian/14388e84b008a6433aa805f5d0436c87

The images stored in the ROM are raw image formats with no information attached, so the following table describes the extra information required to display the image.

| Filename | Size | Offset | Image format |

#include <stdint.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
uint32_t decompress_osdsys(uint8_t *src, uint8_t *dst)
{
uint32_t run = 0;
CDVDFSV RPC index CDVDMAN export index SCMD index SCMD index (hex) PCSX2 reference SCMDGeneral reference
40 110 33 0x21 sceCdWriteWakeUpTime sceCdWriteWakeUpTime
41 109 34 0x22 sceCdReadWakeUpTime sceCdReadWakeUpTime
42 148 39 0x27 N/A sceCdReadPS1BootParam
43 150 40 0x28 N/A sceCdSetFanProfile
44 152 03 0x03 N/A FurtherSubcommands
49 117 31 0x1f sceRemote2_7 sceRemote2_7
50 116 29 0x1d N/A N/A
53 120 37 0x25 N/A sceCdSetLEDsMode
56 128 38 0x26 N/A N/A
@blowfish64
blowfish64 / mmap.h
Created July 1, 2020 09:00 — forked from r-lyeh-archived/mmap.h
portable mmap()
#ifndef PORTABLE_MMAP_H
#define PORTABLE_MMAP_H
#ifdef _WIN32
/* mmap() replacement for Windows
*
* Author: Mike Frysinger <[email protected]>
* Placed into the public domain
*/
@blowfish64
blowfish64 / preprocessor_fun.h
Created March 5, 2020 09:58 — forked from aras-p/preprocessor_fun.h
Things to commit just before leaving your job
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,