Skip to content

Instantly share code, notes, and snippets.

View JettMonstersGoBoom's full-sized avatar
💭
I may be slow to respond.

Jett JettMonstersGoBoom

💭
I may be slow to respond.
View GitHub Profile
@JettMonstersGoBoom
JettMonstersGoBoom / NCM16x8.cs
Last active December 28, 2022 19:44
NCM plugin code for Mega65 NCM
using System;
using System.Drawing;
using CharactorLib.Common;
using CharactorLib.Format;
namespace ncm_16x8
{
public class ncm_16x8 : FormatBase
{
public ncm_16x8()
filetype: "6502 asm"
detect:
filename: "\\.(S|s|asm)$"
rules:
## Instructions
# 6502
- statement: "\\b(?i)(ADC|AND|ASL|BCC|BCS|BEQ|BIT|BMI|BNE|BPL|BRK|BVC|BVS|CLC|CLD|CLI|CLV|CMP|CPX|CPY|DEC|DEX|DEY|EOR|INC|INX|INY|JMP|JSR|LDA|LDX|LDY|LSR|NOP|ORA|PHA|PHP|PLA|PLP|ROL|ROR|RTI|RTS|SBC|SEC|SED|SEI|STA|STX|STY|TAX|TAY|TSX|TXA|TXS|TYA)(?-i)\\b"
# illegals
- statement: "\\b(?i)(ALR|ANC|ANE|ARR|DCP|ISC|LAS|LAX|LXA|RLA|RRA|SAX|SBX|SHA|SHX|SHY|SLO|SRE|TAS|USBC|JAM|DOP|TOP|KIL|HLT|XAS|SHS|ASO|SXA|XAS|AHX|AXA|AXS|LAR|DCM|XAA|ASR)(?-i)\\b"
@JettMonstersGoBoom
JettMonstersGoBoom / pcengine.asm
Last active September 12, 2022 21:00
PCEngine Kickassembler simple sample.
// java -jar c:\Devtools\KickAssembler\KickAss65CE02-5.24e.jar base_pce.asm
.cpu _huc6280
.function _arg0(arg) {
.if ((arg.getType()==-6) || (arg.getType()==1) || (arg.getType()==17))
.return CmdArgument(arg.getType(),<arg.getValue())
.return CmdArgument(arg.getType(),arg.getValue())
}
@JettMonstersGoBoom
JettMonstersGoBoom / reutesting.mfk
Created January 13, 2022 18:17
REU millfork experiments
import c64_joy
volatile byte REU_STATUS @$DF00
const byte REU_IRQ = $80 //Bit 7: INTERRUPT PENDING (1 = interrupt waiting to be served)
const byte REU_EOB = $40 //Bit 6: END OF BLOCK (1 = transfer complete)
const byte REU_FAULT = $20 //Bit 5: FAULT (1 = block verify error)
const byte REU_VERSION = %1111
volatile byte REU_COMMAND @$DF01
@JettMonstersGoBoom
JettMonstersGoBoom / example.c
Last active October 19, 2021 21:21
C64 screen mode for DOSLIKE
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include "dos.h"
#define VIC_IMPL
#include "vic.h"
unsigned char raster_colours[] = {
0x6, 0x6, 0x6, 0xe, 0x6, 0xe,
# load NESST session data and create binary data
# makes it easier to process and only need to hit save. not save each part or name each part
# python nesstNSStoBin.py session.nss data\output
# will create
# data\output.chr
# data\output.map
# data\output.pal
# data\output.msb
// Kernal CLS Routine
.label INIT_SCREEN = $e544
// Variables
.label player_x = $d000
.label player_y = $d001
.label player_c = $d027
@JettMonstersGoBoom
JettMonstersGoBoom / fsm.c
Last active April 12, 2021 16:35
Simple Finite State machine in C
//
// simple finite state machine in C
//
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
// for this example lets have N objects/entities
// https://github.com/emmanuel-marty/apultra
// ported to Kick asm
// can depack from other banks now
// can't cross over 64kb
.segment ZP
apl_bitbuf: .byte 0
apl_offset: .dword 0
apl_winptr: .dword 0
// 16 color mode notes
// this sample shows using 16 color mode, with multiple palettes
// the colour ram is divided into 16 sets of colors $00-$0f set 0 $10-$1f set 1 etc.
.cpu _45gs02
// boot header
* = $2001
.var addrStr = toIntString(Entry)