Skip to content

Instantly share code, notes, and snippets.

View Zardoz89's full-sized avatar

Luis Panadero Guardeño Zardoz89

View GitHub Profile
DCPU-16e Specification
Version 1.2
=== SUMMARY ====================================================================
* 16 bit words
* 8 banks of 0x10000 words of ram, numbered 0-7
* 8 registers (A, B, C, X, Y, Z, I, J)
@Zardoz89
Zardoz89 / adm.py
Created August 10, 2013 13:15
Adaptative Delta Modulation coding example in Python 3
#!/usr/bin/env python3
import array
BYTES = 2 # N bytes arthimetic
MAX = 2 ** (BYTES * 8 - 1) - 1
MIN = - (2 ** (BYTES * 8 - 1)) + 1
CHUNK= 1024
@Zardoz89
Zardoz89 / btc.py
Last active December 20, 2015 20:49
Binary Time constant 1.0 codec and decoder example
#!/usr/bin/env python3
import array
BYTES = 2 # N bytes arthimetic
MAX = 2 ** (BYTES * 8 - 1) - 1
MIN = - (2 ** (BYTES * 8 - 1)) + 1
CHUNK= 1024
@Zardoz89
Zardoz89 / dm_leaky.py
Last active December 20, 2015 13:29
Delta Modulation with Leaky integrator
#!/usr/bin/env python3
import array
BYTES = 2 # N bytes arthimetic
MAX = 2 ** (BYTES * 8 - 1) - 1
MIN = - (2 ** (BYTES * 8 - 1)) + 1
CHUNK= 1024
@Zardoz89
Zardoz89 / dm.py
Last active March 1, 2024 11:05
Delta Modulation Coding and Decoding
#!/usr/bin/env python3
import array
import audioop
import wave
import sys
import time
try:
/*-----------------------------------------------------
Author: <Zardoz>
Date: Fri May 31 15:53:33 2013
Description: BTC 1.6 audio codec player for uMicros
Original codec by Roman Black
Audio Codec description : http://www.romanblack.com/btc_alg.htm
-----------------------------------------------------*/
// NOTE : This output comes from RomamBlack BTc enconder that generates a MikroC