Skip to content

Instantly share code, notes, and snippets.

@ncot-tech
ncot-tech / layer2dmaclear
Created March 25, 2021 22:48
ZX Spectrum Next DMA Layer 2 Screen Clearing
// R3G3B2
void clearLayer2Screen(unsigned char colour)
{
unsigned char zero = colour;
IO_123B = 0x03; // Top
// WR0
IO_6B = 0x79;
IO_6B = 0x00; IO_6B = 0x00; // A Start
IO_6B = 0x00; IO_6B = 0x40; // 16k
@ncot-tech
ncot-tech / plotpixel
Created March 25, 2021 22:47
ZX Spectrum Next Layer 2 Pixel Plotting Routine
inline void plot(unsigned char x, unsigned char y, unsigned char colour)
{
unsigned char newy = y;
// Work out which bit of screen we need
if (y >= 128) {
IO_123B = 0x83; // Bottom
newy -= 128;
} else if (y >= 64) {
IO_123B = 0x43; // Middle
newy -= 64;
@ncot-tech
ncot-tech / rgb2colour
Created March 25, 2021 22:46
8 bit per pixel RGB C Macro
//R3G3B2
#define RGB2COLOUR(r,g,b) \
(unsigned char)( \
( \
(r & 0x7) << 5 \
) | \
( \
(g & 0x7) << 2 \
) | \
(b & 0x3) \
@sandeep-sparrow
sandeep-sparrow / MASTER.asm
Last active July 15, 2026 21:54
Report Generation using COBOL program
11 23 12345 CAREER TRAINING CTR 1234567 2222222 00000100
11 23 22222 HOMELITE TEXTRON CO 3454500 0000000 00000200
11 33 55555 POLOT LIFE INS. CO. 1000000 0100000 00000300
12 33 00111 DAUPHIN DEPOSIT BANK 1409900 1993000 00000400
12 33 12121 GENERAL SERVICES CO. 1144400 1104956 00000500
12 33 24680 INFO MANGEMENT CO. 1748145 1389247 00000600
12 33 14680 ZEN TECHNOLOGIES CO. 748143 89347 00000700
13 41 14681 TATA COFFEE PRIVATE. 2748345 2183247 00000800
13 42 14682 TATA CONSUMER CO. 5748145 5143247 00000900
14 43 14683 TATA CHEMICAL LTD. 4344345 4183447 00001000
@sonicprod
sonicprod / RPi4.MAME.Appliance.md
Last active October 15, 2026 00:18
How to make a dedicated MAME Appliance on a Raspberry Pi 4B | Comment réaliser un système MAME dédié sur un Raspberry Pi 4/Pi 400

How to make a dedicated MAME Appliance on a Raspberry Pi 4/Pi 400

Note: the following steps are written in French. Feel free to translate to English.

However, please take notice that if you copy the scripts on this page from the version translated into English by Google Translate, it is possible that extra characters may appear within some scripts (this is caused by Google Translate), resulting in corruption of the impacted scripts. Consequently, it is better to copy the scripts from the original French version of this page.

Comment réaliser un système MAME dédié sur un Raspberry Pi 4/Pi 400

@aprilmintacpineda
aprilmintacpineda / Using Multiple SSH keys - Beginner Friendly.md
Last active February 24, 2026 06:43
Beginner Friendly: Using Multiple SSH keys

How to follow this guide

The problem

I have one computer and two different github accounts. One is for work, the other is for my personal stuff. I can't use the same ssh key twice, so I have to use different ssh key for each of my accounts. How do I do that? How do I switch between these ssh keys?

@nomadekr
nomadekr / README.md
Last active January 28, 2020 15:02
AWS chalice 에서 jinja2 템플릿 활용하기

AWS chalice 에서 jinja2 템플릿 활용하기

디렉토리 구조

  • app.py
  • requirements.txt
  • chalicelib/
    • tempaltes/
      • index.html
@ThomasG77
ThomasG77 / .gitignore
Last active September 19, 2021 08:06
Minimal project to use OpenLayers with Parcel bundler
/node_modules/
/dist/
/.cache/
@viper233
viper233 / win-aws.yml
Created June 21, 2016 15:53
ec2 Windows fix ups
- hosts: localhost
gather_facts: no
vars:
target_aws_region: us-west-2
subnet_id: "change_me"
vpc_id: "change_me"
allowed_ip: "0.0.0.0/0"
vars_files:
- secret.yml
@gbaman
gbaman / HowToOTGFast.md
Last active June 7, 2026 20:18
Simple guide for setting up OTG modes on the Raspberry Pi Zero, the fast way!

Setting up Pi Zero OTG - The quick way (No USB keyboard, mouse, HDMI monitor needed)

More details - http://blog.gbaman.info/?p=791

For this method, alongside your Pi Zero, MicroUSB cable and MicroSD card, only an additional computer is required, which can be running Windows (with Bonjour, iTunes or Quicktime installed), Mac OS or Linux (with Avahi Daemon installed, for example Ubuntu has it built in).
1. Flash Raspbian Jessie full or Raspbian Jessie Lite onto the SD card.
2. Once Raspbian is flashed, open up the boot partition (in Windows Explorer, Finder etc) and add to the bottom of the config.txt file dtoverlay=dwc2 on a new line, then save the file.
3. If using a recent release of Jessie (Dec 2016 onwards), then create a new file simply called ssh in the SD card as well. By default SSH i