Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@Ilgrim
Ilgrim / amstrad_cpc.md
Created April 27, 2021 14:58 — forked from neuro-sys/amstrad_cpc.md
Amstrad CPC 464/6128 Programming Resources

Amstrad CPC 464/6128 Programming Resources

A collection of information gathered from various resources into a single document to be able to program for Amstrad CPC 464/6128 machines.

Hardware

CPC has the following components on the mainboard:

@Ilgrim
Ilgrim / gist:92eaa13c3f206ca9172815d17caccb62
Created February 11, 2024 18:43 — forked from TobiasWooldridge/gist:22f0cdca75190b9a473f
How to Unbrick a Kindle Paperwhite

How to unbrick an Amazon Kindle Paperwhite™

This guide instructs you in how to unbrick an Amazon Kindle Paperwhite. The consequences of following it are your own responsibility. This method (opening the Kindle and using the serial interface) should be a last resort and should only be considered if other methods fail

The Guide

  1. Pry open Kindle using a prying tool
  2. Unscrew the screen and remove it from the base. Note that there's a screw hidden under the adhesive at the top in the middle
  3. Solder tin wire to serial ports on the bottom
  4. Attach tin wire to USB TTY device (order is ground, RX, TX, from the kindle's perspective, where GND is the smallest pad) and plug USB TTY device into your computer
  5. Open Putty on your computer in serial mode, with the serial port specified as your USB device and baud configured to 115200
@Ilgrim
Ilgrim / mini-stc-t12-menu.md
Created January 15, 2024 02:23 — forked from rockavoldy/mini-stc-t12-menu.md
Menu P00-P11 on Mini STC T12 Controller

DIY T12 Soldering Station with Mini STC T12 Controller

So i have build myself an soldering station to replace my Dekko "Ol' reliable" 40w hand solder, it works and do the job, but it takes forever to meet the heat temperature. So i build a new one with around 300k IDR

The controller is Mini STC T12 rev 2.1 that can be found from ShopeeID around 130k IDR, or on aliexpress at around 8 USD. I pick the LED version since it's way more cheaper than OLED and STM32 edition, and i don't need any features other than variable temperature and standby mode.

For the handle, i got it from Tokopedia at around 130k IDR. This handle is for Hakko FX9501, but i only need the handle and the pin inside to connect with the T12 solder tips.

For the tips, i got it from aliexpress too, find cheap tips and pay it along with the voucher, so i just need to pay around 4 USD for 3pcs T12 soldering tips.

@Ilgrim
Ilgrim / stc15f_prog.c
Created January 13, 2024 23:16 — forked from zerog2k/stc15f_prog.c
stc mcu programmer sample code from stc website for stc15f series, with some google translate ;)
/*---------------------------------------------------------------------*/
/* --- STC MCU Limited ------------------------------------------------*/
/* --- To be downloaded from the ISP chip (limited STC15 series), for example using the main chip -----------------*/
/* --- Mobile: (86)13922805190 ----------------------------------------*/
/* --- Fax: 86-755-82905966 -------------------------------------------*/
/* --- Tel: 86-755-82948412 -------------------------------------------*/
/* --- Web: www.STCMCU.com --------------------------------------------*/
/* If you want to use this code in the program, in the program, using the information and procedures specified macro crystal technology */
/* If you want to quote this code in the article, please indicate in the article the use of information technology and procedures Wang Jing */
/*---------------------------------------------------------------------*/
@Ilgrim
Ilgrim / Blackmagicprobe_compile.md
Created January 12, 2024 00:32 — forked from micooke/Blackmagicprobe_compile.md
blackmagic probe binaries for stlink v2 baite module
## Tested the blue pill on 10/09/2018
## 1. install pre-requisites
sudo add-apt-repository ppa:team-gcc-arm-embedded/ppa
sudo apt update
sudo apt install gcc-arm-embedded
# If it reports error message of conflict to gcc-arm-none-eabi, which is likely if upgrading from 4.x to 5+, please uninstall it first with:
# "sudo apt-get remove gcc-arm-none-eabi"

sudo apt -y install lib32z1 lib32ncurses5 lib32bz2-1.0 

This is a collection of code snippets for various features on the STM8S family microcontrollers (specifically the STM8S003F3). These are written against the STM8S/A SPL headers and compiled using SDCC.

Some of this controller's functions aren't particularly intuitive to program, so I'm dumping samples for future reference here. These are based on the STM8S documentation:

Run at 16MHz

@Ilgrim
Ilgrim / sdl2_game_loop.c
Created September 25, 2023 21:17 — forked from velipso/sdl2_game_loop.c
SDL2 game loop forcing a certain frame rate
//////////////////////////////////////////////////
//
// EDIT: Warning, this doesn't seem to work well.
//
//////////////////////////////////////////////////
@Ilgrim
Ilgrim / rsacrypto.go
Created September 14, 2023 11:03 — forked from dadencukillia/rsacrypto.go
Golang rsa module with chunk encryption and decryption
// Adapted from: https://gist.github.com/miguelmota/3ea9286bd1d3c2a985b67cac4ba2130a
package rsacrypto
import (
"crypto/rand"
"crypto/rsa"
"crypto/sha512"
"crypto/x509"
"fmt"
@Ilgrim
Ilgrim / MoveSprite.asm
Created August 14, 2023 16:23 — forked from biomood/MoveSprite.asm
A C64 example in assembly that moves a sprite up/down/left/right
;*************************************************
;* Create and move a simple sprite x,y *
;*************************************************
processor 6502
org $1000
;helpful labels
CLEAR = $E544
GETIN = $FFE4
@Ilgrim
Ilgrim / mount_qcow2.md
Created August 10, 2023 12:53 — forked from shamil/mount_qcow2.md
How to mount a qcow2 disk image

How to mount a qcow2 disk image

This is a quick guide to mounting a qcow2 disk images on your host server. This is useful to reset passwords, edit files, or recover something without the virtual machine running.

Step 1 - Enable NBD on the Host

modprobe nbd max_part=8