Skip to content

Instantly share code, notes, and snippets.

View tschak909's full-sized avatar
🏠
Working from home

Thomas Cherryhomes tschak909

🏠
Working from home
View GitHub Profile
/**
* screen_char_draw(Coord, ch, count) - Output buffer from ch* of length count as PLATO characters
*/
screen_char_draw(Coord, ch, count)
padPt* Coord;
unsigned char* ch;
unsigned char count;
{
short offset; /* due to negative offsets */
unsigned short x; /* Current X and Y coordinates */
@tschak909
tschak909 / heatmap.c
Created June 11, 2021 17:59
Heatmap program in Xlib
/* Heatmap program for X11 */
/* cc -oheatmap heatmap.c -lX11 */
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define X_OFFSET 128
@tschak909
tschak909 / heatmap-gks.c
Last active June 4, 2021 23:39
Heatmap program in GKS.
/* Heatmap Program */
#include <stdio.h>
#include <dos.h>
double vernum, gini_gks();
static int devices[]={1};
int errfil, idunit, maxxras, maxyras;
/* Heatmap program */
#include "obdefs.h"
#include "define.h"
#include "gemdefs.h"
#include "osbind.h"
#define WI_KIND (MOVER|CLOSER|NAME)
int h[16][16];
@tschak909
tschak909 / http-test-harness.go
Created February 8, 2021 00:30
Echoes GET and POST requests.
package main
import (
"fmt"
"io/ioutil"
"log"
"net/http"
)
func helloWorld(w http.ResponseWriter, r *http.Request) {
@tschak909
tschak909 / asyncio-chat-server.py
Created January 5, 2021 00:28
asyncio-chat-server.py
import asyncio
writers = []
def forward(writer, addr, message):
for w in writers:
if w != writer:
w.write(f"{addr!r}: {message!r}\n".encode())
async def handle(reader, writer):
@tschak909
tschak909 / n-handler-get-burst.asm
Created December 11, 2020 21:28
Not debugged yet.
;; Called to do burst read from GETB
GETBR: LDA ZICBAL ; Get requested dest buffer from IOCB
STA READCB+4 ; ...and put into DCB
LDA ZICBAH ; ...
STA READCB+5 ; ...
LDA ZICBLL ; Get Requested Length
STA READCB+8 ; and stuff into DCB as DBYT/DAUX
STA READCB+10 ; ...
LDA ZICBLH ; ...
@tschak909
tschak909 / c64-pr.txt
Created September 25, 2020 18:13
c64-pr.txt
Hello, everyone.
I’ve spent the last year with a team of people developing the firmware for an ESP32 based super-peripheral for the Atari 8-bit systems called #FujiNet. We have successfully taken this hardware to completion, and because both the hardware and software for this project are completely open sourced without commercial restriction, there are now multiple vendors producing #FujiNet devices for that community.
Now we want to take what we’ve learned, and apply it to the Commodore 64, for a device that plugs into the IEC and user ports, to provide the same functionality.
The firmware that drives #FujiNet could be very well adapted for the C64 and the serial 488 bus, as well as integrating quite nicely into the Kernal to provide networked disk, printing, wi-fi modem, and network card functionalities, all within the same device.
More info can be found here: http://fujinet.online/ and we have opened up a discord channel to discuss for #other-platforms. We’d love to hear from anyone who would be inte
19:50:00.585 > CF: 71 4f 06 80 47
19:50:00.586 > checksum_ok
19:50:00.586 > sioNetwork::sio_process 0x4f 'O': 0x06, 0x80
19:50:00.588 > sioNetwork::sio_open()
19:50:00.588 > ACK!
19:50:00.588 > <-SIO read 256
19:50:00.588 > ACK!
19:50:00.610 > parseURL: N:Congo*.*
19:50:00.610 > parseURL isValidURL: TNFS://HOMESOFT.IRATA.ONLINE/C/Congo*.*
19:50:00.618 > Open: TNFS://HOMESOFT.IRATA.ONLINE/C/Congo*.*
@tschak909
tschak909 / atari-binary-load.asm
Created May 27, 2020 03:35
Binary Load Routine for Atari
0100 ; BINARY LOAD MENU PROGRAM
0110 ; NAME OBJECT FILE D:AUTORUN.SYS
0120 ;
0130 ; RICHARD J. KALAGHER
0140 ; AUGUST 7, 1983
0150 ;
0160 .OPT NOEJECT
0170 ;
0180 ; EQUATES
0190 ;