Skip to content

Instantly share code, notes, and snippets.

xk xk

Block or report user

Report or block xk

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@xk
xk / LAN8720A_esp32.ino
Last active Nov 8, 2019
Investigating the LAN8710/8720A boot up sequence with an esp32.
View LAN8720A_esp32.ino
#include <ETH.h>
#include <esp_eth.h>
#include <esp_wifi.h>
#include <driver/gpio.h>
//#define __GEORGE__
#define ETH_TXD0_PIN 19
#define ETH_TXEN_PIN 21
#define ETH_TXD1_PIN 22
View gist:1f455af5c9017150b8d6234743e9c2a3
; Apple II TURBO CASSETTE LOADER
; 13569 bps @44100 sps
; 14769 bps @48000 sps
; Jorge Chamorro Bieling, SEPT 2017
; jorge@jorgechamorro.com
; Compile with: apple2.duckdns.org/assembler/
; Connect the PC to the Apple II cassette in port, set the volume at 50% or more.
@xk
xk / cassette-scope.s
Created Sep 26, 2017
Apple II cassette-scope
View cassette-scope.s
;CASSETTE-SCOPE
;2017-09 JORGE@JORGECHAMORRO.COM
;KEYS:
;(T)RIGGER ON / OFF
;(SPACE) RUN / STOP
;(O)NE SHOT ON /OFF
;Any other key quits
@xk
xk / count_2_100e6.asm
Created Nov 1, 2017
6502 (FAKE) COUNT TO 100e6 (PLAYING THE GAME OF MIRRORS) (Apple II)
View count_2_100e6.asm
;See "Hypercount2017" @ c.s.a2
;https://groups.google.com/forum/#!topic/comp.sys.apple2/3hag0ebN-ts
;And "Counting from 1 to 1,000,000 on the FASTChip" @ c.s.a2
;https://groups.google.com/forum/#!topic/comp.sys.apple2/ibI06hDLiaY%5B1-25%5D
* = $1000
cero = $b0
display = 1464
digitos = 8
@xk
xk / count_2_1e40.asm
Created Oct 31, 2017
6502 COUNT TO 1e40 (Apple II)
View count_2_1e40.asm
;see "Counting from 1 to 1,000,000 on the FASTChip" @ c.s.a2
;https://groups.google.com/forum/#!topic/comp.sys.apple2/ibI06hDLiaY
* = $1000
uno = 177
dos = 178
zero = 176
dospuntos = 186
@xk
xk / count_2_one_million.asm
Last active Oct 29, 2017
SANER 6502 COUNT TO ONE MILLION
View count_2_one_million.asm
;see "Counting from 1 to 1,000,000 on the FASTChip" @ c.s.a2
;https://groups.google.com/forum/#!topic/comp.sys.apple2/ibI06hDLiaY
;And
;https://gist.github.com/xk/d2b95a4dcfc6f6fd40310dfeacb257da
;In theory the limit is ~1e6*6 cycles, ~ 6s, totally unrolled.
;This does it in ~ 6.2s.
* = $1000
@xk
xk / count_2_one_million.asm
Last active Oct 29, 2017
TOTAL INSANITY 6502 COUNT TO ONE MILLION
View count_2_one_million.asm
;see "Counting from 1 to 1,000,000 on the FASTChip" @ c.s.a2
;https://groups.google.com/forum/#!topic/comp.sys.apple2/ibI06hDLiaY
;Compiled copy-pasteable hex is here:
;https://gist.github.com/xk/b20138aae4e5e841d061803e15d17290
* = $1000
bell = $ff3a
digito0 = 1029
@xk
xk / count_2_one_million.hex
Created Oct 29, 2017
TOTAL INSANITY 6502 COUNT TO ONE MILLION
View count_2_one_million.hex
;see "Counting from 1 to 1,000,000 on the FASTChip" @ c.s.a2
;https://groups.google.com/forum/#!topic/comp.sys.apple2/ibI06hDLiaY
;See https://gist.github.com/xk/d2b95a4dcfc6f6fd40310dfeacb257da
1000:A0 B0 8C 05 04 8C 04 04
:8C 03 04 8C 02 04 8C 01
:04 8C 00 04 20 90 12 EE
:01 04 20 90 12 EE 01 04
:20 90 12 EE 01 04 20 90
@xk
xk / threads.c
Last active May 2, 2017
8 cores 96MB buffers
View threads.c
// 2017-04-30 jorge@jorgechamorro.com
// See http://www.eevblog.com/forum/projects/in-search-of-a-supercomputer
#include <pthread.h>
#include <stdlib.h>
#define BUF_SIZE 96*1024*1024
pthread_t t1, t2, t3, t4, t5, t6, t7, t8;
double* nu_buffer () { return (double*) malloc(BUF_SIZE); }
@xk
xk / threads.c
Last active May 2, 2017
Another useless benchmark to illustrate a point
View threads.c
// 2017-04-30 jorge@jorgechamorro.com
// See http://www.eevblog.com/forum/projects/in-search-of-a-supercomputer
#include <pthread.h>
#include <stdlib.h>
#define BUF_SIZE 16*1024*1024
pthread_t t1, t2, t3, t4;
double* nu_buffer () { return (double*) malloc(BUF_SIZE); }
You can’t perform that action at this time.