This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | ; packer from C64 | |
| ; https://csdb.dk/release/?id=34685 | |
| ; ldx #source_address | |
| ; ldy #dest_address | |
| ; jsr unrle6309 | |
| SUBROUTINE unrle6309 | |
| ldb #$00 | |
| ; get byte | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | // bytebytejump bytepusher implementation | |
| // build with | |
| // tcc bpush.c migr.dll | |
| #include "migr.h" | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| extern __declspec(dllimport) MIGR migr; | |
| // fake wav chunk for 8bit pcm, just the header | |
| signed char audio_buffer[368*2] = { | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | """ | |
| NES CHR direct loading | |
| ( experiment in tiled + python ) | |
| based on https://github.com/samhocevar/tiled-pico8 by Sam Hocevar | |
| """ | |
| import tiled as T | |
| import base64 | |
| PALETTE = [ | |
| (0x00, 0x00, 0x00), # black | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | from PIL import Image, ImageSequence | |
| import array as arr | |
| #assume gif is 4 colors ( and the 1st 4 ) | |
| #assume gif is 128x128 | |
| def frame2nes(input,basename,index): | |
| (w, h) = input.size | |
| # parse image by 8x8's | |
| outname = basename + "_" + str(index) + ".chr" | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | from PIL import Image, ImageSequence, ImageDraw | |
| import os | |
| import array as arr | |
| import sys | |
| # chops up a gif into NES or (C64 sprites) | |
| # you can define the master block size, for example 32x32 | |
| # will try and generate an optimal data set including meta information ( for NES ) | |
| ########################################################################################################################## | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | // Windows | |
| // gcc c6.c tigr\tigr.c -I tigr -lopengl32 -lgdi32 -Os -s -o c6.exe | |
| // Linux | |
| // gcc c6.c tigr\tigr.c -I tigr -lGLU -lGL -lX11 -Os -s -o c6.exe | |
| // OSX | |
| // gcc c6.c tigr\tigr.c -I tigr -framework OpenGL -framework Cocoa -Os -s -o c6.exe | |
| // using Tigr | |
| // from https://github.com/erkkah/tigr | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | //------------------------------------------------------------- | |
| // Simple example of a tasking system | |
| //------------------------------------------------------------- | |
| // we only write CODE and DATA ( not VTABLE or ZP ) | |
| .file [name="tasker.prg", segments="CODE,DATA"] | |
| .segment ZP [start=$02] // doesn't get written to the prg | |
| .segment CODE [start=$0801] | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | .file [name="test.prg", segments="CODE,DATA"] | |
| .segment CODE [start=$0801] | |
| .segment DATA [startAfter="CODE"] | |
| // PAL | |
| .label CPU_FREQ = $4cc8 | |
| VIC: { | |
| .label RASTER = $d012 | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | local byte = string.char | |
| local binfile = nil | |
| local map = {} | |
| local images = { } | |
| local output_message = "" | |
| local errors = 0 | |
| -- | |
| -- seperate platform from code | |
| -- | |
| local C64 = { | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | .file [name="collision.prg", segments="CODE"] | |
| .segment ZP [start=$02] | |
| spr_spr: .byte 0 | |
| .segment CODE [start=$0801] | |
| .segment CODE | |
| BasicUpstart2(Start) |