Skip to content

Instantly share code, notes, and snippets.

View Zardoz89's full-sized avatar

Luis Panadero Guardeño Zardoz89

View GitHub Profile
@Zardoz89
Zardoz89 / dcpu-16.md
Last active August 29, 2015 14:00
DCPU-16 on Virtual Computer
layout title cat
default
DCPU-16 CPU
CPU

DCPU-16 Specification

Version 1.8 (Base on Mojang's v 1.7)

@Zardoz89
Zardoz89 / DMA.txt
Created April 25, 2014 15:54
DMA on Virtual Computer
There is this kind of interaction between devices and memory:
- Pasive read
- Copy from RAM to device
- Copy from device to RAM
Passive reads, works "watching" the data/address bus when the CPU (or other device) is writing to the RAM. Could keep sync a device internal memory/buffer respect the changes that happens in these memory block. This is simply implemented, reading the desired RAM block with VComputer.RAM(). If a device does passive read to keep sync his internal memory/buffer, it would need a initial Copy from RAM to device to set-up his internal memory/buffers.
Copy from RAM to device, does copy data to the device internal memory/buffers. Obviously this need an active usage of the data and address buses, and only could be a single device doing that at same time. This not means exactly that only a device could be doing a DMA, but that if more that one device try to do DMA, it will need to share the bus time with the other device doing DMA and the transfer rate will be halve.
Copy from device to RA
@Zardoz89
Zardoz89 / sintonizadora.txt
Last active August 29, 2015 14:00
ASUS Tiger Hybrid TV Tunner
# ASUS Tiger Hybrid TV Tunner
sudo rmmod saa7134_alsa
sudo rmmod saa7134_dvb
sudo modprobe saa7134 card=112 tuner=54 gpio_tracking=1 i2c_scan=1
# Escuchar la entrada de linea o el micro :
pactl load-module module-loopback latency_msec=10
# anotar el numero
# para desactivarlo :
pactl unload-module (Module Number)
@Zardoz89
Zardoz89 / 0 Notas sobre el sistema.md
Last active August 29, 2015 14:05
Cosas para el rol (Provisional)

El combate funciona igual que en D&D 3.5 de toda la vida.

La magia aun tengo que pulir detalles pero en principio iría por "mana".

Los personajes se construyen por puntos en vez de por clases. Las cosas especiales que tendría una clase, se hacen comprando dotes que normalmente cuestan 1 punto. El Ataque, la Fortaleza, Reflejos y Voluntad, se compran de la misma forma. Los dotes y los hechizos son los mismo que D&D 3.5 (siempre y cuando tengan sentido) mas algunos especiales. Las características se pillan igual que en D&D 3.5 -> Seis tiradas de 4 dados de 6 (4d6), quitando el mas bajo, y se asignan a discreción del jugador según lo que se quiera hacer.

Las razas son una serie de plantillas que se aplican una vez asignadas las características. No hay clases, en su lugar, se asignan puntos para los Dotes/Habilidades/Bonificadores que se quieran

@Zardoz89
Zardoz89 / .nvimrc
Created October 20, 2014 17:39
My neovim configuration
set nocompatible " Use Vim defaults (much better!)
set runtimepath=~/.neovim/,$VIMRUNTIME
syntax on
filetype off " required!
if !has("unix")
" Vundle on Windows
set rtp+=~/vimfiles/bundle/Vundle.vim/
@Zardoz89
Zardoz89 / RFC-TR1.txt
Last active August 29, 2015 14:08
RFC-TR1 Calling conventions for TR3200 CPU
Trillek DRAFT Luis P. G., Author
draft-rfc-tr1.md
Category: Standards Track 5 November 2014
Calling conventions proposal for TR3200 CPU
===========================================
# Status of This Memo
@Zardoz89
Zardoz89 / TR Firmware Ideas
Last active August 29, 2015 14:09
Ideas for Trillek computer firmware
The built in firmware of the Trillek computer could:
1) Do a quick check of how much RAM the computer has.
2) Search for devices and store their info in RAM.
3) Set up a monitor and keyboard, getting by default the monitor and keyboard with the lowest slot number.
In future, it could try to get from NVRAM which monitor and keyboard to use.
4) Print basic information about the computer such as total RAM, CPU speed, number of devices found and
hardware info.
5) If there is a floppy drive with a floppy disk, try to boot from it. It there are many, it would use the
floppy drive with the lowest slot.

Root namespace: trillek

Indentation

  • Indentation: 4 spaces
  • Avoid exceeding a line length of more than 80 characters.
  • Lines longer than 120 characters are forbidden.
  • Bracket Location:
 if (x < 0) {
@Zardoz89
Zardoz89 / plantillas razas
Last active August 29, 2015 14:13
Plantillas razas NSD20
Dotes
=====
Dote de Magia innata (2)
--------------------
El alma del personaje está estrechamente ligada a las energías arcanas, lo que les otorga cierto conocimiento innato de la magia. Pueden lanzar, como Aptitud sortílega, un conjuro de nivel 1 o dos conjuros de nivel 0 (a elegir durante la creación del personaje de entre la lista de conjuros).
Dote de Comunión con la Magia de la Ilusión (2)
--------------------
@Zardoz89
Zardoz89 / CPU datapath.md
Last active August 29, 2015 14:17
Other way for a CPU inspired on the TR3200

We could take a simple stage model like ARM Cortex-M3 , ie 3 stages model : Fetch, Decode and Execute.

Fetch only reads 4 bytes from RAM, to take the instruction and increases PC.

Decode, decodes an instruction and :

  • Fetch next 4 bytes without increasing the PC
  • If is prefix IF.cc, checks the condition and increases PC by 4.
    • If the condition is true, calls again the Decode stage using the fetch on Decode as instruction to be processed.
  • If the condition is false, don't call the Execute stage.