Skip to content

Instantly share code, notes, and snippets.

View gammy's full-sized avatar

gammy gammy

  • Stockholm
View GitHub Profile
for (uint32_t i = 0; i < byte_count; i += 2)
{
uint8_t offset = i / 2;
unsigned char data_lo = rawdata[i + 1];
unsigned char data_hi = rawdata[i];
interimvalue[offset] = (1 << 0 ) * ((data_hi >> 0) & 0x1) +
(1 << 1 ) * ((data_hi >> 1) & 0x1) +
(1 << 2 ) * ((data_hi >> 2) & 0x1) +
(1 << 3 ) * ((data_hi >> 3) & 0x1) +
gammy@hypatia:~/Downloads/wiimednafen/src/0.1.1/src/wii$ grep -ri --after-context 3 "^BOOL wii_start_snapshot" .; grep -ri MDFNI_LoadState .
./wii_mednafen_snapshot.cpp:BOOL wii_start_snapshot()
./wii_mednafen_snapshot.cpp-{
./wii_mednafen_snapshot.cpp- BOOL succeeded = MDFNI_LoadState( NULL, NULL );
./wii_mednafen_snapshot.cpp- if( !succeeded )
./wii_mednafen_snapshot.cpp: BOOL succeeded = MDFNI_LoadState( NULL, NULL );
./wii_mednafen_emulation.cpp: succeeded = MDFNI_LoadState( savefile, NULL );
gammy@hypatia:~/Downloads/wiimednafen/src/0.1.1/src/wii$
root@opium:/ram/var/log # iptables --list-rules
-P INPUT DROP
-P FORWARD DROP
-P OUTPUT ACCEPT
-N ACCOUNT_FORWARD_IN
-N ACCOUNT_FORWARD_OUT
-N ACCOUNT_INPUT
-N ACCOUNT_OUTPUT
-N ADRFILTERFORWARD
-N ADRFILTERINPUT
85.229.138.143 DST
90.231.43.237 DST
109.102.28.70 DST
83.157.85.245 DST
90.231.43.237 DST
80.213.56.144 DST
109.69.115.239 DST
77.123.183.77 DST
69.207.218.103 DST
69.207.218.103 DST
@gammy
gammy / patchver.pl
Last active August 29, 2015 13:56
# A script for patching small strings within intel hex files. # Specifically written to replace the existing serial number in # the SGS program memory. # # There are some limitations: # - All input and output is buffered, so it needs some memory # - The strings must be of equal length # - The string may not be longer than 32 bytes because we onl…
#!/usr/bin/env perl
# A script for patching small strings within intel hex files.
# Specifically written to replace the existing serial number in
# the SGS program memory.
#
# There are some limitations:
# - All input and output is buffered, so it needs some memory
# - The strings must be of equal length
# - The string may not be longer than 32 bytes because we only
@gammy
gammy / gist:9122957
Last active August 29, 2015 13:56
First noncrashing attempt at loading a 0.9.32-WIP savestate on 80% 0.9.17 codebase (hacked with state loader from 0.9.32-1-WIP)
resizing to: w:256x232, ratio:1.250000,1.000000, rect->w:800, rect->h:480
Loaded save state variable: BaseRAM
Unknown variable in save state: PCE_TimestampBase
Unknown variable in save state: CD_TrayOpen
Unknown variable in save state: CD_SelectedDisc
Variable missing from save state: PCEIODataBuffer
Loaded save state variable: PC
Loaded save state variable: A
Loaded save state variable: P
Unknown variable in save state: IFlagSample
resizing to: w:256x232, ratio:1.250000,1.000000, rect->w:800, rect->h:480
Entered MDFNSS_Save
Calling MDFNSS_SaveSM
Entered MDFNSS_SaveSM
Passed is_multires checks
Entered smem_write
Leaving smem_write
Entered smem_write
Leaving smem_write
Entered smem_write
---------------------------------------
What needs doing:
Sprocket / iSM:
- Testing (Chris et al)
- Testing / completion of sync & auto-mailing the sync completion (David, Koen)
- Deployment
- Future:
- Frontend editing capabilities
Project manager, lead developer, lead maintainer:
- IPEC Care Packaging System
- PD SG1 Firmware
- PD SG1 Windows Firmware Update Tool
- PD SGS Firmware
- PD Worksafe Firmware
- PD Tester Firmware
- LCDity Daemon
- Sprocket ASM Database Backend API
- ASM Console Menu System
SG1 Basic Boot Flow:
1. bootstrap (Non-IPEC code):
Initialize MCU
Load program memory
Call setup
2. setup:
Configure prescale factor
Initialize display