Skip to content

Instantly share code, notes, and snippets.

@ErnestoBorio
ErnestoBorio / settings.json
Last active Nov 12, 2020
VSCode settings.json
View settings.json
{
"files.exclude": {},
"editor.rulers": [
120,
180
],
"workbench.colorCustomizations": {
"editorRuler.foreground": "#222222"
},
"editor.renameOnType": true,
View opengl_test.go
package main
import (
"fmt"
"strings"
"github.com/go-gl/gl/v3.3-core/gl"
"github.com/veandco/go-sdl2/sdl"
)
View cpu6502.mjs
import "./instructions.mjs";
export class Cpu6502 {
A = 0xFF
lda = lda
#rts = function() {
return "RTS";
}
ldx() {
return this.lda();
@ErnestoBorio
ErnestoBorio / gist:2e42e038aa97a457050ec0520d6bc0d9
Created Feb 8, 2020
Trying to use custom charset at $2000
View gist:2e42e038aa97a457050ec0520d6bc0d9
Byte dump:
0825: ad 00 dd - lda $DD00
0828: 29 fc - and #%11111100
082a: 09 03 - ora #%11
082c: 8d 00 dd - sta $DD00
082f: a9 19 - lda #%00011001
0831: 8d 18 d0 - sta $D018
// correctly sets screen mem at $400, but charset is not used from $2000
// Actually in debugger, $D018 is $15
View upstart.asm
* = $0801 "Basic"
.word upstartEnd // link address
.word 10 // line num
.byte $9e // sys
.text toIntString(Start)
.byte 0
upstartEnd:
.word 0 // empty link signals the end of the program
Start:
@ErnestoBorio
ErnestoBorio / _rastest.asm
Last active Nov 24, 2019
C64 Raster IRQ test
View _rastest.asm
// For KickAssembler
#import "ptz.asm"
BasicUpstart2(Start)
.memblock "Start"
Start:
DisableInterrupts()